mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-07 12:59:43 +01:00
(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.
This commit is contained in:
parent
b57b2224e9
commit
25059d28df
@ -174,11 +174,11 @@ void CheckExternalFiles(void)
|
|||||||
for (i = 0; i < 3; i++) if (FileMD5(files_win.landscape[i], true)) win++;
|
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))
|
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++) {
|
for (i = 0; i < lengthof(files_openttd); i++) {
|
||||||
if (!FileMD5(files_openttd[i], false)) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ static void MusicTrackSelectionWndProc(Window *w, WindowEvent *e)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
case 12: // save
|
case 12: // save
|
||||||
ShowInfo("MusicTrackSelectionWndProc:save not implemented\n");
|
ShowInfo("MusicTrackSelectionWndProc:save not implemented");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -157,8 +157,7 @@ static void showhelp(void)
|
|||||||
#endif
|
#endif
|
||||||
" -i = Force to use the DOS palette\n"
|
" -i = Force to use the DOS palette\n"
|
||||||
" (use this if you see a lot of pink)\n"
|
" (use this if you see a lot of pink)\n"
|
||||||
" -c config_file = Use 'config_file' instead of 'openttd.cfg'\n"
|
" -c config_file = Use 'config_file' instead of 'openttd.cfg'\n",
|
||||||
"\n",
|
|
||||||
lastof(buf)
|
lastof(buf)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ static IniFile *ini_load(const char *filename)
|
|||||||
// it's a group?
|
// it's a group?
|
||||||
if (s[0] == '[') {
|
if (s[0] == '[') {
|
||||||
if (e[-1] != ']') {
|
if (e[-1] != ']') {
|
||||||
ShowInfoF("ini: invalid group name '%s'\n", buffer);
|
ShowInfoF("ini: invalid group name '%s'", buffer);
|
||||||
} else {
|
} else {
|
||||||
e--;
|
e--;
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@ static IniFile *ini_load(const char *filename)
|
|||||||
item->value = pool_strdup(&ini->pool, t, e - t);
|
item->value = pool_strdup(&ini->pool, t, e - t);
|
||||||
} else {
|
} else {
|
||||||
// it's an orphan item
|
// it's an orphan item
|
||||||
ShowInfoF("ini: '%s' outside of group\n", buffer);
|
ShowInfoF("ini: '%s' outside of group", buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
unix.c
2
unix.c
@ -111,7 +111,7 @@ static void ChangeWorkingDirectory(char *exe)
|
|||||||
|
|
||||||
void ShowInfo(const char *str)
|
void ShowInfo(const char *str)
|
||||||
{
|
{
|
||||||
puts(str);
|
fprintf(stderr, "%s\n", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowOSErrorBox(const char *buf)
|
void ShowOSErrorBox(const char *buf)
|
||||||
|
Loading…
Reference in New Issue
Block a user