From 151b60fca26fe291250ddbb4257fe16114f2f2cd Mon Sep 17 00:00:00 2001 From: Ivy Foster Date: Tue, 26 Apr 2016 22:18:15 -0500 Subject: [PATCH] Print errors to stdout in curses interface --- src/curses/ux_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.34.1