Fix empdump error messages to include program name

This commit is contained in:
Markus Armbruster 2008-03-17 19:55:42 +01:00
parent 4525ae2d17
commit b7c8a2e03f

View file

@ -108,8 +108,8 @@ main(int argc, char *argv[])
if (import) { if (import) {
impf = fopen(import, "r"); impf = fopen(import, "r");
if (!impf) { if (!impf) {
fprintf(stderr, "Cant open %s for reading (%s)\n", fprintf(stderr, "%s: Can't open %s for reading (%s)\n",
import, strerror(errno)); argv[0], import, strerror(errno));
exit(1); exit(1);
} }
} else } else
@ -126,8 +126,8 @@ main(int argc, char *argv[])
if (read_custom_tables() < 0) if (read_custom_tables() < 0)
exit(1); exit(1);
if (chdir(gamedir)) { if (chdir(gamedir)) {
fprintf(stderr, "Can't chdir to %s (%s)\n", fprintf(stderr, "%s: Can't chdir to %s (%s)\n",
gamedir, strerror(errno)); argv[0], gamedir, strerror(errno));
exit(1); exit(1);
} }
global_init(); global_init();