From 033a402a1d51a79dbc2b7aadaa02b1f1afbedfbb Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 17 Nov 1995 10:29:45 +0000 Subject: [PATCH] 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 --- include/isam.cpp | 2 +- include/mask.cpp | 10 ++++++++-- include/msksheet.cpp | 2 +- include/stdtypes.cpp | 13 +++++++++---- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/include/isam.cpp b/include/isam.cpp index f01fe24b4..52af340d1 100755 --- a/include/isam.cpp +++ b/include/isam.cpp @@ -548,7 +548,7 @@ void TBaseisamfile::setkey(int nkey) int TBaseisamfile::getkey() const { 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; } diff --git a/include/mask.cpp b/include/mask.cpp index 206121f28..db2f88ff0 100755 --- a/include/mask.cpp +++ b/include/mask.cpp @@ -13,6 +13,8 @@ HIDDEN const char* const MASK_EXT = "msk"; +extern unsigned long _alloc_count; + /////////////////////////////////////////////////////////// // TMask methods /////////////////////////////////////////////////////////// @@ -877,8 +879,12 @@ bool TMask::on_key( case K_F12: message_box("Lettura = %ld\n" "Creazione = %ld\n" - "Inizializzazione = %ld", - _total_time-_build_time, _build_time, _init_time); + "Inizializzazione = %ld\n" +#ifdef DBG + "Allocazioni = %lu\n" +#endif + , _total_time-_build_time, _build_time, _init_time, + _alloc_count); break; default: if (key > K_CTRL) diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 01588aab6..fe46998a4 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -1011,7 +1011,7 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev) switch (ep->type) { 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); if (!ok) diff --git a/include/stdtypes.cpp b/include/stdtypes.cpp index 88bacd0af..b33dc0bcf 100755 --- a/include/stdtypes.cpp +++ b/include/stdtypes.cpp @@ -51,7 +51,6 @@ void init_global_vars() CGetFile(LF_DIR, &d, _nolock, NORDIR); if (d.EOD > maxfdir) maxfdir = d.EOD; - // isjournal = *((bool *) CGetConf(JOURNALING)); isjournal = FALSE; openf = new isfdptr[maxfdir]; @@ -85,17 +84,23 @@ void free_global_vars() DB_exit(); } - - - #ifndef FOXPRO #include +#ifdef DBG +unsigned long _alloc_count = 0; +#endif + void* operator new(size_t size) { void* mem = (void*)malloc(size); if (mem == NULL) fatal_box("Out of memory: can't allocate %u bytes", size); + +#ifdef DBG + _alloc_count++; +#endif + return mem; }