From: Ivy Foster Date: Wed, 27 Apr 2016 03:18:15 +0000 (-0500) Subject: Print errors to stdout in curses interface X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=151b60fca26fe291250ddbb4257fe16114f2f2cd;p=liskon_frotz.git Print errors to stdout in curses interface --- diff --git a/src/curses/ux_init.c b/src/curses/ux_init.c index 6f99e63..d7b87c0 100644 --- a/src/curses/ux_init.c +++ b/src/curses/ux_init.c @@ -160,7 +160,7 @@ void os_process_arguments (int argc, char *argv[]) #ifndef WIN32 if ((getuid() == 0) || (geteuid() == 0)) { - printf("I won't run as root!\n"); + fputs("I won't run as root!\n", stderr); exit(1); } #endif @@ -172,7 +172,7 @@ void os_process_arguments (int argc, char *argv[]) #endif if ((home = getenv(HOMEDIR)) == NULL) { - printf("Hard drive on fire!\n"); + fputs("Hard drive on fire!\n", stderr); exit(1); } @@ -364,7 +364,7 @@ void os_process_arguments (int argc, char *argv[]) if (strncmp(basename(f_setup.story_file), basename(u_setup.blorb_file), 55)) { - fprintf(stderr, "Story file %s is not a blorb file.\n", f_setup.story_file); + return; } else if (!(blorbfile = fopen(u_setup.blorb_file, "rb"))) { fprintf(stderr, "Error: Cannot read blorb file %s.\n", u_setup.blorb_file); } else if (bb_create_map(blorbfile, &blorb_map) != bb_err_None) {