1 1999-04-18 Jim Meyering <meyering@ascend.com>
5 * Makefile.maint (my-distcheck): Use AMTAR, not TAR.
7 * src/sort.c (usage): s/DIRECT/DIRECTORY/g
8 Rename global: s/temp_file_prefix/temp_dir/.
9 (NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,
10 not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than
12 (tempname): Wrap after 99999 only for length-impaired file systems.
14 1999-04-17 Jim Meyering <meyering@ascend.com>
16 * src/tail.c (file_lines): Fix serious bug introduced with last changes.
19 1999-04-15 Jim Meyering <meyering@ascend.com>
21 * tests/Makefile.am (EXTRA_DIST): Rename .posix-warn to .env-warn.
22 (check-local): Warn about CDPATH in the same way
23 we warn about POSIXLY_CORRECT, since the cp/same-file test fails at
24 least when using bash with CDPATH set. Reported by Mark Hewitt.
26 * src/pr.c Add comments.
27 (init_header): Tweak white space in Date/Time header.
28 * tests/pr/Test.pm: Updated all tests to reflect the big
29 1999-02-13 change. From Roland Huebner.
31 1999-04-12 Jim Meyering <meyering@ascend.com>
33 * src/cat.c (main): Declare out_dev to be of type dev_t, not `int'.
34 Declare out_ino to be of type ino_t, not `int'.
37 * src/od.c (MIN, MAX): Remove definitions.
38 * src/sys2.h (MIN, MAX): Define here instead.
39 Reported by John Bley.
41 1999-04-11 Jim Meyering <meyering@ascend.com>
45 * tests/pr/Test.pm (test_vector): Disable all tests while I wait for
48 Fix the problem whereby `yes > k & sleep 1; tail -2c k' would infloop.
49 * src/tail.c (COPY_TO_EOF): Define.
50 (dump_remainder): Add parameter, n_bytes, and rewrite to use it.
52 (file_lines): Rename parameter.
53 (tail_bytes): Remove obsolete comment.
55 Fix the problem whereby `yes > k & sleep 1; tail -1 k' would infloop.
56 * src/tail.c (dump_remainder): Move this function to precede the
57 new use in file_lines.
58 (tail_lines): Don't call dump_remainder here.
59 (file_lines): Call dump_remainder here instead.
60 Reported by Lehti Rami.
62 * lib/readtokens.c (readtoken, readtokens): Protoize.
64 1999-04-10 Jim Meyering <meyering@ascend.com>
66 * src/tail.c (xwrite): Use STDOUT_FILENO instead of literal `1'.
68 1999-04-04 Jim Meyering <meyering@ascend.com>
70 * src/cat.c: Standardize --help and --version processing.
71 * src/comm.c: Likewise.
72 * src/csplit.c: Likewise.
73 * src/cut.c: Likewise.
74 * src/expand.c: Likewise.
75 * src/fmt.c: Likewise.
76 * src/fold.c: Likewise.
77 * src/head.c: Likewise.
78 * src/join.c: Likewise.
79 * src/md5sum.c: Likewise.
82 * src/paste.c: Likewise.
84 * src/ptx.c: Likewise.
85 * src/split.c: Likewise.
86 * src/sum.c: Likewise.
87 * src/tac.c: Likewise.
88 * src/tail.c: Likewise.
90 * src/unexpand.c: Likewise.
91 * src/uniq.c: Likewise.
94 1999-03-29 Jim Meyering <meyering@ascend.com>
96 * configure.in (GNU_PACKAGE): Remove related code -- now it's in
97 the catch-all for shared autoconf code, m4/jm-macros.m4.
98 (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
101 1999-03-26 Jim Meyering <meyering@ascend.com>
103 * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
104 (noinst_HEADERS): Add version-etc.h.
106 1999-03-25 Jim Meyering <meyering@ascend.com>
108 * src/tail.c (recheck): Factor out a block of duplicated code.
109 Set f->size to 0 upon encountering a new file so we read it from
110 the beginning rather than from then end of the first line or
111 block. Otherwise, after a log rotation, tail would omit the first
112 line or block of the new file. Reported by Ed Avis.
114 1999-03-20 Jim Meyering <meyering@ascend.com>
116 * tests/Makefile.am (SUBDIRS): Temporarily remove pr.
118 1999-03-13 Jim Meyering <meyering@ascend.com>
120 * src/tac.c: (tac_mem): `#if-0'-out this unused function.
121 (tac_stdin_to_mem): Likewise.
123 * doc/textutils.texi (cut invocation): Describe --output-delimiter.
125 1999-03-12 Jim Meyering <meyering@ascend.com>
127 * src/sys2.h (SETVBUF): Define new macro.
128 * src/tail.c (dump_remainder): Don't fflush stdout here.
129 (main) [if forever]: Make stdout unbuffered, instead.
130 Akim Demaille pointed out that when running `echo x>a; tail -f a>>a' ,
131 the file `a' didn't grow longer than two lines. Now it grows
134 1999-03-07 Jim Meyering <meyering@ascend.com>
136 * tests/md5sum/newline-1: Test for the actual feature.
137 With help from Eli Zaretskii.
139 * src/pr.c (usage): Add missing \n\.
141 The newline test would always fail on MSDOS/Windows systems --
142 so move it to a separate file where we can test for that.
143 * tests/md5sum/basic-1: Remove newline test.
144 * tests/md5sum/newline-1: New file.
145 * tests/md5sum/Makefile.am (TESTS): Add newline-1.
146 Pointed out by Eli Zaretskii.
148 1999-02-13 Roland Huebner <rh@pelikan.cologne.de>
150 (main): Redefine options -s, -w to be POSIX compliant; introduce
151 new options -J, -S, -W to disentangle -s and -w when used together
152 with the three column options;
153 (add_line_number): Make POSIX compliant; use default number
154 separator TAB with single column output.
155 (add_line_number): Make POSIX compliant; with multicolumn output
156 now prefer `text columns of equal width' rather than a consequent
157 use of `default n-separator TAB'.
158 (add_line_number): Change line number cut-off from lower-oder to
159 higher-oder digit to avoid loss of information; no consequent
160 handling exists in different utilities and other UNIXes.
161 (char_to_clump): Expand input text tabs to 8 spaces, if
162 input_tab_char doesn't equal TAB (adapted to other UNIXes).
163 (usage): Update POSIX compliant options -s, -w; add new options -J,
165 (main): Update the source internal documentation.
166 Some smaller BUGFIXES (print_sep_string, init_header, skip_to_page,
167 reset_status, print_header).
169 * tests/md5sum/basic-1 (backslash): Use .\foo instead of \.foo so we
170 don't tramp on root directory in MSDOS/Windows.
171 Suggestion from Eli Zaretskii.
173 1999-02-15 Eli Zaretskii <eliz@is.elta.co.il>
175 * tests/md5sum/Makefile.am (TESTS_ENVIRONMENT): Run md5sum with the
176 --text option (for MSDOS).
178 1999-03-06 Jim Meyering <meyering@ascend.com>
180 * src/cut.c (getstr): Change type of `delim' parameter from char to int.
181 (cut_fields): Cast to `unsigned char' before comparing.
182 (main): Cast to `unsigned char' before assigning.
184 * tests/cut/Test.pm: Add a test to exercise the bug.
186 * src/ptx.c (swallow_file_in_memory): Use a `%s' format in error call,
187 in case the argument string contains a `%'.
189 * src/fmt.c (main): Likewise.
190 * src/sort.c (main): Likewise.
192 1999-02-13 Eli Zaretskii <eliz@is.elta.co.il>
194 * src/sys2.h [__DJGPP__]: Include <io.h> and <sys/exceptn.h>.
196 * src/ptx.c (swallow_file_in_memory): Slurp up the whole file at
197 once on MSDOS as well, but we have to relax the test for whether
198 reading it succeeded.
200 1999-03-03 Jim Meyering <meyering@ascend.com>
202 * src/cat.c: Include long-options.h
203 [long_options]: Remove the "help" and "version" entries.
204 Remove declarations of show_help and show_version.
205 (main): Use parse_long_options, including author name(s).
206 Remove the show_version and show_help blocks.
207 * src/cksum.c: Likewise.
208 * src/comm.c: Likewise.
209 * src/csplit.c: Likewise.
210 * src/cut.c: Likewise.
211 * src/expand.c: Likewise.
212 * src/fmt.c: Likewise.
213 * src/fold.c: Likewise.
214 * src/head.c: Likewise.
215 * src/nl.c: Likewise.
216 * src/od.c: Likewise.
217 * src/paste.c: Likewise.
218 * src/pr.c: Likewise.
219 * src/split.c: Likewise.
220 * src/sum.c: Likewise.
221 * src/tac.c: Likewise.
222 * src/tail.c: Likewise.
223 * src/tr.c: Likewise.
224 * src/unexpand.c: Likewise.
225 * src/uniq.c: Likewise.
226 * src/wc.c: Likewise.
228 * src/ptx.c: Include long-options.h
229 [long_options]: Remove the "help" and "version" entries.
230 Remove declarations of show_help and show_version.
231 (main): Remove `const' attribute from dcl of argv parameter.
232 Call bindtextdomain and textdomain.
233 Use parse_long_options, including author name(s).
234 Remove the show_version and show_help blocks.
236 * src/join.c (main): Include author name argument in call to
238 * src/md5sum.c (main): Likewise.
239 * src/sort.c (main): Likewise.
240 * src/tsort.c (main): Likewise.
242 1999-02-07 Jim Meyering <meyering@ascend.com>
246 * Makefile.maint (my-distcheck): Don't depend on dist, now that this
247 is hooked up to the distcheck rule.
248 * Makefile.am (distcheck-hook): New target and rule -- link to shared
249 rule, my-distcheck, in Makefile.maint.
251 1999-01-31 Jim Meyering <meyering@ascend.com>
253 * doc/textutils.texi: Wrap the @top node in @ifnottex instead of
254 @ifinfo so `makeinfo --html ...' works. From Karl Berry.
256 1999-01-30 Jim Meyering <meyering@ascend.com>
258 * acconfig.h: Remove lots of `#undef's, now that we use the
259 3-argument forms of AC_DEFINE* macros.
261 * configure.in: Require autoconf 2.13.
262 Use 3-argument form of AC_DEFINE*.
264 1999-01-24 Jim Meyering <meyering@ascend.com>
266 * src/tac.c (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.
268 * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
269 (and hence that of the local `n1', too) to `int' at Paul's request.
271 1999-01-18 Akim Demaille <demaille@inf.enst.fr>
273 * doc/textutils.texi: Harmonization of @samp use for options.
275 1999-01-17 Jim Meyering <meyering@ascend.com>
277 * Makefile.am (SUBDIRS): Add djgpp.
278 * configure.in (AC_OUTPUT): Add djgpp/Makefile.
279 * djgpp/: New directory.
281 * man/Makefile.maint ($(man_MANS)): Don't remove the target (the
282 man page) until after we've created its replacement.
284 1999-01-16 Eli Zaretskii <eliz@is.elta.co.il>
286 * GNUmakefile: Add SHELL = /bin/sh.
287 * man/GNUmakefile: Likewise.
289 1999-01-16 Jim Meyering <meyering@ascend.com>
291 * acconfig.h: Remove @BOTTOM@ section.
292 Instead, add the define and decl via m4/jm-macros.m4.
294 * lib/argmatch.h (XARGMATCH): Define to return a value once again.
295 (XARGCASEMATCH): Likewise.
297 * lib/argmatch.c (EXIT_FAILURE): Define.
298 (ARGMATCH_DIE): Provide default.
299 (__xargmatch_internal): New function.
300 s/rogram_name/program_name.
303 1999-01-14 Jim Meyering <meyering@ascend.com>
305 * tests/md5sum/basic-1: Use `f', not `x' as temp. file name to avoid
306 warnings from perl5.004.
307 Reported by Volker Borchert.
309 * lib/long-options.c (parse_long_options): Rename `usage' parameter
310 to avoid shadowing globally scoped function.
312 1999-01-14 Akim Demaille <demaille@inf.enst.fr>
314 * acconfig.h: Add a @BOTTOM@ section.
315 (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1).
317 * src/*.c: Don't prototype usage as static.
319 1999-01-10 Jim Meyering <meyering@ascend.com>
323 All of the following new code is protected by
324 `#if DONT_UNLINK_WHILE_OPEN'
325 * src/tac.c (file_to_remove): New global.
326 (fp_to_close): New global.
327 (unlink_tempfile): New function.
328 (record_tempfile): New function.
329 (save_stdin): Call record_tempfile.
331 (main): Use SET_BINARY and SET_BINARY2.
334 1999-01-09 Jim Meyering <meyering@ascend.com>
336 * tests/uniq/Test.pm: Add tests from Jochen Hein.
337 * src/uniq.c: New option: --all-repeated (-D).
338 (output_all_repeated) [output_mode]: New enum value.
339 (usage): Describe it.
340 (writeline): Test for new mode.
341 (check_file): Likewise.
342 Based on patches from Jochen Hein and Florin Iucha.
343 (main): Diagnose `too many arguments'.
345 * tests/head/Test.pm (null-1): Add test from Jochen Hein.
347 * src/tail.c (parse_obsolescent_option): Interpret `number' as decimal.
348 (parse_options): Likewise.
349 Reported by Kamal Paul Nigam.
351 * src/tail.c: New option: --max-unchanged-stats=N.
352 New option: --max-n-consecutive-size-changes=N.
354 1999-01-03 Jim Meyering <meyering@ascend.com>
356 * src/md5sum.c (usage): Remove third program_name argument -- there
357 were only two `%s' in the format string.
359 1999-01-02 Jim Meyering <meyering@ascend.com>
361 * src/tsort.c (tsort): Use a single call to error instead of two
363 (main): Remove `%s: ' prefix on format string.
365 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
367 * src/ptx.c (format_vals): New array.
368 (main): Use XARGMATCH in place of argmatch.
370 * lib/argmatch.h (XARGMATCH): Don't return a value; instead,
371 modify a parameter. Add a `Die_stmt' parameter.
373 * lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
374 (argmatch_to_argument): Add `const' attribute to first parameter.
376 1999-01-01 Jim Meyering <meyering@ascend.com>
378 * src/tsort.c: Move inclusion of assert.h to follow that of stdio.h.
379 Some losing systems require this.
380 Use STREQ macro instead of strcmp in a few places.
382 * po/POTFILES.in: Add tsort.c.
384 * man/Makefile.maint ($(man_MANS)): `exit 1' if any of help2man,
385 chmod, or mv fails. Otherwise, the failure could go unnoticed.
387 * man/Makefile.summ: Add entries for ptx and tsort.
389 * src/tsort.c: Include readtokens.h.
390 (zeros): Rename global from `rr'.
391 (getstr): Remove function.
392 (tsort) Use readtoken instead of getstr.
394 * lib/readtokens.c: New file.
395 * lib/readtokens.h: New file.
396 * lib/Makefile.am (libtu_a_SOURCES): Add readtokens.c.
397 (noinst_HEADERS): Add readtokens.h.
399 * man/Makefile.am (man_MANS): Add ptx.1.
400 * man/ptx.x: New file.
402 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
404 * man/Makefile.am (man_MANS): Add tsort.1.
405 * man/tsort.x: New (essentially empty) file.
407 * src/tsort.c: Rename globals N and R so they don't shadow locals.
408 (tsort): Rename from `sort'.
410 1998-11-07 Mark Kettenis <kettenis@phys.uva.nl>
411 * src/Makefile.am (bin_PROGRAMS): Add tsort.
412 * src/tsort.c: New program.
414 * lib/Makefile.am (libtu_a_SOURCES): Add quotearg.c.
415 (noinst_HEADERS): Add quotearg.h.
417 ============================
418 All of the following are from:
419 1998-04-17 Eli Zaretskii <eliz@is.elta.co.il>
421 * src/system.h (SET_BINARY, SET_BINARY2, fileno, setmode): New
424 * src/cat.c (usage) [O_BINARY]: Describe -B,--binary option.
425 (main) [O_BINARY]: binary_files, binary_output, file_open_mode:
426 new variables. Add --binary to long_options[]. Switch stdin and
427 stdout to binary mode unless file contents are not important
428 anyway. Open files in binary mode when required.
430 * src/cksum.c (cksum) [O_BINARY]: Read redirected stdin in binary
433 * src/expand.c (expand): Use binary I/O where appropriate.
435 * src/head.c (head_bytes, head_lines) [O_BINARY]: Use binary I/O.
437 * src/md5sum.c (OPENOPTS) [O_BINARY]: Use binary I/O when non-zero
439 (md5_file) [O_BINARY]: Switch redirected stdin to binary mode.
440 (main) [O_BINARY]: Use binary reads by default on those systems
441 which care about the difference.
443 * src/od.c (skip, read_char, read_block) [O_BINARY]: Switch input
444 stream to binary mode.
446 * src/sort.c (PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max
447 file name characters in a given directory.
448 (tempname): Make sure the temp file name is unique even if long
449 file names aren't supported.
451 * src/split.c (cwrite) [O_BINARY]: Write output in binary mode.
452 (main) [O_BINARY]: Read input in binary mode.
454 * src/sum.c (bsd_sum_file, sysv_sum_file) [O_BINARY]: Read input
457 * src/tac.c (record_tempfile, unlink_tempfile)
458 [DONT_UNLINK_WHILE_OPEN]: New functions, for systems where a file
459 cannot be removed before it is closed.
460 (save_stdin) [DONT_UNLINK_WHILE_OPEN]: Record the temporary file,
461 to be removed before exit.
462 (tac_file, save_stdin, main): Use binary I/O when appropriate.
464 * src/tail.c (tail_lines, tail_bytes) [O_BINARY]: Use binary I/O
467 * src/tr.c (main) [O_BINARY]: Use binary I/O when appropriate.
469 * src/unexpand.c (unexpand): Use binary I/O where appropriate.
471 * src/wc.c (wc): Use binary mode for input.
473 * doc/textutil.texi: Add comments about peculiarities of Textutils
474 operation on MS-DOS/MS-Windows.
476 1998-12-22 Jim Meyering <meyering@ascend.com>
478 * configure.in (ALL_LINGUAS): Add chinese (zh).
480 1998-12-17 Jim Meyering <meyering@ascend.com>
482 New options for tail:
483 --follow=name, --follow=descriptor, --allow-missing
484 * src/tail.c (Follow_mode): New enum.
485 (n_live_files): New function.
486 (tail_forever): Avoid starvation with --follow=name and a
487 continually-growing unlinked or renamed file.
489 1998-12-13 Jim Meyering <meyering@ascend.com>
491 * tests/uniq/Test.pm: New file.
492 * tests/uniq/Makefile.am: New file.
493 * tests/uniq: New directory.
494 * tests/Makefile.am (SUBDIRS): Add uniq.
495 * configure.in (AC_OUTPUT): Add tests/uniq/Makefile.
498 * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
500 (EXTRA_DIST): Add xstat.in.
501 * lib/stat.c: Remove file.
502 * lib/lstat.c: Remove file.
503 * lib/xstat.in (xstat@): New file.
505 * configure.in (ALL_LINGUAS): Add Russian (ru).
507 1998-10-31 Jim Meyering <meyering@ascend.com>
509 * acconfig.h (stat): New #undef.
511 1998-10-22 Jim Meyering <meyering@ascend.com>
513 * src/fold.c (usage): Add mention of --version and --help.
514 Reported by Matej Vela <mvela@public.srce.hr>.
516 1998-10-04 Jim Meyering <meyering@ascend.com>
518 * lib/fnmatch.h: New file. (unused)
519 * lib/fnmatch.c: New file. (unused)
520 * lib/Makefile.am (noinst_HEADERS): Add fnmatch.h.
522 1998-10-03 Jim Meyering <meyering@ascend.com>
524 * man/Makefile.am: Switch to using help2man.
525 (EXTRA_DIST): Add Makefile.summ.
527 * man/help2man: Invoke program with --manhelp option only if
528 --name=STRING not specified. Otherwise, this would fail with `yes'.
529 * man/Makefile.summ: New file.
530 * man/Makefile.maint: Include it.
531 * man/help2man: New file.
532 * man/GNUmakefile: New file.
533 * man/Makefile.maint: New file.
534 * man/*.x: New files.
535 * man/*.1: Remove files.
537 * src/md5sum.c (split_3): Rename local variable, to `escaped_filename'.
538 (main): Output the leading backslash not just when there's a newline
539 in the file name, but also when there's a backslash.
540 Reported by Jim Dennis.
542 * tests/md5sum/basic-1: Add tests with filenames containing newline
543 and backslash characters. (for the bug fixed above)
545 * tests/Makefile.am (EXTRA_DIST): Add Fetish.pm.
546 * tests/Fetish.pm: New file.
548 * tests/md5sum/basic-1: New file: rewrite of old tests to use Fetish.pm.
549 * tests/md5sum/Test.pm: Remove file.
550 * tests/md5sum/Makefile.am: Rewrite.
552 1998-09-19 Jim Meyering <meyering@ascend.com>
554 * src/ptx.c (program_name): Declare *not* to be const.
556 1998-08-29 Jim Meyering <meyering@ascend.com>
558 * src/cut.c: Don't assume ASCII.
559 * src/pr.c: Likewise.
560 * src/tail.c: Likewise.
562 1998-08-15 Jim Meyering <meyering@ascend.com>
564 * src/pr.c (usage): Reformat.
566 * src/ptx.c: Add braces to suppress warning about ambiguous `else'.
567 * lib/bumpalloc.h: Likewise.
569 1998-08-13 François Pinard <pinard@iro.umontreal.ca>
571 * src/ptx.c: New file.
572 * src/Makefile.am (bin_PROGRAMS): Add ptx.
573 * lib/bumpalloc.h, lib/diacrit.h, lib/diacrit.c: New files.
574 * lib/Makefile.am (libtu_a_SOURCES): Add diacrit.c.
575 (noinst_HEADERS): Add bumpalloc.h and diacrit.h.
577 1998-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
579 * src/pr.c (long_options): Add long names for all options.
580 (usage): Update help string.
581 (main): Handle the special options --pages and --columns.
583 1998-08-02 Jim Meyering <meyering@ascend.com>
585 * lib/linebuffer.c (readline): Return zero upon error as well as upon
586 end of file. From James Youngman.
589 1998-08-01 Jim Meyering <meyering@ascend.com>
591 * src/sort.c (my_setlocale): Guard definition within #ifdef ENABLE_NLS.
592 From Manfred Hollstein.
594 1998-07-30 Jim Meyering <meyering@ascend.com>
596 * tests/cut/Test.pm: Avoid broken pipe message for tests that fail
599 * src/sort.c (usage): Add angle brackets to make `Report bugs...'
600 message consistent with all the rest.
602 1998-07-28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
604 * tests/cut/Test.pm: Avoid broken pipe for 'y' and 'z' tests.
606 * src/sort.c (NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid
607 clash with <langinfo.h>. All uses changed.
609 1998-07-26 Jim Meyering <meyering@ascend.com>
611 * intl/localealias.c (read_alias_file): Avoid mixing `char*' and
612 `unsigned char*' variables. Again for irix4.
613 Mostly from Kaveh Ghazi.
615 * src/join.c: Convert some char* dcls to `unsigned char*' and remove
616 a cast -- to placate irix4's cc.
617 * src/fmt.c (check_punctuation): Add cast to placate irix4's cc.
618 Reported by Kaveh Ghazi.
620 * src/md5sum.c (split_3): Add cast to placate irix4's cc.
623 1998-07-25 Jim Meyering <meyering@ascend.com>
627 * tests/cut/Test.pm: Add tests for new --output-delimiter option,
628 as well as for NUL input delimiter (--delimiter='').
629 * src/cut.c (cut_fields): Honor new --output-delimiter option.
630 (main): Fix handling of --delimiter='' (-d ''). Until now, it has
631 never worked as advertised. I guess no one tried it.
633 * tests/sort/Test.pm: Add two tests relating to this.
634 * src/sort.c (main): Stat all non-`-' input file files (and fail if a
635 stat fails) when an output file is specified by `-o' but doesn't exist.
636 Reported by Will Edgington.
638 * tests/sort/Test.pm: New tests of -o.
640 1998-07-16 Jim Meyering <meyering@ascend.com>
642 * lib/Makefile.am (noinst_HEADERS): Add lchown.h.
643 * lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
644 * lib/lchown.c: Include lchown.h.
646 1998-07-04 Jim Meyering <meyering@ascend.com>
648 * configure.in (AM_WITH_REGEX): Remove. Now the replacement
649 macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
650 * acconfig.h (WITH_REGEX): Remove undef.
651 * src/csplit.c: Remove #ifdef around <regex.h> inclusion.
652 * src/nl.c: Likewise.
653 * src/tac.c: Likewise.
654 * src/csplit.c (extract_regexp): Remove #if !WITH_REGEX...#endif block.
655 * lib/Makefile.am (noinst_HEADERS): Remove rx.h.
656 * lib/rx.c: Remove file.
657 * lib/rx.h: Remove file.
659 1998-06-29 Jim Meyering <meyering@ascend.com>
661 * src/wc.c: Update calls to human_readable -- now there's one fewer arg.
663 * lib/Makefile.am (libtu_a_SOURCES): Add argmatch.c.
664 (noinst_HEADERS): Add argmatch.h.
666 1998-06-28 Jim Meyering <meyering@ascend.com>
668 * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.
670 1998-06-27 Jim Meyering <meyering@ascend.com>
672 * tests/pr/Test.pm: Add two tests for double spacing.
673 * src/pr.c (print_page): If cols_ready_to_print is zero,
674 break out of loop just before the double-space test.
675 Reported by Michael Stutz.
677 1998-06-18 Jim Meyering <meyering@ascend.com>
679 * tests/Makefile.am.in (check): Depend on $(maint_gen) so
680 `make maintainer-clean; ./configure; make check' works.
682 1998-05-25 Jim Meyering <meyering@ascend.com>
684 * configure.in (_GNU_SOURCE): AC_DEFINE it here.
685 * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section.
686 [!_GNU_SOURCE]: Add #undef instead.
688 1998-05-16 Jim Meyering <meyering@ascend.com>
690 * configure.in (jm_MACROS): New wrapper macro.
691 Remove uses of most jm_* macros.
693 * src/tac.c (tac_seekable): Fix error in handling regex separators.
694 * tests/tac/Test.pm (opt-b, opt-s, opt_sb, opt_r): New tests.
695 (opt_br): New test -- exercises above-fixed bug.
697 * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS='
698 lines from the m4/*.m4 macros, so the hack of including some
699 custom-replaced C source file names here is no longer needed.
701 * acconfig.h (chown): Add undef.
702 (D_INO_IN_DIRENT): Likewise.
703 (D_TYPE_IN_DIRENT): Likewise.
706 1998-05-09 Jim Meyering <meyering@ascend.com>
708 * src/tac.c (tac_seekable): Rename from tac_stream.
709 Change `FILE *in' parameter to `int input_fd'. Adjust callers.
711 1998-05-03 Jim Meyering <meyering@ascend.com>
713 * po/: Update from gettext-0.10.35.
715 * configure.in: Remove use of AC_LINK_FILES.
716 (AC_OUTPUT): Remove po/Makefile-generating sed command.
718 1998-04-26 Jim Meyering <meyering@ascend.com>
720 * tests/tail/Test.pm: Disable test f-1, now that it fails.
722 * src/sort.c (keycompare) (CMP_WITH_IGNORE): Don't return 0 from inside
723 the keyspec-iterating loop. With this change, test 22a passes.
724 Reported by Zvi Har'El.
725 (strncoll): Remove bogus assertion.
726 * tests/sort/Test.pm: Add tests for the above fix.
728 * configure.in: Use jm_ASSERT.
729 * acconfig.h: Add NDEBUG.
731 * src/cut.c: Don't define NDEBUG.
732 * src/csplit.c: Likewise.
733 * src/join.c: Likewise.
734 * src/sort.c: Likewise.
735 * src/tr.c: Likewise.
737 * src/cut.c: Don't define _GNU_SOURCE (now it's in config.h).
738 * src/expand.c: Likewise.
739 * src/fold.c: Likewise.
740 * src/join.c: Likewise.
741 * src/sort.c: Likewise.
742 * src/tr.c: Likewise.
743 * src/unexpand.c: Likewise.
744 * src/uniq.c: Likewise.
746 * src/tail.c (close_fd): New function -- converted from macro.
747 [struct File_spec] (n_stat_calls): New member.
748 [struct File_spec] (n_unchanged_stats): New member.
749 (max_n_unchanged_stats): New global.
750 Initialize new members.
751 (xwrite): New function -- converted from macro.
752 [struct File_spec] (pretty_name): Remove member.
753 (pretty_name): New function.
755 * src/md5sum.c (md5_check): Declare local, `md5num' as _unsigned_ char*.
756 (hex_digits): Declare parameter `s' as _unsigned_ char*.
757 (split_3): Declare parameter `u' as _unsigned_ char**.
759 1998-04-17 Jim Meyering <meyering@ascend.com>
761 * src/fmt.c (check_punctuation): Used unsigned char* pointers to avoid
763 * src/join.c (xfields): Likewise.
765 1998-04-12 Jim Meyering <meyering@ascend.com>
767 * src/cat.c: Use STREQ macro rather than strcmp.
768 * src/cksum.c: Likewise.
769 * src/comm.c: Likewise.
770 * src/csplit.c: Likewise.
771 * src/cut.c: Likewise.
772 * src/fmt.c: Likewise.
773 * src/fold.c: Likewise.
774 * src/head.c: Likewise.
775 * src/join.c: Likewise.
776 * src/md5sum.c: Likewise.
777 * src/nl.c: Likewise.
778 * src/paste.c: Likewise.
779 * src/pr.c: Likewise.
780 * src/split.c: Likewise.
781 * src/sum.c: Likewise.
782 * src/tac.c: Likewise.
783 * src/uniq.c: Likewise.
784 * src/wc.c: Likewise.
786 1998-04-11 Jim Meyering <meyering@ascend.com>
788 * lib/safe-read.h: New file.
789 * lib/safe-read.c: Include it.
790 * src/cat.c: Include it instead of merely declaring safe_read.
791 * src/csplit.c: Likewise.
792 * src/head.c: Likewise.
793 * src/split.c: Likewise.
794 * src/sum.c: Likewise.
795 * src/tac.c: Likewise.
796 * src/tail.c: Likewise.
797 * src/tr.c: Likewise.
798 * src/wc.c: Likewise.
800 * lib/Makefile.am (noinst_HEADERS): Add safe-read.h.
802 * src/wc.c [HAVE_INTTYPES_H]: Include inttypes.h.
803 Declare counters to be of type uintmax_t.
804 (write_counts): Use human_readable to format potentially-long-long
805 numbers. Suggestion from Rogier Wolff.
806 (wc): Declare per-file counters to be of type uintmax_t.
807 Declare bytes_read to be ssize_t.
808 * lib/Makefile.am (libtu_a_SOURCES): Add human.c.
809 (noinst_HEADERS): Add human.h.
811 * lib/human.c: New file.
812 * lib/human.h: New file.
814 1998-04-04 Jim Meyering <meyering@eng.ascend.com>
816 * configure.in (jm_AC_HEADER_INTTYPES_H): Use it.
817 (jm_AC_TYPE_UINTMAX_T): Use it.
820 * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
821 know about the m4/ subdirectory.
822 * Makefile.maint (aclocal-files): Remove now-unnecessary (with
823 automake-1.2h and the above change) aclocal-related rules and includes.
825 1998-04-03 Jim Meyering <meyering@eng.ascend.com>
827 * lib/closeout.c: New file.
828 * lib/closeout.h: New file.
829 * lib/Makefile.am (libtu_a_SOURCES): Add closeout.c.
830 (noinst_HEADERS): Add closeout.h.
832 1998-03-31 Jim Meyering <meyering@eng.ascend.com>
834 * lib/xstrtol.c: Merge with the version from fileutils.
836 1998-03-27 Jim Meyering <meyering@eng.ascend.com>
838 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.
840 1998-03-23 Jim Meyering <meyering@eng.ascend.com>
842 * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
843 automatically handles it.
845 1998-03-19 Jim Meyering <meyering@eng.ascend.com>
847 * src/system.h (SCHAR_MIN): Define.
849 od.c needs these when compiling with NCR's R2.0c C compiler.
850 (TYPE_MAXIMUM): Cast result to `(t)' so this macro works with
854 1998-03-15 Jim Meyering <meyering@eng.ascend.com>
856 * src/tail.c (tail_file): Merge largely-duplicated blocks of code.
858 1998-03-03 Paul Eggert <eggert@twinsun.com>
860 * src/sort.c (xtmpfopen): Open temporary file exclusively, to
861 foil a common denial-of-service attack.
862 * src/tac.c (save_stdin): Likewise.
864 1998-02-16 Jim Meyering <meyering@eng.ascend.com>
866 * configure.in (jm_FUNC_LSTAT): Use it.
867 (jm_FUNC_STAT): Use it.
868 * lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c.
870 1998-02-06 Jim Meyering <meyering@eng.ascend.com>
872 * configure.in: Don't use AM_MAINTAINER_MODE or
873 AC_PATH_PROG(PERL, perl).
876 1998-02-04 Jim Meyering <meyering@eng.ascend.com>
878 * tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl.
879 (mk_script): Set to ../mk-script.
880 (x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script.
881 Remove @MAINT@ cruft.
882 (Makefile.am): Likewise.
883 Remove @MAINT@ cruft. Now `missing' will explain the failure
884 when people don't have Perl yet modify a file whose rebuilding
885 would lead to the use of Perl.
887 * tests/Makefile.am (EXTRA_DIST): Add mk-script.
888 * tests/*/mk-script.pl: Remove files.
890 * GNUmakefile: New file.
891 * Makefile.am (EXTRA_DIST): Add GNUmakefile.
892 Don't include Makefile.maint from here. It's included from GNUmakefile.
894 1998-01-30 Paul Eggert <eggert@twinsun.com>
896 * configure.in (AC_LFS): Put before anything that can affect or use
897 CPPFLAGS, LDFLAGS, or LIBS.
899 1998-01-25 Jim Meyering <meyering@na-net.ornl.gov>
901 * Makefile.maint: New file.
902 * Makefile.am: Move rules common to textutils, fileutils, sh-utils
904 Include Makefile.maint.
905 (EXTRA_DIST): Add Makefile.maint.
907 * src/cat.c (cat): Convert comma-expressions to pairs of
908 semicolon-terminated stmts.
909 Add braces around compound if/else stmts.
911 1998-01-24 Jim Meyering <meyering@na-net.ornl.gov>
913 * src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...'
914 as obsolescent options.
915 Accept new option: --sleep-interval=SECONDS (-s).
916 FIXME: document new option in textutils.texi.
917 (parse_options): Recognize it.
918 (usage): Describe it.
919 (tail_forever): Use it.
920 (dump_remainder): Use it.
921 * tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'.
923 * tests/cut/: Rename directory to remove `-test' suffix.
924 * tests/join/: Likewise.
925 * tests/md5sum/: Likewise.
926 * tests/pr/: Likewise.
927 * tests/sort/: Likewise.
928 * tests/tr/: Likewise.
929 * configure.in (AC_OUTPUT): Reflect renamings in tests/.
930 * tests/Makefile.am (SUBDIRS): Reflect renamings in tests/.
932 * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
933 bug in Cray C 5.0.3.0 when T == time_t.
935 1998-01-18 Jim Meyering <meyering@na-net.ornl.gov>
937 * src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction,
938 numcompare): Remove the `unsigned' from some `unsigned char*'
939 parameter types. Add casts via UCHAR where necessary to avoid
940 problems with unwanted sign extension. Based on a patch from
941 Kaveh Ghazi to appease Irix4's cc compiler.
943 1998-01-17 Jim Meyering <meyering@na-net.ornl.gov>
945 * src/split.c (next_file_name): Rewrite. This removes an artificial
946 limit (albeit already high, at INT_MAX :-) on the number of files
947 split could create. Reported by Ralf W. Stephan.
949 1998-01-16 Jim Meyering <meyering@na-net.ornl.gov>
951 * src/sort.c: (mergefps): Add braces to avoid ambiguous `else' stmt.
952 (nls_set_fraction): Likewise.
954 * src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
955 for Irix-4.0.5. From Kaveh Ghazi.
956 * configure.in: Check for langinfo.h.
958 * lib/getline.c: Make PARAMS-defining conditionals consistent.
959 * lib/linebuffer.h: Likewise.
960 * lib/long-options.h: Likewise.
961 * lib/memcasecmp.h: Likewise.
962 * lib/xstrtod.h: Likewise.
963 * lib/xstrtol.h: Likewise.
964 Suggestion from Kaveh Ghazi.
966 * tests/head/Test.pm (fail-0): Disable test. It depends on
967 sizeof(long) being 32 bits. Reported by Kaveh Ghazi.
969 1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
973 * src/system.h [HAVE_LIMITS_H]: Include limits.h
974 (TYPE_SIGNED): Define.
975 (TYPE_MINIMUM): Define.
976 (TYPE_MAXIMUM): Define.
985 * src/*.c: Remove definitions of those symbols.
987 * src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
988 since it now includes limit.h which defines RE_DUP_MAX.
989 * src/nl.c: Likewise.
990 * src/tac.c: Likewise.
992 * lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE.
993 Rewrite macro as function. Return a value. Update caller.
994 Cast __ZLONG_MAX `__unsigned long int' before casting to double to
995 avoid SunOS /bin/cc compiler bug.
997 1998-01-08 Jim Meyering <meyering@na-net.ornl.gov>
999 * src/tac-pipe.c: New file. But not yet used.
1000 * src/Makefile.am (EXTRA_DIST): Add tac-pipe.c.
1002 * src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer
1003 result of xrealloc (until recently it was char*).
1005 * configure.in (AC_CHECK_FUNCS): Add nl_langinfo.
1006 * src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test
1007 guarding the nls month-checking code.
1008 (nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
1009 `unsigned' from dcls of text and lim.
1010 (main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.
1012 1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
1014 * lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
1016 * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
1017 those files will be built via the ANSI2KNR-filtering rules if necessary.
1019 1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
1021 * configure.in: Remove AC_DEFINE of _GNU_SOURCE.
1022 * acconfig.h (_GNU_SOURCE): Define if not already defined.
1023 Put this code in @TOP@ section.
1024 (_GNU_SOURCE): Remove #undef.
1026 1997-12-22 Jim Meyering <meyering@na-net.ornl.gov>
1028 * configure.in: AC_DEFINE _GNU_SOURCE.
1029 * acconfig.h: Add _GNU_SOURCE.
1031 1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
1033 * configure.in (AC_CHECK_HEADERS): Add stdlib.h.
1035 * src/system.h: Merge in things from fileutils' version of this file.
1036 * src/csplit.c: s/__P/PARAMS/.
1037 * src/fmt.c: s/__P/PARAMS/.
1038 * src/od.c: s/__P/PARAMS/.
1039 * src/pr.c: s/__P/PARAMS/.
1041 1997-12-14 Jim Meyering <meyering@na-net.ornl.gov>
1043 * src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g.
1045 1997-12-13 Jim Meyering <meyering@na-net.ornl.gov>
1047 * src/fmt.c (main): Add some braces.
1048 Check return code from fclose of each input file.
1049 Close stdout and check for errors.
1051 * src/csplit.c (close_output_file): Check ferror before calling fclose.
1052 (main): Close stdout and check for errors.
1054 1997-11-15 Jim Meyering <meyering@na-net.ornl.gov>
1056 * acconfig.h: Add mktime.
1057 * configure.in (jm_FUNC_MKTIME): Use it.
1058 * lib/mktime.c: New file.
1059 * lib/Makefile.am (EXTRA_DIST): Add mktime.c
1061 * intl/Makefile.in (distclean): Don't remove libintl.h here.
1062 * Makefile.am (DISTCLEANFILES): Remove it here instead.
1064 1997-11-13 Jim Meyering <meyering@na-net.ornl.gov>
1066 * lib/strftime.c: Update from FSF.
1067 * m4/strftime.m4: Check for POSIX.2's %f format spec.
1069 1997-11-12 Jim Meyering <meyering@na-net.ornl.gov>
1071 * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define.
1072 * configure.in (AC_CHECK_FUNCS): Add mempcpy.
1074 1997-11-09 Jim Meyering <meyering@na-net.ornl.gov>
1076 * configure.in (jm_FUNC_STRFTIME): Use it.
1077 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
1078 * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
1079 (jm_FUNC_GNU_STRFTIME): Use new macro.
1080 (jm_FUNC_STRFTIME): New macro. Likewise.
1081 Reported by Noel Cragg.
1083 1997-11-08 Jim Meyering <meyering@na-net.ornl.gov>
1085 * m4/lfs.m4 (AC_LFS): New file/macro.
1086 * m4/Makefile.am (EXTRA_DIST): Add lfs.m4.
1087 * configure.in (AC_LFS): Use it.
1088 (AC_CHECK_FUNCS): Add fseeko.
1089 * src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO.
1090 (skip): Use fseeko if available. Don't use lseek; it causes
1091 the stdio stream to become out of sync with respect to the
1092 underyling file descriptor.
1095 1997-10-16 Paul Eggert <eggert@twinsun.com>
1097 * configure.in (AC_CHECK_FUNCS): Add fseeko.
1099 * src/od.c (skip): Use fseeko. Don't use lseek; it causes
1100 the stdio stream to become out of sync with respect to the
1101 underyling file descriptor.
1103 1997-11-06 Jim Meyering <meyering@na-net.ornl.gov>
1105 * src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs.
1106 We always have alloca.
1107 (keycompare): Don't use variable size arrays (it's a gcc-extension).
1108 Rewrite code that increments new lengths when not `ignoring'.
1110 1997-11-02 Jim Meyering <meyering@na-net.ornl.gov>
1112 * acconfig.h: Add malloc and realloc.
1114 * src/wc.c (main): New option, --max-line-length (-L).
1115 (wc, write_counts): Implement it.
1118 1997-10-26 Jim Meyering <meyering@na-net.ornl.gov>
1120 * lib/memcasecmp.c: Convert to upper case before comparing.
1121 This makes join -i work with sort -f.
1122 Reported by Arthur Pool.
1124 1997-10-25 Jim Meyering <meyering@na-net.ornl.gov>
1126 * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
1127 (xcalloc): #ifdef-out unused function.
1128 (xrealloc): Remove code to work around deficient versions of realloc.
1129 Now we have an autoconf-enabled replacement version.
1130 (xmalloc): Remove code to work around deficient versions of malloc.
1131 Now we have an autoconf-enabled replacement version.
1133 * lib/memcmp.c (rpl_memcmp): Rename from memcmp.
1135 * src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/.
1137 * lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL.
1139 * configure.in (jm_FUNC_MALLOC): Use it.
1140 (jm_FUNC_REALLOC): Use it.
1142 * lib/Makefile.am (EXTRA_DIST): Add malloc.c.
1143 * lib/malloc.c: New file.
1144 * m4/malloc.m4: New file.
1145 * m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
1147 * lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
1148 (EXTRA_DIST): Add realloc.c.
1149 (EXTRA_DIST): Add malloc.c.
1151 * src/system.h: Include xalloc.h.
1152 Remove dcls of xmalloc, xcalloc and xrealloc.
1154 * lib/xalloc.h: New file.
1156 * lib/xmalloc.c: Include xalloc.h.
1157 Change VOID to void.
1158 (xalloc_exit_failure): Renamed extern.
1159 (xalloc_msg_memory_exhausted): New extern.
1160 (xalloc_fail_func): New extern.
1161 (fixup_null_alloc): Use new variables.
1163 1997-10-24 Jim Meyering <meyering@na-net.ornl.gov>
1165 * src/unexpand.c: Remove old-style xmalloc and xrealloc decls.
1166 (add_tabstop): Cast first arg of xrealloc to char*.
1168 * src/sort.c: Include xalloc.h.
1169 (xmalloc): Remove function.
1170 (xrealloc): Remove function.
1171 (main): Set xalloc_fail_func to cleanup.
1172 Set xalloc_exit_failure SORT_FAILURE.
1174 * src/paste.c: Remove old-style xmalloc and xrealloc decls.
1175 (paste_parallel): Cast first arg of xrealloc to char*.
1177 * src/od.c: Remove old-style xmalloc and xrealloc decls.
1178 (decode_format_string): Cast first arg of xrealloc to char*.
1180 * src/expand.c: Remove old-style xmalloc and xrealloc decls.
1181 (add_tabstop): Cast first arg of xrealloc to char*.
1183 * lib/xalloc.h: New file.
1185 * src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
1186 (getstr): Cast xmalloc return value to char*.
1188 * src/csplit.c: Include xalloc.h.
1189 (xmalloc): Remove function.
1190 (xrealloc): Remove function.
1191 (main): Set xalloc_fail_func to cleanup.
1193 * src/*.c: Remove old-style xmalloc and xrealloc decls.
1194 * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
1195 Suggestion from Achim Blumensath.
1197 1997-10-23 Jim Meyering <meyering@na-net.ornl.gov>
1199 * Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
1201 * src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
1202 [!HAVE_DECLARATION_MALLOC]: Declare malloc.
1203 [!HAVE_DECLARATION_REALLOC]: Declare realloc.
1204 [!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
1205 [!HAVE_DECLARATION_STRSTR]: Declare strstr.
1206 * src/cat.c: Remove stpcpy dcl.
1207 * src/csplit.c: Remove malloc and realloc dcls.
1208 * src/sort.c: Remove free, malloc, and realloc dcls.
1209 * src/tac.c: Remove malloc, and realloc dcls.
1210 * src/tr.c: Remove stpcpy dcl.
1211 On some systems, strstr and stpcpy are macros, so declaring them
1212 unconditionally gets syntax errors.
1213 Reported by Mark M. Kettenis.
1215 * configure.in: Use jm_CHECK_DECLS.
1216 * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
1218 1997-10-22 Jim Meyering <meyering@na-net.ornl.gov>
1220 * m4/decl.m4: New file.
1221 * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS.
1223 1997-10-16 Paul Eggert <eggert@twinsun.com>
1225 * src/od.c (LONG_MAX): Define if not defined.
1227 1997-10-16 Jim Meyering <meyering@na-net.ornl.gov>
1229 * src/sort.c (look_for_fraction): Patch from Orn Hansen.
1230 (getmonth): Compare the two month names only to the length of the
1231 string in the month table. Patch from Orn Hansen.
1232 (NLS_STRNCMP): New macro.
1233 (strncoll_s2_readonly): New function.
1234 (inittables): Don't use temporary `comp' to hide type of
1235 comparator function.
1236 (nls_sort_month_comp): Declare parameters to be void* to match
1237 comparator function type required for qsort.
1238 (getmonth): Use NLS_STRNCMP rather than #ifdef.
1239 Use do-while, rather than while-loop.
1241 1997-10-14 Jim Meyering <meyering@na-net.ornl.gov>
1243 * src/sort.c: (_NL_ITEM) [!defined]: Define.
1244 From from Ørn E. Hansen.
1246 * src/sort.c: Use STREQ in place of most uses of strcmp.
1247 (NLS_STRCMP): Define.
1248 (getmonth): Remove ifdef and use NLS_STRCMP instead.
1249 Use HAVE_ALLOCA, not _HAVE_ALLOCA.
1250 (zaptemp): Make parameter `const'.
1252 * tests/sort-test/Test.pm: Add tests to exercise new fraccompare.
1254 * src/sort.c (CHARS_IN_ABM): Remove definition
1255 (inittables): Remove assumption that all abbreviated month names have
1257 (getmonth): Likewise.
1258 (main): Add #if's for more efficient code when using the GNU C library.
1259 From Ulrich Drepper.
1261 * src/sort.c (strncoll): Rename parameter to LEN.
1262 (keycompare): Move assignment out of if-expression.
1264 * lib/xstrdup.c: New file.
1265 * lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c
1267 * src/sort.c: Declare xstrdup.
1268 (my_setlocale): New function.
1269 (main): Guard against failure of strdup (use xstrdup) and setlocale.
1271 * src/system.h (STREQ): Define.
1272 * src/od.c (STREQ): Remove definition.
1274 * src/sort.c (look_for_fraction): Eliminate arbitrary limit on
1275 number of `groups'. Declare as void, not int.
1276 Patch from Ørn E. Hansen.
1277 (main): When determining whether we're in the C or POSIX locale,
1278 don't rely on the form of the string returned by setlocale.
1279 Suggestion from Ulrich Drepper.
1281 1997-10-12 Jim Meyering <meyering@na-net.ornl.gov>
1283 * src/sort.c: Apply big patch from Ørn E. Hansen.
1285 (NLS_MEMCMP): Define.
1286 (keycompare): Use it instead of open-coded #ifdefs.
1287 (compare): Likewise.
1288 (NLS_MAP): Remove unused definitions.
1289 Replace with uses of UCHAR.
1290 (nls_locale_map): Remove dcl of unused file-scope array.
1292 1997-10-10 Jim Meyering <meyering@na-net.ornl.gov>
1294 * tests/sort-test/Test.pm: Add a test.
1297 1997-10-07 Jim Meyering <meyering@na-net.ornl.gov>
1299 * src/*.c: Update bug-reporting address.
1300 * src/cat.c: Indent cpp directives to reflect nesting.
1301 * src/cksum.c: Likewise.
1302 * src/csplit.c: Likewise.
1303 * src/fmt.c: Likewise.
1304 * src/nl.c: Likewise.
1305 * src/paste.c: Likewise.
1307 1997-09-27 Jim Meyering <meyering@na-net.ornl.gov>
1309 * m4/memcmp.m4: Integrate test to detect bug in memcmp from the
1310 Next x86 OpenStep C library. Test program from William Lewis.
1312 1997-09-21 Jim Meyering <meyering@na-net.ornl.gov>
1314 * src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.'
1315 (dump_hexl_mode_trailer): Rename from dump_string_trailer.
1316 Use fputs and putchar instead of trivial or %-less printfs.
1317 (decode_one_format): Parenthesize each field_width assignment in an
1318 argument list to make the side effect a little more apparent.
1319 (write_block): Use fputs and putchar instead of trivial or %-less
1321 (dump_strings): Cast string_min to off_t to avoid long-standing warning.
1323 * src/od.c: Implement new `z' (hexl-mode) modifier.
1324 [struct tspec] (trailer): New field.
1325 (field_width): Likewise.
1326 (dump_string_trailer): New function.
1327 (decode_one_format): Save each field_width in the tspec.
1328 Patch from John Kodis.
1330 1997-09-14 Jim Meyering <meyering@na-net.ornl.gov>
1332 * src/od.c (main) [--traditional]: Don't give diagnostic about there
1333 being more than three arguments if there are *no* arguments specified.
1334 Reported by Jochen Hein.
1336 1997-09-13 Jim Meyering <meyering@na-net.ornl.gov>
1338 * tests/sort-test/Test.pm: Add tests 19a and 19b.
1340 1997-07-21 Jim Meyering <meyering@na-net.ornl.gov>
1342 * src/tail.c (parse_obsolescent_option): #ifdef-out portability warning.
1344 1997-07-19 Jim Meyering <meyering@na-net.ornl.gov>
1346 * src/sort.c (checkfp): Print the `disorder' message. Include both
1347 the number and the contents of the first out-of-order line, in addition
1348 to the file name. Change meaning of return value.
1349 (check): Don't print disorder message here.
1350 Adjust test of checkfp's return value.
1351 Feature suggestion from Karl Heuer.
1353 1997-07-13 Jim Meyering <meyering@na-net.ornl.gov>
1355 * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
1356 Now, automake includes it automatically.
1358 * src/head.c: Include xstrtoul.h.
1359 Remove global variable, unit_size.
1360 (atou): Remove now-unused function.
1361 (parse_unit): Likewise.
1362 (string_to_ull): New function.
1363 (head): Take new parameter, count_lines. Use it instead of unit_size.
1365 (head_file): Likewise.
1366 (main): Use string_to_ull, not atou/parse_unit.
1367 The problem was that overflow wasn't detected, so `head -c 4096m'
1368 was treated just like `head -c 0'.
1369 Reported by Jerome Abela.
1371 * tests/wc: New directory.
1372 * tests/head: New directory.
1373 * tests/Makefile.am (SUBDIRS): Add head and wc.
1374 * configure.in (AC_OUTPUT): Add tests/head/Makefile and
1377 1997-07-05 Jim Meyering <meyering@na-net.ornl.gov>
1379 * src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
1380 a diagnostic and fail when there are two or more non-option arguments.
1382 1997-07-04 Jim Meyering <meyering@na-net.ornl.gov>
1384 * tests/tac/mk-script.pl: Redirect output of cmp to /dev/null.
1386 * configure.in (ALL_LINGUAS): Add Norwegian (no).
1388 * Makefile.am (aclocal-files): Look in source directory, not build dir.
1389 From Andreas Schwab.
1391 Sun Jun 15 06:36:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
1393 * src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the
1394 2-digit abbreviation) in each page header. Reported by Noah Friedman.
1396 Sat Jun 14 12:29:12 1997 Jim Meyering <meyering@na-net.ornl.gov>
1398 * src/cut.c (cut_fields): Detect when the input is empty and handle
1399 that special case. Before `cut -f1 < /dev/null' would improperly
1400 output a single newline. Reported by Phil Richards.
1402 Sun Apr 27 15:10:58 1997 Jim Meyering <meyering@na-net.ornl.gov>
1404 * man/Makefile.am (DISTFILES): Add $(man_MANS).
1406 * configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv).
1408 Thu Apr 3 21:14:02 1997 Jim Meyering <meyering@na-net.ornl.gov>
1410 * m4/Makefile.am (EXTRA_DIST): Update file list.
1412 * tests/cut-test/Test.pm: Add test from Phil Richards.
1414 Sat Mar 22 20:29:10 1997 Jim Meyering <meyering@na-net.ornl.gov>
1416 * missing: New file -- from the automake-1.1m distribution.
1418 Fri Mar 21 23:56:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
1420 * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
1421 (aclocal.m4): Use aclocal's new -I option.
1423 Thu Mar 13 21:46:04 1997 Jim Meyering <meyering@na-net.ornl.gov>
1425 * src/tr.c (main): Make sure c1 is not -1 before using it as an
1426 array index. Patch from Greg McGary. Although this is truly a
1427 bug, I believe it would not cause tr to misbehave on most systems.
1428 I could not construct a test case with which this bug causes tr
1429 to generate invalid output.
1431 * tests/pr-test/Test.pm: Add test that -o 0 works.
1433 * src/pr.c (main): Allow use of 0 (zero) as the margin offset
1434 argument to the -o option. Patch from Gary Anderson.
1436 Fri Feb 28 22:32:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
1438 * src/uniq.c (usage): Fix typo in --help output. From Andreas Schwab.
1440 Tue Feb 25 20:34:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
1442 * lib/Makefile.am (noinst_HEADERS): Add obstack.h.
1443 (libtu_a_SOURCES): Add obstack.c.
1445 Sun Feb 16 08:30:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
1447 * tests/Makefile.am (SUBDIRS): Add tac.
1448 * tests/tac: New directory.
1449 * configure.in (AC_OUTPUT): Add tests/tac/Makefile.
1451 * tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t,
1452 tta3-FF, ttb3-FF}: New files. Renamed (s/T/tt/) to avoid name clashes
1453 on case-independent filesystems.
1454 * tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming.
1456 * src/tail.c (parse_obsolescent_option): Reverse order of args in
1457 diagnostic. Remove `' quotes in diagnostic.
1458 (parse_options): Remove `' quotes in diagnostic.
1460 Sat Feb 8 22:43:45 1997 Jim Meyering <meyering@na-net.ornl.gov>
1462 * src/tail.c (parse_obsolescent_option): Give warning diagnostic for
1463 (but now accept) obsolescent usage with more than one file argument.
1465 Sun Feb 2 23:06:59 1997 Jim Meyering <meyering@na-net.ornl.gov>
1467 * src/join.c: Move alloca-related preprocessor code into system.h.
1468 * src/od.c: Remove alloca-related preprocessor code.
1469 * src/system.h: Add alloca-related preprocessor code.
1471 Sat Feb 1 07:21:43 1997 Jim Meyering <meyering@na-net.ornl.gov>
1473 * tests/pr-test/*: Rename files to avoid exceeding 14-character limit.
1474 * tests/pr-test/Test.pm: Reflect renamings.
1476 * tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames
1477 that exceed max-length before dying.
1479 * src/pr.c (init_parameters): For compatibility: use default
1480 separator `TAB' with full length lines. From Roland Huebner.
1482 Fri Jan 31 19:53:54 1997 Jim Meyering <meyering@na-net.ornl.gov>
1484 * src/tac.c: Rename globals buffer and buffer_size to have G_ prefix
1485 to avoid shadowing local variables.
1487 * lib/long-options.c (parse_long_options): Compare getopt_long return
1488 value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter
1489 in getopt_long call.
1491 * src/pr.c (add_line_number): Rename from `number' to avoid shadowing
1494 * src/*.c: Compare getopt_long return value against -1, not EOF.
1495 Use NULL, not `(int *) 0' as last parameter in getopt_long call.
1496 (usage): Bracket bug-reporting address with <> and append a period.
1498 Wed Jan 29 20:54:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
1500 * tests/tr-test/Test.pm: Do each test twice: get input via REDIR
1503 * tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring)
1506 * tests/pr-test/Test.pm: Remove common_option_prefix flag.
1507 (test_vector): Prepend the common option here instead.
1509 * tests/md5sum-test/Test.pm: Remove input_via_stdin flag.
1510 Do each test twice: get input via REDIR and PIPE.
1512 * tests/cut-test/Test.pm: Do each test three times.
1514 * tests/cut-test/mk-script.pl: Allow each test to be run any or all
1515 of three different ways. Program input may be specified via a file
1516 or files listed on the command line, via input redirection (if there's
1517 only one file), or via a pipe.
1519 Tue Jan 28 20:54:06 1997 Jim Meyering <meyering@na-net.ornl.gov>
1521 * tests/cut-test/mk-script.pl: Remove `t' prefix on all generated
1523 Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E).
1524 Ensure that no test file (generated or maintainer-supplied) has a
1525 name longer than 14 characters.
1527 Sun Jan 26 12:49:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
1531 * src/tail.c (parse_options): Add quotes to make messages identical.
1533 Sat Jan 25 00:12:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
1535 * src/tail.c (parse_obsolescent_option): Comment.
1536 (parse_options): Remove unnecessary goto and label.
1538 * tests/sort-test/mk-script.pl: Interpret `input arg is a hash
1539 reference' as meaning that the tested program will read no input.
1540 Most of the tests for the date program use this feature.
1541 Also for date, the generated script now reflects specification
1542 (in Test.pm) of default and per-test environment settings.
1544 * src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces.
1545 * src/fold.c: Likewise.
1546 * src/head.c: Likewise.
1547 * src/join.c: Likewise.
1548 * src/nl.c: Likewise.
1549 * src/od.c: Likewise.
1550 * src/pr.c: Likewise.
1551 * src/uniq.c: Likewise.
1553 * lib/xstrtoul.h (XSTRTOL_H): Undefine it.
1555 * lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error'
1556 only if it hasn't already been defined.
1557 (_STRTOL_ERROR): Undefine.
1559 * lib/xstrtol.c (__xstrtol): Change interpretation of
1560 VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former
1561 when any suffix is valid, the later when no suffix is allowed.
1563 Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
1565 * lib/long-options.c (parse_long_options): Reset optind to zero
1566 before just returning so that getopt internals get initialized from
1567 the probably-new parameters when/if getopt is called later.
1568 From Ulrich Drepper.
1570 Thu Jan 23 19:17:03 1997 Jim Meyering <meyering@na-net.ornl.gov>
1572 * src/tail.c (parse_obsolescent_option): Recognize and fail for
1573 more malformed obsolescent options. Makes for better diagnostics.
1575 Wed Jan 22 21:34:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
1577 * tests/Makefile.am (SUBDIRS): Add tail.
1578 * tests/tail: New directory.
1579 * configure.in (AC_OUTPUT): Add tests/tail/Makefile.
1581 * src/tail.c (parse_options): New function.
1582 (parse_obsolescent_option): New function.
1583 (main): Use the new functions instead of open-coding them.
1584 This better fixes the bug in handling obsolescent `+Nc' options.
1587 Tue Jan 21 22:49:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
1589 * src/tail.c (main): Properly handle what the POSIX spec calls
1590 the `obsolescent' usage (e.g., tail +2c). It didn't work.
1591 Reported by Karl Heuer.
1593 Sun Jan 12 22:13:27 1997 Jim Meyering <meyering@na-net.ornl.gov>
1595 * tests/tr-test/Test.pm: Rename tests so that the associated files
1596 have names that are distinct even on filesystems on which file
1597 names are case insensitive.
1598 Reported by Fred Fish.
1599 * tests/cut-test/Test.pm: Likewise.
1601 * tests/tr-test/Makefile.am: Regenerated to reflect renamed tests.
1602 * tests/cut-test/Makefile.am: Likewise.
1604 Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
1608 * lib/getopt.c (_getopt_internal): Use `_', rather than the
1609 (sometimes-)expansion `gettext'.
1611 Tue Jan 7 22:50:13 1997 Jim Meyering <meyering@na-net.ornl.gov>
1613 * lib/getopt.c: New (more POSIX compliant) version from GNU libc.
1614 [_]: Define to gettext also if ENABLE_NLS is defined.
1617 Thu Jan 2 21:17:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
1619 * src/pr.c (init_fps): Initialize lines_stored field in three places.
1620 This avoids uninitialized memory reads in close_file.
1622 Wed Jan 1 17:32:18 1997 Jim Meyering <meyering@na-net.ornl.gov>
1624 * configure.in (AC_ARG_PROGRAM): Remove explicit use.
1625 It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart.
1627 Sun Dec 29 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
1629 * src/pr.c (init_header): Plug a small memory leak by using stack
1630 rather than heap for a 15-byte temporary buffer.
1632 Sat Dec 28 00:03:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
1634 * src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed
1636 (POS_AFTER_TAB): Renamed from pos_after_tab. Define in terms of
1637 TAB_WIDTH rather than duplicating the expression.
1639 Fri Dec 27 17:29:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
1641 * tests/join-test/mk-script.pl: Fix a couple of thinkos and typos.
1642 Now it works with pr's tests, too.
1644 * tests/pr-test/Makefile.am (explicit): Regenerate list of files,
1645 this time with duplicates removed.
1647 * src/pr.c (usage): Break long string literal into two separate
1648 printf statements to accomodate default maximum of 2048 characters
1649 for Irix-4.0.5. Reported by Kaveh Ghazi.
1651 * Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
1653 * tests/Makefile.am (SUBDIRS): Add pr-test.
1655 * configure.in: AC_REQUIRE version 2.12 of autoconf.
1656 AC_OUTPUT: Add tests/pr-test/Makefile.
1658 Sun Dec 22 08:11:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
1660 * acinclude.m4: Move macros to individual files in new directory, m4/.
1661 See ChangeLog entries in sh-utils for the details.
1663 * configure.in: Increment version to 1.20a.
1665 * tests/md5sum-test/Makefile.am: Use same framework as other tests.
1666 * tests/md5sum-test/Test.pm: New file.
1668 Sat Dec 21 20:32:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
1670 * tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in.
1672 * tests/Makefile.am.in: New file.
1674 * tests/sort-test/Makefile.am: Clone the Makefile.am from join-test.
1675 Replace only the definition of $x and the auto-generated lists of
1677 * tests/cut-test/Makefile.am: Likewise.
1678 * tests/tr-test/Makefile.am: Likewise.
1680 * tests/join-test/Makefile.am: Add @MAINT@-protected rule for
1681 verifying that Makefile.am is consistent with Test.pm.
1683 Fri Dec 20 00:08:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
1685 * tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1)
1686 and $(in2), not $(in).
1688 * tests/join-test/mk-script.pl: New option: --list.
1689 Generate lists of files used/generated.
1691 Thu Dec 19 23:28:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
1693 * tests/join-test/mk-script.pl: Rewrite to be more general -- so
1694 it can be used for join, cut, sort, tr, and soon, pr test suites.
1695 * tests/tr-test/mk-script.pl: Symlink through CVS repo to join's
1697 * tests/sort-test/mk-script.pl: Likewise.
1698 * tests/cut-test/mk-script.pl: Likewise.
1700 * tests/tr-test/Test.pm: Adapted for new mk-script.pl.
1701 * tests/join-test/Test.pm: Likewise.
1703 Tue Dec 17 16:48:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
1705 * tests/join-test/Makefile.am (.pl): Make generated file read-only so
1706 I don't accidentally modify it instead of the one with the .pl suffix.
1708 * acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than
1709 now-obsolete AC_C_CROSS.
1710 (jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one
1711 since there's nothing GNU-specific about the replacement. Contrast
1712 with gnu_ prefix added to strftime.
1713 (jm_FUNC_MEMCMP): New macro.
1714 * configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP.
1715 * acconfig.h: Add memcmp.
1716 * README: Remove warning about memcmp. The new macro handles it.
1718 Mon Dec 16 23:03:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
1720 * tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment.
1722 (AUTOMAKE_OPTIONS): Likewise.
1724 Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
1726 * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
1727 name for cross compiling.
1728 Remove definitions of gettext-related macros. The gettext
1729 installation procedure installs corresponding .m4 files so that
1730 aclocal will use them.
1732 1996-12-12 Paul Eggert <eggert@twinsun.com>
1734 * system.h (ISDIGIT): Replace with smaller, faster edition
1735 that yields nonzero only on ASCII digits.
1736 (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
1739 * tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of
1740 ISDIGIT to test for characters in CC_DIGIT class.
1742 * sort.c (digits): Remove; subsumed by new ISDIGIT.
1743 (inittables): Remove initialization of `digits'.
1744 (fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
1745 (fraccompare, numcompare): Avoid casts to unsigned char that are no
1748 * csplit.c (get_format_width, get_format_prec): Avoid
1749 unnecessary comparison of digit to '\0'.
1751 Thu Dec 12 23:42:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
1753 * src/sort.c (usage): Clarify description of -u option.
1756 Wed Dec 11 19:32:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
1760 Tue Dec 10 00:15:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
1762 The file name, `build-script.pl' is longer than 14 characters.
1764 * tests/cut-test/mk-script.pl: Rename from build-script.pl.
1765 * tests/cut-test/Makefile.am: Reflect renaming.
1766 * tests/tr-test/mk-script.pl: Rename from build-script.pl.
1767 * tests/tr-test/Makefile.am: Reflect renaming.
1768 * tests/sort-test/mk-script.pl: Rename from build-script.pl.
1769 * tests/sort-test/Makefile.am: Reflect renaming.
1770 * tests/join-test/mk-script.pl: Rename from build-script.pl.
1771 * tests/join-test/Makefile.am: Reflect renaming.
1772 Reported by Karl Heuer.
1774 * configure.in (VERSION): Bump to 1.19r.
1775 (AC_ISC_POSIX): Remove kludgy macro.
1776 Use this test instead:
1777 (LIBS): Add -lcposix if it contains strerror.
1778 Patch from Karl Heuer.
1780 Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
1782 =========== Update for automake-1.1k.
1783 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
1784 * configure.in (AM_CONFIG_HEADER): Use it.
1785 (AC_OUTPUT): Remove stamp-h timestamping statement.
1786 Now, AM_CONFIG_HEADER does it automatically.
1787 * lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
1788 new automake requirement.
1789 Rename tu_* variables to libtu_a_*.
1791 Wed Dec 4 21:03:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
1793 * src/pr.c: Apply big patch from Roland Huebner.
1795 * src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
1796 [:upper:] to [:upper:] and [:lower:] to [:lower:].
1797 (main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
1798 the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
1800 (class_ok): Update table to reflect that tr now allows these
1801 identity mappings. Suggestion from Risto Kankkunen.
1803 Thu Nov 28 00:31:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
1805 * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
1806 for gettext-0.10.25.
1808 Tue Nov 26 23:05:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
1810 * src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
1811 to avoid new warning from gcc.
1813 Sun Nov 24 21:02:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
1815 * tests/sort-test/Makefile.am (t): Add names of those 5 tests.
1817 * tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.
1819 * src/sort.c (set_ordering): Revert 1994-05-04 change to this function
1820 so that blanks are not unconditionally ignored when computing start
1821 and end positions for numeric keys with explicit character offsets.
1822 Reported by Markus Demleitner.
1824 Sat Nov 23 16:07:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
1826 * cat.c (usage): Alphabetize option descriptions the way sort -f would.
1827 * fmt.c (usage): Likewise.
1828 * join.c (usage): Likewise.
1829 * md5sum.c (usage): Likewise.
1830 * od.c (usage): Likewise.
1831 * pr.c (usage): Likewise.
1832 * sort.c (usage): Likewise.
1833 * split.c (usage): Likewise.
1834 * wc.c (usage): Likewise.
1837 Fri Nov 22 20:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
1839 * src/csplit.c (process_regexp): Update CURRENT_LINE only if
1840 the new value would be larger. This avoids the infinite loop
1841 otherwise provoked by situations like this:
1842 printf "\na\n" | csplit - '/a/-1' '{*}'
1845 Tue Nov 19 23:16:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
1847 * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
1850 Sat Nov 2 08:50:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
1852 * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
1853 Otherwise, the generated info files have names longer than
1854 the 14-byte max of some old systems.
1855 Reported by Karl Heuer.
1857 Fri Nov 1 21:33:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
1859 * lib/strtol.c: Update from GNU libc.
1861 * tests/sort-test/Test.pm: Add a test to exercize this fix.
1863 * src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
1864 (checkfp): Fix off-by-one error that resulted in writing one byte
1865 beyond the end of a malloc'd buffer. It caused `sort -c' to segfault
1866 on Linux systems having a relatively recent libc. Before, running
1867 the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
1868 would provoke the memory overrun (though not necessarily the failure).
1870 Reported by Risto Kankkunen.
1872 Thu Oct 31 17:48:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
1874 * src/sort.c (key_init): New function.
1875 (main): Use key_init in the two places where it was open-coded.
1876 This fixes a UMR of the general_numeric field.
1878 * src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
1879 This avoids a spurious UMR report from purify.
1880 (prjoin): Add an assertion.
1881 (add_field): Update assertion.
1883 * src/tr.c (es_free): New function.
1884 (parse_str): Use it to plug a small memory leak.
1886 Wed Oct 23 22:02:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
1888 * lib/md5.c: Update from GNU libc.
1889 * lib/md5.h: Update from GNU libc.
1891 Mon Oct 21 16:48:12 1996 Jim Meyering <meyering@na-net.ornl.gov>
1893 * src/tr.c (validate): Remove TAB from diagnostic, for consistency.
1895 Sun Oct 20 13:44:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
1897 * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
1899 * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
1900 (EXTRA_DIST): Remove.
1902 * configure.in: Remove README_ALPHA related code. Automake takes
1903 care of it automatically now when in gnits mode.
1905 * lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
1906 doing arithmetic with it.
1908 Sat Oct 19 23:13:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
1910 * lib/md5.c: Update from GNU libc.
1911 * lib/md5.h: Update from GNU libc.
1913 Fri Oct 18 00:08:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
1915 * configure.in (AC_OUTPUT): Add tests/join-test/Makefile.
1917 * tests/Makefile.am (SUBDIRS): Add join-test.
1919 Tue Oct 15 23:25:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
1921 * src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
1923 (main): Write separate loops to initialize mapping for lower->upper
1924 and upper->lower conversion.
1925 Reported by Arne Henrik Juul.
1927 Sun Oct 13 12:52:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
1929 * lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
1930 Before, e.g., `split -b 1M' would be silently accepted and treated
1931 like `split -b 1'. Reported by Franc,ois.
1933 * src/split.c (usage): Remove parameter, REASON.
1934 (main): Update callers to use combination of error (0, 0, ... and
1935 usage (EXIT_FAILURE).
1936 (main): When a string operand cannot be converted to a number of
1937 bytes or lines, include that string in the diagnostic.
1939 Sat Oct 12 00:05:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
1941 * configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.
1943 * lib/Makefile.am (EXTRA_DIST): Remove.
1945 Thu Oct 10 23:41:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
1947 * lib/md5.c (md5_stream): Apply fix from Ralph Loader
1948 <loader@maths.ox.ac.uk> via Ulrich Drepper.
1950 Wed Oct 9 07:26:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
1952 * lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).
1954 Tue Oct 8 21:32:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
1956 * lib/error.c: Include error.h to align with libit --
1957 under protest, François :-).
1959 Sun Oct 6 08:02:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
1961 * acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
1962 AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
1963 They're included in automake-1.1f.
1965 * configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
1968 Sat Oct 5 12:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
1970 * lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
1973 Fri Oct 4 07:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
1975 * configure.in (GNU_PACKAGE): New variable.
1976 (PACKAGE_VERSION): Remove it.
1978 * acconfig.h (GNU_PACKAGE): New variable.
1979 (PACKAGE_VERSION): Remove now-unused variable.
1981 * lib/long-options.c (parse_long_options): Separate package name
1982 and version number to accomodate new --version output requirement.
1983 * lib/long-options.h: Update prototype.
1985 Thu Oct 3 23:27:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
1987 * src/md5sum.c (main): Remove dead code that used to print --version
1990 Tue Oct 1 06:54:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
1992 * configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
1993 * src/Makefile.am (sort_LDADD): Use any library (-lm) that
1994 gets substituted for @POW_LIBM@.
1996 * tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.
1998 Mon Sep 30 23:35:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2000 * tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.
2002 * acinclude.m4: Update definitions from gettext-0.24.
2004 Sun Sep 29 20:04:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
2006 * tests/sort-test/build-script.pl: Die if close fails.
2007 * tests/tr-test/build-script.pl: Likewise.
2009 * configure.in (AC_OUTPUT): Add tests/cut-test/Makefile.
2010 * tests/Makefile.am (SUBDIRS): Add cut-test.
2011 * tests/cut-test: New directory.
2013 Fri Sep 27 22:22:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
2015 * configure.in (ALL_LINGUAS): Add spanish (es).
2017 Thu Sep 26 21:02:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
2019 * src/md5sum.c (usage): Remove references in --help output to
2020 the now-deprecated --string option. Support for it will be
2021 removed soon. Using this option can provoke a memory access
2022 violation on some systems because of (unavoidable in an efficient
2023 implementation) alignment assumptions made by functions in md5.c.
2024 md5sum.c could leave the option in and accomodate the alignment
2025 restriction, but this option was intended solely for testing, and
2026 the tests are now all file-oriented, so it's not necessary.
2028 * tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.
2030 Wed Sep 25 21:43:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
2032 * tests/sort-test/Makefile.am (t): Factor out .in suffix.
2033 Include new test: t16a.
2034 * tests/tr-test/Makefile.am (t): Likewise.
2036 * src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc.
2038 Mon Sep 23 10:00:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2040 * tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS).
2042 Sun Sep 22 09:24:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
2044 * src/sort.c (keycompare): Declare translate to be unsigned char *.
2045 Otherwise, sign extension caused misordering when using e.g. -f.
2046 Reported by Erick Branderhorst.
2047 * tests/sort-test/Test.pm: Add Erick's test for that fix.
2049 * tests/Makefile.am (SUBDIRS): Add md5sum-test.
2051 Sat Sep 21 13:34:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
2053 * src/Makefile.am (check): Remove tests for md5sum.
2054 * tests/md5sum-test: New directory. Put them here instead.
2055 * configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile.
2057 Thu Sep 19 08:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
2059 * tests/: Rename from checks.
2060 * Makefile.am (SUBDIRS): Change `checks' to `tests'.
2061 * configure.in (AC_OUTPUT): Likewise.
2063 * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
2064 AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
2066 Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2068 * Makefile.am (EXTRA_DIST): Remove acinclude.m4.
2070 Thu Sep 12 17:05:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2072 * lib/Makefile.am (EXTRA_DIST): Add getline.c.
2073 (tu_SOURCES): Remove getline.c
2076 Sun Sep 8 13:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2078 * checks/sort-test/build-script.pl: Prefix $in with \$srcdir/
2079 so make check works with VPATH build. From Uli Drepper.
2081 Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
2083 * src/system.h: Add comments justifying IS* versions of ctype.h macros.
2085 * src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct.
2086 (get_line): Use ISSPACE instead of isspace. From Bruno Haible.
2088 Mon Sep 2 10:34:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2090 * src/*.c (usage): Tell where to report bugs.
2092 Sun Aug 25 22:50:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
2094 * checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
2095 ($x-tests): Guard dependencies with @MAINT@.
2096 * checks/tr-test/Makefile.am: Likewise.
2098 Sat Aug 24 14:25:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
2100 * src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.
2102 Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
2104 * configure.in (ALL_LINGUAS): Add polish (pl).
2106 Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
2108 * configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
2109 * checks/Makefile.am (SUBDIRS): Add sort-test.
2111 Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
2113 * Makefile.am (EXTRA_DIST): Add acinclude.m4.
2115 Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2117 * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
2118 Automake includes them automatically.
2120 * configure.in (AM_INIT_AUTOMAKE): Use it.
2121 (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
2122 (AC_PROG_MAKE_SET): Likewise.
2124 Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov>
2126 * configure.in: Rename a few macros for automake-1.1c.
2127 (AC_REPLACE_GNU_GETOPT): Remove.
2128 (AC_PATH_PROG): Find perl -- needed only for checks if you
2129 change or remove things with e.g. make maintainerclean.
2132 * lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX
2133 adds .o files to @LIBOBJ@.
2134 (tu_SOURCES): Add getopt.c and getopt1.c.
2135 (EXTRA_DIST): Remove getopt.c and getopt1.c.
2137 * acinclude.m4: New file -- derived from aclocal.m4.
2138 * aclocal.m4: This file is now generated by the aclocal program
2139 (which comes with the automake package.)
2141 Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2143 * checks/: New directory.
2144 * checks/Makefile.am: New file.
2145 * configure.in (AC_OUTPUT): Add new directories: checks,
2147 * Makefile.am (SUBDIRS): Likewise.
2149 Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
2151 * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
2152 redefinition warnings on solaris.
2153 (textdomain) [!ENABLE_NLS]: Likewise.
2155 Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov>
2157 * src/unexpand.c (unexpand): Move EOF check to follow code that
2158 processes and generates output for pending spaces. Before
2159 `printf ' ' |unexpand -t 1,2' generated no output.
2161 * src/md5sum.c (md5_check): Remove parameter, BINARY.
2162 Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
2163 from the input stream rather than the one from the command line.
2164 (main): Fail with a diagnostic if --binary or --text is specified
2165 when verifying checksums.
2166 Reported by Eli Zaretskii <eliz@is.elta.co.il>.
2168 Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2170 * configure.in: Add check for error_at_line so systems with
2171 GNU libc don't compile and link with distributed error.c.
2172 * lib/Makefile.am (tu_SOURCES): Remove error.c.
2173 (EXTRA_DIST): Add error.c.
2175 * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
2176 Add related check for the getdelim function.
2177 From Ulrich Drepper -- as done in gettext.
2179 Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2181 * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
2182 separate PACKAGE and VERSION.
2184 * aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from
2185 macros from Bruno Haible and from Cygnus.
2186 * configure.in (AM_SANITY_CHECK_CC): Use it.
2188 Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
2190 * install-sh: Get version with MIT copyright.
2192 Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
2194 * aclocal.m4 (fp_C_PROTOTYPES): Improved version from
2196 Update all other macros to reference $fp_cv_prog_cc_stdc, rather
2197 than $ac_cv_prog_cc_stdc.
2199 * src/od.c (OFF_T_MAX): Remove definition.
2200 (main): Compare against LONG_MAX rather than OFF_T_MAX.
2202 Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
2204 * Many files: Update FSF address.
2206 Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2208 * src/unexpand.c (unexpand): Fix bug that contributed to endless loop
2209 when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not
2210 tab_index in inner flush_pend: while loop. From Keith Owens
2211 <kaos@audio.apana.org.au>.
2213 * src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
2214 [!INT_MAX]: Define it.
2215 (main): Append INT_MAX to command-line-specified tab list to
2216 ensure termination in unexpand's inner loop.
2217 Derived from a patch from Keith Owens.
2219 Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2223 * configure.in (VERSION): Bump to 1.19.
2225 Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
2227 * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
2228 so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
2229 those options on that system, sys/stat.h gets compile errors.
2230 With help from Marcus Daniels.
2232 * getopt.c: Update from gettext-0.10.23.
2233 * getopt1.c: Likewise.
2234 * getopt.h: Likewise.
2236 Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2238 * src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
2239 so the left operand of the << isn't signed.
2240 From Kjetil Torgrim Homme.
2242 * po/Makefile.in.in (install-data): Don't install NLS files when
2243 they're not requested. From Ulrich Drepper. Reported by
2244 Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
2246 Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
2248 * po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
2249 * ABOUT-NLS: Likewise.
2251 * aclocal.m4: Likewise.
2253 Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
2255 * src/uniq.c (usage): Remove space before newline in usage message.
2257 * src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
2258 [NEWLINE_REPLACEMENT_STRING*]: Remove macros.
2259 (main): Output a leading backslash for a line describing a file
2260 whose name contains a newline. Then translate each NEWLINE byte
2261 in the file name to the string, "\\n", and each backslash to "\\\\".
2262 File names that don't contain NEWLINE aren't translated.
2263 (split_3): Rewrite to handle file names with embedded newlines.
2264 Miles Bader and Jim Blandy suggested this new encoding scheme.
2266 * src/md5sum.c (md5_file): Replace obsolete comment with a description
2268 (md5_check): Don't use "s"-adding trick to form the plural of
2269 `checksum.' That doesn't work well with translation.
2270 Suggestions from Ulrich Drepper.
2271 (split_3): Add missing semicolon so it compiles. From Jim Blandy.
2273 Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
2275 * src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
2276 fact that leading blanks may be stripped.
2278 Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
2280 * configure.in (ALL_LINGUAS): Add dutch (nl).
2282 Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
2284 * src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
2285 (split_3): Translate NL bytes not to NUL, but to
2286 NEWLINE_REPLACEMENT_STRING.
2287 Suggested by Ulrich Drepper.
2288 (main): Translate back to NL-containing filename.
2290 Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
2292 * src/md5sum.c (split_3): Take an additional parameter, S_LEN.
2294 Map translated NEWLINE-containing filename back into the original
2295 NEWLINE-containing name.
2296 (md5_check): Translate NEWLINE bytes to NUL bytes in filename.
2298 Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
2300 * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
2301 appears in the output of --version. Reported by RMS.
2303 Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
2305 * src/Makefile.am (LDADD): Remove sort-specific hack to link
2307 * aclocal.m4 (AM_FUNC_STRTOD): New macro.
2308 * configure.in (AM_FUNC_STRTOD): Use it.
2309 (AC_REPLACE_FUNCS): Remove strtod.
2310 Suggested by Tom Tromey.
2312 * po/Makefile.in.in (install-data): Add `else true;' to avoid
2313 letting failing if-condition cause make failure.
2314 From Fred Fish (fnf@ninemoons.com).
2316 Tue Jun 25 21:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2320 Tue Jun 18 20:43:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
2322 * aclocal.m4: Update from gettext-0.10.20.
2323 * ABOUT-NLS: Likewise.
2326 Thu Jun 13 22:31:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
2328 * configure.in (VERSION): Bump to 1.18a.
2330 * po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
2331 Depend on POTFILES only when using maintainer mode.
2333 * intl/*: Update from gettext-0.10.18.
2335 Tue Jun 11 23:32:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
2339 * po/Makefile.in.in: Update from gettext-0.10.17.
2341 * ABOUT-NLS: Likewise.
2343 Mon Jun 10 18:22:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
2345 * Makefile.am (cvs-dist): Use -c option in cvs tag command.
2347 Fri Jun 7 22:06:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2349 * configure.in (VERSION): Set to 1.18.
2351 * src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
2352 the strtod supplied with this package. Otherwise, linking failed on
2353 Solaris-2.4 systems. Reported by Wayne Stewart <wstewa@atl.com>.
2355 Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
2357 * po/Makefile.in.in: Update from gettext-0.10.16.
2359 * ABOUT-NLS: Likewise.
2360 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
2361 gettext-related ones.
2362 Update from gettext-0.10.16.
2364 Fri May 31 22:04:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
2368 * Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
2371 Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2375 * tail.c (main): Interpret the old-style +VALUE and -VALUE options
2376 like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
2377 suffix multipliers. This makes the code consistent with --help
2378 output. Reported by Karl Heuer.
2380 * sort.c (limfield): #ifdef-out a block of code that makes
2381 GNU sort incompatible with Unix sort when a key-end spec refers
2382 to the N'th character in a field that has fewer than N characters.
2383 The POSIX spec doesn't appear to specify behavior for this case.
2386 * po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
2387 longer than 14 characters.
2388 (mostlyclean): Likewise.
2391 * po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
2392 when using maintainer mode. Reported by Karl Heuer.
2394 * po/Makefile.in.in (.po.mo): Reenable dependency and rule.
2395 It is required when using native NLS, e.g. on Solaris.
2396 From Marcus Daniels.
2398 * od.c (decode_one_format): Use %lu (not %d) printf format
2399 corresponding to unsigned long, SIZE.
2403 * intl/Makefile.in (installcheck): New target.
2404 * po/Makefile.in.in (installcheck): New target.
2406 * od.c (decode_one_format): Take another parameter.
2407 Give a specific diagnostic for invalid format spec here rather
2408 than an overly general one from caller's caller.
2409 (decode_format_string): Update caller.
2410 (main): Don't give diagnostic here when decode_format_string fails.
2411 Remove assertions that could fail on some Crays because they don't
2412 have a two-byte type.
2413 Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
2415 Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
2417 * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
2418 less portable fileno (stdin) and fileno (stdout).
2419 * sort.c (main): Use STDIN_FILENO instead of less portable
2422 Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
2424 * Makefile.am (distcheck): Remove target and rule -- automake-0.33
2425 adds it automatically.
2427 Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov)
2429 * configure.in (LINGUAS): Add ko.
2430 * Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
2432 Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
2434 * Makefile.am (distcheck): New target. From Gord Matzigkeit.
2436 Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
2438 * po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise
2439 they won't be built and install could fail. From Ulrich Drepper.
2440 (.po.mo): Disable dependency and rule when not in maintainer mode.
2442 * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
2443 on whether we're using GNU gettext. From Ulrich Drepper.
2445 Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
2447 * intl/Makefile.in (distdir): Renamed from dist. For compatibility
2449 * po/Makefile.in.in (distdir): Likewise.
2451 * po/Makefile.in.in (all-yes): Depend on GMOFILES.
2452 Depend on CATALOGS and GMOFILES files only in maintainer mode.
2454 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
2456 * configure.in: Require autoconf-2.10.
2458 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
2459 * configure.in (jm_MAINTAINER_MODE): Use it.
2461 Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov)
2463 * configure.in (LINGUAS): Add de.
2464 * po/de.po: New file.
2466 * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
2467 * regex.c [IN_CTYPE_DOMAIN]: Likewise.
2468 * system.h [IN_CTYPE_DOMAIN]: Likewise.
2470 Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
2472 * fmt.c (copy_rest): Don't copy past end of prefix. Output
2473 trailing spaces if the prefix had any. Before, fmt would
2474 improperly output NUL bytes. The command
2475 perl -e 'print "| S";' |fmt -p' | '|tr '\0' @
2476 output `|@S'. Reported by François Pinard.
2478 * sort.c (main): Give a better diagnostic for `sort -0'.
2479 Reported by Karl Berry.
2481 * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
2482 Otherwise, some systems lose because the value AC_C_INLINE choses
2483 with plain `cc' is different from that chosen when using the ANSI-mode
2484 C compiler. From Kaveh Ghazi.
2486 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
2488 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
2489 * configure.in: Use it.
2490 * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
2491 (EXTRA_DIST): Add getopt.c and getopt1.c
2493 * src/*.c, src/*.h: Update Copyright years to include 1996.
2495 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
2497 * getline.c: New version from gettext-0.10.12.
2498 * getline.h: Likewise.
2499 * configure.in (AC_CHECK_FUNCS): Add getdelim.
2500 Suggested by Ulrich Drepper.
2502 * md5sum.c (md5_check): Remove spurious newline at end of error
2505 * od.c (decode_one_format): Use printf's L modifier for long doubles,
2506 not `l'. From Eric Backus.
2508 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
2510 * od.c: Include <values.h>.
2511 [!BITSPERBYTE]: Define.
2512 [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
2513 * configure.in (AC_CHECK_HEADERS): Add values.h.
2515 Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov)
2517 * Makefile.am (cvs-dist): New rule. Based on the one from
2518 Tom Tromey's automake.
2520 Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
2522 * tail.c (main): Make code clearer: use new variable `n_files' in
2523 place of `argc - optind'. Use `file' instead of `argv + optind'.
2525 Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
2527 * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
2530 * memcasecmp.c: Unprotoize.
2534 * join.c (decode_field_spec): Rename local variable `valid'
2535 to invalid (and reverse sense) to avoid conflict with the
2536 macro definition in /usr/include/locale.h on SunOS 4.1.3.
2538 Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
2540 * uniq.c: Add new option --ignore-case (-i).
2541 Include memcasecmp.h.
2542 (different): Compare with memcasecmp if ignoring case.
2545 * join.c (memcasecmp): Remove static definition of function.
2546 Include memcasecmp.h instead.
2548 * memcasecmp.c: New file.
2549 * memcasecmp.h: New file.
2550 * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
2551 (noinst_HEADERS): Add memcasecmp.h.
2553 Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov)
2555 * tr.c: The following commands all failed unnecessarily.
2556 tr -cs '[:upper:]' '[X*]'
2557 tr -dcs '[:lower:]' n-rs-z
2558 tr -ds '[:xdigit:]' [:alnum:]'
2559 tr -dcs '[:alnum:]' [:digit:]'
2561 Reported by Ross Ridge (ross@worf.mks.com).
2562 (validate): Add missing conjunct (translating) in test for
2563 `translating and complementing character classes' error. Before,
2564 valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
2565 (homogeneous_spec_list): New function.
2566 (validate): Use it to relax the old (overly restrictive) restriction
2567 that prohibited use of complemented character classes when translating.
2568 Now, that is allowed as long as the translation maps many to one.
2569 (get_spec_stats): Rename and redefine global has_char_class from
2572 Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
2574 * aclocal.m4: Update NLS macros from gettext-0.10.11.
2576 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
2577 when srcdir != builddir. From Kaveh Ghazi.
2579 Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov)
2581 * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
2582 to be POSIX compliant. From Stephen Gildea <gildea@x.org>.
2584 Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
2586 * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
2587 * od.c (skip, main): Likewise.
2588 * tr.c (main): Likewise.
2590 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
2591 join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
2592 tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
2593 EXIT_FAILURE, rather than 0 or 1.
2595 Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
2597 * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
2598 is defined to zero. Suggested by Paul Eggert.
2600 * sort.c [SORT_FAILURE]: New macro.
2601 Be careful to exit with 1 only when -c is used and the
2602 input is not properly sorted. In all other cases, use
2603 SORT_FAILURE as required by POSIX.
2604 (main): Change some `error (1, ...' to use SORT_FAILURE.
2605 Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
2606 Replace all uses of `2' (as exit code) with SORT_FAILURE.
2608 Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov)
2610 * csplit.c: Include assert.h, but disable assertions.
2611 (process_line_count): Replace if-abort with a slightly relaxed
2612 assertion. Before, `echo |csplit - 1 1' would abort.
2613 Reported by Samuli.Karkkainen@hut.fi.
2614 (parse_patterns): Disallow uses like `csplit FILE 0' with zero
2615 line number, `csplit FILE 2 1' with decreasing line numbers, and
2616 warn about uses like `csplit FILE 3 3' that have equal line numbers.
2618 * sort.c (main): Declare to be of type int, not void.
2619 From Peter Seebach <seebs@taniemarie.solon.com>.
2620 * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
2621 nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
2622 wc.c (main): Likewise.
2624 Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
2626 * configure.in (PACKAGE_VERSION): New macro.
2627 * acconfig.h (PACKAGE_VERSION): Add it.
2628 * src/Makefile.am: Remove rules for generating version.c.
2629 Remove references to version.o, version.h, and stamp-v.
2630 * version.c: Remove file.
2631 * version.h: Remove file.
2632 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
2633 head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
2634 sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
2636 (main): Use PACKAGE_VERSION instead of version_string.
2638 Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
2640 * sort.c (write_bytes): Renamed from xfwrite.
2641 Remove SIZE parameter. It was always 1. Update all callers.
2642 Rename NELEM parameter to N_BYTES and change its type to size_t.
2644 Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
2646 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
2647 fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
2648 split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
2649 Initialize for internationalized message support: call setlocale,
2650 bindtextdomain, and textdomain.
2651 * system.h: Add definitions and includes for NLS.
2652 * Makefile.am (SUBDIRS): Add intl and po.
2653 * src/Makefile.am (datadir): Define.
2654 (localedir): Define.
2655 (DEFS): Add LOCALEDIR definition.
2656 (LDADD): Add @INTLLIBS@.
2657 * aclocal.m4: Add NLS-related macro definitions from
2658 gettext distribution.
2659 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
2660 HAVE_STPCPY): New macros.
2661 Add PACKAGE and VERSION.
2662 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
2663 (VERSION): Likewise.
2664 (ALL_LINGUAS): Define.
2665 (AC_CHECK_HEADERS): Add float.h.
2666 (ud_GNU_GETTEXT): Use it.
2668 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
2670 From François Pinard.
2672 * tr.c (star_digits_closebracket): Declare formal param, IDX,
2673 and local I to be of type size_t (rather than int) to avoid
2674 warnings from gcc -Wall.
2676 Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
2678 * src/Makefile.am: Adapt for automake-0.30.
2679 (noinst_HEADERS): Rename from HEADERS.
2680 (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
2681 to DEFS automatically.
2682 * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
2684 Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
2686 * join.c (xfields) [without -t]: Ignore leading blanks.
2687 From David Dyck (dcd@tc.fluke.COM).
2689 Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
2691 * join.c [TOLOWER]: Define.
2692 (usage): Briefly describe new --ignore-case (-i) option.
2693 (memcasecmp): New function.
2694 (main): Set IGNORE_CASE for -i.
2695 (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
2696 Suggestion and an initial patch from Alberto Accomazzi
2697 <alberto@cfa0.harvard.edu>.
2699 Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
2701 * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
2702 (usage): Describe it.
2703 (main): Set eolchar to 0 for -z.
2704 From Mark W. Eichin <eichin@cygnus.com>.
2706 Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
2708 * join.c (main): Mark two strings for translation.
2709 * md5sum.c (md5_check): Mark a string for translation.
2710 From François Pinard.
2712 Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
2714 Update for automake-0.29.
2715 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
2716 * src/Makefile.am: Likewise.
2717 * lib/Makefile.am: Likewise.
2718 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
2719 * man/Makefile.am (man_MANS): Renamed from MANS.
2721 * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
2723 From Derek Clegg (dclegg@next.com).
2725 Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
2729 Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
2731 * tail.c (dump_remainder): Flush stdout when tailing-forever on
2732 multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
2734 Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
2736 * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
2737 not just -Xc. From François Pinard.
2739 * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
2740 distributed automatically. From Tom Tromey.
2742 Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
2744 * nl.c: Include rx.h after limit.h (not before) to avoid warning
2745 about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
2746 its definition. From Kaveh Ghazi.
2748 * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
2749 works again. Reported by François Pinard and Kaveh Ghazi.
2751 * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
2752 [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
2753 (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
2754 mismatch errors from e.g. SunOS's /bin/cc.
2755 Reported by Kaveh Ghazi.
2757 Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
2759 * configure.in (VERSION): Set variable directly rather than from
2761 * Makefile.am (DIST_OTHER): Remove VERSION.
2762 * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
2763 (stamp-v): New target; depend on Makefile.
2764 (DISTCLEANFILES): Add stamp-v, version.c.
2766 Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
2768 * sort.c (keycompare): Rewrite cases handling ignored characters
2769 so that they really are ignored. Reported by Carl Johnson
2770 <carlj@cjlinux.home.org>.
2772 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2774 * configure.in: Touch stamp-h only if config.h is remade.
2776 * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
2777 syntax_parens field.
2779 Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
2781 Use automake to generate Makefile.in files.
2782 * Makefile.am: New file.
2783 * doc/Makefile.am: New file.
2784 * lib/Makefile.am: New file.
2785 * man/Makefile.am: New file.
2786 * src/Makefile.am: New file.
2788 Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
2790 * fmt.c (main): Use xstrtol instead of atoi.
2792 * fold.c (main): Use xstrtol instead of atoi.
2793 (fold_file): Make a couple locals `int', not size_t, and cast
2794 fwrite's third parameter to size_t.
2796 * nl.c (main): Use xstrtol instead of atoi.
2797 Rename misleading --first-page=N option to --starting-line-number=N.
2800 * uniq.c (main): Use xstrtol instead of atoi.
2802 Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
2804 * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
2806 Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
2808 * aclocal.m4 (ud_WITH_REGEX): New macro.
2809 * configure.in: Use it.
2810 * rx.c, rx.h: New files.
2811 * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
2812 (SOURCES, DISTFILES): Add rx.c, rx.h.
2813 * acconfig.h (WITH_REGEX): Add it.
2814 * csplit.c [!WITH_REGEX]: Include rx.h.
2815 * nl.c [!WITH_REGEX]: Likewise.
2816 * tac.c [!WITH_REGEX]: Likewise.
2817 From Ulrich Drepper and François Pinard.
2819 Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
2821 * sort.c (main): Diagnose invalid arguments to -k, then fail.
2823 * sort.c (numcompare): Properly handle all cases in which signs differ.
2826 * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
2827 Append `/man1'. Reported by Karl Heuer.
2829 * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
2831 * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
2833 Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
2835 * lib/Makefile.in (default): New target.
2837 * sort.c (numcompare): Properly order `-' and valid integers;
2838 treat `-' as if it were zero. Reported by Ross Alexander
2839 <r.alexander@auckland.ac.nz>.
2841 * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
2842 (.PHONY): Depend on default.
2844 Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
2846 * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
2847 (jm_AUTODEPS): Likewise.
2848 (jm_WITH_GNU_MAKE): Likewise.
2849 * configure.in (jm_AUTODEPS): Remove.
2851 * sort.c (begfield): Replace loop with equivalent if-else.
2852 (limfield): Fix bug that made field specs like -k1.5 return a
2853 pointer into LINE beyond the first field.
2854 Don't try to trim trailing blanks here; it's not
2855 possible because we don't know where the field begins.
2856 Replace loop with equivalent if-else.
2857 (trim_trailing_blanks): New function.
2858 (findlines): Call it.
2859 (keycompare): Likewise.
2860 (main): Don't decrement T2 corresponding to `x' in field
2861 specs like -ku.v,w.x.
2863 Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
2865 * csplit.c [!UINT_MAX]: Define.
2868 (string_to_number): Remove function.
2869 (check_for_offset): Use xstrtoul instead of string_to_number.
2870 (parse_repeat_count): Likewise.
2871 (parse_patterns): Likewise.
2874 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
2876 * Makefile.in (all et. al.): If make was invoked with -k and a
2877 sub-make fails, fail after the loop rather than exiting right away.
2878 Otherwise, make's -k option could be ineffective.
2880 Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
2882 * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
2884 Update for autoconf-2.5:
2885 * src/Makefile.in (libdir): Set to @libdir@.
2886 (bindir): Set to @bindir@.
2887 * doc/Makefile.in (infodir): Set to @infodir@.
2888 * man/Makefile.in (exec_prefix): Remove it.
2889 (mandir): Set to @mandir@.
2890 (bindir): Remove it.
2892 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
2894 * Makefile.in (default): New default target. Depend on `all' to
2895 work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
2898 Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
2900 * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
2902 * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
2903 * src/Makefile.in (C_MKDEP): Rename from MKDEP.
2904 * lib/Makefile.in (C_MKDEP): Likewise.
2905 * mkdep-Makefile (C_MKDEP): Likewise.
2908 * csplit.c [__P]: Don't define it here.
2909 * pr.c [__P]: Don't define it here.
2910 * fmt.c [__P]: Don't define it here.
2911 * system.h [__P]: Define it here.
2913 * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
2914 Revamp, with suggestions from Franc,ois Pinard.
2915 (jm_WITH_GNU_MAKE): New macro.
2916 (jm_PROG_MKDEP): New macro.
2917 * configure.in (jm_PROG_MKDEP): Use it.
2918 * src/Makefile.in (MKDEP): Set it.
2919 * lib/Makefile.in (MKDEP): Likewise.
2920 * mkdep-Makefile: Use MKDEP, not DEP_CC.
2921 (DEP_CFLAGS): Remove it.
2923 Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
2925 * sort.c: Add support for sorting numbers in scientific notation.
2927 (struct keyfield): Add field: general_numeric.
2928 (usage): Describe -g option.
2929 (general_numcompare): New function.
2930 (keycompare): Use new comparison function when general_numeric
2932 (set_ordering): Honor `g' flag.
2933 (main): Initialize and use new field.
2934 From Marcus Daniels <marcus@sysc.pdx.edu>.
2936 * configure.in (AC_REPLACE_FUNCS): Add strtod.
2937 * lib/Makefile.in (SOURCES): Add xstrtod.c.
2938 (OBJECTS): Add xstrtod.o.
2939 (DISTFILES): Add xstrtod.h.
2941 * csplit.c (cleanup): Don't exit.
2942 (interrupt_handler): Rewrite to reset default signal handler
2943 then repost caught signal.
2944 (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
2945 process_line_count, process_regexp, create_output_file,
2946 close_output_file): Call cleanup_fatal, not cleanup.
2947 Add const attribute to lots of parameters.
2948 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
2951 * tac.c: (cleanup): Don't exit.
2952 (cleanup_fatal): New function. Call cleanup, then exit.
2953 (sighandler): New function.
2954 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
2956 (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
2958 Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
2960 * od.c (skip): Cast fseek's offset argument to `long'.
2961 Erik Bennett <bennett@cvo.oneworld.com> reported that this is
2962 necessary on BSDI systems. And if offset doesn't fit in a long,
2963 then try using lseek instead.
2965 * sort.c (xmalloc): Declare static.
2966 (xrealloc): Likewise.
2968 * tac.c (cleanup): Add signal number parameter.
2971 * cat.c (main): Don't die when dev/ino of input and output are
2972 the same and the file descriptors correspond to stdin and stdout.
2973 This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
2974 Otherwise, running `cat << X > $$' would fail with `cat: -: input
2975 file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
2977 * Makefile.in (DISTFILES): Add @README_ALPHA@.
2978 (config.status) Depend on VERSION.
2979 * configure.in: Set README_ALPHA if the version number ends in [a-z].
2981 Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
2983 * fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
2985 src/Makefile.in (.c._c): Don't redirect directly to $@.
2986 (._c._o, .c._o): Remove temporary src file.
2988 Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
2990 * VERSION: New file.
2991 * configure.in (VERSION): New variable.
2992 (PACKAGE): New variable.
2994 * Makefile.in (DISTFILES): Add VERSION.
2995 (distdir): Use @PACKAGE@-@VERSION@, not distname.
2996 Remove all references to distname.
2997 * src/Makefile.in (version.c): Generate it.
2998 (SOURCES): Remove now-generated version.c.
2999 (distclean): Delete version.c.
3000 * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
3003 * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
3004 Remove all references to distname.
3006 * split.c: New option: --verbose.
3007 (main): Recognize it.
3008 (usage): Document it.
3009 From Marty Leisner <leisner@sdsp.mc.xerox.com>.
3011 Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
3013 * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
3017 (store_columns): Remove spurious 2nd argument in call to read_line.
3018 [__P]: Define. Use it in prototyped forward decls.
3020 * csplit.c: Move prototypes after struct declarations.
3021 Remove prototypes for xmalloc, xrealloc.
3022 Protect prototypes with __P.
3023 (new_control_record): Cast arg 1 to realloc.
3025 * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
3028 Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
3030 * csplit.c (close_output_file): Set output_stream to NULL so we
3031 don't recurse endlessly between this function and cleanup.
3033 * unexpand.c: Reorder functions to obviate forward dcls. Remove
3034 forward dcls. Protoize. Add `const' attribute to some parameters.
3036 Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
3038 * wc.c: Reorder functions to obviate forward dcls. Remove
3039 forward dcls. Protoize. Add `const' attribute to some parameters.
3041 * split.c: Likewise.
3043 * split.c (isdigits, convint): Remove these.
3044 (main): Use xstrtol instead.
3046 Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
3048 * paste.c (main): Move function body to end of file.
3049 Remove forward dcls and protoize.
3050 * sum.c (main): Likewise.
3051 * nl.c: Protoize. Reorder functions to obviate forward dcls.
3052 Remove forward dcls.
3054 * src/Makefile.in (OBJECTS): Reflect that all of the above
3057 * sum.c (bsd_sum_file): Give file name parameter const attribute.
3058 (sysv_sum_file): Likewise.
3060 * tac.c (xwrite): Give output buffer parameter const attribute.
3061 (output): Likewise for both parameters.
3062 (tac): Likewise for file name parameter.
3063 (tac_file): Likewise.
3065 Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
3067 * md5sum.c (md5_check): Use the same message format when there is
3068 a single file and it gets a read error or checksum mismatch as when
3069 there are more. Write that warning to standard error, not standard
3070 output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
3072 Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
3074 * sort.c (xtmpfopen): New function to set proper permissions on
3075 temporary files. Use it instead of xfopen. Reported by Erik Corry
3076 (erik@kroete2.freinet.de).
3078 Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
3080 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
3081 * configure.in: Use it.
3083 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
3084 (.c.o): Rewrite to be more like src/Makefile.in.
3086 * src/Makefile.in (distclean): Remove .deps.
3087 Include @top_srcdir@/mkdep-Makefile.
3089 * mkdep.Makefile: New file.
3090 * Makefile.in (DISTFILES): Add mkdep-Makefile.
3091 * doc/Makefile.in (mostlyclean): Also remove *.info.
3093 Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
3095 * od.c: Indent cpp directives.
3097 * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
3098 with large repeat counts.
3099 (struct E_string): New struct.
3100 (find_closing_delim): Take E_string arg rather than char* and length.
3101 (find_bracketed_repeat): Likewise.
3102 (star_digits_closebracket): New function.
3103 (append_char_class): No longer give diagnostic.
3104 (append_equiv_class): Likewise.
3105 (build_spec_list): Give them here instead, allowing string1 like
3106 [:*][:upper:] that got errors before.
3107 Take E_string arg rather than char*.
3108 Convert switch stmts into if-then so as to use ES_MATCH.
3110 Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
3112 * cat.c: Protoize. Reorder functions to obviate forward dcls.
3113 Remove forward dcls.
3114 * expand.c: Likewise.
3121 * src/Makefile.in (OBJECTS): Reflect that all of the above
3124 * head.c: Add `const' attribute to dcls of lots of formals.
3126 * sort.c: Add `const' attribute to dcls of lots of formals.
3127 Move struct dcls to precede dcls of file-scope variables.
3128 (monthtab, keyhead): Separate variable dcls from type dcls.
3130 Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
3132 * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
3133 list item separators, per POSIX spec.
3134 (prjoin): Rewrite loop that iterates over field specs.
3135 Handle case in which file spec is 0.
3137 Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
3139 * strpbrk.c: New file.
3140 * lib/Makefile.in (SOURCES): Add strpbrk.c.
3143 Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
3145 * join.c (add_field): No longer return a value.
3146 (decode_field_spec): New function.
3147 (add_field_list): Rewrite to be more strict.
3148 Before, `,1.2' was accepted as valid.
3149 (main): Use xstrtol instead atoi.
3150 Combine nearly identical -a and -v cases.
3153 Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
3155 * join.c (main): Report `too few/many non-option arguments'
3156 then print --help output rather than just the latter.
3157 Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
3158 (usage): Describe POSIX -1, -2 options and deprecate -j* ones
3160 * join.c (usage): Move to precede all other functions.
3164 Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
3166 * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
3167 to determine whether `sigaction' functions are available.
3168 Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
3169 Fix suggested by Karl Berry.
3171 * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
3174 * cut.c: Convert many declarations using `int' to use `unsigned int'
3175 to avoid warnings from `gcc -Wall' about comparing signed and
3177 (set_fields): Use memset (not open coded loop) to initialize array.
3179 Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
3183 * Makefile.in (DISTFILES): Remove README.alpha for major release.
3185 * od.c (decode_one_format): Remove spurious semicolon.
3188 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
3190 * man/Makefile.in (install-data, uninstall): Use sed not basename.
3191 The GNU Coding Standard suggests that only a select set of
3192 relatively standard utilities be used in Makefiles. basename is
3193 not among them. Suggested by Ulrich Drepper.
3195 Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
3197 * cksum.c: Protoize.
3200 * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
3202 (cksum): Depend on cksum$O.
3203 (cut): Depend on cut$O.
3205 Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
3209 * Makefile.in (DISTFILES): Add README.alpha.
3211 * lib/Makfile.in: (GETOPT, MEMCHR, REGEX): New variables.
3212 (OBJECTS): Use them instead of hardcoding object file names.
3213 Suggested by Ulrich Drepper.
3215 * md5sum.c (md5_check): Distinguish between open/read failure
3216 and checksum mismatch.
3218 Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
3220 * md5sum.c: Protoize.
3221 * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
3222 (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
3223 (md5sum): Depend on md5sum$O.
3225 * md5sum.c (main, usage): Remove -h, -s, -v short options.
3226 Rename --verbose to --warn, --quiet to --status.
3227 (main): Handle --help and --version using parse_long_options.
3228 (md5_check): Check ferror.
3230 * sort.c (tempname): Replace `16' with a more readable expansion.
3231 Make sure that counter never exceeds 99999.
3232 (checkfp): Rearrange loop to avoid duplicate test.
3233 Move a couple dcls from function scope into inner block.
3235 Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
3237 * md5sum.c (main): Fail if either --verbose or --quiet is specified
3238 when not verifying checksums.
3240 * md5sum.c (md5_check): Fail if no valid line is found.
3241 Don't use the word `fail' unless there were failures --
3242 instead, say `all N tests passed.'
3244 * md5sum.c (main) [handling --string option]: Don't output
3245 nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
3246 * md5-test.rfc: Remove now-inconsistant `b' marker.
3247 (usage): Clarify help message. With suggestions from Greg Troxel.
3249 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
3251 * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
3252 compiler warning. From Ulrich Drepper.
3254 * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
3255 compiler warning. From Ulrich Drepper.
3257 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
3260 Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
3262 * system.h (_): Define macro -- as empty for now.
3263 * src/*.c: Annotate localizable strings with _(...). From Franc,ois.
3265 Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
3269 * configure.in: Add fp_C_PROTOTYPES.
3271 Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
3273 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
3274 Add suffixes, dependencies, and rules to convert ANSI source to K&R
3275 when required. Mark tr.o and comm.o as the only such files (for now).
3280 * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
3281 (configure): Depend on aclocal.m4.
3282 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
3284 Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
3286 * md5sum.c (md5_check): Use getline instead of fgets.
3288 * lib/Makefile.in: (SOURCES): Add getline.c.
3289 (OBJECTS): Add getline.o.
3290 (DISTFILES): Add getline.h.
3291 (getline.o): Depend on getline.h.
3293 * md5.c [memcpy]: Define to bcopy if needed.
3294 (md5_buffer): Explicitely cast SWAP expressions to unsigned
3297 * lib/Makefile.in (strtoul.o): Depend on strtol.c.
3299 * sort.c (check): Print `disorder on...' message on standard error,
3300 not stdout. This is a minor concession to POSIX which says
3301 `no output shall be produced...'.
3303 * sort.c (main): Fix -k so it works. -k 2,3 was being treated
3304 like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
3306 Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
3308 * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
3309 before applying $(transform) to manual name. From Karl Berry.
3311 * md5sum.c (have_read_stdin): New global variable.
3312 (md5_file, md5_check): Set it.
3315 * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
3316 (md5_file): Take a new parameter, MD5_RESULT, and no longer
3318 (md5_check): Invoke md5_file instead of calling fopen directly.
3319 When giving a diagnostic for a line with invalid format, also report
3321 (main): Generate output after a successful md5_file call.
3322 [in many places]: Upon detection of an error, rather than exiting
3323 immediately, issue a diagnostic, note that an error occurred and
3326 Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
3328 * tail.c (tail_bytes) [from_start]: For regular files, seek
3329 relative to the initial input file pointer position, not
3330 necessarily from the beginning of the file.
3331 [!from_start]: Don't back up past the initial position of the
3333 (tail_lines): Call file_lines only if FD refers to a regular file
3334 with its file pointer positioned at beginning of file. Otherwise,
3335 call pipe_lines. This is a kludge. Once there's a decent test
3336 suite, fix this properly.
3337 Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
3338 would output both lines of the input file even though the first had
3339 already been read. Reported by John Roll (john@panic.harvard.edu).
3341 * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
3343 * csplit.c (main): When too few arguments are given, don't just
3344 issue the usage message; also report why.
3346 Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
3348 * md5sum.c (md5_check): New function -- extracted from main.
3350 Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
3352 * md5sum.c (md5_file): New function -- extracted from main.
3353 (main): Call the new function instead of doing all that in an
3354 if-stmt. Always use "%s" format rather than raw filename as
3355 format argument in printf-style functions like error. Otherwise,
3356 filenames containing `%' are likely to lose.
3357 Remove all mention of `old format'.
3358 (split_3): No longer parse the `new format.' There is only one
3359 valid format now: the compatible one.
3361 * lib/Makefile.in: (SOURCES): Add md5.c.
3362 (OBJECTS): Add md5.o.
3363 (DISTFILES): Add md5.h.
3364 (md5.o): Depend on md5.h.
3366 * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
3367 * lib/md5.c (md5_stream): Check for read failure and return
3368 indication of success rather than second argument.
3369 * lib/md5.h (md5_stream): Update prototype.
3370 [__P]: Define macro.
3371 * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
3372 (main): Report an error if md5_stream fails. Otherwise, running
3373 `md5sum dir-on-mounted-filesystem' always reported the checksum
3374 for an empty file. Now it gets the `is a directory' error.
3375 Greg McGary (gkm@magilla.cichlid.com) reported that the released
3376 version got stuck in an infinite loop with such arguments.
3378 * lib/md5.c: New file.
3379 * lib/md5.h: New file.
3380 * md5sum.c: Rewritten to use library interface.
3381 From Ulrich Drepper.
3383 Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
3385 * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
3387 Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
3389 * md5sum.c Add #else block after #ifdef VMS.
3390 (main): Rename local variable.
3391 Detect and report failed fclose calls on stdout and checkfile_stream.
3393 * tr.c (unqote): Comment out unreachable break stmts.
3394 (append_range): Declare FIRST and LAST parameters to be unsigned int,
3396 (find_closing_delim): Clean up interface, separating boolean success
3397 indicator and index.
3398 (find_bracketed_repeat): Likewise.
3399 (build_spec_list): Adapt to use new interfaces.
3400 Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
3401 type size_t, not int.
3402 (main): Declare NR and CHARS_READ to be of type long, not int.
3404 * sort.c (main): Comment out unreachable break stmt.
3406 * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
3407 call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
3408 off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
3409 long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
3411 * comm.c: Reorder functions so main is last, so no forward dcls
3414 Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
3416 * sort.c (main): When using obsolescent +pos -pos syntax, allow
3417 omission of field spec only when character offset is specified.
3418 Otherwise, -. +. would be accepted.
3420 Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
3422 * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
3423 position specification. For compatibility with existing practice
3424 (what vendors?), omitting M is now equivalent to specifying `0' for M,
3425 but only when using the +pos -pos syntax, not with the -k option.
3426 From Rick Sladkey (jrs@world.std.com).
3428 Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
3430 * od.c (dump): Correct loop-termination criterion.
3431 Before, running `printf 1234| ./od --width=4 --read-bytes=4'
3432 printed output for 8 bytes -- the last four were garbage.
3433 This happened only when the dump limit, N, was specified (with
3434 --read-bytes=N) and N was a multiple of bytes_per_block
3435 (usually 16, but 4 in this example). From Andreas Schwab.
3437 Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
3439 * lib/Makefile.in (check): Depend on libtu.a.
3441 * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
3442 (main): Print each sum line in (de facto) standard Plumb/Lankester
3444 New option: --quiet.
3445 Check option no longer takes an argument.
3446 When checking, exit status reflects success.
3448 Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
3450 * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
3451 Autoconf (via config.h) defines it away for compilers that don't
3454 * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
3455 defining to avoid redefinition warning on some systems.
3457 * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
3458 This avoids potential conflict with max macro from some system's
3459 header files when using bad pre-ANSI compilers.
3461 * uniq.c (usage): Fix typo in text of --help output.
3462 From Steve McConnel <steve@acadcomp.sil.org>
3464 * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
3465 also check `unsigned long', as a concession to systems with
3466 int's smaller than 32 bits.
3468 * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
3469 AC_FUNC_MEMCMP already handles it. This avoids warnings from
3470 ranlib on nextstep systems. From Kaveh Ghazi.
3472 * csplit.c (interrupt_handler): Declare to have a single integer
3473 parameter. Otherwise, some compilers fail with a type mismatch
3474 error in sa_handler assignment.
3476 * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
3477 headers that typedef `word' get syntax errors because of the
3478 variable by the same name.
3480 * join.c [join]: Redefine to avoid conflict with prototype in some
3481 system header file. Also for Unicos.
3483 * md5sum.c (main): Remove spurious colon in getopt spec string.
3484 From Ken Pizzini <kenp@spry.com>.
3486 Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
3488 * md5sum.c (md5_file): Initialize two elements of LEN portably,
3489 rather than with ANSI aggregate initialization. Reported by
3490 Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
3492 Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
3496 * md5sum.c (process_buffer): Copy values from struct into
3497 individual local variables before performing computation on them,
3498 then copy results back into returned struct. Solely for better
3499 optimization by compilers that can't keep struct members in
3500 registers. From Ulrich Drepper.
3502 Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
3504 * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
3505 Don't use #elif. Some older compilers don't grok it.
3506 (split_3): New function to parse out sum, flag, and filename
3507 when reading check file.
3508 (hex_digits): Remove length parameter since string parameter is
3510 (main): Don't allocate separate arrays for filename and sum
3511 when checking. Get pointers into line buffer with split_3 instead
3513 (main): Treat `no file args' just like `-' when not checking
3515 (hex_digits): Unprotoize.
3517 * md5sum.c (main): Don't use a separate loop to convert to lower
3518 case. Suggested by Ulrich Drepper.
3521 From Ulrich Drepper.
3523 * md5sum.c: Don't include values.h.
3526 * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
3527 and _POSIX_VERSION. Reported by Arne H. Juul.
3529 Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
3531 * tr.c [NDEBUG]: Define it to disable assertions. Some systems
3532 have a broken <assert.h> header.
3533 (is_char_class_member): Set a variable in each branch of switch
3534 stmt and return that value after the switch (rather than returning
3535 directly from every branch).
3536 (unquote): More int->size_t changes.
3537 (build_spec_list): More int->size_t changes.
3538 Be very careful about comparison now that variables are unsigned:
3539 Use i + 2 < len rather than i < len - 2. The latter didn't work
3540 for len < 2. Caught early thanks to a thorough regression test
3543 Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
3545 * sort.c (xfclose): Don't try to flush stdin, only stdout.
3546 Otherwise, at least Ultrix-4.3's fflush would return EOF.
3547 Reported by Jim Blandy (jimb@cyclic.com).
3549 * tr.c (non_neg_strtol): Don't compare signed and unsigned.
3550 [struct Spec_list] (indefinite_repeat_element): New member.
3551 Use size_t rather than int or unsigned long where reasonable.
3552 (get_spec_status): Make interface cleaner.
3553 (get_s1_spec_status): New function.
3554 (get_s2_spec_status): New function.
3555 (validate): Use new functions instead of get_spec_status.
3557 Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
3559 * md5sum.c: New file. From Ulrich Drepper.
3560 * md5-test.rfc: New file.
3561 * Makefile.in: (PROGS): Add md5sum.
3562 (check): Run a recursive make in each subdirectory.
3563 * man/Makefile.in: (MANFILES): Add md5sum.1.
3564 * src/Makefile.in: (SOURCES): Add md5sum.c.
3565 (OBJECTS): Add md5sum.o.
3566 (PROGS): Add md5sum.
3567 (check): Add basic checks for md5sum.
3568 (md5sum): Add dependency and link rule.
3569 (DISTFILES): Add md5-test.rfc.
3571 * tr.c (look_up_char_class, append_char_class, append_equiv_class):
3572 Use const attribute when appropriate.
3574 Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
3576 * join.c: Overhauled to make -a1 and -a2 options work.
3577 Passed all tests in a fairly thorough test suite.
3578 Reported by Michael Hasselberg (mikelh@zonta.ping.de).
3580 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
3582 * tail.c (main): Remove dcl of and statements that set now-unused
3585 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
3586 Without this, SunOS doesn't get type for memchr.
3587 Reported by Kaveh Ghazi.
3589 Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
3591 * tail.c (tail_lines): Change one more `long' to `off_t'.
3592 Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
3594 * csplit.c [struct control]: Change type of `repeat' to unsigned
3595 long to avoid conversion warning.
3597 Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
3599 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
3601 * xstrtol.c (__strtol): Remove prototype altogether.
3602 Move inclusion of xstrtol.h back so that it follows system headers.
3606 Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
3608 * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
3611 * xstrtol.c: Define NDEBUG for systems with losing assert.h.
3612 (__strtol): Add __unsigned to prototype and use __P.
3613 Move inclusion of xstrtol.h to precede prototype.
3616 * memmove.c: Include config.h for definition of const.
3619 * All Makefile.in (install-exec, install-exec): New targets.
3622 * tr.c (look_up_char_class): Take a string length argument -- required
3623 because the argument is a string that is *not* NUL-terminated.
3624 Use strncmp, not strcmp and add string lengths comparison.
3625 (append_char_class): Update caller. Before this change,
3626 tr '[:upper:]' '[:lower:]' read one uninitialized byte.
3627 From Andreas Schwab.
3629 * split.c (next_file_name): Move dcls of file-scope variables into
3630 this function. Don't rely on arithmetic being two's complement.
3632 * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
3633 Instead, declare two FILE structs and use their addresses.
3635 * csplit.c (record_line_starts): Remove set-but-not-used,
3636 file-scope variable.
3638 Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
3640 * all source files (usage): Include one- or two-line synopsis
3641 in --help output. From Karl Berry.
3643 * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
3646 Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
3650 Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
3652 * all Makefile.in (maintainer-clean): Renamed from realclean
3655 Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
3657 * sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
3658 Don't include safe-stat.h.
3660 * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
3661 Remove all associated rules. safe-l?stat.h are no longer used.
3663 * sort.c Don't hard-code /tmp.
3664 [DEFAULT_TMPDIR]: Use this instead.
3665 * tac.c (save_stdin): Likewise.
3667 * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
3668 Reported by John Salmon (johns@mullet.anu.edu.au).
3669 Patch from Mike Haertel.
3671 Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
3673 * sort.c (tempname): AND-off high bits of pid so that its decimal
3674 string representation is no longer than five digits.
3675 From Hans Verkuil (hans@wyst.hobby.nl).
3677 Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
3679 * expand.c (add_tabstop): Give correct size when reallocating
3680 tab_list buffer. From Geoff Odhner (geoff@franklin.com).
3681 Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
3683 Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
3685 * configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
3686 unnecessary conflicts for people using version control software
3688 (AC_ARG_PROGRAM): Use it.
3690 Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
3692 * head.c: Remove block of redundant comments describing options.
3693 (usage): Remove reference to -l option. It's not valid.
3695 * od.c (write_block): Declare index I as unsigned int, not int.
3696 (get_lcm): Likewise.
3697 (dump_strings): Likewise.
3699 (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
3700 (dump_strings): Declare bufsize to be of type size_t, not int.
3702 * split.c (next_file_name): Don't reuse X as an index.
3703 Declare new variable I instead.
3705 Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
3707 * csplit.c: Declare as `unsigned int' all variables that were
3709 (make_filename): Change type of arg to unsigned int.
3710 (split_file): Change type of indices to unsigned int.
3712 Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
3714 * od.c (main): Detect and fail when argument to -N is too large
3717 Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
3719 * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
3720 Remove check for sizeof long.
3722 * linebuffer.h: Undefine __P before defining it.
3723 * long-options.h: Likewise.
3724 * xstrtol.h: Likewise.
3726 * memcpy.c: New file.
3727 * lib/Makefile.in (SOURCES): Add memcpy.c.
3729 Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
3731 * src/*.c: Update Copyright dates.
3733 Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
3735 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
3736 Separate errno declaration from STDC_HEADERS.
3738 * wc.c (wc): For efficiency, handle separately the cases in which
3739 words need not be counted. Suggested by Karl Heuer.
3741 * wc.c (wc): Don't overcount the number of bytes when reading
3742 from a regular file on stdin with file pointer not at BOF.
3743 From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
3744 `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
3745 the size of the file. Now it outputs `0'.
3747 Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
3749 * cat.c (cat): Use memmove rather than bcopy.
3750 * csplit.c (load_buffer): Use memcpy rather than bcopy.
3751 (extract_regexp): Use strrchr, not rindex.
3752 * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
3753 (flush_paragraph): Use memmove instead of bcopy.
3754 * fold.c (fold_file): Use memmove instead of bcopy.
3755 * od.c (decode_format_string): Use memmove instead of bcopy.
3756 [EQUAL_BLOCKS]: Use memcmp, not bcmp.
3757 (parse_old_offset): Use strchr, not index.
3758 (dump): Use memset, not bzero.
3759 * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
3760 (fillbuf): Use memmove instead of bcopy.
3761 * split.c (main): Use memset, not bzero.
3762 (line_bytes_split): Use memmove instead of bcopy.
3763 * tac.c (tac): Use memmove instead of bcopy.
3764 (output): Use memcpy instead of bcopy.
3765 * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
3766 * tr.c (substr): Use memcpy instead of bcopy.
3767 (card_of_complement, set_initialize): Use memset, not bzero.
3769 * tr.c (substr): Don't allocate a byte for trailing NUL in result
3770 since the result needn't be NUL-terminated. Don't NUL terminate it.
3772 * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
3774 (AC_CHECK_FUNCS): Add strchr and strrchr.
3776 * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
3777 * memmove.c: New file.
3778 * memcpy.c: New file.
3780 Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
3782 * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
3783 not followed by a newline would be followed by data copied from
3784 uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
3785 Reported by Franc,ois Pinard.
3787 * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
3788 AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
3789 Be careful to use off_t instead of explicit `unsigned long'.
3790 Otherwise, systems like 4.4BSD lose on calls to fseek that
3791 expect off_t (which is long long on that system).
3792 (parse_old_offset): Use xstrtoul
3795 * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
3797 Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
3799 * tail.c (numerous functions): Give char* filename arguments the
3802 * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
3803 Add xstrtol.c and xstrtoul.c.
3804 (OBJECTS): Likewise for .o files.
3805 (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
3807 * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
3808 (distclean): Remove references to safe-l?stat.c.
3809 Remove all related rules and dependencies.
3811 * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
3813 Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
3815 * tail.c (tail_file): Fix call to error with %s in format, but
3816 no corresponding argument.
3818 * src/*.c: Include "error.h" instead of simply declaring
3820 * od.c (main): Use %lu, not %d for unsigned long.
3821 (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
3822 and STRTOL_FATAL_ERROR instead.
3824 Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
3826 * sort.c (main): Fix interpretation of field offsets when specified
3827 via -k option. They were being interpreted as zero-indexed. POSIX
3828 says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
3829 (keycompare): Don't ignore characters at the end of words when
3830 otherwise they would compare equal. From Rik Faith.
3832 * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
3833 to off_t because n_bytes is used as the option to fseek and off_t may
3834 be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
3835 imposed is in the string-to-integer converstion of xstrtol.
3836 (main): Use xstrtol instead of manual string to integer conversion.
3838 * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
3839 comparisons against '0' and '9'.
3841 * tr.c [!ULONGMAX]: Define it.
3842 [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
3844 * full-write.c: Declare (or not) errno based on definedness or
3845 errno, not STDC_HEADERS.
3846 * safe-read.c: Likewise.
3847 * xwrite.c: Likewise.
3849 Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
3851 * tail.c (dump_remainder): Flush standard output just before
3852 sleeping so that `tail -f' will output partial lines sooner.
3853 This applies only when following the end of a single file.
3854 From Leonard N. Zubkoff <lnz@dandelion.com>.
3856 * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
3857 start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
3859 * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
3860 * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
3861 not already defined.
3863 Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
3865 * tr.c: Include <getopt.h> instead of "getopt.h".
3867 * sort.c (tempname): Merge two very similar sprintf stmts into one.
3869 * tail.c: Use BUFSIZ instead of BUFSIZE.
3871 * cut.c: Declare DELIM to be `int' rather than unsigned char.
3873 * fmt.c: Use index, not strchr -- per GNU Standards.
3874 Reported by Kaveh Ghazi.
3875 Always include <config.h>.
3876 (main): Include program name in --version output.
3878 Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
3882 Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
3884 * memcmp.c, srtoul.c: Use up-to-date versions.
3885 Reported by Franc,ois Pinard.
3887 * src/Makefile.in (DEFS): Remove -Dlint... again.
3889 * src/Makefile.in (PROGS): Add fmt!
3890 Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
3892 Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
3896 Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
3898 * linebuffer.h: Use __P instead of _P since the latter conflicts
3899 with a definition in some <ctype.h>. From Kaveh Ghazi.
3901 Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
3903 * tr.c: Add const attribute where appropriate.
3905 * tail.c (BUFSIZ): Use definition from <stdio.h>.
3907 Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
3909 * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
3910 n_bytes is positive. Turn off assertions. `tail /dev/null' was
3911 getting a failed assertion. Reported by Doug McLaren
3914 * cut.c (cut_bytes): Print at least a newline for every line of input.
3915 (cut_fields): Print a newline even for lines whose only selected
3916 field is empty. But print nothing when using -s without -f1.
3917 And print nothing for empty input. Reported by
3918 Richard_Sharman@software.mitel.com.
3920 Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
3922 * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
3923 * linebuffer.h: Likewise.
3925 Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
3927 * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
3928 already handles it. From Kaveh Ghazi.
3930 * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
3931 get failures when it's defined. From Kaveh Ghazi.
3933 * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
3934 defined on some Next and Alliant systems. From Kaveh Ghazi.
3936 * sort.c join.c (main): Include version.h and call parse_long_options
3937 with the proper number of arguments. Reported by Franc,ois Pinard.
3939 Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
3941 * (configure.in): Add AC_OFF_T and rearrange by type along the
3942 same lines as autoscan.
3944 * fmt.c, fmt.1: New files.
3945 Both from Ross Paterson (rap@doc.ic.ac.uk).
3947 * Makefile.in (PROGS): Add fmt.
3948 * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
3949 (fmt): Add a link rule.
3950 * man/Makefile.in (MANFILES): Add fmt.1.
3952 Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
3954 * Makefile.in (All of them): Update from the ones in sh-utils.
3955 From now on, rules and definitions that are comon to the fileutils,
3956 textutils, and sh-utils will get ChangeLog entries only in the
3959 Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
3961 * od.c (my_strtoul): Set errno to zero before calling strtoul.
3962 Otherwise, od can fail complaining about a valid integer argument.
3963 From Andreas Schwab.
3965 Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
3967 * tr.c (main): Give an error and fail when squeezing repeats
3968 and no non-options are given. Reported by Tony Robinson
3969 (ajr@eng.cam.ac.uk).
3971 * sort.c (main): Temporarily copy each input file that might be
3972 another name for the output file. When in doubt (e.g. a pipe),
3973 copy. This allows the dangerous (historical -- in cnews) idiom
3974 `cat file | sort -o file' to work properly. Don't rely on this
3975 behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
3977 Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
3979 * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
3980 Remove CONFIG_BROKETS ifdef.
3981 * src/Makefile.in lib/Makefile.in: Don't define it.
3983 Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
3985 * full-write.c (full_write): Declare argument LEN to be size_t.
3987 Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
3989 * tail.c (tail_file): [For multiple files only]: Report truncation
3990 of monitored file and reset current file size. From Franc,ois Pinard.
3992 Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
3994 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
3995 From Franc,ois Pinard.
3997 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
3999 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
4000 decides whether to include <fcntl.h>. From Francois Pinard.
4002 Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
4004 * tr.c (substr): Fix off-by-one allocation error.
4006 Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
4008 * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
4009 (tac): Fix typo that had `1' as arg #2 of error after failed read.
4010 Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
4012 Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
4014 * configure.in [INSTALL]: Revert change of March 25. autoconf
4017 Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
4019 * join.c (prline): Remove unused function. Indent.
4021 Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
4023 * tail.c (tail_forever): Don't print headers when asked not to.
4024 From Karsten Thygesen <karthy@kom.auc.dk>.
4026 * wc.c (wc): Optimize for the case when only bytes are being counted
4027 and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
4029 Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
4031 * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
4032 * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
4034 Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
4036 * csplit.c (struct control): Add new field, repeat_forever.
4037 Remove now-unneeded definition of INT_MAX.
4038 (process_regexp): Test repeat_forever instead of comparing `repeat'
4040 (split_file): Don't even reference `repeat' count if repeat_forever
4042 (new_control_record): Initialize repeat_forever field.
4043 (parse_repeat_count): Set it instead of setting repeat count to
4045 (process_line_count): Abort for internal error instead of calling
4048 * long-options.c (parse_long_options): Take a new argument indicating
4049 the utility name (e.g. "join", not "gjoin") for version output.
4050 Print both the utility and the package names, e.g. `join - GNU
4051 textutils-1.9.1' instead of just the package name.
4053 * join.c (main): Call parse_long_options with program name arg.
4054 * sort.c (main): Ditto.
4056 * All source except sort.c and join.c (main): Change --version output
4057 to include utility name as well as package name and version info.
4059 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
4061 * configure.in: Use AC_SET_MAKE.
4062 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
4064 Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
4066 * tr.c (main): In addition to the --help usage pointer, give an
4067 explicit error message for too many arguments.
4069 Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
4071 * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
4072 of explicit echo commands.
4073 [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
4074 `./install.sh', make it `../install.sh' instead since that
4075 script will be invoked only from subdirectories.
4076 [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
4078 * cat.c (cat): The command `:|cat -s' failed on Irix5 because
4079 ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
4080 it returned EINVAL. Detect this.
4081 (main) [lint]: Initialize variables to suppress `used before
4082 initialized' warnings.
4084 * csplit.c: Change long option name from --suffix to --suffix-format.
4086 * od.c (skip): Correct a comment.
4087 (main): Don't output anything to stdout if the sole input file
4088 doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
4090 * od.c (dump) [lint]: Initialize a variable to suppress `used before
4091 initialized' warning.
4092 (main) [lint]: Ditto.
4093 * paste.c (paste_parallel) [lint]: Ditto.
4095 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
4097 * configure.in: Don't set LDFLAGS since linking now uses both
4100 Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
4102 * unexpand.c (unexpand): Don't segfault when given a name of a
4104 * expand.c (expand): Ditto.
4105 Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
4107 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
4109 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
4112 * csplit.c (load_buffer): Rather than incrementing buffer size,
4113 double it each time we fail to find a newline. Otherwise, csplit
4114 would run out of memory when processing files with very long lines.
4116 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
4118 * man/Makefile.in (manprefix): Use binprefix as the default.
4120 Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
4122 * cat.c: Use full_write and safe_read instead of write and read resp.
4128 * sum.c: Use safe_read instead of read.
4132 * tail.c: Replace calls to xwrite with calls to fwrite.
4133 Use fopen/fclose instead of open/close.
4134 (write_header): Use a single call to printf instead of four to xwrite.
4135 Use safe_read instead of read.
4138 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
4140 * install.sh: New file.
4141 Makefile.in [DISTFILES]: Add it.
4143 Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
4145 * memcmp.c: Use the latest version from the GNU C library.
4147 * cut.c [ADD_RANGE_PAIR]: New macro.
4148 (set_fields): Collect the list of all selected ranges before
4149 allocating and initializing the boolean lookup table.
4150 (cut_bytes, cut_fields): Complete rewrite. Avoid copying
4151 into buffer whenever possible. Properly handle input without
4153 (getstr): New function. Copied from getline.c, but with minor changes.
4155 * sort.c (main): Properly handle -Tdir.
4156 Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
4157 Reported by Kristoffer Rose (kris@diku.dk).
4159 * cut.c (main): Give separate errors for `-s without -f'
4160 and `-d without -f'.
4161 (main): Now -d '' means `use the NUL byte as the delimiter'.
4162 Before, it got an error.
4164 Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
4166 * configure.in [test for 8-bit clean memcmp]: Add a test to detect
4167 losing memcmp from SunOS4.1.x. From Robert H. de Vries
4170 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
4172 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
4173 so it goes in config.status. This eliminates unnecessary second run
4176 Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
4178 * configure.in (AC_HAVE_FUNCS): Add isascii.
4179 * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
4180 on AIX PS/2 1.3 systems because isascii is a function and it is used
4181 in definitions (with the necessary side effect of assigning to a
4182 global variable) of the is* macros. Also test HAVE_ISASCII and
4183 redefine ISASCII(c) instead of isascii.
4184 Reported by Minh Tran-Le (tranle@intellicorp.com).
4186 Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
4188 * configure.in: Don't run the test for 8-bit clean memcmp if we
4189 already know we'll be using our replacement.
4191 Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
4195 * tac.c (usage): Fix typo in long usage.
4196 * sort.c (usage): Likewise.
4197 From Philippe.Schnoebelen@imag.fr.
4199 * cut.c [FATAL_ERROR]: New macro.
4200 (main): Call both error and usage (2) through FATAL_ERROR in
4201 many places. Before, only `error (2...' was called.
4202 (invalid_list): Removed. This function is subsumed by FATAL_ERROR.
4204 * cut.c (cut_fields): Properly handle input lacking a terminating
4205 newline. Before, the command `printf "a\tb" |cut -f 1' generated
4208 Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
4210 od.c (usage): Change --backward-compatible to --traditional in
4211 the long usage message.
4213 Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
4217 Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
4219 * cut.c (cut_fields): Revert July 27 change. Instead, strip off
4220 trailing delimiter unless given a range of fields like `3-' that
4221 extends to end of line.
4222 (set_fields): Moved local `eol_range_start' to file-scope.
4223 Reported by Arne H. Juul (arnej@solan.unit.no).
4225 Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
4227 * fold.c (fold_file): Don't get stuck in an endless loop when
4228 width is smaller than 8 and there are TABs in the input.
4230 Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
4232 * join.c: Remove now-unused dcls of show_help and show_version.
4234 Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
4236 * csplit.c [INT_MAX]: Make sure it's defined.
4237 [not HAVE_LIMITS_H]: Don't include limits.h.
4238 From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
4240 Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
4244 Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
4246 * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
4247 From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
4249 * sort.c (main): Handle --help and --version options.
4250 * Makefile.in (sort.o): Depend on long-options.h.
4252 Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
4254 * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
4255 split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
4256 `--longopt=arg' syntax in --help message rather than `--longopt arg'.
4257 From Francois Pinard.
4259 * tail.c: Don't include <signal.h>. It hasn't been necessary
4260 since the Dec 12, 1992 change.
4262 * join.c (main): Accept `-v 1' again. Adding the --version
4263 long option had broken it, although -v1 still worked. Call
4264 parse_long_options instead of adding "help" and "version"
4265 to join's longopt strct.
4266 * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
4268 * (join): Depend on and link with long-options.o.
4269 * (join.o): Depend on long-options.h.
4271 * od.c: Change --compatible (-C) to --backward-compatible (-B).
4273 * csplit.c: Change --abandon-null-files to --elide-empty-files.
4275 Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
4277 * tr.c (get_next, string2_extend): Add default: label to switch stmt.
4279 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
4280 join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
4281 tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
4282 Exit successfully for --help, non-zero for usage error.
4283 From Francois Pinard.
4285 * configure.in: Add AC_STAT_MACROS_BROKEN.
4286 * system.h [AC_STAT_MACROS_BROKEN]: Test it.
4288 Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
4290 * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
4291 <config.h> or "config.h".
4292 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
4293 join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
4294 tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
4296 * configure.in: Use AC_CONFIG_HEADER.
4297 * Makefile.in [DIST]: Add config.h.in.
4299 * Makefile.in: Convert so make may be run from subdirectories.
4300 Add dependencies on config.h.
4301 * src/Makefile.in: Ditto.
4302 * lib/Makefile.in: Ditto.
4303 * man/Makefile.in: Ditto.
4305 Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
4307 * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
4308 In the 64-bit assignment, be careful to cast the shift operand to
4310 Abort if sizeof (unsigned long) > 8.
4312 Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
4314 * csplit.c: Allow repeat counts to be specified via `{*}'.
4315 New option --suffix=format. Supercedes --digits option.
4316 New option --abandon-null-files.
4317 From Ronald F. Guilmette (rfg@netcom.com).
4319 * csplit.1: Updated.
4320 From Ronald F. Guilmette.
4322 * csplit.c: Remove register keyword (replace with `int' in two cases).
4324 * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
4325 (bytes_to_octal_digits): New static array.
4326 (get_format_flags): Combine '+' and ' ' cases of switch stmt.
4327 Return count if for loop terminates.
4328 (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
4329 (get_format_prec): Make sure is_negative is defined before used.
4330 (get_format_conv_type): Give a different error message if there
4331 is no conversion specifier.
4332 Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
4333 (max_out): Use `%%' rather than `%' in format string.
4335 Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
4337 * pr.c (main): When argc == 1, don't try to xmalloc (0).
4339 Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
4341 * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
4344 Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
4346 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
4348 Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
4350 * src/*.c: Print version on standard output, not stderr.
4352 * configure.in: Add AC_LONG_64_BITS.
4353 * memchr.c: Use #ifdef LONG_64_BITS instead of
4354 `if (sizeof(longword) > 4)'.
4356 Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
4358 * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
4359 always handle devices. Ignore errno == EINVAL and errno == ENODEV.
4360 `cat -v /dev/null' was failing on many systems.
4362 * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
4363 `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
4364 From William Dowling <will@franklin.com>.
4366 Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
4370 * memchr.c: De-ansify the fixed version from glibc.
4371 It is supposed to work on systems with 64-bit long ints.
4373 Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
4377 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
4381 Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
4383 * pr.c (cols_ready_to_print): New function. It replaces a global
4384 variable by the same name and computes on the fly the value that
4385 was supposed to be maintained through that variable. This should
4386 put to rest the `pr -2a' bug.
4387 (main): Don't let getopt_long reorder arguments so we can
4388 distinguish between `pr -1 -2' and `pr -12'. Rework handling of
4391 * fold.c: Declare xmalloc.
4393 Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
4395 * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
4397 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
4399 * mkinstalldirs: New file.
4400 * Makefile.in (installdirs): Use it to create installation directories.
4402 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
4404 * all source: With --version, print version and exit immediately.
4406 Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
4408 * Makefile.in (installdirs): New rules for creating installation
4409 directories. (install): depend on it.
4411 * tail.c (main): Remove --compatible since `+1f' may be used
4412 to get the BSD `-0f' behavior portably.
4414 * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
4415 From Ian Lance Taylor (ian@cygnus.com).
4417 Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
4419 * tail.c (main): New option -C, --compatible to make `tail -0f'
4420 work like `tail +1f' for compatibility with BSD tail.
4422 Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
4424 * pr.c (print_page): Decrement cols_ready_to_print even when
4425 lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
4426 terminate. Add parentheses for clarity.
4428 Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
4432 * od.c (main): Remove set-but-not-used variable, `usage_error'.
4434 * split.c (main): Call usage with an argument.
4436 Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
4438 * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
4439 for 8-bit clean memcmp.
4441 * cat.c (usage, main): Remove unused argument.
4443 * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
4444 (check_for_offset): Remove unused argument `argnum.'
4446 * configure.in: Add AC_SIZE_T.
4448 Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
4450 * uniq.c (main): Interpret non-option arguments with a leading `+'
4451 only if we haven't seen `--'.
4453 * tr.c (main): Change variable name to avoid shadowed dcl.
4454 * wc.c (write_counts): Ditto.
4456 * sum.1: Make documentation agree with the code.
4458 * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
4460 Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
4462 * configure.in [AC_HAVE_HEADERS]: Add limits.h.
4464 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
4466 * od.c (parse_old_offset): Don't use prototype in function
4467 definition. Remove unnecessary conjunct from test for hexadecimal
4470 * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
4471 for long double support; there are compilers (Stardent Vistra svr4)
4472 without long double but still define __STDC__.
4474 Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
4476 * src/*.c and man/*.c except for sort: Add --help and --version
4479 * pr.c: Convert to use getopt_long.
4481 * lib/memcmp.c: Use version from glibc.
4482 [WORDS_BIGENDIAN]: Test this instead of the using glibc's
4484 * configure.in: Use AC_WORDS_BIGENDIAN to set it.
4486 * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
4489 * Makefile.in (dist): Depend on Makefile so that changes to
4490 Makefile.in (like adding new files to DISTRIB) are reflected
4491 in the new distribution.
4493 Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
4495 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
4496 other options so users can use them to override DEFS.
4497 * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
4499 * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
4500 configure's AC_SUBST will set these.
4502 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
4503 [targets that cd then run make in subdirectories]: Don't depend
4504 on `cd ..'; use a subshell instead.
4506 * Makefile.in [info, install-info, dvi, check, installcheck]:
4507 New targets but no rules; comply with standards.
4509 * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
4510 hasn't specified CFLAGS.
4511 [LDFLAGS]: Substitute into Makefile.
4513 Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
4515 * od.c: New option --compatible, -C.
4516 (parse_old_offset): New function.
4517 * od.1: Document new option.
4519 Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
4521 * cut.c, expand.c, join.c, nl.c: Always call error with errno
4522 (not zero) after failed fclose or non-zero ferror.
4524 Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
4526 * configure.in: Add check for working memcmp; use GNU's if
4527 the system's doesn't grok the 8th bit.
4528 * memcmp.c: Fix it so it groks the 8th bit.
4529 TODO: We really need to provide a fast memcmp, since most
4530 machines will have a broken memcmp. Probably should get
4532 * sort.c (mergefps): Maintain keybeg and keylim when copying
4533 the current line to `saved'.
4534 (numcompare): Skip white space here since -n no longer implies -b.
4535 (getmonth): Skip white space here since -M no longer implies -b.
4536 (compare): Completely overhauled to make the 8th bit work right,
4537 also to properly handle the global reverse option.
4538 (set_ordering): -n no longer implies -b, according to Posix.
4539 For consistency, -M also no longer implies -b.
4540 (main): Correct treatment of -r and global keys.
4541 (findlines): Clear keybeg and keylim if no keys are used.
4542 (sort): Avoid overwriting tempfiles[] array bounds.
4544 Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
4546 * pr.c (close_file): Reverse May 13, '92 change, but add the condition
4547 that cols_ready_to_print not be decremented when printing across.
4548 The command `echo |pr -2ta' didn't terminate.
4549 (print_page): Rewrite conditional (that had side effects in second
4550 conjunct) using nested if statements to make it clear that we do
4551 indeed want those semantics.
4553 Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
4557 * system.h: Try BBSIZE if BSIZE isn't defined.
4558 From Tony Robinson <ajr@eng.cam.ac.uk>.
4560 Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
4562 * tail.c (tail_forever): Use an array of file descriptors
4563 instead of forking processes.
4564 (dump_remainder): Return number of bytes read.
4565 (tail_file): Fill in the new array.
4566 From Ian Lance Taylor.
4568 Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
4570 * system.h: Only define index, bcmp, etc. if not already defined.
4572 Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
4574 * tr.c (is_char_class_member): Remove unreached return after abort.
4576 Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
4578 * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
4579 sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
4580 of <ctype.h> and definitions of is* ctype macros to system.h.
4581 Change a few more uses of is* ctype macros to (protected) upper
4584 * system.h: Add isascii-protected ctype IS* macros.
4586 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
4588 * all files using getopt.h: Convert static declarations of
4589 struct option to use new macros from getopt.h: no_argument,
4590 required_argument, and optional_argument.
4592 Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
4594 * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
4596 * tr.c (main): Close stdin and stdout and check return status.
4598 Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4600 * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
4603 Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
4605 * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
4606 use isascii if it is defined.
4607 (is_char_class_member, make_printable_char, make_printable_str,
4608 non_neg_strtol): Use new macros instead of lower case ones
4611 * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
4612 macros like pr.c. Suggested by David J. MacKenzie.
4614 * od.c (print_ascii, dump_strings): Check for isascii before isprint.
4615 (dump_strings): Free malloc'd buffer before returning.
4616 (skip): Return non-zero if an error occurred, zero otherwise.
4617 Exit only if asked to skip beyond end of combined input.
4618 (check_and_close): New function.
4619 (skip, read_block, read_char): Call check_and_close when done
4620 processing the file associated with in_stream.
4621 (skip, read_block, read_char): Set have_read_stdin.
4622 (main): Close stdin (if it was ever read) and check for errors
4623 just before exiting.
4624 (write_block, dump_strings, dump): Don't test return value from
4625 functions that operate on streams. Rely on later ferror tests.
4627 Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4629 * sort.c (main, usage): Add -T option.
4631 Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4633 * tail.c (tail_forever, sigusr1, kill_kids): New functions to
4634 do -f on multiple files.
4635 (main): Call tail_forever.
4636 From Ian Lance Taylor.
4638 Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4640 * cut.c (cut_fields): Add cast.
4642 * od.c (decode_one_format): Remove '#' from pre_fmt_string;
4643 many systems don't support it.
4644 Conditionalize long double support on __STDC__, not __GNUC__.
4645 From Ian Lance Taylor.
4647 Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
4649 * sort.c (numcompare, keycompare): Add parentheses suggested
4650 by gcc -Wall. Put braces around individual monthtab initializers.
4652 * cksum.c: Declare error. Make checksum table `const.'
4654 * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
4656 * split.c (main): Add `default: abort();' to enumeration switch.
4658 * All files: Make all functions and extern variables static.
4659 Make all longopts arrays const as well as static.
4660 Make a couple statically initialized aggregates `const.'
4662 Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4664 * od.c (main): Make old-style format options accumulate.
4667 Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4669 * tr.c (look_up_char_class): Add cast.
4671 * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
4672 Add `const' to variable receiving value from re_compile_pattern.
4674 * wc.c (wc): If doing only -c, use st_size for regular files.
4676 * fold.c (fold_file): Was folding 1 column too early.
4677 From Eric Backus <ericb@lsid.hp.com>.
4679 * memset.c: New file.
4681 Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4683 * cksum.c: New file.
4685 Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4687 * tac.c (tac_stdin): Handle SIGPIPE.
4688 * sort.c (main): Handle SIGTERM.
4692 * system.h [USG || STDC_HEADERS]: Define bcmp.
4694 Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
4696 * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
4698 Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4700 * paste.c (main): Don't write on a string constant.
4702 Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
4704 * tr.c: Minor cleanup. Replaced some assert(0) with abort().
4706 Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4708 * cmp.c, cmp.1: Move to diff distribution.
4710 Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4712 * system.h: Change FOO_MISSING to HAVE_FOO.
4714 Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4716 * pr.c (COLUMN): Add structure member to remember filename.
4717 (main, init_fps, open_file, close_file): Use it.
4719 (close_file): Don't decrement cols_ready_to_print when closing
4720 a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
4722 Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4724 * cmp.c: --show-chars -> --print-chars.
4726 * pr.c: Rename some variables.
4728 Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4730 * system.h: Define DEV_BSIZE if not defined.
4732 Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4734 * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
4736 Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4738 * sort.c (main): Don't stop processing args when we hit "-";
4739 treat it like a regular filename.
4740 From ian@airs.com (Ian Lance Taylor).
4742 * pr.c (print_page): Fix off by one line count when ^L is in input.
4743 From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
4745 Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
4747 * tr.c (validate): Change error message so it doesn't mention
4748 actual name of --truncate-set1 option. From David MacKenzie.
4750 Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
4752 * tr.c (string2_extend, validate): Give an error message when
4753 translating without --truncate-set1, with empty string2, and
4754 with non-empty string1. "tr 1 ''" produced a failed assertion.
4756 Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4758 * system.h: Change how ST_BLKSIZE is calculated to allow for
4759 non-POSIX systems that don't define BSIZE in sys/param.h.
4761 Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4763 * sum.c (main, bsd_sum_file): Don't print filename if BSD
4764 algorithm is used and only one file was given.
4766 Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
4768 * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
4769 with starting character equal to ending character. This is
4770 contrary to the POSIX spec, but what is already implemented
4771 in find_closing_delim.
4773 Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4777 * sort.c (numcompare, checkfp): Add parens to placate gcc2.
4779 * sort.c (mergefps): For -u, output the first, not last, of
4780 the lines that compare equal. From Mike Haertel.
4782 Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4784 * tr.c: Remove initial capitals and periods from error messages.
4786 Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
4788 * sum.c (main): Add -r option for SYSV compat.
4790 Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
4792 * sort.c (compare): If -s given, leave lines in their original order.
4793 (main): Recognize -s.
4794 (usage): Document -s.
4797 Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
4799 * sort.c (sort): Check for complete parsing of buffer into
4800 lines before nixing temp files.
4802 Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4804 * sum.c (sysv_sum_file): Use %lu instead of %u to print a
4805 long. Not that it matters for GNU . . .
4807 * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
4808 (append_normal_char, append_range, append_char_class,
4809 append_repeated_char, append_equiv_class, spec_init):
4810 Initialize `next' field of new `struct List_element'.
4811 From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
4813 Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
4815 * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
4817 Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4821 * nl.c: Support multiple files and "-" for stdin.
4822 (main): Check for read and write errors.
4823 (nl_file): New function.
4825 Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4827 * tr.c (main): -t option was called -b in getopt spec.
4828 (validate): Don't warn that set1 is longer than set2.
4830 * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
4832 Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4834 * nl.c: New program from bin-src.
4836 * nl.c (main): Use a struct linebuffer for line_buf.
4837 (process_file): Use readline instead of fgets, to preserve NULs.
4838 (check_section): Use memcmp instead of strncmp.
4839 (proc_text): Print line_buf with fwrite instead of printf.
4841 * nl.c (main): Usage message if too many args given. Check
4842 for error in closing input file. Lengths of section delimiter
4843 strings were 1 too large. Take separator_str into account in
4844 length of print_no_line_fmt.
4845 (build_print_fmt): Allocate space for print_fmt, in case
4846 separator_str is long.
4847 (proc_text): A blank line is one that contains nothing, not
4848 even nonprinting characters.
4850 Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4852 * All programs: Document `--' instead of `+' to introduce
4853 long-named options, in usage messages.
4855 * sum.c (bsd_sum_file): Renamed from sum_file.
4856 (sysv_sum_file): New function.
4857 (main): Recognize an option to select between the algorithms.
4859 Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
4861 * pr.c (close_file, print_page): Fixed bug that had the command
4862 yes |head |pr -t printing "yyyyyyyyyy".
4863 * (print_page): Fixed bug that had pr -3 -a printing two too few
4864 trailer lines per page.
4865 * (main): Added restriction that -a and -m are incompatible.
4866 Although the POSIX spec doesn't explicitly say they shouldn't
4867 be used together, it says -a modifies the -column option and
4868 that -column shouldn't be used with -m.
4870 Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
4872 * nl.c: Include regex.h after, not before, sys/types.h.
4874 Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
4876 * sort.c (fillbuf) return bytes buffered instead of bytes read.
4878 Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
4880 * sort.c (LINEALLOC): New #define.
4881 (struct lines): New field ``limit''.
4882 (initlines): Set it from new arg ``limit''.
4883 (sort, mergefps, checkfp): Pass new arg to initlines().
4884 (findlines): Don't realloc past lines->limit.
4886 Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4888 * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
4889 HAVE_UNISTD_H and _POSIX_VERSION.
4891 * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
4893 Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
4895 * tr.c: Fixed an inaccurate comment on posix_pedantic.
4897 Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
4899 * tr.c: Changed underscores to hyphens in long option name
4900 "sysv_string2_truncate".
4902 Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4904 * tac.c (main): Set obscure_syntax to tell re_search to
4905 allocate memory for the group registers.
4907 Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4909 * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
4910 signal, which POSIX doesn't have.
4911 * sort.c: Replace inthandler and huphandler with sighandler.
4912 * csplit.c (main): Only handle signals if they were not being
4915 * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
4917 Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
4919 * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
4920 * tr.c (squeeze_filter): Comment a little on why it's better
4921 to step through the input by two.
4922 * tr.c (set_initialize): Write a comment describing the function.
4923 * tr.c: Eliminated the variable `portability_warnings' and replaced
4924 references to it by references to `!posix_pedantic'. One of the
4925 uses of portability_warnings had been wrong.
4927 Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4929 * tr.c: New program.
4931 Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4933 * linebuffer.[ch] (freebuffer): New function (used by cron).
4935 Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4937 * system.h, configure, Makefile.in: Don't include memory.h if
4938 STDC_HEADERS, removing need for MEMORY_H_MISSING.
4940 Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
4942 * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
4943 Somehow, part of my patch didn't make it last time.
4945 Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
4947 * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
4949 * cmp.c (cmp): Print EOF message to stderr, not stdout, for
4952 * sort.c (xfwrite): fwrite never returns < 0, so check if
4953 number written is number we asked to write.
4954 (fillbuf, main): fread never returns < 0, so check ferror instead.
4957 Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
4959 * pr.c (print_page): Really fixed `extra newline at EOF' problem.
4960 * (store_columns): Fixed bug that caused `pr -b -2' to coredump
4961 on files of certain lengths.
4963 Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
4965 * pr.c (print_page): Fixed to not add single spurious newline
4966 at EOF when using -t.
4968 Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
4970 * pr.c (print_page): Don't pad the page if -t given.
4972 * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
4974 Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
4978 * configure, system.h: Include memory.h if it works.
4980 * split.c: Allow `b' unit as well as `k' and `m'.
4982 * head.c, tail.c: Replace -b +blocks option with specifying
4983 units (b, k, or m) after the number.
4984 (parse_unit): New function.
4986 * fold.c (main): Check that -w arg is a number.
4988 * cut.c: +delimiter takes an arg.
4990 Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
4992 * pr.c (close_file): Don't close an already closed file.
4994 Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
4996 * memchr.c: New file.
4997 * configure: Check if it's needed.
4999 * csplit.c, gcsplit.1: New program.
5001 * pr.c (cleanup): Only free buffers if they were allocated.
5003 * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
5005 Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
5007 * pr.c: The following 3 bugs appeared (at least) when printing
5008 a single file with the options `-3 -f'.
5009 * (print_white_space): Single spaces were being replaced
5011 * (print_page): Some lines were getting too much white space
5012 at the beginning because spaces_not_printed wasn't being reset
5014 * (read_line): The single space between a truncated column
5015 on its left and the column on its right was omitted. Fixed
5016 so that previous value of input_position is restored before
5019 Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5021 * configure: Only remove /etc from PATH when it's not part of
5024 Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
5026 * linebuffer.c (readline): Fix incorrect recalculation of `end'.
5028 * head.c, tail.c: Replace `mode' variables and bitmasks with
5029 separate variables for each option.
5031 Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
5033 * wc.c: New program.
5035 Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
5037 * fold.c (fold_file): Read in an int, not a char, for EOF
5040 * configure: Check whether st_blksize is missing.
5042 * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
5043 defined, instead of /tmp.
5045 Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5047 * xwrite.c [POSIX]: unistd.h might require sys/types.h.
5049 Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5051 * paste.c (main): Consider -d "" to be like -d "\0",
5052 for POSIX (if I read it right).
5054 * sort.c, join.c: New programs.
5056 * cut.c (set_field): Allow blanks as well as commas to
5057 separate numbers in ranges.
5059 Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
5061 * pr.c: Failure to open an input file is no longer a fatal error.
5062 A message is printed for each failed open. When printing
5063 in parallel, each failed open results in one fewer output column.
5064 Added POSIX -r option to suppress the message.
5065 * pr.c: Added variables: failed_opens, ignore_failed_opens.
5066 These changes were based in part on work by David MacKenzie.
5068 Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
5070 * pr.c: Complain if user gives both -m and -[0-9]+ options.
5072 Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
5076 Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5078 * expand.c: Rename some variables.
5079 (expand): Don't access value off end of array.
5080 * unexpand.c: Rename some variables.
5081 (unexpand): Don't access value off end of array.
5082 Instead of copying tabs verbatim and flushing pending spaces
5083 when one is reached, count them as the proper number of
5084 pending spaces. Instead of changing tabs to single spaces if
5085 the tabstop list is exhausted, print the rest of the line
5086 unchanged (for POSIX).
5088 Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5090 * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
5091 Clear EOF and error conditions on stdin so it can be reused.
5093 * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
5094 as commas to separate tabstops, for POSIX.
5095 * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
5096 the output; send it directly to stdout.
5097 * unexpand.c (main): Make -t stupidly imply -a for POSIX.
5098 (unexpand): If a tab stop list was given and we move past its end,
5099 copy the rest of the line verbatim.
5101 * split.c (convint): New function to allow 'm' and 'k' after
5103 (main): Use it. Change -c option to -b for POSIX.
5105 Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5107 * pr.c: Protect isdigit with isascii, if required.
5109 Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
5111 Most of the following is from Paul Eggert:
5112 * cat.c (main): If stdin is read, check close at end.
5113 * cmp.c (main): Check for stdin being closed.
5114 Check for close errors on stdin and stdout.
5115 (cmp): Return a value instead of exiting.
5116 * cut.c (cut_file): New function, from code in main.
5117 Check for read errors.
5118 (main): Check for close errors.
5119 * expand.c, unexpand.c (main): Check for close errors.
5120 (next_file): Go to next file if one can't be opened.
5121 Check for close errors.
5122 * head.c (main), tail.c (main): If stdin was read, check for
5124 * head.c (head_file), tail.c (tail_file): Check for close errors.
5125 * paste.c (main, paste_parallel, paste_serial), tac.c (main):
5126 Check for close errors. Close stdin if it was read.
5127 * split.c (main): Check for close errors.
5129 * configure, Makefile.in's: Support +srcdir option.
5130 Make config.status. Fix up clean targets.
5132 Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
5134 * linebuffer.h (struct linebuffer): Add a field to indicate
5135 the number of valid chars in the line.
5136 * linebuffer.c (initbuffer, readline): Fill it in.
5137 * uniq.c, comm.c: Use it.
5139 * pr.c (main): Check stdin and stdout fclose for errors.
5140 (init_parameters): If there's no room for header and footer,
5141 omit them rather than dying (for POSIX).
5142 (init_header): Take a file descriptor as additional arg.
5143 (init_fps): Change callers. Note when stdin is read.
5144 (open_file): For filename "-" use stdin.
5145 (close_file): Don't close stdin. Check close for errors.
5146 (print_char, char_to_clump): Use isprint instead of explicit
5149 * memcmp.c: New file (needed for comm).
5150 * bcopy.c: New file (needed for fold).
5151 * system.h: Don't define bcopy as memcpy.
5152 * configure: Check for bcopy and memcmp.
5154 * uniq.c (main): Use "-" instead of NULL to mean stdin or
5156 (check_file): Use "-" instead of NULL to mean stdin or stdout.
5157 Check readline return instead of for NUL character to
5159 Check fclose for errors.
5160 (find_field): Use linebuffer length, not NULs, to detect end
5162 (different): New function, replaces compare. Uses memcmp
5164 (writeline): Use fwrite instead of fputs so NULs are preserved.
5166 * comm.c (compare_files): Return an error indication.
5167 Don't take a filename of NULL to mean stdin.
5168 Use memcmp instead of strcmp to allow for NULs.
5169 Check fclose for errors.
5170 (writeline): Use fwrite instead of fputs so NULs are preserved.
5172 * sum.c (sum_file): Take an arg indicating whether to print
5173 the filename, and don't take NULL meaning stdin. Set a flag
5174 when we read stdin. Check fclose return for errors.
5175 (main): If stdin was read, check fclose return for errors.
5176 Use filename of "-" if no args given.
5178 Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5180 * fold.c: Rewritten from scratch for POSIX.
5182 Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5184 * split.c (line_bytes_split): Use xmalloc instead of alloca.
5185 * system.h: Don't declare alloca.
5187 * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
5188 * system.h: Define SEEK_ macros if not defined.
5190 * pr.c: Rename variable `truncate' to avoid library function conflict.
5192 Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5194 * linebuffer.c, linebuffer.h: New files.
5195 * comm.c, uniq.c (initbuffer, readline): Functions
5196 removed (use versions in linebuffer.c).
5198 Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5200 * sum.c (sumfile): Always print 5 digits for second number, too.
5201 Interpret "-" to mean stdin.
5203 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
5205 * uniq.c: Use isblank instead of isspace, to support POSIX.2.
5206 * comm.c, pr.c, uniq.c (concat, fatal, error,
5207 pfatal_with_name, xmalloc, xrealloc): Functions removed.
5209 Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5211 * nl.c: Add long-named options. Doc fixes.
5213 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5215 * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
5217 * xwrite.c [POSIX]: Include unistd.h.
5218 [STDC_HEADERS]: Don't declare errno.
5220 Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5222 * uniq.c: Add long-named options. Remove marginally useful -z
5223 option (zero padded repeat counts).
5225 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5227 * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
5228 (cwrite), head.c (head_file), cat.c (main): Check close return
5229 value for delayed error report due to NFS.
5231 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5233 * cat.c: Replace "uchar" with "unsigned char", to avoid
5234 problems with various systems' typedefs.
5236 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5238 * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
5239 operation is unsupported, for HP-UX 7.0.
5241 Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
5243 * sum.c: Always print five digits for first number.
5245 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
5247 * cat.c, cmp.c: Don't use fileno(); not needed.
5249 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
5251 * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
5253 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
5255 * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
5257 (enlarge_line): Adjust inbufp and outbufp.
5259 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5261 * cat.c: Declare free returning void, not int, so it
5262 doesn't bomb on Xenix.
5264 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
5266 * tac.c: Print error messages before calling cleanup, not after.
5268 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5270 * tac.c (cleanup): Return SIGTYPE, not int.
5272 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
5274 * cut.c (main, usage): Add -b and -n options for POSIX.
5275 (set_fields): Don't allow SPC or TAB as number separators.
5277 * paste.c (paste_parallel): If open of any file fails, quit
5280 Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
5282 * pr.c: Add POSIX -F option (same as -f).
5284 * uniq.c (check_file): Allow '-' to mean stdin or stdout.
5286 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5288 * head.c, tail.c: Change `chars' to `bytes' globally.
5289 (main, usage): Use POSIX.2 draft 10 option syntax.
5291 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5293 * cat.c (main): Don't delay error messages, so they appear
5295 (main, simple_cat, cat): Make errors in input files nonfatal.
5297 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5299 * cat.c: Remove -c option added for POSIX draft 9, since POSIX
5300 draft 10 removed it.
5302 * tac.c (tac_stdin): Use fstat instead of lseek to determine
5303 whether stdin is seekable, because lseek silently fails on
5304 some special files, like tty's.
5305 tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
5306 don't turn off -f for non-regular files (assume the user knows
5307 what he's doing; it might work for fifo's and sockets).
5309 * paste.c (main): If no files given, use stdin.
5310 Don't let collapse_escapes write on string constant (delim default).
5311 (paste_parallel): Don't close stdin.
5313 * cut.c (main): Use standard input for filename of "-".
5315 * comm.c (compare_files): Allow '-' to mean stdin.
5317 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5319 * cut.c (enlarge_line): Take an arg giving the required amount
5320 of space. Change callers.
5321 (main): Don't allow -t'<TAB>' without -f.
5322 Make `delim' unsigned to fix sign extension problem in comparison.
5324 Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
5326 * pr.c Deleted excess whitespace from ends of lines.
5327 Modified to work with current version of getopt, which
5328 returns 1 instead of 0 for non-options.
5329 Reversed the meaning of the -f option, to be compatable
5332 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
5334 * cmp.c (main, usage): Rename -L option to -c and don't have
5336 (printc): Take an arg to specify number of chars to pad to,
5337 for column alignment.
5338 (cmp): Respect flag_print_chars in default output format.
5339 Align columns for cmp -cl.
5341 Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
5343 * cmp.c: For +show-chars, have getopt return 'L' so
5344 `flag_print_chars' gets set.
5346 Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
5348 * tac.c (main): Initialize fastmap and translate fields of
5349 regex before compiling it.
5351 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5353 * tac.c: Change +regexp to +regex for consistency with GNU find.
5355 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5357 * cat.c (cat): If FIONREAD is available, only use it if it is
5358 supported by the filesystem that the file is on.
5360 Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5362 * cat.c (main): Add a variable to control whether the check
5363 for input file == output file is made, because no values of
5364 st_dev and st_ino should be assumed to be available for this
5365 purpose. Only do the check for regular files.
5367 * tac.c: Use bcopy instead of memcpy.
5369 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
5371 * head.c: Use longs instead of ints for file offsets, for 16
5374 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5376 * cmp.c: Change some ints to longs for 16 bit machines.
5377 (bcmp_cnt): Make char-pointer counting slightly simpler.
5379 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5381 * cat.c (main): Allow input file to be output file for devices
5382 (ttys, etc.). Check whether input file is output file when
5383 reading standard input. Print any error messages for standard
5386 * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
5387 machines as well as 32 bit ones.
5388 * cmp.c, tail.c: Use longs instead of ints for file offsets.
5390 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5392 * cmp.c: Fix some exit statuses for POSIX.
5394 Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
5396 * tac.c: Use regular expressions as the record boundaries.
5397 Give better error messages.
5398 Reformat code and make it more readable.
5399 (main): Use getopt_long to parse options.
5400 (tac_stdin): Do not make a temporary file if standard input
5402 (tac_file): New function.
5403 (tac): Take an open file desc as an arg.
5404 (output): Rewrite to use its own efficient buffering.
5405 (xmalloc, xrealloc, xwrite): New functions.
5407 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5409 * head.c, tail.c: Use `error' instead of `fatal_perror' and
5410 `nonfatal_perror'. Remove some unnecessary info from messages.
5412 Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5414 * comm.c (main): Pass the list of files to compare_files as a
5415 char ** instead of a char *.
5416 (compare_files): Make arg a char **.
5418 * uniq.c: Declare some functions as void.
5419 Change global vars `countmode' and `mode' from ints to enums.
5420 (main): Use getopt to parse options and support POSIX options.
5421 Don't use integer_arg to parse numbers, since `-#' can't be
5422 parsed that way using getopt.
5423 (find_field): Use isspace for finding fields boundaries.
5425 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5427 * comm.c (main): Call usage if given bad option or wrong
5428 number of args. Exit with 0 status normally.
5429 (usage): New function.
5430 Declare some other functions as void.
5432 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
5434 * cmp.c (main, cmp, usage): Replace -q +quick option with -L
5435 +show-chars option to add ASCII representation of bytes to -l format.
5437 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
5439 * cmp.c (cmp): Change EOF message for POSIX compatibility.
5440 For -l format, clear bits > FF.
5442 Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5444 * tail.c: Move global `errors' into main instead of having
5445 nonfatal_perror set it.
5446 (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
5447 Return an error status.
5448 (file_lines, start_chars, start_lines): Reverse the meaning of
5450 (tail_lines, tail_chars): Account for that reversal.
5452 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5454 * head.c: Move global `errors' into main and have the various
5455 functions return an error status instead of setting it in
5458 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
5460 * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
5461 options specified), to compare the two blocks and count
5462 newlines simultaneously.
5463 * cmp.c New function: bcmp_cnt.
5465 * cmp.c (main): Test if output is redirected to /dev/null, and
5466 assume `-s' if this is so.
5468 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5470 * cat.c: Change `argbad' from a char to a short, so it will
5471 work on machines with unsigned chars.
5473 Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5475 * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
5476 Remove unneccessary variable `c1'. If -l was given, increase
5477 `char_number' by the number of bytes read, after producing output,
5478 rather than by the offset of the first differing bytes, before
5480 Replace if-else-if constructions with case statements for clarity.
5481 (bcmp2): Rename `n' to `nread'.
5483 Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
5485 * nl.c (proc_text): Use re_search instead of re_match.
5487 Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
5489 * nl.c: Indent. Un-nest statements. Use GNU regexp functions
5490 instead of System V ones. Move function declarations together.
5491 (quit): Remove useless function.
5492 (program_name): New variable for error messages.
5493 (main): Use perror in error message.
5494 (xmalloc): New function to replace myalloc.
5495 (myalloc): Function removed.
5496 Global: use program_name and xmalloc.
5498 Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
5500 * uniq.c: Declare some functions.
5501 (main): Initialize infile and outfile. Call usage if given
5502 invalid args. Normally exit with 0 status instead of garbage.
5503 (usage): New function to print usage message and exit.
5504 (check_file): Remove unused variable.
5505 (readline): Compare against EOF, not < 0.
5506 (xmalloc, xrealloc): Return char *, not int.
5507 Ok to return 0 if 0 bytes requested.
5508 (lb1, lb2): Remove unused global vars.
5509 (concat): Remove unused function.
5511 Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
5513 * comm.c: Remove unused global variables lb1, lb2.
5514 (main): Remove unneeded variable.
5515 (compare_files): Remove unused arg.
5516 (readline): un-nest assignment. Test against EOF instead of < 0.
5517 (error): Print to stderr, not stdout.
5518 (xmalloc, xrealloc): Return char * instead of int.
5519 Returning 0 is ok if 0 bytes requested (ANSI C).
5523 version-control: never