Aggiustate cazzatelle in isam.cpp
git-svn-id: svn://10.65.10.50/trunk@295 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0dbd85e23c
commit
4777de77d9
@ -44,7 +44,7 @@ class TConfig_application : public TApplication
|
|||||||
|
|
||||||
void do_config(int m);
|
void do_config(int m);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual bool user_create() { return TRUE; }
|
virtual bool user_create() { return TRUE; }
|
||||||
virtual bool user_destroy() { return TRUE; }
|
virtual bool user_destroy() { return TRUE; }
|
||||||
@ -64,7 +64,7 @@ class TConfig_application : public TApplication
|
|||||||
const char* oldv, const char* newv);
|
const char* oldv, const char* newv);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TConfig_application(int which_config = CONFIG_GENERAL)
|
TConfig_application(int which_config = CONFIG_GENERAL)
|
||||||
: _which_config(which_config)
|
: _which_config(which_config)
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#define __DEFMASK_H
|
#define __DEFMASK_H
|
||||||
|
|
||||||
/* @M
|
/* @M
|
||||||
Identificativi predefiniti dei controlli di XVT
|
Identificativi predefiniti dei controlli di XVT
|
||||||
*/
|
*/
|
||||||
#define DLG_NULL -1
|
#define DLG_NULL -1
|
||||||
#define DLG_OK 1 /* TAG del bottone <Conferma> */
|
#define DLG_OK 1 /* TAG del bottone <Conferma> */
|
||||||
#define DLG_CANCEL 2 /* TAG del bottone <Annulla> */
|
#define DLG_CANCEL 2 /* TAG del bottone <Annulla> */
|
||||||
@ -30,31 +30,31 @@ Identificativi predefiniti dei controlli di XVT
|
|||||||
#define DLG_USER 100 /* TAG del primo controllo definito dall'utente */
|
#define DLG_USER 100 /* TAG del primo controllo definito dall'utente */
|
||||||
|
|
||||||
/* @M
|
/* @M
|
||||||
Funzioni di libreria per i validate delle maschere
|
Funzioni di libreria per i validate delle maschere
|
||||||
Nome descrizione Parametri
|
Nome descrizione Parametri
|
||||||
NUM_EXPR espressione numerica espressione
|
NUM_EXPR espressione numerica espressione
|
||||||
STR_EXPR espressione stringa espressione
|
STR_EXPR espressione stringa espressione
|
||||||
NOT_EMPTY_FUNC campo non vuoto
|
NOT_EMPTY_FUNC campo non vuoto
|
||||||
FIXLEN_FUNC lunghezza fissa lunghezza
|
FIXLEN_FUNC lunghezza fissa lunghezza
|
||||||
EMPTYCOPY_FUNC data id del campo da cui copiarsi se vuoto
|
EMPTYCOPY_FUNC data id del campo da cui copiarsi se vuoto
|
||||||
DATE_CMP_FUNC compara due date operatore,id.campo con l'altra
|
DATE_CMP_FUNC compara due date operatore,id.campo con l'altra
|
||||||
data
|
data
|
||||||
PI_FUNC controllo part.IVA ????
|
PI_FUNC controllo part.IVA ????
|
||||||
XTPI_FUNC controllo esteso
|
XTPI_FUNC controllo esteso
|
||||||
part.IVA ????
|
part.IVA ????
|
||||||
XTZPI_FUNC controllo esteso
|
XTZPI_FUNC controllo esteso
|
||||||
part.IVA anche vuota ????
|
part.IVA anche vuota ????
|
||||||
CF_FUNC controllo cod.fisc. ????
|
CF_FUNC controllo cod.fisc. ????
|
||||||
XTCF_FUNC controllo esteso
|
XTCF_FUNC controllo esteso
|
||||||
cod.fisc. ????
|
cod.fisc. ????
|
||||||
XTZCF_FUNC controllo esteso
|
XTZCF_FUNC controllo esteso
|
||||||
cod.fisc.anche vuoto ????
|
cod.fisc.anche vuoto ????
|
||||||
MTCHECK_FUNC mese corretto per
|
MTCHECK_FUNC mese corretto per
|
||||||
ditta mensile o
|
ditta mensile o
|
||||||
trimestrale
|
trimestrale
|
||||||
REQIF_FUNC richiesto se immesso
|
REQIF_FUNC richiesto se immesso
|
||||||
un campo della lista n.ro di campi lista di campi...
|
un campo della lista n.ro di campi lista di campi...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define EXPR_FUNC 0 2
|
#define EXPR_FUNC 0 2
|
||||||
#define EMPTYCOPY_FUNC 1 1
|
#define EMPTYCOPY_FUNC 1 1
|
||||||
|
@ -24,23 +24,23 @@ enum TCodesym { _invalid, _endsym, _comma, _lpar, _rpar, _variable,
|
|||||||
_sin, _cos, _tan, _left, _right, _pow, _min, _max, _mid,
|
_sin, _cos, _tan, _left, _right, _pow, _min, _max, _mid,
|
||||||
_upper } ;
|
_upper } ;
|
||||||
|
|
||||||
// @DES I tipi di espressioni definiti
|
// @DES I tipi di espressioni definiti
|
||||||
// @T
|
// @T
|
||||||
enum TTypeexp { _numexpr, _strexpr } ;
|
enum TTypeexp { _numexpr, _strexpr } ;
|
||||||
// @END
|
// @END
|
||||||
|
|
||||||
// @C
|
// @C
|
||||||
// Classe TValue : public TObject
|
// Classe TValue : public TObject
|
||||||
// @END
|
// @END
|
||||||
|
|
||||||
class TValue : public TObject
|
class TValue : public TObject
|
||||||
{
|
{
|
||||||
// @DPRIV
|
// @DPRIV
|
||||||
real _r; // Valore real
|
real _r; // Valore real
|
||||||
TString _s; // Valore in formato stringa
|
TString _s; // Valore in formato stringa
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
|
|
||||||
TValue& operator =(const TValue& val) { _s = val._s; _r = val._r; return *this;} // Operatore = tra oggetti TValue
|
TValue& operator =(const TValue& val) { _s = val._s; _r = val._r; return *this;} // Operatore = tra oggetti TValue
|
||||||
const real& number() const { return _r;} // Ritorna il valore numerico
|
const real& number() const { return _r;} // Ritorna il valore numerico
|
||||||
@ -48,8 +48,8 @@ class TValue : public TObject
|
|||||||
void set(const real& val) { _r = val; _s = val.string();} // Real
|
void set(const real& val) { _r = val; _s = val.string();} // Real
|
||||||
void set(const char* val) { _s = val; _r = real(val);} // Stringa
|
void set(const char* val) { _s = val; _r = real(val);} // Stringa
|
||||||
|
|
||||||
// @DES Costruttori. Inizializzano TValue con vari oggetti
|
// @DES Costruttori. Inizializzano TValue con vari oggetti
|
||||||
// @FPUB
|
// @FPUB
|
||||||
TValue(const real& val) { _r = val; _s = val.string();} // Real
|
TValue(const real& val) { _r = val; _s = val.string();} // Real
|
||||||
TValue(const char* val) { _s = val; _r = real(val);} // Stringa
|
TValue(const char* val) { _s = val; _r = real(val);} // Stringa
|
||||||
TValue(const TValue& val) { *this = val; } // Altro TValue
|
TValue(const TValue& val) { *this = val; } // Altro TValue
|
||||||
@ -73,12 +73,12 @@ extern TValue nulltvalue;
|
|||||||
|
|
||||||
class TCode : public TObject
|
class TCode : public TObject
|
||||||
{
|
{
|
||||||
// @DPRIV
|
// @DPRIV
|
||||||
TCodesym _sym; // Simbolo-istruzione-codice
|
TCodesym _sym; // Simbolo-istruzione-codice
|
||||||
TValue _val; // Valore
|
TValue _val; // Valore
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
TCode& operator =(const TCode& b);
|
TCode& operator =(const TCode& b);
|
||||||
void set(TCodesym sym, const TValue& val = nulltvalue) { _sym = sym; _val = val; } // Inizializza simbolo = sym e valore = val
|
void set(TCodesym sym, const TValue& val = nulltvalue) { _sym = sym; _val = val; } // Inizializza simbolo = sym e valore = val
|
||||||
TCodesym getsym() const { return _sym;} // Ritorna il simbolo _sym
|
TCodesym getsym() const { return _sym;} // Ritorna il simbolo _sym
|
||||||
@ -98,14 +98,14 @@ class TCode : public TObject
|
|||||||
|
|
||||||
class TCodearray : public TObject
|
class TCodearray : public TObject
|
||||||
{
|
{
|
||||||
// @DPRIV
|
// @DPRIV
|
||||||
int _last; // Numero di istruzioni
|
int _last; // Numero di istruzioni
|
||||||
int _ip; // Puntatore all'istruzione corrente (Istruction pointer)
|
int _ip; // Puntatore all'istruzione corrente (Istruction pointer)
|
||||||
TArray _rpn; // Array
|
TArray _rpn; // Array
|
||||||
// @END
|
// @END
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
void clear(); // Cancella contenuto array
|
void clear(); // Cancella contenuto array
|
||||||
void add(TCodesym sym, const TValue& val = nulltvalue); // Aggiunge un'istruzione all'array
|
void add(TCodesym sym, const TValue& val = nulltvalue); // Aggiunge un'istruzione all'array
|
||||||
void begin() { _ip = 0;} // Mette all'inizio il puntatore all'istruzione corrente
|
void begin() { _ip = 0;} // Mette all'inizio il puntatore all'istruzione corrente
|
||||||
@ -121,14 +121,14 @@ class TCodearray : public TObject
|
|||||||
|
|
||||||
class TVar : public TObject
|
class TVar : public TObject
|
||||||
{
|
{
|
||||||
// @DPRIV
|
// @DPRIV
|
||||||
TString _name; // Nome variabile
|
TString _name; // Nome variabile
|
||||||
TValue _val; // Valore
|
TValue _val; // Valore
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// @DES Operatore = tra vari oggetti
|
// @DES Operatore = tra vari oggetti
|
||||||
// @FPUB
|
// @FPUB
|
||||||
const char* operator =(const char* val) { _val.set(val); return val;}
|
const char* operator =(const char* val) { _val.set(val); return val;}
|
||||||
const real& operator =(const real& val) { _val.set(val); return val;}
|
const real& operator =(const real& val) { _val.set(val); return val;}
|
||||||
TVar& operator =(const TValue& val) { _val = val; return *this;}
|
TVar& operator =(const TValue& val) { _val = val; return *this;}
|
||||||
@ -141,8 +141,8 @@ class TVar : public TObject
|
|||||||
const real& number() const { return _val.number();} // Ritorna il valore real della variabile
|
const real& number() const { return _val.number();} // Ritorna il valore real della variabile
|
||||||
const char* string() const { return _val.string();} // Ritorna il valore stringa della variabile
|
const char* string() const { return _val.string();} // Ritorna il valore stringa della variabile
|
||||||
|
|
||||||
// @DES Costruttori
|
// @DES Costruttori
|
||||||
// @FPUB
|
// @FPUB
|
||||||
TVar() { _name = ""; _val = nulltvalue;}
|
TVar() { _name = ""; _val = nulltvalue;}
|
||||||
TVar(const char* name, const TValue& val = nulltvalue) { _name = name; _val = val;}
|
TVar(const char* name, const TValue& val = nulltvalue) { _name = name; _val = val;}
|
||||||
TVar(TVar& v) { _name = v._name; _val = v._val;}
|
TVar(TVar& v) { _name = v._name; _val = v._val;}
|
||||||
@ -154,27 +154,27 @@ class TVar : public TObject
|
|||||||
|
|
||||||
class TVararray : public TObject
|
class TVararray : public TObject
|
||||||
{
|
{
|
||||||
// @DPRIV
|
// @DPRIV
|
||||||
int _last; // Numero di variabili
|
int _last; // Numero di variabili
|
||||||
TArray _array; // Array
|
TArray _array; // Array
|
||||||
// @END
|
// @END
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
void clear() { _last = 0; } // Cancella contenuto array
|
void clear() { _last = 0; } // Cancella contenuto array
|
||||||
void add(const TVar& var); // Aggiunge un oggetto TVar
|
void add(const TVar& var); // Aggiunge un oggetto TVar
|
||||||
void add(const char* name, const TValue& val = nulltvalue); // Aggiunge un nome di variabile e il suo valore
|
void add(const char* name, const TValue& val = nulltvalue); // Aggiunge un nome di variabile e il suo valore
|
||||||
const char* varname(int varnum) const { return varnum < _array.items() ? ((TVar&) _array[varnum]).getname() : "";} // Ritorna il nome della variabile di posto varnum
|
const char* varname(int varnum) const { return varnum < _array.items() ? ((TVar&) _array[varnum]).getname() : "";} // Ritorna il nome della variabile di posto varnum
|
||||||
|
|
||||||
// @DES Metodi di inizializzazione
|
// @DES Metodi di inizializzazione
|
||||||
// @FPUB
|
// @FPUB
|
||||||
void set(const char* varname, const real& val);
|
void set(const char* varname, const real& val);
|
||||||
void set(const char* varname, const char* val);
|
void set(const char* varname, const char* val);
|
||||||
void set(int varnum, const real& val) { if (varnum < _array.items()) ((TVar&) _array[varnum]) = val;}
|
void set(int varnum, const real& val) { if (varnum < _array.items()) ((TVar&) _array[varnum]) = val;}
|
||||||
void set(int varnum, const char* val) { if (varnum < _array.items()) ((TVar&) _array[varnum]) = val;}
|
void set(int varnum, const char* val) { if (varnum < _array.items()) ((TVar&) _array[varnum]) = val;}
|
||||||
|
|
||||||
// @DES Metodi di interrogazione
|
// @DES Metodi di interrogazione
|
||||||
// @FPUB
|
// @FPUB
|
||||||
const real& getnum(const char* varname);
|
const real& getnum(const char* varname);
|
||||||
const real& getnum(int varnum);
|
const real& getnum(int varnum);
|
||||||
const char* getstring(const char* varname);
|
const char* getstring(const char* varname);
|
||||||
@ -191,7 +191,7 @@ class TVararray : public TObject
|
|||||||
|
|
||||||
class TExpression : public TObject
|
class TExpression : public TObject
|
||||||
{
|
{
|
||||||
// @DPRIV
|
// @DPRIV
|
||||||
TCodearray _code; // Array di codice
|
TCodearray _code; // Array di codice
|
||||||
TVararray _var; // Array di variabili
|
TVararray _var; // Array di variabili
|
||||||
TValue _val; // Valore dell'espressione
|
TValue _val; // Valore dell'espressione
|
||||||
@ -199,10 +199,10 @@ class TExpression : public TObject
|
|||||||
TTypeexp _type; // Tipo dell'espressione
|
TTypeexp _type; // Tipo dell'espressione
|
||||||
TString _original; // stringa originale
|
TString _original; // stringa originale
|
||||||
|
|
||||||
// @END
|
// @END
|
||||||
|
|
||||||
// @FPROT
|
// @FPROT
|
||||||
protected:
|
protected:
|
||||||
void eval(); // Valuta l'espressione
|
void eval(); // Valuta l'espressione
|
||||||
TCodesym __gettoken(bool reduct = FALSE);
|
TCodesym __gettoken(bool reduct = FALSE);
|
||||||
TCodesym __factor(TCodesym startsym);
|
TCodesym __factor(TCodesym startsym);
|
||||||
@ -211,13 +211,13 @@ class TExpression : public TObject
|
|||||||
virtual void print_on(ostream& out) const ;
|
virtual void print_on(ostream& out) const ;
|
||||||
bool compile(const char* expression, TTypeexp type); // Compila l'espressione
|
bool compile(const char* expression, TTypeexp type); // Compila l'espressione
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
operator const real&(); // Ritorna il valore real dell'espressione
|
operator const real&(); // Ritorna il valore real dell'espressione
|
||||||
operator const char*(); // Ritorna il valore come stringa
|
operator const char*(); // Ritorna il valore come stringa
|
||||||
operator bool(); // Ritorna il valore come booleano
|
operator bool(); // Ritorna il valore come booleano
|
||||||
// @DES Metodi di interrogazione
|
// @DES Metodi di interrogazione
|
||||||
// @FPUB
|
// @FPUB
|
||||||
// Ritorna il nome della variabile di posto varnum
|
// Ritorna il nome della variabile di posto varnum
|
||||||
const char* varname(int varnum) const { return _var.varname(varnum); }
|
const char* varname(int varnum) const { return _var.varname(varnum); }
|
||||||
// Ritorna il numero di variabili nell'espressione
|
// Ritorna il numero di variabili nell'espressione
|
||||||
@ -226,8 +226,8 @@ class TExpression : public TObject
|
|||||||
TCodearray& code() const { return (TCodearray&)_code; }
|
TCodearray& code() const { return (TCodearray&)_code; }
|
||||||
const TVararray& vars() const { return _var; }
|
const TVararray& vars() const { return _var; }
|
||||||
|
|
||||||
// @DES Metodi di inizializzazione
|
// @DES Metodi di inizializzazione
|
||||||
// @FPUB
|
// @FPUB
|
||||||
void setvar(const char* varname, const real& val);
|
void setvar(const char* varname, const real& val);
|
||||||
void setvar(int varnum, const real& val);
|
void setvar(int varnum, const real& val);
|
||||||
void setvar(const char* varname, const char* val);
|
void setvar(const char* varname, const char* val);
|
||||||
|
@ -798,7 +798,7 @@ long TSystemisamfile::size(TRecnotype eox)
|
|||||||
|
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
|
|
||||||
bool TSystemisamfile::getlcf(int flev)
|
bool TSystemisamfile::getlcf(long flev)
|
||||||
|
|
||||||
{
|
{
|
||||||
_flds.destroy();
|
_flds.destroy();
|
||||||
|
@ -346,7 +346,7 @@ class TSystemisamfile : public TIsamfile
|
|||||||
TArray _flds;
|
TArray _flds;
|
||||||
TArray _exps;
|
TArray _exps;
|
||||||
|
|
||||||
bool getlcf(int flev);
|
bool getlcf(long flev);
|
||||||
void makelc(TRectype& rec);
|
void makelc(TRectype& rec);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: mailbox.cpp,v 1.2 1994-09-19 09:49:41 villa Exp $
|
// $Id: mailbox.cpp,v 1.3 1994-09-28 10:35:45 villa Exp $
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fstream.h>
|
#include <fstream.h>
|
||||||
@ -33,8 +33,8 @@ void TMessage::send()
|
|||||||
|
|
||||||
|
|
||||||
void TMailbox::reread()
|
void TMailbox::reread()
|
||||||
// reads new messages from mailbox;
|
// reads new messages from mailbox;
|
||||||
// create messages, put messages in _msgs array in cronological order
|
// create messages, put messages in _msgs array in cronological order
|
||||||
{
|
{
|
||||||
char buf[MAX_TXT_LEN];
|
char buf[MAX_TXT_LEN];
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ void TMailbox::send(TMessage& m)
|
|||||||
(m.subject() != NULL || m.body() != NULL),
|
(m.subject() != NULL || m.body() != NULL),
|
||||||
"can't send partially empty message");
|
"can't send partially empty message");
|
||||||
|
|
||||||
// strcpy(to_path, getenv("TMPDIR") == NULL ? MAILDIR : getenv("TMPDIR"));
|
// strcpy(to_path, getenv("TMPDIR") == NULL ? MAILDIR : getenv("TMPDIR"));
|
||||||
TFilename to_path; to_path.tempdir();
|
TFilename to_path; to_path.tempdir();
|
||||||
to_path << "/" << m.to() << ".mbx";
|
to_path << "/" << m.to() << ".mbx";
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ TMailbox::TMailbox(const char* appname) : _msgs(DEF_MSGS_CAPACITY)
|
|||||||
appname = MainApp()->name(); // myself; must be global
|
appname = MainApp()->name(); // myself; must be global
|
||||||
|
|
||||||
_path.tempdir();
|
_path.tempdir();
|
||||||
// strcpy(_path, getenv("TMPDIR") == NULL ? MAILDIR : getenv("TMPDIR"));
|
// strcpy(_path, getenv("TMPDIR") == NULL ? MAILDIR : getenv("TMPDIR"));
|
||||||
_path << "/" << appname << ".mbx";
|
_path << "/" << appname << ".mbx";
|
||||||
|
|
||||||
_lastread =0; _lastpos = 0l;
|
_lastread =0; _lastpos = 0l;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: mailbox.h,v 1.2 1994-09-19 09:49:42 villa Exp $
|
// $Id: mailbox.h,v 1.3 1994-09-28 10:35:46 villa Exp $
|
||||||
|
|
||||||
/* si', trattasi di -*-c++-*- */
|
/* si', trattasi di -*-c++-*- */
|
||||||
// Mailbox.h
|
// Mailbox.h
|
||||||
@ -28,7 +28,7 @@ class TMessage : public TObject
|
|||||||
byte _flags;
|
byte _flags;
|
||||||
int _number;
|
int _number;
|
||||||
|
|
||||||
friend class TMailbox;
|
friend class TMailbox;
|
||||||
|
|
||||||
void setread() { _flags |= MSG_READ; }
|
void setread() { _flags |= MSG_READ; }
|
||||||
bool isread() { return _flags & MSG_READ; }
|
bool isread() { return _flags & MSG_READ; }
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
class TObject
|
class TObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
virtual ~TObject() {}
|
virtual ~TObject() {}
|
||||||
virtual const char* class_name() const;
|
virtual const char* class_name() const;
|
||||||
virtual word class_id() const;
|
virtual word class_id() const;
|
||||||
@ -52,7 +52,7 @@ public:
|
|||||||
class TError_Object : public TObject
|
class TError_Object : public TObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
virtual const char* class_name() const;
|
virtual const char* class_name() const;
|
||||||
virtual word class_id() const;
|
virtual word class_id() const;
|
||||||
virtual bool ok() const;
|
virtual bool ok() const;
|
||||||
@ -69,7 +69,7 @@ public:
|
|||||||
class TSortable : public TObject
|
class TSortable : public TObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
virtual int compare(const TSortable& s) const pure;
|
virtual int compare(const TSortable& s) const pure;
|
||||||
virtual const char* class_name() const;
|
virtual const char* class_name() const;
|
||||||
virtual word class_id() const;
|
virtual word class_id() const;
|
||||||
|
@ -13,16 +13,16 @@ enum TFilelock { _excllock = 0x100, _autolock = 0x200,
|
|||||||
_manulock = 0x400};
|
_manulock = 0x400};
|
||||||
enum TReclock { _unlock = 0x1000, _nolock = 0x2000, _lock = 0x4000,
|
enum TReclock { _unlock = 0x1000, _nolock = 0x2000, _lock = 0x4000,
|
||||||
_testandlock = (int)0x8000} ;
|
_testandlock = (int)0x8000} ;
|
||||||
enum TRecstates { _valid, _deleted};
|
enum TRecstates { _valid, _deleted};
|
||||||
enum TDirtype { _nordir, _comdir } ;
|
enum TDirtype { _nordir, _comdir } ;
|
||||||
enum TDirop { _nordirop, _sysdirop };
|
enum TDirop { _nordirop, _sysdirop };
|
||||||
enum TFieldtypes { _nullfld, _alfafld, _intfld, _longfld, _realfld,
|
enum TFieldtypes { _nullfld, _alfafld, _intfld, _longfld, _realfld,
|
||||||
_datefld, _wordfld, _charfld, _boolfld , _intzerofld, _longzerofld} ;
|
_datefld, _wordfld, _charfld, _boolfld , _intzerofld, _longzerofld} ;
|
||||||
enum TIsamop { _isfirst = 0x0, _islast = 0x1, _isnext= 0x2,
|
enum TIsamop { _isfirst = 0x0, _islast = 0x1, _isnext= 0x2,
|
||||||
_isprev = 0x4, _iscurr = 0x8, _isequal = 0x10,
|
_isprev = 0x4, _iscurr = 0x8, _isequal = 0x10,
|
||||||
_isgreat = 0x20, _isgteq = 0x40, _isnextn = 0x100,
|
_isgreat = 0x20, _isgteq = 0x40, _isnextn = 0x100,
|
||||||
_isprevn = 0x200} ;
|
_isprevn = 0x200} ;
|
||||||
enum TIsamerr { _iseof = 201, _isbof = 202, _isfileovf = 203,
|
enum TIsamerr { _iseof = 201, _isbof = 202, _isfileovf = 203,
|
||||||
_iskeynotfound = 204, _isemptyfile = 205,
|
_iskeynotfound = 204, _isemptyfile = 205,
|
||||||
_isdupkey = 206, _isnocurkey = 207,
|
_isdupkey = 206, _isnocurkey = 207,
|
||||||
_iskeyrangeerr = 211, _iskeyerr = 212,
|
_iskeyrangeerr = 211, _iskeyerr = 212,
|
||||||
@ -30,7 +30,7 @@ enum TIsamerr { _iseof = 201, _isbof = 202, _isfileovf = 203,
|
|||||||
_isnrecerr = 218, _isfilefull = 219, _isnotopen = 220,
|
_isnrecerr = 218, _isfilefull = 219, _isnotopen = 220,
|
||||||
_isnotcurr = 221, _isalropen = 222, _isdeadlock = 223,
|
_isnotcurr = 221, _isalropen = 222, _isdeadlock = 223,
|
||||||
_isreinsert = 224, _islocked = 225} ;
|
_isreinsert = 224, _islocked = 225} ;
|
||||||
typedef long TRecnotype;
|
typedef long TRecnotype;
|
||||||
|
|
||||||
#endif // __RECTYPES_H
|
#endif // __RECTYPES_H
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ inline char match(char c)
|
|||||||
{ return (c == '{') ? '}' : c; }
|
{ return (c == '{') ? '}' : c; }
|
||||||
|
|
||||||
TScanner::TScanner(const char* filename)
|
TScanner::TScanner(const char* filename)
|
||||||
: ifstream(strlwr(filename)), _token(128), _key(2), _pushed(FALSE), _line(0)
|
: ifstream(strlwr(filename)), _token(128), _key(2), _pushed(FALSE), _line(0)
|
||||||
{
|
{
|
||||||
if (bad()) fatal_box("Impossibile aprire %s", filename);
|
if (bad()) fatal_box("Impossibile aprire %s", filename);
|
||||||
}
|
}
|
||||||
|
@ -34,13 +34,13 @@ typedef struct s_rct { /* mathematical rectangle */
|
|||||||
// @C
|
// @C
|
||||||
class TScanner : private ifstream
|
class TScanner : private ifstream
|
||||||
{
|
{
|
||||||
// @DPRIV
|
// @DPRIV
|
||||||
TString _token, _key;
|
TString _token, _key;
|
||||||
bool _pushed;
|
bool _pushed;
|
||||||
word _line;
|
word _line;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
TScanner(const char* filename);
|
TScanner(const char* filename);
|
||||||
const TString& pop();
|
const TString& pop();
|
||||||
const TString& key() const { return _key; }
|
const TString& key() const { return _key; }
|
||||||
|
@ -27,7 +27,7 @@ class TEdit_field;
|
|||||||
|
|
||||||
class TSheet : public TScroll_window
|
class TSheet : public TScroll_window
|
||||||
{
|
{
|
||||||
// @DPRIV
|
// @DPRIV
|
||||||
enum { MAX_BUT = 8, MAX_COL = 128 };
|
enum { MAX_BUT = 8, MAX_COL = 128 };
|
||||||
TArray _page;
|
TArray _page;
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class TSheet : public TScroll_window
|
|||||||
byte _buttonmask;
|
byte _buttonmask;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// @FPROT
|
// @FPROT
|
||||||
bool head_on() const { return _columns > 1; }
|
bool head_on() const { return _columns > 1; }
|
||||||
bool buttons_on() const { return *_button != NULL_WIN; }
|
bool buttons_on() const { return *_button != NULL_WIN; }
|
||||||
short visible_rows() const { return _visible_rows; }
|
short visible_rows() const { return _visible_rows; }
|
||||||
@ -78,7 +78,7 @@ protected:
|
|||||||
|
|
||||||
void print();
|
void print();
|
||||||
public:
|
public:
|
||||||
// @FPUB
|
// @FPUB
|
||||||
TSheet(short x, short y, short dx, short dy,
|
TSheet(short x, short y, short dx, short dy,
|
||||||
const char* title, const char* head, byte buttons = 0,
|
const char* title, const char* head, byte buttons = 0,
|
||||||
long first = 0L, WINDOW parent = NULL_WIN);
|
long first = 0L, WINDOW parent = NULL_WIN);
|
||||||
|
@ -51,10 +51,10 @@ class TTextfile: public TObject
|
|||||||
void _read_page(long line);
|
void _read_page(long line);
|
||||||
bool _in_page(long l)
|
bool _in_page(long l)
|
||||||
{ return l >= _page_start && l < _page_end; }
|
{ return l >= _page_start && l < _page_end; }
|
||||||
// void _parse_style(long j);
|
// void _parse_style(long j);
|
||||||
style _trans_style(char c);
|
style _trans_style(char c);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
long lines() { return _lines; }
|
long lines() { return _lines; }
|
||||||
bool changed() { return _dirty; }
|
bool changed() { return _dirty; }
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* @M
|
/* @M
|
||||||
Identificatori (tag) per i menu' e le voci dei menu' ad uso di URL
|
Identificatori (tag) per i menu' e le voci dei menu' ad uso di URL
|
||||||
*/
|
*/
|
||||||
#define TASK_MENUBAR 10000
|
#define TASK_MENUBAR 10000
|
||||||
#define ALT_MENUBAR 11000
|
#define ALT_MENUBAR 11000
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ WINDOW xvt_create_window(WIN_TYPE wt,
|
|||||||
EVENT_HANDLER eh,
|
EVENT_HANDLER eh,
|
||||||
long app_data);
|
long app_data);
|
||||||
|
|
||||||
WINDOW xvt_create_control(WIN_TYPE wt,
|
WINDOW xvt_create_control(WIN_TYPE wt,
|
||||||
short x, short y, short dx, short dy,
|
short x, short y, short dx, short dy,
|
||||||
const char* caption,
|
const char* caption,
|
||||||
WINDOW parent,
|
WINDOW parent,
|
||||||
@ -34,37 +34,37 @@ WINDOW xvt_create_control(WIN_TYPE wt,
|
|||||||
long app_data,
|
long app_data,
|
||||||
int id);
|
int id);
|
||||||
|
|
||||||
WINDOW xvt_create_statbar();
|
WINDOW xvt_create_statbar();
|
||||||
void xvt_statbar_set(const char* text);
|
void xvt_statbar_set(const char* text);
|
||||||
void xvt_statbar_refresh();
|
void xvt_statbar_refresh();
|
||||||
|
|
||||||
void beep();
|
void beep();
|
||||||
void do_events();
|
void do_events();
|
||||||
void customize_controls(bool on);
|
void customize_controls(bool on);
|
||||||
KEY e_char_to_key(const EVENT* ep);
|
KEY e_char_to_key(const EVENT* ep);
|
||||||
void dispatch_e_char(WINDOW win, KEY key);
|
void dispatch_e_char(WINDOW win, KEY key);
|
||||||
void dispatch_e_scroll(WINDOW win, KEY key);
|
void dispatch_e_scroll(WINDOW win, KEY key);
|
||||||
|
|
||||||
void xvt_set_font(WINDOW win, int family, int style, int dim = 0);
|
void xvt_set_font(WINDOW win, int family, int style, int dim = 0);
|
||||||
void xvt_set_front_control(WINDOW win);
|
void xvt_set_front_control(WINDOW win);
|
||||||
const char* xvt_get_title(WINDOW win);
|
const char* xvt_get_title(WINDOW win);
|
||||||
void xvt_enable_control(WINDOW win, bool on);
|
void xvt_enable_control(WINDOW win, bool on);
|
||||||
void xvt_check_box(WINDOW win, bool on);
|
void xvt_check_box(WINDOW win, bool on);
|
||||||
bool xvt_get_checked_state(WINDOW win);
|
bool xvt_get_checked_state(WINDOW win);
|
||||||
void xvt_check_radio_button(WINDOW win, const WINDOW* ctls, int count);
|
void xvt_check_radio_button(WINDOW win, const WINDOW* ctls, int count);
|
||||||
int xvt_get_checked_radio(const WINDOW* ctls, int count);
|
int xvt_get_checked_radio(const WINDOW* ctls, int count);
|
||||||
|
|
||||||
bool xvt_test_menu_tag(MENU_TAG tag);
|
bool xvt_test_menu_tag(MENU_TAG tag);
|
||||||
|
|
||||||
COLOR trans_color(char c);
|
COLOR trans_color(char c);
|
||||||
PAT_STYLE trans_brush(char p);
|
PAT_STYLE trans_brush(char p);
|
||||||
PEN_STYLE trans_pen (char p);
|
PEN_STYLE trans_pen (char p);
|
||||||
|
|
||||||
|
|
||||||
/* @END */
|
/* @END */
|
||||||
|
|
||||||
extern short CHARX, CHARY, COLX, ROWY;
|
extern short CHARX, CHARY, COLX, ROWY;
|
||||||
|
|
||||||
/* @END */
|
/* @END */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user