progind.cpp Migliorato disegno barra tridimensionale
real.cpp Aggiunto _atold per 32 bit relation.cpp Tolti linkrecinst stdtypes.cpp Tolte variabili inutili di campo strings.* Aggiunto metodo TFilename::input tabutil.* Tolti linkrecinst git-svn-id: svn://10.65.10.50/trunk@6353 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d0cdc7d983
commit
a411177e90
@ -45,7 +45,7 @@ TIndwin::TIndwin(long max, const char* txt, bool cancel, bool bar, int div)
|
|||||||
|
|
||||||
_text = new TMultiline_control(win(), DLG_NULL, 1, 1, hor-2, lines+1, 512, "CD", "");
|
_text = new TMultiline_control(win(), DLG_NULL, 1, 1, hor-2, lines+1, 512, "CD", "");
|
||||||
_text->set_read_only();
|
_text->set_read_only();
|
||||||
|
|
||||||
testo.replace('\n', '\r');
|
testo.replace('\n', '\r');
|
||||||
_text->set_caption(testo);
|
_text->set_caption(testo);
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ void TIndwin::update_bar()
|
|||||||
{
|
{
|
||||||
// Rettangolo scavato
|
// Rettangolo scavato
|
||||||
xi_draw_3d_rect(w, &r, TRUE, 2,
|
xi_draw_3d_rect(w, &r, TRUE, 2,
|
||||||
BTN_LIGHT_COLOR, BTN_BACK_COLOR, BTN_DARK_COLOR);
|
MASK_LIGHT_COLOR, BTN_BACK_COLOR, MASK_DARK_COLOR);
|
||||||
b.left += 2; b.right -= 2;
|
b.left += 2; b.right -= 2;
|
||||||
b.top += 2; b.bottom -= 2;
|
b.top += 2; b.bottom -= 2;
|
||||||
// Rettangolo in rilievo
|
// Rettangolo in rilievo
|
||||||
|
@ -11,7 +11,7 @@ const real ZERO (0.0);
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifndef _atold
|
#if XVT_OS == XVT_OS_WIN32
|
||||||
|
|
||||||
inline long double _atold(const char* str)
|
inline long double _atold(const char* str)
|
||||||
{
|
{
|
||||||
|
@ -251,14 +251,14 @@ const char* TRelationdef::evaluate_expr(int j, const TLocalisamfile& to)
|
|||||||
TRelation::TRelation(int logicnum)
|
TRelation::TRelation(int logicnum)
|
||||||
: _files(4), _reldefs(4), _errors(NOERR)
|
: _files(4), _reldefs(4), _errors(NOERR)
|
||||||
{
|
{
|
||||||
TLocalisamfile* f = new TLocalisamfile(logicnum, FALSE);
|
TLocalisamfile* f = new TLocalisamfile(logicnum);
|
||||||
_files.add(f);
|
_files.add(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
TRelation::TRelation(const char* tabname)
|
TRelation::TRelation(const char* tabname)
|
||||||
: _files(4), _reldefs(4), _errors(NOERR)
|
: _files(4), _reldefs(4), _errors(NOERR)
|
||||||
{
|
{
|
||||||
TTable* t = new TTable(tabname, FALSE);
|
TTable* t = new TTable(tabname);
|
||||||
_files.add(t);
|
_files.add(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,14 +502,14 @@ bool TRelation::add(
|
|||||||
bool TRelation::add(int logicnum, const char* relexprs, int key,
|
bool TRelation::add(int logicnum, const char* relexprs, int key,
|
||||||
int linkto, int alias, bool allow_lock)
|
int linkto, int alias, bool allow_lock)
|
||||||
{
|
{
|
||||||
TLocalisamfile* f = new TLocalisamfile(logicnum, FALSE);
|
TLocalisamfile* f = new TLocalisamfile(logicnum);
|
||||||
return add(f, relexprs, key, linkto, alias, allow_lock);
|
return add(f, relexprs, key, linkto, alias, allow_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TRelation::add(const char* tabname, const char* relexprs, int key,
|
bool TRelation::add(const char* tabname, const char* relexprs, int key,
|
||||||
int linkto, int alias, bool allow_lock)
|
int linkto, int alias, bool allow_lock)
|
||||||
{
|
{
|
||||||
TTable* t = new TTable(tabname, FALSE);
|
TTable* t = new TTable(tabname);
|
||||||
return add(t, relexprs, key, linkto, alias, allow_lock);
|
return add(t, relexprs, key, linkto, alias, allow_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,16 +75,12 @@ void init_global_vars()
|
|||||||
CGetFile(LF_DIR, &d, _nolock, NORDIR);
|
CGetFile(LF_DIR, &d, _nolock, NORDIR);
|
||||||
if (d.EOD > maxfdir) maxfdir = d.EOD;
|
if (d.EOD > maxfdir) maxfdir = d.EOD;
|
||||||
|
|
||||||
maxfdir += 32; // Guy: Sicurezza buona, sicurezza vera
|
|
||||||
|
|
||||||
openf = new isfdptr[maxfdir];
|
openf = new isfdptr[maxfdir];
|
||||||
openrec = new TRectype*[maxfdir];
|
|
||||||
ext_files = new isfdptr[maxfdir];
|
ext_files = new isfdptr[maxfdir];
|
||||||
|
|
||||||
for (long i = 0; i < maxfdir; i++)
|
for (long i = 0; i < maxfdir; i++)
|
||||||
{
|
{
|
||||||
openf[i] = NULL;
|
openf[i] = NULL;
|
||||||
openrec[i] = NULL;
|
|
||||||
ext_files[i] = NULL;
|
ext_files[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +96,6 @@ void free_global_vars()
|
|||||||
if (openf != NULL)
|
if (openf != NULL)
|
||||||
{
|
{
|
||||||
delete openf;
|
delete openf;
|
||||||
delete openrec;
|
|
||||||
delete ext_files;
|
delete ext_files;
|
||||||
prefix_destroy();
|
prefix_destroy();
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ TString& TString::operator <<(double n)
|
|||||||
// The object should be completely storable in spark
|
// The object should be completely storable in spark
|
||||||
TString& TString::operator <<(const TObject& obj)
|
TString& TString::operator <<(const TObject& obj)
|
||||||
{
|
{
|
||||||
ostrstream out((char*)(const char*)spark, spark.size());
|
ostrstream out(spark.get_buffer(), spark.size());
|
||||||
obj.print_on(out);
|
obj.print_on(out);
|
||||||
out << ends;
|
out << ends;
|
||||||
return operator <<(spark);
|
return operator <<(spark);
|
||||||
@ -243,7 +243,7 @@ TString& TString::operator <<(const TString& str)
|
|||||||
|
|
||||||
// @mfunc Elimina tutti i caratteri contenuti in <p k>
|
// @mfunc Elimina tutti i caratteri contenuti in <p k>
|
||||||
TString& TString::strip(
|
TString& TString::strip(
|
||||||
const char* k) // @parm Stringa da controllarne l'esitenza nell'oggetto
|
const char* k) // @parm Stringa dei caratteri da eliminare
|
||||||
|
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
@ -1100,9 +1100,9 @@ const TFilename& TFilename::tempdir()
|
|||||||
{
|
{
|
||||||
_tempdir = getenv("TEMP");
|
_tempdir = getenv("TEMP");
|
||||||
if (_tempdir.empty())
|
if (_tempdir.empty())
|
||||||
_tempdir = getenv("TMP");
|
_tempdir = getenv("TMP");
|
||||||
if (_tempdir.empty())
|
if (_tempdir.empty())
|
||||||
_tempdir << SLASH << "tmp";
|
_tempdir << SLASH << "tmp";
|
||||||
|
|
||||||
const int last = len()-1;
|
const int last = len()-1;
|
||||||
if (!is_not_slash(_str[last]))
|
if (!is_not_slash(_str[last]))
|
||||||
@ -1250,6 +1250,12 @@ bool TFilename::search_in_path(TFilename& path) const
|
|||||||
return path.not_empty();
|
return path.not_empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TFilename::input()
|
||||||
|
{
|
||||||
|
return input_filename(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Token string
|
// Token string
|
||||||
|
@ -392,12 +392,15 @@ public:
|
|||||||
TFilename(const TFilename& n) : TString(256)
|
TFilename(const TFilename& n) : TString(256)
|
||||||
{ set(n); }
|
{ set(n); }
|
||||||
|
|
||||||
// @cmember Assegnazione tra TFile e stringa
|
// @cmember Assegnazione tra TFilename e stringa
|
||||||
const TString& operator =(const char* s)
|
const TString& operator =(const char* s)
|
||||||
{ return set(s); }
|
{ return set(s); }
|
||||||
// @cmember Assegnazione tra TFile ed indirizzo della stringa
|
// @cmember Assegnazione tra TFilename e TString
|
||||||
const TString& operator =(const TString& s)
|
const TString& operator =(const TString& s)
|
||||||
{ return set((const char*)s); }
|
{ return set((const char*)s); }
|
||||||
|
// @cmember Assegnazione tra TFilename e TFilename
|
||||||
|
const TString& operator =(const TFilename& s)
|
||||||
|
{ return set((const char*)s); }
|
||||||
|
|
||||||
// @cmember Controlla il formato del nome del file
|
// @cmember Controlla il formato del nome del file
|
||||||
virtual bool ok() const;
|
virtual bool ok() const;
|
||||||
@ -420,7 +423,8 @@ public:
|
|||||||
bool exist() const;
|
bool exist() const;
|
||||||
// @cmember Cerca nel path il nome del file corrente e scrive il path assoluto in path
|
// @cmember Cerca nel path il nome del file corrente e scrive il path assoluto in path
|
||||||
bool search_in_path(TFilename& path) const;
|
bool search_in_path(TFilename& path) const;
|
||||||
|
// @cmember Richiede all'utente il nome di un file
|
||||||
|
bool input();
|
||||||
// @cmember Ritorna il nome del file
|
// @cmember Ritorna il nome del file
|
||||||
const char* name() const;
|
const char* name() const;
|
||||||
// @cmember Ritorna il nome del direttorio
|
// @cmember Ritorna il nome del direttorio
|
||||||
|
@ -12,8 +12,8 @@ int TTable::name2log(const char* n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TTable::TTable(const char* tabname, bool linkrecinst)
|
TTable::TTable(const char* tabname)
|
||||||
: TLocalisamfile(name2log(tabname), linkrecinst), _cod(curr(), "COD")
|
: TLocalisamfile(name2log(tabname)), _cod(curr(), "COD")
|
||||||
{
|
{
|
||||||
if ((*tabname == '%') || (*tabname == '#')) tabname++;
|
if ((*tabname == '%') || (*tabname == '#')) tabname++;
|
||||||
_tabname = tabname;
|
_tabname = tabname;
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
// @cmember Ritorna la descrizione della tabella
|
// @cmember Ritorna la descrizione della tabella
|
||||||
virtual const char* description();
|
virtual const char* description();
|
||||||
// @cmember Costruttore
|
// @cmember Costruttore
|
||||||
TTable(const char* tabname, bool linkrecinst = FALSE);
|
TTable(const char* tabname);
|
||||||
// @cmember Distruttore
|
// @cmember Distruttore
|
||||||
virtual ~TTable();
|
virtual ~TTable();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user