SW: Replace calls to Error() with buildprintf().

git-svn-id: https://svn.eduke32.com/eduke32@5225 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-05-19 22:09:41 +00:00
parent 4440fca632
commit 41fcb1d32b

View file

@ -47,29 +47,6 @@ extern int nextvoxid; // JBF: in game.c
ParentalStruct aVoxelArray[MAXTILES];
/*
=============================================================================
ABNORMAL TERMINATION
=============================================================================
*/
#ifdef RENDERTYPEWIN
void Error(char *error, ...)
{
va_list argptr;
va_start(argptr,error);
vprintf(error,argptr);
va_end(argptr);
printf("\n");
exit(1);
}
#else
void Error(char *,...);
#endif
/*
=============================================================================
@ -174,7 +151,7 @@ void GetToken(SWBOOL crossline)
if (script_p >= scriptend_p)
{
if (!crossline)
Error("Line %i is incomplete\n",scriptline);
buildprintf("Error: Line %i is incomplete\n",scriptline);
endofscript = TRUE;
return;
}
@ -188,14 +165,14 @@ skipspace:
if (script_p >= scriptend_p)
{
if (!crossline)
Error("Line %i is incomplete\n",scriptline);
buildprintf("Error: Line %i is incomplete\n",scriptline);
endofscript = TRUE;
return;
}
if (*script_p++ == '\n')
{
if (!crossline)
Error("Line %i is incomplete\n",scriptline);
buildprintf("Error: Line %i is incomplete\n",scriptline);
scriptline++;
}
}
@ -203,7 +180,7 @@ skipspace:
if (script_p >= scriptend_p)
{
if (!crossline)
Error("Line %i is incomplete\n",scriptline);
buildprintf("Error: Line %i is incomplete\n",scriptline);
endofscript = TRUE;
return;
}
@ -211,7 +188,7 @@ skipspace:
if (*script_p == '#') // # is comment field
{
if (!crossline)
Error("Line %i is incomplete\n",scriptline);
buildprintf("Error: Line %i is incomplete\n",scriptline);
while (*script_p++ != '\n')
if (script_p >= scriptend_p)
{
@ -232,7 +209,7 @@ skipspace:
if (script_p == scriptend_p)
break;
ASSERT(token_p != &token[MAXTOKEN]);
// Error ("Token too large on line %i\n",scriptline);
// buildprintf("Error: Token too large on line %i\n",scriptline);
}
*token_p = 0;