Commit Graph
24019 Commits
Author SHA1 Message Date
Jim Meyering 82efb0955e *** empty log message *** 2004-03-21 19:50:46 +00:00
Jim Meyering 420f2c7a7e *** empty log message *** 2004-03-21 19:50:31 +00:00
Jim Meyering 846d81da01 (readtoken): Don't leak 64 bytes when reading an empty input stream. 2004-03-21 19:50:17 +00:00
Jim Meyering 9fb05110ea Also test with a non-regular file:
--files0-from=/dev/null
2004-03-21 19:20:14 +00:00
Jim Meyering 03ed43f2b0 (main): whoops. don't use errno for this diagnostic:
_("no files specified in %s"),
2004-03-21 19:18:24 +00:00
Jim Meyering 977dc6841b Add this comment:
# -*- perl -*-
2004-03-21 18:50:30 +00:00
Jim Meyering 082a7f8246 . 2004-03-21 18:50:03 +00:00
Jim Meyering f25499439b *** empty log message *** 2004-03-21 18:49:13 +00:00
Jim Meyering 4ee9bda98e Include <stdbool.h>.
(readtoken): Use `size_t' rather than int/long.
All callers adjusted.
Use `bool' rather than `int' where appropriate.
Use memset rather than an explicit loop.
Use x2nrealloc rather than xrealloc.
Allow the use of `\0' as a delimiter.
(readtokens): Likewise.
2004-03-21 18:49:06 +00:00
Jim Meyering 7c3d57a267 (readtoken, readtokens): Update prototypes. 2004-03-21 18:48:54 +00:00
Jim Meyering e5150544f5 *** empty log message *** 2004-03-21 18:48:21 +00:00
Jim Meyering 47be7107b3 (du invocation): Document new option: --file0-from=F. 2004-03-21 18:48:17 +00:00
Jim Meyering 662205a538 *** empty log message *** 2004-03-21 18:47:48 +00:00
Jim Meyering 48058ff931 Fix typo in comment. 2004-03-21 18:47:43 +00:00
Jim Meyering 2d4860ef0c *** empty log message *** 2004-03-21 18:46:35 +00:00
Jim Meyering 7073bed55e * NEWS: du accepts a new option --from0-file=FILE, where FILE
contains a list of NUL-separated file names.
2004-03-21 18:46:31 +00:00
Jim Meyering f4b7232607 (tsort): Reflect changes in use of readtoken. 2004-03-21 18:45:54 +00:00
Jim Meyering 8def27a37e (do_stdin): Reflect changes in use of readtoken. 2004-03-21 18:45:37 +00:00
Jim Meyering 865123bcc5 (TESTS): Add files0-from. 2004-03-21 18:45:17 +00:00
Jim Meyering c16e974f64 New tests, for --files0-from-F option. 2004-03-21 18:45:06 +00:00
Jim Meyering 0fdff6d99a du accepts a new option --from0-file=FILE, where FILE contains
a list of NUL-separated file names.

Include "readtokens.h".
(usage): Describe the new option, and adjust the `Usage':
with this option, no FILE may be specified on the command line.
(main): Handle the new option.
2004-03-21 18:44:25 +00:00
Jim Meyering e0d2db847f . 2004-03-18 06:24:45 +00:00
Jim Meyering c420f0b437 . 2004-03-17 18:44:57 +00:00
Jim Meyering 12b6a3e366 (test_vector): New tests epoch, ns-10, ns-max32, ns-relative. 2004-03-17 17:42:11 +00:00
Jim Meyering 4728a9f2e7 *** empty log message *** 2004-03-17 17:39:03 +00:00
Jim Meyering f339dc62bf *** empty log message *** 2004-03-17 17:38:36 +00:00
Jim Meyering 9f21702675 (General date syntax, Time of day items): Likewise.
Add copyright notice.  Change getdate to
get_date when talking about the function name.
(Seconds since the Epoch): New section, containing the time_t
info moved from Date input formats section, along with new
info about the @ syntax.  Mention negative time stamps,
fractional time stamps, and leap seconds.
(General date syntax): Modernize examples a bit to reflect new
features.
(General date syntax, Relative items in date strings):
Use ' rather than " to quote formats.
(Time of day items): Add an example with fractional seconds.
Describe fractional-second syntax.
2004-03-17 17:37:28 +00:00
Jim Meyering a6ba09871c (touch invocation):
Describe use of fractional seconds.
(date invocation, Options for date): Likewise.
(date invocation): Mention effect of LC_TIME.
(Options for date): Describe new --iso-8601=ns option.
2004-03-17 17:31:15 +00:00
Jim Meyering 1180a35ccc (touch_LDADD): New macro, since `touch' now needs clock_gettime. 2004-03-17 10:14:17 +00:00
Jim Meyering 6a32021c13 *** empty log message *** 2004-03-17 10:13:50 +00:00
Jim Meyering 53b35eecc8 (gl_GETDATE): Remove time-related stuff.
Require AM_STDBOOL_H and gl_TIMESPEC instead.
Require gl_CLOCK_TIME.
2004-03-17 10:13:45 +00:00
Jim Meyering 88d7328ed3 (gl_CLOCK_TIME): Require AC_GNU_SOURCE. 2004-03-17 10:12:39 +00:00
Jim Meyering 6073a82874 *** empty log message *** 2004-03-17 10:11:12 +00:00
Jim Meyering 590b3ed337 *** empty log message *** 2004-03-17 10:09:24 +00:00
Jim Meyering bf3bf1462e Include "getdate.h" first, as we can now
assume C89 and don't need to worry about 'const'.
Similarly, include "unlocked-io.h" near start, not in middle.
Include <limits.h>.
(textint.value): Use long int rather than int.
(textint.digits): Use size_t rather than int.
(BILLION, LOG10_BILLION): New constants.
(parser_control): New member rel_ns.  Members day_ordinal,
time_zone, month, day, hour, minutes, rel_year, rel_month,
rel_day, rel_hour, rel_minutes, rel_seconds
are now long int, not int.  Member seconds is now struct timespec,
not int.  New member timespec_seen.  Members dates_seen, days_seen,
local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
not int.
(%union.intval): Now long int, not int.
New member timespec.
(tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
(seconds, signed_seconds, unsigned_seconds): New nonterminals.
(spec): Now is a timespec or an item list.
(timespec, items): New nonterminals.
(time, rel, relunit, number, get_date):
Add support for fractional seconds.
(time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
(gmtime, localtime, mktime): Remove decls; not needed with C89.
(to_hour): First arg is now long int, not int.
(to_year): Returns long int, not int.
Don't treat year -70 like 70.
(tm_diff): Returns long int, not int.
(lookup_word): Use bool instead of int when appropriate.
(yylex): Use size_t for count, not int.
Detect overflow when parsing large integer constants.
Add support for fractions.
(get_date): Make pointers 'const' if possible.
Use more-portable code to detect integer overflow.
(main) [TEST]: Adjust to above changes.  Test for localtime failure.
Don't use ctime; it's not reliable if the year has >4 digits.
2004-03-17 10:09:16 +00:00
Jim Meyering aa11f812a2 Include stdbool.h, and timespec.h instead of
the usual <time.h> dance.
(get_date): Change signature to support fractional time stamps.
All callers changed.
2004-03-17 10:09:02 +00:00
Jim Meyering 1110307672 (enum Time_spec): New enum TIME_SPEC_NS.
(time_spec_string, time_spec, show_date): Support it.
(usage): Remove description of -ITIMESPEC, as it's obsolete and
confusing.  Mention --iso-8601=ns.
(batch_convert): getline returns ssize_t, not int.
2004-03-17 10:07:19 +00:00
Jim Meyering 553e0746b0 (newtime): Now an array of two timespecs, one
for access and one for modification.
(ref_stats): Remove.
(get_reldate): Use get_date's parameter profile.
(touch, main): Adjust to above changes.
(main): Work even if tm_year == INT_MAX (so long as long int is wider).
Use gettime instead of gettimeofday, for new get_date signature.
2004-03-17 10:06:57 +00:00
Jim Meyering 1188f599d9 *** empty log message *** 2004-03-15 15:16:37 +00:00
Jim Meyering e0501d9d25 . 2004-03-15 13:06:09 +00:00
Jim Meyering be0d8823c4 *** empty log message *** 2004-03-15 13:03:19 +00:00
Jim Meyering 17257fea63 (date invocation): Add missing `C' to %[...] range
in the `Date directives:: ...' menu entry.  From Bob Proulx.
2004-03-15 13:03:13 +00:00
Jim Meyering 580518862c *** empty log message *** 2004-03-15 12:03:46 +00:00
Jim Meyering 88cc709aac (alpha beta major): `Make' the emit_upload_commands
target before updating $(prev_version_file).
2004-03-15 12:03:43 +00:00
Jim Meyering 00072cac19 *** empty log message *** 2004-03-15 12:02:25 +00:00
Jim Meyering a613e4f93a Add FIXME comment:
The following don't have `invocation' nodes: [, pinky, shasum, uptime
2004-03-15 12:02:19 +00:00
Jim Meyering 2666b09b19 *** empty log message *** 2004-03-15 09:46:47 +00:00
Jim Meyering ecb2429437 *** empty log message *** 2004-03-15 09:39:02 +00:00
Jim Meyering 4b7f712702 New file, to test for just-fixed bug in date.
See today's change in lib/getdate.y.
2004-03-15 09:11:20 +00:00
Jim Meyering ec55878bfe (TESTS): Add date-sec. 2004-03-15 09:02:50 +00:00