(svn r8172) -Backport from trunk (r8013, r8134): 0.5
authorDarkvater
Wed, 17 Jan 2007 00:05:51 +0000
branch0.5
changeset 5408 1ed4ede56477
parent 5407 e354823cde11
child 5409 114f174beabc
(svn r8172) -Backport from trunk (r8013, r8134):
- Show error messages about our own data files as ShowInfo(F) and output console error to stderr and not stdout.
gfxinit.c
music_gui.c
openttd.c
settings.c
unix.c
win32.c
--- a/gfxinit.c	Tue Jan 16 23:59:03 2007 +0000
+++ b/gfxinit.c	Wed Jan 17 00:05:51 2007 +0000
@@ -174,11 +174,11 @@
 	for (i = 0; i < 3; i++) if (FileMD5(files_win.landscape[i], true)) win++;
 
 	if (!FileMD5(sample_cat_win, false) && !FileMD5(sample_cat_dos, false))
-		fprintf(stderr, "Your sample.cat file is corrupted or missing!\n");
+		ShowInfo("Your 'sample.cat' file is corrupted or missing!");
 
 	for (i = 0; i < lengthof(files_openttd); i++) {
 		if (!FileMD5(files_openttd[i], false)) {
-			fprintf(stderr, "Your %s file is corrupted or missing!\n", files_openttd[i].filename);
+			ShowInfoF("Your '%s' file is corrupted or missing!", files_openttd[i].filename);
 		}
 	}
 
--- a/music_gui.c	Tue Jan 16 23:59:03 2007 +0000
+++ b/music_gui.c	Wed Jan 17 00:05:51 2007 +0000
@@ -288,7 +288,7 @@
 
 #if 0
 		case 12: // save
-			ShowInfo("MusicTrackSelectionWndProc:save not implemented\n");
+			ShowInfo("MusicTrackSelectionWndProc:save not implemented");
 			break;
 #endif
 
--- a/openttd.c	Tue Jan 16 23:59:03 2007 +0000
+++ b/openttd.c	Wed Jan 17 00:05:51 2007 +0000
@@ -157,8 +157,7 @@
 #endif
 		"  -i                  = Force to use the DOS palette\n"
 		"                          (use this if you see a lot of pink)\n"
-		"  -c config_file      = Use 'config_file' instead of 'openttd.cfg'\n"
-		"\n",
+		"  -c config_file      = Use 'config_file' instead of 'openttd.cfg'\n",
 		lastof(buf)
 	);
 
--- a/settings.c	Tue Jan 16 23:59:03 2007 +0000
+++ b/settings.c	Wed Jan 17 00:05:51 2007 +0000
@@ -247,7 +247,7 @@
 		// it's a group?
 		if (s[0] == '[') {
 			if (e[-1] != ']') {
-				ShowInfoF("ini: invalid group name '%s'\n", buffer);
+				ShowInfoF("ini: invalid group name '%s'", buffer);
 			} else {
 				e--;
 			}
@@ -282,7 +282,7 @@
 			item->value = pool_strdup(&ini->pool, t, e - t);
 		} else {
 			// it's an orphan item
-			ShowInfoF("ini: '%s' outside of group\n", buffer);
+			ShowInfoF("ini: '%s' outside of group", buffer);
 		}
 	}
 
--- a/unix.c	Tue Jan 16 23:59:03 2007 +0000
+++ b/unix.c	Wed Jan 17 00:05:51 2007 +0000
@@ -111,7 +111,7 @@
 
 void ShowInfo(const char *str)
 {
-	puts(str);
+	fprintf(stderr, "%s\n", str);
 }
 
 void ShowOSErrorBox(const char *buf)
--- a/win32.c	Tue Jan 16 23:59:03 2007 +0000
+++ b/win32.c	Wed Jan 17 00:05:51 2007 +0000
@@ -836,7 +836,7 @@
 void ShowInfo(const char *str)
 {
 	if (_has_console) {
-		puts(str);
+		fprintf(stderr, "%s\n", str);
 	} else {
 		bool old;