Patch level :2.0 nopatch

Files correlati     :ba1.exe bacnv.cpp bainst.cpp
Ricompilazione Demo : [ ]
Commento            :sistemati alcuni intoppi per 32bit


git-svn-id: svn://10.65.10.50/trunk@10246 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2002-05-22 14:41:02 +00:00
parent 30c3aabba4
commit 4ee7e590fb
6 changed files with 62 additions and 88 deletions

View File

@ -24,8 +24,7 @@ int main(int argc,char** argv)
ba1700(argc,argv); break; ba1700(argc,argv); break;
case 7: case 7:
ba1800(argc,argv); break; ba1800(argc,argv); break;
// case 8:
// ba1900(argc,argv); break; quest cosa e'
default: default:
ba1100(argc,argv); break; // Manutenzione ba1100(argc,argv); break; // Manutenzione
} }

View File

@ -678,21 +678,6 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga)
{ {
f.packfile(); f.packfile();
f.packindex(); f.packindex();
//Pack supplementare tramite FOXPRO (da togliere con CodeBase 6)
#if XVT_OS == XVT_OS_WIN
if (logicnum > 2 && logicnum < 6 && f.status() == NOERR)
if (fexist("packaga.exe"))
{
d.get(logicnum);
TFilename f_name(d.name());
f_name.ext("dbf");
f_name.replace('/','\\'); // A volte rimangono delle slash
TString cmd("packaga -t");
cmd << " " << f_name;
TExternal_app packapp(cmd);
packapp.run(FALSE,FALSE);
}
#endif
} }
else else
if (tasto == K_F6) if (tasto == K_F6)
@ -1144,7 +1129,6 @@ void TManutenzione_app::convert_dir()
s = "Aggiornamento archivi "; s = "Aggiornamento archivi ";
if (is_com) s << "comuni."; if (is_com) s << "comuni.";
else s << "della ditta " << atol (pref) << "."; else s << "della ditta " << atol (pref) << ".";
s << " Memoria libera: " << long(os_get_free_memory()/1024) << " Kbytes."; s << " Memoria libera: " << long(os_get_free_memory()/1024) << " Kbytes.";
TProgind p(update_items ? update_items : 1, s, FALSE, TRUE, 70); TProgind p(update_items ? update_items : 1, s, FALSE, TRUE, 70);
@ -1153,27 +1137,18 @@ void TManutenzione_app::convert_dir()
for (int i = 2; i <= update_items; i++) for (int i = 2; i <= update_items; i++)
{ {
p.addstatus(1); p.addstatus(1);
// prefix().set("");
const TTrec & rs = (const TTrec &) _recs[i]; const TTrec & rs = (const TTrec &) _recs[i];
const TDir & ds = (const TDir &) _dirs[i]; const TDir & ds = (const TDir &) _dirs[i];
const long flags = ds.flags(); const long flags = ds.flags();
// prefix().set(pref);
if (ds.len() > 0) if (ds.len() > 0)
{ {
if (flags >= 0L && flags < 10000L) if (flags >= 0L && flags < 10000L)
{ {
TSystemisamfile b(i); TSystemisamfile b(i);
const int module = abs((int)ds.flags()); const int module = abs((int)ds.flags());
int err = b.is_valid(); int err = b.is_valid();
if (err == _istrcerr && d.eod() == 0 &&
yesno_box("Il tracciato record del file %d e' incoerente:\n"
"Si desidera eliminare il file vuoto %s?", i, d.filename()))
{
TFilename n(d.filename()); remove(n);
n.ext("cdx"); remove(n);
n.ext("fpt"); remove(n);
err = NOERR;
}
if (err == -60 || err == -64) err=NOERR; // verif. if (err == -60 || err == -64) err=NOERR; // verif.
d.get(i, _nolock, _nordir, _sysdirop); d.get(i, _nolock, _nordir, _sysdirop);
if (i > 2 && err != NOERR && ((is_com && d.is_com()) || (!is_com && d.is_firm()))) if (i > 2 && err != NOERR && ((is_com && d.is_com()) || (!is_com && d.is_firm())))
@ -1183,20 +1158,18 @@ void TManutenzione_app::convert_dir()
repair_file(i); repair_file(i);
err = NOERR; err = NOERR;
} }
if (err != NOERR) if (err != NOERR)
{ {
if (!recover(b, err)) if (!yesno_box("Il file %d non puo' essere aperto:\n"
{ "Errore %d. Continuare ugualmente?",i,err))
TString s; stop_run();
s.format("File n. %d - %s : errore n.ro %d", i, (const char *)d.filename(), err); else
write_log(s); continue;
} }
}
} }
//d.get(i, _nolock, _nordir, _sysdirop);
bool to_create = (is_com ? d.is_com() : d.is_firm()); bool to_create = (is_com ? d.is_com() : d.is_firm());
// const bool actual_create = to_create;
// I files LF_PCON, LF_CAUS, LF_RCAUS, LF_CLIFO, LF_CFVEN, LF_INDSPED // I files LF_PCON, LF_CAUS, LF_RCAUS, LF_CLIFO, LF_CFVEN, LF_INDSPED
// vanno creati comunque nel direttorio COM, vuoti, (se non esistono gia'). // vanno creati comunque nel direttorio COM, vuoti, (se non esistono gia').
@ -1210,8 +1183,7 @@ void TManutenzione_app::convert_dir()
const TFilename s(d.filename()); const TFilename s(d.filename());
if (!s.exist() && d.len() > 0) if (!s.exist() && d.len() > 0)
{ {
TSystemisamfile f(i); TSystemisamfile f(i);
// set_autoload_new_files(actual_create);
set_autoload_new_files(FALSE); set_autoload_new_files(FALSE);
f.build(0L,rs); f.build(0L,rs);
set_autoload_new_files(TRUE); set_autoload_new_files(TRUE);
@ -1220,6 +1192,7 @@ void TManutenzione_app::convert_dir()
} }
} }
TSystemisamfile f(i); TSystemisamfile f(i);
f.update(rs); f.update(rs);
@ -1258,6 +1231,7 @@ void TManutenzione_app::convert_dir()
r.put(i); r.put(i);
} }
} }
d.get(LF_DIR, _nolock, _nordir, _sysdirop); d.get(LF_DIR, _nolock, _nordir, _sysdirop);
d.flags() = _level; d.flags() = _level;
d.put(LF_DIR, _nordir, _sysdirop); d.put(LF_DIR, _nordir, _sysdirop);
@ -1300,7 +1274,6 @@ void TManutenzione_app::load_des(const int maxfdir)
infile >> fl; infile >> fl;
if (fl > flags) flags = fl; if (fl > flags) flags = fl;
infile.close(); infile.close();
//unlink(fn);
} }
// scandisce *.dir in RECDESC // scandisce *.dir in RECDESC
@ -1467,13 +1440,6 @@ void TManutenzione_app::update()
prefix().set(""); prefix().set("");
load_des(maxfdir); load_des(maxfdir);
prefix().set_codditta(0L); prefix().set_codditta(0L);
/*
if (prefix().filelevel() <= 199502L)
{
TExternal_app app("bacnv 4 0");
app.run();
}
*/
open_log(); open_log();
TString80 s; TString80 s;

View File

@ -632,7 +632,12 @@ bool TSet_users::user_create()
TSheet_field& sf = sheet_field(); TSheet_field& sf = sheet_field();
sf.set_notify(k_notify); sf.set_notify(k_notify);
#ifdef XVAGA
const char* menuname = "bacampo.men";
#else
const char* menuname = "baprassi.men"; const char* menuname = "baprassi.men";
#endif
if (argc() > 2) if (argc() > 2)
menuname = argv(2); menuname = argv(2);

View File

@ -912,7 +912,6 @@ void TMailer_mask::save_all_lines()
test_delete(); test_delete();
fill_messages(); fill_messages();
} }
_vv = NULL;
} }
bool TMailer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) bool TMailer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
@ -1080,7 +1079,6 @@ void TMailer_mask::auto_save_all()
#endif #endif
test_delete(); test_delete();
fill_messages(); fill_messages();
mail_unlock();
if (!field(F_TIMER).empty()) if (!field(F_TIMER).empty())
{ {
TSheet_field& sf = sfield(F_MESSAGES); TSheet_field& sf = sfield(F_MESSAGES);
@ -1135,8 +1133,7 @@ void TMailer_mask::load()
TMailer_mask::TMailer_mask() TMailer_mask::TMailer_mask()
: TAutomask("ba7100a"), : TAutomask("ba7100a"),
_timer_id(XVT_TIMER_ERROR), _mail_semaphore(0), _timer_id(XVT_TIMER_ERROR), _mail_semaphore(0)
_vv(NULL)
{ {
load(); load();
if (user() != ::dongle().administrator()) if (user() != ::dongle().administrator())

View File

@ -11,7 +11,7 @@
#include <extcdecl.h> #include <extcdecl.h>
#if (XVT_OS == XVT_OS_WIN) || (XVT_OS == XVT_OS_WIN32) #if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
#include <direct.h> #include <direct.h>
#define RMDIR _rmdir #define RMDIR _rmdir
#else #else
@ -144,7 +144,7 @@ void TConversione_xbase::update()
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
class TConversione_archivi : public TSkeleton_application class TConversione_archivi : public TApplication
{ {
int _nconv; int _nconv;
long _codditta; long _codditta;
@ -154,7 +154,7 @@ class TConversione_archivi : public TSkeleton_application
protected: // TApplication protected: // TApplication
virtual bool create() ; virtual bool create() ;
virtual bool destroy() ; virtual bool destroy() ;
virtual void main_loop(); virtual bool menu(MENU_TAG);
public: public:
bool convert_rmov(TLocalisamfile & rmov, TArray & recs, int nrecs); bool convert_rmov(TLocalisamfile & rmov, TArray & recs, int nrecs);
@ -194,6 +194,8 @@ public:
bool TConversione_archivi::create() bool TConversione_archivi::create()
{ {
TApplication::create();
if (argc() < 3) if (argc() < 3)
{ {
_error = 101; _error = 101;
@ -215,8 +217,8 @@ bool TConversione_archivi::create()
else set_firm(_codditta); else set_firm(_codditta);
} }
} }
// dispatch_e_menu(MENU_ITEM(1)); dispatch_e_menu(MENU_ITEM(1));
return TSkeleton_application::create(); return TRUE;
} }
} }
@ -235,40 +237,40 @@ bool TConversione_archivi::destroy()
return TRUE; return TRUE;
} }
void TConversione_archivi::main_loop() bool TConversione_archivi::menu(MENU_TAG)
{ {
switch (_nconv) switch (_nconv)
{ {
case 1: case 1:
{ {
TSystemisamfile f(atoi(argv(2))); TSystemisamfile f(atoi(argv(2)));
TFilename lf; TFilename lf;
lf.format("%sstd/%s", __ptprf, argv(3)); lf.format("%sstd/%s", __ptprf, argv(3));
if (fexist(lf)) if (fexist(lf))
f.load(lf, '|', '\0', '\n', TRUE, TRUE); f.load(lf, '|', '\0', '\n', TRUE, TRUE);
} }
break; break;
case 2: case 2:
liala("LIA"); liala("LIA");
liala("PLA"); liala("PLA");
break; break;
case 3: case 3:
if (_codditta == 0) if (_codditta == 0)
patch_com(); patch_com();
case 4: case 4:
if (_codditta == 0) if (_codditta == 0)
zero_770(); zero_770();
case 5: case 5:
convert_patty(); convert_patty();
case 6: case 6:
if (_codditta == 0) if (_codditta == 0)
{ {
convert_codconc(); convert_codconc();
TSystemisamfile comuni(LF_COMUNI); TSystemisamfile comuni(LF_COMUNI);
comuni.load(format("%sstd/ncom02.txt", __ptprf)); comuni.load(format("%sstd/ncom02.txt", __ptprf));
//Cancella tutti i vecchi profili, sostituendoli con i nuovi //Cancella tutti i vecchi profili, sostituendoli con i nuovi
convert_profili(); convert_profili();

View File

@ -33,9 +33,14 @@ bool TInstall_AT ::install_firm()
bool TInstall_AT ::post_installer() bool TInstall_AT ::post_installer()
{ {
#ifdef XVAGA
const char* menuname = "bacampo.men";
#else
const char* menuname = "baprassi.men";
#endif
bool ok=TRUE; bool ok=TRUE;
if (_m->get_bool(F_USAMENUAVIS)) if (_m->get_bool(F_USAMENUAVIS))
ok=fcopy("agaat.men","baprassi.men"); ok=fcopy("agaat.men",menuname);
return ok; return ok;
} }