/* print the hexadecimal identifier for the current host
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 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
#endif
#include "system.h"
+#include "closeout.h"
#include "long-options.h"
#include "error.h"
id = gethostid ();
printf ("%lx\n", id);
- if (fclose (stdout) == EOF)
- error (EXIT_FAILURE, errno, _("write error"));
+ close_stdout ();
exit (EXIT_SUCCESS);
}
/* tee - read from standard input and write to standard output and files.
- Copyright (C) 85,90,91,92,93,94,95,96,1997 Free Software Foundation, Inc.
+ Copyright (C) 85,1990-1999 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
#include <getopt.h>
#include "system.h"
+#include "closeout.h"
#include "error.h"
int full_write ();
errs = tee (argc - optind, (const char **) &argv[optind]);
if (close (0) != 0)
error (1, errno, _("standard input"));
- if (close (1) != 0)
- error (1, errno, _("standard output"));
+
+ close_stdout ();
+
exit (errs);
}