isam.cpp Corretto messaggio in un CHECK

mask.cpp     Esteso tasto f12
msksheet.cpp Corretto evento E_FOCUS
stdtypes.cpp Aggiunto contatore


git-svn-id: svn://10.65.10.50/trunk@2166 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-11-17 10:29:45 +00:00
parent f770af567e
commit 033a402a1d
4 changed files with 19 additions and 8 deletions

View File

@ -548,7 +548,7 @@ void TBaseisamfile::setkey(int nkey)
int TBaseisamfile::getkey() const int TBaseisamfile::getkey() const
{ {
NOT_OPEN(); NOT_OPEN();
CHECK(DB_tagget(_isamfile->fhnd) == _isamfile->knum, "Chiave inconsistente"); CHECKD(DB_tagget(_isamfile->fhnd) == _isamfile->knum, "Chiave inconsistente sul file ", _logicnum);
return _isamfile->knum; return _isamfile->knum;
} }

View File

@ -13,6 +13,8 @@
HIDDEN const char* const MASK_EXT = "msk"; HIDDEN const char* const MASK_EXT = "msk";
extern unsigned long _alloc_count;
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// TMask methods // TMask methods
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -877,8 +879,12 @@ bool TMask::on_key(
case K_F12: case K_F12:
message_box("Lettura = %ld\n" message_box("Lettura = %ld\n"
"Creazione = %ld\n" "Creazione = %ld\n"
"Inizializzazione = %ld", "Inizializzazione = %ld\n"
_total_time-_build_time, _build_time, _init_time); #ifdef DBG
"Allocazioni = %lu\n"
#endif
, _total_time-_build_time, _build_time, _init_time,
_alloc_count);
break; break;
default: default:
if (key > K_CTRL) if (key > K_CTRL)

View File

@ -1011,7 +1011,7 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
switch (ep->type) switch (ep->type)
{ {
case E_FOCUS: case E_FOCUS:
if (_check_enabled && ep->v.active == FALSE) if (_check_enabled && ep->v.active == FALSE && mask().is_running())
{ {
const bool ok = (bool)xi_move_focus(_itf); const bool ok = (bool)xi_move_focus(_itf);
if (!ok) if (!ok)

View File

@ -51,7 +51,6 @@ void init_global_vars()
CGetFile(LF_DIR, &d, _nolock, NORDIR); CGetFile(LF_DIR, &d, _nolock, NORDIR);
if (d.EOD > maxfdir) maxfdir = d.EOD; if (d.EOD > maxfdir) maxfdir = d.EOD;
// isjournal = *((bool *) CGetConf(JOURNALING));
isjournal = FALSE; isjournal = FALSE;
openf = new isfdptr[maxfdir]; openf = new isfdptr[maxfdir];
@ -85,17 +84,23 @@ void free_global_vars()
DB_exit(); DB_exit();
} }
#ifndef FOXPRO #ifndef FOXPRO
#include <xvt.h> #include <xvt.h>
#ifdef DBG
unsigned long _alloc_count = 0;
#endif
void* operator new(size_t size) void* operator new(size_t size)
{ {
void* mem = (void*)malloc(size); void* mem = (void*)malloc(size);
if (mem == NULL) if (mem == NULL)
fatal_box("Out of memory: can't allocate %u bytes", size); fatal_box("Out of memory: can't allocate %u bytes", size);
#ifdef DBG
_alloc_count++;
#endif
return mem; return mem;
} }