[quake3-commits] r2283 - in trunk/code: botlib tools/asm ui

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jun 19 11:14:57 EDT 2012


Author: ztm
Date: 2012-06-19 11:14:57 -0400 (Tue, 19 Jun 2012)
New Revision: 2283

Modified:
   trunk/code/botlib/be_aas_bspq3.c
   trunk/code/botlib/be_aas_cluster.c
   trunk/code/botlib/be_aas_reach.c
   trunk/code/botlib/be_aas_route.c
   trunk/code/botlib/be_ai_char.c
   trunk/code/botlib/be_ai_chat.c
   trunk/code/botlib/be_ai_goal.c
   trunk/code/botlib/be_ai_weight.c
   trunk/code/botlib/l_precomp.c
   trunk/code/botlib/l_script.c
   trunk/code/tools/asm/q3asm.c
   trunk/code/ui/ui_shared.c
Log:
more '\n' business

>From /dev/humancontroller.

Modified: trunk/code/botlib/be_aas_bspq3.c
===================================================================
--- trunk/code/botlib/be_aas_bspq3.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/be_aas_bspq3.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -392,7 +392,7 @@
 	{
 		if (strcmp(token.string, "{"))
 		{
-			ScriptError(script, "invalid %s\n", token.string);
+			ScriptError(script, "invalid %s", token.string);
 			AAS_FreeBSPEntities();
 			FreeScript(script);
 			return;
@@ -413,7 +413,7 @@
 			ent->epairs = epair;
 			if (token.type != TT_STRING)
 			{
-				ScriptError(script, "invalid %s\n", token.string);
+				ScriptError(script, "invalid %s", token.string);
 				AAS_FreeBSPEntities();
 				FreeScript(script);
 				return;
@@ -433,7 +433,7 @@
 		} //end while
 		if (strcmp(token.string, "}"))
 		{
-			ScriptError(script, "missing }\n");
+			ScriptError(script, "missing }");
 			AAS_FreeBSPEntities();
 			FreeScript(script);
 			return;

Modified: trunk/code/botlib/be_aas_cluster.c
===================================================================
--- trunk/code/botlib/be_aas_cluster.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/be_aas_cluster.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -130,7 +130,7 @@
 	//
 	if (portalnum == aasworld.numportals)
 	{
-		AAS_Error("no portal of area %d", areanum);
+		AAS_Error("no portal of area %d\n", areanum);
 		return qtrue;
 	} //end if
 	//
@@ -157,7 +157,7 @@
 	} //end else
 	if (aasworld.portalindexsize >= AAS_MAX_PORTALINDEXSIZE)
 	{
-		AAS_Error("AAS_MAX_PORTALINDEXSIZE");
+		AAS_Error("AAS_MAX_PORTALINDEXSIZE\n");
 		return qtrue;
 	} //end if
 	//set the area cluster number to the negative portal number
@@ -184,7 +184,7 @@
 	//
 	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;
 	} //end if
 	//if the area is already part of a cluster
@@ -194,7 +194,7 @@
 		//
 		//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);
 		return qfalse;
 	} //end if
@@ -410,7 +410,7 @@
 			continue;
 		if (aasworld.numclusters >= AAS_MAX_CLUSTERS)
 		{
-			AAS_Error("AAS_MAX_CLUSTERS");
+			AAS_Error("AAS_MAX_CLUSTERS\n");
 			return qfalse;
 		} //end if
 		cluster = &aasworld.clusters[aasworld.numclusters];
@@ -449,7 +449,7 @@
 		{
 			if (aasworld.numportals >= AAS_MAX_PORTALS)
 			{
-				AAS_Error("AAS_MAX_PORTALS");
+				AAS_Error("AAS_MAX_PORTALS\n");
 				return;
 			} //end if
 			portal = &aasworld.portals[aasworld.numportals];
@@ -776,7 +776,7 @@
 			{
 				if (numareas >= MAX_PORTALAREAS)
 				{
-					AAS_Error("MAX_PORTALAREAS");
+					AAS_Error("MAX_PORTALAREAS\n");
 					return numareas;
 				} //end if
 				numareas = AAS_GetAdjacentAreasWithLessPresenceTypes_r(areanums, numareas, otherareanum);

Modified: trunk/code/botlib/be_aas_reach.c
===================================================================
--- trunk/code/botlib/be_aas_reach.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/be_aas_reach.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -490,7 +490,7 @@
 
 	if (!nextreachability) return NULL;
 	//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;
 	nextreachability = nextreachability->next;
@@ -523,7 +523,7 @@
 {
 	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;
 	} //end if
 	return aasworld.areasettings[areanum].numreachableareas;

Modified: trunk/code/botlib/be_aas_route.c
===================================================================
--- trunk/code/botlib/be_aas_route.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/be_aas_route.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -1074,7 +1074,7 @@
 	} //end if
 	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;
 	} //end if
 	if (routecacheheader.numareas != aasworld.numareas)

Modified: trunk/code/botlib/be_ai_char.c
===================================================================
--- trunk/code/botlib/be_ai_char.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/be_ai_char.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -256,7 +256,7 @@
 					if (!strcmp(token.string, "}")) break;
 					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);
 						BotFreeCharacterStrings(ch);
 						FreeMemory(ch);
@@ -265,7 +265,7 @@
 					index = token.intvalue;
 					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);
 						BotFreeCharacterStrings(ch);
 						FreeMemory(ch);
@@ -273,7 +273,7 @@
 					} //end if
 					if (ch->c[index].type)
 					{
-						SourceError(source, "characteristic %d already initialized\n", index);
+						SourceError(source, "characteristic %d already initialized", index);
 						FreeSource(source);
 						BotFreeCharacterStrings(ch);
 						FreeMemory(ch);
@@ -308,7 +308,7 @@
 					} //end else if
 					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);
 						BotFreeCharacterStrings(ch);
 						FreeMemory(ch);
@@ -336,7 +336,7 @@
 		} //end if
 		else
 		{
-			SourceError(source, "unknown definition %s\n", token.string);
+			SourceError(source, "unknown definition %s", token.string);
 			FreeSource(source);
 			BotFreeCharacterStrings(ch);
 			FreeMemory(ch);

Modified: trunk/code/botlib/be_ai_chat.c
===================================================================
--- trunk/code/botlib/be_ai_chat.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/be_ai_chat.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -739,7 +739,7 @@
 					} //end while
 					if (numsynonyms < 2)
 					{
-						SourceError(source, "synonym must have at least two entries\n");
+						SourceError(source, "synonym must have at least two entries");
 						FreeSource(source);
 						return NULL;
 					} //end if
@@ -891,7 +891,7 @@
 			StripDoubleQuotes(token.string);
 			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;
 			} //end if
 			strcat(ptr, token.string);
@@ -901,7 +901,7 @@
 		{
 			if (strlen(ptr) + 7 > MAX_MESSAGE_SIZE)
 			{
-				SourceError(source, "chat message too long\n");
+				SourceError(source, "chat message too long");
 				return qfalse;
 			} //end if
 			sprintf(&ptr[strlen(ptr)], "%cv%ld%c", ESCAPE_CHAR, token.intvalue, ESCAPE_CHAR);
@@ -911,14 +911,14 @@
 		{
 			if (strlen(ptr) + 7 > MAX_MESSAGE_SIZE)
 			{
-				SourceError(source, "chat message too long\n");
+				SourceError(source, "chat message too long");
 				return qfalse;
 			} //end if
 			sprintf(&ptr[strlen(ptr)], "%cr%s%c", ESCAPE_CHAR, token.string, ESCAPE_CHAR);
 		} //end else if
 		else
 		{
-			SourceError(source, "unknown message component %s\n", token.string);
+			SourceError(source, "unknown message component %s", token.string);
 			return qfalse;
 		} //end else
 		if (PC_CheckTokenString(source, ";")) break;
@@ -1175,14 +1175,14 @@
 		{
 			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);
 				BotFreeMatchPieces(firstpiece);
 				return NULL;
 			} //end if
 			if (lastwasvariable)
 			{
-				SourceError(source, "not allowed to have adjacent variables\n");
+				SourceError(source, "not allowed to have adjacent variables");
 				FreeSource(source);
 				BotFreeMatchPieces(firstpiece);
 				return NULL;
@@ -1238,7 +1238,7 @@
 		} //end if
 		else
 		{
-			SourceError(source, "invalid token %s\n", token.string);
+			SourceError(source, "invalid token %s", token.string);
 			FreeSource(source);
 			BotFreeMatchPieces(firstpiece);
 			return NULL;
@@ -1298,7 +1298,7 @@
 	{
 		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);
 			FreeSource(source);
 			return NULL;
@@ -2101,7 +2101,7 @@
 						if (!strcmp(token.string, "}")) break;
 						if (strcmp(token.string, "type"))
 						{
-							SourceError(source, "expected type found %s\n", token.string);
+							SourceError(source, "expected type found %s", token.string);
 							FreeSource(source);
 							return NULL;
 						} //end if
@@ -2172,7 +2172,7 @@
 			} //end if
 			else
 			{
-				SourceError(source, "unknown definition %s\n", token.string);
+				SourceError(source, "unknown definition %s", token.string);
 				FreeSource(source);
 				return NULL;
 			} //end else

Modified: trunk/code/botlib/be_ai_goal.c
===================================================================
--- trunk/code/botlib/be_ai_goal.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/be_ai_goal.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -300,7 +300,7 @@
 		{
 			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);
 				FreeSource(source);
 				return NULL;
@@ -326,7 +326,7 @@
 		} //end if
 		else
 		{
-			SourceError(source, "unknown definition %s\n", token.string);
+			SourceError(source, "unknown definition %s", token.string);
 			FreeMemory(ic);
 			FreeSource(source);
 			return NULL;

Modified: trunk/code/botlib/be_ai_weight.c
===================================================================
--- trunk/code/botlib/be_ai_weight.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/be_ai_weight.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -63,18 +63,18 @@
 	if (!PC_ExpectAnyToken(source, &token)) return qfalse;
 	if (!strcmp(token.string, "-"))
 	{
-		SourceWarning(source, "negative value set to zero\n");
+		SourceWarning(source, "negative value set to zero");
 
 		if(!PC_ExpectAnyToken(source, &token))
 		{
-			SourceError(source, "Missing return value\n");
+			SourceError(source, "Missing return value");
 			return qfalse;
 		}
 	}
 
 	if (token.type != TT_NUMBER)
 	{
-		SourceError(source, "invalid return value %s\n", token.string);
+		SourceError(source, "invalid return value %s", token.string);
 		return qfalse;
 	}
 	
@@ -186,7 +186,7 @@
 			{
 				if (founddefault)
 				{
-					SourceError(source, "switch already has a default\n");
+					SourceError(source, "switch already has a default");
 					FreeFuzzySeperators_r(firstfs);
 					return NULL;
 				} //end if
@@ -236,7 +236,7 @@
 			} //end else if
 			else
 			{
-				SourceError(source, "invalid name %s\n", token.string);
+				SourceError(source, "invalid name %s", token.string);
 				return NULL;
 			} //end else
 			if (newindent)
@@ -251,7 +251,7 @@
 		else
 		{
 			FreeFuzzySeperators_r(firstfs);
-			SourceError(source, "invalid name %s\n", token.string);
+			SourceError(source, "invalid name %s", token.string);
 			return NULL;
 		} //end else
 		if (!PC_ExpectAnyToken(source, &token))
@@ -263,7 +263,7 @@
 	//
 	if (!founddefault)
 	{
-		SourceWarning(source, "switch without default\n");
+		SourceWarning(source, "switch without default");
 		fs = (fuzzyseperator_t *) GetClearedMemory(sizeof(fuzzyseperator_t));
 		fs->index = index;
 		fs->value = MAX_INVENTORYVALUE;
@@ -342,7 +342,7 @@
 		{
 			if (config->numweights >= MAX_WEIGHTS)
 			{
-				SourceWarning(source, "too many fuzzy weights\n");
+				SourceWarning(source, "too many fuzzy weights");
 				break;
 			} //end if
 			if (!PC_ExpectTokenType(source, TT_STRING, 0, &token))
@@ -400,7 +400,7 @@
 			} //end else if
 			else
 			{
-				SourceError(source, "invalid name %s\n", token.string);
+				SourceError(source, "invalid name %s", token.string);
 				FreeWeightConfig(config);
 				FreeSource(source);
 				return NULL;
@@ -418,7 +418,7 @@
 		} //end if
 		else
 		{
-			SourceError(source, "invalid name %s\n", token.string);
+			SourceError(source, "invalid name %s", token.string);
 			FreeWeightConfig(config);
 			FreeSource(source);
 			return NULL;

Modified: trunk/code/botlib/l_precomp.c
===================================================================
--- trunk/code/botlib/l_precomp.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/l_precomp.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -269,7 +269,7 @@
 	if (!t)
 	{
 #ifdef BSPC
-		Error("out of token space\n");
+		Error("out of token space");
 #else
 		Com_Error(ERR_FATAL, "out of token space");
 #endif
@@ -1666,7 +1666,7 @@
 #define MAX_OPERATORS	64
 #define AllocValue(val)									\
 	if (numvalues >= MAX_VALUES) {						\
-		SourceError(source, "out of value space\n");		\
+		SourceError(source, "out of value space");		\
 		error = 1;										\
 		break;											\
 	}													\
@@ -1676,7 +1676,7 @@
 //
 #define AllocOperator(op)								\
 	if (numoperators >= MAX_OPERATORS) {				\
-		SourceError(source, "out of operator space\n");	\
+		SourceError(source, "out of operator space");	\
 		error = 1;										\
 		break;											\
 	}													\
@@ -1838,7 +1838,7 @@
 						t->subtype == P_BIN_AND || t->subtype == P_BIN_OR ||
 						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;
 						break;
 					} //end if
@@ -2005,7 +2005,7 @@
 									v1->floatvalue *= v2->floatvalue; break;
 			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;
 										break;
 									}
@@ -2013,7 +2013,7 @@
 									v1->floatvalue /= v2->floatvalue; break;
 			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;
 										break;
 									}
@@ -2750,7 +2750,7 @@
 					token->string[strlen(token->string)-1] = '\0';
 					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;
 					}
 					strcat(token->string, newtoken.string+1);

Modified: trunk/code/botlib/l_script.c
===================================================================
--- trunk/code/botlib/l_script.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/botlib/l_script.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -1158,7 +1158,7 @@
 	{
 		if(!PS_ExpectAnyToken(script, &token))
 		{
-			ScriptError(script, "Missing float value\n");
+			ScriptError(script, "Missing float value");
 			return 0;
 		}
 
@@ -1167,7 +1167,7 @@
 	
 	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;
 	}
 
@@ -1189,7 +1189,7 @@
 	{
 		if(!PS_ExpectAnyToken(script, &token))
 		{
-			ScriptError(script, "Missing integer value\n");
+			ScriptError(script, "Missing integer value");
 			return 0;
 		}
 
@@ -1198,7 +1198,7 @@
 
 	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;
 	}
 	

Modified: trunk/code/tools/asm/q3asm.c
===================================================================
--- trunk/code/tools/asm/q3asm.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/tools/asm/q3asm.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -1622,7 +1622,7 @@
 	}
 	// In some case it Segfault without this check
 	if ( numAsmFiles == 0 ) {
-		Error( "No file to assemble\n" );
+		Error( "No file to assemble" );
 	}
 
 	InitTables();

Modified: trunk/code/ui/ui_shared.c
===================================================================
--- trunk/code/ui/ui_shared.c	2012-06-19 14:57:51 UTC (rev 2282)
+++ trunk/code/ui/ui_shared.c	2012-06-19 15:14:57 UTC (rev 2283)
@@ -345,7 +345,7 @@
 		negative = qtrue;
 	}
 	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;
 	}
 	if (negative)
@@ -425,7 +425,7 @@
 		negative = qtrue;
 	}
 	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;
 	}
 	*i = token.intvalue;
@@ -4911,7 +4911,7 @@
 	pass = 0;
 	while ( 1 ) {
 		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;
 		}
 
@@ -4958,7 +4958,7 @@
 
 	while ( 1 ) {
 		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;
 		}
 
@@ -5142,7 +5142,7 @@
 	}
 	while ( 1 ) {
 		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;
 		}
 
@@ -5552,7 +5552,7 @@
 
 		memset(&token, 0, sizeof(pc_token_t));
 		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;
 		}
 



More information about the quake3-commits mailing list