mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
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:
parent
4440fca632
commit
41fcb1d32b
1 changed files with 6 additions and 29 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue