more '\n' business

From /dev/humancontroller.
This commit is contained in:
Zack Middleton 2012-06-19 15:14:57 +00:00
parent 4cfbbe506c
commit 945f01d4af
12 changed files with 59 additions and 59 deletions

View file

@ -392,7 +392,7 @@ void AAS_ParseBSPEntities(void)
{ {
if (strcmp(token.string, "{")) if (strcmp(token.string, "{"))
{ {
ScriptError(script, "invalid %s\n", token.string); ScriptError(script, "invalid %s", token.string);
AAS_FreeBSPEntities(); AAS_FreeBSPEntities();
FreeScript(script); FreeScript(script);
return; return;
@ -413,7 +413,7 @@ void AAS_ParseBSPEntities(void)
ent->epairs = epair; ent->epairs = epair;
if (token.type != TT_STRING) if (token.type != TT_STRING)
{ {
ScriptError(script, "invalid %s\n", token.string); ScriptError(script, "invalid %s", token.string);
AAS_FreeBSPEntities(); AAS_FreeBSPEntities();
FreeScript(script); FreeScript(script);
return; return;
@ -433,7 +433,7 @@ void AAS_ParseBSPEntities(void)
} //end while } //end while
if (strcmp(token.string, "}")) if (strcmp(token.string, "}"))
{ {
ScriptError(script, "missing }\n"); ScriptError(script, "missing }");
AAS_FreeBSPEntities(); AAS_FreeBSPEntities();
FreeScript(script); FreeScript(script);
return; return;

View file

@ -130,7 +130,7 @@ int AAS_UpdatePortal(int areanum, int clusternum)
// //
if (portalnum == aasworld.numportals) if (portalnum == aasworld.numportals)
{ {
AAS_Error("no portal of area %d", areanum); AAS_Error("no portal of area %d\n", areanum);
return qtrue; return qtrue;
} //end if } //end if
// //
@ -157,7 +157,7 @@ int AAS_UpdatePortal(int areanum, int clusternum)
} //end else } //end else
if (aasworld.portalindexsize >= AAS_MAX_PORTALINDEXSIZE) if (aasworld.portalindexsize >= AAS_MAX_PORTALINDEXSIZE)
{ {
AAS_Error("AAS_MAX_PORTALINDEXSIZE"); AAS_Error("AAS_MAX_PORTALINDEXSIZE\n");
return qtrue; return qtrue;
} //end if } //end if
//set the area cluster number to the negative portal number //set the area cluster number to the negative portal number
@ -184,7 +184,7 @@ int AAS_FloodClusterAreas_r(int areanum, int clusternum)
// //
if (areanum <= 0 || areanum >= aasworld.numareas) if (areanum <= 0 || areanum >= aasworld.numareas)
{ {
AAS_Error("AAS_FloodClusterAreas_r: areanum out of range"); AAS_Error("AAS_FloodClusterAreas_r: areanum out of range\n");
return qfalse; return qfalse;
} //end if } //end if
//if the area is already part of a cluster //if the area is already part of a cluster
@ -194,7 +194,7 @@ int AAS_FloodClusterAreas_r(int areanum, int clusternum)
// //
//there's a reachability going from one cluster to another only in one direction //there's a reachability going from one cluster to another only in one direction
// //
AAS_Error("cluster %d touched cluster %d at area %d\r\n", AAS_Error("cluster %d touched cluster %d at area %d\n",
clusternum, aasworld.areasettings[areanum].cluster, areanum); clusternum, aasworld.areasettings[areanum].cluster, areanum);
return qfalse; return qfalse;
} //end if } //end if
@ -410,7 +410,7 @@ int AAS_FindClusters(void)
continue; continue;
if (aasworld.numclusters >= AAS_MAX_CLUSTERS) if (aasworld.numclusters >= AAS_MAX_CLUSTERS)
{ {
AAS_Error("AAS_MAX_CLUSTERS"); AAS_Error("AAS_MAX_CLUSTERS\n");
return qfalse; return qfalse;
} //end if } //end if
cluster = &aasworld.clusters[aasworld.numclusters]; cluster = &aasworld.clusters[aasworld.numclusters];
@ -449,7 +449,7 @@ void AAS_CreatePortals(void)
{ {
if (aasworld.numportals >= AAS_MAX_PORTALS) if (aasworld.numportals >= AAS_MAX_PORTALS)
{ {
AAS_Error("AAS_MAX_PORTALS"); AAS_Error("AAS_MAX_PORTALS\n");
return; return;
} //end if } //end if
portal = &aasworld.portals[aasworld.numportals]; portal = &aasworld.portals[aasworld.numportals];
@ -776,7 +776,7 @@ int AAS_GetAdjacentAreasWithLessPresenceTypes_r(int *areanums, int numareas, int
{ {
if (numareas >= MAX_PORTALAREAS) if (numareas >= MAX_PORTALAREAS)
{ {
AAS_Error("MAX_PORTALAREAS"); AAS_Error("MAX_PORTALAREAS\n");
return numareas; return numareas;
} //end if } //end if
numareas = AAS_GetAdjacentAreasWithLessPresenceTypes_r(areanums, numareas, otherareanum); numareas = AAS_GetAdjacentAreasWithLessPresenceTypes_r(areanums, numareas, otherareanum);

View file

@ -490,7 +490,7 @@ aas_lreachability_t *AAS_AllocReachability(void)
if (!nextreachability) return NULL; if (!nextreachability) return NULL;
//make sure the error message only shows up once //make sure the error message only shows up once
if (!nextreachability->next) AAS_Error("AAS_MAX_REACHABILITYSIZE"); if (!nextreachability->next) AAS_Error("AAS_MAX_REACHABILITYSIZE\n");
// //
r = nextreachability; r = nextreachability;
nextreachability = nextreachability->next; nextreachability = nextreachability->next;
@ -523,7 +523,7 @@ int AAS_AreaReachability(int areanum)
{ {
if (areanum < 0 || areanum >= aasworld.numareas) if (areanum < 0 || areanum >= aasworld.numareas)
{ {
AAS_Error("AAS_AreaReachability: areanum %d out of range", areanum); AAS_Error("AAS_AreaReachability: areanum %d out of range\n", areanum);
return 0; return 0;
} //end if } //end if
return aasworld.areasettings[areanum].numreachableareas; return aasworld.areasettings[areanum].numreachableareas;

View file

@ -1074,7 +1074,7 @@ int AAS_ReadRouteCache(void)
} //end if } //end if
if (routecacheheader.version != RCVERSION) if (routecacheheader.version != RCVERSION)
{ {
AAS_Error("route cache dump has wrong version %d, should be %d", routecacheheader.version, RCVERSION); AAS_Error("route cache dump has wrong version %d, should be %d\n", routecacheheader.version, RCVERSION);
return qfalse; return qfalse;
} //end if } //end if
if (routecacheheader.numareas != aasworld.numareas) if (routecacheheader.numareas != aasworld.numareas)

View file

@ -256,7 +256,7 @@ bot_character_t *BotLoadCharacterFromFile(char *charfile, int skill)
if (!strcmp(token.string, "}")) break; if (!strcmp(token.string, "}")) break;
if (token.type != TT_NUMBER || !(token.subtype & TT_INTEGER)) if (token.type != TT_NUMBER || !(token.subtype & TT_INTEGER))
{ {
SourceError(source, "expected integer index, found %s\n", token.string); SourceError(source, "expected integer index, found %s", token.string);
FreeSource(source); FreeSource(source);
BotFreeCharacterStrings(ch); BotFreeCharacterStrings(ch);
FreeMemory(ch); FreeMemory(ch);
@ -265,7 +265,7 @@ bot_character_t *BotLoadCharacterFromFile(char *charfile, int skill)
index = token.intvalue; index = token.intvalue;
if (index < 0 || index > MAX_CHARACTERISTICS) if (index < 0 || index > MAX_CHARACTERISTICS)
{ {
SourceError(source, "characteristic index out of range [0, %d]\n", MAX_CHARACTERISTICS); SourceError(source, "characteristic index out of range [0, %d]", MAX_CHARACTERISTICS);
FreeSource(source); FreeSource(source);
BotFreeCharacterStrings(ch); BotFreeCharacterStrings(ch);
FreeMemory(ch); FreeMemory(ch);
@ -273,7 +273,7 @@ bot_character_t *BotLoadCharacterFromFile(char *charfile, int skill)
} //end if } //end if
if (ch->c[index].type) if (ch->c[index].type)
{ {
SourceError(source, "characteristic %d already initialized\n", index); SourceError(source, "characteristic %d already initialized", index);
FreeSource(source); FreeSource(source);
BotFreeCharacterStrings(ch); BotFreeCharacterStrings(ch);
FreeMemory(ch); FreeMemory(ch);
@ -308,7 +308,7 @@ bot_character_t *BotLoadCharacterFromFile(char *charfile, int skill)
} //end else if } //end else if
else else
{ {
SourceError(source, "expected integer, float or string, found %s\n", token.string); SourceError(source, "expected integer, float or string, found %s", token.string);
FreeSource(source); FreeSource(source);
BotFreeCharacterStrings(ch); BotFreeCharacterStrings(ch);
FreeMemory(ch); FreeMemory(ch);
@ -336,7 +336,7 @@ bot_character_t *BotLoadCharacterFromFile(char *charfile, int skill)
} //end if } //end if
else else
{ {
SourceError(source, "unknown definition %s\n", token.string); SourceError(source, "unknown definition %s", token.string);
FreeSource(source); FreeSource(source);
BotFreeCharacterStrings(ch); BotFreeCharacterStrings(ch);
FreeMemory(ch); FreeMemory(ch);

View file

@ -739,7 +739,7 @@ bot_synonymlist_t *BotLoadSynonyms(char *filename)
} //end while } //end while
if (numsynonyms < 2) if (numsynonyms < 2)
{ {
SourceError(source, "synonym must have at least two entries\n"); SourceError(source, "synonym must have at least two entries");
FreeSource(source); FreeSource(source);
return NULL; return NULL;
} //end if } //end if
@ -891,7 +891,7 @@ int BotLoadChatMessage(source_t *source, char *chatmessagestring)
StripDoubleQuotes(token.string); StripDoubleQuotes(token.string);
if (strlen(ptr) + strlen(token.string) + 1 > MAX_MESSAGE_SIZE) if (strlen(ptr) + strlen(token.string) + 1 > MAX_MESSAGE_SIZE)
{ {
SourceError(source, "chat message too long\n"); SourceError(source, "chat message too long");
return qfalse; return qfalse;
} //end if } //end if
strcat(ptr, token.string); strcat(ptr, token.string);
@ -901,7 +901,7 @@ int BotLoadChatMessage(source_t *source, char *chatmessagestring)
{ {
if (strlen(ptr) + 7 > MAX_MESSAGE_SIZE) if (strlen(ptr) + 7 > MAX_MESSAGE_SIZE)
{ {
SourceError(source, "chat message too long\n"); SourceError(source, "chat message too long");
return qfalse; return qfalse;
} //end if } //end if
sprintf(&ptr[strlen(ptr)], "%cv%ld%c", ESCAPE_CHAR, token.intvalue, ESCAPE_CHAR); sprintf(&ptr[strlen(ptr)], "%cv%ld%c", ESCAPE_CHAR, token.intvalue, ESCAPE_CHAR);
@ -911,14 +911,14 @@ int BotLoadChatMessage(source_t *source, char *chatmessagestring)
{ {
if (strlen(ptr) + 7 > MAX_MESSAGE_SIZE) if (strlen(ptr) + 7 > MAX_MESSAGE_SIZE)
{ {
SourceError(source, "chat message too long\n"); SourceError(source, "chat message too long");
return qfalse; return qfalse;
} //end if } //end if
sprintf(&ptr[strlen(ptr)], "%cr%s%c", ESCAPE_CHAR, token.string, ESCAPE_CHAR); sprintf(&ptr[strlen(ptr)], "%cr%s%c", ESCAPE_CHAR, token.string, ESCAPE_CHAR);
} //end else if } //end else if
else else
{ {
SourceError(source, "unknown message component %s\n", token.string); SourceError(source, "unknown message component %s", token.string);
return qfalse; return qfalse;
} //end else } //end else
if (PC_CheckTokenString(source, ";")) break; if (PC_CheckTokenString(source, ";")) break;
@ -1175,14 +1175,14 @@ bot_matchpiece_t *BotLoadMatchPieces(source_t *source, char *endtoken)
{ {
if (token.intvalue >= MAX_MATCHVARIABLES) if (token.intvalue >= MAX_MATCHVARIABLES)
{ {
SourceError(source, "can't have more than %d match variables\n", MAX_MATCHVARIABLES); SourceError(source, "can't have more than %d match variables", MAX_MATCHVARIABLES);
FreeSource(source); FreeSource(source);
BotFreeMatchPieces(firstpiece); BotFreeMatchPieces(firstpiece);
return NULL; return NULL;
} //end if } //end if
if (lastwasvariable) if (lastwasvariable)
{ {
SourceError(source, "not allowed to have adjacent variables\n"); SourceError(source, "not allowed to have adjacent variables");
FreeSource(source); FreeSource(source);
BotFreeMatchPieces(firstpiece); BotFreeMatchPieces(firstpiece);
return NULL; return NULL;
@ -1238,7 +1238,7 @@ bot_matchpiece_t *BotLoadMatchPieces(source_t *source, char *endtoken)
} //end if } //end if
else else
{ {
SourceError(source, "invalid token %s\n", token.string); SourceError(source, "invalid token %s", token.string);
FreeSource(source); FreeSource(source);
BotFreeMatchPieces(firstpiece); BotFreeMatchPieces(firstpiece);
return NULL; return NULL;
@ -1298,7 +1298,7 @@ bot_matchtemplate_t *BotLoadMatchTemplates(char *matchfile)
{ {
if (token.type != TT_NUMBER || !(token.subtype & TT_INTEGER)) if (token.type != TT_NUMBER || !(token.subtype & TT_INTEGER))
{ {
SourceError(source, "expected integer, found %s\n", token.string); SourceError(source, "expected integer, found %s", token.string);
BotFreeMatchTemplates(matches); BotFreeMatchTemplates(matches);
FreeSource(source); FreeSource(source);
return NULL; return NULL;
@ -2101,7 +2101,7 @@ bot_chat_t *BotLoadInitialChat(char *chatfile, char *chatname)
if (!strcmp(token.string, "}")) break; if (!strcmp(token.string, "}")) break;
if (strcmp(token.string, "type")) if (strcmp(token.string, "type"))
{ {
SourceError(source, "expected type found %s\n", token.string); SourceError(source, "expected type found %s", token.string);
FreeSource(source); FreeSource(source);
return NULL; return NULL;
} //end if } //end if
@ -2172,7 +2172,7 @@ bot_chat_t *BotLoadInitialChat(char *chatfile, char *chatname)
} //end if } //end if
else else
{ {
SourceError(source, "unknown definition %s\n", token.string); SourceError(source, "unknown definition %s", token.string);
FreeSource(source); FreeSource(source);
return NULL; return NULL;
} //end else } //end else

View file

@ -300,7 +300,7 @@ itemconfig_t *LoadItemConfig(char *filename)
{ {
if (ic->numiteminfo >= max_iteminfo) if (ic->numiteminfo >= max_iteminfo)
{ {
SourceError(source, "more than %d item info defined\n", max_iteminfo); SourceError(source, "more than %d item info defined", max_iteminfo);
FreeMemory(ic); FreeMemory(ic);
FreeSource(source); FreeSource(source);
return NULL; return NULL;
@ -326,7 +326,7 @@ itemconfig_t *LoadItemConfig(char *filename)
} //end if } //end if
else else
{ {
SourceError(source, "unknown definition %s\n", token.string); SourceError(source, "unknown definition %s", token.string);
FreeMemory(ic); FreeMemory(ic);
FreeSource(source); FreeSource(source);
return NULL; return NULL;

View file

@ -63,18 +63,18 @@ int ReadValue(source_t *source, float *value)
if (!PC_ExpectAnyToken(source, &token)) return qfalse; if (!PC_ExpectAnyToken(source, &token)) return qfalse;
if (!strcmp(token.string, "-")) if (!strcmp(token.string, "-"))
{ {
SourceWarning(source, "negative value set to zero\n"); SourceWarning(source, "negative value set to zero");
if(!PC_ExpectAnyToken(source, &token)) if(!PC_ExpectAnyToken(source, &token))
{ {
SourceError(source, "Missing return value\n"); SourceError(source, "Missing return value");
return qfalse; return qfalse;
} }
} }
if (token.type != TT_NUMBER) if (token.type != TT_NUMBER)
{ {
SourceError(source, "invalid return value %s\n", token.string); SourceError(source, "invalid return value %s", token.string);
return qfalse; return qfalse;
} }
@ -186,7 +186,7 @@ fuzzyseperator_t *ReadFuzzySeperators_r(source_t *source)
{ {
if (founddefault) if (founddefault)
{ {
SourceError(source, "switch already has a default\n"); SourceError(source, "switch already has a default");
FreeFuzzySeperators_r(firstfs); FreeFuzzySeperators_r(firstfs);
return NULL; return NULL;
} //end if } //end if
@ -236,7 +236,7 @@ fuzzyseperator_t *ReadFuzzySeperators_r(source_t *source)
} //end else if } //end else if
else else
{ {
SourceError(source, "invalid name %s\n", token.string); SourceError(source, "invalid name %s", token.string);
return NULL; return NULL;
} //end else } //end else
if (newindent) if (newindent)
@ -251,7 +251,7 @@ fuzzyseperator_t *ReadFuzzySeperators_r(source_t *source)
else else
{ {
FreeFuzzySeperators_r(firstfs); FreeFuzzySeperators_r(firstfs);
SourceError(source, "invalid name %s\n", token.string); SourceError(source, "invalid name %s", token.string);
return NULL; return NULL;
} //end else } //end else
if (!PC_ExpectAnyToken(source, &token)) if (!PC_ExpectAnyToken(source, &token))
@ -263,7 +263,7 @@ fuzzyseperator_t *ReadFuzzySeperators_r(source_t *source)
// //
if (!founddefault) if (!founddefault)
{ {
SourceWarning(source, "switch without default\n"); SourceWarning(source, "switch without default");
fs = (fuzzyseperator_t *) GetClearedMemory(sizeof(fuzzyseperator_t)); fs = (fuzzyseperator_t *) GetClearedMemory(sizeof(fuzzyseperator_t));
fs->index = index; fs->index = index;
fs->value = MAX_INVENTORYVALUE; fs->value = MAX_INVENTORYVALUE;
@ -342,7 +342,7 @@ weightconfig_t *ReadWeightConfig(char *filename)
{ {
if (config->numweights >= MAX_WEIGHTS) if (config->numweights >= MAX_WEIGHTS)
{ {
SourceWarning(source, "too many fuzzy weights\n"); SourceWarning(source, "too many fuzzy weights");
break; break;
} //end if } //end if
if (!PC_ExpectTokenType(source, TT_STRING, 0, &token)) if (!PC_ExpectTokenType(source, TT_STRING, 0, &token))
@ -400,7 +400,7 @@ weightconfig_t *ReadWeightConfig(char *filename)
} //end else if } //end else if
else else
{ {
SourceError(source, "invalid name %s\n", token.string); SourceError(source, "invalid name %s", token.string);
FreeWeightConfig(config); FreeWeightConfig(config);
FreeSource(source); FreeSource(source);
return NULL; return NULL;
@ -418,7 +418,7 @@ weightconfig_t *ReadWeightConfig(char *filename)
} //end if } //end if
else else
{ {
SourceError(source, "invalid name %s\n", token.string); SourceError(source, "invalid name %s", token.string);
FreeWeightConfig(config); FreeWeightConfig(config);
FreeSource(source); FreeSource(source);
return NULL; return NULL;

View file

@ -269,7 +269,7 @@ token_t *PC_CopyToken(token_t *token)
if (!t) if (!t)
{ {
#ifdef BSPC #ifdef BSPC
Error("out of token space\n"); Error("out of token space");
#else #else
Com_Error(ERR_FATAL, "out of token space"); Com_Error(ERR_FATAL, "out of token space");
#endif #endif
@ -1666,7 +1666,7 @@ int PC_OperatorPriority(int op)
#define MAX_OPERATORS 64 #define MAX_OPERATORS 64
#define AllocValue(val) \ #define AllocValue(val) \
if (numvalues >= MAX_VALUES) { \ if (numvalues >= MAX_VALUES) { \
SourceError(source, "out of value space\n"); \ SourceError(source, "out of value space"); \
error = 1; \ error = 1; \
break; \ break; \
} \ } \
@ -1676,7 +1676,7 @@ int PC_OperatorPriority(int op)
// //
#define AllocOperator(op) \ #define AllocOperator(op) \
if (numoperators >= MAX_OPERATORS) { \ if (numoperators >= MAX_OPERATORS) { \
SourceError(source, "out of operator space\n"); \ SourceError(source, "out of operator space"); \
error = 1; \ error = 1; \
break; \ break; \
} \ } \
@ -1838,7 +1838,7 @@ int PC_EvaluateTokens(source_t *source, token_t *tokens, signed long int *intval
t->subtype == P_BIN_AND || t->subtype == P_BIN_OR || t->subtype == P_BIN_AND || t->subtype == P_BIN_OR ||
t->subtype == P_BIN_XOR) t->subtype == P_BIN_XOR)
{ {
SourceError(source, "illigal operator %s on floating point operands\n", t->string); SourceError(source, "illigal operator %s on floating point operands", t->string);
error = 1; error = 1;
break; break;
} //end if } //end if
@ -2005,7 +2005,7 @@ int PC_EvaluateTokens(source_t *source, token_t *tokens, signed long int *intval
v1->floatvalue *= v2->floatvalue; break; v1->floatvalue *= v2->floatvalue; break;
case P_DIV: if (!v2->intvalue || !v2->floatvalue) case P_DIV: if (!v2->intvalue || !v2->floatvalue)
{ {
SourceError(source, "divide by zero in #if/#elif\n"); SourceError(source, "divide by zero in #if/#elif");
error = 1; error = 1;
break; break;
} }
@ -2013,7 +2013,7 @@ int PC_EvaluateTokens(source_t *source, token_t *tokens, signed long int *intval
v1->floatvalue /= v2->floatvalue; break; v1->floatvalue /= v2->floatvalue; break;
case P_MOD: if (!v2->intvalue) case P_MOD: if (!v2->intvalue)
{ {
SourceError(source, "divide by zero in #if/#elif\n"); SourceError(source, "divide by zero in #if/#elif");
error = 1; error = 1;
break; break;
} }
@ -2750,7 +2750,7 @@ int PC_ReadToken(source_t *source, token_t *token)
token->string[strlen(token->string)-1] = '\0'; token->string[strlen(token->string)-1] = '\0';
if (strlen(token->string) + strlen(newtoken.string+1) + 1 >= MAX_TOKEN) if (strlen(token->string) + strlen(newtoken.string+1) + 1 >= MAX_TOKEN)
{ {
SourceError(source, "string longer than MAX_TOKEN %d\n", MAX_TOKEN); SourceError(source, "string longer than MAX_TOKEN %d", MAX_TOKEN);
return qfalse; return qfalse;
} }
strcat(token->string, newtoken.string+1); strcat(token->string, newtoken.string+1);

View file

@ -1158,7 +1158,7 @@ float ReadSignedFloat(script_t *script)
{ {
if(!PS_ExpectAnyToken(script, &token)) if(!PS_ExpectAnyToken(script, &token))
{ {
ScriptError(script, "Missing float value\n"); ScriptError(script, "Missing float value");
return 0; return 0;
} }
@ -1167,7 +1167,7 @@ float ReadSignedFloat(script_t *script)
if (token.type != TT_NUMBER) if (token.type != TT_NUMBER)
{ {
ScriptError(script, "expected float value, found %s\n", token.string); ScriptError(script, "expected float value, found %s", token.string);
return 0; return 0;
} }
@ -1189,7 +1189,7 @@ signed long int ReadSignedInt(script_t *script)
{ {
if(!PS_ExpectAnyToken(script, &token)) if(!PS_ExpectAnyToken(script, &token))
{ {
ScriptError(script, "Missing integer value\n"); ScriptError(script, "Missing integer value");
return 0; return 0;
} }
@ -1198,7 +1198,7 @@ signed long int ReadSignedInt(script_t *script)
if (token.type != TT_NUMBER || token.subtype == TT_FLOAT) if (token.type != TT_NUMBER || token.subtype == TT_FLOAT)
{ {
ScriptError(script, "expected integer value, found %s\n", token.string); ScriptError(script, "expected integer value, found %s", token.string);
return 0; return 0;
} }

View file

@ -1622,7 +1622,7 @@ Motivation: not wanting to scrollback for pages to find asm error.
} }
// In some case it Segfault without this check // In some case it Segfault without this check
if ( numAsmFiles == 0 ) { if ( numAsmFiles == 0 ) {
Error( "No file to assemble\n" ); Error( "No file to assemble" );
} }
InitTables(); InitTables();

View file

@ -345,7 +345,7 @@ qboolean PC_Float_Parse(int handle, float *f) {
negative = qtrue; negative = qtrue;
} }
if (token.type != TT_NUMBER) { if (token.type != TT_NUMBER) {
PC_SourceError(handle, "expected float but found %s\n", token.string); PC_SourceError(handle, "expected float but found %s", token.string);
return qfalse; return qfalse;
} }
if (negative) if (negative)
@ -425,7 +425,7 @@ qboolean PC_Int_Parse(int handle, int *i) {
negative = qtrue; negative = qtrue;
} }
if (token.type != TT_NUMBER) { if (token.type != TT_NUMBER) {
PC_SourceError(handle, "expected integer but found %s\n", token.string); PC_SourceError(handle, "expected integer but found %s", token.string);
return qfalse; return qfalse;
} }
*i = token.intvalue; *i = token.intvalue;
@ -4911,7 +4911,7 @@ qboolean ItemParse_cvarStrList( itemDef_t *item, int handle ) {
pass = 0; pass = 0;
while ( 1 ) { while ( 1 ) {
if (!trap_PC_ReadToken(handle, &token)) { if (!trap_PC_ReadToken(handle, &token)) {
PC_SourceError(handle, "end of file inside menu item\n"); PC_SourceError(handle, "end of file inside menu item");
return qfalse; return qfalse;
} }
@ -4958,7 +4958,7 @@ qboolean ItemParse_cvarFloatList( itemDef_t *item, int handle ) {
while ( 1 ) { while ( 1 ) {
if (!trap_PC_ReadToken(handle, &token)) { if (!trap_PC_ReadToken(handle, &token)) {
PC_SourceError(handle, "end of file inside menu item\n"); PC_SourceError(handle, "end of file inside menu item");
return qfalse; return qfalse;
} }
@ -5142,7 +5142,7 @@ qboolean Item_Parse(int handle, itemDef_t *item) {
} }
while ( 1 ) { while ( 1 ) {
if (!trap_PC_ReadToken(handle, &token)) { if (!trap_PC_ReadToken(handle, &token)) {
PC_SourceError(handle, "end of file inside menu item\n"); PC_SourceError(handle, "end of file inside menu item");
return qfalse; return qfalse;
} }
@ -5552,7 +5552,7 @@ qboolean Menu_Parse(int handle, menuDef_t *menu) {
memset(&token, 0, sizeof(pc_token_t)); memset(&token, 0, sizeof(pc_token_t));
if (!trap_PC_ReadToken(handle, &token)) { if (!trap_PC_ReadToken(handle, &token)) {
PC_SourceError(handle, "end of file inside menu\n"); PC_SourceError(handle, "end of file inside menu");
return qfalse; return qfalse;
} }