Date: Sun, 8 Nov 1998 14:54:43 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp-workers AT delorie DOT com Subject: Minor bugfix for error messages in redir Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com This patch makes error messages from redir to look nicer, especially when several are printed in a row: *** src/utils/redir.c~0 Sun Jul 26 13:34:04 1998 --- src/utils/redir.c Fri Nov 6 19:17:30 1998 *************** static void *** 89,95 **** fatal(const char *msg, const char *fn) { fprintf(std_err, msg, fn); ! fprintf(std_err, "The error was: %s\n", strerror(errno)); exit(1); } --- 89,95 ---- fatal(const char *msg, const char *fn) { fprintf(std_err, msg, fn); ! fprintf(std_err, "\nThe error was: %s\n", strerror(errno)); exit(1); } *************** main(int argc, char **argv) *** 305,311 **** if (argc <= 1) { errno = EINVAL; ! fatal("Missing program name; aborting\n", ""); } /* We do NOT want `redir' to abort if the child is interrupted --- 305,311 ---- if (argc <= 1) { errno = EINVAL; ! fatal("Missing program name; aborting", ""); } /* We do NOT want `redir' to abort if the child is interrupted *************** main(int argc, char **argv) *** 319,325 **** __djgpp_exception_toggle(); if (rv < 0) ! fatal("Error attempting to run program %s\n", argv[1]); if (display_exit_code) { --- 319,325 ---- __djgpp_exception_toggle(); if (rv < 0) ! fatal("Error attempting to run program %s", argv[1]); if (display_exit_code) {