*** empty log message ***
[coreutils.git] / old / textutils / ChangeLog
blobbc43c75876f1e4eb1f36ac82bd4825bedcf2906f
1 2002-07-29  Jim Meyering  <meyering@lucent.com>
3         * Version 2.1.
5         * src/tail.c: Adjust command examples in comments to use
6         POSIX 1003.1-2001 option syntax.
7         * src/sort.c: Likewise.
8         From Paul Eggert.
10 2002-07-28  Jim Meyering  <meyering@lucent.com>
12         * configure.ac: Require automake-1.6b.
14 2002-07-20  Jim Meyering  <meyering@lucent.com>
16         * Version 2.0.22.
18         * Upgrade to cvs automake -- required to work with 2.53b.
19         * configure.ac: Require automake-1.6a.
21         * Upgrade to gettext-0.11.3.
22         * Upgrade to autoconf-2.53b.
24 2002-07-02  Jim Meyering  <meyering@lucent.com>
26         * src/cat.c, src/cksum.c, src/comm.c, src/csplit.c, src/cut.c (usage):
27         Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.
28         * src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/join.c: Likewise.
29         * src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c: Likewise.
30         * src/sort.c, src/split.c, src/sum.c, src/tac.c, src/tail.c: Likewise.
31         * src/tr.c, src/tsort.c, src/unexpand.c, src/uniq.c, src/wc.c: Likewise.
33 2002-06-22  Jim Meyering  <meyering@lucent.com>
35         * configure.ac: Invoke AC_GNU_SOURCE very early.
37 2002-06-15  Jim Meyering  <meyering@lucent.com>
39         * src/cksum.c: Include <sys/types.h> before system.h.
41 2002-05-22  Jim Meyering  <meyering@lucent.com>
43         * src/od.c [struct dummy]: Renamed.  Don't rely on portability of
44         zero-length arrays.  Instead, use sizes of -1 or +1.
45         Reported by Eric Backus.
47 2002-05-14  Jim Meyering  <meyering@lucent.com>
49         `od -t f8' didn't work.
50         This bug was introduced with my change of 2000-10-22 (textutils-2.0.8).
51         * src/od.c (ulonglong_t): Move declaration to precede new use.
52         [enum size_spec] (N_SIZE_SPECS): New member.
53         (width_bytes): Add initializer corresponding to ulonglong_t type.
54         (struct assert_width_bytes_matches_size_spec_decl): Declare.
55         Based on a patch from Tony Kocurko.
57 2002-04-29  Paul Eggert  <eggert@twinsun.com>
59         Use ENABLE_NLS only for gettext-related stuff, not also for
60         setlocale-related stuff.  From a patch suggested by Bruno
61         Haible.
63         Since setlocale is now almost universal, this patch also
64         removes some of the optimizations that clutter up the code and
65         which don't help all that much even on hosts that lack
66         setlocale.
68         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
69         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
70         Do not check for alloca.h (no longer used) or stdbool.h (was never
71         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
73         * src/sys2.h (HAVE_SETLOCALE): Define to 0 if not defined.
74         * src/comm.c (compare_files): Replace #ifdef ENABLE_NLS
75         with if (HAVE_SETLOCALE).
76         * src/join.c (keycmp): Likewise.
77         * src/sort.c (keycompare, compare): Likewise.
79         * src/comm.c (hard_LC_COLLATE): Define even if ! ENABLE_NLS.
80         * src/join.c (hard_LC_COLLATE): Likewise.
81         * src/sort.c (hard_LC_COLLATE): Likewise.
83         * src/comm.c (main): Always initialize hard_LC_COLLATE.
84         Put initialization next to other locale-related stuff.
85         * src/join.c (main): Likewise.
86         * src/sort.c (main): Likewise.
88         * src/sort.c: Include <langinfo.h> even if ! ENABLE_NLS.
89         (decimal_point, th_sep): Depend on HAVE_SETLOCALE, not ENABLE_NLS.
90         (main): Likewise.
91         (MONTHTAB_CONST): Remove; all uses removed.
92         (struct_month_cmp, inittables): Do not depend on ENABLE_NLS.
93         (main): hard_LC_TIME locale does not depend on ENABLE_NLS.
95 2002-04-29  Jim Meyering  <meyering@lucent.com>
97         * src/tail.c (parse_obsolescent_option): Do not limit the maximum
98         line/byte count (when specified via obsolete option syntax) to be
99         less than ULONG_MAX on systems where OFF_T_MAX is larger.
101 2002-04-28  Paul Eggert  <eggert@twinsun.com>
103         * src/tail.c (tail_forever): Do not treat
104         max_n_unchanged_stats_between_opens specially (as if it were
105         infinite) if it has its maximal value.  Similarly for
106         max_n_consecutive_size_changes_between_opens.
108 2002-04-28  Jim Meyering  <meyering@lucent.com>
110         Avoid new warnings from gcc.
111         * src/pr.c [struct COLUMN] <name>: Declare member to be const.
112         (init_fps): Declare local variable `firstname' to be const.
114 2002-04-25  Jim Meyering  <meyering@lucent.com>
116         * src/wc.c (usage): Adjust ordering to match that of default output.
117         Suggestion from Gaute Hvoslef Kvalnes.
119         * configure.ac (AM_GNU_GETTEXT): Add external arg.
120         (AC_CONFIG_FILES): Remove intl/Makefile.
121         * Makefile.am (SUBDIRS): Remove intl.
122         * src/Makefile.am (INCLUDES): Remove -I../intl.
124 2002-04-15  Jim Meyering  <meyering@lucent.com>
126         * src/tr.c (usage): Give a verbose description of --squeeze-repeats,
127         including the mention of SET1.  Reported by Dan Jacobson.
129 2002-04-12  Jim Meyering  <meyering@lucent.com>
131         * src/Makefile.am (LDADD): List ../lib/libfetish.a both before
132         and after @LIBINTL@.  Thanks to Paul Eggert for the fix and to
133         Bruno Haible for diagnosing the problem.
135 2002-03-16  Jim Meyering  <meyering@lucent.com>
137         * src/Makefile.am (datadir): Don't override $(datadir)
138         which might be set by --datadir and different from $(prefix)/share.
139         Patch from Albert Chin-A-Young.
141 2002-03-10  Jim Meyering  <meyering@lucent.com>
143         * configure.ac (AM_INIT_AUTOMAKE): Specify the required version
144         of automake (1.6), and options (gnits dist-bzip2), rather than...
145         * Makefile.am (AUTOMAKE_OPTIONS): ...here.  Remove definition.
147 2002-03-09  Jim Meyering  <meyering@lucent.com>
149         * Makefile.am (EXTRA_DIST): Remove config/config.rpath,
150         now that automake knows about it.
152 2002-03-05  Jim Meyering  <meyering@lucent.com>
154         * Makefile.am (EXTRA_DIST): Add config/config.rpath.
156 2002-02-23  Paul Eggert  <eggert@twinsun.com>
158         * src/cat.c (simple_cat, cat, main): Use char * rather than
159         unsigned char *, to avoid some technical violations of the C
160         standard, and to avoid the need for casts.  I guess the
161         unsigned char * was probably there for improved performance
162         with ancient compilers, but the code wasn't using the
163         unsignedness any more.
164         Reported by Nelson H. F. Beebe.
166         (cat): int -> size_t for full_write arg.  This doesn't
167         fix any bugs since the buffer size is small, but it makes
168         the code a bit clearer.
170 2002-02-18  Jim Meyering  <meyering@lucent.com>
172         * Version 2.0.21.
174         * tests/tail/Test.pm: For tests matching /^(obs|err-[134])/,
175         put _POSIX2_VERSION=199209 in the environment, so the tests succeed
176         even when the environment would have contained _POSIX2_VERSION=200112.
177         * tests/uniq/Test.pm (test_vector): Rename tests of obsolete usage
178         to have prefix of `obs'.  Adjust environment for those tests as above.
180         * tests/mk-script: When getting input via a pipe, apply the
181         environment settings to the command in question, not to `cat'.
182         No longer allow more than one element in the $Test::env or
183         $Test::env_default arrays.  No caller used that feature.
185 2002-02-17  Jim Meyering  <meyering@lucent.com>
187         * tests/head/Test.pm: Accept pre-POSIX 1003.1-2001 options.
188         * tests/pr/Test.pm: Likewise.
189         * tests/sort/Test.pm: Likewise.
191         * Makefile.cfg (wget_files): Reflect new location of these files.
193 2002-02-16  Jim Meyering  <meyering@lucent.com>
195         * ABOUT-NLS, intl/*: Update to Gettext 0.11.
196         * INSTALL: Update to Autoconf 2.52h.
198         * src/Makefile.am (datadir): Use `share' in place of @DATADIRNAME@,
199         per Gettext-0.11.
200         (LDADD): Use @LIBINTL@ instead of @INTLLIBS@, per Gettext-0.11.
202         * configure.ac (AC_CONFIG_AUX_DIR): New macro invocation.
203         (ALL_LINGUAS): Remove: now in po/LINGUAS as per Gettext 0.11.
205         * config: New subdirectory, containing the following files from .:
206         config.guess, config.sub, depcomp, missing, install-sh, mkinstalldirs.
207         Move the following files here from doc: texinfo.tex, mdate-sh.
209 2002-02-15  Paul Eggert  <eggert@twinsun.com>
211         Add support for _POSIX2_VERSION, which lets you pick which POSIX
212         version you want the utilities to conform to.  Remove warnings about
213         failure to conform to a future POSIX version.
215         * NEWS, doc/coreutils.texi: Document _POSIX2_VERSION.
216         * doc/coreutils.texi (Standards Conformance): New section.
218         * src/expand.c: Include posixver.h.
219         (usage): Document only the intersection of the old and new behaviors,
220         to encourage portability.
221         * src/fold.c: Likewise.
222         * src/head.c: Likewise.
223         * src/od.c: Likewise.
224         * src/pr.c: Likewise.
225         * src/sort.c: Likewise.
226         * src/split.c: Likewise.
227         * src/uniq.c: Likewise.
228         * src/tail.c: Likewise.
229         * src/unexpand.c: Likewise.
231         * src/expand.c (shortopts): Remove; no longer needed.
232         * src/od.c (short_options): Likewise.
233         * src/pr.c (short_options): Likewise.
234         * src/sort.c (short_options): Likewise.
235         * src/split.c (shortopts): Likewise.
236         * src/uniq.c (shortopts): Likewise.
237         * src/unexpand.c (shortopts): Likewise.
239         * src/od.c (COMMON_SHORT_OPTIONS): New macro.
240         * src/pr.c (COMMON_SHORT_OPTIONS): Likewise.
241         * src/sort.c (COMMON_SHORT_OPTIONS): Likewise.
243         * src/expand.c (main): Revert to previous behavior, except report
244         an error and exit if the obsolete syntax is used and if conforming
245         to the new standard.
246         * src/fold.c (main): Likewise.
247         * src/head.c (main): Likewise.
248         * src/split.c (main): Likewise.
249         * src/uniq.c (main): Likewise.
250         * src/tail.c (main, parse_obsolescent_option): Likewise.
251         * src/unexpand.c (main): Likewise.
253         * src/od.c (STRINGS_OPTION, WIDTH_OPTION): Remove; no longer needed.
254         All uses changed back to the corresponding short options.
255         * src/pr.c (SEP_STRING_OPTION): Likewise.
257         * src/od.c (main): Parse options using POSIX 1003.1-2001 rules if
258         conforming to that standard.  Do not warn of obsolete options.
259         * src/pr.c (main): Likewise.
260         * src/sort.c (main): Likewise.
262         * src/system.h (_POSIX2_VERSION, POSIX2_VERSION): Remove definitions.
263         (OPTARG_POSIX, OBSOLETE_OPTION_WARNINGS): Likewise.
265 2002-02-16  Jim Meyering  <meyering@lucent.com>
267         * tests/misc/split-a: New test for change of 2002-02-05.
268         * tests/misc/Makefile.am (TESTS): Add split-a.
270 2002-02-12  Jim Meyering  <meyering@lucent.com>
272         * src/split.c (DEFAULT_SUFFIX_LENGTH): Define constant.
273         (suffix_length): Use it here.
274         (usage): Use it here.
276 2002-02-05  Paul Eggert  <eggert@twinsun.com>
278         Change 'split' to conform to POSIX.  It now accepts an -a or
279         --suffix-length option, and refuses to generate more files
280         than there are suffixes.
282         * NEWS, doc/coreutils.texi: Document this.
283         * src/split.c: Include "dirname.h".
284         (outbase): Now a global var.
285         (outfile_end): Remove.
286         (suffix_length): New var.
287         (shortopts, longopts, main): Add -a or --suffix-length.
288         (next_file_name): Implement -a.  Do not extend the suffix length.
289         Check for file names that are too long.
290         (main): Move outfile initialization to next_file_name.
292         * src/split.c (shortopts): Remove -v (a typo).
294 2002-02-11  Jim Meyering  <meyering@lucent.com>
296         * tests/misc/head-pos: New file/test for the change of 2002-02-08.
297         * tests/misc/Makefile.am (TESTS): Add head-pos.
299         * src/tr.c (unquote): Make comment a little clearer.
301 2002-02-08  Paul Eggert  <eggert@twinsun.com>
303         * src/head.c (head_lines): If we have read too much data, try
304         to seek back to the position we would have gotten to had we
305         been reading one byte at a time.  POSIX currently doesn't
306         require this, but it's easy to do and some software relies on it.
308 2002-02-02  Jim Meyering  <meyering@lucent.com>
310         * src/uniq.c (main): Prepend `warning: ' to the diagnostic, so it's
311         consistent with all of the other `... is obsolete...' diagnostics.
313 2002-01-31  Paul Eggert  <eggert@twinsun.com>
315         Add more support for POSIX 1003.1-2001, which requires removal for
316         support of obsolete "-N" option syntax in expand, head, fold,
317         split, tail, unexpand, uniq, and which prohibits options with
318         optional arguments in od and pr.
320         * NEWS: Document this.
321         * doc/coreutils.texi: Likewise.
322         * src/expand.c (usage): Likewise.
323         * src/fold.c (usage): Likewise.
324         * src/head.c (usage): Likewise.
325         * src/od.c (usage): Likewise.
326         * src/pr.c (usage): Likewise.
327         * src/split.c (usage): Likewise.
328         * src/unexpand.c (usage): Likewise.
329         * src/uniq.c (usage): Likewise.
331         * NEWS: Improve doc for previous fix in this area.
333         * src/expand.c (shortopts): New constant.
334         * src/od.c (short_options): Likewise.
335         * src/pr.c (short_options): Likewise.
336         * src/sort.c (short_options): Likewise.
337         * src/split.c (shortopts): Likewise.
338         * src/unexpand.c (shortopts): Likewise.
339         * src/uniq.c (shortopts): Likewise.
341         * src/expand.c (main): Check for obsolete options.
342         * src/fold.c (main): Likewise.
343         * src/head.c (main): Likewise.
344         * src/od.c (main): Likewise.
345         * src/pr.c (main): Likewise.
346         * src/sort.c (main): Likewise.
347         * src/split.c (main): Likewise.
348         * src/tail.c (parse_obsolescent_option, main): Likewise.
349         * src/unexpand.c (main): Likewise.
350         * src/uniq.c (main): Likewise.
352         * src/head.c (header_mode_option): New constant.
354         * src/od.c: New enum for long options.
356         * src/pr.c (SEP_STRING_OPTION): New enum value.
357         (long_options): Use it.
359         * src/split.c (main): Use -1, not EOF, for getopt_long.
361         * src/system.h (OPTARG_POSIX, OBSOLETE_OPTION_WARNINGS): New macros.
363         * src/fold.c (main): Fix bug: -- -N was treated as -N --.
365 2002-02-01  Jim Meyering  <meyering@lucent.com>
367         * src/tail.c (start_lines): Handle the case in which bytes_read is zero.
369 2002-01-28  Jim Meyering  <meyering@lucent.com>
371         * Makefile.maint (ac-check): Remove, now that we no longer have
372         to duplicate that information.
373         (local-check): Remove ac-check.
375         * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5d.
377         * configure.ac (AM_INIT_AUTOMAKE): Use zero-arg form of this macro.
378         (ALL_LINGUAS): Add the bokmÃ¥l dialect of Norwegian (nb).
380 2002-01-27  Jim Meyering  <meyering@lucent.com>
382         tail -n +2 would perform an extra read after encountering EOF
383         * src/tail.c (start_lines): Detect EOF, inform caller.
384         (tail_lines): Upon EOF in start_lines, return immediately.
386 2002-01-22  Jim Meyering  <meyering@lucent.com>
388         * Version 2.0.20.
390 2002-01-22  Paul Eggert  <eggert@twinsun.com>
392         * src/od.c (skip): Remove redundant check for overflow.
393         fseeko's seek argument is already known to be in range,
394         since it is less than the file size.
396 2002-01-22  Jim Meyering  <meyering@lucent.com>
398         * po/POTFILES.in: Add lib/xmemcoll.c.
400 2002-01-22  Paul Eggert  <eggert@twinsun.com>
402         * src/tac.c (save_stdin): Report proper errno value after
403         fwrite failures.  Do not bother to rewind the temp file, as
404         it'll be read backwards anyway.
406 2002-01-22  Paul Eggert  <eggert@twinsun.com>
408         * src/ptx.c (swallow_file_in_memory): Work even if `open' returns 0.
409         Check for `close' error.
411 2002-01-22  Paul Eggert  <eggert@twinsun.com>
413         Port to glibc 2.2.5, whose mmap stdio positions the underlying
414         file descriptor at a nonzero offset after an fopen.
416         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
417         * src/od.c (skip): Use fseeko rather than lseek.
418         (Also, check for overflow when converting uintmax_t to off_t.)
419         * src/sys2.h (EOVERFLOW, fseeko): New macros.
421 2001-01-21  Paul Eggert  <eggert@twinsun.com>
423         * src/comm.c: Include xmemcoll.h, not memcoll.h.
424         Use xmemcoll instead of memcoll.
425         * src/join.c: Likewise.
426         * src/sort.c: Likewise.
428         * src/sort.c (die): Do not invoke cleanup; atexit does this now.
429         (main): Use atexit to invoke cleanup on exit.
430         Set xmemcoll_exit_failure to SORT_FAILURE.
432 2002-01-20  Paul Eggert  <eggert@twinsun.com>
434         * src/comm.c (compare_files): Don't assume that the difference
435         between two size_t values can be stored in an int; this doesn't
436         work, for example, on 64-bit Solaris.
437         * src/sort.c (CMP_WITH_IGNORE): Likewise.
438         * src/join.c (keycmp): Likewise.  Also, fix the type of two locals
439         to be size_t instead of int.
441 2002-01-20  Paul Eggert  <eggert@twinsun.com>
443         * src/csplit.c: Don't include "xalloc.h", as system.h already
444         does that via sys2.h.
445         * src/sort.c: Likewise.
447 2002-01-19  Jim Meyering  <meyering@lucent.com>
449         * configure.ac: Remove code that set LIBOBJS in support of ansi2knr.
450         The latest version of autoconf objected to it, and besides, I don't
451         care too much about K&R support these days.
453 2002-01-18  Jim Meyering  <meyering@lucent.com>
455         Fix tr so it no longer gets a failed assertion for [::] or [==].
457         * src/tr.c (xmemdup): Rename from `substr' and rewrite to
458         take only pointer/length parameters.
459         (build_spec_list): Update sole caller.
460         Properly diagnose the invalid specs [::] and [==].
461         Pawel Prokop reported that `tr '[::]' x' elicits a failed assertion.
462         * tests/tr/Test.pm: Add tests for the above fix.
464 2002-01-14  Paul Eggert  <eggert@twinsun.com>
466         * src/sort.c (main):  Issue a warning for obsolete usage, unless
467         POSIXLY_CORRECT.
468         * src/tail.c (parse_obsolescent_option): Likewise.
469         * src/uniq.c (main): Likewise.
471 2002-01-14  Paul Eggert  <eggert@twinsun.com>
473         Add support for POSIX 1003.1-2001, which requires removal for
474         support of obsolete "+" option syntax in sort, tail, and uniq.
476         * NEWS: Document this.
478         * src/sort.c (usage, main): Implement this.
479         * src/tail.c (usage, parse_obsolescent_option): Likewise.
480         * src/uniq.c (usage, main): Likewise.
481         * src/system.h (_POSIX2_VERSION, POSIX2_VERSION): New macros.
483         * src/sys2.h (ISDIGIT, S_ISVTX, S_IXUGO): Comment fix.
485 2002-01-14  Jim Meyering  <meyering@lucent.com>
487         * tests/misc/sort: New test, for just-fixed bug.
488         * tests/misc/Makefile.am (TESTS): Add sort.
489         (TESTS_ENVIRONMENT): Add PROG=$$tst.  This is a gross kludge
490         that depends on the name of an automake-generated local variable.
492 2002-01-13  Paul Eggert  <eggert@twinsun.com>
494         * src/sort.c (mergefps): Fix bug when eliminating empty files.
495         Bug reported by James Hutt.
497 2002-01-13  Jim Meyering  <meyering@lucent.com>
499         * tests/help-version: Tweak to work with the programs in diffutils.
501 2002-01-09  Jim Meyering  <meyering@lucent.com>
503         * configure.in (ALL_LINGUAS): Add Turkish (tr).
505 2001-12-18  Paul Eggert  <eggert@twinsun.com>
507         * src/sort.c (usage, specify_sort_size): Accept 'K' (which is
508         now preferred, as it connotes 1024) as well as 'k'.
509         * NEWS: Document this change.
511 2001-12-17  Jim Meyering  <meyering@lucent.com>
513         * src/uniq.c (usage): Remove stray `)' in --help output.
514         Reported by Padraig Brady.
516         * Makefile.maint (real_dir): Remove unused variable.
517         (url_dir_list): Don't set define it here, but...
518         * Makefile.cfg (url_dir_list): ...define it here instead.
519         (hosts, a_host, b_host): Remove now-unused variables.
520         (alpha_subdir, a_url_dir, b_url_dir): Remove now-unused variables.
522 2001-12-12  Bruno Haible  <bruno@clisp.org>
523             Paul Eggert  <eggert@twinsun.com>
525         * src/wc.c (wc): Use ISSPACE and iswspace in addition to hard-coding
526         the ASCII space character.
528 2001-12-08  Jim Meyering  <meyering@lucent.com>
530         * Version 2.0.19.
532         * Makefile.cfg (wget_files): Remove ansi2knr.c, since it's
533         no longer available at that location.
535 2001-12-03  Jim Meyering  <meyering@lucent.com>
537         * src/od.c, src/tail.c, src/tr.c (usage): I will not split translatable
538         strings in the middle of a sentence.  I will not split translatable
539         strings in the middle of a sentence.  I will not split translatable
540         strings in the middle of a sentence.  ...
541         * src/join.c (usage): Merge lone "\n" into adjacent string.
542         * src/md5sum.c (usage): Likewise.
543         * src/paste.c (usage): Likewise.
544         Reported by Karl Eichwalder.
546 2001-12-02  Jim Meyering  <meyering@lucent.com>
548         * Makefile.maint (emit-upload-commands): Fix typo: s/distdir/PACKAGE/.
550 2001-12-01  Jim Meyering  <meyering@lucent.com>
552         * Version 2.0.18.
554         * Makefile.maint (po-check): Check for uses of _() not just in .c
555         files, but also in .h files.
557         Ideally, there would be just one translation for all --help
558         and --version description strings.  Before this change, they
559         differed only in the number of blanks between the option name
560         and the description.  Someday gettext may be smart enough
561         to merge such strings and to reconstruct the proper spacing at
562         run time.  In the mean time, now there is one string for each,
563         and those descriptions in the --help output are no longer aligned
564         with the others.
565         * src/sys2.h (HELP_OPTION_DESCRIPTION): New macro.
566         (VERSION_OPTION_DESCRIPTION): New macro.
567         * src/cat.c, src/cksum.c, src/comm.c, src/csplit.c, src/cut.c:
568         * src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/join.c:
569         * src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c, src/ptx.c:
570         * src/sort.c, src/split.c, src/sum.c, src/sys2.h, src/tac.c:
571         * src/tail.c, src/tr.c, src/tsort.c, src/unexpand.c, src/uniq.c:
572         * src/wc.c (usage): Use new macros, HELP_OPTION_DESCRIPTION and
573         VERSION_OPTION_DESCRIPTION instead of hard-coding --help and
574         --version descriptions.
575         * po/POTFILES.in: Add src/sys2.h.
577 2001-11-27  Jim Meyering  <meyering@lucent.com>
579         * src/system.h (SET_MODE) [O_BINARY]: Call setmode, not set_mode.
580         From Matthew Smith.
582 2001-11-26  Jim Meyering  <meyering@lucent.com>
584         * src/cat.c (cat): Don't test whether the full_write return value
585         (of type size_t) is less than 0.  Reported by Nelson H. F. Beebe,
586         as a warning from Irix 6.5's C compiler.
588 2001-11-25  Jim Meyering  <meyering@lucent.com>
590         * src/cksum.c (usage): Indent --help and --version strings to
591         start in the 7th column.
592         * src/pr.c (usage): Likewise.
594 2001-11-23  Jim Meyering  <meyering@lucent.com>
596         Factor out some common strings to make translation easier.
598         * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fmt.c, fold.c:
599         * head.c, join.c, md5sum.c, nl.c, od.c, paste.c, pr.c, ptx.c:
600         * sort.c, split.c, sum.c, tac.c, tail.c, tr.c, tsort.c, unexpand.c:
601         * uniq.c, wc.c: Split usage strings so that --help and --version
602         descriptions are alone in their own string.
603         Likewise for the one that says ``Mandatory arguments to long
604         options are mandatory for short options too.''
605         Suggestion from Karl Eichwalder.
607         * src/ptx.c (main): Don't split copyright string in the middle
608         of a sentence.
610 2001-11-22  Jim Meyering  <meyering@lucent.com>
612         * Version 2.0.17.
614         csplit could get a failed assertion: printf 'a\n\n'|csplit - '/^$/' 2
615         * src/csplit.c: No longer include assert.h.
616         (process_line_count): Remove invalid assertion.  The test that caused
617         the failure has been in the code since before 1992-11-08, but since
618         1996 it's been in an assertion.  That assertion was disabled by default
619         until textutils-1.22g (1999-01-10).  Reported by Eric Pemente.
621         * tests/misc/csplit: New file.  Test for the above fix and others.
622         * tests/misc/Makefile.am (TESTS): Add csplit.
623         * tests/Makefile.am (EXTRA_DIST): Add lang-default.
625 2001-11-19  Jim Meyering  <meyering@lucent.com>
627         * src/tail.c (xlseek): New function.
628         Call it instead of lseek, in most cases, so any failure is reported.
630 2001-11-18  Jim Meyering  <meyering@lucent.com>
632         * config.sub: Update from master repository.
633         * config.guess: Likewise.
635 2001-11-17  Jim Meyering  <meyering@lucent.com>
637         * Makefile.cfg ($(srcdir)/m4/jm-glibc-io.m4): Use $(move_if_change),
638         not the literal `move-if-change'.
640         * src/tail.c (tail_forever): Add a cast.
642         Avoid compiler warnings.
643         * src/fmt.c: Remove `unsigned' attribute from type of global `prefix'.
644         (copy_rest): Cast to (unsigned char *) before dereferencing.
645         (get_prefix): Likewise.
647         * configure.ac: Replace use of the one-arg form of AC_INIT
648         with a use of the 3-arg form and a use of AC_CONFIG_SRCDIR.
650 2001-11-14  Paul Eggert  <eggert@twinsun.com>
652         * src/tail.c (file_lines): Remove unnecessary cast.
653         (tail_lines): Could have called file_lines even though the first
654         lseek failed.  Fix that.
656 2001-11-14  Jim Meyering  <meyering@lucent.com>
658         * src/tail.c (file_lines): Add a parameter, start_pos.
659         Work properly even when the read pointer is not at beginning of file.
660         (tail_lines): Call file_lines for any regular file, as long as lseek
661         can be used to seek to its end, not just when the initial read pointer
662         is at beginning of file.
664 2001-11-13  Jim Meyering  <meyering@lucent.com>
666         * src/tail.c (tail_lines): Move declaration of local `length'
667         into scope where it's used.
668         (tail_file): Likewise for local `stats'.
670         * tests/tail-2/Makefile.am (TESTS): Add proc-ksyms and start-middle.
671         * tests/tail-2/start-middle: New test, for the bug fixed on 1995-07-24.
673         `tail /proc/ksyms' would segfault on Linux.
674         * src/tail.c (tail_lines): Use status of lseek (...SEEK_END) call
675         in deciding whether to call file_lines or pipe_lines.
676         From Herbert Xu.
677         * tests/tail-2/proc-ksyms: New test, for the above fix.
679 2001-11-11  Jim Meyering  <meyering@lucent.com>
681         * src/od.c (struct tspec): Declare function pointer with prototype.
683         * src/sum.c (main): Declare function pointer with prototype.
685         * src/tsort.c (count_items): Mark parameter as unused.
687         * src/sort.c (struct_month_cmp): Guard definition with the same
688         cpp condition that guards the use.
690         * src/tail.c (xwrite): Remove assertion that size_t N >= 0.
692         * src/pr.c (struct COLUMN) [print_func]: Declare with a protype.
693         (struct COLUMN) [char_func]: Declare with a protype.
695         * src/od.c (parse_old_offset): Declare to be static.
697         * src/join.c (make_blank): Declare to be static.
698         (prfield): Declare local to be of type size_t, not int.
700         Some help strings were very long.  Split them so that
701         they're no longer than the magic length 509 that ISO C89
702         compilers are required to support.  Sorry, translators :-(
704         * src/md5sum.c (usage): Split --help output into smaller pieces.
705         * src/ptx.c (main, usage): Likewise.
706         * src/fmt.c (usage): Likewise.
708         * src/wc.c (usage): Split --help output into smaller pieces.
709         Use fputs, not printf.
710         * src/cat.c (usage): Likewise.
711         * src/cut.c (usage): Likewise.
712         * src/csplit.c (usage): Likewise.
713         * src/expand.c (usage): Likewise.
714         * src/head.c (usage): Likewise.
715         * src/join.c (usage): Likewise.
716         * src/nl.c (usage): Likewise.
717         * src/od.c (usage): Likewise.
718         * src/pr.c (usage): Likewise.
719         * src/sort.c (usage): Likewise.
720         * src/split.c (usage): Likewise.
721         * src/tac.c (usage): Likewise.
722         * src/tr.c (usage): Likewise.
723         * src/unexpand.c (usage): Likewise.
724         * src/uniq.c (usage): Likewise.
725         * src/tail.c (usage): Likewise.
727         * src/sys2.h (alloca) [__GNUC__]: Define only if not already defined.
729         * src/Makefile.am (sort_LDADD): Reflect spelling change:
730         s/POW_LIBM/POW_LIB/.
732 2001-11-10  Jim Meyering  <meyering@lucent.com>
734         * src/nl.c (proc_text): Use `puts' to output a string of spaces,
735         not printf.  This avoids a warning from gcc's -Wformat-security.
737 2001-11-09  Jim Meyering  <meyering@lucent.com>
739         * configure.ac: Use AC_CONFIG_FILES(...) and call AC_OUTPUT with no
740         arguments.
742 2001-11-05  Jim Meyering  <meyering@lucent.com>
744         * src/sort.c (usage): Don't recommend setting LC_COLLATE=C.
745         That can cause problems (now documented in coreutils.texi).
747 2001-11-04  Jim Meyering  <meyering@lucent.com>
749         * uniq.c, unexpand.c, tail.c, tac.c, split.c, sort.c, pr.c, paste.c:
750         * od.c, nl.c, head.c, fold.c, expand.c, cut.c, csplit.c (usage):
751         Say that ``Mandatory arguments to long options are mandatory for
752         short options too.''
754         * src/ptx.c (usage): Add one-line description.
756 2001-10-28  Jim Meyering  <meyering@lucent.com>
758         * tests/sum/sysv: New test for the fix below.
759         * tests/sum/Makefile.am (TESTS): Add sysv.
761 2001-10-27  Paul Eggert  <eggert@twinsun.com>
763         * src/sum.c: Include human.h.
764         (ROTATE_RIGHT): Remove; it was slow and the comment was
765         misleading anyway.
766         (bsd_sum_file): Avoid unsigned and long when they're not needed.
767         Compute total input bytes as uintmax_t, not long, so that the
768         code works even with files whose size does not fit in 'long'.
769         (sysv_sum_file): Likewise.
770         (sysv_sum_file): Do not reduce checksum until the end; this is
771         what System V does.
772         Reported by Nick Lawes.
774 2001-10-27  Jim Meyering  <meyering@lucent.com>
776         Give an accurate diagnostic when `head --bytes=30M' fails.
777         * src/head.c (string_to_integer): Check explicitly for overflow,
778         and lump everything else together as `invalid'.
780 2001-10-04  Jim Meyering  <meyering@lucent.com>
782         Rename --all-repeated argument `precede' to `prepend'.
783         * src/uniq.c (enum delimit_method): s/DM_PRECEDE/DM_PREPEND/
784         and change all uses.
785         (delimit_method_string): s/precede/prepend/
786         * tests/uniq/Test.pm: Adjust tests accordingly.
787         Patches by Padraig Brady.
789         * src/uniq.c (usage): Correct typo in description of --all-repeated.
790         Patch by Padraig Brady.
792 2001-09-30  Jim Meyering  <meyering@lucent.com>
794         * Version 2.0.16.
796         tail -F would segfault
797         * src/tail.c (parse_options): Add missing `break;' from last change.
799 2001-09-28  Jim Meyering  <meyering@lucent.com>
801         * configure.ac: Tell automake to use the file name `config.hin'
802         rather than the two-`.' config.h.in.
804 2001-09-26  Jim Meyering  <meyering@lucent.com>
806         * man/Makefile.am (common_dep): Define it, so we depend on configure.ac.
808         * configure.ac: Renamed from configure.in.
810 2001-09-25  Jim Meyering  <meyering@lucent.com>
812         * src/Makefile.am (sort_DEPENDENCIES): Remove definition altogether.
813         It adds nothing to the existing: $(PROGRAMS): ../lib/libfetish.a.
815 2001-09-24  Paul Eggert  <eggert@twinsun.com>
817         * src/Makefile.am (sort_DEPENDENCIES): Depend only on
818         ../lib/libfetish.a, not on $(LDADD), since the latter may
819         contain `-lintl'.  This resembles yesterday's patch for the
820         `$(PROGRAMS)' rule.
822 2001-09-23  Jim Meyering  <meyering@lucent.com>
824         * Version 2.0.15.
826         * src/Makefile.am ($(PROGRAMS)): Depend only on ../lib/libfetish.a,
827         not on $(LDADD), since the former may contain `-lintl'.
829         * Makefile.am (SUBDIRS): When using newer gettext (in which
830         intl/libintl.h is created by rules intl/Makefile)
831         `intl' must precede `lib'.
833 2001-09-22  Jim Meyering  <meyering@lucent.com>
835         * ABOUT-NLS: Upgrade to gettext 0.10.40
836         * intl: Upgrade entire directory to gettext 0.10.40
837         * po/ChangeLog: New file.
839         * Makefile.am (DISTCLEANFILES): Remove definition, since intl/libintl.h
840         is no longer created via configure.
842         * tests/od/od-N: New test for the 2001-09-19 fix by Ian Bruce.
843         * tests/od/Makefile.am: New file.
844         * tests/od: New directory.
845         * tests/Makefile.am (SUBDIRS): Add od.
846         * configure.in (AC_OUTPUT): Add tests/od/Makefile.
848 2001-09-19  Paul Eggert  <eggert@twinsun.com>
850         * src/od.c (MAX_ADDRESS_LENGTH, pseudo_offset, format_address,
851         n_bytes_to_skip, skip, format_address_none,
852         format_address_std, format_address_paren,
853         format_address_label, write_block, parse_old_offset, dump,
854         dump_strings, main):
855         Use uintmax_t, not off_t, for file addresses, so that we can
856         handle multiple large files even if the sum of their sizes
857         exceeds off_t limits.
859         (print_s_char, print_char, print_s_short, print_short,
860         print_int, print_long, print_long_long, print_float,
861         print_double, print_long_double, dump_hexl_mode_trailer,
862         print_named_ascii, print_ascii, decode_one_format):
863         Use size_t, not off_t, for in-memory byte counts.
865         (end_offset): New var.
866         (dump, dump_strings): Use it.
867         (main): Set it, but check for overflow while doing so.
869         (skip): Report an error if an in-range lseek fails on a
870         regular file, as something's seriously wrong.  Check for
871         negative regular file sizes (possible with some broken NFS
872         implementations).
874         (parse_old_offset): Now all offsets are valid, so return a
875         success boolean and take a pointer to an offset as an argument.
876         All callers changed.
878         (dump_strings): Check for overflow when computing end_offset -
879         string_min.
881         (main): Remove OFF_T_MAX checks that are no longer needed.
882         Don't bother assigning through temporary when there's no size
883         limit to check.
885 2001-09-19  Jim Meyering  <meyering@lucent.com>
887         * src/od.c (open_next_file): Use SETVBUF, not setbuf.
888         (skip): Revert part of last change: use lseek, not fseek.
890         When --read-bytes=N (-N N) is used, disable input buffering in
891         the standard I/O library.  Otherwise, od would read more input
892         than requested.  This could have caused problems when reading
893         from pipes, character devices, or open file descriptors inherited
894         from a parent process.
896         * src/od.c (open_next_file): New function, factored out of...
897         (skip): Adapt to use open_next_file.
898         (read_char): Likewise.
899         (read_block): Likewise.
900         (main): Likewise.
901         (dump): Fix an off-by-one error that could have made od fail to
902         report a read error when reading from a named file (not stdin).
903         (check_and_close): Account for the fact that in_stream may now be NULL.
904         (usage): Correct descriptions of -j and -N options.
905         Patch by Ian Bruce.
907 2001-09-16  Jim Meyering  <meyering@lucent.com>
909         * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5.
911         * man/Makefile.am: Revamp this file, as for fileutils.
913         * src/md5sum.c (digest_check): On systems for which setmode actually
914         does something, arrange to read the file containing checksum strings
915         in text mode.  Based on a patch from Chris Faylor.
916         * src/system.h (SET_MODE): Define.
918 2001-09-12  Jim Meyering  <meyering@lucent.com>
920         The command `echo a|./fmt -2147483647' would cause fmt to segfault.
921         * src/fmt.c (fmt_paragraph): Test for sentinal directly, rather than
922         doing arithmetic with it's potentially large (INT_MAX) length.
923         * tests/fmt/basic: Add tests for the above.
925         tail: accept new option: -F, equivalent to `--follow=name --retry',
926         for compatibility with FreeBSD and NetBSD versions of tail.
928         * src/tail.c (usage): Describe new option.
929         (parse_options): Accept it.
930         Patch by Christian Kurz, via Herbert Xu.
932         The command `echo foo|fmt -w N' for N>=32K would cause fmt to segfault.
934         * src/fmt.c [struct Word]: Declare members length, space, and
935         line_length to be of type `int', not short.
936         (MAXCOST): Define using TYPE_MAXIMUM.
937         Reported by Herbert Xu.
939 2001-08-31  Jim Meyering  <meyering@lucent.com>
941         * src/fmt.c (bool): Remove typedef, now that it's in system.h.
942         (TRUE): Define to `true', not 1.
943         (FALSE): Define to `false', not 0.
945 2001-08-30  Paul Eggert  <eggert@twinsun.com>
947         * src/cat.c: Include full-write.h.
948         (full_write): Remove decl; not needed.
949         * src/split.c: Likewise.
951         * src/cat.c (simple_cat, cat):
952         Don't assume read and write size fits in int.
954 2001-08-28  Jim Meyering  <meyering@lucent.com>
956         * src/fmt.c (main): Correct the diagnostic for invalid argument to -w.
957         (main): Diagnose an invalid, old-style width option.
959 2001-08-27  Jim Meyering  <meyering@lucent.com>
961         * Makefile.maint: Undo last change.  Instead, simply remove `N_(',
962         since the `Copyright ...' line should not be translated.
964 2001-08-26  Jim Meyering  <meyering@lucent.com>
966         * Makefile.maint (copyright-check): Update to reflect fact that
967         the copyright year is now defined separately.
969 2001-08-08  Charles Randall <crandall@matchlogic.com>
971         * src/sort.c (mergefps): Do not allocate at least sort_size
972         bytes for each merge buffer.  Instead, allocate at least
973         sort_size bytes total.
975 2001-08-25  Jim Meyering  <meyering@lucent.com>
977         * tests/uniq/Test.pm: Re-enable some commented-out tests.
979 2001-08-25  Paul Eggert  <eggert@twinsun.com>
981         * src/uniq.c (main): Fix a typo in the previous patch: missing
982         a bounds check for examples like `uniq a b c'.
984         * uniq.c (main): Fix some more incompatibilities with POSIX.2,
985         (e.g. `uniq +3 --' did not work) by invoking getopt_long with
986         leading '-', resembling what was done to 'sort' on 2001-03-20.
987         Recognize an +N option only if it is an integer in range, and
988         (if POSIXLY_CORRECT) only if a file name argument has not been seen;
989         otherwise silently treat it as a file name.
991         If the user specifies too many operands, output the first one
992         in the error message, as a diagnostic aid.
994 2001-08-24  Paul Eggert  <eggert@twinsun.com>
996         * src/uniq.c (main): Don't report an error when given the
997         valid options `+3 -d'.
999 2001-08-24  Paul Eggert  <eggert@twinsun.com>
1001         * src/uniq.c (different): Don't assume that lengths can fit
1002         into size_t.  Tune code for the common case where the line
1003         lengths differ: we avoid comparing them entirely in that case.
1005 2001-08-25  Jim Meyering  <meyering@lucent.com>
1007         * tests/uniq/Test.pm: Add tests for -s 0 and -w 0.
1009 2001-08-24  Paul Eggert  <eggert@twinsun.com>
1011         Remove arbitrary restrictions on sizes, fixing a bug reported
1012         by Geoff Whale.
1014         * src/uniq.c (skip_fields, skip_chars, check_chars): Now size_t,
1015         not int.
1016         (size_opt): New function.  Do not arbitrarily reject size zero.
1017         Change the wording of the error message slightly, for convenience.
1018         (find_field): Use size_t, not int, to compute sizes.
1019         (different, main): check_chars==0 is no longer a special case, as
1020         it defaults to SIZE_MAX.
1021         (main): Check for overflow with args like -234234234234234.
1022         Use 'size_opt' to convert optional arguments to sizes.
1024 2001-08-25  Jim Meyering  <meyering@lucent.com>
1026         * tests/uniq/Test.pm: Add new test, #54, for the just-fixed bug.
1028 2001-08-24  Paul Eggert  <eggert@twinsun.com>
1030         * src/uniq.c (find_field): Don't count trailing newline to be
1031         part of the field.  This disagrees with POSIX.2, but it's
1032         gotta be a bug in the standard.  An interpretations request
1033         has been submitted to PASC.
1034         Reported by Geoff Whale.
1036 2001-08-18  Jim Meyering  <meyering@lucent.com>
1038         * Makefile.maint: Merge in changes from autoconf.
1040         * Makefile.maint ($(v_etc_file)): Define.
1041         (copyright-check): Use the new variable.
1042         (my-distcheck): Depend on local-check so those checks are once
1043         again run by `make distcheck'.
1045         * src/head.c (head_bytes): Read no more than the specified
1046         number of bytes.  Patch by Ian Bruce.
1048         * tests/misc/head-c: New test for the above.
1049         * tests/misc/Makefile.am: New file.
1050         * tests/misc: New directory.
1051         * tests/Makefile.am (SUBDIRS): Add misc.
1052         * configure.in (AC_OUTPUT): Add tests/misc/Makefile.
1054 2001-08-14  Jim Meyering  <meyering@lucent.com>
1056         * src/Makefile.am (INCLUDES): Add -I../lib so sys2.h can include
1057         the new, generated file, unlocked-io.h.
1059 2001-08-13  Jim Meyering  <meyering@lucent.com>
1061         * src/cat.c (AUTHORS): Mark string for translation, since it
1062         contains the English word `and'.
1063         * src/comm.c: Likewise
1064         * src/csplit.c: Likewise
1065         * src/cut.c: Likewise
1066         * src/md5sum.c: Likewise
1067         * src/nl.c: Likewise
1068         * src/paste.c: Likewise
1069         * src/pr.c: Likewise
1070         * src/sort.c: Likewise
1071         * src/split.c: Likewise
1072         * src/sum.c: Likewise
1073         * src/tac.c: Likewise
1074         * src/uniq.c: Likewise
1075         * src/wc.c: Likewise
1077 2001-08-12  Jim Meyering  <meyering@lucent.com>
1079         * tests/mk-script ($program_name): Define.
1080         (main): Use $program_name, rather than long-inaccurate `build-script'.
1081         (main): Iterate over the sorted keys (rather than `while...each...'),
1082         so this script produces the same output regardless of which version
1083         of perl (e.g., perl5.6) is used.
1085 2001-08-04  Jim Meyering  <meyering@lucent.com>
1087         * Makefile.am (EXTRA_DIST): Add Makefile.cfg.
1089         * man/Makefile.am (EXTRA_DIST): Remove duplicate definition.
1091 2001-07-08  Jim Meyering  <meyering@lucent.com>
1093         * src/tail.c (usage): Reformat so help2man generates a properly
1094         indented man page.  Patch by Herbert Xu.
1096 2001-07-04  Jim Meyering  <meyering@lucent.com>
1098         * Makefile.cfg: New file with package-specific definitions.
1099         * Makefile.am (EXTRA_DIST): Add Makefile.cfg.
1101 2001-07-01  Jim Meyering  <meyering@lucent.com>
1103         * src/sort.c (usage): Suggest setting LC_COLLATE=C, rather
1104         than LC_ALL=C.
1106 2001-06-10  Jim Meyering  <meyering@lucent.com>
1108         * tests/sort/Test.pm: Add a test based on a report from Herbert Xu.
1110 2001-05-20  Jim Meyering  <meyering@lucent.com>
1112         * src/uniq.c: Rename new option values: s/all/precede/ and
1113         s/minimum/separate/.
1114         * tests/uniq/Test.pm: Reflect the above renamings.
1116 2001-05-12  Bruno Haible  <haible@clisp.cons.org>
1118         * src/tail.c (parse_obsolescent_option): Accept a b suffix.
1120 2001-05-19  Jim Meyering  <meyering@lucent.com>
1122         msgmerge-0.10.37 complains about some `invalid multibyte sequences.'
1123         * po/el.po: Remove the offending entries.
1124         * po/ko.po: Likewise.
1125         * po/zh.po: Likewise.
1127 2001-05-19  Jim Meyering  <meyering@lucent.com>
1129         Support new modes for uniq's --all-repeated option.
1130         The default behavior is unchanged.
1132         * src/uniq.c: Include argmatch.h.
1133         (usage): Update.
1134         (check_file): Implement it.
1135         (main): Handle new, optional arguments.
1136         * tests/uniq/Test.pm: New tests for the above.
1137         Patch by Padraig Brady.
1139 2001-05-12  Bruno Haible  <haible@clisp.cons.org>
1141         * src/tail.c (parse_obsolescent_option): Use t_count_lines, not
1142         count_lines, in error message.
1144 2001-05-05  Jim Meyering  <meyering@lucent.com>
1146         * src/comm.c (usage): Correct description of -3.
1147         Reported by Soeren Sonnenburg.
1149 2001-04-22  Jim Meyering  <meyering@lucent.com>
1151         * Version 2.0.14.
1153         * configure: Regenerate using a patched copy of autoconf-2.49e to
1154         work around a bug in its test for a working memcmp function.
1156 2001-03-28  Paul Eggert  <eggert@twinsun.com>
1158         * src/cksum.c: Fix bugs when computing length of large files.
1159         Add overflow and write error checks.  Use uint_fast32_t, not
1160         unsigned long, to do checksum calculation, as C99 says
1161         uint_fast32_t should be no slower and might be faster.
1163         Include <stdio.h> and "system.h" even if CRCTAB is defined,
1164         so that the code will compile if CRCTAB is defined.
1165         Include "human.h" if CRCTAB is not defined.
1166         (uint_fast32_t): Define if it appears that stdint.h didn't.
1167         (BIT, remainder, main, crctab): Use uint_fast32_t, not unsigned long,
1168         for checksums.
1169         (fill_r, remainder, main): Use ANSI prototypes.
1170         (fill_r, remainder, main): Omit duplicate code.
1171         (main): Use uintmax_t, not unsigned long, for file lengths.
1172         Use size_t, not long, for result of fread.
1173         Check for overflow when computing file lengths.
1174         Check for write error immediately after printing a line, so that
1175         we don't write to stdout indefinitely after an error.
1177 2001-04-14  Paul Eggert  <eggert@twinsun.com>
1179         * src/sort.c (default_sort_size): Leave a 1/16 margin for RSS.
1180         Suggestion from Solar Designer.
1182 2001-04-14  Jim Meyering  <meyering@lucent.com>
1184         * src/wc.c (usage): Tweak --help output: s/line,/newline,/
1186 2001-04-13  Jim Meyering  <meyering@lucent.com>
1188         * src/sort.c (main): Add a comment justifying the use of
1189         `multi-character' rather than `multibyte' in a diagnostic.
1190         From Paul Eggert.
1192 2001-04-12  Paul Eggert  <eggert@twinsun.com>
1194         * src/sort.c (RLIMIT_AS): Do not define; just use conditional
1195         code, since RLIMIT_RSS is similar (and is not standardized).
1196         (default_sort_size): Don't allocate more than the RSS limit,
1197         if this host has such a limit.
1199 2001-03-20  Paul Eggert  <eggert@twinsun.com>
1201         * NEWS, doc/textutils.texi: sort now accepts long options and
1202         checks POSIX option syntax.
1204         * doc/textutils.texi: Document --, -, sort long options, and
1205         sort -o after files.
1207         * src/sort.c: Include <getopt.h>.
1208         (usage, main): Add support for long options, and check option
1209         syntax as POSIX requires, though (as usual for GNU apps)
1210         options can follow file names unless POSIXLY_CORRECT is set.
1211         Many diagnostic revamped.
1212         (long_options): New constant.
1213         (badfieldspec): New arg MSGID.  Mark as noreturn.
1214         (parse_field_count): New arg MSGID; if null, just return null on error.
1215         (new_key): Renamed from key_init.  All callers changed.  Now allocates
1216         the new key.
1218 2001-03-18  Jim Meyering  <meyering@lucent.com>
1220         * Version 2.0.13.
1222         * tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL
1223         to $DJDIR/bin/bash.exe.  Patch from Richard Dawe, based on a
1224         suggestion from Eli Zaretskii.
1226 2001-03-17  Paul Eggert  <eggert@twinsun.com>
1228         * src/sort.c, src/tail.c, src/uniq.c (usage):
1229         Warn that the +N form will be withdrawn.
1230         * doc/textutils.texi: Likewise.
1232 2001-03-08  Paul Eggert  <eggert@twinsun.com>
1234         * NEWS, doc/textutils.texi: Document pr changes.
1236         * src/pr.c: Include mbswidth.h.
1237         (standard_header, header, test_suite): Remove.
1238         (date_format, date_text, file_text, header_width_available): New vars.
1239         (long_options, main, init_header, usage):
1240         Add new -D or --date-format option.
1241         (CHARS_FOR_DATE_AND_PAGE, T_BUF_FMT, T_BUF_SIZE, NO_DATE): Remove.
1242         (init_header): Allow arbitrary width for date format.  Change
1243         "Page %5d" to "Page %d", since the code no longer assumes fixed width.
1244         Do not assume that localtime succeeds.
1245         (init_header, print_header, usage): Do not truncate headers.
1246         (init_header, print_header): Defer width calculations until
1247         page is printed, since "Page 100000" is wider than "Page 1".
1248         Count columns, not bytes, in page headers.
1249         Custom headers take up only the center, not the whole header.
1250         (print_header): Use printf rather than fprintf(stdout).
1252         * po/Makefile.in.in (install-data-yes): Install LC_TIME locale
1253         for all packages, not just for fileutils.
1254         (uninstall): Remove LC_TIME locale too.
1256         * src/sys2.h (INT_STRLEN_BOUND): New macro.
1258         * tests/pr/0F, tests/pr/0FF, tests/pr/2-S_f-t_notab,
1259           tests/pr/2-Sf-t_notab, tests/pr/2f-t_notab,
1260           tests/pr/2s_f-t_notab, tests/pr/2s_w60f-t_nota,
1261           tests/pr/2sf-t_notab, tests/pr/2sw60f-t_notab,
1262           tests/pr/2w60f-t_notab, tests/pr/3-0F, tests/pr/3-5l17f-t,
1263           tests/pr/3-FF, tests/pr/3a2l17-FF, tests/pr/3a3f-0F,
1264           tests/pr/3a3l15-t, tests/pr/3a3l8f-t, tests/pr/3b2l17-FF,
1265           tests/pr/3b3f-0F, tests/pr/3b3f-0FF, tests/pr/3b3f-FF,
1266           tests/pr/3b3l15-t, tests/pr/3b3l8f-t, tests/pr/3f-0F,
1267           tests/pr/3f-FF, tests/pr/3l17f-t, tests/pr/3l24-t,
1268           tests/pr/3ml17f-t, tests/pr/3ml24-FF, tests/pr/3ml24-t,
1269           tests/pr/3ml24-t-FF, tests/pr/4-7l24-FF, tests/pr/4l24-FF,
1270           tests/pr/a2l15-FF, tests/pr/a2l17-FF, tests/pr/a3-0F,
1271           tests/pr/a3f-0F, tests/pr/a3f-0FF, tests/pr/a3f-FF,
1272           tests/pr/a3l15-t, tests/pr/a3l17f-lm, tests/pr/a3l8f-t,
1273           tests/pr/b2l15-FF, tests/pr/b2l17-FF, tests/pr/b3-0F,
1274           tests/pr/b3f-0F, tests/pr/b3f-0FF, tests/pr/b3f-FF,
1275           tests/pr/b3l15-t, tests/pr/b3l17f-lm, tests/pr/b3l8f-t,
1276           tests/pr/FF, tests/pr/Ja3l17f-lm, tests/pr/Jb3l17f-lm,
1277           tests/pr/Jml17f-lm-lo, tests/pr/l17f-t, tests/pr/l24-FF,
1278           tests/pr/l24-t, tests/pr/ml17f-0F, tests/pr/ml17f-lm-lo,
1279           tests/pr/ml17f-t, tests/pr/ml17f-t-0F, tests/pr/ml20-FF-t,
1280           tests/pr/ml24-FF, tests/pr/ml24-t, tests/pr/ml24-t-FF,
1281           tests/pr/n+2-5l17f-0FF, tests/pr/n+2l17f-0FF,
1282           tests/pr/n+2l17f-bl, tests/pr/n+3-7l24-FF,
1283           tests/pr/n+3l17f-0FF, tests/pr/n+3l17f-bl,
1284           tests/pr/n+3ml13f-bl-FF, tests/pr/n+3ml17f-bl-tn,
1285           tests/pr/n+3ml17f-tn-bl, tests/pr/n+4-8a2l17-FF,
1286           tests/pr/n+4b2l10f-0FF, tests/pr/n+5-8b3l10f-FF,
1287           tests/pr/n+5a3l6f-0FF, tests/pr/n+6a2l17-FF,
1288           tests/pr/n+6b3l6f-FF, tests/pr/n+7l24-FF,
1289           tests/pr/n+8l20-FF, tests/pr/nJml17f-lmlmlo,
1290           tests/pr/nJml17f-lmlolm, tests/pr/nl17f-bl,
1291           tests/pr/nN1+3l17f-bl, tests/pr/nN15l17f-bl,
1292           tests/pr/nSml13-bl-FF, tests/pr/nSml13-t-t-FF,
1293           tests/pr/nSml13-t-tFFFF, tests/pr/nSml17-bl-FF,
1294           tests/pr/nSml17-t-t-FF, tests/pr/nSml17-t-tFFFF,
1295           tests/pr/o3a3l17f-tn, tests/pr/o3a3Sl17f-tn,
1296           tests/pr/o3a3Snl17f-tn, tests/pr/o3b3l17f-tn,
1297           tests/pr/o3b3Sl17f-tn, tests/pr/o3b3Snl17f-tn,
1298           tests/pr/o3Jml17f-lm-lo, tests/pr/o3ml17f-bl-tn,
1299           tests/pr/o3mSl17f-bl-tn, tests/pr/o3mSnl17fbltn,
1300           tests/pr/Test.pm, tests/pr/W-72l17f-ll, tests/pr/W20l17f-ll,
1301           tests/pr/W26l17f-ll, tests/pr/W27l17f-ll,
1302           tests/pr/W28l17f-ll, tests/pr/W35a3l17f-lm,
1303           tests/pr/W35b3l17f-lm, tests/pr/W35Ja3l17f-lm,
1304           tests/pr/W35Jb3l17f-lm, tests/pr/W35Jml17f-lmlo,
1305           tests/pr/W35ml17f-lm-lo, tests/pr/W72Jl17f-ll,
1306           tests/pr/w72l17f-ll:
1307         Adjust to minor spacing changes in pr headers.
1309 2001-03-11  Paul Eggert  <eggert@twinsun.com>
1311         * src/sort.c (die): New message arg, to describe failures
1312         better.  All callers changed.
1314 2001-03-11  Paul Eggert  <eggert@twinsun.com>
1316         * src/sort.c: Decrease buffer size when only merging or checking.
1317         (sort_size): Now the user-specified sort size.
1318         (MIN_MERGE_BUFFER_SIZE): New macro.
1319         (MIN_SORT_SIZE): Use it.
1320         (merge_buffer_size): New variable.
1321         (fillbuf): Increase merge_buffer_size if a longer line is encountered.
1322         (checkfp, mergefps): Do not allocate a buffer smaller than
1323         merge_buffer_size.
1324         (sort): Use the default_sort_size if sort_size is zero.
1325         (main): Do not set sort_size to default_sort_size.
1327 2001-03-06  Paul Eggert  <eggert@twinsun.com>
1329         * src/sort.c (sort): If all the input files are empty, create
1330         an empty output file.
1331         * tests/sort/Test.pm: Test for this.
1333 2001-03-13  Jim Meyering  <meyering@lucent.com>
1335         * src/sort.c (merge): Move declarations of local variables into
1336         the inner scope where they're used.
1337         (sort): Likewise.
1339 2001-03-06  Paul Eggert  <eggert@sic.twinsun.com>
1341         Avoid the need for a copy of the input file when the input and
1342         output overlap, e.g. 'sort F -o F'.  With -m, though, a copy
1343         is still needed sometimes.
1345         * doc/textutils.texi: 'sort F -o F' no longer needs to copy F.
1347         * src/sort.c: Do not include closeout.h.
1348         (xfopen): Use stdout if *how != 'r'.
1349         (mergefps): Remove FPS arg.
1350         Open all input files, and close all files when done.
1351         If OFP is null, open the output file (but after opening input files).
1352         All callers changed.
1353         (first_same_file): New function.
1354         (sort, merge): Remove arg OFP; we now open the output file as needed.
1355         All callers changed.
1356         (merge): New arg MAX_MERGE.  All callers changed.
1357         (sort): For "sort F -o F", close the input before opening the output.
1358         (main): Do not use close_stdout; 'sort' and 'merge' now close stdout.
1359         (This also fixes a close-stdout-twice bug.)
1360         Remove test for overlapping input and output files, as 'sort' no longer
1361         needs to worry about overlap, and 'merge' checks for overlap itself.
1362         Use first_same_file to inform 'merge' about how much to merge at
1363         the top level, to avoid overlap.
1365 2001-03-12  Jim Meyering  <meyering@lucent.com>
1367         `fmt --prefix=S' would not work properly for any string S containing
1368         a byte with the high bit set.
1369         * src/fmt.c (prefix): Declare to be of type unsigned char, not `char'.
1370         (get_prefix): Likewise for local, `p'.
1371         Reported by François Pinard.
1373         Add a test for the above-fixed problem.
1374         * tests/fmt: New directory/files.
1375         * configure.in (AC_OUTPUT): Add tests/fmt/Makefile.
1376         * tests/Makefile.am (SUBDIRS): Add fmt.
1378 2001-03-05  Andreas Schwab  <schwab@suse.de>
1380         * src/tac.c (save_stdin): Use mkstemp to create temporary file.
1382 2001-03-09  Jim Meyering  <meyering@lucent.com>
1384         * Makefile.maint (my_distdir): Define new variable, and use this
1385         in place of most old uses of $(distdir).
1387         * tests/help-version: Ensure that /dev/full is a character device
1388         (using test -c) as well as being writable, before trying to write to it.
1389         Otherwise, the test could mistakenly append a newline to an existing,
1390         regular, writable, /dev/full file.
1391         Suggested by Ulrich Drepper.
1393 2001-03-08  Jim Meyering  <meyering@lucent.com>
1395         * tests/sha1sum/sample-vec: Insert the `--text' argument for each test.
1396         Reported by Matthew Smith.
1398 2001-03-04  Jim Meyering  <meyering@lucent.com>
1400         * Makefile.maint (my_distdir): Define.
1401         Use it in place of $(distdir) almost everywhere.
1403         * Version 2.0.12.
1405         * Makefile.maint (alpha): Use $(PACKAGE)-$(VERSION), not $(distdir),
1406         since the latter now has a `$(top_distdir)/' prefix.
1408 2001-03-01  Paul Eggert  <eggert@twinsun.com>
1410         * src/sort.c (die): New function.
1411         (create_temp_file, xfopen, xfclose, write_bytes, sort_buffer_size,
1412         fillbuf, main): Use it to regularize error messages.  The only change
1413         in behavior is that write_bytes and the final close used to say "write
1414         error" but now give just the output file name, which should be enough.
1416 2001-03-01  Paul Eggert  <eggert@twinsun.com>
1418         * src/sort.c (xfclose): Add FILE arg, and report the file name
1419         on error.  All callers changed.
1421 2001-03-01  Paul Eggert  <eggert@twinsun.com>
1423         * src/sort.c (main): When fclose (stdin) fails, do not mention
1424         the output file in the error message; mention "-" instead.
1426 2001-02-28  Paul Eggert  <eggert@twinsun.com>
1428         * src/sort.c (xfopen): Set have_read_stdin to 1 only if file is "-".
1429         Use fopen_safer, not fopen, to avoid subtle bugs when fopen returns
1430         stdin, stdout, or stderr.
1431         (xfclose): stdout is no longer a special case.
1432         (main): Close output file, don't just flush it; there might be
1433         an error on the close.
1435 2001-02-27  Paul Eggert  <eggert@twinsun.com>
1437         * src/sort.c (initbuf): If the desired size cannot be
1438         allocated, repeatedly halve it until allocation succeeds.
1439         Reported by Solar Designer.
1441 2001-02-26  Paul Eggert  <eggert@twinsun.com>
1443         * src/sort.c (parse_field_count): Comment fix.
1445 2001-02-25  Paul Eggert  <eggert@twinsun.com>
1447         * src/sort.c: Tune allocation and comparison of nodes
1448         representing temp files.  This improved CPU performance of
1449         'sort -S 1 *.[ch]' by 17% on my host.
1451         (struct tempnode): name member now uses struct hack.
1452         (temphead): Now a pointer, not a structure.  All uses changed.
1453         (create_temp_file): Allocate node using struct hack.
1454         (zaptemp): Free node using struct hack.  Use pointer comparison, not
1455         string comparison.
1457 2001-02-25  Paul Eggert  <eggert@twinsun.com>
1459         * src/sort.c (eolchar, trim_trailing_blanks): Now static.
1461 2001-02-25  Paul Eggert  <eggert@twinsun.com>
1463         'sort' race condition fixes.
1465         Defend against a DoS attack where someone else creates a
1466         temporary file with the same name as ours.  Use mkstemp to do
1467         this, supplying our own mkstemp if the system doesn't have one.
1469         Also, fix a race condition during cleanup on hosts without
1470         sigaction.
1472         * src/sort.c (NAME_MAX_IN_DIR): Remove.
1473         (sigprocmask, sigset_t): New macros, defined only on older hosts.
1474         (caught_signals): New var.
1475         (xtmpfopen, tempname): Removed.
1476         (create_temp_file): New function, combining the functions of the old
1477         xtmpfopen and tempname.  All callers changed.
1478         Use mkstemp to create the file.
1479         (sighandler): On hosts without sigaction, ignore signals while
1480         cleaning up, instead of letting them interrupt cleanup.
1481         (main): Initialize caught_signals.  On hosts with sigaction, block all
1482         caught signals while handling one.  Remove duplicate code.
1484 2001-02-22  Jim Meyering  <meyering@lucent.com>
1486         * src/sort.c (keycompare): Move declarations of locals, lena and lenb,
1487         into the inner scope where they are used.
1489 2001-02-19  Jim Meyering  <meyering@lucent.com>
1491         * src/sort.c (AUTHORS): Add Paul Eggert.
1493         * src/wc.c (wc): Rename innermost `buf' to avoid shadowing warning.
1494         (wc): Rename local `wc' to avoid shadowing function name.
1496 2001-02-18  Paul Eggert  <eggert@twinsun.com>
1498         Fix a race condition: freed storage accessed during a signal handler.
1500         * src/sort.c (struct tempnode.next): Now volatile.
1501         (zaptemp): Free the file name after removing it from the temp list,
1502         not before, because a signal can arrive between the two actions
1503         and cleanup () traverses the list.
1505 2001-02-18  Paul Eggert  <eggert@twinsun.com>
1507         Check for input size, and do not overallocate memory.
1508         Also check for memory quotas.
1510         Revamp storage management so that line tables and character data are
1511         taken from the same buffer.  Line tables are now in reverse order,
1512         since they grow down while the character data grow up.
1514         * src/sort.c:
1515         (<sys/resource.h>): Include if HAVE_SYS_RESOURCE_H.
1516         (struct rlimit, getrlimit): Define a replacement if RLIMIT_DATA
1517         is not defined.
1518         (RLIMIT_AS): Define to RLIMIT_DATA if not defined.
1519         (struct lines): Remove.
1520         (struct buffer): New members nlines, line_bytes, eof.
1521         Remove member newline_free; no longer needed, since the code no longer
1522         runs out of line table space.
1523         (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): Remove.
1524         (sort_size): Renamed from sortalloc; now applies to the sum of the
1525         character data and the line table, not just the character data.
1526         (MIN_SORT_SIZE, INPUT_FILE_SIZE_GUESS): New macros.
1527         (linelength): remove.
1528         (specify_sort_size): Don't worry about the distinction between the
1529         character data and the line table; that is now the caller's
1530         responsibility.
1531         (default_sort_size): Return the value, instead of being executed for
1532         side effect.  Return half of available memory, or 1/16 of total memory,
1533         whichever is greater; except do not exceed 1/2 of quota.
1534         (sort_buffer_size): New function.
1535         (initbuf): New arg LINE_BYTES.  Ensure that the line array is properly
1536         aligned.  Initialize the new set of struct buffer members.
1537         (buffer_linelim): New function.
1538         (fillbuf): Return int, not size_t, since the callers merely care
1539         whether the result is nonzero.  New arg FILE so that error messages
1540         can report the file name.  Keep track of eof.  Initialize the line
1541         table too, taking its memory from the input buffer's memory; this
1542         subsumes the old findlines function and removes the need for worrying
1543         about running out of line table entries.
1544         (checkfp, mergefps, sortlines, merge, sort): Adjust to the new storage
1545         management regime, in particular the fact that line tables are now
1546         filled in by fillbuf and are in reverse order.
1547         (checkfp): Now takes char *, not const char *, since subroutines
1548         require that now.  Rewrite to avoid lint and duplicate code.
1549         If line length alloc calculation overflows,
1550         simply allocate enough memory to hold the line.
1551         (mergefps): New arg FILES, used for buffer size calculation and error
1552         messages.  Rewrite to avoid lint.  Do not loop if savealloc*2
1553         overflows.
1554         (mergefps, merge): Zap temporary files eagerly rather than lazily;
1555         this is needed because we now pass FILES to mergefps.
1556         (sortlines): Args now point at end of arrays, not at beginnings.
1557         (sort): Do not allocate temporary line array for sortlines;
1558         instead, take the space from the same buffer.
1559         (main): Adjust to sort_size and default_sort_size changes.
1561 2001-02-18  Jim Meyering  <meyering@lucent.com>
1563         Rename test input files to avoid conflicts on case-insensitive
1564         file systems.
1565         * tests/pr/2-Sf-t_notab: Rename from 2Sf-t_notab.
1566         * tests/pr/2-S_f-t_notab: Rename from 2S_f-t_notab.
1567         * tests/pr/W-72l17f-ll: Rename from W72l17f-ll.
1568         * tests/pr/Test.pm: Update file names to reflect renamings.
1569         Reported by Matthew Smith.
1571 2001-01-20  Jim Meyering  <meyering@lucent.com>
1573         * configure.in: Remove jm_CHECK_ALL_TYPES.
1574         Now it's invoked by jm_MACROS.
1576 2001-01-17  Jim Meyering  <meyering@lucent.com>
1578         * src/cksum.c (main): Use PACKAGE, not GNU_PACKAGE.
1579         * src/tsort.c (main): Likewise.
1580         * src/sort.c (main): Likewise.
1581         (usage): Convert each TAB in --help output to a sequence of 8 spaces.
1583 2001-01-07  Jim Meyering  <meyering@lucent.com>
1585         * src/tail.c (usage): Split a string that was longer than 2048 bytes.
1587 2001-01-03  Jim Meyering  <meyering@lucent.com>
1589         * src/sort.c (main): Remove embedded \n from diagnostic.
1591 2001-01-02  Jim Meyering  <meyering@lucent.com>
1593         * src/od.c (ulonglong_t): Define place-holder type to avoid some #if
1594         directives.
1595         (LONGEST_INTEGRAL_TYPE): Remove definition.
1596         (MAX_INTEGRAL_TYPE_SIZE): Use ulonglong_t instead of
1597         LONGEST_INTEGRAL_TYPE.
1598         (print_long_long): Compile this function even on systems without
1599         long long support.
1600         (decode_one_format): Remove #if directive.
1602         * src/od.c (decode_one_format): Guard use of print_long_long with
1603         `#if HAVE_UNSIGNED_LONG_LONG'.  From Darren Salt.
1604         Change all `#ifdef HAVE_UNSIGNED_LONG_LONG' to use `#if' instead.
1606 2000-12-23  Jim Meyering  <meyering@lucent.com>
1608         * src/sys2.h [HAVE_INTTYPES_H]: Include <inttypes.h>.
1610 2000-12-19  Jim Meyering  <meyering@lucent.com>
1612         * Version 2.0.11.
1614 2000-12-18  Paul Eggert  <eggert@twinsun.com>
1616         * NEWS, doc/textutils.texi: New "sort" option -S SIZE.
1618         * src/sys2.h (UINTMAX_MAX): New macro, taken from C99.
1620         * src/sort.c: Include physmem.h.
1621         (SORTALLOC, mergealloc, LINEALLOC): Remove.
1622         (sortalloc): Default to zero at program startup.
1623         (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): New macros.
1624         (usage, main): Add support for new -S SIZE option.
1625         (specify_sort_size, default_sort_size): New functions.
1626         (initlines): Do not let alloc exceed limit.
1627         (findlines): Likewise.
1628         (checkfp, mergefps, sort): Use sortalloc to size everything
1629         else, instead of relying on precomputed sizes.
1631 2000-12-17  Jim Meyering  <meyering@lucent.com>
1633         * doc/texinfo.tex: Update from master repository.
1634         * config.sub: Likewise.
1635         * config.guess: Likewise.
1637 2000-12-11  Jim Meyering  <meyering@lucent.com>
1639         * Version 2.0.10.
1641 2000-12-07  Jim Meyering  <meyering@lucent.com>
1643         * src/od.c (address_base): Declare to be static.
1645 2000-12-06  Paul Eggert  <eggert@twinsun.com>
1647         * src/od.c (address_base, address_pad_len): New var.
1648         (output_address_fmt_string, address_fmt_buffer, address_pad): Remove.
1649         (flag_pseudo_start): Now int, not long int.
1650         (pseudo_offset): Now off_t, not long int.
1651         (n_specs, n_specs_allocated): Now size_t, not unsigned int.
1652         (format_address, format_address_none, format_address_std,
1653         format_address_label): Now accepts an extra char argument (an extra
1654         char to print if nonzero), and prints instead of returning a string.
1655         All callers changed.
1656         (bytes_per_block): Now size_t, not int.
1657         (format_address_none): Do not even print the extra char argument.
1658         This simplifies the callers.
1659         (format_address_std, format_address_label): Print off_t ourself
1660         instead of trying to use autoconfigured format.  This is faster and
1661         more portable.
1662         (format_address_paren): New function.
1663         (dump): Remove unnecessary cast.
1664         (expand_address_fmt): Remove.
1665         (main): Use size_t, off_t, etc. instead of builtin types where this is
1666         advisable.  Adjust to above changes.  Remove unnecessary cast.
1668 2000-12-03  Jim Meyering  <meyering@lucent.com>
1670         * src/tail.c (tail_file): Initialize ignore, dev, and ino members,
1671         when tailing forever and the open failed.  Otherwise, we could get
1672         uninitialized memory references of those fields in recheck.
1673         * tests/tail-2/Makefile.am (TESTS): Add assert-2.
1674         * tests/tail-2/assert-2: New file.
1676         * Version 2.0.9.
1678         Make od print valid addresses for offsets of 2^32 and larger, and
1679         allow byte offset (-j) and byte count (-N) to be 2^32 and larger.
1681         * src/od.c (MAX_ADDRESS_LENGTH): Don't hard-code as a literal.
1682         Rather, define in terms of the type, off_t.
1683         (string_min): Declare to be of type size_t.
1684         (flag_dump_strings): Declare to be of type int.
1685         (print_s_char): Declare the n_bytes parameter and the local, `i',
1686         to be of type off_t.
1687         (print_char): Likewise.
1688         (print_s_short): Likewise.
1689         (print_short): Likewise.
1690         (print_int): Likewise.
1691         (print_long): Likewise.
1692         (print_long_long): Likewise.
1693         (print_float): Likewise.
1694         (print_double): Likewise.
1695         (print_long_double): Likewise.
1696         (dump_hexl_mode_trailer): Likewise.
1697         (print_named_ascii): Likewise.
1698         (print_ascii): Likewise.
1699         (write_block): Likewise.
1700         (print_ascii): Declare local, `print_function' with a prototype.
1701         Change a few `>' comparisons to the equivalent `<' form.
1702         (parse_options): Declare `tmp' to be of type uintmax_t.
1703         Use xstrtoumax, not xstrtoul.
1704         Fail if the specified offset if larger than OFF_T_MAX.
1705         (dump_strings): Declare local `i' to be of type size_t.
1706         Remove the now-unnecessary cast-to-off_t.
1707         (main) [IF_LINT]: Initialize desired_width to avoid a warning.
1708         Declare `tmp' to be of type uintmax_t.
1709         Use xstrtoumax, not xstrtoul.
1710         Fail if minimum string length is larger than SIZE_MAX.
1711         Fail if specified width is larger than ULONG_MAX.
1713         * src/od.c (format_address): Use off_t, not long unsigned_int as the
1714         parameter type.
1715         (format_address_none): Likewise.  Mark parameter as unused.
1716         (format_address_std): Likewise.
1717         (format_address_label): Likewise.
1718         (print_ascii): Mark format string parameter as unused.
1719         (write_block): Use off_t, not long unsigned_int as offset type.
1720         (expand_address_fmt): New function.
1721         (main): Use it to expand each address format string template.
1722         Reported by Mark Nudelman, via Andreas Jaeger.
1724         * src/sys2.h (OFF_T_MIN): Define here instead.
1725         (OFF_T_MAX): Likewise.
1726         (CHAR_BIT): Define.
1728         * src/tail.c (parse_options): Use xstrtoumax to parse the byte and line
1729         offset.  Give a better diagnostic when the requested offset is still
1730         representable but larger than OFF_T_MAX.
1731         (OFF_T_MIN): Remove definition.
1732         (OFF_T_MAX): Likewise.
1734 2000-12-02  Jim Meyering  <meyering@lucent.com>
1736         * src/sort.c (checkfp): Rename local `buf' to avoid shadowing previous
1737         declaration.
1739         * src/sort.c (NONZERO): Define and use it to make the code a tiny
1740         bit more readable.
1742         * doc/textutils.texi (sort invocation): Clarify how -t works
1743         when a sort key specifies a range of fields.  From Karl O. Pinc.
1745 2000-11-26  Paul Eggert  <eggert@twinsun.com>
1747         * src/od.c (skip): Use lseek instead of worrying about fseeko or fseek.
1748         This should be portable, as we seek before doing any I/O.
1749         (fseeko): Remove; no longer used.
1751 2000-11-30  Jim Meyering  <meyering@lucent.com>
1753         * src/sort.c: s/SIZE_T_MAX/SIZE_MAX/.
1755 2000-11-30  Paul Eggert  <eggert@twinsun.com>
1757         * src/sys2.h: Include <stdint.h> if HAVE_STDINT_H.
1758         (SIZE_MAX): Renamed from SIZE_T_MAX, as C99 uses SIZE_MAX.
1759         All uses changed.
1761 2000-11-30  Jim Meyering  <meyering@lucent.com>
1763         * src/sort.c: SIZE_MAX is not defined, so s/SIZE_MAX/SIZE_T_MAX/, and...
1764         * src/sys2.h (SIZE_T_MAX): ... define.
1766 2000-11-29  Paul Eggert  <eggert@twinsun.com>
1768         Port GNU "sort" to hosts where sizes don't fit in "int",
1769         e.g. 64-bit Solaris (sparc).
1771         * src/sort.c ("human.h", "xstrtol.h"): Include.
1772         (struct line): length member is now size_t, not int.
1773         (struct lines): Likewise for used, alloc, limit members.
1774         (struct buffer): Likewise for used, alloc, left, newline_free members.
1775         (struct keyfield): Likewise for sword, schar, eword, echar members.
1776         (sortalloc, mergealloc, linelength): Now size_t, not int.
1778         (initbuf, fillbuf, initlines, begfield, limfield, findlines,
1779         numcompare, getmonth, keycompare, compare, checkfp, mergefps,
1780         sortlines, sort): Accept, return, and use size_t for sizes, not int.
1782         (fillbuf, initlines, findlines, checkfp, sort): Check for overflow
1783         when computing buffer sizes.
1785         (begfield, limfield): Do not index past end of array.
1787         (checkfp): Return a boolean, not a line number, as the line
1788         number may not fit in int.  All callers changed.  Use
1789         uintmax_t for line numbers, not int.
1791         (sort): Don't allocate tmp until we need it (and know the right size).
1793         (parse_field_count): New function.
1795         (main): Use it to check for overflow in field counts.
1796         "outfile" is now a pointer to const.
1798 2000-11-27  Jim Meyering  <meyering@lucent.com>
1800         * src/checksum.h: Don't include system.h here.
1801         * src/md5.c: Include config.h, stdio.h, sys/types.h. and system.h here
1802         instead.
1803         * src/sha1sum.c: Likewise.
1805 2000-11-18  Paul Eggert  <eggert@twinsun.com>
1807         * src/pr.c (main): Do not assume EOF == -1.
1808         Handle the case correctly when digits options immediately precede a
1809         non-option.
1811 2000-11-18  Jim Meyering  <meyering@lucent.com>
1813         * doc/textutils.texi: Change GNU to @sc{gnu} in many places.
1814         Update to use the Free Documentation Licence.
1816         * configure, config.h.in, Makefile.in, etc.: Regenerate using the
1817         very latest version (in CVS) of autoconf.
1819 2000-11-17  Jim Meyering  <meyering@lucent.com>
1821         * GNUmakefile (.NOTPARALLEL): New target.  Prevent unwanted parallelism.
1822         Suggestion from Ulrich Drepper.
1824 2000-11-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1826         * tsort.c: Include sys/types.h before system.h.
1828 2000-11-16  Jim Meyering  <meyering@lucent.com>
1830         * src/join.c: Declare global `tab' to be of type *unsigned* char,
1831         so join works with 8-bit delimiter characters.
1832         Reported by Antonio Rendas.
1833         * tests/join/Test.pm (8-bit-t): New test for the above fix.
1835 2000-11-13  Paul Eggert  <eggert@twinsun.com>
1837         * src/sys2.h (ST_TIME_CMP_NS): Fix typo: ST_MTIM_NSEC should
1838         be tested with #ifdef, not with #if.
1840 2000-11-11  Jim Meyering  <meyering@lucent.com>
1842         * doc/textutils.texi: More minor rewording and grammar correction.
1843         From Brian Youmans.
1845 2000-11-06  Paul Eggert  <eggert@twinsun.com>
1847         * src/od.c (skip): st_size is not defined for directories.
1849 2000-11-03  Jim Meyering  <meyering@lucent.com>
1851         * tests/sha1sum/sample-vec: New file, with tests derived from
1852         http://csrc.nist.gov/cryptval/shs/sha1-vectors.zip
1853         * tests/sha1sum/Makefile.am (TESTS): Add sample-vec.
1855 2000-10-30  Jim Meyering  <meyering@lucent.com>
1857         * configure, config.h.in, Makefile.in, etc.: Regenerate using the
1858         very latest version (in CVS) of autoconf.
1860         * src/wc.c: Include "system.h" after wctype.h (not before)
1861         to avoid a compilation error on Solaris 5.5.1 systems.
1862         Reported by Vin Shelton.
1864 2000-10-23  Jim Meyering  <meyering@lucent.com>
1866         * Makefile.maint: Clean up version-related variables.
1868         * Version 2.0.8.
1870         * Makefile.am (EXTRA_DIST): Add .prev-version.
1872 2000-10-22  Jim Meyering  <meyering@lucent.com>
1874         * tests/Makefile.am (SUBDIRS): Add sha1sum.
1875         * tests/sha1sum/basic-1: New file.
1876         * configure.in (AC_OUTPUT): Add tests/sha1sum/Makefile.
1878         * src/Makefile.am (bin_PROGRAMS): Add sha1sum.
1879         (md5sum_SOURCES): Define.
1880         (sha1sum_SOURCES): Define.
1881         (noinst_HEADERS): Add checksum.h.
1883         * src/md5sum.c: Factor out the differences between MD5 and SHA1,
1884         and parameterize so this code may be used by both md5sum and the new
1885         program, sha1sum.  Loosely based on a patch from Scott Miller.
1886         * src/checksum.h: New file.
1887         * src/md5.c: New file that simply defines `algorithm'.
1888         * src/sha1sum.c: Likewise.
1890         * man/Makefile.am (man_MANS): Add sha1sum.1.
1891         * man/sha1sum.x: New file.
1893         Support 8-byte integers, assuming they're printable with e.g., %lld.
1894         * src/od.c: Add support for printing data as unsigned
1895         long long integers.
1897 2000-10-21  Jim Meyering  <meyering@lucent.com>
1899         The command, `yes ''|./cat -n' would stop printing after INT_MAX lines.
1900         * src/cat.c (cat): Never let `newlines' exceed 3.
1902 2000-10-21  Jim Meyering  <meyering@lucent.com>
1904         Prevent a counter buffer overrun when numbering lines and when
1905         processing 100 billion lines (or more) of input.
1906         * src/cat.c (LINE_COUNTER_BUF_LEN): Define to allow numbering as
1907         many as 10^18 - 1 lines (the old limit was 10^11 - 1, and could
1908         be exceeded without too much trouble).  Use this symbol rather
1909         than hard-coding the constant everywhere.
1910         (next_line_num): Rather than overrunning for input with more lines,
1911         mark the line number by putting a `>' in the leftmost slot.
1912         Patch by Jan Nieuwenhuizen.
1914         * src/sort.c (SORT_OUT_OF_ORDER): Define.
1915         (main): Use it instead of hard-coding the `1'.
1917 2000-10-10  Jim Meyering  <meyering@lucent.com>
1919         * src/sort.c (main): Use EXIT_SUCCESS rather than 0.
1920         Fail when checking (-c) with more than one file argument,
1921         rather than simply ignoring the extra arguments.
1923 2000-09-07  Jim Meyering  <meyering@lucent.com>
1925         * src/cut.c: Remove obsolete comment block.
1926         (usage): Note that when using -f, lines with no delimiters are
1927         also printed.
1928         * doc/textutils.texi (cut invocation): Likewise.
1930 2000-08-23  Jim Meyering  <meyering@lucent.com>
1932         * src/md5sum.c: Include <config.h> unconditionally, to be consistent
1933         with all the other programs in this directory.
1934         * src/tsort.c: Likewise.
1936 2000-08-19  Jim Meyering  <meyering@lucent.com>
1938         * src/comm.c (writeline): Correct comments.  From Bruno Haible.
1940 2000-08-11  Paul Eggert  <eggert@twinsun.com>
1942         * doc/textutils.texi:
1944         Portable shell scripts should specify global options before
1945         key fields.
1947         Move global LC_CTYPE remark to each sort option that depends
1948         on LC_CTYPE.
1950         sort -g depends on LC_NUMERIC.
1952         Add @vindex where it's missing.
1954         "radix character" -> "decimal-point character", to match Standard C
1955         terminology, which is easier for most people to follow.
1957         "comm" does not consider trailing newlines to be significant.
1959 2000-08-10  Paul Eggert  <eggert@twinsun.com>
1961         * doc/textutils.texi: Recommend against the System V syntax
1962         for tr ranges, and don't use it in examples.  Use POSIX
1963         classes rather than ranges, for portability.
1964         * src/tr.c (usage): Don't describe System V syntax, as it
1965         doesn't always work.
1967         * src/sort.c (usage): Describe -d and -i in a locale-independent way.
1969         * doc/Makefile.am (constants.texi): Use the C locale so that
1970         [A-Z] works as expected.
1972 2000-08-07  Paul Eggert  <eggert@twinsun.com>
1974         * src/cut.c (cut_fields): Invoke xalloc_die instead of printing
1975         our own message.
1976         (cut_fields): Check for I/O error as well as end-of-file
1978 2000-08-06  Bruno Haible  <haible@clisp.cons.org>
1980         * src/wc.c: Add support for multi-byte locales.
1981         (iswprint, mbrtowc, wcwidth): Provide default definitions.
1982         (total_bytes): New variable.
1983         (print_bytes): New variable.
1984         (longopts): Change abbreviation for --chars from 'c' to 'm'.
1985         (usage): Update.
1986         (write_counts): Add `bytes' argument.
1987         (wc): New variables `bytes', `count_bytes', `count_chars',
1988         `count_complicated'. The old code determines `bytes', not `chars'.
1989         New case for MB_CUR_MAX > 1. A non-printable non-space character does
1990         not increment the line position or start a word. Update `total_bytes'.
1991         (main): Initialize `print_bytes' and `total_bytes' to 0. Accept 'm'
1992         option. Pass `total_bytes' to write_counts.
1993         * doc/textutils.texi (wc invocation): Update accordingly.
1995 2000-08-06  Bruno Haible  <haible@clisp.cons.org>
1997         * src/head.c (head): Call write_header here.
1998         (head_file): ... not here.
2000         * src/cat.c (closeout_func): Remove variable.
2001         (close_stdout_wrapper): Remove unused function.
2002         (main): Remove assignment to closeout_func.
2004         * src/fold.c (fold_file): Remove ferror(stdout) check, already done
2005         in close_stdout.
2007 2000-08-06  Paul Eggert  <eggert@twinsun.com>
2009         * src/sort.c (usage): Warn more succinctly about the effects of
2010         the locale on sort order.
2012 2000-08-06  Jim Meyering  <meyering@lucent.com>
2014         * Version 2.0g.
2016         * src/tail.c (pipe_lines): Declare local `cp' to be const.
2018 2000-08-04  Greg McGary  <greg@mcgary.org>
2020         * src/tail.c (pipe_lines): Add variable `nbytes' so we can free
2021         `tmp' immediately after read loop.  Don't process an empty file.
2022         [This fixes a buffer-underrun error -- detected thanks to
2023         bounded pointers -jmm]
2025 2000-08-05  Jim Meyering  <meyering@lucent.com>
2027         Fix buffer-overrun error.
2028         * src/pr.c (init_header): Allocated buffer was sometimes too small.
2029         Reported by Greg McGary (who found this bug using his
2030         bounded-pointers-enabled gcc).
2031         (init_header): Move declarations of several variables into the
2032         inner scope where they are used.
2033         * tests/pr/Test.pm (narrow-1): New test, for the above.
2035         * src/csplit.c (MAX): Remove definition (It's in sys2.h).
2037 2000-08-04  Jim Meyering  <meyering@lucent.com>
2039         * src/sort.c (main): Rename local `t' to `tmp_dir' to avoid shadowing
2040         a previous local by that name.
2041         (usage): Warn that GNU sort is now locale-aware, and suggest
2042         people put LC_ALL=POSIX in their environment.
2044         * src/pr.c (store_columns): Remove conjunct that would dereference
2045         an out-of-bounds pointer.  Reported by Greg McGary (who found this
2046         bug using his bounded-pointers-enabled gcc).
2048 2000-08-03  Jim Meyering  <meyering@lucent.com>
2050         * tests/Makefile.am.in ($(srcdir)/$x-tests): Use -I$(srcdir), not `-I.'.
2051         (Makefile.am): Likewise.  Reported by Greg McGary.
2053 2000-08-01  Jim Meyering  <meyering@lucent.com>
2055         * doc/textutils.texi (tr invocation): Note that ranges are not portable.
2056         Update examples not to use ranges.
2058 2000-07-31  Jim Meyering  <meyering@lucent.com>
2060         * src/cut.c (cut_fields): Use `virtual memory exhausted',
2061         not `Memory exhausted'.
2063 2000-07-30  Jim Meyering  <meyering@lucent.com>
2065         * src/help-version: Remove file.  Move it to ...
2066         * tests/help-version: ...here
2067         * tests/Makefile.am (TESTS): Set to help-version.
2068         (TESTS_ENVIRONMENT): Define.
2069         (EXTRA_DIST): Add $(TESTS).
2070         * src/Makefile.am (EXTRA_DIST): Remove help-version.
2071         (TESTS): Remove definition.
2072         (TESTS_ENVIRONMENT): Remove definition.
2074 2000-07-28  Paul Eggert  <eggert@twinsun.com>
2076         sort's -T option can now appear multiple times.
2077         Thanks to Charles Randall for suggesting this idea.
2079         * doc/textutils.texi, NEWS: Document this.
2081         * src/sort.c (temp_dir): Remove.
2082         (temp_dirs, temp_dir_count, temp_dir_alloc): New vars.
2083         (process_id): New var.
2084         (usage): Describe new use of -T.
2085         (add_temp_dir): New function.
2086         (tempname): Use new temp_dirs array.
2087         Do not discard information from the process-id or sequence
2088         number, unless we have short file names.
2089         (sighandle): Use process_id instead of getpid.
2090         (main): Initialize process_id.
2091         Add support for the new use of -T.
2093 2000-07-23  Jim Meyering  <meyering@lucent.com>
2095         * tests/head/Test.pm: Rename tests (and hence files) to have a short
2096         enough prefix so that they're not truncated on 8+3 file systems.
2097         Reported by Eli Zaretskii.
2099 2000-07-09  Jim Meyering  <meyering@lucent.com>
2101         * config.guess: Update from FSF.
2102         * config.sub: Likewise.
2104 2000-07-02  Jim Meyering  <meyering@lucent.com>
2106         * Version 2.0f.
2108 2000-07-01  Jim Meyering  <meyering@lucent.com>
2110         * src/cut.c: Change type of global, field_1_bufsize, from int to size_t.
2112 2000-06-29  Jim Meyering  <meyering@lucent.com>
2114         * src/tr.c (find_bracketed_repeat): Add a cast to suppress a warning.
2115         Reported by Gerhard Poul.
2117         * src/tail.c (enum): Remove comma from end of enumerator list.
2118         From Gerhard Poul.
2120 2000-06-25  Jim Meyering  <meyering@lucent.com>
2122         * configure.in (ALL_LINGUAS): Add Danish (da).
2124 2000-06-24  Jim Meyering  <meyering@lucent.com>
2126         * doc/textutils.texi: Lots of minor rewording and grammar correction.
2127         From Brian Youmans.
2129         * tests/sum/basic-1: New file.
2130         * tests/sum/Makefile.am: New file.
2131         * configure.in (AC_OUTPUT): Add tests/md5sum/Makefile.
2132         * tests/Makefile.am (SUBDIRS): Add sum.
2134 2000-06-22  Bruno Haible  <haible@clisp.cons.org>
2136         * src/sum.c (sysv_sum_file): Avoid overflowing 32-bit accumulator
2137         on files whose bytes sum to 2^32 or larger.  The smallest such file
2138         contains 16,843,010 bytes, nearly all of which have the value 0xff.
2140 2000-06-22  Bruno Haible  <haible@clisp.cons.org>
2142         * src/cat.c (main): Correct a comment.
2144 2000-06-21  Jim Meyering  <meyering@lucent.com>
2146         * src/cut.c (getstr): Remove private (and out of date) version of
2147         this function.
2148         (cut_fields): Adjust caller to use the just-extended one in ../lib.
2149         Reported by Paul Sauer.
2151 2000-06-20  Jim Meyering  <meyering@lucent.com>
2153         * src/uniq.c (main): Fix off-by-argc test, so +N-style options are
2154         recognized once again.  Reported by Geoff Keunning.
2155         Fix typo in diagnostic: s/compare/skip/.
2157 2000-05-27  Jim Meyering  <meyering@lucent.com>
2159         * src/tail.c: Arrange to call close_stdout upon exit.
2160         Don't close stdout explicitly.
2161         (usage): Add missing backslash at end of line.
2162         (write_header): Remove now-unused COMMENT parameter.
2163         Update all callers.
2165 2000-05-24  Jim Meyering  <meyering@lucent.com>
2167         * src/head.c (head_file): Use STDIN_FILENO in place of `0'.
2168         (main): Likewise.
2170 2000-05-20  Jim Meyering  <meyering@lucent.com>
2172         * src/cat.c: Arrange to call close_stdout upon exit.
2173         Don't close stdout explicitly.  Replace uses of global constant,
2174         output_desc, with uses of STDOUT_FILENO.
2176         Arrange to call close_stdout upon exit.  Don't close stdout explicitly.
2177         * src/cksum.c: Likewise.
2178         * src/comm.c: Likewise.
2179         * src/csplit.c: Likewise.
2180         * src/cut.c: Likewise.
2181         * src/expand.c: Likewise.
2182         * src/fmt.c: Likewise.
2183         * src/fold.c: Likewise.
2184         * src/head.c: Likewise.
2185         * src/join.c: Likewise.
2186         * src/md5sum.c: Likewise.
2187         * src/nl.c: Likewise.
2188         * src/od.c: Likewise.
2189         * src/paste.c: Likewise.
2190         * src/pr.c: Likewise.
2191         * src/ptx.c: Likewise.
2192         * src/sort.c: Likewise. (but set exit status and file name, too)
2193         * src/split.c: Likewise.
2194         * src/sum.c: Likewise.
2195         * src/tac.c: Likewise.
2196         * src/tr.c: Likewise.
2197         * src/tsort.c: Likewise.
2198         * src/unexpand.c: Likewise.
2199         * src/uniq.c: Likewise.
2200         * src/wc.c:: Likewise.
2202 2000-05-13  Jim Meyering  <meyering@lucent.com>
2204         * src/help-version: Run each program successfully at least once.
2206 2000-05-12  Jim Meyering  <meyering@lucent.com>
2208         * src/head.c (string_to_integer): Restrict base to 10.
2209         Reported by Joseph S. Myers.
2210         * tests/head/Test.pm: Add a few tests for this.
2212         New option: --first-only
2213         * src/unexpand.c (anonymous enum) [CONVERT_FIRST_ONLY_OPTION]: Define.
2214         (long_options): Add `first-only'.
2215         (main): Handle new option.
2217 2000-05-11  Jim Meyering  <meyering@lucent.com>
2219         * tests/unexpand/basic-1: New tests.
2221 2000-04-17  Bruno Haible  <haible@clisp.cons.org>
2223         * src/system.h [__BEOS__]: Ignore O_BINARY and O_TEXT.
2225 2000-04-16  Jim Meyering  <meyering@lucent.com>
2227         * src/tail.c: Prepare to remove option: --max-consecutive-size-changes.
2228         Doesn't seem useful.
2229         (usage): Remove description.
2230         * doc/textutils.texi (tail invocation): Remove description.
2232 2000-04-12  Jim Meyering  <meyering@lucent.com>
2234         * src/tail.c (usage): Tweak --help output.  Suggestions from Karl Berry.
2236         Move some macros into m4/.
2237         * configure.in (_GNU_SOURCE): Don't define here.
2238         (AC_SYS_LARGEFILE): Don't use here.
2239         (AM_C_PROTOTYPES): Don't use here.
2240         * acconfig.h: Remove now-unused file.
2242 2000-04-09  Jim Meyering  <meyering@lucent.com>
2244         * doc/textutils.texi: Include constants.texi.
2245         (tail invocation): Use `@value's instead of referring to the
2246         output of `tail --help' for defaults.
2247         * doc/Makefile.am (constants.texi): New rule.
2248         (EXTRA_DIST): Add constants.texi.
2249         (MAINTAINERCLEANFILES): Add it here, too.
2250         (textutils.dvi, textutils.info): Depend on constants.texi.
2252         * src/tail.c (usage): Clarify descriptions of the --max-* options.
2253         From Karl Berry.
2255 2000-04-03  Jim Meyering  <meyering@lucent.com>
2257         * configure.in (AC_CHECK_HEADERS): Remove langinfo.h.  Now it's in m4/.
2258         (AC_CHECK_FUNCS): Remove nl_langinfo.  Now it's in m4/.
2260 2000-03-17  Jim Meyering  <meyering@lucent.com>
2262         * configure.in (ALL_LINGUAS): Add Slovenian (sl).
2264 2000-03-12  Jim Meyering  <meyering@lucent.com>
2266         Merge from fileutils.
2267         * src/system.h "pathmax.h": Include.
2268         <sys/time.h>: Include if appropriate.
2269         <time.h>: Likewise.
2270         <sys/mkdev.h>: Likewise.
2271         <sys/sysmacros.h>: Likewise.
2272         <utime.h>: Likewise.
2273         (major, minor, makedev): Define if needed.
2274         (struct utimbuf): Declare if missing.
2275         (ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE): Define.
2277         * src/cksum.c (usage): Correct --help output.
2278         Prompted by a report from Gregory Leblanc.
2280 2000-03-05  Paul Eggert  <eggert@twinsun.com>
2282         * src/sort.c (struct buffer.newline_free): New member.
2283         (initbuf, findlines): Set it.
2284         (fillbuf): Do not double the size of a full buffer to append a newline
2285         unless the buffer is known to be newline free.
2287 2000-03-05  Jim Meyering  <meyering@lucent.com>
2289         * Version 2.0e.
2291 2000-03-04  Jim Meyering  <meyering@lucent.com>
2293         Don't get failed assertion for `tail -f directory'.
2294         * src/tail.c: Revert most of 1999-10-20 change.  Instead, ...
2295         (IS_TAILABLE_FILE_TYPE): Define to produce similar result.
2296         (recheck): Use it here.
2297         (tail_file): Use it here.
2298         Reported by François Pinard.
2300         Once we encounter a file that is not of IS_TAILABLE_FILE_TYPE,
2301         marke it as such and ignore it forever after.
2302         * src/tail.c (struct File_spec): New member.
2303         (recheck): Initialize new member.
2304         (tail_file): Likewise.
2305         (tail_forever): Skip the file if it's marked as ignorable.
2307 2000-03-03  Jim Meyering  <meyering@lucent.com>
2309         * src/sort.c (fillbuf): Move declaration of local, cc, into scope of
2310         `while' loop where it's used.
2312 2000-03-02  Paul Eggert  <eggert@set.twinsun.com>
2314         Big performance improvement when sorting many small files,
2315         building on a suggestion by Charles Randall.
2317         * src/sort.c (fillbuf): Skip memmove if it would be a no-op,
2318         as many memmove implementations are slow in that case.
2319         Don't examine leftover bytes for eolchar, since they may be left
2320         over from a previous file, and we want to read from this file.
2322         (sort): At end of file, if there is more input and buffer room,
2323         concatenate the next input file.
2325 2000-02-29  Jim Meyering  <meyering@lucent.com>
2327         * src/join.c (make_blank): Add an explicit cast to `unsigned char *'
2328         to placate HPUX's C compiler.  Reported by Bob Proulx.
2330 2000-01-30  Jim Meyering  <meyering@lucent.com>
2332         * Version 2.0d.
2334         * Makefile.maint (my-distcheck): Depend on po-check, so I'll be warned
2335         about any required changes at `make distcheck' time rather than at
2336         `make alpha' time.
2337         (writable-files): New target.
2338         (my-distcheck): Depend on it.
2339         (alpha): Likewise.
2341         * po/POTFILES.in: Add these: lib/makepath.c, lib/rpmatch.c,
2342         and lib/same.c
2344 2000-01-29  Jim Meyering  <meyering@lucent.com>
2346         * configure.in: Remove lib-check for cposix now that we use
2347         m4/isc-posix.m4.
2348         (jm_LIB_CHECK): Use this even though the library checks aren't
2349         required for this patchage (so all three lib/Makefile.in files
2350         will be the same).
2352 2000-01-24  Mark Kettenis  <kettenis@gnu.org>
2354         * src/tsort.c (exit_status): New variable.
2355         (loop): New varibale.
2356         (count_items, scan_zeroes): Change return type to int.
2357         (detect_loop): Complete rewrite to correctly implement detection
2358         of loops.  Also change return type to int.
2359         (recurse_tree): Stop if ACTION returns non-zero.  This involves
2360         changing the return type of this function and ACTION to int.
2361         (walk_tree): Change return type of ACTION to int.
2362         (tsort): Continue sort after a loop has been detected (and
2363         broken).  Set exit_status to 1 if a loop was detected.
2364         (main): Use exit_status to determine exit code.
2365         * tests/tsort/basic-1: Change expected output for cycle-1 and
2366         cycle-2 tests.
2368 2000-01-23  Jim Meyering  <meyering@lucent.com>
2370         * configure.in (AM_FUNC_STRTOD): Move to m4/.
2371         (AC_SUBST(POW_LIBM)): Likewise.
2373 2000-01-22  Jim Meyering  <meyering@lucent.com>
2375         * src/sort.c (keycompare): Use global, hard_LC_COLLATE in place of
2376         local that is sometimes undeclared.
2378         * configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR).
2379         (AC_CHECK_HEADERS): Move these checks into m4/.
2381         * src/tr.c ("xstrtol.h"): Include.
2382         (Filter): Rename from PFL.
2383         (non_neg_strtol): Remove function.
2384         (find_bracketed_repeat): Use xstrtoul instead of non_neg_strtol.
2385         (squeeze_filter, set_initialize, main): Use size_t and ssize_t in
2386         place of long and int in several decls.
2387         (read_and_delete, read_and_xlate): Likewise, and remove assertion.
2388         * tests/tr/Test.pm (o-rep-1, o-rep-2): New tests.
2390         * src/cut.c: Correct copying notice to use GPL, per author's request.
2391         * src/paste.c: Likewise.
2392         (AUTHORS): Add djm.
2394 1999-09-19  Bruno Haible  <haible@clisp.cons.org>
2396         * src/tr.c (PFI): Return `long', not `int'.
2397         (PFL): Rename from PFI now that it returns long.
2398         (squeeze_filter): Declare as `long': i, nr, out_len.
2400 2000-01-17  Paul Eggert  <eggert@twinsun.com>
2402         Tweak sort performance.
2404         * src/sort.c (hard_LC_CTYPE): Remove.
2405         (keylist): Renamed from keyhead.  Now a pointer, not a
2406         mostly-unused struct.  All uses changed.
2407         (findlines, keycompare, CMP_WITH_IGNORE, compare, checkfp, mergefps,
2408         sort): Tune and use a more consistent style for reallocation.
2409         (keycompare, main): Don't worry about LC_CTYPE;
2410         it's buggy with multibyte chars anyway.
2411         (compare): Invoke alloca (0) after each call to keycompare,
2412         not just the ones that return nonzero.  This avoids a memory
2413         leak on architectures without builtin alloca that occurs
2414         sometimes when a file contains all duplicate lines.
2416 2000-01-17  Paul Eggert  <eggert@twinsun.com>
2418         * src/csplit.c (interrupt_handler, main):
2419         Don't use SA_INTERRUPT to decide whether to call sigaction, as
2420         POSIX.1 doesn't require SA_INTERRUPT and some systems
2421         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
2422         it's been part of POSIX.1 since day 1 (in 1988).
2423         * src/sort.c (sighandler, main): Likewise.
2425 2000-01-16  Jim Meyering  <meyering@lucent.com>
2427         * lib/Makefile.am: Merge with fileutils/lib/Makefile.am.
2429         * configure.in: Remove AM_FUNC_ERROR_AT_LINE, jm_FUNC_STRFTIME,
2430         AC_FUNC_VPRINTF, and AC_FUNC_ALLOCA.  Now they're in m4/.
2432 2000-01-15  Jim Meyering  <meyering@lucent.com>
2434         * configure.in (AC_REPLACE_FUNCS): Remove these: memcpy memset stpcpy
2435         strpbrk strtol strtoul.  Now that's in m4/.
2437         unexpand could infloop
2438         * src/unexpand.c (TAB_STOP_SENTINEL): Define.
2439         (unexpand): Use it instead of INT_MAX.
2440         Declare column and pending to be `unsigned'.
2441         Increment pending and column counters only if column is smaller
2442         than TAB_STOP_SENTINEL.
2443         * tests/Makefile.am (SUBDIRS): Add unexpand.
2444         * tests/unexpand/basic-1: New tests for the above-fixed bug.
2445         * configure.in (AC_OUTPUT): Add tests/unexpand/Makefile.
2446         Reported by John Kodis.
2448 2000-01-12  Paul Eggert  <eggert@twinsun.com>
2450         * src/sort.c (fillbuf): Avoid quadratic behavior with long lines.
2451         Also, stop worrying about ancient memchr bug (misbehavior when
2452         size is zero), since other code doesn't worry either.
2454 2000-01-11  Jim Meyering  <meyering@lucent.com>
2456         Sync lib/ directories of sh-utils, and textutils.
2458         * lib/Makefile.am (libfetish_a_SOURCES): Add getdate.y, posixtm.c,
2459         basename.c, canon-host.c, readutmp.c, stripslash.c, xgetcwd.c,
2460         xgethostname.c.
2461         (noinst_HEADERS): Add getdate.h, group-member.h, posixtm.h,
2462         pathmax.h, readutmp.h
2464         * lib/Makefile.am: s/tu/fetish/
2465         * src/Makefile.am: s/libtu/libfetish/
2467 2000-01-10  Jim Meyering  <meyering@lucent.com>
2469         * Version 2.0c.
2471         * Makefile.maint (announcement): Include URLs for xdelta files.
2472         (alpha): Use scp, not ncftp.
2474         * lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.
2476 2000-01-08  Jim Meyering  <meyering@ascend.com>
2478         * Version 2.0b.
2480         More nits.
2481         * src/cut.c (OUTPUT_DELIMITER_OPTION): Define this and use it
2482         instead of `CHAR_MAX + n'.
2483         * src/pr.c (PAGES_OPTION, COLUMNS_OPTION): Likewise.
2485 2000-01-07  Jim Meyering  <meyering@ascend.com>
2487         * tests/tsort/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix
2488         to exported PATH value (though not strictly necessary, here).
2489         * tests/md5sum/Makefile.am: Likewise.
2491         Nits.
2492         * lib/memcasecmp.c: Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
2493         Capitalize all macro parameters.
2494         (memcasecmp): Ansideclify.
2495         Don't cast away `const'ness of parameters.
2496         * lib/strpbrk.c (strpbrk): Ansideclify.
2497         Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
2498         Suggestions from François Pinard.
2500 2000-01-06  Jim Meyering  <meyering@ascend.com>
2502         * tests/tail-2/assert: Tell the user just before sleeping for 7 seconds.
2504         * tests/tail-2/Makefile.am (TESTS): Remove fflush test.  It didn't
2505         test the losing behavior, and left a stray tail process to boot.
2507 2000-01-01  Jim Meyering  <meyering@ascend.com>
2509         * Version 2.0a.
2511         * lib/Makefile.am (lstat.c): Adapt rule to handle new parts of xstat.in.
2513 1999-12-12  Jim Meyering  <meyering@ascend.com>
2515         Move 120+ lines of stat.h-related macros from system.h (not shared)
2516         to sys2.h, which is shared between fileutils, sh-utils, textutils.
2517         * src/system.h: Move them from here...
2518         * src/sys2.h: ... to here.
2520 1999-12-09  Jim Meyering  <meyering@ascend.com>
2522         * configure.in (ALL_LINGUAS): Add Galician (gl).
2524 1999-12-06  Jim Meyering  <meyering@ascend.com>
2526         * tests/tail-2/fflush: New test for latest change.
2527         * tests/tail-2/Makefile.am (TESTS): Add fflush.
2529 1999-10-26  Marc Boucher  <marc@mbsi.ca>
2531         * src/tail.c (main): Flush stdout before switching to unbuffered mode
2532         and calling tail_forever.  Required only on Solaris2.7 -- on other
2533         systems, using setvbuf to switch to unbufferd mode does the flush.
2535 1999-11-22  Jim Meyering  <meyering@ascend.com>
2537         * lib/Makefile.am (DISTCLEANFILES): Put $(BUILT_SOURCES) here rather
2538         than in $(MAINTAINERCLEANFILES).
2540         * src/tail.c (recheck): Handle a race condition (including <dev,inode>
2541         reuse) that would lead to a failed assertion.
2542         Reported by Ken Pizzini.
2543         (tail_forever): Record errno before using it in call to `error'
2544         which might change it.
2545         (tail_file): Likewise.
2547         New test for the above.
2548         * tests/tail-2/assert: New file.
2549         * tests/tail-2/Makefile.am: New file.
2550         * tests/tail-2: New directory.
2551         * tests/Makefile.am (SUBDIRS): Add tail-2.
2552         * configure.in (AC_OUTPUT): Add tests/tail-2/Makefile.
2554 1999-11-05  Jim Meyering  <meyering@ascend.com>
2556         * src/system.h: Use HAVE_STRUCT_STAT_ST_BLKSIZE not HAVE_ST_BLKSIZE.
2558         * configure.in: Move some type/header/member tests into
2559         m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of
2560         fileutils, textutils, and sh-utils.
2562 1999-11-04  Paul Eggert  <eggert@twinsun.com>
2564         * src/sort.c (SORTALLOC): New macro.
2565         (sortalloc, mergealloc, LINEALLOC): Use it.
2566         (sortalloc, mergealloc, linelength): Now const.
2567         (sortalloc): Increase from 0.5 to 8 MB.
2568         (mergealloc): Increase from 16 to 256 kB.
2569         (LINEALLOC): Increase from 0.25 to 4 MB.
2571 1999-11-03  Paul Eggert  <eggert@twinsun.com>
2573         * NEWS, doc/textutils.texi:
2574         Do not consider newline to be part of a line when comparing lines
2575         in `sort' and `comm'.  POSIX.2 requires that we consider newline,
2576         but this is a bug in the spec and the bug will likely be fixed.
2577         * src/comm.c (compare_files): Likewise.
2578         * src/sort.c (begfield, limfield, findlines, keycompare, compare):
2579         Likewise.
2580         * tests/sort/Test.pm:  Update tests `use-nl' and `11d' to reflect
2581         this change.
2583         * lib/linebuffer.c (readline): Do not leave room for an extra
2584         byte after the newline; it's no longer needed.
2585         * src/sort.c (sortalloc, mergealloc, fillbuf, checkfp, mergefps):
2586         Likewise.
2588         * lib/memcoll.c (memcoll): The two arguments cannot be
2589         adjacent any more, so remove the alloca/copy workaround for
2590         that case.
2592 1999-11-03  Jim Meyering  <meyering@ascend.com>
2594         Fix so that `tail -fn 2 file' works again.
2595         * src/tail.c (anonymous enum) [LONG_FOLLOW_OPTION]: Define.
2596         (long_options): Use LONG_FOLLOW_OPTION here, instead of 'f'.
2597         (main): Remove the `::' after the `f' in getopt_long string.
2598         Add `case LONG_FOLLOW_OPTION' after `case 'f':'.
2599         Based on a patch from Tim Waugh.
2601         * src/tail.c (anonymous enum) [RETRY_OPTION]: Define.
2602         [MAX_UNCHANGED_STATS_OPTION]: Likewise.
2603         [MAX_CONSECUTIVE_SIZE_CHANGES_OPTION]: Likewise.
2604         [PID_OPTION]: Likewise.
2605         (long_options): Use *_OPTION instead of CHAR_MAX + N.
2606         (main): Likewise.
2608 1999-11-02  Jim Meyering  <meyering@ascend.com>
2610         * man/help2man: Import version 1.018.
2611         * man/Makefile.maint ($(man_MANS)): Remove use of --name=... option.
2612         * man/*.x: Include one-line summary in [NAME] section.
2613         * man/Makefile.summ (cat-summary): Remove now-unused file.
2614         * man/Makefile.am (EXTRA_DIST): Remove Makefile.summ.
2615         * man/Makefile.maint: Include Makefile.summ with leading `-'.
2616         This file is shared by fileutils and sh-utils, both of which still
2617         have the file (albeit nearly empty now).
2618         Suggestion for clean-up from Akim Demaille.
2620 1999-11-01  Jim Meyering  <meyering@ascend.com>
2622         * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
2624 1999-10-20  Jim Meyering  <meyering@ascend.com>
2626         * src/tail.c (recheck): Don't refuse to tail a non-regular, non-pipe.
2627         (tail_file): Likewise.
2629 1999-10-07  Jim Meyering  <meyering@ascend.com>
2631         * configure.in (ALL_LINGUAS): Add Japanese (ja).
2633 1999-10-04  Jim Meyering  <meyering@ascend.com>
2635         * depcomp: New file, for automake's new dependency support.
2636         * missing: New version, from automake's user-dep-gen-branch.
2638 1999-09-28  Jim Meyering  <meyering@ascend.com>
2640         * src/system.h: Update from the system.h from fileutils.
2642         * lib/error.c (error_at_line): Use strerror portably here, too,
2643         just as was done in error.
2645 1999-09-02  Jim Meyering  <meyering@ascend.com>
2647         * src/cut.c: Remove xstrdup declaration.
2648         * src/sort.c: Likewise.
2649         * src/tsort.c: Likewise.
2651 1999-08-22  Jim Meyering  <meyering@ascend.com>
2653         * src/tsort.c (detect_loop): There's no loop if k->top is NULL.
2654         Niklas Edmundsson showed how to make tsort segfault.
2656         * tests/tsort/Makefile.am: Rewrite to use Fetish.pm-based framework.
2657         * tests/tsort/basic-1: New file.
2658         Add a few more tests.
2659         * tests/tsort/Test.pm: Remove.
2661         * man/help2man: Escape backslashes so tr's manual comes out right.
2662         Reported by Andreas Schwab.
2664         * src/tsort.c (usage): Correct address for bug reports.
2665         (tsort): Remove trailing `\n' in error format.
2667         * src/md5sum.c (md5_check): Remove trailing `\n' in error format.
2669         * src/sys2.h (IF_LINT): Define new macro.
2670         * src/od.c (dump): Use IF_LINT macro instead of #ifdef lint...
2671         (main): Likewise.
2672         * src/paste.c (paste_parallel): Likewise.
2673         * src/pr.c (read_line): Likewise.
2674         * src/sort.c (checkfp): Likewise.
2675         (mergefps): Likewise.
2677         * src/cksum.c (cksum): Constify a char*.
2678         * src/comm.c (writeline): Likewise.
2680         * src/uniq.c (check_file): Move declarations of local variables
2681         into the scopes where they're used.
2682         (min): Remove macro definition.
2683         (different): Use MIN, not min.
2684         (SWAP_LINES): New macro.
2685         (check_file): Use it here.
2687         * src/uniq.c (check_file): Generate each line of output earlier,
2688         when possible.  It is possible when using none of these options:
2689         --count, -repeated, --all-repeated, --unique.
2690         Based on a patch from Ian Turner.
2692 1999-08-15  Jim Meyering  <meyering@ascend.com>
2694         * src/tail.c (ENOSYS): Define to a bogus value if not already defined.
2696 1999-08-13  Eli Zaretskii  <eliz@is.elta.co.il>
2698         * src/tail.c (parse_options): Warn if --pid=PID is used and kill()
2699         returns ENOSYS (e.g. when compiled with DJGPP).
2701 1999-08-13  Jim Meyering  <meyering@ascend.com>
2703         * src/tsort.c (usage): Use consistent bug-reporting address.
2705         * tests/tsort/Test.pm: New file.
2706         * tests/tsort/Makefile.am: New file.
2707         * tests/tsort: New directory.
2708         * tests/Makefile.am (SUBDIRS): Add tsort.
2709         * configure.in (AC_OUTPUT): Add tests/tsort/Makefile.
2711 1999-08-11  Paul Eggert  <eggert@twinsun.com>
2713         * doc/textutils.texi: Document how to ignore newline during sort.
2715 1999-08-07  Jim Meyering  <meyering@ascend.com>
2717         * po/POTFILES.in: Add lots of lib/*.c files.  Remove src/system.h.
2719 1999-08-06  Jim Meyering  <meyering@ascend.com>
2721         * Version 2.0.
2723         * src/sort.c: Include file name in `write error' diagnostics.
2724         (write_bytes): Add output_file parameter and use it.  Update callers.
2725         (mergefps): Likewise.
2726         (merge): Likewise.
2727         (sort): Likewise.
2728         Reported by John Summerfield.
2730 1999-08-05  Jim Meyering  <meyering@ascend.com>
2732         * src/tail.c (Follow_mode): Remove comma at end of enumerator list.
2733         Reported by Kaveh Ghazi.
2735         * config.sub: Update from autoconf.
2736         * config.guess: Update from autoconf.
2738 1999-08-04  Jim Meyering  <meyering@ascend.com>
2740         * Version 1.22q.
2742         * configure.in: Remove inadequate getline-testing code.  md5sum would
2743         segfault on HPUX because of the getline function in their C library.
2744         Use the AM_FUNC_GETLINE test in m4/ instead.
2746 1999-08-03  Jim Meyering  <meyering@ascend.com>
2748         * src/tail.c (tail_forever): When following by name and calling recheck
2749         because of exceeding max_n_consecutive_size_changes_between_opens,
2750         `continue' so we don't fall through and (assuming the file finally grew)
2751         get the erroneous `file truncated' message.  This was hard to reproduce.
2753 1999-08-01  Jim Meyering  <meyering@ascend.com>
2755         * Version 1.22p.
2757         * configure.in (AM_C_PROTOTYPES): Move test to precede a few
2758         header tests -- merely on principle.
2760 1999-08-01  Paul Eggert  <eggert@twinsun.com>
2762         * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS.
2764 1999-07-16  Paul Eggert  <eggert@twinsun.com>
2766         * lib/quotearg.c (quotearg_buffer):
2767         Don't quote spaces if C quoting style.
2769 1999-07-31  Jim Meyering  <meyering@ascend.com>
2771         * src/tail.c (tail_forever): Don't call kill if pid is 0.
2772         Detect when `writer_is_dead' also when the writer is some other user.
2773         From Karl Heuer.
2775         * src/tail.c (parse_options): Warn if --pid=PID is used without -f.
2777 1999-07-30  Jim Meyering  <meyering@ascend.com>
2779         * Version 1.22o.
2781         * src/tail.c: New option: --pid=PID.
2782         Include signal.h for kill prototype.
2783         (pid): New global.
2784         (long_options): Add `pid'.
2785         (usage): Describe it.
2786         (tail_forever): Implement it.
2787         (parse_options): Handle the new option and required arg.
2788         Suggestion and pseudo-code from Karl Heuer.
2790 1999-07-27  Jim Meyering  <meyering@ascend.com>
2792         * lib/linebuffer.c: Include <sys/types.h> now that linebuffer.h uses
2793         size_t.  This is required on at least SunOS4.  From Kaveh Ghazi.
2795 1999-07-26  Jim Meyering  <meyering@ascend.com>
2797         * src/sys2.h (PID_T_MAX): Define.
2799         * src/tail.c (struct File_spec) [n_stat_calls]: Remove unused member.
2801 1999-07-25  Jim Meyering  <meyering@ascend.com>
2803         * src/pr.c (usage): Remove `NEWS'-style paragraph (sorry to have
2804         let that in, translators).
2806         * Version 1.22n.
2808 1999-06-01  Volker Borchert  <bt@teknon.de>
2810         * tests/Makefile.am: Make envvar-check depend on check-recursive rather
2811         than on `check' so that its tests are performed before any real tests.
2813 1999-07-20  Jim Meyering  <meyering@ascend.com>
2815         * configure.in (AC_REPLACE_FUNCS) Remove memmove, now that it's
2816         AC_REPLACE...'d in m4/jm-macros.m4.
2818         * src/wc.c (posixly_correct): Declare global.
2819         (write_counts): Use it to select printf formats.
2820         (main): Set posixly_correct from the POSIXLY_CORRECT envvar.
2821         From Peter Moulder.
2823 1999-07-15  Jim Meyering  <meyering@ascend.com>
2825         * tests/md5sum/Makefile.am: Revert the 1999-02-15 change.
2826         * tests/md5sum/basic-1, newine-1: Add --text for each individual test.
2827         Reported by Eli Zaretskii.
2829 1999-07-12  Jim Meyering  <meyering@ascend.com>
2831         * configure.in (ALL_LINGUAS): Add Slovak (sk).
2833 1999-07-11  Jim Meyering  <meyering@ascend.com>
2835         * src/tail.c (recheck): Use assert instead of unnecessary close_fd.
2836         Remove a couple of unnecessary FIXME comments.
2838 1999-07-10  Jim Meyering  <meyering@ascend.com>
2840         * doc/textutils.texi: Document new tail options.
2842         * src/tail.c (struct File_spec) [tailable]: Rename from `missing' and
2843         document.  Change all uses and locals like was_missing to was_tailable.
2844         Invert expressions as appropriate.
2845         (reopen_inaccessible_files): Rename from allow_missing.
2846         (sleep_interval): Describe.
2847         (--allow-missing): Deprecate.
2848         (--retry): New option, equivalent to --allow-missing.
2849         (usage): Document name vs. descriptor differences.
2850         Refer to manual for descriptions of --max-unchanged-stats=N
2851         and --max-consecutive-size-changes=N.
2852         (valid_file_spec): New function.
2853         (recheck): Assert valid_file_spec.
2854         Remove dead else-if block (suggestion from Eli Zaretskii).
2855         Adjust stmts that set f->tailable -- unlike for `missing', tailable
2856         doesn't depend on errno == ENOENT.
2857         (parse_options): Give a warning if --retry is used when not following
2858         by name.
2860         * tests/join/Test.pm: New test case (but commented out) for
2861         Paul's 1999-06-01 fix.
2863 1999-07-09  Jim Meyering  <meyering@ascend.com>
2865         * configure.in (ALL_LINGUAS): Add Greek (el).
2867 1999-07-04  Jim Meyering  <meyering@ascend.com>
2869         * tests/join/Test.pm: New test case for Paul's 1999-06-03 fix.
2871 1999-07-03  Eli Zaretskii  <eliz@is.elta.co.il>
2873         * src/tail.c (struct File_spec): New member, errnum.
2874         (recheck): Record the new value of errno in f->errnum.  Don't
2875         output an error message unless the new value of errno differs from
2876         the old one.  Output a message if previously-inaccessible file
2877         becomes accessible.
2878         (tail_forever): Always recheck files whose fd is negative.  If the
2879         file cannot be fstat'ed, record the errno value in f[i].errnum.
2880         (tail_file): If the file cannot be open, record the errno value in
2881         f->errnum.  If it can be opened, initialize f->errnum to zero.  If
2882         it's a non-regular non-fifo file, initialize f->errnum to -1.
2884 1999-06-21  Jim Meyering  <meyering@ascend.com>
2886         * doc/textutils.texi: Use lower case characters in sc{} context.
2887         Reported by Eli Zaretskii.
2889 1999-06-03  Paul Eggert  <eggert@shade.twinsun.com>
2891         * src/join.c (xfields): Only <blank>s separate fields, not <space>s.
2893 1999-06-01  Paul Eggert  <eggert@twinsun.com>
2895         * lib/linebuffer.c (readline): Leave room for an extra byte
2896         after the newline; comm needs this for memcoll.
2898 1999-06-01  Paul Eggert  <eggert@twinsun.com>
2900         Add LC_COLLATE support to `join'.
2902         * doc/textutils.texi: Describe join and LC_COLLATE.
2904         * src/join.c: Add support for LC_COLLATE locale.
2905         Include hard-locale.h, linebuffer.h, memcoll.h.
2906         (struct line): New member `buf', replacing `beg' and `lim'.
2907         All uses changed.
2908         (hard_LC_COLLATE): New var.
2909         (main): Initialize it.
2910         (get_line): Use readline to read the line,
2911         instead of doing it by hand.
2912         That way, we get a buffer that we can pass to memcoll.
2913         (keycmp): Use memcoll to compare lines if hard_LC_COLLATE is nonzero.
2915 1999-05-27  Volker Borchert  <bt@teknon.de>
2917         * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix.
2919 1999-05-25  Paul Eggert  <eggert@twinsun.com>
2921         Add LC_COLLATE support to `comm', so that `comm' is compatible
2922         with `sort' in nontrivial locales.
2924         * doc/textutils.texi: Document locale-specific mode for comm.
2926         * lib/Makefile.am (libtu_a_SOURCES): Add hard-locale.c, memcoll.c.
2927         (noinst_HEADERS): Add hard-locale.h, memcoll.h.
2929         * src/comm.c: Include hard-locale.h, memcoll.h.
2930         (hard_LC_COLLATE): New variable.
2931         (compare_files): Use memcoll to compare if hard_LC_COLLATE.
2932         (main): Initialize hard_LC_COLLATE from locale.
2934         * src/sort.c: Include hard-locale.h, memcoll.h.
2935         (hard_LC_COLLATE, hard_LC_CTYPE, hard_LC_TIME): New variables,
2936         replacing `need_locale'.
2937         (memcoll): Move to lib/memcoll.c.
2938         (keycompare): No need to alloc (0), since our caller now does it.
2939         (compare): alloca (0) before returning.
2940         (my_setlocale): Remove; hard_locale now dows this.
2941         (main): Invoke setlocale, bindtextdomain, and textdomain before
2942         invoking anything that might print an error.
2943         Use hard_locale to determine which locales are hard.
2945         * lib/hard-locale.c, lib/hard-locale.h, lib/memcoll.c, lib/memcoll.h:
2946         New files.
2948 1999-05-25  Paul Eggert  <eggert@shade.twinsun.com>
2950         * lib/linebuffer.c (readline):
2951         Append trailing newline to line.
2952         * lib/linebuffer.h
2953         [struct linebuffer] (size): Declare to be of type size_t, not long.
2954         [struct linebuffer] (length): Likewise.
2955         * src/comm.c, (writeline): Lines now contain trailing newline.
2956         * src/uniq.c (find_field, different): Use size_t, not int, for lengths.
2957         (writeline): Lines now contain trailing newline.
2958         (check_file): Use size_t, not int, for lengths.
2959         * src/nl.c (proc_text, check_section, main): More of the same.
2961         * lib/linebuffer.h (struct linebuffer): Use size_t for sizes.
2962         src/nl.c (header_del_len, body_del_len, footer_del_len, main):
2963         Likewise.
2964         src/uniq.c (find_field, different, check_file): Likewise.
2966         * lib/linebuffer.c (readline): Silently append trailing
2967         newline if needed.  Do not bother setting buffer length to 0
2968         at EOF, since it's not part of the spec and nobody relies on
2969         it.  Do not compute the difference between unrelated pointers.
2971 1999-05-25  Paul Eggert  <eggert@twinsun.com>
2973         * src/tac.c (memrchr): Ifdef out this unused function.
2975 1999-05-25  Jim Meyering  <meyering@ascend.com>
2977         * doc/textutils.texi (Squeezing): Remove misleading square brackets
2978         from SET1 in the one-word-per-line example.
2980 1999-05-22  Jim Meyering  <meyering@ascend.com>
2982         * lib/Makefile.am (libtu_a_SOURCES): Remove memchr.c.
2983         From Ulrich Drepper.
2985         * Version 1.22m.
2987 1999-05-22  Paul Eggert  <eggert@twinsun.com>
2989         * doc/textutils.texi: Document locale-specific changes to `sort',
2990         as well as the new, POSIX-compliant definition of line comparison,
2991         and -g's more careful treatment of NaNs, infinities and zeros.
2993         * src/sort.c (general_numcompare): Put exceptional cases
2994         first, not last, to be consistent with -M.
2996 1999-05-21  Paul Eggert  <eggert@twinsun.com>
2998         * src/sort.c (strtod): Declare if STDC_HEADERS is not defined.
2999         (general_numcompare): Use strtod, not xstrtod.
3000         Do not consider partial conversions to be errors.
3001         Put -infinity at the start, and +infinity at the end;
3002         follow +infinity with NaNs (sorted by bit pattern),
3003         and finally by conversion errors.
3005 1999-05-21  Jim Meyering  <meyering@ascend.com>
3007         * tests/sort/Test.pm (11d): Reverse lines in expected output
3008         to reflect latest change.
3009         (use-nl): New test from Paul Eggert.
3011 1999-05-20  Paul Eggert  <eggert@twinsun.com>
3013         * src/sort.c: Treat the trailing newline as part of the line,
3014         as required by POSIX.2.
3016         (struct line, findlines, compare, checkfp, mergefps, sort):
3017         A line now includes its trailing newline.
3018         (findlines): Do not replace newline with NUL.
3019         (memcoll, keycompare): Work even if the data to be compared are
3020         adjacent strings; this is possible now that lines contain the
3021         trailing newline.
3022         (fillbuf): Always have an unused byte at the end of the buffer,
3023         since memcoll and keycompare want to modify a byte after the last line.
3024         (sortalloc, mergealloc): Increase by 1, for trailing byte.
3026 1999-05-20  Jim Meyering  <meyering@ascend.com>
3028         * tests/sort/Test.pm: Add test case from Paul Eggert.
3030 1999-05-20  Paul Eggert  <eggert@twinsun.com>
3032         * src/sort.c (keycompare): Ignore any length difference if the
3033         localized comparison says the strings are equal.
3035         * src/sort.c (memcoll, keycompare, compare): Handle NUL
3036         characters properly when comparing with LC_COLLATE semantics.
3037         (NLS_MEMCMP): Remove.
3038         (memcoll): Renamed from strncoll.
3039         Take separate lengths for each string.
3040         This function is now invoked only when need_locale.
3041         (keycompare): Don't copy strings when ignore and translate
3042         are both NULL.
3044 1999-05-18  Paul Eggert  <eggert@twinsun.com>
3046         * src/sort.c (MONTHTAB_CONST): Renamed from NLS_CONST; the use
3047         is also changed.  Define to const also if !HAVE_NL_LANGINFO.
3049         (usage): `,' -> `;' (English typo).
3051 1999-05-17  Eli Zaretskii  <eliz@is.elta.co.il>
3053         * src/cat.c (main): When stdout is in binary mode, make sure all
3054         input files are also read in binary mode.
3056 1999-05-16  Jim Meyering  <meyering@ascend.com>
3058         * Version 1.22l.
3060 1999-05-11  Paul Eggert  <eggert@twinsun.com>
3062         * src/sort.c: Don't autodetect the locale of numbers and
3063         months, as this conflicts with POSIX.2 and is tricky to boot.
3065         (FLOATING_COMMA, NLS_STRNCMP, NLS_MAX_GROUPS,
3066         NLS_ONE_CHARACTER_STRING): Remove macros no longer used.
3068         (nls_grouping, nls_fraction_found, nls_month_found, nos_monthtab,
3069         nls_months_collide, nls_keyhead, us_monthtab): Remove variables no
3070         longer used.
3072         (struct nls_keyfield): Remove types no longer used.
3074         (strncoll_s2_readonly, nls_set_fraction, look_for_fraction,
3075         nls_month_is_either_locale, nls_numeric_format): Remove functions no
3076         longer used.
3078         (monthtab): Now has the role that us_monthtab had, but it's const only
3079         if ENABLE_NLS is not defined.
3081         (C_DECIMAL_POINT): Renamed from FLOATING_POINT.  All uses changed.
3082         (MONTHS_PER_YEAR): Renamed from NLS_NUM_MONTHS.  All uses changed.
3083         (struct_month_cmp): Renamed from nls_sort_month_comp.  All uses changed.
3084         Use strcmp, not strcoll, since the user doesn't care about collating
3085         here.
3087         (inittables): Read locale data into monthtab, rather than modifying a
3088         separate month table and futzing with indirection.  Do not worry about
3089         colliding months, since we no longer autodetect month locale.
3091         (fraccompare): Don't set no-longer-used variable nls_fraction_found.
3093         (getmonth): Use strncmp to compare months, since user doesn't care
3094         about collating here.  Fix bug where code incorrectly assumed that
3095         strlen (monthtab[lo].name) == strlen (monthtab[ix].name).
3097         (keycompare, main): Don't autodetect month locale.
3099         (compare): Don't use NLS_MEMCP in code that can't be executed if
3100         need_locale is false, as NLS_MEMCP is equivalent to memcmp in that
3101         case.
3103         (sort, insertkey, main): Don't autodetect numeric locale.
3105 1999-05-15  Jim Meyering  <meyering@ascend.com>
3107         * tests/join/Test.pm (trailing-sp): New test for this fix.
3108         * src/join.c (xfields): Don't interpret a trailing blank as a
3109         delimiter when e.g. -t: was specified.  From Tim Smithers.
3111 1999-05-12  Jim Meyering  <meyering@ascend.com>
3113         * tests/Makefile.am (envvar-check): Renamed from check-local.
3114         (check): Depend on envvar-check so the envvar check is performed
3115         before all other tests.  Reported by Volker Borchert.
3116         * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects,
3117         so CDPATH is mentioned in the message.  Reported by Volker Borchert.
3119 1999-05-11  Jim Meyering  <meyering@ascend.com>
3121         * src/sort.c (usage): Split the --help message into two pieces so that
3122         neither is longer than 2048.  For Irix4's cc.  Reported by Kaveh Ghazi.
3124 1999-05-09  Jim Meyering  <meyering@ascend.com>
3126         * lib/regex.c: Update from libc.
3128         * Version 1.22k.
3130         * Makefile.maint (alpha): Put the announcement in
3131         /tmp/announce-$(distdir)
3133         * tests/sort/Test.pm (neg-nls): New test.
3135 1999-05-08  Jim Meyering  <meyering@ascend.com>
3137         * src/system.h (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM,
3138         and all the *_MIN and *_MAX symbols): Remove definitions.
3139         * src/sys2.h: Put the definitions here instead (this file is shared
3140         between all three *utils packages, while system.h is not).
3142 1999-05-06  Paul Eggert  <eggert@twinsun.com>
3144         * src/sort.c (fraccompare, numcompare): Merge the NLS and
3145         non-NLS versions into a single function.
3147         (decimal_point): Now char, since we no longer convert to unsigned
3148         char.
3149         (th_sep): Now int, since we use a value out of char range to denote
3150         the absence of a thousands separator.
3151         (IS_THOUSANDS_SEP): New macro.
3152         (USE_NEW_FRAC_COMPARE): Remove.
3153         (nls_set_fraction): Arg is now char, not unsigned char.
3154         Set th_sep to CHAR_MAX + 1 if there is no thousands separator.
3155         (numcompare): Don't convert to unsigned char unless necessary.
3156         (main): Turn off decimal points and thousand separators if they
3157         are multibyte characters, as we don't support that yet.
3159 1999-05-06  Paul Eggert  <eggert@twinsun.com>
3161         * src/system.h (CHAR_MIN, CHAR_MAX): New macros.
3162         (SCHAR_MIN, SCHAR_MAX): Don't assume that char is signed.
3164 1999-05-06  Paul Eggert  <eggert@twinsun.com>
3166         * src/sort.c (numcompare): Handle comparison of two negative
3167         numbers correctly in the ENABLE_NLS case.
3169 1999-05-04  Jim Meyering  <meyering@ascend.com>
3171         * src/pr.c (usage): Break the usage message into 3 pieces instead of
3172         only 2.  The strings had grown to be longer than 2048, which evokes
3173         errors when compiling with Irix4's cc.  Reported by Kaveh Ghazi.
3175         * src/tsort.c (search_item): Use `1' instead of `+1'.  The latter
3176         elicits a syntax error from SunOS4's cc.  From Kaveh Ghazi.
3178 1999-05-03  Jim Meyering  <meyering@ascend.com>
3180         * src/ptx.c <ctype.h>: Don't include.
3181         [!STDC_HEADERS]: Remove definitions of ctype macros.
3182         Convert e.g., isspace to ISSPACE to use definitions from sys2.h.
3183         Reported by Kaveh Ghazi.
3185         * src/sys2.h (TOLOWER): Define.
3186         (TOUPPER): Define.
3187         * src/join.c (TOLOWER): Remove definition.
3188         * src/md5sum.c (TOLOWER): Remove definition.
3190 1999-04-30  Jim Meyering  <meyering@ascend.com>
3192         * src/sort.c (usage): Document the differences between the
3193         obsolescent, +POS1[-POS2] form, and the POSIX -k option.
3195 1999-04-24  Jim Meyering  <meyering@ascend.com>
3197         * configure.in: Use AC_CANONICAL_HOST.
3199         * lib/Makefile.am (libtu_a_SOURCES): Add xstrtoumax.c
3200         (noinst_HEADERS): Remove xstrtoul.h.
3202         * src/csplit.c: Include new "xstrtol.h", not "xstrtoul.h".
3203         (struct control) [repeat]: Declare as uintmax_t, not int.
3204         (struct control) [lines_required]: Likewise.
3205         (handle_line_error): Use human_readable to print lines_required.
3206         (parse_repeat_count): Parse a uintmax_t.
3207         (parse_patterns): Parse a uintmax_t.
3209         * src/tail.c: Include new "xstrtol.h", not "xstrtoul.h".
3210         * src/od.c: Likewise.
3212         * src/head.c: Include new "xstrtol.h", not "xstrtoul.h".
3213         Change all U_LONG_LONG to uintmax_t.
3214         (head_lines): Move a couple dcls into an inner scope.
3215         (string_to_integer): Rename from string_to_ull.
3217 1999-04-19  Jim Meyering  <meyering@ascend.com>
3219         * Makefile.maint (b_host): Remove /pub suffix.
3221 1999-04-18  Jim Meyering  <meyering@ascend.com>
3223         * Version 1.22j.
3225         * Makefile.maint (my-distcheck): Use AMTAR, not TAR.
3227         * src/sort.c (usage): s/DIRECT/DIRECTORY/g
3228         Rename global: s/temp_file_prefix/temp_dir/.
3229         (NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR.  Use _POSIX_NAME_MAX,
3230         not _POSIX_PATH_MAX.  Guard with #if HAVE_PATHCONF rather than
3231         #if HAVE_UNISTD_H.
3232         (tempname): Wrap after 99999 only for length-impaired file systems.
3234 1999-04-17  Jim Meyering  <meyering@ascend.com>
3236         * src/tail.c (file_lines): Fix serious bug introduced with last changes.
3237         From Andreas Schwab.
3239 1999-04-15  Jim Meyering  <meyering@ascend.com>
3241         * tests/Makefile.am (EXTRA_DIST): Rename .posix-warn to .env-warn.
3242         (check-local): Warn about CDPATH in the same way
3243         we warn about POSIXLY_CORRECT, since the cp/same-file test fails at
3244         least when using bash with CDPATH set.  Reported by Mark Hewitt.
3246         * src/pr.c Add comments.
3247         (init_header): Tweak white space in Date/Time header.
3248         * tests/pr/Test.pm: Updated all tests to reflect the big
3249         1999-02-13 change.  From Roland Huebner.
3251 1999-04-12  Jim Meyering  <meyering@ascend.com>
3253         * src/cat.c (main): Declare out_dev to be of type dev_t, not `int'.
3254         Declare out_ino to be of type ino_t, not `int'.
3255         From John Bley.
3257         * src/od.c (MIN, MAX): Remove definitions.
3258         * src/sys2.h (MIN, MAX): Define here instead.
3259         Reported by John Bley.
3261 1999-04-11  Jim Meyering  <meyering@ascend.com>
3263         * Version 1.22i.
3265         * tests/pr/Test.pm (test_vector): Disable all tests while I wait for
3266         an updated suite.
3268         Fix the problem whereby `yes > k & sleep 1; tail -2c k' would infloop.
3269         * src/tail.c (COPY_TO_EOF): Define.
3270         (dump_remainder): Add parameter, n_bytes, and rewrite to use it.
3271         Update callers.
3272         (file_lines): Rename parameter.
3273         (tail_bytes): Remove obsolete comment.
3275         Fix the problem whereby `yes > k & sleep 1; tail -1 k' would infloop.
3276         * src/tail.c (dump_remainder): Move this function to precede the
3277         new use in file_lines.
3278         (tail_lines): Don't call dump_remainder here.
3279         (file_lines): Call dump_remainder here instead.
3280         Reported by Lehti Rami.
3282         * lib/readtokens.c (readtoken, readtokens): Protoize.
3284 1999-04-10  Jim Meyering  <meyering@ascend.com>
3286         * src/tail.c (xwrite): Use STDOUT_FILENO instead of literal `1'.
3288 1999-04-04  Jim Meyering  <meyering@ascend.com>
3290         * src/cat.c: Standardize --help and --version processing.
3291         * src/comm.c: Likewise.
3292         * src/csplit.c: Likewise.
3293         * src/cut.c: Likewise.
3294         * src/expand.c: Likewise.
3295         * src/fmt.c: Likewise.
3296         * src/fold.c: Likewise.
3297         * src/head.c: Likewise.
3298         * src/join.c: Likewise.
3299         * src/md5sum.c: Likewise.
3300         * src/nl.c: Likewise.
3301         * src/od.c: Likewise.
3302         * src/paste.c: Likewise.
3303         * src/pr.c: Likewise.
3304         * src/ptx.c: Likewise.
3305         * src/split.c: Likewise.
3306         * src/sum.c: Likewise.
3307         * src/tac.c: Likewise.
3308         * src/tail.c: Likewise.
3309         * src/tr.c: Likewise.
3310         * src/unexpand.c: Likewise.
3311         * src/uniq.c: Likewise.
3312         * src/wc.c: Likewise.
3314 1999-03-29  Jim Meyering  <meyering@ascend.com>
3316         * configure.in (GNU_PACKAGE): Remove related code -- now it's in
3317         the catch-all for shared autoconf code, m4/jm-macros.m4.
3318         (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
3319         this instead.
3321 1999-03-26  Jim Meyering  <meyering@ascend.com>
3323         * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
3324         (noinst_HEADERS): Add version-etc.h.
3326 1999-03-25  Jim Meyering  <meyering@ascend.com>
3328         * src/tail.c (recheck): Factor out a block of duplicated code.
3329         Set f->size to 0 upon encountering a new file so we read it from
3330         the beginning rather than from the end of the first line or
3331         block.  Otherwise, after a log rotation, tail would omit the first
3332         line or block of the new file.  Reported by Ed Avis.
3334 1999-03-20  Jim Meyering  <meyering@ascend.com>
3336         * tests/Makefile.am (SUBDIRS): Temporarily remove pr.
3338 1999-03-13  Jim Meyering  <meyering@ascend.com>
3340         * src/tac.c (tac_mem): `#if-0'-out this unused function.
3341         (tac_stdin_to_mem): Likewise.
3343         * doc/textutils.texi (cut invocation): Describe --output-delimiter.
3345 1999-03-12  Jim Meyering  <meyering@ascend.com>
3347         * src/sys2.h (SETVBUF): Define new macro.
3348         * src/tail.c (dump_remainder): Don't fflush stdout here.
3349         (main) [if forever]: Make stdout unbuffered, instead.
3350         Akim Demaille pointed out that when running `echo x>a; tail -f a>>a' ,
3351         the file `a' didn't grow longer than two lines.  Now it grows
3352         without bound.
3354 1999-03-07  Jim Meyering  <meyering@ascend.com>
3356         * tests/md5sum/newline-1: Test for the actual feature.
3357         With help from Eli Zaretskii.
3359         * src/pr.c (usage): Add missing \n\.
3361         The newline test would always fail on MSDOS/Windows systems --
3362         so move it to a separate file where we can test for that.
3363         * tests/md5sum/basic-1: Remove newline test.
3364         * tests/md5sum/newline-1: New file.
3365         * tests/md5sum/Makefile.am (TESTS): Add newline-1.
3366         Pointed out by Eli Zaretskii.
3368         1999-02-13  Roland Huebner  <rh@pelikan.cologne.de>
3369         * src/pr.c
3370         (main): Redefine options -s, -w to be POSIX compliant; introduce
3371         new options -J, -S, -W to disentangle -s and -w when used together
3372         with the three column options;
3373         (add_line_number): Make POSIX compliant; use default number
3374         separator TAB with single column output.
3375         (add_line_number): Make POSIX compliant; with multicolumn output
3376         now prefer `text columns of equal width' rather than a consequent
3377         use of `default n-separator TAB'.
3378         (add_line_number): Change line number cut-off from lower-oder to
3379         higher-oder digit to avoid loss of information; no consequent
3380         handling exists in different utilities and other UNIXes.
3381         (char_to_clump): Expand input text tabs to 8 spaces, if
3382         input_tab_char doesn't equal TAB (adapted to other UNIXes).
3383         (usage): Update POSIX compliant options -s, -w; add new options -J,
3384         -S, -W.
3385         (main): Update the source internal documentation.
3386         Some smaller BUGFIXES (print_sep_string, init_header, skip_to_page,
3387         reset_status, print_header).
3389         * tests/md5sum/basic-1 (backslash): Use .\foo instead of \.foo so we
3390         don't tramp on root directory in MSDOS/Windows.
3391         Suggestion from Eli Zaretskii.
3393         1999-02-15  Eli Zaretskii  <eliz@is.elta.co.il>
3395         * tests/md5sum/Makefile.am (TESTS_ENVIRONMENT): Run md5sum with the
3396         --text option (for MSDOS).
3398 1999-03-06  Jim Meyering  <meyering@ascend.com>
3400         * src/cut.c (getstr): Change type of `delim' parameter from char to int.
3401         (cut_fields): Cast to `unsigned char' before comparing.
3402         (main): Cast to `unsigned char' before assigning.
3403         From Arne Juul.
3404         * tests/cut/Test.pm: Add a test to exercise the bug.
3406         * src/ptx.c (swallow_file_in_memory): Use a `%s' format in error call,
3407         in case the argument string contains a `%'.
3408         (main): Likewise.
3409         * src/fmt.c (main): Likewise.
3410         * src/sort.c (main): Likewise.
3412         1999-02-13  Eli Zaretskii  <eliz@is.elta.co.il>
3414         * src/sys2.h [__DJGPP__]: Include <io.h> and <sys/exceptn.h>.
3416         * src/ptx.c (swallow_file_in_memory): Slurp up the whole file at
3417         once on MSDOS as well, but we have to relax the test for whether
3418         reading it succeeded.
3420 1999-03-03  Jim Meyering  <meyering@ascend.com>
3422         * src/cat.c: Include long-options.h
3423         [long_options]: Remove the "help" and "version" entries.
3424         Remove declarations of show_help and show_version.
3425         (main): Use parse_long_options, including author name(s).
3426         Remove the show_version and show_help blocks.
3427         * src/cksum.c: Likewise.
3428         * src/comm.c: Likewise.
3429         * src/csplit.c: Likewise.
3430         * src/cut.c: Likewise.
3431         * src/expand.c: Likewise.
3432         * src/fmt.c: Likewise.
3433         * src/fold.c: Likewise.
3434         * src/head.c: Likewise.
3435         * src/nl.c: Likewise.
3436         * src/od.c: Likewise.
3437         * src/paste.c: Likewise.
3438         * src/pr.c: Likewise.
3439         * src/split.c: Likewise.
3440         * src/sum.c: Likewise.
3441         * src/tac.c: Likewise.
3442         * src/tail.c: Likewise.
3443         * src/tr.c: Likewise.
3444         * src/unexpand.c: Likewise.
3445         * src/uniq.c: Likewise.
3446         * src/wc.c: Likewise.
3448         * src/ptx.c: Include long-options.h
3449         [long_options]: Remove the "help" and "version" entries.
3450         Remove declarations of show_help and show_version.
3451         (main): Remove `const' attribute from dcl of argv parameter.
3452         Call bindtextdomain and textdomain.
3453         Use parse_long_options, including author name(s).
3454         Remove the show_version and show_help blocks.
3456         * src/join.c (main): Include author name argument in call to
3457         parse_long_options.
3458         * src/md5sum.c (main): Likewise.
3459         * src/sort.c (main): Likewise.
3460         * src/tsort.c (main): Likewise.
3462 1999-02-07  Jim Meyering  <meyering@ascend.com>
3464         * Version 1.22h.
3466         * Makefile.maint (my-distcheck): Don't depend on dist, now that this
3467         is hooked up to the distcheck rule.
3468         * Makefile.am (distcheck-hook): New target and rule -- link to shared
3469         rule, my-distcheck, in Makefile.maint.
3471 1999-01-31  Jim Meyering  <meyering@ascend.com>
3473         * doc/textutils.texi: Wrap the @top node in @ifnottex instead of
3474         @ifinfo so `makeinfo --html ...' works.  From Karl Berry.
3476 1999-01-30  Jim Meyering  <meyering@ascend.com>
3478         * acconfig.h: Remove lots of `#undef's, now that we use the
3479         3-argument forms of AC_DEFINE* macros.
3481         * configure.in: Require autoconf 2.13.
3482         Use 3-argument form of AC_DEFINE*.
3484 1999-01-24  Jim Meyering  <meyering@ascend.com>
3486         * src/tac.c (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.
3488         * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
3489         (and hence that of the local `n1', too) to `int' at Paul's request.
3491 1999-01-18  Akim Demaille  <demaille@inf.enst.fr>
3493         * doc/textutils.texi: Harmonization of @samp use for options.
3495 1999-01-17  Jim Meyering  <meyering@ascend.com>
3497         * Makefile.am (SUBDIRS): Add djgpp.
3498         * configure.in (AC_OUTPUT): Add djgpp/Makefile.
3499         * djgpp/: New directory.
3501         * man/Makefile.maint ($(man_MANS)): Don't remove the target (the
3502         man page) until after we've created its replacement.
3504 1999-01-16  Eli Zaretskii  <eliz@is.elta.co.il>
3506         * GNUmakefile: Add SHELL = /bin/sh.
3507         * man/GNUmakefile: Likewise.
3509 1999-01-16  Jim Meyering  <meyering@ascend.com>
3511         * acconfig.h: Remove @BOTTOM@ section.
3512         Instead, add the define and decl via m4/jm-macros.m4.
3514         * lib/argmatch.h (XARGMATCH): Define to return a value once again.
3515         (XARGCASEMATCH): Likewise.
3517         * lib/argmatch.c (EXIT_FAILURE): Define.
3518         (ARGMATCH_DIE): Provide default.
3519         (__xargmatch_internal): New function.
3520         s/rogram_name/program_name.
3521         From Akim Demaille.
3523 1999-01-14  Jim Meyering  <meyering@ascend.com>
3525         * tests/md5sum/basic-1: Use `f', not `x' as temp. file name to avoid
3526         warnings from perl5.004.
3527         Reported by Volker Borchert.
3529         * lib/long-options.c (parse_long_options): Rename `usage' parameter
3530         to avoid shadowing globally scoped function.
3532 1999-01-14  Akim Demaille  <demaille@inf.enst.fr>
3534         * acconfig.h: Add a @BOTTOM@ section.
3535         (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1).
3536         Declare usage.
3537         * src/*.c: Don't prototype usage as static.
3539 1999-01-10  Jim Meyering  <meyering@ascend.com>
3541         * Version 1.22g.
3543         All of the following new code is protected by
3544         `#if DONT_UNLINK_WHILE_OPEN'
3545         * src/tac.c (file_to_remove): New global.
3546         (fp_to_close): New global.
3547         (unlink_tempfile): New function.
3548         (record_tempfile): New function.
3549         (save_stdin): Call record_tempfile.
3550         Use SET_BINARY.
3551         (main): Use SET_BINARY and SET_BINARY2.
3552         From Eli Zaretskii.
3554 1999-01-09  Jim Meyering  <meyering@ascend.com>
3556         * tests/uniq/Test.pm: Add tests from Jochen Hein.
3557         * src/uniq.c: New option: --all-repeated (-D).
3558         (output_all_repeated) [output_mode]: New enum value.
3559         (usage): Describe it.
3560         (writeline): Test for new mode.
3561         (check_file): Likewise.
3562         Based on patches from Jochen Hein and Florin Iucha.
3563         (main): Diagnose `too many arguments'.
3565         * tests/head/Test.pm (null-1): Add test from Jochen Hein.
3567         * src/tail.c (parse_obsolescent_option): Interpret `number' as decimal.
3568         (parse_options): Likewise.
3569         Reported by Kamal Paul Nigam.
3571         * src/tail.c: New option: --max-unchanged-stats=N.
3572         New option: --max-n-consecutive-size-changes=N.
3574 1999-01-03  Jim Meyering  <meyering@ascend.com>
3576         * src/md5sum.c (usage): Remove third program_name argument -- there
3577         were only two `%s' in the format string.
3579 1999-01-02  Jim Meyering  <meyering@ascend.com>
3581         * src/tsort.c (tsort): Use a single call to error instead of two
3582         to fprintf.
3583         (main): Remove `%s: ' prefix on format string.
3585         * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
3587         * src/ptx.c (format_vals): New array.
3588         (main): Use XARGMATCH in place of argmatch.
3590         * lib/argmatch.h (XARGMATCH): Don't return a value;  instead,
3591         modify a parameter.  Add a `Die_stmt' parameter.
3592         Add parentheses.
3593         * lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
3594         (argmatch_to_argument): Add `const' attribute to first parameter.
3596 1999-01-01  Jim Meyering  <meyering@ascend.com>
3598         * src/tsort.c: Move inclusion of assert.h to follow that of stdio.h.
3599         Some losing systems require this.
3600         Use STREQ macro instead of strcmp in a few places.
3602         * po/POTFILES.in: Add tsort.c.
3604         * man/Makefile.maint ($(man_MANS)): `exit 1' if any of help2man,
3605         chmod, or mv fails.  Otherwise, the failure could go unnoticed.
3607         * man/Makefile.summ: Add entries for ptx and tsort.
3609         * src/tsort.c: Include readtokens.h.
3610         (zeros): Rename global from `rr'.
3611         (getstr): Remove function.
3612         (tsort) Use readtoken instead of getstr.
3614         * lib/readtokens.c: New file.
3615         * lib/readtokens.h: New file.
3616         * lib/Makefile.am (libtu_a_SOURCES): Add readtokens.c.
3617         (noinst_HEADERS): Add readtokens.h.
3619         * man/Makefile.am (man_MANS): Add ptx.1.
3620         * man/ptx.x: New file.
3622         * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
3624         * man/Makefile.am (man_MANS): Add tsort.1.
3625         * man/tsort.x: New (essentially empty) file.
3627         * src/tsort.c: Rename globals N and R so they don't shadow locals.
3628         (tsort): Rename from `sort'.
3630         1998-11-07  Mark Kettenis  <kettenis@phys.uva.nl>
3631         * src/Makefile.am (bin_PROGRAMS): Add tsort.
3632         * src/tsort.c: New program.
3634         * lib/Makefile.am (libtu_a_SOURCES): Add quotearg.c.
3635         (noinst_HEADERS): Add quotearg.h.
3637         ============================
3638         All of the following are from:
3639         1998-04-17  Eli Zaretskii  <eliz@is.elta.co.il>
3641         * src/system.h (SET_BINARY, SET_BINARY2, fileno, setmode): New
3642         macros.
3644         * src/cat.c (usage) [O_BINARY]: Describe -B,--binary option.
3645         (main) [O_BINARY]: binary_files, binary_output, file_open_mode:
3646         new variables.  Add --binary to long_options[].  Switch stdin and
3647         stdout to binary mode unless file contents are not important
3648         anyway.  Open files in binary mode when required.
3650         * src/cksum.c (cksum) [O_BINARY]: Read redirected stdin in binary
3651         mode.
3653         * src/expand.c (expand): Use binary I/O where appropriate.
3655         * src/head.c (head_bytes, head_lines) [O_BINARY]: Use binary I/O.
3657         * src/md5sum.c (OPENOPTS) [O_BINARY]: Use binary I/O when non-zero
3658         argument.
3659         (md5_file) [O_BINARY]: Switch redirected stdin to binary mode.
3660         (main) [O_BINARY]: Use binary reads by default on those systems
3661         which care about the difference.
3663         * src/od.c (skip, read_char, read_block) [O_BINARY]: Switch input
3664         stream to binary mode.
3666         * src/sort.c (PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max
3667         file name characters in a given directory.
3668         (tempname): Make sure the temp file name is unique even if long
3669         file names aren't supported.
3671         * src/split.c (cwrite) [O_BINARY]: Write output in binary mode.
3672         (main) [O_BINARY]: Read input in binary mode.
3674         * src/sum.c (bsd_sum_file, sysv_sum_file) [O_BINARY]: Read input
3675         in binary mode.
3677         * src/tac.c (record_tempfile, unlink_tempfile)
3678         [DONT_UNLINK_WHILE_OPEN]: New functions, for systems where a file
3679         cannot be removed before it is closed.
3680         (save_stdin) [DONT_UNLINK_WHILE_OPEN]: Record the temporary file,
3681         to be removed before exit.
3682         (tac_file, save_stdin, main): Use binary I/O when appropriate.
3684         * src/tail.c (tail_lines, tail_bytes) [O_BINARY]: Use binary I/O
3685         when appropriate.
3687         * src/tr.c (main) [O_BINARY]: Use binary I/O when appropriate.
3689         * src/unexpand.c (unexpand): Use binary I/O where appropriate.
3691         * src/wc.c (wc): Use binary mode for input.
3693         * doc/textutil.texi: Add comments about peculiarities of Textutils
3694         operation on MS-DOS/MS-Windows.
3696 1998-12-22  Jim Meyering  <meyering@ascend.com>
3698         * configure.in (ALL_LINGUAS): Add chinese (zh).
3700 1998-12-17  Jim Meyering  <meyering@ascend.com>
3702         New options for tail:
3703         --follow=name, --follow=descriptor, --allow-missing
3704         * src/tail.c (Follow_mode): New enum.
3705         (n_live_files): New function.
3706         (tail_forever): Avoid starvation with --follow=name and a
3707         continually-growing unlinked or renamed file.
3709 1998-12-13  Jim Meyering  <meyering@ascend.com>
3711         * tests/uniq/Test.pm: New file.
3712         * tests/uniq/Makefile.am: New file.
3713         * tests/uniq: New directory.
3714         * tests/Makefile.am (SUBDIRS): Add uniq.
3715         * configure.in (AC_OUTPUT): Add tests/uniq/Makefile.
3716         From Jochen Hein.
3718         * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
3719         (stat.c): Likewise.
3720         (EXTRA_DIST): Add xstat.in.
3721         * lib/stat.c: Remove file.
3722         * lib/lstat.c: Remove file.
3723         * lib/xstat.in (xstat@): New file.
3725         * configure.in (ALL_LINGUAS): Add Russian (ru).
3727 1998-10-31  Jim Meyering  <meyering@ascend.com>
3729         * acconfig.h (stat): New #undef.
3731 1998-10-22  Jim Meyering  <meyering@ascend.com>
3733         * src/fold.c (usage): Add mention of --version and --help.
3734         Reported by Matej Vela <mvela@public.srce.hr>.
3736 1998-10-04  Jim Meyering  <meyering@ascend.com>
3738         * lib/fnmatch.h: New file. (unused)
3739         * lib/fnmatch.c: New file. (unused)
3740         * lib/Makefile.am (noinst_HEADERS): Add fnmatch.h.
3742 1998-10-03  Jim Meyering  <meyering@ascend.com>
3744         * man/Makefile.am: Switch to using help2man.
3745         (EXTRA_DIST): Add Makefile.summ.
3747         * man/help2man: Invoke program with --manhelp option only if
3748         --name=STRING not specified.  Otherwise, this would fail with `yes'.
3749         * man/Makefile.summ: New file.
3750         * man/Makefile.maint: Include it.
3751         * man/help2man: New file.
3752         * man/GNUmakefile: New file.
3753         * man/Makefile.maint: New file.
3754         * man/*.x: New files.
3755         * man/*.1: Remove files.
3757         * src/md5sum.c (split_3): Rename local variable, to `escaped_filename'.
3758         (main): Output the leading backslash not just when there's a newline
3759         in the file name, but also when there's a backslash.
3760         Reported by Jim Dennis.
3762         * tests/md5sum/basic-1: Add tests with filenames containing newline
3763         and backslash characters.  (for the bug fixed above)
3765         * tests/Makefile.am (EXTRA_DIST): Add Fetish.pm.
3766         * tests/Fetish.pm: New file.
3768         * tests/md5sum/basic-1: New file: rewrite of old tests to use Fetish.pm.
3769         * tests/md5sum/Test.pm: Remove file.
3770         * tests/md5sum/Makefile.am: Rewrite.
3772 1998-09-19  Jim Meyering  <meyering@ascend.com>
3774         * src/ptx.c (program_name): Declare *not* to be const.
3776 1998-08-29  Jim Meyering  <meyering@ascend.com>
3778         * src/cut.c: Don't assume ASCII.
3779         * src/pr.c: Likewise.
3780         * src/tail.c: Likewise.
3782 1998-08-15  Jim Meyering  <meyering@ascend.com>
3784         * src/pr.c (usage): Reformat.
3786         * src/ptx.c: Add braces to suppress warning about ambiguous `else'.
3787         * lib/bumpalloc.h: Likewise.
3789 1998-08-13  François Pinard  <pinard@iro.umontreal.ca>
3791         * src/ptx.c: New file.
3792         * src/Makefile.am (bin_PROGRAMS): Add ptx.
3793         * lib/bumpalloc.h, lib/diacrit.h, lib/diacrit.c: New files.
3794         * lib/Makefile.am (libtu_a_SOURCES): Add diacrit.c.
3795         (noinst_HEADERS): Add bumpalloc.h and diacrit.h.
3797 1998-08-09  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3799         * src/pr.c (long_options): Add long names for all options.
3800         (usage): Update help string.
3801         (main): Handle the special options --pages and --columns.
3803 1998-08-02  Jim Meyering  <meyering@ascend.com>
3805         * lib/linebuffer.c (readline): Return zero upon error as well as upon
3806         end of file.  From James Youngman.
3807         Ansideclify.
3809 1998-08-01  Jim Meyering  <meyering@ascend.com>
3811         * src/sort.c (my_setlocale): Guard definition within #ifdef ENABLE_NLS.
3812         From Manfred Hollstein.
3814 1998-07-30  Jim Meyering  <meyering@ascend.com>
3816         * tests/cut/Test.pm: Avoid broken pipe message for tests that fail
3817         with usage errors.
3819         * src/sort.c (usage): Add angle brackets to make `Report bugs...'
3820         message consistent with all the rest.
3822 1998-07-28  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3824         * tests/cut/Test.pm: Avoid broken pipe for 'y' and 'z' tests.
3826         * src/sort.c (NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid
3827         clash with <langinfo.h>.  All uses changed.
3829 1998-07-26  Jim Meyering  <meyering@ascend.com>
3831         * intl/localealias.c (read_alias_file): Avoid mixing `char*' and
3832         `unsigned char*' variables.  Again for irix4.
3833         Mostly from Kaveh Ghazi.
3835         * src/join.c: Convert some char* dcls to `unsigned char*' and remove
3836         a cast -- to placate irix4's cc.
3837         * src/fmt.c (check_punctuation): Add cast to placate irix4's cc.
3838         Reported by Kaveh Ghazi.
3840         * src/md5sum.c (split_3): Add cast to placate irix4's cc.
3841         From Kaveh Ghazi.
3843 1998-07-25  Jim Meyering  <meyering@ascend.com>
3845         * Version 1.22f.
3847         * tests/cut/Test.pm: Add tests for new --output-delimiter option,
3848         as well as for NUL input delimiter (--delimiter='').
3849         * src/cut.c (cut_fields): Honor new --output-delimiter option.
3850         (main): Fix handling of --delimiter='' (-d '').  Until now, it has
3851         never worked as advertised.  I guess no one tried it.
3853         * tests/sort/Test.pm: Add two tests relating to this.
3854         * src/sort.c (main): Stat all non-`-' input file files (and fail if a
3855         stat fails) when an output file is specified by `-o' but doesn't exist.
3856         Reported by Will Edgington.
3858         * tests/sort/Test.pm: New tests of -o.
3860 1998-07-16  Jim Meyering  <meyering@ascend.com>
3862         * lib/Makefile.am (noinst_HEADERS): Add lchown.h.
3863         * lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
3864         * lib/lchown.c: Include lchown.h.
3866 1998-07-04  Jim Meyering  <meyering@ascend.com>
3868         * configure.in (AM_WITH_REGEX): Remove.  Now the replacement
3869         macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
3870         * acconfig.h (WITH_REGEX): Remove undef.
3871         * src/csplit.c: Remove #ifdef around <regex.h> inclusion.
3872         * src/nl.c: Likewise.
3873         * src/tac.c: Likewise.
3874         * src/csplit.c (extract_regexp): Remove #if !WITH_REGEX...#endif block.
3875         * lib/Makefile.am (noinst_HEADERS): Remove rx.h.
3876         * lib/rx.c: Remove file.
3877         * lib/rx.h: Remove file.
3879 1998-06-29  Jim Meyering  <meyering@ascend.com>
3881         * src/wc.c: Update calls to human_readable -- now there's one fewer arg.
3883         * lib/Makefile.am (libtu_a_SOURCES): Add argmatch.c.
3884         (noinst_HEADERS): Add argmatch.h.
3886 1998-06-28  Jim Meyering  <meyering@ascend.com>
3888         * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.
3890 1998-06-27  Jim Meyering  <meyering@ascend.com>
3892         * tests/pr/Test.pm: Add two tests for double spacing.
3893         * src/pr.c (print_page): If cols_ready_to_print is zero,
3894         break out of loop just before the double-space test.
3895         Reported by Michael Stutz.
3897 1998-06-18  Jim Meyering  <meyering@ascend.com>
3899         * tests/Makefile.am.in (check): Depend on $(maint_gen) so
3900         `make maintainer-clean; ./configure; make check' works.
3902 1998-05-25  Jim Meyering  <meyering@ascend.com>
3904         * configure.in (_GNU_SOURCE): AC_DEFINE it here.
3905         * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section.
3906         [!_GNU_SOURCE]: Add #undef instead.
3908 1998-05-16  Jim Meyering  <meyering@ascend.com>
3910         * configure.in (jm_MACROS): New wrapper macro.
3911         Remove uses of most jm_* macros.
3913         * src/tac.c (tac_seekable): Fix error in handling regex separators.
3914         * tests/tac/Test.pm (opt-b, opt-s, opt_sb, opt_r): New tests.
3915         (opt_br): New test -- exercises above-fixed bug.
3917         * lib/Makefile.am (EXTRA_DIST): Remove.  Automake groks the `LIBOBJS='
3918         lines from the m4/*.m4 macros, so the hack of including some
3919         custom-replaced C source file names here is no longer needed.
3921         * acconfig.h (chown): Add undef.
3922         (D_INO_IN_DIRENT): Likewise.
3923         (D_TYPE_IN_DIRENT): Likewise.
3924         (ssize_t): Likewise.
3926 1998-05-09  Jim Meyering  <meyering@ascend.com>
3928         * src/tac.c (tac_seekable): Rename from tac_stream.
3929         Change `FILE *in' parameter to `int input_fd'.  Adjust callers.
3931 1998-05-03  Jim Meyering  <meyering@ascend.com>
3933         * po/: Update from gettext-0.10.35.
3934         * intl/: Likewise.
3935         * configure.in: Remove use of AC_LINK_FILES.
3936         (AC_OUTPUT): Remove po/Makefile-generating sed command.
3938 1998-04-26  Jim Meyering  <meyering@ascend.com>
3940         * tests/tail/Test.pm: Disable test f-1, now that it fails.
3942         * src/sort.c (keycompare) (CMP_WITH_IGNORE): Don't return 0 from inside
3943         the keyspec-iterating loop.  With this change, test 22a passes.
3944         Reported by Zvi Har'El.
3945         (strncoll): Remove bogus assertion.
3946         * tests/sort/Test.pm: Add tests for the above fix.
3948         * configure.in: Use jm_ASSERT.
3949         * acconfig.h: Add NDEBUG.
3951         * src/cut.c: Don't define NDEBUG.
3952         * src/csplit.c: Likewise.
3953         * src/join.c: Likewise.
3954         * src/sort.c: Likewise.
3955         * src/tr.c: Likewise.
3957         * src/cut.c: Don't define _GNU_SOURCE (now it's in config.h).
3958         * src/expand.c: Likewise.
3959         * src/fold.c: Likewise.
3960         * src/join.c: Likewise.
3961         * src/sort.c: Likewise.
3962         * src/tr.c: Likewise.
3963         * src/unexpand.c: Likewise.
3964         * src/uniq.c: Likewise.
3966         * src/tail.c (close_fd): New function -- converted from macro.
3967         [struct File_spec] (n_stat_calls): New member.
3968         [struct File_spec] (n_unchanged_stats): New member.
3969         (max_n_unchanged_stats): New global.
3970         Initialize new members.
3971         (xwrite): New function -- converted from macro.
3972         [struct File_spec] (pretty_name): Remove member.
3973         (pretty_name): New function.
3975         * src/md5sum.c (md5_check): Declare local, `md5num' as _unsigned_ char*.
3976         (hex_digits): Declare parameter `s' as _unsigned_ char*.
3977         (split_3): Declare parameter `u' as _unsigned_ char**.
3979 1998-04-17  Jim Meyering  <meyering@ascend.com>
3981         * src/fmt.c (check_punctuation): Used unsigned char* pointers to avoid
3982         new warning.
3983         * src/join.c (xfields): Likewise.
3985 1998-04-12  Jim Meyering  <meyering@ascend.com>
3987         * src/cat.c: Use STREQ macro rather than strcmp.
3988         * src/cksum.c: Likewise.
3989         * src/comm.c: Likewise.
3990         * src/csplit.c: Likewise.
3991         * src/cut.c: Likewise.
3992         * src/fmt.c: Likewise.
3993         * src/fold.c: Likewise.
3994         * src/head.c: Likewise.
3995         * src/join.c: Likewise.
3996         * src/md5sum.c: Likewise.
3997         * src/nl.c: Likewise.
3998         * src/paste.c: Likewise.
3999         * src/pr.c: Likewise.
4000         * src/split.c: Likewise.
4001         * src/sum.c: Likewise.
4002         * src/tac.c: Likewise.
4003         * src/uniq.c: Likewise.
4004         * src/wc.c: Likewise.
4006 1998-04-11  Jim Meyering  <meyering@ascend.com>
4008         * lib/safe-read.h: New file.
4009         * lib/safe-read.c: Include it.
4010         * src/cat.c: Include it instead of merely declaring safe_read.
4011         * src/csplit.c: Likewise.
4012         * src/head.c: Likewise.
4013         * src/split.c: Likewise.
4014         * src/sum.c: Likewise.
4015         * src/tac.c: Likewise.
4016         * src/tail.c: Likewise.
4017         * src/tr.c: Likewise.
4018         * src/wc.c: Likewise.
4020         * lib/Makefile.am (noinst_HEADERS): Add safe-read.h.
4022         * src/wc.c [HAVE_INTTYPES_H]: Include inttypes.h.
4023         Declare counters to be of type uintmax_t.
4024         (write_counts): Use human_readable to format potentially-long-long
4025         numbers.  Suggestion from Rogier Wolff.
4026         (wc): Declare per-file counters to be of type uintmax_t.
4027         Declare bytes_read to be ssize_t.
4028         * lib/Makefile.am (libtu_a_SOURCES): Add human.c.
4029         (noinst_HEADERS): Add human.h.
4031         * lib/human.c: New file.
4032         * lib/human.h: New file.
4034 1998-04-04  Jim Meyering  <meyering@eng.ascend.com>
4036         * configure.in (jm_AC_HEADER_INTTYPES_H): Use it.
4037         (jm_AC_TYPE_UINTMAX_T): Use it.
4038         (jm_PREREQ): Use it.
4040         * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
4041         know about the m4/ subdirectory.
4042         * Makefile.maint (aclocal-files): Remove now-unnecessary (with
4043         automake-1.2h and the above change) aclocal-related rules and includes.
4045 1998-04-03  Jim Meyering  <meyering@eng.ascend.com>
4047         * lib/closeout.c: New file.
4048         * lib/closeout.h: New file.
4049         * lib/Makefile.am (libtu_a_SOURCES): Add closeout.c.
4050         (noinst_HEADERS): Add closeout.h.
4052 1998-03-31  Jim Meyering  <meyering@eng.ascend.com>
4054         * lib/xstrtol.c: Merge with the version from fileutils.
4056 1998-03-27  Jim Meyering  <meyering@eng.ascend.com>
4058         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.
4060 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
4062         * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
4063         automatically handles it.
4065 1998-03-19  Jim Meyering  <meyering@eng.ascend.com>
4067         * src/system.h (SCHAR_MIN): Define.
4068         (SHRT_MIN): Define.
4069         od.c needs these when compiling with NCR's R2.0c C compiler.
4070         (TYPE_MAXIMUM): Cast result to `(t)' so this macro works with
4071         `unsigned char'.
4072         From Greg Wooledge.
4074 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
4076         * src/tail.c (tail_file): Merge largely-duplicated blocks of code.
4078 1998-03-03  Paul Eggert  <eggert@twinsun.com>
4080         * src/sort.c (xtmpfopen): Open temporary file exclusively, to
4081         foil a common denial-of-service attack.
4082         * src/tac.c (save_stdin): Likewise.
4084 1998-02-16  Jim Meyering  <meyering@eng.ascend.com>
4086         * configure.in (jm_FUNC_LSTAT): Use it.
4087         (jm_FUNC_STAT): Use it.
4088         * lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c.
4090 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
4092         * configure.in: Don't use AM_MAINTAINER_MODE or
4093         AC_PATH_PROG(PERL, perl).
4094         (jm_PERL): Use this.
4096 1998-02-04  Jim Meyering  <meyering@eng.ascend.com>
4098         * tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl.
4099         (mk_script): Set to ../mk-script.
4100         (x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script.
4101         Remove @MAINT@ cruft.
4102         (Makefile.am): Likewise.
4103         Remove @MAINT@ cruft.  Now `missing' will explain the failure
4104         when people don't have Perl yet modify a file whose rebuilding
4105         would lead to the use of Perl.
4107         * tests/Makefile.am (EXTRA_DIST): Add mk-script.
4108         * tests/*/mk-script.pl: Remove files.
4110         * GNUmakefile: New file.
4111         * Makefile.am (EXTRA_DIST): Add GNUmakefile.
4112         Don't include Makefile.maint from here.  It's included from GNUmakefile.
4114 1998-01-30  Paul Eggert  <eggert@twinsun.com>
4116         * configure.in (AC_LFS): Put before anything that can affect or use
4117         CPPFLAGS, LDFLAGS, or LIBS.
4119 1998-01-25  Jim Meyering  <meyering@na-net.ornl.gov>
4121         * Makefile.maint: New file.
4122         * Makefile.am: Move rules common to textutils, fileutils, sh-utils
4123         into Makefile.maint.
4124         Include Makefile.maint.
4125         (EXTRA_DIST): Add Makefile.maint.
4127         * src/cat.c (cat): Convert comma-expressions to pairs of
4128         semicolon-terminated stmts.
4129         Add braces around compound if/else stmts.
4131 1998-01-24  Jim Meyering  <meyering@na-net.ornl.gov>
4133         * src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...'
4134         as obsolescent options.
4135         Accept new option: --sleep-interval=SECONDS (-s).
4136         (parse_options): Recognize it.
4137         (usage): Describe it.
4138         (tail_forever): Use it.
4139         (dump_remainder): Use it.
4140         * tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'.
4142         * tests/cut/: Rename directory to remove `-test' suffix.
4143         * tests/join/: Likewise.
4144         * tests/md5sum/: Likewise.
4145         * tests/pr/: Likewise.
4146         * tests/sort/: Likewise.
4147         * tests/tr/: Likewise.
4148         * configure.in (AC_OUTPUT): Reflect renamings in tests/.
4149         * tests/Makefile.am (SUBDIRS): Reflect renamings in tests/.
4151         * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
4152         bug in Cray C 5.0.3.0 when T == time_t.
4154 1998-01-18  Jim Meyering  <meyering@na-net.ornl.gov>
4156         * src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction,
4157         numcompare): Remove the `unsigned' from some `unsigned char*'
4158         parameter types.  Add casts via UCHAR where necessary to avoid
4159         problems with unwanted sign extension.  Based on a patch from
4160         Kaveh Ghazi to appease Irix4's cc compiler.
4162 1998-01-17  Jim Meyering  <meyering@na-net.ornl.gov>
4164         * src/split.c (next_file_name): Rewrite.  This removes an artificial
4165         limit (albeit already high, at INT_MAX :-) on the number of files
4166         split could create.  Reported by Ralf W. Stephan.
4168 1998-01-16  Jim Meyering  <meyering@na-net.ornl.gov>
4170         * src/sort.c (mergefps): Add braces to avoid ambiguous `else' stmt.
4171         (nls_set_fraction): Likewise.
4173         * src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
4174         for Irix-4.0.5.  From Kaveh Ghazi.
4175         * configure.in: Check for langinfo.h.
4177         * lib/getline.c: Make PARAMS-defining conditionals consistent.
4178         * lib/linebuffer.h: Likewise.
4179         * lib/long-options.h: Likewise.
4180         * lib/memcasecmp.h: Likewise.
4181         * lib/xstrtod.h: Likewise.
4182         * lib/xstrtol.h: Likewise.
4183         Suggestion from Kaveh Ghazi.
4185         * tests/head/Test.pm (fail-0): Disable test.  It depends on
4186         sizeof(long) being 32 bits.  Reported by Kaveh Ghazi.
4188 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
4190         * Version 1.22d.
4192         * src/system.h [HAVE_LIMITS_H]: Include limits.h
4193         (TYPE_SIGNED): Define.
4194         (TYPE_MINIMUM): Define.
4195         (TYPE_MAXIMUM): Define.
4196         (CHAR_BIT): Define.
4197         (SCHAR_MAX): Define.
4198         (UCHAR_MAX): Define.
4199         (SHRT_MAX): Define.
4200         (INT_MAX): Define.
4201         (UINT_MAX): Define.
4202         (LONG_MAX): Define.
4203         (ULONG_MAX): Define.
4204         * src/*.c: Remove definitions of those symbols.
4206         * src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
4207         since it now includes limit.h which defines RE_DUP_MAX.
4208         * src/nl.c: Likewise.
4209         * src/tac.c: Likewise.
4211         * lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE.
4212         Rewrite macro as function.  Return a value.  Update caller.
4213         Cast __ZLONG_MAX `__unsigned long int' before casting to double to
4214         avoid SunOS /bin/cc compiler bug.
4216 1998-01-08  Jim Meyering  <meyering@na-net.ornl.gov>
4218         * src/tac-pipe.c: New file.  But not yet used.
4219         * src/Makefile.am (EXTRA_DIST): Add tac-pipe.c.
4221         * src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer
4222         result of xrealloc (until recently it was char*).
4224         * configure.in (AC_CHECK_FUNCS): Add nl_langinfo.
4225         * src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test
4226         guarding the nls month-checking code.
4227         (nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
4228         `unsigned' from dcls of text and lim.
4229         (main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.
4231 1998-01-03  Jim Meyering  <meyering@na-net.ornl.gov>
4233         * lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
4235         * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
4236         those files will be built via the ANSI2KNR-filtering rules if necessary.
4238 1997-12-25  Jim Meyering  <meyering@na-net.ornl.gov>
4240         * configure.in: Remove AC_DEFINE of _GNU_SOURCE.
4241         * acconfig.h (_GNU_SOURCE): Define if not already defined.
4242         Put this code in @TOP@ section.
4243         (_GNU_SOURCE): Remove #undef.
4245 1997-12-22  Jim Meyering  <meyering@na-net.ornl.gov>
4247         * configure.in: AC_DEFINE _GNU_SOURCE.
4248         * acconfig.h: Add _GNU_SOURCE.
4250 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
4252         * configure.in (AC_CHECK_HEADERS): Add stdlib.h.
4254         * src/system.h: Merge in things from fileutils' version of this file.
4255         * src/csplit.c: s/__P/PARAMS/.
4256         * src/fmt.c: s/__P/PARAMS/.
4257         * src/od.c: s/__P/PARAMS/.
4258         * src/pr.c: s/__P/PARAMS/.
4260 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
4262         * src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g.
4264 1997-12-13  Jim Meyering  <meyering@na-net.ornl.gov>
4266         * src/fmt.c (main): Add some braces.
4267         Check return code from fclose of each input file.
4268         Close stdout and check for errors.
4270         * src/csplit.c (close_output_file): Check ferror before calling fclose.
4271         (main): Close stdout and check for errors.
4273 1997-11-15  Jim Meyering  <meyering@na-net.ornl.gov>
4275         * acconfig.h: Add mktime.
4276         * configure.in (jm_FUNC_MKTIME): Use it.
4277         * lib/mktime.c: New file.
4278         * lib/Makefile.am (EXTRA_DIST): Add mktime.c
4280         * intl/Makefile.in (distclean): Don't remove libintl.h here.
4281         * Makefile.am (DISTCLEANFILES): Remove it here instead.
4283 1997-11-13  Jim Meyering  <meyering@na-net.ornl.gov>
4285         * lib/strftime.c: Update from FSF.
4286         * m4/strftime.m4: Check for POSIX.2's %f format spec.
4288 1997-11-12  Jim Meyering  <meyering@na-net.ornl.gov>
4290         * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define.
4291         * configure.in (AC_CHECK_FUNCS): Add mempcpy.
4293 1997-11-09  Jim Meyering  <meyering@na-net.ornl.gov>
4295         * configure.in (jm_FUNC_STRFTIME): Use it.
4296         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
4297         * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
4298         (jm_FUNC_GNU_STRFTIME): Use new macro.
4299         (jm_FUNC_STRFTIME): New macro.  Likewise.
4300         Reported by Noel Cragg.
4302 1997-11-08  Jim Meyering  <meyering@na-net.ornl.gov>
4304         * m4/lfs.m4 (AC_LFS): New file/macro.
4305         * m4/Makefile.am (EXTRA_DIST): Add lfs.m4.
4306         * configure.in (AC_LFS): Use it.
4307         (AC_CHECK_FUNCS): Add fseeko.
4308         * src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO.
4309         (skip): Use fseeko if available.  Don't use lseek; it causes
4310         the stdio stream to become out of sync with respect to the
4311         underyling file descriptor.
4312         From Paul Eggert.
4314 1997-10-16  Paul Eggert  <eggert@twinsun.com>
4316         * configure.in (AC_CHECK_FUNCS): Add fseeko.
4318         * src/od.c (skip): Use fseeko.  Don't use lseek; it causes
4319         the stdio stream to become out of sync with respect to the
4320         underyling file descriptor.
4322 1997-11-06  Jim Meyering  <meyering@na-net.ornl.gov>
4324         * src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs.
4325         We always have alloca.
4326         (keycompare): Don't use variable size arrays (it's a gcc-extension).
4327         Rewrite code that increments new lengths when not `ignoring'.
4329 1997-11-02  Jim Meyering  <meyering@na-net.ornl.gov>
4331         * acconfig.h: Add malloc and realloc.
4333         * src/wc.c (main): New option, --max-line-length (-L).
4334         (wc, write_counts): Implement it.
4335         From Bruno Haible.
4337 1997-10-26  Jim Meyering  <meyering@na-net.ornl.gov>
4339         * lib/memcasecmp.c: Convert to upper case before comparing.
4340         This makes join -i work with sort -f.
4341         Reported by Arthur Pool.
4343 1997-10-25  Jim Meyering  <meyering@na-net.ornl.gov>
4345         * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
4346         (xcalloc): #ifdef-out unused function.
4347         (xrealloc): Remove code to work around deficient versions of realloc.
4348         Now we have an autoconf-enabled replacement version.
4349         (xmalloc): Remove code to work around deficient versions of malloc.
4350         Now we have an autoconf-enabled replacement version.
4352         * lib/memcmp.c (rpl_memcmp): Rename from memcmp.
4354         * src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/.
4356         * lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL.
4358         * configure.in (jm_FUNC_MALLOC): Use it.
4359         (jm_FUNC_REALLOC): Use it.
4361         * lib/Makefile.am (EXTRA_DIST): Add malloc.c.
4362         * lib/malloc.c: New file.
4363         * m4/malloc.m4: New file.
4364         * m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
4366         * lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
4367         (EXTRA_DIST): Add realloc.c.
4368         (EXTRA_DIST): Add malloc.c.
4370         * src/system.h: Include xalloc.h.
4371         Remove dcls of xmalloc, xcalloc and xrealloc.
4373         * lib/xalloc.h: New file.
4375         * lib/xmalloc.c: Include xalloc.h.
4376         Change VOID to void.
4377         (xalloc_exit_failure): Renamed extern.
4378         (xalloc_msg_memory_exhausted): New extern.
4379         (xalloc_fail_func): New extern.
4380         (fixup_null_alloc): Use new variables.
4382 1997-10-24  Jim Meyering  <meyering@na-net.ornl.gov>
4384         * src/unexpand.c: Remove old-style xmalloc and xrealloc decls.
4385         (add_tabstop): Cast first arg of xrealloc to char*.
4387         * src/sort.c: Include xalloc.h.
4388         (xmalloc): Remove function.
4389         (xrealloc): Remove function.
4390         (main): Set xalloc_fail_func to cleanup.
4391         Set xalloc_exit_failure SORT_FAILURE.
4393         * src/paste.c: Remove old-style xmalloc and xrealloc decls.
4394         (paste_parallel): Cast first arg of xrealloc to char*.
4396         * src/od.c: Remove old-style xmalloc and xrealloc decls.
4397         (decode_format_string): Cast first arg of xrealloc to char*.
4399         * src/expand.c: Remove old-style xmalloc and xrealloc decls.
4400         (add_tabstop): Cast first arg of xrealloc to char*.
4402         * lib/xalloc.h: New file.
4404         * src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
4405         (getstr): Cast xmalloc return value to char*.
4407         * src/csplit.c: Include xalloc.h.
4408         (xmalloc): Remove function.
4409         (xrealloc): Remove function.
4410         (main): Set xalloc_fail_func to cleanup.
4412         * src/*.c: Remove old-style xmalloc and xrealloc decls.
4413         * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
4414         Suggestion from Achim Blumensath.
4416 1997-10-23  Jim Meyering  <meyering@na-net.ornl.gov>
4418         * Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
4420         * src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
4421         [!HAVE_DECLARATION_MALLOC]: Declare malloc.
4422         [!HAVE_DECLARATION_REALLOC]: Declare realloc.
4423         [!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
4424         [!HAVE_DECLARATION_STRSTR]: Declare strstr.
4425         * src/cat.c: Remove stpcpy dcl.
4426         * src/csplit.c: Remove malloc and realloc dcls.
4427         * src/sort.c: Remove free, malloc, and realloc dcls.
4428         * src/tac.c: Remove malloc, and realloc dcls.
4429         * src/tr.c: Remove stpcpy dcl.
4430         On some systems, strstr and stpcpy are macros, so declaring them
4431         unconditionally gets syntax errors.
4432         Reported by Mark M. Kettenis.
4434         * configure.in: Use jm_CHECK_DECLS.
4435         * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
4437 1997-10-22  Jim Meyering  <meyering@na-net.ornl.gov>
4439         * m4/decl.m4: New file.
4440         * m4/check-decl.m4: New file.  New macro, jm_CHECK_DECLS.
4442 1997-10-16  Paul Eggert  <eggert@twinsun.com>
4444         * src/od.c (LONG_MAX): Define if not defined.
4446 1997-10-16  Jim Meyering  <meyering@na-net.ornl.gov>
4448         * src/sort.c (look_for_fraction): Patch from Ã˜rn Hansen.
4449         (getmonth): Compare the two month names only to the length of the
4450         string in the month table.  Patch from Ã˜rn Hansen.
4451         (NLS_STRNCMP): New macro.
4452         (strncoll_s2_readonly): New function.
4453         (inittables): Don't use temporary `comp' to hide type of
4454         comparator function.
4455         (nls_sort_month_comp): Declare parameters to be void* to match
4456         comparator function type required for qsort.
4457         (getmonth): Use NLS_STRNCMP rather than #ifdef.
4458         Use do-while, rather than while-loop.
4460 1997-10-14  Jim Meyering  <meyering@na-net.ornl.gov>
4462         * src/sort.c (_NL_ITEM) [!defined]: Define.
4463         From from Ã˜rn E. Hansen.
4465         * src/sort.c: Use STREQ in place of most uses of strcmp.
4466         (NLS_STRCMP): Define.
4467         (getmonth): Remove ifdef and use NLS_STRCMP instead.
4468         Use HAVE_ALLOCA, not _HAVE_ALLOCA.
4469         (zaptemp): Make parameter `const'.
4471         * tests/sort-test/Test.pm: Add tests to exercise new fraccompare.
4473         * src/sort.c (CHARS_IN_ABM): Remove definition
4474         (inittables): Remove assumption that all abbreviated month names have
4475         length 3.
4476         (getmonth): Likewise.
4477         (main): Add #if's for more efficient code when using the GNU C library.
4478         From Ulrich Drepper.
4480         * src/sort.c (strncoll): Rename parameter to LEN.
4481         (keycompare): Move assignment out of if-expression.
4483         * lib/xstrdup.c: New file.
4484         * lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c
4486         * src/sort.c: Declare xstrdup.
4487         (my_setlocale): New function.
4488         (main): Guard against failure of strdup (use xstrdup) and setlocale.
4490         * src/system.h (STREQ): Define.
4491         * src/od.c (STREQ): Remove definition.
4493         * src/sort.c (look_for_fraction): Eliminate arbitrary limit on
4494         number of `groups'.  Declare as void, not int.
4495         Patch from Ã˜rn E. Hansen.
4496         (main): When determining whether we're in the C or POSIX locale,
4497         don't rely on the form of the string returned by setlocale.
4498         Suggestion from Ulrich Drepper.
4500 1997-10-12  Jim Meyering  <meyering@na-net.ornl.gov>
4502         * src/sort.c: Apply big patch from Ã˜rn E. Hansen.
4503         Clean up, indent.
4504         (NLS_MEMCMP): Define.
4505         (keycompare): Use it instead of open-coded #ifdefs.
4506         (compare): Likewise.
4507         (NLS_MAP): Remove unused definitions.
4508         Replace with uses of UCHAR.
4509         (nls_locale_map): Remove dcl of unused file-scope array.
4511 1997-10-10  Jim Meyering  <meyering@na-net.ornl.gov>
4513         * tests/sort-test/Test.pm: Add a test.
4514         From William Lewis.
4516 1997-10-07  Jim Meyering  <meyering@na-net.ornl.gov>
4518         * src/*.c: Update bug-reporting address.
4519         * src/cat.c: Indent cpp directives to reflect nesting.
4520         * src/cksum.c: Likewise.
4521         * src/csplit.c: Likewise.
4522         * src/fmt.c: Likewise.
4523         * src/nl.c: Likewise.
4524         * src/paste.c: Likewise.
4526 1997-09-27  Jim Meyering  <meyering@na-net.ornl.gov>
4528         * m4/memcmp.m4: Integrate test to detect bug in memcmp from the
4529         Next x86 OpenStep C library.  Test program from William Lewis.
4531 1997-09-21  Jim Meyering  <meyering@na-net.ornl.gov>
4533         * src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.'
4534         (dump_hexl_mode_trailer): Rename from dump_string_trailer.
4535         Use fputs and putchar instead of trivial or %-less printfs.
4536         (decode_one_format): Parenthesize each field_width assignment in an
4537         argument list to make the side effect a little more apparent.
4538         (write_block): Use fputs and putchar instead of trivial or %-less
4539         printfs.
4540         (dump_strings): Cast string_min to off_t to avoid long-standing warning.
4542         * src/od.c: Implement new `z' (hexl-mode) modifier.
4543         [struct tspec] (trailer): New field.
4544         (field_width): Likewise.
4545         (dump_string_trailer): New function.
4546         (decode_one_format): Save each field_width in the tspec.
4547         Patch from John Kodis.
4549 1997-09-14  Jim Meyering  <meyering@na-net.ornl.gov>
4551         * src/od.c (main) [--traditional]: Don't give diagnostic about there
4552         being more than three arguments if there are *no* arguments specified.
4553         Reported by Jochen Hein.
4555 1997-09-13  Jim Meyering  <meyering@na-net.ornl.gov>
4557         * tests/sort-test/Test.pm: Add tests 19a and 19b.
4559 1997-07-21  Jim Meyering  <meyering@na-net.ornl.gov>
4561         * src/tail.c (parse_obsolescent_option): #ifdef-out portability warning.
4563 1997-07-19  Jim Meyering  <meyering@na-net.ornl.gov>
4565         * src/sort.c (checkfp): Print the `disorder' message.  Include both
4566         the number and the contents of the first out-of-order line, in addition
4567         to the file name.  Change meaning of return value.
4568         (check): Don't print disorder message here.
4569         Adjust test of checkfp's return value.
4570         Feature suggestion from Karl Heuer.
4572 1997-07-13  Jim Meyering  <meyering@na-net.ornl.gov>
4574         * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
4575         Now, automake includes it automatically.
4577         * src/head.c: Include xstrtoul.h.
4578         Remove global variable, unit_size.
4579         (atou): Remove now-unused function.
4580         (parse_unit): Likewise.
4581         (string_to_ull): New function.
4582         (head): Take new parameter, count_lines.  Use it instead of unit_size.
4583         Update callers.
4584         (head_file): Likewise.
4585         (main): Use string_to_ull, not atou/parse_unit.
4586         The problem was that overflow wasn't detected, so `head -c 4096m'
4587         was treated just like `head -c 0'.
4588         Reported by Jerome Abela.
4590         * tests/wc: New directory.
4591         * tests/head: New directory.
4592         * tests/Makefile.am (SUBDIRS): Add head and wc.
4593         * configure.in (AC_OUTPUT): Add tests/head/Makefile and
4594         tests/wc/Makefile.
4596 1997-07-05  Jim Meyering  <meyering@na-net.ornl.gov>
4598         * src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
4599         a diagnostic and fail when there are two or more non-option arguments.
4601 1997-07-04  Jim Meyering  <meyering@na-net.ornl.gov>
4603         * tests/tac/mk-script.pl: Redirect output of cmp to /dev/null.
4605         * configure.in (ALL_LINGUAS): Add Norwegian (no).
4607         * Makefile.am (aclocal-files): Look in source directory, not build dir.
4608         From Andreas Schwab.
4610 Sun Jun 15 06:36:41 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4612         * src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the
4613         2-digit abbreviation) in each page header.  Reported by Noah Friedman.
4615 Sat Jun 14 12:29:12 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4617         * src/cut.c (cut_fields): Detect when the input is empty and handle
4618         that special case.  Before `cut -f1 < /dev/null' would improperly
4619         output a single newline.  Reported by Phil Richards.
4621 Sun Apr 27 15:10:58 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4623         * man/Makefile.am (DISTFILES): Add $(man_MANS).
4625         * configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv).
4627 Thu Apr  3 21:14:02 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4629         * m4/Makefile.am (EXTRA_DIST): Update file list.
4631         * tests/cut-test/Test.pm: Add test from Phil Richards.
4633 Sat Mar 22 20:29:10 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4635         * missing: New file -- from the automake-1.1m distribution.
4637 Fri Mar 21 23:56:41 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4639         * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
4640         (aclocal.m4): Use aclocal's new -I option.
4642 Thu Mar 13 21:46:04 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4644         * src/tr.c (main): Make sure c1 is not -1 before using it as an
4645         array index.  Patch from Greg McGary.  Although this is truly a
4646         bug, I believe it would not cause tr to misbehave on most systems.
4647         I could not construct a test case with which this bug causes tr
4648         to generate invalid output.
4650         * tests/pr-test/Test.pm: Add test that -o 0 works.
4652         * src/pr.c (main): Allow use of 0 (zero) as the margin offset
4653         argument to the -o option.  Patch from Gary Anderson.
4655 Fri Feb 28 22:32:51 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4657         * src/uniq.c (usage): Fix typo in --help output.  From Andreas Schwab.
4659 Tue Feb 25 20:34:51 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4661         * lib/Makefile.am (noinst_HEADERS): Add obstack.h.
4662         (libtu_a_SOURCES): Add obstack.c.
4664 Sun Feb 16 08:30:29 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4666         * tests/Makefile.am (SUBDIRS): Add tac.
4667         * tests/tac: New directory.
4668         * configure.in (AC_OUTPUT): Add tests/tac/Makefile.
4670         * tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t,
4671         tta3-FF, ttb3-FF}: New files.  Renamed (s/T/tt/) to avoid name clashes
4672         on case-independent filesystems.
4673         * tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming.
4675         * src/tail.c (parse_obsolescent_option): Reverse order of args in
4676         diagnostic.  Remove `' quotes in diagnostic.
4677         (parse_options): Remove `' quotes in diagnostic.
4679 Sat Feb  8 22:43:45 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4681         * src/tail.c (parse_obsolescent_option): Give warning diagnostic for
4682         (but now accept) obsolescent usage with more than one file argument.
4684 Sun Feb  2 23:06:59 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4686         * src/join.c: Move alloca-related preprocessor code into system.h.
4687         * src/od.c: Remove alloca-related preprocessor code.
4688         * src/system.h: Add alloca-related preprocessor code.
4690 Sat Feb  1 07:21:43 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4692         * tests/pr-test/*: Rename files to avoid exceeding 14-character limit.
4693         * tests/pr-test/Test.pm: Reflect renamings.
4695         * tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames
4696         that exceed max-length before dying.
4698         * src/pr.c (init_parameters): For compatibility: use default
4699         separator `TAB' with full length lines.  From Roland Huebner.
4701 Fri Jan 31 19:53:54 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4703         * src/tac.c: Rename globals buffer and buffer_size to have G_ prefix
4704         to avoid shadowing local variables.
4706         * lib/long-options.c (parse_long_options): Compare getopt_long return
4707         value against -1, not EOF.  Use NULL, not `(int *) 0' as last parameter
4708         in getopt_long call.
4710         * src/pr.c (add_line_number): Rename from `number' to avoid shadowing
4711         local variables.
4713         * src/*.c: Compare getopt_long return value against -1, not EOF.
4714         Use NULL, not `(int *) 0' as last parameter in getopt_long call.
4715         (usage): Bracket bug-reporting address with <> and append a period.
4717 Wed Jan 29 20:54:24 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4719         * tests/tr-test/Test.pm: Do each test twice: get input via REDIR
4720         and PIPE.
4722         * tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring)
4723         test three times.
4725         * tests/pr-test/Test.pm: Remove common_option_prefix flag.
4726         (test_vector): Prepend the common option here instead.
4728         * tests/md5sum-test/Test.pm: Remove input_via_stdin flag.
4729         Do each test twice: get input via REDIR and PIPE.
4731         * tests/cut-test/Test.pm: Do each test three times.
4733         * tests/cut-test/mk-script.pl: Allow each test to be run any or all
4734         of three different ways.  Program input may be specified via a file
4735         or files listed on the command line, via input redirection (if there's
4736         only one file), or via a pipe.
4738 Tue Jan 28 20:54:06 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4740         * tests/cut-test/mk-script.pl: Remove `t' prefix on all generated
4741         test file names.
4742         Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E).
4743         Ensure that no test file (generated or maintainer-supplied) has a
4744         name longer than 14 characters.
4746 Sun Jan 26 12:49:50 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4748         * Version 1.22.
4750         * src/tail.c (parse_options): Add quotes to make messages identical.
4752 Sat Jan 25 00:12:29 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4754         * src/tail.c (parse_obsolescent_option): Comment.
4755         (parse_options): Remove unnecessary goto and label.
4757         * tests/sort-test/mk-script.pl: Interpret `input arg is a hash
4758         reference' as meaning that the tested program will read no input.
4759         Most of the tests for the date program use this feature.
4760         Also for date, the generated script now reflects specification
4761         (in Test.pm) of default and per-test environment settings.
4763         * src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces.
4764         * src/fold.c: Likewise.
4765         * src/head.c: Likewise.
4766         * src/join.c: Likewise.
4767         * src/nl.c: Likewise.
4768         * src/od.c: Likewise.
4769         * src/pr.c: Likewise.
4770         * src/uniq.c: Likewise.
4772         * lib/xstrtoul.h (XSTRTOL_H): Undefine it.
4774         * lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error'
4775         only if it hasn't already been defined.
4776         (_STRTOL_ERROR): Undefine.
4778         * lib/xstrtol.c (__xstrtol): Change interpretation of
4779         VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "".  Use the former
4780         when any suffix is valid, the later when no suffix is allowed.
4782 Fri Jan 24 23:36:00 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4784         * lib/long-options.c (parse_long_options): Reset optind to zero
4785         before just returning so that getopt internals get initialized from
4786         the probably-new parameters when/if getopt is called later.
4787         From Ulrich Drepper.
4789 Thu Jan 23 19:17:03 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4791         * src/tail.c (parse_obsolescent_option): Recognize and fail for
4792         more malformed obsolescent options.  Makes for better diagnostics.
4794 Wed Jan 22 21:34:50 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4796         * tests/Makefile.am (SUBDIRS): Add tail.
4797         * tests/tail: New directory.
4798         * configure.in (AC_OUTPUT): Add tests/tail/Makefile.
4800         * src/tail.c (parse_options): New function.
4801         (parse_obsolescent_option): New function.
4802         (main): Use the new functions instead of open-coding them.
4803         This better fixes the bug in handling obsolescent `+Nc' options.
4804         General cleanup.
4806 Tue Jan 21 22:49:00 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4808         * src/tail.c (main): Properly handle what the POSIX spec calls
4809         the `obsolescent' usage (e.g., tail +2c).  It didn't work.
4810         Reported by Karl Heuer.
4812 Sun Jan 12 22:13:27 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4814         * tests/tr-test/Test.pm: Rename tests so that the associated files
4815         have names that are distinct even on filesystems on which file
4816         names are case insensitive.
4817         Reported by Fred Fish.
4818         * tests/cut-test/Test.pm: Likewise.
4820         * tests/tr-test/Makefile.am: Regenerated to reflect renamed tests.
4821         * tests/cut-test/Makefile.am: Likewise.
4823 Wed Jan  8 16:38:24 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4825         * Version 1.21.
4827         * lib/getopt.c (_getopt_internal): Use `_', rather than the
4828         (sometimes-)expansion `gettext'.
4830 Tue Jan  7 22:50:13 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4832         * lib/getopt.c: New (more POSIX compliant) version from GNU libc.
4833         [_]: Define to gettext also if ENABLE_NLS is defined.
4834         This is temporary.
4836 Thu Jan  2 21:17:50 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4838         * src/pr.c (init_fps): Initialize lines_stored field in three places.
4839         This avoids uninitialized memory reads in close_file.
4841 Wed Jan  1 17:32:18 1997  Jim Meyering  <meyering@na-net.ornl.gov>
4843         * configure.in (AC_ARG_PROGRAM): Remove explicit use.
4844         It's implicit in AM_INIT_AUTOMAKE.  From Wayne Stewart.
4846 Sun Dec 29 23:42:57 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4848         * src/pr.c (init_header): Plug a small memory leak by using stack
4849         rather than heap for a 15-byte temporary buffer.
4851 Sat Dec 28 00:03:23 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4853         * src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed
4854         from tab_width.
4855         (POS_AFTER_TAB): Renamed from pos_after_tab.  Define in terms of
4856         TAB_WIDTH rather than duplicating the expression.
4858 Fri Dec 27 17:29:02 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4860         * tests/join-test/mk-script.pl: Fix a couple of thinkos and typos.
4861         Now it works with pr's tests, too.
4863         * tests/pr-test/Makefile.am (explicit): Regenerate list of files,
4864         this time with duplicates removed.
4866         * src/pr.c (usage): Break long string literal into two separate
4867         printf statements to accomodate default maximum of 2048 characters
4868         for Irix-4.0.5.  Reported by Kaveh Ghazi.
4870         * Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
4872         * tests/Makefile.am (SUBDIRS): Add pr-test.
4874         * configure.in: AC_REQUIRE version 2.12 of autoconf.
4875         AC_OUTPUT: Add tests/pr-test/Makefile.
4877 Sun Dec 22 08:11:27 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4879         * acinclude.m4: Move macros to individual files in new directory, m4/.
4880         See ChangeLog entries in sh-utils for the details.
4882         * configure.in: Increment version to 1.20a.
4884         * tests/md5sum-test/Makefile.am: Use same framework as other tests.
4885         * tests/md5sum-test/Test.pm: New file.
4887 Sat Dec 21 20:32:58 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4889         * tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in.
4891         * tests/Makefile.am.in: New file.
4893         * tests/sort-test/Makefile.am: Clone the Makefile.am from join-test.
4894         Replace only the definition of $x and the auto-generated lists of
4895         test files.
4896         * tests/cut-test/Makefile.am: Likewise.
4897         * tests/tr-test/Makefile.am: Likewise.
4899         * tests/join-test/Makefile.am: Add @MAINT@-protected rule for
4900         verifying that Makefile.am is consistent with Test.pm.
4902 Fri Dec 20 00:08:36 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4904         * tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1)
4905         and $(in2), not $(in).
4907         * tests/join-test/mk-script.pl: New option: --list.
4908         Generate lists of files used/generated.
4910 Thu Dec 19 23:28:41 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4912         * tests/join-test/mk-script.pl: Rewrite to be more general -- so
4913         it can be used for join, cut, sort, tr, and soon, pr test suites.
4914         * tests/tr-test/mk-script.pl: Symlink through CVS repo to join's
4915         mk-script.pl.
4916         * tests/sort-test/mk-script.pl: Likewise.
4917         * tests/cut-test/mk-script.pl: Likewise.
4919         * tests/tr-test/Test.pm: Adapted for new mk-script.pl.
4920         * tests/join-test/Test.pm: Likewise.
4922 Tue Dec 17 16:48:51 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4924         * tests/join-test/Makefile.am (.pl): Make generated file read-only so
4925         I don't accidentally modify it instead of the one with the .pl suffix.
4927         * acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than
4928         now-obsolete AC_C_CROSS.
4929         (jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one
4930         since there's nothing GNU-specific about the replacement.  Contrast
4931         with gnu_ prefix added to strftime.
4932         (jm_FUNC_MEMCMP): New macro.
4933         * configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP.
4934         * acconfig.h: Add memcmp.
4935         * README: Remove warning about memcmp.  The new macro handles it.
4937 Mon Dec 16 23:03:27 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4939         * tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment.
4940         From Eric Backus.
4941         (AUTOMAKE_OPTIONS): Likewise.
4943 Sat Dec 14 14:51:50 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4945         * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
4946         name for cross compiling.
4947         Remove definitions of gettext-related macros.  The gettext
4948         installation procedure installs corresponding .m4 files so that
4949         aclocal will use them.
4951 1996-12-12  Paul Eggert  <eggert@twinsun.com>
4953         * system.h (ISDIGIT): Replace with smaller, faster edition
4954         that yields nonzero only on ASCII digits.
4955         (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
4956         used to have.
4958         * tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of
4959         ISDIGIT to test for characters in CC_DIGIT class.
4961         * sort.c (digits): Remove; subsumed by new ISDIGIT.
4962         (inittables): Remove initialization of `digits'.
4963         (fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
4964         (fraccompare, numcompare): Avoid casts to unsigned char that are no
4965         longer needed.
4967         * csplit.c (get_format_width, get_format_prec): Avoid
4968         unnecessary comparison of digit to '\0'.
4970 Thu Dec 12 23:42:51 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4972         * src/sort.c (usage): Clarify description of -u option.
4973         From Karl Berry.
4975 Wed Dec 11 19:32:18 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4977         * Version 1.20.
4979 Tue Dec 10 00:15:50 1996  Jim Meyering  <meyering@na-net.ornl.gov>
4981         The file name, `build-script.pl' is longer than 14 characters.
4982         Rename it.
4983         * tests/cut-test/mk-script.pl: Rename from build-script.pl.
4984         * tests/cut-test/Makefile.am: Reflect renaming.
4985         * tests/tr-test/mk-script.pl: Rename from build-script.pl.
4986         * tests/tr-test/Makefile.am: Reflect renaming.
4987         * tests/sort-test/mk-script.pl: Rename from build-script.pl.
4988         * tests/sort-test/Makefile.am: Reflect renaming.
4989         * tests/join-test/mk-script.pl: Rename from build-script.pl.
4990         * tests/join-test/Makefile.am: Reflect renaming.
4991         Reported by Karl Heuer.
4993         * configure.in (VERSION): Bump to 1.19r.
4994         (AC_ISC_POSIX): Remove kludgy macro.
4995         Use this test instead:
4996         (LIBS): Add -lcposix if it contains strerror.
4997         Patch from Karl Heuer.
4999 Sun Dec  8 07:22:38 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5001         =========== Update for automake-1.1k.
5002         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
5003         * configure.in (AM_CONFIG_HEADER): Use it.
5004         (AC_OUTPUT): Remove stamp-h timestamping statement.
5005         Now, AM_CONFIG_HEADER does it automatically.
5006         * lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
5007         new automake requirement.
5008         Rename tu_* variables to libtu_a_*.
5010 Wed Dec  4 21:03:18 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5012         * src/pr.c: Apply big patch from Roland Huebner.
5014         * src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
5015         [:upper:] to [:upper:] and [:lower:] to [:lower:].
5016         (main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
5017         the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
5018         to [:lower:].
5019         (class_ok): Update table to reflect that tr now allows these
5020         identity mappings.  Suggestion from Risto Kankkunen.
5022 Thu Nov 28 00:31:18 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5024         * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
5025         for gettext-0.10.25.
5027 Tue Nov 26 23:05:14 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5029         * src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
5030         to avoid new warning from gcc.
5032 Sun Nov 24 21:02:15 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5034         * tests/sort-test/Makefile.am (t): Add names of those 5 tests.
5036         * tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.
5038         * src/sort.c (set_ordering): Revert 1994-05-04 change to this function
5039         so that blanks are not unconditionally ignored when computing start
5040         and end positions for numeric keys with explicit character offsets.
5041         Reported by Markus Demleitner.
5043 Sat Nov 23 16:07:08 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5045         * cat.c (usage): Alphabetize option descriptions the way sort -f would.
5046         * fmt.c (usage): Likewise.
5047         * join.c (usage): Likewise.
5048         * md5sum.c (usage): Likewise.
5049         * od.c (usage): Likewise.
5050         * pr.c (usage): Likewise.
5051         * sort.c (usage): Likewise.
5052         * split.c (usage): Likewise.
5053         * wc.c (usage): Likewise.
5054         From Karl Berry.
5056 Fri Nov 22 20:20:37 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5058         * src/csplit.c (process_regexp): Update CURRENT_LINE only if
5059         the new value would be larger.  This avoids the infinite loop
5060         otherwise provoked by situations like this:
5061         printf "\na\n" | csplit - '/a/-1' '{*}'
5062         From Jens Schmidt.
5064 Tue Nov 19 23:16:57 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5066         * configure.in (AM_SANITY_CHECK_CC): Remove it.  Autoconf-2.11
5067         has this built-in.
5069 Sat Nov  2 08:50:01 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5071         * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
5072         Otherwise, the generated info files have names longer than
5073         the 14-byte max of some old systems.
5074         Reported by Karl Heuer.
5076 Fri Nov  1 21:33:16 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5078         * lib/strtol.c: Update from GNU libc.
5080         * tests/sort-test/Test.pm: Add a test to exercize this fix.
5082         * src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
5083         (checkfp): Fix off-by-one error that resulted in writing one byte
5084         beyond the end of a malloc'd buffer.  It caused `sort -c' to segfault
5085         on Linux systems having a relatively recent libc.  Before, running
5086         the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
5087         would provoke the memory overrun (though not necessarily the failure).
5088         Add an assertion.
5089         Reported by Risto Kankkunen.
5091 Thu Oct 31 17:48:24 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5093         * src/sort.c (key_init): New function.
5094         (main): Use key_init in the two places where it was open-coded.
5095         This fixes a UMR of the general_numeric field.
5097         * src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
5098         This avoids a spurious UMR report from purify.
5099         (prjoin): Add an assertion.
5100         (add_field): Update assertion.
5102         * src/tr.c (es_free): New function.
5103         (parse_str): Use it to plug a small memory leak.
5105 Wed Oct 23 22:02:24 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5107         * lib/md5.c: Update from GNU libc.
5108         * lib/md5.h: Update from GNU libc.
5110 Mon Oct 21 16:48:12 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5112         * src/tr.c (validate): Remove TAB from diagnostic, for consistency.
5114 Sun Oct 20 13:44:07 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5116         * lib/Makefile.am (INCLUDES): Add -I../intl.  Reported by Eric Backus.
5118         * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
5119         (EXTRA_DIST): Remove.
5121         * configure.in: Remove README_ALPHA related code.  Automake takes
5122         care of it automatically now when in gnits mode.
5124         * lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
5125         doing arithmetic with it.
5127 Sat Oct 19 23:13:54 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5129         * lib/md5.c: Update from GNU libc.
5130         * lib/md5.h: Update from GNU libc.
5132 Fri Oct 18 00:08:04 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5134         * configure.in (AC_OUTPUT): Add tests/join-test/Makefile.
5136         * tests/Makefile.am (SUBDIRS): Add join-test.
5138 Tue Oct 15 23:25:31 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5140         * src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
5141         special case.
5142         (main): Write separate loops to initialize mapping for lower->upper
5143         and upper->lower conversion.
5144         Reported by Arne Henrik Juul.
5146 Sun Oct 13 12:52:42 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5148         * lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
5149         Before, e.g., `split -b 1M' would be silently accepted and treated
5150         like `split -b 1'.  Reported by Franc,ois.
5152         * src/split.c (usage): Remove parameter, REASON.
5153         (main): Update callers to use combination of error (0, 0, ... and
5154         usage (EXIT_FAILURE).
5155         (main): When a string operand cannot be converted to a number of
5156         bytes or lines, include that string in the diagnostic.
5158 Sat Oct 12 00:05:11 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5160         * configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.
5162         * lib/Makefile.am (EXTRA_DIST): Remove.
5164 Thu Oct 10 23:41:36 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5166         * lib/md5.c (md5_stream): Apply fix from Ralph Loader
5167         <loader@maths.ox.ac.uk> via Ulrich Drepper.
5169 Wed Oct  9 07:26:40 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5171         * lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).
5173 Tue Oct  8 21:32:17 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5175         * lib/error.c: Include error.h to align with libit --
5176         under protest, François :-).
5178 Sun Oct  6 08:02:28 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5180         * acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
5181         AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
5182         They're included in automake-1.1f.
5184         * configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
5185         open-coding it.
5187 Sat Oct  5 12:40:22 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5189         * lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
5190         From Karl Berry.
5192 Fri Oct  4 07:20:37 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5194         * configure.in (GNU_PACKAGE): New variable.
5195         (PACKAGE_VERSION): Remove it.
5197         * acconfig.h (GNU_PACKAGE): New variable.
5198         (PACKAGE_VERSION): Remove now-unused variable.
5200         * lib/long-options.c (parse_long_options): Separate package name
5201         and version number to accomodate new --version output requirement.
5202         * lib/long-options.h: Update prototype.
5204 Thu Oct  3 23:27:31 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5206         * src/md5sum.c (main): Remove dead code that used to print --version
5207         output.
5209 Tue Oct  1 06:54:22 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5211         * configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
5212         * src/Makefile.am (sort_LDADD): Use any library (-lm) that
5213         gets substituted for @POW_LIBM@.
5215         * tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.
5217 Mon Sep 30 23:35:46 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5219         * tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.
5221         * acinclude.m4: Update definitions from gettext-0.24.
5223 Sun Sep 29 20:04:53 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5225         * tests/sort-test/build-script.pl: Die if close fails.
5226         * tests/tr-test/build-script.pl: Likewise.
5228         * configure.in (AC_OUTPUT): Add tests/cut-test/Makefile.
5229         * tests/Makefile.am (SUBDIRS): Add cut-test.
5230         * tests/cut-test: New directory.
5232 Fri Sep 27 22:22:09 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5234         * configure.in (ALL_LINGUAS): Add spanish (es).
5236 Thu Sep 26 21:02:54 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5238         * src/md5sum.c (usage): Remove references in --help output to
5239         the now-deprecated --string option.  Support for it will be
5240         removed soon.  Using this option can provoke a memory access
5241         violation on some systems because of (unavoidable in an efficient
5242         implementation) alignment assumptions made by functions in md5.c.
5243         md5sum.c could leave the option in and accomodate the alignment
5244         restriction, but this option was intended solely for testing, and
5245         the tests are now all file-oriented, so it's not necessary.
5247         * tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.
5249 Wed Sep 25 21:43:10 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5251         * tests/sort-test/Makefile.am (t): Factor out .in suffix.
5252         Include new test: t16a.
5253         * tests/tr-test/Makefile.am (t): Likewise.
5255         * src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc.
5257 Mon Sep 23 10:00:50 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5259         * tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS).
5261 Sun Sep 22 09:24:22 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5263         * src/sort.c (keycompare): Declare translate to be unsigned char *.
5264         Otherwise, sign extension caused misordering when using e.g. -f.
5265         Reported by Erick Branderhorst.
5266         * tests/sort-test/Test.pm: Add Erick's test for that fix.
5268         * tests/Makefile.am (SUBDIRS): Add md5sum-test.
5270 Sat Sep 21 13:34:59 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5272         * src/Makefile.am (check): Remove tests for md5sum.
5273         * tests/md5sum-test: New directory.  Put them here instead.
5274         * configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile.
5276 Thu Sep 19 08:54:05 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5278         * tests/: Rename from checks.
5279         * Makefile.am (SUBDIRS): Change `checks' to `tests'.
5280         * configure.in (AC_OUTPUT): Likewise.
5282         * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
5283         AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
5285 Sun Sep 15 23:08:48 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5287         * Makefile.am (EXTRA_DIST): Remove acinclude.m4.
5289 Thu Sep 12 17:05:23 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5291         * lib/Makefile.am (EXTRA_DIST): Add getline.c.
5292         (tu_SOURCES): Remove getline.c
5293         From Kaveh Ghazi.
5295 Sun Sep  8 13:55:18 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5297         * checks/sort-test/build-script.pl: Prefix $in with \$srcdir/
5298         so make check works with VPATH build.  From Uli Drepper.
5300 Sat Sep  7 12:25:42 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5302         * src/system.h: Add comments justifying IS* versions of ctype.h macros.
5304         * src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct.
5305         (get_line): Use ISSPACE instead of isspace.  From Bruno Haible.
5307 Mon Sep  2 10:34:46 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5309         * src/*.c (usage): Tell where to report bugs.
5311 Sun Aug 25 22:50:47 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5313         * checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
5314         ($x-tests): Guard dependencies with @MAINT@.
5315         * checks/tr-test/Makefile.am: Likewise.
5317 Sat Aug 24 14:25:41 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5319         * src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.
5321 Wed Aug 21 22:28:26 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5323         * configure.in (ALL_LINGUAS): Add polish (pl).
5325 Sun Aug 18 09:34:42 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5327         * configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
5328         * checks/Makefile.am (SUBDIRS): Add sort-test.
5330 Sat Aug 17 18:57:17 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5332         * Makefile.am (EXTRA_DIST): Add acinclude.m4.
5334 Tue Aug 13 21:47:23 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5336         * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
5337         Automake includes them automatically.
5339         * configure.in (AM_INIT_AUTOMAKE): Use it.
5340         (AM_PROG_INSTALL): Remove.  AM_INIT_AUTOMAKE does this.
5341         (AC_PROG_MAKE_SET): Likewise.
5343 Sun Aug 11 20:49:21 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5345         * configure.in: Rename a few macros for automake-1.1c.
5346         (AC_REPLACE_GNU_GETOPT): Remove.
5347         (AC_PATH_PROG): Find perl -- needed only for checks if you
5348         change or remove things with e.g. make maintainerclean.
5351         * lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@.  New AM_WITH_REGEX
5352         adds .o files to @LIBOBJ@.
5353         (tu_SOURCES): Add getopt.c and getopt1.c.
5354         (EXTRA_DIST): Remove getopt.c and getopt1.c.
5356         * acinclude.m4: New file -- derived from aclocal.m4.
5357         * aclocal.m4: This file is now generated by the aclocal program
5358         (which comes with the automake package.)
5360 Sun Aug  4 10:50:46 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5362         * checks/: New directory.
5363         * checks/Makefile.am: New file.
5364         * configure.in (AC_OUTPUT): Add new directories: checks,
5365         checks/tr-test.
5366         * Makefile.am (SUBDIRS): Likewise.
5368 Sat Jul 27 17:22:14 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5370         * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
5371         redefinition warnings on solaris.
5372         (textdomain) [!ENABLE_NLS]: Likewise.
5374 Thu Jul 25 23:06:35 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5376         * src/unexpand.c (unexpand): Move EOF check to follow code that
5377         processes and generates output for pending spaces.  Before
5378         `printf '  ' |unexpand -t 1,2' generated no output.
5380         * src/md5sum.c (md5_check): Remove parameter, BINARY.
5381         Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
5382         from the input stream rather than the one from the command line.
5383         (main): Fail with a diagnostic if --binary or --text is specified
5384         when verifying checksums.
5385         Reported by Eli Zaretskii <eliz@is.elta.co.il>.
5387 Sun Jul 21 11:58:48 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5389         * configure.in: Add check for error_at_line so systems with
5390         GNU libc don't compile and link with distributed error.c.
5391         * lib/Makefile.am (tu_SOURCES): Remove error.c.
5392         (EXTRA_DIST): Add error.c.
5394         * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
5395         Add related check for the getdelim function.
5396         From Ulrich Drepper -- as done in gettext.
5398 Sat Jul 20 15:59:36 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5400         * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
5401         separate PACKAGE and VERSION.
5403         * aclocal.m4 (AM_SANITY_CHECK_CC): New macro.  Derived from
5404         macros from Bruno Haible and from Cygnus.
5405         * configure.in (AM_SANITY_CHECK_CC): Use it.
5407 Wed Jul 17 00:30:28 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5409         * install-sh: Get version with MIT copyright.
5411 Tue Jul 16 00:09:37 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5413         * aclocal.m4 (fp_C_PROTOTYPES): Improved version from
5414         François Pinard.
5415         Update all other macros to reference $fp_cv_prog_cc_stdc, rather
5416         than $ac_cv_prog_cc_stdc.
5418         * src/od.c (OFF_T_MAX): Remove definition.
5419         (main): Compare against LONG_MAX rather than OFF_T_MAX.
5421 Mon Jul 15 23:42:57 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5423         * Many files: Update FSF address.
5425 Sun Jul 14 16:53:50 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5427         * src/unexpand.c (unexpand): Fix bug that contributed to endless loop
5428         when invoking `echo '  ' |unexpand -t 1,2': use print_tab_index, not
5429         tab_index in inner flush_pend: while loop.  From Keith Owens
5430         <kaos@audio.apana.org.au>.
5432         * src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
5433         [!INT_MAX]: Define it.
5434         (main): Append INT_MAX to command-line-specified tab list to
5435         ensure termination in unexpand's inner loop.
5436         Derived from a patch from Keith Owens.
5438 Thu Jul 11 22:04:36 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5440         * Version 1.19.
5442         * configure.in (VERSION): Bump to 1.19.
5444 Wed Jul 10 22:57:29 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5446         * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
5447         so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
5448         those options on that system, sys/stat.h gets compile errors.
5449         With help from Marcus Daniels.
5451         * getopt.c: Update from gettext-0.10.23.
5452         * getopt1.c: Likewise.
5453         * getopt.h: Likewise.
5455 Tue Jul  9 18:07:23 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5457         * src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
5458         so the left operand of the << isn't signed.
5459         From Kjetil Torgrim Homme.
5461         * po/Makefile.in.in (install-data): Don't install NLS files when
5462         they're not requested.  From Ulrich Drepper.  Reported by
5463         Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
5465 Fri Jul  5 21:55:58 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5467         * po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
5468         * ABOUT-NLS: Likewise.
5469         * intl/*: Likewise.
5470         * aclocal.m4: Likewise.
5472 Thu Jul  4 07:24:54 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5474         * src/uniq.c (usage): Remove space before newline in usage message.
5476         * src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
5477         [NEWLINE_REPLACEMENT_STRING*]: Remove macros.
5478         (main): Output a leading backslash for a line describing a file
5479         whose name contains a newline.  Then translate each NEWLINE byte
5480         in the file name to the string, "\\n", and each backslash to "\\\\".
5481         File names that don't contain NEWLINE aren't translated.
5482         (split_3): Rewrite to handle file names with embedded newlines.
5483         Miles Bader and Jim Blandy suggested this new encoding scheme.
5485         * src/md5sum.c (md5_file): Replace obsolete comment with a description
5486         of the function.
5487         (md5_check): Don't use "s"-adding trick to form the plural of
5488         `checksum.'  That doesn't work well with translation.
5489         Suggestions from Ulrich Drepper.
5490         (split_3): Add missing semicolon so it compiles.  From Jim Blandy.
5492 Wed Jul  3 23:21:09 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5494         * src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
5495         fact that leading blanks may be stripped.
5497 Tue Jul  2 21:51:40 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5499         * configure.in (ALL_LINGUAS): Add dutch (nl).
5501 Mon Jul  1 23:50:19 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5503         * src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
5504         (split_3): Translate NL bytes not to NUL, but to
5505         NEWLINE_REPLACEMENT_STRING.
5506         Suggested by Ulrich Drepper.
5507         (main): Translate back to NL-containing filename.
5509 Sun Jun 30 22:42:17 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5511         * src/md5sum.c (split_3): Take an additional parameter, S_LEN.
5512         Adapt caller.
5513         Map translated NEWLINE-containing filename back into the original
5514         NEWLINE-containing name.
5515         (md5_check): Translate NEWLINE bytes to NUL bytes in filename.
5517 Sat Jun 29 18:59:07 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5519         * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
5520         appears in the output of --version.  Reported by RMS.
5522 Wed Jun 26 21:35:10 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5524         * src/Makefile.am (LDADD): Remove sort-specific hack to link
5525         with -lm.
5526         * aclocal.m4 (AM_FUNC_STRTOD): New macro.
5527         * configure.in (AM_FUNC_STRTOD): Use it.
5528         (AC_REPLACE_FUNCS): Remove strtod.
5529         Suggested by Tom Tromey.
5531         * po/Makefile.in.in (install-data): Add `else true;' to avoid
5532         letting failing if-condition cause make failure.
5533         From Fred Fish (fnf@ninemoons.com).
5535 Tue Jun 25 21:55:18 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5537         * Version 1.18a.
5539 Tue Jun 18 20:43:20 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5541         * aclocal.m4: Update from gettext-0.10.20.
5542         * ABOUT-NLS: Likewise.
5543         * intl/*: Likewise.
5545 Thu Jun 13 22:31:39 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5547         * configure.in (VERSION): Bump to 1.18a.
5549         * po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
5550         Depend on POTFILES only when using maintainer mode.
5552         * intl/*: Update from gettext-0.10.18.
5554 Tue Jun 11 23:32:10 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5556         * Version 1.18.
5558         * po/Makefile.in.in: Update from gettext-0.10.17.
5559         * intl/*: Likewise.
5560         * ABOUT-NLS: Likewise.
5562 Mon Jun 10 18:22:29 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5564         * Makefile.am (cvs-dist): Use -c option in cvs tag command.
5566 Fri Jun  7 22:06:46 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5568         * configure.in (VERSION): Set to 1.18.
5570         * src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
5571         the strtod supplied with this package.  Otherwise, linking failed on
5572         Solaris-2.4 systems.  Reported by Wayne Stewart <wstewa@atl.com>.
5574 Thu Jun  6 21:57:08 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5576         * po/Makefile.in.in: Update from gettext-0.10.16.
5577         * intl/*: Likewise.
5578         * ABOUT-NLS: Likewise.
5579         * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
5580         gettext-related ones.
5581         Update from gettext-0.10.16.
5583 Fri May 31 22:04:51 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5585         * Version 1.17.
5587         * Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
5588         distributed.
5590 Thu May 30 00:07:48 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5592         * Version 1.16.
5594         * tail.c (main): Interpret the old-style +VALUE and -VALUE options
5595         like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
5596         suffix multipliers.  This makes the code consistent with --help
5597         output.  Reported by Karl Heuer.
5599         * sort.c (limfield): #ifdef-out a block of code that makes
5600         GNU sort incompatible with Unix sort when a key-end spec refers
5601         to the N'th character in a field that has fewer than N characters.
5602         The POSIX spec doesn't appear to specify behavior for this case.
5603         From Karl Heuer.
5605         * po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
5606         longer than 14 characters.
5607         (mostlyclean): Likewise.
5608         From Karl Heuer.
5610         * po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
5611         when using maintainer mode.  Reported by Karl Heuer.
5613         * po/Makefile.in.in (.po.mo): Reenable dependency and rule.
5614         It is required when using native NLS, e.g. on Solaris.
5615         From Marcus Daniels.
5617         * od.c (decode_one_format): Use %lu (not %d) printf format
5618         corresponding to unsigned long, SIZE.
5620         * Version 1.15.
5622         * intl/Makefile.in (installcheck): New target.
5623         * po/Makefile.in.in (installcheck): New target.
5625         * od.c (decode_one_format): Take another parameter.
5626         Give a specific diagnostic for invalid format spec here rather
5627         than an overly general one from caller's caller.
5628         (decode_format_string): Update caller.
5629         (main): Don't give diagnostic here when decode_format_string fails.
5630         Remove assertions that could fail on some Crays because they don't
5631         have a two-byte type.
5632         Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
5634 Mon May 27 17:43:31 1996  Jim Meyering  <meyering@na-net.ornl.gov>
5636         * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
5637         less portable fileno (stdin) and fileno (stdout).
5638         * sort.c (main): Use STDIN_FILENO instead of less portable
5639         fileno (stdin).
5641 Mon May 20 21:50:23 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5643         * Makefile.am (distcheck): Remove target and rule -- automake-0.33
5644         adds it automatically.
5646 Sun May 19 13:15:49 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5648         * configure.in (LINGUAS): Add ko.
5649         * Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
5651 Thu May 16 22:18:41 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5653         * Makefile.am (distcheck): New target.  From Gord Matzigkeit.
5655 Fri May 10 20:46:13 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5657         * po/Makefile.in.in (all-yes): Always depend on CATALOGS.  Otherwise
5658         they won't be built and install could fail.  From Ulrich Drepper.
5659         (.po.mo): Disable dependency and rule when not in maintainer mode.
5661         * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
5662         on whether we're using GNU gettext.  From Ulrich Drepper.
5664 Wed May  8 21:10:43 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5666         * intl/Makefile.in (distdir): Renamed from dist. For compatibility
5667         with automake-0.32.
5668         * po/Makefile.in.in (distdir): Likewise.
5670         * po/Makefile.in.in (all-yes): Depend on GMOFILES.
5671         Depend on CATALOGS and GMOFILES files only in maintainer mode.
5673 Tue May  7 22:10:20 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5675         * configure.in: Require autoconf-2.10.
5677         * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
5678         * configure.in (jm_MAINTAINER_MODE): Use it.
5680 Sat May  4 20:40:01 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5682         * configure.in (LINGUAS): Add de.
5683         * po/de.po: New file.
5685         * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
5686         * regex.c [IN_CTYPE_DOMAIN]: Likewise.
5687         * system.h [IN_CTYPE_DOMAIN]: Likewise.
5689 Sun Apr 28 17:10:03 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5691         * fmt.c (copy_rest): Don't copy past end of prefix.  Output
5692         trailing spaces if the prefix had any.  Before, fmt would
5693         improperly output NUL bytes.  The command
5694         perl -e 'print "| S";' |fmt -p' |  '|tr '\0' @
5695         output `|@S'.  Reported by François Pinard.
5697         * sort.c (main): Give a better diagnostic for `sort -0'.
5698         Reported by Karl Berry.
5700         * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
5701         Otherwise, some systems lose because the value AC_C_INLINE choses
5702         with plain `cc' is different from that chosen when using the ANSI-mode
5703         C compiler.  From Kaveh Ghazi.
5705 Tue Apr 23 22:05:35 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5707         * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
5708         * configure.in: Use it.
5709         * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
5710         (EXTRA_DIST): Add getopt.c and getopt1.c
5712         * src/*.c, src/*.h: Update Copyright years to include 1996.
5714 Sun Apr 21 08:04:51 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5716         * getline.c: New version from gettext-0.10.12.
5717         * getline.h: Likewise.
5718         * configure.in (AC_CHECK_FUNCS): Add getdelim.
5719         Suggested by Ulrich Drepper.
5721         * md5sum.c (md5_check): Remove spurious newline at end of error
5722         format string.
5724         * od.c (decode_one_format): Use printf's L modifier for long doubles,
5725         not `l'.  From Eric Backus.
5727         * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
5729         * od.c: Include <values.h>.
5730         [!BITSPERBYTE]: Define.
5731         [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
5732         * configure.in (AC_CHECK_HEADERS): Add values.h.
5734 Fri Apr 19 23:48:53 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5736         * Makefile.am (cvs-dist): New rule.  Based on the one from
5737         Tom Tromey's automake.
5739 Thu Apr 18 22:13:14 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5741         * tail.c (main): Make code clearer:  use new variable `n_files' in
5742         place of `argc - optind'.  Use `file' instead of `argv + optind'.
5744 Sat Apr 13 13:08:29 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5746         * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
5747         not memcasecmp.c.
5749         * memcasecmp.c: Unprotoize.
5750         [ISASCII]: Define.
5751         [ISUPPER]: Define.
5753         * join.c (decode_field_spec): Rename local variable `valid'
5754         to invalid (and reverse sense) to avoid conflict with the
5755         macro definition in /usr/include/locale.h on SunOS 4.1.3.
5757 Tue Apr  9 22:43:57 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5759         * uniq.c: Add new option --ignore-case (-i).
5760         Include memcasecmp.h.
5761         (different): Compare with memcasecmp if ignoring case.
5762         (main): Handle 'i'.
5764         * join.c (memcasecmp): Remove static definition of function.
5765         Include memcasecmp.h instead.
5767         * memcasecmp.c: New file.
5768         * memcasecmp.h: New file.
5769         * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
5770         (noinst_HEADERS): Add memcasecmp.h.
5772 Thu Apr  4 17:05:33 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5774         * tr.c: The following commands all failed unnecessarily.
5775         tr -cs '[:upper:]' '[X*]'
5776         tr -dcs '[:lower:]' n-rs-z
5777         tr -ds '[:xdigit:]' [:alnum:]'
5778         tr -dcs '[:alnum:]' [:digit:]'
5779         tr -dc '[:upper:]'
5780         Reported by Ross Ridge (ross@worf.mks.com).
5781         (validate): Add missing conjunct (translating) in test for
5782         `translating and complementing character classes' error.  Before,
5783         valid uses of tr could fail.  E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
5784         (homogeneous_spec_list): New function.
5785         (validate): Use it to relax the old (overly restrictive) restriction
5786         that prohibited use of complemented character classes when translating.
5787         Now, that is allowed as long as the translation maps many to one.
5788         (get_spec_stats): Rename and redefine global has_char_class from
5789         has_upper_or_lower.
5791 Wed Apr  3 07:08:57 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5793         * aclocal.m4: Update NLS macros from gettext-0.10.11.
5795         * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
5796         when srcdir != builddir.  From Kaveh Ghazi.
5798 Wed Mar 27 23:33:36 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5800         * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
5801         to be POSIX compliant.  From Stephen Gildea <gildea@x.org>.
5803 Sun Mar 24 08:47:40 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5805         * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
5806         * od.c (skip, main): Likewise.
5807         * tr.c (main): Likewise.
5809         * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
5810         join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
5811         tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
5812         EXIT_FAILURE, rather than 0 or 1.
5814 Sat Mar 23 23:14:40 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5816         * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
5817         is defined to zero.  Suggested by Paul Eggert.
5819         * sort.c [SORT_FAILURE]: New macro.
5820         Be careful to exit with 1 only when -c is used and the
5821         input is not properly sorted.  In all other cases, use
5822         SORT_FAILURE as required by POSIX.
5823         (main): Change some `error (1, ...' to use SORT_FAILURE.
5824         Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
5825         Replace all uses of `2' (as exit code) with SORT_FAILURE.
5827 Thu Mar 21 22:47:50 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5829         * csplit.c: Include assert.h, but disable assertions.
5830         (process_line_count): Replace if-abort with a slightly relaxed
5831         assertion.  Before, `echo |csplit - 1 1' would abort.
5832         Reported by Samuli.Karkkainen@hut.fi.
5833         (parse_patterns): Disallow uses like `csplit FILE 0' with zero
5834         line number, `csplit FILE 2 1' with decreasing line numbers, and
5835         warn about uses like `csplit FILE 3 3' that have equal line numbers.
5837         * sort.c (main): Declare to be of type int, not void.
5838         From Peter Seebach <seebs@taniemarie.solon.com>.
5839         * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
5840         nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
5841         wc.c (main): Likewise.
5843 Sat Mar 16 16:30:07 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5845         * configure.in (PACKAGE_VERSION): New macro.
5846         * acconfig.h (PACKAGE_VERSION): Add it.
5847         * src/Makefile.am: Remove rules for generating version.c.
5848         Remove references to version.o, version.h, and stamp-v.
5849         * version.c: Remove file.
5850         * version.h: Remove file.
5851         * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
5852         head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
5853         sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
5854         version.h.
5855         (main): Use PACKAGE_VERSION instead of version_string.
5857 Mon Mar 11 16:07:08 CST 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5859         * sort.c (write_bytes): Renamed from xfwrite.
5860         Remove SIZE parameter.  It was always 1. Update all callers.
5861         Rename NELEM parameter to N_BYTES and change its type to size_t.
5863 Sat Mar  9 13:30:12 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5865         * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
5866         fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
5867         split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
5868         Initialize for internationalized message support: call setlocale,
5869         bindtextdomain, and textdomain.
5870         * system.h: Add definitions and includes for NLS.
5871         * Makefile.am (SUBDIRS): Add intl and po.
5872         * src/Makefile.am (datadir): Define.
5873         (localedir): Define.
5874         (DEFS): Add LOCALEDIR definition.
5875         (LDADD): Add @INTLLIBS@.
5876         * aclocal.m4: Add NLS-related macro definitions from
5877         gettext distribution.
5878         * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
5879         HAVE_STPCPY): New macros.
5880         Add PACKAGE and VERSION.
5881         * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
5882         (VERSION): Likewise.
5883         (ALL_LINGUAS): Define.
5884         (AC_CHECK_HEADERS): Add float.h.
5885         (ud_GNU_GETTEXT): Use it.
5886         Link an nls file.
5887         (AC_OUTPUT): Reflect addition of two new directories, intl and po.
5888         Create po/Makefile.
5889         From François Pinard.
5891         * tr.c (star_digits_closebracket): Declare formal param, IDX,
5892         and local I to be of type size_t (rather than int) to avoid
5893         warnings from gcc -Wall.
5895 Wed Feb 28 20:32:48 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5897         * src/Makefile.am: Adapt for automake-0.30.
5898         (noinst_HEADERS): Rename from HEADERS.
5899         (INCLUDES): Remove -I.. and -I$(srcdir).  automake-0.30 adds these
5900         to DEFS automatically.
5901         * lib/Makefile.am (noinst_HEADERS): Rename from HEADERS.
5903 Wed Feb 21 18:56:27 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5905         * join.c (xfields) [without -t]: Ignore leading blanks.
5906         From David Dyck (dcd@tc.fluke.COM).
5908 Sun Feb 18 12:07:27 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5910         * join.c [TOLOWER]: Define.
5911         (usage): Briefly describe new --ignore-case (-i) option.
5912         (memcasecmp): New function.
5913         (main): Set IGNORE_CASE for -i.
5914         (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
5915         Suggestion and an initial patch from Alberto Accomazzi
5916         <alberto@cfa0.harvard.edu>.
5918 Sat Feb 17 18:54:40 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5920         * sort.c: Add -z option.  Change all occurrences of '\n' to `eolchar'.
5921         (usage): Describe it.
5922         (main): Set eolchar to 0 for -z.
5923         From Mark W. Eichin <eichin@cygnus.com>.
5925 Fri Feb 16 21:44:14 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5927         * join.c (main): Mark two strings for translation.
5928         * md5sum.c (md5_check): Mark a string for translation.
5929         From François Pinard.
5931 Mon Feb 12 21:12:28 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5933         Update for automake-0.29.
5934         * Makefile.am (CONFIG_HEADER): Don't define.  Automake now does it.
5935         * src/Makefile.am: Likewise.
5936         * lib/Makefile.am: Likewise.
5937         * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
5938         * man/Makefile.am (man_MANS): Renamed from MANS.
5940         * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
5941         [FALSE]: Likewise.
5942         From Derek Clegg (dclegg@next.com).
5944 Sat Feb  3 16:20:40 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5946         * Version 1.14.
5948 Wed Jan 31 23:26:13 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5950         * tail.c (dump_remainder): Flush stdout when tailing-forever on
5951         multiple files.  From Carlos Canau <Carlos.Canau@relay.puug.pt>.
5953 Fri Jan  5 18:30:28  1996 Jim Meyering  (meyering@na-net.ornl.gov)
5955         * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
5956         not just -Xc.  From François Pinard.
5958         * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh.  mdate-sh is
5959         distributed automatically.  From Tom Tromey.
5961 Thu Jan  4 20:32:52 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5963         * nl.c: Include rx.h after limit.h (not before) to avoid warning
5964         about the redeclaration of RE_DUP_MAX in limit.h.  rx.h protects
5965         its definition.  From Kaveh Ghazi.
5967         * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
5968         works again.  Reported by François Pinard and Kaveh Ghazi.
5970         * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
5971         [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
5972         (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
5973         mismatch errors from e.g. SunOS's /bin/cc.
5974         Reported by Kaveh Ghazi.
5976 Wed Jan  3 23:34:39 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5978         * configure.in (VERSION): Set variable directly rather than from
5979         a separate file.
5980         * Makefile.am (DIST_OTHER): Remove VERSION.
5981         * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
5982         (stamp-v): New target; depend on Makefile.
5983         (DISTCLEANFILES): Add stamp-v, version.c.
5985 Tue Jan  2 00:08:08 1996  Jim Meyering  (meyering@na-net.ornl.gov)
5987         * sort.c (keycompare): Rewrite cases handling ignored characters
5988         so that they really are ignored.  Reported by Carl Johnson
5989         <carlj@cjlinux.home.org>.
5991 Fri Dec 22 21:34:55 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5993         * configure.in: Touch stamp-h only if config.h is remade.
5995         * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
5996         syntax_parens field.
5998 Mon Dec 18 21:42:44 1995  Jim Meyering  (meyering@comco.com)
6000         Use automake to generate Makefile.in files.
6001         * Makefile.am: New file.
6002         * doc/Makefile.am: New file.
6003         * lib/Makefile.am: New file.
6004         * man/Makefile.am: New file.
6005         * src/Makefile.am: New file.
6007 Thu Dec 14 21:13:22 1995  Jim Meyering  (meyering@comco.com)
6009         * fmt.c (main): Use xstrtol instead of atoi.
6011         * fold.c (main): Use xstrtol instead of atoi.
6012         (fold_file): Make a couple locals `int', not size_t, and cast
6013         fwrite's third parameter to size_t.
6015         * nl.c (main): Use xstrtol instead of atoi.
6016         Rename misleading --first-page=N option to --starting-line-number=N.
6017         (usage): Update.
6019         * uniq.c (main): Use xstrtol instead of atoi.
6021 Fri Dec  8 20:48:00 1995  Jim Meyering  (meyering@comco.com)
6023         * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
6025 Thu Dec  7 19:55:03 1995  Jim Meyering  (meyering@comco.com)
6027         * aclocal.m4 (ud_WITH_REGEX): New macro.
6028         * configure.in: Use it.
6029         * rx.c, rx.h: New files.
6030         * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
6031         (SOURCES, DISTFILES): Add rx.c, rx.h.
6032         * acconfig.h (WITH_REGEX): Add it.
6033         * csplit.c [!WITH_REGEX]: Include rx.h.
6034         * nl.c [!WITH_REGEX]: Likewise.
6035         * tac.c [!WITH_REGEX]: Likewise.
6036         From Ulrich Drepper and François Pinard.
6038 Tue Dec  5 17:49:53 1995  Jim Meyering  (meyering@comco.com)
6040         * sort.c (main): Diagnose invalid arguments to -k, then fail.
6042         * sort.c (numcompare): Properly handle all cases in which signs differ.
6043         From Karl Heuer.
6045         * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
6046         Append `/man1'.  Reported by Karl Heuer.
6048         * sum.c (bsd_sum_file): Remove misleading comment.  From Karl Heuer.
6050         * src/Makefile.in [.c._o]: Don't create $<-tmp.  From Kaveh Ghazi.
6052 Fri Dec  1 01:02:36 1995  Jim Meyering  (meyering@comco.com)
6054         * lib/Makefile.in (default): New target.
6056         * sort.c (numcompare): Properly order `-' and valid integers;
6057         treat `-' as if it were zero.  Reported by Ross Alexander
6058         <r.alexander@auckland.ac.nz>.
6060         * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
6061         (.PHONY): Depend on default.
6063 Wed Nov 29 21:50:53 1995  Jim Meyering  (meyering@comco.com)
6065         * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
6066         (jm_AUTODEPS): Likewise.
6067         (jm_WITH_GNU_MAKE): Likewise.
6068         * configure.in (jm_AUTODEPS): Remove.
6070         * sort.c (begfield): Replace loop with equivalent if-else.
6071         (limfield): Fix bug that made field specs like -k1.5 return a
6072         pointer into LINE beyond the first field.
6073         Don't try to trim trailing blanks here; it's not
6074         possible because we don't know where the field begins.
6075         Replace loop with equivalent if-else.
6076         (trim_trailing_blanks): New function.
6077         (findlines): Call it.
6078         (keycompare): Likewise.
6079         (main): Don't decrement T2 corresponding to `x' in field
6080         specs like -ku.v,w.x.
6082 Sun Nov 26 15:50:23 1995  Jim Meyering  (meyering@comco.com)
6084         * csplit.c [!UINT_MAX]: Define.
6085         [!INT_MAX]: Define.
6086         Include xstrtoul.h.
6087         (string_to_number): Remove function.
6088         (check_for_offset): Use xstrtoul instead of string_to_number.
6089         (parse_repeat_count): Likewise.
6090         (parse_patterns): Likewise.
6091         (main): Likewise.
6093 Wed Nov 22 23:12:47 1995  Jim Meyering  (meyering@comco.com)
6095         * Makefile.in (all et. al.): If make was invoked with -k and a
6096         sub-make fails, fail after the loop rather than exiting right away.
6097         Otherwise, make's -k option could be ineffective.
6099 Sat Nov 18 12:04:30 1995  Jim Meyering  (meyering@comco.com)
6101         * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
6103         Update for autoconf-2.5:
6104         * src/Makefile.in (libdir): Set to @libdir@.
6105         (bindir): Set to @bindir@.
6106         * doc/Makefile.in (infodir): Set to @infodir@.
6107         * man/Makefile.in (exec_prefix): Remove it.
6108         (mandir): Set to @mandir@.
6109         (bindir): Remove it.
6111 Thu Nov 16 21:25:45 1995  Jim Meyering  (meyering@comco.com)
6113         * Makefile.in (default): New default target.  Depend on `all' to
6114         work around bug in AIX-3.2.5's /bin/make.  Reported by Andreas Luik
6115         <luik@isa.de>.
6117 Wed Nov 15 23:48:31 1995  Jim Meyering  (meyering@comco.com)
6119         * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
6121         * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
6122         * src/Makefile.in (C_MKDEP): Rename from MKDEP.
6123         * lib/Makefile.in (C_MKDEP): Likewise.
6124         * mkdep-Makefile (C_MKDEP): Likewise.
6125         Add comments.
6127         * csplit.c [__P]: Don't define it here.
6128         * pr.c [__P]: Don't define it here.
6129         * fmt.c [__P]: Don't define it here.
6130         * system.h [__P]: Define it here.
6132         * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
6133         Revamp, with suggestions from Franc,ois Pinard.
6134         (jm_WITH_GNU_MAKE): New macro.
6135         (jm_PROG_MKDEP): New macro.
6136         * configure.in (jm_PROG_MKDEP): Use it.
6137         * src/Makefile.in (MKDEP): Set it.
6138         * lib/Makefile.in (MKDEP): Likewise.
6139         * mkdep-Makefile: Use MKDEP, not DEP_CC.
6140         (DEP_CFLAGS): Remove it.
6142 Tue Nov 14 23:10:54 1995  Jim Meyering  (meyering@comco.com)
6144         * sort.c: Add support for sorting numbers in scientific notation.
6145         Include xstrtod.h.
6146         (struct keyfield): Add field: general_numeric.
6147         (usage): Describe -g option.
6148         (general_numcompare): New function.
6149         (keycompare): Use new comparison function when general_numeric
6150         flag is set.
6151         (set_ordering): Honor `g' flag.
6152         (main): Initialize and use new field.
6153         From Marcus Daniels <marcus@sysc.pdx.edu>.
6155         * configure.in (AC_REPLACE_FUNCS): Add strtod.
6156         * lib/Makefile.in (SOURCES): Add xstrtod.c.
6157         (OBJECTS): Add xstrtod.o.
6158         (DISTFILES): Add xstrtod.h.
6160         * csplit.c (cleanup): Don't exit.
6161         (interrupt_handler): Rewrite to reset default signal handler
6162         then repost caught signal.
6163         (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
6164         process_line_count, process_regexp, create_output_file,
6165         close_output_file): Call cleanup_fatal, not cleanup.
6166         Add const attribute to lots of parameters.
6167         (cleanup_fatal): Renamed from cleanup.  Call cleanup, then exit.
6168         Update callers.
6170         * tac.c (cleanup): Don't exit.
6171         (cleanup_fatal): New function.  Call cleanup, then exit.
6172         (sighandler): New function.
6173         (cleanup_fatal): Renamed from cleanup.  Call cleanup, then exit.
6174         Update callers.
6175         (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
6177 Sat Nov 11 15:46:02 1995  Jim Meyering  (meyering@comco.com)
6179         * od.c (skip): Cast fseek's offset argument to `long'.
6180         Erik Bennett <bennett@cvo.oneworld.com> reported that this is
6181         necessary on BSDI systems.  And if offset doesn't fit in a long,
6182         then try using lseek instead.
6184         * sort.c (xmalloc): Declare static.
6185         (xrealloc): Likewise.
6187         * tac.c (cleanup): Add signal number parameter.
6188         Update callers.
6190         * cat.c (main): Don't die when dev/ino of input and output are
6191         the same and the file descriptors correspond to stdin and stdout.
6192         This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
6193         Otherwise, running `cat << X > $$' would fail with `cat: -: input
6194         file is output file'.  From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
6196         * Makefile.in (DISTFILES): Add @README_ALPHA@.
6197         (config.status) Depend on VERSION.
6198         * configure.in: Set README_ALPHA if the version number ends in [a-z].
6200 Fri Nov 10 21:13:42 1995  Jim Meyering  (meyering@comco.com)
6202         * fold.c (usage): Clarify meaning of --spaces.  From Karl Berry.
6204         src/Makefile.in (.c._c): Don't redirect directly to $@.
6205         (._c._o, .c._o): Remove temporary src file.
6207 Tue Nov  7 23:55:24 1995  Jim Meyering  (meyering@comco.com)
6209         * VERSION: New file.
6210         * configure.in (VERSION): New variable.
6211         (PACKAGE): New variable.
6213         * Makefile.in (DISTFILES): Add VERSION.
6214         (distdir): Use @PACKAGE@-@VERSION@, not distname.
6215         Remove all references to distname.
6216         * src/Makefile.in (version.c): Generate it.
6217         (SOURCES): Remove now-generated version.c.
6218         (distclean): Delete version.c.
6219         * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
6220         not version.c
6222         * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
6223         Remove all references to distname.
6225         * split.c: New option: --verbose.
6226         (main): Recognize it.
6227         (usage): Document it.
6228         From Marty Leisner <leisner@sdsp.mc.xerox.com>.
6230 Sun Nov  5 06:59:27 1995  Jim Meyering  (meyering@comco.com)
6232         * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
6233         and unexpand.c.
6235         * pr.c: Protoize.
6236         (store_columns): Remove spurious 2nd argument in call to read_line.
6237         [__P]: Define.  Use it in prototyped forward decls.
6239         * csplit.c: Move prototypes after struct declarations.
6240         Remove prototypes for xmalloc, xrealloc.
6241         Protect prototypes with __P.
6242         (new_control_record): Cast arg 1 to realloc.
6244         * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
6245         Protoize.
6247 Sat Nov  4 23:51:30 1995  Jim Meyering  (meyering@comco.com)
6249         * csplit.c (close_output_file): Set output_stream to NULL so we
6250         don't recurse endlessly between this function and cleanup.
6252         * unexpand.c: Reorder functions to obviate forward dcls.  Remove
6253         forward dcls.  Protoize.  Add `const' attribute to some parameters.
6255 Mon Oct 30 23:15:56 1995  Jim Meyering  (meyering@comco.com)
6257         * wc.c: Reorder functions to obviate forward dcls.  Remove
6258         forward dcls.  Protoize.  Add `const' attribute to some parameters.
6259         * uniq.c: Likewise.
6260         * split.c: Likewise.
6262         * split.c (isdigits, convint): Remove these.
6263         (main): Use xstrtol instead.
6265 Sun Oct 29 14:04:36 1995  Jim Meyering  (meyering@comco.com)
6267         * paste.c (main): Move function body to end of file.
6268         Remove forward dcls and protoize.
6269         * sum.c (main): Likewise.
6270         * nl.c: Protoize.  Reorder functions to obviate forward dcls.
6271         Remove forward dcls.
6272         * tac.c: Likewise.
6273         * src/Makefile.in (OBJECTS): Reflect that all of the above
6274         now use prototypes.
6276         * sum.c (bsd_sum_file): Give file name parameter const attribute.
6277         (sysv_sum_file): Likewise.
6279         * tac.c (xwrite): Give output buffer parameter const attribute.
6280         (output): Likewise for both parameters.
6281         (tac): Likewise for file name parameter.
6282         (tac_file): Likewise.
6284 Sat Oct 28 16:02:39 1995  Jim Meyering  (meyering@comco.com)
6286         * md5sum.c (md5_check): Use the same message format when there is
6287         a single file and it gets a read error or checksum mismatch as when
6288         there are more.  Write that warning to standard error, not standard
6289         output.  Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
6291 Thu Oct 26 00:11:35 1995  Jim Meyering  (meyering@comco.com)
6293         * sort.c (xtmpfopen): New function to set proper permissions on
6294         temporary files.  Use it instead of xfopen. Reported by Erik Corry
6295         (erik@kroete2.freinet.de).
6297 Mon Oct 23 23:17:04 1995  Jim Meyering  (meyering@comco.com)
6299         * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
6300         * configure.in: Use it.
6302         * lib/Makefile.in (INCLUDE, COMPILE): New variables.
6303         (.c.o): Rewrite to be more like src/Makefile.in.
6305         * src/Makefile.in (distclean): Remove .deps.
6306         Include @top_srcdir@/mkdep-Makefile.
6308         * mkdep.Makefile: New file.
6309         * Makefile.in (DISTFILES): Add mkdep-Makefile.
6310         * doc/Makefile.in (mostlyclean): Also remove *.info.
6312 Thu Oct 19 17:38:28 1995  Jim Meyering  (meyering@comco.com)
6314         * od.c: Indent cpp directives.
6316         * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
6317         with large repeat counts.
6318         (struct E_string): New struct.
6319         (find_closing_delim): Take E_string arg rather than char* and length.
6320         (find_bracketed_repeat): Likewise.
6321         (star_digits_closebracket): New function.
6322         (append_char_class): No longer give diagnostic.
6323         (append_equiv_class): Likewise.
6324         (build_spec_list): Give them here instead, allowing string1 like
6325         [:*][:upper:] that got errors before.
6326         Take E_string arg rather than char*.
6327         Convert switch stmts into if-then so as to use ES_MATCH.
6329 Tue Oct 17 22:48:00 1995  Jim Meyering  (meyering@comco.com)
6331         * cat.c: Protoize.  Reorder functions to obviate forward dcls.
6332         Remove forward dcls.
6333         * expand.c: Likewise.
6334         * fold.c: Likewise.
6335         * head.c: Likewise.
6336         * od.c: Likewise.
6337         * sort.c: Likewise.
6338         * tail.c: Likewise.
6340         * src/Makefile.in (OBJECTS): Reflect that all of the above
6341         now use prototypes.
6343         * head.c: Add `const' attribute to dcls of lots of formals.
6345         * sort.c: Add `const' attribute to dcls of lots of formals.
6346         Move struct dcls to precede dcls of file-scope variables.
6347         (monthtab, keyhead): Separate variable dcls from type dcls.
6349 Fri Oct 13 20:38:39 1995  Jim Meyering  (meyering@comco.com)
6351         * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
6352         list item separators, per POSIX spec.
6353         (prjoin): Rewrite loop that iterates over field specs.
6354         Handle case in which file spec is 0.
6356 Sun Oct  8 22:41:15 1995  Jim Meyering  (meyering@comco.com)
6358         * strpbrk.c: New file.
6359         * lib/Makefile.in (SOURCES): Add strpbrk.c.
6360         Remove bcopy.c.
6362 Sat Oct  7 22:27:01 1995  Jim Meyering  (meyering@comco.com)
6364         * join.c (add_field): No longer return a value.
6365         (decode_field_spec): New function.
6366         (add_field_list): Rewrite to be more strict.
6367         Before, `,1.2' was accepted as valid.
6368         (main): Use xstrtol instead atoi.
6369         Combine nearly identical -a and -v cases.
6370         Close input files.
6372 Fri Oct  6 23:10:01 1995  Jim Meyering  (meyering@comco.com)
6374         * join.c (main): Report `too few/many non-option arguments'
6375         then print --help output rather than just the latter.
6376         Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
6377         (usage): Describe POSIX -1, -2 options and deprecate -j* ones
6379         * join.c (usage): Move to precede all other functions.
6381         * join.c: Protoize.
6383 Tue Oct  3 22:44:05 1995  Jim Meyering  (meyering@comco.com)
6385         * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
6386         to determine whether `sigaction' functions are available.
6387         Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
6388         Fix suggested by Karl Berry.
6390         * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
6391         type, not `char'.
6393         * cut.c: Convert many declarations using `int' to use `unsigned int'
6394         to avoid warnings from `gcc -Wall' about comparing signed and
6395         unsigned types.
6396         (set_fields): Use memset (not open coded loop) to initialize array.
6398 Thu Sep 28 23:16:05 1995  Jim Meyering  (meyering@comco.com)
6400         * Version 1.13.
6402         * Makefile.in (DISTFILES): Remove README.alpha for major release.
6404         * od.c (decode_one_format): Remove spurious semicolon.
6405         From John Kodis.
6407 Tue Sep 26 23:05:01 1995  Jim Meyering  (meyering@comco.com)
6409         * man/Makefile.in (install-data, uninstall): Use sed not basename.
6410         The GNU Coding Standard suggests that only a select set of
6411         relatively standard utilities be used in Makefiles.  basename is
6412         not among them.  Suggested by Ulrich Drepper.
6414 Sun Sep 24 08:36:47 1995  Jim Meyering  (meyering@comco.com)
6416         * cksum.c: Protoize.
6417         * cut.c: Protoize.
6419         * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
6420         prototypes.
6421         (cksum): Depend on cksum$O.
6422         (cut): Depend on cut$O.
6424 Sat Sep 23 15:43:46 1995  Jim Meyering  (meyering@comco.com)
6426         * Version 1.12.2.
6428         * Makefile.in (DISTFILES): Add README.alpha.
6430         * lib/Makfile.in (GETOPT, MEMCHR, REGEX): New variables.
6431         (OBJECTS): Use them instead of hard-coding object file names.
6432         Suggested by Ulrich Drepper.
6434         * md5sum.c (md5_check): Distinguish between open/read failure
6435         and checksum mismatch.
6437 Mon Sep 18 23:15:05 1995  Jim Meyering  (meyering@comco.com)
6439         * md5sum.c: Protoize.
6440         * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
6441         (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
6442         (md5sum): Depend on md5sum$O.
6444         * md5sum.c (main, usage): Remove -h, -s, -v short options.
6445         Rename --verbose to --warn, --quiet to --status.
6446         (main): Handle --help and --version using parse_long_options.
6447         (md5_check): Check ferror.
6449         * sort.c (tempname): Replace `16' with a more readable expansion.
6450         Make sure that counter never exceeds 99999.
6451         (checkfp): Rearrange loop to avoid duplicate test.
6452         Move a couple dcls from function scope into inner block.
6454 Tue Aug  8 21:49:27 1995  Jim Meyering  (meyering@comco.com)
6456         * md5sum.c (main): Fail if either --verbose or --quiet is specified
6457         when not verifying checksums.
6459         * md5sum.c (md5_check): Fail if no valid line is found.
6460         Don't use the word `fail' unless there were failures --
6461         instead, say `all N tests passed.'
6463         * md5sum.c (main) [handling --string option]: Don't output
6464         nonstandard `b' binary flag.  From Greg Troxel (gdt@bbn.com).
6465         * md5-test.rfc: Remove now-inconsistant `b' marker.
6466         (usage): Clarify help message.  With suggestions from Greg Troxel.
6468 Mon Aug  7 23:27:54 1995  Jim Meyering  (meyering@comco.com)
6470         * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
6471         compiler warning.  From Ulrich Drepper.
6473         * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
6474         compiler warning.  From Ulrich Drepper.
6476         * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
6477         From Franc,ois.
6479 Mon Aug  7 00:02:59 1995  Jim Meyering  (meyering@comco.com)
6481         * system.h (_): Define macro -- as empty for now.
6482         * src/*.c: Annotate localizable strings with _(...).  From Franc,ois.
6484 Sat Aug  5 23:51:25 1995  Jim Meyering  (meyering@comco.com)
6486         * Version 1.12.1.
6488         * configure.in: Add fp_C_PROTOTYPES.
6490 Fri Aug  4 23:21:46 1995  Jim Meyering  (meyering@comco.com)
6492         * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
6493         Add suffixes, dependencies, and rules to convert ANSI source to K&R
6494         when required.  Mark tr.o and comm.o as the only such files (for now).
6496         * tr.c: Protoize.
6497         * comm.c: Protoize.
6499         * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
6500         (configure): Depend on aclocal.m4.
6501         (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
6503 Sun Jul 30 00:01:58 1995  Jim Meyering  (meyering@comco.com)
6505         * md5sum.c (md5_check): Use getline instead of fgets.
6507         * lib/Makefile.in (SOURCES): Add getline.c.
6508         (OBJECTS): Add getline.o.
6509         (DISTFILES): Add getline.h.
6510         (getline.o): Depend on getline.h.
6512         * md5.c [memcpy]: Define to bcopy if needed.
6513         (md5_buffer): Explicitely cast SWAP expressions to unsigned
6514         to avoid warning.
6516         * lib/Makefile.in (strtoul.o): Depend on strtol.c.
6518         * sort.c (check): Print `disorder on...' message on standard error,
6519         not stdout.  This is a minor concession to POSIX which says
6520         `no output shall be produced...'.
6522         * sort.c (main): Fix -k so it works. -k 2,3 was being treated
6523         like -k 2.  Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
6525 Wed Jul 26 22:54:48 1995  Jim Meyering  (meyering@comco.com)
6527         * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
6528         before applying $(transform) to manual name.  From Karl Berry.
6530         * md5sum.c (have_read_stdin): New global variable.
6531         (md5_file, md5_check): Set it.
6532         (main): Use it.
6534         * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
6535         (md5_file): Take a new parameter, MD5_RESULT, and no longer
6536         generate output.
6537         (md5_check): Invoke md5_file instead of calling fopen directly.
6538         When giving a diagnostic for a line with invalid format, also report
6539         the line number.
6540         (main): Generate output after a successful md5_file call.
6541         [in many places]: Upon detection of an error, rather than exiting
6542         immediately, issue a diagnostic, note that an error occurred and
6543         exit later.
6545 Mon Jul 24 21:48:26 1995  Jim Meyering  (meyering@comco.com)
6547         * tail.c (tail_bytes) [from_start]: For regular files, seek
6548         relative to the initial input file pointer position, not
6549         necessarily from the beginning of the file.
6550         [!from_start]: Don't back up past the initial position of the
6551         input file pointer.
6552         (tail_lines): Call file_lines only if FD refers to a regular file
6553         with its file pointer positioned at beginning of file.  Otherwise,
6554         call pipe_lines.  This is a kludge.  Once there's a decent test
6555         suite, fix this properly.
6556         Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
6557         would output both lines of the input file even though the first had
6558         already been read.  Reported by John Roll (john@panic.harvard.edu).
6560         * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
6562         * csplit.c (main): When too few arguments are given, don't just
6563         issue the usage message; also report why.
6565 Sat Jul 22 00:16:01 1995  Jim Meyering  (meyering@comco.com)
6567         * md5sum.c (md5_check): New function -- extracted from main.
6569 Fri Jul 21 01:21:49 1995  Jim Meyering  (meyering@comco.com)
6571         * md5sum.c (md5_file): New function -- extracted from main.
6572         (main): Call the new function instead of doing all that in an
6573         if-stmt. Always use "%s" format rather than raw filename as
6574         format argument in printf-style functions like error.  Otherwise,
6575         filenames containing `%' are likely to lose.
6576         Remove all mention of `old format'.
6577         (split_3): No longer parse the `new format.'  There is only one
6578         valid format now: the compatible one.
6580         * lib/Makefile.in (SOURCES): Add md5.c.
6581         (OBJECTS): Add md5.o.
6582         (DISTFILES): Add md5.h.
6583         (md5.o): Depend on md5.h.
6585         * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
6586         * lib/md5.c (md5_stream): Check for read failure and return
6587         indication of success rather than second argument.
6588         * lib/md5.h (md5_stream): Update prototype.
6589         [__P]: Define macro.
6590         * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
6591         (main): Report an error if md5_stream fails.  Otherwise, running
6592         `md5sum dir-on-mounted-filesystem' always reported the checksum
6593         for an empty file.  Now it gets the `is a directory' error.
6594         Greg McGary (gkm@magilla.cichlid.com) reported that the released
6595         version got stuck in an infinite loop with such arguments.
6597         * lib/md5.c: New file.
6598         * lib/md5.h: New file.
6599         * md5sum.c: Rewritten to use library interface.
6600         From Ulrich Drepper.
6602 Sun Jul 16 18:42:34 1995  Jim Meyering  (meyering@comco.com)
6604         * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
6606 Tue Jul 11 21:56:02 1995  Jim Meyering  (meyering@comco.com)
6608         * md5sum.c Add #else block after #ifdef VMS.
6609         (main): Rename local variable.
6610         Detect and report failed fclose calls on stdout and checkfile_stream.
6612         * tr.c (unqote): Comment out unreachable break stmts.
6613         (append_range): Declare FIRST and LAST parameters to be unsigned int,
6614         not size_t.
6615         (find_closing_delim): Clean up interface, separating boolean success
6616         indicator and index.
6617         (find_bracketed_repeat): Likewise.
6618         (build_spec_list): Adapt to use new interfaces.
6619         Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
6620         type size_t, not int.
6621         (main): Declare NR and CHARS_READ to be of type long, not int.
6623         * sort.c (main): Comment out unreachable break stmt.
6625         * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
6626         call to tail_lines.  Otherwise, NetBSD lost because N_UNITS (of type
6627         off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
6628         long.  Reported by Dan Hagerty (hag@gnu.ai.it.edu).
6630         * comm.c: Reorder functions so main is last, so no forward dcls
6631         are needed.
6633 Sun Jul  9 11:41:15 1995  Jim Meyering  (meyering@comco.com)
6635         * sort.c (main): When using obsolescent +pos -pos syntax, allow
6636         omission of field spec only when character offset is specified.
6637         Otherwise, -. +. would be accepted.
6639 Sat Jul  8 13:48:06 1995  Jim Meyering  (meyering@comco.com)
6641         * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
6642         position specification.  For compatibility with existing practice
6643         (what vendors?), omitting M is now equivalent to specifying `0' for M,
6644         but only when using the +pos -pos syntax, not with the -k option.
6645         From Rick Sladkey (jrs@world.std.com).
6647 Thu Jul  6 23:44:20 1995  Jim Meyering  (meyering@comco.com)
6649         * od.c (dump): Correct loop-termination criterion.
6650         Before, running `printf 1234| ./od --width=4 --read-bytes=4'
6651         printed output for 8 bytes -- the last four were garbage.
6652         This happened only when the dump limit, N, was specified (with
6653         --read-bytes=N) and N was a multiple of bytes_per_block
6654         (usually 16, but 4 in this example).  From Andreas Schwab.
6656 Sun Jul  2 22:12:40 1995  Jim Meyering  (meyering@comco.com)
6658         * lib/Makefile.in (check): Depend on libtu.a.
6660         * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
6661         (main): Print each sum line in (de facto) standard Plumb/Lankester
6662         format.
6663         New option: --quiet.
6664         Check option no longer takes an argument.
6665         When checking, exit status reflects success.
6667 Sat Jun 24 16:18:01 1995  Jim Meyering  (meyering@comco.com)
6669         * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
6670         Autoconf (via config.h) defines it away for compilers that don't
6671         grok it.
6673         * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
6674         defining to avoid redefinition warning on some systems.
6676         * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
6677         This avoids potential conflict with max macro from some system's
6678         header files when using bad pre-ANSI compilers.
6680         * uniq.c (usage): Fix typo in text of --help output.
6681         From Steve McConnel <steve@acadcomp.sil.org>
6683         * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
6684         also check `unsigned long', as a concession to systems with
6685         int's smaller than 32 bits.
6687         * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
6688         AC_FUNC_MEMCMP already handles it.  This avoids warnings from
6689         ranlib on nextstep systems.  From Kaveh Ghazi.
6691         * csplit.c (interrupt_handler): Declare to have a single integer
6692         parameter.  Otherwise, some compilers fail with a type mismatch
6693         error in sa_handler assignment.
6695         * fmt.c [word]: Redefine.  Otherwise, systems (Unicos for one) with
6696         headers that typedef `word' get syntax errors because of the
6697         variable by the same name.
6699         * join.c [join]: Redefine to avoid conflict with prototype in some
6700         system header file.  Also for Unicos.
6702         * md5sum.c (main): Remove spurious colon in getopt spec string.
6703         From Ken Pizzini <kenp@spry.com>.
6705 Tue Jun 20 06:59:16 1995  Jim Meyering  (meyering@comco.com)
6707         * md5sum.c (md5_file): Initialize two elements of LEN portably,
6708         rather than with ANSI aggregate initialization.  Reported by
6709         Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
6711 Sun Jun 18 09:15:57 1995  Jim Meyering  (meyering@comco.com)
6713         * Version 1.12.
6715         * md5sum.c (process_buffer): Copy values from struct into
6716         individual local variables before performing computation on them,
6717         then copy results back into returned struct.  Solely for better
6718         optimization by compilers that can't keep struct members in
6719         registers.  From Ulrich Drepper.
6721 Thu Jun 15 22:09:14 1995  Jim Meyering  (meyering@comco.com)
6723         * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
6724         Don't use #elif.  Some older compilers don't grok it.
6725         (split_3): New function to parse out sum, flag, and filename
6726         when reading check file.
6727         (hex_digits): Remove length parameter since string parameter is
6728         now nul-terminated.
6729         (main): Don't allocate separate arrays for filename and sum
6730         when checking.  Get pointers into line buffer with split_3 instead
6731         of using sscanf.
6732         (main): Treat `no file args' just like `-' when not checking
6733         or using strings.
6734         (hex_digits): Unprotoize.
6736         * md5sum.c (main): Don't use a separate loop to convert to lower
6737         case.  Suggested by Ulrich Drepper.
6738         (CLOSE): New macro.
6739         (md5_file): Use it.
6740         From Ulrich Drepper.
6742         * md5sum.c: Don't include values.h.
6743         [__P]: Undefine it.
6745         * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
6746         and _POSIX_VERSION.  Reported by Arne H. Juul.
6748 Tue Jun 13 21:20:10 1995  Jim Meyering  (meyering@comco.com)
6750         * tr.c [NDEBUG]: Define it to disable assertions.  Some systems
6751         have a broken <assert.h> header.
6752         (is_char_class_member): Set a variable in each branch of switch
6753         stmt and return that value after the switch (rather than returning
6754         directly from every branch).
6755         (unquote): More int->size_t changes.
6756         (build_spec_list): More int->size_t changes.
6757         Be very careful about comparison now that variables are unsigned:
6758         Use i + 2 < len rather than i < len - 2.  The latter didn't work
6759         for len < 2.  Caught early thanks to a thorough regression test
6760         suite.
6762 Mon Jun 12 23:07:59 1995  Jim Meyering  (meyering@comco.com)
6764         * sort.c (xfclose): Don't try to flush stdin, only stdout.
6765         Otherwise, at least Ultrix-4.3's fflush would return EOF.
6766         Reported by Jim Blandy (jimb@cyclic.com).
6768         * tr.c (non_neg_strtol): Don't compare signed and unsigned.
6769         [struct Spec_list] (indefinite_repeat_element): New member.
6770         Use size_t rather than int or unsigned long where reasonable.
6771         (get_spec_status): Make interface cleaner.
6772         (get_s1_spec_status): New function.
6773         (get_s2_spec_status): New function.
6774         (validate): Use new functions instead of get_spec_status.
6776 Sun Jun 11 00:39:50 1995  Jim Meyering  (meyering@comco.com)
6778         * md5sum.c: New file.  From Ulrich Drepper.
6779         * md5-test.rfc: New file.
6780         * Makefile.in (PROGS): Add md5sum.
6781         (check): Run a recursive make in each subdirectory.
6782         * man/Makefile.in (MANFILES): Add md5sum.1.
6783         * src/Makefile.in (SOURCES): Add md5sum.c.
6784         (OBJECTS): Add md5sum.o.
6785         (PROGS): Add md5sum.
6786         (check): Add basic checks for md5sum.
6787         (md5sum): Add dependency and link rule.
6788         (DISTFILES): Add md5-test.rfc.
6790         * tr.c (look_up_char_class, append_char_class, append_equiv_class):
6791         Use const attribute when appropriate.
6793 Sun May 28 14:48:58 1995  Jim Meyering  (meyering@comco.com)
6795         * join.c: Overhauled to make -a1 and -a2 options work.
6796         Passed all tests in a fairly thorough test suite.
6797         Reported by Michael Hasselberg (mikelh@zonta.ping.de).
6799 Sat May 27 00:35:47 1995  Jim Meyering  (meyering@comco.com)
6801         * tail.c (main): Remove dcl of and statements that set now-unused
6802         variable.
6804         * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
6805         Without this, SunOS doesn't get type for memchr.
6806         Reported by Kaveh Ghazi.
6808 Thu May 25 00:06:50 1995  Jim Meyering  (meyering@comco.com)
6810         * tail.c (tail_lines): Change one more `long' to `off_t'.
6811         Otherwise, tail didn't work on NetBSD.  From Arne H. Juul.
6813         * csplit.c [struct control]: Change type of `repeat' to unsigned
6814         long to avoid conversion warning.
6816 Sun May 21 07:50:00 1995  Jim Meyering  (meyering@comco.com)
6818         * Makefile.in (.PHONY): TAGS is not a phony target.  From Franc,ois.
6820         * xstrtol.c (__strtol): Remove prototype altogether.
6821         Move inclusion of xstrtol.h back so that it follows system headers.
6823         * Version 1.11.2.
6825 Sat May 20 06:44:14 1995  Jim Meyering  (meyering@comco.com)
6827         * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
6828         From Kaveh Ghazi.
6830         * xstrtol.c: Define NDEBUG for systems with losing assert.h.
6831         (__strtol): Add __unsigned to prototype and use __P.
6832         Move inclusion of xstrtol.h to precede prototype.
6833         From Kaveh Ghazi.
6835         * memmove.c: Include config.h for definition of const.
6836         From Kaveh Ghazi.
6838         * All Makefile.in (install-exec, install-exec): New targets.
6839         From Karl Berry.
6841         * tr.c (look_up_char_class): Take a string length argument -- required
6842         because the argument is a string that is *not* NUL-terminated.
6843         Use strncmp, not strcmp and add string lengths comparison.
6844         (append_char_class): Update caller.  Before this change,
6845         tr '[:upper:]' '[:lower:]' read one uninitialized byte.
6846         From Andreas Schwab.
6848         * split.c (next_file_name): Move dcls of file-scope variables into
6849         this function.  Don't rely on arithmetic being two's complement.
6851         * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
6852         Instead, declare two FILE structs and use their addresses.
6854         * csplit.c (record_line_starts): Remove set-but-not-used,
6855         file-scope variable.
6857 Sat May 13 08:57:20 1995  Jim Meyering  (meyering@comco.com)
6859         * all source files (usage): Include one- or two-line synopsis
6860         in --help output.  From Karl Berry.
6862         * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
6863         longer used.
6865 Wed May 10 22:26:35 1995  Jim Meyering  (meyering@comco.com)
6867         * Version 1.11.1
6869 Sun May  7 13:35:49 1995  Jim Meyering  (meyering@comco.com)
6871         * all Makefile.in (maintainer-clean): Renamed from realclean
6872         per GNU Standards.
6874 Thu May  4 23:15:58 1995  Jim Meyering  (meyering@comco.com)
6876         * sort.c (main): Use stat, not safe_stat.  The latter was unnecessary.
6877         Don't include safe-stat.h.
6879         * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
6880         Remove all associated rules.  safe-l?stat.h are no longer used.
6882         * sort.c Don't hard-code /tmp.
6883         [DEFAULT_TMPDIR]: Use this instead.
6884         * tac.c (save_stdin): Likewise.
6886         * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
6887         Reported by John Salmon (johns@mullet.anu.edu.au).
6888         Patch from Mike Haertel.
6890 Wed Apr 26 23:48:13 1995  Jim Meyering  (meyering@comco.com)
6892         * sort.c (tempname): AND-off high bits of pid so that its decimal
6893         string representation is no longer than five digits.
6894         From Hans Verkuil (hans@wyst.hobby.nl).
6896 Thu Apr 20 23:09:33 1995  Jim Meyering  (meyering@comco.com)
6898         * expand.c (add_tabstop): Give correct size when reallocating
6899         tab_list buffer.  From Geoff Odhner (geoff@franklin.com).
6900         Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
6902 Tue Apr 18 22:57:43 1995  Jim Meyering  (meyering@comco.com)
6904         * configure.in (AC_OUTPUT): Use echo, not date, to avoid creating
6905         unnecessary conflicts for people using version control software
6906         like RCS and CVS.
6907         (AC_ARG_PROGRAM): Use it.
6909 Thu Apr 13 23:22:57 1995  Jim Meyering  (meyering@comco.com)
6911         * head.c: Remove block of redundant comments describing options.
6912         (usage): Remove reference to -l option.  It's not valid.
6914         * od.c (write_block): Declare index I as unsigned int, not int.
6915         (get_lcm): Likewise.
6916         (dump_strings): Likewise.
6917         (main): Likewise.
6918         (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
6919         (dump_strings): Declare bufsize to be of type size_t, not int.
6921         * split.c (next_file_name): Don't reuse X as an index.
6922         Declare new variable I instead.
6924 Sat Mar 25 15:07:23 1995  Jim Meyering  (meyering@comco.com)
6926         * csplit.c: Declare as `unsigned int' all variables that were
6927         just `unsigned'.
6928         (make_filename): Change type of arg to unsigned int.
6929         (split_file): Change type of indices to unsigned int.
6931 Thu Mar 16 22:05:05 1995  Jim Meyering  (meyering@comco.com)
6933         * od.c (main): Detect and fail when argument to -N is too large
6934         to fit in an off_t.
6936 Sun Mar 12 12:02:39 1995  Jim Meyering  (meyering@comco.com)
6938         * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
6939         Remove check for sizeof long.
6941         * linebuffer.h: Undefine __P before defining it.
6942         * long-options.h: Likewise.
6943         * xstrtol.h: Likewise.
6945         * memcpy.c: New file.
6946         * lib/Makefile.in (SOURCES): Add memcpy.c.
6948 Fri Mar 10 21:14:11 1995  Jim Meyering  (meyering@comco.com)
6950         * src/*.c: Update Copyright dates.
6952 Sat Feb 11 07:31:08 1995  Jim Meyering  (meyering@comco.com)
6954         * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
6955         Separate errno declaration from STDC_HEADERS.
6957         * wc.c (wc): For efficiency, handle separately the cases in which
6958         words need not be counted.  Suggested by Karl Heuer.
6960         * wc.c (wc): Don't overcount the number of bytes when reading
6961         from a regular file on stdin with file pointer not at BOF.
6962         From Karl Heuer <karl@gnu.ai.mit.edu>.  Before, the command
6963         `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
6964         the size of the file.  Now it outputs `0'.
6966 Sat Jan 28 07:07:23 1995  Jim Meyering  (meyering@comco.com)
6968         * cat.c (cat): Use memmove rather than bcopy.
6969         * csplit.c (load_buffer): Use memcpy rather than bcopy.
6970         (extract_regexp): Use strrchr, not rindex.
6971         * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
6972         (flush_paragraph): Use memmove instead of bcopy.
6973         * fold.c (fold_file): Use memmove instead of bcopy.
6974         * od.c (decode_format_string): Use memmove instead of bcopy.
6975         [EQUAL_BLOCKS]: Use memcmp, not bcmp.
6976         (parse_old_offset): Use strchr, not index.
6977         (dump): Use memset, not bzero.
6978         * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
6979         (fillbuf): Use memmove instead of bcopy.
6980         * split.c (main): Use memset, not bzero.
6981         (line_bytes_split): Use memmove instead of bcopy.
6982         * tac.c (tac): Use memmove instead of bcopy.
6983         (output): Use memcpy instead of bcopy.
6984         * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
6985         * tr.c (substr): Use memcpy instead of bcopy.
6986         (card_of_complement, set_initialize): Use memset, not bzero.
6988         * tr.c (substr): Don't allocate a byte for trailing NUL in result
6989         since the result needn't be NUL-terminated.  Don't NUL terminate it.
6991         * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
6992         not bcopy.
6993         (AC_CHECK_FUNCS): Add strchr and strrchr.
6995         * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
6996         * memmove.c: New file.
6997         * memcpy.c: New file.
6999 Tue Jan 24 22:18:19 1995  Jim Meyering  (meyering@comco.com)
7001         * fmt.c (copy_rest): Replace `||' with `&&'.  Before, a paragraph
7002         not followed by a newline would be followed by data copied from
7003         uninitialized storage.  Repeat by `printf abc|fmt|od -ac'.
7004         Reported by Franc,ois Pinard.
7006         * od.c: Rename macros with FP_ prefix.  Use FLOAT_ instead.
7007         AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
7008         Be careful to use off_t instead of explicit `unsigned long'.
7009         Otherwise, systems like 4.4BSD lose on calls to fseek that
7010         expect off_t (which is long long on that system).
7011         (parse_old_offset): Use xstrtoul
7012         (main): Likewise.
7014         * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
7016 Mon Dec 19 22:13:55 1994  Jim Meyering  (meyering@comco.com)
7018         * tail.c (numerous functions): Give char* filename arguments the
7019         const attribute.
7021         * lib/Makefile.in (SOURCES): Remove xwrite.c.  It was no longer used.
7022         Add xstrtol.c and xstrtoul.c.
7023         (OBJECTS): Likewise for .o files.
7024         (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
7026         * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
7027         (distclean): Remove references to safe-l?stat.c.
7028         Remove all related rules and dependencies.
7030         * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
7032 Thu Dec 15 23:14:04 1994  Jim Meyering  (meyering@comco.com)
7034         * tail.c (tail_file): Fix call to error with %s in format, but
7035         no corresponding argument.
7037         * src/*.c: Include "error.h" instead of simply declaring
7038         `void error ();'.
7039         * od.c (main): Use %lu, not %d for unsigned long.
7040         (my_strtoul, uint_fatal_error): Remove functions.  Use xstrtoul
7041         and STRTOL_FATAL_ERROR instead.
7043 Sun Dec 11 17:24:09 1994  Jim Meyering  (meyering@comco.com)
7045         * sort.c (main): Fix interpretation of field offsets when specified
7046         via -k option.  They were being interpreted as zero-indexed.  POSIX
7047         says they are 1-based indices.  From Rik Faith <faith@cs.unc.edu>.
7048         (keycompare): Don't ignore characters at the end of words when
7049         otherwise they would compare equal.  From Rik Faith.
7051         * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
7052         to off_t because n_bytes is used as the option to fseek and off_t may
7053         be long long (e.g. on BSD4.4).  The only place where a 32-bit limit is
7054         imposed is in the string-to-integer converstion of xstrtol.
7055         (main): Use xstrtol instead of manual string to integer conversion.
7057         * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
7058         comparisons against '0' and '9'.
7060         * tr.c [!ULONGMAX]: Define it.
7061         [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
7063         * full-write.c: Declare (or not) errno based on definedness or
7064         errno, not STDC_HEADERS.
7065         * safe-read.c: Likewise.
7066         * xwrite.c: Likewise.
7068 Thu Nov 17 06:37:33 1994  Jim Meyering  (meyering@comco.com)
7070         * tail.c (dump_remainder): Flush standard output just before
7071         sleeping so that `tail -f' will output partial lines sooner.
7072         This applies only when following the end of a single file.
7073         From Leonard N. Zubkoff <lnz@dandelion.com>.
7075         * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
7076         start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
7077         XWRITE calls.
7078         * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
7079         * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
7080         not already defined.
7082 Wed Nov 16 07:01:38 1994  Jim Meyering  (meyering@comco.com)
7084         * tr.c: Include <getopt.h> instead of "getopt.h".
7086         * sort.c (tempname): Merge two very similar sprintf stmts into one.
7088         * tail.c: Use BUFSIZ instead of BUFSIZE.
7090         * cut.c: Declare DELIM to be `int' rather than unsigned char.
7092         * fmt.c: Use index, not strchr -- per GNU Standards.
7093         Reported by Kaveh Ghazi.
7094         Always include <config.h>.
7095         (main): Include program name in --version output.
7097 Sun Nov 06 00:17:21 1994  Jim Meyering  (meyering@comco.com)
7099         * Version 1.11.
7101 Sat Nov 05 15:14:44 1994  Jim Meyering  (meyering@comco.com)
7103         * memcmp.c, srtoul.c: Use up-to-date versions.
7104         Reported by Franc,ois Pinard.
7106         * src/Makefile.in (DEFS): Remove -Dlint... again.
7108         * src/Makefile.in (PROGS): Add fmt!
7109         Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
7111 Fri Nov 04 17:26:16 1994  Jim Meyering  (meyering@comco.com)
7113         * Version 1.10.
7115 Thu Nov 03 23:23:08 1994  Jim Meyering  (meyering@comco.com)
7117         * linebuffer.h: Use __P instead of _P since the latter conflicts
7118         with a definition in some <ctype.h>.  From Kaveh Ghazi.
7120 Wed Nov 02 17:36:34 1994  Jim Meyering  (meyering@comco.com)
7122         * tr.c: Add const attribute where appropriate.
7124         * tail.c (BUFSIZ): Use definition from <stdio.h>.
7126 Tue Nov 01 23:54:09 1994  Jim Meyering  (meyering@comco.com)
7128         * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
7129         n_bytes is positive.  Turn off assertions.  `tail /dev/null' was
7130         getting a failed assertion.  Reported by Doug McLaren
7131         (dougmc@comco.com).
7133         * cut.c (cut_bytes): Print at least a newline for every line of input.
7134         (cut_fields): Print a newline even for lines whose only selected
7135         field is empty.  But print nothing when using -s without -f1.
7136         And print nothing for empty input.  Reported by
7137         Richard_Sharman@software.mitel.com.
7139 Tue Nov 01 06:05:23 1994  Jim Meyering  (meyering@comco.com)
7141         * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
7142         * linebuffer.h: Likewise.
7144 Mon Oct 31 06:53:32 1994  Jim Meyering  (meyering@comco.com)
7146         * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
7147         already handles it.  From Kaveh Ghazi.
7149         * {lib,src}/Makefile.in (DEFS): Don't use -Dlint.  Some systems
7150         get failures when it's defined.  From Kaveh Ghazi.
7152         * cat.c (cat): Conditionalize test for errno == ENOSYS.  It's not
7153         defined on some Next and Alliant systems.  From Kaveh Ghazi.
7155         * sort.c join.c (main): Include version.h and call parse_long_options
7156         with the proper number of arguments.  Reported by Franc,ois Pinard.
7158 Sun Oct 30 01:30:41 1994  Jim Meyering  (meyering@comco.com)
7160         * (configure.in): Add AC_OFF_T and rearrange by type along the
7161         same lines as autoscan.
7163         * fmt.c, fmt.1: New files.
7164         Both from Ross Paterson (rap@doc.ic.ac.uk).
7166         * Makefile.in (PROGS): Add fmt.
7167         * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
7168         (fmt): Add a link rule.
7169         * man/Makefile.in (MANFILES): Add fmt.1.
7171 Sat Oct 08 10:44:30 1994  Jim Meyering  (meyering@comco.com)
7173         * Makefile.in (All of them): Update from the ones in sh-utils.
7174         From now on, rules and definitions that are comon to the fileutils,
7175         textutils, and sh-utils will get ChangeLog entries only in the
7176         sh-utils.
7178 Tue Oct 04 20:42:46 1994  Jim Meyering  (meyering@comco.com)
7180         * od.c (my_strtoul): Set errno to zero before calling strtoul.
7181         Otherwise, od can fail complaining about a valid integer argument.
7182         From Andreas Schwab.
7184 Sun Oct 02 17:57:09 1994  Jim Meyering  (meyering@comco.com)
7186         * tr.c (main): Give an error and fail when squeezing repeats
7187         and no non-options are given.  Reported by Tony Robinson
7188         (ajr@eng.cam.ac.uk).
7190         * sort.c (main): Temporarily copy each input file that might be
7191         another name for the output file.  When in doubt (e.g. a pipe),
7192         copy.  This allows the dangerous (historical -- in cnews) idiom
7193         `cat file | sort -o file' to work properly.  Don't rely on this
7194         behavior in new shell scripts.  From Paul Eggert (eggert@twinsun.com).
7196 Mon Sep 26 18:01:47 1994  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
7198         * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
7199         Remove CONFIG_BROKETS ifdef.
7200         * src/Makefile.in lib/Makefile.in: Don't define it.
7202 Sat Sep 24 21:26:27 1994  Jim Meyering  (meyering@comco.com)
7204         * full-write.c (full_write): Declare argument LEN to be size_t.
7206 Mon Sep 12 13:35:27 1994  Jim Meyering  (meyering@comco.com)
7208         * tail.c (tail_file): [For multiple files only]: Report truncation
7209         of monitored file and reset current file size.  From Franc,ois Pinard.
7211 Sat Aug 27 16:57:20 1994  Jim Meyering  (meyering@comco.com)
7213         * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
7214         From Franc,ois Pinard.
7216 Tue Jul 26 11:33:53 1994  Jim Meyering  (meyering@comco.com)
7218         * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
7219         decides whether to include <fcntl.h>.  From Francois Pinard.
7221 Wed Jul 13 12:33:34 1994  Jim Meyering  (meyering@comco.com)
7223         * tr.c (substr): Fix off-by-one allocation error.
7225 Wed Jun 22 01:02:50 1994  Jim Meyering  (meyering@comco.com)
7227         * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
7228         (tac): Fix typo that had `1' as arg #2 of error after failed read.
7229         Use errno instead.  From Michael I Bushnell <mib@gnu.ai.mit.edu>.
7231 Thu May 26 08:46:32 1994  Jim Meyering  (meyering@comco.com)
7233         * configure.in [INSTALL]: Revert change of March 25.  autoconf
7234         has been fixed.
7236 Mon Apr 11 17:25:43 1994  Jim Meyering  (meyering@comco.com)
7238         * join.c (prline): Remove unused function.  Indent.
7240 Fri May  6 05:44:24 1994  Jim Meyering  (meyering@comco.com)
7242         * tail.c (tail_forever): Don't print headers when asked not to.
7243         From Karsten Thygesen <karthy@kom.auc.dk>.
7245         * wc.c (wc): Optimize for the case when only bytes are being counted
7246         and the input is not a regular file.  From Jeff Moore <jbm@mordor.com>.
7248 Sun Apr 24 10:54:08 1994  Jim Meyering  (meyering@comco.com)
7250         * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
7251         * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
7253 Mon Apr 11 17:55:52 1994  Jim Meyering  (meyering@comco.com)
7255         * csplit.c (struct control): Add new field, repeat_forever.
7256         Remove now-unneeded definition of INT_MAX.
7257         (process_regexp): Test repeat_forever instead of comparing `repeat'
7258         to INT_MAX.
7259         (split_file): Don't even reference `repeat' count if repeat_forever
7260         is set.
7261         (new_control_record): Initialize repeat_forever field.
7262         (parse_repeat_count): Set it instead of setting repeat count to
7263         INT_MAX.
7264         (process_line_count): Abort for internal error instead of calling
7265         handle_line_error.
7267         * long-options.c (parse_long_options): Take a new argument indicating
7268         the utility name (e.g. "join", not "gjoin") for version output.
7269         Print both the utility and the package names, e.g. `join - GNU
7270         textutils-1.9.1' instead of just the package name.
7272         * join.c (main): Call parse_long_options with program name arg.
7273         * sort.c (main): Ditto.
7275         * All source except sort.c and join.c (main): Change --version output
7276         to include utility name as well as package name and version info.
7278 Wed Mar 30 08:53:21 1994  Jim Meyering  (meyering@comco.com)
7280         * configure.in: Use AC_SET_MAKE.
7281         * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
7283 Mon Mar 28 09:55:05 1994  Jim Meyering  (meyering@comco.com)
7285         * tr.c (main): In addition to the --help usage pointer, give an
7286         explicit error message for too many arguments.
7288 Fri Mar 25 18:11:19 1994  Jim Meyering  (meyering@comco.com)
7290         * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
7291         of explicit echo commands.
7292         [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
7293         `./install.sh', make it `../install.sh' instead since that
7294         script will be invoked only from subdirectories.
7295         [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
7297         * cat.c (cat): The command `:|cat -s' failed on Irix5 because
7298         ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
7299         it returned EINVAL.  Detect this.
7300         (main) [lint]: Initialize variables to suppress `used before
7301         initialized' warnings.
7303         * csplit.c: Change long option name from --suffix to --suffix-format.
7305         * od.c (skip): Correct a comment.
7306         (main): Don't output anything to stdout if the sole input file
7307         doesn't exist.  Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
7309         * od.c (dump) [lint]: Initialize a variable to suppress `used before
7310         initialized' warning.
7311         (main) [lint]: Ditto.
7312         * paste.c (paste_parallel) [lint]: Ditto.
7314 Fri Jan 28 11:02:21 1994  Jim Meyering  (meyering@comco.com)
7316         * configure.in: Don't set LDFLAGS since linking now uses both
7317         LDFLAGS and CFLAGS.
7319 Wed Jan 18 16:14:00 1994  Jim Meyering  (meyering@comco.com)
7321         * unexpand.c (unexpand): Don't segfault when given a name of a
7322         nonexistent file.
7323         * expand.c (expand): Ditto.
7324         Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
7326 Thu Jan 13 17:27:38 1994  Jim Meyering  (meyering@comco.com)
7328         * src/Makefile.in: Change all link commands to use both $(CFLAGS)
7329         and $(LDFLAGS).
7331         * csplit.c (load_buffer): Rather than incrementing buffer size,
7332         double it each time we fail to find a newline.  Otherwise, csplit
7333         would run out of memory when processing files with very long lines.
7335 Mon Jan 10 01:20:38 1994  Jim Meyering  (meyering@comco.com)
7337         * man/Makefile.in (manprefix): Use binprefix as the default.
7339 Sat Jan 08 22:22:45 1994  Jim Meyering  (meyering@comco.com)
7341         * cat.c: Use full_write and safe_read instead of write and read resp.
7342         * csplit.c: Ditto.
7343         * head.c: Ditto.
7344         * split.c: Ditto.
7345         * tac.c: Ditto.
7347         * sum.c: Use safe_read instead of read.
7348         * tr.c: Ditto.
7349         * wc.c: Ditto.
7351         * tail.c: Replace calls to xwrite with calls to fwrite.
7352         Use fopen/fclose instead of open/close.
7353         (write_header): Use a single call to printf instead of four to xwrite.
7354         Use safe_read instead of read.
7355         * head.c: Ditto.
7357 Tue Dec 28 15:49:32 1993  Jim Meyering  (meyering@comco.com)
7359         * install.sh: New file.
7360         Makefile.in [DISTFILES]: Add it.
7362 Wed Dec 22 18:52:44 1993  Jim Meyering  (meyering@comco.com)
7364         * memcmp.c: Use the latest version from the GNU C library.
7366         * cut.c [ADD_RANGE_PAIR]: New macro.
7367         (set_fields): Collect the list of all selected ranges before
7368         allocating and initializing the boolean lookup table.
7369         (cut_bytes, cut_fields): Complete rewrite.  Avoid copying
7370         into buffer whenever possible.  Properly handle input without
7371         trailing newline.
7372         (getstr): New function.  Copied from getline.c, but with minor changes.
7374         * sort.c (main): Properly handle -Tdir.
7375         Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
7376         Reported by Kristoffer Rose (kris@diku.dk).
7378         * cut.c (main): Give separate errors for `-s without -f'
7379         and `-d without -f'.
7380         (main): Now -d '' means `use the NUL byte as the delimiter'.
7381         Before, it got an error.
7383 Mon Dec 20 23:29:30 1993  Jim Meyering  (meyering@comco.com)
7385         * configure.in [test for 8-bit clean memcmp]: Add a test to detect
7386         losing memcmp from SunOS4.1.x.  From Robert H. de Vries
7387         <robert@and.nl>.
7389 Sat Dec 18 01:12:24 1993  Jim Meyering  (meyering@comco.com)
7391         * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
7392         so it goes in config.status.  This eliminates unnecessary second run
7393         of configure.
7395 Thu Dec 02 23:53:03 1993  Jim Meyering  (meyering@comco.com)
7397         * configure.in (AC_HAVE_FUNCS): Add isascii.
7398         * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
7399         on AIX PS/2 1.3 systems because isascii is a function and it is used
7400         in definitions (with the necessary side effect of assigning to a
7401         global variable) of the is* macros.  Also test HAVE_ISASCII and
7402         redefine ISASCII(c) instead of isascii.
7403         Reported by Minh Tran-Le (tranle@intellicorp.com).
7405 Fri Nov 19 22:41:48 1993  Jim Meyering  (meyering@comco.com)
7407          * configure.in: Don't run the test for 8-bit clean memcmp if we
7408          already know we'll be using our replacement.
7410 Fri Nov 12 00:44:49 1993  Jim Meyering  (meyering@comco.com)
7412         * Version 1.9.1.
7414         * tac.c (usage): Fix typo in long usage.
7415         * sort.c (usage): Likewise.
7416         From Philippe.Schnoebelen@imag.fr.
7418         * cut.c [FATAL_ERROR]: New macro.
7419         (main): Call both error and usage (2) through FATAL_ERROR in
7420         many places.  Before, only `error (2...' was called.
7421         (invalid_list): Removed.  This function is subsumed by FATAL_ERROR.
7423         * cut.c (cut_fields): Properly handle input lacking a terminating
7424         newline.  Before, the command  `printf "a\tb" |cut -f 1' generated
7425         no output.
7427 Tue Nov 09 17:26:25 1993  Jim Meyering  (meyering@comco.com)
7429         od.c (usage): Change --backward-compatible to --traditional in
7430         the long usage message.
7432 Sun Nov 07 00:50:05 1993  Jim Meyering  (meyering@comco.com)
7434         * Version 1.9.
7436 Sat Nov 06 22:51:31 1993  Jim Meyering  (meyering@comco.com)
7438         * cut.c (cut_fields): Revert July 27 change.  Instead, strip off
7439         trailing delimiter unless given a range of fields like `3-' that
7440         extends to end of line.
7441         (set_fields): Moved local `eol_range_start' to file-scope.
7442         Reported by Arne H. Juul (arnej@solan.unit.no).
7444 Tue Nov 02 00:53:41 1993  Jim Meyering  (meyering@comco.com)
7446         * fold.c (fold_file): Don't get stuck in an endless loop when
7447         width is smaller than 8 and there are TABs in the input.
7449 Sat Oct 30 15:31:28 1993  Jim Meyering  (meyering@comco.com)
7451         * join.c: Remove now-unused dcls of show_help and show_version.
7453 Fri Oct 29 13:58:50 1993  Jim Meyering  (meyering@comco.com)
7455         * csplit.c [INT_MAX]: Make sure it's defined.
7456         [not HAVE_LIMITS_H]: Don't include limits.h.
7457         From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
7459 Wed Oct 27 01:13:52 1993  Jim Meyering  (meyering@comco.com)
7461         * Version 1.8.1.
7463 Mon Oct 25 20:16:33 1993  Jim Meyering  (meyering@comco.com)
7465         * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
7466         From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
7468         * sort.c (main): Handle --help and --version options.
7469         * Makefile.in (sort.o): Depend on long-options.h.
7471 Sun Oct 24 00:31:02 1993  Jim Meyering  (meyering@comco.com)
7473         * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
7474         split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
7475         `--longopt=arg' syntax in --help message rather than `--longopt arg'.
7476         From Francois Pinard.
7478         * tail.c: Don't include <signal.h>.  It hasn't been necessary
7479         since the Dec 12, 1992 change.
7481         * join.c (main): Accept `-v 1' again.  Adding the --version
7482         long option had broken it, although -v1 still worked.  Call
7483         parse_long_options instead of adding "help" and "version"
7484         to join's longopt strct.
7485         * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
7486         and long-options.h.
7487         * (join): Depend on and link with long-options.o.
7488         * (join.o): Depend on long-options.h.
7490         * od.c: Change --compatible (-C) to --backward-compatible (-B).
7492         * csplit.c: Change --abandon-null-files to --elide-empty-files.
7494 Sat Oct 23 01:00:12 1993  Jim Meyering  (meyering@comco.com)
7496         * tr.c (get_next, string2_extend): Add default: label to switch stmt.
7498         * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
7499         join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
7500         tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
7501         Exit successfully for --help, non-zero for usage error.
7502         From Francois Pinard.
7504         * configure.in: Add AC_STAT_MACROS_BROKEN.
7505         * system.h [AC_STAT_MACROS_BROKEN]: Test it.
7507 Fri Oct 22 23:26:17 1993  Jim Meyering  (meyering@comco.com)
7509         * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
7510         <config.h> or "config.h".
7511         * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
7512         join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
7513         tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
7515         * configure.in: Use AC_CONFIG_HEADER.
7516         * Makefile.in [DIST]: Add config.h.in.
7518         * Makefile.in: Convert so make may be run from subdirectories.
7519         Add dependencies on config.h.
7520         * src/Makefile.in: Ditto.
7521         * lib/Makefile.in: Ditto.
7522         * man/Makefile.in: Ditto.
7524 Wed Oct 20 20:05:48 1993  Jim Meyering  (meyering@comco.com)
7526         * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
7527         In the 64-bit assignment, be careful to cast the shift operand to
7528         long.
7529         Abort if sizeof (unsigned long) > 8.
7531 Tue Oct 19 22:37:58 1993  Jim Meyering  (meyering@comco.com)
7533         * csplit.c: Allow repeat counts to be specified via `{*}'.
7534         New option --suffix=format.  Supercedes --digits option.
7535         New option --abandon-null-files.
7536         From Ronald F. Guilmette (rfg@netcom.com).
7538         * csplit.1: Updated.
7539         From Ronald F. Guilmette.
7541         * csplit.c: Remove register keyword (replace with `int' in two cases).
7543         * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
7544         (bytes_to_octal_digits): New static array.
7545         (get_format_flags): Combine '+' and ' ' cases of switch stmt.
7546         Return count if for loop terminates.
7547         (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
7548         (get_format_prec): Make sure is_negative is defined before used.
7549         (get_format_conv_type): Give a different error message if there
7550         is no conversion specifier.
7551         Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
7552         (max_out): Use `%%' rather than `%' in format string.
7554 Sat Oct 16 10:45:17 1993  Jim Meyering  (meyering@comco.com)
7556         * pr.c (main): When argc == 1, don't try to xmalloc (0).
7558 Tue Oct 12 00:53:26 1993  Jim Meyering  (meyering@comco.com)
7560         * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
7561         or "config.h".
7563 Sat Oct 09 23:37:43 1993  Jim Meyering  (meyering@comco.com)
7565         * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
7567 Thu Sep  9 21:52:10 1993  Jim Meyering  (meyering@comco.com)
7569         * src/*.c: Print version on standard output, not stderr.
7571         * configure.in: Add AC_LONG_64_BITS.
7572         * memchr.c: Use #ifdef LONG_64_BITS instead of
7573         `if (sizeof(longword) > 4)'.
7575 Tue Jul 27 22:19:39 1993  Jim Meyering  (meyering@comco.com)
7577         * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
7578         always handle devices.  Ignore errno == EINVAL and errno == ENODEV.
7579         `cat -v /dev/null' was failing on many systems.
7581         * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
7582         `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
7583         From William Dowling <will@franklin.com>.
7585 Thu May 27 01:37:51 1993  Jim Meyering  (meyering@comco.com)
7587         * Version 1.8.
7589         * memchr.c: De-ansify the fixed version from glibc.
7590         It is supposed to work on systems with 64-bit long ints.
7592 Mon May 24 00:32:43 1993  Jim Meyering  (meyering@comco.com)
7594         * Version 1.7.
7596 Sat May 22 02:13:12 1993  Jim Meyering  (meyering@comco.com)
7598         * Version 1.6.
7600 Fri May 21 22:57:53 1993  Jim Meyering  (meyering@comco.com)
7602         * pr.c (cols_ready_to_print): New function.  It replaces a global
7603         variable by the same name and computes on the fly the value that
7604         was supposed to be maintained through that variable.  This should
7605         put to rest the `pr -2a' bug.
7606         (main): Don't let getopt_long reorder arguments so we can
7607         distinguish between `pr -1 -2' and `pr -12'.  Rework handling of
7608         -n and +n options.
7610         * fold.c: Declare xmalloc.
7612 Wed May 19 19:12:18 1993  Karl Berry  (karl@owl.hq.ileaf.com)
7614         * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
7616 Tue May 18 23:49:26 1993  Jim Meyering (meyering@comco.com)
7618         * mkinstalldirs: New file.
7619         * Makefile.in (installdirs): Use it to create installation directories.
7621 Fri May 14 23:45:52 1993  Jim Meyering  (meyering@comco.com)
7623         * all source: With --version, print version and exit immediately.
7625 Thu May 13 01:03:16 1993  Jim Meyering  (meyering@comco.com)
7627         * Makefile.in (installdirs): New rules for creating installation
7628         directories. (install): depend on it.
7630         * tail.c (main): Remove --compatible since `+1f' may be used
7631         to get the BSD `-0f' behavior portably.
7633         * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
7634         From Ian Lance Taylor (ian@cygnus.com).
7636 Mon May 10 22:33:44 1993  Jim Meyering  (meyering@comco.com)
7638         * tail.c (main): New option -C, --compatible to make `tail -0f'
7639         work like `tail +1f' for compatibility with BSD tail.
7641 Thu May  6 23:28:56 1993  Jim Meyering  (meyering@comco.com)
7643         * pr.c (print_page): Decrement cols_ready_to_print even when
7644         lines_to_print == 0.  The command `echo |pr -2ta' *still* didn't
7645         terminate.  Add parentheses for clarity.
7647 Mon May  3 23:57:47 1993  Jim Meyering  (meyering@comco.com)
7649         * Version 1.5.
7651         * od.c (main): Remove set-but-not-used variable, `usage_error'.
7653         * split.c (main): Call usage with an argument.
7655 Sun May  2 16:05:04 1993  Jim Meyering  (meyering@comco.com)
7657         * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
7658         for 8-bit clean memcmp.
7660         * cat.c (usage, main): Remove unused argument.
7662         * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
7663         (check_for_offset): Remove unused argument `argnum.'
7665         * configure.in: Add AC_SIZE_T.
7667 Sat May  1 09:03:19 1993  Jim Meyering  (meyering@comco.com)
7669         * uniq.c (main): Interpret non-option arguments with a leading `+'
7670         only if we haven't seen `--'.
7672         * tr.c (main): Change variable name to avoid shadowed dcl.
7673         * wc.c (write_counts): Ditto.
7675         * sum.1: Make documentation agree with the code.
7677         * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
7679 Fri Apr 30 20:16:03 1993  Jim Meyering  (meyering@comco.com)
7681         * configure.in [AC_HAVE_HEADERS]: Add limits.h.
7683         * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
7685         * od.c (parse_old_offset): Don't use prototype in function
7686         definition.  Remove unnecessary conjunct from test for hexadecimal
7687         prefix.
7689         * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
7690         for long double support;  there are compilers (Stardent Vistra svr4)
7691         without long double but still define __STDC__.
7693 Thu Apr 29 02:01:27 1993  Jim Meyering  (meyering@comco.com)
7695         * src/*.c and man/*.c except for sort: Add --help and --version
7696         options.
7698         * pr.c: Convert to use getopt_long.
7700         * lib/memcmp.c: Use version from glibc.
7701         [WORDS_BIGENDIAN]: Test this instead of the using glibc's
7702         __BYTE_ORDER macro.
7703         * configure.in: Use AC_WORDS_BIGENDIAN to set it.
7705         * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
7706         indicate hex.
7708         * Makefile.in (dist): Depend on Makefile so that changes to
7709         Makefile.in (like adding new files to DISTRIB) are reflected
7710         in the new distribution.
7712 Fri Apr 23 21:53:47 1993  Jim Meyering  (meyering@comco.com)
7714         * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
7715         other options so users can use them to override DEFS.
7716         * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
7718         * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
7719         configure's AC_SUBST will set these.
7721         * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
7722         [targets that cd then run make in subdirectories]: Don't depend
7723         on `cd ..';  use a subshell instead.
7725         * Makefile.in [info, install-info, dvi, check, installcheck]:
7726         New targets but no rules; comply with standards.
7728         * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
7729         hasn't specified CFLAGS.
7730         [LDFLAGS]: Substitute into Makefile.
7732 Tue Mar 30 21:36:11 1993  Jim Meyering  (meyering@comco.com)
7734         * od.c: New option --compatible, -C.
7735         (parse_old_offset): New function.
7736         * od.1: Document new option.
7738 Mon Mar 29 21:27:56 1993  Jim Meyering  (meyering@comco.com)
7740         * cut.c, expand.c, join.c, nl.c: Always call error with errno
7741         (not zero) after failed fclose or non-zero ferror.
7743 Sun Mar 28 16:59:31 1993  Mike Haertel  (mike@cs.uoregon.edu)
7745         * configure.in: Add check for working memcmp; use GNU's if
7746         the system's doesn't grok the 8th bit.
7747         * memcmp.c: Fix it so it groks the 8th bit.
7748         TODO: We really need to provide a fast memcmp, since most
7749         machines will have a broken memcmp.  Probably should get
7750         the one from glibc.
7751         * sort.c (mergefps): Maintain keybeg and keylim when copying
7752         the current line to `saved'.
7753         (numcompare): Skip white space here since -n no longer implies -b.
7754         (getmonth): Skip white space here since -M no longer implies -b.
7755         (compare): Completely overhauled to make the 8th bit work right,
7756         also to properly handle the global reverse option.
7757         (set_ordering): -n no longer implies -b, according to Posix.
7758         For consistency, -M also no longer implies -b.
7759         (main): Correct treatment of -r and global keys.
7760         (findlines): Clear keybeg and keylim if no keys are used.
7761         (sort): Avoid overwriting tempfiles[] array bounds.
7763 Sun Mar 21 22:29:29 1993  Jim Meyering  (meyering@comco.com)
7765         * pr.c (close_file): Reverse May 13, '92 change, but add the condition
7766         that cols_ready_to_print not be decremented when printing across.
7767         The command `echo |pr -2ta' didn't terminate.
7768         (print_page): Rewrite conditional (that had side effects in second
7769         conjunct) using nested if statements to make it clear that we do
7770         indeed want those semantics.
7772 Tue Jan 19 13:35:24 1993  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
7774         * Version 1.4.
7776         * system.h: Try BBSIZE if BSIZE isn't defined.
7777         From Tony Robinson <ajr@eng.cam.ac.uk>.
7779 Sat Dec 12 12:37:00 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
7781         * tail.c (tail_forever): Use an array of file descriptors
7782         instead of forking processes.
7783         (dump_remainder): Return number of bytes read.
7784         (tail_file): Fill in the new array.
7785         From Ian Lance Taylor.
7787 Fri Dec 11 17:18:16 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
7789         * system.h: Only define index, bcmp, etc. if not already defined.
7791 Tue Dec  8 10:31:14 1992  Jim Meyering  (meyering@idefix.comco.com)
7793         * tr.c (is_char_class_member): Remove unreached return after abort.
7795 Sun Dec  6 22:34:52 1992  Jim Meyering  (meyering@idefix.comco.com)
7797         * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
7798         sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c:  Remove inclusion
7799         of <ctype.h> and definitions of is* ctype macros to system.h.
7800         Change a few more uses of is* ctype macros to (protected) upper
7801         case versions.
7803         * system.h: Add isascii-protected ctype IS* macros.
7805 Wed Dec  2 12:28:10 1992  Jim Meyering  (meyering@idefix.comco.com)
7807         * all files using getopt.h: Convert static declarations of
7808         struct option to use new macros from getopt.h: no_argument,
7809         required_argument, and optional_argument.
7811 Tue Dec 01 10:57:24 1992  Jim Meyering  (meyering@idefix.comco.com)
7813         * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
7815         * tr.c (main): Close stdin and stdout and check return status.
7817 Tue Nov 24 09:26:08 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7819         * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
7820         instead of USG.
7822 Tue Nov 24 08:42:30 1992  Jim Meyering  (meyering@idefix.comco.com)
7824         * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
7825         use isascii if it is defined.
7826         (is_char_class_member, make_printable_char, make_printable_str,
7827         non_neg_strtol): Use new macros instead of lower case ones
7828         from <ctype.h>.
7830         * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
7831         macros like pr.c.  Suggested by David J. MacKenzie.
7833         * od.c (print_ascii, dump_strings): Check for isascii before isprint.
7834         (dump_strings): Free malloc'd buffer before returning.
7835         (skip): Return non-zero if an error occurred, zero otherwise.
7836         Exit only if asked to skip beyond end of combined input.
7837         (check_and_close): New function.
7838         (skip, read_block, read_char): Call check_and_close when done
7839         processing the file associated with in_stream.
7840         (skip, read_block, read_char): Set have_read_stdin.
7841         (main): Close stdin (if it was ever read) and check for errors
7842         just before exiting.
7843         (write_block, dump_strings, dump): Don't test return value from
7844         functions that operate on streams.  Rely on later ferror tests.
7846 Sat Nov 21 12:41:49 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7848         * sort.c (main, usage): Add -T option.
7850 Thu Nov 19 14:33:40 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7852         * tail.c (tail_forever, sigusr1, kill_kids): New functions to
7853         do -f on multiple files.
7854         (main): Call tail_forever.
7855         From Ian Lance Taylor.
7857 Tue Nov 10 14:29:11 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7859         * cut.c (cut_fields): Add cast.
7861         * od.c (decode_one_format): Remove '#' from pre_fmt_string;
7862         many systems don't support it.
7863         Conditionalize long double support on __STDC__, not __GNUC__.
7864         From Ian Lance Taylor.
7866 Mon Nov  9 00:24:41 1992  Jim Meyering  (meyering@idefix.comco.com)
7868         * sort.c (numcompare, keycompare): Add parentheses suggested
7869         by gcc -Wall.  Put braces around individual monthtab initializers.
7871         * cksum.c: Declare error.  Make checksum table `const.'
7873         * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
7875         * split.c (main): Add `default: abort();' to enumeration switch.
7877         * All files: Make all functions and extern variables static.
7878         Make all longopts arrays const as well as static.
7879         Make a couple statically initialized aggregates `const.'
7881 Sun Nov  8 19:46:59 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7883         * od.c (main): Make old-style format options accumulate.
7884         From Jim Meyering.
7886 Sat Nov  7 00:26:14 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7888         * tr.c (look_up_char_class): Add cast.
7890         * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
7891         Add `const' to variable receiving value from re_compile_pattern.
7893         * wc.c (wc): If doing only -c, use st_size for regular files.
7895         * fold.c (fold_file): Was folding 1 column too early.
7896         From Eric Backus <ericb@lsid.hp.com>.
7898         * memset.c: New file.
7900 Fri Nov  6 20:14:51 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7902         * cksum.c: New file.
7904 Tue Oct 13 16:24:06 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7906         * tac.c (tac_stdin): Handle SIGPIPE.
7907         * sort.c (main): Handle SIGTERM.
7909         * od.c: New file.
7911         * system.h [USG || STDC_HEADERS]: Define bcmp.
7913 Sat Oct  3 20:41:24 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
7915         * sort.c (main): Handle SIGPIPE.  From trq@dionysos.thphys.ox.ac.uk.
7917 Tue Sep 29 01:10:05 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
7919         * paste.c (main): Don't write on a string constant.
7921 Mon Aug 24 00:02:45 1992  Jim Meyering  (meyering@churchy.gnu.ai.mit.edu)
7923         * tr.c: Minor cleanup.  Replaced some assert(0) with abort().
7925 Tue Jul  7 02:14:19 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
7927         * cmp.c, cmp.1: Move to diff distribution.
7929 Fri Jul  3 16:37:59 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
7931         * system.h: Change FOO_MISSING to HAVE_FOO.
7933 Wed May 13 20:05:41 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
7935         * pr.c (COLUMN): Add structure member to remember filename.
7936         (main, init_fps, open_file, close_file): Use it.
7938         (close_file): Don't decrement cols_ready_to_print when closing
7939         a file.  From cdl@mpl.UCSD.EDU (Carl Lowenstein).
7941 Mon May 11 19:17:33 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
7943         * cmp.c: --show-chars -> --print-chars.
7945         * pr.c: Rename some variables.
7947 Sat May  9 18:39:47 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
7949         * system.h: Define DEV_BSIZE if not defined.
7951 Wed Apr 22 02:15:09 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
7953         * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
7955 Fri Apr 17 10:42:23 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
7957         * sort.c (main): Don't stop processing args when we hit "-";
7958         treat it like a regular filename.
7959         From ian@airs.com (Ian Lance Taylor).
7961         * pr.c (print_page): Fix off by one line count when ^L is in input.
7962         From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
7964 Mon Apr  6 20:52:29 1992  Jim Meyering  (meyering@churchy.gnu.ai.mit.edu)
7966         * tr.c (validate): Change error message so it doesn't mention
7967         actual name of --truncate-set1 option.  From David MacKenzie.
7969 Sun Apr  5 14:22:42 1992  Jim Meyering  (meyering@hal.gnu.ai.mit.edu)
7971         * tr.c (string2_extend, validate): Give an error message when
7972         translating without --truncate-set1, with empty string2, and
7973         with non-empty string1.  "tr 1 ''" produced a failed assertion.
7975 Mon Mar 30 02:20:56 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
7977         * system.h: Change how ST_BLKSIZE is calculated to allow for
7978         non-POSIX systems that don't define BSIZE in sys/param.h.
7980 Sat Mar 28 11:18:01 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
7982         * sum.c (main, bsd_sum_file): Don't print filename if BSD
7983         algorithm is used and only one file was given.
7985 Wed Mar 25 11:34:41 1992  Jim Meyering  (meyering@wombat.gnu.ai.mit.edu)
7987         * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
7988         with starting character equal to ending character.  This is
7989         contrary to the POSIX spec, but what is already implemented
7990         in find_closing_delim.
7992 Mon Mar 16 00:15:11 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
7994         * Version 1.3.
7996         * sort.c (numcompare, checkfp): Add parens to placate gcc2.
7998         * sort.c (mergefps): For -u, output the first, not last, of
7999         the lines that compare equal.  From Mike Haertel.
8001 Tue Mar 10 10:51:38 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
8003         * tr.c: Remove initial capitals and periods from error messages.
8005 Sun Mar  8 22:03:45 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
8007         * sum.c (main): Add -r option for SYSV compat.
8009 Thu Feb 27 22:26:25 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
8011         * sort.c (compare): If -s given, leave lines in their original order.
8012         (main): Recognize -s.
8013         (usage): Document -s.
8014         From Mike Haertel.
8016 Tue Feb 18 20:29:45 1992  Randall Smith  (randy at geech.gnu.ai.mit.edu)
8018         * sort.c (sort): Check for complete parsing of buffer into
8019         lines before nixing temp files.
8021 Mon Feb 17 10:35:58 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8023         * sum.c (sysv_sum_file): Use %lu instead of %u to print a
8024         long.  Not that it matters for GNU . . .
8026         * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
8027         (append_normal_char, append_range, append_char_class,
8028         append_repeated_char, append_equiv_class, spec_init):
8029         Initialize `next' field of new `struct List_element'.
8030         From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
8032 Sat Feb  8 17:16:49 1992  David J. MacKenzie  (djm at apple-gunkies.gnu.ai.mit.edu)
8034         * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
8036 Sun Feb  2 21:22:01 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8038         * Version 1.2.
8040         * nl.c: Support multiple files and "-" for stdin.
8041         (main): Check for read and write errors.
8042         (nl_file): New function.
8044 Wed Jan 29 10:09:10 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8046         * tr.c (main): -t option was called -b in getopt spec.
8047         (validate): Don't warn that set1 is longer than set2.
8049         * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
8051 Fri Jan 17 16:29:05 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8053         * nl.c: New program from bin-src.
8055         * nl.c (main): Use a struct linebuffer for line_buf.
8056         (process_file): Use readline instead of fgets, to preserve NULs.
8057         (check_section): Use memcmp instead of strncmp.
8058         (proc_text): Print line_buf with fwrite instead of printf.
8060         * nl.c (main): Usage message if too many args given.  Check
8061         for error in closing input file.  Lengths of section delimiter
8062         strings were 1 too large.  Take separator_str into account in
8063         length of print_no_line_fmt.
8064         (build_print_fmt): Allocate space for print_fmt, in case
8065         separator_str is long.
8066         (proc_text): A blank line is one that contains nothing, not
8067         even nonprinting characters.
8069 Fri Jan 17 01:04:22 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8071         * All programs: Document `--' instead of `+' to introduce
8072         long-named options, in usage messages.
8074         * sum.c (bsd_sum_file): Renamed from sum_file.
8075         (sysv_sum_file): New function.
8076         (main): Recognize an option to select between the algorithms.
8078 Sun Jan  5 17:41:18 1992  Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
8080         * pr.c (close_file, print_page): Fixed bug that had the command
8081         yes |head |pr -t printing "yyyyyyyyyy".
8082         * (print_page): Fixed bug that had pr -3 -a printing two too few
8083         trailer lines per page.
8084         * (main): Added restriction that -a and -m are incompatible.
8085         Although the POSIX spec doesn't explicitly say they shouldn't
8086         be used together, it says -a modifies the -column option and
8087         that -column shouldn't be used with -m.
8089 Thu Jan  2 15:23:59 1992  David J. MacKenzie  (djm at albert.gnu.ai.mit.edu)
8091         * nl.c: Include regex.h after, not before, sys/types.h.
8093 Thu Jan  2 12:18:10 1992  Tom Lord  (lord at geech.gnu.ai.mit.edu)
8095         * sort.c (fillbuf) return bytes buffered instead of bytes read.
8097 Fri Dec 27 22:53:36 1991  Jim Kingdon  (kingdon at geech.gnu.ai.mit.edu)
8099         * sort.c (LINEALLOC): New #define.
8100         (struct lines): New field ``limit''.
8101         (initlines): Set it from new arg ``limit''.
8102         (sort, mergefps, checkfp): Pass new arg to initlines().
8103         (findlines): Don't realloc past lines->limit.
8105 Tue Dec 24 01:24:03 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8107         * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
8108         HAVE_UNISTD_H and _POSIX_VERSION.
8110         * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
8112 Sat 14 Dec 1991 11:46:42  Jim Meyering  (meyering at wombat)
8114         * tr.c: Fixed an inaccurate comment on posix_pedantic.
8116 Thu 12 Dec 1991 21:15:20  Jim Meyering  (meyering at hal)
8118         * tr.c: Changed underscores to hyphens in long option name
8119         "sysv_string2_truncate".
8121 Wed Dec 11 13:33:34 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8123         * tac.c (main): Set obscure_syntax to tell re_search to
8124         allocate memory for the group registers.
8126 Fri Dec  6 18:26:27 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8128         * tac.c, sort.c, csplit.c [POSIX]:  Use sigaction instead of
8129         signal, which POSIX doesn't have.
8130         * sort.c: Replace inthandler and huphandler with sighandler.
8131         * csplit.c (main): Only handle signals if they were not being
8132         ignored.
8134         * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
8136 Wed Dec  4 00:47:47 1991  Jim Meyering  (meyering at wombat)
8138         * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
8139         * tr.c (squeeze_filter): Comment a little on why it's better
8140         to step through the input by two.
8141         * tr.c (set_initialize): Write a comment describing the function.
8142         * tr.c: Eliminated the variable `portability_warnings' and replaced
8143         references to it by references to `!posix_pedantic'.  One of the
8144         uses of portability_warnings had been wrong.
8146 Tue Dec  3 14:03:35 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8148         * tr.c: New program.
8150 Sun Dec  1 15:07:35 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8152         * linebuffer.[ch] (freebuffer): New function (used by cron).
8154 Thu Oct 17 22:30:22 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8156         * system.h, configure, Makefile.in: Don't include memory.h if
8157         STDC_HEADERS, removing need for MEMORY_H_MISSING.
8159 Thu 17 Oct 1991 16:53:07  Jim Meyering  (meyering at wombat)
8161         * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
8162         Somehow, part of my patch didn't make it last time.
8164 Sat Oct 12 12:04:47 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)
8166         * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
8168         * cmp.c (cmp): Print EOF message to stderr, not stdout, for
8169         POSIX 1003.2.11.2.
8171         * sort.c (xfwrite): fwrite never returns < 0, so check if
8172         number written is number we asked to write.
8173         (fillbuf, main): fread never returns < 0, so check ferror instead.
8174         From Rainer Orth.
8176 Tue Oct  8 18:07:08 1991  Jim Meyering  (meyering at churchy)
8178         * pr.c (print_page): Really fixed `extra newline at EOF' problem.
8179         * (store_columns): Fixed bug that caused `pr -b -2' to coredump
8180         on files of certain lengths.
8182 Fri Oct  4 22:30:25 1991  Jim Meyering  (meyering at churchy)
8184         * pr.c (print_page): Fixed to not add single spurious newline
8185         at EOF when using -t.
8187 Wed Oct  2 01:02:05 1991  David J. MacKenzie  (djm at apple-gunkies)
8189         * pr.c (print_page): Don't pad the page if -t given.
8191         * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
8193 Thu Sep 26 12:35:00 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)
8195         * Version 1.1.
8197         * configure, system.h: Include memory.h if it works.
8199         * split.c: Allow `b' unit as well as `k' and `m'.
8201         * head.c, tail.c: Replace -b +blocks option with specifying
8202         units (b, k, or m) after the number.
8203         (parse_unit): New function.
8205         * fold.c (main): Check that -w arg is a number.
8207         * cut.c: +delimiter takes an arg.
8209 Mon Sep 16 14:52:38 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)
8211         * pr.c (close_file): Don't close an already closed file.
8213 Thu Sep 12 00:14:43 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8215         * memchr.c: New file.
8216         * configure: Check if it's needed.
8218         * csplit.c, gcsplit.1: New program.
8220         * pr.c (cleanup): Only free buffers if they were allocated.
8222         * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
8224 Wed Sep 11 20:54:16 1991  Jim Meyering  (meyering at churchy)
8226         * pr.c: The following 3 bugs appeared (at least) when printing
8227         a  single file with the options `-3 -f'.
8228         * (print_white_space): Single spaces were being replaced
8229         with tabs.
8230         * (print_page): Some lines were getting too much white space
8231         at the beginning because spaces_not_printed wasn't being reset
8232         to 0.
8233         * (read_line): The single space between a truncated column
8234         on its left and the column on its right was omitted.  Fixed
8235         so that previous value of input_position is restored before
8236         returning FALSE.
8238 Sat Sep  7 03:22:18 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8240         * configure: Only remove /etc from PATH when it's not part of
8241         a larger name.
8243 Wed Sep  4 17:09:24 1991  David J. MacKenzie  (djm at apple-gunkies)
8245         * linebuffer.c (readline): Fix incorrect recalculation of `end'.
8247         * head.c, tail.c: Replace `mode' variables and bitmasks with
8248         separate variables for each option.
8250 Mon Sep  2 04:00:37 1991  David J. MacKenzie  (djm at apple-gunkies)
8252         * wc.c: New program.
8254 Sun Sep  1 01:18:38 1991  David J. MacKenzie  (djm at apple-gunkies)
8256         * fold.c (fold_file): Read in an int, not a char, for EOF
8257         comparison.
8259         * configure: Check whether st_blksize is missing.
8261         * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
8262         defined, instead of /tmp.
8264 Thu Aug 29 14:48:15 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8266         * xwrite.c [POSIX]: unistd.h might require sys/types.h.
8268 Wed Aug 28 11:57:39 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8270         * paste.c (main): Consider -d "" to be like -d "\0",
8271         for POSIX (if I read it right).
8273         * sort.c, join.c: New programs.
8275         * cut.c (set_field): Allow blanks as well as commas to
8276         separate numbers in ranges.
8278 Sun Aug 25 19:57:40 1991  Jim Meyering  (meyering at apple-gunkies)
8280         * pr.c: Failure to open an input file is no longer a fatal error.
8281         A message is printed for each failed open.  When printing
8282         in parallel, each failed open results in one fewer output column.
8283         Added POSIX -r option to suppress the message.
8284         * pr.c: Added variables: failed_opens, ignore_failed_opens.
8285         These changes were based in part on work by David MacKenzie.
8287 Sat Aug 24 15:27:39 1991  Jim Meyering  (meyering at pogo)
8289         * pr.c: Complain if user gives both -m and -[0-9]+ options.
8291 Wed Aug 21 22:04:57 1991  David J. MacKenzie  (djm at apple-gunkies)
8293         * Version 1.0.
8295 Mon Aug 19 00:16:51 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8297         * expand.c: Rename some variables.
8298         (expand): Don't access value off end of array.
8299         * unexpand.c: Rename some variables.
8300         (unexpand): Don't access value off end of array.
8301         Instead of copying tabs verbatim and flushing pending spaces
8302         when one is reached, count them as the proper number of
8303         pending spaces.  Instead of changing tabs to single spaces if
8304         the tabstop list is exhausted, print the rest of the line
8305         unchanged (for POSIX).
8307 Sat Aug 17 01:49:41 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8309         * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
8310         Clear EOF and error conditions on stdin so it can be reused.
8312         * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
8313         as commas to separate tabstops, for POSIX.
8314         * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
8315         the output; send it directly to stdout.
8316         * unexpand.c (main): Make -t stupidly imply -a for POSIX.
8317         (unexpand): If a tab stop list was given and we move past its end,
8318         copy the rest of the line verbatim.
8320         * split.c (convint): New function to allow 'm' and 'k' after
8321         byte counts.
8322         (main): Use it.  Change -c option to -b for POSIX.
8324 Fri Aug  9 02:47:02 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8326         * pr.c: Protect isdigit with isascii, if required.
8328 Tue Aug  6 21:42:25 1991  David J. MacKenzie  (djm at wheat-chex)
8330         Most of the following is from Paul Eggert:
8331         * cat.c (main): If stdin is read, check close at end.
8332         * cmp.c (main): Check for stdin being closed.
8333         Check for close errors on stdin and stdout.
8334         (cmp): Return a value instead of exiting.
8335         * cut.c (cut_file): New function, from code in main.
8336         Check for read errors.
8337         (main): Check for close errors.
8338         * expand.c, unexpand.c (main): Check for close errors.
8339         (next_file): Go to next file if one can't be opened.
8340         Check for close errors.
8341         * head.c (main), tail.c (main): If stdin was read, check for
8342         close errors.
8343         * head.c (head_file), tail.c (tail_file): Check for close errors.
8344         * paste.c (main, paste_parallel, paste_serial), tac.c (main):
8345         Check for close errors.  Close stdin if it was read.
8346         * split.c (main): Check for close errors.
8348         * configure, Makefile.in's: Support +srcdir option.
8349         Make config.status.  Fix up clean targets.
8351 Wed Jul 31 01:32:59 1991  David J. MacKenzie  (djm at hal)
8353         * linebuffer.h (struct linebuffer): Add a field to indicate
8354         the number of valid chars in the line.
8355         * linebuffer.c (initbuffer, readline): Fill it in.
8356         * uniq.c, comm.c: Use it.
8358         * pr.c (main): Check stdin and stdout fclose for errors.
8359         (init_parameters): If there's no room for header and footer,
8360         omit them rather than dying (for POSIX).
8361         (init_header): Take a file descriptor as additional arg.
8362         (init_fps): Change callers.  Note when stdin is read.
8363         (open_file): For filename "-" use stdin.
8364         (close_file): Don't close stdin.  Check close for errors.
8365         (print_char, char_to_clump): Use isprint instead of explicit
8366         comparisons.
8368         * memcmp.c: New file (needed for comm).
8369         * bcopy.c: New file (needed for fold).
8370         * system.h: Don't define bcopy as memcpy.
8371         * configure: Check for bcopy and memcmp.
8373         * uniq.c (main): Use "-" instead of NULL to mean stdin or
8374         stdout.
8375         (check_file): Use "-" instead of NULL to mean stdin or stdout.
8376         Check readline return instead of for NUL character to
8377         detect eof.
8378         Check fclose for errors.
8379         (find_field): Use linebuffer length, not NULs, to detect end
8380         of line.
8381         (different): New function, replaces compare.  Uses memcmp
8382         instead of strncmp.
8383         (writeline): Use fwrite instead of fputs so NULs are preserved.
8385         * comm.c (compare_files): Return an error indication.
8386         Don't take a filename of NULL to mean stdin.
8387         Use memcmp instead of strcmp to allow for NULs.
8388         Check fclose for errors.
8389         (writeline): Use fwrite instead of fputs so NULs are preserved.
8391         * sum.c (sum_file): Take an arg indicating whether to print
8392         the filename, and don't take NULL meaning stdin.  Set a flag
8393         when we read stdin.  Check fclose return for errors.
8394         (main): If stdin was read, check fclose return for errors.
8395         Use filename of "-" if no args given.
8397 Thu Jul 25 15:17:10 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8399         * fold.c: Rewritten from scratch for POSIX.
8401 Wed Jul 24 01:55:41 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8403         * split.c (line_bytes_split): Use xmalloc instead of alloca.
8404         * system.h: Don't declare alloca.
8406         * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
8407         * system.h: Define SEEK_ macros if not defined.
8409         * pr.c: Rename variable `truncate' to avoid library function conflict.
8411 Tue Jul 23 13:21:48 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8413         * linebuffer.c, linebuffer.h: New files.
8414         * comm.c, uniq.c (initbuffer, readline): Functions
8415         removed (use versions in linebuffer.c).
8417 Mon Jul 22 13:23:53 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
8419         * sum.c (sumfile): Always print 5 digits for second number, too.
8420         Interpret "-" to mean stdin.
8422 Sat Jul 20 14:24:40 1991  David J. MacKenzie  (djm at bleen)
8424         * uniq.c: Use isblank instead of isspace, to support POSIX.2.
8425         * comm.c, pr.c, uniq.c (concat, fatal, error,
8426         pfatal_with_name, xmalloc, xrealloc): Functions removed.
8428 Sat Jul 13 02:04:53 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
8430         * nl.c: Add long-named options.  Doc fixes.
8432 Sat Jul  6 02:19:09 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
8434         * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
8436         * xwrite.c [POSIX]: Include unistd.h.
8437         [STDC_HEADERS]: Don't declare errno.
8439 Sun Jun 30 23:35:16 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
8441         * uniq.c: Add long-named options.  Remove marginally useful -z
8442         option (zero padded repeat counts).
8444 Thu Jun 27 16:31:45 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
8446         * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
8447         (cwrite), head.c (head_file), cat.c (main): Check close return
8448         value for delayed error report due to NFS.
8450 Tue Jun 11 00:12:15 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
8452         * cat.c: Replace "uchar" with "unsigned char", to avoid
8453         problems with various systems' typedefs.
8455 Thu Jun  6 12:54:26 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
8457         * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
8458         operation is unsupported, for HP-UX 7.0.
8460 Sun Apr 14 21:49:17 1991  Richard Stallman  (rms at mole.gnu.ai.mit.edu)
8462         * sum.c: Always print five digits for first number.
8464 Fri Mar 15 16:16:54 1991  David J. MacKenzie  (djm at geech.ai.mit.edu)
8466         * cat.c, cmp.c: Don't use fileno(); not needed.
8468 Thu Jan 10 02:16:55 1991  David J. MacKenzie  (djm at albert.ai.mit.edu)
8470         * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
8472 Thu Dec 27 00:06:45 1990  David J. MacKenzie  (djm at egypt)
8474         * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
8475         outbufp global.
8476         (enlarge_line): Adjust inbufp and outbufp.
8478 Sun Sep  9 16:54:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8480         * cat.c: Declare free returning void, not int, so it
8481         doesn't bomb on Xenix.
8483 Mon Sep  3 22:23:57 1990  David J. MacKenzie  (djm at coke)
8485         * tac.c: Print error messages before calling cleanup, not after.
8487 Tue Aug 28 18:05:24 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8489         * tac.c (cleanup): Return SIGTYPE, not int.
8491 Tue Aug  7 12:51:18 1990  David J. MacKenzie  (djm at apple-gunkies)
8493         * cut.c (main, usage): Add -b and -n options for POSIX.
8494         (set_fields): Don't allow SPC or TAB as number separators.
8496         * paste.c (paste_parallel): If open of any file fails, quit
8497         (for POSIX).
8499 Mon Aug  6 22:14:13 1990  David J. MacKenzie  (djm at apple-gunkies)
8501         * pr.c: Add POSIX -F option (same as -f).
8503         * uniq.c (check_file): Allow '-' to mean stdin or stdout.
8505 Mon Aug  6 14:43:30 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
8507         * head.c, tail.c: Change `chars' to `bytes' globally.
8508         (main, usage): Use POSIX.2 draft 10 option syntax.
8510 Sun Aug  5 11:51:12 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
8512         * cat.c (main): Don't delay error messages, so they appear
8513         where expected.
8514         (main, simple_cat, cat): Make errors in input files nonfatal.
8516 Sat Aug  4 10:11:30 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
8518         * cat.c: Remove -c option added for POSIX draft 9, since POSIX
8519         draft 10 removed it.
8521         * tac.c (tac_stdin): Use fstat instead of lseek to determine
8522         whether stdin is seekable, because lseek silently fails on
8523         some special files, like tty's.
8524         tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
8525         don't turn off -f for non-regular files (assume the user knows
8526         what he's doing; it might work for fifo's and sockets).
8528         * paste.c (main): If no files given, use stdin.
8529         Don't let collapse_escapes write on string constant (delim default).
8530         (paste_parallel): Don't close stdin.
8532         * cut.c (main): Use standard input for filename of "-".
8534         * comm.c (compare_files): Allow '-' to mean stdin.
8536 Fri Aug  3 13:38:28 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
8538         * cut.c (enlarge_line): Take an arg giving the required amount
8539         of space.  Change callers.
8540         (main): Don't allow -t'<TAB>' without -f.
8541         Make `delim' unsigned to fix sign extension problem in comparison.
8543 Tue Jul 17 12:36:11 EDT 1990  Jay Fenlason (hack@ai.mit.edu)
8545         * pr.c  Deleted excess whitespace from ends of lines.
8546                 Modified to work with current version of getopt, which
8547                 returns 1 instead of 0 for non-options.
8548                 Reversed the meaning of the -f option, to be compatable
8549                 with real pr.
8551 Sun Jul  8 00:39:31 1990  David J. MacKenzie  (djm at apple-gunkies)
8553         * cmp.c (main, usage): Rename -L option to -c and don't have
8554         it imply -l.
8555         (printc): Take an arg to specify number of chars to pad to,
8556         for column alignment.
8557         (cmp): Respect flag_print_chars in default output format.
8558         Align columns for cmp -cl.
8560 Sat Jul  7 17:23:30 1990  David J. MacKenzie  (djm at apple-gunkies)
8562         * cmp.c: For +show-chars, have getopt return 'L' so
8563         `flag_print_chars' gets set.
8565 Fri Jun 29 01:04:19 1990  David J. MacKenzie  (djm at apple-gunkies)
8567         * tac.c (main): Initialize fastmap and translate fields of
8568         regex before compiling it.
8570 Fri Jun 22 00:38:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8572         * tac.c: Change +regexp to +regex for consistency with GNU find.
8574 Wed Jun 20 01:46:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8576         * cat.c (cat): If FIONREAD is available, only use it if it is
8577         supported by the filesystem that the file is on.
8579 Sun Jun  3 20:26:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8581         * cat.c (main): Add a variable to control whether the check
8582         for input file == output file is made, because no values of
8583         st_dev and st_ino should be assumed to be available for this
8584         purpose.  Only do the check for regular files.
8586         * tac.c: Use bcopy instead of memcpy.
8588 Thu May 31 00:55:36 1990  David J. MacKenzie  (djm at apple-gunkies)
8590         * head.c: Use longs instead of ints for file offsets, for 16
8591         bit machines.
8593 Tue May 22 00:56:51 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8595         * cmp.c: Change some ints to longs for 16 bit machines.
8596         (bcmp_cnt): Make char-pointer counting slightly simpler.
8598 Sat May 12 01:16:42 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8600         * cat.c (main): Allow input file to be output file for devices
8601         (ttys, etc.).  Check whether input file is output file when
8602         reading standard input.  Print any error messages for standard
8603         input.
8605         * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
8606         machines as well as 32 bit ones.
8607         * cmp.c, tail.c: Use longs instead of ints for file offsets.
8609 Fri May 11 02:11:03 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8611         * cmp.c: Fix some exit statuses for POSIX.
8613 Tue May  8 03:41:42 1990  David J. MacKenzie  (djm at abyss)
8615         * tac.c: Use regular expressions as the record boundaries.
8616         Give better error messages.
8617         Reformat code and make it more readable.
8618         (main): Use getopt_long to parse options.
8619         (tac_stdin): Do not make a temporary file if standard input
8620         is a file.
8621         (tac_file): New function.
8622         (tac): Take an open file desc as an arg.
8623         (output): Rewrite to use its own efficient buffering.
8624         (xmalloc, xrealloc, xwrite): New functions.
8626 Sun Apr  8 20:33:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8628         * head.c, tail.c: Use `error' instead of `fatal_perror' and
8629         `nonfatal_perror'.  Remove some unnecessary info from messages.
8631 Wed Mar 21 09:30:18 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
8633         * comm.c (main): Pass the list of files to compare_files as a
8634         char ** instead of a char *.
8635         (compare_files): Make arg a char **.
8637         * uniq.c: Declare some functions as void.
8638         Change global vars `countmode' and `mode' from ints to enums.
8639         (main): Use getopt to parse options and support POSIX options.
8640         Don't use integer_arg to parse numbers, since `-#' can't be
8641         parsed that way using getopt.
8642         (find_field): Use isspace for finding fields boundaries.
8644 Tue Mar 20 14:28:25 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
8646         * comm.c (main): Call usage if given bad option or wrong
8647         number of args.  Exit with 0 status normally.
8648         (usage): New function.
8649         Declare some other functions as void.
8651 Wed Mar 14 10:48:40 1990  David J. MacKenzie  (djm at rice-chex)
8653         * cmp.c (main, cmp, usage): Replace -q +quick option with -L
8654         +show-chars option to add ASCII representation of bytes to -l format.
8656 Tue Mar 13 00:50:14 1990  David J. MacKenzie  (djm at rice-chex)
8658         * cmp.c (cmp): Change EOF message for POSIX compatibility.
8659         For -l format, clear bits > FF.
8661 Mon Mar  5 17:21:00 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8663         * tail.c: Move global `errors' into main instead of having
8664         nonfatal_perror set it.
8665         (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
8666         Return an error status.
8667         (file_lines, start_chars, start_lines): Reverse the meaning of
8668         the return value.
8669         (tail_lines, tail_chars): Account for that reversal.
8671 Mon Mar  5 00:34:36 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8673         * head.c: Move global `errors' into main and have the various
8674         functions return an error status instead of setting it in
8675         nonfatal_perror.
8677 Sat Mar  3 11:27:27 1990  Torbj|rn Granlund  (tege at echnaton)
8679         * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
8680           options specified), to compare the two blocks and count
8681           newlines simultaneously.
8682         * cmp.c New function: bcmp_cnt.
8684         * cmp.c (main): Test if output is redirected to /dev/null, and
8685           assume `-s' if this is so.
8687 Tue Feb 20 17:09:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8689         * cat.c: Change `argbad' from a char to a short, so it will
8690         work on machines with unsigned chars.
8692 Sat Feb 10 02:16:40 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
8694         * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
8695         Remove unneccessary variable `c1'.  If -l was given, increase
8696         `char_number' by the number of bytes read, after producing output,
8697         rather than by the offset of the first differing bytes, before
8698         producing output.
8699         Replace if-else-if constructions with case statements for clarity.
8700         (bcmp2): Rename `n' to `nread'.
8702 Wed Dec 20 01:32:06 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
8704         * nl.c (proc_text): Use re_search instead of re_match.
8706 Tue Dec 19 01:26:34 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
8708         * nl.c: Indent.  Un-nest statements.  Use GNU regexp functions
8709         instead of System V ones.  Move function declarations together.
8710         (quit): Remove useless function.
8711         (program_name): New variable for error messages.
8712         (main): Use perror in error message.
8713         (xmalloc): New function to replace myalloc.
8714         (myalloc): Function removed.
8715         Global: use program_name and xmalloc.
8717 Sun Dec 17 00:36:36 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
8719         * uniq.c: Declare some functions.
8720         (main): Initialize infile and outfile.  Call usage if given
8721         invalid args.  Normally exit with 0 status instead of garbage.
8722         (usage): New function to print usage message and exit.
8723         (check_file): Remove unused variable.
8724         (readline): Compare against EOF, not < 0.
8725         (xmalloc, xrealloc): Return char *, not int.
8726         Ok to return 0 if 0 bytes requested.
8727         (lb1, lb2): Remove unused global vars.
8728         (concat): Remove unused function.
8730 Sat Dec 16 15:15:50 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
8732         * comm.c: Remove unused global variables lb1, lb2.
8733         (main): Remove unneeded variable.
8734         (compare_files): Remove unused arg.
8735         (readline): un-nest assignment.  Test against EOF instead of < 0.
8736         (error): Print to stderr, not stdout.
8737         (xmalloc, xrealloc): Return char * instead of int.
8738         Returning 0 is ok if 0 bytes requested (ANSI C).
8741 Local Variables:
8742 version-control: never
8743 End: