diff options
author | Jim Meyering <jim@meyering.net> | 2000-05-07 14:51:07 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-05-07 14:51:07 +0000 |
commit | d3683509b3953beb014e540f6d6194658ede1dea (patch) | |
tree | e15b956e652d4ded7d42d9e84665627b486877b5 | |
parent | ddb8aa8b9f3d8bfc8d86cc69beacf628b42a3ce3 (diff) | |
download | coreutils-d3683509b3953beb014e540f6d6194658ede1dea.tar.xz |
Include "closeout.h".
(main): Call atexit with close_stdout.
-rw-r--r-- | src/dirname.c | 5 | ||||
-rw-r--r-- | src/echo.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/dirname.c b/src/dirname.c index fa584381c..cfe7052d1 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -1,5 +1,5 @@ /* dirname -- strip filename suffix from pathname - Copyright (C) 1990-1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1990-1997, 1999, 2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ #include "system.h" #include "long-options.h" #include "error.h" +#include "closeout.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "dirname" @@ -71,6 +72,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS, usage); /* The above handles --help and --version. diff --git a/src/echo.c b/src/echo.c index bbb37f4f1..deb22bda1 100644 --- a/src/echo.c +++ b/src/echo.c @@ -1,5 +1,5 @@ /* echo.c, derived from code echo.c in Bash. - Copyright (C) 87,89, 1991-1997, 1999 Free Software Foundation, Inc. + Copyright (C) 87,89, 1991-1997, 1999, 2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include <stdio.h> #include <sys/types.h> #include "system.h" +#include "closeout.h" #include "long-options.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -117,6 +118,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + /* Don't recognize --help or --version if POSIXLY_CORRECT is set. */ if (getenv ("POSIXLY_CORRECT") == NULL) parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, |