1 1999-08-06 Jim Meyering <meyering@ascend.com>
5 * src/sort.c: Include file name in `write error' diagnostics.
6 (write_bytes): Add output_file parameter and use it. Update callers.
10 Reported by John Summerfield.
12 1999-08-05 Jim Meyering <meyering@ascend.com>
14 * src/tail.c (Follow_mode): Remove comma at end of enumerator list.
15 Reported by Kaveh Ghazi.
17 * config.sub: Update from autoconf.
18 * config.guess: Update from autoconf.
20 1999-08-04 Jim Meyering <meyering@ascend.com>
24 * configure.in: Remove inadequate getline-testing code. md5sum would
25 segfault on HPUX because of the getline function in their C library.
26 Use the AM_FUNC_GETLINE test in m4/ instead.
28 1999-08-03 Jim Meyering <meyering@ascend.com>
30 * src/tail.c (tail_forever): When following by name and calling recheck
31 because of exceeding max_n_consecutive_size_changes_between_opens,
32 `continue' so we don't fall through and (assuming the file finally grew)
33 get the erroneous `file truncated' message. This was hard to reproduce.
35 1999-08-01 Jim Meyering <meyering@ascend.com>
39 * configure.in (AM_C_PROTOTYPES): Move test to precede a few
40 header tests -- merely on principle.
42 1999-08-01 Paul Eggert <eggert@twinsun.com>
44 * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS.
46 1999-07-16 Paul Eggert <eggert@twinsun.com>
48 * lib/quotearg.c (quotearg_buffer):
49 Don't quote spaces if C quoting style.
51 1999-07-31 Jim Meyering <meyering@ascend.com>
53 * src/tail.c (tail_forever): Don't call kill if pid is 0.
54 Detect when `writer_is_dead' also when the writer is some other user.
57 * src/tail.c (parse_options): Warn if --pid=PID is used without -f.
59 1999-07-30 Jim Meyering <meyering@ascend.com>
63 * src/tail.c: New option: --pid=PID.
64 Include signal.h for kill prototype.
66 (long_options): Add `pid'.
68 (tail_forever): Implement it.
69 (parse_options): Handle the new option and required arg.
70 Suggestion and pseudo-code from Karl Heuer.
72 1999-07-27 Jim Meyering <meyering@ascend.com>
74 * lib/linebuffer.c: Include <sys/types.h> now that linebuffer.h uses
75 size_t. This is required on at least SunOS4. From Kaveh Ghazi.
77 1999-07-26 Jim Meyering <meyering@ascend.com>
79 * src/sys2.h (PID_T_MAX): Define.
81 * src/tail.c (struct File_spec) [n_stat_calls]: Remove unused member.
83 1999-07-25 Jim Meyering <meyering@ascend.com>
85 * src/pr.c (usage): Remove `NEWS'-style paragraph (sorry to have
86 let that in, translators).
90 1999-06-01 Volker Borchert <bt@teknon.de>
92 * tests/Makefile.am: Make envvar-check depend on check-recursive rather
93 than on `check' so that its tests are performed before any real tests.
95 1999-07-20 Jim Meyering <meyering@ascend.com>
97 * configure.in (AC_REPLACE_FUNCS) Remove memmove, now that it's
98 AC_REPLACE...'d in m4/jm-macros.m4.
100 * src/wc.c (posixly_correct): Declare global.
101 (write_counts): Use it to select printf formats.
102 (main): Set posixly_correct from the POSIXLY_CORRECT envvar.
105 1999-07-15 Jim Meyering <meyering@ascend.com>
107 * tests/md5sum/Makefile.am: Revert the 1999-02-15 change.
108 * tests/md5sum/basic-1, newine-1: Add --text for each individual test.
109 Reported by Eli Zaretskii.
111 1999-07-12 Jim Meyering <meyering@ascend.com>
113 * configure.in (ALL_LINGUAS): Add Slovak (sk).
115 1999-07-11 Jim Meyering <meyering@ascend.com>
117 * src/tail.c (recheck): Use assert instead of unnecessary close_fd.
118 Remove a couple of unnecessary FIXME comments.
120 1999-07-10 Jim Meyering <meyering@ascend.com>
122 * doc/textutils.texi: Document new tail options.
124 * src/tail.c (struct File_spec) [tailable]: Rename from `missing' and
125 document. Change all uses and locals like was_missing to was_tailable.
126 Invert expressions as appropriate.
127 (reopen_inaccessible_files): Rename from allow_missing.
128 (sleep_interval): Describe.
129 (--allow-missing): Deprecate.
130 (--retry): New option, equivalent to --allow-missing.
131 (usage): Document name vs. descriptor differences.
132 Refer to manual for descriptions of --max-unchanged-stats=N
133 and --max-consecutive-size-changes=N.
134 (valid_file_spec): New function.
135 (recheck): Assert valid_file_spec.
136 Remove dead else-if block (suggestion from Eli Zaretskii).
137 Adjust stmts that set f->tailable -- unlike for `missing', tailable
138 doesn't depend on errno == ENOENT.
139 (parse_options): Give a warning if --retry is used when not following
142 * tests/join/Test.pm: New test case (but commented out) for
143 Paul's 1999-06-01 fix.
145 1999-07-09 Jim Meyering <meyering@ascend.com>
147 * configure.in (ALL_LINGUAS): Add Greek (el).
149 1999-07-04 Jim Meyering <meyering@ascend.com>
151 * tests/join/Test.pm: New test case for Paul's 1999-06-03 fix.
153 1999-07-03 Eli Zaretskii <eliz@is.elta.co.il>
155 * src/tail.c (struct File_spec): New member, errnum.
156 (recheck): Record the new value of errno in f->errnum. Don't
157 output an error message unless the new value of errno differs from
158 the old one. Output a message if previously-inaccessible file
160 (tail_forever): Always recheck files whose fd is negative. If the
161 file cannot be fstat'ed, record the errno value in f[i].errnum.
162 (tail_file): If the file cannot be open, record the errno value in
163 f->errnum. If it can be opened, initialize f->errnum to zero. If
164 it's a non-regular non-fifo file, initialize f->errnum to -1.
166 1999-06-21 Jim Meyering <meyering@ascend.com>
168 * doc/textutils.texi: Use lower case characters in sc{} context.
169 Reported by Eli Zaretskii.
171 1999-06-03 Paul Eggert <eggert@shade.twinsun.com>
173 * src/join.c (xfields): Only <blank>s separate fields, not <space>s.
175 1999-06-01 Paul Eggert <eggert@twinsun.com>
177 * lib/linebuffer.c (readline): Leave room for an extra byte
178 after the newline; comm needs this for memcoll.
180 1999-06-01 Paul Eggert <eggert@twinsun.com>
182 Add LC_COLLATE support to `join'.
184 * doc/textutils.texi: Describe join and LC_COLLATE.
186 * src/join.c: Add support for LC_COLLATE locale.
187 Include hard-locale.h, linebuffer.h, memcoll.h.
188 (struct line): New member `buf', replacing `beg' and `lim'.
190 (hard_LC_COLLATE): New var.
191 (main): Initialize it.
192 (get_line): Use readline to read the line,
193 instead of doing it by hand.
194 That way, we get a buffer that we can pass to memcoll.
195 (keycmp): Use memcoll to compare lines if hard_LC_COLLATE is nonzero.
197 1999-05-27 Volker Borchert <bt@teknon.de>
199 * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix.
201 1999-05-25 Paul Eggert <eggert@twinsun.com>
203 Add LC_COLLATE support to `comm', so that `comm' is compatible
204 with `sort' in nontrivial locales.
206 * doc/textutils.texi: Document locale-specific mode for comm.
208 * lib/Makefile.am (libtu_a_SOURCES): Add hard-locale.c, memcoll.c.
209 (noinst_HEADERS): Add hard-locale.h, memcoll.h.
211 * src/comm.c: Include hard-locale.h, memcoll.h.
212 (hard_LC_COLLATE): New variable.
213 (compare_files): Use memcoll to compare if hard_LC_COLLATE.
214 (main): Initialize hard_LC_COLLATE from locale.
216 * src/sort.c: Include hard-locale.h, memcoll.h.
217 (hard_LC_COLLATE, hard_LC_CTYPE, hard_LC_TIME): New variables,
218 replacing `need_locale'.
219 (memcoll): Move to lib/memcoll.c.
220 (keycompare): No need to alloc (0), since our caller now does it.
221 (compare): alloca (0) before returning.
222 (my_setlocale): Remove; hard_locale now dows this.
223 (main): Invoke setlocale, bindtextdomain, and textdomain before
224 invoking anything that might print an error.
225 Use hard_locale to determine which locales are hard.
227 * lib/hard-locale.c, lib/hard-locale.h, lib/memcoll.c, lib/memcoll.h:
230 1999-05-25 Paul Eggert <eggert@shade.twinsun.com>
232 * lib/linebuffer.c (readline):
233 Append trailing newline to line.
235 [struct linebuffer] (size): Declare to be of type size_t, not long.
236 [struct linebuffer] (length): Likewise.
237 * src/comm.c, (writeline): Lines now contain trailing newline.
238 * src/uniq.c (find_field, different): Use size_t, not int, for lengths.
239 (writeline): Lines now contain trailing newline.
240 (check_file): Use size_t, not int, for lengths.
241 * src/nl.c (proc_text, check_section, main): More of the same.
243 * lib/linebuffer.h (struct linebuffer): Use size_t for sizes.
244 src/nl.c (header_del_len, body_del_len, footer_del_len, main):
246 src/uniq.c (find_field, different, check_file): Likewise.
248 * lib/linebuffer.c (readline): Silently append trailing
249 newline if needed. Do not bother setting buffer length to 0
250 at EOF, since it's not part of the spec and nobody relies on
251 it. Do not compute the difference between unrelated pointers.
253 1999-05-25 Paul Eggert <eggert@twinsun.com>
255 * src/tac.c (memrchr): Ifdef out this unused function.
257 1999-05-25 Jim Meyering <meyering@ascend.com>
259 * doc/textutils.texi (Squeezing): Remove misleading square brackets
260 from SET1 in the one-word-per-line example.
262 1999-05-22 Jim Meyering <meyering@ascend.com>
264 * lib/Makefile.am (libtu_a_SOURCES): Remove memchr.c.
269 1999-05-22 Paul Eggert <eggert@twinsun.com>
271 * doc/textutils.texi: Document locale-specific changes to `sort',
272 as well as the new, POSIX-compliant definition of line comparison,
273 and -g's more careful treatment of NaNs, infinities and zeros.
275 * src/sort.c (general_numcompare): Put exceptional cases
276 first, not last, to be consistent with -M.
278 1999-05-21 Paul Eggert <eggert@twinsun.com>
280 * src/sort.c (strtod): Declare if STDC_HEADERS is not defined.
281 (general_numcompare): Use strtod, not xstrtod.
282 Do not consider partial conversions to be errors.
283 Put -infinity at the start, and +infinity at the end;
284 follow +infinity with NaNs (sorted by bit pattern),
285 and finally by conversion errors.
287 1999-05-21 Jim Meyering <meyering@ascend.com>
289 * tests/sort/Test.pm (11d): Reverse lines in expected output
290 to reflect latest change.
291 (use-nl): New test from Paul Eggert.
293 1999-05-20 Paul Eggert <eggert@twinsun.com>
295 * src/sort.c: Treat the trailing newline as part of the line,
296 as required by POSIX.2.
298 (struct line, findlines, compare, checkfp, mergefps, sort):
299 A line now includes its trailing newline.
300 (findlines): Do not replace newline with NUL.
301 (memcoll, keycompare): Work even if the data to be compared are
302 adjacent strings; this is possible now that lines contain the
304 (fillbuf): Always have an unused byte at the end of the buffer,
305 since memcoll and keycompare want to modify a byte after the last line.
306 (sortalloc, mergealloc): Increase by 1, for trailing byte.
308 1999-05-20 Jim Meyering <meyering@ascend.com>
310 * tests/sort/Test.pm: Add test case from Paul Eggert.
312 1999-05-20 Paul Eggert <eggert@twinsun.com>
314 * src/sort.c (keycompare): Ignore any length difference if the
315 localized comparison says the strings are equal.
317 * src/sort.c (memcoll, keycompare, compare): Handle NUL
318 characters properly when comparing with LC_COLLATE semantics.
319 (NLS_MEMCMP): Remove.
320 (memcoll): Renamed from strncoll.
321 Take separate lengths for each string.
322 This function is now invoked only when need_locale.
323 (keycompare): Don't copy strings when ignore and translate
326 1999-05-18 Paul Eggert <eggert@twinsun.com>
328 * src/sort.c (MONTHTAB_CONST): Renamed from NLS_CONST; the use
329 is also changed. Define to const also if !HAVE_NL_LANGINFO.
331 (usage): `,' -> `;' (English typo).
333 1999-05-17 Eli Zaretskii <eliz@is.elta.co.il>
335 * src/cat.c (main): When stdout is in binary mode, make sure all
336 input files are also read in binary mode.
338 1999-05-16 Jim Meyering <meyering@ascend.com>
342 1999-05-11 Paul Eggert <eggert@twinsun.com>
344 * src/sort.c: Don't autodetect the locale of numbers and
345 months, as this conflicts with POSIX.2 and is tricky to boot.
347 (FLOATING_COMMA, NLS_STRNCMP, NLS_MAX_GROUPS,
348 NLS_ONE_CHARACTER_STRING): Remove macros no longer used.
350 (nls_grouping, nls_fraction_found, nls_month_found, nos_monthtab,
351 nls_months_collide, nls_keyhead, us_monthtab): Remove variables no
354 (struct nls_keyfield): Remove types no longer used.
356 (strncoll_s2_readonly, nls_set_fraction, look_for_fraction,
357 nls_month_is_either_locale, nls_numeric_format): Remove functions no
360 (monthtab): Now has the role that us_monthtab had, but it's const only
361 if ENABLE_NLS is not defined.
363 (C_DECIMAL_POINT): Renamed from FLOATING_POINT. All uses changed.
364 (MONTHS_PER_YEAR): Renamed from NLS_NUM_MONTHS. All uses changed.
365 (struct_month_cmp): Renamed from nls_sort_month_comp. All uses changed.
366 Use strcmp, not strcoll, since the user doesn't care about collating
369 (inittables): Read locale data into monthtab, rather than modifying a
370 separate month table and futzing with indirection. Do not worry about
371 colliding months, since we no longer autodetect month locale.
373 (fraccompare): Don't set no-longer-used variable nls_fraction_found.
375 (getmonth): Use strncmp to compare months, since user doesn't care
376 about collating here. Fix bug where code incorrectly assumed that
377 strlen (monthtab[lo].name) == strlen (monthtab[ix].name).
379 (keycompare, main): Don't autodetect month locale.
381 (compare): Don't use NLS_MEMCP in code that can't be executed if
382 need_locale is false, as NLS_MEMCP is equivalent to memcmp in that
385 (sort, insertkey, main): Don't autodetect numeric locale.
387 1999-05-15 Jim Meyering <meyering@ascend.com>
389 * tests/join/Test.pm (trailing-sp): New test for this fix.
390 * src/join.c (xfields): Don't interpret a trailing blank as a
391 delimiter when e.g. -t: was specified. From Tim Smithers.
393 1999-05-12 Jim Meyering <meyering@ascend.com>
395 * tests/Makefile.am (envvar-check): Renamed from check-local.
396 (check): Depend on envvar-check so the envvar check is performed
397 before all other tests. Reported by Volker Borchert.
398 * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects,
399 so CDPATH is mentioned in the message. Reported by Volker Borchert.
401 1999-05-11 Jim Meyering <meyering@ascend.com>
403 * src/sort.c (usage): Split the --help message into two pieces so that
404 neither is longer than 2048. For Irix4's cc. Reported by Kaveh Ghazi.
406 1999-05-09 Jim Meyering <meyering@ascend.com>
408 * lib/regex.c: Update from libc.
412 * Makefile.maint (alpha): Put the announcement in
413 /tmp/announce-$(distdir)
415 * tests/sort/Test.pm (neg-nls): New test.
417 1999-05-08 Jim Meyering <meyering@ascend.com>
419 * src/system.h (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM,
420 and all the *_MIN and *_MAX symbols): Remove definitions.
421 * src/sys2.h: Put the definitions here instead (this file is shared
422 between all three *utils packages, while system.h is not).
424 1999-05-06 Paul Eggert <eggert@twinsun.com>
426 * src/sort.c (fraccompare, numcompare): Merge the NLS and
427 non-NLS versions into a single function.
429 (decimal_point): Now char, since we no longer convert to unsigned
431 (th_sep): Now int, since we use a value out of char range to denote
432 the absence of a thousands separator.
433 (IS_THOUSANDS_SEP): New macro.
434 (USE_NEW_FRAC_COMPARE): Remove.
435 (nls_set_fraction): Arg is now char, not unsigned char.
436 Set th_sep to CHAR_MAX + 1 if there is no thousands separator.
437 (numcompare): Don't convert to unsigned char unless necessary.
438 (main): Turn off decimal points and thousand separators if they
439 are multibyte characters, as we don't support that yet.
441 1999-05-06 Paul Eggert <eggert@twinsun.com>
443 * src/system.h (CHAR_MIN, CHAR_MAX): New macros.
444 (SCHAR_MIN, SCHAR_MAX): Don't assume that char is signed.
446 1999-05-06 Paul Eggert <eggert@twinsun.com>
448 * src/sort.c (numcompare): Handle comparison of two negative
449 numbers correctly in the ENABLE_NLS case.
451 1999-05-04 Jim Meyering <meyering@ascend.com>
453 * src/pr.c (usage): Break the usage message into 3 pieces instead of
454 only 2. The strings had grown to be longer than 2048, which evokes
455 errors when compiling with Irix4's cc. Reported by Kaveh Ghazi.
457 * src/tsort.c (search_item): Use `1' instead of `+1'. The latter
458 elicits a syntax error from SunOS4's cc. From Kaveh Ghazi.
460 1999-05-03 Jim Meyering <meyering@ascend.com>
462 * src/ptx.c <ctype.h>: Don't include.
463 [!STDC_HEADERS]: Remove definitions of ctype macros.
464 Convert e.g., isspace to ISSPACE to use definitions from sys2.h.
465 Reported by Kaveh Ghazi.
467 * src/sys2.h (TOLOWER): Define.
469 * src/join.c (TOLOWER): Remove definition.
470 * src/md5sum.c: (TOLOWER): Remove definition.
472 1999-04-30 Jim Meyering <meyering@ascend.com>
474 * src/sort.c (usage): Document the differences between the
475 obsolescent, +POS1[-POS2] form, and the POSIX -k option.
477 1999-04-24 Jim Meyering <meyering@ascend.com>
479 * configure.in: Use AC_CANONICAL_HOST.
481 * lib/Makefile.am (libtu_a_SOURCES): Add xstrtoumax.c
482 (noinst_HEADERS): Remove xstrtoul.h.
484 * src/csplit.c: Include new "xstrtol.h", not "xstrtoul.h".
485 (struct control) [repeat]: Declare as uintmax_t, not int.
486 (struct control) [lines_required]: Likewise.
487 (handle_line_error): Use human_readable to print lines_required.
488 (parse_repeat_count): Parse a uintmax_t.
489 (parse_patterns): Parse a uintmax_t.
491 * src/tail.c: Include new "xstrtol.h", not "xstrtoul.h".
492 * src/od.c: Likewise.
494 * src/head.c: Include new "xstrtol.h", not "xstrtoul.h".
495 Change all U_LONG_LONG to uintmax_t.
496 (head_lines): Move a couple dcls into an inner scope.
497 (string_to_integer): Rename from string_to_ull.
499 1999-04-19 Jim Meyering <meyering@ascend.com>
501 * Makefile.maint (b_host): Remove /pub suffix.
503 1999-04-18 Jim Meyering <meyering@ascend.com>
507 * Makefile.maint (my-distcheck): Use AMTAR, not TAR.
509 * src/sort.c (usage): s/DIRECT/DIRECTORY/g
510 Rename global: s/temp_file_prefix/temp_dir/.
511 (NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,
512 not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than
514 (tempname): Wrap after 99999 only for length-impaired file systems.
516 1999-04-17 Jim Meyering <meyering@ascend.com>
518 * src/tail.c (file_lines): Fix serious bug introduced with last changes.
521 1999-04-15 Jim Meyering <meyering@ascend.com>
523 * tests/Makefile.am (EXTRA_DIST): Rename .posix-warn to .env-warn.
524 (check-local): Warn about CDPATH in the same way
525 we warn about POSIXLY_CORRECT, since the cp/same-file test fails at
526 least when using bash with CDPATH set. Reported by Mark Hewitt.
528 * src/pr.c Add comments.
529 (init_header): Tweak white space in Date/Time header.
530 * tests/pr/Test.pm: Updated all tests to reflect the big
531 1999-02-13 change. From Roland Huebner.
533 1999-04-12 Jim Meyering <meyering@ascend.com>
535 * src/cat.c (main): Declare out_dev to be of type dev_t, not `int'.
536 Declare out_ino to be of type ino_t, not `int'.
539 * src/od.c (MIN, MAX): Remove definitions.
540 * src/sys2.h (MIN, MAX): Define here instead.
541 Reported by John Bley.
543 1999-04-11 Jim Meyering <meyering@ascend.com>
547 * tests/pr/Test.pm (test_vector): Disable all tests while I wait for
550 Fix the problem whereby `yes > k & sleep 1; tail -2c k' would infloop.
551 * src/tail.c (COPY_TO_EOF): Define.
552 (dump_remainder): Add parameter, n_bytes, and rewrite to use it.
554 (file_lines): Rename parameter.
555 (tail_bytes): Remove obsolete comment.
557 Fix the problem whereby `yes > k & sleep 1; tail -1 k' would infloop.
558 * src/tail.c (dump_remainder): Move this function to precede the
559 new use in file_lines.
560 (tail_lines): Don't call dump_remainder here.
561 (file_lines): Call dump_remainder here instead.
562 Reported by Lehti Rami.
564 * lib/readtokens.c (readtoken, readtokens): Protoize.
566 1999-04-10 Jim Meyering <meyering@ascend.com>
568 * src/tail.c (xwrite): Use STDOUT_FILENO instead of literal `1'.
570 1999-04-04 Jim Meyering <meyering@ascend.com>
572 * src/cat.c: Standardize --help and --version processing.
573 * src/comm.c: Likewise.
574 * src/csplit.c: Likewise.
575 * src/cut.c: Likewise.
576 * src/expand.c: Likewise.
577 * src/fmt.c: Likewise.
578 * src/fold.c: Likewise.
579 * src/head.c: Likewise.
580 * src/join.c: Likewise.
581 * src/md5sum.c: Likewise.
582 * src/nl.c: Likewise.
583 * src/od.c: Likewise.
584 * src/paste.c: Likewise.
585 * src/pr.c: Likewise.
586 * src/ptx.c: Likewise.
587 * src/split.c: Likewise.
588 * src/sum.c: Likewise.
589 * src/tac.c: Likewise.
590 * src/tail.c: Likewise.
591 * src/tr.c: Likewise.
592 * src/unexpand.c: Likewise.
593 * src/uniq.c: Likewise.
594 * src/wc.c: Likewise.
596 1999-03-29 Jim Meyering <meyering@ascend.com>
598 * configure.in (GNU_PACKAGE): Remove related code -- now it's in
599 the catch-all for shared autoconf code, m4/jm-macros.m4.
600 (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
603 1999-03-26 Jim Meyering <meyering@ascend.com>
605 * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
606 (noinst_HEADERS): Add version-etc.h.
608 1999-03-25 Jim Meyering <meyering@ascend.com>
610 * src/tail.c (recheck): Factor out a block of duplicated code.
611 Set f->size to 0 upon encountering a new file so we read it from
612 the beginning rather than from then end of the first line or
613 block. Otherwise, after a log rotation, tail would omit the first
614 line or block of the new file. Reported by Ed Avis.
616 1999-03-20 Jim Meyering <meyering@ascend.com>
618 * tests/Makefile.am (SUBDIRS): Temporarily remove pr.
620 1999-03-13 Jim Meyering <meyering@ascend.com>
622 * src/tac.c: (tac_mem): `#if-0'-out this unused function.
623 (tac_stdin_to_mem): Likewise.
625 * doc/textutils.texi (cut invocation): Describe --output-delimiter.
627 1999-03-12 Jim Meyering <meyering@ascend.com>
629 * src/sys2.h (SETVBUF): Define new macro.
630 * src/tail.c (dump_remainder): Don't fflush stdout here.
631 (main) [if forever]: Make stdout unbuffered, instead.
632 Akim Demaille pointed out that when running `echo x>a; tail -f a>>a' ,
633 the file `a' didn't grow longer than two lines. Now it grows
636 1999-03-07 Jim Meyering <meyering@ascend.com>
638 * tests/md5sum/newline-1: Test for the actual feature.
639 With help from Eli Zaretskii.
641 * src/pr.c (usage): Add missing \n\.
643 The newline test would always fail on MSDOS/Windows systems --
644 so move it to a separate file where we can test for that.
645 * tests/md5sum/basic-1: Remove newline test.
646 * tests/md5sum/newline-1: New file.
647 * tests/md5sum/Makefile.am (TESTS): Add newline-1.
648 Pointed out by Eli Zaretskii.
650 1999-02-13 Roland Huebner <rh@pelikan.cologne.de>
652 (main): Redefine options -s, -w to be POSIX compliant; introduce
653 new options -J, -S, -W to disentangle -s and -w when used together
654 with the three column options;
655 (add_line_number): Make POSIX compliant; use default number
656 separator TAB with single column output.
657 (add_line_number): Make POSIX compliant; with multicolumn output
658 now prefer `text columns of equal width' rather than a consequent
659 use of `default n-separator TAB'.
660 (add_line_number): Change line number cut-off from lower-oder to
661 higher-oder digit to avoid loss of information; no consequent
662 handling exists in different utilities and other UNIXes.
663 (char_to_clump): Expand input text tabs to 8 spaces, if
664 input_tab_char doesn't equal TAB (adapted to other UNIXes).
665 (usage): Update POSIX compliant options -s, -w; add new options -J,
667 (main): Update the source internal documentation.
668 Some smaller BUGFIXES (print_sep_string, init_header, skip_to_page,
669 reset_status, print_header).
671 * tests/md5sum/basic-1 (backslash): Use .\foo instead of \.foo so we
672 don't tramp on root directory in MSDOS/Windows.
673 Suggestion from Eli Zaretskii.
675 1999-02-15 Eli Zaretskii <eliz@is.elta.co.il>
677 * tests/md5sum/Makefile.am (TESTS_ENVIRONMENT): Run md5sum with the
678 --text option (for MSDOS).
680 1999-03-06 Jim Meyering <meyering@ascend.com>
682 * src/cut.c (getstr): Change type of `delim' parameter from char to int.
683 (cut_fields): Cast to `unsigned char' before comparing.
684 (main): Cast to `unsigned char' before assigning.
686 * tests/cut/Test.pm: Add a test to exercise the bug.
688 * src/ptx.c (swallow_file_in_memory): Use a `%s' format in error call,
689 in case the argument string contains a `%'.
691 * src/fmt.c (main): Likewise.
692 * src/sort.c (main): Likewise.
694 1999-02-13 Eli Zaretskii <eliz@is.elta.co.il>
696 * src/sys2.h [__DJGPP__]: Include <io.h> and <sys/exceptn.h>.
698 * src/ptx.c (swallow_file_in_memory): Slurp up the whole file at
699 once on MSDOS as well, but we have to relax the test for whether
700 reading it succeeded.
702 1999-03-03 Jim Meyering <meyering@ascend.com>
704 * src/cat.c: Include long-options.h
705 [long_options]: Remove the "help" and "version" entries.
706 Remove declarations of show_help and show_version.
707 (main): Use parse_long_options, including author name(s).
708 Remove the show_version and show_help blocks.
709 * src/cksum.c: Likewise.
710 * src/comm.c: Likewise.
711 * src/csplit.c: Likewise.
712 * src/cut.c: Likewise.
713 * src/expand.c: Likewise.
714 * src/fmt.c: Likewise.
715 * src/fold.c: Likewise.
716 * src/head.c: Likewise.
717 * src/nl.c: Likewise.
718 * src/od.c: Likewise.
719 * src/paste.c: Likewise.
720 * src/pr.c: Likewise.
721 * src/split.c: Likewise.
722 * src/sum.c: Likewise.
723 * src/tac.c: Likewise.
724 * src/tail.c: Likewise.
725 * src/tr.c: Likewise.
726 * src/unexpand.c: Likewise.
727 * src/uniq.c: Likewise.
728 * src/wc.c: Likewise.
730 * src/ptx.c: Include long-options.h
731 [long_options]: Remove the "help" and "version" entries.
732 Remove declarations of show_help and show_version.
733 (main): Remove `const' attribute from dcl of argv parameter.
734 Call bindtextdomain and textdomain.
735 Use parse_long_options, including author name(s).
736 Remove the show_version and show_help blocks.
738 * src/join.c (main): Include author name argument in call to
740 * src/md5sum.c (main): Likewise.
741 * src/sort.c (main): Likewise.
742 * src/tsort.c (main): Likewise.
744 1999-02-07 Jim Meyering <meyering@ascend.com>
748 * Makefile.maint (my-distcheck): Don't depend on dist, now that this
749 is hooked up to the distcheck rule.
750 * Makefile.am (distcheck-hook): New target and rule -- link to shared
751 rule, my-distcheck, in Makefile.maint.
753 1999-01-31 Jim Meyering <meyering@ascend.com>
755 * doc/textutils.texi: Wrap the @top node in @ifnottex instead of
756 @ifinfo so `makeinfo --html ...' works. From Karl Berry.
758 1999-01-30 Jim Meyering <meyering@ascend.com>
760 * acconfig.h: Remove lots of `#undef's, now that we use the
761 3-argument forms of AC_DEFINE* macros.
763 * configure.in: Require autoconf 2.13.
764 Use 3-argument form of AC_DEFINE*.
766 1999-01-24 Jim Meyering <meyering@ascend.com>
768 * src/tac.c (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.
770 * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
771 (and hence that of the local `n1', too) to `int' at Paul's request.
773 1999-01-18 Akim Demaille <demaille@inf.enst.fr>
775 * doc/textutils.texi: Harmonization of @samp use for options.
777 1999-01-17 Jim Meyering <meyering@ascend.com>
779 * Makefile.am (SUBDIRS): Add djgpp.
780 * configure.in (AC_OUTPUT): Add djgpp/Makefile.
781 * djgpp/: New directory.
783 * man/Makefile.maint ($(man_MANS)): Don't remove the target (the
784 man page) until after we've created its replacement.
786 1999-01-16 Eli Zaretskii <eliz@is.elta.co.il>
788 * GNUmakefile: Add SHELL = /bin/sh.
789 * man/GNUmakefile: Likewise.
791 1999-01-16 Jim Meyering <meyering@ascend.com>
793 * acconfig.h: Remove @BOTTOM@ section.
794 Instead, add the define and decl via m4/jm-macros.m4.
796 * lib/argmatch.h (XARGMATCH): Define to return a value once again.
797 (XARGCASEMATCH): Likewise.
799 * lib/argmatch.c (EXIT_FAILURE): Define.
800 (ARGMATCH_DIE): Provide default.
801 (__xargmatch_internal): New function.
802 s/rogram_name/program_name.
805 1999-01-14 Jim Meyering <meyering@ascend.com>
807 * tests/md5sum/basic-1: Use `f', not `x' as temp. file name to avoid
808 warnings from perl5.004.
809 Reported by Volker Borchert.
811 * lib/long-options.c (parse_long_options): Rename `usage' parameter
812 to avoid shadowing globally scoped function.
814 1999-01-14 Akim Demaille <demaille@inf.enst.fr>
816 * acconfig.h: Add a @BOTTOM@ section.
817 (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1).
819 * src/*.c: Don't prototype usage as static.
821 1999-01-10 Jim Meyering <meyering@ascend.com>
825 All of the following new code is protected by
826 `#if DONT_UNLINK_WHILE_OPEN'
827 * src/tac.c (file_to_remove): New global.
828 (fp_to_close): New global.
829 (unlink_tempfile): New function.
830 (record_tempfile): New function.
831 (save_stdin): Call record_tempfile.
833 (main): Use SET_BINARY and SET_BINARY2.
836 1999-01-09 Jim Meyering <meyering@ascend.com>
838 * tests/uniq/Test.pm: Add tests from Jochen Hein.
839 * src/uniq.c: New option: --all-repeated (-D).
840 (output_all_repeated) [output_mode]: New enum value.
841 (usage): Describe it.
842 (writeline): Test for new mode.
843 (check_file): Likewise.
844 Based on patches from Jochen Hein and Florin Iucha.
845 (main): Diagnose `too many arguments'.
847 * tests/head/Test.pm (null-1): Add test from Jochen Hein.
849 * src/tail.c (parse_obsolescent_option): Interpret `number' as decimal.
850 (parse_options): Likewise.
851 Reported by Kamal Paul Nigam.
853 * src/tail.c: New option: --max-unchanged-stats=N.
854 New option: --max-n-consecutive-size-changes=N.
856 1999-01-03 Jim Meyering <meyering@ascend.com>
858 * src/md5sum.c (usage): Remove third program_name argument -- there
859 were only two `%s' in the format string.
861 1999-01-02 Jim Meyering <meyering@ascend.com>
863 * src/tsort.c (tsort): Use a single call to error instead of two
865 (main): Remove `%s: ' prefix on format string.
867 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
869 * src/ptx.c (format_vals): New array.
870 (main): Use XARGMATCH in place of argmatch.
872 * lib/argmatch.h (XARGMATCH): Don't return a value; instead,
873 modify a parameter. Add a `Die_stmt' parameter.
875 * lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
876 (argmatch_to_argument): Add `const' attribute to first parameter.
878 1999-01-01 Jim Meyering <meyering@ascend.com>
880 * src/tsort.c: Move inclusion of assert.h to follow that of stdio.h.
881 Some losing systems require this.
882 Use STREQ macro instead of strcmp in a few places.
884 * po/POTFILES.in: Add tsort.c.
886 * man/Makefile.maint ($(man_MANS)): `exit 1' if any of help2man,
887 chmod, or mv fails. Otherwise, the failure could go unnoticed.
889 * man/Makefile.summ: Add entries for ptx and tsort.
891 * src/tsort.c: Include readtokens.h.
892 (zeros): Rename global from `rr'.
893 (getstr): Remove function.
894 (tsort) Use readtoken instead of getstr.
896 * lib/readtokens.c: New file.
897 * lib/readtokens.h: New file.
898 * lib/Makefile.am (libtu_a_SOURCES): Add readtokens.c.
899 (noinst_HEADERS): Add readtokens.h.
901 * man/Makefile.am (man_MANS): Add ptx.1.
902 * man/ptx.x: New file.
904 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
906 * man/Makefile.am (man_MANS): Add tsort.1.
907 * man/tsort.x: New (essentially empty) file.
909 * src/tsort.c: Rename globals N and R so they don't shadow locals.
910 (tsort): Rename from `sort'.
912 1998-11-07 Mark Kettenis <kettenis@phys.uva.nl>
913 * src/Makefile.am (bin_PROGRAMS): Add tsort.
914 * src/tsort.c: New program.
916 * lib/Makefile.am (libtu_a_SOURCES): Add quotearg.c.
917 (noinst_HEADERS): Add quotearg.h.
919 ============================
920 All of the following are from:
921 1998-04-17 Eli Zaretskii <eliz@is.elta.co.il>
923 * src/system.h (SET_BINARY, SET_BINARY2, fileno, setmode): New
926 * src/cat.c (usage) [O_BINARY]: Describe -B,--binary option.
927 (main) [O_BINARY]: binary_files, binary_output, file_open_mode:
928 new variables. Add --binary to long_options[]. Switch stdin and
929 stdout to binary mode unless file contents are not important
930 anyway. Open files in binary mode when required.
932 * src/cksum.c (cksum) [O_BINARY]: Read redirected stdin in binary
935 * src/expand.c (expand): Use binary I/O where appropriate.
937 * src/head.c (head_bytes, head_lines) [O_BINARY]: Use binary I/O.
939 * src/md5sum.c (OPENOPTS) [O_BINARY]: Use binary I/O when non-zero
941 (md5_file) [O_BINARY]: Switch redirected stdin to binary mode.
942 (main) [O_BINARY]: Use binary reads by default on those systems
943 which care about the difference.
945 * src/od.c (skip, read_char, read_block) [O_BINARY]: Switch input
946 stream to binary mode.
948 * src/sort.c (PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max
949 file name characters in a given directory.
950 (tempname): Make sure the temp file name is unique even if long
951 file names aren't supported.
953 * src/split.c (cwrite) [O_BINARY]: Write output in binary mode.
954 (main) [O_BINARY]: Read input in binary mode.
956 * src/sum.c (bsd_sum_file, sysv_sum_file) [O_BINARY]: Read input
959 * src/tac.c (record_tempfile, unlink_tempfile)
960 [DONT_UNLINK_WHILE_OPEN]: New functions, for systems where a file
961 cannot be removed before it is closed.
962 (save_stdin) [DONT_UNLINK_WHILE_OPEN]: Record the temporary file,
963 to be removed before exit.
964 (tac_file, save_stdin, main): Use binary I/O when appropriate.
966 * src/tail.c (tail_lines, tail_bytes) [O_BINARY]: Use binary I/O
969 * src/tr.c (main) [O_BINARY]: Use binary I/O when appropriate.
971 * src/unexpand.c (unexpand): Use binary I/O where appropriate.
973 * src/wc.c (wc): Use binary mode for input.
975 * doc/textutil.texi: Add comments about peculiarities of Textutils
976 operation on MS-DOS/MS-Windows.
978 1998-12-22 Jim Meyering <meyering@ascend.com>
980 * configure.in (ALL_LINGUAS): Add chinese (zh).
982 1998-12-17 Jim Meyering <meyering@ascend.com>
984 New options for tail:
985 --follow=name, --follow=descriptor, --allow-missing
986 * src/tail.c (Follow_mode): New enum.
987 (n_live_files): New function.
988 (tail_forever): Avoid starvation with --follow=name and a
989 continually-growing unlinked or renamed file.
991 1998-12-13 Jim Meyering <meyering@ascend.com>
993 * tests/uniq/Test.pm: New file.
994 * tests/uniq/Makefile.am: New file.
995 * tests/uniq: New directory.
996 * tests/Makefile.am (SUBDIRS): Add uniq.
997 * configure.in (AC_OUTPUT): Add tests/uniq/Makefile.
1000 * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
1002 (EXTRA_DIST): Add xstat.in.
1003 * lib/stat.c: Remove file.
1004 * lib/lstat.c: Remove file.
1005 * lib/xstat.in (xstat@): New file.
1007 * configure.in (ALL_LINGUAS): Add Russian (ru).
1009 1998-10-31 Jim Meyering <meyering@ascend.com>
1011 * acconfig.h (stat): New #undef.
1013 1998-10-22 Jim Meyering <meyering@ascend.com>
1015 * src/fold.c (usage): Add mention of --version and --help.
1016 Reported by Matej Vela <mvela@public.srce.hr>.
1018 1998-10-04 Jim Meyering <meyering@ascend.com>
1020 * lib/fnmatch.h: New file. (unused)
1021 * lib/fnmatch.c: New file. (unused)
1022 * lib/Makefile.am (noinst_HEADERS): Add fnmatch.h.
1024 1998-10-03 Jim Meyering <meyering@ascend.com>
1026 * man/Makefile.am: Switch to using help2man.
1027 (EXTRA_DIST): Add Makefile.summ.
1029 * man/help2man: Invoke program with --manhelp option only if
1030 --name=STRING not specified. Otherwise, this would fail with `yes'.
1031 * man/Makefile.summ: New file.
1032 * man/Makefile.maint: Include it.
1033 * man/help2man: New file.
1034 * man/GNUmakefile: New file.
1035 * man/Makefile.maint: New file.
1036 * man/*.x: New files.
1037 * man/*.1: Remove files.
1039 * src/md5sum.c (split_3): Rename local variable, to `escaped_filename'.
1040 (main): Output the leading backslash not just when there's a newline
1041 in the file name, but also when there's a backslash.
1042 Reported by Jim Dennis.
1044 * tests/md5sum/basic-1: Add tests with filenames containing newline
1045 and backslash characters. (for the bug fixed above)
1047 * tests/Makefile.am (EXTRA_DIST): Add Fetish.pm.
1048 * tests/Fetish.pm: New file.
1050 * tests/md5sum/basic-1: New file: rewrite of old tests to use Fetish.pm.
1051 * tests/md5sum/Test.pm: Remove file.
1052 * tests/md5sum/Makefile.am: Rewrite.
1054 1998-09-19 Jim Meyering <meyering@ascend.com>
1056 * src/ptx.c (program_name): Declare *not* to be const.
1058 1998-08-29 Jim Meyering <meyering@ascend.com>
1060 * src/cut.c: Don't assume ASCII.
1061 * src/pr.c: Likewise.
1062 * src/tail.c: Likewise.
1064 1998-08-15 Jim Meyering <meyering@ascend.com>
1066 * src/pr.c (usage): Reformat.
1068 * src/ptx.c: Add braces to suppress warning about ambiguous `else'.
1069 * lib/bumpalloc.h: Likewise.
1071 1998-08-13 François Pinard <pinard@iro.umontreal.ca>
1073 * src/ptx.c: New file.
1074 * src/Makefile.am (bin_PROGRAMS): Add ptx.
1075 * lib/bumpalloc.h, lib/diacrit.h, lib/diacrit.c: New files.
1076 * lib/Makefile.am (libtu_a_SOURCES): Add diacrit.c.
1077 (noinst_HEADERS): Add bumpalloc.h and diacrit.h.
1079 1998-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1081 * src/pr.c (long_options): Add long names for all options.
1082 (usage): Update help string.
1083 (main): Handle the special options --pages and --columns.
1085 1998-08-02 Jim Meyering <meyering@ascend.com>
1087 * lib/linebuffer.c (readline): Return zero upon error as well as upon
1088 end of file. From James Youngman.
1091 1998-08-01 Jim Meyering <meyering@ascend.com>
1093 * src/sort.c (my_setlocale): Guard definition within #ifdef ENABLE_NLS.
1094 From Manfred Hollstein.
1096 1998-07-30 Jim Meyering <meyering@ascend.com>
1098 * tests/cut/Test.pm: Avoid broken pipe message for tests that fail
1101 * src/sort.c (usage): Add angle brackets to make `Report bugs...'
1102 message consistent with all the rest.
1104 1998-07-28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1106 * tests/cut/Test.pm: Avoid broken pipe for 'y' and 'z' tests.
1108 * src/sort.c (NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid
1109 clash with <langinfo.h>. All uses changed.
1111 1998-07-26 Jim Meyering <meyering@ascend.com>
1113 * intl/localealias.c (read_alias_file): Avoid mixing `char*' and
1114 `unsigned char*' variables. Again for irix4.
1115 Mostly from Kaveh Ghazi.
1117 * src/join.c: Convert some char* dcls to `unsigned char*' and remove
1118 a cast -- to placate irix4's cc.
1119 * src/fmt.c (check_punctuation): Add cast to placate irix4's cc.
1120 Reported by Kaveh Ghazi.
1122 * src/md5sum.c (split_3): Add cast to placate irix4's cc.
1125 1998-07-25 Jim Meyering <meyering@ascend.com>
1129 * tests/cut/Test.pm: Add tests for new --output-delimiter option,
1130 as well as for NUL input delimiter (--delimiter='').
1131 * src/cut.c (cut_fields): Honor new --output-delimiter option.
1132 (main): Fix handling of --delimiter='' (-d ''). Until now, it has
1133 never worked as advertised. I guess no one tried it.
1135 * tests/sort/Test.pm: Add two tests relating to this.
1136 * src/sort.c (main): Stat all non-`-' input file files (and fail if a
1137 stat fails) when an output file is specified by `-o' but doesn't exist.
1138 Reported by Will Edgington.
1140 * tests/sort/Test.pm: New tests of -o.
1142 1998-07-16 Jim Meyering <meyering@ascend.com>
1144 * lib/Makefile.am (noinst_HEADERS): Add lchown.h.
1145 * lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
1146 * lib/lchown.c: Include lchown.h.
1148 1998-07-04 Jim Meyering <meyering@ascend.com>
1150 * configure.in (AM_WITH_REGEX): Remove. Now the replacement
1151 macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
1152 * acconfig.h (WITH_REGEX): Remove undef.
1153 * src/csplit.c: Remove #ifdef around <regex.h> inclusion.
1154 * src/nl.c: Likewise.
1155 * src/tac.c: Likewise.
1156 * src/csplit.c (extract_regexp): Remove #if !WITH_REGEX...#endif block.
1157 * lib/Makefile.am (noinst_HEADERS): Remove rx.h.
1158 * lib/rx.c: Remove file.
1159 * lib/rx.h: Remove file.
1161 1998-06-29 Jim Meyering <meyering@ascend.com>
1163 * src/wc.c: Update calls to human_readable -- now there's one fewer arg.
1165 * lib/Makefile.am (libtu_a_SOURCES): Add argmatch.c.
1166 (noinst_HEADERS): Add argmatch.h.
1168 1998-06-28 Jim Meyering <meyering@ascend.com>
1170 * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.
1172 1998-06-27 Jim Meyering <meyering@ascend.com>
1174 * tests/pr/Test.pm: Add two tests for double spacing.
1175 * src/pr.c (print_page): If cols_ready_to_print is zero,
1176 break out of loop just before the double-space test.
1177 Reported by Michael Stutz.
1179 1998-06-18 Jim Meyering <meyering@ascend.com>
1181 * tests/Makefile.am.in (check): Depend on $(maint_gen) so
1182 `make maintainer-clean; ./configure; make check' works.
1184 1998-05-25 Jim Meyering <meyering@ascend.com>
1186 * configure.in (_GNU_SOURCE): AC_DEFINE it here.
1187 * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section.
1188 [!_GNU_SOURCE]: Add #undef instead.
1190 1998-05-16 Jim Meyering <meyering@ascend.com>
1192 * configure.in (jm_MACROS): New wrapper macro.
1193 Remove uses of most jm_* macros.
1195 * src/tac.c (tac_seekable): Fix error in handling regex separators.
1196 * tests/tac/Test.pm (opt-b, opt-s, opt_sb, opt_r): New tests.
1197 (opt_br): New test -- exercises above-fixed bug.
1199 * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS='
1200 lines from the m4/*.m4 macros, so the hack of including some
1201 custom-replaced C source file names here is no longer needed.
1203 * acconfig.h (chown): Add undef.
1204 (D_INO_IN_DIRENT): Likewise.
1205 (D_TYPE_IN_DIRENT): Likewise.
1206 (ssize_t): Likewise.
1208 1998-05-09 Jim Meyering <meyering@ascend.com>
1210 * src/tac.c (tac_seekable): Rename from tac_stream.
1211 Change `FILE *in' parameter to `int input_fd'. Adjust callers.
1213 1998-05-03 Jim Meyering <meyering@ascend.com>
1215 * po/: Update from gettext-0.10.35.
1217 * configure.in: Remove use of AC_LINK_FILES.
1218 (AC_OUTPUT): Remove po/Makefile-generating sed command.
1220 1998-04-26 Jim Meyering <meyering@ascend.com>
1222 * tests/tail/Test.pm: Disable test f-1, now that it fails.
1224 * src/sort.c (keycompare) (CMP_WITH_IGNORE): Don't return 0 from inside
1225 the keyspec-iterating loop. With this change, test 22a passes.
1226 Reported by Zvi Har'El.
1227 (strncoll): Remove bogus assertion.
1228 * tests/sort/Test.pm: Add tests for the above fix.
1230 * configure.in: Use jm_ASSERT.
1231 * acconfig.h: Add NDEBUG.
1233 * src/cut.c: Don't define NDEBUG.
1234 * src/csplit.c: Likewise.
1235 * src/join.c: Likewise.
1236 * src/sort.c: Likewise.
1237 * src/tr.c: Likewise.
1239 * src/cut.c: Don't define _GNU_SOURCE (now it's in config.h).
1240 * src/expand.c: Likewise.
1241 * src/fold.c: Likewise.
1242 * src/join.c: Likewise.
1243 * src/sort.c: Likewise.
1244 * src/tr.c: Likewise.
1245 * src/unexpand.c: Likewise.
1246 * src/uniq.c: Likewise.
1248 * src/tail.c (close_fd): New function -- converted from macro.
1249 [struct File_spec] (n_stat_calls): New member.
1250 [struct File_spec] (n_unchanged_stats): New member.
1251 (max_n_unchanged_stats): New global.
1252 Initialize new members.
1253 (xwrite): New function -- converted from macro.
1254 [struct File_spec] (pretty_name): Remove member.
1255 (pretty_name): New function.
1257 * src/md5sum.c (md5_check): Declare local, `md5num' as _unsigned_ char*.
1258 (hex_digits): Declare parameter `s' as _unsigned_ char*.
1259 (split_3): Declare parameter `u' as _unsigned_ char**.
1261 1998-04-17 Jim Meyering <meyering@ascend.com>
1263 * src/fmt.c (check_punctuation): Used unsigned char* pointers to avoid
1265 * src/join.c (xfields): Likewise.
1267 1998-04-12 Jim Meyering <meyering@ascend.com>
1269 * src/cat.c: Use STREQ macro rather than strcmp.
1270 * src/cksum.c: Likewise.
1271 * src/comm.c: Likewise.
1272 * src/csplit.c: Likewise.
1273 * src/cut.c: Likewise.
1274 * src/fmt.c: Likewise.
1275 * src/fold.c: Likewise.
1276 * src/head.c: Likewise.
1277 * src/join.c: Likewise.
1278 * src/md5sum.c: Likewise.
1279 * src/nl.c: Likewise.
1280 * src/paste.c: Likewise.
1281 * src/pr.c: Likewise.
1282 * src/split.c: Likewise.
1283 * src/sum.c: Likewise.
1284 * src/tac.c: Likewise.
1285 * src/uniq.c: Likewise.
1286 * src/wc.c: Likewise.
1288 1998-04-11 Jim Meyering <meyering@ascend.com>
1290 * lib/safe-read.h: New file.
1291 * lib/safe-read.c: Include it.
1292 * src/cat.c: Include it instead of merely declaring safe_read.
1293 * src/csplit.c: Likewise.
1294 * src/head.c: Likewise.
1295 * src/split.c: Likewise.
1296 * src/sum.c: Likewise.
1297 * src/tac.c: Likewise.
1298 * src/tail.c: Likewise.
1299 * src/tr.c: Likewise.
1300 * src/wc.c: Likewise.
1302 * lib/Makefile.am (noinst_HEADERS): Add safe-read.h.
1304 * src/wc.c [HAVE_INTTYPES_H]: Include inttypes.h.
1305 Declare counters to be of type uintmax_t.
1306 (write_counts): Use human_readable to format potentially-long-long
1307 numbers. Suggestion from Rogier Wolff.
1308 (wc): Declare per-file counters to be of type uintmax_t.
1309 Declare bytes_read to be ssize_t.
1310 * lib/Makefile.am (libtu_a_SOURCES): Add human.c.
1311 (noinst_HEADERS): Add human.h.
1313 * lib/human.c: New file.
1314 * lib/human.h: New file.
1316 1998-04-04 Jim Meyering <meyering@eng.ascend.com>
1318 * configure.in (jm_AC_HEADER_INTTYPES_H): Use it.
1319 (jm_AC_TYPE_UINTMAX_T): Use it.
1320 (jm_PREREQ): Use it.
1322 * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
1323 know about the m4/ subdirectory.
1324 * Makefile.maint (aclocal-files): Remove now-unnecessary (with
1325 automake-1.2h and the above change) aclocal-related rules and includes.
1327 1998-04-03 Jim Meyering <meyering@eng.ascend.com>
1329 * lib/closeout.c: New file.
1330 * lib/closeout.h: New file.
1331 * lib/Makefile.am (libtu_a_SOURCES): Add closeout.c.
1332 (noinst_HEADERS): Add closeout.h.
1334 1998-03-31 Jim Meyering <meyering@eng.ascend.com>
1336 * lib/xstrtol.c: Merge with the version from fileutils.
1338 1998-03-27 Jim Meyering <meyering@eng.ascend.com>
1340 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.
1342 1998-03-23 Jim Meyering <meyering@eng.ascend.com>
1344 * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
1345 automatically handles it.
1347 1998-03-19 Jim Meyering <meyering@eng.ascend.com>
1349 * src/system.h (SCHAR_MIN): Define.
1351 od.c needs these when compiling with NCR's R2.0c C compiler.
1352 (TYPE_MAXIMUM): Cast result to `(t)' so this macro works with
1356 1998-03-15 Jim Meyering <meyering@eng.ascend.com>
1358 * src/tail.c (tail_file): Merge largely-duplicated blocks of code.
1360 1998-03-03 Paul Eggert <eggert@twinsun.com>
1362 * src/sort.c (xtmpfopen): Open temporary file exclusively, to
1363 foil a common denial-of-service attack.
1364 * src/tac.c (save_stdin): Likewise.
1366 1998-02-16 Jim Meyering <meyering@eng.ascend.com>
1368 * configure.in (jm_FUNC_LSTAT): Use it.
1369 (jm_FUNC_STAT): Use it.
1370 * lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c.
1372 1998-02-06 Jim Meyering <meyering@eng.ascend.com>
1374 * configure.in: Don't use AM_MAINTAINER_MODE or
1375 AC_PATH_PROG(PERL, perl).
1376 (jm_PERL): Use this.
1378 1998-02-04 Jim Meyering <meyering@eng.ascend.com>
1380 * tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl.
1381 (mk_script): Set to ../mk-script.
1382 (x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script.
1383 Remove @MAINT@ cruft.
1384 (Makefile.am): Likewise.
1385 Remove @MAINT@ cruft. Now `missing' will explain the failure
1386 when people don't have Perl yet modify a file whose rebuilding
1387 would lead to the use of Perl.
1389 * tests/Makefile.am (EXTRA_DIST): Add mk-script.
1390 * tests/*/mk-script.pl: Remove files.
1392 * GNUmakefile: New file.
1393 * Makefile.am (EXTRA_DIST): Add GNUmakefile.
1394 Don't include Makefile.maint from here. It's included from GNUmakefile.
1396 1998-01-30 Paul Eggert <eggert@twinsun.com>
1398 * configure.in (AC_LFS): Put before anything that can affect or use
1399 CPPFLAGS, LDFLAGS, or LIBS.
1401 1998-01-25 Jim Meyering <meyering@na-net.ornl.gov>
1403 * Makefile.maint: New file.
1404 * Makefile.am: Move rules common to textutils, fileutils, sh-utils
1405 into Makefile.maint.
1406 Include Makefile.maint.
1407 (EXTRA_DIST): Add Makefile.maint.
1409 * src/cat.c (cat): Convert comma-expressions to pairs of
1410 semicolon-terminated stmts.
1411 Add braces around compound if/else stmts.
1413 1998-01-24 Jim Meyering <meyering@na-net.ornl.gov>
1415 * src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...'
1416 as obsolescent options.
1417 Accept new option: --sleep-interval=SECONDS (-s).
1418 (parse_options): Recognize it.
1419 (usage): Describe it.
1420 (tail_forever): Use it.
1421 (dump_remainder): Use it.
1422 * tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'.
1424 * tests/cut/: Rename directory to remove `-test' suffix.
1425 * tests/join/: Likewise.
1426 * tests/md5sum/: Likewise.
1427 * tests/pr/: Likewise.
1428 * tests/sort/: Likewise.
1429 * tests/tr/: Likewise.
1430 * configure.in (AC_OUTPUT): Reflect renamings in tests/.
1431 * tests/Makefile.am (SUBDIRS): Reflect renamings in tests/.
1433 * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
1434 bug in Cray C 5.0.3.0 when T == time_t.
1436 1998-01-18 Jim Meyering <meyering@na-net.ornl.gov>
1438 * src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction,
1439 numcompare): Remove the `unsigned' from some `unsigned char*'
1440 parameter types. Add casts via UCHAR where necessary to avoid
1441 problems with unwanted sign extension. Based on a patch from
1442 Kaveh Ghazi to appease Irix4's cc compiler.
1444 1998-01-17 Jim Meyering <meyering@na-net.ornl.gov>
1446 * src/split.c (next_file_name): Rewrite. This removes an artificial
1447 limit (albeit already high, at INT_MAX :-) on the number of files
1448 split could create. Reported by Ralf W. Stephan.
1450 1998-01-16 Jim Meyering <meyering@na-net.ornl.gov>
1452 * src/sort.c: (mergefps): Add braces to avoid ambiguous `else' stmt.
1453 (nls_set_fraction): Likewise.
1455 * src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
1456 for Irix-4.0.5. From Kaveh Ghazi.
1457 * configure.in: Check for langinfo.h.
1459 * lib/getline.c: Make PARAMS-defining conditionals consistent.
1460 * lib/linebuffer.h: Likewise.
1461 * lib/long-options.h: Likewise.
1462 * lib/memcasecmp.h: Likewise.
1463 * lib/xstrtod.h: Likewise.
1464 * lib/xstrtol.h: Likewise.
1465 Suggestion from Kaveh Ghazi.
1467 * tests/head/Test.pm (fail-0): Disable test. It depends on
1468 sizeof(long) being 32 bits. Reported by Kaveh Ghazi.
1470 1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
1474 * src/system.h [HAVE_LIMITS_H]: Include limits.h
1475 (TYPE_SIGNED): Define.
1476 (TYPE_MINIMUM): Define.
1477 (TYPE_MAXIMUM): Define.
1479 (SCHAR_MAX): Define.
1480 (UCHAR_MAX): Define.
1485 (ULONG_MAX): Define.
1486 * src/*.c: Remove definitions of those symbols.
1488 * src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
1489 since it now includes limit.h which defines RE_DUP_MAX.
1490 * src/nl.c: Likewise.
1491 * src/tac.c: Likewise.
1493 * lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE.
1494 Rewrite macro as function. Return a value. Update caller.
1495 Cast __ZLONG_MAX `__unsigned long int' before casting to double to
1496 avoid SunOS /bin/cc compiler bug.
1498 1998-01-08 Jim Meyering <meyering@na-net.ornl.gov>
1500 * src/tac-pipe.c: New file. But not yet used.
1501 * src/Makefile.am (EXTRA_DIST): Add tac-pipe.c.
1503 * src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer
1504 result of xrealloc (until recently it was char*).
1506 * configure.in (AC_CHECK_FUNCS): Add nl_langinfo.
1507 * src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test
1508 guarding the nls month-checking code.
1509 (nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
1510 `unsigned' from dcls of text and lim.
1511 (main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.
1513 1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
1515 * lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
1517 * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
1518 those files will be built via the ANSI2KNR-filtering rules if necessary.
1520 1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
1522 * configure.in: Remove AC_DEFINE of _GNU_SOURCE.
1523 * acconfig.h (_GNU_SOURCE): Define if not already defined.
1524 Put this code in @TOP@ section.
1525 (_GNU_SOURCE): Remove #undef.
1527 1997-12-22 Jim Meyering <meyering@na-net.ornl.gov>
1529 * configure.in: AC_DEFINE _GNU_SOURCE.
1530 * acconfig.h: Add _GNU_SOURCE.
1532 1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
1534 * configure.in (AC_CHECK_HEADERS): Add stdlib.h.
1536 * src/system.h: Merge in things from fileutils' version of this file.
1537 * src/csplit.c: s/__P/PARAMS/.
1538 * src/fmt.c: s/__P/PARAMS/.
1539 * src/od.c: s/__P/PARAMS/.
1540 * src/pr.c: s/__P/PARAMS/.
1542 1997-12-14 Jim Meyering <meyering@na-net.ornl.gov>
1544 * src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g.
1546 1997-12-13 Jim Meyering <meyering@na-net.ornl.gov>
1548 * src/fmt.c (main): Add some braces.
1549 Check return code from fclose of each input file.
1550 Close stdout and check for errors.
1552 * src/csplit.c (close_output_file): Check ferror before calling fclose.
1553 (main): Close stdout and check for errors.
1555 1997-11-15 Jim Meyering <meyering@na-net.ornl.gov>
1557 * acconfig.h: Add mktime.
1558 * configure.in (jm_FUNC_MKTIME): Use it.
1559 * lib/mktime.c: New file.
1560 * lib/Makefile.am (EXTRA_DIST): Add mktime.c
1562 * intl/Makefile.in (distclean): Don't remove libintl.h here.
1563 * Makefile.am (DISTCLEANFILES): Remove it here instead.
1565 1997-11-13 Jim Meyering <meyering@na-net.ornl.gov>
1567 * lib/strftime.c: Update from FSF.
1568 * m4/strftime.m4: Check for POSIX.2's %f format spec.
1570 1997-11-12 Jim Meyering <meyering@na-net.ornl.gov>
1572 * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define.
1573 * configure.in (AC_CHECK_FUNCS): Add mempcpy.
1575 1997-11-09 Jim Meyering <meyering@na-net.ornl.gov>
1577 * configure.in (jm_FUNC_STRFTIME): Use it.
1578 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
1579 * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
1580 (jm_FUNC_GNU_STRFTIME): Use new macro.
1581 (jm_FUNC_STRFTIME): New macro. Likewise.
1582 Reported by Noel Cragg.
1584 1997-11-08 Jim Meyering <meyering@na-net.ornl.gov>
1586 * m4/lfs.m4 (AC_LFS): New file/macro.
1587 * m4/Makefile.am (EXTRA_DIST): Add lfs.m4.
1588 * configure.in (AC_LFS): Use it.
1589 (AC_CHECK_FUNCS): Add fseeko.
1590 * src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO.
1591 (skip): Use fseeko if available. Don't use lseek; it causes
1592 the stdio stream to become out of sync with respect to the
1593 underyling file descriptor.
1596 1997-10-16 Paul Eggert <eggert@twinsun.com>
1598 * configure.in (AC_CHECK_FUNCS): Add fseeko.
1600 * src/od.c (skip): Use fseeko. Don't use lseek; it causes
1601 the stdio stream to become out of sync with respect to the
1602 underyling file descriptor.
1604 1997-11-06 Jim Meyering <meyering@na-net.ornl.gov>
1606 * src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs.
1607 We always have alloca.
1608 (keycompare): Don't use variable size arrays (it's a gcc-extension).
1609 Rewrite code that increments new lengths when not `ignoring'.
1611 1997-11-02 Jim Meyering <meyering@na-net.ornl.gov>
1613 * acconfig.h: Add malloc and realloc.
1615 * src/wc.c (main): New option, --max-line-length (-L).
1616 (wc, write_counts): Implement it.
1619 1997-10-26 Jim Meyering <meyering@na-net.ornl.gov>
1621 * lib/memcasecmp.c: Convert to upper case before comparing.
1622 This makes join -i work with sort -f.
1623 Reported by Arthur Pool.
1625 1997-10-25 Jim Meyering <meyering@na-net.ornl.gov>
1627 * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
1628 (xcalloc): #ifdef-out unused function.
1629 (xrealloc): Remove code to work around deficient versions of realloc.
1630 Now we have an autoconf-enabled replacement version.
1631 (xmalloc): Remove code to work around deficient versions of malloc.
1632 Now we have an autoconf-enabled replacement version.
1634 * lib/memcmp.c (rpl_memcmp): Rename from memcmp.
1636 * src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/.
1638 * lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL.
1640 * configure.in (jm_FUNC_MALLOC): Use it.
1641 (jm_FUNC_REALLOC): Use it.
1643 * lib/Makefile.am (EXTRA_DIST): Add malloc.c.
1644 * lib/malloc.c: New file.
1645 * m4/malloc.m4: New file.
1646 * m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
1648 * lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
1649 (EXTRA_DIST): Add realloc.c.
1650 (EXTRA_DIST): Add malloc.c.
1652 * src/system.h: Include xalloc.h.
1653 Remove dcls of xmalloc, xcalloc and xrealloc.
1655 * lib/xalloc.h: New file.
1657 * lib/xmalloc.c: Include xalloc.h.
1658 Change VOID to void.
1659 (xalloc_exit_failure): Renamed extern.
1660 (xalloc_msg_memory_exhausted): New extern.
1661 (xalloc_fail_func): New extern.
1662 (fixup_null_alloc): Use new variables.
1664 1997-10-24 Jim Meyering <meyering@na-net.ornl.gov>
1666 * src/unexpand.c: Remove old-style xmalloc and xrealloc decls.
1667 (add_tabstop): Cast first arg of xrealloc to char*.
1669 * src/sort.c: Include xalloc.h.
1670 (xmalloc): Remove function.
1671 (xrealloc): Remove function.
1672 (main): Set xalloc_fail_func to cleanup.
1673 Set xalloc_exit_failure SORT_FAILURE.
1675 * src/paste.c: Remove old-style xmalloc and xrealloc decls.
1676 (paste_parallel): Cast first arg of xrealloc to char*.
1678 * src/od.c: Remove old-style xmalloc and xrealloc decls.
1679 (decode_format_string): Cast first arg of xrealloc to char*.
1681 * src/expand.c: Remove old-style xmalloc and xrealloc decls.
1682 (add_tabstop): Cast first arg of xrealloc to char*.
1684 * lib/xalloc.h: New file.
1686 * src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
1687 (getstr): Cast xmalloc return value to char*.
1689 * src/csplit.c: Include xalloc.h.
1690 (xmalloc): Remove function.
1691 (xrealloc): Remove function.
1692 (main): Set xalloc_fail_func to cleanup.
1694 * src/*.c: Remove old-style xmalloc and xrealloc decls.
1695 * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
1696 Suggestion from Achim Blumensath.
1698 1997-10-23 Jim Meyering <meyering@na-net.ornl.gov>
1700 * Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
1702 * src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
1703 [!HAVE_DECLARATION_MALLOC]: Declare malloc.
1704 [!HAVE_DECLARATION_REALLOC]: Declare realloc.
1705 [!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
1706 [!HAVE_DECLARATION_STRSTR]: Declare strstr.
1707 * src/cat.c: Remove stpcpy dcl.
1708 * src/csplit.c: Remove malloc and realloc dcls.
1709 * src/sort.c: Remove free, malloc, and realloc dcls.
1710 * src/tac.c: Remove malloc, and realloc dcls.
1711 * src/tr.c: Remove stpcpy dcl.
1712 On some systems, strstr and stpcpy are macros, so declaring them
1713 unconditionally gets syntax errors.
1714 Reported by Mark M. Kettenis.
1716 * configure.in: Use jm_CHECK_DECLS.
1717 * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
1719 1997-10-22 Jim Meyering <meyering@na-net.ornl.gov>
1721 * m4/decl.m4: New file.
1722 * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS.
1724 1997-10-16 Paul Eggert <eggert@twinsun.com>
1726 * src/od.c (LONG_MAX): Define if not defined.
1728 1997-10-16 Jim Meyering <meyering@na-net.ornl.gov>
1730 * src/sort.c (look_for_fraction): Patch from Orn Hansen.
1731 (getmonth): Compare the two month names only to the length of the
1732 string in the month table. Patch from Orn Hansen.
1733 (NLS_STRNCMP): New macro.
1734 (strncoll_s2_readonly): New function.
1735 (inittables): Don't use temporary `comp' to hide type of
1736 comparator function.
1737 (nls_sort_month_comp): Declare parameters to be void* to match
1738 comparator function type required for qsort.
1739 (getmonth): Use NLS_STRNCMP rather than #ifdef.
1740 Use do-while, rather than while-loop.
1742 1997-10-14 Jim Meyering <meyering@na-net.ornl.gov>
1744 * src/sort.c: (_NL_ITEM) [!defined]: Define.
1745 From from Ørn E. Hansen.
1747 * src/sort.c: Use STREQ in place of most uses of strcmp.
1748 (NLS_STRCMP): Define.
1749 (getmonth): Remove ifdef and use NLS_STRCMP instead.
1750 Use HAVE_ALLOCA, not _HAVE_ALLOCA.
1751 (zaptemp): Make parameter `const'.
1753 * tests/sort-test/Test.pm: Add tests to exercise new fraccompare.
1755 * src/sort.c (CHARS_IN_ABM): Remove definition
1756 (inittables): Remove assumption that all abbreviated month names have
1758 (getmonth): Likewise.
1759 (main): Add #if's for more efficient code when using the GNU C library.
1760 From Ulrich Drepper.
1762 * src/sort.c (strncoll): Rename parameter to LEN.
1763 (keycompare): Move assignment out of if-expression.
1765 * lib/xstrdup.c: New file.
1766 * lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c
1768 * src/sort.c: Declare xstrdup.
1769 (my_setlocale): New function.
1770 (main): Guard against failure of strdup (use xstrdup) and setlocale.
1772 * src/system.h (STREQ): Define.
1773 * src/od.c (STREQ): Remove definition.
1775 * src/sort.c (look_for_fraction): Eliminate arbitrary limit on
1776 number of `groups'. Declare as void, not int.
1777 Patch from Ørn E. Hansen.
1778 (main): When determining whether we're in the C or POSIX locale,
1779 don't rely on the form of the string returned by setlocale.
1780 Suggestion from Ulrich Drepper.
1782 1997-10-12 Jim Meyering <meyering@na-net.ornl.gov>
1784 * src/sort.c: Apply big patch from Ørn E. Hansen.
1786 (NLS_MEMCMP): Define.
1787 (keycompare): Use it instead of open-coded #ifdefs.
1788 (compare): Likewise.
1789 (NLS_MAP): Remove unused definitions.
1790 Replace with uses of UCHAR.
1791 (nls_locale_map): Remove dcl of unused file-scope array.
1793 1997-10-10 Jim Meyering <meyering@na-net.ornl.gov>
1795 * tests/sort-test/Test.pm: Add a test.
1798 1997-10-07 Jim Meyering <meyering@na-net.ornl.gov>
1800 * src/*.c: Update bug-reporting address.
1801 * src/cat.c: Indent cpp directives to reflect nesting.
1802 * src/cksum.c: Likewise.
1803 * src/csplit.c: Likewise.
1804 * src/fmt.c: Likewise.
1805 * src/nl.c: Likewise.
1806 * src/paste.c: Likewise.
1808 1997-09-27 Jim Meyering <meyering@na-net.ornl.gov>
1810 * m4/memcmp.m4: Integrate test to detect bug in memcmp from the
1811 Next x86 OpenStep C library. Test program from William Lewis.
1813 1997-09-21 Jim Meyering <meyering@na-net.ornl.gov>
1815 * src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.'
1816 (dump_hexl_mode_trailer): Rename from dump_string_trailer.
1817 Use fputs and putchar instead of trivial or %-less printfs.
1818 (decode_one_format): Parenthesize each field_width assignment in an
1819 argument list to make the side effect a little more apparent.
1820 (write_block): Use fputs and putchar instead of trivial or %-less
1822 (dump_strings): Cast string_min to off_t to avoid long-standing warning.
1824 * src/od.c: Implement new `z' (hexl-mode) modifier.
1825 [struct tspec] (trailer): New field.
1826 (field_width): Likewise.
1827 (dump_string_trailer): New function.
1828 (decode_one_format): Save each field_width in the tspec.
1829 Patch from John Kodis.
1831 1997-09-14 Jim Meyering <meyering@na-net.ornl.gov>
1833 * src/od.c (main) [--traditional]: Don't give diagnostic about there
1834 being more than three arguments if there are *no* arguments specified.
1835 Reported by Jochen Hein.
1837 1997-09-13 Jim Meyering <meyering@na-net.ornl.gov>
1839 * tests/sort-test/Test.pm: Add tests 19a and 19b.
1841 1997-07-21 Jim Meyering <meyering@na-net.ornl.gov>
1843 * src/tail.c (parse_obsolescent_option): #ifdef-out portability warning.
1845 1997-07-19 Jim Meyering <meyering@na-net.ornl.gov>
1847 * src/sort.c (checkfp): Print the `disorder' message. Include both
1848 the number and the contents of the first out-of-order line, in addition
1849 to the file name. Change meaning of return value.
1850 (check): Don't print disorder message here.
1851 Adjust test of checkfp's return value.
1852 Feature suggestion from Karl Heuer.
1854 1997-07-13 Jim Meyering <meyering@na-net.ornl.gov>
1856 * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
1857 Now, automake includes it automatically.
1859 * src/head.c: Include xstrtoul.h.
1860 Remove global variable, unit_size.
1861 (atou): Remove now-unused function.
1862 (parse_unit): Likewise.
1863 (string_to_ull): New function.
1864 (head): Take new parameter, count_lines. Use it instead of unit_size.
1866 (head_file): Likewise.
1867 (main): Use string_to_ull, not atou/parse_unit.
1868 The problem was that overflow wasn't detected, so `head -c 4096m'
1869 was treated just like `head -c 0'.
1870 Reported by Jerome Abela.
1872 * tests/wc: New directory.
1873 * tests/head: New directory.
1874 * tests/Makefile.am (SUBDIRS): Add head and wc.
1875 * configure.in (AC_OUTPUT): Add tests/head/Makefile and
1878 1997-07-05 Jim Meyering <meyering@na-net.ornl.gov>
1880 * src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
1881 a diagnostic and fail when there are two or more non-option arguments.
1883 1997-07-04 Jim Meyering <meyering@na-net.ornl.gov>
1885 * tests/tac/mk-script.pl: Redirect output of cmp to /dev/null.
1887 * configure.in (ALL_LINGUAS): Add Norwegian (no).
1889 * Makefile.am (aclocal-files): Look in source directory, not build dir.
1890 From Andreas Schwab.
1892 Sun Jun 15 06:36:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
1894 * src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the
1895 2-digit abbreviation) in each page header. Reported by Noah Friedman.
1897 Sat Jun 14 12:29:12 1997 Jim Meyering <meyering@na-net.ornl.gov>
1899 * src/cut.c (cut_fields): Detect when the input is empty and handle
1900 that special case. Before `cut -f1 < /dev/null' would improperly
1901 output a single newline. Reported by Phil Richards.
1903 Sun Apr 27 15:10:58 1997 Jim Meyering <meyering@na-net.ornl.gov>
1905 * man/Makefile.am (DISTFILES): Add $(man_MANS).
1907 * configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv).
1909 Thu Apr 3 21:14:02 1997 Jim Meyering <meyering@na-net.ornl.gov>
1911 * m4/Makefile.am (EXTRA_DIST): Update file list.
1913 * tests/cut-test/Test.pm: Add test from Phil Richards.
1915 Sat Mar 22 20:29:10 1997 Jim Meyering <meyering@na-net.ornl.gov>
1917 * missing: New file -- from the automake-1.1m distribution.
1919 Fri Mar 21 23:56:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
1921 * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
1922 (aclocal.m4): Use aclocal's new -I option.
1924 Thu Mar 13 21:46:04 1997 Jim Meyering <meyering@na-net.ornl.gov>
1926 * src/tr.c (main): Make sure c1 is not -1 before using it as an
1927 array index. Patch from Greg McGary. Although this is truly a
1928 bug, I believe it would not cause tr to misbehave on most systems.
1929 I could not construct a test case with which this bug causes tr
1930 to generate invalid output.
1932 * tests/pr-test/Test.pm: Add test that -o 0 works.
1934 * src/pr.c (main): Allow use of 0 (zero) as the margin offset
1935 argument to the -o option. Patch from Gary Anderson.
1937 Fri Feb 28 22:32:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
1939 * src/uniq.c (usage): Fix typo in --help output. From Andreas Schwab.
1941 Tue Feb 25 20:34:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
1943 * lib/Makefile.am (noinst_HEADERS): Add obstack.h.
1944 (libtu_a_SOURCES): Add obstack.c.
1946 Sun Feb 16 08:30:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
1948 * tests/Makefile.am (SUBDIRS): Add tac.
1949 * tests/tac: New directory.
1950 * configure.in (AC_OUTPUT): Add tests/tac/Makefile.
1952 * tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t,
1953 tta3-FF, ttb3-FF}: New files. Renamed (s/T/tt/) to avoid name clashes
1954 on case-independent filesystems.
1955 * tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming.
1957 * src/tail.c (parse_obsolescent_option): Reverse order of args in
1958 diagnostic. Remove `' quotes in diagnostic.
1959 (parse_options): Remove `' quotes in diagnostic.
1961 Sat Feb 8 22:43:45 1997 Jim Meyering <meyering@na-net.ornl.gov>
1963 * src/tail.c (parse_obsolescent_option): Give warning diagnostic for
1964 (but now accept) obsolescent usage with more than one file argument.
1966 Sun Feb 2 23:06:59 1997 Jim Meyering <meyering@na-net.ornl.gov>
1968 * src/join.c: Move alloca-related preprocessor code into system.h.
1969 * src/od.c: Remove alloca-related preprocessor code.
1970 * src/system.h: Add alloca-related preprocessor code.
1972 Sat Feb 1 07:21:43 1997 Jim Meyering <meyering@na-net.ornl.gov>
1974 * tests/pr-test/*: Rename files to avoid exceeding 14-character limit.
1975 * tests/pr-test/Test.pm: Reflect renamings.
1977 * tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames
1978 that exceed max-length before dying.
1980 * src/pr.c (init_parameters): For compatibility: use default
1981 separator `TAB' with full length lines. From Roland Huebner.
1983 Fri Jan 31 19:53:54 1997 Jim Meyering <meyering@na-net.ornl.gov>
1985 * src/tac.c: Rename globals buffer and buffer_size to have G_ prefix
1986 to avoid shadowing local variables.
1988 * lib/long-options.c (parse_long_options): Compare getopt_long return
1989 value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter
1990 in getopt_long call.
1992 * src/pr.c (add_line_number): Rename from `number' to avoid shadowing
1995 * src/*.c: Compare getopt_long return value against -1, not EOF.
1996 Use NULL, not `(int *) 0' as last parameter in getopt_long call.
1997 (usage): Bracket bug-reporting address with <> and append a period.
1999 Wed Jan 29 20:54:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
2001 * tests/tr-test/Test.pm: Do each test twice: get input via REDIR
2004 * tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring)
2007 * tests/pr-test/Test.pm: Remove common_option_prefix flag.
2008 (test_vector): Prepend the common option here instead.
2010 * tests/md5sum-test/Test.pm: Remove input_via_stdin flag.
2011 Do each test twice: get input via REDIR and PIPE.
2013 * tests/cut-test/Test.pm: Do each test three times.
2015 * tests/cut-test/mk-script.pl: Allow each test to be run any or all
2016 of three different ways. Program input may be specified via a file
2017 or files listed on the command line, via input redirection (if there's
2018 only one file), or via a pipe.
2020 Tue Jan 28 20:54:06 1997 Jim Meyering <meyering@na-net.ornl.gov>
2022 * tests/cut-test/mk-script.pl: Remove `t' prefix on all generated
2024 Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E).
2025 Ensure that no test file (generated or maintainer-supplied) has a
2026 name longer than 14 characters.
2028 Sun Jan 26 12:49:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
2032 * src/tail.c (parse_options): Add quotes to make messages identical.
2034 Sat Jan 25 00:12:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
2036 * src/tail.c (parse_obsolescent_option): Comment.
2037 (parse_options): Remove unnecessary goto and label.
2039 * tests/sort-test/mk-script.pl: Interpret `input arg is a hash
2040 reference' as meaning that the tested program will read no input.
2041 Most of the tests for the date program use this feature.
2042 Also for date, the generated script now reflects specification
2043 (in Test.pm) of default and per-test environment settings.
2045 * src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces.
2046 * src/fold.c: Likewise.
2047 * src/head.c: Likewise.
2048 * src/join.c: Likewise.
2049 * src/nl.c: Likewise.
2050 * src/od.c: Likewise.
2051 * src/pr.c: Likewise.
2052 * src/uniq.c: Likewise.
2054 * lib/xstrtoul.h (XSTRTOL_H): Undefine it.
2056 * lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error'
2057 only if it hasn't already been defined.
2058 (_STRTOL_ERROR): Undefine.
2060 * lib/xstrtol.c (__xstrtol): Change interpretation of
2061 VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former
2062 when any suffix is valid, the later when no suffix is allowed.
2064 Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
2066 * lib/long-options.c (parse_long_options): Reset optind to zero
2067 before just returning so that getopt internals get initialized from
2068 the probably-new parameters when/if getopt is called later.
2069 From Ulrich Drepper.
2071 Thu Jan 23 19:17:03 1997 Jim Meyering <meyering@na-net.ornl.gov>
2073 * src/tail.c (parse_obsolescent_option): Recognize and fail for
2074 more malformed obsolescent options. Makes for better diagnostics.
2076 Wed Jan 22 21:34:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
2078 * tests/Makefile.am (SUBDIRS): Add tail.
2079 * tests/tail: New directory.
2080 * configure.in (AC_OUTPUT): Add tests/tail/Makefile.
2082 * src/tail.c (parse_options): New function.
2083 (parse_obsolescent_option): New function.
2084 (main): Use the new functions instead of open-coding them.
2085 This better fixes the bug in handling obsolescent `+Nc' options.
2088 Tue Jan 21 22:49:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
2090 * src/tail.c (main): Properly handle what the POSIX spec calls
2091 the `obsolescent' usage (e.g., tail +2c). It didn't work.
2092 Reported by Karl Heuer.
2094 Sun Jan 12 22:13:27 1997 Jim Meyering <meyering@na-net.ornl.gov>
2096 * tests/tr-test/Test.pm: Rename tests so that the associated files
2097 have names that are distinct even on filesystems on which file
2098 names are case insensitive.
2099 Reported by Fred Fish.
2100 * tests/cut-test/Test.pm: Likewise.
2102 * tests/tr-test/Makefile.am: Regenerated to reflect renamed tests.
2103 * tests/cut-test/Makefile.am: Likewise.
2105 Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
2109 * lib/getopt.c (_getopt_internal): Use `_', rather than the
2110 (sometimes-)expansion `gettext'.
2112 Tue Jan 7 22:50:13 1997 Jim Meyering <meyering@na-net.ornl.gov>
2114 * lib/getopt.c: New (more POSIX compliant) version from GNU libc.
2115 [_]: Define to gettext also if ENABLE_NLS is defined.
2118 Thu Jan 2 21:17:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
2120 * src/pr.c (init_fps): Initialize lines_stored field in three places.
2121 This avoids uninitialized memory reads in close_file.
2123 Wed Jan 1 17:32:18 1997 Jim Meyering <meyering@na-net.ornl.gov>
2125 * configure.in (AC_ARG_PROGRAM): Remove explicit use.
2126 It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart.
2128 Sun Dec 29 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
2130 * src/pr.c (init_header): Plug a small memory leak by using stack
2131 rather than heap for a 15-byte temporary buffer.
2133 Sat Dec 28 00:03:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2135 * src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed
2137 (POS_AFTER_TAB): Renamed from pos_after_tab. Define in terms of
2138 TAB_WIDTH rather than duplicating the expression.
2140 Fri Dec 27 17:29:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
2142 * tests/join-test/mk-script.pl: Fix a couple of thinkos and typos.
2143 Now it works with pr's tests, too.
2145 * tests/pr-test/Makefile.am (explicit): Regenerate list of files,
2146 this time with duplicates removed.
2148 * src/pr.c (usage): Break long string literal into two separate
2149 printf statements to accomodate default maximum of 2048 characters
2150 for Irix-4.0.5. Reported by Kaveh Ghazi.
2152 * Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
2154 * tests/Makefile.am (SUBDIRS): Add pr-test.
2156 * configure.in: AC_REQUIRE version 2.12 of autoconf.
2157 AC_OUTPUT: Add tests/pr-test/Makefile.
2159 Sun Dec 22 08:11:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
2161 * acinclude.m4: Move macros to individual files in new directory, m4/.
2162 See ChangeLog entries in sh-utils for the details.
2164 * configure.in: Increment version to 1.20a.
2166 * tests/md5sum-test/Makefile.am: Use same framework as other tests.
2167 * tests/md5sum-test/Test.pm: New file.
2169 Sat Dec 21 20:32:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
2171 * tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in.
2173 * tests/Makefile.am.in: New file.
2175 * tests/sort-test/Makefile.am: Clone the Makefile.am from join-test.
2176 Replace only the definition of $x and the auto-generated lists of
2178 * tests/cut-test/Makefile.am: Likewise.
2179 * tests/tr-test/Makefile.am: Likewise.
2181 * tests/join-test/Makefile.am: Add @MAINT@-protected rule for
2182 verifying that Makefile.am is consistent with Test.pm.
2184 Fri Dec 20 00:08:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2186 * tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1)
2187 and $(in2), not $(in).
2189 * tests/join-test/mk-script.pl: New option: --list.
2190 Generate lists of files used/generated.
2192 Thu Dec 19 23:28:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
2194 * tests/join-test/mk-script.pl: Rewrite to be more general -- so
2195 it can be used for join, cut, sort, tr, and soon, pr test suites.
2196 * tests/tr-test/mk-script.pl: Symlink through CVS repo to join's
2198 * tests/sort-test/mk-script.pl: Likewise.
2199 * tests/cut-test/mk-script.pl: Likewise.
2201 * tests/tr-test/Test.pm: Adapted for new mk-script.pl.
2202 * tests/join-test/Test.pm: Likewise.
2204 Tue Dec 17 16:48:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
2206 * tests/join-test/Makefile.am (.pl): Make generated file read-only so
2207 I don't accidentally modify it instead of the one with the .pl suffix.
2209 * acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than
2210 now-obsolete AC_C_CROSS.
2211 (jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one
2212 since there's nothing GNU-specific about the replacement. Contrast
2213 with gnu_ prefix added to strftime.
2214 (jm_FUNC_MEMCMP): New macro.
2215 * configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP.
2216 * acconfig.h: Add memcmp.
2217 * README: Remove warning about memcmp. The new macro handles it.
2219 Mon Dec 16 23:03:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
2221 * tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment.
2223 (AUTOMAKE_OPTIONS): Likewise.
2225 Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2227 * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
2228 name for cross compiling.
2229 Remove definitions of gettext-related macros. The gettext
2230 installation procedure installs corresponding .m4 files so that
2231 aclocal will use them.
2233 1996-12-12 Paul Eggert <eggert@twinsun.com>
2235 * system.h (ISDIGIT): Replace with smaller, faster edition
2236 that yields nonzero only on ASCII digits.
2237 (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
2240 * tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of
2241 ISDIGIT to test for characters in CC_DIGIT class.
2243 * sort.c (digits): Remove; subsumed by new ISDIGIT.
2244 (inittables): Remove initialization of `digits'.
2245 (fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
2246 (fraccompare, numcompare): Avoid casts to unsigned char that are no
2249 * csplit.c (get_format_width, get_format_prec): Avoid
2250 unnecessary comparison of digit to '\0'.
2252 Thu Dec 12 23:42:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
2254 * src/sort.c (usage): Clarify description of -u option.
2257 Wed Dec 11 19:32:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2261 Tue Dec 10 00:15:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2263 The file name, `build-script.pl' is longer than 14 characters.
2265 * tests/cut-test/mk-script.pl: Rename from build-script.pl.
2266 * tests/cut-test/Makefile.am: Reflect renaming.
2267 * tests/tr-test/mk-script.pl: Rename from build-script.pl.
2268 * tests/tr-test/Makefile.am: Reflect renaming.
2269 * tests/sort-test/mk-script.pl: Rename from build-script.pl.
2270 * tests/sort-test/Makefile.am: Reflect renaming.
2271 * tests/join-test/mk-script.pl: Rename from build-script.pl.
2272 * tests/join-test/Makefile.am: Reflect renaming.
2273 Reported by Karl Heuer.
2275 * configure.in (VERSION): Bump to 1.19r.
2276 (AC_ISC_POSIX): Remove kludgy macro.
2277 Use this test instead:
2278 (LIBS): Add -lcposix if it contains strerror.
2279 Patch from Karl Heuer.
2281 Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
2283 =========== Update for automake-1.1k.
2284 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
2285 * configure.in (AM_CONFIG_HEADER): Use it.
2286 (AC_OUTPUT): Remove stamp-h timestamping statement.
2287 Now, AM_CONFIG_HEADER does it automatically.
2288 * lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
2289 new automake requirement.
2290 Rename tu_* variables to libtu_a_*.
2292 Wed Dec 4 21:03:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2294 * src/pr.c: Apply big patch from Roland Huebner.
2296 * src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
2297 [:upper:] to [:upper:] and [:lower:] to [:lower:].
2298 (main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
2299 the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
2301 (class_ok): Update table to reflect that tr now allows these
2302 identity mappings. Suggestion from Risto Kankkunen.
2304 Thu Nov 28 00:31:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2306 * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
2307 for gettext-0.10.25.
2309 Tue Nov 26 23:05:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
2311 * src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
2312 to avoid new warning from gcc.
2314 Sun Nov 24 21:02:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
2316 * tests/sort-test/Makefile.am (t): Add names of those 5 tests.
2318 * tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.
2320 * src/sort.c (set_ordering): Revert 1994-05-04 change to this function
2321 so that blanks are not unconditionally ignored when computing start
2322 and end positions for numeric keys with explicit character offsets.
2323 Reported by Markus Demleitner.
2325 Sat Nov 23 16:07:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
2327 * cat.c (usage): Alphabetize option descriptions the way sort -f would.
2328 * fmt.c (usage): Likewise.
2329 * join.c (usage): Likewise.
2330 * md5sum.c (usage): Likewise.
2331 * od.c (usage): Likewise.
2332 * pr.c (usage): Likewise.
2333 * sort.c (usage): Likewise.
2334 * split.c (usage): Likewise.
2335 * wc.c (usage): Likewise.
2338 Fri Nov 22 20:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
2340 * src/csplit.c (process_regexp): Update CURRENT_LINE only if
2341 the new value would be larger. This avoids the infinite loop
2342 otherwise provoked by situations like this:
2343 printf "\na\n" | csplit - '/a/-1' '{*}'
2346 Tue Nov 19 23:16:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
2348 * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
2351 Sat Nov 2 08:50:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
2353 * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
2354 Otherwise, the generated info files have names longer than
2355 the 14-byte max of some old systems.
2356 Reported by Karl Heuer.
2358 Fri Nov 1 21:33:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
2360 * lib/strtol.c: Update from GNU libc.
2362 * tests/sort-test/Test.pm: Add a test to exercize this fix.
2364 * src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
2365 (checkfp): Fix off-by-one error that resulted in writing one byte
2366 beyond the end of a malloc'd buffer. It caused `sort -c' to segfault
2367 on Linux systems having a relatively recent libc. Before, running
2368 the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
2369 would provoke the memory overrun (though not necessarily the failure).
2371 Reported by Risto Kankkunen.
2373 Thu Oct 31 17:48:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
2375 * src/sort.c (key_init): New function.
2376 (main): Use key_init in the two places where it was open-coded.
2377 This fixes a UMR of the general_numeric field.
2379 * src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
2380 This avoids a spurious UMR report from purify.
2381 (prjoin): Add an assertion.
2382 (add_field): Update assertion.
2384 * src/tr.c (es_free): New function.
2385 (parse_str): Use it to plug a small memory leak.
2387 Wed Oct 23 22:02:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
2389 * lib/md5.c: Update from GNU libc.
2390 * lib/md5.h: Update from GNU libc.
2392 Mon Oct 21 16:48:12 1996 Jim Meyering <meyering@na-net.ornl.gov>
2394 * src/tr.c (validate): Remove TAB from diagnostic, for consistency.
2396 Sun Oct 20 13:44:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
2398 * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
2400 * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
2401 (EXTRA_DIST): Remove.
2403 * configure.in: Remove README_ALPHA related code. Automake takes
2404 care of it automatically now when in gnits mode.
2406 * lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
2407 doing arithmetic with it.
2409 Sat Oct 19 23:13:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
2411 * lib/md5.c: Update from GNU libc.
2412 * lib/md5.h: Update from GNU libc.
2414 Fri Oct 18 00:08:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
2416 * configure.in (AC_OUTPUT): Add tests/join-test/Makefile.
2418 * tests/Makefile.am (SUBDIRS): Add join-test.
2420 Tue Oct 15 23:25:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
2422 * src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
2424 (main): Write separate loops to initialize mapping for lower->upper
2425 and upper->lower conversion.
2426 Reported by Arne Henrik Juul.
2428 Sun Oct 13 12:52:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
2430 * lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
2431 Before, e.g., `split -b 1M' would be silently accepted and treated
2432 like `split -b 1'. Reported by Franc,ois.
2434 * src/split.c (usage): Remove parameter, REASON.
2435 (main): Update callers to use combination of error (0, 0, ... and
2436 usage (EXIT_FAILURE).
2437 (main): When a string operand cannot be converted to a number of
2438 bytes or lines, include that string in the diagnostic.
2440 Sat Oct 12 00:05:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
2442 * configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.
2444 * lib/Makefile.am (EXTRA_DIST): Remove.
2446 Thu Oct 10 23:41:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2448 * lib/md5.c (md5_stream): Apply fix from Ralph Loader
2449 <loader@maths.ox.ac.uk> via Ulrich Drepper.
2451 Wed Oct 9 07:26:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
2453 * lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).
2455 Tue Oct 8 21:32:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
2457 * lib/error.c: Include error.h to align with libit --
2458 under protest, François :-).
2460 Sun Oct 6 08:02:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
2462 * acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
2463 AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
2464 They're included in automake-1.1f.
2466 * configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
2469 Sat Oct 5 12:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
2471 * lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
2474 Fri Oct 4 07:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
2476 * configure.in (GNU_PACKAGE): New variable.
2477 (PACKAGE_VERSION): Remove it.
2479 * acconfig.h (GNU_PACKAGE): New variable.
2480 (PACKAGE_VERSION): Remove now-unused variable.
2482 * lib/long-options.c (parse_long_options): Separate package name
2483 and version number to accomodate new --version output requirement.
2484 * lib/long-options.h: Update prototype.
2486 Thu Oct 3 23:27:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
2488 * src/md5sum.c (main): Remove dead code that used to print --version
2491 Tue Oct 1 06:54:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
2493 * configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
2494 * src/Makefile.am (sort_LDADD): Use any library (-lm) that
2495 gets substituted for @POW_LIBM@.
2497 * tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.
2499 Mon Sep 30 23:35:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2501 * tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.
2503 * acinclude.m4: Update definitions from gettext-0.24.
2505 Sun Sep 29 20:04:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
2507 * tests/sort-test/build-script.pl: Die if close fails.
2508 * tests/tr-test/build-script.pl: Likewise.
2510 * configure.in (AC_OUTPUT): Add tests/cut-test/Makefile.
2511 * tests/Makefile.am (SUBDIRS): Add cut-test.
2512 * tests/cut-test: New directory.
2514 Fri Sep 27 22:22:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
2516 * configure.in (ALL_LINGUAS): Add spanish (es).
2518 Thu Sep 26 21:02:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
2520 * src/md5sum.c (usage): Remove references in --help output to
2521 the now-deprecated --string option. Support for it will be
2522 removed soon. Using this option can provoke a memory access
2523 violation on some systems because of (unavoidable in an efficient
2524 implementation) alignment assumptions made by functions in md5.c.
2525 md5sum.c could leave the option in and accomodate the alignment
2526 restriction, but this option was intended solely for testing, and
2527 the tests are now all file-oriented, so it's not necessary.
2529 * tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.
2531 Wed Sep 25 21:43:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
2533 * tests/sort-test/Makefile.am (t): Factor out .in suffix.
2534 Include new test: t16a.
2535 * tests/tr-test/Makefile.am (t): Likewise.
2537 * src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc.
2539 Mon Sep 23 10:00:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2541 * tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS).
2543 Sun Sep 22 09:24:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
2545 * src/sort.c (keycompare): Declare translate to be unsigned char *.
2546 Otherwise, sign extension caused misordering when using e.g. -f.
2547 Reported by Erick Branderhorst.
2548 * tests/sort-test/Test.pm: Add Erick's test for that fix.
2550 * tests/Makefile.am (SUBDIRS): Add md5sum-test.
2552 Sat Sep 21 13:34:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
2554 * src/Makefile.am (check): Remove tests for md5sum.
2555 * tests/md5sum-test: New directory. Put them here instead.
2556 * configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile.
2558 Thu Sep 19 08:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
2560 * tests/: Rename from checks.
2561 * Makefile.am (SUBDIRS): Change `checks' to `tests'.
2562 * configure.in (AC_OUTPUT): Likewise.
2564 * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
2565 AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
2567 Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2569 * Makefile.am (EXTRA_DIST): Remove acinclude.m4.
2571 Thu Sep 12 17:05:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2573 * lib/Makefile.am (EXTRA_DIST): Add getline.c.
2574 (tu_SOURCES): Remove getline.c
2577 Sun Sep 8 13:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2579 * checks/sort-test/build-script.pl: Prefix $in with \$srcdir/
2580 so make check works with VPATH build. From Uli Drepper.
2582 Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
2584 * src/system.h: Add comments justifying IS* versions of ctype.h macros.
2586 * src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct.
2587 (get_line): Use ISSPACE instead of isspace. From Bruno Haible.
2589 Mon Sep 2 10:34:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2591 * src/*.c (usage): Tell where to report bugs.
2593 Sun Aug 25 22:50:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
2595 * checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
2596 ($x-tests): Guard dependencies with @MAINT@.
2597 * checks/tr-test/Makefile.am: Likewise.
2599 Sat Aug 24 14:25:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
2601 * src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.
2603 Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
2605 * configure.in (ALL_LINGUAS): Add polish (pl).
2607 Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
2609 * configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
2610 * checks/Makefile.am (SUBDIRS): Add sort-test.
2612 Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
2614 * Makefile.am (EXTRA_DIST): Add acinclude.m4.
2616 Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2618 * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
2619 Automake includes them automatically.
2621 * configure.in (AM_INIT_AUTOMAKE): Use it.
2622 (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
2623 (AC_PROG_MAKE_SET): Likewise.
2625 Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov>
2627 * configure.in: Rename a few macros for automake-1.1c.
2628 (AC_REPLACE_GNU_GETOPT): Remove.
2629 (AC_PATH_PROG): Find perl -- needed only for checks if you
2630 change or remove things with e.g. make maintainerclean.
2633 * lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX
2634 adds .o files to @LIBOBJ@.
2635 (tu_SOURCES): Add getopt.c and getopt1.c.
2636 (EXTRA_DIST): Remove getopt.c and getopt1.c.
2638 * acinclude.m4: New file -- derived from aclocal.m4.
2639 * aclocal.m4: This file is now generated by the aclocal program
2640 (which comes with the automake package.)
2642 Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2644 * checks/: New directory.
2645 * checks/Makefile.am: New file.
2646 * configure.in (AC_OUTPUT): Add new directories: checks,
2648 * Makefile.am (SUBDIRS): Likewise.
2650 Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
2652 * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
2653 redefinition warnings on solaris.
2654 (textdomain) [!ENABLE_NLS]: Likewise.
2656 Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov>
2658 * src/unexpand.c (unexpand): Move EOF check to follow code that
2659 processes and generates output for pending spaces. Before
2660 `printf ' ' |unexpand -t 1,2' generated no output.
2662 * src/md5sum.c (md5_check): Remove parameter, BINARY.
2663 Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
2664 from the input stream rather than the one from the command line.
2665 (main): Fail with a diagnostic if --binary or --text is specified
2666 when verifying checksums.
2667 Reported by Eli Zaretskii <eliz@is.elta.co.il>.
2669 Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2671 * configure.in: Add check for error_at_line so systems with
2672 GNU libc don't compile and link with distributed error.c.
2673 * lib/Makefile.am (tu_SOURCES): Remove error.c.
2674 (EXTRA_DIST): Add error.c.
2676 * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
2677 Add related check for the getdelim function.
2678 From Ulrich Drepper -- as done in gettext.
2680 Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2682 * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
2683 separate PACKAGE and VERSION.
2685 * aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from
2686 macros from Bruno Haible and from Cygnus.
2687 * configure.in (AM_SANITY_CHECK_CC): Use it.
2689 Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
2691 * install-sh: Get version with MIT copyright.
2693 Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
2695 * aclocal.m4 (fp_C_PROTOTYPES): Improved version from
2697 Update all other macros to reference $fp_cv_prog_cc_stdc, rather
2698 than $ac_cv_prog_cc_stdc.
2700 * src/od.c (OFF_T_MAX): Remove definition.
2701 (main): Compare against LONG_MAX rather than OFF_T_MAX.
2703 Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
2705 * Many files: Update FSF address.
2707 Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2709 * src/unexpand.c (unexpand): Fix bug that contributed to endless loop
2710 when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not
2711 tab_index in inner flush_pend: while loop. From Keith Owens
2712 <kaos@audio.apana.org.au>.
2714 * src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
2715 [!INT_MAX]: Define it.
2716 (main): Append INT_MAX to command-line-specified tab list to
2717 ensure termination in unexpand's inner loop.
2718 Derived from a patch from Keith Owens.
2720 Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2724 * configure.in (VERSION): Bump to 1.19.
2726 Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
2728 * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
2729 so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
2730 those options on that system, sys/stat.h gets compile errors.
2731 With help from Marcus Daniels.
2733 * getopt.c: Update from gettext-0.10.23.
2734 * getopt1.c: Likewise.
2735 * getopt.h: Likewise.
2737 Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2739 * src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
2740 so the left operand of the << isn't signed.
2741 From Kjetil Torgrim Homme.
2743 * po/Makefile.in.in (install-data): Don't install NLS files when
2744 they're not requested. From Ulrich Drepper. Reported by
2745 Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
2747 Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
2749 * po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
2750 * ABOUT-NLS: Likewise.
2752 * aclocal.m4: Likewise.
2754 Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
2756 * src/uniq.c (usage): Remove space before newline in usage message.
2758 * src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
2759 [NEWLINE_REPLACEMENT_STRING*]: Remove macros.
2760 (main): Output a leading backslash for a line describing a file
2761 whose name contains a newline. Then translate each NEWLINE byte
2762 in the file name to the string, "\\n", and each backslash to "\\\\".
2763 File names that don't contain NEWLINE aren't translated.
2764 (split_3): Rewrite to handle file names with embedded newlines.
2765 Miles Bader and Jim Blandy suggested this new encoding scheme.
2767 * src/md5sum.c (md5_file): Replace obsolete comment with a description
2769 (md5_check): Don't use "s"-adding trick to form the plural of
2770 `checksum.' That doesn't work well with translation.
2771 Suggestions from Ulrich Drepper.
2772 (split_3): Add missing semicolon so it compiles. From Jim Blandy.
2774 Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
2776 * src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
2777 fact that leading blanks may be stripped.
2779 Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
2781 * configure.in (ALL_LINGUAS): Add dutch (nl).
2783 Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
2785 * src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
2786 (split_3): Translate NL bytes not to NUL, but to
2787 NEWLINE_REPLACEMENT_STRING.
2788 Suggested by Ulrich Drepper.
2789 (main): Translate back to NL-containing filename.
2791 Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
2793 * src/md5sum.c (split_3): Take an additional parameter, S_LEN.
2795 Map translated NEWLINE-containing filename back into the original
2796 NEWLINE-containing name.
2797 (md5_check): Translate NEWLINE bytes to NUL bytes in filename.
2799 Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
2801 * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
2802 appears in the output of --version. Reported by RMS.
2804 Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
2806 * src/Makefile.am (LDADD): Remove sort-specific hack to link
2808 * aclocal.m4 (AM_FUNC_STRTOD): New macro.
2809 * configure.in (AM_FUNC_STRTOD): Use it.
2810 (AC_REPLACE_FUNCS): Remove strtod.
2811 Suggested by Tom Tromey.
2813 * po/Makefile.in.in (install-data): Add `else true;' to avoid
2814 letting failing if-condition cause make failure.
2815 From Fred Fish (fnf@ninemoons.com).
2817 Tue Jun 25 21:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2821 Tue Jun 18 20:43:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
2823 * aclocal.m4: Update from gettext-0.10.20.
2824 * ABOUT-NLS: Likewise.
2827 Thu Jun 13 22:31:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
2829 * configure.in (VERSION): Bump to 1.18a.
2831 * po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
2832 Depend on POTFILES only when using maintainer mode.
2834 * intl/*: Update from gettext-0.10.18.
2836 Tue Jun 11 23:32:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
2840 * po/Makefile.in.in: Update from gettext-0.10.17.
2842 * ABOUT-NLS: Likewise.
2844 Mon Jun 10 18:22:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
2846 * Makefile.am (cvs-dist): Use -c option in cvs tag command.
2848 Fri Jun 7 22:06:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2850 * configure.in (VERSION): Set to 1.18.
2852 * src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
2853 the strtod supplied with this package. Otherwise, linking failed on
2854 Solaris-2.4 systems. Reported by Wayne Stewart <wstewa@atl.com>.
2856 Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
2858 * po/Makefile.in.in: Update from gettext-0.10.16.
2860 * ABOUT-NLS: Likewise.
2861 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
2862 gettext-related ones.
2863 Update from gettext-0.10.16.
2865 Fri May 31 22:04:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
2869 * Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
2872 Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2876 * tail.c (main): Interpret the old-style +VALUE and -VALUE options
2877 like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
2878 suffix multipliers. This makes the code consistent with --help
2879 output. Reported by Karl Heuer.
2881 * sort.c (limfield): #ifdef-out a block of code that makes
2882 GNU sort incompatible with Unix sort when a key-end spec refers
2883 to the N'th character in a field that has fewer than N characters.
2884 The POSIX spec doesn't appear to specify behavior for this case.
2887 * po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
2888 longer than 14 characters.
2889 (mostlyclean): Likewise.
2892 * po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
2893 when using maintainer mode. Reported by Karl Heuer.
2895 * po/Makefile.in.in (.po.mo): Reenable dependency and rule.
2896 It is required when using native NLS, e.g. on Solaris.
2897 From Marcus Daniels.
2899 * od.c (decode_one_format): Use %lu (not %d) printf format
2900 corresponding to unsigned long, SIZE.
2904 * intl/Makefile.in (installcheck): New target.
2905 * po/Makefile.in.in (installcheck): New target.
2907 * od.c (decode_one_format): Take another parameter.
2908 Give a specific diagnostic for invalid format spec here rather
2909 than an overly general one from caller's caller.
2910 (decode_format_string): Update caller.
2911 (main): Don't give diagnostic here when decode_format_string fails.
2912 Remove assertions that could fail on some Crays because they don't
2913 have a two-byte type.
2914 Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
2916 Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
2918 * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
2919 less portable fileno (stdin) and fileno (stdout).
2920 * sort.c (main): Use STDIN_FILENO instead of less portable
2923 Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
2925 * Makefile.am (distcheck): Remove target and rule -- automake-0.33
2926 adds it automatically.
2928 Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov)
2930 * configure.in (LINGUAS): Add ko.
2931 * Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
2933 Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
2935 * Makefile.am (distcheck): New target. From Gord Matzigkeit.
2937 Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
2939 * po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise
2940 they won't be built and install could fail. From Ulrich Drepper.
2941 (.po.mo): Disable dependency and rule when not in maintainer mode.
2943 * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
2944 on whether we're using GNU gettext. From Ulrich Drepper.
2946 Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
2948 * intl/Makefile.in (distdir): Renamed from dist. For compatibility
2950 * po/Makefile.in.in (distdir): Likewise.
2952 * po/Makefile.in.in (all-yes): Depend on GMOFILES.
2953 Depend on CATALOGS and GMOFILES files only in maintainer mode.
2955 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
2957 * configure.in: Require autoconf-2.10.
2959 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
2960 * configure.in (jm_MAINTAINER_MODE): Use it.
2962 Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov)
2964 * configure.in (LINGUAS): Add de.
2965 * po/de.po: New file.
2967 * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
2968 * regex.c [IN_CTYPE_DOMAIN]: Likewise.
2969 * system.h [IN_CTYPE_DOMAIN]: Likewise.
2971 Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
2973 * fmt.c (copy_rest): Don't copy past end of prefix. Output
2974 trailing spaces if the prefix had any. Before, fmt would
2975 improperly output NUL bytes. The command
2976 perl -e 'print "| S";' |fmt -p' | '|tr '\0' @
2977 output `|@S'. Reported by François Pinard.
2979 * sort.c (main): Give a better diagnostic for `sort -0'.
2980 Reported by Karl Berry.
2982 * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
2983 Otherwise, some systems lose because the value AC_C_INLINE choses
2984 with plain `cc' is different from that chosen when using the ANSI-mode
2985 C compiler. From Kaveh Ghazi.
2987 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
2989 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
2990 * configure.in: Use it.
2991 * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
2992 (EXTRA_DIST): Add getopt.c and getopt1.c
2994 * src/*.c, src/*.h: Update Copyright years to include 1996.
2996 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
2998 * getline.c: New version from gettext-0.10.12.
2999 * getline.h: Likewise.
3000 * configure.in (AC_CHECK_FUNCS): Add getdelim.
3001 Suggested by Ulrich Drepper.
3003 * md5sum.c (md5_check): Remove spurious newline at end of error
3006 * od.c (decode_one_format): Use printf's L modifier for long doubles,
3007 not `l'. From Eric Backus.
3009 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
3011 * od.c: Include <values.h>.
3012 [!BITSPERBYTE]: Define.
3013 [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
3014 * configure.in (AC_CHECK_HEADERS): Add values.h.
3016 Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov)
3018 * Makefile.am (cvs-dist): New rule. Based on the one from
3019 Tom Tromey's automake.
3021 Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
3023 * tail.c (main): Make code clearer: use new variable `n_files' in
3024 place of `argc - optind'. Use `file' instead of `argv + optind'.
3026 Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
3028 * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
3031 * memcasecmp.c: Unprotoize.
3035 * join.c (decode_field_spec): Rename local variable `valid'
3036 to invalid (and reverse sense) to avoid conflict with the
3037 macro definition in /usr/include/locale.h on SunOS 4.1.3.
3039 Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
3041 * uniq.c: Add new option --ignore-case (-i).
3042 Include memcasecmp.h.
3043 (different): Compare with memcasecmp if ignoring case.
3046 * join.c (memcasecmp): Remove static definition of function.
3047 Include memcasecmp.h instead.
3049 * memcasecmp.c: New file.
3050 * memcasecmp.h: New file.
3051 * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
3052 (noinst_HEADERS): Add memcasecmp.h.
3054 Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov)
3056 * tr.c: The following commands all failed unnecessarily.
3057 tr -cs '[:upper:]' '[X*]'
3058 tr -dcs '[:lower:]' n-rs-z
3059 tr -ds '[:xdigit:]' [:alnum:]'
3060 tr -dcs '[:alnum:]' [:digit:]'
3062 Reported by Ross Ridge (ross@worf.mks.com).
3063 (validate): Add missing conjunct (translating) in test for
3064 `translating and complementing character classes' error. Before,
3065 valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
3066 (homogeneous_spec_list): New function.
3067 (validate): Use it to relax the old (overly restrictive) restriction
3068 that prohibited use of complemented character classes when translating.
3069 Now, that is allowed as long as the translation maps many to one.
3070 (get_spec_stats): Rename and redefine global has_char_class from
3073 Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
3075 * aclocal.m4: Update NLS macros from gettext-0.10.11.
3077 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
3078 when srcdir != builddir. From Kaveh Ghazi.
3080 Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov)
3082 * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
3083 to be POSIX compliant. From Stephen Gildea <gildea@x.org>.
3085 Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
3087 * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
3088 * od.c (skip, main): Likewise.
3089 * tr.c (main): Likewise.
3091 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
3092 join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
3093 tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
3094 EXIT_FAILURE, rather than 0 or 1.
3096 Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
3098 * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
3099 is defined to zero. Suggested by Paul Eggert.
3101 * sort.c [SORT_FAILURE]: New macro.
3102 Be careful to exit with 1 only when -c is used and the
3103 input is not properly sorted. In all other cases, use
3104 SORT_FAILURE as required by POSIX.
3105 (main): Change some `error (1, ...' to use SORT_FAILURE.
3106 Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
3107 Replace all uses of `2' (as exit code) with SORT_FAILURE.
3109 Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov)
3111 * csplit.c: Include assert.h, but disable assertions.
3112 (process_line_count): Replace if-abort with a slightly relaxed
3113 assertion. Before, `echo |csplit - 1 1' would abort.
3114 Reported by Samuli.Karkkainen@hut.fi.
3115 (parse_patterns): Disallow uses like `csplit FILE 0' with zero
3116 line number, `csplit FILE 2 1' with decreasing line numbers, and
3117 warn about uses like `csplit FILE 3 3' that have equal line numbers.
3119 * sort.c (main): Declare to be of type int, not void.
3120 From Peter Seebach <seebs@taniemarie.solon.com>.
3121 * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
3122 nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
3123 wc.c (main): Likewise.
3125 Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
3127 * configure.in (PACKAGE_VERSION): New macro.
3128 * acconfig.h (PACKAGE_VERSION): Add it.
3129 * src/Makefile.am: Remove rules for generating version.c.
3130 Remove references to version.o, version.h, and stamp-v.
3131 * version.c: Remove file.
3132 * version.h: Remove file.
3133 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
3134 head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
3135 sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
3137 (main): Use PACKAGE_VERSION instead of version_string.
3139 Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
3141 * sort.c (write_bytes): Renamed from xfwrite.
3142 Remove SIZE parameter. It was always 1. Update all callers.
3143 Rename NELEM parameter to N_BYTES and change its type to size_t.
3145 Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
3147 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
3148 fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
3149 split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
3150 Initialize for internationalized message support: call setlocale,
3151 bindtextdomain, and textdomain.
3152 * system.h: Add definitions and includes for NLS.
3153 * Makefile.am (SUBDIRS): Add intl and po.
3154 * src/Makefile.am (datadir): Define.
3155 (localedir): Define.
3156 (DEFS): Add LOCALEDIR definition.
3157 (LDADD): Add @INTLLIBS@.
3158 * aclocal.m4: Add NLS-related macro definitions from
3159 gettext distribution.
3160 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
3161 HAVE_STPCPY): New macros.
3162 Add PACKAGE and VERSION.
3163 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
3164 (VERSION): Likewise.
3165 (ALL_LINGUAS): Define.
3166 (AC_CHECK_HEADERS): Add float.h.
3167 (ud_GNU_GETTEXT): Use it.
3169 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
3171 From François Pinard.
3173 * tr.c (star_digits_closebracket): Declare formal param, IDX,
3174 and local I to be of type size_t (rather than int) to avoid
3175 warnings from gcc -Wall.
3177 Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
3179 * src/Makefile.am: Adapt for automake-0.30.
3180 (noinst_HEADERS): Rename from HEADERS.
3181 (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
3182 to DEFS automatically.
3183 * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
3185 Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
3187 * join.c (xfields) [without -t]: Ignore leading blanks.
3188 From David Dyck (dcd@tc.fluke.COM).
3190 Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
3192 * join.c [TOLOWER]: Define.
3193 (usage): Briefly describe new --ignore-case (-i) option.
3194 (memcasecmp): New function.
3195 (main): Set IGNORE_CASE for -i.
3196 (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
3197 Suggestion and an initial patch from Alberto Accomazzi
3198 <alberto@cfa0.harvard.edu>.
3200 Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
3202 * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
3203 (usage): Describe it.
3204 (main): Set eolchar to 0 for -z.
3205 From Mark W. Eichin <eichin@cygnus.com>.
3207 Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
3209 * join.c (main): Mark two strings for translation.
3210 * md5sum.c (md5_check): Mark a string for translation.
3211 From François Pinard.
3213 Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
3215 Update for automake-0.29.
3216 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
3217 * src/Makefile.am: Likewise.
3218 * lib/Makefile.am: Likewise.
3219 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
3220 * man/Makefile.am (man_MANS): Renamed from MANS.
3222 * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
3224 From Derek Clegg (dclegg@next.com).
3226 Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
3230 Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
3232 * tail.c (dump_remainder): Flush stdout when tailing-forever on
3233 multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
3235 Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
3237 * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
3238 not just -Xc. From François Pinard.
3240 * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
3241 distributed automatically. From Tom Tromey.
3243 Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
3245 * nl.c: Include rx.h after limit.h (not before) to avoid warning
3246 about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
3247 its definition. From Kaveh Ghazi.
3249 * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
3250 works again. Reported by François Pinard and Kaveh Ghazi.
3252 * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
3253 [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
3254 (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
3255 mismatch errors from e.g. SunOS's /bin/cc.
3256 Reported by Kaveh Ghazi.
3258 Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
3260 * configure.in (VERSION): Set variable directly rather than from
3262 * Makefile.am (DIST_OTHER): Remove VERSION.
3263 * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
3264 (stamp-v): New target; depend on Makefile.
3265 (DISTCLEANFILES): Add stamp-v, version.c.
3267 Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
3269 * sort.c (keycompare): Rewrite cases handling ignored characters
3270 so that they really are ignored. Reported by Carl Johnson
3271 <carlj@cjlinux.home.org>.
3273 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3275 * configure.in: Touch stamp-h only if config.h is remade.
3277 * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
3278 syntax_parens field.
3280 Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
3282 Use automake to generate Makefile.in files.
3283 * Makefile.am: New file.
3284 * doc/Makefile.am: New file.
3285 * lib/Makefile.am: New file.
3286 * man/Makefile.am: New file.
3287 * src/Makefile.am: New file.
3289 Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
3291 * fmt.c (main): Use xstrtol instead of atoi.
3293 * fold.c (main): Use xstrtol instead of atoi.
3294 (fold_file): Make a couple locals `int', not size_t, and cast
3295 fwrite's third parameter to size_t.
3297 * nl.c (main): Use xstrtol instead of atoi.
3298 Rename misleading --first-page=N option to --starting-line-number=N.
3301 * uniq.c (main): Use xstrtol instead of atoi.
3303 Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
3305 * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
3307 Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
3309 * aclocal.m4 (ud_WITH_REGEX): New macro.
3310 * configure.in: Use it.
3311 * rx.c, rx.h: New files.
3312 * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
3313 (SOURCES, DISTFILES): Add rx.c, rx.h.
3314 * acconfig.h (WITH_REGEX): Add it.
3315 * csplit.c [!WITH_REGEX]: Include rx.h.
3316 * nl.c [!WITH_REGEX]: Likewise.
3317 * tac.c [!WITH_REGEX]: Likewise.
3318 From Ulrich Drepper and François Pinard.
3320 Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
3322 * sort.c (main): Diagnose invalid arguments to -k, then fail.
3324 * sort.c (numcompare): Properly handle all cases in which signs differ.
3327 * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
3328 Append `/man1'. Reported by Karl Heuer.
3330 * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
3332 * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
3334 Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
3336 * lib/Makefile.in (default): New target.
3338 * sort.c (numcompare): Properly order `-' and valid integers;
3339 treat `-' as if it were zero. Reported by Ross Alexander
3340 <r.alexander@auckland.ac.nz>.
3342 * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
3343 (.PHONY): Depend on default.
3345 Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
3347 * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
3348 (jm_AUTODEPS): Likewise.
3349 (jm_WITH_GNU_MAKE): Likewise.
3350 * configure.in (jm_AUTODEPS): Remove.
3352 * sort.c (begfield): Replace loop with equivalent if-else.
3353 (limfield): Fix bug that made field specs like -k1.5 return a
3354 pointer into LINE beyond the first field.
3355 Don't try to trim trailing blanks here; it's not
3356 possible because we don't know where the field begins.
3357 Replace loop with equivalent if-else.
3358 (trim_trailing_blanks): New function.
3359 (findlines): Call it.
3360 (keycompare): Likewise.
3361 (main): Don't decrement T2 corresponding to `x' in field
3362 specs like -ku.v,w.x.
3364 Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
3366 * csplit.c [!UINT_MAX]: Define.
3369 (string_to_number): Remove function.
3370 (check_for_offset): Use xstrtoul instead of string_to_number.
3371 (parse_repeat_count): Likewise.
3372 (parse_patterns): Likewise.
3375 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
3377 * Makefile.in (all et. al.): If make was invoked with -k and a
3378 sub-make fails, fail after the loop rather than exiting right away.
3379 Otherwise, make's -k option could be ineffective.
3381 Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
3383 * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
3385 Update for autoconf-2.5:
3386 * src/Makefile.in (libdir): Set to @libdir@.
3387 (bindir): Set to @bindir@.
3388 * doc/Makefile.in (infodir): Set to @infodir@.
3389 * man/Makefile.in (exec_prefix): Remove it.
3390 (mandir): Set to @mandir@.
3391 (bindir): Remove it.
3393 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
3395 * Makefile.in (default): New default target. Depend on `all' to
3396 work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
3399 Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
3401 * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
3403 * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
3404 * src/Makefile.in (C_MKDEP): Rename from MKDEP.
3405 * lib/Makefile.in (C_MKDEP): Likewise.
3406 * mkdep-Makefile (C_MKDEP): Likewise.
3409 * csplit.c [__P]: Don't define it here.
3410 * pr.c [__P]: Don't define it here.
3411 * fmt.c [__P]: Don't define it here.
3412 * system.h [__P]: Define it here.
3414 * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
3415 Revamp, with suggestions from Franc,ois Pinard.
3416 (jm_WITH_GNU_MAKE): New macro.
3417 (jm_PROG_MKDEP): New macro.
3418 * configure.in (jm_PROG_MKDEP): Use it.
3419 * src/Makefile.in (MKDEP): Set it.
3420 * lib/Makefile.in (MKDEP): Likewise.
3421 * mkdep-Makefile: Use MKDEP, not DEP_CC.
3422 (DEP_CFLAGS): Remove it.
3424 Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
3426 * sort.c: Add support for sorting numbers in scientific notation.
3428 (struct keyfield): Add field: general_numeric.
3429 (usage): Describe -g option.
3430 (general_numcompare): New function.
3431 (keycompare): Use new comparison function when general_numeric
3433 (set_ordering): Honor `g' flag.
3434 (main): Initialize and use new field.
3435 From Marcus Daniels <marcus@sysc.pdx.edu>.
3437 * configure.in (AC_REPLACE_FUNCS): Add strtod.
3438 * lib/Makefile.in (SOURCES): Add xstrtod.c.
3439 (OBJECTS): Add xstrtod.o.
3440 (DISTFILES): Add xstrtod.h.
3442 * csplit.c (cleanup): Don't exit.
3443 (interrupt_handler): Rewrite to reset default signal handler
3444 then repost caught signal.
3445 (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
3446 process_line_count, process_regexp, create_output_file,
3447 close_output_file): Call cleanup_fatal, not cleanup.
3448 Add const attribute to lots of parameters.
3449 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
3452 * tac.c: (cleanup): Don't exit.
3453 (cleanup_fatal): New function. Call cleanup, then exit.
3454 (sighandler): New function.
3455 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
3457 (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
3459 Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
3461 * od.c (skip): Cast fseek's offset argument to `long'.
3462 Erik Bennett <bennett@cvo.oneworld.com> reported that this is
3463 necessary on BSDI systems. And if offset doesn't fit in a long,
3464 then try using lseek instead.
3466 * sort.c (xmalloc): Declare static.
3467 (xrealloc): Likewise.
3469 * tac.c (cleanup): Add signal number parameter.
3472 * cat.c (main): Don't die when dev/ino of input and output are
3473 the same and the file descriptors correspond to stdin and stdout.
3474 This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
3475 Otherwise, running `cat << X > $$' would fail with `cat: -: input
3476 file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
3478 * Makefile.in (DISTFILES): Add @README_ALPHA@.
3479 (config.status) Depend on VERSION.
3480 * configure.in: Set README_ALPHA if the version number ends in [a-z].
3482 Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
3484 * fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
3486 src/Makefile.in (.c._c): Don't redirect directly to $@.
3487 (._c._o, .c._o): Remove temporary src file.
3489 Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
3491 * VERSION: New file.
3492 * configure.in (VERSION): New variable.
3493 (PACKAGE): New variable.
3495 * Makefile.in (DISTFILES): Add VERSION.
3496 (distdir): Use @PACKAGE@-@VERSION@, not distname.
3497 Remove all references to distname.
3498 * src/Makefile.in (version.c): Generate it.
3499 (SOURCES): Remove now-generated version.c.
3500 (distclean): Delete version.c.
3501 * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
3504 * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
3505 Remove all references to distname.
3507 * split.c: New option: --verbose.
3508 (main): Recognize it.
3509 (usage): Document it.
3510 From Marty Leisner <leisner@sdsp.mc.xerox.com>.
3512 Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
3514 * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
3518 (store_columns): Remove spurious 2nd argument in call to read_line.
3519 [__P]: Define. Use it in prototyped forward decls.
3521 * csplit.c: Move prototypes after struct declarations.
3522 Remove prototypes for xmalloc, xrealloc.
3523 Protect prototypes with __P.
3524 (new_control_record): Cast arg 1 to realloc.
3526 * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
3529 Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
3531 * csplit.c (close_output_file): Set output_stream to NULL so we
3532 don't recurse endlessly between this function and cleanup.
3534 * unexpand.c: Reorder functions to obviate forward dcls. Remove
3535 forward dcls. Protoize. Add `const' attribute to some parameters.
3537 Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
3539 * wc.c: Reorder functions to obviate forward dcls. Remove
3540 forward dcls. Protoize. Add `const' attribute to some parameters.
3542 * split.c: Likewise.
3544 * split.c (isdigits, convint): Remove these.
3545 (main): Use xstrtol instead.
3547 Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
3549 * paste.c (main): Move function body to end of file.
3550 Remove forward dcls and protoize.
3551 * sum.c (main): Likewise.
3552 * nl.c: Protoize. Reorder functions to obviate forward dcls.
3553 Remove forward dcls.
3555 * src/Makefile.in (OBJECTS): Reflect that all of the above
3558 * sum.c (bsd_sum_file): Give file name parameter const attribute.
3559 (sysv_sum_file): Likewise.
3561 * tac.c (xwrite): Give output buffer parameter const attribute.
3562 (output): Likewise for both parameters.
3563 (tac): Likewise for file name parameter.
3564 (tac_file): Likewise.
3566 Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
3568 * md5sum.c (md5_check): Use the same message format when there is
3569 a single file and it gets a read error or checksum mismatch as when
3570 there are more. Write that warning to standard error, not standard
3571 output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
3573 Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
3575 * sort.c (xtmpfopen): New function to set proper permissions on
3576 temporary files. Use it instead of xfopen. Reported by Erik Corry
3577 (erik@kroete2.freinet.de).
3579 Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
3581 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
3582 * configure.in: Use it.
3584 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
3585 (.c.o): Rewrite to be more like src/Makefile.in.
3587 * src/Makefile.in (distclean): Remove .deps.
3588 Include @top_srcdir@/mkdep-Makefile.
3590 * mkdep.Makefile: New file.
3591 * Makefile.in (DISTFILES): Add mkdep-Makefile.
3592 * doc/Makefile.in (mostlyclean): Also remove *.info.
3594 Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
3596 * od.c: Indent cpp directives.
3598 * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
3599 with large repeat counts.
3600 (struct E_string): New struct.
3601 (find_closing_delim): Take E_string arg rather than char* and length.
3602 (find_bracketed_repeat): Likewise.
3603 (star_digits_closebracket): New function.
3604 (append_char_class): No longer give diagnostic.
3605 (append_equiv_class): Likewise.
3606 (build_spec_list): Give them here instead, allowing string1 like
3607 [:*][:upper:] that got errors before.
3608 Take E_string arg rather than char*.
3609 Convert switch stmts into if-then so as to use ES_MATCH.
3611 Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
3613 * cat.c: Protoize. Reorder functions to obviate forward dcls.
3614 Remove forward dcls.
3615 * expand.c: Likewise.
3622 * src/Makefile.in (OBJECTS): Reflect that all of the above
3625 * head.c: Add `const' attribute to dcls of lots of formals.
3627 * sort.c: Add `const' attribute to dcls of lots of formals.
3628 Move struct dcls to precede dcls of file-scope variables.
3629 (monthtab, keyhead): Separate variable dcls from type dcls.
3631 Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
3633 * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
3634 list item separators, per POSIX spec.
3635 (prjoin): Rewrite loop that iterates over field specs.
3636 Handle case in which file spec is 0.
3638 Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
3640 * strpbrk.c: New file.
3641 * lib/Makefile.in (SOURCES): Add strpbrk.c.
3644 Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
3646 * join.c (add_field): No longer return a value.
3647 (decode_field_spec): New function.
3648 (add_field_list): Rewrite to be more strict.
3649 Before, `,1.2' was accepted as valid.
3650 (main): Use xstrtol instead atoi.
3651 Combine nearly identical -a and -v cases.
3654 Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
3656 * join.c (main): Report `too few/many non-option arguments'
3657 then print --help output rather than just the latter.
3658 Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
3659 (usage): Describe POSIX -1, -2 options and deprecate -j* ones
3661 * join.c (usage): Move to precede all other functions.
3665 Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
3667 * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
3668 to determine whether `sigaction' functions are available.
3669 Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
3670 Fix suggested by Karl Berry.
3672 * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
3675 * cut.c: Convert many declarations using `int' to use `unsigned int'
3676 to avoid warnings from `gcc -Wall' about comparing signed and
3678 (set_fields): Use memset (not open coded loop) to initialize array.
3680 Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
3684 * Makefile.in (DISTFILES): Remove README.alpha for major release.
3686 * od.c (decode_one_format): Remove spurious semicolon.
3689 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
3691 * man/Makefile.in (install-data, uninstall): Use sed not basename.
3692 The GNU Coding Standard suggests that only a select set of
3693 relatively standard utilities be used in Makefiles. basename is
3694 not among them. Suggested by Ulrich Drepper.
3696 Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
3698 * cksum.c: Protoize.
3701 * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
3703 (cksum): Depend on cksum$O.
3704 (cut): Depend on cut$O.
3706 Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
3710 * Makefile.in (DISTFILES): Add README.alpha.
3712 * lib/Makfile.in: (GETOPT, MEMCHR, REGEX): New variables.
3713 (OBJECTS): Use them instead of hardcoding object file names.
3714 Suggested by Ulrich Drepper.
3716 * md5sum.c (md5_check): Distinguish between open/read failure
3717 and checksum mismatch.
3719 Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
3721 * md5sum.c: Protoize.
3722 * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
3723 (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
3724 (md5sum): Depend on md5sum$O.
3726 * md5sum.c (main, usage): Remove -h, -s, -v short options.
3727 Rename --verbose to --warn, --quiet to --status.
3728 (main): Handle --help and --version using parse_long_options.
3729 (md5_check): Check ferror.
3731 * sort.c (tempname): Replace `16' with a more readable expansion.
3732 Make sure that counter never exceeds 99999.
3733 (checkfp): Rearrange loop to avoid duplicate test.
3734 Move a couple dcls from function scope into inner block.
3736 Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
3738 * md5sum.c (main): Fail if either --verbose or --quiet is specified
3739 when not verifying checksums.
3741 * md5sum.c (md5_check): Fail if no valid line is found.
3742 Don't use the word `fail' unless there were failures --
3743 instead, say `all N tests passed.'
3745 * md5sum.c (main) [handling --string option]: Don't output
3746 nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
3747 * md5-test.rfc: Remove now-inconsistant `b' marker.
3748 (usage): Clarify help message. With suggestions from Greg Troxel.
3750 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
3752 * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
3753 compiler warning. From Ulrich Drepper.
3755 * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
3756 compiler warning. From Ulrich Drepper.
3758 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
3761 Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
3763 * system.h (_): Define macro -- as empty for now.
3764 * src/*.c: Annotate localizable strings with _(...). From Franc,ois.
3766 Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
3770 * configure.in: Add fp_C_PROTOTYPES.
3772 Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
3774 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
3775 Add suffixes, dependencies, and rules to convert ANSI source to K&R
3776 when required. Mark tr.o and comm.o as the only such files (for now).
3781 * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
3782 (configure): Depend on aclocal.m4.
3783 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
3785 Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
3787 * md5sum.c (md5_check): Use getline instead of fgets.
3789 * lib/Makefile.in: (SOURCES): Add getline.c.
3790 (OBJECTS): Add getline.o.
3791 (DISTFILES): Add getline.h.
3792 (getline.o): Depend on getline.h.
3794 * md5.c [memcpy]: Define to bcopy if needed.
3795 (md5_buffer): Explicitely cast SWAP expressions to unsigned
3798 * lib/Makefile.in (strtoul.o): Depend on strtol.c.
3800 * sort.c (check): Print `disorder on...' message on standard error,
3801 not stdout. This is a minor concession to POSIX which says
3802 `no output shall be produced...'.
3804 * sort.c (main): Fix -k so it works. -k 2,3 was being treated
3805 like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
3807 Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
3809 * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
3810 before applying $(transform) to manual name. From Karl Berry.
3812 * md5sum.c (have_read_stdin): New global variable.
3813 (md5_file, md5_check): Set it.
3816 * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
3817 (md5_file): Take a new parameter, MD5_RESULT, and no longer
3819 (md5_check): Invoke md5_file instead of calling fopen directly.
3820 When giving a diagnostic for a line with invalid format, also report
3822 (main): Generate output after a successful md5_file call.
3823 [in many places]: Upon detection of an error, rather than exiting
3824 immediately, issue a diagnostic, note that an error occurred and
3827 Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
3829 * tail.c (tail_bytes) [from_start]: For regular files, seek
3830 relative to the initial input file pointer position, not
3831 necessarily from the beginning of the file.
3832 [!from_start]: Don't back up past the initial position of the
3834 (tail_lines): Call file_lines only if FD refers to a regular file
3835 with its file pointer positioned at beginning of file. Otherwise,
3836 call pipe_lines. This is a kludge. Once there's a decent test
3837 suite, fix this properly.
3838 Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
3839 would output both lines of the input file even though the first had
3840 already been read. Reported by John Roll (john@panic.harvard.edu).
3842 * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
3844 * csplit.c (main): When too few arguments are given, don't just
3845 issue the usage message; also report why.
3847 Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
3849 * md5sum.c (md5_check): New function -- extracted from main.
3851 Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
3853 * md5sum.c (md5_file): New function -- extracted from main.
3854 (main): Call the new function instead of doing all that in an
3855 if-stmt. Always use "%s" format rather than raw filename as
3856 format argument in printf-style functions like error. Otherwise,
3857 filenames containing `%' are likely to lose.
3858 Remove all mention of `old format'.
3859 (split_3): No longer parse the `new format.' There is only one
3860 valid format now: the compatible one.
3862 * lib/Makefile.in: (SOURCES): Add md5.c.
3863 (OBJECTS): Add md5.o.
3864 (DISTFILES): Add md5.h.
3865 (md5.o): Depend on md5.h.
3867 * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
3868 * lib/md5.c (md5_stream): Check for read failure and return
3869 indication of success rather than second argument.
3870 * lib/md5.h (md5_stream): Update prototype.
3871 [__P]: Define macro.
3872 * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
3873 (main): Report an error if md5_stream fails. Otherwise, running
3874 `md5sum dir-on-mounted-filesystem' always reported the checksum
3875 for an empty file. Now it gets the `is a directory' error.
3876 Greg McGary (gkm@magilla.cichlid.com) reported that the released
3877 version got stuck in an infinite loop with such arguments.
3879 * lib/md5.c: New file.
3880 * lib/md5.h: New file.
3881 * md5sum.c: Rewritten to use library interface.
3882 From Ulrich Drepper.
3884 Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
3886 * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
3888 Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
3890 * md5sum.c Add #else block after #ifdef VMS.
3891 (main): Rename local variable.
3892 Detect and report failed fclose calls on stdout and checkfile_stream.
3894 * tr.c (unqote): Comment out unreachable break stmts.
3895 (append_range): Declare FIRST and LAST parameters to be unsigned int,
3897 (find_closing_delim): Clean up interface, separating boolean success
3898 indicator and index.
3899 (find_bracketed_repeat): Likewise.
3900 (build_spec_list): Adapt to use new interfaces.
3901 Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
3902 type size_t, not int.
3903 (main): Declare NR and CHARS_READ to be of type long, not int.
3905 * sort.c (main): Comment out unreachable break stmt.
3907 * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
3908 call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
3909 off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
3910 long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
3912 * comm.c: Reorder functions so main is last, so no forward dcls
3915 Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
3917 * sort.c (main): When using obsolescent +pos -pos syntax, allow
3918 omission of field spec only when character offset is specified.
3919 Otherwise, -. +. would be accepted.
3921 Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
3923 * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
3924 position specification. For compatibility with existing practice
3925 (what vendors?), omitting M is now equivalent to specifying `0' for M,
3926 but only when using the +pos -pos syntax, not with the -k option.
3927 From Rick Sladkey (jrs@world.std.com).
3929 Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
3931 * od.c (dump): Correct loop-termination criterion.
3932 Before, running `printf 1234| ./od --width=4 --read-bytes=4'
3933 printed output for 8 bytes -- the last four were garbage.
3934 This happened only when the dump limit, N, was specified (with
3935 --read-bytes=N) and N was a multiple of bytes_per_block
3936 (usually 16, but 4 in this example). From Andreas Schwab.
3938 Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
3940 * lib/Makefile.in (check): Depend on libtu.a.
3942 * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
3943 (main): Print each sum line in (de facto) standard Plumb/Lankester
3945 New option: --quiet.
3946 Check option no longer takes an argument.
3947 When checking, exit status reflects success.
3949 Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
3951 * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
3952 Autoconf (via config.h) defines it away for compilers that don't
3955 * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
3956 defining to avoid redefinition warning on some systems.
3958 * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
3959 This avoids potential conflict with max macro from some system's
3960 header files when using bad pre-ANSI compilers.
3962 * uniq.c (usage): Fix typo in text of --help output.
3963 From Steve McConnel <steve@acadcomp.sil.org>
3965 * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
3966 also check `unsigned long', as a concession to systems with
3967 int's smaller than 32 bits.
3969 * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
3970 AC_FUNC_MEMCMP already handles it. This avoids warnings from
3971 ranlib on nextstep systems. From Kaveh Ghazi.
3973 * csplit.c (interrupt_handler): Declare to have a single integer
3974 parameter. Otherwise, some compilers fail with a type mismatch
3975 error in sa_handler assignment.
3977 * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
3978 headers that typedef `word' get syntax errors because of the
3979 variable by the same name.
3981 * join.c [join]: Redefine to avoid conflict with prototype in some
3982 system header file. Also for Unicos.
3984 * md5sum.c (main): Remove spurious colon in getopt spec string.
3985 From Ken Pizzini <kenp@spry.com>.
3987 Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
3989 * md5sum.c (md5_file): Initialize two elements of LEN portably,
3990 rather than with ANSI aggregate initialization. Reported by
3991 Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
3993 Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
3997 * md5sum.c (process_buffer): Copy values from struct into
3998 individual local variables before performing computation on them,
3999 then copy results back into returned struct. Solely for better
4000 optimization by compilers that can't keep struct members in
4001 registers. From Ulrich Drepper.
4003 Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
4005 * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
4006 Don't use #elif. Some older compilers don't grok it.
4007 (split_3): New function to parse out sum, flag, and filename
4008 when reading check file.
4009 (hex_digits): Remove length parameter since string parameter is
4011 (main): Don't allocate separate arrays for filename and sum
4012 when checking. Get pointers into line buffer with split_3 instead
4014 (main): Treat `no file args' just like `-' when not checking
4016 (hex_digits): Unprotoize.
4018 * md5sum.c (main): Don't use a separate loop to convert to lower
4019 case. Suggested by Ulrich Drepper.
4022 From Ulrich Drepper.
4024 * md5sum.c: Don't include values.h.
4027 * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
4028 and _POSIX_VERSION. Reported by Arne H. Juul.
4030 Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
4032 * tr.c [NDEBUG]: Define it to disable assertions. Some systems
4033 have a broken <assert.h> header.
4034 (is_char_class_member): Set a variable in each branch of switch
4035 stmt and return that value after the switch (rather than returning
4036 directly from every branch).
4037 (unquote): More int->size_t changes.
4038 (build_spec_list): More int->size_t changes.
4039 Be very careful about comparison now that variables are unsigned:
4040 Use i + 2 < len rather than i < len - 2. The latter didn't work
4041 for len < 2. Caught early thanks to a thorough regression test
4044 Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
4046 * sort.c (xfclose): Don't try to flush stdin, only stdout.
4047 Otherwise, at least Ultrix-4.3's fflush would return EOF.
4048 Reported by Jim Blandy (jimb@cyclic.com).
4050 * tr.c (non_neg_strtol): Don't compare signed and unsigned.
4051 [struct Spec_list] (indefinite_repeat_element): New member.
4052 Use size_t rather than int or unsigned long where reasonable.
4053 (get_spec_status): Make interface cleaner.
4054 (get_s1_spec_status): New function.
4055 (get_s2_spec_status): New function.
4056 (validate): Use new functions instead of get_spec_status.
4058 Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
4060 * md5sum.c: New file. From Ulrich Drepper.
4061 * md5-test.rfc: New file.
4062 * Makefile.in: (PROGS): Add md5sum.
4063 (check): Run a recursive make in each subdirectory.
4064 * man/Makefile.in: (MANFILES): Add md5sum.1.
4065 * src/Makefile.in: (SOURCES): Add md5sum.c.
4066 (OBJECTS): Add md5sum.o.
4067 (PROGS): Add md5sum.
4068 (check): Add basic checks for md5sum.
4069 (md5sum): Add dependency and link rule.
4070 (DISTFILES): Add md5-test.rfc.
4072 * tr.c (look_up_char_class, append_char_class, append_equiv_class):
4073 Use const attribute when appropriate.
4075 Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
4077 * join.c: Overhauled to make -a1 and -a2 options work.
4078 Passed all tests in a fairly thorough test suite.
4079 Reported by Michael Hasselberg (mikelh@zonta.ping.de).
4081 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
4083 * tail.c (main): Remove dcl of and statements that set now-unused
4086 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
4087 Without this, SunOS doesn't get type for memchr.
4088 Reported by Kaveh Ghazi.
4090 Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
4092 * tail.c (tail_lines): Change one more `long' to `off_t'.
4093 Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
4095 * csplit.c [struct control]: Change type of `repeat' to unsigned
4096 long to avoid conversion warning.
4098 Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
4100 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
4102 * xstrtol.c (__strtol): Remove prototype altogether.
4103 Move inclusion of xstrtol.h back so that it follows system headers.
4107 Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
4109 * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
4112 * xstrtol.c: Define NDEBUG for systems with losing assert.h.
4113 (__strtol): Add __unsigned to prototype and use __P.
4114 Move inclusion of xstrtol.h to precede prototype.
4117 * memmove.c: Include config.h for definition of const.
4120 * All Makefile.in (install-exec, install-exec): New targets.
4123 * tr.c (look_up_char_class): Take a string length argument -- required
4124 because the argument is a string that is *not* NUL-terminated.
4125 Use strncmp, not strcmp and add string lengths comparison.
4126 (append_char_class): Update caller. Before this change,
4127 tr '[:upper:]' '[:lower:]' read one uninitialized byte.
4128 From Andreas Schwab.
4130 * split.c (next_file_name): Move dcls of file-scope variables into
4131 this function. Don't rely on arithmetic being two's complement.
4133 * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
4134 Instead, declare two FILE structs and use their addresses.
4136 * csplit.c (record_line_starts): Remove set-but-not-used,
4137 file-scope variable.
4139 Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
4141 * all source files (usage): Include one- or two-line synopsis
4142 in --help output. From Karl Berry.
4144 * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
4147 Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
4151 Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
4153 * all Makefile.in (maintainer-clean): Renamed from realclean
4156 Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
4158 * sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
4159 Don't include safe-stat.h.
4161 * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
4162 Remove all associated rules. safe-l?stat.h are no longer used.
4164 * sort.c Don't hard-code /tmp.
4165 [DEFAULT_TMPDIR]: Use this instead.
4166 * tac.c (save_stdin): Likewise.
4168 * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
4169 Reported by John Salmon (johns@mullet.anu.edu.au).
4170 Patch from Mike Haertel.
4172 Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
4174 * sort.c (tempname): AND-off high bits of pid so that its decimal
4175 string representation is no longer than five digits.
4176 From Hans Verkuil (hans@wyst.hobby.nl).
4178 Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
4180 * expand.c (add_tabstop): Give correct size when reallocating
4181 tab_list buffer. From Geoff Odhner (geoff@franklin.com).
4182 Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
4184 Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
4186 * configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
4187 unnecessary conflicts for people using version control software
4189 (AC_ARG_PROGRAM): Use it.
4191 Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
4193 * head.c: Remove block of redundant comments describing options.
4194 (usage): Remove reference to -l option. It's not valid.
4196 * od.c (write_block): Declare index I as unsigned int, not int.
4197 (get_lcm): Likewise.
4198 (dump_strings): Likewise.
4200 (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
4201 (dump_strings): Declare bufsize to be of type size_t, not int.
4203 * split.c (next_file_name): Don't reuse X as an index.
4204 Declare new variable I instead.
4206 Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
4208 * csplit.c: Declare as `unsigned int' all variables that were
4210 (make_filename): Change type of arg to unsigned int.
4211 (split_file): Change type of indices to unsigned int.
4213 Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
4215 * od.c (main): Detect and fail when argument to -N is too large
4218 Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
4220 * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
4221 Remove check for sizeof long.
4223 * linebuffer.h: Undefine __P before defining it.
4224 * long-options.h: Likewise.
4225 * xstrtol.h: Likewise.
4227 * memcpy.c: New file.
4228 * lib/Makefile.in (SOURCES): Add memcpy.c.
4230 Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
4232 * src/*.c: Update Copyright dates.
4234 Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
4236 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
4237 Separate errno declaration from STDC_HEADERS.
4239 * wc.c (wc): For efficiency, handle separately the cases in which
4240 words need not be counted. Suggested by Karl Heuer.
4242 * wc.c (wc): Don't overcount the number of bytes when reading
4243 from a regular file on stdin with file pointer not at BOF.
4244 From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
4245 `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
4246 the size of the file. Now it outputs `0'.
4248 Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
4250 * cat.c (cat): Use memmove rather than bcopy.
4251 * csplit.c (load_buffer): Use memcpy rather than bcopy.
4252 (extract_regexp): Use strrchr, not rindex.
4253 * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
4254 (flush_paragraph): Use memmove instead of bcopy.
4255 * fold.c (fold_file): Use memmove instead of bcopy.
4256 * od.c (decode_format_string): Use memmove instead of bcopy.
4257 [EQUAL_BLOCKS]: Use memcmp, not bcmp.
4258 (parse_old_offset): Use strchr, not index.
4259 (dump): Use memset, not bzero.
4260 * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
4261 (fillbuf): Use memmove instead of bcopy.
4262 * split.c (main): Use memset, not bzero.
4263 (line_bytes_split): Use memmove instead of bcopy.
4264 * tac.c (tac): Use memmove instead of bcopy.
4265 (output): Use memcpy instead of bcopy.
4266 * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
4267 * tr.c (substr): Use memcpy instead of bcopy.
4268 (card_of_complement, set_initialize): Use memset, not bzero.
4270 * tr.c (substr): Don't allocate a byte for trailing NUL in result
4271 since the result needn't be NUL-terminated. Don't NUL terminate it.
4273 * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
4275 (AC_CHECK_FUNCS): Add strchr and strrchr.
4277 * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
4278 * memmove.c: New file.
4279 * memcpy.c: New file.
4281 Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
4283 * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
4284 not followed by a newline would be followed by data copied from
4285 uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
4286 Reported by Franc,ois Pinard.
4288 * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
4289 AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
4290 Be careful to use off_t instead of explicit `unsigned long'.
4291 Otherwise, systems like 4.4BSD lose on calls to fseek that
4292 expect off_t (which is long long on that system).
4293 (parse_old_offset): Use xstrtoul
4296 * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
4298 Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
4300 * tail.c (numerous functions): Give char* filename arguments the
4303 * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
4304 Add xstrtol.c and xstrtoul.c.
4305 (OBJECTS): Likewise for .o files.
4306 (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
4308 * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
4309 (distclean): Remove references to safe-l?stat.c.
4310 Remove all related rules and dependencies.
4312 * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
4314 Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
4316 * tail.c (tail_file): Fix call to error with %s in format, but
4317 no corresponding argument.
4319 * src/*.c: Include "error.h" instead of simply declaring
4321 * od.c (main): Use %lu, not %d for unsigned long.
4322 (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
4323 and STRTOL_FATAL_ERROR instead.
4325 Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
4327 * sort.c (main): Fix interpretation of field offsets when specified
4328 via -k option. They were being interpreted as zero-indexed. POSIX
4329 says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
4330 (keycompare): Don't ignore characters at the end of words when
4331 otherwise they would compare equal. From Rik Faith.
4333 * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
4334 to off_t because n_bytes is used as the option to fseek and off_t may
4335 be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
4336 imposed is in the string-to-integer converstion of xstrtol.
4337 (main): Use xstrtol instead of manual string to integer conversion.
4339 * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
4340 comparisons against '0' and '9'.
4342 * tr.c [!ULONGMAX]: Define it.
4343 [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
4345 * full-write.c: Declare (or not) errno based on definedness or
4346 errno, not STDC_HEADERS.
4347 * safe-read.c: Likewise.
4348 * xwrite.c: Likewise.
4350 Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
4352 * tail.c (dump_remainder): Flush standard output just before
4353 sleeping so that `tail -f' will output partial lines sooner.
4354 This applies only when following the end of a single file.
4355 From Leonard N. Zubkoff <lnz@dandelion.com>.
4357 * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
4358 start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
4360 * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
4361 * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
4362 not already defined.
4364 Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
4366 * tr.c: Include <getopt.h> instead of "getopt.h".
4368 * sort.c (tempname): Merge two very similar sprintf stmts into one.
4370 * tail.c: Use BUFSIZ instead of BUFSIZE.
4372 * cut.c: Declare DELIM to be `int' rather than unsigned char.
4374 * fmt.c: Use index, not strchr -- per GNU Standards.
4375 Reported by Kaveh Ghazi.
4376 Always include <config.h>.
4377 (main): Include program name in --version output.
4379 Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
4383 Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
4385 * memcmp.c, srtoul.c: Use up-to-date versions.
4386 Reported by Franc,ois Pinard.
4388 * src/Makefile.in (DEFS): Remove -Dlint... again.
4390 * src/Makefile.in (PROGS): Add fmt!
4391 Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
4393 Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
4397 Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
4399 * linebuffer.h: Use __P instead of _P since the latter conflicts
4400 with a definition in some <ctype.h>. From Kaveh Ghazi.
4402 Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
4404 * tr.c: Add const attribute where appropriate.
4406 * tail.c (BUFSIZ): Use definition from <stdio.h>.
4408 Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
4410 * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
4411 n_bytes is positive. Turn off assertions. `tail /dev/null' was
4412 getting a failed assertion. Reported by Doug McLaren
4415 * cut.c (cut_bytes): Print at least a newline for every line of input.
4416 (cut_fields): Print a newline even for lines whose only selected
4417 field is empty. But print nothing when using -s without -f1.
4418 And print nothing for empty input. Reported by
4419 Richard_Sharman@software.mitel.com.
4421 Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
4423 * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
4424 * linebuffer.h: Likewise.
4426 Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
4428 * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
4429 already handles it. From Kaveh Ghazi.
4431 * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
4432 get failures when it's defined. From Kaveh Ghazi.
4434 * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
4435 defined on some Next and Alliant systems. From Kaveh Ghazi.
4437 * sort.c join.c (main): Include version.h and call parse_long_options
4438 with the proper number of arguments. Reported by Franc,ois Pinard.
4440 Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
4442 * (configure.in): Add AC_OFF_T and rearrange by type along the
4443 same lines as autoscan.
4445 * fmt.c, fmt.1: New files.
4446 Both from Ross Paterson (rap@doc.ic.ac.uk).
4448 * Makefile.in (PROGS): Add fmt.
4449 * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
4450 (fmt): Add a link rule.
4451 * man/Makefile.in (MANFILES): Add fmt.1.
4453 Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
4455 * Makefile.in (All of them): Update from the ones in sh-utils.
4456 From now on, rules and definitions that are comon to the fileutils,
4457 textutils, and sh-utils will get ChangeLog entries only in the
4460 Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
4462 * od.c (my_strtoul): Set errno to zero before calling strtoul.
4463 Otherwise, od can fail complaining about a valid integer argument.
4464 From Andreas Schwab.
4466 Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
4468 * tr.c (main): Give an error and fail when squeezing repeats
4469 and no non-options are given. Reported by Tony Robinson
4470 (ajr@eng.cam.ac.uk).
4472 * sort.c (main): Temporarily copy each input file that might be
4473 another name for the output file. When in doubt (e.g. a pipe),
4474 copy. This allows the dangerous (historical -- in cnews) idiom
4475 `cat file | sort -o file' to work properly. Don't rely on this
4476 behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
4478 Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4480 * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
4481 Remove CONFIG_BROKETS ifdef.
4482 * src/Makefile.in lib/Makefile.in: Don't define it.
4484 Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
4486 * full-write.c (full_write): Declare argument LEN to be size_t.
4488 Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
4490 * tail.c (tail_file): [For multiple files only]: Report truncation
4491 of monitored file and reset current file size. From Franc,ois Pinard.
4493 Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
4495 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
4496 From Franc,ois Pinard.
4498 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
4500 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
4501 decides whether to include <fcntl.h>. From Francois Pinard.
4503 Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
4505 * tr.c (substr): Fix off-by-one allocation error.
4507 Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
4509 * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
4510 (tac): Fix typo that had `1' as arg #2 of error after failed read.
4511 Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
4513 Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
4515 * configure.in [INSTALL]: Revert change of March 25. autoconf
4518 Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
4520 * join.c (prline): Remove unused function. Indent.
4522 Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
4524 * tail.c (tail_forever): Don't print headers when asked not to.
4525 From Karsten Thygesen <karthy@kom.auc.dk>.
4527 * wc.c (wc): Optimize for the case when only bytes are being counted
4528 and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
4530 Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
4532 * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
4533 * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
4535 Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
4537 * csplit.c (struct control): Add new field, repeat_forever.
4538 Remove now-unneeded definition of INT_MAX.
4539 (process_regexp): Test repeat_forever instead of comparing `repeat'
4541 (split_file): Don't even reference `repeat' count if repeat_forever
4543 (new_control_record): Initialize repeat_forever field.
4544 (parse_repeat_count): Set it instead of setting repeat count to
4546 (process_line_count): Abort for internal error instead of calling
4549 * long-options.c (parse_long_options): Take a new argument indicating
4550 the utility name (e.g. "join", not "gjoin") for version output.
4551 Print both the utility and the package names, e.g. `join - GNU
4552 textutils-1.9.1' instead of just the package name.
4554 * join.c (main): Call parse_long_options with program name arg.
4555 * sort.c (main): Ditto.
4557 * All source except sort.c and join.c (main): Change --version output
4558 to include utility name as well as package name and version info.
4560 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
4562 * configure.in: Use AC_SET_MAKE.
4563 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
4565 Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
4567 * tr.c (main): In addition to the --help usage pointer, give an
4568 explicit error message for too many arguments.
4570 Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
4572 * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
4573 of explicit echo commands.
4574 [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
4575 `./install.sh', make it `../install.sh' instead since that
4576 script will be invoked only from subdirectories.
4577 [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
4579 * cat.c (cat): The command `:|cat -s' failed on Irix5 because
4580 ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
4581 it returned EINVAL. Detect this.
4582 (main) [lint]: Initialize variables to suppress `used before
4583 initialized' warnings.
4585 * csplit.c: Change long option name from --suffix to --suffix-format.
4587 * od.c (skip): Correct a comment.
4588 (main): Don't output anything to stdout if the sole input file
4589 doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
4591 * od.c (dump) [lint]: Initialize a variable to suppress `used before
4592 initialized' warning.
4593 (main) [lint]: Ditto.
4594 * paste.c (paste_parallel) [lint]: Ditto.
4596 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
4598 * configure.in: Don't set LDFLAGS since linking now uses both
4601 Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
4603 * unexpand.c (unexpand): Don't segfault when given a name of a
4605 * expand.c (expand): Ditto.
4606 Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
4608 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
4610 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
4613 * csplit.c (load_buffer): Rather than incrementing buffer size,
4614 double it each time we fail to find a newline. Otherwise, csplit
4615 would run out of memory when processing files with very long lines.
4617 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
4619 * man/Makefile.in (manprefix): Use binprefix as the default.
4621 Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
4623 * cat.c: Use full_write and safe_read instead of write and read resp.
4629 * sum.c: Use safe_read instead of read.
4633 * tail.c: Replace calls to xwrite with calls to fwrite.
4634 Use fopen/fclose instead of open/close.
4635 (write_header): Use a single call to printf instead of four to xwrite.
4636 Use safe_read instead of read.
4639 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
4641 * install.sh: New file.
4642 Makefile.in [DISTFILES]: Add it.
4644 Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
4646 * memcmp.c: Use the latest version from the GNU C library.
4648 * cut.c [ADD_RANGE_PAIR]: New macro.
4649 (set_fields): Collect the list of all selected ranges before
4650 allocating and initializing the boolean lookup table.
4651 (cut_bytes, cut_fields): Complete rewrite. Avoid copying
4652 into buffer whenever possible. Properly handle input without
4654 (getstr): New function. Copied from getline.c, but with minor changes.
4656 * sort.c (main): Properly handle -Tdir.
4657 Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
4658 Reported by Kristoffer Rose (kris@diku.dk).
4660 * cut.c (main): Give separate errors for `-s without -f'
4661 and `-d without -f'.
4662 (main): Now -d '' means `use the NUL byte as the delimiter'.
4663 Before, it got an error.
4665 Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
4667 * configure.in [test for 8-bit clean memcmp]: Add a test to detect
4668 losing memcmp from SunOS4.1.x. From Robert H. de Vries
4671 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
4673 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
4674 so it goes in config.status. This eliminates unnecessary second run
4677 Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
4679 * configure.in (AC_HAVE_FUNCS): Add isascii.
4680 * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
4681 on AIX PS/2 1.3 systems because isascii is a function and it is used
4682 in definitions (with the necessary side effect of assigning to a
4683 global variable) of the is* macros. Also test HAVE_ISASCII and
4684 redefine ISASCII(c) instead of isascii.
4685 Reported by Minh Tran-Le (tranle@intellicorp.com).
4687 Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
4689 * configure.in: Don't run the test for 8-bit clean memcmp if we
4690 already know we'll be using our replacement.
4692 Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
4696 * tac.c (usage): Fix typo in long usage.
4697 * sort.c (usage): Likewise.
4698 From Philippe.Schnoebelen@imag.fr.
4700 * cut.c [FATAL_ERROR]: New macro.
4701 (main): Call both error and usage (2) through FATAL_ERROR in
4702 many places. Before, only `error (2...' was called.
4703 (invalid_list): Removed. This function is subsumed by FATAL_ERROR.
4705 * cut.c (cut_fields): Properly handle input lacking a terminating
4706 newline. Before, the command `printf "a\tb" |cut -f 1' generated
4709 Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
4711 od.c (usage): Change --backward-compatible to --traditional in
4712 the long usage message.
4714 Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
4718 Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
4720 * cut.c (cut_fields): Revert July 27 change. Instead, strip off
4721 trailing delimiter unless given a range of fields like `3-' that
4722 extends to end of line.
4723 (set_fields): Moved local `eol_range_start' to file-scope.
4724 Reported by Arne H. Juul (arnej@solan.unit.no).
4726 Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
4728 * fold.c (fold_file): Don't get stuck in an endless loop when
4729 width is smaller than 8 and there are TABs in the input.
4731 Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
4733 * join.c: Remove now-unused dcls of show_help and show_version.
4735 Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
4737 * csplit.c [INT_MAX]: Make sure it's defined.
4738 [not HAVE_LIMITS_H]: Don't include limits.h.
4739 From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
4741 Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
4745 Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
4747 * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
4748 From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
4750 * sort.c (main): Handle --help and --version options.
4751 * Makefile.in (sort.o): Depend on long-options.h.
4753 Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
4755 * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
4756 split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
4757 `--longopt=arg' syntax in --help message rather than `--longopt arg'.
4758 From Francois Pinard.
4760 * tail.c: Don't include <signal.h>. It hasn't been necessary
4761 since the Dec 12, 1992 change.
4763 * join.c (main): Accept `-v 1' again. Adding the --version
4764 long option had broken it, although -v1 still worked. Call
4765 parse_long_options instead of adding "help" and "version"
4766 to join's longopt strct.
4767 * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
4769 * (join): Depend on and link with long-options.o.
4770 * (join.o): Depend on long-options.h.
4772 * od.c: Change --compatible (-C) to --backward-compatible (-B).
4774 * csplit.c: Change --abandon-null-files to --elide-empty-files.
4776 Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
4778 * tr.c (get_next, string2_extend): Add default: label to switch stmt.
4780 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
4781 join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
4782 tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
4783 Exit successfully for --help, non-zero for usage error.
4784 From Francois Pinard.
4786 * configure.in: Add AC_STAT_MACROS_BROKEN.
4787 * system.h [AC_STAT_MACROS_BROKEN]: Test it.
4789 Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
4791 * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
4792 <config.h> or "config.h".
4793 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
4794 join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
4795 tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
4797 * configure.in: Use AC_CONFIG_HEADER.
4798 * Makefile.in [DIST]: Add config.h.in.
4800 * Makefile.in: Convert so make may be run from subdirectories.
4801 Add dependencies on config.h.
4802 * src/Makefile.in: Ditto.
4803 * lib/Makefile.in: Ditto.
4804 * man/Makefile.in: Ditto.
4806 Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
4808 * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
4809 In the 64-bit assignment, be careful to cast the shift operand to
4811 Abort if sizeof (unsigned long) > 8.
4813 Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
4815 * csplit.c: Allow repeat counts to be specified via `{*}'.
4816 New option --suffix=format. Supercedes --digits option.
4817 New option --abandon-null-files.
4818 From Ronald F. Guilmette (rfg@netcom.com).
4820 * csplit.1: Updated.
4821 From Ronald F. Guilmette.
4823 * csplit.c: Remove register keyword (replace with `int' in two cases).
4825 * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
4826 (bytes_to_octal_digits): New static array.
4827 (get_format_flags): Combine '+' and ' ' cases of switch stmt.
4828 Return count if for loop terminates.
4829 (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
4830 (get_format_prec): Make sure is_negative is defined before used.
4831 (get_format_conv_type): Give a different error message if there
4832 is no conversion specifier.
4833 Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
4834 (max_out): Use `%%' rather than `%' in format string.
4836 Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
4838 * pr.c (main): When argc == 1, don't try to xmalloc (0).
4840 Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
4842 * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
4845 Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
4847 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
4849 Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
4851 * src/*.c: Print version on standard output, not stderr.
4853 * configure.in: Add AC_LONG_64_BITS.
4854 * memchr.c: Use #ifdef LONG_64_BITS instead of
4855 `if (sizeof(longword) > 4)'.
4857 Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
4859 * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
4860 always handle devices. Ignore errno == EINVAL and errno == ENODEV.
4861 `cat -v /dev/null' was failing on many systems.
4863 * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
4864 `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
4865 From William Dowling <will@franklin.com>.
4867 Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
4871 * memchr.c: De-ansify the fixed version from glibc.
4872 It is supposed to work on systems with 64-bit long ints.
4874 Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
4878 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
4882 Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
4884 * pr.c (cols_ready_to_print): New function. It replaces a global
4885 variable by the same name and computes on the fly the value that
4886 was supposed to be maintained through that variable. This should
4887 put to rest the `pr -2a' bug.
4888 (main): Don't let getopt_long reorder arguments so we can
4889 distinguish between `pr -1 -2' and `pr -12'. Rework handling of
4892 * fold.c: Declare xmalloc.
4894 Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
4896 * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
4898 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
4900 * mkinstalldirs: New file.
4901 * Makefile.in (installdirs): Use it to create installation directories.
4903 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
4905 * all source: With --version, print version and exit immediately.
4907 Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
4909 * Makefile.in (installdirs): New rules for creating installation
4910 directories. (install): depend on it.
4912 * tail.c (main): Remove --compatible since `+1f' may be used
4913 to get the BSD `-0f' behavior portably.
4915 * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
4916 From Ian Lance Taylor (ian@cygnus.com).
4918 Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
4920 * tail.c (main): New option -C, --compatible to make `tail -0f'
4921 work like `tail +1f' for compatibility with BSD tail.
4923 Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
4925 * pr.c (print_page): Decrement cols_ready_to_print even when
4926 lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
4927 terminate. Add parentheses for clarity.
4929 Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
4933 * od.c (main): Remove set-but-not-used variable, `usage_error'.
4935 * split.c (main): Call usage with an argument.
4937 Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
4939 * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
4940 for 8-bit clean memcmp.
4942 * cat.c (usage, main): Remove unused argument.
4944 * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
4945 (check_for_offset): Remove unused argument `argnum.'
4947 * configure.in: Add AC_SIZE_T.
4949 Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
4951 * uniq.c (main): Interpret non-option arguments with a leading `+'
4952 only if we haven't seen `--'.
4954 * tr.c (main): Change variable name to avoid shadowed dcl.
4955 * wc.c (write_counts): Ditto.
4957 * sum.1: Make documentation agree with the code.
4959 * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
4961 Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
4963 * configure.in [AC_HAVE_HEADERS]: Add limits.h.
4965 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
4967 * od.c (parse_old_offset): Don't use prototype in function
4968 definition. Remove unnecessary conjunct from test for hexadecimal
4971 * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
4972 for long double support; there are compilers (Stardent Vistra svr4)
4973 without long double but still define __STDC__.
4975 Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
4977 * src/*.c and man/*.c except for sort: Add --help and --version
4980 * pr.c: Convert to use getopt_long.
4982 * lib/memcmp.c: Use version from glibc.
4983 [WORDS_BIGENDIAN]: Test this instead of the using glibc's
4985 * configure.in: Use AC_WORDS_BIGENDIAN to set it.
4987 * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
4990 * Makefile.in (dist): Depend on Makefile so that changes to
4991 Makefile.in (like adding new files to DISTRIB) are reflected
4992 in the new distribution.
4994 Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
4996 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
4997 other options so users can use them to override DEFS.
4998 * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
5000 * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
5001 configure's AC_SUBST will set these.
5003 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
5004 [targets that cd then run make in subdirectories]: Don't depend
5005 on `cd ..'; use a subshell instead.
5007 * Makefile.in [info, install-info, dvi, check, installcheck]:
5008 New targets but no rules; comply with standards.
5010 * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
5011 hasn't specified CFLAGS.
5012 [LDFLAGS]: Substitute into Makefile.
5014 Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
5016 * od.c: New option --compatible, -C.
5017 (parse_old_offset): New function.
5018 * od.1: Document new option.
5020 Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
5022 * cut.c, expand.c, join.c, nl.c: Always call error with errno
5023 (not zero) after failed fclose or non-zero ferror.
5025 Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
5027 * configure.in: Add check for working memcmp; use GNU's if
5028 the system's doesn't grok the 8th bit.
5029 * memcmp.c: Fix it so it groks the 8th bit.
5030 TODO: We really need to provide a fast memcmp, since most
5031 machines will have a broken memcmp. Probably should get
5033 * sort.c (mergefps): Maintain keybeg and keylim when copying
5034 the current line to `saved'.
5035 (numcompare): Skip white space here since -n no longer implies -b.
5036 (getmonth): Skip white space here since -M no longer implies -b.
5037 (compare): Completely overhauled to make the 8th bit work right,
5038 also to properly handle the global reverse option.
5039 (set_ordering): -n no longer implies -b, according to Posix.
5040 For consistency, -M also no longer implies -b.
5041 (main): Correct treatment of -r and global keys.
5042 (findlines): Clear keybeg and keylim if no keys are used.
5043 (sort): Avoid overwriting tempfiles[] array bounds.
5045 Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
5047 * pr.c (close_file): Reverse May 13, '92 change, but add the condition
5048 that cols_ready_to_print not be decremented when printing across.
5049 The command `echo |pr -2ta' didn't terminate.
5050 (print_page): Rewrite conditional (that had side effects in second
5051 conjunct) using nested if statements to make it clear that we do
5052 indeed want those semantics.
5054 Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
5058 * system.h: Try BBSIZE if BSIZE isn't defined.
5059 From Tony Robinson <ajr@eng.cam.ac.uk>.
5061 Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
5063 * tail.c (tail_forever): Use an array of file descriptors
5064 instead of forking processes.
5065 (dump_remainder): Return number of bytes read.
5066 (tail_file): Fill in the new array.
5067 From Ian Lance Taylor.
5069 Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
5071 * system.h: Only define index, bcmp, etc. if not already defined.
5073 Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
5075 * tr.c (is_char_class_member): Remove unreached return after abort.
5077 Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
5079 * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
5080 sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
5081 of <ctype.h> and definitions of is* ctype macros to system.h.
5082 Change a few more uses of is* ctype macros to (protected) upper
5085 * system.h: Add isascii-protected ctype IS* macros.
5087 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
5089 * all files using getopt.h: Convert static declarations of
5090 struct option to use new macros from getopt.h: no_argument,
5091 required_argument, and optional_argument.
5093 Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
5095 * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
5097 * tr.c (main): Close stdin and stdout and check return status.
5099 Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5101 * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
5104 Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
5106 * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
5107 use isascii if it is defined.
5108 (is_char_class_member, make_printable_char, make_printable_str,
5109 non_neg_strtol): Use new macros instead of lower case ones
5112 * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
5113 macros like pr.c. Suggested by David J. MacKenzie.
5115 * od.c (print_ascii, dump_strings): Check for isascii before isprint.
5116 (dump_strings): Free malloc'd buffer before returning.
5117 (skip): Return non-zero if an error occurred, zero otherwise.
5118 Exit only if asked to skip beyond end of combined input.
5119 (check_and_close): New function.
5120 (skip, read_block, read_char): Call check_and_close when done
5121 processing the file associated with in_stream.
5122 (skip, read_block, read_char): Set have_read_stdin.
5123 (main): Close stdin (if it was ever read) and check for errors
5124 just before exiting.
5125 (write_block, dump_strings, dump): Don't test return value from
5126 functions that operate on streams. Rely on later ferror tests.
5128 Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5130 * sort.c (main, usage): Add -T option.
5132 Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5134 * tail.c (tail_forever, sigusr1, kill_kids): New functions to
5135 do -f on multiple files.
5136 (main): Call tail_forever.
5137 From Ian Lance Taylor.
5139 Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5141 * cut.c (cut_fields): Add cast.
5143 * od.c (decode_one_format): Remove '#' from pre_fmt_string;
5144 many systems don't support it.
5145 Conditionalize long double support on __STDC__, not __GNUC__.
5146 From Ian Lance Taylor.
5148 Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
5150 * sort.c (numcompare, keycompare): Add parentheses suggested
5151 by gcc -Wall. Put braces around individual monthtab initializers.
5153 * cksum.c: Declare error. Make checksum table `const.'
5155 * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
5157 * split.c (main): Add `default: abort();' to enumeration switch.
5159 * All files: Make all functions and extern variables static.
5160 Make all longopts arrays const as well as static.
5161 Make a couple statically initialized aggregates `const.'
5163 Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5165 * od.c (main): Make old-style format options accumulate.
5168 Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5170 * tr.c (look_up_char_class): Add cast.
5172 * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
5173 Add `const' to variable receiving value from re_compile_pattern.
5175 * wc.c (wc): If doing only -c, use st_size for regular files.
5177 * fold.c (fold_file): Was folding 1 column too early.
5178 From Eric Backus <ericb@lsid.hp.com>.
5180 * memset.c: New file.
5182 Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5184 * cksum.c: New file.
5186 Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5188 * tac.c (tac_stdin): Handle SIGPIPE.
5189 * sort.c (main): Handle SIGTERM.
5193 * system.h [USG || STDC_HEADERS]: Define bcmp.
5195 Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5197 * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
5199 Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5201 * paste.c (main): Don't write on a string constant.
5203 Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
5205 * tr.c: Minor cleanup. Replaced some assert(0) with abort().
5207 Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5209 * cmp.c, cmp.1: Move to diff distribution.
5211 Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5213 * system.h: Change FOO_MISSING to HAVE_FOO.
5215 Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
5217 * pr.c (COLUMN): Add structure member to remember filename.
5218 (main, init_fps, open_file, close_file): Use it.
5220 (close_file): Don't decrement cols_ready_to_print when closing
5221 a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
5223 Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
5225 * cmp.c: --show-chars -> --print-chars.
5227 * pr.c: Rename some variables.
5229 Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5231 * system.h: Define DEV_BSIZE if not defined.
5233 Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
5235 * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
5237 Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5239 * sort.c (main): Don't stop processing args when we hit "-";
5240 treat it like a regular filename.
5241 From ian@airs.com (Ian Lance Taylor).
5243 * pr.c (print_page): Fix off by one line count when ^L is in input.
5244 From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
5246 Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
5248 * tr.c (validate): Change error message so it doesn't mention
5249 actual name of --truncate-set1 option. From David MacKenzie.
5251 Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
5253 * tr.c (string2_extend, validate): Give an error message when
5254 translating without --truncate-set1, with empty string2, and
5255 with non-empty string1. "tr 1 ''" produced a failed assertion.
5257 Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5259 * system.h: Change how ST_BLKSIZE is calculated to allow for
5260 non-POSIX systems that don't define BSIZE in sys/param.h.
5262 Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5264 * sum.c (main, bsd_sum_file): Don't print filename if BSD
5265 algorithm is used and only one file was given.
5267 Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
5269 * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
5270 with starting character equal to ending character. This is
5271 contrary to the POSIX spec, but what is already implemented
5272 in find_closing_delim.
5274 Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5278 * sort.c (numcompare, checkfp): Add parens to placate gcc2.
5280 * sort.c (mergefps): For -u, output the first, not last, of
5281 the lines that compare equal. From Mike Haertel.
5283 Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5285 * tr.c: Remove initial capitals and periods from error messages.
5287 Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5289 * sum.c (main): Add -r option for SYSV compat.
5291 Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5293 * sort.c (compare): If -s given, leave lines in their original order.
5294 (main): Recognize -s.
5295 (usage): Document -s.
5298 Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
5300 * sort.c (sort): Check for complete parsing of buffer into
5301 lines before nixing temp files.
5303 Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5305 * sum.c (sysv_sum_file): Use %lu instead of %u to print a
5306 long. Not that it matters for GNU . . .
5308 * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
5309 (append_normal_char, append_range, append_char_class,
5310 append_repeated_char, append_equiv_class, spec_init):
5311 Initialize `next' field of new `struct List_element'.
5312 From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
5314 Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
5316 * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
5318 Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5322 * nl.c: Support multiple files and "-" for stdin.
5323 (main): Check for read and write errors.
5324 (nl_file): New function.
5326 Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5328 * tr.c (main): -t option was called -b in getopt spec.
5329 (validate): Don't warn that set1 is longer than set2.
5331 * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
5333 Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5335 * nl.c: New program from bin-src.
5337 * nl.c (main): Use a struct linebuffer for line_buf.
5338 (process_file): Use readline instead of fgets, to preserve NULs.
5339 (check_section): Use memcmp instead of strncmp.
5340 (proc_text): Print line_buf with fwrite instead of printf.
5342 * nl.c (main): Usage message if too many args given. Check
5343 for error in closing input file. Lengths of section delimiter
5344 strings were 1 too large. Take separator_str into account in
5345 length of print_no_line_fmt.
5346 (build_print_fmt): Allocate space for print_fmt, in case
5347 separator_str is long.
5348 (proc_text): A blank line is one that contains nothing, not
5349 even nonprinting characters.
5351 Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5353 * All programs: Document `--' instead of `+' to introduce
5354 long-named options, in usage messages.
5356 * sum.c (bsd_sum_file): Renamed from sum_file.
5357 (sysv_sum_file): New function.
5358 (main): Recognize an option to select between the algorithms.
5360 Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
5362 * pr.c (close_file, print_page): Fixed bug that had the command
5363 yes |head |pr -t printing "yyyyyyyyyy".
5364 * (print_page): Fixed bug that had pr -3 -a printing two too few
5365 trailer lines per page.
5366 * (main): Added restriction that -a and -m are incompatible.
5367 Although the POSIX spec doesn't explicitly say they shouldn't
5368 be used together, it says -a modifies the -column option and
5369 that -column shouldn't be used with -m.
5371 Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
5373 * nl.c: Include regex.h after, not before, sys/types.h.
5375 Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
5377 * sort.c (fillbuf) return bytes buffered instead of bytes read.
5379 Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
5381 * sort.c (LINEALLOC): New #define.
5382 (struct lines): New field ``limit''.
5383 (initlines): Set it from new arg ``limit''.
5384 (sort, mergefps, checkfp): Pass new arg to initlines().
5385 (findlines): Don't realloc past lines->limit.
5387 Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5389 * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
5390 HAVE_UNISTD_H and _POSIX_VERSION.
5392 * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
5394 Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
5396 * tr.c: Fixed an inaccurate comment on posix_pedantic.
5398 Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
5400 * tr.c: Changed underscores to hyphens in long option name
5401 "sysv_string2_truncate".
5403 Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5405 * tac.c (main): Set obscure_syntax to tell re_search to
5406 allocate memory for the group registers.
5408 Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5410 * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
5411 signal, which POSIX doesn't have.
5412 * sort.c: Replace inthandler and huphandler with sighandler.
5413 * csplit.c (main): Only handle signals if they were not being
5416 * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
5418 Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
5420 * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
5421 * tr.c (squeeze_filter): Comment a little on why it's better
5422 to step through the input by two.
5423 * tr.c (set_initialize): Write a comment describing the function.
5424 * tr.c: Eliminated the variable `portability_warnings' and replaced
5425 references to it by references to `!posix_pedantic'. One of the
5426 uses of portability_warnings had been wrong.
5428 Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5430 * tr.c: New program.
5432 Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5434 * linebuffer.[ch] (freebuffer): New function (used by cron).
5436 Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5438 * system.h, configure, Makefile.in: Don't include memory.h if
5439 STDC_HEADERS, removing need for MEMORY_H_MISSING.
5441 Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
5443 * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
5444 Somehow, part of my patch didn't make it last time.
5446 Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
5448 * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
5450 * cmp.c (cmp): Print EOF message to stderr, not stdout, for
5453 * sort.c (xfwrite): fwrite never returns < 0, so check if
5454 number written is number we asked to write.
5455 (fillbuf, main): fread never returns < 0, so check ferror instead.
5458 Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
5460 * pr.c (print_page): Really fixed `extra newline at EOF' problem.
5461 * (store_columns): Fixed bug that caused `pr -b -2' to coredump
5462 on files of certain lengths.
5464 Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
5466 * pr.c (print_page): Fixed to not add single spurious newline
5467 at EOF when using -t.
5469 Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
5471 * pr.c (print_page): Don't pad the page if -t given.
5473 * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
5475 Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
5479 * configure, system.h: Include memory.h if it works.
5481 * split.c: Allow `b' unit as well as `k' and `m'.
5483 * head.c, tail.c: Replace -b +blocks option with specifying
5484 units (b, k, or m) after the number.
5485 (parse_unit): New function.
5487 * fold.c (main): Check that -w arg is a number.
5489 * cut.c: +delimiter takes an arg.
5491 Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
5493 * pr.c (close_file): Don't close an already closed file.
5495 Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5497 * memchr.c: New file.
5498 * configure: Check if it's needed.
5500 * csplit.c, gcsplit.1: New program.
5502 * pr.c (cleanup): Only free buffers if they were allocated.
5504 * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
5506 Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
5508 * pr.c: The following 3 bugs appeared (at least) when printing
5509 a single file with the options `-3 -f'.
5510 * (print_white_space): Single spaces were being replaced
5512 * (print_page): Some lines were getting too much white space
5513 at the beginning because spaces_not_printed wasn't being reset
5515 * (read_line): The single space between a truncated column
5516 on its left and the column on its right was omitted. Fixed
5517 so that previous value of input_position is restored before
5520 Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5522 * configure: Only remove /etc from PATH when it's not part of
5525 Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
5527 * linebuffer.c (readline): Fix incorrect recalculation of `end'.
5529 * head.c, tail.c: Replace `mode' variables and bitmasks with
5530 separate variables for each option.
5532 Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
5534 * wc.c: New program.
5536 Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
5538 * fold.c (fold_file): Read in an int, not a char, for EOF
5541 * configure: Check whether st_blksize is missing.
5543 * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
5544 defined, instead of /tmp.
5546 Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5548 * xwrite.c [POSIX]: unistd.h might require sys/types.h.
5550 Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5552 * paste.c (main): Consider -d "" to be like -d "\0",
5553 for POSIX (if I read it right).
5555 * sort.c, join.c: New programs.
5557 * cut.c (set_field): Allow blanks as well as commas to
5558 separate numbers in ranges.
5560 Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
5562 * pr.c: Failure to open an input file is no longer a fatal error.
5563 A message is printed for each failed open. When printing
5564 in parallel, each failed open results in one fewer output column.
5565 Added POSIX -r option to suppress the message.
5566 * pr.c: Added variables: failed_opens, ignore_failed_opens.
5567 These changes were based in part on work by David MacKenzie.
5569 Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
5571 * pr.c: Complain if user gives both -m and -[0-9]+ options.
5573 Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
5577 Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5579 * expand.c: Rename some variables.
5580 (expand): Don't access value off end of array.
5581 * unexpand.c: Rename some variables.
5582 (unexpand): Don't access value off end of array.
5583 Instead of copying tabs verbatim and flushing pending spaces
5584 when one is reached, count them as the proper number of
5585 pending spaces. Instead of changing tabs to single spaces if
5586 the tabstop list is exhausted, print the rest of the line
5587 unchanged (for POSIX).
5589 Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5591 * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
5592 Clear EOF and error conditions on stdin so it can be reused.
5594 * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
5595 as commas to separate tabstops, for POSIX.
5596 * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
5597 the output; send it directly to stdout.
5598 * unexpand.c (main): Make -t stupidly imply -a for POSIX.
5599 (unexpand): If a tab stop list was given and we move past its end,
5600 copy the rest of the line verbatim.
5602 * split.c (convint): New function to allow 'm' and 'k' after
5604 (main): Use it. Change -c option to -b for POSIX.
5606 Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5608 * pr.c: Protect isdigit with isascii, if required.
5610 Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
5612 Most of the following is from Paul Eggert:
5613 * cat.c (main): If stdin is read, check close at end.
5614 * cmp.c (main): Check for stdin being closed.
5615 Check for close errors on stdin and stdout.
5616 (cmp): Return a value instead of exiting.
5617 * cut.c (cut_file): New function, from code in main.
5618 Check for read errors.
5619 (main): Check for close errors.
5620 * expand.c, unexpand.c (main): Check for close errors.
5621 (next_file): Go to next file if one can't be opened.
5622 Check for close errors.
5623 * head.c (main), tail.c (main): If stdin was read, check for
5625 * head.c (head_file), tail.c (tail_file): Check for close errors.
5626 * paste.c (main, paste_parallel, paste_serial), tac.c (main):
5627 Check for close errors. Close stdin if it was read.
5628 * split.c (main): Check for close errors.
5630 * configure, Makefile.in's: Support +srcdir option.
5631 Make config.status. Fix up clean targets.
5633 Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
5635 * linebuffer.h (struct linebuffer): Add a field to indicate
5636 the number of valid chars in the line.
5637 * linebuffer.c (initbuffer, readline): Fill it in.
5638 * uniq.c, comm.c: Use it.
5640 * pr.c (main): Check stdin and stdout fclose for errors.
5641 (init_parameters): If there's no room for header and footer,
5642 omit them rather than dying (for POSIX).
5643 (init_header): Take a file descriptor as additional arg.
5644 (init_fps): Change callers. Note when stdin is read.
5645 (open_file): For filename "-" use stdin.
5646 (close_file): Don't close stdin. Check close for errors.
5647 (print_char, char_to_clump): Use isprint instead of explicit
5650 * memcmp.c: New file (needed for comm).
5651 * bcopy.c: New file (needed for fold).
5652 * system.h: Don't define bcopy as memcpy.
5653 * configure: Check for bcopy and memcmp.
5655 * uniq.c (main): Use "-" instead of NULL to mean stdin or
5657 (check_file): Use "-" instead of NULL to mean stdin or stdout.
5658 Check readline return instead of for NUL character to
5660 Check fclose for errors.
5661 (find_field): Use linebuffer length, not NULs, to detect end
5663 (different): New function, replaces compare. Uses memcmp
5665 (writeline): Use fwrite instead of fputs so NULs are preserved.
5667 * comm.c (compare_files): Return an error indication.
5668 Don't take a filename of NULL to mean stdin.
5669 Use memcmp instead of strcmp to allow for NULs.
5670 Check fclose for errors.
5671 (writeline): Use fwrite instead of fputs so NULs are preserved.
5673 * sum.c (sum_file): Take an arg indicating whether to print
5674 the filename, and don't take NULL meaning stdin. Set a flag
5675 when we read stdin. Check fclose return for errors.
5676 (main): If stdin was read, check fclose return for errors.
5677 Use filename of "-" if no args given.
5679 Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5681 * fold.c: Rewritten from scratch for POSIX.
5683 Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5685 * split.c (line_bytes_split): Use xmalloc instead of alloca.
5686 * system.h: Don't declare alloca.
5688 * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
5689 * system.h: Define SEEK_ macros if not defined.
5691 * pr.c: Rename variable `truncate' to avoid library function conflict.
5693 Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5695 * linebuffer.c, linebuffer.h: New files.
5696 * comm.c, uniq.c (initbuffer, readline): Functions
5697 removed (use versions in linebuffer.c).
5699 Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5701 * sum.c (sumfile): Always print 5 digits for second number, too.
5702 Interpret "-" to mean stdin.
5704 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
5706 * uniq.c: Use isblank instead of isspace, to support POSIX.2.
5707 * comm.c, pr.c, uniq.c (concat, fatal, error,
5708 pfatal_with_name, xmalloc, xrealloc): Functions removed.
5710 Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5712 * nl.c: Add long-named options. Doc fixes.
5714 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5716 * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
5718 * xwrite.c [POSIX]: Include unistd.h.
5719 [STDC_HEADERS]: Don't declare errno.
5721 Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5723 * uniq.c: Add long-named options. Remove marginally useful -z
5724 option (zero padded repeat counts).
5726 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5728 * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
5729 (cwrite), head.c (head_file), cat.c (main): Check close return
5730 value for delayed error report due to NFS.
5732 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5734 * cat.c: Replace "uchar" with "unsigned char", to avoid
5735 problems with various systems' typedefs.
5737 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5739 * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
5740 operation is unsupported, for HP-UX 7.0.
5742 Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
5744 * sum.c: Always print five digits for first number.
5746 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
5748 * cat.c, cmp.c: Don't use fileno(); not needed.
5750 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
5752 * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
5754 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
5756 * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
5758 (enlarge_line): Adjust inbufp and outbufp.
5760 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5762 * cat.c: Declare free returning void, not int, so it
5763 doesn't bomb on Xenix.
5765 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
5767 * tac.c: Print error messages before calling cleanup, not after.
5769 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5771 * tac.c (cleanup): Return SIGTYPE, not int.
5773 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
5775 * cut.c (main, usage): Add -b and -n options for POSIX.
5776 (set_fields): Don't allow SPC or TAB as number separators.
5778 * paste.c (paste_parallel): If open of any file fails, quit
5781 Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
5783 * pr.c: Add POSIX -F option (same as -f).
5785 * uniq.c (check_file): Allow '-' to mean stdin or stdout.
5787 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5789 * head.c, tail.c: Change `chars' to `bytes' globally.
5790 (main, usage): Use POSIX.2 draft 10 option syntax.
5792 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5794 * cat.c (main): Don't delay error messages, so they appear
5796 (main, simple_cat, cat): Make errors in input files nonfatal.
5798 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5800 * cat.c: Remove -c option added for POSIX draft 9, since POSIX
5801 draft 10 removed it.
5803 * tac.c (tac_stdin): Use fstat instead of lseek to determine
5804 whether stdin is seekable, because lseek silently fails on
5805 some special files, like tty's.
5806 tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
5807 don't turn off -f for non-regular files (assume the user knows
5808 what he's doing; it might work for fifo's and sockets).
5810 * paste.c (main): If no files given, use stdin.
5811 Don't let collapse_escapes write on string constant (delim default).
5812 (paste_parallel): Don't close stdin.
5814 * cut.c (main): Use standard input for filename of "-".
5816 * comm.c (compare_files): Allow '-' to mean stdin.
5818 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5820 * cut.c (enlarge_line): Take an arg giving the required amount
5821 of space. Change callers.
5822 (main): Don't allow -t'<TAB>' without -f.
5823 Make `delim' unsigned to fix sign extension problem in comparison.
5825 Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
5827 * pr.c Deleted excess whitespace from ends of lines.
5828 Modified to work with current version of getopt, which
5829 returns 1 instead of 0 for non-options.
5830 Reversed the meaning of the -f option, to be compatable
5833 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
5835 * cmp.c (main, usage): Rename -L option to -c and don't have
5837 (printc): Take an arg to specify number of chars to pad to,
5838 for column alignment.
5839 (cmp): Respect flag_print_chars in default output format.
5840 Align columns for cmp -cl.
5842 Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
5844 * cmp.c: For +show-chars, have getopt return 'L' so
5845 `flag_print_chars' gets set.
5847 Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
5849 * tac.c (main): Initialize fastmap and translate fields of
5850 regex before compiling it.
5852 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5854 * tac.c: Change +regexp to +regex for consistency with GNU find.
5856 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5858 * cat.c (cat): If FIONREAD is available, only use it if it is
5859 supported by the filesystem that the file is on.
5861 Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5863 * cat.c (main): Add a variable to control whether the check
5864 for input file == output file is made, because no values of
5865 st_dev and st_ino should be assumed to be available for this
5866 purpose. Only do the check for regular files.
5868 * tac.c: Use bcopy instead of memcpy.
5870 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
5872 * head.c: Use longs instead of ints for file offsets, for 16
5875 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5877 * cmp.c: Change some ints to longs for 16 bit machines.
5878 (bcmp_cnt): Make char-pointer counting slightly simpler.
5880 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5882 * cat.c (main): Allow input file to be output file for devices
5883 (ttys, etc.). Check whether input file is output file when
5884 reading standard input. Print any error messages for standard
5887 * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
5888 machines as well as 32 bit ones.
5889 * cmp.c, tail.c: Use longs instead of ints for file offsets.
5891 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5893 * cmp.c: Fix some exit statuses for POSIX.
5895 Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
5897 * tac.c: Use regular expressions as the record boundaries.
5898 Give better error messages.
5899 Reformat code and make it more readable.
5900 (main): Use getopt_long to parse options.
5901 (tac_stdin): Do not make a temporary file if standard input
5903 (tac_file): New function.
5904 (tac): Take an open file desc as an arg.
5905 (output): Rewrite to use its own efficient buffering.
5906 (xmalloc, xrealloc, xwrite): New functions.
5908 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5910 * head.c, tail.c: Use `error' instead of `fatal_perror' and
5911 `nonfatal_perror'. Remove some unnecessary info from messages.
5913 Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5915 * comm.c (main): Pass the list of files to compare_files as a
5916 char ** instead of a char *.
5917 (compare_files): Make arg a char **.
5919 * uniq.c: Declare some functions as void.
5920 Change global vars `countmode' and `mode' from ints to enums.
5921 (main): Use getopt to parse options and support POSIX options.
5922 Don't use integer_arg to parse numbers, since `-#' can't be
5923 parsed that way using getopt.
5924 (find_field): Use isspace for finding fields boundaries.
5926 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5928 * comm.c (main): Call usage if given bad option or wrong
5929 number of args. Exit with 0 status normally.
5930 (usage): New function.
5931 Declare some other functions as void.
5933 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
5935 * cmp.c (main, cmp, usage): Replace -q +quick option with -L
5936 +show-chars option to add ASCII representation of bytes to -l format.
5938 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
5940 * cmp.c (cmp): Change EOF message for POSIX compatibility.
5941 For -l format, clear bits > FF.
5943 Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5945 * tail.c: Move global `errors' into main instead of having
5946 nonfatal_perror set it.
5947 (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
5948 Return an error status.
5949 (file_lines, start_chars, start_lines): Reverse the meaning of
5951 (tail_lines, tail_chars): Account for that reversal.
5953 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5955 * head.c: Move global `errors' into main and have the various
5956 functions return an error status instead of setting it in
5959 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
5961 * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
5962 options specified), to compare the two blocks and count
5963 newlines simultaneously.
5964 * cmp.c New function: bcmp_cnt.
5966 * cmp.c (main): Test if output is redirected to /dev/null, and
5967 assume `-s' if this is so.
5969 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5971 * cat.c: Change `argbad' from a char to a short, so it will
5972 work on machines with unsigned chars.
5974 Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5976 * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
5977 Remove unneccessary variable `c1'. If -l was given, increase
5978 `char_number' by the number of bytes read, after producing output,
5979 rather than by the offset of the first differing bytes, before
5981 Replace if-else-if constructions with case statements for clarity.
5982 (bcmp2): Rename `n' to `nread'.
5984 Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
5986 * nl.c (proc_text): Use re_search instead of re_match.
5988 Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
5990 * nl.c: Indent. Un-nest statements. Use GNU regexp functions
5991 instead of System V ones. Move function declarations together.
5992 (quit): Remove useless function.
5993 (program_name): New variable for error messages.
5994 (main): Use perror in error message.
5995 (xmalloc): New function to replace myalloc.
5996 (myalloc): Function removed.
5997 Global: use program_name and xmalloc.
5999 Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
6001 * uniq.c: Declare some functions.
6002 (main): Initialize infile and outfile. Call usage if given
6003 invalid args. Normally exit with 0 status instead of garbage.
6004 (usage): New function to print usage message and exit.
6005 (check_file): Remove unused variable.
6006 (readline): Compare against EOF, not < 0.
6007 (xmalloc, xrealloc): Return char *, not int.
6008 Ok to return 0 if 0 bytes requested.
6009 (lb1, lb2): Remove unused global vars.
6010 (concat): Remove unused function.
6012 Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
6014 * comm.c: Remove unused global variables lb1, lb2.
6015 (main): Remove unneeded variable.
6016 (compare_files): Remove unused arg.
6017 (readline): un-nest assignment. Test against EOF instead of < 0.
6018 (error): Print to stderr, not stdout.
6019 (xmalloc, xrealloc): Return char * instead of int.
6020 Returning 0 is ok if 0 bytes requested (ANSI C).
6024 version-control: never