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