Commit Graph

44 Commits

Author SHA1 Message Date
Paul Eggert f996454418 (<unistd.h>): Do not include; there's no need.
(NAMLEN): Remove macro.
(malloc, realloc): Remove decls.
(stpcpy): Likewise.
("xalloc.h"): Include.
(NAME_SIZE_DEFAULT): New macro.
(savedir): Use xmalloc / xrealloc to allocate memory.
Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
Skip "" directory entries.
Use strlen to calculate directory entry length, since the old method
is rarely used these days and isn't worth supporting.
Check for integer overflow when calculating allocation size.
Use memcpy to copy entries, instead of stpcpy.
Set errno properly when returning NULL.
Check for readdir error.
2000-06-26 23:25:37 +00:00
Paul Eggert b0a7ff33fd Fix inaccorate comment for xrealloc. 2000-06-26 18:46:37 +00:00
Paul Eggert c61d0787ce (adjust_value): New function.
(human_readable_inexact): Apply rounding style even when printing
approximate values.
2000-06-15 18:11:13 +00:00
Paul Eggert c9dfa7a7e8 Avoid shadowing warnings.
From: Jim Meyering <meyering@ascend.com>
Date: 15 Jun 2000 14:40:00 +0200
2000-06-15 15:47:43 +00:00
Paul Eggert bff9056e88 White space changes, to match fileutils. 2000-06-15 12:51:56 +00:00
Paul Eggert e1c9c92abd (human_readable_inexact): Allow an input block size that is not a
multiple of the output block size, and vice versa.
2000-06-15 01:40:09 +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 74497f7010 glibc snapshot 2000-05-24 20:08:51 +00:00
Paul Eggert a9d7ae22a8 Initial revision 2000-02-27 17:52:01 +00:00
Paul Eggert 977e420a35 (savedir): Work even if directory size is negative; this can
happen with some NFS screwups.
2000-02-24 00:15:00 +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 54bb77bfca Initial revision 2000-01-17 06:23:01 +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 78646b1f11 Initial revision 2000-01-04 22:54:54 +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 f4f13c4705 Initial revision 1999-09-26 19:03:20 +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 ea2373a8a3 Initial revision 1999-08-14 07:05:51 +00:00
Paul Eggert 133a9e5b86 Initial revision 1999-08-08 10:12:55 +00:00
Paul Eggert 508b2ae13f Initial revision 1999-07-08 03:45:21 +00:00
Paul Eggert 65fda730cf Include safe-read.h instead of full-write.h. 1999-07-08 03:45:21 +00:00
Paul Eggert 5129abee27 (safe_read): New decl. 1999-07-08 03:45:21 +00:00
Paul Eggert bb91f1ef17 Initial revision 1999-07-07 05:59:52 +00:00
Paul Eggert bb9f6be7c1 Include full-write.h. 1999-07-05 06:47:59 +00:00
Paul Eggert 22954a6f8a ANSIfy. 1999-06-29 02:26:25 +00:00
Paul Eggert cb562d7194 Initial revision 1999-06-21 00:02:15 +00:00
Paul Eggert ce00ef748c GNU tar 1.13 1999-05-20 03:48:55 +00:00
Paul Eggert 78e6911db8 Initial revision 1999-04-19 02:43:16 +00:00
Paul Eggert d434121129 GNU fileutils 4.0i 1999-01-25 14:09:30 +00:00
Paul Eggert 407206f5f2 GNU tar 1.13 1999-01-19 04:21:34 +00:00
Paul Eggert 85d7b872bf GNU tar 1.13 1999-01-01 17:43:10 +00:00
Paul Eggert 7d33c24bbe glibc 2.1.2 1998-10-23 18:07:04 +00:00
Paul Eggert 8be2b02752 GNU tar 1.13 1998-07-16 23:23:05 +00:00
Paul Eggert 2c3536c509 Initial revision 1998-02-24 23:17:38 +00:00
Paul Eggert 8d5fcefaa2 GNU tar 1.13 1997-12-31 11:01:18 +00:00
Paul Eggert 41c4811c30 Initial revision 1997-06-09 22:22:27 +00:00
Paul Eggert 17b2472b5a GNU tar 1.12 1997-04-16 19:30:04 +00:00