From 5976cbaf1a7d67ca061c9945f5a8bf34d7ca6441 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 27 Sep 1994 10:12:15 +0000 Subject: [PATCH] Aggiunto livello dei files git-svn-id: svn://10.65.10.50/trunk@292 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/extcdecl.h | 5 +--- include/stdtypes.cpp | 71 +++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 41 deletions(-) diff --git a/include/extcdecl.h b/include/extcdecl.h index c7d457991..2508e7779 100755 --- a/include/extcdecl.h +++ b/include/extcdecl.h @@ -21,15 +21,12 @@ extern "C" { // Guy moved these outside extern extern isfdptr* openf; extern Str80 cprefix; + extern long stdlevel; #ifdef __STDTYPES_CPP #define extern #endif - // extern TDitta cditta; - // extern short flprassi; - // extern short flaltmodins; - extern short isjournal; #ifdef __STDTYPES_CPP diff --git a/include/stdtypes.cpp b/include/stdtypes.cpp index 00a89c020..ebd0de360 100755 --- a/include/stdtypes.cpp +++ b/include/stdtypes.cpp @@ -20,59 +20,56 @@ #define REFKEY "CAMPOKEY" #define VERKEY "ìpÙˆ¬cê<" +long stdlevel ; void init_global_vars() { #if XVT_OS != XVT_OS_SCOUNIX - HL_LOGIN(ModAd, DONT_CARE, REFKEY, VERKEY); + HL_LOGIN(ModAd, DONT_CARE, REFKEY, VERKEY); #endif - - const int ws = getser(); - if (ws < 0) - fatal_box("Perhaps you forgot to connect the dongle?"); - + + const int ws = getser(); + if (ws < 0) + fatal_box("Perhaps you forgot to connect the dongle?"); + CHECK(prefhndl == NULL, "Can't init global vars two times"); - prefhndl = new TPrefix; - prefhndl->set("DEF"); - prefhndl->set(""); + prefhndl = new TPrefix; + prefhndl->set("DEF"); + prefhndl->set(""); + stdlevel = prefhndl->filelevel(); + + FileDes d; + CGetFile(LF_DIR, &d, _nolock, NORDIR); + + long maxfdir = d.EOX; + prefhndl->set("DEF"); + CGetFile(LF_DIR, &d, _nolock, NORDIR); + if (d.EOD > maxfdir) maxfdir = d.EOD; - FileDes d; - CGetFile(LF_DIR, &d, _nolock, NORDIR); - - long maxfdir = d.EOX; - prefhndl->set("DEF"); - CGetFile(LF_DIR, &d, _nolock, NORDIR); - if (d.EOD > maxfdir) maxfdir = d.EOD; - -/* - char pd[64]; - strcpy(pd, CInsPref("dta.gen", NORDIR)); - CGetDitta(pd); - isjournal = *((bool *) CGetConf(JOURNALING)); -*/ + // isjournal = *((bool *) CGetConf(JOURNALING)); isjournal = FALSE; - openf = new isfdptr[maxfdir]; - openrec = new TRectype*[maxfdir]; - - for (long i = 0; i < maxfdir; i++) - { - openf[i] = NULL; - openrec[i] = NULL; - } - + openf = new isfdptr[maxfdir]; + openrec = new TRectype*[maxfdir]; + + for (long i = 0; i < maxfdir; i++) + { + openf[i] = NULL; + openrec[i] = NULL; + } + #if XVT_OS == XVT_OS_SCOUNIX - if ((SerNo) && (!CGetAut(MUAUT))) - fatal_box("Abnormal termination: check protection or serial number\n"); + if ((SerNo) && (!CGetAut(MUAUT))) + fatal_box("Abnormal termination: check protection or serial number\n"); #endif } void free_global_vars() { #if XVT_OS != XVT_OS_SCOUNIX - HL_LOGOUT(); + HL_LOGOUT(); #endif - delete openf; + delete openf; delete openrec; delete prefhndl; } @@ -86,7 +83,7 @@ void* operator new(size_t size) void* mem = (void*)xvt_fmalloc(size); if (mem == NULL) fatal_box("Out of memory: can't allocate %u bytes", size); - return mem; + return mem; } void operator delete(void* ptr)