From 8bbd94ef24af121ae964cc86958e1b0651b2bf57 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 13 Mar 2004 00:22:18 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://10.65.10.50/trunk@11851 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba1102.cpp | 13 ++++++++----- ba/ba1200.cpp | 1 - ba/ba1300.cpp | 5 +++-- ba/ba1400.cpp | 4 ++-- ba/ba7.cpp | 2 +- ba/ba7200.cpp | 6 ++++-- ba/ba7200a.h | 2 -- ba/ba8.cpp | 2 +- ba/ba8200.cpp | 16 ++++++++-------- ba/ba8201.cpp | 13 +++++++++---- ba/ba8300.cpp | 4 ++-- ba/baformed.cpp | 8 +++++--- ba/batbtra.h | 2 +- 13 files changed, 44 insertions(+), 34 deletions(-) diff --git a/ba/ba1102.cpp b/ba/ba1102.cpp index d7e58951c..235073e75 100755 --- a/ba/ba1102.cpp +++ b/ba/ba1102.cpp @@ -57,8 +57,8 @@ bool TEdit_file::_browse(TCursor& cursor, const TFilename& name) { TProgind* pind = NULL; cursor.freeze(TRUE); - bool go = FALSE; - bool first = FALSE; + // bool go = FALSE; inutili verificare + // bool first = FALSE; long j; const long items = sheet.items(); const long checked = sheet.checked(); @@ -171,7 +171,9 @@ bool TEdit_file::browse(TExternisamfile* file, const TFilename& name) KEY TEdit_file::edit_record(TRectype& rec, bool readonly) { - for(int recs = 0; rec.fieldname(recs) != NULL; recs++); + int recs; + + for(recs = 0; rec.fieldname(recs) != NULL; recs++); const int fpp = 16; // Fields per page const int rows = recs > fpp ? 20 : recs+4; @@ -181,11 +183,12 @@ KEY TEdit_file::edit_record(TRectype& rec, bool readonly) int curpage = 0, currow = 1, nid = 100; const char* cp; - int mcnt =0; + // inutile verificare int mcnt =0; const char* flags = readonly ? "D" : ""; + int i; - for(int i = 0; (cp = rec.fieldname(i)) != NULL; i++) + for(i = 0; (cp = rec.fieldname(i)) != NULL; i++) { // add fields ONE by ONE TString16 s(cp); s.left_just(16); diff --git a/ba/ba1200.cpp b/ba/ba1200.cpp index d300a5a42..d48110f76 100755 --- a/ba/ba1200.cpp +++ b/ba/ba1200.cpp @@ -34,7 +34,6 @@ clock_t TTest_application::start_timer() const void TTest_application::test1() { TLocalisamfile tab(LF_COMUNI); - const TRecnotype n = tab.items(); clock_t start; TRecnotype r = 0; diff --git a/ba/ba1300.cpp b/ba/ba1300.cpp index a773f5fa6..4d7548dc0 100755 --- a/ba/ba1300.cpp +++ b/ba/ba1300.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "ba1.h" @@ -128,7 +129,7 @@ void TPackFiles_application::main_loop() ds.get(i); prefix().set(pref); const long flags = ds.flags(); - const int module = abs((int)flags); +// const int module = abs((int)flags); non piu usato verificare if (flags >= 10000L) continue; // Skip files with flags over 10000 TSystemisamfile f(i); @@ -174,7 +175,7 @@ void TPackFiles_application::main_loop() d.put(i, is_com ? _comdir : _nordir); if (f.pack() == NOERR) if (f.load(d_name) == NOERR) // Reload - unlink(d_name); + remove_file(d_name); else error_box(FR("Impossibile ricaricare %s. Errore %d"),(const char*) d_name, f.status()); else diff --git a/ba/ba1400.cpp b/ba/ba1400.cpp index 2b8bcd9c4..684498c6e 100755 --- a/ba/ba1400.cpp +++ b/ba/ba1400.cpp @@ -300,7 +300,7 @@ TSubmenu& TMenu::get_submenu(const char* name) void TMenu::import(const char* filename, TString& first) { - TSubmenu* sub; + TSubmenu* sub = NULL; TScanner scan(filename); first.cut(0); while (scan.good()) @@ -792,4 +792,4 @@ int ba1400(int argc, char** argv) a.run(argc, argv, TR("Configurazione utenti")); } return 0; -} \ No newline at end of file +} diff --git a/ba/ba7.cpp b/ba/ba7.cpp index b1246752c..21decbc9c 100755 --- a/ba/ba7.cpp +++ b/ba/ba7.cpp @@ -18,4 +18,4 @@ int main(int argc, char** argv) exit(0); return 0; -} \ No newline at end of file +} diff --git a/ba/ba7200.cpp b/ba/ba7200.cpp index bb513d493..2416e262a 100755 --- a/ba/ba7200.cpp +++ b/ba/ba7200.cpp @@ -70,7 +70,9 @@ int list_dirs( { TWait_cursor hourglass; TFilename dir(filelist); - for (int i = dir.len()-1; i >= 0; i--) + int i; + + for (i = dir.len()-1; i >= 0; i--) if (dir[i] == '/' || dir[i] == '\\' || dir[i] == ':') break; TFilename mask(dir.mid(i+1)); @@ -173,4 +175,4 @@ int ba7200(int argc, char* argv[]) ma.run(argc, argv, "Copia Studio"); return 0; -} \ No newline at end of file +} diff --git a/ba/ba7200a.h b/ba/ba7200a.h index 259ef723d..51264197a 100755 --- a/ba/ba7200a.h +++ b/ba/ba7200a.h @@ -1,4 +1,2 @@ #define F01_DATI 101 #define F01_DATIL 102 - - \ No newline at end of file diff --git a/ba/ba8.cpp b/ba/ba8.cpp index c2a24db29..f66d2e5cb 100755 --- a/ba/ba8.cpp +++ b/ba/ba8.cpp @@ -11,4 +11,4 @@ int main(int argc, char** argv) default: ba8100(argc, argv); break; // Record Selector } return 0; -} \ No newline at end of file +} diff --git a/ba/ba8200.cpp b/ba/ba8200.cpp index 1040dbecf..4283f7cb1 100755 --- a/ba/ba8200.cpp +++ b/ba/ba8200.cpp @@ -11,7 +11,7 @@ #include #include -#include "../../sqlite/sources/sqlite.h" +#include "../sqlite/sqlite.h" #include "ba8200.h" #include "ba8201.h" @@ -361,7 +361,7 @@ protected: bool save_tables_tree(TXmlItem& xml); bool save_fields_sheet(TXmlItem& xml); - void export(TQueryExportFormat fmt); + void esporta(TQueryExportFormat fmt); public: bool load_query(); @@ -477,7 +477,7 @@ bool TQuery_mask::edit_file_in_tree() fill_fields(); } - return ok; + return update; // ???? } // Ordina per importanza i campi di un tracciato record @@ -730,7 +730,7 @@ void TQuery_mask::edit_query() warning_box(TR("Nessuna riga risultato")); } -void TQuery_mask::export(TQueryExportFormat fmt) +void TQuery_mask::esporta(TQueryExportFormat fmt) { xvt_fsys_save_dir(); TFilename path; path.tempdir(); @@ -1088,19 +1088,19 @@ bool TQuery_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) break; case F_EXPORT_HTML: if (e == fe_button) - export(fmt_html); + esporta(fmt_html); break; case F_EXPORT_EXCEL: if (e == fe_button) - export(fmt_slk); + esporta(fmt_slk); break; case F_EXPORT_TXT: if (e == fe_button) - export(fmt_txt); + esporta(fmt_txt); break; case F_EXPORT_CAMPO: if (e == fe_button) - export(fmt_campo); + esporta(fmt_campo); break; case F_SHEET: enable_sql_button(); diff --git a/ba/ba8201.cpp b/ba/ba8201.cpp index 25982e5a3..b9cdc308e 100755 --- a/ba/ba8201.cpp +++ b/ba/ba8201.cpp @@ -1,4 +1,8 @@ +#ifdef WIN32 #include +#else +#include "../xvaga/incstr.h" +#endif #include #include @@ -70,7 +74,8 @@ bool select_sql_file(TFilename& path, const char* ext) // Private interface /////////////////////////////////////////////////////////// -#include "../../sqlite/sources/sqlite.h" +#include "../sqlite/sqlite.h" + class TSQLite : public TObject { @@ -87,7 +92,7 @@ protected: void build_curr_path(TFilename& name) const; void test_path(); - bool export(const TRectype& rec, ostream& sql) const; + bool esporta(const TRectype& rec, ostream& sql) const; bool create_dbf_times(); long get_dbf_time(const TString& table); bool set_dbf_time(const TString& table, long last); @@ -292,7 +297,7 @@ bool TSQLite::exists(const char* table) return yes; } -bool TSQLite::export(const TRectype& rec, ostream& sql) const +bool TSQLite::esporta(const TRectype& rec, ostream& sql) const { const RecDes& rd = *rec.rec_des(); TString tmp; @@ -372,7 +377,7 @@ bool TSQLite::import(int logicnum) for (cur = 0; cur.pos() < items; ++cur) { - export(curr, txt); + esporta(curr, txt); pi.addstatus(1); if (pi.iscancelled()) break; diff --git a/ba/ba8300.cpp b/ba/ba8300.cpp index b67b49872..b418495e6 100755 --- a/ba/ba8300.cpp +++ b/ba/ba8300.cpp @@ -160,7 +160,7 @@ const TReport_font& TReport_section::font() const { if (_father == NULL) { - (TReport_font*)_font = new TReport_font; + ((TReport_section*)this)->_font = new TReport_font; f = _font; } else @@ -232,8 +232,8 @@ class TReport_field : public TObject short _width, _height; // Dimensioni in centesimi TString _picture, _field; - TReport_font* _font; bool _selected; + TReport_font* _font; protected: const TReport_font& font() const; diff --git a/ba/baformed.cpp b/ba/baformed.cpp index 681292748..f51c9a1c9 100755 --- a/ba/baformed.cpp +++ b/ba/baformed.cpp @@ -151,7 +151,7 @@ bool TFink_mask::char_handler(TMask_field& f, KEY k) // ----------------------------------------------------------------- -TForm_editor::TForm_editor() : _form(NULL), _extra(FALSE), _m(NULL) +TForm_editor::TForm_editor() : _form(NULL), _m(NULL), _extra(FALSE) {} TForm_editor::~TForm_editor() @@ -166,7 +166,7 @@ bool TForm_editor::create() for (int a = 2; a < argc(); a++) { - if (stricmp(argv(a), "-E") == 0) + if (xvt_str_compare_ignoring_case(argv(a), "-E") == 0) { _extra = TRUE; continue; @@ -618,7 +618,9 @@ bool TForm_editor::form_config() const TMask m(maskname); // carica campi - for (int i = 0; i < m.fields(); i++) + int i; + + for (i = 0; i < m.fields(); i++) { TMask_field& f = m.fld(i); const TFieldref* fref = f.field(); diff --git a/ba/batbtra.h b/ba/batbtra.h index 801675340..2b3fd3ff7 100755 --- a/ba/batbtra.h +++ b/ba/batbtra.h @@ -11,4 +11,4 @@ #define F_FATTRIC 109 #define F_NUMULTRAS 110 #define F_DATAULTRAS 111 -#define F_RAGSOC 112 \ No newline at end of file +#define F_RAGSOC 112