Jim Meyering [Sat, 9 Aug 2003 09:58:30 +0000 (09:58 +0000)]
(libfetish_a_SOURCES): Remove fnmatch_.h.
(lib_OBJECTS): New macro, for convenience when cutting and
pasting Makefile.am templates from gnulib.
(EXTRA_DIST): Remove fnmatch_loop.c.
(BUILT_SOURCES): Append $(FNMATCH_H).
Import the following changes from gnulib templates
for alloca and fnmatch):
(all-local $(lib_OBJECTS)): New dependencies.
(alloca.h): Use alloca.h-t for temporary.
(EXTRA_DIST): Append fnmatch_.h, fnmatch_loop.c.
(fnmatch.h): New rule.
(MOSTLYCLEANFILES): Add fnmatch.h, fnmatch.h-t.
(DISTCLEANFILES): Remove fnmatch.h
Jim Meyering [Sat, 9 Aug 2003 09:16:39 +0000 (09:16 +0000)]
(suffix_alphabet): New var.
(longopts, usage, next_file_name, main): Support -d.
(next_file_name, main): Allow -a0, as POSIX requires.
(next_file_name): Don't assume ASCII-like encoding;
'a' through 'z' are not contiguous in EBCDIC.
Jim Meyering [Fri, 8 Aug 2003 21:14:57 +0000 (21:14 +0000)]
(read_filesystem_list) [MOUNTED_GETFSSTAT]:
Use MNT_NOWAIT, rather than MNT_WAIT. Otherwise, `df DIR' could
hang on OSF/1 5.1 for DIR on both local and remote file systems.
Reported by (and fix confirmed by) Nelson H. F. Beebe.
Jim Meyering [Thu, 7 Aug 2003 09:13:50 +0000 (09:13 +0000)]
Merge with gnulib.
(gl_C_RESTRICT): Renamed from ACX_C_RESTRICT. All uses changed.
Rename cache vars to gl_cv_*. Incorporate latest Autoconf CVS tricks.
Jim Meyering [Thu, 7 Aug 2003 06:37:11 +0000 (06:37 +0000)]
(jm_PREREQ_PHYSMEM, jm_PREREQ_STAT): Ignore headers
that are present but cannot be compiled. This avoids spurious warnings
on Solaris 9 sparc with Forte Developer 7 C 5.4.
Jim Meyering [Sun, 3 Aug 2003 10:28:10 +0000 (10:28 +0000)]
Minor code cleanups, mostly to use more accurate
types and to remove unnecessary casts.
(min, max): Remove. All uses changed to MIN and MAX.
(hard_lc_collate, hard_LC_TIME, struct buffer.eof, struct
keyfield.skipsblanks, struct keyfield.skipeblanks, struct
keyfield.numeric, struct keyfield.general_numeric, struct
keyfield.month, struct keyfield.reverse, reverse, unique,
have_read_stdin): Now bool, not int. All uses changed.
(eolchar): Now char, not int.
(struct keyfield.ignore): Now bool const *, not int *.
(struct keyfield.translate): Now char const *, not char *.
(struct month.name): Likewise.
(blanks, nonprinting, nondictionary): Now bool[], not int[].
(cleanup, inittables, keycompare, check, mergefps, first_same_file,
check, sort, main): Use const * pointers when possible.
(month_cmp): Rewrite to avoid casts.
(inittables): Initialize tables unconditionally, to avoid branches.
(fillbuf): Return bool, not int. All uses changed.
(fillbuf, keycompare, new_key, main):
Use SIZE_MAX rather than (size_t) -1.
(trailing_blanks): Renamed from trim_trailing_blanks.
Return the number of blanks to trim. All uses changed.
(getmonth): Use trailing_blanks rather than open code.
(keycompare): Do not cast char * to unsigned char *; not needed.
CMP_WITH_IGNORE converts args to UCHAR, so no need to convert it
ourselves.
(compare, main): Use | rather than || to avoid jumps.
Replace "diff = NONZERO (alen)" with "diff = 1", since alen must
be nonzero there.
(check, first_same_file, sort, main):
Use bool instead of int local vars when possible.
(check): Merge the old 'checkfp' and 'check' into a single function,
that returns a boolean (true if the file was ordered).
All uses changed.
(main): Use int instead of unsigned for iterating through nsigs.
Rename local var "posix_pedantic" to "posixly_correct".
Jim Meyering [Fri, 1 Aug 2003 22:37:20 +0000 (22:37 +0000)]
(Options for date): Fix a typo in format: it's now %d not %_d. Add URLs.
(Time directives, Options for date, Examples of date): Add --rfc-2822
option to GNU date.
Jim Meyering [Fri, 1 Aug 2003 22:33:04 +0000 (22:33 +0000)]
Ensure that $? is 0 for the final `exit 0'.
Otherwise, with at least the /bin/sh from HPUX 10.20,
the trap code would end up converting that to exit 1 and thus an
unexpected test failure. Reported by Christian Krackowizer.
Jim Meyering [Fri, 1 Aug 2003 06:44:28 +0000 (06:44 +0000)]
Do not include bumpalloc.h.
(WORD_TABLE): New member alloc.
(ALLOC_NEW_WORD): Remove.
(occurs_alloc): New var.
(digest_word_file, find_occurs_in_text): Check for arithmetic
overflow when computing table size. Use xrealloc rather than
bumpalloc primitives.