Commit Graph

17 Commits

Author SHA1 Message Date
Paul Eggert
dc861c7ab9 import from gnulib 2003-01-10 21:06:49 +00:00
Paul Eggert
bb5b309581 Sync with fileutils. 2002-01-16 22:43:41 +00:00
Paul Eggert
0a4cfe3e6c (get_date): Initialize tm_isdst to -1 before invoking mktime the last time. 2001-04-08 19:58:59 +00:00
Paul Eggert
bff9056e88 White space changes, to match fileutils. 2000-06-15 12:51:56 +00:00
Paul Eggert
44579f77cf (get_date): Apply relative times after time zone indicator, not
before.
2000-06-14 17:57:26 +00:00
Paul Eggert
3a19b8b0df Handle two-digit years with leading zeros correctly.
(textint): New typedef.
(parser_control): Changed from struct parser_control to typedef (for
consistency).  Member year changed from int to textint.  All uses changed.
(YYSTYPE): Removed; replaced by %union with int and textint members.
(tID): Removed; not used.
(tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
(tSNUMBER, tUNUMBER): Now of type <textintval>.
(date, number, to_year): Use width of number in digits, not its value,
to determine whether it's a 2-digit year, or a 2-digit time.
(yylex): Store number of digits of numeric tokens.
Return '?' for unknown identifiers, rather than (unused) tID.
2000-02-19 00:25:54 +00:00
Paul Eggert
40e03ba28d Update copyright. 2000-01-07 22:31:23 +00:00
Paul Eggert
622da12896 Sync tm_diff with the GNU C Library.
(TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN.  All uses changed.
(tm_diff): Renamed from difftm.  All uses changed.
Replace body with that taken from GNU C Library 2.1.3pre1.
(get_date): Prefer tm_gmtoff to tm_diff if available.
2000-01-06 18:07:38 +00:00
Paul Eggert
abdde50e1b (get_date):
Fix typo when checking for time_t overflow in time zone calculations.
1999-12-22 18:10:37 +00:00
Paul Eggert
12fa57c63b Fix comment (from meyering fileutils). 1999-10-31 15:47:44 +00:00
Paul Eggert
9f9336cb0a (__attribute__): Don't use if GCC claims to be before 2.8; this is
needed for OPENStep 4.2 cc.  Also, don't use if strict ANSI.
1999-10-03 23:30:09 +00:00
Paul Eggert
26fd2b79db (get_date): Rename outermost local probe' to quarter'.
(get_date): Rename latter local `tm' to probe_tm.
From: Jim Meyering <meyering@ascend.com>
Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
1999-08-29 21:32:29 +00:00
Paul Eggert
269a3b3ed2 (PC): New macro; use it when possible.
(number): Handle `Nov 11 1996' example correctly.
See Risks Digest 20.55 (1999-08-27).
1999-08-28 07:50:29 +00:00
Paul Eggert
77de7dbb2f Fix typo in previous change. 1999-08-23 11:03:47 +00:00
Paul Eggert
c0d324c43c Add copyright notice.
(<stdio.h>): Include only if testing.
(ISUPPER): Remove.
(ISLOWER): New macro.
(<string.h>): Include if HAVE_STRING_H, not USG.
(bcopy): Remove.
(yymaxdepth, ..., yycheck): Don't bother to redefine, since we can assume
bison.
(EPOCH_YEAR): Renamed from EPOCH.
(table): Renamed from TABLE.
(meridian): Now an anonymous enum.
(struct parser_control): New type.
(YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
(yyInput, ..., yyRelYear): Migrated into struct parser_control.
(%pure_parser): Added, so that the parser is pure.
(%union): Removed; the type is now just plain int.
All %type directives removed.
(tLOCAL_ZONE): New %token.
(month_day_table): Renamed from MonthDayTable.
(gmtime, localtime, mktime, time): Declare only if not defined.
(meridian_table): New table.
(dst_table): New table.
(units_table): renamed from UnitsTable.
(relative_time_table): Renamed from OtherTable.
(time_zone_table): Renamed from TimezoneTable.  Modernized.
(military_table): Renamed from MilitaryTable.
(to_hour): Renamed from ToHour.
(to_year): Renamed from ToYear.
(lookup_zone): New function.
(LookupWord): Renamed from lookup_word.  Use lookup_zone for time zones.
(yylex): Now reentrant.  All callers changed.
(get_date): Add support for local time zone abbreviations.
Make it reentrant.
1999-08-23 09:55:55 +00:00
Paul Eggert
f34eafea87 (TimezoneTable): Modernize to current tz data. 1999-08-20 08:41:32 +00:00
Paul Eggert
ce00ef748c GNU tar 1.13 1999-05-20 03:48:55 +00:00