/* date - print or set the system date and time
- Copyright (C) 1989-2003 Free Software Foundation, Inc.
+ Copyright (C) 1989-2004 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 "system.h"
#include "argmatch.h"
#include "error.h"
-#include "exitfail.h"
#include "getdate.h"
#include "getline.h"
#include "posixtm.h"
void
usage (int status)
{
- if (status != 0)
+ if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
}
if (fclose (in_stream) == EOF)
- error (2, errno, "%s", quote (input_filename));
+ error (EXIT_FAILURE, errno, "%s", quote (input_filename));
if (line != NULL)
free (line);
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- exit_failure = 2;
atexit (close_stdout);
while ((optc = getopt_long (argc, argv, short_options, long_options, NULL))
show_date (format, when);
}
- exit (status);
+ exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
/* Display the date and/or time in WHEN according to the format specified