1 2001-03-18 Jim Meyering <meyering@lucent.com>
5 * tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL
6 to $DJDIR/bin/bash.exe. Patch from Richard Dawe, based on a
7 suggestion from Eli Zaretskii.
9 2001-03-17 Paul Eggert <eggert@twinsun.com>
11 * src/sort.c, src/tail.c, src/uniq.c (usage):
12 Warn that the +N form will be withdrawn.
13 * doc/textutils.texi: Likewise.
15 2001-03-08 Paul Eggert <eggert@twinsun.com>
17 * NEWS, doc/textutils.texi: Document pr changes.
19 * src/pr.c: Include mbswidth.h.
20 (standard_header, header, test_suite): Remove.
21 (date_format, date_text, file_text, header_width_available): New vars.
22 (long_options, main, init_header, usage):
23 Add new -D or --date-format option.
24 (CHARS_FOR_DATE_AND_PAGE, T_BUF_FMT, T_BUF_SIZE, NO_DATE): Remove.
25 (init_header): Allow arbitrary width for date format. Change
26 "Page %5d" to "Page %d", since the code no longer assumes fixed width.
27 Do not assume that localtime succeeds.
28 (init_header, print_header, usage): Do not truncate headers.
29 (init_header, print_header): Defer width calculations until
30 page is printed, since "Page 100000" is wider than "Page 1".
31 Count columns, not bytes, in page headers.
32 Custom headers take up only the center, not the whole header.
33 (print_header): Use printf rather than fprintf(stdout).
35 * po/Makefile.in.in (install-data-yes): Install LC_TIME locale
36 for all packages, not just for fileutils.
37 (uninstall): Remove LC_TIME locale too.
39 * src/sys2.h (INT_STRLEN_BOUND): New macro.
41 * tests/pr/0F, tests/pr/0FF, tests/pr/2-S_f-t_notab,
42 tests/pr/2-Sf-t_notab, tests/pr/2f-t_notab,
43 tests/pr/2s_f-t_notab, tests/pr/2s_w60f-t_nota,
44 tests/pr/2sf-t_notab, tests/pr/2sw60f-t_notab,
45 tests/pr/2w60f-t_notab, tests/pr/3-0F, tests/pr/3-5l17f-t,
46 tests/pr/3-FF, tests/pr/3a2l17-FF, tests/pr/3a3f-0F,
47 tests/pr/3a3l15-t, tests/pr/3a3l8f-t, tests/pr/3b2l17-FF,
48 tests/pr/3b3f-0F, tests/pr/3b3f-0FF, tests/pr/3b3f-FF,
49 tests/pr/3b3l15-t, tests/pr/3b3l8f-t, tests/pr/3f-0F,
50 tests/pr/3f-FF, tests/pr/3l17f-t, tests/pr/3l24-t,
51 tests/pr/3ml17f-t, tests/pr/3ml24-FF, tests/pr/3ml24-t,
52 tests/pr/3ml24-t-FF, tests/pr/4-7l24-FF, tests/pr/4l24-FF,
53 tests/pr/a2l15-FF, tests/pr/a2l17-FF, tests/pr/a3-0F,
54 tests/pr/a3f-0F, tests/pr/a3f-0FF, tests/pr/a3f-FF,
55 tests/pr/a3l15-t, tests/pr/a3l17f-lm, tests/pr/a3l8f-t,
56 tests/pr/b2l15-FF, tests/pr/b2l17-FF, tests/pr/b3-0F,
57 tests/pr/b3f-0F, tests/pr/b3f-0FF, tests/pr/b3f-FF,
58 tests/pr/b3l15-t, tests/pr/b3l17f-lm, tests/pr/b3l8f-t,
59 tests/pr/FF, tests/pr/Ja3l17f-lm, tests/pr/Jb3l17f-lm,
60 tests/pr/Jml17f-lm-lo, tests/pr/l17f-t, tests/pr/l24-FF,
61 tests/pr/l24-t, tests/pr/ml17f-0F, tests/pr/ml17f-lm-lo,
62 tests/pr/ml17f-t, tests/pr/ml17f-t-0F, tests/pr/ml20-FF-t,
63 tests/pr/ml24-FF, tests/pr/ml24-t, tests/pr/ml24-t-FF,
64 tests/pr/n+2-5l17f-0FF, tests/pr/n+2l17f-0FF,
65 tests/pr/n+2l17f-bl, tests/pr/n+3-7l24-FF,
66 tests/pr/n+3l17f-0FF, tests/pr/n+3l17f-bl,
67 tests/pr/n+3ml13f-bl-FF, tests/pr/n+3ml17f-bl-tn,
68 tests/pr/n+3ml17f-tn-bl, tests/pr/n+4-8a2l17-FF,
69 tests/pr/n+4b2l10f-0FF, tests/pr/n+5-8b3l10f-FF,
70 tests/pr/n+5a3l6f-0FF, tests/pr/n+6a2l17-FF,
71 tests/pr/n+6b3l6f-FF, tests/pr/n+7l24-FF,
72 tests/pr/n+8l20-FF, tests/pr/nJml17f-lmlmlo,
73 tests/pr/nJml17f-lmlolm, tests/pr/nl17f-bl,
74 tests/pr/nN1+3l17f-bl, tests/pr/nN15l17f-bl,
75 tests/pr/nSml13-bl-FF, tests/pr/nSml13-t-t-FF,
76 tests/pr/nSml13-t-tFFFF, tests/pr/nSml17-bl-FF,
77 tests/pr/nSml17-t-t-FF, tests/pr/nSml17-t-tFFFF,
78 tests/pr/o3a3l17f-tn, tests/pr/o3a3Sl17f-tn,
79 tests/pr/o3a3Snl17f-tn, tests/pr/o3b3l17f-tn,
80 tests/pr/o3b3Sl17f-tn, tests/pr/o3b3Snl17f-tn,
81 tests/pr/o3Jml17f-lm-lo, tests/pr/o3ml17f-bl-tn,
82 tests/pr/o3mSl17f-bl-tn, tests/pr/o3mSnl17fbltn,
83 tests/pr/Test.pm, tests/pr/W-72l17f-ll, tests/pr/W20l17f-ll,
84 tests/pr/W26l17f-ll, tests/pr/W27l17f-ll,
85 tests/pr/W28l17f-ll, tests/pr/W35a3l17f-lm,
86 tests/pr/W35b3l17f-lm, tests/pr/W35Ja3l17f-lm,
87 tests/pr/W35Jb3l17f-lm, tests/pr/W35Jml17f-lmlo,
88 tests/pr/W35ml17f-lm-lo, tests/pr/W72Jl17f-ll,
90 Adjust to minor spacing changes in pr headers.
92 2001-03-11 Paul Eggert <eggert@twinsun.com>
94 * src/sort.c (die): New message arg, to describe failures
95 better. All callers changed.
97 2001-03-11 Paul Eggert <eggert@twinsun.com>
99 * src/sort.c: Decrease buffer size when only merging or checking.
100 (sort_size): Now the user-specified sort size.
101 (MIN_MERGE_BUFFER_SIZE): New macro.
102 (MIN_SORT_SIZE): Use it.
103 (merge_buffer_size): New variable.
104 (fillbuf): Increase merge_buffer_size if a longer line is encountered.
105 (checkfp, mergefps): Do not allocate a buffer smaller than
107 (sort): Use the default_sort_size if sort_size is zero.
108 (main): Do not set sort_size to default_sort_size.
110 2001-03-06 Paul Eggert <eggert@twinsun.com>
112 * src/sort.c (sort): If all the input files are empty, create
113 an empty output file.
114 * tests/sort/Test.pm: Test for this.
116 2001-03-13 Jim Meyering <meyering@lucent.com>
118 * src/sort.c (merge): Move declarations of local variables into
119 the inner scope where they're used.
122 2001-03-06 Paul Eggert <eggert@sic.twinsun.com>
124 Avoid the need for a copy of the input file when the input and
125 output overlap, e.g. 'sort F -o F'. With -m, though, a copy
126 is still needed sometimes.
128 * doc/textutils.texi: 'sort F -o F' no longer needs to copy F.
130 * src/sort.c: Do not include closeout.h.
131 (xfopen): Use stdout if *how != 'r'.
132 (mergefps): Remove FPS arg.
133 Open all input files, and close all files when done.
134 If OFP is null, open the output file (but after opening input files).
136 (first_same_file): New function.
137 (sort, merge): Remove arg OFP; we now open the output file as needed.
139 (merge): New arg MAX_MERGE. All callers changed.
140 (sort): For "sort F -o F", close the input before opening the output.
141 (main): Do not use close_stdout; 'sort' and 'merge' now close stdout.
142 (This also fixes a close-stdout-twice bug.)
143 Remove test for overlapping input and output files, as 'sort' no longer
144 needs to worry about overlap, and 'merge' checks for overlap itself.
145 Use first_same_file to inform 'merge' about how much to merge at
146 the top level, to avoid overlap.
148 2001-03-12 Jim Meyering <meyering@lucent.com>
150 `fmt --prefix=S' would not work properly for any string S containing
151 a byte with the high bit set.
152 * src/fmt.c (prefix): Declare to be of type unsigned char, not `char'.
153 (get_prefix): Likewise for local, `p'.
154 Reported by François Pinard.
156 Add a test for the above-fixed problem.
157 * tests/fmt: New directory/files.
158 * configure.in (AC_OUTPUT): Add tests/fmt/Makefile.
159 * tests/Makefile.am (SUBDIRS): Add fmt.
161 2001-03-05 Andreas Schwab <schwab@suse.de>
163 * src/tac.c (save_stdin): Use mkstemp to create temporary file.
165 2001-03-09 Jim Meyering <meyering@lucent.com>
167 * Makefile.maint (my_distdir): Define new variable, and use this
168 in place of most old uses of $(distdir).
170 * tests/help-version: Ensure that /dev/full is a character device
171 (using test -c) as well as being writable, before trying to write to it.
172 Otherwise, the test could mistakenly append a newline to an existing,
173 regular, writable, /dev/full file.
174 Suggested by Ulrich Drepper.
176 2001-03-08 Jim Meyering <meyering@lucent.com>
178 * tests/sha1sum/sample-vec: Insert the `--text' argument for each test.
179 Reported by Matthew Smith.
181 2001-03-04 Jim Meyering <meyering@lucent.com>
183 * Makefile.maint (my_distdir): Define.
184 Use it in place of $(distdir) almost everywhere.
188 * Makefile.maint (alpha): Use $(PACKAGE)-$(VERSION), not $(distdir),
189 since the latter now has a `$(top_distdir)/' prefix.
191 2001-03-01 Paul Eggert <eggert@twinsun.com>
193 * src/sort.c (die): New function.
194 (create_temp_file, xfopen, xfclose, write_bytes, sort_buffer_size,
195 fillbuf, main): Use it to regularize error messages. The only change
196 in behavior is that write_bytes and the final close used to say "write
197 error" but now give just the output file name, which should be enough.
199 2001-03-01 Paul Eggert <eggert@twinsun.com>
201 * src/sort.c (xfclose): Add FILE arg, and report the file name
202 on error. All callers changed.
204 2001-03-01 Paul Eggert <eggert@twinsun.com>
206 * src/sort.c (main): When fclose (stdin) fails, do not mention
207 the output file in the error message; mention "-" instead.
209 2001-02-28 Paul Eggert <eggert@twinsun.com>
211 * src/sort.c (xfopen): Set have_read_stdin to 1 only if file is "-".
212 Use fopen_safer, not fopen, to avoid subtle bugs when fopen returns
213 stdin, stdout, or stderr.
214 (xfclose): stdout is no longer a special case.
215 (main): Close output file, don't just flush it; there might be
216 an error on the close.
218 2001-02-27 Paul Eggert <eggert@twinsun.com>
220 * src/sort.c (initbuf): If the desired size cannot be
221 allocated, repeatedly halve it until allocation succeeds.
222 Reported by Solar Designer.
224 2001-02-26 Paul Eggert <eggert@twinsun.com>
226 * src/sort.c (parse_field_count): Comment fix.
228 2001-02-25 Paul Eggert <eggert@twinsun.com>
230 * src/sort.c: Tune allocation and comparison of nodes
231 representing temp files. This improved CPU performance of
232 'sort -S 1 *.[ch]' by 17% on my host.
234 (struct tempnode): name member now uses struct hack.
235 (temphead): Now a pointer, not a structure. All uses changed.
236 (create_temp_file): Allocate node using struct hack.
237 (zaptemp): Free node using struct hack. Use pointer comparison, not
240 2001-02-25 Paul Eggert <eggert@twinsun.com>
242 * src/sort.c (eolchar, trim_trailing_blanks): Now static.
244 2001-02-25 Paul Eggert <eggert@twinsun.com>
246 'sort' race condition fixes.
248 Defend against a DoS attack where someone else creates a
249 temporary file with the same name as ours. Use mkstemp to do
250 this, supplying our own mkstemp if the system doesn't have one.
252 Also, fix a race condition during cleanup on hosts without
255 * src/sort.c (NAME_MAX_IN_DIR): Remove.
256 (sigprocmask, sigset_t): New macros, defined only on older hosts.
257 (caught_signals): New var.
258 (xtmpfopen, tempname): Removed.
259 (create_temp_file): New function, combining the functions of the old
260 xtmpfopen and tempname. All callers changed.
261 Use mkstemp to create the file.
262 (sighandler): On hosts without sigaction, ignore signals while
263 cleaning up, instead of letting them interrupt cleanup.
264 (main): Initialize caught_signals. On hosts with sigaction, block all
265 caught signals while handling one. Remove duplicate code.
267 2001-02-22 Jim Meyering <meyering@lucent.com>
269 * src/sort.c (keycompare): Move declarations of locals, lena and lenb,
270 into the inner scope where they are used.
272 2001-02-19 Jim Meyering <meyering@lucent.com>
274 * src/sort.c (AUTHORS): Add Paul Eggert.
276 * src/wc.c (wc): Rename innermost `buf' to avoid shadowing warning.
277 (wc): Rename local `wc' to avoid shadowing function name.
279 2001-02-18 Paul Eggert <eggert@twinsun.com>
281 Fix a race condition: freed storage accessed during a signal handler.
283 * src/sort.c (struct tempnode.next): Now volatile.
284 (zaptemp): Free the file name after removing it from the temp list,
285 not before, because a signal can arrive between the two actions
286 and cleanup () traverses the list.
288 2001-02-18 Paul Eggert <eggert@twinsun.com>
290 Check for input size, and do not overallocate memory.
291 Also check for memory quotas.
293 Revamp storage management so that line tables and character data are
294 taken from the same buffer. Line tables are now in reverse order,
295 since they grow down while the character data grow up.
298 (<sys/resource.h>): Include if HAVE_SYS_RESOURCE_H.
299 (struct rlimit, getrlimit): Define a replacement if RLIMIT_DATA
301 (RLIMIT_AS): Define to RLIMIT_DATA if not defined.
302 (struct lines): Remove.
303 (struct buffer): New members nlines, line_bytes, eof.
304 Remove member newline_free; no longer needed, since the code no longer
305 runs out of line table space.
306 (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): Remove.
307 (sort_size): Renamed from sortalloc; now applies to the sum of the
308 character data and the line table, not just the character data.
309 (MIN_SORT_SIZE, INPUT_FILE_SIZE_GUESS): New macros.
310 (linelength): remove.
311 (specify_sort_size): Don't worry about the distinction between the
312 character data and the line table; that is now the caller's
314 (default_sort_size): Return the value, instead of being executed for
315 side effect. Return half of available memory, or 1/16 of total memory,
316 whichever is greater; except do not exceed 1/2 of quota.
317 (sort_buffer_size): New function.
318 (initbuf): New arg LINE_BYTES. Ensure that the line array is properly
319 aligned. Initialize the new set of struct buffer members.
320 (buffer_linelim): New function.
321 (fillbuf): Return int, not size_t, since the callers merely care
322 whether the result is nonzero. New arg FILE so that error messages
323 can report the file name. Keep track of eof. Initialize the line
324 table too, taking its memory from the input buffer's memory; this
325 subsumes the old findlines function and removes the need for worrying
326 about running out of line table entries.
327 (checkfp, mergefps, sortlines, merge, sort): Adjust to the new storage
328 management regime, in particular the fact that line tables are now
329 filled in by fillbuf and are in reverse order.
330 (checkfp): Now takes char *, not const char *, since subroutines
331 require that now. Rewrite to avoid lint and duplicate code.
332 If line length alloc calculation overflows,
333 simply allocate enough memory to hold the line.
334 (mergefps): New arg FILES, used for buffer size calculation and error
335 messages. Rewrite to avoid lint. Do not loop if savealloc*2
337 (mergefps, merge): Zap temporary files eagerly rather than lazily;
338 this is needed because we now pass FILES to mergefps.
339 (sortlines): Args now point at end of arrays, not at beginnings.
340 (sort): Do not allocate temporary line array for sortlines;
341 instead, take the space from the same buffer.
342 (main): Adjust to sort_size and default_sort_size changes.
344 2001-02-18 Jim Meyering <meyering@lucent.com>
346 Rename test input files to avoid conflicts on case-insensitive
348 * tests/pr/2-Sf-t_notab: Rename from 2Sf-t_notab.
349 * tests/pr/2-S_f-t_notab: Rename from 2S_f-t_notab.
350 * tests/pr/W-72l17f-ll: Rename from W72l17f-ll.
351 * tests/pr/Test.pm: Update file names to reflect renamings.
352 Reported by Matthew Smith.
354 2001-01-20 Jim Meyering <meyering@lucent.com>
356 * configure.in: Remove jm_CHECK_ALL_TYPES.
357 Now it's invoked by jm_MACROS.
359 2001-01-17 Jim Meyering <meyering@lucent.com>
361 * src/cksum.c (main): Use PACKAGE, not GNU_PACKAGE.
362 * src/tsort.c (main): Likewise.
363 * src/sort.c (main): Likewise.
364 (usage): Convert each TAB in --help output to a sequence of 8 spaces.
366 2001-01-07 Jim Meyering <meyering@lucent.com>
368 * src/tail.c (usage): Split a string that was longer than 2048 bytes.
370 2001-01-03 Jim Meyering <meyering@lucent.com>
372 * src/sort.c (main): Remove embedded \n from diagnostic.
374 2001-01-02 Jim Meyering <meyering@lucent.com>
376 * src/od.c (ulonglong_t): Define place-holder type to avoid some #if
378 (LONGEST_INTEGRAL_TYPE): Remove definition.
379 (MAX_INTEGRAL_TYPE_SIZE): Use ulonglong_t instead of
380 LONGEST_INTEGRAL_TYPE.
381 (print_long_long): Compile this function even on systems without
383 (decode_one_format): Remove #if directive.
385 * src/od.c (decode_one_format): Guard use of print_long_long with
386 `#if HAVE_UNSIGNED_LONG_LONG'. From Darren Salt.
387 Change all `#ifdef HAVE_UNSIGNED_LONG_LONG' to use `#if' instead.
389 2000-12-23 Jim Meyering <meyering@lucent.com>
391 * src/sys2.h [HAVE_INTTYPES_H]: Include <inttypes.h>.
393 2000-12-19 Jim Meyering <meyering@lucent.com>
397 2000-12-18 Paul Eggert <eggert@twinsun.com>
399 * NEWS, doc/textutils.texi: New "sort" option -S SIZE.
401 * src/sys2.h (UINTMAX_MAX): New macro, taken from C99.
403 * src/sort.c: Include physmem.h.
404 (SORTALLOC, mergealloc, LINEALLOC): Remove.
405 (sortalloc): Default to zero at program startup.
406 (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): New macros.
407 (usage, main): Add support for new -S SIZE option.
408 (specify_sort_size, default_sort_size): New functions.
409 (initlines): Do not let alloc exceed limit.
410 (findlines): Likewise.
411 (checkfp, mergefps, sort): Use sortalloc to size everything
412 else, instead of relying on precomputed sizes.
414 2000-12-17 Jim Meyering <meyering@lucent.com>
416 * doc/texinfo.tex: Update from master repository.
417 * config.sub: Likewise.
418 * config.guess: Likewise.
420 2000-12-11 Jim Meyering <meyering@lucent.com>
424 2000-12-07 Jim Meyering <meyering@lucent.com>
426 * src/od.c (address_base): Declare to be static.
428 2000-12-06 Paul Eggert <eggert@twinsun.com>
430 * src/od.c (address_base, address_pad_len): New var.
431 (output_address_fmt_string, address_fmt_buffer, address_pad): Remove.
432 (flag_pseudo_start): Now int, not long int.
433 (pseudo_offset): Now off_t, not long int.
434 (n_specs, n_specs_allocated): Now size_t, not unsigned int.
435 (format_address, format_address_none, format_address_std,
436 format_address_label): Now accepts an extra char argument (an extra
437 char to print if nonzero), and prints instead of returning a string.
439 (bytes_per_block): Now size_t, not int.
440 (format_address_none): Do not even print the extra char argument.
441 This simplifies the callers.
442 (format_address_std, format_address_label): Print off_t ourself
443 instead of trying to use autoconfigured format. This is faster and
445 (format_address_paren): New function.
446 (dump): Remove unnecessary cast.
447 (expand_address_fmt): Remove.
448 (main): Use size_t, off_t, etc. instead of builtin types where this is
449 advisable. Adjust to above changes. Remove unnecessary cast.
451 2000-12-03 Jim Meyering <meyering@lucent.com>
453 * src/tail.c (tail_file): Initialize ignore, dev, and ino members,
454 when tailing forever and the open failed. Otherwise, we could get
455 uninitialized memory references of those fields in recheck.
456 * tests/tail-2/Makefile.am (TESTS): Add assert-2.
457 * tests/tail-2/assert-2: New file.
461 Make od print valid addresses for offsets of 2^32 and larger, and
462 allow byte offset (-j) and byte count (-N) to be 2^32 and larger.
464 * src/od.c (MAX_ADDRESS_LENGTH): Don't hard-code as a literal.
465 Rather, define in terms of the type, off_t.
466 (string_min): Declare to be of type size_t.
467 (flag_dump_strings): Declare to be of type int.
468 (print_s_char): Declare the n_bytes parameter and the local, `i',
470 (print_char): Likewise.
471 (print_s_short): Likewise.
472 (print_short): Likewise.
473 (print_int): Likewise.
474 (print_long): Likewise.
475 (print_long_long): Likewise.
476 (print_float): Likewise.
477 (print_double): Likewise.
478 (print_long_double): Likewise.
479 (dump_hexl_mode_trailer): Likewise.
480 (print_named_ascii): Likewise.
481 (print_ascii): Likewise.
482 (write_block): Likewise.
483 (print_ascii): Declare local, `print_function' with a prototype.
484 Change a few `>' comparisons to the equivalent `<' form.
485 (parse_options): Declare `tmp' to be of type uintmax_t.
486 Use xstrtoumax, not xstrtoul.
487 Fail if the specified offset if larger than OFF_T_MAX.
488 (dump_strings): Declare local `i' to be of type size_t.
489 Remove the now-unnecessary cast-to-off_t.
490 (main) [IF_LINT]: Initialize desired_width to avoid a warning.
491 Declare `tmp' to be of type uintmax_t.
492 Use xstrtoumax, not xstrtoul.
493 Fail if minimum string length is larger than SIZE_MAX.
494 Fail if specified width is larger than ULONG_MAX.
496 * src/od.c (format_address): Use off_t, not long unsigned_int as the
498 (format_address_none): Likewise. Mark parameter as unused.
499 (format_address_std): Likewise.
500 (format_address_label): Likewise.
501 (print_ascii): Mark format string parameter as unused.
502 (write_block): Use off_t, not long unsigned_int as offset type.
503 (expand_address_fmt): New function.
504 (main): Use it to expand each address format string template.
505 Reported by Mark Nudelman, via Andreas Jaeger.
507 * src/sys2.h (OFF_T_MIN): Define here instead.
508 (OFF_T_MAX): Likewise.
511 * src/tail.c (parse_options): Use xstrtoumax to parse the byte and line
512 offset. Give a better diagnostic when the requested offset is still
513 representable but larger than OFF_T_MAX.
514 (OFF_T_MIN): Remove definition.
515 (OFF_T_MAX): Likewise.
517 2000-12-02 Jim Meyering <meyering@lucent.com>
519 * src/sort.c (checkfp): Rename local `buf' to avoid shadowing previous
522 * src/sort.c (NONZERO): Define and use it to make the code a tiny
525 * doc/textutils.texi (sort invocation): Clarify how -t works
526 when a sort key specifies a range of fields. From Karl O. Pinc.
528 2000-11-26 Paul Eggert <eggert@twinsun.com>
530 * src/od.c (skip): Use lseek instead of worrying about fseeko or fseek.
531 This should be portable, as we seek before doing any I/O.
532 (fseeko): Remove; no longer used.
534 2000-11-30 Jim Meyering <meyering@lucent.com>
536 * src/sort.c: s/SIZE_T_MAX/SIZE_MAX/.
538 2000-11-30 Paul Eggert <eggert@twinsun.com>
540 * src/sys2.h: Include <stdint.h> if HAVE_STDINT_H.
541 (SIZE_MAX): Renamed from SIZE_T_MAX, as C99 uses SIZE_MAX.
544 2000-11-30 Jim Meyering <meyering@lucent.com>
546 * src/sort.c: SIZE_MAX is not defined, so s/SIZE_MAX/SIZE_T_MAX/, and...
547 * src/sys2.h (SIZE_T_MAX): ... define.
549 2000-11-29 Paul Eggert <eggert@twinsun.com>
551 Port GNU "sort" to hosts where sizes don't fit in "int",
552 e.g. 64-bit Solaris (sparc).
554 * src/sort.c ("human.h", "xstrtol.h"): Include.
555 (struct line): length member is now size_t, not int.
556 (struct lines): Likewise for used, alloc, limit members.
557 (struct buffer): Likewise for used, alloc, left, newline_free members.
558 (struct keyfield): Likewise for sword, schar, eword, echar members.
559 (sortalloc, mergealloc, linelength): Now size_t, not int.
561 (initbuf, fillbuf, initlines, begfield, limfield, findlines,
562 numcompare, getmonth, keycompare, compare, checkfp, mergefps,
563 sortlines, sort): Accept, return, and use size_t for sizes, not int.
565 (fillbuf, initlines, findlines, checkfp, sort): Check for overflow
566 when computing buffer sizes.
568 (begfield, limfield): Do not index past end of array.
570 (checkfp): Return a boolean, not a line number, as the line
571 number may not fit in int. All callers changed. Use
572 uintmax_t for line numbers, not int.
574 (sort): Don't allocate tmp until we need it (and know the right size).
576 (parse_field_count): New function.
578 (main): Use it to check for overflow in field counts.
579 "outfile" is now a pointer to const.
581 2000-11-27 Jim Meyering <meyering@lucent.com>
583 * src/checksum.h: Don't include system.h here.
584 * src/md5.c: Include config.h, stdio.h, sys/types.h. and system.h here
586 * src/sha1sum.c: Likewise.
588 2000-11-18 Paul Eggert <eggert@twinsun.com>
590 * src/pr.c (main): Do not assume EOF == -1.
591 Handle the case correctly when digits options immediately precede a
594 2000-11-18 Jim Meyering <meyering@lucent.com>
596 * doc/textutils.texi: Change GNU to @sc{gnu} in many places.
597 Update to use the Free Documentation Licence.
599 * configure, config.h.in, Makefile.in, etc.: Regenerate using the
600 very latest version (in CVS) of autoconf.
602 2000-11-17 Jim Meyering <meyering@lucent.com>
604 * GNUmakefile (.NOTPARALLEL): New target. Prevent unwanted parallelism.
605 Suggestion from Ulrich Drepper.
607 2000-11-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
609 * tsort.c: Include sys/types.h before system.h.
611 2000-11-16 Jim Meyering <meyering@lucent.com>
613 * src/join.c: Declare global `tab' to be of type *unsigned* char,
614 so join works with 8-bit delimiter characters.
615 Reported by Antonio Rendas.
616 * tests/join/Test.pm (8-bit-t): New test for the above fix.
618 2000-11-13 Paul Eggert <eggert@twinsun.com>
620 * src/sys2.h (ST_TIME_CMP_NS): Fix typo: ST_MTIM_NSEC should
621 be tested with #ifdef, not with #if.
623 2000-11-11 Jim Meyering <meyering@lucent.com>
625 * doc/textutils.texi: More minor rewording and grammar correction.
628 2000-11-06 Paul Eggert <eggert@twinsun.com>
630 * src/od.c (skip): st_size is not defined for directories.
632 2000-11-03 Jim Meyering <meyering@lucent.com>
634 * tests/sha1sum/sample-vec: New file, with tests derived from
635 http://csrc.nist.gov/cryptval/shs/sha1-vectors.zip
636 * tests/sha1sum/Makefile.am (TESTS): Add sample-vec.
638 2000-10-30 Jim Meyering <meyering@lucent.com>
640 * configure, config.h.in, Makefile.in, etc.: Regenerate using the
641 very latest version (in CVS) of autoconf.
643 * src/wc.c: Include "system.h" after wctype.h (not before)
644 to avoid a compilation error on Solaris 5.5.1 systems.
645 Reported by Vin Shelton.
647 2000-10-23 Jim Meyering <meyering@lucent.com>
649 * Makefile.maint: Clean up version-related variables.
653 * Makefile.am (EXTRA_DIST): Add .prev-version.
655 2000-10-22 Jim Meyering <meyering@lucent.com>
657 * tests/Makefile.am (SUBDIRS): Add sha1sum.
658 * tests/sha1sum/basic-1: New file.
659 * configure.in (AC_OUTPUT): Add tests/sha1sum/Makefile.
661 * src/Makefile.am (bin_PROGRAMS): Add sha1sum.
662 (md5sum_SOURCES): Define.
663 (sha1sum_SOURCES): Define.
664 (noinst_HEADERS): Add checksum.h.
666 * src/md5sum.c: Factor out the differences between MD5 and SHA1,
667 and parameterize so this code may be used by both md5sum and the new
668 program, sha1sum. Loosely based on a patch from Scott Miller.
669 * src/checksum.h: New file.
670 * src/md5.c: New file that simply defines `algorithm'.
671 * src/sha1sum.c: Likewise.
673 * man/Makefile.am (man_MANS): Add sha1sum.1.
674 * man/sha1sum.x: New file.
676 Support 8-byte integers, assuming they're printable with e.g., %lld.
677 * src/od.c: Add support for printing data as unsigned
680 2000-10-21 Jim Meyering <meyering@lucent.com>
682 The command, `yes ''|./cat -n' would stop printing after INT_MAX lines.
683 * src/cat.c (cat): Never let `newlines' exceed 3.
685 2000-10-21 Jim Meyering <meyering@lucent.com>
687 Prevent a counter buffer overrun when numbering lines and when
688 processing 100 billion lines (or more) of input.
689 * src/cat.c (LINE_COUNTER_BUF_LEN): Define to allow numbering as
690 many as 10^18 - 1 lines (the old limit was 10^11 - 1, and could
691 be exceeded without too much trouble). Use this symbol rather
692 than hard-coding the constant everywhere.
693 (next_line_num): Rather than overrunning for input with more lines,
694 mark the line number by putting a `>' in the leftmost slot.
695 Patch by Jan Nieuwenhuizen.
697 * src/sort.c (SORT_OUT_OF_ORDER): Define.
698 (main): Use it instead of hard-coding the `1'.
700 2000-10-10 Jim Meyering <meyering@lucent.com>
702 * src/sort.c (main): Use EXIT_SUCCESS rather than 0.
703 Fail when checking (-c) with more than one file argument,
704 rather than simply ignoring the extra arguments.
706 2000-09-07 Jim Meyering <meyering@lucent.com>
708 * src/cut.c: Remove obsolete comment block.
709 (usage): Note that when using -f, lines with no delimiters are
711 * doc/textutils.texi (cut invocation): Likewise.
713 2000-08-23 Jim Meyering <meyering@lucent.com>
715 * src/md5sum.c: Include <config.h> unconditionally, to be consistent
716 with all the other programs in this directory.
717 * src/tsort.c: Likewise.
719 2000-08-19 Jim Meyering <meyering@lucent.com>
721 * src/comm.c (writeline): Correct comments. From Bruno Haible.
723 2000-08-11 Paul Eggert <eggert@twinsun.com>
725 * doc/textutils.texi:
727 Portable shell scripts should specify global options before
730 Move global LC_CTYPE remark to each sort option that depends
733 sort -g depends on LC_NUMERIC.
735 Add @vindex where it's missing.
737 "radix character" -> "decimal-point character", to match Standard C
738 terminology, which is easier for most people to follow.
740 "comm" does not consider trailing newlines to be significant.
742 2000-08-10 Paul Eggert <eggert@twinsun.com>
744 * doc/textutils.texi: Recommend against the System V syntax
745 for tr ranges, and don't use it in examples. Use POSIX
746 classes rather than ranges, for portability.
747 * src/tr.c (usage): Don't describe System V syntax, as it
750 * src/sort.c (usage): Describe -d and -i in a locale-independent way.
752 * doc/Makefile.am (constants.texi): Use the C locale so that
753 [A-Z] works as expected.
755 2000-08-07 Paul Eggert <eggert@twinsun.com>
757 * src/cut.c (cut_fields): Invoke xalloc_die instead of printing
759 (cut_fields): Check for I/O error as well as end-of-file
761 2000-08-06 Bruno Haible <haible@clisp.cons.org>
763 * src/wc.c: Add support for multi-byte locales.
764 (iswprint, mbrtowc, wcwidth): Provide default definitions.
765 (total_bytes): New variable.
766 (print_bytes): New variable.
767 (longopts): Change abbreviation for --chars from 'c' to 'm'.
769 (write_counts): Add `bytes' argument.
770 (wc): New variables `bytes', `count_bytes', `count_chars',
771 `count_complicated'. The old code determines `bytes', not `chars'.
772 New case for MB_CUR_MAX > 1. A non-printable non-space character does
773 not increment the line position or start a word. Update `total_bytes'.
774 (main): Initialize `print_bytes' and `total_bytes' to 0. Accept 'm'
775 option. Pass `total_bytes' to write_counts.
776 * doc/textutils.texi (wc invocation): Update accordingly.
778 2000-08-06 Bruno Haible <haible@clisp.cons.org>
780 * src/head.c (head): Call write_header here.
781 (head_file): ... not here.
783 * src/cat.c (closeout_func): Remove variable.
784 (close_stdout_wrapper): Remove unused function.
785 (main): Remove assignment to closeout_func.
787 * src/fold.c (fold_file): Remove ferror(stdout) check, already done
790 2000-08-06 Paul Eggert <eggert@twinsun.com>
792 * src/sort.c (usage): Warn more succinctly about the effects of
793 the locale on sort order.
795 2000-08-06 Jim Meyering <meyering@lucent.com>
799 * src/tail.c (pipe_lines): Declare local `cp' to be const.
801 2000-08-04 Greg McGary <greg@mcgary.org>
803 * src/tail.c (pipe_lines): Add variable `nbytes' so we can free
804 `tmp' immediately after read loop. Don't process an empty file.
805 [This fixes a buffer-underrun error -- detected thanks to
806 bounded pointers -jmm]
808 2000-08-05 Jim Meyering <meyering@lucent.com>
810 Fix buffer-overrun error.
811 * src/pr.c (init_header): Allocated buffer was sometimes too small.
812 Reported by Greg McGary (who found this bug using his
813 bounded-pointers-enabled gcc).
814 (init_header): Move declarations of several variables into the
815 inner scope where they are used.
816 * tests/pr/Test.pm (narrow-1): New test, for the above.
818 * src/csplit.c (MAX): Remove definition (It's in sys2.h).
820 2000-08-04 Jim Meyering <meyering@lucent.com>
822 * src/sort.c (main): Rename local `t' to `tmp_dir' to avoid shadowing
823 a previous local by that name.
824 (usage): Warn that GNU sort is now locale-aware, and suggest
825 people put LC_ALL=POSIX in their environment.
827 * src/pr.c (store_columns): Remove conjunct that would dereference
828 an out-of-bounds pointer. Reported by Greg McGary (who found this
829 bug using his bounded-pointers-enabled gcc).
831 2000-08-03 Jim Meyering <meyering@lucent.com>
833 * tests/Makefile.am.in ($(srcdir)/$x-tests): Use -I$(srcdir), not `-I.'.
834 (Makefile.am): Likewise. Reported by Greg McGary.
836 2000-08-01 Jim Meyering <meyering@lucent.com>
838 * doc/textutils.texi (tr invocation): Note that ranges are not portable.
839 Update examples not to use ranges.
841 2000-07-31 Jim Meyering <meyering@lucent.com>
843 * src/cut.c (cut_fields): Use `virtual memory exhausted',
844 not `Memory exhausted'.
846 2000-07-30 Jim Meyering <meyering@lucent.com>
848 * src/help-version: Remove file. Move it to ...
849 * tests/help-version: ...here
850 * tests/Makefile.am (TESTS): Set to help-version.
851 (TESTS_ENVIRONMENT): Define.
852 (EXTRA_DIST): Add $(TESTS).
853 * src/Makefile.am (EXTRA_DIST): Remove help-version.
854 (TESTS): Remove definition.
855 (TESTS_ENVIRONMENT): Remove definition.
857 2000-07-28 Paul Eggert <eggert@twinsun.com>
859 sort's -T option can now appear multiple times.
860 Thanks to Charles Randall for suggesting this idea.
862 * doc/textutils.texi, NEWS: Document this.
864 * src/sort.c (temp_dir): Remove.
865 (temp_dirs, temp_dir_count, temp_dir_alloc): New vars.
866 (process_id): New var.
867 (usage): Describe new use of -T.
868 (add_temp_dir): New function.
869 (tempname): Use new temp_dirs array.
870 Do not discard information from the process-id or sequence
871 number, unless we have short file names.
872 (sighandle): Use process_id instead of getpid.
873 (main): Initialize process_id.
874 Add support for the new use of -T.
876 2000-07-23 Jim Meyering <meyering@lucent.com>
878 * tests/head/Test.pm: Rename tests (and hence files) to have a short
879 enough prefix so that they're not truncated on 8+3 file systems.
880 Reported by Eli Zaretskii.
882 2000-07-09 Jim Meyering <meyering@lucent.com>
884 * config.guess: Update from FSF.
885 * config.sub: Likewise.
887 2000-07-02 Jim Meyering <meyering@lucent.com>
891 2000-07-01 Jim Meyering <meyering@lucent.com>
893 * src/cut.c: Change type of global, field_1_bufsize, from int to size_t.
895 2000-06-29 Jim Meyering <meyering@lucent.com>
897 * src/tr.c (find_bracketed_repeat): Add a cast to suppress a warning.
898 Reported by Gerhard Poul.
900 * src/tail.c (enum): Remove comma from end of enumerator list.
903 2000-06-25 Jim Meyering <meyering@lucent.com>
905 * configure.in (ALL_LINGUAS): Add Danish (da).
907 2000-06-24 Jim Meyering <meyering@lucent.com>
909 * doc/textutils.texi: Lots of minor rewording and grammar correction.
912 * tests/sum/basic-1: New file.
913 * tests/sum/Makefile.am: New file.
914 * configure.in (AC_OUTPUT): Add tests/md5sum/Makefile.
915 * tests/Makefile.am (SUBDIRS): Add sum.
917 2000-06-22 Bruno Haible <haible@clisp.cons.org>
919 * src/sum.c (sysv_sum_file): Avoid overflowing 32-bit accumulator
920 on files larger than 256 MB.
922 2000-06-22 Bruno Haible <haible@clisp.cons.org>
924 * src/cat.c (main): Correct a comment.
926 2000-06-21 Jim Meyering <meyering@lucent.com>
928 * src/cut.c (getstr): Remove private (and out of date) version of
930 (cut_fields): Adjust caller to use the just-extended one in ../lib.
931 Reported by Paul Sauer.
933 2000-06-20 Jim Meyering <meyering@lucent.com>
935 * src/uniq.c (main): Fix off-by-argc test, so +N-style options are
936 recognized once again. Reported by Geoff Keunning.
937 Fix typo in diagnostic: s/compare/skip/.
939 2000-05-27 Jim Meyering <meyering@lucent.com>
941 * src/tail.c: Arrange to call close_stdout upon exit.
942 Don't close stdout explicitly.
943 (usage): Add missing backslash at end of line.
944 (write_header): Remove now-unused COMMENT parameter.
947 2000-05-24 Jim Meyering <meyering@lucent.com>
949 * src/head.c (head_file): Use STDIN_FILENO in place of `0'.
952 2000-05-20 Jim Meyering <meyering@lucent.com>
954 * src/cat.c: Arrange to call close_stdout upon exit.
955 Don't close stdout explicitly. Replace uses of global constant,
956 output_desc, with uses of STDOUT_FILENO.
958 Arrange to call close_stdout upon exit. Don't close stdout explicitly.
959 * src/cksum.c: Likewise.
960 * src/comm.c: Likewise.
961 * src/csplit.c: Likewise.
962 * src/cut.c: Likewise.
963 * src/expand.c: Likewise.
964 * src/fmt.c: Likewise.
965 * src/fold.c: Likewise.
966 * src/head.c: Likewise.
967 * src/join.c: Likewise.
968 * src/md5sum.c: Likewise.
969 * src/nl.c: Likewise.
970 * src/od.c: Likewise.
971 * src/paste.c: Likewise.
972 * src/pr.c: Likewise.
973 * src/ptx.c: Likewise.
974 * src/sort.c: Likewise. (but set exit status and file name, too)
975 * src/split.c: Likewise.
976 * src/sum.c: Likewise.
977 * src/tac.c: Likewise.
978 * src/tr.c: Likewise.
979 * src/tsort.c: Likewise.
980 * src/unexpand.c: Likewise.
981 * src/uniq.c: Likewise.
982 * src/wc.c:: Likewise.
984 2000-05-13 Jim Meyering <meyering@lucent.com>
986 * src/help-version: Run each program successfully at least once.
988 2000-05-12 Jim Meyering <meyering@lucent.com>
990 * src/head.c (string_to_integer): Restrict base to 10.
991 Reported by Joseph S. Myers.
992 * tests/head/Test.pm: Add a few tests for this.
994 New option: --first-only
995 * src/unexpand.c (anonymous enum) [CONVERT_FIRST_ONLY_OPTION]: Define.
996 (long_options): Add `first-only'.
997 (main): Handle new option.
999 2000-05-11 Jim Meyering <meyering@lucent.com>
1001 * tests/unexpand/basic-1: New tests.
1003 2000-04-17 Bruno Haible <haible@clisp.cons.org>
1005 * src/system.h [__BEOS__]: Ignore O_BINARY and O_TEXT.
1007 2000-04-16 Jim Meyering <meyering@lucent.com>
1009 * src/tail.c: Prepare to remove option: --max-consecutive-size-changes.
1010 Doesn't seem useful.
1011 (usage): Remove description.
1012 * doc/textutils.texi (tail invocation): Remove description.
1014 2000-04-12 Jim Meyering <meyering@lucent.com>
1016 * src/tail.c (usage): Tweak --help output. Suggestions from Karl Berry.
1018 Move some macros into m4/.
1019 * configure.in (_GNU_SOURCE): Don't define here.
1020 (AC_SYS_LARGEFILE): Don't use here.
1021 (AM_C_PROTOTYPES): Don't use here.
1022 * acconfig.h: Remove now-unused file.
1024 2000-04-09 Jim Meyering <meyering@lucent.com>
1026 * doc/textutils.texi: Include constants.texi.
1027 (tail invocation): Use `@value's instead of referring to the
1028 output of `tail --help' for defaults.
1029 * doc/Makefile.am (constants.texi): New rule.
1030 (EXTRA_DIST): Add constants.texi.
1031 (MAINTAINERCLEANFILES): Add it here, too.
1032 (textutils.dvi, textutils.info): Depend on constants.texi.
1034 * src/tail.c (usage): Clarify descriptions of the --max-* options.
1037 2000-04-03 Jim Meyering <meyering@lucent.com>
1039 * configure.in (AC_CHECK_HEADERS): Remove langinfo.h. Now it's in m4/.
1040 (AC_CHECK_FUNCS): Remove nl_langinfo. Now it's in m4/.
1042 2000-03-17 Jim Meyering <meyering@lucent.com>
1044 * configure.in (ALL_LINGUAS): Add Slovenian (sl).
1046 2000-03-12 Jim Meyering <meyering@lucent.com>
1048 Merge from fileutils.
1049 * src/system.h "pathmax.h": Include.
1050 <sys/time.h>: Include if appropriate.
1052 <sys/mkdev.h>: Likewise.
1053 <sys/sysmacros.h>: Likewise.
1054 <utime.h>: Likewise.
1055 (major, minor, makedev): Define if needed.
1056 (struct utimbuf): Declare if missing.
1057 (ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE): Define.
1059 * src/cksum.c (usage): Correct --help output.
1060 Prompted by a report from Gregory Leblanc.
1062 2000-03-05 Paul Eggert <eggert@twinsun.com>
1064 * src/sort.c (struct buffer.newline_free): New member.
1065 (initbuf, findlines): Set it.
1066 (fillbuf): Do not double the size of a full buffer to append a newline
1067 unless the buffer is known to be newline free.
1069 2000-03-05 Jim Meyering <meyering@lucent.com>
1073 2000-03-04 Jim Meyering <meyering@lucent.com>
1075 Don't get failed assertion for `tail -f directory'.
1076 * src/tail.c: Revert most of 1999-10-20 change. Instead, ...
1077 (IS_TAILABLE_FILE_TYPE): Define to produce similar result.
1078 (recheck): Use it here.
1079 (tail_file): Use it here.
1080 Reported by François Pinard.
1082 Once we encounter a file that is not of IS_TAILABLE_FILE_TYPE,
1083 marke it as such and ignore it forever after.
1084 * src/tail.c (struct File_spec): New member.
1085 (recheck): Initialize new member.
1086 (tail_file): Likewise.
1087 (tail_forever): Skip the file if it's marked as ignorable.
1089 2000-03-03 Jim Meyering <meyering@lucent.com>
1091 * src/sort.c (fillbuf): Move declaration of local, cc, into scope of
1092 `while' loop where it's used.
1094 2000-03-02 Paul Eggert <eggert@set.twinsun.com>
1096 Big performance improvement when sorting many small files,
1097 building on a suggestion by Charles Randall.
1099 * src/sort.c (fillbuf): Skip memmove if it would be a no-op,
1100 as many memmove implementations are slow in that case.
1101 Don't examine leftover bytes for eolchar, since they may be left
1102 over from a previous file, and we want to read from this file.
1104 (sort): At end of file, if there is more input and buffer room,
1105 concatenate the next input file.
1107 2000-02-29 Jim Meyering <meyering@lucent.com>
1109 * src/join.c (make_blank): Add an explicit cast to `unsigned char *'
1110 to placate HPUX's C compiler. Reported by Bob Proulx.
1112 2000-01-30 Jim Meyering <meyering@lucent.com>
1116 * Makefile.maint (my-distcheck): Depend on po-check, so I'll be warned
1117 about any required changes at `make distcheck' time rather than at
1119 (writable-files): New target.
1120 (my-distcheck): Depend on it.
1123 * po/POTFILES.in: Add these: lib/makepath.c, lib/rpmatch.c,
1126 2000-01-29 Jim Meyering <meyering@lucent.com>
1128 * configure.in: Remove lib-check for cposix now that we use
1130 (jm_LIB_CHECK): Use this even though the library checks aren't
1131 required for this patchage (so all three lib/Makefile.in files
1134 2000-01-24 Mark Kettenis <kettenis@gnu.org>
1136 * src/tsort.c (exit_status): New variable.
1137 (loop): New varibale.
1138 (count_items, scan_zeroes): Change return type to int.
1139 (detect_loop): Complete rewrite to correctly implement detection
1140 of loops. Also change return type to int.
1141 (recurse_tree): Stop if ACTION returns non-zero. This involves
1142 changing the return type of this function and ACTION to int.
1143 (walk_tree): Change return type of ACTION to int.
1144 (tsort): Continue sort after a loop has been detected (and
1145 broken). Set exit_status to 1 if a loop was detected.
1146 (main): Use exit_status to determine exit code.
1147 * tests/tsort/basic-1: Change expected output for cycle-1 and
1150 2000-01-23 Jim Meyering <meyering@lucent.com>
1152 * configure.in (AM_FUNC_STRTOD): Move to m4/.
1153 (AC_SUBST(POW_LIBM)): Likewise.
1155 2000-01-22 Jim Meyering <meyering@lucent.com>
1157 * src/sort.c (keycompare): Use global, hard_LC_COLLATE in place of
1158 local that is sometimes undeclared.
1160 * configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR).
1161 (AC_CHECK_HEADERS): Move these checks into m4/.
1163 * src/tr.c ("xstrtol.h"): Include.
1164 (Filter): Rename from PFL.
1165 (non_neg_strtol): Remove function.
1166 (find_bracketed_repeat): Use xstrtoul instead of non_neg_strtol.
1167 (squeeze_filter, set_initialize, main): Use size_t and ssize_t in
1168 place of long and int in several decls.
1169 (read_and_delete, read_and_xlate): Likewise, and remove assertion.
1170 * tests/tr/Test.pm (o-rep-1, o-rep-2): New tests.
1172 * src/cut.c: Correct copying notice to use GPL, per author's request.
1173 * src/paste.c: Likewise.
1176 1999-09-19 Bruno Haible <haible@clisp.cons.org>
1178 * src/tr.c (PFI): Return `long', not `int'.
1179 (PFL): Rename from PFI now that it returns long.
1180 (squeeze_filter): Declare as `long': i, nr, out_len.
1182 2000-01-17 Paul Eggert <eggert@twinsun.com>
1184 Tweak sort performance.
1186 * src/sort.c (hard_LC_CTYPE): Remove.
1187 (keylist): Renamed from keyhead. Now a pointer, not a
1188 mostly-unused struct. All uses changed.
1189 (findlines, keycompare, CMP_WITH_IGNORE, compare, checkfp, mergefps,
1190 sort): Tune and use a more consistent style for reallocation.
1191 (keycompare, main): Don't worry about LC_CTYPE;
1192 it's buggy with multibyte chars anyway.
1193 (compare): Invoke alloca (0) after each call to keycompare,
1194 not just the ones that return nonzero. This avoids a memory
1195 leak on architectures without builtin alloca that occurs
1196 sometimes when a file contains all duplicate lines.
1198 2000-01-17 Paul Eggert <eggert@twinsun.com>
1200 * src/csplit.c (interrupt_handler, main):
1201 Don't use SA_INTERRUPT to decide whether to call sigaction, as
1202 POSIX.1 doesn't require SA_INTERRUPT and some systems
1203 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
1204 it's been part of POSIX.1 since day 1 (in 1988).
1205 * src/sort.c (sighandler, main): Likewise.
1207 2000-01-16 Jim Meyering <meyering@lucent.com>
1209 * lib/Makefile.am: Merge with fileutils/lib/Makefile.am.
1211 * configure.in: Remove AM_FUNC_ERROR_AT_LINE, jm_FUNC_STRFTIME,
1212 AC_FUNC_VPRINTF, and AC_FUNC_ALLOCA. Now they're in m4/.
1214 2000-01-15 Jim Meyering <meyering@lucent.com>
1216 * configure.in (AC_REPLACE_FUNCS): Remove these: memcpy memset stpcpy
1217 strpbrk strtol strtoul. Now that's in m4/.
1219 unexpand could infloop
1220 * src/unexpand.c (TAB_STOP_SENTINEL): Define.
1221 (unexpand): Use it instead of INT_MAX.
1222 Declare column and pending to be `unsigned'.
1223 Increment pending and column counters only if column is smaller
1224 than TAB_STOP_SENTINEL.
1225 * tests/Makefile.am (SUBDIRS): Add unexpand.
1226 * tests/unexpand/basic-1: New tests for the above-fixed bug.
1227 * configure.in (AC_OUTPUT): Add tests/unexpand/Makefile.
1228 Reported by John Kodis.
1230 2000-01-12 Paul Eggert <eggert@twinsun.com>
1232 * src/sort.c (fillbuf): Avoid quadratic behavior with long lines.
1233 Also, stop worrying about ancient memchr bug (misbehavior when
1234 size is zero), since other code doesn't worry either.
1236 2000-01-11 Jim Meyering <meyering@lucent.com>
1238 Sync lib/ directories of sh-utils, and textutils.
1240 * lib/Makefile.am (libfetish_a_SOURCES): Add getdate.y, posixtm.c,
1241 basename.c, canon-host.c, readutmp.c, stripslash.c, xgetcwd.c,
1243 (noinst_HEADERS): Add getdate.h, group-member.h, posixtm.h,
1244 pathmax.h, readutmp.h
1246 * lib/Makefile.am: s/tu/fetish/
1247 * src/Makefile.am: s/libtu/libfetish/
1249 2000-01-10 Jim Meyering <meyering@lucent.com>
1253 * Makefile.maint (announcement): Include URLs for xdelta files.
1254 (alpha): Use scp, not ncftp.
1256 * lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.
1258 2000-01-08 Jim Meyering <meyering@ascend.com>
1263 * src/cut.c (OUTPUT_DELIMITER_OPTION): Define this and use it
1264 instead of `CHAR_MAX + n'.
1265 * src/pr.c (PAGES_OPTION, COLUMNS_OPTION): Likewise.
1267 2000-01-07 Jim Meyering <meyering@ascend.com>
1269 * tests/tsort/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix
1270 to exported PATH value (though not strictly necessary, here).
1271 * tests/md5sum/Makefile.am: Likewise.
1274 * lib/memcasecmp.c: Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
1275 Capitalize all macro parameters.
1276 (memcasecmp): Ansideclify.
1277 Don't cast away `const'ness of parameters.
1278 * lib/strpbrk.c (strpbrk): Ansideclify.
1279 Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
1280 Suggestions from François Pinard.
1282 2000-01-06 Jim Meyering <meyering@ascend.com>
1284 * tests/tail-2/assert: Tell the user just before sleeping for 7 seconds.
1286 * tests/tail-2/Makefile.am (TESTS): Remove fflush test. It didn't
1287 test the losing behavior, and left a stray tail process to boot.
1289 2000-01-01 Jim Meyering <meyering@ascend.com>
1293 * lib/Makefile.am (lstat.c): Adapt rule to handle new parts of xstat.in.
1295 1999-12-12 Jim Meyering <meyering@ascend.com>
1297 Move 120+ lines of stat.h-related macros from system.h (not shared)
1298 to sys2.h, which is shared between fileutils, sh-utils, textutils.
1299 * src/system.h: Move them from here...
1300 * src/sys2.h: ... to here.
1302 1999-12-09 Jim Meyering <meyering@ascend.com>
1304 * configure.in (ALL_LINGUAS): Add Galician (gl).
1306 1999-12-06 Jim Meyering <meyering@ascend.com>
1308 * tests/tail-2/fflush: New test for latest change.
1309 * tests/tail-2/Makefile.am (TESTS): Add fflush.
1311 1999-10-26 Marc Boucher <marc@mbsi.ca>
1313 * src/tail.c (main): Flush stdout before switching to unbuffered mode
1314 and calling tail_forever. Required only on Solaris2.7 -- on other
1315 systems, using setvbuf to switch to unbufferd mode does the flush.
1317 1999-11-22 Jim Meyering <meyering@ascend.com>
1319 * lib/Makefile.am (DISTCLEANFILES): Put $(BUILT_SOURCES) here rather
1320 than in $(MAINTAINERCLEANFILES).
1322 * src/tail.c (recheck): Handle a race condition (including <dev,inode>
1323 reuse) that would lead to a failed assertion.
1324 Reported by Ken Pizzini.
1325 (tail_forever): Record errno before using it in call to `error'
1326 which might change it.
1327 (tail_file): Likewise.
1329 New test for the above.
1330 * tests/tail-2/assert: New file.
1331 * tests/tail-2/Makefile.am: New file.
1332 * tests/tail-2: New directory.
1333 * tests/Makefile.am (SUBDIRS): Add tail-2.
1334 * configure.in (AC_OUTPUT): Add tests/tail-2/Makefile.
1336 1999-11-05 Jim Meyering <meyering@ascend.com>
1338 * src/system.h: Use HAVE_STRUCT_STAT_ST_BLKSIZE not HAVE_ST_BLKSIZE.
1340 * configure.in: Move some type/header/member tests into
1341 m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of
1342 fileutils, textutils, and sh-utils.
1344 1999-11-04 Paul Eggert <eggert@twinsun.com>
1346 * src/sort.c (SORTALLOC): New macro.
1347 (sortalloc, mergealloc, LINEALLOC): Use it.
1348 (sortalloc, mergealloc, linelength): Now const.
1349 (sortalloc): Increase from 0.5 to 8 MB.
1350 (mergealloc): Increase from 16 to 256 kB.
1351 (LINEALLOC): Increase from 0.25 to 4 MB.
1353 1999-11-03 Paul Eggert <eggert@twinsun.com>
1355 * NEWS, doc/textutils.texi:
1356 Do not consider newline to be part of a line when comparing lines
1357 in `sort' and `comm'. POSIX.2 requires that we consider newline,
1358 but this is a bug in the spec and the bug will likely be fixed.
1359 * src/comm.c (compare_files): Likewise.
1360 * src/sort.c (begfield, limfield, findlines, keycompare, compare):
1362 * tests/sort/Test.pm: Update tests `use-nl' and `11d' to reflect
1365 * lib/linebuffer.c (readline): Do not leave room for an extra
1366 byte after the newline; it's no longer needed.
1367 * src/sort.c (sortalloc, mergealloc, fillbuf, checkfp, mergefps):
1370 * lib/memcoll.c (memcoll): The two arguments cannot be
1371 adjacent any more, so remove the alloca/copy workaround for
1374 1999-11-03 Jim Meyering <meyering@ascend.com>
1376 Fix so that `tail -fn 2 file' works again.
1377 * src/tail.c (anonymous enum) [LONG_FOLLOW_OPTION]: Define.
1378 (long_options): Use LONG_FOLLOW_OPTION here, instead of 'f'.
1379 (main): Remove the `::' after the `f' in getopt_long string.
1380 Add `case LONG_FOLLOW_OPTION' after `case 'f':'.
1381 Based on a patch from Tim Waugh.
1383 * src/tail.c (anonymous enum) [RETRY_OPTION]: Define.
1384 [MAX_UNCHANGED_STATS_OPTION]: Likewise.
1385 [MAX_CONSECUTIVE_SIZE_CHANGES_OPTION]: Likewise.
1386 [PID_OPTION]: Likewise.
1387 (long_options): Use *_OPTION instead of CHAR_MAX + N.
1390 1999-11-02 Jim Meyering <meyering@ascend.com>
1392 * man/help2man: Import version 1.018.
1393 * man/Makefile.maint ($(man_MANS)): Remove use of --name=... option.
1394 * man/*.x: Include one-line summary in [NAME] section.
1395 * man/Makefile.summ (cat-summary): Remove now-unused file.
1396 * man/Makefile.am (EXTRA_DIST): Remove Makefile.summ.
1397 * man/Makefile.maint: Include Makefile.summ with leading `-'.
1398 This file is shared by fileutils and sh-utils, both of which still
1399 have the file (albeit nearly empty now).
1400 Suggestion for clean-up from Akim Demaille.
1402 1999-11-01 Jim Meyering <meyering@ascend.com>
1404 * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
1406 1999-10-20 Jim Meyering <meyering@ascend.com>
1408 * src/tail.c (recheck): Don't refuse to tail a non-regular, non-pipe.
1409 (tail_file): Likewise.
1411 1999-10-07 Jim Meyering <meyering@ascend.com>
1413 * configure.in (ALL_LINGUAS): Add Japanese (ja).
1415 1999-10-04 Jim Meyering <meyering@ascend.com>
1417 * depcomp: New file, for automake's new dependency support.
1418 * missing: New version, from automake's user-dep-gen-branch.
1420 1999-09-28 Jim Meyering <meyering@ascend.com>
1422 * src/system.h: Update from the system.h from fileutils.
1424 * lib/error.c (error_at_line): Use strerror portably here, too,
1425 just as was done in error.
1427 1999-09-02 Jim Meyering <meyering@ascend.com>
1429 * src/cut.c: Remove xstrdup declaration.
1430 * src/sort.c: Likewise.
1431 * src/tsort.c: Likewise.
1433 1999-08-22 Jim Meyering <meyering@ascend.com>
1435 * src/tsort.c (detect_loop): There's no loop if k->top is NULL.
1436 Niklas Edmundsson showed how to make tsort segfault.
1438 * tests/tsort/Makefile.am: Rewrite to use Fetish.pm-based framework.
1439 * tests/tsort/basic-1: New file.
1440 Add a few more tests.
1441 * tests/tsort/Test.pm: Remove.
1443 * man/help2man: Escape backslashes so tr's manual comes out right.
1444 Reported by Andreas Schwab.
1446 * src/tsort.c (usage): Correct address for bug reports.
1447 (tsort): Remove trailing `\n' in error format.
1449 * src/md5sum.c (md5_check): Remove trailing `\n' in error format.
1451 * src/sys2.h (IF_LINT): Define new macro.
1452 * src/od.c (dump): Use IF_LINT macro instead of #ifdef lint...
1454 * src/paste.c (paste_parallel): Likewise.
1455 * src/pr.c (read_line): Likewise.
1456 * src/sort.c (checkfp): Likewise.
1457 (mergefps): Likewise.
1459 * src/cksum.c (cksum): Constify a char*.
1460 * src/comm.c (writeline): Likewise.
1462 * src/uniq.c (check_file): Move declarations of local variables
1463 into the scopes where they're used.
1464 (min): Remove macro definition.
1465 (different): Use MIN, not min.
1466 (SWAP_LINES): New macro.
1467 (check_file): Use it here.
1469 * src/uniq.c (check_file): Generate each line of output earlier,
1470 when possible. It is possible when using none of these options:
1471 --count, -repeated, --all-repeated, --unique.
1472 Based on a patch from Ian Turner.
1474 1999-08-15 Jim Meyering <meyering@ascend.com>
1476 * src/tail.c (ENOSYS): Define to a bogus value if not already defined.
1478 1999-08-13 Eli Zaretskii <eliz@is.elta.co.il>
1480 * src/tail.c (parse_options): Warn if --pid=PID is used and kill()
1481 returns ENOSYS (e.g. when compiled with DJGPP).
1483 1999-08-13 Jim Meyering <meyering@ascend.com>
1485 * src/tsort.c (usage): Use consistent bug-reporting address.
1487 * tests/tsort/Test.pm: New file.
1488 * tests/tsort/Makefile.am: New file.
1489 * tests/tsort: New directory.
1490 * tests/Makefile.am (SUBDIRS): Add tsort.
1491 * configure.in (AC_OUTPUT): Add tests/tsort/Makefile.
1493 1999-08-11 Paul Eggert <eggert@twinsun.com>
1495 * doc/textutils.texi: Document how to ignore newline during sort.
1497 1999-08-07 Jim Meyering <meyering@ascend.com>
1499 * po/POTFILES.in: Add lots of lib/*.c files. Remove src/system.h.
1501 1999-08-06 Jim Meyering <meyering@ascend.com>
1505 * src/sort.c: Include file name in `write error' diagnostics.
1506 (write_bytes): Add output_file parameter and use it. Update callers.
1507 (mergefps): Likewise.
1510 Reported by John Summerfield.
1512 1999-08-05 Jim Meyering <meyering@ascend.com>
1514 * src/tail.c (Follow_mode): Remove comma at end of enumerator list.
1515 Reported by Kaveh Ghazi.
1517 * config.sub: Update from autoconf.
1518 * config.guess: Update from autoconf.
1520 1999-08-04 Jim Meyering <meyering@ascend.com>
1524 * configure.in: Remove inadequate getline-testing code. md5sum would
1525 segfault on HPUX because of the getline function in their C library.
1526 Use the AM_FUNC_GETLINE test in m4/ instead.
1528 1999-08-03 Jim Meyering <meyering@ascend.com>
1530 * src/tail.c (tail_forever): When following by name and calling recheck
1531 because of exceeding max_n_consecutive_size_changes_between_opens,
1532 `continue' so we don't fall through and (assuming the file finally grew)
1533 get the erroneous `file truncated' message. This was hard to reproduce.
1535 1999-08-01 Jim Meyering <meyering@ascend.com>
1539 * configure.in (AM_C_PROTOTYPES): Move test to precede a few
1540 header tests -- merely on principle.
1542 1999-08-01 Paul Eggert <eggert@twinsun.com>
1544 * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS.
1546 1999-07-16 Paul Eggert <eggert@twinsun.com>
1548 * lib/quotearg.c (quotearg_buffer):
1549 Don't quote spaces if C quoting style.
1551 1999-07-31 Jim Meyering <meyering@ascend.com>
1553 * src/tail.c (tail_forever): Don't call kill if pid is 0.
1554 Detect when `writer_is_dead' also when the writer is some other user.
1557 * src/tail.c (parse_options): Warn if --pid=PID is used without -f.
1559 1999-07-30 Jim Meyering <meyering@ascend.com>
1563 * src/tail.c: New option: --pid=PID.
1564 Include signal.h for kill prototype.
1566 (long_options): Add `pid'.
1567 (usage): Describe it.
1568 (tail_forever): Implement it.
1569 (parse_options): Handle the new option and required arg.
1570 Suggestion and pseudo-code from Karl Heuer.
1572 1999-07-27 Jim Meyering <meyering@ascend.com>
1574 * lib/linebuffer.c: Include <sys/types.h> now that linebuffer.h uses
1575 size_t. This is required on at least SunOS4. From Kaveh Ghazi.
1577 1999-07-26 Jim Meyering <meyering@ascend.com>
1579 * src/sys2.h (PID_T_MAX): Define.
1581 * src/tail.c (struct File_spec) [n_stat_calls]: Remove unused member.
1583 1999-07-25 Jim Meyering <meyering@ascend.com>
1585 * src/pr.c (usage): Remove `NEWS'-style paragraph (sorry to have
1586 let that in, translators).
1590 1999-06-01 Volker Borchert <bt@teknon.de>
1592 * tests/Makefile.am: Make envvar-check depend on check-recursive rather
1593 than on `check' so that its tests are performed before any real tests.
1595 1999-07-20 Jim Meyering <meyering@ascend.com>
1597 * configure.in (AC_REPLACE_FUNCS) Remove memmove, now that it's
1598 AC_REPLACE...'d in m4/jm-macros.m4.
1600 * src/wc.c (posixly_correct): Declare global.
1601 (write_counts): Use it to select printf formats.
1602 (main): Set posixly_correct from the POSIXLY_CORRECT envvar.
1605 1999-07-15 Jim Meyering <meyering@ascend.com>
1607 * tests/md5sum/Makefile.am: Revert the 1999-02-15 change.
1608 * tests/md5sum/basic-1, newine-1: Add --text for each individual test.
1609 Reported by Eli Zaretskii.
1611 1999-07-12 Jim Meyering <meyering@ascend.com>
1613 * configure.in (ALL_LINGUAS): Add Slovak (sk).
1615 1999-07-11 Jim Meyering <meyering@ascend.com>
1617 * src/tail.c (recheck): Use assert instead of unnecessary close_fd.
1618 Remove a couple of unnecessary FIXME comments.
1620 1999-07-10 Jim Meyering <meyering@ascend.com>
1622 * doc/textutils.texi: Document new tail options.
1624 * src/tail.c (struct File_spec) [tailable]: Rename from `missing' and
1625 document. Change all uses and locals like was_missing to was_tailable.
1626 Invert expressions as appropriate.
1627 (reopen_inaccessible_files): Rename from allow_missing.
1628 (sleep_interval): Describe.
1629 (--allow-missing): Deprecate.
1630 (--retry): New option, equivalent to --allow-missing.
1631 (usage): Document name vs. descriptor differences.
1632 Refer to manual for descriptions of --max-unchanged-stats=N
1633 and --max-consecutive-size-changes=N.
1634 (valid_file_spec): New function.
1635 (recheck): Assert valid_file_spec.
1636 Remove dead else-if block (suggestion from Eli Zaretskii).
1637 Adjust stmts that set f->tailable -- unlike for `missing', tailable
1638 doesn't depend on errno == ENOENT.
1639 (parse_options): Give a warning if --retry is used when not following
1642 * tests/join/Test.pm: New test case (but commented out) for
1643 Paul's 1999-06-01 fix.
1645 1999-07-09 Jim Meyering <meyering@ascend.com>
1647 * configure.in (ALL_LINGUAS): Add Greek (el).
1649 1999-07-04 Jim Meyering <meyering@ascend.com>
1651 * tests/join/Test.pm: New test case for Paul's 1999-06-03 fix.
1653 1999-07-03 Eli Zaretskii <eliz@is.elta.co.il>
1655 * src/tail.c (struct File_spec): New member, errnum.
1656 (recheck): Record the new value of errno in f->errnum. Don't
1657 output an error message unless the new value of errno differs from
1658 the old one. Output a message if previously-inaccessible file
1660 (tail_forever): Always recheck files whose fd is negative. If the
1661 file cannot be fstat'ed, record the errno value in f[i].errnum.
1662 (tail_file): If the file cannot be open, record the errno value in
1663 f->errnum. If it can be opened, initialize f->errnum to zero. If
1664 it's a non-regular non-fifo file, initialize f->errnum to -1.
1666 1999-06-21 Jim Meyering <meyering@ascend.com>
1668 * doc/textutils.texi: Use lower case characters in sc{} context.
1669 Reported by Eli Zaretskii.
1671 1999-06-03 Paul Eggert <eggert@shade.twinsun.com>
1673 * src/join.c (xfields): Only <blank>s separate fields, not <space>s.
1675 1999-06-01 Paul Eggert <eggert@twinsun.com>
1677 * lib/linebuffer.c (readline): Leave room for an extra byte
1678 after the newline; comm needs this for memcoll.
1680 1999-06-01 Paul Eggert <eggert@twinsun.com>
1682 Add LC_COLLATE support to `join'.
1684 * doc/textutils.texi: Describe join and LC_COLLATE.
1686 * src/join.c: Add support for LC_COLLATE locale.
1687 Include hard-locale.h, linebuffer.h, memcoll.h.
1688 (struct line): New member `buf', replacing `beg' and `lim'.
1690 (hard_LC_COLLATE): New var.
1691 (main): Initialize it.
1692 (get_line): Use readline to read the line,
1693 instead of doing it by hand.
1694 That way, we get a buffer that we can pass to memcoll.
1695 (keycmp): Use memcoll to compare lines if hard_LC_COLLATE is nonzero.
1697 1999-05-27 Volker Borchert <bt@teknon.de>
1699 * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix.
1701 1999-05-25 Paul Eggert <eggert@twinsun.com>
1703 Add LC_COLLATE support to `comm', so that `comm' is compatible
1704 with `sort' in nontrivial locales.
1706 * doc/textutils.texi: Document locale-specific mode for comm.
1708 * lib/Makefile.am (libtu_a_SOURCES): Add hard-locale.c, memcoll.c.
1709 (noinst_HEADERS): Add hard-locale.h, memcoll.h.
1711 * src/comm.c: Include hard-locale.h, memcoll.h.
1712 (hard_LC_COLLATE): New variable.
1713 (compare_files): Use memcoll to compare if hard_LC_COLLATE.
1714 (main): Initialize hard_LC_COLLATE from locale.
1716 * src/sort.c: Include hard-locale.h, memcoll.h.
1717 (hard_LC_COLLATE, hard_LC_CTYPE, hard_LC_TIME): New variables,
1718 replacing `need_locale'.
1719 (memcoll): Move to lib/memcoll.c.
1720 (keycompare): No need to alloc (0), since our caller now does it.
1721 (compare): alloca (0) before returning.
1722 (my_setlocale): Remove; hard_locale now dows this.
1723 (main): Invoke setlocale, bindtextdomain, and textdomain before
1724 invoking anything that might print an error.
1725 Use hard_locale to determine which locales are hard.
1727 * lib/hard-locale.c, lib/hard-locale.h, lib/memcoll.c, lib/memcoll.h:
1730 1999-05-25 Paul Eggert <eggert@shade.twinsun.com>
1732 * lib/linebuffer.c (readline):
1733 Append trailing newline to line.
1735 [struct linebuffer] (size): Declare to be of type size_t, not long.
1736 [struct linebuffer] (length): Likewise.
1737 * src/comm.c, (writeline): Lines now contain trailing newline.
1738 * src/uniq.c (find_field, different): Use size_t, not int, for lengths.
1739 (writeline): Lines now contain trailing newline.
1740 (check_file): Use size_t, not int, for lengths.
1741 * src/nl.c (proc_text, check_section, main): More of the same.
1743 * lib/linebuffer.h (struct linebuffer): Use size_t for sizes.
1744 src/nl.c (header_del_len, body_del_len, footer_del_len, main):
1746 src/uniq.c (find_field, different, check_file): Likewise.
1748 * lib/linebuffer.c (readline): Silently append trailing
1749 newline if needed. Do not bother setting buffer length to 0
1750 at EOF, since it's not part of the spec and nobody relies on
1751 it. Do not compute the difference between unrelated pointers.
1753 1999-05-25 Paul Eggert <eggert@twinsun.com>
1755 * src/tac.c (memrchr): Ifdef out this unused function.
1757 1999-05-25 Jim Meyering <meyering@ascend.com>
1759 * doc/textutils.texi (Squeezing): Remove misleading square brackets
1760 from SET1 in the one-word-per-line example.
1762 1999-05-22 Jim Meyering <meyering@ascend.com>
1764 * lib/Makefile.am (libtu_a_SOURCES): Remove memchr.c.
1765 From Ulrich Drepper.
1769 1999-05-22 Paul Eggert <eggert@twinsun.com>
1771 * doc/textutils.texi: Document locale-specific changes to `sort',
1772 as well as the new, POSIX-compliant definition of line comparison,
1773 and -g's more careful treatment of NaNs, infinities and zeros.
1775 * src/sort.c (general_numcompare): Put exceptional cases
1776 first, not last, to be consistent with -M.
1778 1999-05-21 Paul Eggert <eggert@twinsun.com>
1780 * src/sort.c (strtod): Declare if STDC_HEADERS is not defined.
1781 (general_numcompare): Use strtod, not xstrtod.
1782 Do not consider partial conversions to be errors.
1783 Put -infinity at the start, and +infinity at the end;
1784 follow +infinity with NaNs (sorted by bit pattern),
1785 and finally by conversion errors.
1787 1999-05-21 Jim Meyering <meyering@ascend.com>
1789 * tests/sort/Test.pm (11d): Reverse lines in expected output
1790 to reflect latest change.
1791 (use-nl): New test from Paul Eggert.
1793 1999-05-20 Paul Eggert <eggert@twinsun.com>
1795 * src/sort.c: Treat the trailing newline as part of the line,
1796 as required by POSIX.2.
1798 (struct line, findlines, compare, checkfp, mergefps, sort):
1799 A line now includes its trailing newline.
1800 (findlines): Do not replace newline with NUL.
1801 (memcoll, keycompare): Work even if the data to be compared are
1802 adjacent strings; this is possible now that lines contain the
1804 (fillbuf): Always have an unused byte at the end of the buffer,
1805 since memcoll and keycompare want to modify a byte after the last line.
1806 (sortalloc, mergealloc): Increase by 1, for trailing byte.
1808 1999-05-20 Jim Meyering <meyering@ascend.com>
1810 * tests/sort/Test.pm: Add test case from Paul Eggert.
1812 1999-05-20 Paul Eggert <eggert@twinsun.com>
1814 * src/sort.c (keycompare): Ignore any length difference if the
1815 localized comparison says the strings are equal.
1817 * src/sort.c (memcoll, keycompare, compare): Handle NUL
1818 characters properly when comparing with LC_COLLATE semantics.
1819 (NLS_MEMCMP): Remove.
1820 (memcoll): Renamed from strncoll.
1821 Take separate lengths for each string.
1822 This function is now invoked only when need_locale.
1823 (keycompare): Don't copy strings when ignore and translate
1826 1999-05-18 Paul Eggert <eggert@twinsun.com>
1828 * src/sort.c (MONTHTAB_CONST): Renamed from NLS_CONST; the use
1829 is also changed. Define to const also if !HAVE_NL_LANGINFO.
1831 (usage): `,' -> `;' (English typo).
1833 1999-05-17 Eli Zaretskii <eliz@is.elta.co.il>
1835 * src/cat.c (main): When stdout is in binary mode, make sure all
1836 input files are also read in binary mode.
1838 1999-05-16 Jim Meyering <meyering@ascend.com>
1842 1999-05-11 Paul Eggert <eggert@twinsun.com>
1844 * src/sort.c: Don't autodetect the locale of numbers and
1845 months, as this conflicts with POSIX.2 and is tricky to boot.
1847 (FLOATING_COMMA, NLS_STRNCMP, NLS_MAX_GROUPS,
1848 NLS_ONE_CHARACTER_STRING): Remove macros no longer used.
1850 (nls_grouping, nls_fraction_found, nls_month_found, nos_monthtab,
1851 nls_months_collide, nls_keyhead, us_monthtab): Remove variables no
1854 (struct nls_keyfield): Remove types no longer used.
1856 (strncoll_s2_readonly, nls_set_fraction, look_for_fraction,
1857 nls_month_is_either_locale, nls_numeric_format): Remove functions no
1860 (monthtab): Now has the role that us_monthtab had, but it's const only
1861 if ENABLE_NLS is not defined.
1863 (C_DECIMAL_POINT): Renamed from FLOATING_POINT. All uses changed.
1864 (MONTHS_PER_YEAR): Renamed from NLS_NUM_MONTHS. All uses changed.
1865 (struct_month_cmp): Renamed from nls_sort_month_comp. All uses changed.
1866 Use strcmp, not strcoll, since the user doesn't care about collating
1869 (inittables): Read locale data into monthtab, rather than modifying a
1870 separate month table and futzing with indirection. Do not worry about
1871 colliding months, since we no longer autodetect month locale.
1873 (fraccompare): Don't set no-longer-used variable nls_fraction_found.
1875 (getmonth): Use strncmp to compare months, since user doesn't care
1876 about collating here. Fix bug where code incorrectly assumed that
1877 strlen (monthtab[lo].name) == strlen (monthtab[ix].name).
1879 (keycompare, main): Don't autodetect month locale.
1881 (compare): Don't use NLS_MEMCP in code that can't be executed if
1882 need_locale is false, as NLS_MEMCP is equivalent to memcmp in that
1885 (sort, insertkey, main): Don't autodetect numeric locale.
1887 1999-05-15 Jim Meyering <meyering@ascend.com>
1889 * tests/join/Test.pm (trailing-sp): New test for this fix.
1890 * src/join.c (xfields): Don't interpret a trailing blank as a
1891 delimiter when e.g. -t: was specified. From Tim Smithers.
1893 1999-05-12 Jim Meyering <meyering@ascend.com>
1895 * tests/Makefile.am (envvar-check): Renamed from check-local.
1896 (check): Depend on envvar-check so the envvar check is performed
1897 before all other tests. Reported by Volker Borchert.
1898 * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects,
1899 so CDPATH is mentioned in the message. Reported by Volker Borchert.
1901 1999-05-11 Jim Meyering <meyering@ascend.com>
1903 * src/sort.c (usage): Split the --help message into two pieces so that
1904 neither is longer than 2048. For Irix4's cc. Reported by Kaveh Ghazi.
1906 1999-05-09 Jim Meyering <meyering@ascend.com>
1908 * lib/regex.c: Update from libc.
1912 * Makefile.maint (alpha): Put the announcement in
1913 /tmp/announce-$(distdir)
1915 * tests/sort/Test.pm (neg-nls): New test.
1917 1999-05-08 Jim Meyering <meyering@ascend.com>
1919 * src/system.h (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM,
1920 and all the *_MIN and *_MAX symbols): Remove definitions.
1921 * src/sys2.h: Put the definitions here instead (this file is shared
1922 between all three *utils packages, while system.h is not).
1924 1999-05-06 Paul Eggert <eggert@twinsun.com>
1926 * src/sort.c (fraccompare, numcompare): Merge the NLS and
1927 non-NLS versions into a single function.
1929 (decimal_point): Now char, since we no longer convert to unsigned
1931 (th_sep): Now int, since we use a value out of char range to denote
1932 the absence of a thousands separator.
1933 (IS_THOUSANDS_SEP): New macro.
1934 (USE_NEW_FRAC_COMPARE): Remove.
1935 (nls_set_fraction): Arg is now char, not unsigned char.
1936 Set th_sep to CHAR_MAX + 1 if there is no thousands separator.
1937 (numcompare): Don't convert to unsigned char unless necessary.
1938 (main): Turn off decimal points and thousand separators if they
1939 are multibyte characters, as we don't support that yet.
1941 1999-05-06 Paul Eggert <eggert@twinsun.com>
1943 * src/system.h (CHAR_MIN, CHAR_MAX): New macros.
1944 (SCHAR_MIN, SCHAR_MAX): Don't assume that char is signed.
1946 1999-05-06 Paul Eggert <eggert@twinsun.com>
1948 * src/sort.c (numcompare): Handle comparison of two negative
1949 numbers correctly in the ENABLE_NLS case.
1951 1999-05-04 Jim Meyering <meyering@ascend.com>
1953 * src/pr.c (usage): Break the usage message into 3 pieces instead of
1954 only 2. The strings had grown to be longer than 2048, which evokes
1955 errors when compiling with Irix4's cc. Reported by Kaveh Ghazi.
1957 * src/tsort.c (search_item): Use `1' instead of `+1'. The latter
1958 elicits a syntax error from SunOS4's cc. From Kaveh Ghazi.
1960 1999-05-03 Jim Meyering <meyering@ascend.com>
1962 * src/ptx.c <ctype.h>: Don't include.
1963 [!STDC_HEADERS]: Remove definitions of ctype macros.
1964 Convert e.g., isspace to ISSPACE to use definitions from sys2.h.
1965 Reported by Kaveh Ghazi.
1967 * src/sys2.h (TOLOWER): Define.
1969 * src/join.c (TOLOWER): Remove definition.
1970 * src/md5sum.c (TOLOWER): Remove definition.
1972 1999-04-30 Jim Meyering <meyering@ascend.com>
1974 * src/sort.c (usage): Document the differences between the
1975 obsolescent, +POS1[-POS2] form, and the POSIX -k option.
1977 1999-04-24 Jim Meyering <meyering@ascend.com>
1979 * configure.in: Use AC_CANONICAL_HOST.
1981 * lib/Makefile.am (libtu_a_SOURCES): Add xstrtoumax.c
1982 (noinst_HEADERS): Remove xstrtoul.h.
1984 * src/csplit.c: Include new "xstrtol.h", not "xstrtoul.h".
1985 (struct control) [repeat]: Declare as uintmax_t, not int.
1986 (struct control) [lines_required]: Likewise.
1987 (handle_line_error): Use human_readable to print lines_required.
1988 (parse_repeat_count): Parse a uintmax_t.
1989 (parse_patterns): Parse a uintmax_t.
1991 * src/tail.c: Include new "xstrtol.h", not "xstrtoul.h".
1992 * src/od.c: Likewise.
1994 * src/head.c: Include new "xstrtol.h", not "xstrtoul.h".
1995 Change all U_LONG_LONG to uintmax_t.
1996 (head_lines): Move a couple dcls into an inner scope.
1997 (string_to_integer): Rename from string_to_ull.
1999 1999-04-19 Jim Meyering <meyering@ascend.com>
2001 * Makefile.maint (b_host): Remove /pub suffix.
2003 1999-04-18 Jim Meyering <meyering@ascend.com>
2007 * Makefile.maint (my-distcheck): Use AMTAR, not TAR.
2009 * src/sort.c (usage): s/DIRECT/DIRECTORY/g
2010 Rename global: s/temp_file_prefix/temp_dir/.
2011 (NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,
2012 not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than
2014 (tempname): Wrap after 99999 only for length-impaired file systems.
2016 1999-04-17 Jim Meyering <meyering@ascend.com>
2018 * src/tail.c (file_lines): Fix serious bug introduced with last changes.
2019 From Andreas Schwab.
2021 1999-04-15 Jim Meyering <meyering@ascend.com>
2023 * tests/Makefile.am (EXTRA_DIST): Rename .posix-warn to .env-warn.
2024 (check-local): Warn about CDPATH in the same way
2025 we warn about POSIXLY_CORRECT, since the cp/same-file test fails at
2026 least when using bash with CDPATH set. Reported by Mark Hewitt.
2028 * src/pr.c Add comments.
2029 (init_header): Tweak white space in Date/Time header.
2030 * tests/pr/Test.pm: Updated all tests to reflect the big
2031 1999-02-13 change. From Roland Huebner.
2033 1999-04-12 Jim Meyering <meyering@ascend.com>
2035 * src/cat.c (main): Declare out_dev to be of type dev_t, not `int'.
2036 Declare out_ino to be of type ino_t, not `int'.
2039 * src/od.c (MIN, MAX): Remove definitions.
2040 * src/sys2.h (MIN, MAX): Define here instead.
2041 Reported by John Bley.
2043 1999-04-11 Jim Meyering <meyering@ascend.com>
2047 * tests/pr/Test.pm (test_vector): Disable all tests while I wait for
2050 Fix the problem whereby `yes > k & sleep 1; tail -2c k' would infloop.
2051 * src/tail.c (COPY_TO_EOF): Define.
2052 (dump_remainder): Add parameter, n_bytes, and rewrite to use it.
2054 (file_lines): Rename parameter.
2055 (tail_bytes): Remove obsolete comment.
2057 Fix the problem whereby `yes > k & sleep 1; tail -1 k' would infloop.
2058 * src/tail.c (dump_remainder): Move this function to precede the
2059 new use in file_lines.
2060 (tail_lines): Don't call dump_remainder here.
2061 (file_lines): Call dump_remainder here instead.
2062 Reported by Lehti Rami.
2064 * lib/readtokens.c (readtoken, readtokens): Protoize.
2066 1999-04-10 Jim Meyering <meyering@ascend.com>
2068 * src/tail.c (xwrite): Use STDOUT_FILENO instead of literal `1'.
2070 1999-04-04 Jim Meyering <meyering@ascend.com>
2072 * src/cat.c: Standardize --help and --version processing.
2073 * src/comm.c: Likewise.
2074 * src/csplit.c: Likewise.
2075 * src/cut.c: Likewise.
2076 * src/expand.c: Likewise.
2077 * src/fmt.c: Likewise.
2078 * src/fold.c: Likewise.
2079 * src/head.c: Likewise.
2080 * src/join.c: Likewise.
2081 * src/md5sum.c: Likewise.
2082 * src/nl.c: Likewise.
2083 * src/od.c: Likewise.
2084 * src/paste.c: Likewise.
2085 * src/pr.c: Likewise.
2086 * src/ptx.c: Likewise.
2087 * src/split.c: Likewise.
2088 * src/sum.c: Likewise.
2089 * src/tac.c: Likewise.
2090 * src/tail.c: Likewise.
2091 * src/tr.c: Likewise.
2092 * src/unexpand.c: Likewise.
2093 * src/uniq.c: Likewise.
2094 * src/wc.c: Likewise.
2096 1999-03-29 Jim Meyering <meyering@ascend.com>
2098 * configure.in (GNU_PACKAGE): Remove related code -- now it's in
2099 the catch-all for shared autoconf code, m4/jm-macros.m4.
2100 (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
2103 1999-03-26 Jim Meyering <meyering@ascend.com>
2105 * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
2106 (noinst_HEADERS): Add version-etc.h.
2108 1999-03-25 Jim Meyering <meyering@ascend.com>
2110 * src/tail.c (recheck): Factor out a block of duplicated code.
2111 Set f->size to 0 upon encountering a new file so we read it from
2112 the beginning rather than from then end of the first line or
2113 block. Otherwise, after a log rotation, tail would omit the first
2114 line or block of the new file. Reported by Ed Avis.
2116 1999-03-20 Jim Meyering <meyering@ascend.com>
2118 * tests/Makefile.am (SUBDIRS): Temporarily remove pr.
2120 1999-03-13 Jim Meyering <meyering@ascend.com>
2122 * src/tac.c (tac_mem): `#if-0'-out this unused function.
2123 (tac_stdin_to_mem): Likewise.
2125 * doc/textutils.texi (cut invocation): Describe --output-delimiter.
2127 1999-03-12 Jim Meyering <meyering@ascend.com>
2129 * src/sys2.h (SETVBUF): Define new macro.
2130 * src/tail.c (dump_remainder): Don't fflush stdout here.
2131 (main) [if forever]: Make stdout unbuffered, instead.
2132 Akim Demaille pointed out that when running `echo x>a; tail -f a>>a' ,
2133 the file `a' didn't grow longer than two lines. Now it grows
2136 1999-03-07 Jim Meyering <meyering@ascend.com>
2138 * tests/md5sum/newline-1: Test for the actual feature.
2139 With help from Eli Zaretskii.
2141 * src/pr.c (usage): Add missing \n\.
2143 The newline test would always fail on MSDOS/Windows systems --
2144 so move it to a separate file where we can test for that.
2145 * tests/md5sum/basic-1: Remove newline test.
2146 * tests/md5sum/newline-1: New file.
2147 * tests/md5sum/Makefile.am (TESTS): Add newline-1.
2148 Pointed out by Eli Zaretskii.
2150 1999-02-13 Roland Huebner <rh@pelikan.cologne.de>
2152 (main): Redefine options -s, -w to be POSIX compliant; introduce
2153 new options -J, -S, -W to disentangle -s and -w when used together
2154 with the three column options;
2155 (add_line_number): Make POSIX compliant; use default number
2156 separator TAB with single column output.
2157 (add_line_number): Make POSIX compliant; with multicolumn output
2158 now prefer `text columns of equal width' rather than a consequent
2159 use of `default n-separator TAB'.
2160 (add_line_number): Change line number cut-off from lower-oder to
2161 higher-oder digit to avoid loss of information; no consequent
2162 handling exists in different utilities and other UNIXes.
2163 (char_to_clump): Expand input text tabs to 8 spaces, if
2164 input_tab_char doesn't equal TAB (adapted to other UNIXes).
2165 (usage): Update POSIX compliant options -s, -w; add new options -J,
2167 (main): Update the source internal documentation.
2168 Some smaller BUGFIXES (print_sep_string, init_header, skip_to_page,
2169 reset_status, print_header).
2171 * tests/md5sum/basic-1 (backslash): Use .\foo instead of \.foo so we
2172 don't tramp on root directory in MSDOS/Windows.
2173 Suggestion from Eli Zaretskii.
2175 1999-02-15 Eli Zaretskii <eliz@is.elta.co.il>
2177 * tests/md5sum/Makefile.am (TESTS_ENVIRONMENT): Run md5sum with the
2178 --text option (for MSDOS).
2180 1999-03-06 Jim Meyering <meyering@ascend.com>
2182 * src/cut.c (getstr): Change type of `delim' parameter from char to int.
2183 (cut_fields): Cast to `unsigned char' before comparing.
2184 (main): Cast to `unsigned char' before assigning.
2186 * tests/cut/Test.pm: Add a test to exercise the bug.
2188 * src/ptx.c (swallow_file_in_memory): Use a `%s' format in error call,
2189 in case the argument string contains a `%'.
2191 * src/fmt.c (main): Likewise.
2192 * src/sort.c (main): Likewise.
2194 1999-02-13 Eli Zaretskii <eliz@is.elta.co.il>
2196 * src/sys2.h [__DJGPP__]: Include <io.h> and <sys/exceptn.h>.
2198 * src/ptx.c (swallow_file_in_memory): Slurp up the whole file at
2199 once on MSDOS as well, but we have to relax the test for whether
2200 reading it succeeded.
2202 1999-03-03 Jim Meyering <meyering@ascend.com>
2204 * src/cat.c: Include long-options.h
2205 [long_options]: Remove the "help" and "version" entries.
2206 Remove declarations of show_help and show_version.
2207 (main): Use parse_long_options, including author name(s).
2208 Remove the show_version and show_help blocks.
2209 * src/cksum.c: Likewise.
2210 * src/comm.c: Likewise.
2211 * src/csplit.c: Likewise.
2212 * src/cut.c: Likewise.
2213 * src/expand.c: Likewise.
2214 * src/fmt.c: Likewise.
2215 * src/fold.c: Likewise.
2216 * src/head.c: Likewise.
2217 * src/nl.c: Likewise.
2218 * src/od.c: Likewise.
2219 * src/paste.c: Likewise.
2220 * src/pr.c: Likewise.
2221 * src/split.c: Likewise.
2222 * src/sum.c: Likewise.
2223 * src/tac.c: Likewise.
2224 * src/tail.c: Likewise.
2225 * src/tr.c: Likewise.
2226 * src/unexpand.c: Likewise.
2227 * src/uniq.c: Likewise.
2228 * src/wc.c: Likewise.
2230 * src/ptx.c: Include long-options.h
2231 [long_options]: Remove the "help" and "version" entries.
2232 Remove declarations of show_help and show_version.
2233 (main): Remove `const' attribute from dcl of argv parameter.
2234 Call bindtextdomain and textdomain.
2235 Use parse_long_options, including author name(s).
2236 Remove the show_version and show_help blocks.
2238 * src/join.c (main): Include author name argument in call to
2240 * src/md5sum.c (main): Likewise.
2241 * src/sort.c (main): Likewise.
2242 * src/tsort.c (main): Likewise.
2244 1999-02-07 Jim Meyering <meyering@ascend.com>
2248 * Makefile.maint (my-distcheck): Don't depend on dist, now that this
2249 is hooked up to the distcheck rule.
2250 * Makefile.am (distcheck-hook): New target and rule -- link to shared
2251 rule, my-distcheck, in Makefile.maint.
2253 1999-01-31 Jim Meyering <meyering@ascend.com>
2255 * doc/textutils.texi: Wrap the @top node in @ifnottex instead of
2256 @ifinfo so `makeinfo --html ...' works. From Karl Berry.
2258 1999-01-30 Jim Meyering <meyering@ascend.com>
2260 * acconfig.h: Remove lots of `#undef's, now that we use the
2261 3-argument forms of AC_DEFINE* macros.
2263 * configure.in: Require autoconf 2.13.
2264 Use 3-argument form of AC_DEFINE*.
2266 1999-01-24 Jim Meyering <meyering@ascend.com>
2268 * src/tac.c (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.
2270 * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
2271 (and hence that of the local `n1', too) to `int' at Paul's request.
2273 1999-01-18 Akim Demaille <demaille@inf.enst.fr>
2275 * doc/textutils.texi: Harmonization of @samp use for options.
2277 1999-01-17 Jim Meyering <meyering@ascend.com>
2279 * Makefile.am (SUBDIRS): Add djgpp.
2280 * configure.in (AC_OUTPUT): Add djgpp/Makefile.
2281 * djgpp/: New directory.
2283 * man/Makefile.maint ($(man_MANS)): Don't remove the target (the
2284 man page) until after we've created its replacement.
2286 1999-01-16 Eli Zaretskii <eliz@is.elta.co.il>
2288 * GNUmakefile: Add SHELL = /bin/sh.
2289 * man/GNUmakefile: Likewise.
2291 1999-01-16 Jim Meyering <meyering@ascend.com>
2293 * acconfig.h: Remove @BOTTOM@ section.
2294 Instead, add the define and decl via m4/jm-macros.m4.
2296 * lib/argmatch.h (XARGMATCH): Define to return a value once again.
2297 (XARGCASEMATCH): Likewise.
2299 * lib/argmatch.c (EXIT_FAILURE): Define.
2300 (ARGMATCH_DIE): Provide default.
2301 (__xargmatch_internal): New function.
2302 s/rogram_name/program_name.
2305 1999-01-14 Jim Meyering <meyering@ascend.com>
2307 * tests/md5sum/basic-1: Use `f', not `x' as temp. file name to avoid
2308 warnings from perl5.004.
2309 Reported by Volker Borchert.
2311 * lib/long-options.c (parse_long_options): Rename `usage' parameter
2312 to avoid shadowing globally scoped function.
2314 1999-01-14 Akim Demaille <demaille@inf.enst.fr>
2316 * acconfig.h: Add a @BOTTOM@ section.
2317 (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1).
2319 * src/*.c: Don't prototype usage as static.
2321 1999-01-10 Jim Meyering <meyering@ascend.com>
2325 All of the following new code is protected by
2326 `#if DONT_UNLINK_WHILE_OPEN'
2327 * src/tac.c (file_to_remove): New global.
2328 (fp_to_close): New global.
2329 (unlink_tempfile): New function.
2330 (record_tempfile): New function.
2331 (save_stdin): Call record_tempfile.
2333 (main): Use SET_BINARY and SET_BINARY2.
2336 1999-01-09 Jim Meyering <meyering@ascend.com>
2338 * tests/uniq/Test.pm: Add tests from Jochen Hein.
2339 * src/uniq.c: New option: --all-repeated (-D).
2340 (output_all_repeated) [output_mode]: New enum value.
2341 (usage): Describe it.
2342 (writeline): Test for new mode.
2343 (check_file): Likewise.
2344 Based on patches from Jochen Hein and Florin Iucha.
2345 (main): Diagnose `too many arguments'.
2347 * tests/head/Test.pm (null-1): Add test from Jochen Hein.
2349 * src/tail.c (parse_obsolescent_option): Interpret `number' as decimal.
2350 (parse_options): Likewise.
2351 Reported by Kamal Paul Nigam.
2353 * src/tail.c: New option: --max-unchanged-stats=N.
2354 New option: --max-n-consecutive-size-changes=N.
2356 1999-01-03 Jim Meyering <meyering@ascend.com>
2358 * src/md5sum.c (usage): Remove third program_name argument -- there
2359 were only two `%s' in the format string.
2361 1999-01-02 Jim Meyering <meyering@ascend.com>
2363 * src/tsort.c (tsort): Use a single call to error instead of two
2365 (main): Remove `%s: ' prefix on format string.
2367 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
2369 * src/ptx.c (format_vals): New array.
2370 (main): Use XARGMATCH in place of argmatch.
2372 * lib/argmatch.h (XARGMATCH): Don't return a value; instead,
2373 modify a parameter. Add a `Die_stmt' parameter.
2375 * lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
2376 (argmatch_to_argument): Add `const' attribute to first parameter.
2378 1999-01-01 Jim Meyering <meyering@ascend.com>
2380 * src/tsort.c: Move inclusion of assert.h to follow that of stdio.h.
2381 Some losing systems require this.
2382 Use STREQ macro instead of strcmp in a few places.
2384 * po/POTFILES.in: Add tsort.c.
2386 * man/Makefile.maint ($(man_MANS)): `exit 1' if any of help2man,
2387 chmod, or mv fails. Otherwise, the failure could go unnoticed.
2389 * man/Makefile.summ: Add entries for ptx and tsort.
2391 * src/tsort.c: Include readtokens.h.
2392 (zeros): Rename global from `rr'.
2393 (getstr): Remove function.
2394 (tsort) Use readtoken instead of getstr.
2396 * lib/readtokens.c: New file.
2397 * lib/readtokens.h: New file.
2398 * lib/Makefile.am (libtu_a_SOURCES): Add readtokens.c.
2399 (noinst_HEADERS): Add readtokens.h.
2401 * man/Makefile.am (man_MANS): Add ptx.1.
2402 * man/ptx.x: New file.
2404 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
2406 * man/Makefile.am (man_MANS): Add tsort.1.
2407 * man/tsort.x: New (essentially empty) file.
2409 * src/tsort.c: Rename globals N and R so they don't shadow locals.
2410 (tsort): Rename from `sort'.
2412 1998-11-07 Mark Kettenis <kettenis@phys.uva.nl>
2413 * src/Makefile.am (bin_PROGRAMS): Add tsort.
2414 * src/tsort.c: New program.
2416 * lib/Makefile.am (libtu_a_SOURCES): Add quotearg.c.
2417 (noinst_HEADERS): Add quotearg.h.
2419 ============================
2420 All of the following are from:
2421 1998-04-17 Eli Zaretskii <eliz@is.elta.co.il>
2423 * src/system.h (SET_BINARY, SET_BINARY2, fileno, setmode): New
2426 * src/cat.c (usage) [O_BINARY]: Describe -B,--binary option.
2427 (main) [O_BINARY]: binary_files, binary_output, file_open_mode:
2428 new variables. Add --binary to long_options[]. Switch stdin and
2429 stdout to binary mode unless file contents are not important
2430 anyway. Open files in binary mode when required.
2432 * src/cksum.c (cksum) [O_BINARY]: Read redirected stdin in binary
2435 * src/expand.c (expand): Use binary I/O where appropriate.
2437 * src/head.c (head_bytes, head_lines) [O_BINARY]: Use binary I/O.
2439 * src/md5sum.c (OPENOPTS) [O_BINARY]: Use binary I/O when non-zero
2441 (md5_file) [O_BINARY]: Switch redirected stdin to binary mode.
2442 (main) [O_BINARY]: Use binary reads by default on those systems
2443 which care about the difference.
2445 * src/od.c (skip, read_char, read_block) [O_BINARY]: Switch input
2446 stream to binary mode.
2448 * src/sort.c (PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max
2449 file name characters in a given directory.
2450 (tempname): Make sure the temp file name is unique even if long
2451 file names aren't supported.
2453 * src/split.c (cwrite) [O_BINARY]: Write output in binary mode.
2454 (main) [O_BINARY]: Read input in binary mode.
2456 * src/sum.c (bsd_sum_file, sysv_sum_file) [O_BINARY]: Read input
2459 * src/tac.c (record_tempfile, unlink_tempfile)
2460 [DONT_UNLINK_WHILE_OPEN]: New functions, for systems where a file
2461 cannot be removed before it is closed.
2462 (save_stdin) [DONT_UNLINK_WHILE_OPEN]: Record the temporary file,
2463 to be removed before exit.
2464 (tac_file, save_stdin, main): Use binary I/O when appropriate.
2466 * src/tail.c (tail_lines, tail_bytes) [O_BINARY]: Use binary I/O
2469 * src/tr.c (main) [O_BINARY]: Use binary I/O when appropriate.
2471 * src/unexpand.c (unexpand): Use binary I/O where appropriate.
2473 * src/wc.c (wc): Use binary mode for input.
2475 * doc/textutil.texi: Add comments about peculiarities of Textutils
2476 operation on MS-DOS/MS-Windows.
2478 1998-12-22 Jim Meyering <meyering@ascend.com>
2480 * configure.in (ALL_LINGUAS): Add chinese (zh).
2482 1998-12-17 Jim Meyering <meyering@ascend.com>
2484 New options for tail:
2485 --follow=name, --follow=descriptor, --allow-missing
2486 * src/tail.c (Follow_mode): New enum.
2487 (n_live_files): New function.
2488 (tail_forever): Avoid starvation with --follow=name and a
2489 continually-growing unlinked or renamed file.
2491 1998-12-13 Jim Meyering <meyering@ascend.com>
2493 * tests/uniq/Test.pm: New file.
2494 * tests/uniq/Makefile.am: New file.
2495 * tests/uniq: New directory.
2496 * tests/Makefile.am (SUBDIRS): Add uniq.
2497 * configure.in (AC_OUTPUT): Add tests/uniq/Makefile.
2500 * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
2502 (EXTRA_DIST): Add xstat.in.
2503 * lib/stat.c: Remove file.
2504 * lib/lstat.c: Remove file.
2505 * lib/xstat.in (xstat@): New file.
2507 * configure.in (ALL_LINGUAS): Add Russian (ru).
2509 1998-10-31 Jim Meyering <meyering@ascend.com>
2511 * acconfig.h (stat): New #undef.
2513 1998-10-22 Jim Meyering <meyering@ascend.com>
2515 * src/fold.c (usage): Add mention of --version and --help.
2516 Reported by Matej Vela <mvela@public.srce.hr>.
2518 1998-10-04 Jim Meyering <meyering@ascend.com>
2520 * lib/fnmatch.h: New file. (unused)
2521 * lib/fnmatch.c: New file. (unused)
2522 * lib/Makefile.am (noinst_HEADERS): Add fnmatch.h.
2524 1998-10-03 Jim Meyering <meyering@ascend.com>
2526 * man/Makefile.am: Switch to using help2man.
2527 (EXTRA_DIST): Add Makefile.summ.
2529 * man/help2man: Invoke program with --manhelp option only if
2530 --name=STRING not specified. Otherwise, this would fail with `yes'.
2531 * man/Makefile.summ: New file.
2532 * man/Makefile.maint: Include it.
2533 * man/help2man: New file.
2534 * man/GNUmakefile: New file.
2535 * man/Makefile.maint: New file.
2536 * man/*.x: New files.
2537 * man/*.1: Remove files.
2539 * src/md5sum.c (split_3): Rename local variable, to `escaped_filename'.
2540 (main): Output the leading backslash not just when there's a newline
2541 in the file name, but also when there's a backslash.
2542 Reported by Jim Dennis.
2544 * tests/md5sum/basic-1: Add tests with filenames containing newline
2545 and backslash characters. (for the bug fixed above)
2547 * tests/Makefile.am (EXTRA_DIST): Add Fetish.pm.
2548 * tests/Fetish.pm: New file.
2550 * tests/md5sum/basic-1: New file: rewrite of old tests to use Fetish.pm.
2551 * tests/md5sum/Test.pm: Remove file.
2552 * tests/md5sum/Makefile.am: Rewrite.
2554 1998-09-19 Jim Meyering <meyering@ascend.com>
2556 * src/ptx.c (program_name): Declare *not* to be const.
2558 1998-08-29 Jim Meyering <meyering@ascend.com>
2560 * src/cut.c: Don't assume ASCII.
2561 * src/pr.c: Likewise.
2562 * src/tail.c: Likewise.
2564 1998-08-15 Jim Meyering <meyering@ascend.com>
2566 * src/pr.c (usage): Reformat.
2568 * src/ptx.c: Add braces to suppress warning about ambiguous `else'.
2569 * lib/bumpalloc.h: Likewise.
2571 1998-08-13 François Pinard <pinard@iro.umontreal.ca>
2573 * src/ptx.c: New file.
2574 * src/Makefile.am (bin_PROGRAMS): Add ptx.
2575 * lib/bumpalloc.h, lib/diacrit.h, lib/diacrit.c: New files.
2576 * lib/Makefile.am (libtu_a_SOURCES): Add diacrit.c.
2577 (noinst_HEADERS): Add bumpalloc.h and diacrit.h.
2579 1998-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2581 * src/pr.c (long_options): Add long names for all options.
2582 (usage): Update help string.
2583 (main): Handle the special options --pages and --columns.
2585 1998-08-02 Jim Meyering <meyering@ascend.com>
2587 * lib/linebuffer.c (readline): Return zero upon error as well as upon
2588 end of file. From James Youngman.
2591 1998-08-01 Jim Meyering <meyering@ascend.com>
2593 * src/sort.c (my_setlocale): Guard definition within #ifdef ENABLE_NLS.
2594 From Manfred Hollstein.
2596 1998-07-30 Jim Meyering <meyering@ascend.com>
2598 * tests/cut/Test.pm: Avoid broken pipe message for tests that fail
2601 * src/sort.c (usage): Add angle brackets to make `Report bugs...'
2602 message consistent with all the rest.
2604 1998-07-28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2606 * tests/cut/Test.pm: Avoid broken pipe for 'y' and 'z' tests.
2608 * src/sort.c (NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid
2609 clash with <langinfo.h>. All uses changed.
2611 1998-07-26 Jim Meyering <meyering@ascend.com>
2613 * intl/localealias.c (read_alias_file): Avoid mixing `char*' and
2614 `unsigned char*' variables. Again for irix4.
2615 Mostly from Kaveh Ghazi.
2617 * src/join.c: Convert some char* dcls to `unsigned char*' and remove
2618 a cast -- to placate irix4's cc.
2619 * src/fmt.c (check_punctuation): Add cast to placate irix4's cc.
2620 Reported by Kaveh Ghazi.
2622 * src/md5sum.c (split_3): Add cast to placate irix4's cc.
2625 1998-07-25 Jim Meyering <meyering@ascend.com>
2629 * tests/cut/Test.pm: Add tests for new --output-delimiter option,
2630 as well as for NUL input delimiter (--delimiter='').
2631 * src/cut.c (cut_fields): Honor new --output-delimiter option.
2632 (main): Fix handling of --delimiter='' (-d ''). Until now, it has
2633 never worked as advertised. I guess no one tried it.
2635 * tests/sort/Test.pm: Add two tests relating to this.
2636 * src/sort.c (main): Stat all non-`-' input file files (and fail if a
2637 stat fails) when an output file is specified by `-o' but doesn't exist.
2638 Reported by Will Edgington.
2640 * tests/sort/Test.pm: New tests of -o.
2642 1998-07-16 Jim Meyering <meyering@ascend.com>
2644 * lib/Makefile.am (noinst_HEADERS): Add lchown.h.
2645 * lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
2646 * lib/lchown.c: Include lchown.h.
2648 1998-07-04 Jim Meyering <meyering@ascend.com>
2650 * configure.in (AM_WITH_REGEX): Remove. Now the replacement
2651 macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
2652 * acconfig.h (WITH_REGEX): Remove undef.
2653 * src/csplit.c: Remove #ifdef around <regex.h> inclusion.
2654 * src/nl.c: Likewise.
2655 * src/tac.c: Likewise.
2656 * src/csplit.c (extract_regexp): Remove #if !WITH_REGEX...#endif block.
2657 * lib/Makefile.am (noinst_HEADERS): Remove rx.h.
2658 * lib/rx.c: Remove file.
2659 * lib/rx.h: Remove file.
2661 1998-06-29 Jim Meyering <meyering@ascend.com>
2663 * src/wc.c: Update calls to human_readable -- now there's one fewer arg.
2665 * lib/Makefile.am (libtu_a_SOURCES): Add argmatch.c.
2666 (noinst_HEADERS): Add argmatch.h.
2668 1998-06-28 Jim Meyering <meyering@ascend.com>
2670 * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.
2672 1998-06-27 Jim Meyering <meyering@ascend.com>
2674 * tests/pr/Test.pm: Add two tests for double spacing.
2675 * src/pr.c (print_page): If cols_ready_to_print is zero,
2676 break out of loop just before the double-space test.
2677 Reported by Michael Stutz.
2679 1998-06-18 Jim Meyering <meyering@ascend.com>
2681 * tests/Makefile.am.in (check): Depend on $(maint_gen) so
2682 `make maintainer-clean; ./configure; make check' works.
2684 1998-05-25 Jim Meyering <meyering@ascend.com>
2686 * configure.in (_GNU_SOURCE): AC_DEFINE it here.
2687 * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section.
2688 [!_GNU_SOURCE]: Add #undef instead.
2690 1998-05-16 Jim Meyering <meyering@ascend.com>
2692 * configure.in (jm_MACROS): New wrapper macro.
2693 Remove uses of most jm_* macros.
2695 * src/tac.c (tac_seekable): Fix error in handling regex separators.
2696 * tests/tac/Test.pm (opt-b, opt-s, opt_sb, opt_r): New tests.
2697 (opt_br): New test -- exercises above-fixed bug.
2699 * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS='
2700 lines from the m4/*.m4 macros, so the hack of including some
2701 custom-replaced C source file names here is no longer needed.
2703 * acconfig.h (chown): Add undef.
2704 (D_INO_IN_DIRENT): Likewise.
2705 (D_TYPE_IN_DIRENT): Likewise.
2706 (ssize_t): Likewise.
2708 1998-05-09 Jim Meyering <meyering@ascend.com>
2710 * src/tac.c (tac_seekable): Rename from tac_stream.
2711 Change `FILE *in' parameter to `int input_fd'. Adjust callers.
2713 1998-05-03 Jim Meyering <meyering@ascend.com>
2715 * po/: Update from gettext-0.10.35.
2717 * configure.in: Remove use of AC_LINK_FILES.
2718 (AC_OUTPUT): Remove po/Makefile-generating sed command.
2720 1998-04-26 Jim Meyering <meyering@ascend.com>
2722 * tests/tail/Test.pm: Disable test f-1, now that it fails.
2724 * src/sort.c (keycompare) (CMP_WITH_IGNORE): Don't return 0 from inside
2725 the keyspec-iterating loop. With this change, test 22a passes.
2726 Reported by Zvi Har'El.
2727 (strncoll): Remove bogus assertion.
2728 * tests/sort/Test.pm: Add tests for the above fix.
2730 * configure.in: Use jm_ASSERT.
2731 * acconfig.h: Add NDEBUG.
2733 * src/cut.c: Don't define NDEBUG.
2734 * src/csplit.c: Likewise.
2735 * src/join.c: Likewise.
2736 * src/sort.c: Likewise.
2737 * src/tr.c: Likewise.
2739 * src/cut.c: Don't define _GNU_SOURCE (now it's in config.h).
2740 * src/expand.c: Likewise.
2741 * src/fold.c: Likewise.
2742 * src/join.c: Likewise.
2743 * src/sort.c: Likewise.
2744 * src/tr.c: Likewise.
2745 * src/unexpand.c: Likewise.
2746 * src/uniq.c: Likewise.
2748 * src/tail.c (close_fd): New function -- converted from macro.
2749 [struct File_spec] (n_stat_calls): New member.
2750 [struct File_spec] (n_unchanged_stats): New member.
2751 (max_n_unchanged_stats): New global.
2752 Initialize new members.
2753 (xwrite): New function -- converted from macro.
2754 [struct File_spec] (pretty_name): Remove member.
2755 (pretty_name): New function.
2757 * src/md5sum.c (md5_check): Declare local, `md5num' as _unsigned_ char*.
2758 (hex_digits): Declare parameter `s' as _unsigned_ char*.
2759 (split_3): Declare parameter `u' as _unsigned_ char**.
2761 1998-04-17 Jim Meyering <meyering@ascend.com>
2763 * src/fmt.c (check_punctuation): Used unsigned char* pointers to avoid
2765 * src/join.c (xfields): Likewise.
2767 1998-04-12 Jim Meyering <meyering@ascend.com>
2769 * src/cat.c: Use STREQ macro rather than strcmp.
2770 * src/cksum.c: Likewise.
2771 * src/comm.c: Likewise.
2772 * src/csplit.c: Likewise.
2773 * src/cut.c: Likewise.
2774 * src/fmt.c: Likewise.
2775 * src/fold.c: Likewise.
2776 * src/head.c: Likewise.
2777 * src/join.c: Likewise.
2778 * src/md5sum.c: Likewise.
2779 * src/nl.c: Likewise.
2780 * src/paste.c: Likewise.
2781 * src/pr.c: Likewise.
2782 * src/split.c: Likewise.
2783 * src/sum.c: Likewise.
2784 * src/tac.c: Likewise.
2785 * src/uniq.c: Likewise.
2786 * src/wc.c: Likewise.
2788 1998-04-11 Jim Meyering <meyering@ascend.com>
2790 * lib/safe-read.h: New file.
2791 * lib/safe-read.c: Include it.
2792 * src/cat.c: Include it instead of merely declaring safe_read.
2793 * src/csplit.c: Likewise.
2794 * src/head.c: Likewise.
2795 * src/split.c: Likewise.
2796 * src/sum.c: Likewise.
2797 * src/tac.c: Likewise.
2798 * src/tail.c: Likewise.
2799 * src/tr.c: Likewise.
2800 * src/wc.c: Likewise.
2802 * lib/Makefile.am (noinst_HEADERS): Add safe-read.h.
2804 * src/wc.c [HAVE_INTTYPES_H]: Include inttypes.h.
2805 Declare counters to be of type uintmax_t.
2806 (write_counts): Use human_readable to format potentially-long-long
2807 numbers. Suggestion from Rogier Wolff.
2808 (wc): Declare per-file counters to be of type uintmax_t.
2809 Declare bytes_read to be ssize_t.
2810 * lib/Makefile.am (libtu_a_SOURCES): Add human.c.
2811 (noinst_HEADERS): Add human.h.
2813 * lib/human.c: New file.
2814 * lib/human.h: New file.
2816 1998-04-04 Jim Meyering <meyering@eng.ascend.com>
2818 * configure.in (jm_AC_HEADER_INTTYPES_H): Use it.
2819 (jm_AC_TYPE_UINTMAX_T): Use it.
2820 (jm_PREREQ): Use it.
2822 * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
2823 know about the m4/ subdirectory.
2824 * Makefile.maint (aclocal-files): Remove now-unnecessary (with
2825 automake-1.2h and the above change) aclocal-related rules and includes.
2827 1998-04-03 Jim Meyering <meyering@eng.ascend.com>
2829 * lib/closeout.c: New file.
2830 * lib/closeout.h: New file.
2831 * lib/Makefile.am (libtu_a_SOURCES): Add closeout.c.
2832 (noinst_HEADERS): Add closeout.h.
2834 1998-03-31 Jim Meyering <meyering@eng.ascend.com>
2836 * lib/xstrtol.c: Merge with the version from fileutils.
2838 1998-03-27 Jim Meyering <meyering@eng.ascend.com>
2840 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.
2842 1998-03-23 Jim Meyering <meyering@eng.ascend.com>
2844 * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
2845 automatically handles it.
2847 1998-03-19 Jim Meyering <meyering@eng.ascend.com>
2849 * src/system.h (SCHAR_MIN): Define.
2851 od.c needs these when compiling with NCR's R2.0c C compiler.
2852 (TYPE_MAXIMUM): Cast result to `(t)' so this macro works with
2856 1998-03-15 Jim Meyering <meyering@eng.ascend.com>
2858 * src/tail.c (tail_file): Merge largely-duplicated blocks of code.
2860 1998-03-03 Paul Eggert <eggert@twinsun.com>
2862 * src/sort.c (xtmpfopen): Open temporary file exclusively, to
2863 foil a common denial-of-service attack.
2864 * src/tac.c (save_stdin): Likewise.
2866 1998-02-16 Jim Meyering <meyering@eng.ascend.com>
2868 * configure.in (jm_FUNC_LSTAT): Use it.
2869 (jm_FUNC_STAT): Use it.
2870 * lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c.
2872 1998-02-06 Jim Meyering <meyering@eng.ascend.com>
2874 * configure.in: Don't use AM_MAINTAINER_MODE or
2875 AC_PATH_PROG(PERL, perl).
2876 (jm_PERL): Use this.
2878 1998-02-04 Jim Meyering <meyering@eng.ascend.com>
2880 * tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl.
2881 (mk_script): Set to ../mk-script.
2882 (x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script.
2883 Remove @MAINT@ cruft.
2884 (Makefile.am): Likewise.
2885 Remove @MAINT@ cruft. Now `missing' will explain the failure
2886 when people don't have Perl yet modify a file whose rebuilding
2887 would lead to the use of Perl.
2889 * tests/Makefile.am (EXTRA_DIST): Add mk-script.
2890 * tests/*/mk-script.pl: Remove files.
2892 * GNUmakefile: New file.
2893 * Makefile.am (EXTRA_DIST): Add GNUmakefile.
2894 Don't include Makefile.maint from here. It's included from GNUmakefile.
2896 1998-01-30 Paul Eggert <eggert@twinsun.com>
2898 * configure.in (AC_LFS): Put before anything that can affect or use
2899 CPPFLAGS, LDFLAGS, or LIBS.
2901 1998-01-25 Jim Meyering <meyering@na-net.ornl.gov>
2903 * Makefile.maint: New file.
2904 * Makefile.am: Move rules common to textutils, fileutils, sh-utils
2905 into Makefile.maint.
2906 Include Makefile.maint.
2907 (EXTRA_DIST): Add Makefile.maint.
2909 * src/cat.c (cat): Convert comma-expressions to pairs of
2910 semicolon-terminated stmts.
2911 Add braces around compound if/else stmts.
2913 1998-01-24 Jim Meyering <meyering@na-net.ornl.gov>
2915 * src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...'
2916 as obsolescent options.
2917 Accept new option: --sleep-interval=SECONDS (-s).
2918 (parse_options): Recognize it.
2919 (usage): Describe it.
2920 (tail_forever): Use it.
2921 (dump_remainder): Use it.
2922 * tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'.
2924 * tests/cut/: Rename directory to remove `-test' suffix.
2925 * tests/join/: Likewise.
2926 * tests/md5sum/: Likewise.
2927 * tests/pr/: Likewise.
2928 * tests/sort/: Likewise.
2929 * tests/tr/: Likewise.
2930 * configure.in (AC_OUTPUT): Reflect renamings in tests/.
2931 * tests/Makefile.am (SUBDIRS): Reflect renamings in tests/.
2933 * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
2934 bug in Cray C 5.0.3.0 when T == time_t.
2936 1998-01-18 Jim Meyering <meyering@na-net.ornl.gov>
2938 * src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction,
2939 numcompare): Remove the `unsigned' from some `unsigned char*'
2940 parameter types. Add casts via UCHAR where necessary to avoid
2941 problems with unwanted sign extension. Based on a patch from
2942 Kaveh Ghazi to appease Irix4's cc compiler.
2944 1998-01-17 Jim Meyering <meyering@na-net.ornl.gov>
2946 * src/split.c (next_file_name): Rewrite. This removes an artificial
2947 limit (albeit already high, at INT_MAX :-) on the number of files
2948 split could create. Reported by Ralf W. Stephan.
2950 1998-01-16 Jim Meyering <meyering@na-net.ornl.gov>
2952 * src/sort.c (mergefps): Add braces to avoid ambiguous `else' stmt.
2953 (nls_set_fraction): Likewise.
2955 * src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
2956 for Irix-4.0.5. From Kaveh Ghazi.
2957 * configure.in: Check for langinfo.h.
2959 * lib/getline.c: Make PARAMS-defining conditionals consistent.
2960 * lib/linebuffer.h: Likewise.
2961 * lib/long-options.h: Likewise.
2962 * lib/memcasecmp.h: Likewise.
2963 * lib/xstrtod.h: Likewise.
2964 * lib/xstrtol.h: Likewise.
2965 Suggestion from Kaveh Ghazi.
2967 * tests/head/Test.pm (fail-0): Disable test. It depends on
2968 sizeof(long) being 32 bits. Reported by Kaveh Ghazi.
2970 1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
2974 * src/system.h [HAVE_LIMITS_H]: Include limits.h
2975 (TYPE_SIGNED): Define.
2976 (TYPE_MINIMUM): Define.
2977 (TYPE_MAXIMUM): Define.
2979 (SCHAR_MAX): Define.
2980 (UCHAR_MAX): Define.
2985 (ULONG_MAX): Define.
2986 * src/*.c: Remove definitions of those symbols.
2988 * src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
2989 since it now includes limit.h which defines RE_DUP_MAX.
2990 * src/nl.c: Likewise.
2991 * src/tac.c: Likewise.
2993 * lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE.
2994 Rewrite macro as function. Return a value. Update caller.
2995 Cast __ZLONG_MAX `__unsigned long int' before casting to double to
2996 avoid SunOS /bin/cc compiler bug.
2998 1998-01-08 Jim Meyering <meyering@na-net.ornl.gov>
3000 * src/tac-pipe.c: New file. But not yet used.
3001 * src/Makefile.am (EXTRA_DIST): Add tac-pipe.c.
3003 * src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer
3004 result of xrealloc (until recently it was char*).
3006 * configure.in (AC_CHECK_FUNCS): Add nl_langinfo.
3007 * src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test
3008 guarding the nls month-checking code.
3009 (nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
3010 `unsigned' from dcls of text and lim.
3011 (main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.
3013 1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
3015 * lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
3017 * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
3018 those files will be built via the ANSI2KNR-filtering rules if necessary.
3020 1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
3022 * configure.in: Remove AC_DEFINE of _GNU_SOURCE.
3023 * acconfig.h (_GNU_SOURCE): Define if not already defined.
3024 Put this code in @TOP@ section.
3025 (_GNU_SOURCE): Remove #undef.
3027 1997-12-22 Jim Meyering <meyering@na-net.ornl.gov>
3029 * configure.in: AC_DEFINE _GNU_SOURCE.
3030 * acconfig.h: Add _GNU_SOURCE.
3032 1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
3034 * configure.in (AC_CHECK_HEADERS): Add stdlib.h.
3036 * src/system.h: Merge in things from fileutils' version of this file.
3037 * src/csplit.c: s/__P/PARAMS/.
3038 * src/fmt.c: s/__P/PARAMS/.
3039 * src/od.c: s/__P/PARAMS/.
3040 * src/pr.c: s/__P/PARAMS/.
3042 1997-12-14 Jim Meyering <meyering@na-net.ornl.gov>
3044 * src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g.
3046 1997-12-13 Jim Meyering <meyering@na-net.ornl.gov>
3048 * src/fmt.c (main): Add some braces.
3049 Check return code from fclose of each input file.
3050 Close stdout and check for errors.
3052 * src/csplit.c (close_output_file): Check ferror before calling fclose.
3053 (main): Close stdout and check for errors.
3055 1997-11-15 Jim Meyering <meyering@na-net.ornl.gov>
3057 * acconfig.h: Add mktime.
3058 * configure.in (jm_FUNC_MKTIME): Use it.
3059 * lib/mktime.c: New file.
3060 * lib/Makefile.am (EXTRA_DIST): Add mktime.c
3062 * intl/Makefile.in (distclean): Don't remove libintl.h here.
3063 * Makefile.am (DISTCLEANFILES): Remove it here instead.
3065 1997-11-13 Jim Meyering <meyering@na-net.ornl.gov>
3067 * lib/strftime.c: Update from FSF.
3068 * m4/strftime.m4: Check for POSIX.2's %f format spec.
3070 1997-11-12 Jim Meyering <meyering@na-net.ornl.gov>
3072 * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define.
3073 * configure.in (AC_CHECK_FUNCS): Add mempcpy.
3075 1997-11-09 Jim Meyering <meyering@na-net.ornl.gov>
3077 * configure.in (jm_FUNC_STRFTIME): Use it.
3078 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
3079 * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
3080 (jm_FUNC_GNU_STRFTIME): Use new macro.
3081 (jm_FUNC_STRFTIME): New macro. Likewise.
3082 Reported by Noel Cragg.
3084 1997-11-08 Jim Meyering <meyering@na-net.ornl.gov>
3086 * m4/lfs.m4 (AC_LFS): New file/macro.
3087 * m4/Makefile.am (EXTRA_DIST): Add lfs.m4.
3088 * configure.in (AC_LFS): Use it.
3089 (AC_CHECK_FUNCS): Add fseeko.
3090 * src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO.
3091 (skip): Use fseeko if available. Don't use lseek; it causes
3092 the stdio stream to become out of sync with respect to the
3093 underyling file descriptor.
3096 1997-10-16 Paul Eggert <eggert@twinsun.com>
3098 * configure.in (AC_CHECK_FUNCS): Add fseeko.
3100 * src/od.c (skip): Use fseeko. Don't use lseek; it causes
3101 the stdio stream to become out of sync with respect to the
3102 underyling file descriptor.
3104 1997-11-06 Jim Meyering <meyering@na-net.ornl.gov>
3106 * src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs.
3107 We always have alloca.
3108 (keycompare): Don't use variable size arrays (it's a gcc-extension).
3109 Rewrite code that increments new lengths when not `ignoring'.
3111 1997-11-02 Jim Meyering <meyering@na-net.ornl.gov>
3113 * acconfig.h: Add malloc and realloc.
3115 * src/wc.c (main): New option, --max-line-length (-L).
3116 (wc, write_counts): Implement it.
3119 1997-10-26 Jim Meyering <meyering@na-net.ornl.gov>
3121 * lib/memcasecmp.c: Convert to upper case before comparing.
3122 This makes join -i work with sort -f.
3123 Reported by Arthur Pool.
3125 1997-10-25 Jim Meyering <meyering@na-net.ornl.gov>
3127 * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
3128 (xcalloc): #ifdef-out unused function.
3129 (xrealloc): Remove code to work around deficient versions of realloc.
3130 Now we have an autoconf-enabled replacement version.
3131 (xmalloc): Remove code to work around deficient versions of malloc.
3132 Now we have an autoconf-enabled replacement version.
3134 * lib/memcmp.c (rpl_memcmp): Rename from memcmp.
3136 * src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/.
3138 * lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL.
3140 * configure.in (jm_FUNC_MALLOC): Use it.
3141 (jm_FUNC_REALLOC): Use it.
3143 * lib/Makefile.am (EXTRA_DIST): Add malloc.c.
3144 * lib/malloc.c: New file.
3145 * m4/malloc.m4: New file.
3146 * m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
3148 * lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
3149 (EXTRA_DIST): Add realloc.c.
3150 (EXTRA_DIST): Add malloc.c.
3152 * src/system.h: Include xalloc.h.
3153 Remove dcls of xmalloc, xcalloc and xrealloc.
3155 * lib/xalloc.h: New file.
3157 * lib/xmalloc.c: Include xalloc.h.
3158 Change VOID to void.
3159 (xalloc_exit_failure): Renamed extern.
3160 (xalloc_msg_memory_exhausted): New extern.
3161 (xalloc_fail_func): New extern.
3162 (fixup_null_alloc): Use new variables.
3164 1997-10-24 Jim Meyering <meyering@na-net.ornl.gov>
3166 * src/unexpand.c: Remove old-style xmalloc and xrealloc decls.
3167 (add_tabstop): Cast first arg of xrealloc to char*.
3169 * src/sort.c: Include xalloc.h.
3170 (xmalloc): Remove function.
3171 (xrealloc): Remove function.
3172 (main): Set xalloc_fail_func to cleanup.
3173 Set xalloc_exit_failure SORT_FAILURE.
3175 * src/paste.c: Remove old-style xmalloc and xrealloc decls.
3176 (paste_parallel): Cast first arg of xrealloc to char*.
3178 * src/od.c: Remove old-style xmalloc and xrealloc decls.
3179 (decode_format_string): Cast first arg of xrealloc to char*.
3181 * src/expand.c: Remove old-style xmalloc and xrealloc decls.
3182 (add_tabstop): Cast first arg of xrealloc to char*.
3184 * lib/xalloc.h: New file.
3186 * src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
3187 (getstr): Cast xmalloc return value to char*.
3189 * src/csplit.c: Include xalloc.h.
3190 (xmalloc): Remove function.
3191 (xrealloc): Remove function.
3192 (main): Set xalloc_fail_func to cleanup.
3194 * src/*.c: Remove old-style xmalloc and xrealloc decls.
3195 * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
3196 Suggestion from Achim Blumensath.
3198 1997-10-23 Jim Meyering <meyering@na-net.ornl.gov>
3200 * Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
3202 * src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
3203 [!HAVE_DECLARATION_MALLOC]: Declare malloc.
3204 [!HAVE_DECLARATION_REALLOC]: Declare realloc.
3205 [!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
3206 [!HAVE_DECLARATION_STRSTR]: Declare strstr.
3207 * src/cat.c: Remove stpcpy dcl.
3208 * src/csplit.c: Remove malloc and realloc dcls.
3209 * src/sort.c: Remove free, malloc, and realloc dcls.
3210 * src/tac.c: Remove malloc, and realloc dcls.
3211 * src/tr.c: Remove stpcpy dcl.
3212 On some systems, strstr and stpcpy are macros, so declaring them
3213 unconditionally gets syntax errors.
3214 Reported by Mark M. Kettenis.
3216 * configure.in: Use jm_CHECK_DECLS.
3217 * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
3219 1997-10-22 Jim Meyering <meyering@na-net.ornl.gov>
3221 * m4/decl.m4: New file.
3222 * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS.
3224 1997-10-16 Paul Eggert <eggert@twinsun.com>
3226 * src/od.c (LONG_MAX): Define if not defined.
3228 1997-10-16 Jim Meyering <meyering@na-net.ornl.gov>
3230 * src/sort.c (look_for_fraction): Patch from Ørn Hansen.
3231 (getmonth): Compare the two month names only to the length of the
3232 string in the month table. Patch from Ørn Hansen.
3233 (NLS_STRNCMP): New macro.
3234 (strncoll_s2_readonly): New function.
3235 (inittables): Don't use temporary `comp' to hide type of
3236 comparator function.
3237 (nls_sort_month_comp): Declare parameters to be void* to match
3238 comparator function type required for qsort.
3239 (getmonth): Use NLS_STRNCMP rather than #ifdef.
3240 Use do-while, rather than while-loop.
3242 1997-10-14 Jim Meyering <meyering@na-net.ornl.gov>
3244 * src/sort.c (_NL_ITEM) [!defined]: Define.
3245 From from Ørn E. Hansen.
3247 * src/sort.c: Use STREQ in place of most uses of strcmp.
3248 (NLS_STRCMP): Define.
3249 (getmonth): Remove ifdef and use NLS_STRCMP instead.
3250 Use HAVE_ALLOCA, not _HAVE_ALLOCA.
3251 (zaptemp): Make parameter `const'.
3253 * tests/sort-test/Test.pm: Add tests to exercise new fraccompare.
3255 * src/sort.c (CHARS_IN_ABM): Remove definition
3256 (inittables): Remove assumption that all abbreviated month names have
3258 (getmonth): Likewise.
3259 (main): Add #if's for more efficient code when using the GNU C library.
3260 From Ulrich Drepper.
3262 * src/sort.c (strncoll): Rename parameter to LEN.
3263 (keycompare): Move assignment out of if-expression.
3265 * lib/xstrdup.c: New file.
3266 * lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c
3268 * src/sort.c: Declare xstrdup.
3269 (my_setlocale): New function.
3270 (main): Guard against failure of strdup (use xstrdup) and setlocale.
3272 * src/system.h (STREQ): Define.
3273 * src/od.c (STREQ): Remove definition.
3275 * src/sort.c (look_for_fraction): Eliminate arbitrary limit on
3276 number of `groups'. Declare as void, not int.
3277 Patch from Ørn E. Hansen.
3278 (main): When determining whether we're in the C or POSIX locale,
3279 don't rely on the form of the string returned by setlocale.
3280 Suggestion from Ulrich Drepper.
3282 1997-10-12 Jim Meyering <meyering@na-net.ornl.gov>
3284 * src/sort.c: Apply big patch from Ørn E. Hansen.
3286 (NLS_MEMCMP): Define.
3287 (keycompare): Use it instead of open-coded #ifdefs.
3288 (compare): Likewise.
3289 (NLS_MAP): Remove unused definitions.
3290 Replace with uses of UCHAR.
3291 (nls_locale_map): Remove dcl of unused file-scope array.
3293 1997-10-10 Jim Meyering <meyering@na-net.ornl.gov>
3295 * tests/sort-test/Test.pm: Add a test.
3298 1997-10-07 Jim Meyering <meyering@na-net.ornl.gov>
3300 * src/*.c: Update bug-reporting address.
3301 * src/cat.c: Indent cpp directives to reflect nesting.
3302 * src/cksum.c: Likewise.
3303 * src/csplit.c: Likewise.
3304 * src/fmt.c: Likewise.
3305 * src/nl.c: Likewise.
3306 * src/paste.c: Likewise.
3308 1997-09-27 Jim Meyering <meyering@na-net.ornl.gov>
3310 * m4/memcmp.m4: Integrate test to detect bug in memcmp from the
3311 Next x86 OpenStep C library. Test program from William Lewis.
3313 1997-09-21 Jim Meyering <meyering@na-net.ornl.gov>
3315 * src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.'
3316 (dump_hexl_mode_trailer): Rename from dump_string_trailer.
3317 Use fputs and putchar instead of trivial or %-less printfs.
3318 (decode_one_format): Parenthesize each field_width assignment in an
3319 argument list to make the side effect a little more apparent.
3320 (write_block): Use fputs and putchar instead of trivial or %-less
3322 (dump_strings): Cast string_min to off_t to avoid long-standing warning.
3324 * src/od.c: Implement new `z' (hexl-mode) modifier.
3325 [struct tspec] (trailer): New field.
3326 (field_width): Likewise.
3327 (dump_string_trailer): New function.
3328 (decode_one_format): Save each field_width in the tspec.
3329 Patch from John Kodis.
3331 1997-09-14 Jim Meyering <meyering@na-net.ornl.gov>
3333 * src/od.c (main) [--traditional]: Don't give diagnostic about there
3334 being more than three arguments if there are *no* arguments specified.
3335 Reported by Jochen Hein.
3337 1997-09-13 Jim Meyering <meyering@na-net.ornl.gov>
3339 * tests/sort-test/Test.pm: Add tests 19a and 19b.
3341 1997-07-21 Jim Meyering <meyering@na-net.ornl.gov>
3343 * src/tail.c (parse_obsolescent_option): #ifdef-out portability warning.
3345 1997-07-19 Jim Meyering <meyering@na-net.ornl.gov>
3347 * src/sort.c (checkfp): Print the `disorder' message. Include both
3348 the number and the contents of the first out-of-order line, in addition
3349 to the file name. Change meaning of return value.
3350 (check): Don't print disorder message here.
3351 Adjust test of checkfp's return value.
3352 Feature suggestion from Karl Heuer.
3354 1997-07-13 Jim Meyering <meyering@na-net.ornl.gov>
3356 * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
3357 Now, automake includes it automatically.
3359 * src/head.c: Include xstrtoul.h.
3360 Remove global variable, unit_size.
3361 (atou): Remove now-unused function.
3362 (parse_unit): Likewise.
3363 (string_to_ull): New function.
3364 (head): Take new parameter, count_lines. Use it instead of unit_size.
3366 (head_file): Likewise.
3367 (main): Use string_to_ull, not atou/parse_unit.
3368 The problem was that overflow wasn't detected, so `head -c 4096m'
3369 was treated just like `head -c 0'.
3370 Reported by Jerome Abela.
3372 * tests/wc: New directory.
3373 * tests/head: New directory.
3374 * tests/Makefile.am (SUBDIRS): Add head and wc.
3375 * configure.in (AC_OUTPUT): Add tests/head/Makefile and
3378 1997-07-05 Jim Meyering <meyering@na-net.ornl.gov>
3380 * src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
3381 a diagnostic and fail when there are two or more non-option arguments.
3383 1997-07-04 Jim Meyering <meyering@na-net.ornl.gov>
3385 * tests/tac/mk-script.pl: Redirect output of cmp to /dev/null.
3387 * configure.in (ALL_LINGUAS): Add Norwegian (no).
3389 * Makefile.am (aclocal-files): Look in source directory, not build dir.
3390 From Andreas Schwab.
3392 Sun Jun 15 06:36:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
3394 * src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the
3395 2-digit abbreviation) in each page header. Reported by Noah Friedman.
3397 Sat Jun 14 12:29:12 1997 Jim Meyering <meyering@na-net.ornl.gov>
3399 * src/cut.c (cut_fields): Detect when the input is empty and handle
3400 that special case. Before `cut -f1 < /dev/null' would improperly
3401 output a single newline. Reported by Phil Richards.
3403 Sun Apr 27 15:10:58 1997 Jim Meyering <meyering@na-net.ornl.gov>
3405 * man/Makefile.am (DISTFILES): Add $(man_MANS).
3407 * configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv).
3409 Thu Apr 3 21:14:02 1997 Jim Meyering <meyering@na-net.ornl.gov>
3411 * m4/Makefile.am (EXTRA_DIST): Update file list.
3413 * tests/cut-test/Test.pm: Add test from Phil Richards.
3415 Sat Mar 22 20:29:10 1997 Jim Meyering <meyering@na-net.ornl.gov>
3417 * missing: New file -- from the automake-1.1m distribution.
3419 Fri Mar 21 23:56:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
3421 * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
3422 (aclocal.m4): Use aclocal's new -I option.
3424 Thu Mar 13 21:46:04 1997 Jim Meyering <meyering@na-net.ornl.gov>
3426 * src/tr.c (main): Make sure c1 is not -1 before using it as an
3427 array index. Patch from Greg McGary. Although this is truly a
3428 bug, I believe it would not cause tr to misbehave on most systems.
3429 I could not construct a test case with which this bug causes tr
3430 to generate invalid output.
3432 * tests/pr-test/Test.pm: Add test that -o 0 works.
3434 * src/pr.c (main): Allow use of 0 (zero) as the margin offset
3435 argument to the -o option. Patch from Gary Anderson.
3437 Fri Feb 28 22:32:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
3439 * src/uniq.c (usage): Fix typo in --help output. From Andreas Schwab.
3441 Tue Feb 25 20:34:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
3443 * lib/Makefile.am (noinst_HEADERS): Add obstack.h.
3444 (libtu_a_SOURCES): Add obstack.c.
3446 Sun Feb 16 08:30:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
3448 * tests/Makefile.am (SUBDIRS): Add tac.
3449 * tests/tac: New directory.
3450 * configure.in (AC_OUTPUT): Add tests/tac/Makefile.
3452 * tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t,
3453 tta3-FF, ttb3-FF}: New files. Renamed (s/T/tt/) to avoid name clashes
3454 on case-independent filesystems.
3455 * tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming.
3457 * src/tail.c (parse_obsolescent_option): Reverse order of args in
3458 diagnostic. Remove `' quotes in diagnostic.
3459 (parse_options): Remove `' quotes in diagnostic.
3461 Sat Feb 8 22:43:45 1997 Jim Meyering <meyering@na-net.ornl.gov>
3463 * src/tail.c (parse_obsolescent_option): Give warning diagnostic for
3464 (but now accept) obsolescent usage with more than one file argument.
3466 Sun Feb 2 23:06:59 1997 Jim Meyering <meyering@na-net.ornl.gov>
3468 * src/join.c: Move alloca-related preprocessor code into system.h.
3469 * src/od.c: Remove alloca-related preprocessor code.
3470 * src/system.h: Add alloca-related preprocessor code.
3472 Sat Feb 1 07:21:43 1997 Jim Meyering <meyering@na-net.ornl.gov>
3474 * tests/pr-test/*: Rename files to avoid exceeding 14-character limit.
3475 * tests/pr-test/Test.pm: Reflect renamings.
3477 * tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames
3478 that exceed max-length before dying.
3480 * src/pr.c (init_parameters): For compatibility: use default
3481 separator `TAB' with full length lines. From Roland Huebner.
3483 Fri Jan 31 19:53:54 1997 Jim Meyering <meyering@na-net.ornl.gov>
3485 * src/tac.c: Rename globals buffer and buffer_size to have G_ prefix
3486 to avoid shadowing local variables.
3488 * lib/long-options.c (parse_long_options): Compare getopt_long return
3489 value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter
3490 in getopt_long call.
3492 * src/pr.c (add_line_number): Rename from `number' to avoid shadowing
3495 * src/*.c: Compare getopt_long return value against -1, not EOF.
3496 Use NULL, not `(int *) 0' as last parameter in getopt_long call.
3497 (usage): Bracket bug-reporting address with <> and append a period.
3499 Wed Jan 29 20:54:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
3501 * tests/tr-test/Test.pm: Do each test twice: get input via REDIR
3504 * tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring)
3507 * tests/pr-test/Test.pm: Remove common_option_prefix flag.
3508 (test_vector): Prepend the common option here instead.
3510 * tests/md5sum-test/Test.pm: Remove input_via_stdin flag.
3511 Do each test twice: get input via REDIR and PIPE.
3513 * tests/cut-test/Test.pm: Do each test three times.
3515 * tests/cut-test/mk-script.pl: Allow each test to be run any or all
3516 of three different ways. Program input may be specified via a file
3517 or files listed on the command line, via input redirection (if there's
3518 only one file), or via a pipe.
3520 Tue Jan 28 20:54:06 1997 Jim Meyering <meyering@na-net.ornl.gov>
3522 * tests/cut-test/mk-script.pl: Remove `t' prefix on all generated
3524 Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E).
3525 Ensure that no test file (generated or maintainer-supplied) has a
3526 name longer than 14 characters.
3528 Sun Jan 26 12:49:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
3532 * src/tail.c (parse_options): Add quotes to make messages identical.
3534 Sat Jan 25 00:12:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
3536 * src/tail.c (parse_obsolescent_option): Comment.
3537 (parse_options): Remove unnecessary goto and label.
3539 * tests/sort-test/mk-script.pl: Interpret `input arg is a hash
3540 reference' as meaning that the tested program will read no input.
3541 Most of the tests for the date program use this feature.
3542 Also for date, the generated script now reflects specification
3543 (in Test.pm) of default and per-test environment settings.
3545 * src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces.
3546 * src/fold.c: Likewise.
3547 * src/head.c: Likewise.
3548 * src/join.c: Likewise.
3549 * src/nl.c: Likewise.
3550 * src/od.c: Likewise.
3551 * src/pr.c: Likewise.
3552 * src/uniq.c: Likewise.
3554 * lib/xstrtoul.h (XSTRTOL_H): Undefine it.
3556 * lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error'
3557 only if it hasn't already been defined.
3558 (_STRTOL_ERROR): Undefine.
3560 * lib/xstrtol.c (__xstrtol): Change interpretation of
3561 VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former
3562 when any suffix is valid, the later when no suffix is allowed.
3564 Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
3566 * lib/long-options.c (parse_long_options): Reset optind to zero
3567 before just returning so that getopt internals get initialized from
3568 the probably-new parameters when/if getopt is called later.
3569 From Ulrich Drepper.
3571 Thu Jan 23 19:17:03 1997 Jim Meyering <meyering@na-net.ornl.gov>
3573 * src/tail.c (parse_obsolescent_option): Recognize and fail for
3574 more malformed obsolescent options. Makes for better diagnostics.
3576 Wed Jan 22 21:34:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
3578 * tests/Makefile.am (SUBDIRS): Add tail.
3579 * tests/tail: New directory.
3580 * configure.in (AC_OUTPUT): Add tests/tail/Makefile.
3582 * src/tail.c (parse_options): New function.
3583 (parse_obsolescent_option): New function.
3584 (main): Use the new functions instead of open-coding them.
3585 This better fixes the bug in handling obsolescent `+Nc' options.
3588 Tue Jan 21 22:49:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
3590 * src/tail.c (main): Properly handle what the POSIX spec calls
3591 the `obsolescent' usage (e.g., tail +2c). It didn't work.
3592 Reported by Karl Heuer.
3594 Sun Jan 12 22:13:27 1997 Jim Meyering <meyering@na-net.ornl.gov>
3596 * tests/tr-test/Test.pm: Rename tests so that the associated files
3597 have names that are distinct even on filesystems on which file
3598 names are case insensitive.
3599 Reported by Fred Fish.
3600 * tests/cut-test/Test.pm: Likewise.
3602 * tests/tr-test/Makefile.am: Regenerated to reflect renamed tests.
3603 * tests/cut-test/Makefile.am: Likewise.
3605 Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
3609 * lib/getopt.c (_getopt_internal): Use `_', rather than the
3610 (sometimes-)expansion `gettext'.
3612 Tue Jan 7 22:50:13 1997 Jim Meyering <meyering@na-net.ornl.gov>
3614 * lib/getopt.c: New (more POSIX compliant) version from GNU libc.
3615 [_]: Define to gettext also if ENABLE_NLS is defined.
3618 Thu Jan 2 21:17:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
3620 * src/pr.c (init_fps): Initialize lines_stored field in three places.
3621 This avoids uninitialized memory reads in close_file.
3623 Wed Jan 1 17:32:18 1997 Jim Meyering <meyering@na-net.ornl.gov>
3625 * configure.in (AC_ARG_PROGRAM): Remove explicit use.
3626 It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart.
3628 Sun Dec 29 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
3630 * src/pr.c (init_header): Plug a small memory leak by using stack
3631 rather than heap for a 15-byte temporary buffer.
3633 Sat Dec 28 00:03:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
3635 * src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed
3637 (POS_AFTER_TAB): Renamed from pos_after_tab. Define in terms of
3638 TAB_WIDTH rather than duplicating the expression.
3640 Fri Dec 27 17:29:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
3642 * tests/join-test/mk-script.pl: Fix a couple of thinkos and typos.
3643 Now it works with pr's tests, too.
3645 * tests/pr-test/Makefile.am (explicit): Regenerate list of files,
3646 this time with duplicates removed.
3648 * src/pr.c (usage): Break long string literal into two separate
3649 printf statements to accomodate default maximum of 2048 characters
3650 for Irix-4.0.5. Reported by Kaveh Ghazi.
3652 * Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
3654 * tests/Makefile.am (SUBDIRS): Add pr-test.
3656 * configure.in: AC_REQUIRE version 2.12 of autoconf.
3657 AC_OUTPUT: Add tests/pr-test/Makefile.
3659 Sun Dec 22 08:11:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
3661 * acinclude.m4: Move macros to individual files in new directory, m4/.
3662 See ChangeLog entries in sh-utils for the details.
3664 * configure.in: Increment version to 1.20a.
3666 * tests/md5sum-test/Makefile.am: Use same framework as other tests.
3667 * tests/md5sum-test/Test.pm: New file.
3669 Sat Dec 21 20:32:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
3671 * tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in.
3673 * tests/Makefile.am.in: New file.
3675 * tests/sort-test/Makefile.am: Clone the Makefile.am from join-test.
3676 Replace only the definition of $x and the auto-generated lists of
3678 * tests/cut-test/Makefile.am: Likewise.
3679 * tests/tr-test/Makefile.am: Likewise.
3681 * tests/join-test/Makefile.am: Add @MAINT@-protected rule for
3682 verifying that Makefile.am is consistent with Test.pm.
3684 Fri Dec 20 00:08:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
3686 * tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1)
3687 and $(in2), not $(in).
3689 * tests/join-test/mk-script.pl: New option: --list.
3690 Generate lists of files used/generated.
3692 Thu Dec 19 23:28:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
3694 * tests/join-test/mk-script.pl: Rewrite to be more general -- so
3695 it can be used for join, cut, sort, tr, and soon, pr test suites.
3696 * tests/tr-test/mk-script.pl: Symlink through CVS repo to join's
3698 * tests/sort-test/mk-script.pl: Likewise.
3699 * tests/cut-test/mk-script.pl: Likewise.
3701 * tests/tr-test/Test.pm: Adapted for new mk-script.pl.
3702 * tests/join-test/Test.pm: Likewise.
3704 Tue Dec 17 16:48:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
3706 * tests/join-test/Makefile.am (.pl): Make generated file read-only so
3707 I don't accidentally modify it instead of the one with the .pl suffix.
3709 * acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than
3710 now-obsolete AC_C_CROSS.
3711 (jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one
3712 since there's nothing GNU-specific about the replacement. Contrast
3713 with gnu_ prefix added to strftime.
3714 (jm_FUNC_MEMCMP): New macro.
3715 * configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP.
3716 * acconfig.h: Add memcmp.
3717 * README: Remove warning about memcmp. The new macro handles it.
3719 Mon Dec 16 23:03:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
3721 * tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment.
3723 (AUTOMAKE_OPTIONS): Likewise.
3725 Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
3727 * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
3728 name for cross compiling.
3729 Remove definitions of gettext-related macros. The gettext
3730 installation procedure installs corresponding .m4 files so that
3731 aclocal will use them.
3733 1996-12-12 Paul Eggert <eggert@twinsun.com>
3735 * system.h (ISDIGIT): Replace with smaller, faster edition
3736 that yields nonzero only on ASCII digits.
3737 (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
3740 * tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of
3741 ISDIGIT to test for characters in CC_DIGIT class.
3743 * sort.c (digits): Remove; subsumed by new ISDIGIT.
3744 (inittables): Remove initialization of `digits'.
3745 (fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
3746 (fraccompare, numcompare): Avoid casts to unsigned char that are no
3749 * csplit.c (get_format_width, get_format_prec): Avoid
3750 unnecessary comparison of digit to '\0'.
3752 Thu Dec 12 23:42:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
3754 * src/sort.c (usage): Clarify description of -u option.
3757 Wed Dec 11 19:32:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
3761 Tue Dec 10 00:15:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
3763 The file name, `build-script.pl' is longer than 14 characters.
3765 * tests/cut-test/mk-script.pl: Rename from build-script.pl.
3766 * tests/cut-test/Makefile.am: Reflect renaming.
3767 * tests/tr-test/mk-script.pl: Rename from build-script.pl.
3768 * tests/tr-test/Makefile.am: Reflect renaming.
3769 * tests/sort-test/mk-script.pl: Rename from build-script.pl.
3770 * tests/sort-test/Makefile.am: Reflect renaming.
3771 * tests/join-test/mk-script.pl: Rename from build-script.pl.
3772 * tests/join-test/Makefile.am: Reflect renaming.
3773 Reported by Karl Heuer.
3775 * configure.in (VERSION): Bump to 1.19r.
3776 (AC_ISC_POSIX): Remove kludgy macro.
3777 Use this test instead:
3778 (LIBS): Add -lcposix if it contains strerror.
3779 Patch from Karl Heuer.
3781 Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
3783 =========== Update for automake-1.1k.
3784 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
3785 * configure.in (AM_CONFIG_HEADER): Use it.
3786 (AC_OUTPUT): Remove stamp-h timestamping statement.
3787 Now, AM_CONFIG_HEADER does it automatically.
3788 * lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
3789 new automake requirement.
3790 Rename tu_* variables to libtu_a_*.
3792 Wed Dec 4 21:03:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
3794 * src/pr.c: Apply big patch from Roland Huebner.
3796 * src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
3797 [:upper:] to [:upper:] and [:lower:] to [:lower:].
3798 (main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
3799 the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
3801 (class_ok): Update table to reflect that tr now allows these
3802 identity mappings. Suggestion from Risto Kankkunen.
3804 Thu Nov 28 00:31:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
3806 * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
3807 for gettext-0.10.25.
3809 Tue Nov 26 23:05:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
3811 * src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
3812 to avoid new warning from gcc.
3814 Sun Nov 24 21:02:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
3816 * tests/sort-test/Makefile.am (t): Add names of those 5 tests.
3818 * tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.
3820 * src/sort.c (set_ordering): Revert 1994-05-04 change to this function
3821 so that blanks are not unconditionally ignored when computing start
3822 and end positions for numeric keys with explicit character offsets.
3823 Reported by Markus Demleitner.
3825 Sat Nov 23 16:07:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
3827 * cat.c (usage): Alphabetize option descriptions the way sort -f would.
3828 * fmt.c (usage): Likewise.
3829 * join.c (usage): Likewise.
3830 * md5sum.c (usage): Likewise.
3831 * od.c (usage): Likewise.
3832 * pr.c (usage): Likewise.
3833 * sort.c (usage): Likewise.
3834 * split.c (usage): Likewise.
3835 * wc.c (usage): Likewise.
3838 Fri Nov 22 20:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
3840 * src/csplit.c (process_regexp): Update CURRENT_LINE only if
3841 the new value would be larger. This avoids the infinite loop
3842 otherwise provoked by situations like this:
3843 printf "\na\n" | csplit - '/a/-1' '{*}'
3846 Tue Nov 19 23:16:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
3848 * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
3851 Sat Nov 2 08:50:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
3853 * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
3854 Otherwise, the generated info files have names longer than
3855 the 14-byte max of some old systems.
3856 Reported by Karl Heuer.
3858 Fri Nov 1 21:33:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
3860 * lib/strtol.c: Update from GNU libc.
3862 * tests/sort-test/Test.pm: Add a test to exercize this fix.
3864 * src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
3865 (checkfp): Fix off-by-one error that resulted in writing one byte
3866 beyond the end of a malloc'd buffer. It caused `sort -c' to segfault
3867 on Linux systems having a relatively recent libc. Before, running
3868 the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
3869 would provoke the memory overrun (though not necessarily the failure).
3871 Reported by Risto Kankkunen.
3873 Thu Oct 31 17:48:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
3875 * src/sort.c (key_init): New function.
3876 (main): Use key_init in the two places where it was open-coded.
3877 This fixes a UMR of the general_numeric field.
3879 * src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
3880 This avoids a spurious UMR report from purify.
3881 (prjoin): Add an assertion.
3882 (add_field): Update assertion.
3884 * src/tr.c (es_free): New function.
3885 (parse_str): Use it to plug a small memory leak.
3887 Wed Oct 23 22:02:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
3889 * lib/md5.c: Update from GNU libc.
3890 * lib/md5.h: Update from GNU libc.
3892 Mon Oct 21 16:48:12 1996 Jim Meyering <meyering@na-net.ornl.gov>
3894 * src/tr.c (validate): Remove TAB from diagnostic, for consistency.
3896 Sun Oct 20 13:44:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
3898 * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
3900 * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
3901 (EXTRA_DIST): Remove.
3903 * configure.in: Remove README_ALPHA related code. Automake takes
3904 care of it automatically now when in gnits mode.
3906 * lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
3907 doing arithmetic with it.
3909 Sat Oct 19 23:13:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
3911 * lib/md5.c: Update from GNU libc.
3912 * lib/md5.h: Update from GNU libc.
3914 Fri Oct 18 00:08:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
3916 * configure.in (AC_OUTPUT): Add tests/join-test/Makefile.
3918 * tests/Makefile.am (SUBDIRS): Add join-test.
3920 Tue Oct 15 23:25:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
3922 * src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
3924 (main): Write separate loops to initialize mapping for lower->upper
3925 and upper->lower conversion.
3926 Reported by Arne Henrik Juul.
3928 Sun Oct 13 12:52:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
3930 * lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
3931 Before, e.g., `split -b 1M' would be silently accepted and treated
3932 like `split -b 1'. Reported by Franc,ois.
3934 * src/split.c (usage): Remove parameter, REASON.
3935 (main): Update callers to use combination of error (0, 0, ... and
3936 usage (EXIT_FAILURE).
3937 (main): When a string operand cannot be converted to a number of
3938 bytes or lines, include that string in the diagnostic.
3940 Sat Oct 12 00:05:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
3942 * configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.
3944 * lib/Makefile.am (EXTRA_DIST): Remove.
3946 Thu Oct 10 23:41:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
3948 * lib/md5.c (md5_stream): Apply fix from Ralph Loader
3949 <loader@maths.ox.ac.uk> via Ulrich Drepper.
3951 Wed Oct 9 07:26:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
3953 * lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).
3955 Tue Oct 8 21:32:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
3957 * lib/error.c: Include error.h to align with libit --
3958 under protest, François :-).
3960 Sun Oct 6 08:02:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
3962 * acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
3963 AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
3964 They're included in automake-1.1f.
3966 * configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
3969 Sat Oct 5 12:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
3971 * lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
3974 Fri Oct 4 07:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
3976 * configure.in (GNU_PACKAGE): New variable.
3977 (PACKAGE_VERSION): Remove it.
3979 * acconfig.h (GNU_PACKAGE): New variable.
3980 (PACKAGE_VERSION): Remove now-unused variable.
3982 * lib/long-options.c (parse_long_options): Separate package name
3983 and version number to accomodate new --version output requirement.
3984 * lib/long-options.h: Update prototype.
3986 Thu Oct 3 23:27:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
3988 * src/md5sum.c (main): Remove dead code that used to print --version
3991 Tue Oct 1 06:54:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
3993 * configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
3994 * src/Makefile.am (sort_LDADD): Use any library (-lm) that
3995 gets substituted for @POW_LIBM@.
3997 * tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.
3999 Mon Sep 30 23:35:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
4001 * tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.
4003 * acinclude.m4: Update definitions from gettext-0.24.
4005 Sun Sep 29 20:04:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
4007 * tests/sort-test/build-script.pl: Die if close fails.
4008 * tests/tr-test/build-script.pl: Likewise.
4010 * configure.in (AC_OUTPUT): Add tests/cut-test/Makefile.
4011 * tests/Makefile.am (SUBDIRS): Add cut-test.
4012 * tests/cut-test: New directory.
4014 Fri Sep 27 22:22:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
4016 * configure.in (ALL_LINGUAS): Add spanish (es).
4018 Thu Sep 26 21:02:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
4020 * src/md5sum.c (usage): Remove references in --help output to
4021 the now-deprecated --string option. Support for it will be
4022 removed soon. Using this option can provoke a memory access
4023 violation on some systems because of (unavoidable in an efficient
4024 implementation) alignment assumptions made by functions in md5.c.
4025 md5sum.c could leave the option in and accomodate the alignment
4026 restriction, but this option was intended solely for testing, and
4027 the tests are now all file-oriented, so it's not necessary.
4029 * tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.
4031 Wed Sep 25 21:43:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
4033 * tests/sort-test/Makefile.am (t): Factor out .in suffix.
4034 Include new test: t16a.
4035 * tests/tr-test/Makefile.am (t): Likewise.
4037 * src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc.
4039 Mon Sep 23 10:00:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
4041 * tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS).
4043 Sun Sep 22 09:24:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
4045 * src/sort.c (keycompare): Declare translate to be unsigned char *.
4046 Otherwise, sign extension caused misordering when using e.g. -f.
4047 Reported by Erick Branderhorst.
4048 * tests/sort-test/Test.pm: Add Erick's test for that fix.
4050 * tests/Makefile.am (SUBDIRS): Add md5sum-test.
4052 Sat Sep 21 13:34:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
4054 * src/Makefile.am (check): Remove tests for md5sum.
4055 * tests/md5sum-test: New directory. Put them here instead.
4056 * configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile.
4058 Thu Sep 19 08:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
4060 * tests/: Rename from checks.
4061 * Makefile.am (SUBDIRS): Change `checks' to `tests'.
4062 * configure.in (AC_OUTPUT): Likewise.
4064 * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
4065 AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
4067 Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
4069 * Makefile.am (EXTRA_DIST): Remove acinclude.m4.
4071 Thu Sep 12 17:05:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
4073 * lib/Makefile.am (EXTRA_DIST): Add getline.c.
4074 (tu_SOURCES): Remove getline.c
4077 Sun Sep 8 13:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
4079 * checks/sort-test/build-script.pl: Prefix $in with \$srcdir/
4080 so make check works with VPATH build. From Uli Drepper.
4082 Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
4084 * src/system.h: Add comments justifying IS* versions of ctype.h macros.
4086 * src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct.
4087 (get_line): Use ISSPACE instead of isspace. From Bruno Haible.
4089 Mon Sep 2 10:34:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
4091 * src/*.c (usage): Tell where to report bugs.
4093 Sun Aug 25 22:50:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
4095 * checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
4096 ($x-tests): Guard dependencies with @MAINT@.
4097 * checks/tr-test/Makefile.am: Likewise.
4099 Sat Aug 24 14:25:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
4101 * src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.
4103 Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
4105 * configure.in (ALL_LINGUAS): Add polish (pl).
4107 Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
4109 * configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
4110 * checks/Makefile.am (SUBDIRS): Add sort-test.
4112 Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
4114 * Makefile.am (EXTRA_DIST): Add acinclude.m4.
4116 Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
4118 * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
4119 Automake includes them automatically.
4121 * configure.in (AM_INIT_AUTOMAKE): Use it.
4122 (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
4123 (AC_PROG_MAKE_SET): Likewise.
4125 Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov>
4127 * configure.in: Rename a few macros for automake-1.1c.
4128 (AC_REPLACE_GNU_GETOPT): Remove.
4129 (AC_PATH_PROG): Find perl -- needed only for checks if you
4130 change or remove things with e.g. make maintainerclean.
4133 * lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX
4134 adds .o files to @LIBOBJ@.
4135 (tu_SOURCES): Add getopt.c and getopt1.c.
4136 (EXTRA_DIST): Remove getopt.c and getopt1.c.
4138 * acinclude.m4: New file -- derived from aclocal.m4.
4139 * aclocal.m4: This file is now generated by the aclocal program
4140 (which comes with the automake package.)
4142 Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
4144 * checks/: New directory.
4145 * checks/Makefile.am: New file.
4146 * configure.in (AC_OUTPUT): Add new directories: checks,
4148 * Makefile.am (SUBDIRS): Likewise.
4150 Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
4152 * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
4153 redefinition warnings on solaris.
4154 (textdomain) [!ENABLE_NLS]: Likewise.
4156 Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov>
4158 * src/unexpand.c (unexpand): Move EOF check to follow code that
4159 processes and generates output for pending spaces. Before
4160 `printf ' ' |unexpand -t 1,2' generated no output.
4162 * src/md5sum.c (md5_check): Remove parameter, BINARY.
4163 Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
4164 from the input stream rather than the one from the command line.
4165 (main): Fail with a diagnostic if --binary or --text is specified
4166 when verifying checksums.
4167 Reported by Eli Zaretskii <eliz@is.elta.co.il>.
4169 Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
4171 * configure.in: Add check for error_at_line so systems with
4172 GNU libc don't compile and link with distributed error.c.
4173 * lib/Makefile.am (tu_SOURCES): Remove error.c.
4174 (EXTRA_DIST): Add error.c.
4176 * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
4177 Add related check for the getdelim function.
4178 From Ulrich Drepper -- as done in gettext.
4180 Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
4182 * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
4183 separate PACKAGE and VERSION.
4185 * aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from
4186 macros from Bruno Haible and from Cygnus.
4187 * configure.in (AM_SANITY_CHECK_CC): Use it.
4189 Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
4191 * install-sh: Get version with MIT copyright.
4193 Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
4195 * aclocal.m4 (fp_C_PROTOTYPES): Improved version from
4197 Update all other macros to reference $fp_cv_prog_cc_stdc, rather
4198 than $ac_cv_prog_cc_stdc.
4200 * src/od.c (OFF_T_MAX): Remove definition.
4201 (main): Compare against LONG_MAX rather than OFF_T_MAX.
4203 Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
4205 * Many files: Update FSF address.
4207 Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
4209 * src/unexpand.c (unexpand): Fix bug that contributed to endless loop
4210 when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not
4211 tab_index in inner flush_pend: while loop. From Keith Owens
4212 <kaos@audio.apana.org.au>.
4214 * src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
4215 [!INT_MAX]: Define it.
4216 (main): Append INT_MAX to command-line-specified tab list to
4217 ensure termination in unexpand's inner loop.
4218 Derived from a patch from Keith Owens.
4220 Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
4224 * configure.in (VERSION): Bump to 1.19.
4226 Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
4228 * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
4229 so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
4230 those options on that system, sys/stat.h gets compile errors.
4231 With help from Marcus Daniels.
4233 * getopt.c: Update from gettext-0.10.23.
4234 * getopt1.c: Likewise.
4235 * getopt.h: Likewise.
4237 Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
4239 * src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
4240 so the left operand of the << isn't signed.
4241 From Kjetil Torgrim Homme.
4243 * po/Makefile.in.in (install-data): Don't install NLS files when
4244 they're not requested. From Ulrich Drepper. Reported by
4245 Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
4247 Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
4249 * po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
4250 * ABOUT-NLS: Likewise.
4252 * aclocal.m4: Likewise.
4254 Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
4256 * src/uniq.c (usage): Remove space before newline in usage message.
4258 * src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
4259 [NEWLINE_REPLACEMENT_STRING*]: Remove macros.
4260 (main): Output a leading backslash for a line describing a file
4261 whose name contains a newline. Then translate each NEWLINE byte
4262 in the file name to the string, "\\n", and each backslash to "\\\\".
4263 File names that don't contain NEWLINE aren't translated.
4264 (split_3): Rewrite to handle file names with embedded newlines.
4265 Miles Bader and Jim Blandy suggested this new encoding scheme.
4267 * src/md5sum.c (md5_file): Replace obsolete comment with a description
4269 (md5_check): Don't use "s"-adding trick to form the plural of
4270 `checksum.' That doesn't work well with translation.
4271 Suggestions from Ulrich Drepper.
4272 (split_3): Add missing semicolon so it compiles. From Jim Blandy.
4274 Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
4276 * src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
4277 fact that leading blanks may be stripped.
4279 Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
4281 * configure.in (ALL_LINGUAS): Add dutch (nl).
4283 Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
4285 * src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
4286 (split_3): Translate NL bytes not to NUL, but to
4287 NEWLINE_REPLACEMENT_STRING.
4288 Suggested by Ulrich Drepper.
4289 (main): Translate back to NL-containing filename.
4291 Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
4293 * src/md5sum.c (split_3): Take an additional parameter, S_LEN.
4295 Map translated NEWLINE-containing filename back into the original
4296 NEWLINE-containing name.
4297 (md5_check): Translate NEWLINE bytes to NUL bytes in filename.
4299 Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
4301 * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
4302 appears in the output of --version. Reported by RMS.
4304 Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
4306 * src/Makefile.am (LDADD): Remove sort-specific hack to link
4308 * aclocal.m4 (AM_FUNC_STRTOD): New macro.
4309 * configure.in (AM_FUNC_STRTOD): Use it.
4310 (AC_REPLACE_FUNCS): Remove strtod.
4311 Suggested by Tom Tromey.
4313 * po/Makefile.in.in (install-data): Add `else true;' to avoid
4314 letting failing if-condition cause make failure.
4315 From Fred Fish (fnf@ninemoons.com).
4317 Tue Jun 25 21:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
4321 Tue Jun 18 20:43:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
4323 * aclocal.m4: Update from gettext-0.10.20.
4324 * ABOUT-NLS: Likewise.
4327 Thu Jun 13 22:31:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
4329 * configure.in (VERSION): Bump to 1.18a.
4331 * po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
4332 Depend on POTFILES only when using maintainer mode.
4334 * intl/*: Update from gettext-0.10.18.
4336 Tue Jun 11 23:32:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
4340 * po/Makefile.in.in: Update from gettext-0.10.17.
4342 * ABOUT-NLS: Likewise.
4344 Mon Jun 10 18:22:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
4346 * Makefile.am (cvs-dist): Use -c option in cvs tag command.
4348 Fri Jun 7 22:06:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
4350 * configure.in (VERSION): Set to 1.18.
4352 * src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
4353 the strtod supplied with this package. Otherwise, linking failed on
4354 Solaris-2.4 systems. Reported by Wayne Stewart <wstewa@atl.com>.
4356 Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
4358 * po/Makefile.in.in: Update from gettext-0.10.16.
4360 * ABOUT-NLS: Likewise.
4361 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
4362 gettext-related ones.
4363 Update from gettext-0.10.16.
4365 Fri May 31 22:04:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
4369 * Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
4372 Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
4376 * tail.c (main): Interpret the old-style +VALUE and -VALUE options
4377 like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
4378 suffix multipliers. This makes the code consistent with --help
4379 output. Reported by Karl Heuer.
4381 * sort.c (limfield): #ifdef-out a block of code that makes
4382 GNU sort incompatible with Unix sort when a key-end spec refers
4383 to the N'th character in a field that has fewer than N characters.
4384 The POSIX spec doesn't appear to specify behavior for this case.
4387 * po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
4388 longer than 14 characters.
4389 (mostlyclean): Likewise.
4392 * po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
4393 when using maintainer mode. Reported by Karl Heuer.
4395 * po/Makefile.in.in (.po.mo): Reenable dependency and rule.
4396 It is required when using native NLS, e.g. on Solaris.
4397 From Marcus Daniels.
4399 * od.c (decode_one_format): Use %lu (not %d) printf format
4400 corresponding to unsigned long, SIZE.
4404 * intl/Makefile.in (installcheck): New target.
4405 * po/Makefile.in.in (installcheck): New target.
4407 * od.c (decode_one_format): Take another parameter.
4408 Give a specific diagnostic for invalid format spec here rather
4409 than an overly general one from caller's caller.
4410 (decode_format_string): Update caller.
4411 (main): Don't give diagnostic here when decode_format_string fails.
4412 Remove assertions that could fail on some Crays because they don't
4413 have a two-byte type.
4414 Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
4416 Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
4418 * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
4419 less portable fileno (stdin) and fileno (stdout).
4420 * sort.c (main): Use STDIN_FILENO instead of less portable
4423 Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
4425 * Makefile.am (distcheck): Remove target and rule -- automake-0.33
4426 adds it automatically.
4428 Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov)
4430 * configure.in (LINGUAS): Add ko.
4431 * Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
4433 Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
4435 * Makefile.am (distcheck): New target. From Gord Matzigkeit.
4437 Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
4439 * po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise
4440 they won't be built and install could fail. From Ulrich Drepper.
4441 (.po.mo): Disable dependency and rule when not in maintainer mode.
4443 * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
4444 on whether we're using GNU gettext. From Ulrich Drepper.
4446 Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
4448 * intl/Makefile.in (distdir): Renamed from dist. For compatibility
4450 * po/Makefile.in.in (distdir): Likewise.
4452 * po/Makefile.in.in (all-yes): Depend on GMOFILES.
4453 Depend on CATALOGS and GMOFILES files only in maintainer mode.
4455 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
4457 * configure.in: Require autoconf-2.10.
4459 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
4460 * configure.in (jm_MAINTAINER_MODE): Use it.
4462 Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov)
4464 * configure.in (LINGUAS): Add de.
4465 * po/de.po: New file.
4467 * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
4468 * regex.c [IN_CTYPE_DOMAIN]: Likewise.
4469 * system.h [IN_CTYPE_DOMAIN]: Likewise.
4471 Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
4473 * fmt.c (copy_rest): Don't copy past end of prefix. Output
4474 trailing spaces if the prefix had any. Before, fmt would
4475 improperly output NUL bytes. The command
4476 perl -e 'print "| S";' |fmt -p' | '|tr '\0' @
4477 output `|@S'. Reported by François Pinard.
4479 * sort.c (main): Give a better diagnostic for `sort -0'.
4480 Reported by Karl Berry.
4482 * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
4483 Otherwise, some systems lose because the value AC_C_INLINE choses
4484 with plain `cc' is different from that chosen when using the ANSI-mode
4485 C compiler. From Kaveh Ghazi.
4487 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
4489 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
4490 * configure.in: Use it.
4491 * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
4492 (EXTRA_DIST): Add getopt.c and getopt1.c
4494 * src/*.c, src/*.h: Update Copyright years to include 1996.
4496 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
4498 * getline.c: New version from gettext-0.10.12.
4499 * getline.h: Likewise.
4500 * configure.in (AC_CHECK_FUNCS): Add getdelim.
4501 Suggested by Ulrich Drepper.
4503 * md5sum.c (md5_check): Remove spurious newline at end of error
4506 * od.c (decode_one_format): Use printf's L modifier for long doubles,
4507 not `l'. From Eric Backus.
4509 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
4511 * od.c: Include <values.h>.
4512 [!BITSPERBYTE]: Define.
4513 [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
4514 * configure.in (AC_CHECK_HEADERS): Add values.h.
4516 Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov)
4518 * Makefile.am (cvs-dist): New rule. Based on the one from
4519 Tom Tromey's automake.
4521 Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
4523 * tail.c (main): Make code clearer: use new variable `n_files' in
4524 place of `argc - optind'. Use `file' instead of `argv + optind'.
4526 Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
4528 * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
4531 * memcasecmp.c: Unprotoize.
4535 * join.c (decode_field_spec): Rename local variable `valid'
4536 to invalid (and reverse sense) to avoid conflict with the
4537 macro definition in /usr/include/locale.h on SunOS 4.1.3.
4539 Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
4541 * uniq.c: Add new option --ignore-case (-i).
4542 Include memcasecmp.h.
4543 (different): Compare with memcasecmp if ignoring case.
4546 * join.c (memcasecmp): Remove static definition of function.
4547 Include memcasecmp.h instead.
4549 * memcasecmp.c: New file.
4550 * memcasecmp.h: New file.
4551 * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
4552 (noinst_HEADERS): Add memcasecmp.h.
4554 Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov)
4556 * tr.c: The following commands all failed unnecessarily.
4557 tr -cs '[:upper:]' '[X*]'
4558 tr -dcs '[:lower:]' n-rs-z
4559 tr -ds '[:xdigit:]' [:alnum:]'
4560 tr -dcs '[:alnum:]' [:digit:]'
4562 Reported by Ross Ridge (ross@worf.mks.com).
4563 (validate): Add missing conjunct (translating) in test for
4564 `translating and complementing character classes' error. Before,
4565 valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
4566 (homogeneous_spec_list): New function.
4567 (validate): Use it to relax the old (overly restrictive) restriction
4568 that prohibited use of complemented character classes when translating.
4569 Now, that is allowed as long as the translation maps many to one.
4570 (get_spec_stats): Rename and redefine global has_char_class from
4573 Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
4575 * aclocal.m4: Update NLS macros from gettext-0.10.11.
4577 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
4578 when srcdir != builddir. From Kaveh Ghazi.
4580 Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov)
4582 * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
4583 to be POSIX compliant. From Stephen Gildea <gildea@x.org>.
4585 Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
4587 * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
4588 * od.c (skip, main): Likewise.
4589 * tr.c (main): Likewise.
4591 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
4592 join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
4593 tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
4594 EXIT_FAILURE, rather than 0 or 1.
4596 Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
4598 * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
4599 is defined to zero. Suggested by Paul Eggert.
4601 * sort.c [SORT_FAILURE]: New macro.
4602 Be careful to exit with 1 only when -c is used and the
4603 input is not properly sorted. In all other cases, use
4604 SORT_FAILURE as required by POSIX.
4605 (main): Change some `error (1, ...' to use SORT_FAILURE.
4606 Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
4607 Replace all uses of `2' (as exit code) with SORT_FAILURE.
4609 Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov)
4611 * csplit.c: Include assert.h, but disable assertions.
4612 (process_line_count): Replace if-abort with a slightly relaxed
4613 assertion. Before, `echo |csplit - 1 1' would abort.
4614 Reported by Samuli.Karkkainen@hut.fi.
4615 (parse_patterns): Disallow uses like `csplit FILE 0' with zero
4616 line number, `csplit FILE 2 1' with decreasing line numbers, and
4617 warn about uses like `csplit FILE 3 3' that have equal line numbers.
4619 * sort.c (main): Declare to be of type int, not void.
4620 From Peter Seebach <seebs@taniemarie.solon.com>.
4621 * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
4622 nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
4623 wc.c (main): Likewise.
4625 Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
4627 * configure.in (PACKAGE_VERSION): New macro.
4628 * acconfig.h (PACKAGE_VERSION): Add it.
4629 * src/Makefile.am: Remove rules for generating version.c.
4630 Remove references to version.o, version.h, and stamp-v.
4631 * version.c: Remove file.
4632 * version.h: Remove file.
4633 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
4634 head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
4635 sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
4637 (main): Use PACKAGE_VERSION instead of version_string.
4639 Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
4641 * sort.c (write_bytes): Renamed from xfwrite.
4642 Remove SIZE parameter. It was always 1. Update all callers.
4643 Rename NELEM parameter to N_BYTES and change its type to size_t.
4645 Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
4647 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
4648 fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
4649 split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
4650 Initialize for internationalized message support: call setlocale,
4651 bindtextdomain, and textdomain.
4652 * system.h: Add definitions and includes for NLS.
4653 * Makefile.am (SUBDIRS): Add intl and po.
4654 * src/Makefile.am (datadir): Define.
4655 (localedir): Define.
4656 (DEFS): Add LOCALEDIR definition.
4657 (LDADD): Add @INTLLIBS@.
4658 * aclocal.m4: Add NLS-related macro definitions from
4659 gettext distribution.
4660 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
4661 HAVE_STPCPY): New macros.
4662 Add PACKAGE and VERSION.
4663 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
4664 (VERSION): Likewise.
4665 (ALL_LINGUAS): Define.
4666 (AC_CHECK_HEADERS): Add float.h.
4667 (ud_GNU_GETTEXT): Use it.
4669 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
4671 From François Pinard.
4673 * tr.c (star_digits_closebracket): Declare formal param, IDX,
4674 and local I to be of type size_t (rather than int) to avoid
4675 warnings from gcc -Wall.
4677 Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
4679 * src/Makefile.am: Adapt for automake-0.30.
4680 (noinst_HEADERS): Rename from HEADERS.
4681 (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
4682 to DEFS automatically.
4683 * lib/Makefile.am (noinst_HEADERS): Rename from HEADERS.
4685 Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
4687 * join.c (xfields) [without -t]: Ignore leading blanks.
4688 From David Dyck (dcd@tc.fluke.COM).
4690 Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
4692 * join.c [TOLOWER]: Define.
4693 (usage): Briefly describe new --ignore-case (-i) option.
4694 (memcasecmp): New function.
4695 (main): Set IGNORE_CASE for -i.
4696 (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
4697 Suggestion and an initial patch from Alberto Accomazzi
4698 <alberto@cfa0.harvard.edu>.
4700 Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
4702 * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
4703 (usage): Describe it.
4704 (main): Set eolchar to 0 for -z.
4705 From Mark W. Eichin <eichin@cygnus.com>.
4707 Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
4709 * join.c (main): Mark two strings for translation.
4710 * md5sum.c (md5_check): Mark a string for translation.
4711 From François Pinard.
4713 Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
4715 Update for automake-0.29.
4716 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
4717 * src/Makefile.am: Likewise.
4718 * lib/Makefile.am: Likewise.
4719 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
4720 * man/Makefile.am (man_MANS): Renamed from MANS.
4722 * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
4724 From Derek Clegg (dclegg@next.com).
4726 Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
4730 Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
4732 * tail.c (dump_remainder): Flush stdout when tailing-forever on
4733 multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
4735 Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
4737 * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
4738 not just -Xc. From François Pinard.
4740 * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
4741 distributed automatically. From Tom Tromey.
4743 Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
4745 * nl.c: Include rx.h after limit.h (not before) to avoid warning
4746 about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
4747 its definition. From Kaveh Ghazi.
4749 * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
4750 works again. Reported by François Pinard and Kaveh Ghazi.
4752 * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
4753 [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
4754 (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
4755 mismatch errors from e.g. SunOS's /bin/cc.
4756 Reported by Kaveh Ghazi.
4758 Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
4760 * configure.in (VERSION): Set variable directly rather than from
4762 * Makefile.am (DIST_OTHER): Remove VERSION.
4763 * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
4764 (stamp-v): New target; depend on Makefile.
4765 (DISTCLEANFILES): Add stamp-v, version.c.
4767 Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
4769 * sort.c (keycompare): Rewrite cases handling ignored characters
4770 so that they really are ignored. Reported by Carl Johnson
4771 <carlj@cjlinux.home.org>.
4773 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4775 * configure.in: Touch stamp-h only if config.h is remade.
4777 * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
4778 syntax_parens field.
4780 Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
4782 Use automake to generate Makefile.in files.
4783 * Makefile.am: New file.
4784 * doc/Makefile.am: New file.
4785 * lib/Makefile.am: New file.
4786 * man/Makefile.am: New file.
4787 * src/Makefile.am: New file.
4789 Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
4791 * fmt.c (main): Use xstrtol instead of atoi.
4793 * fold.c (main): Use xstrtol instead of atoi.
4794 (fold_file): Make a couple locals `int', not size_t, and cast
4795 fwrite's third parameter to size_t.
4797 * nl.c (main): Use xstrtol instead of atoi.
4798 Rename misleading --first-page=N option to --starting-line-number=N.
4801 * uniq.c (main): Use xstrtol instead of atoi.
4803 Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
4805 * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
4807 Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
4809 * aclocal.m4 (ud_WITH_REGEX): New macro.
4810 * configure.in: Use it.
4811 * rx.c, rx.h: New files.
4812 * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
4813 (SOURCES, DISTFILES): Add rx.c, rx.h.
4814 * acconfig.h (WITH_REGEX): Add it.
4815 * csplit.c [!WITH_REGEX]: Include rx.h.
4816 * nl.c [!WITH_REGEX]: Likewise.
4817 * tac.c [!WITH_REGEX]: Likewise.
4818 From Ulrich Drepper and François Pinard.
4820 Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
4822 * sort.c (main): Diagnose invalid arguments to -k, then fail.
4824 * sort.c (numcompare): Properly handle all cases in which signs differ.
4827 * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
4828 Append `/man1'. Reported by Karl Heuer.
4830 * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
4832 * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
4834 Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
4836 * lib/Makefile.in (default): New target.
4838 * sort.c (numcompare): Properly order `-' and valid integers;
4839 treat `-' as if it were zero. Reported by Ross Alexander
4840 <r.alexander@auckland.ac.nz>.
4842 * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
4843 (.PHONY): Depend on default.
4845 Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
4847 * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
4848 (jm_AUTODEPS): Likewise.
4849 (jm_WITH_GNU_MAKE): Likewise.
4850 * configure.in (jm_AUTODEPS): Remove.
4852 * sort.c (begfield): Replace loop with equivalent if-else.
4853 (limfield): Fix bug that made field specs like -k1.5 return a
4854 pointer into LINE beyond the first field.
4855 Don't try to trim trailing blanks here; it's not
4856 possible because we don't know where the field begins.
4857 Replace loop with equivalent if-else.
4858 (trim_trailing_blanks): New function.
4859 (findlines): Call it.
4860 (keycompare): Likewise.
4861 (main): Don't decrement T2 corresponding to `x' in field
4862 specs like -ku.v,w.x.
4864 Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
4866 * csplit.c [!UINT_MAX]: Define.
4869 (string_to_number): Remove function.
4870 (check_for_offset): Use xstrtoul instead of string_to_number.
4871 (parse_repeat_count): Likewise.
4872 (parse_patterns): Likewise.
4875 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
4877 * Makefile.in (all et. al.): If make was invoked with -k and a
4878 sub-make fails, fail after the loop rather than exiting right away.
4879 Otherwise, make's -k option could be ineffective.
4881 Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
4883 * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
4885 Update for autoconf-2.5:
4886 * src/Makefile.in (libdir): Set to @libdir@.
4887 (bindir): Set to @bindir@.
4888 * doc/Makefile.in (infodir): Set to @infodir@.
4889 * man/Makefile.in (exec_prefix): Remove it.
4890 (mandir): Set to @mandir@.
4891 (bindir): Remove it.
4893 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
4895 * Makefile.in (default): New default target. Depend on `all' to
4896 work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
4899 Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
4901 * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
4903 * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
4904 * src/Makefile.in (C_MKDEP): Rename from MKDEP.
4905 * lib/Makefile.in (C_MKDEP): Likewise.
4906 * mkdep-Makefile (C_MKDEP): Likewise.
4909 * csplit.c [__P]: Don't define it here.
4910 * pr.c [__P]: Don't define it here.
4911 * fmt.c [__P]: Don't define it here.
4912 * system.h [__P]: Define it here.
4914 * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
4915 Revamp, with suggestions from Franc,ois Pinard.
4916 (jm_WITH_GNU_MAKE): New macro.
4917 (jm_PROG_MKDEP): New macro.
4918 * configure.in (jm_PROG_MKDEP): Use it.
4919 * src/Makefile.in (MKDEP): Set it.
4920 * lib/Makefile.in (MKDEP): Likewise.
4921 * mkdep-Makefile: Use MKDEP, not DEP_CC.
4922 (DEP_CFLAGS): Remove it.
4924 Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
4926 * sort.c: Add support for sorting numbers in scientific notation.
4928 (struct keyfield): Add field: general_numeric.
4929 (usage): Describe -g option.
4930 (general_numcompare): New function.
4931 (keycompare): Use new comparison function when general_numeric
4933 (set_ordering): Honor `g' flag.
4934 (main): Initialize and use new field.
4935 From Marcus Daniels <marcus@sysc.pdx.edu>.
4937 * configure.in (AC_REPLACE_FUNCS): Add strtod.
4938 * lib/Makefile.in (SOURCES): Add xstrtod.c.
4939 (OBJECTS): Add xstrtod.o.
4940 (DISTFILES): Add xstrtod.h.
4942 * csplit.c (cleanup): Don't exit.
4943 (interrupt_handler): Rewrite to reset default signal handler
4944 then repost caught signal.
4945 (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
4946 process_line_count, process_regexp, create_output_file,
4947 close_output_file): Call cleanup_fatal, not cleanup.
4948 Add const attribute to lots of parameters.
4949 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
4952 * tac.c (cleanup): Don't exit.
4953 (cleanup_fatal): New function. Call cleanup, then exit.
4954 (sighandler): New function.
4955 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
4957 (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
4959 Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
4961 * od.c (skip): Cast fseek's offset argument to `long'.
4962 Erik Bennett <bennett@cvo.oneworld.com> reported that this is
4963 necessary on BSDI systems. And if offset doesn't fit in a long,
4964 then try using lseek instead.
4966 * sort.c (xmalloc): Declare static.
4967 (xrealloc): Likewise.
4969 * tac.c (cleanup): Add signal number parameter.
4972 * cat.c (main): Don't die when dev/ino of input and output are
4973 the same and the file descriptors correspond to stdin and stdout.
4974 This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
4975 Otherwise, running `cat << X > $$' would fail with `cat: -: input
4976 file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
4978 * Makefile.in (DISTFILES): Add @README_ALPHA@.
4979 (config.status) Depend on VERSION.
4980 * configure.in: Set README_ALPHA if the version number ends in [a-z].
4982 Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
4984 * fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
4986 src/Makefile.in (.c._c): Don't redirect directly to $@.
4987 (._c._o, .c._o): Remove temporary src file.
4989 Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
4991 * VERSION: New file.
4992 * configure.in (VERSION): New variable.
4993 (PACKAGE): New variable.
4995 * Makefile.in (DISTFILES): Add VERSION.
4996 (distdir): Use @PACKAGE@-@VERSION@, not distname.
4997 Remove all references to distname.
4998 * src/Makefile.in (version.c): Generate it.
4999 (SOURCES): Remove now-generated version.c.
5000 (distclean): Delete version.c.
5001 * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
5004 * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
5005 Remove all references to distname.
5007 * split.c: New option: --verbose.
5008 (main): Recognize it.
5009 (usage): Document it.
5010 From Marty Leisner <leisner@sdsp.mc.xerox.com>.
5012 Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
5014 * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
5018 (store_columns): Remove spurious 2nd argument in call to read_line.
5019 [__P]: Define. Use it in prototyped forward decls.
5021 * csplit.c: Move prototypes after struct declarations.
5022 Remove prototypes for xmalloc, xrealloc.
5023 Protect prototypes with __P.
5024 (new_control_record): Cast arg 1 to realloc.
5026 * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
5029 Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
5031 * csplit.c (close_output_file): Set output_stream to NULL so we
5032 don't recurse endlessly between this function and cleanup.
5034 * unexpand.c: Reorder functions to obviate forward dcls. Remove
5035 forward dcls. Protoize. Add `const' attribute to some parameters.
5037 Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
5039 * wc.c: Reorder functions to obviate forward dcls. Remove
5040 forward dcls. Protoize. Add `const' attribute to some parameters.
5042 * split.c: Likewise.
5044 * split.c (isdigits, convint): Remove these.
5045 (main): Use xstrtol instead.
5047 Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
5049 * paste.c (main): Move function body to end of file.
5050 Remove forward dcls and protoize.
5051 * sum.c (main): Likewise.
5052 * nl.c: Protoize. Reorder functions to obviate forward dcls.
5053 Remove forward dcls.
5055 * src/Makefile.in (OBJECTS): Reflect that all of the above
5058 * sum.c (bsd_sum_file): Give file name parameter const attribute.
5059 (sysv_sum_file): Likewise.
5061 * tac.c (xwrite): Give output buffer parameter const attribute.
5062 (output): Likewise for both parameters.
5063 (tac): Likewise for file name parameter.
5064 (tac_file): Likewise.
5066 Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
5068 * md5sum.c (md5_check): Use the same message format when there is
5069 a single file and it gets a read error or checksum mismatch as when
5070 there are more. Write that warning to standard error, not standard
5071 output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
5073 Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
5075 * sort.c (xtmpfopen): New function to set proper permissions on
5076 temporary files. Use it instead of xfopen. Reported by Erik Corry
5077 (erik@kroete2.freinet.de).
5079 Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
5081 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
5082 * configure.in: Use it.
5084 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
5085 (.c.o): Rewrite to be more like src/Makefile.in.
5087 * src/Makefile.in (distclean): Remove .deps.
5088 Include @top_srcdir@/mkdep-Makefile.
5090 * mkdep.Makefile: New file.
5091 * Makefile.in (DISTFILES): Add mkdep-Makefile.
5092 * doc/Makefile.in (mostlyclean): Also remove *.info.
5094 Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
5096 * od.c: Indent cpp directives.
5098 * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
5099 with large repeat counts.
5100 (struct E_string): New struct.
5101 (find_closing_delim): Take E_string arg rather than char* and length.
5102 (find_bracketed_repeat): Likewise.
5103 (star_digits_closebracket): New function.
5104 (append_char_class): No longer give diagnostic.
5105 (append_equiv_class): Likewise.
5106 (build_spec_list): Give them here instead, allowing string1 like
5107 [:*][:upper:] that got errors before.
5108 Take E_string arg rather than char*.
5109 Convert switch stmts into if-then so as to use ES_MATCH.
5111 Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
5113 * cat.c: Protoize. Reorder functions to obviate forward dcls.
5114 Remove forward dcls.
5115 * expand.c: Likewise.
5122 * src/Makefile.in (OBJECTS): Reflect that all of the above
5125 * head.c: Add `const' attribute to dcls of lots of formals.
5127 * sort.c: Add `const' attribute to dcls of lots of formals.
5128 Move struct dcls to precede dcls of file-scope variables.
5129 (monthtab, keyhead): Separate variable dcls from type dcls.
5131 Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
5133 * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
5134 list item separators, per POSIX spec.
5135 (prjoin): Rewrite loop that iterates over field specs.
5136 Handle case in which file spec is 0.
5138 Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
5140 * strpbrk.c: New file.
5141 * lib/Makefile.in (SOURCES): Add strpbrk.c.
5144 Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
5146 * join.c (add_field): No longer return a value.
5147 (decode_field_spec): New function.
5148 (add_field_list): Rewrite to be more strict.
5149 Before, `,1.2' was accepted as valid.
5150 (main): Use xstrtol instead atoi.
5151 Combine nearly identical -a and -v cases.
5154 Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
5156 * join.c (main): Report `too few/many non-option arguments'
5157 then print --help output rather than just the latter.
5158 Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
5159 (usage): Describe POSIX -1, -2 options and deprecate -j* ones
5161 * join.c (usage): Move to precede all other functions.
5165 Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
5167 * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
5168 to determine whether `sigaction' functions are available.
5169 Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
5170 Fix suggested by Karl Berry.
5172 * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
5175 * cut.c: Convert many declarations using `int' to use `unsigned int'
5176 to avoid warnings from `gcc -Wall' about comparing signed and
5178 (set_fields): Use memset (not open coded loop) to initialize array.
5180 Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
5184 * Makefile.in (DISTFILES): Remove README.alpha for major release.
5186 * od.c (decode_one_format): Remove spurious semicolon.
5189 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
5191 * man/Makefile.in (install-data, uninstall): Use sed not basename.
5192 The GNU Coding Standard suggests that only a select set of
5193 relatively standard utilities be used in Makefiles. basename is
5194 not among them. Suggested by Ulrich Drepper.
5196 Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
5198 * cksum.c: Protoize.
5201 * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
5203 (cksum): Depend on cksum$O.
5204 (cut): Depend on cut$O.
5206 Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
5210 * Makefile.in (DISTFILES): Add README.alpha.
5212 * lib/Makfile.in (GETOPT, MEMCHR, REGEX): New variables.
5213 (OBJECTS): Use them instead of hardcoding object file names.
5214 Suggested by Ulrich Drepper.
5216 * md5sum.c (md5_check): Distinguish between open/read failure
5217 and checksum mismatch.
5219 Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
5221 * md5sum.c: Protoize.
5222 * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
5223 (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
5224 (md5sum): Depend on md5sum$O.
5226 * md5sum.c (main, usage): Remove -h, -s, -v short options.
5227 Rename --verbose to --warn, --quiet to --status.
5228 (main): Handle --help and --version using parse_long_options.
5229 (md5_check): Check ferror.
5231 * sort.c (tempname): Replace `16' with a more readable expansion.
5232 Make sure that counter never exceeds 99999.
5233 (checkfp): Rearrange loop to avoid duplicate test.
5234 Move a couple dcls from function scope into inner block.
5236 Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
5238 * md5sum.c (main): Fail if either --verbose or --quiet is specified
5239 when not verifying checksums.
5241 * md5sum.c (md5_check): Fail if no valid line is found.
5242 Don't use the word `fail' unless there were failures --
5243 instead, say `all N tests passed.'
5245 * md5sum.c (main) [handling --string option]: Don't output
5246 nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
5247 * md5-test.rfc: Remove now-inconsistant `b' marker.
5248 (usage): Clarify help message. With suggestions from Greg Troxel.
5250 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
5252 * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
5253 compiler warning. From Ulrich Drepper.
5255 * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
5256 compiler warning. From Ulrich Drepper.
5258 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
5261 Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
5263 * system.h (_): Define macro -- as empty for now.
5264 * src/*.c: Annotate localizable strings with _(...). From Franc,ois.
5266 Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
5270 * configure.in: Add fp_C_PROTOTYPES.
5272 Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
5274 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
5275 Add suffixes, dependencies, and rules to convert ANSI source to K&R
5276 when required. Mark tr.o and comm.o as the only such files (for now).
5281 * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
5282 (configure): Depend on aclocal.m4.
5283 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
5285 Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
5287 * md5sum.c (md5_check): Use getline instead of fgets.
5289 * lib/Makefile.in (SOURCES): Add getline.c.
5290 (OBJECTS): Add getline.o.
5291 (DISTFILES): Add getline.h.
5292 (getline.o): Depend on getline.h.
5294 * md5.c [memcpy]: Define to bcopy if needed.
5295 (md5_buffer): Explicitely cast SWAP expressions to unsigned
5298 * lib/Makefile.in (strtoul.o): Depend on strtol.c.
5300 * sort.c (check): Print `disorder on...' message on standard error,
5301 not stdout. This is a minor concession to POSIX which says
5302 `no output shall be produced...'.
5304 * sort.c (main): Fix -k so it works. -k 2,3 was being treated
5305 like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
5307 Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
5309 * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
5310 before applying $(transform) to manual name. From Karl Berry.
5312 * md5sum.c (have_read_stdin): New global variable.
5313 (md5_file, md5_check): Set it.
5316 * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
5317 (md5_file): Take a new parameter, MD5_RESULT, and no longer
5319 (md5_check): Invoke md5_file instead of calling fopen directly.
5320 When giving a diagnostic for a line with invalid format, also report
5322 (main): Generate output after a successful md5_file call.
5323 [in many places]: Upon detection of an error, rather than exiting
5324 immediately, issue a diagnostic, note that an error occurred and
5327 Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
5329 * tail.c (tail_bytes) [from_start]: For regular files, seek
5330 relative to the initial input file pointer position, not
5331 necessarily from the beginning of the file.
5332 [!from_start]: Don't back up past the initial position of the
5334 (tail_lines): Call file_lines only if FD refers to a regular file
5335 with its file pointer positioned at beginning of file. Otherwise,
5336 call pipe_lines. This is a kludge. Once there's a decent test
5337 suite, fix this properly.
5338 Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
5339 would output both lines of the input file even though the first had
5340 already been read. Reported by John Roll (john@panic.harvard.edu).
5342 * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
5344 * csplit.c (main): When too few arguments are given, don't just
5345 issue the usage message; also report why.
5347 Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
5349 * md5sum.c (md5_check): New function -- extracted from main.
5351 Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
5353 * md5sum.c (md5_file): New function -- extracted from main.
5354 (main): Call the new function instead of doing all that in an
5355 if-stmt. Always use "%s" format rather than raw filename as
5356 format argument in printf-style functions like error. Otherwise,
5357 filenames containing `%' are likely to lose.
5358 Remove all mention of `old format'.
5359 (split_3): No longer parse the `new format.' There is only one
5360 valid format now: the compatible one.
5362 * lib/Makefile.in (SOURCES): Add md5.c.
5363 (OBJECTS): Add md5.o.
5364 (DISTFILES): Add md5.h.
5365 (md5.o): Depend on md5.h.
5367 * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
5368 * lib/md5.c (md5_stream): Check for read failure and return
5369 indication of success rather than second argument.
5370 * lib/md5.h (md5_stream): Update prototype.
5371 [__P]: Define macro.
5372 * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
5373 (main): Report an error if md5_stream fails. Otherwise, running
5374 `md5sum dir-on-mounted-filesystem' always reported the checksum
5375 for an empty file. Now it gets the `is a directory' error.
5376 Greg McGary (gkm@magilla.cichlid.com) reported that the released
5377 version got stuck in an infinite loop with such arguments.
5379 * lib/md5.c: New file.
5380 * lib/md5.h: New file.
5381 * md5sum.c: Rewritten to use library interface.
5382 From Ulrich Drepper.
5384 Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
5386 * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
5388 Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
5390 * md5sum.c Add #else block after #ifdef VMS.
5391 (main): Rename local variable.
5392 Detect and report failed fclose calls on stdout and checkfile_stream.
5394 * tr.c (unqote): Comment out unreachable break stmts.
5395 (append_range): Declare FIRST and LAST parameters to be unsigned int,
5397 (find_closing_delim): Clean up interface, separating boolean success
5398 indicator and index.
5399 (find_bracketed_repeat): Likewise.
5400 (build_spec_list): Adapt to use new interfaces.
5401 Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
5402 type size_t, not int.
5403 (main): Declare NR and CHARS_READ to be of type long, not int.
5405 * sort.c (main): Comment out unreachable break stmt.
5407 * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
5408 call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
5409 off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
5410 long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
5412 * comm.c: Reorder functions so main is last, so no forward dcls
5415 Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
5417 * sort.c (main): When using obsolescent +pos -pos syntax, allow
5418 omission of field spec only when character offset is specified.
5419 Otherwise, -. +. would be accepted.
5421 Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
5423 * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
5424 position specification. For compatibility with existing practice
5425 (what vendors?), omitting M is now equivalent to specifying `0' for M,
5426 but only when using the +pos -pos syntax, not with the -k option.
5427 From Rick Sladkey (jrs@world.std.com).
5429 Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
5431 * od.c (dump): Correct loop-termination criterion.
5432 Before, running `printf 1234| ./od --width=4 --read-bytes=4'
5433 printed output for 8 bytes -- the last four were garbage.
5434 This happened only when the dump limit, N, was specified (with
5435 --read-bytes=N) and N was a multiple of bytes_per_block
5436 (usually 16, but 4 in this example). From Andreas Schwab.
5438 Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
5440 * lib/Makefile.in (check): Depend on libtu.a.
5442 * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
5443 (main): Print each sum line in (de facto) standard Plumb/Lankester
5445 New option: --quiet.
5446 Check option no longer takes an argument.
5447 When checking, exit status reflects success.
5449 Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
5451 * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
5452 Autoconf (via config.h) defines it away for compilers that don't
5455 * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
5456 defining to avoid redefinition warning on some systems.
5458 * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
5459 This avoids potential conflict with max macro from some system's
5460 header files when using bad pre-ANSI compilers.
5462 * uniq.c (usage): Fix typo in text of --help output.
5463 From Steve McConnel <steve@acadcomp.sil.org>
5465 * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
5466 also check `unsigned long', as a concession to systems with
5467 int's smaller than 32 bits.
5469 * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
5470 AC_FUNC_MEMCMP already handles it. This avoids warnings from
5471 ranlib on nextstep systems. From Kaveh Ghazi.
5473 * csplit.c (interrupt_handler): Declare to have a single integer
5474 parameter. Otherwise, some compilers fail with a type mismatch
5475 error in sa_handler assignment.
5477 * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
5478 headers that typedef `word' get syntax errors because of the
5479 variable by the same name.
5481 * join.c [join]: Redefine to avoid conflict with prototype in some
5482 system header file. Also for Unicos.
5484 * md5sum.c (main): Remove spurious colon in getopt spec string.
5485 From Ken Pizzini <kenp@spry.com>.
5487 Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
5489 * md5sum.c (md5_file): Initialize two elements of LEN portably,
5490 rather than with ANSI aggregate initialization. Reported by
5491 Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
5493 Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
5497 * md5sum.c (process_buffer): Copy values from struct into
5498 individual local variables before performing computation on them,
5499 then copy results back into returned struct. Solely for better
5500 optimization by compilers that can't keep struct members in
5501 registers. From Ulrich Drepper.
5503 Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
5505 * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
5506 Don't use #elif. Some older compilers don't grok it.
5507 (split_3): New function to parse out sum, flag, and filename
5508 when reading check file.
5509 (hex_digits): Remove length parameter since string parameter is
5511 (main): Don't allocate separate arrays for filename and sum
5512 when checking. Get pointers into line buffer with split_3 instead
5514 (main): Treat `no file args' just like `-' when not checking
5516 (hex_digits): Unprotoize.
5518 * md5sum.c (main): Don't use a separate loop to convert to lower
5519 case. Suggested by Ulrich Drepper.
5522 From Ulrich Drepper.
5524 * md5sum.c: Don't include values.h.
5527 * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
5528 and _POSIX_VERSION. Reported by Arne H. Juul.
5530 Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
5532 * tr.c [NDEBUG]: Define it to disable assertions. Some systems
5533 have a broken <assert.h> header.
5534 (is_char_class_member): Set a variable in each branch of switch
5535 stmt and return that value after the switch (rather than returning
5536 directly from every branch).
5537 (unquote): More int->size_t changes.
5538 (build_spec_list): More int->size_t changes.
5539 Be very careful about comparison now that variables are unsigned:
5540 Use i + 2 < len rather than i < len - 2. The latter didn't work
5541 for len < 2. Caught early thanks to a thorough regression test
5544 Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
5546 * sort.c (xfclose): Don't try to flush stdin, only stdout.
5547 Otherwise, at least Ultrix-4.3's fflush would return EOF.
5548 Reported by Jim Blandy (jimb@cyclic.com).
5550 * tr.c (non_neg_strtol): Don't compare signed and unsigned.
5551 [struct Spec_list] (indefinite_repeat_element): New member.
5552 Use size_t rather than int or unsigned long where reasonable.
5553 (get_spec_status): Make interface cleaner.
5554 (get_s1_spec_status): New function.
5555 (get_s2_spec_status): New function.
5556 (validate): Use new functions instead of get_spec_status.
5558 Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
5560 * md5sum.c: New file. From Ulrich Drepper.
5561 * md5-test.rfc: New file.
5562 * Makefile.in (PROGS): Add md5sum.
5563 (check): Run a recursive make in each subdirectory.
5564 * man/Makefile.in (MANFILES): Add md5sum.1.
5565 * src/Makefile.in (SOURCES): Add md5sum.c.
5566 (OBJECTS): Add md5sum.o.
5567 (PROGS): Add md5sum.
5568 (check): Add basic checks for md5sum.
5569 (md5sum): Add dependency and link rule.
5570 (DISTFILES): Add md5-test.rfc.
5572 * tr.c (look_up_char_class, append_char_class, append_equiv_class):
5573 Use const attribute when appropriate.
5575 Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
5577 * join.c: Overhauled to make -a1 and -a2 options work.
5578 Passed all tests in a fairly thorough test suite.
5579 Reported by Michael Hasselberg (mikelh@zonta.ping.de).
5581 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
5583 * tail.c (main): Remove dcl of and statements that set now-unused
5586 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
5587 Without this, SunOS doesn't get type for memchr.
5588 Reported by Kaveh Ghazi.
5590 Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
5592 * tail.c (tail_lines): Change one more `long' to `off_t'.
5593 Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
5595 * csplit.c [struct control]: Change type of `repeat' to unsigned
5596 long to avoid conversion warning.
5598 Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
5600 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
5602 * xstrtol.c (__strtol): Remove prototype altogether.
5603 Move inclusion of xstrtol.h back so that it follows system headers.
5607 Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
5609 * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
5612 * xstrtol.c: Define NDEBUG for systems with losing assert.h.
5613 (__strtol): Add __unsigned to prototype and use __P.
5614 Move inclusion of xstrtol.h to precede prototype.
5617 * memmove.c: Include config.h for definition of const.
5620 * All Makefile.in (install-exec, install-exec): New targets.
5623 * tr.c (look_up_char_class): Take a string length argument -- required
5624 because the argument is a string that is *not* NUL-terminated.
5625 Use strncmp, not strcmp and add string lengths comparison.
5626 (append_char_class): Update caller. Before this change,
5627 tr '[:upper:]' '[:lower:]' read one uninitialized byte.
5628 From Andreas Schwab.
5630 * split.c (next_file_name): Move dcls of file-scope variables into
5631 this function. Don't rely on arithmetic being two's complement.
5633 * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
5634 Instead, declare two FILE structs and use their addresses.
5636 * csplit.c (record_line_starts): Remove set-but-not-used,
5637 file-scope variable.
5639 Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
5641 * all source files (usage): Include one- or two-line synopsis
5642 in --help output. From Karl Berry.
5644 * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
5647 Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
5651 Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
5653 * all Makefile.in (maintainer-clean): Renamed from realclean
5656 Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
5658 * sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
5659 Don't include safe-stat.h.
5661 * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
5662 Remove all associated rules. safe-l?stat.h are no longer used.
5664 * sort.c Don't hard-code /tmp.
5665 [DEFAULT_TMPDIR]: Use this instead.
5666 * tac.c (save_stdin): Likewise.
5668 * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
5669 Reported by John Salmon (johns@mullet.anu.edu.au).
5670 Patch from Mike Haertel.
5672 Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
5674 * sort.c (tempname): AND-off high bits of pid so that its decimal
5675 string representation is no longer than five digits.
5676 From Hans Verkuil (hans@wyst.hobby.nl).
5678 Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
5680 * expand.c (add_tabstop): Give correct size when reallocating
5681 tab_list buffer. From Geoff Odhner (geoff@franklin.com).
5682 Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
5684 Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
5686 * configure.in (AC_OUTPUT): Use echo, not date, to avoid creating
5687 unnecessary conflicts for people using version control software
5689 (AC_ARG_PROGRAM): Use it.
5691 Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
5693 * head.c: Remove block of redundant comments describing options.
5694 (usage): Remove reference to -l option. It's not valid.
5696 * od.c (write_block): Declare index I as unsigned int, not int.
5697 (get_lcm): Likewise.
5698 (dump_strings): Likewise.
5700 (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
5701 (dump_strings): Declare bufsize to be of type size_t, not int.
5703 * split.c (next_file_name): Don't reuse X as an index.
5704 Declare new variable I instead.
5706 Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
5708 * csplit.c: Declare as `unsigned int' all variables that were
5710 (make_filename): Change type of arg to unsigned int.
5711 (split_file): Change type of indices to unsigned int.
5713 Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
5715 * od.c (main): Detect and fail when argument to -N is too large
5718 Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
5720 * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
5721 Remove check for sizeof long.
5723 * linebuffer.h: Undefine __P before defining it.
5724 * long-options.h: Likewise.
5725 * xstrtol.h: Likewise.
5727 * memcpy.c: New file.
5728 * lib/Makefile.in (SOURCES): Add memcpy.c.
5730 Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
5732 * src/*.c: Update Copyright dates.
5734 Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
5736 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
5737 Separate errno declaration from STDC_HEADERS.
5739 * wc.c (wc): For efficiency, handle separately the cases in which
5740 words need not be counted. Suggested by Karl Heuer.
5742 * wc.c (wc): Don't overcount the number of bytes when reading
5743 from a regular file on stdin with file pointer not at BOF.
5744 From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
5745 `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
5746 the size of the file. Now it outputs `0'.
5748 Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
5750 * cat.c (cat): Use memmove rather than bcopy.
5751 * csplit.c (load_buffer): Use memcpy rather than bcopy.
5752 (extract_regexp): Use strrchr, not rindex.
5753 * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
5754 (flush_paragraph): Use memmove instead of bcopy.
5755 * fold.c (fold_file): Use memmove instead of bcopy.
5756 * od.c (decode_format_string): Use memmove instead of bcopy.
5757 [EQUAL_BLOCKS]: Use memcmp, not bcmp.
5758 (parse_old_offset): Use strchr, not index.
5759 (dump): Use memset, not bzero.
5760 * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
5761 (fillbuf): Use memmove instead of bcopy.
5762 * split.c (main): Use memset, not bzero.
5763 (line_bytes_split): Use memmove instead of bcopy.
5764 * tac.c (tac): Use memmove instead of bcopy.
5765 (output): Use memcpy instead of bcopy.
5766 * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
5767 * tr.c (substr): Use memcpy instead of bcopy.
5768 (card_of_complement, set_initialize): Use memset, not bzero.
5770 * tr.c (substr): Don't allocate a byte for trailing NUL in result
5771 since the result needn't be NUL-terminated. Don't NUL terminate it.
5773 * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
5775 (AC_CHECK_FUNCS): Add strchr and strrchr.
5777 * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
5778 * memmove.c: New file.
5779 * memcpy.c: New file.
5781 Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
5783 * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
5784 not followed by a newline would be followed by data copied from
5785 uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
5786 Reported by Franc,ois Pinard.
5788 * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
5789 AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
5790 Be careful to use off_t instead of explicit `unsigned long'.
5791 Otherwise, systems like 4.4BSD lose on calls to fseek that
5792 expect off_t (which is long long on that system).
5793 (parse_old_offset): Use xstrtoul
5796 * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
5798 Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
5800 * tail.c (numerous functions): Give char* filename arguments the
5803 * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
5804 Add xstrtol.c and xstrtoul.c.
5805 (OBJECTS): Likewise for .o files.
5806 (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
5808 * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
5809 (distclean): Remove references to safe-l?stat.c.
5810 Remove all related rules and dependencies.
5812 * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
5814 Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
5816 * tail.c (tail_file): Fix call to error with %s in format, but
5817 no corresponding argument.
5819 * src/*.c: Include "error.h" instead of simply declaring
5821 * od.c (main): Use %lu, not %d for unsigned long.
5822 (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
5823 and STRTOL_FATAL_ERROR instead.
5825 Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
5827 * sort.c (main): Fix interpretation of field offsets when specified
5828 via -k option. They were being interpreted as zero-indexed. POSIX
5829 says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
5830 (keycompare): Don't ignore characters at the end of words when
5831 otherwise they would compare equal. From Rik Faith.
5833 * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
5834 to off_t because n_bytes is used as the option to fseek and off_t may
5835 be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
5836 imposed is in the string-to-integer converstion of xstrtol.
5837 (main): Use xstrtol instead of manual string to integer conversion.
5839 * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
5840 comparisons against '0' and '9'.
5842 * tr.c [!ULONGMAX]: Define it.
5843 [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
5845 * full-write.c: Declare (or not) errno based on definedness or
5846 errno, not STDC_HEADERS.
5847 * safe-read.c: Likewise.
5848 * xwrite.c: Likewise.
5850 Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
5852 * tail.c (dump_remainder): Flush standard output just before
5853 sleeping so that `tail -f' will output partial lines sooner.
5854 This applies only when following the end of a single file.
5855 From Leonard N. Zubkoff <lnz@dandelion.com>.
5857 * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
5858 start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
5860 * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
5861 * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
5862 not already defined.
5864 Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
5866 * tr.c: Include <getopt.h> instead of "getopt.h".
5868 * sort.c (tempname): Merge two very similar sprintf stmts into one.
5870 * tail.c: Use BUFSIZ instead of BUFSIZE.
5872 * cut.c: Declare DELIM to be `int' rather than unsigned char.
5874 * fmt.c: Use index, not strchr -- per GNU Standards.
5875 Reported by Kaveh Ghazi.
5876 Always include <config.h>.
5877 (main): Include program name in --version output.
5879 Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
5883 Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
5885 * memcmp.c, srtoul.c: Use up-to-date versions.
5886 Reported by Franc,ois Pinard.
5888 * src/Makefile.in (DEFS): Remove -Dlint... again.
5890 * src/Makefile.in (PROGS): Add fmt!
5891 Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
5893 Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
5897 Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
5899 * linebuffer.h: Use __P instead of _P since the latter conflicts
5900 with a definition in some <ctype.h>. From Kaveh Ghazi.
5902 Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
5904 * tr.c: Add const attribute where appropriate.
5906 * tail.c (BUFSIZ): Use definition from <stdio.h>.
5908 Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
5910 * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
5911 n_bytes is positive. Turn off assertions. `tail /dev/null' was
5912 getting a failed assertion. Reported by Doug McLaren
5915 * cut.c (cut_bytes): Print at least a newline for every line of input.
5916 (cut_fields): Print a newline even for lines whose only selected
5917 field is empty. But print nothing when using -s without -f1.
5918 And print nothing for empty input. Reported by
5919 Richard_Sharman@software.mitel.com.
5921 Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
5923 * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
5924 * linebuffer.h: Likewise.
5926 Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
5928 * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
5929 already handles it. From Kaveh Ghazi.
5931 * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
5932 get failures when it's defined. From Kaveh Ghazi.
5934 * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
5935 defined on some Next and Alliant systems. From Kaveh Ghazi.
5937 * sort.c join.c (main): Include version.h and call parse_long_options
5938 with the proper number of arguments. Reported by Franc,ois Pinard.
5940 Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
5942 * (configure.in): Add AC_OFF_T and rearrange by type along the
5943 same lines as autoscan.
5945 * fmt.c, fmt.1: New files.
5946 Both from Ross Paterson (rap@doc.ic.ac.uk).
5948 * Makefile.in (PROGS): Add fmt.
5949 * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
5950 (fmt): Add a link rule.
5951 * man/Makefile.in (MANFILES): Add fmt.1.
5953 Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
5955 * Makefile.in (All of them): Update from the ones in sh-utils.
5956 From now on, rules and definitions that are comon to the fileutils,
5957 textutils, and sh-utils will get ChangeLog entries only in the
5960 Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
5962 * od.c (my_strtoul): Set errno to zero before calling strtoul.
5963 Otherwise, od can fail complaining about a valid integer argument.
5964 From Andreas Schwab.
5966 Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
5968 * tr.c (main): Give an error and fail when squeezing repeats
5969 and no non-options are given. Reported by Tony Robinson
5970 (ajr@eng.cam.ac.uk).
5972 * sort.c (main): Temporarily copy each input file that might be
5973 another name for the output file. When in doubt (e.g. a pipe),
5974 copy. This allows the dangerous (historical -- in cnews) idiom
5975 `cat file | sort -o file' to work properly. Don't rely on this
5976 behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
5978 Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
5980 * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
5981 Remove CONFIG_BROKETS ifdef.
5982 * src/Makefile.in lib/Makefile.in: Don't define it.
5984 Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
5986 * full-write.c (full_write): Declare argument LEN to be size_t.
5988 Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
5990 * tail.c (tail_file): [For multiple files only]: Report truncation
5991 of monitored file and reset current file size. From Franc,ois Pinard.
5993 Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
5995 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
5996 From Franc,ois Pinard.
5998 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
6000 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
6001 decides whether to include <fcntl.h>. From Francois Pinard.
6003 Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
6005 * tr.c (substr): Fix off-by-one allocation error.
6007 Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
6009 * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
6010 (tac): Fix typo that had `1' as arg #2 of error after failed read.
6011 Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
6013 Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
6015 * configure.in [INSTALL]: Revert change of March 25. autoconf
6018 Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
6020 * join.c (prline): Remove unused function. Indent.
6022 Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
6024 * tail.c (tail_forever): Don't print headers when asked not to.
6025 From Karsten Thygesen <karthy@kom.auc.dk>.
6027 * wc.c (wc): Optimize for the case when only bytes are being counted
6028 and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
6030 Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
6032 * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
6033 * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
6035 Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
6037 * csplit.c (struct control): Add new field, repeat_forever.
6038 Remove now-unneeded definition of INT_MAX.
6039 (process_regexp): Test repeat_forever instead of comparing `repeat'
6041 (split_file): Don't even reference `repeat' count if repeat_forever
6043 (new_control_record): Initialize repeat_forever field.
6044 (parse_repeat_count): Set it instead of setting repeat count to
6046 (process_line_count): Abort for internal error instead of calling
6049 * long-options.c (parse_long_options): Take a new argument indicating
6050 the utility name (e.g. "join", not "gjoin") for version output.
6051 Print both the utility and the package names, e.g. `join - GNU
6052 textutils-1.9.1' instead of just the package name.
6054 * join.c (main): Call parse_long_options with program name arg.
6055 * sort.c (main): Ditto.
6057 * All source except sort.c and join.c (main): Change --version output
6058 to include utility name as well as package name and version info.
6060 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
6062 * configure.in: Use AC_SET_MAKE.
6063 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
6065 Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
6067 * tr.c (main): In addition to the --help usage pointer, give an
6068 explicit error message for too many arguments.
6070 Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
6072 * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
6073 of explicit echo commands.
6074 [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
6075 `./install.sh', make it `../install.sh' instead since that
6076 script will be invoked only from subdirectories.
6077 [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
6079 * cat.c (cat): The command `:|cat -s' failed on Irix5 because
6080 ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
6081 it returned EINVAL. Detect this.
6082 (main) [lint]: Initialize variables to suppress `used before
6083 initialized' warnings.
6085 * csplit.c: Change long option name from --suffix to --suffix-format.
6087 * od.c (skip): Correct a comment.
6088 (main): Don't output anything to stdout if the sole input file
6089 doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
6091 * od.c (dump) [lint]: Initialize a variable to suppress `used before
6092 initialized' warning.
6093 (main) [lint]: Ditto.
6094 * paste.c (paste_parallel) [lint]: Ditto.
6096 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
6098 * configure.in: Don't set LDFLAGS since linking now uses both
6101 Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
6103 * unexpand.c (unexpand): Don't segfault when given a name of a
6105 * expand.c (expand): Ditto.
6106 Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
6108 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
6110 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
6113 * csplit.c (load_buffer): Rather than incrementing buffer size,
6114 double it each time we fail to find a newline. Otherwise, csplit
6115 would run out of memory when processing files with very long lines.
6117 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
6119 * man/Makefile.in (manprefix): Use binprefix as the default.
6121 Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
6123 * cat.c: Use full_write and safe_read instead of write and read resp.
6129 * sum.c: Use safe_read instead of read.
6133 * tail.c: Replace calls to xwrite with calls to fwrite.
6134 Use fopen/fclose instead of open/close.
6135 (write_header): Use a single call to printf instead of four to xwrite.
6136 Use safe_read instead of read.
6139 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
6141 * install.sh: New file.
6142 Makefile.in [DISTFILES]: Add it.
6144 Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
6146 * memcmp.c: Use the latest version from the GNU C library.
6148 * cut.c [ADD_RANGE_PAIR]: New macro.
6149 (set_fields): Collect the list of all selected ranges before
6150 allocating and initializing the boolean lookup table.
6151 (cut_bytes, cut_fields): Complete rewrite. Avoid copying
6152 into buffer whenever possible. Properly handle input without
6154 (getstr): New function. Copied from getline.c, but with minor changes.
6156 * sort.c (main): Properly handle -Tdir.
6157 Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
6158 Reported by Kristoffer Rose (kris@diku.dk).
6160 * cut.c (main): Give separate errors for `-s without -f'
6161 and `-d without -f'.
6162 (main): Now -d '' means `use the NUL byte as the delimiter'.
6163 Before, it got an error.
6165 Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
6167 * configure.in [test for 8-bit clean memcmp]: Add a test to detect
6168 losing memcmp from SunOS4.1.x. From Robert H. de Vries
6171 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
6173 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
6174 so it goes in config.status. This eliminates unnecessary second run
6177 Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
6179 * configure.in (AC_HAVE_FUNCS): Add isascii.
6180 * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
6181 on AIX PS/2 1.3 systems because isascii is a function and it is used
6182 in definitions (with the necessary side effect of assigning to a
6183 global variable) of the is* macros. Also test HAVE_ISASCII and
6184 redefine ISASCII(c) instead of isascii.
6185 Reported by Minh Tran-Le (tranle@intellicorp.com).
6187 Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
6189 * configure.in: Don't run the test for 8-bit clean memcmp if we
6190 already know we'll be using our replacement.
6192 Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
6196 * tac.c (usage): Fix typo in long usage.
6197 * sort.c (usage): Likewise.
6198 From Philippe.Schnoebelen@imag.fr.
6200 * cut.c [FATAL_ERROR]: New macro.
6201 (main): Call both error and usage (2) through FATAL_ERROR in
6202 many places. Before, only `error (2...' was called.
6203 (invalid_list): Removed. This function is subsumed by FATAL_ERROR.
6205 * cut.c (cut_fields): Properly handle input lacking a terminating
6206 newline. Before, the command `printf "a\tb" |cut -f 1' generated
6209 Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
6211 od.c (usage): Change --backward-compatible to --traditional in
6212 the long usage message.
6214 Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
6218 Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
6220 * cut.c (cut_fields): Revert July 27 change. Instead, strip off
6221 trailing delimiter unless given a range of fields like `3-' that
6222 extends to end of line.
6223 (set_fields): Moved local `eol_range_start' to file-scope.
6224 Reported by Arne H. Juul (arnej@solan.unit.no).
6226 Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
6228 * fold.c (fold_file): Don't get stuck in an endless loop when
6229 width is smaller than 8 and there are TABs in the input.
6231 Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
6233 * join.c: Remove now-unused dcls of show_help and show_version.
6235 Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
6237 * csplit.c [INT_MAX]: Make sure it's defined.
6238 [not HAVE_LIMITS_H]: Don't include limits.h.
6239 From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
6241 Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
6245 Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
6247 * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
6248 From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
6250 * sort.c (main): Handle --help and --version options.
6251 * Makefile.in (sort.o): Depend on long-options.h.
6253 Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
6255 * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
6256 split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
6257 `--longopt=arg' syntax in --help message rather than `--longopt arg'.
6258 From Francois Pinard.
6260 * tail.c: Don't include <signal.h>. It hasn't been necessary
6261 since the Dec 12, 1992 change.
6263 * join.c (main): Accept `-v 1' again. Adding the --version
6264 long option had broken it, although -v1 still worked. Call
6265 parse_long_options instead of adding "help" and "version"
6266 to join's longopt strct.
6267 * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
6269 * (join): Depend on and link with long-options.o.
6270 * (join.o): Depend on long-options.h.
6272 * od.c: Change --compatible (-C) to --backward-compatible (-B).
6274 * csplit.c: Change --abandon-null-files to --elide-empty-files.
6276 Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
6278 * tr.c (get_next, string2_extend): Add default: label to switch stmt.
6280 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
6281 join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
6282 tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
6283 Exit successfully for --help, non-zero for usage error.
6284 From Francois Pinard.
6286 * configure.in: Add AC_STAT_MACROS_BROKEN.
6287 * system.h [AC_STAT_MACROS_BROKEN]: Test it.
6289 Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
6291 * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
6292 <config.h> or "config.h".
6293 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
6294 join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
6295 tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
6297 * configure.in: Use AC_CONFIG_HEADER.
6298 * Makefile.in [DIST]: Add config.h.in.
6300 * Makefile.in: Convert so make may be run from subdirectories.
6301 Add dependencies on config.h.
6302 * src/Makefile.in: Ditto.
6303 * lib/Makefile.in: Ditto.
6304 * man/Makefile.in: Ditto.
6306 Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
6308 * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
6309 In the 64-bit assignment, be careful to cast the shift operand to
6311 Abort if sizeof (unsigned long) > 8.
6313 Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
6315 * csplit.c: Allow repeat counts to be specified via `{*}'.
6316 New option --suffix=format. Supercedes --digits option.
6317 New option --abandon-null-files.
6318 From Ronald F. Guilmette (rfg@netcom.com).
6320 * csplit.1: Updated.
6321 From Ronald F. Guilmette.
6323 * csplit.c: Remove register keyword (replace with `int' in two cases).
6325 * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
6326 (bytes_to_octal_digits): New static array.
6327 (get_format_flags): Combine '+' and ' ' cases of switch stmt.
6328 Return count if for loop terminates.
6329 (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
6330 (get_format_prec): Make sure is_negative is defined before used.
6331 (get_format_conv_type): Give a different error message if there
6332 is no conversion specifier.
6333 Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
6334 (max_out): Use `%%' rather than `%' in format string.
6336 Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
6338 * pr.c (main): When argc == 1, don't try to xmalloc (0).
6340 Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
6342 * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
6345 Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
6347 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
6349 Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
6351 * src/*.c: Print version on standard output, not stderr.
6353 * configure.in: Add AC_LONG_64_BITS.
6354 * memchr.c: Use #ifdef LONG_64_BITS instead of
6355 `if (sizeof(longword) > 4)'.
6357 Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
6359 * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
6360 always handle devices. Ignore errno == EINVAL and errno == ENODEV.
6361 `cat -v /dev/null' was failing on many systems.
6363 * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
6364 `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
6365 From William Dowling <will@franklin.com>.
6367 Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
6371 * memchr.c: De-ansify the fixed version from glibc.
6372 It is supposed to work on systems with 64-bit long ints.
6374 Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
6378 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
6382 Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
6384 * pr.c (cols_ready_to_print): New function. It replaces a global
6385 variable by the same name and computes on the fly the value that
6386 was supposed to be maintained through that variable. This should
6387 put to rest the `pr -2a' bug.
6388 (main): Don't let getopt_long reorder arguments so we can
6389 distinguish between `pr -1 -2' and `pr -12'. Rework handling of
6392 * fold.c: Declare xmalloc.
6394 Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
6396 * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
6398 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
6400 * mkinstalldirs: New file.
6401 * Makefile.in (installdirs): Use it to create installation directories.
6403 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
6405 * all source: With --version, print version and exit immediately.
6407 Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
6409 * Makefile.in (installdirs): New rules for creating installation
6410 directories. (install): depend on it.
6412 * tail.c (main): Remove --compatible since `+1f' may be used
6413 to get the BSD `-0f' behavior portably.
6415 * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
6416 From Ian Lance Taylor (ian@cygnus.com).
6418 Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
6420 * tail.c (main): New option -C, --compatible to make `tail -0f'
6421 work like `tail +1f' for compatibility with BSD tail.
6423 Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
6425 * pr.c (print_page): Decrement cols_ready_to_print even when
6426 lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
6427 terminate. Add parentheses for clarity.
6429 Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
6433 * od.c (main): Remove set-but-not-used variable, `usage_error'.
6435 * split.c (main): Call usage with an argument.
6437 Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
6439 * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
6440 for 8-bit clean memcmp.
6442 * cat.c (usage, main): Remove unused argument.
6444 * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
6445 (check_for_offset): Remove unused argument `argnum.'
6447 * configure.in: Add AC_SIZE_T.
6449 Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
6451 * uniq.c (main): Interpret non-option arguments with a leading `+'
6452 only if we haven't seen `--'.
6454 * tr.c (main): Change variable name to avoid shadowed dcl.
6455 * wc.c (write_counts): Ditto.
6457 * sum.1: Make documentation agree with the code.
6459 * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
6461 Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
6463 * configure.in [AC_HAVE_HEADERS]: Add limits.h.
6465 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
6467 * od.c (parse_old_offset): Don't use prototype in function
6468 definition. Remove unnecessary conjunct from test for hexadecimal
6471 * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
6472 for long double support; there are compilers (Stardent Vistra svr4)
6473 without long double but still define __STDC__.
6475 Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
6477 * src/*.c and man/*.c except for sort: Add --help and --version
6480 * pr.c: Convert to use getopt_long.
6482 * lib/memcmp.c: Use version from glibc.
6483 [WORDS_BIGENDIAN]: Test this instead of the using glibc's
6485 * configure.in: Use AC_WORDS_BIGENDIAN to set it.
6487 * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
6490 * Makefile.in (dist): Depend on Makefile so that changes to
6491 Makefile.in (like adding new files to DISTRIB) are reflected
6492 in the new distribution.
6494 Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
6496 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
6497 other options so users can use them to override DEFS.
6498 * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
6500 * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
6501 configure's AC_SUBST will set these.
6503 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
6504 [targets that cd then run make in subdirectories]: Don't depend
6505 on `cd ..'; use a subshell instead.
6507 * Makefile.in [info, install-info, dvi, check, installcheck]:
6508 New targets but no rules; comply with standards.
6510 * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
6511 hasn't specified CFLAGS.
6512 [LDFLAGS]: Substitute into Makefile.
6514 Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
6516 * od.c: New option --compatible, -C.
6517 (parse_old_offset): New function.
6518 * od.1: Document new option.
6520 Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
6522 * cut.c, expand.c, join.c, nl.c: Always call error with errno
6523 (not zero) after failed fclose or non-zero ferror.
6525 Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
6527 * configure.in: Add check for working memcmp; use GNU's if
6528 the system's doesn't grok the 8th bit.
6529 * memcmp.c: Fix it so it groks the 8th bit.
6530 TODO: We really need to provide a fast memcmp, since most
6531 machines will have a broken memcmp. Probably should get
6533 * sort.c (mergefps): Maintain keybeg and keylim when copying
6534 the current line to `saved'.
6535 (numcompare): Skip white space here since -n no longer implies -b.
6536 (getmonth): Skip white space here since -M no longer implies -b.
6537 (compare): Completely overhauled to make the 8th bit work right,
6538 also to properly handle the global reverse option.
6539 (set_ordering): -n no longer implies -b, according to Posix.
6540 For consistency, -M also no longer implies -b.
6541 (main): Correct treatment of -r and global keys.
6542 (findlines): Clear keybeg and keylim if no keys are used.
6543 (sort): Avoid overwriting tempfiles[] array bounds.
6545 Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
6547 * pr.c (close_file): Reverse May 13, '92 change, but add the condition
6548 that cols_ready_to_print not be decremented when printing across.
6549 The command `echo |pr -2ta' didn't terminate.
6550 (print_page): Rewrite conditional (that had side effects in second
6551 conjunct) using nested if statements to make it clear that we do
6552 indeed want those semantics.
6554 Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
6558 * system.h: Try BBSIZE if BSIZE isn't defined.
6559 From Tony Robinson <ajr@eng.cam.ac.uk>.
6561 Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
6563 * tail.c (tail_forever): Use an array of file descriptors
6564 instead of forking processes.
6565 (dump_remainder): Return number of bytes read.
6566 (tail_file): Fill in the new array.
6567 From Ian Lance Taylor.
6569 Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
6571 * system.h: Only define index, bcmp, etc. if not already defined.
6573 Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
6575 * tr.c (is_char_class_member): Remove unreached return after abort.
6577 Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
6579 * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
6580 sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
6581 of <ctype.h> and definitions of is* ctype macros to system.h.
6582 Change a few more uses of is* ctype macros to (protected) upper
6585 * system.h: Add isascii-protected ctype IS* macros.
6587 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
6589 * all files using getopt.h: Convert static declarations of
6590 struct option to use new macros from getopt.h: no_argument,
6591 required_argument, and optional_argument.
6593 Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
6595 * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
6597 * tr.c (main): Close stdin and stdout and check return status.
6599 Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6601 * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
6604 Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
6606 * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
6607 use isascii if it is defined.
6608 (is_char_class_member, make_printable_char, make_printable_str,
6609 non_neg_strtol): Use new macros instead of lower case ones
6612 * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
6613 macros like pr.c. Suggested by David J. MacKenzie.
6615 * od.c (print_ascii, dump_strings): Check for isascii before isprint.
6616 (dump_strings): Free malloc'd buffer before returning.
6617 (skip): Return non-zero if an error occurred, zero otherwise.
6618 Exit only if asked to skip beyond end of combined input.
6619 (check_and_close): New function.
6620 (skip, read_block, read_char): Call check_and_close when done
6621 processing the file associated with in_stream.
6622 (skip, read_block, read_char): Set have_read_stdin.
6623 (main): Close stdin (if it was ever read) and check for errors
6624 just before exiting.
6625 (write_block, dump_strings, dump): Don't test return value from
6626 functions that operate on streams. Rely on later ferror tests.
6628 Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6630 * sort.c (main, usage): Add -T option.
6632 Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6634 * tail.c (tail_forever, sigusr1, kill_kids): New functions to
6635 do -f on multiple files.
6636 (main): Call tail_forever.
6637 From Ian Lance Taylor.
6639 Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6641 * cut.c (cut_fields): Add cast.
6643 * od.c (decode_one_format): Remove '#' from pre_fmt_string;
6644 many systems don't support it.
6645 Conditionalize long double support on __STDC__, not __GNUC__.
6646 From Ian Lance Taylor.
6648 Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
6650 * sort.c (numcompare, keycompare): Add parentheses suggested
6651 by gcc -Wall. Put braces around individual monthtab initializers.
6653 * cksum.c: Declare error. Make checksum table `const.'
6655 * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
6657 * split.c (main): Add `default: abort();' to enumeration switch.
6659 * All files: Make all functions and extern variables static.
6660 Make all longopts arrays const as well as static.
6661 Make a couple statically initialized aggregates `const.'
6663 Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6665 * od.c (main): Make old-style format options accumulate.
6668 Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6670 * tr.c (look_up_char_class): Add cast.
6672 * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
6673 Add `const' to variable receiving value from re_compile_pattern.
6675 * wc.c (wc): If doing only -c, use st_size for regular files.
6677 * fold.c (fold_file): Was folding 1 column too early.
6678 From Eric Backus <ericb@lsid.hp.com>.
6680 * memset.c: New file.
6682 Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6684 * cksum.c: New file.
6686 Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6688 * tac.c (tac_stdin): Handle SIGPIPE.
6689 * sort.c (main): Handle SIGTERM.
6693 * system.h [USG || STDC_HEADERS]: Define bcmp.
6695 Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
6697 * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
6699 Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6701 * paste.c (main): Don't write on a string constant.
6703 Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
6705 * tr.c: Minor cleanup. Replaced some assert(0) with abort().
6707 Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6709 * cmp.c, cmp.1: Move to diff distribution.
6711 Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6713 * system.h: Change FOO_MISSING to HAVE_FOO.
6715 Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
6717 * pr.c (COLUMN): Add structure member to remember filename.
6718 (main, init_fps, open_file, close_file): Use it.
6720 (close_file): Don't decrement cols_ready_to_print when closing
6721 a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
6723 Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
6725 * cmp.c: --show-chars -> --print-chars.
6727 * pr.c: Rename some variables.
6729 Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6731 * system.h: Define DEV_BSIZE if not defined.
6733 Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
6735 * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
6737 Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6739 * sort.c (main): Don't stop processing args when we hit "-";
6740 treat it like a regular filename.
6741 From ian@airs.com (Ian Lance Taylor).
6743 * pr.c (print_page): Fix off by one line count when ^L is in input.
6744 From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
6746 Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
6748 * tr.c (validate): Change error message so it doesn't mention
6749 actual name of --truncate-set1 option. From David MacKenzie.
6751 Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
6753 * tr.c (string2_extend, validate): Give an error message when
6754 translating without --truncate-set1, with empty string2, and
6755 with non-empty string1. "tr 1 ''" produced a failed assertion.
6757 Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6759 * system.h: Change how ST_BLKSIZE is calculated to allow for
6760 non-POSIX systems that don't define BSIZE in sys/param.h.
6762 Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6764 * sum.c (main, bsd_sum_file): Don't print filename if BSD
6765 algorithm is used and only one file was given.
6767 Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
6769 * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
6770 with starting character equal to ending character. This is
6771 contrary to the POSIX spec, but what is already implemented
6772 in find_closing_delim.
6774 Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6778 * sort.c (numcompare, checkfp): Add parens to placate gcc2.
6780 * sort.c (mergefps): For -u, output the first, not last, of
6781 the lines that compare equal. From Mike Haertel.
6783 Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6785 * tr.c: Remove initial capitals and periods from error messages.
6787 Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
6789 * sum.c (main): Add -r option for SYSV compat.
6791 Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
6793 * sort.c (compare): If -s given, leave lines in their original order.
6794 (main): Recognize -s.
6795 (usage): Document -s.
6798 Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
6800 * sort.c (sort): Check for complete parsing of buffer into
6801 lines before nixing temp files.
6803 Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6805 * sum.c (sysv_sum_file): Use %lu instead of %u to print a
6806 long. Not that it matters for GNU . . .
6808 * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
6809 (append_normal_char, append_range, append_char_class,
6810 append_repeated_char, append_equiv_class, spec_init):
6811 Initialize `next' field of new `struct List_element'.
6812 From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
6814 Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
6816 * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
6818 Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6822 * nl.c: Support multiple files and "-" for stdin.
6823 (main): Check for read and write errors.
6824 (nl_file): New function.
6826 Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6828 * tr.c (main): -t option was called -b in getopt spec.
6829 (validate): Don't warn that set1 is longer than set2.
6831 * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
6833 Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6835 * nl.c: New program from bin-src.
6837 * nl.c (main): Use a struct linebuffer for line_buf.
6838 (process_file): Use readline instead of fgets, to preserve NULs.
6839 (check_section): Use memcmp instead of strncmp.
6840 (proc_text): Print line_buf with fwrite instead of printf.
6842 * nl.c (main): Usage message if too many args given. Check
6843 for error in closing input file. Lengths of section delimiter
6844 strings were 1 too large. Take separator_str into account in
6845 length of print_no_line_fmt.
6846 (build_print_fmt): Allocate space for print_fmt, in case
6847 separator_str is long.
6848 (proc_text): A blank line is one that contains nothing, not
6849 even nonprinting characters.
6851 Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6853 * All programs: Document `--' instead of `+' to introduce
6854 long-named options, in usage messages.
6856 * sum.c (bsd_sum_file): Renamed from sum_file.
6857 (sysv_sum_file): New function.
6858 (main): Recognize an option to select between the algorithms.
6860 Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
6862 * pr.c (close_file, print_page): Fixed bug that had the command
6863 yes |head |pr -t printing "yyyyyyyyyy".
6864 * (print_page): Fixed bug that had pr -3 -a printing two too few
6865 trailer lines per page.
6866 * (main): Added restriction that -a and -m are incompatible.
6867 Although the POSIX spec doesn't explicitly say they shouldn't
6868 be used together, it says -a modifies the -column option and
6869 that -column shouldn't be used with -m.
6871 Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
6873 * nl.c: Include regex.h after, not before, sys/types.h.
6875 Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
6877 * sort.c (fillbuf) return bytes buffered instead of bytes read.
6879 Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
6881 * sort.c (LINEALLOC): New #define.
6882 (struct lines): New field ``limit''.
6883 (initlines): Set it from new arg ``limit''.
6884 (sort, mergefps, checkfp): Pass new arg to initlines().
6885 (findlines): Don't realloc past lines->limit.
6887 Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6889 * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
6890 HAVE_UNISTD_H and _POSIX_VERSION.
6892 * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
6894 Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
6896 * tr.c: Fixed an inaccurate comment on posix_pedantic.
6898 Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
6900 * tr.c: Changed underscores to hyphens in long option name
6901 "sysv_string2_truncate".
6903 Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6905 * tac.c (main): Set obscure_syntax to tell re_search to
6906 allocate memory for the group registers.
6908 Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6910 * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
6911 signal, which POSIX doesn't have.
6912 * sort.c: Replace inthandler and huphandler with sighandler.
6913 * csplit.c (main): Only handle signals if they were not being
6916 * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
6918 Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
6920 * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
6921 * tr.c (squeeze_filter): Comment a little on why it's better
6922 to step through the input by two.
6923 * tr.c (set_initialize): Write a comment describing the function.
6924 * tr.c: Eliminated the variable `portability_warnings' and replaced
6925 references to it by references to `!posix_pedantic'. One of the
6926 uses of portability_warnings had been wrong.
6928 Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6930 * tr.c: New program.
6932 Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6934 * linebuffer.[ch] (freebuffer): New function (used by cron).
6936 Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6938 * system.h, configure, Makefile.in: Don't include memory.h if
6939 STDC_HEADERS, removing need for MEMORY_H_MISSING.
6941 Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
6943 * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
6944 Somehow, part of my patch didn't make it last time.
6946 Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
6948 * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
6950 * cmp.c (cmp): Print EOF message to stderr, not stdout, for
6953 * sort.c (xfwrite): fwrite never returns < 0, so check if
6954 number written is number we asked to write.
6955 (fillbuf, main): fread never returns < 0, so check ferror instead.
6958 Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
6960 * pr.c (print_page): Really fixed `extra newline at EOF' problem.
6961 * (store_columns): Fixed bug that caused `pr -b -2' to coredump
6962 on files of certain lengths.
6964 Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
6966 * pr.c (print_page): Fixed to not add single spurious newline
6967 at EOF when using -t.
6969 Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
6971 * pr.c (print_page): Don't pad the page if -t given.
6973 * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
6975 Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
6979 * configure, system.h: Include memory.h if it works.
6981 * split.c: Allow `b' unit as well as `k' and `m'.
6983 * head.c, tail.c: Replace -b +blocks option with specifying
6984 units (b, k, or m) after the number.
6985 (parse_unit): New function.
6987 * fold.c (main): Check that -w arg is a number.
6989 * cut.c: +delimiter takes an arg.
6991 Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
6993 * pr.c (close_file): Don't close an already closed file.
6995 Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
6997 * memchr.c: New file.
6998 * configure: Check if it's needed.
7000 * csplit.c, gcsplit.1: New program.
7002 * pr.c (cleanup): Only free buffers if they were allocated.
7004 * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
7006 Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
7008 * pr.c: The following 3 bugs appeared (at least) when printing
7009 a single file with the options `-3 -f'.
7010 * (print_white_space): Single spaces were being replaced
7012 * (print_page): Some lines were getting too much white space
7013 at the beginning because spaces_not_printed wasn't being reset
7015 * (read_line): The single space between a truncated column
7016 on its left and the column on its right was omitted. Fixed
7017 so that previous value of input_position is restored before
7020 Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7022 * configure: Only remove /etc from PATH when it's not part of
7025 Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
7027 * linebuffer.c (readline): Fix incorrect recalculation of `end'.
7029 * head.c, tail.c: Replace `mode' variables and bitmasks with
7030 separate variables for each option.
7032 Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
7034 * wc.c: New program.
7036 Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
7038 * fold.c (fold_file): Read in an int, not a char, for EOF
7041 * configure: Check whether st_blksize is missing.
7043 * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
7044 defined, instead of /tmp.
7046 Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7048 * xwrite.c [POSIX]: unistd.h might require sys/types.h.
7050 Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7052 * paste.c (main): Consider -d "" to be like -d "\0",
7053 for POSIX (if I read it right).
7055 * sort.c, join.c: New programs.
7057 * cut.c (set_field): Allow blanks as well as commas to
7058 separate numbers in ranges.
7060 Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
7062 * pr.c: Failure to open an input file is no longer a fatal error.
7063 A message is printed for each failed open. When printing
7064 in parallel, each failed open results in one fewer output column.
7065 Added POSIX -r option to suppress the message.
7066 * pr.c: Added variables: failed_opens, ignore_failed_opens.
7067 These changes were based in part on work by David MacKenzie.
7069 Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
7071 * pr.c: Complain if user gives both -m and -[0-9]+ options.
7073 Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
7077 Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7079 * expand.c: Rename some variables.
7080 (expand): Don't access value off end of array.
7081 * unexpand.c: Rename some variables.
7082 (unexpand): Don't access value off end of array.
7083 Instead of copying tabs verbatim and flushing pending spaces
7084 when one is reached, count them as the proper number of
7085 pending spaces. Instead of changing tabs to single spaces if
7086 the tabstop list is exhausted, print the rest of the line
7087 unchanged (for POSIX).
7089 Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7091 * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
7092 Clear EOF and error conditions on stdin so it can be reused.
7094 * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
7095 as commas to separate tabstops, for POSIX.
7096 * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
7097 the output; send it directly to stdout.
7098 * unexpand.c (main): Make -t stupidly imply -a for POSIX.
7099 (unexpand): If a tab stop list was given and we move past its end,
7100 copy the rest of the line verbatim.
7102 * split.c (convint): New function to allow 'm' and 'k' after
7104 (main): Use it. Change -c option to -b for POSIX.
7106 Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7108 * pr.c: Protect isdigit with isascii, if required.
7110 Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
7112 Most of the following is from Paul Eggert:
7113 * cat.c (main): If stdin is read, check close at end.
7114 * cmp.c (main): Check for stdin being closed.
7115 Check for close errors on stdin and stdout.
7116 (cmp): Return a value instead of exiting.
7117 * cut.c (cut_file): New function, from code in main.
7118 Check for read errors.
7119 (main): Check for close errors.
7120 * expand.c, unexpand.c (main): Check for close errors.
7121 (next_file): Go to next file if one can't be opened.
7122 Check for close errors.
7123 * head.c (main), tail.c (main): If stdin was read, check for
7125 * head.c (head_file), tail.c (tail_file): Check for close errors.
7126 * paste.c (main, paste_parallel, paste_serial), tac.c (main):
7127 Check for close errors. Close stdin if it was read.
7128 * split.c (main): Check for close errors.
7130 * configure, Makefile.in's: Support +srcdir option.
7131 Make config.status. Fix up clean targets.
7133 Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
7135 * linebuffer.h (struct linebuffer): Add a field to indicate
7136 the number of valid chars in the line.
7137 * linebuffer.c (initbuffer, readline): Fill it in.
7138 * uniq.c, comm.c: Use it.
7140 * pr.c (main): Check stdin and stdout fclose for errors.
7141 (init_parameters): If there's no room for header and footer,
7142 omit them rather than dying (for POSIX).
7143 (init_header): Take a file descriptor as additional arg.
7144 (init_fps): Change callers. Note when stdin is read.
7145 (open_file): For filename "-" use stdin.
7146 (close_file): Don't close stdin. Check close for errors.
7147 (print_char, char_to_clump): Use isprint instead of explicit
7150 * memcmp.c: New file (needed for comm).
7151 * bcopy.c: New file (needed for fold).
7152 * system.h: Don't define bcopy as memcpy.
7153 * configure: Check for bcopy and memcmp.
7155 * uniq.c (main): Use "-" instead of NULL to mean stdin or
7157 (check_file): Use "-" instead of NULL to mean stdin or stdout.
7158 Check readline return instead of for NUL character to
7160 Check fclose for errors.
7161 (find_field): Use linebuffer length, not NULs, to detect end
7163 (different): New function, replaces compare. Uses memcmp
7165 (writeline): Use fwrite instead of fputs so NULs are preserved.
7167 * comm.c (compare_files): Return an error indication.
7168 Don't take a filename of NULL to mean stdin.
7169 Use memcmp instead of strcmp to allow for NULs.
7170 Check fclose for errors.
7171 (writeline): Use fwrite instead of fputs so NULs are preserved.
7173 * sum.c (sum_file): Take an arg indicating whether to print
7174 the filename, and don't take NULL meaning stdin. Set a flag
7175 when we read stdin. Check fclose return for errors.
7176 (main): If stdin was read, check fclose return for errors.
7177 Use filename of "-" if no args given.
7179 Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7181 * fold.c: Rewritten from scratch for POSIX.
7183 Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7185 * split.c (line_bytes_split): Use xmalloc instead of alloca.
7186 * system.h: Don't declare alloca.
7188 * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
7189 * system.h: Define SEEK_ macros if not defined.
7191 * pr.c: Rename variable `truncate' to avoid library function conflict.
7193 Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7195 * linebuffer.c, linebuffer.h: New files.
7196 * comm.c, uniq.c (initbuffer, readline): Functions
7197 removed (use versions in linebuffer.c).
7199 Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
7201 * sum.c (sumfile): Always print 5 digits for second number, too.
7202 Interpret "-" to mean stdin.
7204 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
7206 * uniq.c: Use isblank instead of isspace, to support POSIX.2.
7207 * comm.c, pr.c, uniq.c (concat, fatal, error,
7208 pfatal_with_name, xmalloc, xrealloc): Functions removed.
7210 Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7212 * nl.c: Add long-named options. Doc fixes.
7214 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7216 * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
7218 * xwrite.c [POSIX]: Include unistd.h.
7219 [STDC_HEADERS]: Don't declare errno.
7221 Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7223 * uniq.c: Add long-named options. Remove marginally useful -z
7224 option (zero padded repeat counts).
7226 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7228 * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
7229 (cwrite), head.c (head_file), cat.c (main): Check close return
7230 value for delayed error report due to NFS.
7232 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7234 * cat.c: Replace "uchar" with "unsigned char", to avoid
7235 problems with various systems' typedefs.
7237 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
7239 * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
7240 operation is unsupported, for HP-UX 7.0.
7242 Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
7244 * sum.c: Always print five digits for first number.
7246 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
7248 * cat.c, cmp.c: Don't use fileno(); not needed.
7250 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
7252 * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
7254 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
7256 * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
7258 (enlarge_line): Adjust inbufp and outbufp.
7260 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7262 * cat.c: Declare free returning void, not int, so it
7263 doesn't bomb on Xenix.
7265 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
7267 * tac.c: Print error messages before calling cleanup, not after.
7269 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7271 * tac.c (cleanup): Return SIGTYPE, not int.
7273 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
7275 * cut.c (main, usage): Add -b and -n options for POSIX.
7276 (set_fields): Don't allow SPC or TAB as number separators.
7278 * paste.c (paste_parallel): If open of any file fails, quit
7281 Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
7283 * pr.c: Add POSIX -F option (same as -f).
7285 * uniq.c (check_file): Allow '-' to mean stdin or stdout.
7287 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7289 * head.c, tail.c: Change `chars' to `bytes' globally.
7290 (main, usage): Use POSIX.2 draft 10 option syntax.
7292 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7294 * cat.c (main): Don't delay error messages, so they appear
7296 (main, simple_cat, cat): Make errors in input files nonfatal.
7298 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7300 * cat.c: Remove -c option added for POSIX draft 9, since POSIX
7301 draft 10 removed it.
7303 * tac.c (tac_stdin): Use fstat instead of lseek to determine
7304 whether stdin is seekable, because lseek silently fails on
7305 some special files, like tty's.
7306 tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
7307 don't turn off -f for non-regular files (assume the user knows
7308 what he's doing; it might work for fifo's and sockets).
7310 * paste.c (main): If no files given, use stdin.
7311 Don't let collapse_escapes write on string constant (delim default).
7312 (paste_parallel): Don't close stdin.
7314 * cut.c (main): Use standard input for filename of "-".
7316 * comm.c (compare_files): Allow '-' to mean stdin.
7318 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7320 * cut.c (enlarge_line): Take an arg giving the required amount
7321 of space. Change callers.
7322 (main): Don't allow -t'<TAB>' without -f.
7323 Make `delim' unsigned to fix sign extension problem in comparison.
7325 Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
7327 * pr.c Deleted excess whitespace from ends of lines.
7328 Modified to work with current version of getopt, which
7329 returns 1 instead of 0 for non-options.
7330 Reversed the meaning of the -f option, to be compatable
7333 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
7335 * cmp.c (main, usage): Rename -L option to -c and don't have
7337 (printc): Take an arg to specify number of chars to pad to,
7338 for column alignment.
7339 (cmp): Respect flag_print_chars in default output format.
7340 Align columns for cmp -cl.
7342 Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
7344 * cmp.c: For +show-chars, have getopt return 'L' so
7345 `flag_print_chars' gets set.
7347 Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
7349 * tac.c (main): Initialize fastmap and translate fields of
7350 regex before compiling it.
7352 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7354 * tac.c: Change +regexp to +regex for consistency with GNU find.
7356 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7358 * cat.c (cat): If FIONREAD is available, only use it if it is
7359 supported by the filesystem that the file is on.
7361 Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7363 * cat.c (main): Add a variable to control whether the check
7364 for input file == output file is made, because no values of
7365 st_dev and st_ino should be assumed to be available for this
7366 purpose. Only do the check for regular files.
7368 * tac.c: Use bcopy instead of memcpy.
7370 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
7372 * head.c: Use longs instead of ints for file offsets, for 16
7375 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7377 * cmp.c: Change some ints to longs for 16 bit machines.
7378 (bcmp_cnt): Make char-pointer counting slightly simpler.
7380 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7382 * cat.c (main): Allow input file to be output file for devices
7383 (ttys, etc.). Check whether input file is output file when
7384 reading standard input. Print any error messages for standard
7387 * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
7388 machines as well as 32 bit ones.
7389 * cmp.c, tail.c: Use longs instead of ints for file offsets.
7391 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7393 * cmp.c: Fix some exit statuses for POSIX.
7395 Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
7397 * tac.c: Use regular expressions as the record boundaries.
7398 Give better error messages.
7399 Reformat code and make it more readable.
7400 (main): Use getopt_long to parse options.
7401 (tac_stdin): Do not make a temporary file if standard input
7403 (tac_file): New function.
7404 (tac): Take an open file desc as an arg.
7405 (output): Rewrite to use its own efficient buffering.
7406 (xmalloc, xrealloc, xwrite): New functions.
7408 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7410 * head.c, tail.c: Use `error' instead of `fatal_perror' and
7411 `nonfatal_perror'. Remove some unnecessary info from messages.
7413 Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7415 * comm.c (main): Pass the list of files to compare_files as a
7416 char ** instead of a char *.
7417 (compare_files): Make arg a char **.
7419 * uniq.c: Declare some functions as void.
7420 Change global vars `countmode' and `mode' from ints to enums.
7421 (main): Use getopt to parse options and support POSIX options.
7422 Don't use integer_arg to parse numbers, since `-#' can't be
7423 parsed that way using getopt.
7424 (find_field): Use isspace for finding fields boundaries.
7426 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
7428 * comm.c (main): Call usage if given bad option or wrong
7429 number of args. Exit with 0 status normally.
7430 (usage): New function.
7431 Declare some other functions as void.
7433 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
7435 * cmp.c (main, cmp, usage): Replace -q +quick option with -L
7436 +show-chars option to add ASCII representation of bytes to -l format.
7438 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
7440 * cmp.c (cmp): Change EOF message for POSIX compatibility.
7441 For -l format, clear bits > FF.
7443 Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7445 * tail.c: Move global `errors' into main instead of having
7446 nonfatal_perror set it.
7447 (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
7448 Return an error status.
7449 (file_lines, start_chars, start_lines): Reverse the meaning of
7451 (tail_lines, tail_chars): Account for that reversal.
7453 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7455 * head.c: Move global `errors' into main and have the various
7456 functions return an error status instead of setting it in
7459 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
7461 * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
7462 options specified), to compare the two blocks and count
7463 newlines simultaneously.
7464 * cmp.c New function: bcmp_cnt.
7466 * cmp.c (main): Test if output is redirected to /dev/null, and
7467 assume `-s' if this is so.
7469 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7471 * cat.c: Change `argbad' from a char to a short, so it will
7472 work on machines with unsigned chars.
7474 Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
7476 * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
7477 Remove unneccessary variable `c1'. If -l was given, increase
7478 `char_number' by the number of bytes read, after producing output,
7479 rather than by the offset of the first differing bytes, before
7481 Replace if-else-if constructions with case statements for clarity.
7482 (bcmp2): Rename `n' to `nread'.
7484 Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
7486 * nl.c (proc_text): Use re_search instead of re_match.
7488 Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
7490 * nl.c: Indent. Un-nest statements. Use GNU regexp functions
7491 instead of System V ones. Move function declarations together.
7492 (quit): Remove useless function.
7493 (program_name): New variable for error messages.
7494 (main): Use perror in error message.
7495 (xmalloc): New function to replace myalloc.
7496 (myalloc): Function removed.
7497 Global: use program_name and xmalloc.
7499 Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
7501 * uniq.c: Declare some functions.
7502 (main): Initialize infile and outfile. Call usage if given
7503 invalid args. Normally exit with 0 status instead of garbage.
7504 (usage): New function to print usage message and exit.
7505 (check_file): Remove unused variable.
7506 (readline): Compare against EOF, not < 0.
7507 (xmalloc, xrealloc): Return char *, not int.
7508 Ok to return 0 if 0 bytes requested.
7509 (lb1, lb2): Remove unused global vars.
7510 (concat): Remove unused function.
7512 Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
7514 * comm.c: Remove unused global variables lb1, lb2.
7515 (main): Remove unneeded variable.
7516 (compare_files): Remove unused arg.
7517 (readline): un-nest assignment. Test against EOF instead of < 0.
7518 (error): Print to stderr, not stdout.
7519 (xmalloc, xrealloc): Return char * instead of int.
7520 Returning 0 is ok if 0 bytes requested (ANSI C).
7524 version-control: never