(svn r7048) -Cleanup: DEBUG doesn't need a newline character, use DEBUG instead of printf and the
authorDarkvater
Fri, 03 Nov 2006 01:18:40 +0000
changeset 5015 63f05008fabe
parent 5014 27054c09dc66
child 5016 abe2d67ce392
(svn r7048) -Cleanup: DEBUG doesn't need a newline character, use DEBUG instead of printf and the
verb is build/built/built not build/*/build or build/*/builded.
ai/trolly/build.c
ai/trolly/trolly.c
openttd.c
rail_cmd.c
saveload.c
video/sdl_v.c
yapf/yapf_costcache.hpp
--- a/ai/trolly/build.c	Fri Nov 03 00:48:03 2006 +0000
+++ b/ai/trolly/build.c	Fri Nov 03 01:18:40 2006 +0000
@@ -166,7 +166,7 @@
 			PathFinderInfo->position++;
 			// TODO: problems!
 			if (CmdFailed(cost)) {
-				DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: tunnel could not be build!");
+				DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: tunnel could not be built!");
 				return 0;
 			}
 			return cost;
@@ -177,7 +177,7 @@
 			PathFinderInfo->position++;
 			// TODO: problems!
 			if (CmdFailed(cost)) {
-				DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: bridge could not be build!");
+				DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: bridge could not be built!");
 				return 0;
 			}
 			return cost;
@@ -201,7 +201,7 @@
 					// Currently, we ignore CMD_ERRORs!
 					if (CmdFailed(res) && flag == DC_EXEC && !IsTileType(route[part], MP_STREET) && !EnsureNoVehicle(route[part])) {
 						// Problem.. let's just abort it all!
-						DEBUG(ai,0)("Darn, the route could not be builded.. aborting!");
+						DEBUG(ai,0)("Darn, the route could not be built.. aborting!");
 						p->ainew.state = AI_STATE_NOTHING;
 						return 0;
 					}
--- a/ai/trolly/trolly.c	Fri Nov 03 00:48:03 2006 +0000
+++ b/ai/trolly/trolly.c	Fri Nov 03 01:18:40 2006 +0000
@@ -993,7 +993,7 @@
 		p->ainew.state = AI_STATE_BUILD_PATH;
 	}
 	if (CmdFailed(res)) {
-		DEBUG(ai,0)("[AiNew - BuildStation] Strange but true... station can not be build!");
+		DEBUG(ai,0)("[AiNew - BuildStation] Strange but true... station can not be built!");
 		p->ainew.state = AI_STATE_NOTHING;
 		// If the first station _was_ build, destroy it
 		if (p->ainew.temp != 0)
@@ -1122,7 +1122,7 @@
 
 	res = AiNew_Build_Depot(p, p->ainew.depot_tile, p->ainew.depot_direction, DC_EXEC);
 	if (CmdFailed(res)) {
-		DEBUG(ai,0)("[AiNew - BuildDepot] Strange but true... depot can not be build!");
+		DEBUG(ai,0)("[AiNew - BuildDepot] Strange but true... depot can not be built!");
 		p->ainew.state = AI_STATE_NOTHING;
 		return;
 	}
--- a/openttd.c	Fri Nov 03 00:48:03 2006 +0000
+++ b/openttd.c	Fri Nov 03 01:18:40 2006 +0000
@@ -641,7 +641,7 @@
 
 	// invalid type
 	if (_file_to_saveload.mode == SL_INVALID) {
-		printf("Savegame is obsolete or invalid format: %s\n", _file_to_saveload.name);
+		DEBUG(misc, 0) ("[Sl] Savegame is obsolete or invalid format: %s", _file_to_saveload.name);
 		ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0);
 		_game_mode = GM_MENU;
 		return;
--- a/rail_cmd.c	Fri Nov 03 00:48:03 2006 +0000
+++ b/rail_cmd.c	Fri Nov 03 01:18:40 2006 +0000
@@ -1655,7 +1655,7 @@
 				ssd->next_dir[ssd->cur_stack] = _dir_from_track[ssd->bit[i]];
 				ssd->cur_stack++;
 			} else {
-				printf("NUM_SSD_STACK too small\n"); /// @todo WTF is this???
+				DEBUG(misc, 0) ("NUM_SSD_STACK too small"); /// @todo WTF is this???
 			}
 		}
 
--- a/saveload.c	Fri Nov 03 00:48:03 2006 +0000
+++ b/saveload.c	Fri Nov 03 01:18:40 2006 +0000
@@ -1629,7 +1629,7 @@
 
 	f = fopen(file, "rb");
 	if (fread(&hdr, sizeof(hdr), 1, f) != 1) {
-		printf("Savegame is obsolete or invalid format.\n");
+		DEBUG(misc, 0) ("[Sl] Savegame is obsolete or invalid format");
 		mode = SL_LOAD; // don't try to get filename, just show name as it is written
 	} else {
 		// see if we have any loader for this type.
--- a/video/sdl_v.c	Fri Nov 03 00:48:03 2006 +0000
+++ b/video/sdl_v.c	Fri Nov 03 01:18:40 2006 +0000
@@ -296,8 +296,8 @@
 	if (sym->mod & KMOD_ALT)   key |= WKC_ALT;
 	// these two lines really help porting hotkey combos. Uncomment to use -- Bjarni
 #if 0
-	printf("scancode character pressed %d\n", sym->scancode);
-	printf("unicode character pressed %d\n", sym->unicode);
+	DEBUG(driver, 0) ("scancode character pressed %d", sym->scancode);
+	DEBUG(driver, 0) ("unicode character pressed %d", sym->unicode);
 #endif
 	return (key << 16) + sym->unicode;
 }
--- a/yapf/yapf_costcache.hpp	Fri Nov 03 00:48:03 2006 +0000
+++ b/yapf/yapf_costcache.hpp	Fri Nov 03 01:18:40 2006 +0000
@@ -153,7 +153,7 @@
 		// some statistics
 		if (last_date != _date) {
 			last_date = _date;
-			DEBUG(yapf, 1)("pf time today:%5d ms\n", _total_pf_time_us / 1000);
+			DEBUG(yapf, 1) ("pf time today:%5d ms", _total_pf_time_us / 1000);
 			_total_pf_time_us = 0;
 		}