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:
parent
c984889446
commit
363b89ce91
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue