diff --git a/include/progind.cpp b/include/progind.cpp index ff33c3b0b..4dfbcd700 100755 --- a/include/progind.cpp +++ b/include/progind.cpp @@ -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->set_read_only(); - + testo.replace('\n', '\r'); _text->set_caption(testo); @@ -129,7 +129,7 @@ void TIndwin::update_bar() { // Rettangolo scavato 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.top += 2; b.bottom -= 2; // Rettangolo in rilievo diff --git a/include/real.cpp b/include/real.cpp index 32104a48e..e3165ef17 100755 --- a/include/real.cpp +++ b/include/real.cpp @@ -11,7 +11,7 @@ const real ZERO (0.0); #include #include -#ifndef _atold +#if XVT_OS == XVT_OS_WIN32 inline long double _atold(const char* str) { diff --git a/include/relation.cpp b/include/relation.cpp index 551e12d26..17c2e9469 100755 --- a/include/relation.cpp +++ b/include/relation.cpp @@ -251,14 +251,14 @@ const char* TRelationdef::evaluate_expr(int j, const TLocalisamfile& to) TRelation::TRelation(int logicnum) : _files(4), _reldefs(4), _errors(NOERR) { - TLocalisamfile* f = new TLocalisamfile(logicnum, FALSE); + TLocalisamfile* f = new TLocalisamfile(logicnum); _files.add(f); } TRelation::TRelation(const char* tabname) : _files(4), _reldefs(4), _errors(NOERR) { - TTable* t = new TTable(tabname, FALSE); + TTable* t = new TTable(tabname); _files.add(t); } @@ -502,14 +502,14 @@ bool TRelation::add( bool TRelation::add(int logicnum, const char* relexprs, int key, 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); } bool TRelation::add(const char* tabname, const char* relexprs, int key, 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); } diff --git a/include/stdtypes.cpp b/include/stdtypes.cpp index 86e033cd3..2af77f81c 100755 --- a/include/stdtypes.cpp +++ b/include/stdtypes.cpp @@ -75,16 +75,12 @@ void init_global_vars() CGetFile(LF_DIR, &d, _nolock, NORDIR); if (d.EOD > maxfdir) maxfdir = d.EOD; - maxfdir += 32; // Guy: Sicurezza buona, sicurezza vera - openf = new isfdptr[maxfdir]; - openrec = new TRectype*[maxfdir]; ext_files = new isfdptr[maxfdir]; for (long i = 0; i < maxfdir; i++) { openf[i] = NULL; - openrec[i] = NULL; ext_files[i] = NULL; } @@ -100,7 +96,6 @@ void free_global_vars() if (openf != NULL) { delete openf; - delete openrec; delete ext_files; prefix_destroy(); } diff --git a/include/strings.cpp b/include/strings.cpp index 4312b8b64..789a04802 100755 --- a/include/strings.cpp +++ b/include/strings.cpp @@ -228,7 +228,7 @@ TString& TString::operator <<(double n) // The object should be completely storable in spark 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); out << ends; return operator <<(spark); @@ -243,7 +243,7 @@ TString& TString::operator <<(const TString& str) // @mfunc Elimina tutti i caratteri contenuti in

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; @@ -1100,9 +1100,9 @@ const TFilename& TFilename::tempdir() { _tempdir = getenv("TEMP"); if (_tempdir.empty()) - _tempdir = getenv("TMP"); + _tempdir = getenv("TMP"); if (_tempdir.empty()) - _tempdir << SLASH << "tmp"; + _tempdir << SLASH << "tmp"; const int last = len()-1; if (!is_not_slash(_str[last])) @@ -1250,6 +1250,12 @@ bool TFilename::search_in_path(TFilename& path) const return path.not_empty(); } +bool TFilename::input() +{ + return input_filename(*this); +} + + /////////////////////////////////////////////////////////// // Token string diff --git a/include/strings.h b/include/strings.h index 88ed2dbdd..72cd2f482 100755 --- a/include/strings.h +++ b/include/strings.h @@ -392,12 +392,15 @@ public: TFilename(const TFilename& n) : TString(256) { set(n); } - // @cmember Assegnazione tra TFile e stringa + // @cmember Assegnazione tra TFilename e stringa const TString& operator =(const char* s) { return set(s); } - // @cmember Assegnazione tra TFile ed indirizzo della stringa + // @cmember Assegnazione tra TFilename e TString const TString& operator =(const TString& 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 virtual bool ok() const; @@ -420,7 +423,8 @@ public: bool exist() const; // @cmember Cerca nel path il nome del file corrente e scrive il path assoluto in path bool search_in_path(TFilename& path) const; - + // @cmember Richiede all'utente il nome di un file + bool input(); // @cmember Ritorna il nome del file const char* name() const; // @cmember Ritorna il nome del direttorio diff --git a/include/tabutil.cpp b/include/tabutil.cpp index d0895bf42..b84f210db 100755 --- a/include/tabutil.cpp +++ b/include/tabutil.cpp @@ -12,8 +12,8 @@ int TTable::name2log(const char* n) } -TTable::TTable(const char* tabname, bool linkrecinst) -: TLocalisamfile(name2log(tabname), linkrecinst), _cod(curr(), "COD") +TTable::TTable(const char* tabname) +: TLocalisamfile(name2log(tabname)), _cod(curr(), "COD") { if ((*tabname == '%') || (*tabname == '#')) tabname++; _tabname = tabname; diff --git a/include/tabutil.h b/include/tabutil.h index 090acb82d..96352a0b2 100755 --- a/include/tabutil.h +++ b/include/tabutil.h @@ -50,7 +50,7 @@ public: // @cmember Ritorna la descrizione della tabella virtual const char* description(); // @cmember Costruttore - TTable(const char* tabname, bool linkrecinst = FALSE); + TTable(const char* tabname); // @cmember Distruttore virtual ~TTable();