Commit Graph

170 Commits

Author SHA1 Message Date
Paul Eggert 4ae648023c (alloca): Arg is of type size_t, not unsigned. 2001-07-08 19:08:50 +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 e873bb4ed8 Initial revision 2001-04-03 15:18:12 +00:00
Paul Eggert 11c437d44b (malloc): Undef before defining. 2001-02-16 18:57:56 +00:00
Paul Eggert 107e9fad31 Quote error message. 2001-01-26 11:13:28 +00:00
Paul Eggert b6e04fa518 (savedir): Remove size arg. 2001-01-13 06:11:36 +00:00
Paul Eggert b4c3a9637b Initial revision 2001-01-13 05:59:29 +00:00
Paul Eggert ff7194169a Include full-write.h, not safe-read.h.
full_write returns size_t, with short writes meaning failure.
All callers changed.
2001-01-13 05:59:29 +00:00
Paul Eggert df72d04b36 (savedir): Remove size arg; it wasn't portable. All callers changed. 2001-01-13 05:59:29 +00:00
Paul Eggert 1ff433e49e Initial revision 2000-12-18 23:43:51 +00:00
Paul Eggert da024ba683 fileutils 4.0.35 2000-11-03 08:44:01 +00:00
Paul Eggert 89d47c634e Do not comment out all the code if we are using the GNU C library,
because in some cases we are replacing buggy code in the GNU C library itself.
2000-11-03 00:23:21 +00:00
Paul Eggert eed2c0077d GNU fileutils 4.0.35 2000-10-31 07:08:05 +00:00
Paul Eggert 731cf2666a (FOLD): Do not assume that characters are unsigned. 2000-10-31 06:02:53 +00:00
Paul Eggert 614f749ff7 (prepend_default_options): Don't use NULL, for portability. 2000-10-24 06:34:45 +00:00
Paul Eggert e7d0a7724b Initial revision 2000-10-24 06:18:37 +00:00
Paul Eggert 5156a90a1e (full_write): Some buggy drivers return 0 when you
fall off a device's end.  Detect this.
2000-10-24 06:18:37 +00:00
Paul Eggert 8d8a85f9a2 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
2000-10-24 06:18:37 +00:00
Paul Eggert 8caec82653 (<limits.h>): Include if HAVE_LIMITS_H.
(CHAR_BIT): Define if not defined.
2000-10-17 17:20:55 +00:00
Paul Eggert 9d290bf45e (<limits.h>): Do not include; human.h does it if needed.
(CHAR_BIT): Remove.
2000-10-17 17:20:55 +00:00
Paul Eggert 5ed9bdbf57 Initial revision 2000-09-09 15:57:28 +00:00
Paul Eggert c86c626f04 Memory exhausted -> memory exhausted 2000-08-07 16:46:16 +00:00
Paul Eggert 9a742c498f (xalloc_msg_memory_exhausted): change to array from char *. 2000-08-07 16:02:21 +00:00
Paul Eggert 1063141801 Simplify exhausted message. 2000-07-15 05:53:00 +00:00
Paul Eggert f03a9c9335 fileutils 4.0x 2000-07-09 07:25:03 +00:00
Paul Eggert a70cec699f Initial revision 2000-07-09 07:25:03 +00:00
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