From fe52d65af0fcfdc89b67442d4516449eec41d546 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 19 Jul 2003 08:16:38 +0000 Subject: [PATCH] Include "exitfail.h". (main): Set exit_failure rather than calling close_stdout_set_status. --- src/date.c | 3 ++- src/sort.c | 2 +- src/tty.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/date.c b/src/date.c index 10e91914c3..8f52f3708d 100644 --- a/src/date.c +++ b/src/date.c @@ -29,6 +29,7 @@ #include "argmatch.h" #include "closeout.h" #include "error.h" +#include "exitfail.h" #include "getdate.h" #include "getline.h" #include "posixtm.h" @@ -309,7 +310,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - close_stdout_set_status (2); + exit_failure = 2; atexit (close_stdout); while ((optc = getopt_long (argc, argv, short_options, long_options, NULL)) diff --git a/src/sort.c b/src/sort.c index 2d90724ee4..6316759249 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2183,8 +2183,8 @@ main (int argc, char **argv) atexit (cleanup); + exit_failure = SORT_FAILURE; atexit (close_stdout); - close_stdout_set_status (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); #if HAVE_NL_LANGINFO diff --git a/src/tty.c b/src/tty.c index a14315f583..555fe19cfb 100644 --- a/src/tty.c +++ b/src/tty.c @@ -29,6 +29,7 @@ #include "system.h" #include "closeout.h" +#include "exitfail.h" #include "error.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -84,7 +85,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - close_stdout_set_status (3); + exit_failure = 3; atexit (close_stdout); silent = 0; -- 2.47.2