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:
parent
f7c645eac7
commit
6aad57da86
@ -1957,9 +1957,12 @@ void TDropDownList::close()
|
||||
if (_open)
|
||||
{
|
||||
_open = FALSE;
|
||||
if (_xi_lst)
|
||||
{
|
||||
xvt_vobj_set_visible(xi_get_window(_xi_lst->itf), FALSE);
|
||||
xvt_dwin_update (xi_get_window(_obj->itf));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TDropDownList::destroy()
|
||||
|
@ -156,6 +156,7 @@ image BMP_EMAIL QRESDIR"email.bmp"
|
||||
image BMP_DIR QRESDIR"dir.bmp"
|
||||
image BMP_DIRDN QRESDIR"dirdn.bmp"
|
||||
image BMP_FILE QRESDIR"file.bmp"
|
||||
image BMP_STOP QRESDIR"stop.bmp"
|
||||
|
||||
#scan <xil.h>
|
||||
#transparent $$$
|
||||
|
@ -411,11 +411,12 @@ bool TDongle::network_login(bool test_all_keys)
|
||||
|
||||
TConfig ini(CONFIG_INSTALL, "Server");
|
||||
const char* server = ini.get("Dongle");
|
||||
const char* guest = "******";
|
||||
const TString appname = main_app().firm_change_enabled() ? main_app().name() : "ba0100";
|
||||
const char* utente = (!xvt_running() && appname == "ba0100") ? guest : user();
|
||||
const TString16 appname = main_app().name();
|
||||
TString16 utente = 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)
|
||||
{
|
||||
_hardware = _dongle_network;
|
||||
|
@ -381,15 +381,18 @@ void TExpression::eval()
|
||||
break;
|
||||
case _divide:
|
||||
{
|
||||
real& r = evalstack.pop_real();
|
||||
const real& r = evalstack.pop_real();
|
||||
if (r.is_zero())
|
||||
{
|
||||
if (!evalstack.peek_real().is_zero())
|
||||
{
|
||||
if (_ignore_error)
|
||||
_error=1;
|
||||
else
|
||||
print_error("Divisione per zero!");
|
||||
} else
|
||||
}
|
||||
}
|
||||
else
|
||||
evalstack.peek_real() /= r;
|
||||
}
|
||||
break;
|
||||
@ -519,7 +522,18 @@ void TExpression::eval()
|
||||
}
|
||||
break;
|
||||
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;
|
||||
case _sqr:
|
||||
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)
|
||||
|
||||
{
|
||||
TCodesym currsym;
|
||||
|
||||
_error=0;
|
||||
_user_func_defined = FALSE;
|
||||
_s = expression;
|
||||
_type = type;
|
||||
@ -1152,7 +1165,9 @@ bool TExpression::compile(const char* expression, TTypeexp type)
|
||||
_code.clear();
|
||||
if (*_s == '\0')
|
||||
return TRUE;
|
||||
if ((currsym = __gettoken()) == _invalid)
|
||||
|
||||
TCodesym currsym = __gettoken();
|
||||
if (currsym == _invalid)
|
||||
return FALSE;
|
||||
return __expression(currsym) == _endsym;
|
||||
}
|
||||
|
@ -272,12 +272,12 @@ void TDir::get (
|
||||
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)
|
||||
COpenFile (nfile, _dir, int (lock), _whichdir);
|
||||
COpenFile (nfile, _dir, int(lock), whichdir);
|
||||
else
|
||||
CGetFile (nfile, _dir, int (lock), _whichdir);
|
||||
CGetFile (nfile, _dir, int(lock), whichdir);
|
||||
_num = nfile;
|
||||
_com = _dir->SysName[0] != '$';
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
CHECKD(fhnd >= 0, "Can't use codebase handle ", fhnd);
|
||||
|
||||
const int rmode = (mode & READTYPES);
|
||||
const int lmode = (mode & RECLOCKTYPES);
|
||||
|
||||
@ -1604,22 +1606,26 @@ int TSystemisamfile::update(
|
||||
if (toconvert)
|
||||
fname = filename();
|
||||
|
||||
if (toconvert && (dir.eox() > 0L || fname.exist()))
|
||||
if (toconvert) //&& (dir.eox() > 0L || fname.exist()))
|
||||
{
|
||||
TRecnotype ni = 0L;
|
||||
TFilename tmpfname; tmpfname.temp("tf");
|
||||
|
||||
err = _open_ex(_excllock);
|
||||
if (err != NOERR)
|
||||
return err;
|
||||
|
||||
err=DB_build(tmpfname, wrec.rec());
|
||||
|
||||
if (err != NOERR)
|
||||
{
|
||||
err=get_error(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
|
||||
int tmpnum = num();
|
||||
TIsam_handle ishandle = prefix().open_isamfile(tmpnum, tmpfname, TRUE, FALSE);
|
||||
@ -1699,6 +1705,8 @@ int TSystemisamfile::update(
|
||||
if (err!=NOERR) err=get_error(err);
|
||||
|
||||
p.setstatus(nitems);
|
||||
}
|
||||
|
||||
if (err == NOERR)
|
||||
{
|
||||
long c = DB_getconf();
|
||||
@ -1752,7 +1760,6 @@ int TSystemisamfile::update(
|
||||
|
||||
if (toconvert)
|
||||
{
|
||||
if (dir.eox() > 0L)
|
||||
packindex();
|
||||
if (err == NOERR)
|
||||
err = exec_convapp(lev, FALSE); // Post - conversion
|
||||
|
Loading…
x
Reference in New Issue
Block a user