Modifiche effettuate per ritornare l'errore 8 (Insufficient Memory)
TExternal_app::run(), senza segnalarlo con un error_box(). git-svn-id: svn://10.65.10.50/trunk@3000 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d7ed9136b5
commit
ea6fbc42d2
@ -1747,26 +1747,23 @@ long TSystemisamfile::size(TRecnotype eox)
|
||||
// @mfunc Esegue la conversione del file
|
||||
//
|
||||
// @rdesc Ritorna il rusultato dell'operazione
|
||||
//
|
||||
// @flag TRUE | Se la conversione e' stata effettuata correttamente
|
||||
// @flag FALSE | Se è stato rilevato un errore durante la conversione (viene emesso un <f error_box>)
|
||||
bool TSystemisamfile::exec_convapp(
|
||||
int TSystemisamfile::exec_convapp(
|
||||
long flev, // @parm Livello a cui aggiornare l'archivio
|
||||
const bool before) // @parm Indica se viene chiamata prima o dopo la conversione
|
||||
|
||||
{
|
||||
const char * const v = before ? "BCNV" : "ACNV";
|
||||
int err = 0;
|
||||
|
||||
if (flev == 0) flev = 199401;
|
||||
else flev++;
|
||||
for (long l = flev; l <= get_std_level(); l++)
|
||||
for (long l = flev; err == 0 && l <= get_std_level(); l++)
|
||||
{
|
||||
TString16 paragraph(format("%06ld", l));
|
||||
TConfig conv(CONFIG_FCONV, paragraph);
|
||||
|
||||
if (!conv.new_paragraph() && conv.exist(v, num()))
|
||||
{
|
||||
int err = 0;
|
||||
TString80 s(conv.get(v, NULL, num())); s << " " << main_app().get_firm();
|
||||
TExternal_app app(s);
|
||||
|
||||
@ -1780,11 +1777,11 @@ bool TSystemisamfile::exec_convapp(
|
||||
err = atoi(msg->body());
|
||||
}
|
||||
else err = 16;
|
||||
if (err)
|
||||
if (err && err != 8)
|
||||
return error_box("Impossibile eseguire il programma di %sconversione\ndel livello %ld/%ld\nErrore n.ro %d", before ? "pre" : "post", l / 100, l % 100, err);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return err;
|
||||
}
|
||||
|
||||
// @doc INTERNAL
|
||||
@ -1872,12 +1869,19 @@ int TSystemisamfile::update(
|
||||
{
|
||||
const long lev = prefix().filelevel();
|
||||
const bool lcf = getlcf(lev);
|
||||
exec_convapp(lev, TRUE);
|
||||
|
||||
err = exec_convapp(lev, TRUE);
|
||||
if (err != NOERR)
|
||||
{
|
||||
setstatus(err);
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!lcf && newrec == oldrec)
|
||||
{
|
||||
exec_convapp(lev, FALSE);
|
||||
return NOERR;
|
||||
err = exec_convapp(lev, FALSE);
|
||||
setstatus(err);
|
||||
return err;
|
||||
}
|
||||
|
||||
const TRecnotype nitems = dir.eod();
|
||||
@ -1992,7 +1996,8 @@ int TSystemisamfile::update(
|
||||
dir.put(num(), _nordir, _sysdirop);
|
||||
newrec.put(num());
|
||||
if (toconvert && dir.eox() > 0L) packindex();
|
||||
exec_convapp(lev, FALSE);
|
||||
if (err == NOERR)
|
||||
err = exec_convapp(lev, FALSE);
|
||||
}
|
||||
setstatus(err);
|
||||
return err;
|
||||
|
@ -655,8 +655,8 @@ class TSystemisamfile : public TIsamfile
|
||||
|
||||
// @cmember:(INTERNAL) Recupera le conversioni logiche da effettuare sul file
|
||||
bool getlcf(long flev);
|
||||
// @cmember:(INTERNAL) Esegue la conversione del file
|
||||
bool exec_convapp(long flev, const bool before);
|
||||
// @cmember:(INTERNAL) Esegue la conversione del file. Ritorna il codice di errore.
|
||||
int exec_convapp(long flev, const bool before);
|
||||
// @cmember:(INTERNAL) Esegue la conversione sui record del file (utilizzando le espressione definite
|
||||
// in fconv.ini)
|
||||
void makelc(TRectype& rec);
|
||||
|
Loading…
x
Reference in New Issue
Block a user