Age | Commit message (Collapse) | Author |
|
|
|
xrealloc, and xcalloc return values and of xrealloc's first argument.
|
|
|
|
Include strftime.h instead.
|
|
rather than 0..59 -- to accommodate the occasional positive leap second.
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
`#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
|
|
|
|
|
|
empty in many locales. From matthew arnison.
|
|
(strftime, time, stime): Remove declarations; no longer needed.
(usage): Document %N.
(main): Use gettime rather than time to get the time of day,
so that we can get fractional times.
Similarly for settime and stime, so that we can set fractional times
(though this currently is not available to the user since we don't
parse fractional times; add FIXMES for that).
Check for gettime failures; e.g. this can occur if it
is past 2038 and we are a 32-bit app running on a 64-bit OS.
Get fractional part of file time stamps.
Do not falsely report failures just because time_t happens to be -1
(e.g. a file time stamp 1 second before the epoch).
(show_date): 2nd arg is now struct timespec, not time_t.
All uses changed. Use nstrftime rather than strftime, so that
we can format fractional seconds.
|
|
|
|
version you want the utilities to conform to. Remove warnings about
failure to conform to a future POSIX version.
(ISO_8601_OPTION): Remove; no longer needed.
All uses changed to back to the corresponding short options.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(usage): Document only the intersection of the
old and new behaviors, to encourage portability.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
for support of obsolete "-DIGITS" option syntax in nice, and
which prohibits options with optional arguments like date's
-I option.
(ISO_8601_OPTION): New enum value.
(long_options): Use it.
(short_options): New constant.
(usage): Document the change.
(main): Conform to POSIX 1003.1-2001 if
POSIX2_VERSION says to, otherwise warn of obsolete usage if
OBSOLETE_OPTION_WARNINGS is nonzero and if not POSIXLY_CORRECT.
|
|
|
|
In particular, POSIX.2 is now obsolete.
|
|
instead of hard-coding --help and --version descriptions.
Split --help output into smaller pieces.
Use fputs, not printf.
|
|
|
|
(show_date) [--rfc-822]: Set LC_ALL=C just before
calling strftime and restore it just afterwards.
Suggestion from Ulrich Drepper.
|
|
Set only LC_TYPE to the "C" locale. Setting LC_ALL is overkill,
and would have unwanted side effects if there is an error message.
|
|
include the first offending argument in the diagnostic.
Suggestion from Karl Berry.
|
|
|
|
with a format string. Reported by Jochen Hein.
|
|
format string must not be translatable via _(). From Paul Eggert.
|
|
in ISO format in the description of %s. Suggestion from Karl Berry.
|
|
(main): The -u option now just sets TZ; it doesn't do anything else.
(show_date): Do not do anything special if -u is set.
This affects the behavior of the -I and -R options.
|
|
broke "date -u MMDDhhmm" and it wasn't documented.
This reverts to the behavior of the 1996-01-03 patch.
(TZ_UTC0, MAYBE_SET_TZ_UTC0, set_tz): Remove.
(batch_convert): Don't futz with TZ.
(main): -u now parses all dates as UTC, not just some.
|
|
(also making it match the texinfo documentation).
|
|
|
|
since that didn't cover --version output.
(main): Instead, call close_stdout_set_status and arrange to
call close_stdout via atexit.
|
|
|
|
required by rfc822. Before, in the de_DE locale, date would
print the German weekday and month abbreviations.
|
|
(DATE_FMT_LANGINFO): New macro.
(show_date): Use it to get the locale-specific default format for
"date" if it exists.
|
|
From Wolfram Kleff.
|
|
|
|
|
|
From Ken Pizzini.
|
|
to be a static one. For SunOS4's cc.
|
|
|
|
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.
|
|
|
|
in case the argument string contains a `%'.
|
|
[long_options]: Remove the "help" and "version" entries.
Remove declarations of show_help and show_version.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
|
|
Move function be the first in the file.
|
|
|
|
From Andreas Schwab.
|
|
|
|
|
|
|