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:
parent
30c3aabba4
commit
4ee7e590fb
@ -24,8 +24,7 @@ int main(int argc,char** argv)
|
||||
ba1700(argc,argv); break;
|
||||
case 7:
|
||||
ba1800(argc,argv); break;
|
||||
// case 8:
|
||||
// ba1900(argc,argv); break; quest cosa e'
|
||||
|
||||
default:
|
||||
ba1100(argc,argv); break; // Manutenzione
|
||||
}
|
||||
|
@ -678,21 +678,6 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga)
|
||||
{
|
||||
f.packfile();
|
||||
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
|
||||
if (tasto == K_F6)
|
||||
@ -1144,7 +1129,6 @@ void TManutenzione_app::convert_dir()
|
||||
s = "Aggiornamento archivi ";
|
||||
if (is_com) s << "comuni.";
|
||||
else s << "della ditta " << atol (pref) << ".";
|
||||
|
||||
s << " Memoria libera: " << long(os_get_free_memory()/1024) << " Kbytes.";
|
||||
|
||||
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++)
|
||||
{
|
||||
p.addstatus(1);
|
||||
// prefix().set("");
|
||||
|
||||
const TTrec & rs = (const TTrec &) _recs[i];
|
||||
const TDir & ds = (const TDir &) _dirs[i];
|
||||
const long flags = ds.flags();
|
||||
// prefix().set(pref);
|
||||
|
||||
if (ds.len() > 0)
|
||||
{
|
||||
if (flags >= 0L && flags < 10000L)
|
||||
{
|
||||
TSystemisamfile b(i);
|
||||
const int module = abs((int)ds.flags());
|
||||
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;
|
||||
}
|
||||
int err = b.is_valid();
|
||||
if (err == -60 || err == -64) err=NOERR; // verif.
|
||||
d.get(i, _nolock, _nordir, _sysdirop);
|
||||
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);
|
||||
err = NOERR;
|
||||
}
|
||||
|
||||
if (err != NOERR)
|
||||
{
|
||||
if (!recover(b, err))
|
||||
{
|
||||
TString s;
|
||||
s.format("File n. %d - %s : errore n.ro %d", i, (const char *)d.filename(), err);
|
||||
write_log(s);
|
||||
}
|
||||
}
|
||||
{
|
||||
if (!yesno_box("Il file %d non puo' essere aperto:\n"
|
||||
"Errore %d. Continuare ugualmente?",i,err))
|
||||
stop_run();
|
||||
else
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//d.get(i, _nolock, _nordir, _sysdirop);
|
||||
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
|
||||
// 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());
|
||||
if (!s.exist() && d.len() > 0)
|
||||
{
|
||||
TSystemisamfile f(i);
|
||||
// set_autoload_new_files(actual_create);
|
||||
TSystemisamfile f(i);
|
||||
set_autoload_new_files(FALSE);
|
||||
f.build(0L,rs);
|
||||
set_autoload_new_files(TRUE);
|
||||
@ -1220,6 +1192,7 @@ void TManutenzione_app::convert_dir()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TSystemisamfile f(i);
|
||||
|
||||
f.update(rs);
|
||||
@ -1258,6 +1231,7 @@ void TManutenzione_app::convert_dir()
|
||||
r.put(i);
|
||||
}
|
||||
}
|
||||
|
||||
d.get(LF_DIR, _nolock, _nordir, _sysdirop);
|
||||
d.flags() = _level;
|
||||
d.put(LF_DIR, _nordir, _sysdirop);
|
||||
@ -1300,7 +1274,6 @@ void TManutenzione_app::load_des(const int maxfdir)
|
||||
infile >> fl;
|
||||
if (fl > flags) flags = fl;
|
||||
infile.close();
|
||||
//unlink(fn);
|
||||
}
|
||||
|
||||
// scandisce *.dir in RECDESC
|
||||
@ -1467,13 +1440,6 @@ void TManutenzione_app::update()
|
||||
prefix().set("");
|
||||
load_des(maxfdir);
|
||||
prefix().set_codditta(0L);
|
||||
/*
|
||||
if (prefix().filelevel() <= 199502L)
|
||||
{
|
||||
TExternal_app app("bacnv 4 0");
|
||||
app.run();
|
||||
}
|
||||
*/
|
||||
|
||||
open_log();
|
||||
TString80 s;
|
||||
|
@ -632,7 +632,12 @@ bool TSet_users::user_create()
|
||||
TSheet_field& sf = sheet_field();
|
||||
sf.set_notify(k_notify);
|
||||
|
||||
#ifdef XVAGA
|
||||
const char* menuname = "bacampo.men";
|
||||
#else
|
||||
const char* menuname = "baprassi.men";
|
||||
#endif
|
||||
|
||||
if (argc() > 2)
|
||||
menuname = argv(2);
|
||||
|
||||
|
@ -912,7 +912,6 @@ void TMailer_mask::save_all_lines()
|
||||
test_delete();
|
||||
fill_messages();
|
||||
}
|
||||
_vv = NULL;
|
||||
}
|
||||
|
||||
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
|
||||
test_delete();
|
||||
fill_messages();
|
||||
mail_unlock();
|
||||
if (!field(F_TIMER).empty())
|
||||
{
|
||||
TSheet_field& sf = sfield(F_MESSAGES);
|
||||
@ -1135,8 +1133,7 @@ void TMailer_mask::load()
|
||||
|
||||
TMailer_mask::TMailer_mask()
|
||||
: TAutomask("ba7100a"),
|
||||
_timer_id(XVT_TIMER_ERROR), _mail_semaphore(0),
|
||||
_vv(NULL)
|
||||
_timer_id(XVT_TIMER_ERROR), _mail_semaphore(0)
|
||||
{
|
||||
load();
|
||||
if (user() != ::dongle().administrator())
|
||||
|
68
ba/bacnv.cpp
68
ba/bacnv.cpp
@ -11,7 +11,7 @@
|
||||
#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>
|
||||
#define RMDIR _rmdir
|
||||
#else
|
||||
@ -144,7 +144,7 @@ void TConversione_xbase::update()
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
class TConversione_archivi : public TSkeleton_application
|
||||
class TConversione_archivi : public TApplication
|
||||
{
|
||||
int _nconv;
|
||||
long _codditta;
|
||||
@ -154,7 +154,7 @@ class TConversione_archivi : public TSkeleton_application
|
||||
protected: // TApplication
|
||||
virtual bool create() ;
|
||||
virtual bool destroy() ;
|
||||
virtual void main_loop();
|
||||
virtual bool menu(MENU_TAG);
|
||||
|
||||
public:
|
||||
bool convert_rmov(TLocalisamfile & rmov, TArray & recs, int nrecs);
|
||||
@ -194,6 +194,8 @@ public:
|
||||
|
||||
bool TConversione_archivi::create()
|
||||
{
|
||||
TApplication::create();
|
||||
|
||||
if (argc() < 3)
|
||||
{
|
||||
_error = 101;
|
||||
@ -215,8 +217,8 @@ bool TConversione_archivi::create()
|
||||
else set_firm(_codditta);
|
||||
}
|
||||
}
|
||||
// dispatch_e_menu(MENU_ITEM(1));
|
||||
return TSkeleton_application::create();
|
||||
dispatch_e_menu(MENU_ITEM(1));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,40 +237,40 @@ bool TConversione_archivi::destroy()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TConversione_archivi::main_loop()
|
||||
bool TConversione_archivi::menu(MENU_TAG)
|
||||
{
|
||||
switch (_nconv)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
TSystemisamfile f(atoi(argv(2)));
|
||||
TFilename lf;
|
||||
case 1:
|
||||
{
|
||||
TSystemisamfile f(atoi(argv(2)));
|
||||
TFilename lf;
|
||||
|
||||
lf.format("%sstd/%s", __ptprf, argv(3));
|
||||
if (fexist(lf))
|
||||
f.load(lf, '|', '\0', '\n', TRUE, TRUE);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
liala("LIA");
|
||||
liala("PLA");
|
||||
break;
|
||||
case 3:
|
||||
if (_codditta == 0)
|
||||
patch_com();
|
||||
case 4:
|
||||
if (_codditta == 0)
|
||||
zero_770();
|
||||
case 5:
|
||||
convert_patty();
|
||||
case 6:
|
||||
if (_codditta == 0)
|
||||
{
|
||||
convert_codconc();
|
||||
lf.format("%sstd/%s", __ptprf, argv(3));
|
||||
if (fexist(lf))
|
||||
f.load(lf, '|', '\0', '\n', TRUE, TRUE);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
liala("LIA");
|
||||
liala("PLA");
|
||||
break;
|
||||
case 3:
|
||||
if (_codditta == 0)
|
||||
patch_com();
|
||||
case 4:
|
||||
if (_codditta == 0)
|
||||
zero_770();
|
||||
case 5:
|
||||
convert_patty();
|
||||
case 6:
|
||||
if (_codditta == 0)
|
||||
{
|
||||
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
|
||||
convert_profili();
|
||||
|
@ -33,9 +33,14 @@ bool TInstall_AT ::install_firm()
|
||||
|
||||
bool TInstall_AT ::post_installer()
|
||||
{
|
||||
#ifdef XVAGA
|
||||
const char* menuname = "bacampo.men";
|
||||
#else
|
||||
const char* menuname = "baprassi.men";
|
||||
#endif
|
||||
bool ok=TRUE;
|
||||
if (_m->get_bool(F_USAMENUAVIS))
|
||||
ok=fcopy("agaat.men","baprassi.men");
|
||||
ok=fcopy("agaat.men",menuname);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user