Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
controls.cpp    Corretta gestione list box aperti durante la chiusura
default.url     Aggiunto BMP_STOP
dongle.cpp      Gestito utente GUEST
expr.cpp        Aggiunto errore su radice negativa
files.cpp       Tolti spazi inutili
isam.cpp        Migliorata conversione


git-svn-id: svn://10.65.10.50/trunk@6851 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1998-07-20 13:07:00 +00:00
parent f7c645eac7
commit 6aad57da86
6 changed files with 122 additions and 95 deletions

View File

@ -1957,10 +1957,13 @@ void TDropDownList::close()
if (_open) if (_open)
{ {
_open = FALSE; _open = FALSE;
if (_xi_lst)
{
xvt_vobj_set_visible(xi_get_window(_xi_lst->itf), FALSE); xvt_vobj_set_visible(xi_get_window(_xi_lst->itf), FALSE);
xvt_dwin_update (xi_get_window(_obj->itf)); xvt_dwin_update (xi_get_window(_obj->itf));
} }
} }
}
void TDropDownList::destroy() void TDropDownList::destroy()
{ {

View File

@ -156,6 +156,7 @@ image BMP_EMAIL QRESDIR"email.bmp"
image BMP_DIR QRESDIR"dir.bmp" image BMP_DIR QRESDIR"dir.bmp"
image BMP_DIRDN QRESDIR"dirdn.bmp" image BMP_DIRDN QRESDIR"dirdn.bmp"
image BMP_FILE QRESDIR"file.bmp" image BMP_FILE QRESDIR"file.bmp"
image BMP_STOP QRESDIR"stop.bmp"
#scan <xil.h> #scan <xil.h>
#transparent $$$ #transparent $$$

View File

@ -411,11 +411,12 @@ bool TDongle::network_login(bool test_all_keys)
TConfig ini(CONFIG_INSTALL, "Server"); TConfig ini(CONFIG_INSTALL, "Server");
const char* server = ini.get("Dongle"); const char* server = ini.get("Dongle");
const char* guest = "******"; const TString16 appname = main_app().name();
const TString appname = main_app().firm_change_enabled() ? main_app().name() : "ba0100"; TString16 utente = user();
const char* utente = (!xvt_running() && appname == "ba0100") ? guest : user(); if (utente.empty() || (!xvt_running() && appname == "ba0100"))
utente = "GUEST";
const bool ok = rpc_UserLogin(server, utente, guest, appname); const bool ok = rpc_UserLogin(server, utente, "******", appname);
if (ok) if (ok)
{ {
_hardware = _dongle_network; _hardware = _dongle_network;

View File

@ -381,15 +381,18 @@ void TExpression::eval()
break; break;
case _divide: case _divide:
{ {
real& r = evalstack.pop_real(); const real& r = evalstack.pop_real();
if (r.is_zero()) if (r.is_zero())
{ {
if (!evalstack.peek_real().is_zero()) if (!evalstack.peek_real().is_zero())
{
if (_ignore_error) if (_ignore_error)
_error=1; _error=1;
else else
print_error("Divisione per zero!"); print_error("Divisione per zero!");
} else }
}
else
evalstack.peek_real() /= r; evalstack.peek_real() /= r;
} }
break; break;
@ -519,7 +522,18 @@ void TExpression::eval()
} }
break; break;
case _sqrt: case _sqrt:
evalstack.peek_real() = sqrt(evalstack.peek_real()); {
real& r = evalstack.peek_real();
if (r < ZERO)
{
if (_ignore_error)
_error=1;
else
print_error("Radice negativa!");
r = -r;
}
r = sqrt(r);
}
break; break;
case _sqr: case _sqr:
evalstack.peek_real() = sqr(evalstack.peek_real()); evalstack.peek_real() = sqr(evalstack.peek_real());
@ -1143,8 +1157,7 @@ bool TExpression::set(const char* expression, TTypeexp type)
bool TExpression::compile(const char* expression, TTypeexp type) bool TExpression::compile(const char* expression, TTypeexp type)
{ {
TCodesym currsym; _error=0;
_user_func_defined = FALSE; _user_func_defined = FALSE;
_s = expression; _s = expression;
_type = type; _type = type;
@ -1152,7 +1165,9 @@ bool TExpression::compile(const char* expression, TTypeexp type)
_code.clear(); _code.clear();
if (*_s == '\0') if (*_s == '\0')
return TRUE; return TRUE;
if ((currsym = __gettoken()) == _invalid)
TCodesym currsym = __gettoken();
if (currsym == _invalid)
return FALSE; return FALSE;
return __expression(currsym) == _endsym; return __expression(currsym) == _endsym;
} }

View File

@ -272,12 +272,12 @@ void TDir::get (
TDirop op) // @parm Tipo di operazioni effettuabili sul file (default _nordirop) TDirop op) // @parm Tipo di operazioni effettuabili sul file (default _nordirop)
{ {
int _whichdir = (dirtype == _nordir ? NORDIR : COMDIR); int whichdir = (dirtype == _nordir ? NORDIR : COMDIR);
if (op == _nordirop) if (op == _nordirop)
COpenFile (nfile, _dir, int (lock), _whichdir); COpenFile (nfile, _dir, int(lock), whichdir);
else else
CGetFile (nfile, _dir, int (lock), _whichdir); CGetFile (nfile, _dir, int(lock), whichdir);
_num = nfile; _num = nfile;
_com = _dir->SysName[0] != '$'; _com = _dir->SysName[0] != '$';
} }

View File

@ -406,6 +406,8 @@ HIDDEN int __build_key(const RecDes *recd, int numkey, RecType recin, char *key
HIDDEN int cisread(int fhnd, int knum, TRectype& record, int mode, TRecnotype& curr_recno) HIDDEN int cisread(int fhnd, int knum, TRectype& record, int mode, TRecnotype& curr_recno)
{ {
CHECKD(fhnd >= 0, "Can't use codebase handle ", fhnd);
const int rmode = (mode & READTYPES); const int rmode = (mode & READTYPES);
const int lmode = (mode & RECLOCKTYPES); const int lmode = (mode & RECLOCKTYPES);
@ -1604,22 +1606,26 @@ int TSystemisamfile::update(
if (toconvert) if (toconvert)
fname = filename(); fname = filename();
if (toconvert && (dir.eox() > 0L || fname.exist())) if (toconvert) //&& (dir.eox() > 0L || fname.exist()))
{ {
TRecnotype ni = 0L; TRecnotype ni = 0L;
TFilename tmpfname; tmpfname.temp("tf"); TFilename tmpfname; tmpfname.temp("tf");
err = _open_ex(_excllock);
if (err != NOERR)
return err;
err=DB_build(tmpfname, wrec.rec()); err=DB_build(tmpfname, wrec.rec());
if (err != NOERR) if (err != NOERR)
{ {
err=get_error(err); err=get_error(err);
return (err); return (err);
} }
if (dir.eod() > 0 && fname.exist() && oldrec.len())
{
err = _open_ex(_excllock);
if (err != NOERR)
return err;
// Apro il file destinazione in modo esclusivo e senza indici // Apro il file destinazione in modo esclusivo e senza indici
int tmpnum = num(); int tmpnum = num();
TIsam_handle ishandle = prefix().open_isamfile(tmpnum, tmpfname, TRUE, FALSE); TIsam_handle ishandle = prefix().open_isamfile(tmpnum, tmpfname, TRUE, FALSE);
@ -1699,6 +1705,8 @@ int TSystemisamfile::update(
if (err!=NOERR) err=get_error(err); if (err!=NOERR) err=get_error(err);
p.setstatus(nitems); p.setstatus(nitems);
}
if (err == NOERR) if (err == NOERR)
{ {
long c = DB_getconf(); long c = DB_getconf();
@ -1752,7 +1760,6 @@ int TSystemisamfile::update(
if (toconvert) if (toconvert)
{ {
if (dir.eox() > 0L)
packindex(); packindex();
if (err == NOERR) if (err == NOERR)
err = exec_convapp(lev, FALSE); // Post - conversion err = exec_convapp(lev, FALSE); // Post - conversion