Mail Archives: djgpp-workers/1998/11/08/07:56:11
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)
{
- Raw text -