Aggiunto livello dei files

git-svn-id: svn://10.65.10.50/trunk@292 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-09-27 10:12:15 +00:00
parent d62839f466
commit 5976cbaf1a
2 changed files with 35 additions and 41 deletions

View File

@ -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

View File

@ -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)