forked from fte/fteqw
1
0
Fork 0

Should now be able to cope with malloc errors better by disabling the compiler entirly if the problem occurs.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@291 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-10-03 10:15:15 +00:00
parent c984889446
commit 363b89ce91
1 changed files with 7 additions and 3 deletions

View File

@ -52,12 +52,14 @@ void PostCompile(void)
asmfile = NULL; asmfile = NULL;
} }
} }
void PreCompile(void) pbool PreCompile(void)
{ {
qccClearHunk(); qccClearHunk();
strcpy(qcc_gamedir, ""); strcpy(qcc_gamedir, "");
qcchunk = malloc(qcchunksize=16*1024*1024); qcchunk = malloc(qcchunksize=16*1024*1024);
qccalloced=0; qccalloced=0;
return !!qcchunk;
} }
void QCC_main (int argc, char **argv); void QCC_main (int argc, char **argv);
@ -85,7 +87,8 @@ pbool CompileParams(progfuncs_t *progfuncs, int doall, int nump, char **parms)
return false; return false;
} }
PreCompile(); if (!PreCompile())
return false;
QCC_main(nump, parms); QCC_main(nump, parms);
while(qcc_compileactive) while(qcc_compileactive)
@ -109,7 +112,8 @@ int Comp_Begin(progfuncs_t *progfuncs, int nump, char **parms)
return false; return false;
} }
PreCompile(); if (!PreCompile())
return false;
QCC_main(nump, parms); QCC_main(nump, parms);
return true; return true;