1 2001-04-22 Jim Meyering <meyering@lucent.com>
5 * configure: Regenerate using a patched copy of autoconf-2.49e to
6 work around a bug in its test for a working memcmp function.
8 2001-03-28 Paul Eggert <eggert@twinsun.com>
10 * src/cksum.c: Fix bugs when computing length of large files.
11 Add overflow and write error checks. Use uint_fast32_t, not
12 unsigned long, to do checksum calculation, as C99 says
13 uint_fast32_t should be no slower and might be faster.
15 Include <stdio.h> and "system.h" even if CRCTAB is defined,
16 so that the code will compile if CRCTAB is defined.
17 Include "human.h" if CRCTAB is not defined.
18 (uint_fast32_t): Define if it appears that stdint.h didn't.
19 (BIT, remainder, main, crctab): Use uint_fast32_t, not unsigned long,
21 (fill_r, remainder, main): Use ANSI prototypes.
22 (fill_r, remainder, main): Omit duplicate code.
23 (main): Use uintmax_t, not unsigned long, for file lengths.
24 Use size_t, not long, for result of fread.
25 Check for overflow when computing file lengths.
26 Check for write error immediately after printing a line, so that
27 we don't write to stdout indefinitely after an error.
29 2001-04-14 Paul Eggert <eggert@twinsun.com>
31 * src/sort.c (default_sort_size): Leave a 1/16 margin for RSS.
32 Suggestion from Solar Designer.
34 2001-04-14 Jim Meyering <meyering@lucent.com>
36 * src/wc.c (usage): Tweak --help output: s/line,/newline,/
38 2001-04-13 Jim Meyering <meyering@lucent.com>
40 * src/sort.c (main): Add a comment justifying the use of
41 `multi-character' rather than `multibyte' in a diagnostic.
44 2001-04-12 Paul Eggert <eggert@twinsun.com>
46 * src/sort.c (RLIMIT_AS): Do not define; just use conditional
47 code, since RLIMIT_RSS is similar (and is not standardized).
48 (default_sort_size): Don't allocate more than the RSS limit,
49 if this host has such a limit.
51 2001-03-20 Paul Eggert <eggert@twinsun.com>
53 * NEWS, doc/textutils.texi: sort now accepts long options and
54 checks POSIX option syntax.
56 * doc/textutils.texi: Document --, -, sort long options, and
59 * src/sort.c: Include <getopt.h>.
60 (usage, main): Add support for long options, and check option
61 syntax as POSIX requires, though (as usual for GNU apps)
62 options can follow file names unless POSIXLY_CORRECT is set.
63 Many diagnostic revamped.
64 (long_options): New constant.
65 (badfieldspec): New arg MSGID. Mark as noreturn.
66 (parse_field_count): New arg MSGID; if null, just return null on error.
67 (new_key): Renamed from key_init. All callers changed. Now allocates
70 2001-03-18 Jim Meyering <meyering@lucent.com>
74 * tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL
75 to $DJDIR/bin/bash.exe. Patch from Richard Dawe, based on a
76 suggestion from Eli Zaretskii.
78 2001-03-17 Paul Eggert <eggert@twinsun.com>
80 * src/sort.c, src/tail.c, src/uniq.c (usage):
81 Warn that the +N form will be withdrawn.
82 * doc/textutils.texi: Likewise.
84 2001-03-08 Paul Eggert <eggert@twinsun.com>
86 * NEWS, doc/textutils.texi: Document pr changes.
88 * src/pr.c: Include mbswidth.h.
89 (standard_header, header, test_suite): Remove.
90 (date_format, date_text, file_text, header_width_available): New vars.
91 (long_options, main, init_header, usage):
92 Add new -D or --date-format option.
93 (CHARS_FOR_DATE_AND_PAGE, T_BUF_FMT, T_BUF_SIZE, NO_DATE): Remove.
94 (init_header): Allow arbitrary width for date format. Change
95 "Page %5d" to "Page %d", since the code no longer assumes fixed width.
96 Do not assume that localtime succeeds.
97 (init_header, print_header, usage): Do not truncate headers.
98 (init_header, print_header): Defer width calculations until
99 page is printed, since "Page 100000" is wider than "Page 1".
100 Count columns, not bytes, in page headers.
101 Custom headers take up only the center, not the whole header.
102 (print_header): Use printf rather than fprintf(stdout).
104 * po/Makefile.in.in (install-data-yes): Install LC_TIME locale
105 for all packages, not just for fileutils.
106 (uninstall): Remove LC_TIME locale too.
108 * src/sys2.h (INT_STRLEN_BOUND): New macro.
110 * tests/pr/0F, tests/pr/0FF, tests/pr/2-S_f-t_notab,
111 tests/pr/2-Sf-t_notab, tests/pr/2f-t_notab,
112 tests/pr/2s_f-t_notab, tests/pr/2s_w60f-t_nota,
113 tests/pr/2sf-t_notab, tests/pr/2sw60f-t_notab,
114 tests/pr/2w60f-t_notab, tests/pr/3-0F, tests/pr/3-5l17f-t,
115 tests/pr/3-FF, tests/pr/3a2l17-FF, tests/pr/3a3f-0F,
116 tests/pr/3a3l15-t, tests/pr/3a3l8f-t, tests/pr/3b2l17-FF,
117 tests/pr/3b3f-0F, tests/pr/3b3f-0FF, tests/pr/3b3f-FF,
118 tests/pr/3b3l15-t, tests/pr/3b3l8f-t, tests/pr/3f-0F,
119 tests/pr/3f-FF, tests/pr/3l17f-t, tests/pr/3l24-t,
120 tests/pr/3ml17f-t, tests/pr/3ml24-FF, tests/pr/3ml24-t,
121 tests/pr/3ml24-t-FF, tests/pr/4-7l24-FF, tests/pr/4l24-FF,
122 tests/pr/a2l15-FF, tests/pr/a2l17-FF, tests/pr/a3-0F,
123 tests/pr/a3f-0F, tests/pr/a3f-0FF, tests/pr/a3f-FF,
124 tests/pr/a3l15-t, tests/pr/a3l17f-lm, tests/pr/a3l8f-t,
125 tests/pr/b2l15-FF, tests/pr/b2l17-FF, tests/pr/b3-0F,
126 tests/pr/b3f-0F, tests/pr/b3f-0FF, tests/pr/b3f-FF,
127 tests/pr/b3l15-t, tests/pr/b3l17f-lm, tests/pr/b3l8f-t,
128 tests/pr/FF, tests/pr/Ja3l17f-lm, tests/pr/Jb3l17f-lm,
129 tests/pr/Jml17f-lm-lo, tests/pr/l17f-t, tests/pr/l24-FF,
130 tests/pr/l24-t, tests/pr/ml17f-0F, tests/pr/ml17f-lm-lo,
131 tests/pr/ml17f-t, tests/pr/ml17f-t-0F, tests/pr/ml20-FF-t,
132 tests/pr/ml24-FF, tests/pr/ml24-t, tests/pr/ml24-t-FF,
133 tests/pr/n+2-5l17f-0FF, tests/pr/n+2l17f-0FF,
134 tests/pr/n+2l17f-bl, tests/pr/n+3-7l24-FF,
135 tests/pr/n+3l17f-0FF, tests/pr/n+3l17f-bl,
136 tests/pr/n+3ml13f-bl-FF, tests/pr/n+3ml17f-bl-tn,
137 tests/pr/n+3ml17f-tn-bl, tests/pr/n+4-8a2l17-FF,
138 tests/pr/n+4b2l10f-0FF, tests/pr/n+5-8b3l10f-FF,
139 tests/pr/n+5a3l6f-0FF, tests/pr/n+6a2l17-FF,
140 tests/pr/n+6b3l6f-FF, tests/pr/n+7l24-FF,
141 tests/pr/n+8l20-FF, tests/pr/nJml17f-lmlmlo,
142 tests/pr/nJml17f-lmlolm, tests/pr/nl17f-bl,
143 tests/pr/nN1+3l17f-bl, tests/pr/nN15l17f-bl,
144 tests/pr/nSml13-bl-FF, tests/pr/nSml13-t-t-FF,
145 tests/pr/nSml13-t-tFFFF, tests/pr/nSml17-bl-FF,
146 tests/pr/nSml17-t-t-FF, tests/pr/nSml17-t-tFFFF,
147 tests/pr/o3a3l17f-tn, tests/pr/o3a3Sl17f-tn,
148 tests/pr/o3a3Snl17f-tn, tests/pr/o3b3l17f-tn,
149 tests/pr/o3b3Sl17f-tn, tests/pr/o3b3Snl17f-tn,
150 tests/pr/o3Jml17f-lm-lo, tests/pr/o3ml17f-bl-tn,
151 tests/pr/o3mSl17f-bl-tn, tests/pr/o3mSnl17fbltn,
152 tests/pr/Test.pm, tests/pr/W-72l17f-ll, tests/pr/W20l17f-ll,
153 tests/pr/W26l17f-ll, tests/pr/W27l17f-ll,
154 tests/pr/W28l17f-ll, tests/pr/W35a3l17f-lm,
155 tests/pr/W35b3l17f-lm, tests/pr/W35Ja3l17f-lm,
156 tests/pr/W35Jb3l17f-lm, tests/pr/W35Jml17f-lmlo,
157 tests/pr/W35ml17f-lm-lo, tests/pr/W72Jl17f-ll,
159 Adjust to minor spacing changes in pr headers.
161 2001-03-11 Paul Eggert <eggert@twinsun.com>
163 * src/sort.c (die): New message arg, to describe failures
164 better. All callers changed.
166 2001-03-11 Paul Eggert <eggert@twinsun.com>
168 * src/sort.c: Decrease buffer size when only merging or checking.
169 (sort_size): Now the user-specified sort size.
170 (MIN_MERGE_BUFFER_SIZE): New macro.
171 (MIN_SORT_SIZE): Use it.
172 (merge_buffer_size): New variable.
173 (fillbuf): Increase merge_buffer_size if a longer line is encountered.
174 (checkfp, mergefps): Do not allocate a buffer smaller than
176 (sort): Use the default_sort_size if sort_size is zero.
177 (main): Do not set sort_size to default_sort_size.
179 2001-03-06 Paul Eggert <eggert@twinsun.com>
181 * src/sort.c (sort): If all the input files are empty, create
182 an empty output file.
183 * tests/sort/Test.pm: Test for this.
185 2001-03-13 Jim Meyering <meyering@lucent.com>
187 * src/sort.c (merge): Move declarations of local variables into
188 the inner scope where they're used.
191 2001-03-06 Paul Eggert <eggert@sic.twinsun.com>
193 Avoid the need for a copy of the input file when the input and
194 output overlap, e.g. 'sort F -o F'. With -m, though, a copy
195 is still needed sometimes.
197 * doc/textutils.texi: 'sort F -o F' no longer needs to copy F.
199 * src/sort.c: Do not include closeout.h.
200 (xfopen): Use stdout if *how != 'r'.
201 (mergefps): Remove FPS arg.
202 Open all input files, and close all files when done.
203 If OFP is null, open the output file (but after opening input files).
205 (first_same_file): New function.
206 (sort, merge): Remove arg OFP; we now open the output file as needed.
208 (merge): New arg MAX_MERGE. All callers changed.
209 (sort): For "sort F -o F", close the input before opening the output.
210 (main): Do not use close_stdout; 'sort' and 'merge' now close stdout.
211 (This also fixes a close-stdout-twice bug.)
212 Remove test for overlapping input and output files, as 'sort' no longer
213 needs to worry about overlap, and 'merge' checks for overlap itself.
214 Use first_same_file to inform 'merge' about how much to merge at
215 the top level, to avoid overlap.
217 2001-03-12 Jim Meyering <meyering@lucent.com>
219 `fmt --prefix=S' would not work properly for any string S containing
220 a byte with the high bit set.
221 * src/fmt.c (prefix): Declare to be of type unsigned char, not `char'.
222 (get_prefix): Likewise for local, `p'.
223 Reported by François Pinard.
225 Add a test for the above-fixed problem.
226 * tests/fmt: New directory/files.
227 * configure.in (AC_OUTPUT): Add tests/fmt/Makefile.
228 * tests/Makefile.am (SUBDIRS): Add fmt.
230 2001-03-05 Andreas Schwab <schwab@suse.de>
232 * src/tac.c (save_stdin): Use mkstemp to create temporary file.
234 2001-03-09 Jim Meyering <meyering@lucent.com>
236 * Makefile.maint (my_distdir): Define new variable, and use this
237 in place of most old uses of $(distdir).
239 * tests/help-version: Ensure that /dev/full is a character device
240 (using test -c) as well as being writable, before trying to write to it.
241 Otherwise, the test could mistakenly append a newline to an existing,
242 regular, writable, /dev/full file.
243 Suggested by Ulrich Drepper.
245 2001-03-08 Jim Meyering <meyering@lucent.com>
247 * tests/sha1sum/sample-vec: Insert the `--text' argument for each test.
248 Reported by Matthew Smith.
250 2001-03-04 Jim Meyering <meyering@lucent.com>
252 * Makefile.maint (my_distdir): Define.
253 Use it in place of $(distdir) almost everywhere.
257 * Makefile.maint (alpha): Use $(PACKAGE)-$(VERSION), not $(distdir),
258 since the latter now has a `$(top_distdir)/' prefix.
260 2001-03-01 Paul Eggert <eggert@twinsun.com>
262 * src/sort.c (die): New function.
263 (create_temp_file, xfopen, xfclose, write_bytes, sort_buffer_size,
264 fillbuf, main): Use it to regularize error messages. The only change
265 in behavior is that write_bytes and the final close used to say "write
266 error" but now give just the output file name, which should be enough.
268 2001-03-01 Paul Eggert <eggert@twinsun.com>
270 * src/sort.c (xfclose): Add FILE arg, and report the file name
271 on error. All callers changed.
273 2001-03-01 Paul Eggert <eggert@twinsun.com>
275 * src/sort.c (main): When fclose (stdin) fails, do not mention
276 the output file in the error message; mention "-" instead.
278 2001-02-28 Paul Eggert <eggert@twinsun.com>
280 * src/sort.c (xfopen): Set have_read_stdin to 1 only if file is "-".
281 Use fopen_safer, not fopen, to avoid subtle bugs when fopen returns
282 stdin, stdout, or stderr.
283 (xfclose): stdout is no longer a special case.
284 (main): Close output file, don't just flush it; there might be
285 an error on the close.
287 2001-02-27 Paul Eggert <eggert@twinsun.com>
289 * src/sort.c (initbuf): If the desired size cannot be
290 allocated, repeatedly halve it until allocation succeeds.
291 Reported by Solar Designer.
293 2001-02-26 Paul Eggert <eggert@twinsun.com>
295 * src/sort.c (parse_field_count): Comment fix.
297 2001-02-25 Paul Eggert <eggert@twinsun.com>
299 * src/sort.c: Tune allocation and comparison of nodes
300 representing temp files. This improved CPU performance of
301 'sort -S 1 *.[ch]' by 17% on my host.
303 (struct tempnode): name member now uses struct hack.
304 (temphead): Now a pointer, not a structure. All uses changed.
305 (create_temp_file): Allocate node using struct hack.
306 (zaptemp): Free node using struct hack. Use pointer comparison, not
309 2001-02-25 Paul Eggert <eggert@twinsun.com>
311 * src/sort.c (eolchar, trim_trailing_blanks): Now static.
313 2001-02-25 Paul Eggert <eggert@twinsun.com>
315 'sort' race condition fixes.
317 Defend against a DoS attack where someone else creates a
318 temporary file with the same name as ours. Use mkstemp to do
319 this, supplying our own mkstemp if the system doesn't have one.
321 Also, fix a race condition during cleanup on hosts without
324 * src/sort.c (NAME_MAX_IN_DIR): Remove.
325 (sigprocmask, sigset_t): New macros, defined only on older hosts.
326 (caught_signals): New var.
327 (xtmpfopen, tempname): Removed.
328 (create_temp_file): New function, combining the functions of the old
329 xtmpfopen and tempname. All callers changed.
330 Use mkstemp to create the file.
331 (sighandler): On hosts without sigaction, ignore signals while
332 cleaning up, instead of letting them interrupt cleanup.
333 (main): Initialize caught_signals. On hosts with sigaction, block all
334 caught signals while handling one. Remove duplicate code.
336 2001-02-22 Jim Meyering <meyering@lucent.com>
338 * src/sort.c (keycompare): Move declarations of locals, lena and lenb,
339 into the inner scope where they are used.
341 2001-02-19 Jim Meyering <meyering@lucent.com>
343 * src/sort.c (AUTHORS): Add Paul Eggert.
345 * src/wc.c (wc): Rename innermost `buf' to avoid shadowing warning.
346 (wc): Rename local `wc' to avoid shadowing function name.
348 2001-02-18 Paul Eggert <eggert@twinsun.com>
350 Fix a race condition: freed storage accessed during a signal handler.
352 * src/sort.c (struct tempnode.next): Now volatile.
353 (zaptemp): Free the file name after removing it from the temp list,
354 not before, because a signal can arrive between the two actions
355 and cleanup () traverses the list.
357 2001-02-18 Paul Eggert <eggert@twinsun.com>
359 Check for input size, and do not overallocate memory.
360 Also check for memory quotas.
362 Revamp storage management so that line tables and character data are
363 taken from the same buffer. Line tables are now in reverse order,
364 since they grow down while the character data grow up.
367 (<sys/resource.h>): Include if HAVE_SYS_RESOURCE_H.
368 (struct rlimit, getrlimit): Define a replacement if RLIMIT_DATA
370 (RLIMIT_AS): Define to RLIMIT_DATA if not defined.
371 (struct lines): Remove.
372 (struct buffer): New members nlines, line_bytes, eof.
373 Remove member newline_free; no longer needed, since the code no longer
374 runs out of line table space.
375 (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): Remove.
376 (sort_size): Renamed from sortalloc; now applies to the sum of the
377 character data and the line table, not just the character data.
378 (MIN_SORT_SIZE, INPUT_FILE_SIZE_GUESS): New macros.
379 (linelength): remove.
380 (specify_sort_size): Don't worry about the distinction between the
381 character data and the line table; that is now the caller's
383 (default_sort_size): Return the value, instead of being executed for
384 side effect. Return half of available memory, or 1/16 of total memory,
385 whichever is greater; except do not exceed 1/2 of quota.
386 (sort_buffer_size): New function.
387 (initbuf): New arg LINE_BYTES. Ensure that the line array is properly
388 aligned. Initialize the new set of struct buffer members.
389 (buffer_linelim): New function.
390 (fillbuf): Return int, not size_t, since the callers merely care
391 whether the result is nonzero. New arg FILE so that error messages
392 can report the file name. Keep track of eof. Initialize the line
393 table too, taking its memory from the input buffer's memory; this
394 subsumes the old findlines function and removes the need for worrying
395 about running out of line table entries.
396 (checkfp, mergefps, sortlines, merge, sort): Adjust to the new storage
397 management regime, in particular the fact that line tables are now
398 filled in by fillbuf and are in reverse order.
399 (checkfp): Now takes char *, not const char *, since subroutines
400 require that now. Rewrite to avoid lint and duplicate code.
401 If line length alloc calculation overflows,
402 simply allocate enough memory to hold the line.
403 (mergefps): New arg FILES, used for buffer size calculation and error
404 messages. Rewrite to avoid lint. Do not loop if savealloc*2
406 (mergefps, merge): Zap temporary files eagerly rather than lazily;
407 this is needed because we now pass FILES to mergefps.
408 (sortlines): Args now point at end of arrays, not at beginnings.
409 (sort): Do not allocate temporary line array for sortlines;
410 instead, take the space from the same buffer.
411 (main): Adjust to sort_size and default_sort_size changes.
413 2001-02-18 Jim Meyering <meyering@lucent.com>
415 Rename test input files to avoid conflicts on case-insensitive
417 * tests/pr/2-Sf-t_notab: Rename from 2Sf-t_notab.
418 * tests/pr/2-S_f-t_notab: Rename from 2S_f-t_notab.
419 * tests/pr/W-72l17f-ll: Rename from W72l17f-ll.
420 * tests/pr/Test.pm: Update file names to reflect renamings.
421 Reported by Matthew Smith.
423 2001-01-20 Jim Meyering <meyering@lucent.com>
425 * configure.in: Remove jm_CHECK_ALL_TYPES.
426 Now it's invoked by jm_MACROS.
428 2001-01-17 Jim Meyering <meyering@lucent.com>
430 * src/cksum.c (main): Use PACKAGE, not GNU_PACKAGE.
431 * src/tsort.c (main): Likewise.
432 * src/sort.c (main): Likewise.
433 (usage): Convert each TAB in --help output to a sequence of 8 spaces.
435 2001-01-07 Jim Meyering <meyering@lucent.com>
437 * src/tail.c (usage): Split a string that was longer than 2048 bytes.
439 2001-01-03 Jim Meyering <meyering@lucent.com>
441 * src/sort.c (main): Remove embedded \n from diagnostic.
443 2001-01-02 Jim Meyering <meyering@lucent.com>
445 * src/od.c (ulonglong_t): Define place-holder type to avoid some #if
447 (LONGEST_INTEGRAL_TYPE): Remove definition.
448 (MAX_INTEGRAL_TYPE_SIZE): Use ulonglong_t instead of
449 LONGEST_INTEGRAL_TYPE.
450 (print_long_long): Compile this function even on systems without
452 (decode_one_format): Remove #if directive.
454 * src/od.c (decode_one_format): Guard use of print_long_long with
455 `#if HAVE_UNSIGNED_LONG_LONG'. From Darren Salt.
456 Change all `#ifdef HAVE_UNSIGNED_LONG_LONG' to use `#if' instead.
458 2000-12-23 Jim Meyering <meyering@lucent.com>
460 * src/sys2.h [HAVE_INTTYPES_H]: Include <inttypes.h>.
462 2000-12-19 Jim Meyering <meyering@lucent.com>
466 2000-12-18 Paul Eggert <eggert@twinsun.com>
468 * NEWS, doc/textutils.texi: New "sort" option -S SIZE.
470 * src/sys2.h (UINTMAX_MAX): New macro, taken from C99.
472 * src/sort.c: Include physmem.h.
473 (SORTALLOC, mergealloc, LINEALLOC): Remove.
474 (sortalloc): Default to zero at program startup.
475 (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): New macros.
476 (usage, main): Add support for new -S SIZE option.
477 (specify_sort_size, default_sort_size): New functions.
478 (initlines): Do not let alloc exceed limit.
479 (findlines): Likewise.
480 (checkfp, mergefps, sort): Use sortalloc to size everything
481 else, instead of relying on precomputed sizes.
483 2000-12-17 Jim Meyering <meyering@lucent.com>
485 * doc/texinfo.tex: Update from master repository.
486 * config.sub: Likewise.
487 * config.guess: Likewise.
489 2000-12-11 Jim Meyering <meyering@lucent.com>
493 2000-12-07 Jim Meyering <meyering@lucent.com>
495 * src/od.c (address_base): Declare to be static.
497 2000-12-06 Paul Eggert <eggert@twinsun.com>
499 * src/od.c (address_base, address_pad_len): New var.
500 (output_address_fmt_string, address_fmt_buffer, address_pad): Remove.
501 (flag_pseudo_start): Now int, not long int.
502 (pseudo_offset): Now off_t, not long int.
503 (n_specs, n_specs_allocated): Now size_t, not unsigned int.
504 (format_address, format_address_none, format_address_std,
505 format_address_label): Now accepts an extra char argument (an extra
506 char to print if nonzero), and prints instead of returning a string.
508 (bytes_per_block): Now size_t, not int.
509 (format_address_none): Do not even print the extra char argument.
510 This simplifies the callers.
511 (format_address_std, format_address_label): Print off_t ourself
512 instead of trying to use autoconfigured format. This is faster and
514 (format_address_paren): New function.
515 (dump): Remove unnecessary cast.
516 (expand_address_fmt): Remove.
517 (main): Use size_t, off_t, etc. instead of builtin types where this is
518 advisable. Adjust to above changes. Remove unnecessary cast.
520 2000-12-03 Jim Meyering <meyering@lucent.com>
522 * src/tail.c (tail_file): Initialize ignore, dev, and ino members,
523 when tailing forever and the open failed. Otherwise, we could get
524 uninitialized memory references of those fields in recheck.
525 * tests/tail-2/Makefile.am (TESTS): Add assert-2.
526 * tests/tail-2/assert-2: New file.
530 Make od print valid addresses for offsets of 2^32 and larger, and
531 allow byte offset (-j) and byte count (-N) to be 2^32 and larger.
533 * src/od.c (MAX_ADDRESS_LENGTH): Don't hard-code as a literal.
534 Rather, define in terms of the type, off_t.
535 (string_min): Declare to be of type size_t.
536 (flag_dump_strings): Declare to be of type int.
537 (print_s_char): Declare the n_bytes parameter and the local, `i',
539 (print_char): Likewise.
540 (print_s_short): Likewise.
541 (print_short): Likewise.
542 (print_int): Likewise.
543 (print_long): Likewise.
544 (print_long_long): Likewise.
545 (print_float): Likewise.
546 (print_double): Likewise.
547 (print_long_double): Likewise.
548 (dump_hexl_mode_trailer): Likewise.
549 (print_named_ascii): Likewise.
550 (print_ascii): Likewise.
551 (write_block): Likewise.
552 (print_ascii): Declare local, `print_function' with a prototype.
553 Change a few `>' comparisons to the equivalent `<' form.
554 (parse_options): Declare `tmp' to be of type uintmax_t.
555 Use xstrtoumax, not xstrtoul.
556 Fail if the specified offset if larger than OFF_T_MAX.
557 (dump_strings): Declare local `i' to be of type size_t.
558 Remove the now-unnecessary cast-to-off_t.
559 (main) [IF_LINT]: Initialize desired_width to avoid a warning.
560 Declare `tmp' to be of type uintmax_t.
561 Use xstrtoumax, not xstrtoul.
562 Fail if minimum string length is larger than SIZE_MAX.
563 Fail if specified width is larger than ULONG_MAX.
565 * src/od.c (format_address): Use off_t, not long unsigned_int as the
567 (format_address_none): Likewise. Mark parameter as unused.
568 (format_address_std): Likewise.
569 (format_address_label): Likewise.
570 (print_ascii): Mark format string parameter as unused.
571 (write_block): Use off_t, not long unsigned_int as offset type.
572 (expand_address_fmt): New function.
573 (main): Use it to expand each address format string template.
574 Reported by Mark Nudelman, via Andreas Jaeger.
576 * src/sys2.h (OFF_T_MIN): Define here instead.
577 (OFF_T_MAX): Likewise.
580 * src/tail.c (parse_options): Use xstrtoumax to parse the byte and line
581 offset. Give a better diagnostic when the requested offset is still
582 representable but larger than OFF_T_MAX.
583 (OFF_T_MIN): Remove definition.
584 (OFF_T_MAX): Likewise.
586 2000-12-02 Jim Meyering <meyering@lucent.com>
588 * src/sort.c (checkfp): Rename local `buf' to avoid shadowing previous
591 * src/sort.c (NONZERO): Define and use it to make the code a tiny
594 * doc/textutils.texi (sort invocation): Clarify how -t works
595 when a sort key specifies a range of fields. From Karl O. Pinc.
597 2000-11-26 Paul Eggert <eggert@twinsun.com>
599 * src/od.c (skip): Use lseek instead of worrying about fseeko or fseek.
600 This should be portable, as we seek before doing any I/O.
601 (fseeko): Remove; no longer used.
603 2000-11-30 Jim Meyering <meyering@lucent.com>
605 * src/sort.c: s/SIZE_T_MAX/SIZE_MAX/.
607 2000-11-30 Paul Eggert <eggert@twinsun.com>
609 * src/sys2.h: Include <stdint.h> if HAVE_STDINT_H.
610 (SIZE_MAX): Renamed from SIZE_T_MAX, as C99 uses SIZE_MAX.
613 2000-11-30 Jim Meyering <meyering@lucent.com>
615 * src/sort.c: SIZE_MAX is not defined, so s/SIZE_MAX/SIZE_T_MAX/, and...
616 * src/sys2.h (SIZE_T_MAX): ... define.
618 2000-11-29 Paul Eggert <eggert@twinsun.com>
620 Port GNU "sort" to hosts where sizes don't fit in "int",
621 e.g. 64-bit Solaris (sparc).
623 * src/sort.c ("human.h", "xstrtol.h"): Include.
624 (struct line): length member is now size_t, not int.
625 (struct lines): Likewise for used, alloc, limit members.
626 (struct buffer): Likewise for used, alloc, left, newline_free members.
627 (struct keyfield): Likewise for sword, schar, eword, echar members.
628 (sortalloc, mergealloc, linelength): Now size_t, not int.
630 (initbuf, fillbuf, initlines, begfield, limfield, findlines,
631 numcompare, getmonth, keycompare, compare, checkfp, mergefps,
632 sortlines, sort): Accept, return, and use size_t for sizes, not int.
634 (fillbuf, initlines, findlines, checkfp, sort): Check for overflow
635 when computing buffer sizes.
637 (begfield, limfield): Do not index past end of array.
639 (checkfp): Return a boolean, not a line number, as the line
640 number may not fit in int. All callers changed. Use
641 uintmax_t for line numbers, not int.
643 (sort): Don't allocate tmp until we need it (and know the right size).
645 (parse_field_count): New function.
647 (main): Use it to check for overflow in field counts.
648 "outfile" is now a pointer to const.
650 2000-11-27 Jim Meyering <meyering@lucent.com>
652 * src/checksum.h: Don't include system.h here.
653 * src/md5.c: Include config.h, stdio.h, sys/types.h. and system.h here
655 * src/sha1sum.c: Likewise.
657 2000-11-18 Paul Eggert <eggert@twinsun.com>
659 * src/pr.c (main): Do not assume EOF == -1.
660 Handle the case correctly when digits options immediately precede a
663 2000-11-18 Jim Meyering <meyering@lucent.com>
665 * doc/textutils.texi: Change GNU to @sc{gnu} in many places.
666 Update to use the Free Documentation Licence.
668 * configure, config.h.in, Makefile.in, etc.: Regenerate using the
669 very latest version (in CVS) of autoconf.
671 2000-11-17 Jim Meyering <meyering@lucent.com>
673 * GNUmakefile (.NOTPARALLEL): New target. Prevent unwanted parallelism.
674 Suggestion from Ulrich Drepper.
676 2000-11-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
678 * tsort.c: Include sys/types.h before system.h.
680 2000-11-16 Jim Meyering <meyering@lucent.com>
682 * src/join.c: Declare global `tab' to be of type *unsigned* char,
683 so join works with 8-bit delimiter characters.
684 Reported by Antonio Rendas.
685 * tests/join/Test.pm (8-bit-t): New test for the above fix.
687 2000-11-13 Paul Eggert <eggert@twinsun.com>
689 * src/sys2.h (ST_TIME_CMP_NS): Fix typo: ST_MTIM_NSEC should
690 be tested with #ifdef, not with #if.
692 2000-11-11 Jim Meyering <meyering@lucent.com>
694 * doc/textutils.texi: More minor rewording and grammar correction.
697 2000-11-06 Paul Eggert <eggert@twinsun.com>
699 * src/od.c (skip): st_size is not defined for directories.
701 2000-11-03 Jim Meyering <meyering@lucent.com>
703 * tests/sha1sum/sample-vec: New file, with tests derived from
704 http://csrc.nist.gov/cryptval/shs/sha1-vectors.zip
705 * tests/sha1sum/Makefile.am (TESTS): Add sample-vec.
707 2000-10-30 Jim Meyering <meyering@lucent.com>
709 * configure, config.h.in, Makefile.in, etc.: Regenerate using the
710 very latest version (in CVS) of autoconf.
712 * src/wc.c: Include "system.h" after wctype.h (not before)
713 to avoid a compilation error on Solaris 5.5.1 systems.
714 Reported by Vin Shelton.
716 2000-10-23 Jim Meyering <meyering@lucent.com>
718 * Makefile.maint: Clean up version-related variables.
722 * Makefile.am (EXTRA_DIST): Add .prev-version.
724 2000-10-22 Jim Meyering <meyering@lucent.com>
726 * tests/Makefile.am (SUBDIRS): Add sha1sum.
727 * tests/sha1sum/basic-1: New file.
728 * configure.in (AC_OUTPUT): Add tests/sha1sum/Makefile.
730 * src/Makefile.am (bin_PROGRAMS): Add sha1sum.
731 (md5sum_SOURCES): Define.
732 (sha1sum_SOURCES): Define.
733 (noinst_HEADERS): Add checksum.h.
735 * src/md5sum.c: Factor out the differences between MD5 and SHA1,
736 and parameterize so this code may be used by both md5sum and the new
737 program, sha1sum. Loosely based on a patch from Scott Miller.
738 * src/checksum.h: New file.
739 * src/md5.c: New file that simply defines `algorithm'.
740 * src/sha1sum.c: Likewise.
742 * man/Makefile.am (man_MANS): Add sha1sum.1.
743 * man/sha1sum.x: New file.
745 Support 8-byte integers, assuming they're printable with e.g., %lld.
746 * src/od.c: Add support for printing data as unsigned
749 2000-10-21 Jim Meyering <meyering@lucent.com>
751 The command, `yes ''|./cat -n' would stop printing after INT_MAX lines.
752 * src/cat.c (cat): Never let `newlines' exceed 3.
754 2000-10-21 Jim Meyering <meyering@lucent.com>
756 Prevent a counter buffer overrun when numbering lines and when
757 processing 100 billion lines (or more) of input.
758 * src/cat.c (LINE_COUNTER_BUF_LEN): Define to allow numbering as
759 many as 10^18 - 1 lines (the old limit was 10^11 - 1, and could
760 be exceeded without too much trouble). Use this symbol rather
761 than hard-coding the constant everywhere.
762 (next_line_num): Rather than overrunning for input with more lines,
763 mark the line number by putting a `>' in the leftmost slot.
764 Patch by Jan Nieuwenhuizen.
766 * src/sort.c (SORT_OUT_OF_ORDER): Define.
767 (main): Use it instead of hard-coding the `1'.
769 2000-10-10 Jim Meyering <meyering@lucent.com>
771 * src/sort.c (main): Use EXIT_SUCCESS rather than 0.
772 Fail when checking (-c) with more than one file argument,
773 rather than simply ignoring the extra arguments.
775 2000-09-07 Jim Meyering <meyering@lucent.com>
777 * src/cut.c: Remove obsolete comment block.
778 (usage): Note that when using -f, lines with no delimiters are
780 * doc/textutils.texi (cut invocation): Likewise.
782 2000-08-23 Jim Meyering <meyering@lucent.com>
784 * src/md5sum.c: Include <config.h> unconditionally, to be consistent
785 with all the other programs in this directory.
786 * src/tsort.c: Likewise.
788 2000-08-19 Jim Meyering <meyering@lucent.com>
790 * src/comm.c (writeline): Correct comments. From Bruno Haible.
792 2000-08-11 Paul Eggert <eggert@twinsun.com>
794 * doc/textutils.texi:
796 Portable shell scripts should specify global options before
799 Move global LC_CTYPE remark to each sort option that depends
802 sort -g depends on LC_NUMERIC.
804 Add @vindex where it's missing.
806 "radix character" -> "decimal-point character", to match Standard C
807 terminology, which is easier for most people to follow.
809 "comm" does not consider trailing newlines to be significant.
811 2000-08-10 Paul Eggert <eggert@twinsun.com>
813 * doc/textutils.texi: Recommend against the System V syntax
814 for tr ranges, and don't use it in examples. Use POSIX
815 classes rather than ranges, for portability.
816 * src/tr.c (usage): Don't describe System V syntax, as it
819 * src/sort.c (usage): Describe -d and -i in a locale-independent way.
821 * doc/Makefile.am (constants.texi): Use the C locale so that
822 [A-Z] works as expected.
824 2000-08-07 Paul Eggert <eggert@twinsun.com>
826 * src/cut.c (cut_fields): Invoke xalloc_die instead of printing
828 (cut_fields): Check for I/O error as well as end-of-file
830 2000-08-06 Bruno Haible <haible@clisp.cons.org>
832 * src/wc.c: Add support for multi-byte locales.
833 (iswprint, mbrtowc, wcwidth): Provide default definitions.
834 (total_bytes): New variable.
835 (print_bytes): New variable.
836 (longopts): Change abbreviation for --chars from 'c' to 'm'.
838 (write_counts): Add `bytes' argument.
839 (wc): New variables `bytes', `count_bytes', `count_chars',
840 `count_complicated'. The old code determines `bytes', not `chars'.
841 New case for MB_CUR_MAX > 1. A non-printable non-space character does
842 not increment the line position or start a word. Update `total_bytes'.
843 (main): Initialize `print_bytes' and `total_bytes' to 0. Accept 'm'
844 option. Pass `total_bytes' to write_counts.
845 * doc/textutils.texi (wc invocation): Update accordingly.
847 2000-08-06 Bruno Haible <haible@clisp.cons.org>
849 * src/head.c (head): Call write_header here.
850 (head_file): ... not here.
852 * src/cat.c (closeout_func): Remove variable.
853 (close_stdout_wrapper): Remove unused function.
854 (main): Remove assignment to closeout_func.
856 * src/fold.c (fold_file): Remove ferror(stdout) check, already done
859 2000-08-06 Paul Eggert <eggert@twinsun.com>
861 * src/sort.c (usage): Warn more succinctly about the effects of
862 the locale on sort order.
864 2000-08-06 Jim Meyering <meyering@lucent.com>
868 * src/tail.c (pipe_lines): Declare local `cp' to be const.
870 2000-08-04 Greg McGary <greg@mcgary.org>
872 * src/tail.c (pipe_lines): Add variable `nbytes' so we can free
873 `tmp' immediately after read loop. Don't process an empty file.
874 [This fixes a buffer-underrun error -- detected thanks to
875 bounded pointers -jmm]
877 2000-08-05 Jim Meyering <meyering@lucent.com>
879 Fix buffer-overrun error.
880 * src/pr.c (init_header): Allocated buffer was sometimes too small.
881 Reported by Greg McGary (who found this bug using his
882 bounded-pointers-enabled gcc).
883 (init_header): Move declarations of several variables into the
884 inner scope where they are used.
885 * tests/pr/Test.pm (narrow-1): New test, for the above.
887 * src/csplit.c (MAX): Remove definition (It's in sys2.h).
889 2000-08-04 Jim Meyering <meyering@lucent.com>
891 * src/sort.c (main): Rename local `t' to `tmp_dir' to avoid shadowing
892 a previous local by that name.
893 (usage): Warn that GNU sort is now locale-aware, and suggest
894 people put LC_ALL=POSIX in their environment.
896 * src/pr.c (store_columns): Remove conjunct that would dereference
897 an out-of-bounds pointer. Reported by Greg McGary (who found this
898 bug using his bounded-pointers-enabled gcc).
900 2000-08-03 Jim Meyering <meyering@lucent.com>
902 * tests/Makefile.am.in ($(srcdir)/$x-tests): Use -I$(srcdir), not `-I.'.
903 (Makefile.am): Likewise. Reported by Greg McGary.
905 2000-08-01 Jim Meyering <meyering@lucent.com>
907 * doc/textutils.texi (tr invocation): Note that ranges are not portable.
908 Update examples not to use ranges.
910 2000-07-31 Jim Meyering <meyering@lucent.com>
912 * src/cut.c (cut_fields): Use `virtual memory exhausted',
913 not `Memory exhausted'.
915 2000-07-30 Jim Meyering <meyering@lucent.com>
917 * src/help-version: Remove file. Move it to ...
918 * tests/help-version: ...here
919 * tests/Makefile.am (TESTS): Set to help-version.
920 (TESTS_ENVIRONMENT): Define.
921 (EXTRA_DIST): Add $(TESTS).
922 * src/Makefile.am (EXTRA_DIST): Remove help-version.
923 (TESTS): Remove definition.
924 (TESTS_ENVIRONMENT): Remove definition.
926 2000-07-28 Paul Eggert <eggert@twinsun.com>
928 sort's -T option can now appear multiple times.
929 Thanks to Charles Randall for suggesting this idea.
931 * doc/textutils.texi, NEWS: Document this.
933 * src/sort.c (temp_dir): Remove.
934 (temp_dirs, temp_dir_count, temp_dir_alloc): New vars.
935 (process_id): New var.
936 (usage): Describe new use of -T.
937 (add_temp_dir): New function.
938 (tempname): Use new temp_dirs array.
939 Do not discard information from the process-id or sequence
940 number, unless we have short file names.
941 (sighandle): Use process_id instead of getpid.
942 (main): Initialize process_id.
943 Add support for the new use of -T.
945 2000-07-23 Jim Meyering <meyering@lucent.com>
947 * tests/head/Test.pm: Rename tests (and hence files) to have a short
948 enough prefix so that they're not truncated on 8+3 file systems.
949 Reported by Eli Zaretskii.
951 2000-07-09 Jim Meyering <meyering@lucent.com>
953 * config.guess: Update from FSF.
954 * config.sub: Likewise.
956 2000-07-02 Jim Meyering <meyering@lucent.com>
960 2000-07-01 Jim Meyering <meyering@lucent.com>
962 * src/cut.c: Change type of global, field_1_bufsize, from int to size_t.
964 2000-06-29 Jim Meyering <meyering@lucent.com>
966 * src/tr.c (find_bracketed_repeat): Add a cast to suppress a warning.
967 Reported by Gerhard Poul.
969 * src/tail.c (enum): Remove comma from end of enumerator list.
972 2000-06-25 Jim Meyering <meyering@lucent.com>
974 * configure.in (ALL_LINGUAS): Add Danish (da).
976 2000-06-24 Jim Meyering <meyering@lucent.com>
978 * doc/textutils.texi: Lots of minor rewording and grammar correction.
981 * tests/sum/basic-1: New file.
982 * tests/sum/Makefile.am: New file.
983 * configure.in (AC_OUTPUT): Add tests/md5sum/Makefile.
984 * tests/Makefile.am (SUBDIRS): Add sum.
986 2000-06-22 Bruno Haible <haible@clisp.cons.org>
988 * src/sum.c (sysv_sum_file): Avoid overflowing 32-bit accumulator
989 on files larger than 256 MB.
991 2000-06-22 Bruno Haible <haible@clisp.cons.org>
993 * src/cat.c (main): Correct a comment.
995 2000-06-21 Jim Meyering <meyering@lucent.com>
997 * src/cut.c (getstr): Remove private (and out of date) version of
999 (cut_fields): Adjust caller to use the just-extended one in ../lib.
1000 Reported by Paul Sauer.
1002 2000-06-20 Jim Meyering <meyering@lucent.com>
1004 * src/uniq.c (main): Fix off-by-argc test, so +N-style options are
1005 recognized once again. Reported by Geoff Keunning.
1006 Fix typo in diagnostic: s/compare/skip/.
1008 2000-05-27 Jim Meyering <meyering@lucent.com>
1010 * src/tail.c: Arrange to call close_stdout upon exit.
1011 Don't close stdout explicitly.
1012 (usage): Add missing backslash at end of line.
1013 (write_header): Remove now-unused COMMENT parameter.
1016 2000-05-24 Jim Meyering <meyering@lucent.com>
1018 * src/head.c (head_file): Use STDIN_FILENO in place of `0'.
1021 2000-05-20 Jim Meyering <meyering@lucent.com>
1023 * src/cat.c: Arrange to call close_stdout upon exit.
1024 Don't close stdout explicitly. Replace uses of global constant,
1025 output_desc, with uses of STDOUT_FILENO.
1027 Arrange to call close_stdout upon exit. Don't close stdout explicitly.
1028 * src/cksum.c: Likewise.
1029 * src/comm.c: Likewise.
1030 * src/csplit.c: Likewise.
1031 * src/cut.c: Likewise.
1032 * src/expand.c: Likewise.
1033 * src/fmt.c: Likewise.
1034 * src/fold.c: Likewise.
1035 * src/head.c: Likewise.
1036 * src/join.c: Likewise.
1037 * src/md5sum.c: Likewise.
1038 * src/nl.c: Likewise.
1039 * src/od.c: Likewise.
1040 * src/paste.c: Likewise.
1041 * src/pr.c: Likewise.
1042 * src/ptx.c: Likewise.
1043 * src/sort.c: Likewise. (but set exit status and file name, too)
1044 * src/split.c: Likewise.
1045 * src/sum.c: Likewise.
1046 * src/tac.c: Likewise.
1047 * src/tr.c: Likewise.
1048 * src/tsort.c: Likewise.
1049 * src/unexpand.c: Likewise.
1050 * src/uniq.c: Likewise.
1051 * src/wc.c:: Likewise.
1053 2000-05-13 Jim Meyering <meyering@lucent.com>
1055 * src/help-version: Run each program successfully at least once.
1057 2000-05-12 Jim Meyering <meyering@lucent.com>
1059 * src/head.c (string_to_integer): Restrict base to 10.
1060 Reported by Joseph S. Myers.
1061 * tests/head/Test.pm: Add a few tests for this.
1063 New option: --first-only
1064 * src/unexpand.c (anonymous enum) [CONVERT_FIRST_ONLY_OPTION]: Define.
1065 (long_options): Add `first-only'.
1066 (main): Handle new option.
1068 2000-05-11 Jim Meyering <meyering@lucent.com>
1070 * tests/unexpand/basic-1: New tests.
1072 2000-04-17 Bruno Haible <haible@clisp.cons.org>
1074 * src/system.h [__BEOS__]: Ignore O_BINARY and O_TEXT.
1076 2000-04-16 Jim Meyering <meyering@lucent.com>
1078 * src/tail.c: Prepare to remove option: --max-consecutive-size-changes.
1079 Doesn't seem useful.
1080 (usage): Remove description.
1081 * doc/textutils.texi (tail invocation): Remove description.
1083 2000-04-12 Jim Meyering <meyering@lucent.com>
1085 * src/tail.c (usage): Tweak --help output. Suggestions from Karl Berry.
1087 Move some macros into m4/.
1088 * configure.in (_GNU_SOURCE): Don't define here.
1089 (AC_SYS_LARGEFILE): Don't use here.
1090 (AM_C_PROTOTYPES): Don't use here.
1091 * acconfig.h: Remove now-unused file.
1093 2000-04-09 Jim Meyering <meyering@lucent.com>
1095 * doc/textutils.texi: Include constants.texi.
1096 (tail invocation): Use `@value's instead of referring to the
1097 output of `tail --help' for defaults.
1098 * doc/Makefile.am (constants.texi): New rule.
1099 (EXTRA_DIST): Add constants.texi.
1100 (MAINTAINERCLEANFILES): Add it here, too.
1101 (textutils.dvi, textutils.info): Depend on constants.texi.
1103 * src/tail.c (usage): Clarify descriptions of the --max-* options.
1106 2000-04-03 Jim Meyering <meyering@lucent.com>
1108 * configure.in (AC_CHECK_HEADERS): Remove langinfo.h. Now it's in m4/.
1109 (AC_CHECK_FUNCS): Remove nl_langinfo. Now it's in m4/.
1111 2000-03-17 Jim Meyering <meyering@lucent.com>
1113 * configure.in (ALL_LINGUAS): Add Slovenian (sl).
1115 2000-03-12 Jim Meyering <meyering@lucent.com>
1117 Merge from fileutils.
1118 * src/system.h "pathmax.h": Include.
1119 <sys/time.h>: Include if appropriate.
1121 <sys/mkdev.h>: Likewise.
1122 <sys/sysmacros.h>: Likewise.
1123 <utime.h>: Likewise.
1124 (major, minor, makedev): Define if needed.
1125 (struct utimbuf): Declare if missing.
1126 (ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE): Define.
1128 * src/cksum.c (usage): Correct --help output.
1129 Prompted by a report from Gregory Leblanc.
1131 2000-03-05 Paul Eggert <eggert@twinsun.com>
1133 * src/sort.c (struct buffer.newline_free): New member.
1134 (initbuf, findlines): Set it.
1135 (fillbuf): Do not double the size of a full buffer to append a newline
1136 unless the buffer is known to be newline free.
1138 2000-03-05 Jim Meyering <meyering@lucent.com>
1142 2000-03-04 Jim Meyering <meyering@lucent.com>
1144 Don't get failed assertion for `tail -f directory'.
1145 * src/tail.c: Revert most of 1999-10-20 change. Instead, ...
1146 (IS_TAILABLE_FILE_TYPE): Define to produce similar result.
1147 (recheck): Use it here.
1148 (tail_file): Use it here.
1149 Reported by François Pinard.
1151 Once we encounter a file that is not of IS_TAILABLE_FILE_TYPE,
1152 marke it as such and ignore it forever after.
1153 * src/tail.c (struct File_spec): New member.
1154 (recheck): Initialize new member.
1155 (tail_file): Likewise.
1156 (tail_forever): Skip the file if it's marked as ignorable.
1158 2000-03-03 Jim Meyering <meyering@lucent.com>
1160 * src/sort.c (fillbuf): Move declaration of local, cc, into scope of
1161 `while' loop where it's used.
1163 2000-03-02 Paul Eggert <eggert@set.twinsun.com>
1165 Big performance improvement when sorting many small files,
1166 building on a suggestion by Charles Randall.
1168 * src/sort.c (fillbuf): Skip memmove if it would be a no-op,
1169 as many memmove implementations are slow in that case.
1170 Don't examine leftover bytes for eolchar, since they may be left
1171 over from a previous file, and we want to read from this file.
1173 (sort): At end of file, if there is more input and buffer room,
1174 concatenate the next input file.
1176 2000-02-29 Jim Meyering <meyering@lucent.com>
1178 * src/join.c (make_blank): Add an explicit cast to `unsigned char *'
1179 to placate HPUX's C compiler. Reported by Bob Proulx.
1181 2000-01-30 Jim Meyering <meyering@lucent.com>
1185 * Makefile.maint (my-distcheck): Depend on po-check, so I'll be warned
1186 about any required changes at `make distcheck' time rather than at
1188 (writable-files): New target.
1189 (my-distcheck): Depend on it.
1192 * po/POTFILES.in: Add these: lib/makepath.c, lib/rpmatch.c,
1195 2000-01-29 Jim Meyering <meyering@lucent.com>
1197 * configure.in: Remove lib-check for cposix now that we use
1199 (jm_LIB_CHECK): Use this even though the library checks aren't
1200 required for this patchage (so all three lib/Makefile.in files
1203 2000-01-24 Mark Kettenis <kettenis@gnu.org>
1205 * src/tsort.c (exit_status): New variable.
1206 (loop): New varibale.
1207 (count_items, scan_zeroes): Change return type to int.
1208 (detect_loop): Complete rewrite to correctly implement detection
1209 of loops. Also change return type to int.
1210 (recurse_tree): Stop if ACTION returns non-zero. This involves
1211 changing the return type of this function and ACTION to int.
1212 (walk_tree): Change return type of ACTION to int.
1213 (tsort): Continue sort after a loop has been detected (and
1214 broken). Set exit_status to 1 if a loop was detected.
1215 (main): Use exit_status to determine exit code.
1216 * tests/tsort/basic-1: Change expected output for cycle-1 and
1219 2000-01-23 Jim Meyering <meyering@lucent.com>
1221 * configure.in (AM_FUNC_STRTOD): Move to m4/.
1222 (AC_SUBST(POW_LIBM)): Likewise.
1224 2000-01-22 Jim Meyering <meyering@lucent.com>
1226 * src/sort.c (keycompare): Use global, hard_LC_COLLATE in place of
1227 local that is sometimes undeclared.
1229 * configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR).
1230 (AC_CHECK_HEADERS): Move these checks into m4/.
1232 * src/tr.c ("xstrtol.h"): Include.
1233 (Filter): Rename from PFL.
1234 (non_neg_strtol): Remove function.
1235 (find_bracketed_repeat): Use xstrtoul instead of non_neg_strtol.
1236 (squeeze_filter, set_initialize, main): Use size_t and ssize_t in
1237 place of long and int in several decls.
1238 (read_and_delete, read_and_xlate): Likewise, and remove assertion.
1239 * tests/tr/Test.pm (o-rep-1, o-rep-2): New tests.
1241 * src/cut.c: Correct copying notice to use GPL, per author's request.
1242 * src/paste.c: Likewise.
1245 1999-09-19 Bruno Haible <haible@clisp.cons.org>
1247 * src/tr.c (PFI): Return `long', not `int'.
1248 (PFL): Rename from PFI now that it returns long.
1249 (squeeze_filter): Declare as `long': i, nr, out_len.
1251 2000-01-17 Paul Eggert <eggert@twinsun.com>
1253 Tweak sort performance.
1255 * src/sort.c (hard_LC_CTYPE): Remove.
1256 (keylist): Renamed from keyhead. Now a pointer, not a
1257 mostly-unused struct. All uses changed.
1258 (findlines, keycompare, CMP_WITH_IGNORE, compare, checkfp, mergefps,
1259 sort): Tune and use a more consistent style for reallocation.
1260 (keycompare, main): Don't worry about LC_CTYPE;
1261 it's buggy with multibyte chars anyway.
1262 (compare): Invoke alloca (0) after each call to keycompare,
1263 not just the ones that return nonzero. This avoids a memory
1264 leak on architectures without builtin alloca that occurs
1265 sometimes when a file contains all duplicate lines.
1267 2000-01-17 Paul Eggert <eggert@twinsun.com>
1269 * src/csplit.c (interrupt_handler, main):
1270 Don't use SA_INTERRUPT to decide whether to call sigaction, as
1271 POSIX.1 doesn't require SA_INTERRUPT and some systems
1272 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
1273 it's been part of POSIX.1 since day 1 (in 1988).
1274 * src/sort.c (sighandler, main): Likewise.
1276 2000-01-16 Jim Meyering <meyering@lucent.com>
1278 * lib/Makefile.am: Merge with fileutils/lib/Makefile.am.
1280 * configure.in: Remove AM_FUNC_ERROR_AT_LINE, jm_FUNC_STRFTIME,
1281 AC_FUNC_VPRINTF, and AC_FUNC_ALLOCA. Now they're in m4/.
1283 2000-01-15 Jim Meyering <meyering@lucent.com>
1285 * configure.in (AC_REPLACE_FUNCS): Remove these: memcpy memset stpcpy
1286 strpbrk strtol strtoul. Now that's in m4/.
1288 unexpand could infloop
1289 * src/unexpand.c (TAB_STOP_SENTINEL): Define.
1290 (unexpand): Use it instead of INT_MAX.
1291 Declare column and pending to be `unsigned'.
1292 Increment pending and column counters only if column is smaller
1293 than TAB_STOP_SENTINEL.
1294 * tests/Makefile.am (SUBDIRS): Add unexpand.
1295 * tests/unexpand/basic-1: New tests for the above-fixed bug.
1296 * configure.in (AC_OUTPUT): Add tests/unexpand/Makefile.
1297 Reported by John Kodis.
1299 2000-01-12 Paul Eggert <eggert@twinsun.com>
1301 * src/sort.c (fillbuf): Avoid quadratic behavior with long lines.
1302 Also, stop worrying about ancient memchr bug (misbehavior when
1303 size is zero), since other code doesn't worry either.
1305 2000-01-11 Jim Meyering <meyering@lucent.com>
1307 Sync lib/ directories of sh-utils, and textutils.
1309 * lib/Makefile.am (libfetish_a_SOURCES): Add getdate.y, posixtm.c,
1310 basename.c, canon-host.c, readutmp.c, stripslash.c, xgetcwd.c,
1312 (noinst_HEADERS): Add getdate.h, group-member.h, posixtm.h,
1313 pathmax.h, readutmp.h
1315 * lib/Makefile.am: s/tu/fetish/
1316 * src/Makefile.am: s/libtu/libfetish/
1318 2000-01-10 Jim Meyering <meyering@lucent.com>
1322 * Makefile.maint (announcement): Include URLs for xdelta files.
1323 (alpha): Use scp, not ncftp.
1325 * lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.
1327 2000-01-08 Jim Meyering <meyering@ascend.com>
1332 * src/cut.c (OUTPUT_DELIMITER_OPTION): Define this and use it
1333 instead of `CHAR_MAX + n'.
1334 * src/pr.c (PAGES_OPTION, COLUMNS_OPTION): Likewise.
1336 2000-01-07 Jim Meyering <meyering@ascend.com>
1338 * tests/tsort/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix
1339 to exported PATH value (though not strictly necessary, here).
1340 * tests/md5sum/Makefile.am: Likewise.
1343 * lib/memcasecmp.c: Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
1344 Capitalize all macro parameters.
1345 (memcasecmp): Ansideclify.
1346 Don't cast away `const'ness of parameters.
1347 * lib/strpbrk.c (strpbrk): Ansideclify.
1348 Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
1349 Suggestions from François Pinard.
1351 2000-01-06 Jim Meyering <meyering@ascend.com>
1353 * tests/tail-2/assert: Tell the user just before sleeping for 7 seconds.
1355 * tests/tail-2/Makefile.am (TESTS): Remove fflush test. It didn't
1356 test the losing behavior, and left a stray tail process to boot.
1358 2000-01-01 Jim Meyering <meyering@ascend.com>
1362 * lib/Makefile.am (lstat.c): Adapt rule to handle new parts of xstat.in.
1364 1999-12-12 Jim Meyering <meyering@ascend.com>
1366 Move 120+ lines of stat.h-related macros from system.h (not shared)
1367 to sys2.h, which is shared between fileutils, sh-utils, textutils.
1368 * src/system.h: Move them from here...
1369 * src/sys2.h: ... to here.
1371 1999-12-09 Jim Meyering <meyering@ascend.com>
1373 * configure.in (ALL_LINGUAS): Add Galician (gl).
1375 1999-12-06 Jim Meyering <meyering@ascend.com>
1377 * tests/tail-2/fflush: New test for latest change.
1378 * tests/tail-2/Makefile.am (TESTS): Add fflush.
1380 1999-10-26 Marc Boucher <marc@mbsi.ca>
1382 * src/tail.c (main): Flush stdout before switching to unbuffered mode
1383 and calling tail_forever. Required only on Solaris2.7 -- on other
1384 systems, using setvbuf to switch to unbufferd mode does the flush.
1386 1999-11-22 Jim Meyering <meyering@ascend.com>
1388 * lib/Makefile.am (DISTCLEANFILES): Put $(BUILT_SOURCES) here rather
1389 than in $(MAINTAINERCLEANFILES).
1391 * src/tail.c (recheck): Handle a race condition (including <dev,inode>
1392 reuse) that would lead to a failed assertion.
1393 Reported by Ken Pizzini.
1394 (tail_forever): Record errno before using it in call to `error'
1395 which might change it.
1396 (tail_file): Likewise.
1398 New test for the above.
1399 * tests/tail-2/assert: New file.
1400 * tests/tail-2/Makefile.am: New file.
1401 * tests/tail-2: New directory.
1402 * tests/Makefile.am (SUBDIRS): Add tail-2.
1403 * configure.in (AC_OUTPUT): Add tests/tail-2/Makefile.
1405 1999-11-05 Jim Meyering <meyering@ascend.com>
1407 * src/system.h: Use HAVE_STRUCT_STAT_ST_BLKSIZE not HAVE_ST_BLKSIZE.
1409 * configure.in: Move some type/header/member tests into
1410 m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of
1411 fileutils, textutils, and sh-utils.
1413 1999-11-04 Paul Eggert <eggert@twinsun.com>
1415 * src/sort.c (SORTALLOC): New macro.
1416 (sortalloc, mergealloc, LINEALLOC): Use it.
1417 (sortalloc, mergealloc, linelength): Now const.
1418 (sortalloc): Increase from 0.5 to 8 MB.
1419 (mergealloc): Increase from 16 to 256 kB.
1420 (LINEALLOC): Increase from 0.25 to 4 MB.
1422 1999-11-03 Paul Eggert <eggert@twinsun.com>
1424 * NEWS, doc/textutils.texi:
1425 Do not consider newline to be part of a line when comparing lines
1426 in `sort' and `comm'. POSIX.2 requires that we consider newline,
1427 but this is a bug in the spec and the bug will likely be fixed.
1428 * src/comm.c (compare_files): Likewise.
1429 * src/sort.c (begfield, limfield, findlines, keycompare, compare):
1431 * tests/sort/Test.pm: Update tests `use-nl' and `11d' to reflect
1434 * lib/linebuffer.c (readline): Do not leave room for an extra
1435 byte after the newline; it's no longer needed.
1436 * src/sort.c (sortalloc, mergealloc, fillbuf, checkfp, mergefps):
1439 * lib/memcoll.c (memcoll): The two arguments cannot be
1440 adjacent any more, so remove the alloca/copy workaround for
1443 1999-11-03 Jim Meyering <meyering@ascend.com>
1445 Fix so that `tail -fn 2 file' works again.
1446 * src/tail.c (anonymous enum) [LONG_FOLLOW_OPTION]: Define.
1447 (long_options): Use LONG_FOLLOW_OPTION here, instead of 'f'.
1448 (main): Remove the `::' after the `f' in getopt_long string.
1449 Add `case LONG_FOLLOW_OPTION' after `case 'f':'.
1450 Based on a patch from Tim Waugh.
1452 * src/tail.c (anonymous enum) [RETRY_OPTION]: Define.
1453 [MAX_UNCHANGED_STATS_OPTION]: Likewise.
1454 [MAX_CONSECUTIVE_SIZE_CHANGES_OPTION]: Likewise.
1455 [PID_OPTION]: Likewise.
1456 (long_options): Use *_OPTION instead of CHAR_MAX + N.
1459 1999-11-02 Jim Meyering <meyering@ascend.com>
1461 * man/help2man: Import version 1.018.
1462 * man/Makefile.maint ($(man_MANS)): Remove use of --name=... option.
1463 * man/*.x: Include one-line summary in [NAME] section.
1464 * man/Makefile.summ (cat-summary): Remove now-unused file.
1465 * man/Makefile.am (EXTRA_DIST): Remove Makefile.summ.
1466 * man/Makefile.maint: Include Makefile.summ with leading `-'.
1467 This file is shared by fileutils and sh-utils, both of which still
1468 have the file (albeit nearly empty now).
1469 Suggestion for clean-up from Akim Demaille.
1471 1999-11-01 Jim Meyering <meyering@ascend.com>
1473 * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
1475 1999-10-20 Jim Meyering <meyering@ascend.com>
1477 * src/tail.c (recheck): Don't refuse to tail a non-regular, non-pipe.
1478 (tail_file): Likewise.
1480 1999-10-07 Jim Meyering <meyering@ascend.com>
1482 * configure.in (ALL_LINGUAS): Add Japanese (ja).
1484 1999-10-04 Jim Meyering <meyering@ascend.com>
1486 * depcomp: New file, for automake's new dependency support.
1487 * missing: New version, from automake's user-dep-gen-branch.
1489 1999-09-28 Jim Meyering <meyering@ascend.com>
1491 * src/system.h: Update from the system.h from fileutils.
1493 * lib/error.c (error_at_line): Use strerror portably here, too,
1494 just as was done in error.
1496 1999-09-02 Jim Meyering <meyering@ascend.com>
1498 * src/cut.c: Remove xstrdup declaration.
1499 * src/sort.c: Likewise.
1500 * src/tsort.c: Likewise.
1502 1999-08-22 Jim Meyering <meyering@ascend.com>
1504 * src/tsort.c (detect_loop): There's no loop if k->top is NULL.
1505 Niklas Edmundsson showed how to make tsort segfault.
1507 * tests/tsort/Makefile.am: Rewrite to use Fetish.pm-based framework.
1508 * tests/tsort/basic-1: New file.
1509 Add a few more tests.
1510 * tests/tsort/Test.pm: Remove.
1512 * man/help2man: Escape backslashes so tr's manual comes out right.
1513 Reported by Andreas Schwab.
1515 * src/tsort.c (usage): Correct address for bug reports.
1516 (tsort): Remove trailing `\n' in error format.
1518 * src/md5sum.c (md5_check): Remove trailing `\n' in error format.
1520 * src/sys2.h (IF_LINT): Define new macro.
1521 * src/od.c (dump): Use IF_LINT macro instead of #ifdef lint...
1523 * src/paste.c (paste_parallel): Likewise.
1524 * src/pr.c (read_line): Likewise.
1525 * src/sort.c (checkfp): Likewise.
1526 (mergefps): Likewise.
1528 * src/cksum.c (cksum): Constify a char*.
1529 * src/comm.c (writeline): Likewise.
1531 * src/uniq.c (check_file): Move declarations of local variables
1532 into the scopes where they're used.
1533 (min): Remove macro definition.
1534 (different): Use MIN, not min.
1535 (SWAP_LINES): New macro.
1536 (check_file): Use it here.
1538 * src/uniq.c (check_file): Generate each line of output earlier,
1539 when possible. It is possible when using none of these options:
1540 --count, -repeated, --all-repeated, --unique.
1541 Based on a patch from Ian Turner.
1543 1999-08-15 Jim Meyering <meyering@ascend.com>
1545 * src/tail.c (ENOSYS): Define to a bogus value if not already defined.
1547 1999-08-13 Eli Zaretskii <eliz@is.elta.co.il>
1549 * src/tail.c (parse_options): Warn if --pid=PID is used and kill()
1550 returns ENOSYS (e.g. when compiled with DJGPP).
1552 1999-08-13 Jim Meyering <meyering@ascend.com>
1554 * src/tsort.c (usage): Use consistent bug-reporting address.
1556 * tests/tsort/Test.pm: New file.
1557 * tests/tsort/Makefile.am: New file.
1558 * tests/tsort: New directory.
1559 * tests/Makefile.am (SUBDIRS): Add tsort.
1560 * configure.in (AC_OUTPUT): Add tests/tsort/Makefile.
1562 1999-08-11 Paul Eggert <eggert@twinsun.com>
1564 * doc/textutils.texi: Document how to ignore newline during sort.
1566 1999-08-07 Jim Meyering <meyering@ascend.com>
1568 * po/POTFILES.in: Add lots of lib/*.c files. Remove src/system.h.
1570 1999-08-06 Jim Meyering <meyering@ascend.com>
1574 * src/sort.c: Include file name in `write error' diagnostics.
1575 (write_bytes): Add output_file parameter and use it. Update callers.
1576 (mergefps): Likewise.
1579 Reported by John Summerfield.
1581 1999-08-05 Jim Meyering <meyering@ascend.com>
1583 * src/tail.c (Follow_mode): Remove comma at end of enumerator list.
1584 Reported by Kaveh Ghazi.
1586 * config.sub: Update from autoconf.
1587 * config.guess: Update from autoconf.
1589 1999-08-04 Jim Meyering <meyering@ascend.com>
1593 * configure.in: Remove inadequate getline-testing code. md5sum would
1594 segfault on HPUX because of the getline function in their C library.
1595 Use the AM_FUNC_GETLINE test in m4/ instead.
1597 1999-08-03 Jim Meyering <meyering@ascend.com>
1599 * src/tail.c (tail_forever): When following by name and calling recheck
1600 because of exceeding max_n_consecutive_size_changes_between_opens,
1601 `continue' so we don't fall through and (assuming the file finally grew)
1602 get the erroneous `file truncated' message. This was hard to reproduce.
1604 1999-08-01 Jim Meyering <meyering@ascend.com>
1608 * configure.in (AM_C_PROTOTYPES): Move test to precede a few
1609 header tests -- merely on principle.
1611 1999-08-01 Paul Eggert <eggert@twinsun.com>
1613 * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS.
1615 1999-07-16 Paul Eggert <eggert@twinsun.com>
1617 * lib/quotearg.c (quotearg_buffer):
1618 Don't quote spaces if C quoting style.
1620 1999-07-31 Jim Meyering <meyering@ascend.com>
1622 * src/tail.c (tail_forever): Don't call kill if pid is 0.
1623 Detect when `writer_is_dead' also when the writer is some other user.
1626 * src/tail.c (parse_options): Warn if --pid=PID is used without -f.
1628 1999-07-30 Jim Meyering <meyering@ascend.com>
1632 * src/tail.c: New option: --pid=PID.
1633 Include signal.h for kill prototype.
1635 (long_options): Add `pid'.
1636 (usage): Describe it.
1637 (tail_forever): Implement it.
1638 (parse_options): Handle the new option and required arg.
1639 Suggestion and pseudo-code from Karl Heuer.
1641 1999-07-27 Jim Meyering <meyering@ascend.com>
1643 * lib/linebuffer.c: Include <sys/types.h> now that linebuffer.h uses
1644 size_t. This is required on at least SunOS4. From Kaveh Ghazi.
1646 1999-07-26 Jim Meyering <meyering@ascend.com>
1648 * src/sys2.h (PID_T_MAX): Define.
1650 * src/tail.c (struct File_spec) [n_stat_calls]: Remove unused member.
1652 1999-07-25 Jim Meyering <meyering@ascend.com>
1654 * src/pr.c (usage): Remove `NEWS'-style paragraph (sorry to have
1655 let that in, translators).
1659 1999-06-01 Volker Borchert <bt@teknon.de>
1661 * tests/Makefile.am: Make envvar-check depend on check-recursive rather
1662 than on `check' so that its tests are performed before any real tests.
1664 1999-07-20 Jim Meyering <meyering@ascend.com>
1666 * configure.in (AC_REPLACE_FUNCS) Remove memmove, now that it's
1667 AC_REPLACE...'d in m4/jm-macros.m4.
1669 * src/wc.c (posixly_correct): Declare global.
1670 (write_counts): Use it to select printf formats.
1671 (main): Set posixly_correct from the POSIXLY_CORRECT envvar.
1674 1999-07-15 Jim Meyering <meyering@ascend.com>
1676 * tests/md5sum/Makefile.am: Revert the 1999-02-15 change.
1677 * tests/md5sum/basic-1, newine-1: Add --text for each individual test.
1678 Reported by Eli Zaretskii.
1680 1999-07-12 Jim Meyering <meyering@ascend.com>
1682 * configure.in (ALL_LINGUAS): Add Slovak (sk).
1684 1999-07-11 Jim Meyering <meyering@ascend.com>
1686 * src/tail.c (recheck): Use assert instead of unnecessary close_fd.
1687 Remove a couple of unnecessary FIXME comments.
1689 1999-07-10 Jim Meyering <meyering@ascend.com>
1691 * doc/textutils.texi: Document new tail options.
1693 * src/tail.c (struct File_spec) [tailable]: Rename from `missing' and
1694 document. Change all uses and locals like was_missing to was_tailable.
1695 Invert expressions as appropriate.
1696 (reopen_inaccessible_files): Rename from allow_missing.
1697 (sleep_interval): Describe.
1698 (--allow-missing): Deprecate.
1699 (--retry): New option, equivalent to --allow-missing.
1700 (usage): Document name vs. descriptor differences.
1701 Refer to manual for descriptions of --max-unchanged-stats=N
1702 and --max-consecutive-size-changes=N.
1703 (valid_file_spec): New function.
1704 (recheck): Assert valid_file_spec.
1705 Remove dead else-if block (suggestion from Eli Zaretskii).
1706 Adjust stmts that set f->tailable -- unlike for `missing', tailable
1707 doesn't depend on errno == ENOENT.
1708 (parse_options): Give a warning if --retry is used when not following
1711 * tests/join/Test.pm: New test case (but commented out) for
1712 Paul's 1999-06-01 fix.
1714 1999-07-09 Jim Meyering <meyering@ascend.com>
1716 * configure.in (ALL_LINGUAS): Add Greek (el).
1718 1999-07-04 Jim Meyering <meyering@ascend.com>
1720 * tests/join/Test.pm: New test case for Paul's 1999-06-03 fix.
1722 1999-07-03 Eli Zaretskii <eliz@is.elta.co.il>
1724 * src/tail.c (struct File_spec): New member, errnum.
1725 (recheck): Record the new value of errno in f->errnum. Don't
1726 output an error message unless the new value of errno differs from
1727 the old one. Output a message if previously-inaccessible file
1729 (tail_forever): Always recheck files whose fd is negative. If the
1730 file cannot be fstat'ed, record the errno value in f[i].errnum.
1731 (tail_file): If the file cannot be open, record the errno value in
1732 f->errnum. If it can be opened, initialize f->errnum to zero. If
1733 it's a non-regular non-fifo file, initialize f->errnum to -1.
1735 1999-06-21 Jim Meyering <meyering@ascend.com>
1737 * doc/textutils.texi: Use lower case characters in sc{} context.
1738 Reported by Eli Zaretskii.
1740 1999-06-03 Paul Eggert <eggert@shade.twinsun.com>
1742 * src/join.c (xfields): Only <blank>s separate fields, not <space>s.
1744 1999-06-01 Paul Eggert <eggert@twinsun.com>
1746 * lib/linebuffer.c (readline): Leave room for an extra byte
1747 after the newline; comm needs this for memcoll.
1749 1999-06-01 Paul Eggert <eggert@twinsun.com>
1751 Add LC_COLLATE support to `join'.
1753 * doc/textutils.texi: Describe join and LC_COLLATE.
1755 * src/join.c: Add support for LC_COLLATE locale.
1756 Include hard-locale.h, linebuffer.h, memcoll.h.
1757 (struct line): New member `buf', replacing `beg' and `lim'.
1759 (hard_LC_COLLATE): New var.
1760 (main): Initialize it.
1761 (get_line): Use readline to read the line,
1762 instead of doing it by hand.
1763 That way, we get a buffer that we can pass to memcoll.
1764 (keycmp): Use memcoll to compare lines if hard_LC_COLLATE is nonzero.
1766 1999-05-27 Volker Borchert <bt@teknon.de>
1768 * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix.
1770 1999-05-25 Paul Eggert <eggert@twinsun.com>
1772 Add LC_COLLATE support to `comm', so that `comm' is compatible
1773 with `sort' in nontrivial locales.
1775 * doc/textutils.texi: Document locale-specific mode for comm.
1777 * lib/Makefile.am (libtu_a_SOURCES): Add hard-locale.c, memcoll.c.
1778 (noinst_HEADERS): Add hard-locale.h, memcoll.h.
1780 * src/comm.c: Include hard-locale.h, memcoll.h.
1781 (hard_LC_COLLATE): New variable.
1782 (compare_files): Use memcoll to compare if hard_LC_COLLATE.
1783 (main): Initialize hard_LC_COLLATE from locale.
1785 * src/sort.c: Include hard-locale.h, memcoll.h.
1786 (hard_LC_COLLATE, hard_LC_CTYPE, hard_LC_TIME): New variables,
1787 replacing `need_locale'.
1788 (memcoll): Move to lib/memcoll.c.
1789 (keycompare): No need to alloc (0), since our caller now does it.
1790 (compare): alloca (0) before returning.
1791 (my_setlocale): Remove; hard_locale now dows this.
1792 (main): Invoke setlocale, bindtextdomain, and textdomain before
1793 invoking anything that might print an error.
1794 Use hard_locale to determine which locales are hard.
1796 * lib/hard-locale.c, lib/hard-locale.h, lib/memcoll.c, lib/memcoll.h:
1799 1999-05-25 Paul Eggert <eggert@shade.twinsun.com>
1801 * lib/linebuffer.c (readline):
1802 Append trailing newline to line.
1804 [struct linebuffer] (size): Declare to be of type size_t, not long.
1805 [struct linebuffer] (length): Likewise.
1806 * src/comm.c, (writeline): Lines now contain trailing newline.
1807 * src/uniq.c (find_field, different): Use size_t, not int, for lengths.
1808 (writeline): Lines now contain trailing newline.
1809 (check_file): Use size_t, not int, for lengths.
1810 * src/nl.c (proc_text, check_section, main): More of the same.
1812 * lib/linebuffer.h (struct linebuffer): Use size_t for sizes.
1813 src/nl.c (header_del_len, body_del_len, footer_del_len, main):
1815 src/uniq.c (find_field, different, check_file): Likewise.
1817 * lib/linebuffer.c (readline): Silently append trailing
1818 newline if needed. Do not bother setting buffer length to 0
1819 at EOF, since it's not part of the spec and nobody relies on
1820 it. Do not compute the difference between unrelated pointers.
1822 1999-05-25 Paul Eggert <eggert@twinsun.com>
1824 * src/tac.c (memrchr): Ifdef out this unused function.
1826 1999-05-25 Jim Meyering <meyering@ascend.com>
1828 * doc/textutils.texi (Squeezing): Remove misleading square brackets
1829 from SET1 in the one-word-per-line example.
1831 1999-05-22 Jim Meyering <meyering@ascend.com>
1833 * lib/Makefile.am (libtu_a_SOURCES): Remove memchr.c.
1834 From Ulrich Drepper.
1838 1999-05-22 Paul Eggert <eggert@twinsun.com>
1840 * doc/textutils.texi: Document locale-specific changes to `sort',
1841 as well as the new, POSIX-compliant definition of line comparison,
1842 and -g's more careful treatment of NaNs, infinities and zeros.
1844 * src/sort.c (general_numcompare): Put exceptional cases
1845 first, not last, to be consistent with -M.
1847 1999-05-21 Paul Eggert <eggert@twinsun.com>
1849 * src/sort.c (strtod): Declare if STDC_HEADERS is not defined.
1850 (general_numcompare): Use strtod, not xstrtod.
1851 Do not consider partial conversions to be errors.
1852 Put -infinity at the start, and +infinity at the end;
1853 follow +infinity with NaNs (sorted by bit pattern),
1854 and finally by conversion errors.
1856 1999-05-21 Jim Meyering <meyering@ascend.com>
1858 * tests/sort/Test.pm (11d): Reverse lines in expected output
1859 to reflect latest change.
1860 (use-nl): New test from Paul Eggert.
1862 1999-05-20 Paul Eggert <eggert@twinsun.com>
1864 * src/sort.c: Treat the trailing newline as part of the line,
1865 as required by POSIX.2.
1867 (struct line, findlines, compare, checkfp, mergefps, sort):
1868 A line now includes its trailing newline.
1869 (findlines): Do not replace newline with NUL.
1870 (memcoll, keycompare): Work even if the data to be compared are
1871 adjacent strings; this is possible now that lines contain the
1873 (fillbuf): Always have an unused byte at the end of the buffer,
1874 since memcoll and keycompare want to modify a byte after the last line.
1875 (sortalloc, mergealloc): Increase by 1, for trailing byte.
1877 1999-05-20 Jim Meyering <meyering@ascend.com>
1879 * tests/sort/Test.pm: Add test case from Paul Eggert.
1881 1999-05-20 Paul Eggert <eggert@twinsun.com>
1883 * src/sort.c (keycompare): Ignore any length difference if the
1884 localized comparison says the strings are equal.
1886 * src/sort.c (memcoll, keycompare, compare): Handle NUL
1887 characters properly when comparing with LC_COLLATE semantics.
1888 (NLS_MEMCMP): Remove.
1889 (memcoll): Renamed from strncoll.
1890 Take separate lengths for each string.
1891 This function is now invoked only when need_locale.
1892 (keycompare): Don't copy strings when ignore and translate
1895 1999-05-18 Paul Eggert <eggert@twinsun.com>
1897 * src/sort.c (MONTHTAB_CONST): Renamed from NLS_CONST; the use
1898 is also changed. Define to const also if !HAVE_NL_LANGINFO.
1900 (usage): `,' -> `;' (English typo).
1902 1999-05-17 Eli Zaretskii <eliz@is.elta.co.il>
1904 * src/cat.c (main): When stdout is in binary mode, make sure all
1905 input files are also read in binary mode.
1907 1999-05-16 Jim Meyering <meyering@ascend.com>
1911 1999-05-11 Paul Eggert <eggert@twinsun.com>
1913 * src/sort.c: Don't autodetect the locale of numbers and
1914 months, as this conflicts with POSIX.2 and is tricky to boot.
1916 (FLOATING_COMMA, NLS_STRNCMP, NLS_MAX_GROUPS,
1917 NLS_ONE_CHARACTER_STRING): Remove macros no longer used.
1919 (nls_grouping, nls_fraction_found, nls_month_found, nos_monthtab,
1920 nls_months_collide, nls_keyhead, us_monthtab): Remove variables no
1923 (struct nls_keyfield): Remove types no longer used.
1925 (strncoll_s2_readonly, nls_set_fraction, look_for_fraction,
1926 nls_month_is_either_locale, nls_numeric_format): Remove functions no
1929 (monthtab): Now has the role that us_monthtab had, but it's const only
1930 if ENABLE_NLS is not defined.
1932 (C_DECIMAL_POINT): Renamed from FLOATING_POINT. All uses changed.
1933 (MONTHS_PER_YEAR): Renamed from NLS_NUM_MONTHS. All uses changed.
1934 (struct_month_cmp): Renamed from nls_sort_month_comp. All uses changed.
1935 Use strcmp, not strcoll, since the user doesn't care about collating
1938 (inittables): Read locale data into monthtab, rather than modifying a
1939 separate month table and futzing with indirection. Do not worry about
1940 colliding months, since we no longer autodetect month locale.
1942 (fraccompare): Don't set no-longer-used variable nls_fraction_found.
1944 (getmonth): Use strncmp to compare months, since user doesn't care
1945 about collating here. Fix bug where code incorrectly assumed that
1946 strlen (monthtab[lo].name) == strlen (monthtab[ix].name).
1948 (keycompare, main): Don't autodetect month locale.
1950 (compare): Don't use NLS_MEMCP in code that can't be executed if
1951 need_locale is false, as NLS_MEMCP is equivalent to memcmp in that
1954 (sort, insertkey, main): Don't autodetect numeric locale.
1956 1999-05-15 Jim Meyering <meyering@ascend.com>
1958 * tests/join/Test.pm (trailing-sp): New test for this fix.
1959 * src/join.c (xfields): Don't interpret a trailing blank as a
1960 delimiter when e.g. -t: was specified. From Tim Smithers.
1962 1999-05-12 Jim Meyering <meyering@ascend.com>
1964 * tests/Makefile.am (envvar-check): Renamed from check-local.
1965 (check): Depend on envvar-check so the envvar check is performed
1966 before all other tests. Reported by Volker Borchert.
1967 * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects,
1968 so CDPATH is mentioned in the message. Reported by Volker Borchert.
1970 1999-05-11 Jim Meyering <meyering@ascend.com>
1972 * src/sort.c (usage): Split the --help message into two pieces so that
1973 neither is longer than 2048. For Irix4's cc. Reported by Kaveh Ghazi.
1975 1999-05-09 Jim Meyering <meyering@ascend.com>
1977 * lib/regex.c: Update from libc.
1981 * Makefile.maint (alpha): Put the announcement in
1982 /tmp/announce-$(distdir)
1984 * tests/sort/Test.pm (neg-nls): New test.
1986 1999-05-08 Jim Meyering <meyering@ascend.com>
1988 * src/system.h (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM,
1989 and all the *_MIN and *_MAX symbols): Remove definitions.
1990 * src/sys2.h: Put the definitions here instead (this file is shared
1991 between all three *utils packages, while system.h is not).
1993 1999-05-06 Paul Eggert <eggert@twinsun.com>
1995 * src/sort.c (fraccompare, numcompare): Merge the NLS and
1996 non-NLS versions into a single function.
1998 (decimal_point): Now char, since we no longer convert to unsigned
2000 (th_sep): Now int, since we use a value out of char range to denote
2001 the absence of a thousands separator.
2002 (IS_THOUSANDS_SEP): New macro.
2003 (USE_NEW_FRAC_COMPARE): Remove.
2004 (nls_set_fraction): Arg is now char, not unsigned char.
2005 Set th_sep to CHAR_MAX + 1 if there is no thousands separator.
2006 (numcompare): Don't convert to unsigned char unless necessary.
2007 (main): Turn off decimal points and thousand separators if they
2008 are multibyte characters, as we don't support that yet.
2010 1999-05-06 Paul Eggert <eggert@twinsun.com>
2012 * src/system.h (CHAR_MIN, CHAR_MAX): New macros.
2013 (SCHAR_MIN, SCHAR_MAX): Don't assume that char is signed.
2015 1999-05-06 Paul Eggert <eggert@twinsun.com>
2017 * src/sort.c (numcompare): Handle comparison of two negative
2018 numbers correctly in the ENABLE_NLS case.
2020 1999-05-04 Jim Meyering <meyering@ascend.com>
2022 * src/pr.c (usage): Break the usage message into 3 pieces instead of
2023 only 2. The strings had grown to be longer than 2048, which evokes
2024 errors when compiling with Irix4's cc. Reported by Kaveh Ghazi.
2026 * src/tsort.c (search_item): Use `1' instead of `+1'. The latter
2027 elicits a syntax error from SunOS4's cc. From Kaveh Ghazi.
2029 1999-05-03 Jim Meyering <meyering@ascend.com>
2031 * src/ptx.c <ctype.h>: Don't include.
2032 [!STDC_HEADERS]: Remove definitions of ctype macros.
2033 Convert e.g., isspace to ISSPACE to use definitions from sys2.h.
2034 Reported by Kaveh Ghazi.
2036 * src/sys2.h (TOLOWER): Define.
2038 * src/join.c (TOLOWER): Remove definition.
2039 * src/md5sum.c (TOLOWER): Remove definition.
2041 1999-04-30 Jim Meyering <meyering@ascend.com>
2043 * src/sort.c (usage): Document the differences between the
2044 obsolescent, +POS1[-POS2] form, and the POSIX -k option.
2046 1999-04-24 Jim Meyering <meyering@ascend.com>
2048 * configure.in: Use AC_CANONICAL_HOST.
2050 * lib/Makefile.am (libtu_a_SOURCES): Add xstrtoumax.c
2051 (noinst_HEADERS): Remove xstrtoul.h.
2053 * src/csplit.c: Include new "xstrtol.h", not "xstrtoul.h".
2054 (struct control) [repeat]: Declare as uintmax_t, not int.
2055 (struct control) [lines_required]: Likewise.
2056 (handle_line_error): Use human_readable to print lines_required.
2057 (parse_repeat_count): Parse a uintmax_t.
2058 (parse_patterns): Parse a uintmax_t.
2060 * src/tail.c: Include new "xstrtol.h", not "xstrtoul.h".
2061 * src/od.c: Likewise.
2063 * src/head.c: Include new "xstrtol.h", not "xstrtoul.h".
2064 Change all U_LONG_LONG to uintmax_t.
2065 (head_lines): Move a couple dcls into an inner scope.
2066 (string_to_integer): Rename from string_to_ull.
2068 1999-04-19 Jim Meyering <meyering@ascend.com>
2070 * Makefile.maint (b_host): Remove /pub suffix.
2072 1999-04-18 Jim Meyering <meyering@ascend.com>
2076 * Makefile.maint (my-distcheck): Use AMTAR, not TAR.
2078 * src/sort.c (usage): s/DIRECT/DIRECTORY/g
2079 Rename global: s/temp_file_prefix/temp_dir/.
2080 (NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,
2081 not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than
2083 (tempname): Wrap after 99999 only for length-impaired file systems.
2085 1999-04-17 Jim Meyering <meyering@ascend.com>
2087 * src/tail.c (file_lines): Fix serious bug introduced with last changes.
2088 From Andreas Schwab.
2090 1999-04-15 Jim Meyering <meyering@ascend.com>
2092 * tests/Makefile.am (EXTRA_DIST): Rename .posix-warn to .env-warn.
2093 (check-local): Warn about CDPATH in the same way
2094 we warn about POSIXLY_CORRECT, since the cp/same-file test fails at
2095 least when using bash with CDPATH set. Reported by Mark Hewitt.
2097 * src/pr.c Add comments.
2098 (init_header): Tweak white space in Date/Time header.
2099 * tests/pr/Test.pm: Updated all tests to reflect the big
2100 1999-02-13 change. From Roland Huebner.
2102 1999-04-12 Jim Meyering <meyering@ascend.com>
2104 * src/cat.c (main): Declare out_dev to be of type dev_t, not `int'.
2105 Declare out_ino to be of type ino_t, not `int'.
2108 * src/od.c (MIN, MAX): Remove definitions.
2109 * src/sys2.h (MIN, MAX): Define here instead.
2110 Reported by John Bley.
2112 1999-04-11 Jim Meyering <meyering@ascend.com>
2116 * tests/pr/Test.pm (test_vector): Disable all tests while I wait for
2119 Fix the problem whereby `yes > k & sleep 1; tail -2c k' would infloop.
2120 * src/tail.c (COPY_TO_EOF): Define.
2121 (dump_remainder): Add parameter, n_bytes, and rewrite to use it.
2123 (file_lines): Rename parameter.
2124 (tail_bytes): Remove obsolete comment.
2126 Fix the problem whereby `yes > k & sleep 1; tail -1 k' would infloop.
2127 * src/tail.c (dump_remainder): Move this function to precede the
2128 new use in file_lines.
2129 (tail_lines): Don't call dump_remainder here.
2130 (file_lines): Call dump_remainder here instead.
2131 Reported by Lehti Rami.
2133 * lib/readtokens.c (readtoken, readtokens): Protoize.
2135 1999-04-10 Jim Meyering <meyering@ascend.com>
2137 * src/tail.c (xwrite): Use STDOUT_FILENO instead of literal `1'.
2139 1999-04-04 Jim Meyering <meyering@ascend.com>
2141 * src/cat.c: Standardize --help and --version processing.
2142 * src/comm.c: Likewise.
2143 * src/csplit.c: Likewise.
2144 * src/cut.c: Likewise.
2145 * src/expand.c: Likewise.
2146 * src/fmt.c: Likewise.
2147 * src/fold.c: Likewise.
2148 * src/head.c: Likewise.
2149 * src/join.c: Likewise.
2150 * src/md5sum.c: Likewise.
2151 * src/nl.c: Likewise.
2152 * src/od.c: Likewise.
2153 * src/paste.c: Likewise.
2154 * src/pr.c: Likewise.
2155 * src/ptx.c: Likewise.
2156 * src/split.c: Likewise.
2157 * src/sum.c: Likewise.
2158 * src/tac.c: Likewise.
2159 * src/tail.c: Likewise.
2160 * src/tr.c: Likewise.
2161 * src/unexpand.c: Likewise.
2162 * src/uniq.c: Likewise.
2163 * src/wc.c: Likewise.
2165 1999-03-29 Jim Meyering <meyering@ascend.com>
2167 * configure.in (GNU_PACKAGE): Remove related code -- now it's in
2168 the catch-all for shared autoconf code, m4/jm-macros.m4.
2169 (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
2172 1999-03-26 Jim Meyering <meyering@ascend.com>
2174 * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
2175 (noinst_HEADERS): Add version-etc.h.
2177 1999-03-25 Jim Meyering <meyering@ascend.com>
2179 * src/tail.c (recheck): Factor out a block of duplicated code.
2180 Set f->size to 0 upon encountering a new file so we read it from
2181 the beginning rather than from then end of the first line or
2182 block. Otherwise, after a log rotation, tail would omit the first
2183 line or block of the new file. Reported by Ed Avis.
2185 1999-03-20 Jim Meyering <meyering@ascend.com>
2187 * tests/Makefile.am (SUBDIRS): Temporarily remove pr.
2189 1999-03-13 Jim Meyering <meyering@ascend.com>
2191 * src/tac.c (tac_mem): `#if-0'-out this unused function.
2192 (tac_stdin_to_mem): Likewise.
2194 * doc/textutils.texi (cut invocation): Describe --output-delimiter.
2196 1999-03-12 Jim Meyering <meyering@ascend.com>
2198 * src/sys2.h (SETVBUF): Define new macro.
2199 * src/tail.c (dump_remainder): Don't fflush stdout here.
2200 (main) [if forever]: Make stdout unbuffered, instead.
2201 Akim Demaille pointed out that when running `echo x>a; tail -f a>>a' ,
2202 the file `a' didn't grow longer than two lines. Now it grows
2205 1999-03-07 Jim Meyering <meyering@ascend.com>
2207 * tests/md5sum/newline-1: Test for the actual feature.
2208 With help from Eli Zaretskii.
2210 * src/pr.c (usage): Add missing \n\.
2212 The newline test would always fail on MSDOS/Windows systems --
2213 so move it to a separate file where we can test for that.
2214 * tests/md5sum/basic-1: Remove newline test.
2215 * tests/md5sum/newline-1: New file.
2216 * tests/md5sum/Makefile.am (TESTS): Add newline-1.
2217 Pointed out by Eli Zaretskii.
2219 1999-02-13 Roland Huebner <rh@pelikan.cologne.de>
2221 (main): Redefine options -s, -w to be POSIX compliant; introduce
2222 new options -J, -S, -W to disentangle -s and -w when used together
2223 with the three column options;
2224 (add_line_number): Make POSIX compliant; use default number
2225 separator TAB with single column output.
2226 (add_line_number): Make POSIX compliant; with multicolumn output
2227 now prefer `text columns of equal width' rather than a consequent
2228 use of `default n-separator TAB'.
2229 (add_line_number): Change line number cut-off from lower-oder to
2230 higher-oder digit to avoid loss of information; no consequent
2231 handling exists in different utilities and other UNIXes.
2232 (char_to_clump): Expand input text tabs to 8 spaces, if
2233 input_tab_char doesn't equal TAB (adapted to other UNIXes).
2234 (usage): Update POSIX compliant options -s, -w; add new options -J,
2236 (main): Update the source internal documentation.
2237 Some smaller BUGFIXES (print_sep_string, init_header, skip_to_page,
2238 reset_status, print_header).
2240 * tests/md5sum/basic-1 (backslash): Use .\foo instead of \.foo so we
2241 don't tramp on root directory in MSDOS/Windows.
2242 Suggestion from Eli Zaretskii.
2244 1999-02-15 Eli Zaretskii <eliz@is.elta.co.il>
2246 * tests/md5sum/Makefile.am (TESTS_ENVIRONMENT): Run md5sum with the
2247 --text option (for MSDOS).
2249 1999-03-06 Jim Meyering <meyering@ascend.com>
2251 * src/cut.c (getstr): Change type of `delim' parameter from char to int.
2252 (cut_fields): Cast to `unsigned char' before comparing.
2253 (main): Cast to `unsigned char' before assigning.
2255 * tests/cut/Test.pm: Add a test to exercise the bug.
2257 * src/ptx.c (swallow_file_in_memory): Use a `%s' format in error call,
2258 in case the argument string contains a `%'.
2260 * src/fmt.c (main): Likewise.
2261 * src/sort.c (main): Likewise.
2263 1999-02-13 Eli Zaretskii <eliz@is.elta.co.il>
2265 * src/sys2.h [__DJGPP__]: Include <io.h> and <sys/exceptn.h>.
2267 * src/ptx.c (swallow_file_in_memory): Slurp up the whole file at
2268 once on MSDOS as well, but we have to relax the test for whether
2269 reading it succeeded.
2271 1999-03-03 Jim Meyering <meyering@ascend.com>
2273 * src/cat.c: Include long-options.h
2274 [long_options]: Remove the "help" and "version" entries.
2275 Remove declarations of show_help and show_version.
2276 (main): Use parse_long_options, including author name(s).
2277 Remove the show_version and show_help blocks.
2278 * src/cksum.c: Likewise.
2279 * src/comm.c: Likewise.
2280 * src/csplit.c: Likewise.
2281 * src/cut.c: Likewise.
2282 * src/expand.c: Likewise.
2283 * src/fmt.c: Likewise.
2284 * src/fold.c: Likewise.
2285 * src/head.c: Likewise.
2286 * src/nl.c: Likewise.
2287 * src/od.c: Likewise.
2288 * src/paste.c: Likewise.
2289 * src/pr.c: Likewise.
2290 * src/split.c: Likewise.
2291 * src/sum.c: Likewise.
2292 * src/tac.c: Likewise.
2293 * src/tail.c: Likewise.
2294 * src/tr.c: Likewise.
2295 * src/unexpand.c: Likewise.
2296 * src/uniq.c: Likewise.
2297 * src/wc.c: Likewise.
2299 * src/ptx.c: Include long-options.h
2300 [long_options]: Remove the "help" and "version" entries.
2301 Remove declarations of show_help and show_version.
2302 (main): Remove `const' attribute from dcl of argv parameter.
2303 Call bindtextdomain and textdomain.
2304 Use parse_long_options, including author name(s).
2305 Remove the show_version and show_help blocks.
2307 * src/join.c (main): Include author name argument in call to
2309 * src/md5sum.c (main): Likewise.
2310 * src/sort.c (main): Likewise.
2311 * src/tsort.c (main): Likewise.
2313 1999-02-07 Jim Meyering <meyering@ascend.com>
2317 * Makefile.maint (my-distcheck): Don't depend on dist, now that this
2318 is hooked up to the distcheck rule.
2319 * Makefile.am (distcheck-hook): New target and rule -- link to shared
2320 rule, my-distcheck, in Makefile.maint.
2322 1999-01-31 Jim Meyering <meyering@ascend.com>
2324 * doc/textutils.texi: Wrap the @top node in @ifnottex instead of
2325 @ifinfo so `makeinfo --html ...' works. From Karl Berry.
2327 1999-01-30 Jim Meyering <meyering@ascend.com>
2329 * acconfig.h: Remove lots of `#undef's, now that we use the
2330 3-argument forms of AC_DEFINE* macros.
2332 * configure.in: Require autoconf 2.13.
2333 Use 3-argument form of AC_DEFINE*.
2335 1999-01-24 Jim Meyering <meyering@ascend.com>
2337 * src/tac.c (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.
2339 * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
2340 (and hence that of the local `n1', too) to `int' at Paul's request.
2342 1999-01-18 Akim Demaille <demaille@inf.enst.fr>
2344 * doc/textutils.texi: Harmonization of @samp use for options.
2346 1999-01-17 Jim Meyering <meyering@ascend.com>
2348 * Makefile.am (SUBDIRS): Add djgpp.
2349 * configure.in (AC_OUTPUT): Add djgpp/Makefile.
2350 * djgpp/: New directory.
2352 * man/Makefile.maint ($(man_MANS)): Don't remove the target (the
2353 man page) until after we've created its replacement.
2355 1999-01-16 Eli Zaretskii <eliz@is.elta.co.il>
2357 * GNUmakefile: Add SHELL = /bin/sh.
2358 * man/GNUmakefile: Likewise.
2360 1999-01-16 Jim Meyering <meyering@ascend.com>
2362 * acconfig.h: Remove @BOTTOM@ section.
2363 Instead, add the define and decl via m4/jm-macros.m4.
2365 * lib/argmatch.h (XARGMATCH): Define to return a value once again.
2366 (XARGCASEMATCH): Likewise.
2368 * lib/argmatch.c (EXIT_FAILURE): Define.
2369 (ARGMATCH_DIE): Provide default.
2370 (__xargmatch_internal): New function.
2371 s/rogram_name/program_name.
2374 1999-01-14 Jim Meyering <meyering@ascend.com>
2376 * tests/md5sum/basic-1: Use `f', not `x' as temp. file name to avoid
2377 warnings from perl5.004.
2378 Reported by Volker Borchert.
2380 * lib/long-options.c (parse_long_options): Rename `usage' parameter
2381 to avoid shadowing globally scoped function.
2383 1999-01-14 Akim Demaille <demaille@inf.enst.fr>
2385 * acconfig.h: Add a @BOTTOM@ section.
2386 (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1).
2388 * src/*.c: Don't prototype usage as static.
2390 1999-01-10 Jim Meyering <meyering@ascend.com>
2394 All of the following new code is protected by
2395 `#if DONT_UNLINK_WHILE_OPEN'
2396 * src/tac.c (file_to_remove): New global.
2397 (fp_to_close): New global.
2398 (unlink_tempfile): New function.
2399 (record_tempfile): New function.
2400 (save_stdin): Call record_tempfile.
2402 (main): Use SET_BINARY and SET_BINARY2.
2405 1999-01-09 Jim Meyering <meyering@ascend.com>
2407 * tests/uniq/Test.pm: Add tests from Jochen Hein.
2408 * src/uniq.c: New option: --all-repeated (-D).
2409 (output_all_repeated) [output_mode]: New enum value.
2410 (usage): Describe it.
2411 (writeline): Test for new mode.
2412 (check_file): Likewise.
2413 Based on patches from Jochen Hein and Florin Iucha.
2414 (main): Diagnose `too many arguments'.
2416 * tests/head/Test.pm (null-1): Add test from Jochen Hein.
2418 * src/tail.c (parse_obsolescent_option): Interpret `number' as decimal.
2419 (parse_options): Likewise.
2420 Reported by Kamal Paul Nigam.
2422 * src/tail.c: New option: --max-unchanged-stats=N.
2423 New option: --max-n-consecutive-size-changes=N.
2425 1999-01-03 Jim Meyering <meyering@ascend.com>
2427 * src/md5sum.c (usage): Remove third program_name argument -- there
2428 were only two `%s' in the format string.
2430 1999-01-02 Jim Meyering <meyering@ascend.com>
2432 * src/tsort.c (tsort): Use a single call to error instead of two
2434 (main): Remove `%s: ' prefix on format string.
2436 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
2438 * src/ptx.c (format_vals): New array.
2439 (main): Use XARGMATCH in place of argmatch.
2441 * lib/argmatch.h (XARGMATCH): Don't return a value; instead,
2442 modify a parameter. Add a `Die_stmt' parameter.
2444 * lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
2445 (argmatch_to_argument): Add `const' attribute to first parameter.
2447 1999-01-01 Jim Meyering <meyering@ascend.com>
2449 * src/tsort.c: Move inclusion of assert.h to follow that of stdio.h.
2450 Some losing systems require this.
2451 Use STREQ macro instead of strcmp in a few places.
2453 * po/POTFILES.in: Add tsort.c.
2455 * man/Makefile.maint ($(man_MANS)): `exit 1' if any of help2man,
2456 chmod, or mv fails. Otherwise, the failure could go unnoticed.
2458 * man/Makefile.summ: Add entries for ptx and tsort.
2460 * src/tsort.c: Include readtokens.h.
2461 (zeros): Rename global from `rr'.
2462 (getstr): Remove function.
2463 (tsort) Use readtoken instead of getstr.
2465 * lib/readtokens.c: New file.
2466 * lib/readtokens.h: New file.
2467 * lib/Makefile.am (libtu_a_SOURCES): Add readtokens.c.
2468 (noinst_HEADERS): Add readtokens.h.
2470 * man/Makefile.am (man_MANS): Add ptx.1.
2471 * man/ptx.x: New file.
2473 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
2475 * man/Makefile.am (man_MANS): Add tsort.1.
2476 * man/tsort.x: New (essentially empty) file.
2478 * src/tsort.c: Rename globals N and R so they don't shadow locals.
2479 (tsort): Rename from `sort'.
2481 1998-11-07 Mark Kettenis <kettenis@phys.uva.nl>
2482 * src/Makefile.am (bin_PROGRAMS): Add tsort.
2483 * src/tsort.c: New program.
2485 * lib/Makefile.am (libtu_a_SOURCES): Add quotearg.c.
2486 (noinst_HEADERS): Add quotearg.h.
2488 ============================
2489 All of the following are from:
2490 1998-04-17 Eli Zaretskii <eliz@is.elta.co.il>
2492 * src/system.h (SET_BINARY, SET_BINARY2, fileno, setmode): New
2495 * src/cat.c (usage) [O_BINARY]: Describe -B,--binary option.
2496 (main) [O_BINARY]: binary_files, binary_output, file_open_mode:
2497 new variables. Add --binary to long_options[]. Switch stdin and
2498 stdout to binary mode unless file contents are not important
2499 anyway. Open files in binary mode when required.
2501 * src/cksum.c (cksum) [O_BINARY]: Read redirected stdin in binary
2504 * src/expand.c (expand): Use binary I/O where appropriate.
2506 * src/head.c (head_bytes, head_lines) [O_BINARY]: Use binary I/O.
2508 * src/md5sum.c (OPENOPTS) [O_BINARY]: Use binary I/O when non-zero
2510 (md5_file) [O_BINARY]: Switch redirected stdin to binary mode.
2511 (main) [O_BINARY]: Use binary reads by default on those systems
2512 which care about the difference.
2514 * src/od.c (skip, read_char, read_block) [O_BINARY]: Switch input
2515 stream to binary mode.
2517 * src/sort.c (PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max
2518 file name characters in a given directory.
2519 (tempname): Make sure the temp file name is unique even if long
2520 file names aren't supported.
2522 * src/split.c (cwrite) [O_BINARY]: Write output in binary mode.
2523 (main) [O_BINARY]: Read input in binary mode.
2525 * src/sum.c (bsd_sum_file, sysv_sum_file) [O_BINARY]: Read input
2528 * src/tac.c (record_tempfile, unlink_tempfile)
2529 [DONT_UNLINK_WHILE_OPEN]: New functions, for systems where a file
2530 cannot be removed before it is closed.
2531 (save_stdin) [DONT_UNLINK_WHILE_OPEN]: Record the temporary file,
2532 to be removed before exit.
2533 (tac_file, save_stdin, main): Use binary I/O when appropriate.
2535 * src/tail.c (tail_lines, tail_bytes) [O_BINARY]: Use binary I/O
2538 * src/tr.c (main) [O_BINARY]: Use binary I/O when appropriate.
2540 * src/unexpand.c (unexpand): Use binary I/O where appropriate.
2542 * src/wc.c (wc): Use binary mode for input.
2544 * doc/textutil.texi: Add comments about peculiarities of Textutils
2545 operation on MS-DOS/MS-Windows.
2547 1998-12-22 Jim Meyering <meyering@ascend.com>
2549 * configure.in (ALL_LINGUAS): Add chinese (zh).
2551 1998-12-17 Jim Meyering <meyering@ascend.com>
2553 New options for tail:
2554 --follow=name, --follow=descriptor, --allow-missing
2555 * src/tail.c (Follow_mode): New enum.
2556 (n_live_files): New function.
2557 (tail_forever): Avoid starvation with --follow=name and a
2558 continually-growing unlinked or renamed file.
2560 1998-12-13 Jim Meyering <meyering@ascend.com>
2562 * tests/uniq/Test.pm: New file.
2563 * tests/uniq/Makefile.am: New file.
2564 * tests/uniq: New directory.
2565 * tests/Makefile.am (SUBDIRS): Add uniq.
2566 * configure.in (AC_OUTPUT): Add tests/uniq/Makefile.
2569 * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
2571 (EXTRA_DIST): Add xstat.in.
2572 * lib/stat.c: Remove file.
2573 * lib/lstat.c: Remove file.
2574 * lib/xstat.in (xstat@): New file.
2576 * configure.in (ALL_LINGUAS): Add Russian (ru).
2578 1998-10-31 Jim Meyering <meyering@ascend.com>
2580 * acconfig.h (stat): New #undef.
2582 1998-10-22 Jim Meyering <meyering@ascend.com>
2584 * src/fold.c (usage): Add mention of --version and --help.
2585 Reported by Matej Vela <mvela@public.srce.hr>.
2587 1998-10-04 Jim Meyering <meyering@ascend.com>
2589 * lib/fnmatch.h: New file. (unused)
2590 * lib/fnmatch.c: New file. (unused)
2591 * lib/Makefile.am (noinst_HEADERS): Add fnmatch.h.
2593 1998-10-03 Jim Meyering <meyering@ascend.com>
2595 * man/Makefile.am: Switch to using help2man.
2596 (EXTRA_DIST): Add Makefile.summ.
2598 * man/help2man: Invoke program with --manhelp option only if
2599 --name=STRING not specified. Otherwise, this would fail with `yes'.
2600 * man/Makefile.summ: New file.
2601 * man/Makefile.maint: Include it.
2602 * man/help2man: New file.
2603 * man/GNUmakefile: New file.
2604 * man/Makefile.maint: New file.
2605 * man/*.x: New files.
2606 * man/*.1: Remove files.
2608 * src/md5sum.c (split_3): Rename local variable, to `escaped_filename'.
2609 (main): Output the leading backslash not just when there's a newline
2610 in the file name, but also when there's a backslash.
2611 Reported by Jim Dennis.
2613 * tests/md5sum/basic-1: Add tests with filenames containing newline
2614 and backslash characters. (for the bug fixed above)
2616 * tests/Makefile.am (EXTRA_DIST): Add Fetish.pm.
2617 * tests/Fetish.pm: New file.
2619 * tests/md5sum/basic-1: New file: rewrite of old tests to use Fetish.pm.
2620 * tests/md5sum/Test.pm: Remove file.
2621 * tests/md5sum/Makefile.am: Rewrite.
2623 1998-09-19 Jim Meyering <meyering@ascend.com>
2625 * src/ptx.c (program_name): Declare *not* to be const.
2627 1998-08-29 Jim Meyering <meyering@ascend.com>
2629 * src/cut.c: Don't assume ASCII.
2630 * src/pr.c: Likewise.
2631 * src/tail.c: Likewise.
2633 1998-08-15 Jim Meyering <meyering@ascend.com>
2635 * src/pr.c (usage): Reformat.
2637 * src/ptx.c: Add braces to suppress warning about ambiguous `else'.
2638 * lib/bumpalloc.h: Likewise.
2640 1998-08-13 François Pinard <pinard@iro.umontreal.ca>
2642 * src/ptx.c: New file.
2643 * src/Makefile.am (bin_PROGRAMS): Add ptx.
2644 * lib/bumpalloc.h, lib/diacrit.h, lib/diacrit.c: New files.
2645 * lib/Makefile.am (libtu_a_SOURCES): Add diacrit.c.
2646 (noinst_HEADERS): Add bumpalloc.h and diacrit.h.
2648 1998-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2650 * src/pr.c (long_options): Add long names for all options.
2651 (usage): Update help string.
2652 (main): Handle the special options --pages and --columns.
2654 1998-08-02 Jim Meyering <meyering@ascend.com>
2656 * lib/linebuffer.c (readline): Return zero upon error as well as upon
2657 end of file. From James Youngman.
2660 1998-08-01 Jim Meyering <meyering@ascend.com>
2662 * src/sort.c (my_setlocale): Guard definition within #ifdef ENABLE_NLS.
2663 From Manfred Hollstein.
2665 1998-07-30 Jim Meyering <meyering@ascend.com>
2667 * tests/cut/Test.pm: Avoid broken pipe message for tests that fail
2670 * src/sort.c (usage): Add angle brackets to make `Report bugs...'
2671 message consistent with all the rest.
2673 1998-07-28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2675 * tests/cut/Test.pm: Avoid broken pipe for 'y' and 'z' tests.
2677 * src/sort.c (NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid
2678 clash with <langinfo.h>. All uses changed.
2680 1998-07-26 Jim Meyering <meyering@ascend.com>
2682 * intl/localealias.c (read_alias_file): Avoid mixing `char*' and
2683 `unsigned char*' variables. Again for irix4.
2684 Mostly from Kaveh Ghazi.
2686 * src/join.c: Convert some char* dcls to `unsigned char*' and remove
2687 a cast -- to placate irix4's cc.
2688 * src/fmt.c (check_punctuation): Add cast to placate irix4's cc.
2689 Reported by Kaveh Ghazi.
2691 * src/md5sum.c (split_3): Add cast to placate irix4's cc.
2694 1998-07-25 Jim Meyering <meyering@ascend.com>
2698 * tests/cut/Test.pm: Add tests for new --output-delimiter option,
2699 as well as for NUL input delimiter (--delimiter='').
2700 * src/cut.c (cut_fields): Honor new --output-delimiter option.
2701 (main): Fix handling of --delimiter='' (-d ''). Until now, it has
2702 never worked as advertised. I guess no one tried it.
2704 * tests/sort/Test.pm: Add two tests relating to this.
2705 * src/sort.c (main): Stat all non-`-' input file files (and fail if a
2706 stat fails) when an output file is specified by `-o' but doesn't exist.
2707 Reported by Will Edgington.
2709 * tests/sort/Test.pm: New tests of -o.
2711 1998-07-16 Jim Meyering <meyering@ascend.com>
2713 * lib/Makefile.am (noinst_HEADERS): Add lchown.h.
2714 * lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
2715 * lib/lchown.c: Include lchown.h.
2717 1998-07-04 Jim Meyering <meyering@ascend.com>
2719 * configure.in (AM_WITH_REGEX): Remove. Now the replacement
2720 macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
2721 * acconfig.h (WITH_REGEX): Remove undef.
2722 * src/csplit.c: Remove #ifdef around <regex.h> inclusion.
2723 * src/nl.c: Likewise.
2724 * src/tac.c: Likewise.
2725 * src/csplit.c (extract_regexp): Remove #if !WITH_REGEX...#endif block.
2726 * lib/Makefile.am (noinst_HEADERS): Remove rx.h.
2727 * lib/rx.c: Remove file.
2728 * lib/rx.h: Remove file.
2730 1998-06-29 Jim Meyering <meyering@ascend.com>
2732 * src/wc.c: Update calls to human_readable -- now there's one fewer arg.
2734 * lib/Makefile.am (libtu_a_SOURCES): Add argmatch.c.
2735 (noinst_HEADERS): Add argmatch.h.
2737 1998-06-28 Jim Meyering <meyering@ascend.com>
2739 * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.
2741 1998-06-27 Jim Meyering <meyering@ascend.com>
2743 * tests/pr/Test.pm: Add two tests for double spacing.
2744 * src/pr.c (print_page): If cols_ready_to_print is zero,
2745 break out of loop just before the double-space test.
2746 Reported by Michael Stutz.
2748 1998-06-18 Jim Meyering <meyering@ascend.com>
2750 * tests/Makefile.am.in (check): Depend on $(maint_gen) so
2751 `make maintainer-clean; ./configure; make check' works.
2753 1998-05-25 Jim Meyering <meyering@ascend.com>
2755 * configure.in (_GNU_SOURCE): AC_DEFINE it here.
2756 * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section.
2757 [!_GNU_SOURCE]: Add #undef instead.
2759 1998-05-16 Jim Meyering <meyering@ascend.com>
2761 * configure.in (jm_MACROS): New wrapper macro.
2762 Remove uses of most jm_* macros.
2764 * src/tac.c (tac_seekable): Fix error in handling regex separators.
2765 * tests/tac/Test.pm (opt-b, opt-s, opt_sb, opt_r): New tests.
2766 (opt_br): New test -- exercises above-fixed bug.
2768 * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS='
2769 lines from the m4/*.m4 macros, so the hack of including some
2770 custom-replaced C source file names here is no longer needed.
2772 * acconfig.h (chown): Add undef.
2773 (D_INO_IN_DIRENT): Likewise.
2774 (D_TYPE_IN_DIRENT): Likewise.
2775 (ssize_t): Likewise.
2777 1998-05-09 Jim Meyering <meyering@ascend.com>
2779 * src/tac.c (tac_seekable): Rename from tac_stream.
2780 Change `FILE *in' parameter to `int input_fd'. Adjust callers.
2782 1998-05-03 Jim Meyering <meyering@ascend.com>
2784 * po/: Update from gettext-0.10.35.
2786 * configure.in: Remove use of AC_LINK_FILES.
2787 (AC_OUTPUT): Remove po/Makefile-generating sed command.
2789 1998-04-26 Jim Meyering <meyering@ascend.com>
2791 * tests/tail/Test.pm: Disable test f-1, now that it fails.
2793 * src/sort.c (keycompare) (CMP_WITH_IGNORE): Don't return 0 from inside
2794 the keyspec-iterating loop. With this change, test 22a passes.
2795 Reported by Zvi Har'El.
2796 (strncoll): Remove bogus assertion.
2797 * tests/sort/Test.pm: Add tests for the above fix.
2799 * configure.in: Use jm_ASSERT.
2800 * acconfig.h: Add NDEBUG.
2802 * src/cut.c: Don't define NDEBUG.
2803 * src/csplit.c: Likewise.
2804 * src/join.c: Likewise.
2805 * src/sort.c: Likewise.
2806 * src/tr.c: Likewise.
2808 * src/cut.c: Don't define _GNU_SOURCE (now it's in config.h).
2809 * src/expand.c: Likewise.
2810 * src/fold.c: Likewise.
2811 * src/join.c: Likewise.
2812 * src/sort.c: Likewise.
2813 * src/tr.c: Likewise.
2814 * src/unexpand.c: Likewise.
2815 * src/uniq.c: Likewise.
2817 * src/tail.c (close_fd): New function -- converted from macro.
2818 [struct File_spec] (n_stat_calls): New member.
2819 [struct File_spec] (n_unchanged_stats): New member.
2820 (max_n_unchanged_stats): New global.
2821 Initialize new members.
2822 (xwrite): New function -- converted from macro.
2823 [struct File_spec] (pretty_name): Remove member.
2824 (pretty_name): New function.
2826 * src/md5sum.c (md5_check): Declare local, `md5num' as _unsigned_ char*.
2827 (hex_digits): Declare parameter `s' as _unsigned_ char*.
2828 (split_3): Declare parameter `u' as _unsigned_ char**.
2830 1998-04-17 Jim Meyering <meyering@ascend.com>
2832 * src/fmt.c (check_punctuation): Used unsigned char* pointers to avoid
2834 * src/join.c (xfields): Likewise.
2836 1998-04-12 Jim Meyering <meyering@ascend.com>
2838 * src/cat.c: Use STREQ macro rather than strcmp.
2839 * src/cksum.c: Likewise.
2840 * src/comm.c: Likewise.
2841 * src/csplit.c: Likewise.
2842 * src/cut.c: Likewise.
2843 * src/fmt.c: Likewise.
2844 * src/fold.c: Likewise.
2845 * src/head.c: Likewise.
2846 * src/join.c: Likewise.
2847 * src/md5sum.c: Likewise.
2848 * src/nl.c: Likewise.
2849 * src/paste.c: Likewise.
2850 * src/pr.c: Likewise.
2851 * src/split.c: Likewise.
2852 * src/sum.c: Likewise.
2853 * src/tac.c: Likewise.
2854 * src/uniq.c: Likewise.
2855 * src/wc.c: Likewise.
2857 1998-04-11 Jim Meyering <meyering@ascend.com>
2859 * lib/safe-read.h: New file.
2860 * lib/safe-read.c: Include it.
2861 * src/cat.c: Include it instead of merely declaring safe_read.
2862 * src/csplit.c: Likewise.
2863 * src/head.c: Likewise.
2864 * src/split.c: Likewise.
2865 * src/sum.c: Likewise.
2866 * src/tac.c: Likewise.
2867 * src/tail.c: Likewise.
2868 * src/tr.c: Likewise.
2869 * src/wc.c: Likewise.
2871 * lib/Makefile.am (noinst_HEADERS): Add safe-read.h.
2873 * src/wc.c [HAVE_INTTYPES_H]: Include inttypes.h.
2874 Declare counters to be of type uintmax_t.
2875 (write_counts): Use human_readable to format potentially-long-long
2876 numbers. Suggestion from Rogier Wolff.
2877 (wc): Declare per-file counters to be of type uintmax_t.
2878 Declare bytes_read to be ssize_t.
2879 * lib/Makefile.am (libtu_a_SOURCES): Add human.c.
2880 (noinst_HEADERS): Add human.h.
2882 * lib/human.c: New file.
2883 * lib/human.h: New file.
2885 1998-04-04 Jim Meyering <meyering@eng.ascend.com>
2887 * configure.in (jm_AC_HEADER_INTTYPES_H): Use it.
2888 (jm_AC_TYPE_UINTMAX_T): Use it.
2889 (jm_PREREQ): Use it.
2891 * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
2892 know about the m4/ subdirectory.
2893 * Makefile.maint (aclocal-files): Remove now-unnecessary (with
2894 automake-1.2h and the above change) aclocal-related rules and includes.
2896 1998-04-03 Jim Meyering <meyering@eng.ascend.com>
2898 * lib/closeout.c: New file.
2899 * lib/closeout.h: New file.
2900 * lib/Makefile.am (libtu_a_SOURCES): Add closeout.c.
2901 (noinst_HEADERS): Add closeout.h.
2903 1998-03-31 Jim Meyering <meyering@eng.ascend.com>
2905 * lib/xstrtol.c: Merge with the version from fileutils.
2907 1998-03-27 Jim Meyering <meyering@eng.ascend.com>
2909 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.
2911 1998-03-23 Jim Meyering <meyering@eng.ascend.com>
2913 * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
2914 automatically handles it.
2916 1998-03-19 Jim Meyering <meyering@eng.ascend.com>
2918 * src/system.h (SCHAR_MIN): Define.
2920 od.c needs these when compiling with NCR's R2.0c C compiler.
2921 (TYPE_MAXIMUM): Cast result to `(t)' so this macro works with
2925 1998-03-15 Jim Meyering <meyering@eng.ascend.com>
2927 * src/tail.c (tail_file): Merge largely-duplicated blocks of code.
2929 1998-03-03 Paul Eggert <eggert@twinsun.com>
2931 * src/sort.c (xtmpfopen): Open temporary file exclusively, to
2932 foil a common denial-of-service attack.
2933 * src/tac.c (save_stdin): Likewise.
2935 1998-02-16 Jim Meyering <meyering@eng.ascend.com>
2937 * configure.in (jm_FUNC_LSTAT): Use it.
2938 (jm_FUNC_STAT): Use it.
2939 * lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c.
2941 1998-02-06 Jim Meyering <meyering@eng.ascend.com>
2943 * configure.in: Don't use AM_MAINTAINER_MODE or
2944 AC_PATH_PROG(PERL, perl).
2945 (jm_PERL): Use this.
2947 1998-02-04 Jim Meyering <meyering@eng.ascend.com>
2949 * tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl.
2950 (mk_script): Set to ../mk-script.
2951 (x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script.
2952 Remove @MAINT@ cruft.
2953 (Makefile.am): Likewise.
2954 Remove @MAINT@ cruft. Now `missing' will explain the failure
2955 when people don't have Perl yet modify a file whose rebuilding
2956 would lead to the use of Perl.
2958 * tests/Makefile.am (EXTRA_DIST): Add mk-script.
2959 * tests/*/mk-script.pl: Remove files.
2961 * GNUmakefile: New file.
2962 * Makefile.am (EXTRA_DIST): Add GNUmakefile.
2963 Don't include Makefile.maint from here. It's included from GNUmakefile.
2965 1998-01-30 Paul Eggert <eggert@twinsun.com>
2967 * configure.in (AC_LFS): Put before anything that can affect or use
2968 CPPFLAGS, LDFLAGS, or LIBS.
2970 1998-01-25 Jim Meyering <meyering@na-net.ornl.gov>
2972 * Makefile.maint: New file.
2973 * Makefile.am: Move rules common to textutils, fileutils, sh-utils
2974 into Makefile.maint.
2975 Include Makefile.maint.
2976 (EXTRA_DIST): Add Makefile.maint.
2978 * src/cat.c (cat): Convert comma-expressions to pairs of
2979 semicolon-terminated stmts.
2980 Add braces around compound if/else stmts.
2982 1998-01-24 Jim Meyering <meyering@na-net.ornl.gov>
2984 * src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...'
2985 as obsolescent options.
2986 Accept new option: --sleep-interval=SECONDS (-s).
2987 (parse_options): Recognize it.
2988 (usage): Describe it.
2989 (tail_forever): Use it.
2990 (dump_remainder): Use it.
2991 * tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'.
2993 * tests/cut/: Rename directory to remove `-test' suffix.
2994 * tests/join/: Likewise.
2995 * tests/md5sum/: Likewise.
2996 * tests/pr/: Likewise.
2997 * tests/sort/: Likewise.
2998 * tests/tr/: Likewise.
2999 * configure.in (AC_OUTPUT): Reflect renamings in tests/.
3000 * tests/Makefile.am (SUBDIRS): Reflect renamings in tests/.
3002 * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
3003 bug in Cray C 5.0.3.0 when T == time_t.
3005 1998-01-18 Jim Meyering <meyering@na-net.ornl.gov>
3007 * src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction,
3008 numcompare): Remove the `unsigned' from some `unsigned char*'
3009 parameter types. Add casts via UCHAR where necessary to avoid
3010 problems with unwanted sign extension. Based on a patch from
3011 Kaveh Ghazi to appease Irix4's cc compiler.
3013 1998-01-17 Jim Meyering <meyering@na-net.ornl.gov>
3015 * src/split.c (next_file_name): Rewrite. This removes an artificial
3016 limit (albeit already high, at INT_MAX :-) on the number of files
3017 split could create. Reported by Ralf W. Stephan.
3019 1998-01-16 Jim Meyering <meyering@na-net.ornl.gov>
3021 * src/sort.c (mergefps): Add braces to avoid ambiguous `else' stmt.
3022 (nls_set_fraction): Likewise.
3024 * src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
3025 for Irix-4.0.5. From Kaveh Ghazi.
3026 * configure.in: Check for langinfo.h.
3028 * lib/getline.c: Make PARAMS-defining conditionals consistent.
3029 * lib/linebuffer.h: Likewise.
3030 * lib/long-options.h: Likewise.
3031 * lib/memcasecmp.h: Likewise.
3032 * lib/xstrtod.h: Likewise.
3033 * lib/xstrtol.h: Likewise.
3034 Suggestion from Kaveh Ghazi.
3036 * tests/head/Test.pm (fail-0): Disable test. It depends on
3037 sizeof(long) being 32 bits. Reported by Kaveh Ghazi.
3039 1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
3043 * src/system.h [HAVE_LIMITS_H]: Include limits.h
3044 (TYPE_SIGNED): Define.
3045 (TYPE_MINIMUM): Define.
3046 (TYPE_MAXIMUM): Define.
3048 (SCHAR_MAX): Define.
3049 (UCHAR_MAX): Define.
3054 (ULONG_MAX): Define.
3055 * src/*.c: Remove definitions of those symbols.
3057 * src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
3058 since it now includes limit.h which defines RE_DUP_MAX.
3059 * src/nl.c: Likewise.
3060 * src/tac.c: Likewise.
3062 * lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE.
3063 Rewrite macro as function. Return a value. Update caller.
3064 Cast __ZLONG_MAX `__unsigned long int' before casting to double to
3065 avoid SunOS /bin/cc compiler bug.
3067 1998-01-08 Jim Meyering <meyering@na-net.ornl.gov>
3069 * src/tac-pipe.c: New file. But not yet used.
3070 * src/Makefile.am (EXTRA_DIST): Add tac-pipe.c.
3072 * src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer
3073 result of xrealloc (until recently it was char*).
3075 * configure.in (AC_CHECK_FUNCS): Add nl_langinfo.
3076 * src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test
3077 guarding the nls month-checking code.
3078 (nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
3079 `unsigned' from dcls of text and lim.
3080 (main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.
3082 1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
3084 * lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
3086 * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
3087 those files will be built via the ANSI2KNR-filtering rules if necessary.
3089 1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
3091 * configure.in: Remove AC_DEFINE of _GNU_SOURCE.
3092 * acconfig.h (_GNU_SOURCE): Define if not already defined.
3093 Put this code in @TOP@ section.
3094 (_GNU_SOURCE): Remove #undef.
3096 1997-12-22 Jim Meyering <meyering@na-net.ornl.gov>
3098 * configure.in: AC_DEFINE _GNU_SOURCE.
3099 * acconfig.h: Add _GNU_SOURCE.
3101 1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
3103 * configure.in (AC_CHECK_HEADERS): Add stdlib.h.
3105 * src/system.h: Merge in things from fileutils' version of this file.
3106 * src/csplit.c: s/__P/PARAMS/.
3107 * src/fmt.c: s/__P/PARAMS/.
3108 * src/od.c: s/__P/PARAMS/.
3109 * src/pr.c: s/__P/PARAMS/.
3111 1997-12-14 Jim Meyering <meyering@na-net.ornl.gov>
3113 * src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g.
3115 1997-12-13 Jim Meyering <meyering@na-net.ornl.gov>
3117 * src/fmt.c (main): Add some braces.
3118 Check return code from fclose of each input file.
3119 Close stdout and check for errors.
3121 * src/csplit.c (close_output_file): Check ferror before calling fclose.
3122 (main): Close stdout and check for errors.
3124 1997-11-15 Jim Meyering <meyering@na-net.ornl.gov>
3126 * acconfig.h: Add mktime.
3127 * configure.in (jm_FUNC_MKTIME): Use it.
3128 * lib/mktime.c: New file.
3129 * lib/Makefile.am (EXTRA_DIST): Add mktime.c
3131 * intl/Makefile.in (distclean): Don't remove libintl.h here.
3132 * Makefile.am (DISTCLEANFILES): Remove it here instead.
3134 1997-11-13 Jim Meyering <meyering@na-net.ornl.gov>
3136 * lib/strftime.c: Update from FSF.
3137 * m4/strftime.m4: Check for POSIX.2's %f format spec.
3139 1997-11-12 Jim Meyering <meyering@na-net.ornl.gov>
3141 * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define.
3142 * configure.in (AC_CHECK_FUNCS): Add mempcpy.
3144 1997-11-09 Jim Meyering <meyering@na-net.ornl.gov>
3146 * configure.in (jm_FUNC_STRFTIME): Use it.
3147 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
3148 * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
3149 (jm_FUNC_GNU_STRFTIME): Use new macro.
3150 (jm_FUNC_STRFTIME): New macro. Likewise.
3151 Reported by Noel Cragg.
3153 1997-11-08 Jim Meyering <meyering@na-net.ornl.gov>
3155 * m4/lfs.m4 (AC_LFS): New file/macro.
3156 * m4/Makefile.am (EXTRA_DIST): Add lfs.m4.
3157 * configure.in (AC_LFS): Use it.
3158 (AC_CHECK_FUNCS): Add fseeko.
3159 * src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO.
3160 (skip): Use fseeko if available. Don't use lseek; it causes
3161 the stdio stream to become out of sync with respect to the
3162 underyling file descriptor.
3165 1997-10-16 Paul Eggert <eggert@twinsun.com>
3167 * configure.in (AC_CHECK_FUNCS): Add fseeko.
3169 * src/od.c (skip): Use fseeko. Don't use lseek; it causes
3170 the stdio stream to become out of sync with respect to the
3171 underyling file descriptor.
3173 1997-11-06 Jim Meyering <meyering@na-net.ornl.gov>
3175 * src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs.
3176 We always have alloca.
3177 (keycompare): Don't use variable size arrays (it's a gcc-extension).
3178 Rewrite code that increments new lengths when not `ignoring'.
3180 1997-11-02 Jim Meyering <meyering@na-net.ornl.gov>
3182 * acconfig.h: Add malloc and realloc.
3184 * src/wc.c (main): New option, --max-line-length (-L).
3185 (wc, write_counts): Implement it.
3188 1997-10-26 Jim Meyering <meyering@na-net.ornl.gov>
3190 * lib/memcasecmp.c: Convert to upper case before comparing.
3191 This makes join -i work with sort -f.
3192 Reported by Arthur Pool.
3194 1997-10-25 Jim Meyering <meyering@na-net.ornl.gov>
3196 * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
3197 (xcalloc): #ifdef-out unused function.
3198 (xrealloc): Remove code to work around deficient versions of realloc.
3199 Now we have an autoconf-enabled replacement version.
3200 (xmalloc): Remove code to work around deficient versions of malloc.
3201 Now we have an autoconf-enabled replacement version.
3203 * lib/memcmp.c (rpl_memcmp): Rename from memcmp.
3205 * src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/.
3207 * lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL.
3209 * configure.in (jm_FUNC_MALLOC): Use it.
3210 (jm_FUNC_REALLOC): Use it.
3212 * lib/Makefile.am (EXTRA_DIST): Add malloc.c.
3213 * lib/malloc.c: New file.
3214 * m4/malloc.m4: New file.
3215 * m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
3217 * lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
3218 (EXTRA_DIST): Add realloc.c.
3219 (EXTRA_DIST): Add malloc.c.
3221 * src/system.h: Include xalloc.h.
3222 Remove dcls of xmalloc, xcalloc and xrealloc.
3224 * lib/xalloc.h: New file.
3226 * lib/xmalloc.c: Include xalloc.h.
3227 Change VOID to void.
3228 (xalloc_exit_failure): Renamed extern.
3229 (xalloc_msg_memory_exhausted): New extern.
3230 (xalloc_fail_func): New extern.
3231 (fixup_null_alloc): Use new variables.
3233 1997-10-24 Jim Meyering <meyering@na-net.ornl.gov>
3235 * src/unexpand.c: Remove old-style xmalloc and xrealloc decls.
3236 (add_tabstop): Cast first arg of xrealloc to char*.
3238 * src/sort.c: Include xalloc.h.
3239 (xmalloc): Remove function.
3240 (xrealloc): Remove function.
3241 (main): Set xalloc_fail_func to cleanup.
3242 Set xalloc_exit_failure SORT_FAILURE.
3244 * src/paste.c: Remove old-style xmalloc and xrealloc decls.
3245 (paste_parallel): Cast first arg of xrealloc to char*.
3247 * src/od.c: Remove old-style xmalloc and xrealloc decls.
3248 (decode_format_string): Cast first arg of xrealloc to char*.
3250 * src/expand.c: Remove old-style xmalloc and xrealloc decls.
3251 (add_tabstop): Cast first arg of xrealloc to char*.
3253 * lib/xalloc.h: New file.
3255 * src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
3256 (getstr): Cast xmalloc return value to char*.
3258 * src/csplit.c: Include xalloc.h.
3259 (xmalloc): Remove function.
3260 (xrealloc): Remove function.
3261 (main): Set xalloc_fail_func to cleanup.
3263 * src/*.c: Remove old-style xmalloc and xrealloc decls.
3264 * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
3265 Suggestion from Achim Blumensath.
3267 1997-10-23 Jim Meyering <meyering@na-net.ornl.gov>
3269 * Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
3271 * src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
3272 [!HAVE_DECLARATION_MALLOC]: Declare malloc.
3273 [!HAVE_DECLARATION_REALLOC]: Declare realloc.
3274 [!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
3275 [!HAVE_DECLARATION_STRSTR]: Declare strstr.
3276 * src/cat.c: Remove stpcpy dcl.
3277 * src/csplit.c: Remove malloc and realloc dcls.
3278 * src/sort.c: Remove free, malloc, and realloc dcls.
3279 * src/tac.c: Remove malloc, and realloc dcls.
3280 * src/tr.c: Remove stpcpy dcl.
3281 On some systems, strstr and stpcpy are macros, so declaring them
3282 unconditionally gets syntax errors.
3283 Reported by Mark M. Kettenis.
3285 * configure.in: Use jm_CHECK_DECLS.
3286 * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
3288 1997-10-22 Jim Meyering <meyering@na-net.ornl.gov>
3290 * m4/decl.m4: New file.
3291 * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS.
3293 1997-10-16 Paul Eggert <eggert@twinsun.com>
3295 * src/od.c (LONG_MAX): Define if not defined.
3297 1997-10-16 Jim Meyering <meyering@na-net.ornl.gov>
3299 * src/sort.c (look_for_fraction): Patch from Ørn Hansen.
3300 (getmonth): Compare the two month names only to the length of the
3301 string in the month table. Patch from Ørn Hansen.
3302 (NLS_STRNCMP): New macro.
3303 (strncoll_s2_readonly): New function.
3304 (inittables): Don't use temporary `comp' to hide type of
3305 comparator function.
3306 (nls_sort_month_comp): Declare parameters to be void* to match
3307 comparator function type required for qsort.
3308 (getmonth): Use NLS_STRNCMP rather than #ifdef.
3309 Use do-while, rather than while-loop.
3311 1997-10-14 Jim Meyering <meyering@na-net.ornl.gov>
3313 * src/sort.c (_NL_ITEM) [!defined]: Define.
3314 From from Ørn E. Hansen.
3316 * src/sort.c: Use STREQ in place of most uses of strcmp.
3317 (NLS_STRCMP): Define.
3318 (getmonth): Remove ifdef and use NLS_STRCMP instead.
3319 Use HAVE_ALLOCA, not _HAVE_ALLOCA.
3320 (zaptemp): Make parameter `const'.
3322 * tests/sort-test/Test.pm: Add tests to exercise new fraccompare.
3324 * src/sort.c (CHARS_IN_ABM): Remove definition
3325 (inittables): Remove assumption that all abbreviated month names have
3327 (getmonth): Likewise.
3328 (main): Add #if's for more efficient code when using the GNU C library.
3329 From Ulrich Drepper.
3331 * src/sort.c (strncoll): Rename parameter to LEN.
3332 (keycompare): Move assignment out of if-expression.
3334 * lib/xstrdup.c: New file.
3335 * lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c
3337 * src/sort.c: Declare xstrdup.
3338 (my_setlocale): New function.
3339 (main): Guard against failure of strdup (use xstrdup) and setlocale.
3341 * src/system.h (STREQ): Define.
3342 * src/od.c (STREQ): Remove definition.
3344 * src/sort.c (look_for_fraction): Eliminate arbitrary limit on
3345 number of `groups'. Declare as void, not int.
3346 Patch from Ørn E. Hansen.
3347 (main): When determining whether we're in the C or POSIX locale,
3348 don't rely on the form of the string returned by setlocale.
3349 Suggestion from Ulrich Drepper.
3351 1997-10-12 Jim Meyering <meyering@na-net.ornl.gov>
3353 * src/sort.c: Apply big patch from Ørn E. Hansen.
3355 (NLS_MEMCMP): Define.
3356 (keycompare): Use it instead of open-coded #ifdefs.
3357 (compare): Likewise.
3358 (NLS_MAP): Remove unused definitions.
3359 Replace with uses of UCHAR.
3360 (nls_locale_map): Remove dcl of unused file-scope array.
3362 1997-10-10 Jim Meyering <meyering@na-net.ornl.gov>
3364 * tests/sort-test/Test.pm: Add a test.
3367 1997-10-07 Jim Meyering <meyering@na-net.ornl.gov>
3369 * src/*.c: Update bug-reporting address.
3370 * src/cat.c: Indent cpp directives to reflect nesting.
3371 * src/cksum.c: Likewise.
3372 * src/csplit.c: Likewise.
3373 * src/fmt.c: Likewise.
3374 * src/nl.c: Likewise.
3375 * src/paste.c: Likewise.
3377 1997-09-27 Jim Meyering <meyering@na-net.ornl.gov>
3379 * m4/memcmp.m4: Integrate test to detect bug in memcmp from the
3380 Next x86 OpenStep C library. Test program from William Lewis.
3382 1997-09-21 Jim Meyering <meyering@na-net.ornl.gov>
3384 * src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.'
3385 (dump_hexl_mode_trailer): Rename from dump_string_trailer.
3386 Use fputs and putchar instead of trivial or %-less printfs.
3387 (decode_one_format): Parenthesize each field_width assignment in an
3388 argument list to make the side effect a little more apparent.
3389 (write_block): Use fputs and putchar instead of trivial or %-less
3391 (dump_strings): Cast string_min to off_t to avoid long-standing warning.
3393 * src/od.c: Implement new `z' (hexl-mode) modifier.
3394 [struct tspec] (trailer): New field.
3395 (field_width): Likewise.
3396 (dump_string_trailer): New function.
3397 (decode_one_format): Save each field_width in the tspec.
3398 Patch from John Kodis.
3400 1997-09-14 Jim Meyering <meyering@na-net.ornl.gov>
3402 * src/od.c (main) [--traditional]: Don't give diagnostic about there
3403 being more than three arguments if there are *no* arguments specified.
3404 Reported by Jochen Hein.
3406 1997-09-13 Jim Meyering <meyering@na-net.ornl.gov>
3408 * tests/sort-test/Test.pm: Add tests 19a and 19b.
3410 1997-07-21 Jim Meyering <meyering@na-net.ornl.gov>
3412 * src/tail.c (parse_obsolescent_option): #ifdef-out portability warning.
3414 1997-07-19 Jim Meyering <meyering@na-net.ornl.gov>
3416 * src/sort.c (checkfp): Print the `disorder' message. Include both
3417 the number and the contents of the first out-of-order line, in addition
3418 to the file name. Change meaning of return value.
3419 (check): Don't print disorder message here.
3420 Adjust test of checkfp's return value.
3421 Feature suggestion from Karl Heuer.
3423 1997-07-13 Jim Meyering <meyering@na-net.ornl.gov>
3425 * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
3426 Now, automake includes it automatically.
3428 * src/head.c: Include xstrtoul.h.
3429 Remove global variable, unit_size.
3430 (atou): Remove now-unused function.
3431 (parse_unit): Likewise.
3432 (string_to_ull): New function.
3433 (head): Take new parameter, count_lines. Use it instead of unit_size.
3435 (head_file): Likewise.
3436 (main): Use string_to_ull, not atou/parse_unit.
3437 The problem was that overflow wasn't detected, so `head -c 4096m'
3438 was treated just like `head -c 0'.
3439 Reported by Jerome Abela.
3441 * tests/wc: New directory.
3442 * tests/head: New directory.
3443 * tests/Makefile.am (SUBDIRS): Add head and wc.
3444 * configure.in (AC_OUTPUT): Add tests/head/Makefile and
3447 1997-07-05 Jim Meyering <meyering@na-net.ornl.gov>
3449 * src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
3450 a diagnostic and fail when there are two or more non-option arguments.
3452 1997-07-04 Jim Meyering <meyering@na-net.ornl.gov>
3454 * tests/tac/mk-script.pl: Redirect output of cmp to /dev/null.
3456 * configure.in (ALL_LINGUAS): Add Norwegian (no).
3458 * Makefile.am (aclocal-files): Look in source directory, not build dir.
3459 From Andreas Schwab.
3461 Sun Jun 15 06:36:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
3463 * src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the
3464 2-digit abbreviation) in each page header. Reported by Noah Friedman.
3466 Sat Jun 14 12:29:12 1997 Jim Meyering <meyering@na-net.ornl.gov>
3468 * src/cut.c (cut_fields): Detect when the input is empty and handle
3469 that special case. Before `cut -f1 < /dev/null' would improperly
3470 output a single newline. Reported by Phil Richards.
3472 Sun Apr 27 15:10:58 1997 Jim Meyering <meyering@na-net.ornl.gov>
3474 * man/Makefile.am (DISTFILES): Add $(man_MANS).
3476 * configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv).
3478 Thu Apr 3 21:14:02 1997 Jim Meyering <meyering@na-net.ornl.gov>
3480 * m4/Makefile.am (EXTRA_DIST): Update file list.
3482 * tests/cut-test/Test.pm: Add test from Phil Richards.
3484 Sat Mar 22 20:29:10 1997 Jim Meyering <meyering@na-net.ornl.gov>
3486 * missing: New file -- from the automake-1.1m distribution.
3488 Fri Mar 21 23:56:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
3490 * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
3491 (aclocal.m4): Use aclocal's new -I option.
3493 Thu Mar 13 21:46:04 1997 Jim Meyering <meyering@na-net.ornl.gov>
3495 * src/tr.c (main): Make sure c1 is not -1 before using it as an
3496 array index. Patch from Greg McGary. Although this is truly a
3497 bug, I believe it would not cause tr to misbehave on most systems.
3498 I could not construct a test case with which this bug causes tr
3499 to generate invalid output.
3501 * tests/pr-test/Test.pm: Add test that -o 0 works.
3503 * src/pr.c (main): Allow use of 0 (zero) as the margin offset
3504 argument to the -o option. Patch from Gary Anderson.
3506 Fri Feb 28 22:32:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
3508 * src/uniq.c (usage): Fix typo in --help output. From Andreas Schwab.
3510 Tue Feb 25 20:34:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
3512 * lib/Makefile.am (noinst_HEADERS): Add obstack.h.
3513 (libtu_a_SOURCES): Add obstack.c.
3515 Sun Feb 16 08:30:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
3517 * tests/Makefile.am (SUBDIRS): Add tac.
3518 * tests/tac: New directory.
3519 * configure.in (AC_OUTPUT): Add tests/tac/Makefile.
3521 * tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t,
3522 tta3-FF, ttb3-FF}: New files. Renamed (s/T/tt/) to avoid name clashes
3523 on case-independent filesystems.
3524 * tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming.
3526 * src/tail.c (parse_obsolescent_option): Reverse order of args in
3527 diagnostic. Remove `' quotes in diagnostic.
3528 (parse_options): Remove `' quotes in diagnostic.
3530 Sat Feb 8 22:43:45 1997 Jim Meyering <meyering@na-net.ornl.gov>
3532 * src/tail.c (parse_obsolescent_option): Give warning diagnostic for
3533 (but now accept) obsolescent usage with more than one file argument.
3535 Sun Feb 2 23:06:59 1997 Jim Meyering <meyering@na-net.ornl.gov>
3537 * src/join.c: Move alloca-related preprocessor code into system.h.
3538 * src/od.c: Remove alloca-related preprocessor code.
3539 * src/system.h: Add alloca-related preprocessor code.
3541 Sat Feb 1 07:21:43 1997 Jim Meyering <meyering@na-net.ornl.gov>
3543 * tests/pr-test/*: Rename files to avoid exceeding 14-character limit.
3544 * tests/pr-test/Test.pm: Reflect renamings.
3546 * tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames
3547 that exceed max-length before dying.
3549 * src/pr.c (init_parameters): For compatibility: use default
3550 separator `TAB' with full length lines. From Roland Huebner.
3552 Fri Jan 31 19:53:54 1997 Jim Meyering <meyering@na-net.ornl.gov>
3554 * src/tac.c: Rename globals buffer and buffer_size to have G_ prefix
3555 to avoid shadowing local variables.
3557 * lib/long-options.c (parse_long_options): Compare getopt_long return
3558 value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter
3559 in getopt_long call.
3561 * src/pr.c (add_line_number): Rename from `number' to avoid shadowing
3564 * src/*.c: Compare getopt_long return value against -1, not EOF.
3565 Use NULL, not `(int *) 0' as last parameter in getopt_long call.
3566 (usage): Bracket bug-reporting address with <> and append a period.
3568 Wed Jan 29 20:54:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
3570 * tests/tr-test/Test.pm: Do each test twice: get input via REDIR
3573 * tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring)
3576 * tests/pr-test/Test.pm: Remove common_option_prefix flag.
3577 (test_vector): Prepend the common option here instead.
3579 * tests/md5sum-test/Test.pm: Remove input_via_stdin flag.
3580 Do each test twice: get input via REDIR and PIPE.
3582 * tests/cut-test/Test.pm: Do each test three times.
3584 * tests/cut-test/mk-script.pl: Allow each test to be run any or all
3585 of three different ways. Program input may be specified via a file
3586 or files listed on the command line, via input redirection (if there's
3587 only one file), or via a pipe.
3589 Tue Jan 28 20:54:06 1997 Jim Meyering <meyering@na-net.ornl.gov>
3591 * tests/cut-test/mk-script.pl: Remove `t' prefix on all generated
3593 Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E).
3594 Ensure that no test file (generated or maintainer-supplied) has a
3595 name longer than 14 characters.
3597 Sun Jan 26 12:49:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
3601 * src/tail.c (parse_options): Add quotes to make messages identical.
3603 Sat Jan 25 00:12:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
3605 * src/tail.c (parse_obsolescent_option): Comment.
3606 (parse_options): Remove unnecessary goto and label.
3608 * tests/sort-test/mk-script.pl: Interpret `input arg is a hash
3609 reference' as meaning that the tested program will read no input.
3610 Most of the tests for the date program use this feature.
3611 Also for date, the generated script now reflects specification
3612 (in Test.pm) of default and per-test environment settings.
3614 * src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces.
3615 * src/fold.c: Likewise.
3616 * src/head.c: Likewise.
3617 * src/join.c: Likewise.
3618 * src/nl.c: Likewise.
3619 * src/od.c: Likewise.
3620 * src/pr.c: Likewise.
3621 * src/uniq.c: Likewise.
3623 * lib/xstrtoul.h (XSTRTOL_H): Undefine it.
3625 * lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error'
3626 only if it hasn't already been defined.
3627 (_STRTOL_ERROR): Undefine.
3629 * lib/xstrtol.c (__xstrtol): Change interpretation of
3630 VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former
3631 when any suffix is valid, the later when no suffix is allowed.
3633 Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
3635 * lib/long-options.c (parse_long_options): Reset optind to zero
3636 before just returning so that getopt internals get initialized from
3637 the probably-new parameters when/if getopt is called later.
3638 From Ulrich Drepper.
3640 Thu Jan 23 19:17:03 1997 Jim Meyering <meyering@na-net.ornl.gov>
3642 * src/tail.c (parse_obsolescent_option): Recognize and fail for
3643 more malformed obsolescent options. Makes for better diagnostics.
3645 Wed Jan 22 21:34:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
3647 * tests/Makefile.am (SUBDIRS): Add tail.
3648 * tests/tail: New directory.
3649 * configure.in (AC_OUTPUT): Add tests/tail/Makefile.
3651 * src/tail.c (parse_options): New function.
3652 (parse_obsolescent_option): New function.
3653 (main): Use the new functions instead of open-coding them.
3654 This better fixes the bug in handling obsolescent `+Nc' options.
3657 Tue Jan 21 22:49:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
3659 * src/tail.c (main): Properly handle what the POSIX spec calls
3660 the `obsolescent' usage (e.g., tail +2c). It didn't work.
3661 Reported by Karl Heuer.
3663 Sun Jan 12 22:13:27 1997 Jim Meyering <meyering@na-net.ornl.gov>
3665 * tests/tr-test/Test.pm: Rename tests so that the associated files
3666 have names that are distinct even on filesystems on which file
3667 names are case insensitive.
3668 Reported by Fred Fish.
3669 * tests/cut-test/Test.pm: Likewise.
3671 * tests/tr-test/Makefile.am: Regenerated to reflect renamed tests.
3672 * tests/cut-test/Makefile.am: Likewise.
3674 Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
3678 * lib/getopt.c (_getopt_internal): Use `_', rather than the
3679 (sometimes-)expansion `gettext'.
3681 Tue Jan 7 22:50:13 1997 Jim Meyering <meyering@na-net.ornl.gov>
3683 * lib/getopt.c: New (more POSIX compliant) version from GNU libc.
3684 [_]: Define to gettext also if ENABLE_NLS is defined.
3687 Thu Jan 2 21:17:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
3689 * src/pr.c (init_fps): Initialize lines_stored field in three places.
3690 This avoids uninitialized memory reads in close_file.
3692 Wed Jan 1 17:32:18 1997 Jim Meyering <meyering@na-net.ornl.gov>
3694 * configure.in (AC_ARG_PROGRAM): Remove explicit use.
3695 It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart.
3697 Sun Dec 29 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
3699 * src/pr.c (init_header): Plug a small memory leak by using stack
3700 rather than heap for a 15-byte temporary buffer.
3702 Sat Dec 28 00:03:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
3704 * src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed
3706 (POS_AFTER_TAB): Renamed from pos_after_tab. Define in terms of
3707 TAB_WIDTH rather than duplicating the expression.
3709 Fri Dec 27 17:29:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
3711 * tests/join-test/mk-script.pl: Fix a couple of thinkos and typos.
3712 Now it works with pr's tests, too.
3714 * tests/pr-test/Makefile.am (explicit): Regenerate list of files,
3715 this time with duplicates removed.
3717 * src/pr.c (usage): Break long string literal into two separate
3718 printf statements to accomodate default maximum of 2048 characters
3719 for Irix-4.0.5. Reported by Kaveh Ghazi.
3721 * Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
3723 * tests/Makefile.am (SUBDIRS): Add pr-test.
3725 * configure.in: AC_REQUIRE version 2.12 of autoconf.
3726 AC_OUTPUT: Add tests/pr-test/Makefile.
3728 Sun Dec 22 08:11:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
3730 * acinclude.m4: Move macros to individual files in new directory, m4/.
3731 See ChangeLog entries in sh-utils for the details.
3733 * configure.in: Increment version to 1.20a.
3735 * tests/md5sum-test/Makefile.am: Use same framework as other tests.
3736 * tests/md5sum-test/Test.pm: New file.
3738 Sat Dec 21 20:32:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
3740 * tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in.
3742 * tests/Makefile.am.in: New file.
3744 * tests/sort-test/Makefile.am: Clone the Makefile.am from join-test.
3745 Replace only the definition of $x and the auto-generated lists of
3747 * tests/cut-test/Makefile.am: Likewise.
3748 * tests/tr-test/Makefile.am: Likewise.
3750 * tests/join-test/Makefile.am: Add @MAINT@-protected rule for
3751 verifying that Makefile.am is consistent with Test.pm.
3753 Fri Dec 20 00:08:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
3755 * tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1)
3756 and $(in2), not $(in).
3758 * tests/join-test/mk-script.pl: New option: --list.
3759 Generate lists of files used/generated.
3761 Thu Dec 19 23:28:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
3763 * tests/join-test/mk-script.pl: Rewrite to be more general -- so
3764 it can be used for join, cut, sort, tr, and soon, pr test suites.
3765 * tests/tr-test/mk-script.pl: Symlink through CVS repo to join's
3767 * tests/sort-test/mk-script.pl: Likewise.
3768 * tests/cut-test/mk-script.pl: Likewise.
3770 * tests/tr-test/Test.pm: Adapted for new mk-script.pl.
3771 * tests/join-test/Test.pm: Likewise.
3773 Tue Dec 17 16:48:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
3775 * tests/join-test/Makefile.am (.pl): Make generated file read-only so
3776 I don't accidentally modify it instead of the one with the .pl suffix.
3778 * acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than
3779 now-obsolete AC_C_CROSS.
3780 (jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one
3781 since there's nothing GNU-specific about the replacement. Contrast
3782 with gnu_ prefix added to strftime.
3783 (jm_FUNC_MEMCMP): New macro.
3784 * configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP.
3785 * acconfig.h: Add memcmp.
3786 * README: Remove warning about memcmp. The new macro handles it.
3788 Mon Dec 16 23:03:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
3790 * tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment.
3792 (AUTOMAKE_OPTIONS): Likewise.
3794 Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
3796 * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
3797 name for cross compiling.
3798 Remove definitions of gettext-related macros. The gettext
3799 installation procedure installs corresponding .m4 files so that
3800 aclocal will use them.
3802 1996-12-12 Paul Eggert <eggert@twinsun.com>
3804 * system.h (ISDIGIT): Replace with smaller, faster edition
3805 that yields nonzero only on ASCII digits.
3806 (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
3809 * tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of
3810 ISDIGIT to test for characters in CC_DIGIT class.
3812 * sort.c (digits): Remove; subsumed by new ISDIGIT.
3813 (inittables): Remove initialization of `digits'.
3814 (fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
3815 (fraccompare, numcompare): Avoid casts to unsigned char that are no
3818 * csplit.c (get_format_width, get_format_prec): Avoid
3819 unnecessary comparison of digit to '\0'.
3821 Thu Dec 12 23:42:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
3823 * src/sort.c (usage): Clarify description of -u option.
3826 Wed Dec 11 19:32:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
3830 Tue Dec 10 00:15:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
3832 The file name, `build-script.pl' is longer than 14 characters.
3834 * tests/cut-test/mk-script.pl: Rename from build-script.pl.
3835 * tests/cut-test/Makefile.am: Reflect renaming.
3836 * tests/tr-test/mk-script.pl: Rename from build-script.pl.
3837 * tests/tr-test/Makefile.am: Reflect renaming.
3838 * tests/sort-test/mk-script.pl: Rename from build-script.pl.
3839 * tests/sort-test/Makefile.am: Reflect renaming.
3840 * tests/join-test/mk-script.pl: Rename from build-script.pl.
3841 * tests/join-test/Makefile.am: Reflect renaming.
3842 Reported by Karl Heuer.
3844 * configure.in (VERSION): Bump to 1.19r.
3845 (AC_ISC_POSIX): Remove kludgy macro.
3846 Use this test instead:
3847 (LIBS): Add -lcposix if it contains strerror.
3848 Patch from Karl Heuer.
3850 Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
3852 =========== Update for automake-1.1k.
3853 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
3854 * configure.in (AM_CONFIG_HEADER): Use it.
3855 (AC_OUTPUT): Remove stamp-h timestamping statement.
3856 Now, AM_CONFIG_HEADER does it automatically.
3857 * lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
3858 new automake requirement.
3859 Rename tu_* variables to libtu_a_*.
3861 Wed Dec 4 21:03:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
3863 * src/pr.c: Apply big patch from Roland Huebner.
3865 * src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
3866 [:upper:] to [:upper:] and [:lower:] to [:lower:].
3867 (main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
3868 the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
3870 (class_ok): Update table to reflect that tr now allows these
3871 identity mappings. Suggestion from Risto Kankkunen.
3873 Thu Nov 28 00:31:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
3875 * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
3876 for gettext-0.10.25.
3878 Tue Nov 26 23:05:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
3880 * src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
3881 to avoid new warning from gcc.
3883 Sun Nov 24 21:02:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
3885 * tests/sort-test/Makefile.am (t): Add names of those 5 tests.
3887 * tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.
3889 * src/sort.c (set_ordering): Revert 1994-05-04 change to this function
3890 so that blanks are not unconditionally ignored when computing start
3891 and end positions for numeric keys with explicit character offsets.
3892 Reported by Markus Demleitner.
3894 Sat Nov 23 16:07:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
3896 * cat.c (usage): Alphabetize option descriptions the way sort -f would.
3897 * fmt.c (usage): Likewise.
3898 * join.c (usage): Likewise.
3899 * md5sum.c (usage): Likewise.
3900 * od.c (usage): Likewise.
3901 * pr.c (usage): Likewise.
3902 * sort.c (usage): Likewise.
3903 * split.c (usage): Likewise.
3904 * wc.c (usage): Likewise.
3907 Fri Nov 22 20:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
3909 * src/csplit.c (process_regexp): Update CURRENT_LINE only if
3910 the new value would be larger. This avoids the infinite loop
3911 otherwise provoked by situations like this:
3912 printf "\na\n" | csplit - '/a/-1' '{*}'
3915 Tue Nov 19 23:16:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
3917 * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
3920 Sat Nov 2 08:50:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
3922 * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
3923 Otherwise, the generated info files have names longer than
3924 the 14-byte max of some old systems.
3925 Reported by Karl Heuer.
3927 Fri Nov 1 21:33:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
3929 * lib/strtol.c: Update from GNU libc.
3931 * tests/sort-test/Test.pm: Add a test to exercize this fix.
3933 * src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
3934 (checkfp): Fix off-by-one error that resulted in writing one byte
3935 beyond the end of a malloc'd buffer. It caused `sort -c' to segfault
3936 on Linux systems having a relatively recent libc. Before, running
3937 the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
3938 would provoke the memory overrun (though not necessarily the failure).
3940 Reported by Risto Kankkunen.
3942 Thu Oct 31 17:48:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
3944 * src/sort.c (key_init): New function.
3945 (main): Use key_init in the two places where it was open-coded.
3946 This fixes a UMR of the general_numeric field.
3948 * src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
3949 This avoids a spurious UMR report from purify.
3950 (prjoin): Add an assertion.
3951 (add_field): Update assertion.
3953 * src/tr.c (es_free): New function.
3954 (parse_str): Use it to plug a small memory leak.
3956 Wed Oct 23 22:02:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
3958 * lib/md5.c: Update from GNU libc.
3959 * lib/md5.h: Update from GNU libc.
3961 Mon Oct 21 16:48:12 1996 Jim Meyering <meyering@na-net.ornl.gov>
3963 * src/tr.c (validate): Remove TAB from diagnostic, for consistency.
3965 Sun Oct 20 13:44:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
3967 * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
3969 * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
3970 (EXTRA_DIST): Remove.
3972 * configure.in: Remove README_ALPHA related code. Automake takes
3973 care of it automatically now when in gnits mode.
3975 * lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
3976 doing arithmetic with it.
3978 Sat Oct 19 23:13:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
3980 * lib/md5.c: Update from GNU libc.
3981 * lib/md5.h: Update from GNU libc.
3983 Fri Oct 18 00:08:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
3985 * configure.in (AC_OUTPUT): Add tests/join-test/Makefile.
3987 * tests/Makefile.am (SUBDIRS): Add join-test.
3989 Tue Oct 15 23:25:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
3991 * src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
3993 (main): Write separate loops to initialize mapping for lower->upper
3994 and upper->lower conversion.
3995 Reported by Arne Henrik Juul.
3997 Sun Oct 13 12:52:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
3999 * lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
4000 Before, e.g., `split -b 1M' would be silently accepted and treated
4001 like `split -b 1'. Reported by Franc,ois.
4003 * src/split.c (usage): Remove parameter, REASON.
4004 (main): Update callers to use combination of error (0, 0, ... and
4005 usage (EXIT_FAILURE).
4006 (main): When a string operand cannot be converted to a number of
4007 bytes or lines, include that string in the diagnostic.
4009 Sat Oct 12 00:05:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
4011 * configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.
4013 * lib/Makefile.am (EXTRA_DIST): Remove.
4015 Thu Oct 10 23:41:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
4017 * lib/md5.c (md5_stream): Apply fix from Ralph Loader
4018 <loader@maths.ox.ac.uk> via Ulrich Drepper.
4020 Wed Oct 9 07:26:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
4022 * lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).
4024 Tue Oct 8 21:32:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
4026 * lib/error.c: Include error.h to align with libit --
4027 under protest, François :-).
4029 Sun Oct 6 08:02:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
4031 * acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
4032 AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
4033 They're included in automake-1.1f.
4035 * configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
4038 Sat Oct 5 12:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
4040 * lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
4043 Fri Oct 4 07:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
4045 * configure.in (GNU_PACKAGE): New variable.
4046 (PACKAGE_VERSION): Remove it.
4048 * acconfig.h (GNU_PACKAGE): New variable.
4049 (PACKAGE_VERSION): Remove now-unused variable.
4051 * lib/long-options.c (parse_long_options): Separate package name
4052 and version number to accomodate new --version output requirement.
4053 * lib/long-options.h: Update prototype.
4055 Thu Oct 3 23:27:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
4057 * src/md5sum.c (main): Remove dead code that used to print --version
4060 Tue Oct 1 06:54:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
4062 * configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
4063 * src/Makefile.am (sort_LDADD): Use any library (-lm) that
4064 gets substituted for @POW_LIBM@.
4066 * tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.
4068 Mon Sep 30 23:35:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
4070 * tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.
4072 * acinclude.m4: Update definitions from gettext-0.24.
4074 Sun Sep 29 20:04:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
4076 * tests/sort-test/build-script.pl: Die if close fails.
4077 * tests/tr-test/build-script.pl: Likewise.
4079 * configure.in (AC_OUTPUT): Add tests/cut-test/Makefile.
4080 * tests/Makefile.am (SUBDIRS): Add cut-test.
4081 * tests/cut-test: New directory.
4083 Fri Sep 27 22:22:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
4085 * configure.in (ALL_LINGUAS): Add spanish (es).
4087 Thu Sep 26 21:02:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
4089 * src/md5sum.c (usage): Remove references in --help output to
4090 the now-deprecated --string option. Support for it will be
4091 removed soon. Using this option can provoke a memory access
4092 violation on some systems because of (unavoidable in an efficient
4093 implementation) alignment assumptions made by functions in md5.c.
4094 md5sum.c could leave the option in and accomodate the alignment
4095 restriction, but this option was intended solely for testing, and
4096 the tests are now all file-oriented, so it's not necessary.
4098 * tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.
4100 Wed Sep 25 21:43:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
4102 * tests/sort-test/Makefile.am (t): Factor out .in suffix.
4103 Include new test: t16a.
4104 * tests/tr-test/Makefile.am (t): Likewise.
4106 * src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc.
4108 Mon Sep 23 10:00:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
4110 * tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS).
4112 Sun Sep 22 09:24:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
4114 * src/sort.c (keycompare): Declare translate to be unsigned char *.
4115 Otherwise, sign extension caused misordering when using e.g. -f.
4116 Reported by Erick Branderhorst.
4117 * tests/sort-test/Test.pm: Add Erick's test for that fix.
4119 * tests/Makefile.am (SUBDIRS): Add md5sum-test.
4121 Sat Sep 21 13:34:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
4123 * src/Makefile.am (check): Remove tests for md5sum.
4124 * tests/md5sum-test: New directory. Put them here instead.
4125 * configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile.
4127 Thu Sep 19 08:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
4129 * tests/: Rename from checks.
4130 * Makefile.am (SUBDIRS): Change `checks' to `tests'.
4131 * configure.in (AC_OUTPUT): Likewise.
4133 * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
4134 AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
4136 Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
4138 * Makefile.am (EXTRA_DIST): Remove acinclude.m4.
4140 Thu Sep 12 17:05:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
4142 * lib/Makefile.am (EXTRA_DIST): Add getline.c.
4143 (tu_SOURCES): Remove getline.c
4146 Sun Sep 8 13:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
4148 * checks/sort-test/build-script.pl: Prefix $in with \$srcdir/
4149 so make check works with VPATH build. From Uli Drepper.
4151 Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
4153 * src/system.h: Add comments justifying IS* versions of ctype.h macros.
4155 * src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct.
4156 (get_line): Use ISSPACE instead of isspace. From Bruno Haible.
4158 Mon Sep 2 10:34:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
4160 * src/*.c (usage): Tell where to report bugs.
4162 Sun Aug 25 22:50:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
4164 * checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
4165 ($x-tests): Guard dependencies with @MAINT@.
4166 * checks/tr-test/Makefile.am: Likewise.
4168 Sat Aug 24 14:25:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
4170 * src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.
4172 Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
4174 * configure.in (ALL_LINGUAS): Add polish (pl).
4176 Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
4178 * configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
4179 * checks/Makefile.am (SUBDIRS): Add sort-test.
4181 Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
4183 * Makefile.am (EXTRA_DIST): Add acinclude.m4.
4185 Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
4187 * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
4188 Automake includes them automatically.
4190 * configure.in (AM_INIT_AUTOMAKE): Use it.
4191 (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
4192 (AC_PROG_MAKE_SET): Likewise.
4194 Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov>
4196 * configure.in: Rename a few macros for automake-1.1c.
4197 (AC_REPLACE_GNU_GETOPT): Remove.
4198 (AC_PATH_PROG): Find perl -- needed only for checks if you
4199 change or remove things with e.g. make maintainerclean.
4202 * lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX
4203 adds .o files to @LIBOBJ@.
4204 (tu_SOURCES): Add getopt.c and getopt1.c.
4205 (EXTRA_DIST): Remove getopt.c and getopt1.c.
4207 * acinclude.m4: New file -- derived from aclocal.m4.
4208 * aclocal.m4: This file is now generated by the aclocal program
4209 (which comes with the automake package.)
4211 Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
4213 * checks/: New directory.
4214 * checks/Makefile.am: New file.
4215 * configure.in (AC_OUTPUT): Add new directories: checks,
4217 * Makefile.am (SUBDIRS): Likewise.
4219 Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
4221 * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
4222 redefinition warnings on solaris.
4223 (textdomain) [!ENABLE_NLS]: Likewise.
4225 Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov>
4227 * src/unexpand.c (unexpand): Move EOF check to follow code that
4228 processes and generates output for pending spaces. Before
4229 `printf ' ' |unexpand -t 1,2' generated no output.
4231 * src/md5sum.c (md5_check): Remove parameter, BINARY.
4232 Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
4233 from the input stream rather than the one from the command line.
4234 (main): Fail with a diagnostic if --binary or --text is specified
4235 when verifying checksums.
4236 Reported by Eli Zaretskii <eliz@is.elta.co.il>.
4238 Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
4240 * configure.in: Add check for error_at_line so systems with
4241 GNU libc don't compile and link with distributed error.c.
4242 * lib/Makefile.am (tu_SOURCES): Remove error.c.
4243 (EXTRA_DIST): Add error.c.
4245 * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
4246 Add related check for the getdelim function.
4247 From Ulrich Drepper -- as done in gettext.
4249 Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
4251 * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
4252 separate PACKAGE and VERSION.
4254 * aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from
4255 macros from Bruno Haible and from Cygnus.
4256 * configure.in (AM_SANITY_CHECK_CC): Use it.
4258 Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
4260 * install-sh: Get version with MIT copyright.
4262 Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
4264 * aclocal.m4 (fp_C_PROTOTYPES): Improved version from
4266 Update all other macros to reference $fp_cv_prog_cc_stdc, rather
4267 than $ac_cv_prog_cc_stdc.
4269 * src/od.c (OFF_T_MAX): Remove definition.
4270 (main): Compare against LONG_MAX rather than OFF_T_MAX.
4272 Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
4274 * Many files: Update FSF address.
4276 Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
4278 * src/unexpand.c (unexpand): Fix bug that contributed to endless loop
4279 when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not
4280 tab_index in inner flush_pend: while loop. From Keith Owens
4281 <kaos@audio.apana.org.au>.
4283 * src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
4284 [!INT_MAX]: Define it.
4285 (main): Append INT_MAX to command-line-specified tab list to
4286 ensure termination in unexpand's inner loop.
4287 Derived from a patch from Keith Owens.
4289 Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
4293 * configure.in (VERSION): Bump to 1.19.
4295 Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
4297 * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
4298 so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
4299 those options on that system, sys/stat.h gets compile errors.
4300 With help from Marcus Daniels.
4302 * getopt.c: Update from gettext-0.10.23.
4303 * getopt1.c: Likewise.
4304 * getopt.h: Likewise.
4306 Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
4308 * src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
4309 so the left operand of the << isn't signed.
4310 From Kjetil Torgrim Homme.
4312 * po/Makefile.in.in (install-data): Don't install NLS files when
4313 they're not requested. From Ulrich Drepper. Reported by
4314 Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
4316 Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
4318 * po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
4319 * ABOUT-NLS: Likewise.
4321 * aclocal.m4: Likewise.
4323 Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
4325 * src/uniq.c (usage): Remove space before newline in usage message.
4327 * src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
4328 [NEWLINE_REPLACEMENT_STRING*]: Remove macros.
4329 (main): Output a leading backslash for a line describing a file
4330 whose name contains a newline. Then translate each NEWLINE byte
4331 in the file name to the string, "\\n", and each backslash to "\\\\".
4332 File names that don't contain NEWLINE aren't translated.
4333 (split_3): Rewrite to handle file names with embedded newlines.
4334 Miles Bader and Jim Blandy suggested this new encoding scheme.
4336 * src/md5sum.c (md5_file): Replace obsolete comment with a description
4338 (md5_check): Don't use "s"-adding trick to form the plural of
4339 `checksum.' That doesn't work well with translation.
4340 Suggestions from Ulrich Drepper.
4341 (split_3): Add missing semicolon so it compiles. From Jim Blandy.
4343 Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
4345 * src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
4346 fact that leading blanks may be stripped.
4348 Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
4350 * configure.in (ALL_LINGUAS): Add dutch (nl).
4352 Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
4354 * src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
4355 (split_3): Translate NL bytes not to NUL, but to
4356 NEWLINE_REPLACEMENT_STRING.
4357 Suggested by Ulrich Drepper.
4358 (main): Translate back to NL-containing filename.
4360 Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
4362 * src/md5sum.c (split_3): Take an additional parameter, S_LEN.
4364 Map translated NEWLINE-containing filename back into the original
4365 NEWLINE-containing name.
4366 (md5_check): Translate NEWLINE bytes to NUL bytes in filename.
4368 Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
4370 * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
4371 appears in the output of --version. Reported by RMS.
4373 Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
4375 * src/Makefile.am (LDADD): Remove sort-specific hack to link
4377 * aclocal.m4 (AM_FUNC_STRTOD): New macro.
4378 * configure.in (AM_FUNC_STRTOD): Use it.
4379 (AC_REPLACE_FUNCS): Remove strtod.
4380 Suggested by Tom Tromey.
4382 * po/Makefile.in.in (install-data): Add `else true;' to avoid
4383 letting failing if-condition cause make failure.
4384 From Fred Fish (fnf@ninemoons.com).
4386 Tue Jun 25 21:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
4390 Tue Jun 18 20:43:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
4392 * aclocal.m4: Update from gettext-0.10.20.
4393 * ABOUT-NLS: Likewise.
4396 Thu Jun 13 22:31:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
4398 * configure.in (VERSION): Bump to 1.18a.
4400 * po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
4401 Depend on POTFILES only when using maintainer mode.
4403 * intl/*: Update from gettext-0.10.18.
4405 Tue Jun 11 23:32:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
4409 * po/Makefile.in.in: Update from gettext-0.10.17.
4411 * ABOUT-NLS: Likewise.
4413 Mon Jun 10 18:22:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
4415 * Makefile.am (cvs-dist): Use -c option in cvs tag command.
4417 Fri Jun 7 22:06:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
4419 * configure.in (VERSION): Set to 1.18.
4421 * src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
4422 the strtod supplied with this package. Otherwise, linking failed on
4423 Solaris-2.4 systems. Reported by Wayne Stewart <wstewa@atl.com>.
4425 Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
4427 * po/Makefile.in.in: Update from gettext-0.10.16.
4429 * ABOUT-NLS: Likewise.
4430 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
4431 gettext-related ones.
4432 Update from gettext-0.10.16.
4434 Fri May 31 22:04:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
4438 * Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
4441 Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
4445 * tail.c (main): Interpret the old-style +VALUE and -VALUE options
4446 like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
4447 suffix multipliers. This makes the code consistent with --help
4448 output. Reported by Karl Heuer.
4450 * sort.c (limfield): #ifdef-out a block of code that makes
4451 GNU sort incompatible with Unix sort when a key-end spec refers
4452 to the N'th character in a field that has fewer than N characters.
4453 The POSIX spec doesn't appear to specify behavior for this case.
4456 * po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
4457 longer than 14 characters.
4458 (mostlyclean): Likewise.
4461 * po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
4462 when using maintainer mode. Reported by Karl Heuer.
4464 * po/Makefile.in.in (.po.mo): Reenable dependency and rule.
4465 It is required when using native NLS, e.g. on Solaris.
4466 From Marcus Daniels.
4468 * od.c (decode_one_format): Use %lu (not %d) printf format
4469 corresponding to unsigned long, SIZE.
4473 * intl/Makefile.in (installcheck): New target.
4474 * po/Makefile.in.in (installcheck): New target.
4476 * od.c (decode_one_format): Take another parameter.
4477 Give a specific diagnostic for invalid format spec here rather
4478 than an overly general one from caller's caller.
4479 (decode_format_string): Update caller.
4480 (main): Don't give diagnostic here when decode_format_string fails.
4481 Remove assertions that could fail on some Crays because they don't
4482 have a two-byte type.
4483 Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
4485 Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
4487 * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
4488 less portable fileno (stdin) and fileno (stdout).
4489 * sort.c (main): Use STDIN_FILENO instead of less portable
4492 Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
4494 * Makefile.am (distcheck): Remove target and rule -- automake-0.33
4495 adds it automatically.
4497 Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov)
4499 * configure.in (LINGUAS): Add ko.
4500 * Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
4502 Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
4504 * Makefile.am (distcheck): New target. From Gord Matzigkeit.
4506 Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
4508 * po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise
4509 they won't be built and install could fail. From Ulrich Drepper.
4510 (.po.mo): Disable dependency and rule when not in maintainer mode.
4512 * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
4513 on whether we're using GNU gettext. From Ulrich Drepper.
4515 Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
4517 * intl/Makefile.in (distdir): Renamed from dist. For compatibility
4519 * po/Makefile.in.in (distdir): Likewise.
4521 * po/Makefile.in.in (all-yes): Depend on GMOFILES.
4522 Depend on CATALOGS and GMOFILES files only in maintainer mode.
4524 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
4526 * configure.in: Require autoconf-2.10.
4528 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
4529 * configure.in (jm_MAINTAINER_MODE): Use it.
4531 Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov)
4533 * configure.in (LINGUAS): Add de.
4534 * po/de.po: New file.
4536 * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
4537 * regex.c [IN_CTYPE_DOMAIN]: Likewise.
4538 * system.h [IN_CTYPE_DOMAIN]: Likewise.
4540 Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
4542 * fmt.c (copy_rest): Don't copy past end of prefix. Output
4543 trailing spaces if the prefix had any. Before, fmt would
4544 improperly output NUL bytes. The command
4545 perl -e 'print "| S";' |fmt -p' | '|tr '\0' @
4546 output `|@S'. Reported by François Pinard.
4548 * sort.c (main): Give a better diagnostic for `sort -0'.
4549 Reported by Karl Berry.
4551 * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
4552 Otherwise, some systems lose because the value AC_C_INLINE choses
4553 with plain `cc' is different from that chosen when using the ANSI-mode
4554 C compiler. From Kaveh Ghazi.
4556 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
4558 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
4559 * configure.in: Use it.
4560 * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
4561 (EXTRA_DIST): Add getopt.c and getopt1.c
4563 * src/*.c, src/*.h: Update Copyright years to include 1996.
4565 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
4567 * getline.c: New version from gettext-0.10.12.
4568 * getline.h: Likewise.
4569 * configure.in (AC_CHECK_FUNCS): Add getdelim.
4570 Suggested by Ulrich Drepper.
4572 * md5sum.c (md5_check): Remove spurious newline at end of error
4575 * od.c (decode_one_format): Use printf's L modifier for long doubles,
4576 not `l'. From Eric Backus.
4578 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
4580 * od.c: Include <values.h>.
4581 [!BITSPERBYTE]: Define.
4582 [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
4583 * configure.in (AC_CHECK_HEADERS): Add values.h.
4585 Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov)
4587 * Makefile.am (cvs-dist): New rule. Based on the one from
4588 Tom Tromey's automake.
4590 Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
4592 * tail.c (main): Make code clearer: use new variable `n_files' in
4593 place of `argc - optind'. Use `file' instead of `argv + optind'.
4595 Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
4597 * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
4600 * memcasecmp.c: Unprotoize.
4604 * join.c (decode_field_spec): Rename local variable `valid'
4605 to invalid (and reverse sense) to avoid conflict with the
4606 macro definition in /usr/include/locale.h on SunOS 4.1.3.
4608 Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
4610 * uniq.c: Add new option --ignore-case (-i).
4611 Include memcasecmp.h.
4612 (different): Compare with memcasecmp if ignoring case.
4615 * join.c (memcasecmp): Remove static definition of function.
4616 Include memcasecmp.h instead.
4618 * memcasecmp.c: New file.
4619 * memcasecmp.h: New file.
4620 * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
4621 (noinst_HEADERS): Add memcasecmp.h.
4623 Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov)
4625 * tr.c: The following commands all failed unnecessarily.
4626 tr -cs '[:upper:]' '[X*]'
4627 tr -dcs '[:lower:]' n-rs-z
4628 tr -ds '[:xdigit:]' [:alnum:]'
4629 tr -dcs '[:alnum:]' [:digit:]'
4631 Reported by Ross Ridge (ross@worf.mks.com).
4632 (validate): Add missing conjunct (translating) in test for
4633 `translating and complementing character classes' error. Before,
4634 valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
4635 (homogeneous_spec_list): New function.
4636 (validate): Use it to relax the old (overly restrictive) restriction
4637 that prohibited use of complemented character classes when translating.
4638 Now, that is allowed as long as the translation maps many to one.
4639 (get_spec_stats): Rename and redefine global has_char_class from
4642 Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
4644 * aclocal.m4: Update NLS macros from gettext-0.10.11.
4646 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
4647 when srcdir != builddir. From Kaveh Ghazi.
4649 Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov)
4651 * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
4652 to be POSIX compliant. From Stephen Gildea <gildea@x.org>.
4654 Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
4656 * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
4657 * od.c (skip, main): Likewise.
4658 * tr.c (main): Likewise.
4660 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
4661 join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
4662 tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
4663 EXIT_FAILURE, rather than 0 or 1.
4665 Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
4667 * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
4668 is defined to zero. Suggested by Paul Eggert.
4670 * sort.c [SORT_FAILURE]: New macro.
4671 Be careful to exit with 1 only when -c is used and the
4672 input is not properly sorted. In all other cases, use
4673 SORT_FAILURE as required by POSIX.
4674 (main): Change some `error (1, ...' to use SORT_FAILURE.
4675 Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
4676 Replace all uses of `2' (as exit code) with SORT_FAILURE.
4678 Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov)
4680 * csplit.c: Include assert.h, but disable assertions.
4681 (process_line_count): Replace if-abort with a slightly relaxed
4682 assertion. Before, `echo |csplit - 1 1' would abort.
4683 Reported by Samuli.Karkkainen@hut.fi.
4684 (parse_patterns): Disallow uses like `csplit FILE 0' with zero
4685 line number, `csplit FILE 2 1' with decreasing line numbers, and
4686 warn about uses like `csplit FILE 3 3' that have equal line numbers.
4688 * sort.c (main): Declare to be of type int, not void.
4689 From Peter Seebach <seebs@taniemarie.solon.com>.
4690 * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
4691 nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
4692 wc.c (main): Likewise.
4694 Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
4696 * configure.in (PACKAGE_VERSION): New macro.
4697 * acconfig.h (PACKAGE_VERSION): Add it.
4698 * src/Makefile.am: Remove rules for generating version.c.
4699 Remove references to version.o, version.h, and stamp-v.
4700 * version.c: Remove file.
4701 * version.h: Remove file.
4702 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
4703 head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
4704 sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
4706 (main): Use PACKAGE_VERSION instead of version_string.
4708 Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
4710 * sort.c (write_bytes): Renamed from xfwrite.
4711 Remove SIZE parameter. It was always 1. Update all callers.
4712 Rename NELEM parameter to N_BYTES and change its type to size_t.
4714 Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
4716 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
4717 fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
4718 split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
4719 Initialize for internationalized message support: call setlocale,
4720 bindtextdomain, and textdomain.
4721 * system.h: Add definitions and includes for NLS.
4722 * Makefile.am (SUBDIRS): Add intl and po.
4723 * src/Makefile.am (datadir): Define.
4724 (localedir): Define.
4725 (DEFS): Add LOCALEDIR definition.
4726 (LDADD): Add @INTLLIBS@.
4727 * aclocal.m4: Add NLS-related macro definitions from
4728 gettext distribution.
4729 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
4730 HAVE_STPCPY): New macros.
4731 Add PACKAGE and VERSION.
4732 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
4733 (VERSION): Likewise.
4734 (ALL_LINGUAS): Define.
4735 (AC_CHECK_HEADERS): Add float.h.
4736 (ud_GNU_GETTEXT): Use it.
4738 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
4740 From François Pinard.
4742 * tr.c (star_digits_closebracket): Declare formal param, IDX,
4743 and local I to be of type size_t (rather than int) to avoid
4744 warnings from gcc -Wall.
4746 Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
4748 * src/Makefile.am: Adapt for automake-0.30.
4749 (noinst_HEADERS): Rename from HEADERS.
4750 (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
4751 to DEFS automatically.
4752 * lib/Makefile.am (noinst_HEADERS): Rename from HEADERS.
4754 Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
4756 * join.c (xfields) [without -t]: Ignore leading blanks.
4757 From David Dyck (dcd@tc.fluke.COM).
4759 Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
4761 * join.c [TOLOWER]: Define.
4762 (usage): Briefly describe new --ignore-case (-i) option.
4763 (memcasecmp): New function.
4764 (main): Set IGNORE_CASE for -i.
4765 (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
4766 Suggestion and an initial patch from Alberto Accomazzi
4767 <alberto@cfa0.harvard.edu>.
4769 Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
4771 * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
4772 (usage): Describe it.
4773 (main): Set eolchar to 0 for -z.
4774 From Mark W. Eichin <eichin@cygnus.com>.
4776 Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
4778 * join.c (main): Mark two strings for translation.
4779 * md5sum.c (md5_check): Mark a string for translation.
4780 From François Pinard.
4782 Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
4784 Update for automake-0.29.
4785 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
4786 * src/Makefile.am: Likewise.
4787 * lib/Makefile.am: Likewise.
4788 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
4789 * man/Makefile.am (man_MANS): Renamed from MANS.
4791 * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
4793 From Derek Clegg (dclegg@next.com).
4795 Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
4799 Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
4801 * tail.c (dump_remainder): Flush stdout when tailing-forever on
4802 multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
4804 Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
4806 * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
4807 not just -Xc. From François Pinard.
4809 * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
4810 distributed automatically. From Tom Tromey.
4812 Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
4814 * nl.c: Include rx.h after limit.h (not before) to avoid warning
4815 about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
4816 its definition. From Kaveh Ghazi.
4818 * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
4819 works again. Reported by François Pinard and Kaveh Ghazi.
4821 * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
4822 [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
4823 (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
4824 mismatch errors from e.g. SunOS's /bin/cc.
4825 Reported by Kaveh Ghazi.
4827 Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
4829 * configure.in (VERSION): Set variable directly rather than from
4831 * Makefile.am (DIST_OTHER): Remove VERSION.
4832 * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
4833 (stamp-v): New target; depend on Makefile.
4834 (DISTCLEANFILES): Add stamp-v, version.c.
4836 Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
4838 * sort.c (keycompare): Rewrite cases handling ignored characters
4839 so that they really are ignored. Reported by Carl Johnson
4840 <carlj@cjlinux.home.org>.
4842 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4844 * configure.in: Touch stamp-h only if config.h is remade.
4846 * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
4847 syntax_parens field.
4849 Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
4851 Use automake to generate Makefile.in files.
4852 * Makefile.am: New file.
4853 * doc/Makefile.am: New file.
4854 * lib/Makefile.am: New file.
4855 * man/Makefile.am: New file.
4856 * src/Makefile.am: New file.
4858 Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
4860 * fmt.c (main): Use xstrtol instead of atoi.
4862 * fold.c (main): Use xstrtol instead of atoi.
4863 (fold_file): Make a couple locals `int', not size_t, and cast
4864 fwrite's third parameter to size_t.
4866 * nl.c (main): Use xstrtol instead of atoi.
4867 Rename misleading --first-page=N option to --starting-line-number=N.
4870 * uniq.c (main): Use xstrtol instead of atoi.
4872 Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
4874 * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
4876 Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
4878 * aclocal.m4 (ud_WITH_REGEX): New macro.
4879 * configure.in: Use it.
4880 * rx.c, rx.h: New files.
4881 * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
4882 (SOURCES, DISTFILES): Add rx.c, rx.h.
4883 * acconfig.h (WITH_REGEX): Add it.
4884 * csplit.c [!WITH_REGEX]: Include rx.h.
4885 * nl.c [!WITH_REGEX]: Likewise.
4886 * tac.c [!WITH_REGEX]: Likewise.
4887 From Ulrich Drepper and François Pinard.
4889 Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
4891 * sort.c (main): Diagnose invalid arguments to -k, then fail.
4893 * sort.c (numcompare): Properly handle all cases in which signs differ.
4896 * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
4897 Append `/man1'. Reported by Karl Heuer.
4899 * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
4901 * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
4903 Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
4905 * lib/Makefile.in (default): New target.
4907 * sort.c (numcompare): Properly order `-' and valid integers;
4908 treat `-' as if it were zero. Reported by Ross Alexander
4909 <r.alexander@auckland.ac.nz>.
4911 * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
4912 (.PHONY): Depend on default.
4914 Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
4916 * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
4917 (jm_AUTODEPS): Likewise.
4918 (jm_WITH_GNU_MAKE): Likewise.
4919 * configure.in (jm_AUTODEPS): Remove.
4921 * sort.c (begfield): Replace loop with equivalent if-else.
4922 (limfield): Fix bug that made field specs like -k1.5 return a
4923 pointer into LINE beyond the first field.
4924 Don't try to trim trailing blanks here; it's not
4925 possible because we don't know where the field begins.
4926 Replace loop with equivalent if-else.
4927 (trim_trailing_blanks): New function.
4928 (findlines): Call it.
4929 (keycompare): Likewise.
4930 (main): Don't decrement T2 corresponding to `x' in field
4931 specs like -ku.v,w.x.
4933 Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
4935 * csplit.c [!UINT_MAX]: Define.
4938 (string_to_number): Remove function.
4939 (check_for_offset): Use xstrtoul instead of string_to_number.
4940 (parse_repeat_count): Likewise.
4941 (parse_patterns): Likewise.
4944 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
4946 * Makefile.in (all et. al.): If make was invoked with -k and a
4947 sub-make fails, fail after the loop rather than exiting right away.
4948 Otherwise, make's -k option could be ineffective.
4950 Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
4952 * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
4954 Update for autoconf-2.5:
4955 * src/Makefile.in (libdir): Set to @libdir@.
4956 (bindir): Set to @bindir@.
4957 * doc/Makefile.in (infodir): Set to @infodir@.
4958 * man/Makefile.in (exec_prefix): Remove it.
4959 (mandir): Set to @mandir@.
4960 (bindir): Remove it.
4962 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
4964 * Makefile.in (default): New default target. Depend on `all' to
4965 work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
4968 Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
4970 * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
4972 * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
4973 * src/Makefile.in (C_MKDEP): Rename from MKDEP.
4974 * lib/Makefile.in (C_MKDEP): Likewise.
4975 * mkdep-Makefile (C_MKDEP): Likewise.
4978 * csplit.c [__P]: Don't define it here.
4979 * pr.c [__P]: Don't define it here.
4980 * fmt.c [__P]: Don't define it here.
4981 * system.h [__P]: Define it here.
4983 * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
4984 Revamp, with suggestions from Franc,ois Pinard.
4985 (jm_WITH_GNU_MAKE): New macro.
4986 (jm_PROG_MKDEP): New macro.
4987 * configure.in (jm_PROG_MKDEP): Use it.
4988 * src/Makefile.in (MKDEP): Set it.
4989 * lib/Makefile.in (MKDEP): Likewise.
4990 * mkdep-Makefile: Use MKDEP, not DEP_CC.
4991 (DEP_CFLAGS): Remove it.
4993 Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
4995 * sort.c: Add support for sorting numbers in scientific notation.
4997 (struct keyfield): Add field: general_numeric.
4998 (usage): Describe -g option.
4999 (general_numcompare): New function.
5000 (keycompare): Use new comparison function when general_numeric
5002 (set_ordering): Honor `g' flag.
5003 (main): Initialize and use new field.
5004 From Marcus Daniels <marcus@sysc.pdx.edu>.
5006 * configure.in (AC_REPLACE_FUNCS): Add strtod.
5007 * lib/Makefile.in (SOURCES): Add xstrtod.c.
5008 (OBJECTS): Add xstrtod.o.
5009 (DISTFILES): Add xstrtod.h.
5011 * csplit.c (cleanup): Don't exit.
5012 (interrupt_handler): Rewrite to reset default signal handler
5013 then repost caught signal.
5014 (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
5015 process_line_count, process_regexp, create_output_file,
5016 close_output_file): Call cleanup_fatal, not cleanup.
5017 Add const attribute to lots of parameters.
5018 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
5021 * tac.c (cleanup): Don't exit.
5022 (cleanup_fatal): New function. Call cleanup, then exit.
5023 (sighandler): New function.
5024 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
5026 (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
5028 Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
5030 * od.c (skip): Cast fseek's offset argument to `long'.
5031 Erik Bennett <bennett@cvo.oneworld.com> reported that this is
5032 necessary on BSDI systems. And if offset doesn't fit in a long,
5033 then try using lseek instead.
5035 * sort.c (xmalloc): Declare static.
5036 (xrealloc): Likewise.
5038 * tac.c (cleanup): Add signal number parameter.
5041 * cat.c (main): Don't die when dev/ino of input and output are
5042 the same and the file descriptors correspond to stdin and stdout.
5043 This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
5044 Otherwise, running `cat << X > $$' would fail with `cat: -: input
5045 file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
5047 * Makefile.in (DISTFILES): Add @README_ALPHA@.
5048 (config.status) Depend on VERSION.
5049 * configure.in: Set README_ALPHA if the version number ends in [a-z].
5051 Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
5053 * fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
5055 src/Makefile.in (.c._c): Don't redirect directly to $@.
5056 (._c._o, .c._o): Remove temporary src file.
5058 Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
5060 * VERSION: New file.
5061 * configure.in (VERSION): New variable.
5062 (PACKAGE): New variable.
5064 * Makefile.in (DISTFILES): Add VERSION.
5065 (distdir): Use @PACKAGE@-@VERSION@, not distname.
5066 Remove all references to distname.
5067 * src/Makefile.in (version.c): Generate it.
5068 (SOURCES): Remove now-generated version.c.
5069 (distclean): Delete version.c.
5070 * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
5073 * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
5074 Remove all references to distname.
5076 * split.c: New option: --verbose.
5077 (main): Recognize it.
5078 (usage): Document it.
5079 From Marty Leisner <leisner@sdsp.mc.xerox.com>.
5081 Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
5083 * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
5087 (store_columns): Remove spurious 2nd argument in call to read_line.
5088 [__P]: Define. Use it in prototyped forward decls.
5090 * csplit.c: Move prototypes after struct declarations.
5091 Remove prototypes for xmalloc, xrealloc.
5092 Protect prototypes with __P.
5093 (new_control_record): Cast arg 1 to realloc.
5095 * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
5098 Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
5100 * csplit.c (close_output_file): Set output_stream to NULL so we
5101 don't recurse endlessly between this function and cleanup.
5103 * unexpand.c: Reorder functions to obviate forward dcls. Remove
5104 forward dcls. Protoize. Add `const' attribute to some parameters.
5106 Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
5108 * wc.c: Reorder functions to obviate forward dcls. Remove
5109 forward dcls. Protoize. Add `const' attribute to some parameters.
5111 * split.c: Likewise.
5113 * split.c (isdigits, convint): Remove these.
5114 (main): Use xstrtol instead.
5116 Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
5118 * paste.c (main): Move function body to end of file.
5119 Remove forward dcls and protoize.
5120 * sum.c (main): Likewise.
5121 * nl.c: Protoize. Reorder functions to obviate forward dcls.
5122 Remove forward dcls.
5124 * src/Makefile.in (OBJECTS): Reflect that all of the above
5127 * sum.c (bsd_sum_file): Give file name parameter const attribute.
5128 (sysv_sum_file): Likewise.
5130 * tac.c (xwrite): Give output buffer parameter const attribute.
5131 (output): Likewise for both parameters.
5132 (tac): Likewise for file name parameter.
5133 (tac_file): Likewise.
5135 Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
5137 * md5sum.c (md5_check): Use the same message format when there is
5138 a single file and it gets a read error or checksum mismatch as when
5139 there are more. Write that warning to standard error, not standard
5140 output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
5142 Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
5144 * sort.c (xtmpfopen): New function to set proper permissions on
5145 temporary files. Use it instead of xfopen. Reported by Erik Corry
5146 (erik@kroete2.freinet.de).
5148 Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
5150 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
5151 * configure.in: Use it.
5153 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
5154 (.c.o): Rewrite to be more like src/Makefile.in.
5156 * src/Makefile.in (distclean): Remove .deps.
5157 Include @top_srcdir@/mkdep-Makefile.
5159 * mkdep.Makefile: New file.
5160 * Makefile.in (DISTFILES): Add mkdep-Makefile.
5161 * doc/Makefile.in (mostlyclean): Also remove *.info.
5163 Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
5165 * od.c: Indent cpp directives.
5167 * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
5168 with large repeat counts.
5169 (struct E_string): New struct.
5170 (find_closing_delim): Take E_string arg rather than char* and length.
5171 (find_bracketed_repeat): Likewise.
5172 (star_digits_closebracket): New function.
5173 (append_char_class): No longer give diagnostic.
5174 (append_equiv_class): Likewise.
5175 (build_spec_list): Give them here instead, allowing string1 like
5176 [:*][:upper:] that got errors before.
5177 Take E_string arg rather than char*.
5178 Convert switch stmts into if-then so as to use ES_MATCH.
5180 Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
5182 * cat.c: Protoize. Reorder functions to obviate forward dcls.
5183 Remove forward dcls.
5184 * expand.c: Likewise.
5191 * src/Makefile.in (OBJECTS): Reflect that all of the above
5194 * head.c: Add `const' attribute to dcls of lots of formals.
5196 * sort.c: Add `const' attribute to dcls of lots of formals.
5197 Move struct dcls to precede dcls of file-scope variables.
5198 (monthtab, keyhead): Separate variable dcls from type dcls.
5200 Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
5202 * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
5203 list item separators, per POSIX spec.
5204 (prjoin): Rewrite loop that iterates over field specs.
5205 Handle case in which file spec is 0.
5207 Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
5209 * strpbrk.c: New file.
5210 * lib/Makefile.in (SOURCES): Add strpbrk.c.
5213 Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
5215 * join.c (add_field): No longer return a value.
5216 (decode_field_spec): New function.
5217 (add_field_list): Rewrite to be more strict.
5218 Before, `,1.2' was accepted as valid.
5219 (main): Use xstrtol instead atoi.
5220 Combine nearly identical -a and -v cases.
5223 Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
5225 * join.c (main): Report `too few/many non-option arguments'
5226 then print --help output rather than just the latter.
5227 Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
5228 (usage): Describe POSIX -1, -2 options and deprecate -j* ones
5230 * join.c (usage): Move to precede all other functions.
5234 Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
5236 * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
5237 to determine whether `sigaction' functions are available.
5238 Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
5239 Fix suggested by Karl Berry.
5241 * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
5244 * cut.c: Convert many declarations using `int' to use `unsigned int'
5245 to avoid warnings from `gcc -Wall' about comparing signed and
5247 (set_fields): Use memset (not open coded loop) to initialize array.
5249 Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
5253 * Makefile.in (DISTFILES): Remove README.alpha for major release.
5255 * od.c (decode_one_format): Remove spurious semicolon.
5258 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
5260 * man/Makefile.in (install-data, uninstall): Use sed not basename.
5261 The GNU Coding Standard suggests that only a select set of
5262 relatively standard utilities be used in Makefiles. basename is
5263 not among them. Suggested by Ulrich Drepper.
5265 Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
5267 * cksum.c: Protoize.
5270 * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
5272 (cksum): Depend on cksum$O.
5273 (cut): Depend on cut$O.
5275 Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
5279 * Makefile.in (DISTFILES): Add README.alpha.
5281 * lib/Makfile.in (GETOPT, MEMCHR, REGEX): New variables.
5282 (OBJECTS): Use them instead of hardcoding object file names.
5283 Suggested by Ulrich Drepper.
5285 * md5sum.c (md5_check): Distinguish between open/read failure
5286 and checksum mismatch.
5288 Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
5290 * md5sum.c: Protoize.
5291 * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
5292 (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
5293 (md5sum): Depend on md5sum$O.
5295 * md5sum.c (main, usage): Remove -h, -s, -v short options.
5296 Rename --verbose to --warn, --quiet to --status.
5297 (main): Handle --help and --version using parse_long_options.
5298 (md5_check): Check ferror.
5300 * sort.c (tempname): Replace `16' with a more readable expansion.
5301 Make sure that counter never exceeds 99999.
5302 (checkfp): Rearrange loop to avoid duplicate test.
5303 Move a couple dcls from function scope into inner block.
5305 Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
5307 * md5sum.c (main): Fail if either --verbose or --quiet is specified
5308 when not verifying checksums.
5310 * md5sum.c (md5_check): Fail if no valid line is found.
5311 Don't use the word `fail' unless there were failures --
5312 instead, say `all N tests passed.'
5314 * md5sum.c (main) [handling --string option]: Don't output
5315 nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
5316 * md5-test.rfc: Remove now-inconsistant `b' marker.
5317 (usage): Clarify help message. With suggestions from Greg Troxel.
5319 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
5321 * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
5322 compiler warning. From Ulrich Drepper.
5324 * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
5325 compiler warning. From Ulrich Drepper.
5327 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
5330 Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
5332 * system.h (_): Define macro -- as empty for now.
5333 * src/*.c: Annotate localizable strings with _(...). From Franc,ois.
5335 Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
5339 * configure.in: Add fp_C_PROTOTYPES.
5341 Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
5343 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
5344 Add suffixes, dependencies, and rules to convert ANSI source to K&R
5345 when required. Mark tr.o and comm.o as the only such files (for now).
5350 * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
5351 (configure): Depend on aclocal.m4.
5352 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
5354 Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
5356 * md5sum.c (md5_check): Use getline instead of fgets.
5358 * lib/Makefile.in (SOURCES): Add getline.c.
5359 (OBJECTS): Add getline.o.
5360 (DISTFILES): Add getline.h.
5361 (getline.o): Depend on getline.h.
5363 * md5.c [memcpy]: Define to bcopy if needed.
5364 (md5_buffer): Explicitely cast SWAP expressions to unsigned
5367 * lib/Makefile.in (strtoul.o): Depend on strtol.c.
5369 * sort.c (check): Print `disorder on...' message on standard error,
5370 not stdout. This is a minor concession to POSIX which says
5371 `no output shall be produced...'.
5373 * sort.c (main): Fix -k so it works. -k 2,3 was being treated
5374 like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
5376 Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
5378 * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
5379 before applying $(transform) to manual name. From Karl Berry.
5381 * md5sum.c (have_read_stdin): New global variable.
5382 (md5_file, md5_check): Set it.
5385 * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
5386 (md5_file): Take a new parameter, MD5_RESULT, and no longer
5388 (md5_check): Invoke md5_file instead of calling fopen directly.
5389 When giving a diagnostic for a line with invalid format, also report
5391 (main): Generate output after a successful md5_file call.
5392 [in many places]: Upon detection of an error, rather than exiting
5393 immediately, issue a diagnostic, note that an error occurred and
5396 Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
5398 * tail.c (tail_bytes) [from_start]: For regular files, seek
5399 relative to the initial input file pointer position, not
5400 necessarily from the beginning of the file.
5401 [!from_start]: Don't back up past the initial position of the
5403 (tail_lines): Call file_lines only if FD refers to a regular file
5404 with its file pointer positioned at beginning of file. Otherwise,
5405 call pipe_lines. This is a kludge. Once there's a decent test
5406 suite, fix this properly.
5407 Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
5408 would output both lines of the input file even though the first had
5409 already been read. Reported by John Roll (john@panic.harvard.edu).
5411 * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
5413 * csplit.c (main): When too few arguments are given, don't just
5414 issue the usage message; also report why.
5416 Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
5418 * md5sum.c (md5_check): New function -- extracted from main.
5420 Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
5422 * md5sum.c (md5_file): New function -- extracted from main.
5423 (main): Call the new function instead of doing all that in an
5424 if-stmt. Always use "%s" format rather than raw filename as
5425 format argument in printf-style functions like error. Otherwise,
5426 filenames containing `%' are likely to lose.
5427 Remove all mention of `old format'.
5428 (split_3): No longer parse the `new format.' There is only one
5429 valid format now: the compatible one.
5431 * lib/Makefile.in (SOURCES): Add md5.c.
5432 (OBJECTS): Add md5.o.
5433 (DISTFILES): Add md5.h.
5434 (md5.o): Depend on md5.h.
5436 * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
5437 * lib/md5.c (md5_stream): Check for read failure and return
5438 indication of success rather than second argument.
5439 * lib/md5.h (md5_stream): Update prototype.
5440 [__P]: Define macro.
5441 * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
5442 (main): Report an error if md5_stream fails. Otherwise, running
5443 `md5sum dir-on-mounted-filesystem' always reported the checksum
5444 for an empty file. Now it gets the `is a directory' error.
5445 Greg McGary (gkm@magilla.cichlid.com) reported that the released
5446 version got stuck in an infinite loop with such arguments.
5448 * lib/md5.c: New file.
5449 * lib/md5.h: New file.
5450 * md5sum.c: Rewritten to use library interface.
5451 From Ulrich Drepper.
5453 Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
5455 * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
5457 Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
5459 * md5sum.c Add #else block after #ifdef VMS.
5460 (main): Rename local variable.
5461 Detect and report failed fclose calls on stdout and checkfile_stream.
5463 * tr.c (unqote): Comment out unreachable break stmts.
5464 (append_range): Declare FIRST and LAST parameters to be unsigned int,
5466 (find_closing_delim): Clean up interface, separating boolean success
5467 indicator and index.
5468 (find_bracketed_repeat): Likewise.
5469 (build_spec_list): Adapt to use new interfaces.
5470 Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
5471 type size_t, not int.
5472 (main): Declare NR and CHARS_READ to be of type long, not int.
5474 * sort.c (main): Comment out unreachable break stmt.
5476 * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
5477 call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
5478 off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
5479 long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
5481 * comm.c: Reorder functions so main is last, so no forward dcls
5484 Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
5486 * sort.c (main): When using obsolescent +pos -pos syntax, allow
5487 omission of field spec only when character offset is specified.
5488 Otherwise, -. +. would be accepted.
5490 Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
5492 * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
5493 position specification. For compatibility with existing practice
5494 (what vendors?), omitting M is now equivalent to specifying `0' for M,
5495 but only when using the +pos -pos syntax, not with the -k option.
5496 From Rick Sladkey (jrs@world.std.com).
5498 Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
5500 * od.c (dump): Correct loop-termination criterion.
5501 Before, running `printf 1234| ./od --width=4 --read-bytes=4'
5502 printed output for 8 bytes -- the last four were garbage.
5503 This happened only when the dump limit, N, was specified (with
5504 --read-bytes=N) and N was a multiple of bytes_per_block
5505 (usually 16, but 4 in this example). From Andreas Schwab.
5507 Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
5509 * lib/Makefile.in (check): Depend on libtu.a.
5511 * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
5512 (main): Print each sum line in (de facto) standard Plumb/Lankester
5514 New option: --quiet.
5515 Check option no longer takes an argument.
5516 When checking, exit status reflects success.
5518 Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
5520 * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
5521 Autoconf (via config.h) defines it away for compilers that don't
5524 * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
5525 defining to avoid redefinition warning on some systems.
5527 * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
5528 This avoids potential conflict with max macro from some system's
5529 header files when using bad pre-ANSI compilers.
5531 * uniq.c (usage): Fix typo in text of --help output.
5532 From Steve McConnel <steve@acadcomp.sil.org>
5534 * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
5535 also check `unsigned long', as a concession to systems with
5536 int's smaller than 32 bits.
5538 * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
5539 AC_FUNC_MEMCMP already handles it. This avoids warnings from
5540 ranlib on nextstep systems. From Kaveh Ghazi.
5542 * csplit.c (interrupt_handler): Declare to have a single integer
5543 parameter. Otherwise, some compilers fail with a type mismatch
5544 error in sa_handler assignment.
5546 * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
5547 headers that typedef `word' get syntax errors because of the
5548 variable by the same name.
5550 * join.c [join]: Redefine to avoid conflict with prototype in some
5551 system header file. Also for Unicos.
5553 * md5sum.c (main): Remove spurious colon in getopt spec string.
5554 From Ken Pizzini <kenp@spry.com>.
5556 Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
5558 * md5sum.c (md5_file): Initialize two elements of LEN portably,
5559 rather than with ANSI aggregate initialization. Reported by
5560 Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
5562 Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
5566 * md5sum.c (process_buffer): Copy values from struct into
5567 individual local variables before performing computation on them,
5568 then copy results back into returned struct. Solely for better
5569 optimization by compilers that can't keep struct members in
5570 registers. From Ulrich Drepper.
5572 Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
5574 * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
5575 Don't use #elif. Some older compilers don't grok it.
5576 (split_3): New function to parse out sum, flag, and filename
5577 when reading check file.
5578 (hex_digits): Remove length parameter since string parameter is
5580 (main): Don't allocate separate arrays for filename and sum
5581 when checking. Get pointers into line buffer with split_3 instead
5583 (main): Treat `no file args' just like `-' when not checking
5585 (hex_digits): Unprotoize.
5587 * md5sum.c (main): Don't use a separate loop to convert to lower
5588 case. Suggested by Ulrich Drepper.
5591 From Ulrich Drepper.
5593 * md5sum.c: Don't include values.h.
5596 * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
5597 and _POSIX_VERSION. Reported by Arne H. Juul.
5599 Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
5601 * tr.c [NDEBUG]: Define it to disable assertions. Some systems
5602 have a broken <assert.h> header.
5603 (is_char_class_member): Set a variable in each branch of switch
5604 stmt and return that value after the switch (rather than returning
5605 directly from every branch).
5606 (unquote): More int->size_t changes.
5607 (build_spec_list): More int->size_t changes.
5608 Be very careful about comparison now that variables are unsigned:
5609 Use i + 2 < len rather than i < len - 2. The latter didn't work
5610 for len < 2. Caught early thanks to a thorough regression test
5613 Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
5615 * sort.c (xfclose): Don't try to flush stdin, only stdout.
5616 Otherwise, at least Ultrix-4.3's fflush would return EOF.
5617 Reported by Jim Blandy (jimb@cyclic.com).
5619 * tr.c (non_neg_strtol): Don't compare signed and unsigned.
5620 [struct Spec_list] (indefinite_repeat_element): New member.
5621 Use size_t rather than int or unsigned long where reasonable.
5622 (get_spec_status): Make interface cleaner.
5623 (get_s1_spec_status): New function.
5624 (get_s2_spec_status): New function.
5625 (validate): Use new functions instead of get_spec_status.
5627 Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
5629 * md5sum.c: New file. From Ulrich Drepper.
5630 * md5-test.rfc: New file.
5631 * Makefile.in (PROGS): Add md5sum.
5632 (check): Run a recursive make in each subdirectory.
5633 * man/Makefile.in (MANFILES): Add md5sum.1.
5634 * src/Makefile.in (SOURCES): Add md5sum.c.
5635 (OBJECTS): Add md5sum.o.
5636 (PROGS): Add md5sum.
5637 (check): Add basic checks for md5sum.
5638 (md5sum): Add dependency and link rule.
5639 (DISTFILES): Add md5-test.rfc.
5641 * tr.c (look_up_char_class, append_char_class, append_equiv_class):
5642 Use const attribute when appropriate.
5644 Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
5646 * join.c: Overhauled to make -a1 and -a2 options work.
5647 Passed all tests in a fairly thorough test suite.
5648 Reported by Michael Hasselberg (mikelh@zonta.ping.de).
5650 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
5652 * tail.c (main): Remove dcl of and statements that set now-unused
5655 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
5656 Without this, SunOS doesn't get type for memchr.
5657 Reported by Kaveh Ghazi.
5659 Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
5661 * tail.c (tail_lines): Change one more `long' to `off_t'.
5662 Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
5664 * csplit.c [struct control]: Change type of `repeat' to unsigned
5665 long to avoid conversion warning.
5667 Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
5669 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
5671 * xstrtol.c (__strtol): Remove prototype altogether.
5672 Move inclusion of xstrtol.h back so that it follows system headers.
5676 Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
5678 * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
5681 * xstrtol.c: Define NDEBUG for systems with losing assert.h.
5682 (__strtol): Add __unsigned to prototype and use __P.
5683 Move inclusion of xstrtol.h to precede prototype.
5686 * memmove.c: Include config.h for definition of const.
5689 * All Makefile.in (install-exec, install-exec): New targets.
5692 * tr.c (look_up_char_class): Take a string length argument -- required
5693 because the argument is a string that is *not* NUL-terminated.
5694 Use strncmp, not strcmp and add string lengths comparison.
5695 (append_char_class): Update caller. Before this change,
5696 tr '[:upper:]' '[:lower:]' read one uninitialized byte.
5697 From Andreas Schwab.
5699 * split.c (next_file_name): Move dcls of file-scope variables into
5700 this function. Don't rely on arithmetic being two's complement.
5702 * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
5703 Instead, declare two FILE structs and use their addresses.
5705 * csplit.c (record_line_starts): Remove set-but-not-used,
5706 file-scope variable.
5708 Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
5710 * all source files (usage): Include one- or two-line synopsis
5711 in --help output. From Karl Berry.
5713 * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
5716 Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
5720 Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
5722 * all Makefile.in (maintainer-clean): Renamed from realclean
5725 Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
5727 * sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
5728 Don't include safe-stat.h.
5730 * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
5731 Remove all associated rules. safe-l?stat.h are no longer used.
5733 * sort.c Don't hard-code /tmp.
5734 [DEFAULT_TMPDIR]: Use this instead.
5735 * tac.c (save_stdin): Likewise.
5737 * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
5738 Reported by John Salmon (johns@mullet.anu.edu.au).
5739 Patch from Mike Haertel.
5741 Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
5743 * sort.c (tempname): AND-off high bits of pid so that its decimal
5744 string representation is no longer than five digits.
5745 From Hans Verkuil (hans@wyst.hobby.nl).
5747 Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
5749 * expand.c (add_tabstop): Give correct size when reallocating
5750 tab_list buffer. From Geoff Odhner (geoff@franklin.com).
5751 Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
5753 Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
5755 * configure.in (AC_OUTPUT): Use echo, not date, to avoid creating
5756 unnecessary conflicts for people using version control software
5758 (AC_ARG_PROGRAM): Use it.
5760 Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
5762 * head.c: Remove block of redundant comments describing options.
5763 (usage): Remove reference to -l option. It's not valid.
5765 * od.c (write_block): Declare index I as unsigned int, not int.
5766 (get_lcm): Likewise.
5767 (dump_strings): Likewise.
5769 (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
5770 (dump_strings): Declare bufsize to be of type size_t, not int.
5772 * split.c (next_file_name): Don't reuse X as an index.
5773 Declare new variable I instead.
5775 Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
5777 * csplit.c: Declare as `unsigned int' all variables that were
5779 (make_filename): Change type of arg to unsigned int.
5780 (split_file): Change type of indices to unsigned int.
5782 Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
5784 * od.c (main): Detect and fail when argument to -N is too large
5787 Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
5789 * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
5790 Remove check for sizeof long.
5792 * linebuffer.h: Undefine __P before defining it.
5793 * long-options.h: Likewise.
5794 * xstrtol.h: Likewise.
5796 * memcpy.c: New file.
5797 * lib/Makefile.in (SOURCES): Add memcpy.c.
5799 Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
5801 * src/*.c: Update Copyright dates.
5803 Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
5805 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
5806 Separate errno declaration from STDC_HEADERS.
5808 * wc.c (wc): For efficiency, handle separately the cases in which
5809 words need not be counted. Suggested by Karl Heuer.
5811 * wc.c (wc): Don't overcount the number of bytes when reading
5812 from a regular file on stdin with file pointer not at BOF.
5813 From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
5814 `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
5815 the size of the file. Now it outputs `0'.
5817 Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
5819 * cat.c (cat): Use memmove rather than bcopy.
5820 * csplit.c (load_buffer): Use memcpy rather than bcopy.
5821 (extract_regexp): Use strrchr, not rindex.
5822 * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
5823 (flush_paragraph): Use memmove instead of bcopy.
5824 * fold.c (fold_file): Use memmove instead of bcopy.
5825 * od.c (decode_format_string): Use memmove instead of bcopy.
5826 [EQUAL_BLOCKS]: Use memcmp, not bcmp.
5827 (parse_old_offset): Use strchr, not index.
5828 (dump): Use memset, not bzero.
5829 * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
5830 (fillbuf): Use memmove instead of bcopy.
5831 * split.c (main): Use memset, not bzero.
5832 (line_bytes_split): Use memmove instead of bcopy.
5833 * tac.c (tac): Use memmove instead of bcopy.
5834 (output): Use memcpy instead of bcopy.
5835 * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
5836 * tr.c (substr): Use memcpy instead of bcopy.
5837 (card_of_complement, set_initialize): Use memset, not bzero.
5839 * tr.c (substr): Don't allocate a byte for trailing NUL in result
5840 since the result needn't be NUL-terminated. Don't NUL terminate it.
5842 * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
5844 (AC_CHECK_FUNCS): Add strchr and strrchr.
5846 * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
5847 * memmove.c: New file.
5848 * memcpy.c: New file.
5850 Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
5852 * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
5853 not followed by a newline would be followed by data copied from
5854 uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
5855 Reported by Franc,ois Pinard.
5857 * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
5858 AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
5859 Be careful to use off_t instead of explicit `unsigned long'.
5860 Otherwise, systems like 4.4BSD lose on calls to fseek that
5861 expect off_t (which is long long on that system).
5862 (parse_old_offset): Use xstrtoul
5865 * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
5867 Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
5869 * tail.c (numerous functions): Give char* filename arguments the
5872 * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
5873 Add xstrtol.c and xstrtoul.c.
5874 (OBJECTS): Likewise for .o files.
5875 (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
5877 * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
5878 (distclean): Remove references to safe-l?stat.c.
5879 Remove all related rules and dependencies.
5881 * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
5883 Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
5885 * tail.c (tail_file): Fix call to error with %s in format, but
5886 no corresponding argument.
5888 * src/*.c: Include "error.h" instead of simply declaring
5890 * od.c (main): Use %lu, not %d for unsigned long.
5891 (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
5892 and STRTOL_FATAL_ERROR instead.
5894 Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
5896 * sort.c (main): Fix interpretation of field offsets when specified
5897 via -k option. They were being interpreted as zero-indexed. POSIX
5898 says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
5899 (keycompare): Don't ignore characters at the end of words when
5900 otherwise they would compare equal. From Rik Faith.
5902 * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
5903 to off_t because n_bytes is used as the option to fseek and off_t may
5904 be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
5905 imposed is in the string-to-integer converstion of xstrtol.
5906 (main): Use xstrtol instead of manual string to integer conversion.
5908 * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
5909 comparisons against '0' and '9'.
5911 * tr.c [!ULONGMAX]: Define it.
5912 [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
5914 * full-write.c: Declare (or not) errno based on definedness or
5915 errno, not STDC_HEADERS.
5916 * safe-read.c: Likewise.
5917 * xwrite.c: Likewise.
5919 Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
5921 * tail.c (dump_remainder): Flush standard output just before
5922 sleeping so that `tail -f' will output partial lines sooner.
5923 This applies only when following the end of a single file.
5924 From Leonard N. Zubkoff <lnz@dandelion.com>.
5926 * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
5927 start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
5929 * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
5930 * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
5931 not already defined.
5933 Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
5935 * tr.c: Include <getopt.h> instead of "getopt.h".
5937 * sort.c (tempname): Merge two very similar sprintf stmts into one.
5939 * tail.c: Use BUFSIZ instead of BUFSIZE.
5941 * cut.c: Declare DELIM to be `int' rather than unsigned char.
5943 * fmt.c: Use index, not strchr -- per GNU Standards.
5944 Reported by Kaveh Ghazi.
5945 Always include <config.h>.
5946 (main): Include program name in --version output.
5948 Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
5952 Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
5954 * memcmp.c, srtoul.c: Use up-to-date versions.
5955 Reported by Franc,ois Pinard.
5957 * src/Makefile.in (DEFS): Remove -Dlint... again.
5959 * src/Makefile.in (PROGS): Add fmt!
5960 Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
5962 Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
5966 Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
5968 * linebuffer.h: Use __P instead of _P since the latter conflicts
5969 with a definition in some <ctype.h>. From Kaveh Ghazi.
5971 Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
5973 * tr.c: Add const attribute where appropriate.
5975 * tail.c (BUFSIZ): Use definition from <stdio.h>.
5977 Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
5979 * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
5980 n_bytes is positive. Turn off assertions. `tail /dev/null' was
5981 getting a failed assertion. Reported by Doug McLaren
5984 * cut.c (cut_bytes): Print at least a newline for every line of input.
5985 (cut_fields): Print a newline even for lines whose only selected
5986 field is empty. But print nothing when using -s without -f1.
5987 And print nothing for empty input. Reported by
5988 Richard_Sharman@software.mitel.com.
5990 Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
5992 * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
5993 * linebuffer.h: Likewise.
5995 Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
5997 * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
5998 already handles it. From Kaveh Ghazi.
6000 * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
6001 get failures when it's defined. From Kaveh Ghazi.
6003 * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
6004 defined on some Next and Alliant systems. From Kaveh Ghazi.
6006 * sort.c join.c (main): Include version.h and call parse_long_options
6007 with the proper number of arguments. Reported by Franc,ois Pinard.
6009 Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
6011 * (configure.in): Add AC_OFF_T and rearrange by type along the
6012 same lines as autoscan.
6014 * fmt.c, fmt.1: New files.
6015 Both from Ross Paterson (rap@doc.ic.ac.uk).
6017 * Makefile.in (PROGS): Add fmt.
6018 * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
6019 (fmt): Add a link rule.
6020 * man/Makefile.in (MANFILES): Add fmt.1.
6022 Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
6024 * Makefile.in (All of them): Update from the ones in sh-utils.
6025 From now on, rules and definitions that are comon to the fileutils,
6026 textutils, and sh-utils will get ChangeLog entries only in the
6029 Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
6031 * od.c (my_strtoul): Set errno to zero before calling strtoul.
6032 Otherwise, od can fail complaining about a valid integer argument.
6033 From Andreas Schwab.
6035 Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
6037 * tr.c (main): Give an error and fail when squeezing repeats
6038 and no non-options are given. Reported by Tony Robinson
6039 (ajr@eng.cam.ac.uk).
6041 * sort.c (main): Temporarily copy each input file that might be
6042 another name for the output file. When in doubt (e.g. a pipe),
6043 copy. This allows the dangerous (historical -- in cnews) idiom
6044 `cat file | sort -o file' to work properly. Don't rely on this
6045 behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
6047 Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
6049 * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
6050 Remove CONFIG_BROKETS ifdef.
6051 * src/Makefile.in lib/Makefile.in: Don't define it.
6053 Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
6055 * full-write.c (full_write): Declare argument LEN to be size_t.
6057 Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
6059 * tail.c (tail_file): [For multiple files only]: Report truncation
6060 of monitored file and reset current file size. From Franc,ois Pinard.
6062 Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
6064 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
6065 From Franc,ois Pinard.
6067 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
6069 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
6070 decides whether to include <fcntl.h>. From Francois Pinard.
6072 Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
6074 * tr.c (substr): Fix off-by-one allocation error.
6076 Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
6078 * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
6079 (tac): Fix typo that had `1' as arg #2 of error after failed read.
6080 Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
6082 Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
6084 * configure.in [INSTALL]: Revert change of March 25. autoconf
6087 Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
6089 * join.c (prline): Remove unused function. Indent.
6091 Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
6093 * tail.c (tail_forever): Don't print headers when asked not to.
6094 From Karsten Thygesen <karthy@kom.auc.dk>.
6096 * wc.c (wc): Optimize for the case when only bytes are being counted
6097 and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
6099 Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
6101 * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
6102 * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
6104 Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
6106 * csplit.c (struct control): Add new field, repeat_forever.
6107 Remove now-unneeded definition of INT_MAX.
6108 (process_regexp): Test repeat_forever instead of comparing `repeat'
6110 (split_file): Don't even reference `repeat' count if repeat_forever
6112 (new_control_record): Initialize repeat_forever field.
6113 (parse_repeat_count): Set it instead of setting repeat count to
6115 (process_line_count): Abort for internal error instead of calling
6118 * long-options.c (parse_long_options): Take a new argument indicating
6119 the utility name (e.g. "join", not "gjoin") for version output.
6120 Print both the utility and the package names, e.g. `join - GNU
6121 textutils-1.9.1' instead of just the package name.
6123 * join.c (main): Call parse_long_options with program name arg.
6124 * sort.c (main): Ditto.
6126 * All source except sort.c and join.c (main): Change --version output
6127 to include utility name as well as package name and version info.
6129 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
6131 * configure.in: Use AC_SET_MAKE.
6132 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
6134 Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
6136 * tr.c (main): In addition to the --help usage pointer, give an
6137 explicit error message for too many arguments.
6139 Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
6141 * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
6142 of explicit echo commands.
6143 [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
6144 `./install.sh', make it `../install.sh' instead since that
6145 script will be invoked only from subdirectories.
6146 [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
6148 * cat.c (cat): The command `:|cat -s' failed on Irix5 because
6149 ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
6150 it returned EINVAL. Detect this.
6151 (main) [lint]: Initialize variables to suppress `used before
6152 initialized' warnings.
6154 * csplit.c: Change long option name from --suffix to --suffix-format.
6156 * od.c (skip): Correct a comment.
6157 (main): Don't output anything to stdout if the sole input file
6158 doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
6160 * od.c (dump) [lint]: Initialize a variable to suppress `used before
6161 initialized' warning.
6162 (main) [lint]: Ditto.
6163 * paste.c (paste_parallel) [lint]: Ditto.
6165 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
6167 * configure.in: Don't set LDFLAGS since linking now uses both
6170 Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
6172 * unexpand.c (unexpand): Don't segfault when given a name of a
6174 * expand.c (expand): Ditto.
6175 Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
6177 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
6179 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
6182 * csplit.c (load_buffer): Rather than incrementing buffer size,
6183 double it each time we fail to find a newline. Otherwise, csplit
6184 would run out of memory when processing files with very long lines.
6186 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
6188 * man/Makefile.in (manprefix): Use binprefix as the default.
6190 Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
6192 * cat.c: Use full_write and safe_read instead of write and read resp.
6198 * sum.c: Use safe_read instead of read.
6202 * tail.c: Replace calls to xwrite with calls to fwrite.
6203 Use fopen/fclose instead of open/close.
6204 (write_header): Use a single call to printf instead of four to xwrite.
6205 Use safe_read instead of read.
6208 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
6210 * install.sh: New file.
6211 Makefile.in [DISTFILES]: Add it.
6213 Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
6215 * memcmp.c: Use the latest version from the GNU C library.
6217 * cut.c [ADD_RANGE_PAIR]: New macro.
6218 (set_fields): Collect the list of all selected ranges before
6219 allocating and initializing the boolean lookup table.
6220 (cut_bytes, cut_fields): Complete rewrite. Avoid copying
6221 into buffer whenever possible. Properly handle input without
6223 (getstr): New function. Copied from getline.c, but with minor changes.
6225 * sort.c (main): Properly handle -Tdir.
6226 Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
6227 Reported by Kristoffer Rose (kris@diku.dk).
6229 * cut.c (main): Give separate errors for `-s without -f'
6230 and `-d without -f'.
6231 (main): Now -d '' means `use the NUL byte as the delimiter'.
6232 Before, it got an error.
6234 Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
6236 * configure.in [test for 8-bit clean memcmp]: Add a test to detect
6237 losing memcmp from SunOS4.1.x. From Robert H. de Vries
6240 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
6242 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
6243 so it goes in config.status. This eliminates unnecessary second run
6246 Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
6248 * configure.in (AC_HAVE_FUNCS): Add isascii.
6249 * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
6250 on AIX PS/2 1.3 systems because isascii is a function and it is used
6251 in definitions (with the necessary side effect of assigning to a
6252 global variable) of the is* macros. Also test HAVE_ISASCII and
6253 redefine ISASCII(c) instead of isascii.
6254 Reported by Minh Tran-Le (tranle@intellicorp.com).
6256 Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
6258 * configure.in: Don't run the test for 8-bit clean memcmp if we
6259 already know we'll be using our replacement.
6261 Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
6265 * tac.c (usage): Fix typo in long usage.
6266 * sort.c (usage): Likewise.
6267 From Philippe.Schnoebelen@imag.fr.
6269 * cut.c [FATAL_ERROR]: New macro.
6270 (main): Call both error and usage (2) through FATAL_ERROR in
6271 many places. Before, only `error (2...' was called.
6272 (invalid_list): Removed. This function is subsumed by FATAL_ERROR.
6274 * cut.c (cut_fields): Properly handle input lacking a terminating
6275 newline. Before, the command `printf "a\tb" |cut -f 1' generated
6278 Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
6280 od.c (usage): Change --backward-compatible to --traditional in
6281 the long usage message.
6283 Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
6287 Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
6289 * cut.c (cut_fields): Revert July 27 change. Instead, strip off
6290 trailing delimiter unless given a range of fields like `3-' that
6291 extends to end of line.
6292 (set_fields): Moved local `eol_range_start' to file-scope.
6293 Reported by Arne H. Juul (arnej@solan.unit.no).
6295 Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
6297 * fold.c (fold_file): Don't get stuck in an endless loop when
6298 width is smaller than 8 and there are TABs in the input.
6300 Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
6302 * join.c: Remove now-unused dcls of show_help and show_version.
6304 Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
6306 * csplit.c [INT_MAX]: Make sure it's defined.
6307 [not HAVE_LIMITS_H]: Don't include limits.h.
6308 From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
6310 Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
6314 Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
6316 * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
6317 From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
6319 * sort.c (main): Handle --help and --version options.
6320 * Makefile.in (sort.o): Depend on long-options.h.
6322 Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
6324 * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
6325 split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
6326 `--longopt=arg' syntax in --help message rather than `--longopt arg'.
6327 From Francois Pinard.
6329 * tail.c: Don't include <signal.h>. It hasn't been necessary
6330 since the Dec 12, 1992 change.
6332 * join.c (main): Accept `-v 1' again. Adding the --version
6333 long option had broken it, although -v1 still worked. Call
6334 parse_long_options instead of adding "help" and "version"
6335 to join's longopt strct.
6336 * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
6338 * (join): Depend on and link with long-options.o.
6339 * (join.o): Depend on long-options.h.
6341 * od.c: Change --compatible (-C) to --backward-compatible (-B).
6343 * csplit.c: Change --abandon-null-files to --elide-empty-files.
6345 Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
6347 * tr.c (get_next, string2_extend): Add default: label to switch stmt.
6349 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
6350 join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
6351 tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
6352 Exit successfully for --help, non-zero for usage error.
6353 From Francois Pinard.
6355 * configure.in: Add AC_STAT_MACROS_BROKEN.
6356 * system.h [AC_STAT_MACROS_BROKEN]: Test it.
6358 Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
6360 * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
6361 <config.h> or "config.h".
6362 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
6363 join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
6364 tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
6366 * configure.in: Use AC_CONFIG_HEADER.
6367 * Makefile.in [DIST]: Add config.h.in.
6369 * Makefile.in: Convert so make may be run from subdirectories.
6370 Add dependencies on config.h.
6371 * src/Makefile.in: Ditto.
6372 * lib/Makefile.in: Ditto.
6373 * man/Makefile.in: Ditto.
6375 Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
6377 * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
6378 In the 64-bit assignment, be careful to cast the shift operand to
6380 Abort if sizeof (unsigned long) > 8.
6382 Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
6384 * csplit.c: Allow repeat counts to be specified via `{*}'.
6385 New option --suffix=format. Supercedes --digits option.
6386 New option --abandon-null-files.
6387 From Ronald F. Guilmette (rfg@netcom.com).
6389 * csplit.1: Updated.
6390 From Ronald F. Guilmette.
6392 * csplit.c: Remove register keyword (replace with `int' in two cases).
6394 * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
6395 (bytes_to_octal_digits): New static array.
6396 (get_format_flags): Combine '+' and ' ' cases of switch stmt.
6397 Return count if for loop terminates.
6398 (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
6399 (get_format_prec): Make sure is_negative is defined before used.
6400 (get_format_conv_type): Give a different error message if there
6401 is no conversion specifier.
6402 Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
6403 (max_out): Use `%%' rather than `%' in format string.
6405 Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
6407 * pr.c (main): When argc == 1, don't try to xmalloc (0).
6409 Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
6411 * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
6414 Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
6416 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
6418 Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
6420 * src/*.c: Print version on standard output, not stderr.
6422 * configure.in: Add AC_LONG_64_BITS.
6423 * memchr.c: Use #ifdef LONG_64_BITS instead of
6424 `if (sizeof(longword) > 4)'.
6426 Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
6428 * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
6429 always handle devices. Ignore errno == EINVAL and errno == ENODEV.
6430 `cat -v /dev/null' was failing on many systems.
6432 * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
6433 `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
6434 From William Dowling <will@franklin.com>.
6436 Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
6440 * memchr.c: De-ansify the fixed version from glibc.
6441 It is supposed to work on systems with 64-bit long ints.
6443 Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
6447 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
6451 Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
6453 * pr.c (cols_ready_to_print): New function. It replaces a global
6454 variable by the same name and computes on the fly the value that
6455 was supposed to be maintained through that variable. This should
6456 put to rest the `pr -2a' bug.
6457 (main): Don't let getopt_long reorder arguments so we can
6458 distinguish between `pr -1 -2' and `pr -12'. Rework handling of
6461 * fold.c: Declare xmalloc.
6463 Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
6465 * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
6467 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
6469 * mkinstalldirs: New file.
6470 * Makefile.in (installdirs): Use it to create installation directories.
6472 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
6474 * all source: With --version, print version and exit immediately.
6476 Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
6478 * Makefile.in (installdirs): New rules for creating installation
6479 directories. (install): depend on it.
6481 * tail.c (main): Remove --compatible since `+1f' may be used
6482 to get the BSD `-0f' behavior portably.
6484 * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
6485 From Ian Lance Taylor (ian@cygnus.com).
6487 Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
6489 * tail.c (main): New option -C, --compatible to make `tail -0f'
6490 work like `tail +1f' for compatibility with BSD tail.
6492 Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
6494 * pr.c (print_page): Decrement cols_ready_to_print even when
6495 lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
6496 terminate. Add parentheses for clarity.
6498 Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
6502 * od.c (main): Remove set-but-not-used variable, `usage_error'.
6504 * split.c (main): Call usage with an argument.
6506 Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
6508 * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
6509 for 8-bit clean memcmp.
6511 * cat.c (usage, main): Remove unused argument.
6513 * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
6514 (check_for_offset): Remove unused argument `argnum.'
6516 * configure.in: Add AC_SIZE_T.
6518 Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
6520 * uniq.c (main): Interpret non-option arguments with a leading `+'
6521 only if we haven't seen `--'.
6523 * tr.c (main): Change variable name to avoid shadowed dcl.
6524 * wc.c (write_counts): Ditto.
6526 * sum.1: Make documentation agree with the code.
6528 * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
6530 Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
6532 * configure.in [AC_HAVE_HEADERS]: Add limits.h.
6534 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
6536 * od.c (parse_old_offset): Don't use prototype in function
6537 definition. Remove unnecessary conjunct from test for hexadecimal
6540 * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
6541 for long double support; there are compilers (Stardent Vistra svr4)
6542 without long double but still define __STDC__.
6544 Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
6546 * src/*.c and man/*.c except for sort: Add --help and --version
6549 * pr.c: Convert to use getopt_long.
6551 * lib/memcmp.c: Use version from glibc.
6552 [WORDS_BIGENDIAN]: Test this instead of the using glibc's
6554 * configure.in: Use AC_WORDS_BIGENDIAN to set it.
6556 * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
6559 * Makefile.in (dist): Depend on Makefile so that changes to
6560 Makefile.in (like adding new files to DISTRIB) are reflected
6561 in the new distribution.
6563 Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
6565 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
6566 other options so users can use them to override DEFS.
6567 * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
6569 * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
6570 configure's AC_SUBST will set these.
6572 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
6573 [targets that cd then run make in subdirectories]: Don't depend
6574 on `cd ..'; use a subshell instead.
6576 * Makefile.in [info, install-info, dvi, check, installcheck]:
6577 New targets but no rules; comply with standards.
6579 * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
6580 hasn't specified CFLAGS.
6581 [LDFLAGS]: Substitute into Makefile.
6583 Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
6585 * od.c: New option --compatible, -C.
6586 (parse_old_offset): New function.
6587 * od.1: Document new option.
6589 Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
6591 * cut.c, expand.c, join.c, nl.c: Always call error with errno
6592 (not zero) after failed fclose or non-zero ferror.
6594 Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
6596 * configure.in: Add check for working memcmp; use GNU's if
6597 the system's doesn't grok the 8th bit.
6598 * memcmp.c: Fix it so it groks the 8th bit.
6599 TODO: We really need to provide a fast memcmp, since most
6600 machines will have a broken memcmp. Probably should get
6602 * sort.c (mergefps): Maintain keybeg and keylim when copying
6603 the current line to `saved'.
6604 (numcompare): Skip white space here since -n no longer implies -b.
6605 (getmonth): Skip white space here since -M no longer implies -b.
6606 (compare): Completely overhauled to make the 8th bit work right,
6607 also to properly handle the global reverse option.
6608 (set_ordering): -n no longer implies -b, according to Posix.
6609 For consistency, -M also no longer implies -b.
6610 (main): Correct treatment of -r and global keys.
6611 (findlines): Clear keybeg and keylim if no keys are used.
6612 (sort): Avoid overwriting tempfiles[] array bounds.
6614 Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
6616 * pr.c (close_file): Reverse May 13, '92 change, but add the condition
6617 that cols_ready_to_print not be decremented when printing across.
6618 The command `echo |pr -2ta' didn't terminate.
6619 (print_page): Rewrite conditional (that had side effects in second
6620 conjunct) using nested if statements to make it clear that we do
6621 indeed want those semantics.
6623 Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
6627 * system.h: Try BBSIZE if BSIZE isn't defined.
6628 From Tony Robinson <ajr@eng.cam.ac.uk>.
6630 Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
6632 * tail.c (tail_forever): Use an array of file descriptors
6633 instead of forking processes.
6634 (dump_remainder): Return number of bytes read.
6635 (tail_file): Fill in the new array.
6636 From Ian Lance Taylor.
6638 Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
6640 * system.h: Only define index, bcmp, etc. if not already defined.
6642 Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
6644 * tr.c (is_char_class_member): Remove unreached return after abort.
6646 Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
6648 * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
6649 sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
6650 of <ctype.h> and definitions of is* ctype macros to system.h.
6651 Change a few more uses of is* ctype macros to (protected) upper
6654 * system.h: Add isascii-protected ctype IS* macros.
6656 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
6658 * all files using getopt.h: Convert static declarations of
6659 struct option to use new macros from getopt.h: no_argument,
6660 required_argument, and optional_argument.
6662 Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
6664 * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
6666 * tr.c (main): Close stdin and stdout and check return status.
6668 Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6670 * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
6673 Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
6675 * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
6676 use isascii if it is defined.
6677 (is_char_class_member, make_printable_char, make_printable_str,
6678 non_neg_strtol): Use new macros instead of lower case ones
6681 * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
6682 macros like pr.c. Suggested by David J. MacKenzie.
6684 * od.c (print_ascii, dump_strings): Check for isascii before isprint.
6685 (dump_strings): Free malloc'd buffer before returning.
6686 (skip): Return non-zero if an error occurred, zero otherwise.
6687 Exit only if asked to skip beyond end of combined input.
6688 (check_and_close): New function.
6689 (skip, read_block, read_char): Call check_and_close when done
6690 processing the file associated with in_stream.
6691 (skip, read_block, read_char): Set have_read_stdin.
6692 (main): Close stdin (if it was ever read) and check for errors
6693 just before exiting.
6694 (write_block, dump_strings, dump): Don't test return value from
6695 functions that operate on streams. Rely on later ferror tests.
6697 Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6699 * sort.c (main, usage): Add -T option.
6701 Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6703 * tail.c (tail_forever, sigusr1, kill_kids): New functions to
6704 do -f on multiple files.
6705 (main): Call tail_forever.
6706 From Ian Lance Taylor.
6708 Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6710 * cut.c (cut_fields): Add cast.
6712 * od.c (decode_one_format): Remove '#' from pre_fmt_string;
6713 many systems don't support it.
6714 Conditionalize long double support on __STDC__, not __GNUC__.
6715 From Ian Lance Taylor.
6717 Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
6719 * sort.c (numcompare, keycompare): Add parentheses suggested
6720 by gcc -Wall. Put braces around individual monthtab initializers.
6722 * cksum.c: Declare error. Make checksum table `const.'
6724 * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
6726 * split.c (main): Add `default: abort();' to enumeration switch.
6728 * All files: Make all functions and extern variables static.
6729 Make all longopts arrays const as well as static.
6730 Make a couple statically initialized aggregates `const.'
6732 Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6734 * od.c (main): Make old-style format options accumulate.
6737 Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6739 * tr.c (look_up_char_class): Add cast.
6741 * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
6742 Add `const' to variable receiving value from re_compile_pattern.
6744 * wc.c (wc): If doing only -c, use st_size for regular files.
6746 * fold.c (fold_file): Was folding 1 column too early.
6747 From Eric Backus <ericb@lsid.hp.com>.
6749 * memset.c: New file.
6751 Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6753 * cksum.c: New file.
6755 Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6757 * tac.c (tac_stdin): Handle SIGPIPE.
6758 * sort.c (main): Handle SIGTERM.
6762 * system.h [USG || STDC_HEADERS]: Define bcmp.
6764 Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6766 * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
6768 Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6770 * paste.c (main): Don't write on a string constant.
6772 Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
6774 * tr.c: Minor cleanup. Replaced some assert(0) with abort().
6776 Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6778 * cmp.c, cmp.1: Move to diff distribution.
6780 Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6782 * system.h: Change FOO_MISSING to HAVE_FOO.
6784 Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
6786 * pr.c (COLUMN): Add structure member to remember filename.
6787 (main, init_fps, open_file, close_file): Use it.
6789 (close_file): Don't decrement cols_ready_to_print when closing
6790 a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
6792 Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
6794 * cmp.c: --show-chars -> --print-chars.
6796 * pr.c: Rename some variables.
6798 Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6800 * system.h: Define DEV_BSIZE if not defined.
6802 Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
6804 * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
6806 Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6808 * sort.c (main): Don't stop processing args when we hit "-";
6809 treat it like a regular filename.
6810 From ian@airs.com (Ian Lance Taylor).
6812 * pr.c (print_page): Fix off by one line count when ^L is in input.
6813 From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
6815 Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
6817 * tr.c (validate): Change error message so it doesn't mention
6818 actual name of --truncate-set1 option. From David MacKenzie.
6820 Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
6822 * tr.c (string2_extend, validate): Give an error message when
6823 translating without --truncate-set1, with empty string2, and
6824 with non-empty string1. "tr 1 ''" produced a failed assertion.
6826 Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6828 * system.h: Change how ST_BLKSIZE is calculated to allow for
6829 non-POSIX systems that don't define BSIZE in sys/param.h.
6831 Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6833 * sum.c (main, bsd_sum_file): Don't print filename if BSD
6834 algorithm is used and only one file was given.
6836 Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
6838 * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
6839 with starting character equal to ending character. This is
6840 contrary to the POSIX spec, but what is already implemented
6841 in find_closing_delim.
6843 Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6847 * sort.c (numcompare, checkfp): Add parens to placate gcc2.
6849 * sort.c (mergefps): For -u, output the first, not last, of
6850 the lines that compare equal. From Mike Haertel.
6852 Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6854 * tr.c: Remove initial capitals and periods from error messages.
6856 Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6858 * sum.c (main): Add -r option for SYSV compat.
6860 Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6862 * sort.c (compare): If -s given, leave lines in their original order.
6863 (main): Recognize -s.
6864 (usage): Document -s.
6867 Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
6869 * sort.c (sort): Check for complete parsing of buffer into
6870 lines before nixing temp files.
6872 Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6874 * sum.c (sysv_sum_file): Use %lu instead of %u to print a
6875 long. Not that it matters for GNU . . .
6877 * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
6878 (append_normal_char, append_range, append_char_class,
6879 append_repeated_char, append_equiv_class, spec_init):
6880 Initialize `next' field of new `struct List_element'.
6881 From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
6883 Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
6885 * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
6887 Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6891 * nl.c: Support multiple files and "-" for stdin.
6892 (main): Check for read and write errors.
6893 (nl_file): New function.
6895 Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6897 * tr.c (main): -t option was called -b in getopt spec.
6898 (validate): Don't warn that set1 is longer than set2.
6900 * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
6902 Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6904 * nl.c: New program from bin-src.
6906 * nl.c (main): Use a struct linebuffer for line_buf.
6907 (process_file): Use readline instead of fgets, to preserve NULs.
6908 (check_section): Use memcmp instead of strncmp.
6909 (proc_text): Print line_buf with fwrite instead of printf.
6911 * nl.c (main): Usage message if too many args given. Check
6912 for error in closing input file. Lengths of section delimiter
6913 strings were 1 too large. Take separator_str into account in
6914 length of print_no_line_fmt.
6915 (build_print_fmt): Allocate space for print_fmt, in case
6916 separator_str is long.
6917 (proc_text): A blank line is one that contains nothing, not
6918 even nonprinting characters.
6920 Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6922 * All programs: Document `--' instead of `+' to introduce
6923 long-named options, in usage messages.
6925 * sum.c (bsd_sum_file): Renamed from sum_file.
6926 (sysv_sum_file): New function.
6927 (main): Recognize an option to select between the algorithms.
6929 Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
6931 * pr.c (close_file, print_page): Fixed bug that had the command
6932 yes |head |pr -t printing "yyyyyyyyyy".
6933 * (print_page): Fixed bug that had pr -3 -a printing two too few
6934 trailer lines per page.
6935 * (main): Added restriction that -a and -m are incompatible.
6936 Although the POSIX spec doesn't explicitly say they shouldn't
6937 be used together, it says -a modifies the -column option and
6938 that -column shouldn't be used with -m.
6940 Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
6942 * nl.c: Include regex.h after, not before, sys/types.h.
6944 Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
6946 * sort.c (fillbuf) return bytes buffered instead of bytes read.
6948 Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
6950 * sort.c (LINEALLOC): New #define.
6951 (struct lines): New field ``limit''.
6952 (initlines): Set it from new arg ``limit''.
6953 (sort, mergefps, checkfp): Pass new arg to initlines().
6954 (findlines): Don't realloc past lines->limit.
6956 Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6958 * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
6959 HAVE_UNISTD_H and _POSIX_VERSION.
6961 * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
6963 Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
6965 * tr.c: Fixed an inaccurate comment on posix_pedantic.
6967 Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
6969 * tr.c: Changed underscores to hyphens in long option name
6970 "sysv_string2_truncate".
6972 Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6974 * tac.c (main): Set obscure_syntax to tell re_search to
6975 allocate memory for the group registers.
6977 Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6979 * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
6980 signal, which POSIX doesn't have.
6981 * sort.c: Replace inthandler and huphandler with sighandler.
6982 * csplit.c (main): Only handle signals if they were not being
6985 * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
6987 Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
6989 * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
6990 * tr.c (squeeze_filter): Comment a little on why it's better
6991 to step through the input by two.
6992 * tr.c (set_initialize): Write a comment describing the function.
6993 * tr.c: Eliminated the variable `portability_warnings' and replaced
6994 references to it by references to `!posix_pedantic'. One of the
6995 uses of portability_warnings had been wrong.
6997 Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6999 * tr.c: New program.
7001 Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7003 * linebuffer.[ch] (freebuffer): New function (used by cron).
7005 Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7007 * system.h, configure, Makefile.in: Don't include memory.h if
7008 STDC_HEADERS, removing need for MEMORY_H_MISSING.
7010 Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
7012 * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
7013 Somehow, part of my patch didn't make it last time.
7015 Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
7017 * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
7019 * cmp.c (cmp): Print EOF message to stderr, not stdout, for
7022 * sort.c (xfwrite): fwrite never returns < 0, so check if
7023 number written is number we asked to write.
7024 (fillbuf, main): fread never returns < 0, so check ferror instead.
7027 Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
7029 * pr.c (print_page): Really fixed `extra newline at EOF' problem.
7030 * (store_columns): Fixed bug that caused `pr -b -2' to coredump
7031 on files of certain lengths.
7033 Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
7035 * pr.c (print_page): Fixed to not add single spurious newline
7036 at EOF when using -t.
7038 Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
7040 * pr.c (print_page): Don't pad the page if -t given.
7042 * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
7044 Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
7048 * configure, system.h: Include memory.h if it works.
7050 * split.c: Allow `b' unit as well as `k' and `m'.
7052 * head.c, tail.c: Replace -b +blocks option with specifying
7053 units (b, k, or m) after the number.
7054 (parse_unit): New function.
7056 * fold.c (main): Check that -w arg is a number.
7058 * cut.c: +delimiter takes an arg.
7060 Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
7062 * pr.c (close_file): Don't close an already closed file.
7064 Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7066 * memchr.c: New file.
7067 * configure: Check if it's needed.
7069 * csplit.c, gcsplit.1: New program.
7071 * pr.c (cleanup): Only free buffers if they were allocated.
7073 * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
7075 Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
7077 * pr.c: The following 3 bugs appeared (at least) when printing
7078 a single file with the options `-3 -f'.
7079 * (print_white_space): Single spaces were being replaced
7081 * (print_page): Some lines were getting too much white space
7082 at the beginning because spaces_not_printed wasn't being reset
7084 * (read_line): The single space between a truncated column
7085 on its left and the column on its right was omitted. Fixed
7086 so that previous value of input_position is restored before
7089 Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7091 * configure: Only remove /etc from PATH when it's not part of
7094 Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
7096 * linebuffer.c (readline): Fix incorrect recalculation of `end'.
7098 * head.c, tail.c: Replace `mode' variables and bitmasks with
7099 separate variables for each option.
7101 Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
7103 * wc.c: New program.
7105 Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
7107 * fold.c (fold_file): Read in an int, not a char, for EOF
7110 * configure: Check whether st_blksize is missing.
7112 * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
7113 defined, instead of /tmp.
7115 Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7117 * xwrite.c [POSIX]: unistd.h might require sys/types.h.
7119 Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7121 * paste.c (main): Consider -d "" to be like -d "\0",
7122 for POSIX (if I read it right).
7124 * sort.c, join.c: New programs.
7126 * cut.c (set_field): Allow blanks as well as commas to
7127 separate numbers in ranges.
7129 Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
7131 * pr.c: Failure to open an input file is no longer a fatal error.
7132 A message is printed for each failed open. When printing
7133 in parallel, each failed open results in one fewer output column.
7134 Added POSIX -r option to suppress the message.
7135 * pr.c: Added variables: failed_opens, ignore_failed_opens.
7136 These changes were based in part on work by David MacKenzie.
7138 Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
7140 * pr.c: Complain if user gives both -m and -[0-9]+ options.
7142 Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
7146 Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7148 * expand.c: Rename some variables.
7149 (expand): Don't access value off end of array.
7150 * unexpand.c: Rename some variables.
7151 (unexpand): Don't access value off end of array.
7152 Instead of copying tabs verbatim and flushing pending spaces
7153 when one is reached, count them as the proper number of
7154 pending spaces. Instead of changing tabs to single spaces if
7155 the tabstop list is exhausted, print the rest of the line
7156 unchanged (for POSIX).
7158 Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7160 * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
7161 Clear EOF and error conditions on stdin so it can be reused.
7163 * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
7164 as commas to separate tabstops, for POSIX.
7165 * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
7166 the output; send it directly to stdout.
7167 * unexpand.c (main): Make -t stupidly imply -a for POSIX.
7168 (unexpand): If a tab stop list was given and we move past its end,
7169 copy the rest of the line verbatim.
7171 * split.c (convint): New function to allow 'm' and 'k' after
7173 (main): Use it. Change -c option to -b for POSIX.
7175 Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7177 * pr.c: Protect isdigit with isascii, if required.
7179 Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
7181 Most of the following is from Paul Eggert:
7182 * cat.c (main): If stdin is read, check close at end.
7183 * cmp.c (main): Check for stdin being closed.
7184 Check for close errors on stdin and stdout.
7185 (cmp): Return a value instead of exiting.
7186 * cut.c (cut_file): New function, from code in main.
7187 Check for read errors.
7188 (main): Check for close errors.
7189 * expand.c, unexpand.c (main): Check for close errors.
7190 (next_file): Go to next file if one can't be opened.
7191 Check for close errors.
7192 * head.c (main), tail.c (main): If stdin was read, check for
7194 * head.c (head_file), tail.c (tail_file): Check for close errors.
7195 * paste.c (main, paste_parallel, paste_serial), tac.c (main):
7196 Check for close errors. Close stdin if it was read.
7197 * split.c (main): Check for close errors.
7199 * configure, Makefile.in's: Support +srcdir option.
7200 Make config.status. Fix up clean targets.
7202 Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
7204 * linebuffer.h (struct linebuffer): Add a field to indicate
7205 the number of valid chars in the line.
7206 * linebuffer.c (initbuffer, readline): Fill it in.
7207 * uniq.c, comm.c: Use it.
7209 * pr.c (main): Check stdin and stdout fclose for errors.
7210 (init_parameters): If there's no room for header and footer,
7211 omit them rather than dying (for POSIX).
7212 (init_header): Take a file descriptor as additional arg.
7213 (init_fps): Change callers. Note when stdin is read.
7214 (open_file): For filename "-" use stdin.
7215 (close_file): Don't close stdin. Check close for errors.
7216 (print_char, char_to_clump): Use isprint instead of explicit
7219 * memcmp.c: New file (needed for comm).
7220 * bcopy.c: New file (needed for fold).
7221 * system.h: Don't define bcopy as memcpy.
7222 * configure: Check for bcopy and memcmp.
7224 * uniq.c (main): Use "-" instead of NULL to mean stdin or
7226 (check_file): Use "-" instead of NULL to mean stdin or stdout.
7227 Check readline return instead of for NUL character to
7229 Check fclose for errors.
7230 (find_field): Use linebuffer length, not NULs, to detect end
7232 (different): New function, replaces compare. Uses memcmp
7234 (writeline): Use fwrite instead of fputs so NULs are preserved.
7236 * comm.c (compare_files): Return an error indication.
7237 Don't take a filename of NULL to mean stdin.
7238 Use memcmp instead of strcmp to allow for NULs.
7239 Check fclose for errors.
7240 (writeline): Use fwrite instead of fputs so NULs are preserved.
7242 * sum.c (sum_file): Take an arg indicating whether to print
7243 the filename, and don't take NULL meaning stdin. Set a flag
7244 when we read stdin. Check fclose return for errors.
7245 (main): If stdin was read, check fclose return for errors.
7246 Use filename of "-" if no args given.
7248 Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7250 * fold.c: Rewritten from scratch for POSIX.
7252 Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7254 * split.c (line_bytes_split): Use xmalloc instead of alloca.
7255 * system.h: Don't declare alloca.
7257 * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
7258 * system.h: Define SEEK_ macros if not defined.
7260 * pr.c: Rename variable `truncate' to avoid library function conflict.
7262 Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7264 * linebuffer.c, linebuffer.h: New files.
7265 * comm.c, uniq.c (initbuffer, readline): Functions
7266 removed (use versions in linebuffer.c).
7268 Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7270 * sum.c (sumfile): Always print 5 digits for second number, too.
7271 Interpret "-" to mean stdin.
7273 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
7275 * uniq.c: Use isblank instead of isspace, to support POSIX.2.
7276 * comm.c, pr.c, uniq.c (concat, fatal, error,
7277 pfatal_with_name, xmalloc, xrealloc): Functions removed.
7279 Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7281 * nl.c: Add long-named options. Doc fixes.
7283 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7285 * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
7287 * xwrite.c [POSIX]: Include unistd.h.
7288 [STDC_HEADERS]: Don't declare errno.
7290 Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7292 * uniq.c: Add long-named options. Remove marginally useful -z
7293 option (zero padded repeat counts).
7295 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7297 * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
7298 (cwrite), head.c (head_file), cat.c (main): Check close return
7299 value for delayed error report due to NFS.
7301 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7303 * cat.c: Replace "uchar" with "unsigned char", to avoid
7304 problems with various systems' typedefs.
7306 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7308 * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
7309 operation is unsupported, for HP-UX 7.0.
7311 Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
7313 * sum.c: Always print five digits for first number.
7315 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
7317 * cat.c, cmp.c: Don't use fileno(); not needed.
7319 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
7321 * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
7323 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
7325 * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
7327 (enlarge_line): Adjust inbufp and outbufp.
7329 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7331 * cat.c: Declare free returning void, not int, so it
7332 doesn't bomb on Xenix.
7334 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
7336 * tac.c: Print error messages before calling cleanup, not after.
7338 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7340 * tac.c (cleanup): Return SIGTYPE, not int.
7342 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
7344 * cut.c (main, usage): Add -b and -n options for POSIX.
7345 (set_fields): Don't allow SPC or TAB as number separators.
7347 * paste.c (paste_parallel): If open of any file fails, quit
7350 Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
7352 * pr.c: Add POSIX -F option (same as -f).
7354 * uniq.c (check_file): Allow '-' to mean stdin or stdout.
7356 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7358 * head.c, tail.c: Change `chars' to `bytes' globally.
7359 (main, usage): Use POSIX.2 draft 10 option syntax.
7361 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7363 * cat.c (main): Don't delay error messages, so they appear
7365 (main, simple_cat, cat): Make errors in input files nonfatal.
7367 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7369 * cat.c: Remove -c option added for POSIX draft 9, since POSIX
7370 draft 10 removed it.
7372 * tac.c (tac_stdin): Use fstat instead of lseek to determine
7373 whether stdin is seekable, because lseek silently fails on
7374 some special files, like tty's.
7375 tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
7376 don't turn off -f for non-regular files (assume the user knows
7377 what he's doing; it might work for fifo's and sockets).
7379 * paste.c (main): If no files given, use stdin.
7380 Don't let collapse_escapes write on string constant (delim default).
7381 (paste_parallel): Don't close stdin.
7383 * cut.c (main): Use standard input for filename of "-".
7385 * comm.c (compare_files): Allow '-' to mean stdin.
7387 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7389 * cut.c (enlarge_line): Take an arg giving the required amount
7390 of space. Change callers.
7391 (main): Don't allow -t'<TAB>' without -f.
7392 Make `delim' unsigned to fix sign extension problem in comparison.
7394 Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
7396 * pr.c Deleted excess whitespace from ends of lines.
7397 Modified to work with current version of getopt, which
7398 returns 1 instead of 0 for non-options.
7399 Reversed the meaning of the -f option, to be compatable
7402 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
7404 * cmp.c (main, usage): Rename -L option to -c and don't have
7406 (printc): Take an arg to specify number of chars to pad to,
7407 for column alignment.
7408 (cmp): Respect flag_print_chars in default output format.
7409 Align columns for cmp -cl.
7411 Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
7413 * cmp.c: For +show-chars, have getopt return 'L' so
7414 `flag_print_chars' gets set.
7416 Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
7418 * tac.c (main): Initialize fastmap and translate fields of
7419 regex before compiling it.
7421 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7423 * tac.c: Change +regexp to +regex for consistency with GNU find.
7425 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7427 * cat.c (cat): If FIONREAD is available, only use it if it is
7428 supported by the filesystem that the file is on.
7430 Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7432 * cat.c (main): Add a variable to control whether the check
7433 for input file == output file is made, because no values of
7434 st_dev and st_ino should be assumed to be available for this
7435 purpose. Only do the check for regular files.
7437 * tac.c: Use bcopy instead of memcpy.
7439 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
7441 * head.c: Use longs instead of ints for file offsets, for 16
7444 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7446 * cmp.c: Change some ints to longs for 16 bit machines.
7447 (bcmp_cnt): Make char-pointer counting slightly simpler.
7449 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7451 * cat.c (main): Allow input file to be output file for devices
7452 (ttys, etc.). Check whether input file is output file when
7453 reading standard input. Print any error messages for standard
7456 * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
7457 machines as well as 32 bit ones.
7458 * cmp.c, tail.c: Use longs instead of ints for file offsets.
7460 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7462 * cmp.c: Fix some exit statuses for POSIX.
7464 Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
7466 * tac.c: Use regular expressions as the record boundaries.
7467 Give better error messages.
7468 Reformat code and make it more readable.
7469 (main): Use getopt_long to parse options.
7470 (tac_stdin): Do not make a temporary file if standard input
7472 (tac_file): New function.
7473 (tac): Take an open file desc as an arg.
7474 (output): Rewrite to use its own efficient buffering.
7475 (xmalloc, xrealloc, xwrite): New functions.
7477 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7479 * head.c, tail.c: Use `error' instead of `fatal_perror' and
7480 `nonfatal_perror'. Remove some unnecessary info from messages.
7482 Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7484 * comm.c (main): Pass the list of files to compare_files as a
7485 char ** instead of a char *.
7486 (compare_files): Make arg a char **.
7488 * uniq.c: Declare some functions as void.
7489 Change global vars `countmode' and `mode' from ints to enums.
7490 (main): Use getopt to parse options and support POSIX options.
7491 Don't use integer_arg to parse numbers, since `-#' can't be
7492 parsed that way using getopt.
7493 (find_field): Use isspace for finding fields boundaries.
7495 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7497 * comm.c (main): Call usage if given bad option or wrong
7498 number of args. Exit with 0 status normally.
7499 (usage): New function.
7500 Declare some other functions as void.
7502 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
7504 * cmp.c (main, cmp, usage): Replace -q +quick option with -L
7505 +show-chars option to add ASCII representation of bytes to -l format.
7507 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
7509 * cmp.c (cmp): Change EOF message for POSIX compatibility.
7510 For -l format, clear bits > FF.
7512 Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7514 * tail.c: Move global `errors' into main instead of having
7515 nonfatal_perror set it.
7516 (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
7517 Return an error status.
7518 (file_lines, start_chars, start_lines): Reverse the meaning of
7520 (tail_lines, tail_chars): Account for that reversal.
7522 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7524 * head.c: Move global `errors' into main and have the various
7525 functions return an error status instead of setting it in
7528 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
7530 * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
7531 options specified), to compare the two blocks and count
7532 newlines simultaneously.
7533 * cmp.c New function: bcmp_cnt.
7535 * cmp.c (main): Test if output is redirected to /dev/null, and
7536 assume `-s' if this is so.
7538 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7540 * cat.c: Change `argbad' from a char to a short, so it will
7541 work on machines with unsigned chars.
7543 Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7545 * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
7546 Remove unneccessary variable `c1'. If -l was given, increase
7547 `char_number' by the number of bytes read, after producing output,
7548 rather than by the offset of the first differing bytes, before
7550 Replace if-else-if constructions with case statements for clarity.
7551 (bcmp2): Rename `n' to `nread'.
7553 Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
7555 * nl.c (proc_text): Use re_search instead of re_match.
7557 Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
7559 * nl.c: Indent. Un-nest statements. Use GNU regexp functions
7560 instead of System V ones. Move function declarations together.
7561 (quit): Remove useless function.
7562 (program_name): New variable for error messages.
7563 (main): Use perror in error message.
7564 (xmalloc): New function to replace myalloc.
7565 (myalloc): Function removed.
7566 Global: use program_name and xmalloc.
7568 Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
7570 * uniq.c: Declare some functions.
7571 (main): Initialize infile and outfile. Call usage if given
7572 invalid args. Normally exit with 0 status instead of garbage.
7573 (usage): New function to print usage message and exit.
7574 (check_file): Remove unused variable.
7575 (readline): Compare against EOF, not < 0.
7576 (xmalloc, xrealloc): Return char *, not int.
7577 Ok to return 0 if 0 bytes requested.
7578 (lb1, lb2): Remove unused global vars.
7579 (concat): Remove unused function.
7581 Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
7583 * comm.c: Remove unused global variables lb1, lb2.
7584 (main): Remove unneeded variable.
7585 (compare_files): Remove unused arg.
7586 (readline): un-nest assignment. Test against EOF instead of < 0.
7587 (error): Print to stderr, not stdout.
7588 (xmalloc, xrealloc): Return char * instead of int.
7589 Returning 0 is ok if 0 bytes requested (ANSI C).
7593 version-control: never