summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2007-01-09 21:25:13 +0000
committerDarkvater <darkvater@openttd.org>2007-01-09 21:25:13 +0000
commit6c3187213d174617ddbd89b2c70da86f71c5f906 (patch)
tree275ce019147376c73a22d33b7d42d17f53321b9f /src
parentfe1ac3c5d17a2017a92c0661eed136bd8812411e (diff)
downloadopenttd-6c3187213d174617ddbd89b2c70da86f71c5f906.tar.xz
(svn r8013) -Codechange (r6921, rUnknown): Show the error message of corrupt or missing (own) files
through a ShowInfo(F). This way windows users also see this message and bugs such as FS#528 will not happen anymore. Put ShowInfo(F) error output to stderr and not stdout.
Diffstat (limited to 'src')
-rw-r--r--src/gfxinit.c4
-rw-r--r--src/music_gui.c2
-rw-r--r--src/openttd.c3
-rw-r--r--src/settings.c4
-rw-r--r--src/unix.c2
-rw-r--r--src/win32.c2
6 files changed, 8 insertions, 9 deletions
diff --git a/src/gfxinit.c b/src/gfxinit.c
index cfc7adbc4..4b55ec904 100644
--- a/src/gfxinit.c
+++ b/src/gfxinit.c
@@ -174,11 +174,11 @@ void CheckExternalFiles(void)
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);
}
}
diff --git a/src/music_gui.c b/src/music_gui.c
index 84a6324c2..37cd3fa79 100644
--- a/src/music_gui.c
+++ b/src/music_gui.c
@@ -288,7 +288,7 @@ static void MusicTrackSelectionWndProc(Window *w, WindowEvent *e)
#if 0
case 12: // save
- ShowInfo("MusicTrackSelectionWndProc:save not implemented\n");
+ ShowInfo("MusicTrackSelectionWndProc:save not implemented");
break;
#endif
diff --git a/src/openttd.c b/src/openttd.c
index 2208fd3cf..a7604801a 100644
--- a/src/openttd.c
+++ b/src/openttd.c
@@ -165,8 +165,7 @@ static void showhelp(void)
" -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"
- " -x = Do not automatically save to config file on exit\n"
- "\n",
+ " -x = Do not automatically save to config file on exit\n",
lastof(buf)
);
diff --git a/src/settings.c b/src/settings.c
index b6d7fa895..2f509768f 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -247,7 +247,7 @@ static IniFile *ini_load(const char *filename)
// 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 @@ static IniFile *ini_load(const char *filename)
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);
}
}
diff --git a/src/unix.c b/src/unix.c
index 267351b00..4af6372b1 100644
--- a/src/unix.c
+++ b/src/unix.c
@@ -111,7 +111,7 @@ static void ChangeWorkingDirectory(char *exe)
void ShowInfo(const char *str)
{
- puts(str);
+ fprintf(stderr, str);
}
void ShowOSErrorBox(const char *buf)
diff --git a/src/win32.c b/src/win32.c
index da622d19d..f2fe5b110 100644
--- a/src/win32.c
+++ b/src/win32.c
@@ -836,7 +836,7 @@ void CreateConsole(void)
void ShowInfo(const char *str)
{
if (_has_console) {
- puts(str);
+ fprintf(stderr, str);
} else {
bool old;