1 1999-11-05 Jim Meyering <meyering@ascend.com>
3 * src/system.h: Use HAVE_STRUCT_STAT_ST_BLKSIZE not HAVE_ST_BLKSIZE.
5 * configure.in: Move some type/header/member tests into
6 m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of
7 fileutils, textutils, and sh-utils.
9 1999-11-04 Paul Eggert <eggert@twinsun.com>
11 * src/sort.c (SORTALLOC): New macro.
12 (sortalloc, mergealloc, LINEALLOC): Use it.
13 (sortalloc, mergealloc, linelength): Now const.
14 (sortalloc): Increase from 0.5 to 8 MB.
15 (mergealloc): Increase from 16 to 256 kB.
16 (LINEALLOC): Increase from 0.25 to 4 MB.
18 1999-11-03 Paul Eggert <eggert@twinsun.com>
20 * NEWS, doc/textutils.texi:
21 Do not consider newline to be part of a line when comparing lines
22 in `sort' and `comm'. POSIX.2 requires that we consider newline,
23 but this is a bug in the spec and the bug will likely be fixed.
24 * src/comm.c (compare_files): Likewise.
25 * src/sort.c (begfield, limfield, findlines, keycompare, compare):
27 * tests/sort/Test.pm: Update tests `use-nl' and `11d' to reflect
30 * lib/linebuffer.c (readline): Do not leave room for an extra
31 byte after the newline; it's no longer needed.
32 * src/sort.c: (sortalloc, mergealloc, fillbuf, checkfp, mergefps):
35 * lib/memcoll.c (memcoll): The two arguments cannot be
36 adjacent any more, so remove the alloca/copy workaround for
39 1999-11-03 Jim Meyering <meyering@ascend.com>
41 Fix so that `tail -fn 2 file' works again.
42 * src/tail.c (anonymous enum) [LONG_FOLLOW_OPTION]: Define.
43 (long_options): Use LONG_FOLLOW_OPTION here, instead of 'f'.
44 (main): Remove the `::' after the `f' in getopt_long string.
45 Add `case LONG_FOLLOW_OPTION' after `case 'f':'.
46 Based on a patch from Tim Waugh.
48 * src/tail.c (anonymous enum) [RETRY_OPTION]: Define.
49 [MAX_UNCHANGED_STATS_OPTION]: Likewise.
50 [MAX_CONSECUTIVE_SIZE_CHANGES_OPTION]: Likewise.
51 [PID_OPTION]: Likewise.
52 (long_options): Use *_OPTION instead of CHAR_MAX + N.
55 1999-11-02 Jim Meyering <meyering@ascend.com>
57 * man/help2man: Import version 1.018.
58 * man/Makefile.maint ($(man_MANS)): Remove use of --name=... option.
59 * man/*.x: Include one-line summary in [NAME] section.
60 * man/Makefile.summ (cat-summary): Remove now-unused file.
61 Suggestion for clean-up from Akim Demaille.
63 1999-11-01 Jim Meyering <meyering@ascend.com>
65 * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
67 1999-10-20 Jim Meyering <meyering@ascend.com>
69 * src/tail.c (recheck): Don't refuse to tail a non-regular, non-pipe.
70 (tail_file): Likewise.
72 1999-10-07 Jim Meyering <meyering@ascend.com>
74 * configure.in (ALL_LINGUAS): Add Japanese (ja).
76 1999-10-04 Jim Meyering <meyering@ascend.com>
78 * depcomp: New file, for automake's new dependency support.
79 * missing: New version, from automake's user-dep-gen-branch.
81 1999-09-28 Jim Meyering <meyering@ascend.com>
83 * src/system.h: Update from the system.h from fileutils.
85 * lib/error.c (error_at_line): Use strerror portably here, too,
86 just as was done in error.
88 1999-09-02 Jim Meyering <meyering@ascend.com>
90 * src/cut.c: Remove xstrdup declaration.
91 * src/sort.c: Likewise.
92 * src/tsort.c: Likewise.
94 1999-08-22 Jim Meyering <meyering@ascend.com>
96 * src/tsort.c (detect_loop): There's no loop if k->top is NULL.
97 Niklas Edmundsson showed how to make tsort segfault.
99 * tests/tsort/Makefile.am: Rewrite to use Fetish.pm-based framework.
100 * tests/tsort/basic-1: New file.
101 Add a few more tests.
102 * tests/tsort/Test.pm: Remove.
104 * man/help2man: Escape backslashes so tr's manual comes out right.
105 Reported by Andreas Schwab.
107 * src/tsort.c (usage): Correct address for bug reports.
108 (tsort): Remove trailing `\n' in error format.
110 * src/md5sum.c (md5_check): Remove trailing `\n' in error format.
112 * src/sys2.h (IF_LINT): Define new macro.
113 * src/od.c (dump): Use IF_LINT macro instead of #ifdef lint...
115 * src/paste.c (paste_parallel): Likewise.
116 * src/pr.c (read_line): Likewise.
117 * src/sort.c (checkfp): Likewise.
118 (mergefps): Likewise.
120 * src/cksum.c (cksum): Constify a char*.
121 * src/comm.c (writeline): Likewise.
123 * src/uniq.c (check_file): Move declarations of local variables
124 into the scopes where they're used.
125 (min): Remove macro definition.
126 (different): Use MIN, not min.
127 (SWAP_LINES): New macro.
128 (check_file): Use it here.
130 * src/uniq.c (check_file): Generate each line of output earlier,
131 when possible. It is possible when using none of these options:
132 --count, -repeated, --all-repeated, --unique.
133 Based on a patch from Ian Turner.
135 1999-08-15 Jim Meyering <meyering@ascend.com>
137 * src/tail.c (ENOSYS): Define to a bogus value if not already defined.
139 1999-08-13 Eli Zaretskii <eliz@is.elta.co.il>
141 * src/tail.c (parse_options): Warn if --pid=PID is used and kill()
142 returns ENOSYS (e.g. when compiled with DJGPP).
144 1999-08-13 Jim Meyering <meyering@ascend.com>
146 * src/tsort.c (usage): Use consistent bug-reporting address.
148 * tests/tsort/Test.pm: New file.
149 * tests/tsort/Makefile.am: New file.
150 * tests/tsort: New directory.
151 * tests/Makefile.am (SUBDIRS): Add tsort.
152 * configure.in (AC_OUTPUT): Add tests/tsort/Makefile.
154 1999-08-11 Paul Eggert <eggert@twinsun.com>
156 * doc/textutils.texi: Document how to ignore newline during sort.
158 1999-08-07 Jim Meyering <meyering@ascend.com>
160 * po/POTFILES.in: Add lots of lib/*.c files. Remove src/system.h.
162 1999-08-06 Jim Meyering <meyering@ascend.com>
166 * src/sort.c: Include file name in `write error' diagnostics.
167 (write_bytes): Add output_file parameter and use it. Update callers.
168 (mergefps): Likewise.
171 Reported by John Summerfield.
173 1999-08-05 Jim Meyering <meyering@ascend.com>
175 * src/tail.c (Follow_mode): Remove comma at end of enumerator list.
176 Reported by Kaveh Ghazi.
178 * config.sub: Update from autoconf.
179 * config.guess: Update from autoconf.
181 1999-08-04 Jim Meyering <meyering@ascend.com>
185 * configure.in: Remove inadequate getline-testing code. md5sum would
186 segfault on HPUX because of the getline function in their C library.
187 Use the AM_FUNC_GETLINE test in m4/ instead.
189 1999-08-03 Jim Meyering <meyering@ascend.com>
191 * src/tail.c (tail_forever): When following by name and calling recheck
192 because of exceeding max_n_consecutive_size_changes_between_opens,
193 `continue' so we don't fall through and (assuming the file finally grew)
194 get the erroneous `file truncated' message. This was hard to reproduce.
196 1999-08-01 Jim Meyering <meyering@ascend.com>
200 * configure.in (AM_C_PROTOTYPES): Move test to precede a few
201 header tests -- merely on principle.
203 1999-08-01 Paul Eggert <eggert@twinsun.com>
205 * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS.
207 1999-07-16 Paul Eggert <eggert@twinsun.com>
209 * lib/quotearg.c (quotearg_buffer):
210 Don't quote spaces if C quoting style.
212 1999-07-31 Jim Meyering <meyering@ascend.com>
214 * src/tail.c (tail_forever): Don't call kill if pid is 0.
215 Detect when `writer_is_dead' also when the writer is some other user.
218 * src/tail.c (parse_options): Warn if --pid=PID is used without -f.
220 1999-07-30 Jim Meyering <meyering@ascend.com>
224 * src/tail.c: New option: --pid=PID.
225 Include signal.h for kill prototype.
227 (long_options): Add `pid'.
228 (usage): Describe it.
229 (tail_forever): Implement it.
230 (parse_options): Handle the new option and required arg.
231 Suggestion and pseudo-code from Karl Heuer.
233 1999-07-27 Jim Meyering <meyering@ascend.com>
235 * lib/linebuffer.c: Include <sys/types.h> now that linebuffer.h uses
236 size_t. This is required on at least SunOS4. From Kaveh Ghazi.
238 1999-07-26 Jim Meyering <meyering@ascend.com>
240 * src/sys2.h (PID_T_MAX): Define.
242 * src/tail.c (struct File_spec) [n_stat_calls]: Remove unused member.
244 1999-07-25 Jim Meyering <meyering@ascend.com>
246 * src/pr.c (usage): Remove `NEWS'-style paragraph (sorry to have
247 let that in, translators).
251 1999-06-01 Volker Borchert <bt@teknon.de>
253 * tests/Makefile.am: Make envvar-check depend on check-recursive rather
254 than on `check' so that its tests are performed before any real tests.
256 1999-07-20 Jim Meyering <meyering@ascend.com>
258 * configure.in (AC_REPLACE_FUNCS) Remove memmove, now that it's
259 AC_REPLACE...'d in m4/jm-macros.m4.
261 * src/wc.c (posixly_correct): Declare global.
262 (write_counts): Use it to select printf formats.
263 (main): Set posixly_correct from the POSIXLY_CORRECT envvar.
266 1999-07-15 Jim Meyering <meyering@ascend.com>
268 * tests/md5sum/Makefile.am: Revert the 1999-02-15 change.
269 * tests/md5sum/basic-1, newine-1: Add --text for each individual test.
270 Reported by Eli Zaretskii.
272 1999-07-12 Jim Meyering <meyering@ascend.com>
274 * configure.in (ALL_LINGUAS): Add Slovak (sk).
276 1999-07-11 Jim Meyering <meyering@ascend.com>
278 * src/tail.c (recheck): Use assert instead of unnecessary close_fd.
279 Remove a couple of unnecessary FIXME comments.
281 1999-07-10 Jim Meyering <meyering@ascend.com>
283 * doc/textutils.texi: Document new tail options.
285 * src/tail.c (struct File_spec) [tailable]: Rename from `missing' and
286 document. Change all uses and locals like was_missing to was_tailable.
287 Invert expressions as appropriate.
288 (reopen_inaccessible_files): Rename from allow_missing.
289 (sleep_interval): Describe.
290 (--allow-missing): Deprecate.
291 (--retry): New option, equivalent to --allow-missing.
292 (usage): Document name vs. descriptor differences.
293 Refer to manual for descriptions of --max-unchanged-stats=N
294 and --max-consecutive-size-changes=N.
295 (valid_file_spec): New function.
296 (recheck): Assert valid_file_spec.
297 Remove dead else-if block (suggestion from Eli Zaretskii).
298 Adjust stmts that set f->tailable -- unlike for `missing', tailable
299 doesn't depend on errno == ENOENT.
300 (parse_options): Give a warning if --retry is used when not following
303 * tests/join/Test.pm: New test case (but commented out) for
304 Paul's 1999-06-01 fix.
306 1999-07-09 Jim Meyering <meyering@ascend.com>
308 * configure.in (ALL_LINGUAS): Add Greek (el).
310 1999-07-04 Jim Meyering <meyering@ascend.com>
312 * tests/join/Test.pm: New test case for Paul's 1999-06-03 fix.
314 1999-07-03 Eli Zaretskii <eliz@is.elta.co.il>
316 * src/tail.c (struct File_spec): New member, errnum.
317 (recheck): Record the new value of errno in f->errnum. Don't
318 output an error message unless the new value of errno differs from
319 the old one. Output a message if previously-inaccessible file
321 (tail_forever): Always recheck files whose fd is negative. If the
322 file cannot be fstat'ed, record the errno value in f[i].errnum.
323 (tail_file): If the file cannot be open, record the errno value in
324 f->errnum. If it can be opened, initialize f->errnum to zero. If
325 it's a non-regular non-fifo file, initialize f->errnum to -1.
327 1999-06-21 Jim Meyering <meyering@ascend.com>
329 * doc/textutils.texi: Use lower case characters in sc{} context.
330 Reported by Eli Zaretskii.
332 1999-06-03 Paul Eggert <eggert@shade.twinsun.com>
334 * src/join.c (xfields): Only <blank>s separate fields, not <space>s.
336 1999-06-01 Paul Eggert <eggert@twinsun.com>
338 * lib/linebuffer.c (readline): Leave room for an extra byte
339 after the newline; comm needs this for memcoll.
341 1999-06-01 Paul Eggert <eggert@twinsun.com>
343 Add LC_COLLATE support to `join'.
345 * doc/textutils.texi: Describe join and LC_COLLATE.
347 * src/join.c: Add support for LC_COLLATE locale.
348 Include hard-locale.h, linebuffer.h, memcoll.h.
349 (struct line): New member `buf', replacing `beg' and `lim'.
351 (hard_LC_COLLATE): New var.
352 (main): Initialize it.
353 (get_line): Use readline to read the line,
354 instead of doing it by hand.
355 That way, we get a buffer that we can pass to memcoll.
356 (keycmp): Use memcoll to compare lines if hard_LC_COLLATE is nonzero.
358 1999-05-27 Volker Borchert <bt@teknon.de>
360 * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix.
362 1999-05-25 Paul Eggert <eggert@twinsun.com>
364 Add LC_COLLATE support to `comm', so that `comm' is compatible
365 with `sort' in nontrivial locales.
367 * doc/textutils.texi: Document locale-specific mode for comm.
369 * lib/Makefile.am (libtu_a_SOURCES): Add hard-locale.c, memcoll.c.
370 (noinst_HEADERS): Add hard-locale.h, memcoll.h.
372 * src/comm.c: Include hard-locale.h, memcoll.h.
373 (hard_LC_COLLATE): New variable.
374 (compare_files): Use memcoll to compare if hard_LC_COLLATE.
375 (main): Initialize hard_LC_COLLATE from locale.
377 * src/sort.c: Include hard-locale.h, memcoll.h.
378 (hard_LC_COLLATE, hard_LC_CTYPE, hard_LC_TIME): New variables,
379 replacing `need_locale'.
380 (memcoll): Move to lib/memcoll.c.
381 (keycompare): No need to alloc (0), since our caller now does it.
382 (compare): alloca (0) before returning.
383 (my_setlocale): Remove; hard_locale now dows this.
384 (main): Invoke setlocale, bindtextdomain, and textdomain before
385 invoking anything that might print an error.
386 Use hard_locale to determine which locales are hard.
388 * lib/hard-locale.c, lib/hard-locale.h, lib/memcoll.c, lib/memcoll.h:
391 1999-05-25 Paul Eggert <eggert@shade.twinsun.com>
393 * lib/linebuffer.c (readline):
394 Append trailing newline to line.
396 [struct linebuffer] (size): Declare to be of type size_t, not long.
397 [struct linebuffer] (length): Likewise.
398 * src/comm.c, (writeline): Lines now contain trailing newline.
399 * src/uniq.c (find_field, different): Use size_t, not int, for lengths.
400 (writeline): Lines now contain trailing newline.
401 (check_file): Use size_t, not int, for lengths.
402 * src/nl.c (proc_text, check_section, main): More of the same.
404 * lib/linebuffer.h (struct linebuffer): Use size_t for sizes.
405 src/nl.c (header_del_len, body_del_len, footer_del_len, main):
407 src/uniq.c (find_field, different, check_file): Likewise.
409 * lib/linebuffer.c (readline): Silently append trailing
410 newline if needed. Do not bother setting buffer length to 0
411 at EOF, since it's not part of the spec and nobody relies on
412 it. Do not compute the difference between unrelated pointers.
414 1999-05-25 Paul Eggert <eggert@twinsun.com>
416 * src/tac.c (memrchr): Ifdef out this unused function.
418 1999-05-25 Jim Meyering <meyering@ascend.com>
420 * doc/textutils.texi (Squeezing): Remove misleading square brackets
421 from SET1 in the one-word-per-line example.
423 1999-05-22 Jim Meyering <meyering@ascend.com>
425 * lib/Makefile.am (libtu_a_SOURCES): Remove memchr.c.
430 1999-05-22 Paul Eggert <eggert@twinsun.com>
432 * doc/textutils.texi: Document locale-specific changes to `sort',
433 as well as the new, POSIX-compliant definition of line comparison,
434 and -g's more careful treatment of NaNs, infinities and zeros.
436 * src/sort.c (general_numcompare): Put exceptional cases
437 first, not last, to be consistent with -M.
439 1999-05-21 Paul Eggert <eggert@twinsun.com>
441 * src/sort.c (strtod): Declare if STDC_HEADERS is not defined.
442 (general_numcompare): Use strtod, not xstrtod.
443 Do not consider partial conversions to be errors.
444 Put -infinity at the start, and +infinity at the end;
445 follow +infinity with NaNs (sorted by bit pattern),
446 and finally by conversion errors.
448 1999-05-21 Jim Meyering <meyering@ascend.com>
450 * tests/sort/Test.pm (11d): Reverse lines in expected output
451 to reflect latest change.
452 (use-nl): New test from Paul Eggert.
454 1999-05-20 Paul Eggert <eggert@twinsun.com>
456 * src/sort.c: Treat the trailing newline as part of the line,
457 as required by POSIX.2.
459 (struct line, findlines, compare, checkfp, mergefps, sort):
460 A line now includes its trailing newline.
461 (findlines): Do not replace newline with NUL.
462 (memcoll, keycompare): Work even if the data to be compared are
463 adjacent strings; this is possible now that lines contain the
465 (fillbuf): Always have an unused byte at the end of the buffer,
466 since memcoll and keycompare want to modify a byte after the last line.
467 (sortalloc, mergealloc): Increase by 1, for trailing byte.
469 1999-05-20 Jim Meyering <meyering@ascend.com>
471 * tests/sort/Test.pm: Add test case from Paul Eggert.
473 1999-05-20 Paul Eggert <eggert@twinsun.com>
475 * src/sort.c (keycompare): Ignore any length difference if the
476 localized comparison says the strings are equal.
478 * src/sort.c (memcoll, keycompare, compare): Handle NUL
479 characters properly when comparing with LC_COLLATE semantics.
480 (NLS_MEMCMP): Remove.
481 (memcoll): Renamed from strncoll.
482 Take separate lengths for each string.
483 This function is now invoked only when need_locale.
484 (keycompare): Don't copy strings when ignore and translate
487 1999-05-18 Paul Eggert <eggert@twinsun.com>
489 * src/sort.c (MONTHTAB_CONST): Renamed from NLS_CONST; the use
490 is also changed. Define to const also if !HAVE_NL_LANGINFO.
492 (usage): `,' -> `;' (English typo).
494 1999-05-17 Eli Zaretskii <eliz@is.elta.co.il>
496 * src/cat.c (main): When stdout is in binary mode, make sure all
497 input files are also read in binary mode.
499 1999-05-16 Jim Meyering <meyering@ascend.com>
503 1999-05-11 Paul Eggert <eggert@twinsun.com>
505 * src/sort.c: Don't autodetect the locale of numbers and
506 months, as this conflicts with POSIX.2 and is tricky to boot.
508 (FLOATING_COMMA, NLS_STRNCMP, NLS_MAX_GROUPS,
509 NLS_ONE_CHARACTER_STRING): Remove macros no longer used.
511 (nls_grouping, nls_fraction_found, nls_month_found, nos_monthtab,
512 nls_months_collide, nls_keyhead, us_monthtab): Remove variables no
515 (struct nls_keyfield): Remove types no longer used.
517 (strncoll_s2_readonly, nls_set_fraction, look_for_fraction,
518 nls_month_is_either_locale, nls_numeric_format): Remove functions no
521 (monthtab): Now has the role that us_monthtab had, but it's const only
522 if ENABLE_NLS is not defined.
524 (C_DECIMAL_POINT): Renamed from FLOATING_POINT. All uses changed.
525 (MONTHS_PER_YEAR): Renamed from NLS_NUM_MONTHS. All uses changed.
526 (struct_month_cmp): Renamed from nls_sort_month_comp. All uses changed.
527 Use strcmp, not strcoll, since the user doesn't care about collating
530 (inittables): Read locale data into monthtab, rather than modifying a
531 separate month table and futzing with indirection. Do not worry about
532 colliding months, since we no longer autodetect month locale.
534 (fraccompare): Don't set no-longer-used variable nls_fraction_found.
536 (getmonth): Use strncmp to compare months, since user doesn't care
537 about collating here. Fix bug where code incorrectly assumed that
538 strlen (monthtab[lo].name) == strlen (monthtab[ix].name).
540 (keycompare, main): Don't autodetect month locale.
542 (compare): Don't use NLS_MEMCP in code that can't be executed if
543 need_locale is false, as NLS_MEMCP is equivalent to memcmp in that
546 (sort, insertkey, main): Don't autodetect numeric locale.
548 1999-05-15 Jim Meyering <meyering@ascend.com>
550 * tests/join/Test.pm (trailing-sp): New test for this fix.
551 * src/join.c (xfields): Don't interpret a trailing blank as a
552 delimiter when e.g. -t: was specified. From Tim Smithers.
554 1999-05-12 Jim Meyering <meyering@ascend.com>
556 * tests/Makefile.am (envvar-check): Renamed from check-local.
557 (check): Depend on envvar-check so the envvar check is performed
558 before all other tests. Reported by Volker Borchert.
559 * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects,
560 so CDPATH is mentioned in the message. Reported by Volker Borchert.
562 1999-05-11 Jim Meyering <meyering@ascend.com>
564 * src/sort.c (usage): Split the --help message into two pieces so that
565 neither is longer than 2048. For Irix4's cc. Reported by Kaveh Ghazi.
567 1999-05-09 Jim Meyering <meyering@ascend.com>
569 * lib/regex.c: Update from libc.
573 * Makefile.maint (alpha): Put the announcement in
574 /tmp/announce-$(distdir)
576 * tests/sort/Test.pm (neg-nls): New test.
578 1999-05-08 Jim Meyering <meyering@ascend.com>
580 * src/system.h (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM,
581 and all the *_MIN and *_MAX symbols): Remove definitions.
582 * src/sys2.h: Put the definitions here instead (this file is shared
583 between all three *utils packages, while system.h is not).
585 1999-05-06 Paul Eggert <eggert@twinsun.com>
587 * src/sort.c (fraccompare, numcompare): Merge the NLS and
588 non-NLS versions into a single function.
590 (decimal_point): Now char, since we no longer convert to unsigned
592 (th_sep): Now int, since we use a value out of char range to denote
593 the absence of a thousands separator.
594 (IS_THOUSANDS_SEP): New macro.
595 (USE_NEW_FRAC_COMPARE): Remove.
596 (nls_set_fraction): Arg is now char, not unsigned char.
597 Set th_sep to CHAR_MAX + 1 if there is no thousands separator.
598 (numcompare): Don't convert to unsigned char unless necessary.
599 (main): Turn off decimal points and thousand separators if they
600 are multibyte characters, as we don't support that yet.
602 1999-05-06 Paul Eggert <eggert@twinsun.com>
604 * src/system.h (CHAR_MIN, CHAR_MAX): New macros.
605 (SCHAR_MIN, SCHAR_MAX): Don't assume that char is signed.
607 1999-05-06 Paul Eggert <eggert@twinsun.com>
609 * src/sort.c (numcompare): Handle comparison of two negative
610 numbers correctly in the ENABLE_NLS case.
612 1999-05-04 Jim Meyering <meyering@ascend.com>
614 * src/pr.c (usage): Break the usage message into 3 pieces instead of
615 only 2. The strings had grown to be longer than 2048, which evokes
616 errors when compiling with Irix4's cc. Reported by Kaveh Ghazi.
618 * src/tsort.c (search_item): Use `1' instead of `+1'. The latter
619 elicits a syntax error from SunOS4's cc. From Kaveh Ghazi.
621 1999-05-03 Jim Meyering <meyering@ascend.com>
623 * src/ptx.c <ctype.h>: Don't include.
624 [!STDC_HEADERS]: Remove definitions of ctype macros.
625 Convert e.g., isspace to ISSPACE to use definitions from sys2.h.
626 Reported by Kaveh Ghazi.
628 * src/sys2.h (TOLOWER): Define.
630 * src/join.c (TOLOWER): Remove definition.
631 * src/md5sum.c: (TOLOWER): Remove definition.
633 1999-04-30 Jim Meyering <meyering@ascend.com>
635 * src/sort.c (usage): Document the differences between the
636 obsolescent, +POS1[-POS2] form, and the POSIX -k option.
638 1999-04-24 Jim Meyering <meyering@ascend.com>
640 * configure.in: Use AC_CANONICAL_HOST.
642 * lib/Makefile.am (libtu_a_SOURCES): Add xstrtoumax.c
643 (noinst_HEADERS): Remove xstrtoul.h.
645 * src/csplit.c: Include new "xstrtol.h", not "xstrtoul.h".
646 (struct control) [repeat]: Declare as uintmax_t, not int.
647 (struct control) [lines_required]: Likewise.
648 (handle_line_error): Use human_readable to print lines_required.
649 (parse_repeat_count): Parse a uintmax_t.
650 (parse_patterns): Parse a uintmax_t.
652 * src/tail.c: Include new "xstrtol.h", not "xstrtoul.h".
653 * src/od.c: Likewise.
655 * src/head.c: Include new "xstrtol.h", not "xstrtoul.h".
656 Change all U_LONG_LONG to uintmax_t.
657 (head_lines): Move a couple dcls into an inner scope.
658 (string_to_integer): Rename from string_to_ull.
660 1999-04-19 Jim Meyering <meyering@ascend.com>
662 * Makefile.maint (b_host): Remove /pub suffix.
664 1999-04-18 Jim Meyering <meyering@ascend.com>
668 * Makefile.maint (my-distcheck): Use AMTAR, not TAR.
670 * src/sort.c (usage): s/DIRECT/DIRECTORY/g
671 Rename global: s/temp_file_prefix/temp_dir/.
672 (NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,
673 not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than
675 (tempname): Wrap after 99999 only for length-impaired file systems.
677 1999-04-17 Jim Meyering <meyering@ascend.com>
679 * src/tail.c (file_lines): Fix serious bug introduced with last changes.
682 1999-04-15 Jim Meyering <meyering@ascend.com>
684 * tests/Makefile.am (EXTRA_DIST): Rename .posix-warn to .env-warn.
685 (check-local): Warn about CDPATH in the same way
686 we warn about POSIXLY_CORRECT, since the cp/same-file test fails at
687 least when using bash with CDPATH set. Reported by Mark Hewitt.
689 * src/pr.c Add comments.
690 (init_header): Tweak white space in Date/Time header.
691 * tests/pr/Test.pm: Updated all tests to reflect the big
692 1999-02-13 change. From Roland Huebner.
694 1999-04-12 Jim Meyering <meyering@ascend.com>
696 * src/cat.c (main): Declare out_dev to be of type dev_t, not `int'.
697 Declare out_ino to be of type ino_t, not `int'.
700 * src/od.c (MIN, MAX): Remove definitions.
701 * src/sys2.h (MIN, MAX): Define here instead.
702 Reported by John Bley.
704 1999-04-11 Jim Meyering <meyering@ascend.com>
708 * tests/pr/Test.pm (test_vector): Disable all tests while I wait for
711 Fix the problem whereby `yes > k & sleep 1; tail -2c k' would infloop.
712 * src/tail.c (COPY_TO_EOF): Define.
713 (dump_remainder): Add parameter, n_bytes, and rewrite to use it.
715 (file_lines): Rename parameter.
716 (tail_bytes): Remove obsolete comment.
718 Fix the problem whereby `yes > k & sleep 1; tail -1 k' would infloop.
719 * src/tail.c (dump_remainder): Move this function to precede the
720 new use in file_lines.
721 (tail_lines): Don't call dump_remainder here.
722 (file_lines): Call dump_remainder here instead.
723 Reported by Lehti Rami.
725 * lib/readtokens.c (readtoken, readtokens): Protoize.
727 1999-04-10 Jim Meyering <meyering@ascend.com>
729 * src/tail.c (xwrite): Use STDOUT_FILENO instead of literal `1'.
731 1999-04-04 Jim Meyering <meyering@ascend.com>
733 * src/cat.c: Standardize --help and --version processing.
734 * src/comm.c: Likewise.
735 * src/csplit.c: Likewise.
736 * src/cut.c: Likewise.
737 * src/expand.c: Likewise.
738 * src/fmt.c: Likewise.
739 * src/fold.c: Likewise.
740 * src/head.c: Likewise.
741 * src/join.c: Likewise.
742 * src/md5sum.c: Likewise.
743 * src/nl.c: Likewise.
744 * src/od.c: Likewise.
745 * src/paste.c: Likewise.
746 * src/pr.c: Likewise.
747 * src/ptx.c: Likewise.
748 * src/split.c: Likewise.
749 * src/sum.c: Likewise.
750 * src/tac.c: Likewise.
751 * src/tail.c: Likewise.
752 * src/tr.c: Likewise.
753 * src/unexpand.c: Likewise.
754 * src/uniq.c: Likewise.
755 * src/wc.c: Likewise.
757 1999-03-29 Jim Meyering <meyering@ascend.com>
759 * configure.in (GNU_PACKAGE): Remove related code -- now it's in
760 the catch-all for shared autoconf code, m4/jm-macros.m4.
761 (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
764 1999-03-26 Jim Meyering <meyering@ascend.com>
766 * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
767 (noinst_HEADERS): Add version-etc.h.
769 1999-03-25 Jim Meyering <meyering@ascend.com>
771 * src/tail.c (recheck): Factor out a block of duplicated code.
772 Set f->size to 0 upon encountering a new file so we read it from
773 the beginning rather than from then end of the first line or
774 block. Otherwise, after a log rotation, tail would omit the first
775 line or block of the new file. Reported by Ed Avis.
777 1999-03-20 Jim Meyering <meyering@ascend.com>
779 * tests/Makefile.am (SUBDIRS): Temporarily remove pr.
781 1999-03-13 Jim Meyering <meyering@ascend.com>
783 * src/tac.c: (tac_mem): `#if-0'-out this unused function.
784 (tac_stdin_to_mem): Likewise.
786 * doc/textutils.texi (cut invocation): Describe --output-delimiter.
788 1999-03-12 Jim Meyering <meyering@ascend.com>
790 * src/sys2.h (SETVBUF): Define new macro.
791 * src/tail.c (dump_remainder): Don't fflush stdout here.
792 (main) [if forever]: Make stdout unbuffered, instead.
793 Akim Demaille pointed out that when running `echo x>a; tail -f a>>a' ,
794 the file `a' didn't grow longer than two lines. Now it grows
797 1999-03-07 Jim Meyering <meyering@ascend.com>
799 * tests/md5sum/newline-1: Test for the actual feature.
800 With help from Eli Zaretskii.
802 * src/pr.c (usage): Add missing \n\.
804 The newline test would always fail on MSDOS/Windows systems --
805 so move it to a separate file where we can test for that.
806 * tests/md5sum/basic-1: Remove newline test.
807 * tests/md5sum/newline-1: New file.
808 * tests/md5sum/Makefile.am (TESTS): Add newline-1.
809 Pointed out by Eli Zaretskii.
811 1999-02-13 Roland Huebner <rh@pelikan.cologne.de>
813 (main): Redefine options -s, -w to be POSIX compliant; introduce
814 new options -J, -S, -W to disentangle -s and -w when used together
815 with the three column options;
816 (add_line_number): Make POSIX compliant; use default number
817 separator TAB with single column output.
818 (add_line_number): Make POSIX compliant; with multicolumn output
819 now prefer `text columns of equal width' rather than a consequent
820 use of `default n-separator TAB'.
821 (add_line_number): Change line number cut-off from lower-oder to
822 higher-oder digit to avoid loss of information; no consequent
823 handling exists in different utilities and other UNIXes.
824 (char_to_clump): Expand input text tabs to 8 spaces, if
825 input_tab_char doesn't equal TAB (adapted to other UNIXes).
826 (usage): Update POSIX compliant options -s, -w; add new options -J,
828 (main): Update the source internal documentation.
829 Some smaller BUGFIXES (print_sep_string, init_header, skip_to_page,
830 reset_status, print_header).
832 * tests/md5sum/basic-1 (backslash): Use .\foo instead of \.foo so we
833 don't tramp on root directory in MSDOS/Windows.
834 Suggestion from Eli Zaretskii.
836 1999-02-15 Eli Zaretskii <eliz@is.elta.co.il>
838 * tests/md5sum/Makefile.am (TESTS_ENVIRONMENT): Run md5sum with the
839 --text option (for MSDOS).
841 1999-03-06 Jim Meyering <meyering@ascend.com>
843 * src/cut.c (getstr): Change type of `delim' parameter from char to int.
844 (cut_fields): Cast to `unsigned char' before comparing.
845 (main): Cast to `unsigned char' before assigning.
847 * tests/cut/Test.pm: Add a test to exercise the bug.
849 * src/ptx.c (swallow_file_in_memory): Use a `%s' format in error call,
850 in case the argument string contains a `%'.
852 * src/fmt.c (main): Likewise.
853 * src/sort.c (main): Likewise.
855 1999-02-13 Eli Zaretskii <eliz@is.elta.co.il>
857 * src/sys2.h [__DJGPP__]: Include <io.h> and <sys/exceptn.h>.
859 * src/ptx.c (swallow_file_in_memory): Slurp up the whole file at
860 once on MSDOS as well, but we have to relax the test for whether
861 reading it succeeded.
863 1999-03-03 Jim Meyering <meyering@ascend.com>
865 * src/cat.c: Include long-options.h
866 [long_options]: Remove the "help" and "version" entries.
867 Remove declarations of show_help and show_version.
868 (main): Use parse_long_options, including author name(s).
869 Remove the show_version and show_help blocks.
870 * src/cksum.c: Likewise.
871 * src/comm.c: Likewise.
872 * src/csplit.c: Likewise.
873 * src/cut.c: Likewise.
874 * src/expand.c: Likewise.
875 * src/fmt.c: Likewise.
876 * src/fold.c: Likewise.
877 * src/head.c: Likewise.
878 * src/nl.c: Likewise.
879 * src/od.c: Likewise.
880 * src/paste.c: Likewise.
881 * src/pr.c: Likewise.
882 * src/split.c: Likewise.
883 * src/sum.c: Likewise.
884 * src/tac.c: Likewise.
885 * src/tail.c: Likewise.
886 * src/tr.c: Likewise.
887 * src/unexpand.c: Likewise.
888 * src/uniq.c: Likewise.
889 * src/wc.c: Likewise.
891 * src/ptx.c: Include long-options.h
892 [long_options]: Remove the "help" and "version" entries.
893 Remove declarations of show_help and show_version.
894 (main): Remove `const' attribute from dcl of argv parameter.
895 Call bindtextdomain and textdomain.
896 Use parse_long_options, including author name(s).
897 Remove the show_version and show_help blocks.
899 * src/join.c (main): Include author name argument in call to
901 * src/md5sum.c (main): Likewise.
902 * src/sort.c (main): Likewise.
903 * src/tsort.c (main): Likewise.
905 1999-02-07 Jim Meyering <meyering@ascend.com>
909 * Makefile.maint (my-distcheck): Don't depend on dist, now that this
910 is hooked up to the distcheck rule.
911 * Makefile.am (distcheck-hook): New target and rule -- link to shared
912 rule, my-distcheck, in Makefile.maint.
914 1999-01-31 Jim Meyering <meyering@ascend.com>
916 * doc/textutils.texi: Wrap the @top node in @ifnottex instead of
917 @ifinfo so `makeinfo --html ...' works. From Karl Berry.
919 1999-01-30 Jim Meyering <meyering@ascend.com>
921 * acconfig.h: Remove lots of `#undef's, now that we use the
922 3-argument forms of AC_DEFINE* macros.
924 * configure.in: Require autoconf 2.13.
925 Use 3-argument form of AC_DEFINE*.
927 1999-01-24 Jim Meyering <meyering@ascend.com>
929 * src/tac.c (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.
931 * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
932 (and hence that of the local `n1', too) to `int' at Paul's request.
934 1999-01-18 Akim Demaille <demaille@inf.enst.fr>
936 * doc/textutils.texi: Harmonization of @samp use for options.
938 1999-01-17 Jim Meyering <meyering@ascend.com>
940 * Makefile.am (SUBDIRS): Add djgpp.
941 * configure.in (AC_OUTPUT): Add djgpp/Makefile.
942 * djgpp/: New directory.
944 * man/Makefile.maint ($(man_MANS)): Don't remove the target (the
945 man page) until after we've created its replacement.
947 1999-01-16 Eli Zaretskii <eliz@is.elta.co.il>
949 * GNUmakefile: Add SHELL = /bin/sh.
950 * man/GNUmakefile: Likewise.
952 1999-01-16 Jim Meyering <meyering@ascend.com>
954 * acconfig.h: Remove @BOTTOM@ section.
955 Instead, add the define and decl via m4/jm-macros.m4.
957 * lib/argmatch.h (XARGMATCH): Define to return a value once again.
958 (XARGCASEMATCH): Likewise.
960 * lib/argmatch.c (EXIT_FAILURE): Define.
961 (ARGMATCH_DIE): Provide default.
962 (__xargmatch_internal): New function.
963 s/rogram_name/program_name.
966 1999-01-14 Jim Meyering <meyering@ascend.com>
968 * tests/md5sum/basic-1: Use `f', not `x' as temp. file name to avoid
969 warnings from perl5.004.
970 Reported by Volker Borchert.
972 * lib/long-options.c (parse_long_options): Rename `usage' parameter
973 to avoid shadowing globally scoped function.
975 1999-01-14 Akim Demaille <demaille@inf.enst.fr>
977 * acconfig.h: Add a @BOTTOM@ section.
978 (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1).
980 * src/*.c: Don't prototype usage as static.
982 1999-01-10 Jim Meyering <meyering@ascend.com>
986 All of the following new code is protected by
987 `#if DONT_UNLINK_WHILE_OPEN'
988 * src/tac.c (file_to_remove): New global.
989 (fp_to_close): New global.
990 (unlink_tempfile): New function.
991 (record_tempfile): New function.
992 (save_stdin): Call record_tempfile.
994 (main): Use SET_BINARY and SET_BINARY2.
997 1999-01-09 Jim Meyering <meyering@ascend.com>
999 * tests/uniq/Test.pm: Add tests from Jochen Hein.
1000 * src/uniq.c: New option: --all-repeated (-D).
1001 (output_all_repeated) [output_mode]: New enum value.
1002 (usage): Describe it.
1003 (writeline): Test for new mode.
1004 (check_file): Likewise.
1005 Based on patches from Jochen Hein and Florin Iucha.
1006 (main): Diagnose `too many arguments'.
1008 * tests/head/Test.pm (null-1): Add test from Jochen Hein.
1010 * src/tail.c (parse_obsolescent_option): Interpret `number' as decimal.
1011 (parse_options): Likewise.
1012 Reported by Kamal Paul Nigam.
1014 * src/tail.c: New option: --max-unchanged-stats=N.
1015 New option: --max-n-consecutive-size-changes=N.
1017 1999-01-03 Jim Meyering <meyering@ascend.com>
1019 * src/md5sum.c (usage): Remove third program_name argument -- there
1020 were only two `%s' in the format string.
1022 1999-01-02 Jim Meyering <meyering@ascend.com>
1024 * src/tsort.c (tsort): Use a single call to error instead of two
1026 (main): Remove `%s: ' prefix on format string.
1028 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
1030 * src/ptx.c (format_vals): New array.
1031 (main): Use XARGMATCH in place of argmatch.
1033 * lib/argmatch.h (XARGMATCH): Don't return a value; instead,
1034 modify a parameter. Add a `Die_stmt' parameter.
1036 * lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
1037 (argmatch_to_argument): Add `const' attribute to first parameter.
1039 1999-01-01 Jim Meyering <meyering@ascend.com>
1041 * src/tsort.c: Move inclusion of assert.h to follow that of stdio.h.
1042 Some losing systems require this.
1043 Use STREQ macro instead of strcmp in a few places.
1045 * po/POTFILES.in: Add tsort.c.
1047 * man/Makefile.maint ($(man_MANS)): `exit 1' if any of help2man,
1048 chmod, or mv fails. Otherwise, the failure could go unnoticed.
1050 * man/Makefile.summ: Add entries for ptx and tsort.
1052 * src/tsort.c: Include readtokens.h.
1053 (zeros): Rename global from `rr'.
1054 (getstr): Remove function.
1055 (tsort) Use readtoken instead of getstr.
1057 * lib/readtokens.c: New file.
1058 * lib/readtokens.h: New file.
1059 * lib/Makefile.am (libtu_a_SOURCES): Add readtokens.c.
1060 (noinst_HEADERS): Add readtokens.h.
1062 * man/Makefile.am (man_MANS): Add ptx.1.
1063 * man/ptx.x: New file.
1065 * src/tail.c (parse_options): Use XARGMATCH in place of argmatch.
1067 * man/Makefile.am (man_MANS): Add tsort.1.
1068 * man/tsort.x: New (essentially empty) file.
1070 * src/tsort.c: Rename globals N and R so they don't shadow locals.
1071 (tsort): Rename from `sort'.
1073 1998-11-07 Mark Kettenis <kettenis@phys.uva.nl>
1074 * src/Makefile.am (bin_PROGRAMS): Add tsort.
1075 * src/tsort.c: New program.
1077 * lib/Makefile.am (libtu_a_SOURCES): Add quotearg.c.
1078 (noinst_HEADERS): Add quotearg.h.
1080 ============================
1081 All of the following are from:
1082 1998-04-17 Eli Zaretskii <eliz@is.elta.co.il>
1084 * src/system.h (SET_BINARY, SET_BINARY2, fileno, setmode): New
1087 * src/cat.c (usage) [O_BINARY]: Describe -B,--binary option.
1088 (main) [O_BINARY]: binary_files, binary_output, file_open_mode:
1089 new variables. Add --binary to long_options[]. Switch stdin and
1090 stdout to binary mode unless file contents are not important
1091 anyway. Open files in binary mode when required.
1093 * src/cksum.c (cksum) [O_BINARY]: Read redirected stdin in binary
1096 * src/expand.c (expand): Use binary I/O where appropriate.
1098 * src/head.c (head_bytes, head_lines) [O_BINARY]: Use binary I/O.
1100 * src/md5sum.c (OPENOPTS) [O_BINARY]: Use binary I/O when non-zero
1102 (md5_file) [O_BINARY]: Switch redirected stdin to binary mode.
1103 (main) [O_BINARY]: Use binary reads by default on those systems
1104 which care about the difference.
1106 * src/od.c (skip, read_char, read_block) [O_BINARY]: Switch input
1107 stream to binary mode.
1109 * src/sort.c (PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max
1110 file name characters in a given directory.
1111 (tempname): Make sure the temp file name is unique even if long
1112 file names aren't supported.
1114 * src/split.c (cwrite) [O_BINARY]: Write output in binary mode.
1115 (main) [O_BINARY]: Read input in binary mode.
1117 * src/sum.c (bsd_sum_file, sysv_sum_file) [O_BINARY]: Read input
1120 * src/tac.c (record_tempfile, unlink_tempfile)
1121 [DONT_UNLINK_WHILE_OPEN]: New functions, for systems where a file
1122 cannot be removed before it is closed.
1123 (save_stdin) [DONT_UNLINK_WHILE_OPEN]: Record the temporary file,
1124 to be removed before exit.
1125 (tac_file, save_stdin, main): Use binary I/O when appropriate.
1127 * src/tail.c (tail_lines, tail_bytes) [O_BINARY]: Use binary I/O
1130 * src/tr.c (main) [O_BINARY]: Use binary I/O when appropriate.
1132 * src/unexpand.c (unexpand): Use binary I/O where appropriate.
1134 * src/wc.c (wc): Use binary mode for input.
1136 * doc/textutil.texi: Add comments about peculiarities of Textutils
1137 operation on MS-DOS/MS-Windows.
1139 1998-12-22 Jim Meyering <meyering@ascend.com>
1141 * configure.in (ALL_LINGUAS): Add chinese (zh).
1143 1998-12-17 Jim Meyering <meyering@ascend.com>
1145 New options for tail:
1146 --follow=name, --follow=descriptor, --allow-missing
1147 * src/tail.c (Follow_mode): New enum.
1148 (n_live_files): New function.
1149 (tail_forever): Avoid starvation with --follow=name and a
1150 continually-growing unlinked or renamed file.
1152 1998-12-13 Jim Meyering <meyering@ascend.com>
1154 * tests/uniq/Test.pm: New file.
1155 * tests/uniq/Makefile.am: New file.
1156 * tests/uniq: New directory.
1157 * tests/Makefile.am (SUBDIRS): Add uniq.
1158 * configure.in (AC_OUTPUT): Add tests/uniq/Makefile.
1161 * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
1163 (EXTRA_DIST): Add xstat.in.
1164 * lib/stat.c: Remove file.
1165 * lib/lstat.c: Remove file.
1166 * lib/xstat.in (xstat@): New file.
1168 * configure.in (ALL_LINGUAS): Add Russian (ru).
1170 1998-10-31 Jim Meyering <meyering@ascend.com>
1172 * acconfig.h (stat): New #undef.
1174 1998-10-22 Jim Meyering <meyering@ascend.com>
1176 * src/fold.c (usage): Add mention of --version and --help.
1177 Reported by Matej Vela <mvela@public.srce.hr>.
1179 1998-10-04 Jim Meyering <meyering@ascend.com>
1181 * lib/fnmatch.h: New file. (unused)
1182 * lib/fnmatch.c: New file. (unused)
1183 * lib/Makefile.am (noinst_HEADERS): Add fnmatch.h.
1185 1998-10-03 Jim Meyering <meyering@ascend.com>
1187 * man/Makefile.am: Switch to using help2man.
1188 (EXTRA_DIST): Add Makefile.summ.
1190 * man/help2man: Invoke program with --manhelp option only if
1191 --name=STRING not specified. Otherwise, this would fail with `yes'.
1192 * man/Makefile.summ: New file.
1193 * man/Makefile.maint: Include it.
1194 * man/help2man: New file.
1195 * man/GNUmakefile: New file.
1196 * man/Makefile.maint: New file.
1197 * man/*.x: New files.
1198 * man/*.1: Remove files.
1200 * src/md5sum.c (split_3): Rename local variable, to `escaped_filename'.
1201 (main): Output the leading backslash not just when there's a newline
1202 in the file name, but also when there's a backslash.
1203 Reported by Jim Dennis.
1205 * tests/md5sum/basic-1: Add tests with filenames containing newline
1206 and backslash characters. (for the bug fixed above)
1208 * tests/Makefile.am (EXTRA_DIST): Add Fetish.pm.
1209 * tests/Fetish.pm: New file.
1211 * tests/md5sum/basic-1: New file: rewrite of old tests to use Fetish.pm.
1212 * tests/md5sum/Test.pm: Remove file.
1213 * tests/md5sum/Makefile.am: Rewrite.
1215 1998-09-19 Jim Meyering <meyering@ascend.com>
1217 * src/ptx.c (program_name): Declare *not* to be const.
1219 1998-08-29 Jim Meyering <meyering@ascend.com>
1221 * src/cut.c: Don't assume ASCII.
1222 * src/pr.c: Likewise.
1223 * src/tail.c: Likewise.
1225 1998-08-15 Jim Meyering <meyering@ascend.com>
1227 * src/pr.c (usage): Reformat.
1229 * src/ptx.c: Add braces to suppress warning about ambiguous `else'.
1230 * lib/bumpalloc.h: Likewise.
1232 1998-08-13 François Pinard <pinard@iro.umontreal.ca>
1234 * src/ptx.c: New file.
1235 * src/Makefile.am (bin_PROGRAMS): Add ptx.
1236 * lib/bumpalloc.h, lib/diacrit.h, lib/diacrit.c: New files.
1237 * lib/Makefile.am (libtu_a_SOURCES): Add diacrit.c.
1238 (noinst_HEADERS): Add bumpalloc.h and diacrit.h.
1240 1998-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1242 * src/pr.c (long_options): Add long names for all options.
1243 (usage): Update help string.
1244 (main): Handle the special options --pages and --columns.
1246 1998-08-02 Jim Meyering <meyering@ascend.com>
1248 * lib/linebuffer.c (readline): Return zero upon error as well as upon
1249 end of file. From James Youngman.
1252 1998-08-01 Jim Meyering <meyering@ascend.com>
1254 * src/sort.c (my_setlocale): Guard definition within #ifdef ENABLE_NLS.
1255 From Manfred Hollstein.
1257 1998-07-30 Jim Meyering <meyering@ascend.com>
1259 * tests/cut/Test.pm: Avoid broken pipe message for tests that fail
1262 * src/sort.c (usage): Add angle brackets to make `Report bugs...'
1263 message consistent with all the rest.
1265 1998-07-28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1267 * tests/cut/Test.pm: Avoid broken pipe for 'y' and 'z' tests.
1269 * src/sort.c (NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid
1270 clash with <langinfo.h>. All uses changed.
1272 1998-07-26 Jim Meyering <meyering@ascend.com>
1274 * intl/localealias.c (read_alias_file): Avoid mixing `char*' and
1275 `unsigned char*' variables. Again for irix4.
1276 Mostly from Kaveh Ghazi.
1278 * src/join.c: Convert some char* dcls to `unsigned char*' and remove
1279 a cast -- to placate irix4's cc.
1280 * src/fmt.c (check_punctuation): Add cast to placate irix4's cc.
1281 Reported by Kaveh Ghazi.
1283 * src/md5sum.c (split_3): Add cast to placate irix4's cc.
1286 1998-07-25 Jim Meyering <meyering@ascend.com>
1290 * tests/cut/Test.pm: Add tests for new --output-delimiter option,
1291 as well as for NUL input delimiter (--delimiter='').
1292 * src/cut.c (cut_fields): Honor new --output-delimiter option.
1293 (main): Fix handling of --delimiter='' (-d ''). Until now, it has
1294 never worked as advertised. I guess no one tried it.
1296 * tests/sort/Test.pm: Add two tests relating to this.
1297 * src/sort.c (main): Stat all non-`-' input file files (and fail if a
1298 stat fails) when an output file is specified by `-o' but doesn't exist.
1299 Reported by Will Edgington.
1301 * tests/sort/Test.pm: New tests of -o.
1303 1998-07-16 Jim Meyering <meyering@ascend.com>
1305 * lib/Makefile.am (noinst_HEADERS): Add lchown.h.
1306 * lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
1307 * lib/lchown.c: Include lchown.h.
1309 1998-07-04 Jim Meyering <meyering@ascend.com>
1311 * configure.in (AM_WITH_REGEX): Remove. Now the replacement
1312 macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
1313 * acconfig.h (WITH_REGEX): Remove undef.
1314 * src/csplit.c: Remove #ifdef around <regex.h> inclusion.
1315 * src/nl.c: Likewise.
1316 * src/tac.c: Likewise.
1317 * src/csplit.c (extract_regexp): Remove #if !WITH_REGEX...#endif block.
1318 * lib/Makefile.am (noinst_HEADERS): Remove rx.h.
1319 * lib/rx.c: Remove file.
1320 * lib/rx.h: Remove file.
1322 1998-06-29 Jim Meyering <meyering@ascend.com>
1324 * src/wc.c: Update calls to human_readable -- now there's one fewer arg.
1326 * lib/Makefile.am (libtu_a_SOURCES): Add argmatch.c.
1327 (noinst_HEADERS): Add argmatch.h.
1329 1998-06-28 Jim Meyering <meyering@ascend.com>
1331 * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.
1333 1998-06-27 Jim Meyering <meyering@ascend.com>
1335 * tests/pr/Test.pm: Add two tests for double spacing.
1336 * src/pr.c (print_page): If cols_ready_to_print is zero,
1337 break out of loop just before the double-space test.
1338 Reported by Michael Stutz.
1340 1998-06-18 Jim Meyering <meyering@ascend.com>
1342 * tests/Makefile.am.in (check): Depend on $(maint_gen) so
1343 `make maintainer-clean; ./configure; make check' works.
1345 1998-05-25 Jim Meyering <meyering@ascend.com>
1347 * configure.in (_GNU_SOURCE): AC_DEFINE it here.
1348 * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section.
1349 [!_GNU_SOURCE]: Add #undef instead.
1351 1998-05-16 Jim Meyering <meyering@ascend.com>
1353 * configure.in (jm_MACROS): New wrapper macro.
1354 Remove uses of most jm_* macros.
1356 * src/tac.c (tac_seekable): Fix error in handling regex separators.
1357 * tests/tac/Test.pm (opt-b, opt-s, opt_sb, opt_r): New tests.
1358 (opt_br): New test -- exercises above-fixed bug.
1360 * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS='
1361 lines from the m4/*.m4 macros, so the hack of including some
1362 custom-replaced C source file names here is no longer needed.
1364 * acconfig.h (chown): Add undef.
1365 (D_INO_IN_DIRENT): Likewise.
1366 (D_TYPE_IN_DIRENT): Likewise.
1367 (ssize_t): Likewise.
1369 1998-05-09 Jim Meyering <meyering@ascend.com>
1371 * src/tac.c (tac_seekable): Rename from tac_stream.
1372 Change `FILE *in' parameter to `int input_fd'. Adjust callers.
1374 1998-05-03 Jim Meyering <meyering@ascend.com>
1376 * po/: Update from gettext-0.10.35.
1378 * configure.in: Remove use of AC_LINK_FILES.
1379 (AC_OUTPUT): Remove po/Makefile-generating sed command.
1381 1998-04-26 Jim Meyering <meyering@ascend.com>
1383 * tests/tail/Test.pm: Disable test f-1, now that it fails.
1385 * src/sort.c (keycompare) (CMP_WITH_IGNORE): Don't return 0 from inside
1386 the keyspec-iterating loop. With this change, test 22a passes.
1387 Reported by Zvi Har'El.
1388 (strncoll): Remove bogus assertion.
1389 * tests/sort/Test.pm: Add tests for the above fix.
1391 * configure.in: Use jm_ASSERT.
1392 * acconfig.h: Add NDEBUG.
1394 * src/cut.c: Don't define NDEBUG.
1395 * src/csplit.c: Likewise.
1396 * src/join.c: Likewise.
1397 * src/sort.c: Likewise.
1398 * src/tr.c: Likewise.
1400 * src/cut.c: Don't define _GNU_SOURCE (now it's in config.h).
1401 * src/expand.c: Likewise.
1402 * src/fold.c: Likewise.
1403 * src/join.c: Likewise.
1404 * src/sort.c: Likewise.
1405 * src/tr.c: Likewise.
1406 * src/unexpand.c: Likewise.
1407 * src/uniq.c: Likewise.
1409 * src/tail.c (close_fd): New function -- converted from macro.
1410 [struct File_spec] (n_stat_calls): New member.
1411 [struct File_spec] (n_unchanged_stats): New member.
1412 (max_n_unchanged_stats): New global.
1413 Initialize new members.
1414 (xwrite): New function -- converted from macro.
1415 [struct File_spec] (pretty_name): Remove member.
1416 (pretty_name): New function.
1418 * src/md5sum.c (md5_check): Declare local, `md5num' as _unsigned_ char*.
1419 (hex_digits): Declare parameter `s' as _unsigned_ char*.
1420 (split_3): Declare parameter `u' as _unsigned_ char**.
1422 1998-04-17 Jim Meyering <meyering@ascend.com>
1424 * src/fmt.c (check_punctuation): Used unsigned char* pointers to avoid
1426 * src/join.c (xfields): Likewise.
1428 1998-04-12 Jim Meyering <meyering@ascend.com>
1430 * src/cat.c: Use STREQ macro rather than strcmp.
1431 * src/cksum.c: Likewise.
1432 * src/comm.c: Likewise.
1433 * src/csplit.c: Likewise.
1434 * src/cut.c: Likewise.
1435 * src/fmt.c: Likewise.
1436 * src/fold.c: Likewise.
1437 * src/head.c: Likewise.
1438 * src/join.c: Likewise.
1439 * src/md5sum.c: Likewise.
1440 * src/nl.c: Likewise.
1441 * src/paste.c: Likewise.
1442 * src/pr.c: Likewise.
1443 * src/split.c: Likewise.
1444 * src/sum.c: Likewise.
1445 * src/tac.c: Likewise.
1446 * src/uniq.c: Likewise.
1447 * src/wc.c: Likewise.
1449 1998-04-11 Jim Meyering <meyering@ascend.com>
1451 * lib/safe-read.h: New file.
1452 * lib/safe-read.c: Include it.
1453 * src/cat.c: Include it instead of merely declaring safe_read.
1454 * src/csplit.c: Likewise.
1455 * src/head.c: Likewise.
1456 * src/split.c: Likewise.
1457 * src/sum.c: Likewise.
1458 * src/tac.c: Likewise.
1459 * src/tail.c: Likewise.
1460 * src/tr.c: Likewise.
1461 * src/wc.c: Likewise.
1463 * lib/Makefile.am (noinst_HEADERS): Add safe-read.h.
1465 * src/wc.c [HAVE_INTTYPES_H]: Include inttypes.h.
1466 Declare counters to be of type uintmax_t.
1467 (write_counts): Use human_readable to format potentially-long-long
1468 numbers. Suggestion from Rogier Wolff.
1469 (wc): Declare per-file counters to be of type uintmax_t.
1470 Declare bytes_read to be ssize_t.
1471 * lib/Makefile.am (libtu_a_SOURCES): Add human.c.
1472 (noinst_HEADERS): Add human.h.
1474 * lib/human.c: New file.
1475 * lib/human.h: New file.
1477 1998-04-04 Jim Meyering <meyering@eng.ascend.com>
1479 * configure.in (jm_AC_HEADER_INTTYPES_H): Use it.
1480 (jm_AC_TYPE_UINTMAX_T): Use it.
1481 (jm_PREREQ): Use it.
1483 * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
1484 know about the m4/ subdirectory.
1485 * Makefile.maint (aclocal-files): Remove now-unnecessary (with
1486 automake-1.2h and the above change) aclocal-related rules and includes.
1488 1998-04-03 Jim Meyering <meyering@eng.ascend.com>
1490 * lib/closeout.c: New file.
1491 * lib/closeout.h: New file.
1492 * lib/Makefile.am (libtu_a_SOURCES): Add closeout.c.
1493 (noinst_HEADERS): Add closeout.h.
1495 1998-03-31 Jim Meyering <meyering@eng.ascend.com>
1497 * lib/xstrtol.c: Merge with the version from fileutils.
1499 1998-03-27 Jim Meyering <meyering@eng.ascend.com>
1501 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.
1503 1998-03-23 Jim Meyering <meyering@eng.ascend.com>
1505 * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
1506 automatically handles it.
1508 1998-03-19 Jim Meyering <meyering@eng.ascend.com>
1510 * src/system.h (SCHAR_MIN): Define.
1512 od.c needs these when compiling with NCR's R2.0c C compiler.
1513 (TYPE_MAXIMUM): Cast result to `(t)' so this macro works with
1517 1998-03-15 Jim Meyering <meyering@eng.ascend.com>
1519 * src/tail.c (tail_file): Merge largely-duplicated blocks of code.
1521 1998-03-03 Paul Eggert <eggert@twinsun.com>
1523 * src/sort.c (xtmpfopen): Open temporary file exclusively, to
1524 foil a common denial-of-service attack.
1525 * src/tac.c (save_stdin): Likewise.
1527 1998-02-16 Jim Meyering <meyering@eng.ascend.com>
1529 * configure.in (jm_FUNC_LSTAT): Use it.
1530 (jm_FUNC_STAT): Use it.
1531 * lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c.
1533 1998-02-06 Jim Meyering <meyering@eng.ascend.com>
1535 * configure.in: Don't use AM_MAINTAINER_MODE or
1536 AC_PATH_PROG(PERL, perl).
1537 (jm_PERL): Use this.
1539 1998-02-04 Jim Meyering <meyering@eng.ascend.com>
1541 * tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl.
1542 (mk_script): Set to ../mk-script.
1543 (x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script.
1544 Remove @MAINT@ cruft.
1545 (Makefile.am): Likewise.
1546 Remove @MAINT@ cruft. Now `missing' will explain the failure
1547 when people don't have Perl yet modify a file whose rebuilding
1548 would lead to the use of Perl.
1550 * tests/Makefile.am (EXTRA_DIST): Add mk-script.
1551 * tests/*/mk-script.pl: Remove files.
1553 * GNUmakefile: New file.
1554 * Makefile.am (EXTRA_DIST): Add GNUmakefile.
1555 Don't include Makefile.maint from here. It's included from GNUmakefile.
1557 1998-01-30 Paul Eggert <eggert@twinsun.com>
1559 * configure.in (AC_LFS): Put before anything that can affect or use
1560 CPPFLAGS, LDFLAGS, or LIBS.
1562 1998-01-25 Jim Meyering <meyering@na-net.ornl.gov>
1564 * Makefile.maint: New file.
1565 * Makefile.am: Move rules common to textutils, fileutils, sh-utils
1566 into Makefile.maint.
1567 Include Makefile.maint.
1568 (EXTRA_DIST): Add Makefile.maint.
1570 * src/cat.c (cat): Convert comma-expressions to pairs of
1571 semicolon-terminated stmts.
1572 Add braces around compound if/else stmts.
1574 1998-01-24 Jim Meyering <meyering@na-net.ornl.gov>
1576 * src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...'
1577 as obsolescent options.
1578 Accept new option: --sleep-interval=SECONDS (-s).
1579 (parse_options): Recognize it.
1580 (usage): Describe it.
1581 (tail_forever): Use it.
1582 (dump_remainder): Use it.
1583 * tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'.
1585 * tests/cut/: Rename directory to remove `-test' suffix.
1586 * tests/join/: Likewise.
1587 * tests/md5sum/: Likewise.
1588 * tests/pr/: Likewise.
1589 * tests/sort/: Likewise.
1590 * tests/tr/: Likewise.
1591 * configure.in (AC_OUTPUT): Reflect renamings in tests/.
1592 * tests/Makefile.am (SUBDIRS): Reflect renamings in tests/.
1594 * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
1595 bug in Cray C 5.0.3.0 when T == time_t.
1597 1998-01-18 Jim Meyering <meyering@na-net.ornl.gov>
1599 * src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction,
1600 numcompare): Remove the `unsigned' from some `unsigned char*'
1601 parameter types. Add casts via UCHAR where necessary to avoid
1602 problems with unwanted sign extension. Based on a patch from
1603 Kaveh Ghazi to appease Irix4's cc compiler.
1605 1998-01-17 Jim Meyering <meyering@na-net.ornl.gov>
1607 * src/split.c (next_file_name): Rewrite. This removes an artificial
1608 limit (albeit already high, at INT_MAX :-) on the number of files
1609 split could create. Reported by Ralf W. Stephan.
1611 1998-01-16 Jim Meyering <meyering@na-net.ornl.gov>
1613 * src/sort.c: (mergefps): Add braces to avoid ambiguous `else' stmt.
1614 (nls_set_fraction): Likewise.
1616 * src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
1617 for Irix-4.0.5. From Kaveh Ghazi.
1618 * configure.in: Check for langinfo.h.
1620 * lib/getline.c: Make PARAMS-defining conditionals consistent.
1621 * lib/linebuffer.h: Likewise.
1622 * lib/long-options.h: Likewise.
1623 * lib/memcasecmp.h: Likewise.
1624 * lib/xstrtod.h: Likewise.
1625 * lib/xstrtol.h: Likewise.
1626 Suggestion from Kaveh Ghazi.
1628 * tests/head/Test.pm (fail-0): Disable test. It depends on
1629 sizeof(long) being 32 bits. Reported by Kaveh Ghazi.
1631 1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
1635 * src/system.h [HAVE_LIMITS_H]: Include limits.h
1636 (TYPE_SIGNED): Define.
1637 (TYPE_MINIMUM): Define.
1638 (TYPE_MAXIMUM): Define.
1640 (SCHAR_MAX): Define.
1641 (UCHAR_MAX): Define.
1646 (ULONG_MAX): Define.
1647 * src/*.c: Remove definitions of those symbols.
1649 * src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
1650 since it now includes limit.h which defines RE_DUP_MAX.
1651 * src/nl.c: Likewise.
1652 * src/tac.c: Likewise.
1654 * lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE.
1655 Rewrite macro as function. Return a value. Update caller.
1656 Cast __ZLONG_MAX `__unsigned long int' before casting to double to
1657 avoid SunOS /bin/cc compiler bug.
1659 1998-01-08 Jim Meyering <meyering@na-net.ornl.gov>
1661 * src/tac-pipe.c: New file. But not yet used.
1662 * src/Makefile.am (EXTRA_DIST): Add tac-pipe.c.
1664 * src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer
1665 result of xrealloc (until recently it was char*).
1667 * configure.in (AC_CHECK_FUNCS): Add nl_langinfo.
1668 * src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test
1669 guarding the nls month-checking code.
1670 (nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
1671 `unsigned' from dcls of text and lim.
1672 (main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.
1674 1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
1676 * lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
1678 * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
1679 those files will be built via the ANSI2KNR-filtering rules if necessary.
1681 1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
1683 * configure.in: Remove AC_DEFINE of _GNU_SOURCE.
1684 * acconfig.h (_GNU_SOURCE): Define if not already defined.
1685 Put this code in @TOP@ section.
1686 (_GNU_SOURCE): Remove #undef.
1688 1997-12-22 Jim Meyering <meyering@na-net.ornl.gov>
1690 * configure.in: AC_DEFINE _GNU_SOURCE.
1691 * acconfig.h: Add _GNU_SOURCE.
1693 1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
1695 * configure.in (AC_CHECK_HEADERS): Add stdlib.h.
1697 * src/system.h: Merge in things from fileutils' version of this file.
1698 * src/csplit.c: s/__P/PARAMS/.
1699 * src/fmt.c: s/__P/PARAMS/.
1700 * src/od.c: s/__P/PARAMS/.
1701 * src/pr.c: s/__P/PARAMS/.
1703 1997-12-14 Jim Meyering <meyering@na-net.ornl.gov>
1705 * src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g.
1707 1997-12-13 Jim Meyering <meyering@na-net.ornl.gov>
1709 * src/fmt.c (main): Add some braces.
1710 Check return code from fclose of each input file.
1711 Close stdout and check for errors.
1713 * src/csplit.c (close_output_file): Check ferror before calling fclose.
1714 (main): Close stdout and check for errors.
1716 1997-11-15 Jim Meyering <meyering@na-net.ornl.gov>
1718 * acconfig.h: Add mktime.
1719 * configure.in (jm_FUNC_MKTIME): Use it.
1720 * lib/mktime.c: New file.
1721 * lib/Makefile.am (EXTRA_DIST): Add mktime.c
1723 * intl/Makefile.in (distclean): Don't remove libintl.h here.
1724 * Makefile.am (DISTCLEANFILES): Remove it here instead.
1726 1997-11-13 Jim Meyering <meyering@na-net.ornl.gov>
1728 * lib/strftime.c: Update from FSF.
1729 * m4/strftime.m4: Check for POSIX.2's %f format spec.
1731 1997-11-12 Jim Meyering <meyering@na-net.ornl.gov>
1733 * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define.
1734 * configure.in (AC_CHECK_FUNCS): Add mempcpy.
1736 1997-11-09 Jim Meyering <meyering@na-net.ornl.gov>
1738 * configure.in (jm_FUNC_STRFTIME): Use it.
1739 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
1740 * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
1741 (jm_FUNC_GNU_STRFTIME): Use new macro.
1742 (jm_FUNC_STRFTIME): New macro. Likewise.
1743 Reported by Noel Cragg.
1745 1997-11-08 Jim Meyering <meyering@na-net.ornl.gov>
1747 * m4/lfs.m4 (AC_LFS): New file/macro.
1748 * m4/Makefile.am (EXTRA_DIST): Add lfs.m4.
1749 * configure.in (AC_LFS): Use it.
1750 (AC_CHECK_FUNCS): Add fseeko.
1751 * src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO.
1752 (skip): Use fseeko if available. Don't use lseek; it causes
1753 the stdio stream to become out of sync with respect to the
1754 underyling file descriptor.
1757 1997-10-16 Paul Eggert <eggert@twinsun.com>
1759 * configure.in (AC_CHECK_FUNCS): Add fseeko.
1761 * src/od.c (skip): Use fseeko. Don't use lseek; it causes
1762 the stdio stream to become out of sync with respect to the
1763 underyling file descriptor.
1765 1997-11-06 Jim Meyering <meyering@na-net.ornl.gov>
1767 * src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs.
1768 We always have alloca.
1769 (keycompare): Don't use variable size arrays (it's a gcc-extension).
1770 Rewrite code that increments new lengths when not `ignoring'.
1772 1997-11-02 Jim Meyering <meyering@na-net.ornl.gov>
1774 * acconfig.h: Add malloc and realloc.
1776 * src/wc.c (main): New option, --max-line-length (-L).
1777 (wc, write_counts): Implement it.
1780 1997-10-26 Jim Meyering <meyering@na-net.ornl.gov>
1782 * lib/memcasecmp.c: Convert to upper case before comparing.
1783 This makes join -i work with sort -f.
1784 Reported by Arthur Pool.
1786 1997-10-25 Jim Meyering <meyering@na-net.ornl.gov>
1788 * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
1789 (xcalloc): #ifdef-out unused function.
1790 (xrealloc): Remove code to work around deficient versions of realloc.
1791 Now we have an autoconf-enabled replacement version.
1792 (xmalloc): Remove code to work around deficient versions of malloc.
1793 Now we have an autoconf-enabled replacement version.
1795 * lib/memcmp.c (rpl_memcmp): Rename from memcmp.
1797 * src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/.
1799 * lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL.
1801 * configure.in (jm_FUNC_MALLOC): Use it.
1802 (jm_FUNC_REALLOC): Use it.
1804 * lib/Makefile.am (EXTRA_DIST): Add malloc.c.
1805 * lib/malloc.c: New file.
1806 * m4/malloc.m4: New file.
1807 * m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
1809 * lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
1810 (EXTRA_DIST): Add realloc.c.
1811 (EXTRA_DIST): Add malloc.c.
1813 * src/system.h: Include xalloc.h.
1814 Remove dcls of xmalloc, xcalloc and xrealloc.
1816 * lib/xalloc.h: New file.
1818 * lib/xmalloc.c: Include xalloc.h.
1819 Change VOID to void.
1820 (xalloc_exit_failure): Renamed extern.
1821 (xalloc_msg_memory_exhausted): New extern.
1822 (xalloc_fail_func): New extern.
1823 (fixup_null_alloc): Use new variables.
1825 1997-10-24 Jim Meyering <meyering@na-net.ornl.gov>
1827 * src/unexpand.c: Remove old-style xmalloc and xrealloc decls.
1828 (add_tabstop): Cast first arg of xrealloc to char*.
1830 * src/sort.c: Include xalloc.h.
1831 (xmalloc): Remove function.
1832 (xrealloc): Remove function.
1833 (main): Set xalloc_fail_func to cleanup.
1834 Set xalloc_exit_failure SORT_FAILURE.
1836 * src/paste.c: Remove old-style xmalloc and xrealloc decls.
1837 (paste_parallel): Cast first arg of xrealloc to char*.
1839 * src/od.c: Remove old-style xmalloc and xrealloc decls.
1840 (decode_format_string): Cast first arg of xrealloc to char*.
1842 * src/expand.c: Remove old-style xmalloc and xrealloc decls.
1843 (add_tabstop): Cast first arg of xrealloc to char*.
1845 * lib/xalloc.h: New file.
1847 * src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
1848 (getstr): Cast xmalloc return value to char*.
1850 * src/csplit.c: Include xalloc.h.
1851 (xmalloc): Remove function.
1852 (xrealloc): Remove function.
1853 (main): Set xalloc_fail_func to cleanup.
1855 * src/*.c: Remove old-style xmalloc and xrealloc decls.
1856 * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
1857 Suggestion from Achim Blumensath.
1859 1997-10-23 Jim Meyering <meyering@na-net.ornl.gov>
1861 * Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
1863 * src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
1864 [!HAVE_DECLARATION_MALLOC]: Declare malloc.
1865 [!HAVE_DECLARATION_REALLOC]: Declare realloc.
1866 [!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
1867 [!HAVE_DECLARATION_STRSTR]: Declare strstr.
1868 * src/cat.c: Remove stpcpy dcl.
1869 * src/csplit.c: Remove malloc and realloc dcls.
1870 * src/sort.c: Remove free, malloc, and realloc dcls.
1871 * src/tac.c: Remove malloc, and realloc dcls.
1872 * src/tr.c: Remove stpcpy dcl.
1873 On some systems, strstr and stpcpy are macros, so declaring them
1874 unconditionally gets syntax errors.
1875 Reported by Mark M. Kettenis.
1877 * configure.in: Use jm_CHECK_DECLS.
1878 * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
1880 1997-10-22 Jim Meyering <meyering@na-net.ornl.gov>
1882 * m4/decl.m4: New file.
1883 * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS.
1885 1997-10-16 Paul Eggert <eggert@twinsun.com>
1887 * src/od.c (LONG_MAX): Define if not defined.
1889 1997-10-16 Jim Meyering <meyering@na-net.ornl.gov>
1891 * src/sort.c (look_for_fraction): Patch from Ørn Hansen.
1892 (getmonth): Compare the two month names only to the length of the
1893 string in the month table. Patch from Ørn Hansen.
1894 (NLS_STRNCMP): New macro.
1895 (strncoll_s2_readonly): New function.
1896 (inittables): Don't use temporary `comp' to hide type of
1897 comparator function.
1898 (nls_sort_month_comp): Declare parameters to be void* to match
1899 comparator function type required for qsort.
1900 (getmonth): Use NLS_STRNCMP rather than #ifdef.
1901 Use do-while, rather than while-loop.
1903 1997-10-14 Jim Meyering <meyering@na-net.ornl.gov>
1905 * src/sort.c: (_NL_ITEM) [!defined]: Define.
1906 From from Ørn E. Hansen.
1908 * src/sort.c: Use STREQ in place of most uses of strcmp.
1909 (NLS_STRCMP): Define.
1910 (getmonth): Remove ifdef and use NLS_STRCMP instead.
1911 Use HAVE_ALLOCA, not _HAVE_ALLOCA.
1912 (zaptemp): Make parameter `const'.
1914 * tests/sort-test/Test.pm: Add tests to exercise new fraccompare.
1916 * src/sort.c (CHARS_IN_ABM): Remove definition
1917 (inittables): Remove assumption that all abbreviated month names have
1919 (getmonth): Likewise.
1920 (main): Add #if's for more efficient code when using the GNU C library.
1921 From Ulrich Drepper.
1923 * src/sort.c (strncoll): Rename parameter to LEN.
1924 (keycompare): Move assignment out of if-expression.
1926 * lib/xstrdup.c: New file.
1927 * lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c
1929 * src/sort.c: Declare xstrdup.
1930 (my_setlocale): New function.
1931 (main): Guard against failure of strdup (use xstrdup) and setlocale.
1933 * src/system.h (STREQ): Define.
1934 * src/od.c (STREQ): Remove definition.
1936 * src/sort.c (look_for_fraction): Eliminate arbitrary limit on
1937 number of `groups'. Declare as void, not int.
1938 Patch from Ørn E. Hansen.
1939 (main): When determining whether we're in the C or POSIX locale,
1940 don't rely on the form of the string returned by setlocale.
1941 Suggestion from Ulrich Drepper.
1943 1997-10-12 Jim Meyering <meyering@na-net.ornl.gov>
1945 * src/sort.c: Apply big patch from Ørn E. Hansen.
1947 (NLS_MEMCMP): Define.
1948 (keycompare): Use it instead of open-coded #ifdefs.
1949 (compare): Likewise.
1950 (NLS_MAP): Remove unused definitions.
1951 Replace with uses of UCHAR.
1952 (nls_locale_map): Remove dcl of unused file-scope array.
1954 1997-10-10 Jim Meyering <meyering@na-net.ornl.gov>
1956 * tests/sort-test/Test.pm: Add a test.
1959 1997-10-07 Jim Meyering <meyering@na-net.ornl.gov>
1961 * src/*.c: Update bug-reporting address.
1962 * src/cat.c: Indent cpp directives to reflect nesting.
1963 * src/cksum.c: Likewise.
1964 * src/csplit.c: Likewise.
1965 * src/fmt.c: Likewise.
1966 * src/nl.c: Likewise.
1967 * src/paste.c: Likewise.
1969 1997-09-27 Jim Meyering <meyering@na-net.ornl.gov>
1971 * m4/memcmp.m4: Integrate test to detect bug in memcmp from the
1972 Next x86 OpenStep C library. Test program from William Lewis.
1974 1997-09-21 Jim Meyering <meyering@na-net.ornl.gov>
1976 * src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.'
1977 (dump_hexl_mode_trailer): Rename from dump_string_trailer.
1978 Use fputs and putchar instead of trivial or %-less printfs.
1979 (decode_one_format): Parenthesize each field_width assignment in an
1980 argument list to make the side effect a little more apparent.
1981 (write_block): Use fputs and putchar instead of trivial or %-less
1983 (dump_strings): Cast string_min to off_t to avoid long-standing warning.
1985 * src/od.c: Implement new `z' (hexl-mode) modifier.
1986 [struct tspec] (trailer): New field.
1987 (field_width): Likewise.
1988 (dump_string_trailer): New function.
1989 (decode_one_format): Save each field_width in the tspec.
1990 Patch from John Kodis.
1992 1997-09-14 Jim Meyering <meyering@na-net.ornl.gov>
1994 * src/od.c (main) [--traditional]: Don't give diagnostic about there
1995 being more than three arguments if there are *no* arguments specified.
1996 Reported by Jochen Hein.
1998 1997-09-13 Jim Meyering <meyering@na-net.ornl.gov>
2000 * tests/sort-test/Test.pm: Add tests 19a and 19b.
2002 1997-07-21 Jim Meyering <meyering@na-net.ornl.gov>
2004 * src/tail.c (parse_obsolescent_option): #ifdef-out portability warning.
2006 1997-07-19 Jim Meyering <meyering@na-net.ornl.gov>
2008 * src/sort.c (checkfp): Print the `disorder' message. Include both
2009 the number and the contents of the first out-of-order line, in addition
2010 to the file name. Change meaning of return value.
2011 (check): Don't print disorder message here.
2012 Adjust test of checkfp's return value.
2013 Feature suggestion from Karl Heuer.
2015 1997-07-13 Jim Meyering <meyering@na-net.ornl.gov>
2017 * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
2018 Now, automake includes it automatically.
2020 * src/head.c: Include xstrtoul.h.
2021 Remove global variable, unit_size.
2022 (atou): Remove now-unused function.
2023 (parse_unit): Likewise.
2024 (string_to_ull): New function.
2025 (head): Take new parameter, count_lines. Use it instead of unit_size.
2027 (head_file): Likewise.
2028 (main): Use string_to_ull, not atou/parse_unit.
2029 The problem was that overflow wasn't detected, so `head -c 4096m'
2030 was treated just like `head -c 0'.
2031 Reported by Jerome Abela.
2033 * tests/wc: New directory.
2034 * tests/head: New directory.
2035 * tests/Makefile.am (SUBDIRS): Add head and wc.
2036 * configure.in (AC_OUTPUT): Add tests/head/Makefile and
2039 1997-07-05 Jim Meyering <meyering@na-net.ornl.gov>
2041 * src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
2042 a diagnostic and fail when there are two or more non-option arguments.
2044 1997-07-04 Jim Meyering <meyering@na-net.ornl.gov>
2046 * tests/tac/mk-script.pl: Redirect output of cmp to /dev/null.
2048 * configure.in (ALL_LINGUAS): Add Norwegian (no).
2050 * Makefile.am (aclocal-files): Look in source directory, not build dir.
2051 From Andreas Schwab.
2053 Sun Jun 15 06:36:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
2055 * src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the
2056 2-digit abbreviation) in each page header. Reported by Noah Friedman.
2058 Sat Jun 14 12:29:12 1997 Jim Meyering <meyering@na-net.ornl.gov>
2060 * src/cut.c (cut_fields): Detect when the input is empty and handle
2061 that special case. Before `cut -f1 < /dev/null' would improperly
2062 output a single newline. Reported by Phil Richards.
2064 Sun Apr 27 15:10:58 1997 Jim Meyering <meyering@na-net.ornl.gov>
2066 * man/Makefile.am (DISTFILES): Add $(man_MANS).
2068 * configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv).
2070 Thu Apr 3 21:14:02 1997 Jim Meyering <meyering@na-net.ornl.gov>
2072 * m4/Makefile.am (EXTRA_DIST): Update file list.
2074 * tests/cut-test/Test.pm: Add test from Phil Richards.
2076 Sat Mar 22 20:29:10 1997 Jim Meyering <meyering@na-net.ornl.gov>
2078 * missing: New file -- from the automake-1.1m distribution.
2080 Fri Mar 21 23:56:41 1997 Jim Meyering <meyering@na-net.ornl.gov>
2082 * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
2083 (aclocal.m4): Use aclocal's new -I option.
2085 Thu Mar 13 21:46:04 1997 Jim Meyering <meyering@na-net.ornl.gov>
2087 * src/tr.c (main): Make sure c1 is not -1 before using it as an
2088 array index. Patch from Greg McGary. Although this is truly a
2089 bug, I believe it would not cause tr to misbehave on most systems.
2090 I could not construct a test case with which this bug causes tr
2091 to generate invalid output.
2093 * tests/pr-test/Test.pm: Add test that -o 0 works.
2095 * src/pr.c (main): Allow use of 0 (zero) as the margin offset
2096 argument to the -o option. Patch from Gary Anderson.
2098 Fri Feb 28 22:32:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
2100 * src/uniq.c (usage): Fix typo in --help output. From Andreas Schwab.
2102 Tue Feb 25 20:34:51 1997 Jim Meyering <meyering@na-net.ornl.gov>
2104 * lib/Makefile.am (noinst_HEADERS): Add obstack.h.
2105 (libtu_a_SOURCES): Add obstack.c.
2107 Sun Feb 16 08:30:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
2109 * tests/Makefile.am (SUBDIRS): Add tac.
2110 * tests/tac: New directory.
2111 * configure.in (AC_OUTPUT): Add tests/tac/Makefile.
2113 * tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t,
2114 tta3-FF, ttb3-FF}: New files. Renamed (s/T/tt/) to avoid name clashes
2115 on case-independent filesystems.
2116 * tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming.
2118 * src/tail.c (parse_obsolescent_option): Reverse order of args in
2119 diagnostic. Remove `' quotes in diagnostic.
2120 (parse_options): Remove `' quotes in diagnostic.
2122 Sat Feb 8 22:43:45 1997 Jim Meyering <meyering@na-net.ornl.gov>
2124 * src/tail.c (parse_obsolescent_option): Give warning diagnostic for
2125 (but now accept) obsolescent usage with more than one file argument.
2127 Sun Feb 2 23:06:59 1997 Jim Meyering <meyering@na-net.ornl.gov>
2129 * src/join.c: Move alloca-related preprocessor code into system.h.
2130 * src/od.c: Remove alloca-related preprocessor code.
2131 * src/system.h: Add alloca-related preprocessor code.
2133 Sat Feb 1 07:21:43 1997 Jim Meyering <meyering@na-net.ornl.gov>
2135 * tests/pr-test/*: Rename files to avoid exceeding 14-character limit.
2136 * tests/pr-test/Test.pm: Reflect renamings.
2138 * tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames
2139 that exceed max-length before dying.
2141 * src/pr.c (init_parameters): For compatibility: use default
2142 separator `TAB' with full length lines. From Roland Huebner.
2144 Fri Jan 31 19:53:54 1997 Jim Meyering <meyering@na-net.ornl.gov>
2146 * src/tac.c: Rename globals buffer and buffer_size to have G_ prefix
2147 to avoid shadowing local variables.
2149 * lib/long-options.c (parse_long_options): Compare getopt_long return
2150 value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter
2151 in getopt_long call.
2153 * src/pr.c (add_line_number): Rename from `number' to avoid shadowing
2156 * src/*.c: Compare getopt_long return value against -1, not EOF.
2157 Use NULL, not `(int *) 0' as last parameter in getopt_long call.
2158 (usage): Bracket bug-reporting address with <> and append a period.
2160 Wed Jan 29 20:54:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
2162 * tests/tr-test/Test.pm: Do each test twice: get input via REDIR
2165 * tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring)
2168 * tests/pr-test/Test.pm: Remove common_option_prefix flag.
2169 (test_vector): Prepend the common option here instead.
2171 * tests/md5sum-test/Test.pm: Remove input_via_stdin flag.
2172 Do each test twice: get input via REDIR and PIPE.
2174 * tests/cut-test/Test.pm: Do each test three times.
2176 * tests/cut-test/mk-script.pl: Allow each test to be run any or all
2177 of three different ways. Program input may be specified via a file
2178 or files listed on the command line, via input redirection (if there's
2179 only one file), or via a pipe.
2181 Tue Jan 28 20:54:06 1997 Jim Meyering <meyering@na-net.ornl.gov>
2183 * tests/cut-test/mk-script.pl: Remove `t' prefix on all generated
2185 Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E).
2186 Ensure that no test file (generated or maintainer-supplied) has a
2187 name longer than 14 characters.
2189 Sun Jan 26 12:49:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
2193 * src/tail.c (parse_options): Add quotes to make messages identical.
2195 Sat Jan 25 00:12:29 1997 Jim Meyering <meyering@na-net.ornl.gov>
2197 * src/tail.c (parse_obsolescent_option): Comment.
2198 (parse_options): Remove unnecessary goto and label.
2200 * tests/sort-test/mk-script.pl: Interpret `input arg is a hash
2201 reference' as meaning that the tested program will read no input.
2202 Most of the tests for the date program use this feature.
2203 Also for date, the generated script now reflects specification
2204 (in Test.pm) of default and per-test environment settings.
2206 * src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces.
2207 * src/fold.c: Likewise.
2208 * src/head.c: Likewise.
2209 * src/join.c: Likewise.
2210 * src/nl.c: Likewise.
2211 * src/od.c: Likewise.
2212 * src/pr.c: Likewise.
2213 * src/uniq.c: Likewise.
2215 * lib/xstrtoul.h (XSTRTOL_H): Undefine it.
2217 * lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error'
2218 only if it hasn't already been defined.
2219 (_STRTOL_ERROR): Undefine.
2221 * lib/xstrtol.c (__xstrtol): Change interpretation of
2222 VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former
2223 when any suffix is valid, the later when no suffix is allowed.
2225 Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
2227 * lib/long-options.c (parse_long_options): Reset optind to zero
2228 before just returning so that getopt internals get initialized from
2229 the probably-new parameters when/if getopt is called later.
2230 From Ulrich Drepper.
2232 Thu Jan 23 19:17:03 1997 Jim Meyering <meyering@na-net.ornl.gov>
2234 * src/tail.c (parse_obsolescent_option): Recognize and fail for
2235 more malformed obsolescent options. Makes for better diagnostics.
2237 Wed Jan 22 21:34:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
2239 * tests/Makefile.am (SUBDIRS): Add tail.
2240 * tests/tail: New directory.
2241 * configure.in (AC_OUTPUT): Add tests/tail/Makefile.
2243 * src/tail.c (parse_options): New function.
2244 (parse_obsolescent_option): New function.
2245 (main): Use the new functions instead of open-coding them.
2246 This better fixes the bug in handling obsolescent `+Nc' options.
2249 Tue Jan 21 22:49:00 1997 Jim Meyering <meyering@na-net.ornl.gov>
2251 * src/tail.c (main): Properly handle what the POSIX spec calls
2252 the `obsolescent' usage (e.g., tail +2c). It didn't work.
2253 Reported by Karl Heuer.
2255 Sun Jan 12 22:13:27 1997 Jim Meyering <meyering@na-net.ornl.gov>
2257 * tests/tr-test/Test.pm: Rename tests so that the associated files
2258 have names that are distinct even on filesystems on which file
2259 names are case insensitive.
2260 Reported by Fred Fish.
2261 * tests/cut-test/Test.pm: Likewise.
2263 * tests/tr-test/Makefile.am: Regenerated to reflect renamed tests.
2264 * tests/cut-test/Makefile.am: Likewise.
2266 Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov>
2270 * lib/getopt.c (_getopt_internal): Use `_', rather than the
2271 (sometimes-)expansion `gettext'.
2273 Tue Jan 7 22:50:13 1997 Jim Meyering <meyering@na-net.ornl.gov>
2275 * lib/getopt.c: New (more POSIX compliant) version from GNU libc.
2276 [_]: Define to gettext also if ENABLE_NLS is defined.
2279 Thu Jan 2 21:17:50 1997 Jim Meyering <meyering@na-net.ornl.gov>
2281 * src/pr.c (init_fps): Initialize lines_stored field in three places.
2282 This avoids uninitialized memory reads in close_file.
2284 Wed Jan 1 17:32:18 1997 Jim Meyering <meyering@na-net.ornl.gov>
2286 * configure.in (AC_ARG_PROGRAM): Remove explicit use.
2287 It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart.
2289 Sun Dec 29 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
2291 * src/pr.c (init_header): Plug a small memory leak by using stack
2292 rather than heap for a 15-byte temporary buffer.
2294 Sat Dec 28 00:03:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2296 * src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed
2298 (POS_AFTER_TAB): Renamed from pos_after_tab. Define in terms of
2299 TAB_WIDTH rather than duplicating the expression.
2301 Fri Dec 27 17:29:02 1996 Jim Meyering <meyering@na-net.ornl.gov>
2303 * tests/join-test/mk-script.pl: Fix a couple of thinkos and typos.
2304 Now it works with pr's tests, too.
2306 * tests/pr-test/Makefile.am (explicit): Regenerate list of files,
2307 this time with duplicates removed.
2309 * src/pr.c (usage): Break long string literal into two separate
2310 printf statements to accomodate default maximum of 2048 characters
2311 for Irix-4.0.5. Reported by Kaveh Ghazi.
2313 * Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
2315 * tests/Makefile.am (SUBDIRS): Add pr-test.
2317 * configure.in: AC_REQUIRE version 2.12 of autoconf.
2318 AC_OUTPUT: Add tests/pr-test/Makefile.
2320 Sun Dec 22 08:11:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
2322 * acinclude.m4: Move macros to individual files in new directory, m4/.
2323 See ChangeLog entries in sh-utils for the details.
2325 * configure.in: Increment version to 1.20a.
2327 * tests/md5sum-test/Makefile.am: Use same framework as other tests.
2328 * tests/md5sum-test/Test.pm: New file.
2330 Sat Dec 21 20:32:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
2332 * tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in.
2334 * tests/Makefile.am.in: New file.
2336 * tests/sort-test/Makefile.am: Clone the Makefile.am from join-test.
2337 Replace only the definition of $x and the auto-generated lists of
2339 * tests/cut-test/Makefile.am: Likewise.
2340 * tests/tr-test/Makefile.am: Likewise.
2342 * tests/join-test/Makefile.am: Add @MAINT@-protected rule for
2343 verifying that Makefile.am is consistent with Test.pm.
2345 Fri Dec 20 00:08:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2347 * tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1)
2348 and $(in2), not $(in).
2350 * tests/join-test/mk-script.pl: New option: --list.
2351 Generate lists of files used/generated.
2353 Thu Dec 19 23:28:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
2355 * tests/join-test/mk-script.pl: Rewrite to be more general -- so
2356 it can be used for join, cut, sort, tr, and soon, pr test suites.
2357 * tests/tr-test/mk-script.pl: Symlink through CVS repo to join's
2359 * tests/sort-test/mk-script.pl: Likewise.
2360 * tests/cut-test/mk-script.pl: Likewise.
2362 * tests/tr-test/Test.pm: Adapted for new mk-script.pl.
2363 * tests/join-test/Test.pm: Likewise.
2365 Tue Dec 17 16:48:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
2367 * tests/join-test/Makefile.am (.pl): Make generated file read-only so
2368 I don't accidentally modify it instead of the one with the .pl suffix.
2370 * acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than
2371 now-obsolete AC_C_CROSS.
2372 (jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one
2373 since there's nothing GNU-specific about the replacement. Contrast
2374 with gnu_ prefix added to strftime.
2375 (jm_FUNC_MEMCMP): New macro.
2376 * configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP.
2377 * acconfig.h: Add memcmp.
2378 * README: Remove warning about memcmp. The new macro handles it.
2380 Mon Dec 16 23:03:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
2382 * tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment.
2384 (AUTOMAKE_OPTIONS): Likewise.
2386 Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2388 * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
2389 name for cross compiling.
2390 Remove definitions of gettext-related macros. The gettext
2391 installation procedure installs corresponding .m4 files so that
2392 aclocal will use them.
2394 1996-12-12 Paul Eggert <eggert@twinsun.com>
2396 * system.h (ISDIGIT): Replace with smaller, faster edition
2397 that yields nonzero only on ASCII digits.
2398 (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
2401 * tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of
2402 ISDIGIT to test for characters in CC_DIGIT class.
2404 * sort.c (digits): Remove; subsumed by new ISDIGIT.
2405 (inittables): Remove initialization of `digits'.
2406 (fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
2407 (fraccompare, numcompare): Avoid casts to unsigned char that are no
2410 * csplit.c (get_format_width, get_format_prec): Avoid
2411 unnecessary comparison of digit to '\0'.
2413 Thu Dec 12 23:42:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
2415 * src/sort.c (usage): Clarify description of -u option.
2418 Wed Dec 11 19:32:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2422 Tue Dec 10 00:15:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2424 The file name, `build-script.pl' is longer than 14 characters.
2426 * tests/cut-test/mk-script.pl: Rename from build-script.pl.
2427 * tests/cut-test/Makefile.am: Reflect renaming.
2428 * tests/tr-test/mk-script.pl: Rename from build-script.pl.
2429 * tests/tr-test/Makefile.am: Reflect renaming.
2430 * tests/sort-test/mk-script.pl: Rename from build-script.pl.
2431 * tests/sort-test/Makefile.am: Reflect renaming.
2432 * tests/join-test/mk-script.pl: Rename from build-script.pl.
2433 * tests/join-test/Makefile.am: Reflect renaming.
2434 Reported by Karl Heuer.
2436 * configure.in (VERSION): Bump to 1.19r.
2437 (AC_ISC_POSIX): Remove kludgy macro.
2438 Use this test instead:
2439 (LIBS): Add -lcposix if it contains strerror.
2440 Patch from Karl Heuer.
2442 Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
2444 =========== Update for automake-1.1k.
2445 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
2446 * configure.in (AM_CONFIG_HEADER): Use it.
2447 (AC_OUTPUT): Remove stamp-h timestamping statement.
2448 Now, AM_CONFIG_HEADER does it automatically.
2449 * lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
2450 new automake requirement.
2451 Rename tu_* variables to libtu_a_*.
2453 Wed Dec 4 21:03:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2455 * src/pr.c: Apply big patch from Roland Huebner.
2457 * src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
2458 [:upper:] to [:upper:] and [:lower:] to [:lower:].
2459 (main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
2460 the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
2462 (class_ok): Update table to reflect that tr now allows these
2463 identity mappings. Suggestion from Risto Kankkunen.
2465 Thu Nov 28 00:31:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2467 * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
2468 for gettext-0.10.25.
2470 Tue Nov 26 23:05:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
2472 * src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
2473 to avoid new warning from gcc.
2475 Sun Nov 24 21:02:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
2477 * tests/sort-test/Makefile.am (t): Add names of those 5 tests.
2479 * tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.
2481 * src/sort.c (set_ordering): Revert 1994-05-04 change to this function
2482 so that blanks are not unconditionally ignored when computing start
2483 and end positions for numeric keys with explicit character offsets.
2484 Reported by Markus Demleitner.
2486 Sat Nov 23 16:07:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
2488 * cat.c (usage): Alphabetize option descriptions the way sort -f would.
2489 * fmt.c (usage): Likewise.
2490 * join.c (usage): Likewise.
2491 * md5sum.c (usage): Likewise.
2492 * od.c (usage): Likewise.
2493 * pr.c (usage): Likewise.
2494 * sort.c (usage): Likewise.
2495 * split.c (usage): Likewise.
2496 * wc.c (usage): Likewise.
2499 Fri Nov 22 20:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
2501 * src/csplit.c (process_regexp): Update CURRENT_LINE only if
2502 the new value would be larger. This avoids the infinite loop
2503 otherwise provoked by situations like this:
2504 printf "\na\n" | csplit - '/a/-1' '{*}'
2507 Tue Nov 19 23:16:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
2509 * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
2512 Sat Nov 2 08:50:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
2514 * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
2515 Otherwise, the generated info files have names longer than
2516 the 14-byte max of some old systems.
2517 Reported by Karl Heuer.
2519 Fri Nov 1 21:33:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
2521 * lib/strtol.c: Update from GNU libc.
2523 * tests/sort-test/Test.pm: Add a test to exercize this fix.
2525 * src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
2526 (checkfp): Fix off-by-one error that resulted in writing one byte
2527 beyond the end of a malloc'd buffer. It caused `sort -c' to segfault
2528 on Linux systems having a relatively recent libc. Before, running
2529 the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
2530 would provoke the memory overrun (though not necessarily the failure).
2532 Reported by Risto Kankkunen.
2534 Thu Oct 31 17:48:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
2536 * src/sort.c (key_init): New function.
2537 (main): Use key_init in the two places where it was open-coded.
2538 This fixes a UMR of the general_numeric field.
2540 * src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
2541 This avoids a spurious UMR report from purify.
2542 (prjoin): Add an assertion.
2543 (add_field): Update assertion.
2545 * src/tr.c (es_free): New function.
2546 (parse_str): Use it to plug a small memory leak.
2548 Wed Oct 23 22:02:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
2550 * lib/md5.c: Update from GNU libc.
2551 * lib/md5.h: Update from GNU libc.
2553 Mon Oct 21 16:48:12 1996 Jim Meyering <meyering@na-net.ornl.gov>
2555 * src/tr.c (validate): Remove TAB from diagnostic, for consistency.
2557 Sun Oct 20 13:44:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
2559 * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
2561 * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
2562 (EXTRA_DIST): Remove.
2564 * configure.in: Remove README_ALPHA related code. Automake takes
2565 care of it automatically now when in gnits mode.
2567 * lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
2568 doing arithmetic with it.
2570 Sat Oct 19 23:13:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
2572 * lib/md5.c: Update from GNU libc.
2573 * lib/md5.h: Update from GNU libc.
2575 Fri Oct 18 00:08:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
2577 * configure.in (AC_OUTPUT): Add tests/join-test/Makefile.
2579 * tests/Makefile.am (SUBDIRS): Add join-test.
2581 Tue Oct 15 23:25:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
2583 * src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
2585 (main): Write separate loops to initialize mapping for lower->upper
2586 and upper->lower conversion.
2587 Reported by Arne Henrik Juul.
2589 Sun Oct 13 12:52:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
2591 * lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
2592 Before, e.g., `split -b 1M' would be silently accepted and treated
2593 like `split -b 1'. Reported by Franc,ois.
2595 * src/split.c (usage): Remove parameter, REASON.
2596 (main): Update callers to use combination of error (0, 0, ... and
2597 usage (EXIT_FAILURE).
2598 (main): When a string operand cannot be converted to a number of
2599 bytes or lines, include that string in the diagnostic.
2601 Sat Oct 12 00:05:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
2603 * configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.
2605 * lib/Makefile.am (EXTRA_DIST): Remove.
2607 Thu Oct 10 23:41:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2609 * lib/md5.c (md5_stream): Apply fix from Ralph Loader
2610 <loader@maths.ox.ac.uk> via Ulrich Drepper.
2612 Wed Oct 9 07:26:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
2614 * lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).
2616 Tue Oct 8 21:32:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
2618 * lib/error.c: Include error.h to align with libit --
2619 under protest, François :-).
2621 Sun Oct 6 08:02:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
2623 * acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
2624 AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
2625 They're included in automake-1.1f.
2627 * configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
2630 Sat Oct 5 12:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
2632 * lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
2635 Fri Oct 4 07:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
2637 * configure.in (GNU_PACKAGE): New variable.
2638 (PACKAGE_VERSION): Remove it.
2640 * acconfig.h (GNU_PACKAGE): New variable.
2641 (PACKAGE_VERSION): Remove now-unused variable.
2643 * lib/long-options.c (parse_long_options): Separate package name
2644 and version number to accomodate new --version output requirement.
2645 * lib/long-options.h: Update prototype.
2647 Thu Oct 3 23:27:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
2649 * src/md5sum.c (main): Remove dead code that used to print --version
2652 Tue Oct 1 06:54:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
2654 * configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
2655 * src/Makefile.am (sort_LDADD): Use any library (-lm) that
2656 gets substituted for @POW_LIBM@.
2658 * tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.
2660 Mon Sep 30 23:35:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2662 * tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.
2664 * acinclude.m4: Update definitions from gettext-0.24.
2666 Sun Sep 29 20:04:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
2668 * tests/sort-test/build-script.pl: Die if close fails.
2669 * tests/tr-test/build-script.pl: Likewise.
2671 * configure.in (AC_OUTPUT): Add tests/cut-test/Makefile.
2672 * tests/Makefile.am (SUBDIRS): Add cut-test.
2673 * tests/cut-test: New directory.
2675 Fri Sep 27 22:22:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
2677 * configure.in (ALL_LINGUAS): Add spanish (es).
2679 Thu Sep 26 21:02:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
2681 * src/md5sum.c (usage): Remove references in --help output to
2682 the now-deprecated --string option. Support for it will be
2683 removed soon. Using this option can provoke a memory access
2684 violation on some systems because of (unavoidable in an efficient
2685 implementation) alignment assumptions made by functions in md5.c.
2686 md5sum.c could leave the option in and accomodate the alignment
2687 restriction, but this option was intended solely for testing, and
2688 the tests are now all file-oriented, so it's not necessary.
2690 * tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.
2692 Wed Sep 25 21:43:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
2694 * tests/sort-test/Makefile.am (t): Factor out .in suffix.
2695 Include new test: t16a.
2696 * tests/tr-test/Makefile.am (t): Likewise.
2698 * src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc.
2700 Mon Sep 23 10:00:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2702 * tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS).
2704 Sun Sep 22 09:24:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
2706 * src/sort.c (keycompare): Declare translate to be unsigned char *.
2707 Otherwise, sign extension caused misordering when using e.g. -f.
2708 Reported by Erick Branderhorst.
2709 * tests/sort-test/Test.pm: Add Erick's test for that fix.
2711 * tests/Makefile.am (SUBDIRS): Add md5sum-test.
2713 Sat Sep 21 13:34:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
2715 * src/Makefile.am (check): Remove tests for md5sum.
2716 * tests/md5sum-test: New directory. Put them here instead.
2717 * configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile.
2719 Thu Sep 19 08:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
2721 * tests/: Rename from checks.
2722 * Makefile.am (SUBDIRS): Change `checks' to `tests'.
2723 * configure.in (AC_OUTPUT): Likewise.
2725 * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
2726 AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
2728 Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2730 * Makefile.am (EXTRA_DIST): Remove acinclude.m4.
2732 Thu Sep 12 17:05:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2734 * lib/Makefile.am (EXTRA_DIST): Add getline.c.
2735 (tu_SOURCES): Remove getline.c
2738 Sun Sep 8 13:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2740 * checks/sort-test/build-script.pl: Prefix $in with \$srcdir/
2741 so make check works with VPATH build. From Uli Drepper.
2743 Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
2745 * src/system.h: Add comments justifying IS* versions of ctype.h macros.
2747 * src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct.
2748 (get_line): Use ISSPACE instead of isspace. From Bruno Haible.
2750 Mon Sep 2 10:34:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2752 * src/*.c (usage): Tell where to report bugs.
2754 Sun Aug 25 22:50:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
2756 * checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
2757 ($x-tests): Guard dependencies with @MAINT@.
2758 * checks/tr-test/Makefile.am: Likewise.
2760 Sat Aug 24 14:25:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
2762 * src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.
2764 Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
2766 * configure.in (ALL_LINGUAS): Add polish (pl).
2768 Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
2770 * configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
2771 * checks/Makefile.am (SUBDIRS): Add sort-test.
2773 Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
2775 * Makefile.am (EXTRA_DIST): Add acinclude.m4.
2777 Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2779 * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
2780 Automake includes them automatically.
2782 * configure.in (AM_INIT_AUTOMAKE): Use it.
2783 (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
2784 (AC_PROG_MAKE_SET): Likewise.
2786 Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov>
2788 * configure.in: Rename a few macros for automake-1.1c.
2789 (AC_REPLACE_GNU_GETOPT): Remove.
2790 (AC_PATH_PROG): Find perl -- needed only for checks if you
2791 change or remove things with e.g. make maintainerclean.
2794 * lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX
2795 adds .o files to @LIBOBJ@.
2796 (tu_SOURCES): Add getopt.c and getopt1.c.
2797 (EXTRA_DIST): Remove getopt.c and getopt1.c.
2799 * acinclude.m4: New file -- derived from aclocal.m4.
2800 * aclocal.m4: This file is now generated by the aclocal program
2801 (which comes with the automake package.)
2803 Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
2805 * checks/: New directory.
2806 * checks/Makefile.am: New file.
2807 * configure.in (AC_OUTPUT): Add new directories: checks,
2809 * Makefile.am (SUBDIRS): Likewise.
2811 Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
2813 * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
2814 redefinition warnings on solaris.
2815 (textdomain) [!ENABLE_NLS]: Likewise.
2817 Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov>
2819 * src/unexpand.c (unexpand): Move EOF check to follow code that
2820 processes and generates output for pending spaces. Before
2821 `printf ' ' |unexpand -t 1,2' generated no output.
2823 * src/md5sum.c (md5_check): Remove parameter, BINARY.
2824 Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
2825 from the input stream rather than the one from the command line.
2826 (main): Fail with a diagnostic if --binary or --text is specified
2827 when verifying checksums.
2828 Reported by Eli Zaretskii <eliz@is.elta.co.il>.
2830 Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
2832 * configure.in: Add check for error_at_line so systems with
2833 GNU libc don't compile and link with distributed error.c.
2834 * lib/Makefile.am (tu_SOURCES): Remove error.c.
2835 (EXTRA_DIST): Add error.c.
2837 * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
2838 Add related check for the getdelim function.
2839 From Ulrich Drepper -- as done in gettext.
2841 Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2843 * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
2844 separate PACKAGE and VERSION.
2846 * aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from
2847 macros from Bruno Haible and from Cygnus.
2848 * configure.in (AM_SANITY_CHECK_CC): Use it.
2850 Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
2852 * install-sh: Get version with MIT copyright.
2854 Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
2856 * aclocal.m4 (fp_C_PROTOTYPES): Improved version from
2858 Update all other macros to reference $fp_cv_prog_cc_stdc, rather
2859 than $ac_cv_prog_cc_stdc.
2861 * src/od.c (OFF_T_MAX): Remove definition.
2862 (main): Compare against LONG_MAX rather than OFF_T_MAX.
2864 Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
2866 * Many files: Update FSF address.
2868 Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
2870 * src/unexpand.c (unexpand): Fix bug that contributed to endless loop
2871 when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not
2872 tab_index in inner flush_pend: while loop. From Keith Owens
2873 <kaos@audio.apana.org.au>.
2875 * src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
2876 [!INT_MAX]: Define it.
2877 (main): Append INT_MAX to command-line-specified tab list to
2878 ensure termination in unexpand's inner loop.
2879 Derived from a patch from Keith Owens.
2881 Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
2885 * configure.in (VERSION): Bump to 1.19.
2887 Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
2889 * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
2890 so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
2891 those options on that system, sys/stat.h gets compile errors.
2892 With help from Marcus Daniels.
2894 * getopt.c: Update from gettext-0.10.23.
2895 * getopt1.c: Likewise.
2896 * getopt.h: Likewise.
2898 Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
2900 * src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
2901 so the left operand of the << isn't signed.
2902 From Kjetil Torgrim Homme.
2904 * po/Makefile.in.in (install-data): Don't install NLS files when
2905 they're not requested. From Ulrich Drepper. Reported by
2906 Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
2908 Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
2910 * po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
2911 * ABOUT-NLS: Likewise.
2913 * aclocal.m4: Likewise.
2915 Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
2917 * src/uniq.c (usage): Remove space before newline in usage message.
2919 * src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
2920 [NEWLINE_REPLACEMENT_STRING*]: Remove macros.
2921 (main): Output a leading backslash for a line describing a file
2922 whose name contains a newline. Then translate each NEWLINE byte
2923 in the file name to the string, "\\n", and each backslash to "\\\\".
2924 File names that don't contain NEWLINE aren't translated.
2925 (split_3): Rewrite to handle file names with embedded newlines.
2926 Miles Bader and Jim Blandy suggested this new encoding scheme.
2928 * src/md5sum.c (md5_file): Replace obsolete comment with a description
2930 (md5_check): Don't use "s"-adding trick to form the plural of
2931 `checksum.' That doesn't work well with translation.
2932 Suggestions from Ulrich Drepper.
2933 (split_3): Add missing semicolon so it compiles. From Jim Blandy.
2935 Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
2937 * src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
2938 fact that leading blanks may be stripped.
2940 Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
2942 * configure.in (ALL_LINGUAS): Add dutch (nl).
2944 Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
2946 * src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
2947 (split_3): Translate NL bytes not to NUL, but to
2948 NEWLINE_REPLACEMENT_STRING.
2949 Suggested by Ulrich Drepper.
2950 (main): Translate back to NL-containing filename.
2952 Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
2954 * src/md5sum.c (split_3): Take an additional parameter, S_LEN.
2956 Map translated NEWLINE-containing filename back into the original
2957 NEWLINE-containing name.
2958 (md5_check): Translate NEWLINE bytes to NUL bytes in filename.
2960 Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
2962 * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
2963 appears in the output of --version. Reported by RMS.
2965 Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
2967 * src/Makefile.am (LDADD): Remove sort-specific hack to link
2969 * aclocal.m4 (AM_FUNC_STRTOD): New macro.
2970 * configure.in (AM_FUNC_STRTOD): Use it.
2971 (AC_REPLACE_FUNCS): Remove strtod.
2972 Suggested by Tom Tromey.
2974 * po/Makefile.in.in (install-data): Add `else true;' to avoid
2975 letting failing if-condition cause make failure.
2976 From Fred Fish (fnf@ninemoons.com).
2978 Tue Jun 25 21:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
2982 Tue Jun 18 20:43:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
2984 * aclocal.m4: Update from gettext-0.10.20.
2985 * ABOUT-NLS: Likewise.
2988 Thu Jun 13 22:31:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
2990 * configure.in (VERSION): Bump to 1.18a.
2992 * po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
2993 Depend on POTFILES only when using maintainer mode.
2995 * intl/*: Update from gettext-0.10.18.
2997 Tue Jun 11 23:32:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
3001 * po/Makefile.in.in: Update from gettext-0.10.17.
3003 * ABOUT-NLS: Likewise.
3005 Mon Jun 10 18:22:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
3007 * Makefile.am (cvs-dist): Use -c option in cvs tag command.
3009 Fri Jun 7 22:06:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
3011 * configure.in (VERSION): Set to 1.18.
3013 * src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
3014 the strtod supplied with this package. Otherwise, linking failed on
3015 Solaris-2.4 systems. Reported by Wayne Stewart <wstewa@atl.com>.
3017 Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
3019 * po/Makefile.in.in: Update from gettext-0.10.16.
3021 * ABOUT-NLS: Likewise.
3022 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
3023 gettext-related ones.
3024 Update from gettext-0.10.16.
3026 Fri May 31 22:04:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
3030 * Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
3033 Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
3037 * tail.c (main): Interpret the old-style +VALUE and -VALUE options
3038 like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
3039 suffix multipliers. This makes the code consistent with --help
3040 output. Reported by Karl Heuer.
3042 * sort.c (limfield): #ifdef-out a block of code that makes
3043 GNU sort incompatible with Unix sort when a key-end spec refers
3044 to the N'th character in a field that has fewer than N characters.
3045 The POSIX spec doesn't appear to specify behavior for this case.
3048 * po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
3049 longer than 14 characters.
3050 (mostlyclean): Likewise.
3053 * po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
3054 when using maintainer mode. Reported by Karl Heuer.
3056 * po/Makefile.in.in (.po.mo): Reenable dependency and rule.
3057 It is required when using native NLS, e.g. on Solaris.
3058 From Marcus Daniels.
3060 * od.c (decode_one_format): Use %lu (not %d) printf format
3061 corresponding to unsigned long, SIZE.
3065 * intl/Makefile.in (installcheck): New target.
3066 * po/Makefile.in.in (installcheck): New target.
3068 * od.c (decode_one_format): Take another parameter.
3069 Give a specific diagnostic for invalid format spec here rather
3070 than an overly general one from caller's caller.
3071 (decode_format_string): Update caller.
3072 (main): Don't give diagnostic here when decode_format_string fails.
3073 Remove assertions that could fail on some Crays because they don't
3074 have a two-byte type.
3075 Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
3077 Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
3079 * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
3080 less portable fileno (stdin) and fileno (stdout).
3081 * sort.c (main): Use STDIN_FILENO instead of less portable
3084 Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
3086 * Makefile.am (distcheck): Remove target and rule -- automake-0.33
3087 adds it automatically.
3089 Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov)
3091 * configure.in (LINGUAS): Add ko.
3092 * Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
3094 Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
3096 * Makefile.am (distcheck): New target. From Gord Matzigkeit.
3098 Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
3100 * po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise
3101 they won't be built and install could fail. From Ulrich Drepper.
3102 (.po.mo): Disable dependency and rule when not in maintainer mode.
3104 * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
3105 on whether we're using GNU gettext. From Ulrich Drepper.
3107 Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
3109 * intl/Makefile.in (distdir): Renamed from dist. For compatibility
3111 * po/Makefile.in.in (distdir): Likewise.
3113 * po/Makefile.in.in (all-yes): Depend on GMOFILES.
3114 Depend on CATALOGS and GMOFILES files only in maintainer mode.
3116 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
3118 * configure.in: Require autoconf-2.10.
3120 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
3121 * configure.in (jm_MAINTAINER_MODE): Use it.
3123 Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov)
3125 * configure.in (LINGUAS): Add de.
3126 * po/de.po: New file.
3128 * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
3129 * regex.c [IN_CTYPE_DOMAIN]: Likewise.
3130 * system.h [IN_CTYPE_DOMAIN]: Likewise.
3132 Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
3134 * fmt.c (copy_rest): Don't copy past end of prefix. Output
3135 trailing spaces if the prefix had any. Before, fmt would
3136 improperly output NUL bytes. The command
3137 perl -e 'print "| S";' |fmt -p' | '|tr '\0' @
3138 output `|@S'. Reported by François Pinard.
3140 * sort.c (main): Give a better diagnostic for `sort -0'.
3141 Reported by Karl Berry.
3143 * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
3144 Otherwise, some systems lose because the value AC_C_INLINE choses
3145 with plain `cc' is different from that chosen when using the ANSI-mode
3146 C compiler. From Kaveh Ghazi.
3148 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
3150 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
3151 * configure.in: Use it.
3152 * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
3153 (EXTRA_DIST): Add getopt.c and getopt1.c
3155 * src/*.c, src/*.h: Update Copyright years to include 1996.
3157 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
3159 * getline.c: New version from gettext-0.10.12.
3160 * getline.h: Likewise.
3161 * configure.in (AC_CHECK_FUNCS): Add getdelim.
3162 Suggested by Ulrich Drepper.
3164 * md5sum.c (md5_check): Remove spurious newline at end of error
3167 * od.c (decode_one_format): Use printf's L modifier for long doubles,
3168 not `l'. From Eric Backus.
3170 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
3172 * od.c: Include <values.h>.
3173 [!BITSPERBYTE]: Define.
3174 [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
3175 * configure.in (AC_CHECK_HEADERS): Add values.h.
3177 Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov)
3179 * Makefile.am (cvs-dist): New rule. Based on the one from
3180 Tom Tromey's automake.
3182 Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
3184 * tail.c (main): Make code clearer: use new variable `n_files' in
3185 place of `argc - optind'. Use `file' instead of `argv + optind'.
3187 Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
3189 * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
3192 * memcasecmp.c: Unprotoize.
3196 * join.c (decode_field_spec): Rename local variable `valid'
3197 to invalid (and reverse sense) to avoid conflict with the
3198 macro definition in /usr/include/locale.h on SunOS 4.1.3.
3200 Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
3202 * uniq.c: Add new option --ignore-case (-i).
3203 Include memcasecmp.h.
3204 (different): Compare with memcasecmp if ignoring case.
3207 * join.c (memcasecmp): Remove static definition of function.
3208 Include memcasecmp.h instead.
3210 * memcasecmp.c: New file.
3211 * memcasecmp.h: New file.
3212 * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
3213 (noinst_HEADERS): Add memcasecmp.h.
3215 Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov)
3217 * tr.c: The following commands all failed unnecessarily.
3218 tr -cs '[:upper:]' '[X*]'
3219 tr -dcs '[:lower:]' n-rs-z
3220 tr -ds '[:xdigit:]' [:alnum:]'
3221 tr -dcs '[:alnum:]' [:digit:]'
3223 Reported by Ross Ridge (ross@worf.mks.com).
3224 (validate): Add missing conjunct (translating) in test for
3225 `translating and complementing character classes' error. Before,
3226 valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
3227 (homogeneous_spec_list): New function.
3228 (validate): Use it to relax the old (overly restrictive) restriction
3229 that prohibited use of complemented character classes when translating.
3230 Now, that is allowed as long as the translation maps many to one.
3231 (get_spec_stats): Rename and redefine global has_char_class from
3234 Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
3236 * aclocal.m4: Update NLS macros from gettext-0.10.11.
3238 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
3239 when srcdir != builddir. From Kaveh Ghazi.
3241 Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov)
3243 * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
3244 to be POSIX compliant. From Stephen Gildea <gildea@x.org>.
3246 Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
3248 * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
3249 * od.c (skip, main): Likewise.
3250 * tr.c (main): Likewise.
3252 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
3253 join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
3254 tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
3255 EXIT_FAILURE, rather than 0 or 1.
3257 Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
3259 * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
3260 is defined to zero. Suggested by Paul Eggert.
3262 * sort.c [SORT_FAILURE]: New macro.
3263 Be careful to exit with 1 only when -c is used and the
3264 input is not properly sorted. In all other cases, use
3265 SORT_FAILURE as required by POSIX.
3266 (main): Change some `error (1, ...' to use SORT_FAILURE.
3267 Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
3268 Replace all uses of `2' (as exit code) with SORT_FAILURE.
3270 Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov)
3272 * csplit.c: Include assert.h, but disable assertions.
3273 (process_line_count): Replace if-abort with a slightly relaxed
3274 assertion. Before, `echo |csplit - 1 1' would abort.
3275 Reported by Samuli.Karkkainen@hut.fi.
3276 (parse_patterns): Disallow uses like `csplit FILE 0' with zero
3277 line number, `csplit FILE 2 1' with decreasing line numbers, and
3278 warn about uses like `csplit FILE 3 3' that have equal line numbers.
3280 * sort.c (main): Declare to be of type int, not void.
3281 From Peter Seebach <seebs@taniemarie.solon.com>.
3282 * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
3283 nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
3284 wc.c (main): Likewise.
3286 Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
3288 * configure.in (PACKAGE_VERSION): New macro.
3289 * acconfig.h (PACKAGE_VERSION): Add it.
3290 * src/Makefile.am: Remove rules for generating version.c.
3291 Remove references to version.o, version.h, and stamp-v.
3292 * version.c: Remove file.
3293 * version.h: Remove file.
3294 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
3295 head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
3296 sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
3298 (main): Use PACKAGE_VERSION instead of version_string.
3300 Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
3302 * sort.c (write_bytes): Renamed from xfwrite.
3303 Remove SIZE parameter. It was always 1. Update all callers.
3304 Rename NELEM parameter to N_BYTES and change its type to size_t.
3306 Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
3308 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
3309 fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
3310 split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
3311 Initialize for internationalized message support: call setlocale,
3312 bindtextdomain, and textdomain.
3313 * system.h: Add definitions and includes for NLS.
3314 * Makefile.am (SUBDIRS): Add intl and po.
3315 * src/Makefile.am (datadir): Define.
3316 (localedir): Define.
3317 (DEFS): Add LOCALEDIR definition.
3318 (LDADD): Add @INTLLIBS@.
3319 * aclocal.m4: Add NLS-related macro definitions from
3320 gettext distribution.
3321 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
3322 HAVE_STPCPY): New macros.
3323 Add PACKAGE and VERSION.
3324 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
3325 (VERSION): Likewise.
3326 (ALL_LINGUAS): Define.
3327 (AC_CHECK_HEADERS): Add float.h.
3328 (ud_GNU_GETTEXT): Use it.
3330 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
3332 From François Pinard.
3334 * tr.c (star_digits_closebracket): Declare formal param, IDX,
3335 and local I to be of type size_t (rather than int) to avoid
3336 warnings from gcc -Wall.
3338 Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
3340 * src/Makefile.am: Adapt for automake-0.30.
3341 (noinst_HEADERS): Rename from HEADERS.
3342 (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
3343 to DEFS automatically.
3344 * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
3346 Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
3348 * join.c (xfields) [without -t]: Ignore leading blanks.
3349 From David Dyck (dcd@tc.fluke.COM).
3351 Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
3353 * join.c [TOLOWER]: Define.
3354 (usage): Briefly describe new --ignore-case (-i) option.
3355 (memcasecmp): New function.
3356 (main): Set IGNORE_CASE for -i.
3357 (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
3358 Suggestion and an initial patch from Alberto Accomazzi
3359 <alberto@cfa0.harvard.edu>.
3361 Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
3363 * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
3364 (usage): Describe it.
3365 (main): Set eolchar to 0 for -z.
3366 From Mark W. Eichin <eichin@cygnus.com>.
3368 Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
3370 * join.c (main): Mark two strings for translation.
3371 * md5sum.c (md5_check): Mark a string for translation.
3372 From François Pinard.
3374 Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
3376 Update for automake-0.29.
3377 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
3378 * src/Makefile.am: Likewise.
3379 * lib/Makefile.am: Likewise.
3380 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
3381 * man/Makefile.am (man_MANS): Renamed from MANS.
3383 * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
3385 From Derek Clegg (dclegg@next.com).
3387 Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
3391 Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
3393 * tail.c (dump_remainder): Flush stdout when tailing-forever on
3394 multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
3396 Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
3398 * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
3399 not just -Xc. From François Pinard.
3401 * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
3402 distributed automatically. From Tom Tromey.
3404 Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
3406 * nl.c: Include rx.h after limit.h (not before) to avoid warning
3407 about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
3408 its definition. From Kaveh Ghazi.
3410 * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
3411 works again. Reported by François Pinard and Kaveh Ghazi.
3413 * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
3414 [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
3415 (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
3416 mismatch errors from e.g. SunOS's /bin/cc.
3417 Reported by Kaveh Ghazi.
3419 Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
3421 * configure.in (VERSION): Set variable directly rather than from
3423 * Makefile.am (DIST_OTHER): Remove VERSION.
3424 * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
3425 (stamp-v): New target; depend on Makefile.
3426 (DISTCLEANFILES): Add stamp-v, version.c.
3428 Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
3430 * sort.c (keycompare): Rewrite cases handling ignored characters
3431 so that they really are ignored. Reported by Carl Johnson
3432 <carlj@cjlinux.home.org>.
3434 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3436 * configure.in: Touch stamp-h only if config.h is remade.
3438 * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
3439 syntax_parens field.
3441 Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
3443 Use automake to generate Makefile.in files.
3444 * Makefile.am: New file.
3445 * doc/Makefile.am: New file.
3446 * lib/Makefile.am: New file.
3447 * man/Makefile.am: New file.
3448 * src/Makefile.am: New file.
3450 Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
3452 * fmt.c (main): Use xstrtol instead of atoi.
3454 * fold.c (main): Use xstrtol instead of atoi.
3455 (fold_file): Make a couple locals `int', not size_t, and cast
3456 fwrite's third parameter to size_t.
3458 * nl.c (main): Use xstrtol instead of atoi.
3459 Rename misleading --first-page=N option to --starting-line-number=N.
3462 * uniq.c (main): Use xstrtol instead of atoi.
3464 Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
3466 * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
3468 Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
3470 * aclocal.m4 (ud_WITH_REGEX): New macro.
3471 * configure.in: Use it.
3472 * rx.c, rx.h: New files.
3473 * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
3474 (SOURCES, DISTFILES): Add rx.c, rx.h.
3475 * acconfig.h (WITH_REGEX): Add it.
3476 * csplit.c [!WITH_REGEX]: Include rx.h.
3477 * nl.c [!WITH_REGEX]: Likewise.
3478 * tac.c [!WITH_REGEX]: Likewise.
3479 From Ulrich Drepper and François Pinard.
3481 Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
3483 * sort.c (main): Diagnose invalid arguments to -k, then fail.
3485 * sort.c (numcompare): Properly handle all cases in which signs differ.
3488 * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
3489 Append `/man1'. Reported by Karl Heuer.
3491 * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
3493 * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
3495 Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
3497 * lib/Makefile.in (default): New target.
3499 * sort.c (numcompare): Properly order `-' and valid integers;
3500 treat `-' as if it were zero. Reported by Ross Alexander
3501 <r.alexander@auckland.ac.nz>.
3503 * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
3504 (.PHONY): Depend on default.
3506 Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
3508 * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
3509 (jm_AUTODEPS): Likewise.
3510 (jm_WITH_GNU_MAKE): Likewise.
3511 * configure.in (jm_AUTODEPS): Remove.
3513 * sort.c (begfield): Replace loop with equivalent if-else.
3514 (limfield): Fix bug that made field specs like -k1.5 return a
3515 pointer into LINE beyond the first field.
3516 Don't try to trim trailing blanks here; it's not
3517 possible because we don't know where the field begins.
3518 Replace loop with equivalent if-else.
3519 (trim_trailing_blanks): New function.
3520 (findlines): Call it.
3521 (keycompare): Likewise.
3522 (main): Don't decrement T2 corresponding to `x' in field
3523 specs like -ku.v,w.x.
3525 Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
3527 * csplit.c [!UINT_MAX]: Define.
3530 (string_to_number): Remove function.
3531 (check_for_offset): Use xstrtoul instead of string_to_number.
3532 (parse_repeat_count): Likewise.
3533 (parse_patterns): Likewise.
3536 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
3538 * Makefile.in (all et. al.): If make was invoked with -k and a
3539 sub-make fails, fail after the loop rather than exiting right away.
3540 Otherwise, make's -k option could be ineffective.
3542 Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
3544 * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
3546 Update for autoconf-2.5:
3547 * src/Makefile.in (libdir): Set to @libdir@.
3548 (bindir): Set to @bindir@.
3549 * doc/Makefile.in (infodir): Set to @infodir@.
3550 * man/Makefile.in (exec_prefix): Remove it.
3551 (mandir): Set to @mandir@.
3552 (bindir): Remove it.
3554 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
3556 * Makefile.in (default): New default target. Depend on `all' to
3557 work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
3560 Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
3562 * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
3564 * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
3565 * src/Makefile.in (C_MKDEP): Rename from MKDEP.
3566 * lib/Makefile.in (C_MKDEP): Likewise.
3567 * mkdep-Makefile (C_MKDEP): Likewise.
3570 * csplit.c [__P]: Don't define it here.
3571 * pr.c [__P]: Don't define it here.
3572 * fmt.c [__P]: Don't define it here.
3573 * system.h [__P]: Define it here.
3575 * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
3576 Revamp, with suggestions from Franc,ois Pinard.
3577 (jm_WITH_GNU_MAKE): New macro.
3578 (jm_PROG_MKDEP): New macro.
3579 * configure.in (jm_PROG_MKDEP): Use it.
3580 * src/Makefile.in (MKDEP): Set it.
3581 * lib/Makefile.in (MKDEP): Likewise.
3582 * mkdep-Makefile: Use MKDEP, not DEP_CC.
3583 (DEP_CFLAGS): Remove it.
3585 Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
3587 * sort.c: Add support for sorting numbers in scientific notation.
3589 (struct keyfield): Add field: general_numeric.
3590 (usage): Describe -g option.
3591 (general_numcompare): New function.
3592 (keycompare): Use new comparison function when general_numeric
3594 (set_ordering): Honor `g' flag.
3595 (main): Initialize and use new field.
3596 From Marcus Daniels <marcus@sysc.pdx.edu>.
3598 * configure.in (AC_REPLACE_FUNCS): Add strtod.
3599 * lib/Makefile.in (SOURCES): Add xstrtod.c.
3600 (OBJECTS): Add xstrtod.o.
3601 (DISTFILES): Add xstrtod.h.
3603 * csplit.c (cleanup): Don't exit.
3604 (interrupt_handler): Rewrite to reset default signal handler
3605 then repost caught signal.
3606 (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
3607 process_line_count, process_regexp, create_output_file,
3608 close_output_file): Call cleanup_fatal, not cleanup.
3609 Add const attribute to lots of parameters.
3610 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
3613 * tac.c: (cleanup): Don't exit.
3614 (cleanup_fatal): New function. Call cleanup, then exit.
3615 (sighandler): New function.
3616 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
3618 (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
3620 Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
3622 * od.c (skip): Cast fseek's offset argument to `long'.
3623 Erik Bennett <bennett@cvo.oneworld.com> reported that this is
3624 necessary on BSDI systems. And if offset doesn't fit in a long,
3625 then try using lseek instead.
3627 * sort.c (xmalloc): Declare static.
3628 (xrealloc): Likewise.
3630 * tac.c (cleanup): Add signal number parameter.
3633 * cat.c (main): Don't die when dev/ino of input and output are
3634 the same and the file descriptors correspond to stdin and stdout.
3635 This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
3636 Otherwise, running `cat << X > $$' would fail with `cat: -: input
3637 file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
3639 * Makefile.in (DISTFILES): Add @README_ALPHA@.
3640 (config.status) Depend on VERSION.
3641 * configure.in: Set README_ALPHA if the version number ends in [a-z].
3643 Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
3645 * fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
3647 src/Makefile.in (.c._c): Don't redirect directly to $@.
3648 (._c._o, .c._o): Remove temporary src file.
3650 Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
3652 * VERSION: New file.
3653 * configure.in (VERSION): New variable.
3654 (PACKAGE): New variable.
3656 * Makefile.in (DISTFILES): Add VERSION.
3657 (distdir): Use @PACKAGE@-@VERSION@, not distname.
3658 Remove all references to distname.
3659 * src/Makefile.in (version.c): Generate it.
3660 (SOURCES): Remove now-generated version.c.
3661 (distclean): Delete version.c.
3662 * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
3665 * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
3666 Remove all references to distname.
3668 * split.c: New option: --verbose.
3669 (main): Recognize it.
3670 (usage): Document it.
3671 From Marty Leisner <leisner@sdsp.mc.xerox.com>.
3673 Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
3675 * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
3679 (store_columns): Remove spurious 2nd argument in call to read_line.
3680 [__P]: Define. Use it in prototyped forward decls.
3682 * csplit.c: Move prototypes after struct declarations.
3683 Remove prototypes for xmalloc, xrealloc.
3684 Protect prototypes with __P.
3685 (new_control_record): Cast arg 1 to realloc.
3687 * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
3690 Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
3692 * csplit.c (close_output_file): Set output_stream to NULL so we
3693 don't recurse endlessly between this function and cleanup.
3695 * unexpand.c: Reorder functions to obviate forward dcls. Remove
3696 forward dcls. Protoize. Add `const' attribute to some parameters.
3698 Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
3700 * wc.c: Reorder functions to obviate forward dcls. Remove
3701 forward dcls. Protoize. Add `const' attribute to some parameters.
3703 * split.c: Likewise.
3705 * split.c (isdigits, convint): Remove these.
3706 (main): Use xstrtol instead.
3708 Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
3710 * paste.c (main): Move function body to end of file.
3711 Remove forward dcls and protoize.
3712 * sum.c (main): Likewise.
3713 * nl.c: Protoize. Reorder functions to obviate forward dcls.
3714 Remove forward dcls.
3716 * src/Makefile.in (OBJECTS): Reflect that all of the above
3719 * sum.c (bsd_sum_file): Give file name parameter const attribute.
3720 (sysv_sum_file): Likewise.
3722 * tac.c (xwrite): Give output buffer parameter const attribute.
3723 (output): Likewise for both parameters.
3724 (tac): Likewise for file name parameter.
3725 (tac_file): Likewise.
3727 Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
3729 * md5sum.c (md5_check): Use the same message format when there is
3730 a single file and it gets a read error or checksum mismatch as when
3731 there are more. Write that warning to standard error, not standard
3732 output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
3734 Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
3736 * sort.c (xtmpfopen): New function to set proper permissions on
3737 temporary files. Use it instead of xfopen. Reported by Erik Corry
3738 (erik@kroete2.freinet.de).
3740 Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
3742 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
3743 * configure.in: Use it.
3745 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
3746 (.c.o): Rewrite to be more like src/Makefile.in.
3748 * src/Makefile.in (distclean): Remove .deps.
3749 Include @top_srcdir@/mkdep-Makefile.
3751 * mkdep.Makefile: New file.
3752 * Makefile.in (DISTFILES): Add mkdep-Makefile.
3753 * doc/Makefile.in (mostlyclean): Also remove *.info.
3755 Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
3757 * od.c: Indent cpp directives.
3759 * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
3760 with large repeat counts.
3761 (struct E_string): New struct.
3762 (find_closing_delim): Take E_string arg rather than char* and length.
3763 (find_bracketed_repeat): Likewise.
3764 (star_digits_closebracket): New function.
3765 (append_char_class): No longer give diagnostic.
3766 (append_equiv_class): Likewise.
3767 (build_spec_list): Give them here instead, allowing string1 like
3768 [:*][:upper:] that got errors before.
3769 Take E_string arg rather than char*.
3770 Convert switch stmts into if-then so as to use ES_MATCH.
3772 Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
3774 * cat.c: Protoize. Reorder functions to obviate forward dcls.
3775 Remove forward dcls.
3776 * expand.c: Likewise.
3783 * src/Makefile.in (OBJECTS): Reflect that all of the above
3786 * head.c: Add `const' attribute to dcls of lots of formals.
3788 * sort.c: Add `const' attribute to dcls of lots of formals.
3789 Move struct dcls to precede dcls of file-scope variables.
3790 (monthtab, keyhead): Separate variable dcls from type dcls.
3792 Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
3794 * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
3795 list item separators, per POSIX spec.
3796 (prjoin): Rewrite loop that iterates over field specs.
3797 Handle case in which file spec is 0.
3799 Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
3801 * strpbrk.c: New file.
3802 * lib/Makefile.in (SOURCES): Add strpbrk.c.
3805 Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
3807 * join.c (add_field): No longer return a value.
3808 (decode_field_spec): New function.
3809 (add_field_list): Rewrite to be more strict.
3810 Before, `,1.2' was accepted as valid.
3811 (main): Use xstrtol instead atoi.
3812 Combine nearly identical -a and -v cases.
3815 Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
3817 * join.c (main): Report `too few/many non-option arguments'
3818 then print --help output rather than just the latter.
3819 Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
3820 (usage): Describe POSIX -1, -2 options and deprecate -j* ones
3822 * join.c (usage): Move to precede all other functions.
3826 Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
3828 * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
3829 to determine whether `sigaction' functions are available.
3830 Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
3831 Fix suggested by Karl Berry.
3833 * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
3836 * cut.c: Convert many declarations using `int' to use `unsigned int'
3837 to avoid warnings from `gcc -Wall' about comparing signed and
3839 (set_fields): Use memset (not open coded loop) to initialize array.
3841 Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
3845 * Makefile.in (DISTFILES): Remove README.alpha for major release.
3847 * od.c (decode_one_format): Remove spurious semicolon.
3850 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
3852 * man/Makefile.in (install-data, uninstall): Use sed not basename.
3853 The GNU Coding Standard suggests that only a select set of
3854 relatively standard utilities be used in Makefiles. basename is
3855 not among them. Suggested by Ulrich Drepper.
3857 Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
3859 * cksum.c: Protoize.
3862 * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
3864 (cksum): Depend on cksum$O.
3865 (cut): Depend on cut$O.
3867 Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
3871 * Makefile.in (DISTFILES): Add README.alpha.
3873 * lib/Makfile.in: (GETOPT, MEMCHR, REGEX): New variables.
3874 (OBJECTS): Use them instead of hardcoding object file names.
3875 Suggested by Ulrich Drepper.
3877 * md5sum.c (md5_check): Distinguish between open/read failure
3878 and checksum mismatch.
3880 Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
3882 * md5sum.c: Protoize.
3883 * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
3884 (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
3885 (md5sum): Depend on md5sum$O.
3887 * md5sum.c (main, usage): Remove -h, -s, -v short options.
3888 Rename --verbose to --warn, --quiet to --status.
3889 (main): Handle --help and --version using parse_long_options.
3890 (md5_check): Check ferror.
3892 * sort.c (tempname): Replace `16' with a more readable expansion.
3893 Make sure that counter never exceeds 99999.
3894 (checkfp): Rearrange loop to avoid duplicate test.
3895 Move a couple dcls from function scope into inner block.
3897 Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
3899 * md5sum.c (main): Fail if either --verbose or --quiet is specified
3900 when not verifying checksums.
3902 * md5sum.c (md5_check): Fail if no valid line is found.
3903 Don't use the word `fail' unless there were failures --
3904 instead, say `all N tests passed.'
3906 * md5sum.c (main) [handling --string option]: Don't output
3907 nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
3908 * md5-test.rfc: Remove now-inconsistant `b' marker.
3909 (usage): Clarify help message. With suggestions from Greg Troxel.
3911 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
3913 * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
3914 compiler warning. From Ulrich Drepper.
3916 * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
3917 compiler warning. From Ulrich Drepper.
3919 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
3922 Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
3924 * system.h (_): Define macro -- as empty for now.
3925 * src/*.c: Annotate localizable strings with _(...). From Franc,ois.
3927 Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
3931 * configure.in: Add fp_C_PROTOTYPES.
3933 Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
3935 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
3936 Add suffixes, dependencies, and rules to convert ANSI source to K&R
3937 when required. Mark tr.o and comm.o as the only such files (for now).
3942 * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
3943 (configure): Depend on aclocal.m4.
3944 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
3946 Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
3948 * md5sum.c (md5_check): Use getline instead of fgets.
3950 * lib/Makefile.in: (SOURCES): Add getline.c.
3951 (OBJECTS): Add getline.o.
3952 (DISTFILES): Add getline.h.
3953 (getline.o): Depend on getline.h.
3955 * md5.c [memcpy]: Define to bcopy if needed.
3956 (md5_buffer): Explicitely cast SWAP expressions to unsigned
3959 * lib/Makefile.in (strtoul.o): Depend on strtol.c.
3961 * sort.c (check): Print `disorder on...' message on standard error,
3962 not stdout. This is a minor concession to POSIX which says
3963 `no output shall be produced...'.
3965 * sort.c (main): Fix -k so it works. -k 2,3 was being treated
3966 like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
3968 Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
3970 * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
3971 before applying $(transform) to manual name. From Karl Berry.
3973 * md5sum.c (have_read_stdin): New global variable.
3974 (md5_file, md5_check): Set it.
3977 * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
3978 (md5_file): Take a new parameter, MD5_RESULT, and no longer
3980 (md5_check): Invoke md5_file instead of calling fopen directly.
3981 When giving a diagnostic for a line with invalid format, also report
3983 (main): Generate output after a successful md5_file call.
3984 [in many places]: Upon detection of an error, rather than exiting
3985 immediately, issue a diagnostic, note that an error occurred and
3988 Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
3990 * tail.c (tail_bytes) [from_start]: For regular files, seek
3991 relative to the initial input file pointer position, not
3992 necessarily from the beginning of the file.
3993 [!from_start]: Don't back up past the initial position of the
3995 (tail_lines): Call file_lines only if FD refers to a regular file
3996 with its file pointer positioned at beginning of file. Otherwise,
3997 call pipe_lines. This is a kludge. Once there's a decent test
3998 suite, fix this properly.
3999 Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
4000 would output both lines of the input file even though the first had
4001 already been read. Reported by John Roll (john@panic.harvard.edu).
4003 * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
4005 * csplit.c (main): When too few arguments are given, don't just
4006 issue the usage message; also report why.
4008 Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
4010 * md5sum.c (md5_check): New function -- extracted from main.
4012 Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
4014 * md5sum.c (md5_file): New function -- extracted from main.
4015 (main): Call the new function instead of doing all that in an
4016 if-stmt. Always use "%s" format rather than raw filename as
4017 format argument in printf-style functions like error. Otherwise,
4018 filenames containing `%' are likely to lose.
4019 Remove all mention of `old format'.
4020 (split_3): No longer parse the `new format.' There is only one
4021 valid format now: the compatible one.
4023 * lib/Makefile.in: (SOURCES): Add md5.c.
4024 (OBJECTS): Add md5.o.
4025 (DISTFILES): Add md5.h.
4026 (md5.o): Depend on md5.h.
4028 * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
4029 * lib/md5.c (md5_stream): Check for read failure and return
4030 indication of success rather than second argument.
4031 * lib/md5.h (md5_stream): Update prototype.
4032 [__P]: Define macro.
4033 * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
4034 (main): Report an error if md5_stream fails. Otherwise, running
4035 `md5sum dir-on-mounted-filesystem' always reported the checksum
4036 for an empty file. Now it gets the `is a directory' error.
4037 Greg McGary (gkm@magilla.cichlid.com) reported that the released
4038 version got stuck in an infinite loop with such arguments.
4040 * lib/md5.c: New file.
4041 * lib/md5.h: New file.
4042 * md5sum.c: Rewritten to use library interface.
4043 From Ulrich Drepper.
4045 Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
4047 * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
4049 Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
4051 * md5sum.c Add #else block after #ifdef VMS.
4052 (main): Rename local variable.
4053 Detect and report failed fclose calls on stdout and checkfile_stream.
4055 * tr.c (unqote): Comment out unreachable break stmts.
4056 (append_range): Declare FIRST and LAST parameters to be unsigned int,
4058 (find_closing_delim): Clean up interface, separating boolean success
4059 indicator and index.
4060 (find_bracketed_repeat): Likewise.
4061 (build_spec_list): Adapt to use new interfaces.
4062 Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
4063 type size_t, not int.
4064 (main): Declare NR and CHARS_READ to be of type long, not int.
4066 * sort.c (main): Comment out unreachable break stmt.
4068 * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
4069 call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
4070 off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
4071 long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
4073 * comm.c: Reorder functions so main is last, so no forward dcls
4076 Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
4078 * sort.c (main): When using obsolescent +pos -pos syntax, allow
4079 omission of field spec only when character offset is specified.
4080 Otherwise, -. +. would be accepted.
4082 Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
4084 * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
4085 position specification. For compatibility with existing practice
4086 (what vendors?), omitting M is now equivalent to specifying `0' for M,
4087 but only when using the +pos -pos syntax, not with the -k option.
4088 From Rick Sladkey (jrs@world.std.com).
4090 Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
4092 * od.c (dump): Correct loop-termination criterion.
4093 Before, running `printf 1234| ./od --width=4 --read-bytes=4'
4094 printed output for 8 bytes -- the last four were garbage.
4095 This happened only when the dump limit, N, was specified (with
4096 --read-bytes=N) and N was a multiple of bytes_per_block
4097 (usually 16, but 4 in this example). From Andreas Schwab.
4099 Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
4101 * lib/Makefile.in (check): Depend on libtu.a.
4103 * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
4104 (main): Print each sum line in (de facto) standard Plumb/Lankester
4106 New option: --quiet.
4107 Check option no longer takes an argument.
4108 When checking, exit status reflects success.
4110 Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
4112 * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
4113 Autoconf (via config.h) defines it away for compilers that don't
4116 * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
4117 defining to avoid redefinition warning on some systems.
4119 * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
4120 This avoids potential conflict with max macro from some system's
4121 header files when using bad pre-ANSI compilers.
4123 * uniq.c (usage): Fix typo in text of --help output.
4124 From Steve McConnel <steve@acadcomp.sil.org>
4126 * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
4127 also check `unsigned long', as a concession to systems with
4128 int's smaller than 32 bits.
4130 * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
4131 AC_FUNC_MEMCMP already handles it. This avoids warnings from
4132 ranlib on nextstep systems. From Kaveh Ghazi.
4134 * csplit.c (interrupt_handler): Declare to have a single integer
4135 parameter. Otherwise, some compilers fail with a type mismatch
4136 error in sa_handler assignment.
4138 * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
4139 headers that typedef `word' get syntax errors because of the
4140 variable by the same name.
4142 * join.c [join]: Redefine to avoid conflict with prototype in some
4143 system header file. Also for Unicos.
4145 * md5sum.c (main): Remove spurious colon in getopt spec string.
4146 From Ken Pizzini <kenp@spry.com>.
4148 Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
4150 * md5sum.c (md5_file): Initialize two elements of LEN portably,
4151 rather than with ANSI aggregate initialization. Reported by
4152 Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
4154 Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
4158 * md5sum.c (process_buffer): Copy values from struct into
4159 individual local variables before performing computation on them,
4160 then copy results back into returned struct. Solely for better
4161 optimization by compilers that can't keep struct members in
4162 registers. From Ulrich Drepper.
4164 Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
4166 * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
4167 Don't use #elif. Some older compilers don't grok it.
4168 (split_3): New function to parse out sum, flag, and filename
4169 when reading check file.
4170 (hex_digits): Remove length parameter since string parameter is
4172 (main): Don't allocate separate arrays for filename and sum
4173 when checking. Get pointers into line buffer with split_3 instead
4175 (main): Treat `no file args' just like `-' when not checking
4177 (hex_digits): Unprotoize.
4179 * md5sum.c (main): Don't use a separate loop to convert to lower
4180 case. Suggested by Ulrich Drepper.
4183 From Ulrich Drepper.
4185 * md5sum.c: Don't include values.h.
4188 * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
4189 and _POSIX_VERSION. Reported by Arne H. Juul.
4191 Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
4193 * tr.c [NDEBUG]: Define it to disable assertions. Some systems
4194 have a broken <assert.h> header.
4195 (is_char_class_member): Set a variable in each branch of switch
4196 stmt and return that value after the switch (rather than returning
4197 directly from every branch).
4198 (unquote): More int->size_t changes.
4199 (build_spec_list): More int->size_t changes.
4200 Be very careful about comparison now that variables are unsigned:
4201 Use i + 2 < len rather than i < len - 2. The latter didn't work
4202 for len < 2. Caught early thanks to a thorough regression test
4205 Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
4207 * sort.c (xfclose): Don't try to flush stdin, only stdout.
4208 Otherwise, at least Ultrix-4.3's fflush would return EOF.
4209 Reported by Jim Blandy (jimb@cyclic.com).
4211 * tr.c (non_neg_strtol): Don't compare signed and unsigned.
4212 [struct Spec_list] (indefinite_repeat_element): New member.
4213 Use size_t rather than int or unsigned long where reasonable.
4214 (get_spec_status): Make interface cleaner.
4215 (get_s1_spec_status): New function.
4216 (get_s2_spec_status): New function.
4217 (validate): Use new functions instead of get_spec_status.
4219 Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
4221 * md5sum.c: New file. From Ulrich Drepper.
4222 * md5-test.rfc: New file.
4223 * Makefile.in: (PROGS): Add md5sum.
4224 (check): Run a recursive make in each subdirectory.
4225 * man/Makefile.in: (MANFILES): Add md5sum.1.
4226 * src/Makefile.in: (SOURCES): Add md5sum.c.
4227 (OBJECTS): Add md5sum.o.
4228 (PROGS): Add md5sum.
4229 (check): Add basic checks for md5sum.
4230 (md5sum): Add dependency and link rule.
4231 (DISTFILES): Add md5-test.rfc.
4233 * tr.c (look_up_char_class, append_char_class, append_equiv_class):
4234 Use const attribute when appropriate.
4236 Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
4238 * join.c: Overhauled to make -a1 and -a2 options work.
4239 Passed all tests in a fairly thorough test suite.
4240 Reported by Michael Hasselberg (mikelh@zonta.ping.de).
4242 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
4244 * tail.c (main): Remove dcl of and statements that set now-unused
4247 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
4248 Without this, SunOS doesn't get type for memchr.
4249 Reported by Kaveh Ghazi.
4251 Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
4253 * tail.c (tail_lines): Change one more `long' to `off_t'.
4254 Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
4256 * csplit.c [struct control]: Change type of `repeat' to unsigned
4257 long to avoid conversion warning.
4259 Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
4261 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
4263 * xstrtol.c (__strtol): Remove prototype altogether.
4264 Move inclusion of xstrtol.h back so that it follows system headers.
4268 Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
4270 * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
4273 * xstrtol.c: Define NDEBUG for systems with losing assert.h.
4274 (__strtol): Add __unsigned to prototype and use __P.
4275 Move inclusion of xstrtol.h to precede prototype.
4278 * memmove.c: Include config.h for definition of const.
4281 * All Makefile.in (install-exec, install-exec): New targets.
4284 * tr.c (look_up_char_class): Take a string length argument -- required
4285 because the argument is a string that is *not* NUL-terminated.
4286 Use strncmp, not strcmp and add string lengths comparison.
4287 (append_char_class): Update caller. Before this change,
4288 tr '[:upper:]' '[:lower:]' read one uninitialized byte.
4289 From Andreas Schwab.
4291 * split.c (next_file_name): Move dcls of file-scope variables into
4292 this function. Don't rely on arithmetic being two's complement.
4294 * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
4295 Instead, declare two FILE structs and use their addresses.
4297 * csplit.c (record_line_starts): Remove set-but-not-used,
4298 file-scope variable.
4300 Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
4302 * all source files (usage): Include one- or two-line synopsis
4303 in --help output. From Karl Berry.
4305 * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
4308 Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
4312 Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
4314 * all Makefile.in (maintainer-clean): Renamed from realclean
4317 Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
4319 * sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
4320 Don't include safe-stat.h.
4322 * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
4323 Remove all associated rules. safe-l?stat.h are no longer used.
4325 * sort.c Don't hard-code /tmp.
4326 [DEFAULT_TMPDIR]: Use this instead.
4327 * tac.c (save_stdin): Likewise.
4329 * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
4330 Reported by John Salmon (johns@mullet.anu.edu.au).
4331 Patch from Mike Haertel.
4333 Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
4335 * sort.c (tempname): AND-off high bits of pid so that its decimal
4336 string representation is no longer than five digits.
4337 From Hans Verkuil (hans@wyst.hobby.nl).
4339 Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
4341 * expand.c (add_tabstop): Give correct size when reallocating
4342 tab_list buffer. From Geoff Odhner (geoff@franklin.com).
4343 Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
4345 Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
4347 * configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
4348 unnecessary conflicts for people using version control software
4350 (AC_ARG_PROGRAM): Use it.
4352 Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
4354 * head.c: Remove block of redundant comments describing options.
4355 (usage): Remove reference to -l option. It's not valid.
4357 * od.c (write_block): Declare index I as unsigned int, not int.
4358 (get_lcm): Likewise.
4359 (dump_strings): Likewise.
4361 (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
4362 (dump_strings): Declare bufsize to be of type size_t, not int.
4364 * split.c (next_file_name): Don't reuse X as an index.
4365 Declare new variable I instead.
4367 Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
4369 * csplit.c: Declare as `unsigned int' all variables that were
4371 (make_filename): Change type of arg to unsigned int.
4372 (split_file): Change type of indices to unsigned int.
4374 Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
4376 * od.c (main): Detect and fail when argument to -N is too large
4379 Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
4381 * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
4382 Remove check for sizeof long.
4384 * linebuffer.h: Undefine __P before defining it.
4385 * long-options.h: Likewise.
4386 * xstrtol.h: Likewise.
4388 * memcpy.c: New file.
4389 * lib/Makefile.in (SOURCES): Add memcpy.c.
4391 Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
4393 * src/*.c: Update Copyright dates.
4395 Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
4397 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
4398 Separate errno declaration from STDC_HEADERS.
4400 * wc.c (wc): For efficiency, handle separately the cases in which
4401 words need not be counted. Suggested by Karl Heuer.
4403 * wc.c (wc): Don't overcount the number of bytes when reading
4404 from a regular file on stdin with file pointer not at BOF.
4405 From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
4406 `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
4407 the size of the file. Now it outputs `0'.
4409 Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
4411 * cat.c (cat): Use memmove rather than bcopy.
4412 * csplit.c (load_buffer): Use memcpy rather than bcopy.
4413 (extract_regexp): Use strrchr, not rindex.
4414 * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
4415 (flush_paragraph): Use memmove instead of bcopy.
4416 * fold.c (fold_file): Use memmove instead of bcopy.
4417 * od.c (decode_format_string): Use memmove instead of bcopy.
4418 [EQUAL_BLOCKS]: Use memcmp, not bcmp.
4419 (parse_old_offset): Use strchr, not index.
4420 (dump): Use memset, not bzero.
4421 * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
4422 (fillbuf): Use memmove instead of bcopy.
4423 * split.c (main): Use memset, not bzero.
4424 (line_bytes_split): Use memmove instead of bcopy.
4425 * tac.c (tac): Use memmove instead of bcopy.
4426 (output): Use memcpy instead of bcopy.
4427 * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
4428 * tr.c (substr): Use memcpy instead of bcopy.
4429 (card_of_complement, set_initialize): Use memset, not bzero.
4431 * tr.c (substr): Don't allocate a byte for trailing NUL in result
4432 since the result needn't be NUL-terminated. Don't NUL terminate it.
4434 * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
4436 (AC_CHECK_FUNCS): Add strchr and strrchr.
4438 * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
4439 * memmove.c: New file.
4440 * memcpy.c: New file.
4442 Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
4444 * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
4445 not followed by a newline would be followed by data copied from
4446 uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
4447 Reported by Franc,ois Pinard.
4449 * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
4450 AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
4451 Be careful to use off_t instead of explicit `unsigned long'.
4452 Otherwise, systems like 4.4BSD lose on calls to fseek that
4453 expect off_t (which is long long on that system).
4454 (parse_old_offset): Use xstrtoul
4457 * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
4459 Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
4461 * tail.c (numerous functions): Give char* filename arguments the
4464 * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
4465 Add xstrtol.c and xstrtoul.c.
4466 (OBJECTS): Likewise for .o files.
4467 (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
4469 * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
4470 (distclean): Remove references to safe-l?stat.c.
4471 Remove all related rules and dependencies.
4473 * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
4475 Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
4477 * tail.c (tail_file): Fix call to error with %s in format, but
4478 no corresponding argument.
4480 * src/*.c: Include "error.h" instead of simply declaring
4482 * od.c (main): Use %lu, not %d for unsigned long.
4483 (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
4484 and STRTOL_FATAL_ERROR instead.
4486 Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
4488 * sort.c (main): Fix interpretation of field offsets when specified
4489 via -k option. They were being interpreted as zero-indexed. POSIX
4490 says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
4491 (keycompare): Don't ignore characters at the end of words when
4492 otherwise they would compare equal. From Rik Faith.
4494 * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
4495 to off_t because n_bytes is used as the option to fseek and off_t may
4496 be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
4497 imposed is in the string-to-integer converstion of xstrtol.
4498 (main): Use xstrtol instead of manual string to integer conversion.
4500 * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
4501 comparisons against '0' and '9'.
4503 * tr.c [!ULONGMAX]: Define it.
4504 [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
4506 * full-write.c: Declare (or not) errno based on definedness or
4507 errno, not STDC_HEADERS.
4508 * safe-read.c: Likewise.
4509 * xwrite.c: Likewise.
4511 Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
4513 * tail.c (dump_remainder): Flush standard output just before
4514 sleeping so that `tail -f' will output partial lines sooner.
4515 This applies only when following the end of a single file.
4516 From Leonard N. Zubkoff <lnz@dandelion.com>.
4518 * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
4519 start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
4521 * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
4522 * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
4523 not already defined.
4525 Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
4527 * tr.c: Include <getopt.h> instead of "getopt.h".
4529 * sort.c (tempname): Merge two very similar sprintf stmts into one.
4531 * tail.c: Use BUFSIZ instead of BUFSIZE.
4533 * cut.c: Declare DELIM to be `int' rather than unsigned char.
4535 * fmt.c: Use index, not strchr -- per GNU Standards.
4536 Reported by Kaveh Ghazi.
4537 Always include <config.h>.
4538 (main): Include program name in --version output.
4540 Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
4544 Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
4546 * memcmp.c, srtoul.c: Use up-to-date versions.
4547 Reported by Franc,ois Pinard.
4549 * src/Makefile.in (DEFS): Remove -Dlint... again.
4551 * src/Makefile.in (PROGS): Add fmt!
4552 Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
4554 Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
4558 Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
4560 * linebuffer.h: Use __P instead of _P since the latter conflicts
4561 with a definition in some <ctype.h>. From Kaveh Ghazi.
4563 Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
4565 * tr.c: Add const attribute where appropriate.
4567 * tail.c (BUFSIZ): Use definition from <stdio.h>.
4569 Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
4571 * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
4572 n_bytes is positive. Turn off assertions. `tail /dev/null' was
4573 getting a failed assertion. Reported by Doug McLaren
4576 * cut.c (cut_bytes): Print at least a newline for every line of input.
4577 (cut_fields): Print a newline even for lines whose only selected
4578 field is empty. But print nothing when using -s without -f1.
4579 And print nothing for empty input. Reported by
4580 Richard_Sharman@software.mitel.com.
4582 Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
4584 * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
4585 * linebuffer.h: Likewise.
4587 Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
4589 * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
4590 already handles it. From Kaveh Ghazi.
4592 * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
4593 get failures when it's defined. From Kaveh Ghazi.
4595 * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
4596 defined on some Next and Alliant systems. From Kaveh Ghazi.
4598 * sort.c join.c (main): Include version.h and call parse_long_options
4599 with the proper number of arguments. Reported by Franc,ois Pinard.
4601 Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
4603 * (configure.in): Add AC_OFF_T and rearrange by type along the
4604 same lines as autoscan.
4606 * fmt.c, fmt.1: New files.
4607 Both from Ross Paterson (rap@doc.ic.ac.uk).
4609 * Makefile.in (PROGS): Add fmt.
4610 * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
4611 (fmt): Add a link rule.
4612 * man/Makefile.in (MANFILES): Add fmt.1.
4614 Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
4616 * Makefile.in (All of them): Update from the ones in sh-utils.
4617 From now on, rules and definitions that are comon to the fileutils,
4618 textutils, and sh-utils will get ChangeLog entries only in the
4621 Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
4623 * od.c (my_strtoul): Set errno to zero before calling strtoul.
4624 Otherwise, od can fail complaining about a valid integer argument.
4625 From Andreas Schwab.
4627 Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
4629 * tr.c (main): Give an error and fail when squeezing repeats
4630 and no non-options are given. Reported by Tony Robinson
4631 (ajr@eng.cam.ac.uk).
4633 * sort.c (main): Temporarily copy each input file that might be
4634 another name for the output file. When in doubt (e.g. a pipe),
4635 copy. This allows the dangerous (historical -- in cnews) idiom
4636 `cat file | sort -o file' to work properly. Don't rely on this
4637 behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
4639 Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
4641 * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
4642 Remove CONFIG_BROKETS ifdef.
4643 * src/Makefile.in lib/Makefile.in: Don't define it.
4645 Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
4647 * full-write.c (full_write): Declare argument LEN to be size_t.
4649 Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
4651 * tail.c (tail_file): [For multiple files only]: Report truncation
4652 of monitored file and reset current file size. From Franc,ois Pinard.
4654 Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
4656 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
4657 From Franc,ois Pinard.
4659 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
4661 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
4662 decides whether to include <fcntl.h>. From Francois Pinard.
4664 Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
4666 * tr.c (substr): Fix off-by-one allocation error.
4668 Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
4670 * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
4671 (tac): Fix typo that had `1' as arg #2 of error after failed read.
4672 Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
4674 Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
4676 * configure.in [INSTALL]: Revert change of March 25. autoconf
4679 Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
4681 * join.c (prline): Remove unused function. Indent.
4683 Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
4685 * tail.c (tail_forever): Don't print headers when asked not to.
4686 From Karsten Thygesen <karthy@kom.auc.dk>.
4688 * wc.c (wc): Optimize for the case when only bytes are being counted
4689 and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
4691 Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
4693 * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
4694 * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
4696 Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
4698 * csplit.c (struct control): Add new field, repeat_forever.
4699 Remove now-unneeded definition of INT_MAX.
4700 (process_regexp): Test repeat_forever instead of comparing `repeat'
4702 (split_file): Don't even reference `repeat' count if repeat_forever
4704 (new_control_record): Initialize repeat_forever field.
4705 (parse_repeat_count): Set it instead of setting repeat count to
4707 (process_line_count): Abort for internal error instead of calling
4710 * long-options.c (parse_long_options): Take a new argument indicating
4711 the utility name (e.g. "join", not "gjoin") for version output.
4712 Print both the utility and the package names, e.g. `join - GNU
4713 textutils-1.9.1' instead of just the package name.
4715 * join.c (main): Call parse_long_options with program name arg.
4716 * sort.c (main): Ditto.
4718 * All source except sort.c and join.c (main): Change --version output
4719 to include utility name as well as package name and version info.
4721 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
4723 * configure.in: Use AC_SET_MAKE.
4724 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
4726 Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
4728 * tr.c (main): In addition to the --help usage pointer, give an
4729 explicit error message for too many arguments.
4731 Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
4733 * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
4734 of explicit echo commands.
4735 [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
4736 `./install.sh', make it `../install.sh' instead since that
4737 script will be invoked only from subdirectories.
4738 [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
4740 * cat.c (cat): The command `:|cat -s' failed on Irix5 because
4741 ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
4742 it returned EINVAL. Detect this.
4743 (main) [lint]: Initialize variables to suppress `used before
4744 initialized' warnings.
4746 * csplit.c: Change long option name from --suffix to --suffix-format.
4748 * od.c (skip): Correct a comment.
4749 (main): Don't output anything to stdout if the sole input file
4750 doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
4752 * od.c (dump) [lint]: Initialize a variable to suppress `used before
4753 initialized' warning.
4754 (main) [lint]: Ditto.
4755 * paste.c (paste_parallel) [lint]: Ditto.
4757 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
4759 * configure.in: Don't set LDFLAGS since linking now uses both
4762 Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
4764 * unexpand.c (unexpand): Don't segfault when given a name of a
4766 * expand.c (expand): Ditto.
4767 Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
4769 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
4771 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
4774 * csplit.c (load_buffer): Rather than incrementing buffer size,
4775 double it each time we fail to find a newline. Otherwise, csplit
4776 would run out of memory when processing files with very long lines.
4778 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
4780 * man/Makefile.in (manprefix): Use binprefix as the default.
4782 Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
4784 * cat.c: Use full_write and safe_read instead of write and read resp.
4790 * sum.c: Use safe_read instead of read.
4794 * tail.c: Replace calls to xwrite with calls to fwrite.
4795 Use fopen/fclose instead of open/close.
4796 (write_header): Use a single call to printf instead of four to xwrite.
4797 Use safe_read instead of read.
4800 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
4802 * install.sh: New file.
4803 Makefile.in [DISTFILES]: Add it.
4805 Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
4807 * memcmp.c: Use the latest version from the GNU C library.
4809 * cut.c [ADD_RANGE_PAIR]: New macro.
4810 (set_fields): Collect the list of all selected ranges before
4811 allocating and initializing the boolean lookup table.
4812 (cut_bytes, cut_fields): Complete rewrite. Avoid copying
4813 into buffer whenever possible. Properly handle input without
4815 (getstr): New function. Copied from getline.c, but with minor changes.
4817 * sort.c (main): Properly handle -Tdir.
4818 Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
4819 Reported by Kristoffer Rose (kris@diku.dk).
4821 * cut.c (main): Give separate errors for `-s without -f'
4822 and `-d without -f'.
4823 (main): Now -d '' means `use the NUL byte as the delimiter'.
4824 Before, it got an error.
4826 Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
4828 * configure.in [test for 8-bit clean memcmp]: Add a test to detect
4829 losing memcmp from SunOS4.1.x. From Robert H. de Vries
4832 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
4834 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
4835 so it goes in config.status. This eliminates unnecessary second run
4838 Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
4840 * configure.in (AC_HAVE_FUNCS): Add isascii.
4841 * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
4842 on AIX PS/2 1.3 systems because isascii is a function and it is used
4843 in definitions (with the necessary side effect of assigning to a
4844 global variable) of the is* macros. Also test HAVE_ISASCII and
4845 redefine ISASCII(c) instead of isascii.
4846 Reported by Minh Tran-Le (tranle@intellicorp.com).
4848 Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
4850 * configure.in: Don't run the test for 8-bit clean memcmp if we
4851 already know we'll be using our replacement.
4853 Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
4857 * tac.c (usage): Fix typo in long usage.
4858 * sort.c (usage): Likewise.
4859 From Philippe.Schnoebelen@imag.fr.
4861 * cut.c [FATAL_ERROR]: New macro.
4862 (main): Call both error and usage (2) through FATAL_ERROR in
4863 many places. Before, only `error (2...' was called.
4864 (invalid_list): Removed. This function is subsumed by FATAL_ERROR.
4866 * cut.c (cut_fields): Properly handle input lacking a terminating
4867 newline. Before, the command `printf "a\tb" |cut -f 1' generated
4870 Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
4872 od.c (usage): Change --backward-compatible to --traditional in
4873 the long usage message.
4875 Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
4879 Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
4881 * cut.c (cut_fields): Revert July 27 change. Instead, strip off
4882 trailing delimiter unless given a range of fields like `3-' that
4883 extends to end of line.
4884 (set_fields): Moved local `eol_range_start' to file-scope.
4885 Reported by Arne H. Juul (arnej@solan.unit.no).
4887 Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
4889 * fold.c (fold_file): Don't get stuck in an endless loop when
4890 width is smaller than 8 and there are TABs in the input.
4892 Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
4894 * join.c: Remove now-unused dcls of show_help and show_version.
4896 Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
4898 * csplit.c [INT_MAX]: Make sure it's defined.
4899 [not HAVE_LIMITS_H]: Don't include limits.h.
4900 From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
4902 Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
4906 Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
4908 * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
4909 From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
4911 * sort.c (main): Handle --help and --version options.
4912 * Makefile.in (sort.o): Depend on long-options.h.
4914 Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
4916 * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
4917 split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
4918 `--longopt=arg' syntax in --help message rather than `--longopt arg'.
4919 From Francois Pinard.
4921 * tail.c: Don't include <signal.h>. It hasn't been necessary
4922 since the Dec 12, 1992 change.
4924 * join.c (main): Accept `-v 1' again. Adding the --version
4925 long option had broken it, although -v1 still worked. Call
4926 parse_long_options instead of adding "help" and "version"
4927 to join's longopt strct.
4928 * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
4930 * (join): Depend on and link with long-options.o.
4931 * (join.o): Depend on long-options.h.
4933 * od.c: Change --compatible (-C) to --backward-compatible (-B).
4935 * csplit.c: Change --abandon-null-files to --elide-empty-files.
4937 Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
4939 * tr.c (get_next, string2_extend): Add default: label to switch stmt.
4941 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
4942 join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
4943 tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
4944 Exit successfully for --help, non-zero for usage error.
4945 From Francois Pinard.
4947 * configure.in: Add AC_STAT_MACROS_BROKEN.
4948 * system.h [AC_STAT_MACROS_BROKEN]: Test it.
4950 Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
4952 * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
4953 <config.h> or "config.h".
4954 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
4955 join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
4956 tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
4958 * configure.in: Use AC_CONFIG_HEADER.
4959 * Makefile.in [DIST]: Add config.h.in.
4961 * Makefile.in: Convert so make may be run from subdirectories.
4962 Add dependencies on config.h.
4963 * src/Makefile.in: Ditto.
4964 * lib/Makefile.in: Ditto.
4965 * man/Makefile.in: Ditto.
4967 Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
4969 * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
4970 In the 64-bit assignment, be careful to cast the shift operand to
4972 Abort if sizeof (unsigned long) > 8.
4974 Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
4976 * csplit.c: Allow repeat counts to be specified via `{*}'.
4977 New option --suffix=format. Supercedes --digits option.
4978 New option --abandon-null-files.
4979 From Ronald F. Guilmette (rfg@netcom.com).
4981 * csplit.1: Updated.
4982 From Ronald F. Guilmette.
4984 * csplit.c: Remove register keyword (replace with `int' in two cases).
4986 * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
4987 (bytes_to_octal_digits): New static array.
4988 (get_format_flags): Combine '+' and ' ' cases of switch stmt.
4989 Return count if for loop terminates.
4990 (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
4991 (get_format_prec): Make sure is_negative is defined before used.
4992 (get_format_conv_type): Give a different error message if there
4993 is no conversion specifier.
4994 Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
4995 (max_out): Use `%%' rather than `%' in format string.
4997 Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
4999 * pr.c (main): When argc == 1, don't try to xmalloc (0).
5001 Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
5003 * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
5006 Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
5008 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
5010 Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
5012 * src/*.c: Print version on standard output, not stderr.
5014 * configure.in: Add AC_LONG_64_BITS.
5015 * memchr.c: Use #ifdef LONG_64_BITS instead of
5016 `if (sizeof(longword) > 4)'.
5018 Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
5020 * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
5021 always handle devices. Ignore errno == EINVAL and errno == ENODEV.
5022 `cat -v /dev/null' was failing on many systems.
5024 * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
5025 `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
5026 From William Dowling <will@franklin.com>.
5028 Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
5032 * memchr.c: De-ansify the fixed version from glibc.
5033 It is supposed to work on systems with 64-bit long ints.
5035 Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
5039 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
5043 Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
5045 * pr.c (cols_ready_to_print): New function. It replaces a global
5046 variable by the same name and computes on the fly the value that
5047 was supposed to be maintained through that variable. This should
5048 put to rest the `pr -2a' bug.
5049 (main): Don't let getopt_long reorder arguments so we can
5050 distinguish between `pr -1 -2' and `pr -12'. Rework handling of
5053 * fold.c: Declare xmalloc.
5055 Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
5057 * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
5059 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
5061 * mkinstalldirs: New file.
5062 * Makefile.in (installdirs): Use it to create installation directories.
5064 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
5066 * all source: With --version, print version and exit immediately.
5068 Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
5070 * Makefile.in (installdirs): New rules for creating installation
5071 directories. (install): depend on it.
5073 * tail.c (main): Remove --compatible since `+1f' may be used
5074 to get the BSD `-0f' behavior portably.
5076 * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
5077 From Ian Lance Taylor (ian@cygnus.com).
5079 Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
5081 * tail.c (main): New option -C, --compatible to make `tail -0f'
5082 work like `tail +1f' for compatibility with BSD tail.
5084 Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
5086 * pr.c (print_page): Decrement cols_ready_to_print even when
5087 lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
5088 terminate. Add parentheses for clarity.
5090 Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
5094 * od.c (main): Remove set-but-not-used variable, `usage_error'.
5096 * split.c (main): Call usage with an argument.
5098 Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
5100 * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
5101 for 8-bit clean memcmp.
5103 * cat.c (usage, main): Remove unused argument.
5105 * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
5106 (check_for_offset): Remove unused argument `argnum.'
5108 * configure.in: Add AC_SIZE_T.
5110 Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
5112 * uniq.c (main): Interpret non-option arguments with a leading `+'
5113 only if we haven't seen `--'.
5115 * tr.c (main): Change variable name to avoid shadowed dcl.
5116 * wc.c (write_counts): Ditto.
5118 * sum.1: Make documentation agree with the code.
5120 * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
5122 Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
5124 * configure.in [AC_HAVE_HEADERS]: Add limits.h.
5126 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
5128 * od.c (parse_old_offset): Don't use prototype in function
5129 definition. Remove unnecessary conjunct from test for hexadecimal
5132 * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
5133 for long double support; there are compilers (Stardent Vistra svr4)
5134 without long double but still define __STDC__.
5136 Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
5138 * src/*.c and man/*.c except for sort: Add --help and --version
5141 * pr.c: Convert to use getopt_long.
5143 * lib/memcmp.c: Use version from glibc.
5144 [WORDS_BIGENDIAN]: Test this instead of the using glibc's
5146 * configure.in: Use AC_WORDS_BIGENDIAN to set it.
5148 * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
5151 * Makefile.in (dist): Depend on Makefile so that changes to
5152 Makefile.in (like adding new files to DISTRIB) are reflected
5153 in the new distribution.
5155 Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
5157 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
5158 other options so users can use them to override DEFS.
5159 * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
5161 * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
5162 configure's AC_SUBST will set these.
5164 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
5165 [targets that cd then run make in subdirectories]: Don't depend
5166 on `cd ..'; use a subshell instead.
5168 * Makefile.in [info, install-info, dvi, check, installcheck]:
5169 New targets but no rules; comply with standards.
5171 * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
5172 hasn't specified CFLAGS.
5173 [LDFLAGS]: Substitute into Makefile.
5175 Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
5177 * od.c: New option --compatible, -C.
5178 (parse_old_offset): New function.
5179 * od.1: Document new option.
5181 Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
5183 * cut.c, expand.c, join.c, nl.c: Always call error with errno
5184 (not zero) after failed fclose or non-zero ferror.
5186 Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
5188 * configure.in: Add check for working memcmp; use GNU's if
5189 the system's doesn't grok the 8th bit.
5190 * memcmp.c: Fix it so it groks the 8th bit.
5191 TODO: We really need to provide a fast memcmp, since most
5192 machines will have a broken memcmp. Probably should get
5194 * sort.c (mergefps): Maintain keybeg and keylim when copying
5195 the current line to `saved'.
5196 (numcompare): Skip white space here since -n no longer implies -b.
5197 (getmonth): Skip white space here since -M no longer implies -b.
5198 (compare): Completely overhauled to make the 8th bit work right,
5199 also to properly handle the global reverse option.
5200 (set_ordering): -n no longer implies -b, according to Posix.
5201 For consistency, -M also no longer implies -b.
5202 (main): Correct treatment of -r and global keys.
5203 (findlines): Clear keybeg and keylim if no keys are used.
5204 (sort): Avoid overwriting tempfiles[] array bounds.
5206 Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
5208 * pr.c (close_file): Reverse May 13, '92 change, but add the condition
5209 that cols_ready_to_print not be decremented when printing across.
5210 The command `echo |pr -2ta' didn't terminate.
5211 (print_page): Rewrite conditional (that had side effects in second
5212 conjunct) using nested if statements to make it clear that we do
5213 indeed want those semantics.
5215 Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
5219 * system.h: Try BBSIZE if BSIZE isn't defined.
5220 From Tony Robinson <ajr@eng.cam.ac.uk>.
5222 Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
5224 * tail.c (tail_forever): Use an array of file descriptors
5225 instead of forking processes.
5226 (dump_remainder): Return number of bytes read.
5227 (tail_file): Fill in the new array.
5228 From Ian Lance Taylor.
5230 Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
5232 * system.h: Only define index, bcmp, etc. if not already defined.
5234 Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
5236 * tr.c (is_char_class_member): Remove unreached return after abort.
5238 Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
5240 * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
5241 sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
5242 of <ctype.h> and definitions of is* ctype macros to system.h.
5243 Change a few more uses of is* ctype macros to (protected) upper
5246 * system.h: Add isascii-protected ctype IS* macros.
5248 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
5250 * all files using getopt.h: Convert static declarations of
5251 struct option to use new macros from getopt.h: no_argument,
5252 required_argument, and optional_argument.
5254 Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
5256 * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
5258 * tr.c (main): Close stdin and stdout and check return status.
5260 Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5262 * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
5265 Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
5267 * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
5268 use isascii if it is defined.
5269 (is_char_class_member, make_printable_char, make_printable_str,
5270 non_neg_strtol): Use new macros instead of lower case ones
5273 * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
5274 macros like pr.c. Suggested by David J. MacKenzie.
5276 * od.c (print_ascii, dump_strings): Check for isascii before isprint.
5277 (dump_strings): Free malloc'd buffer before returning.
5278 (skip): Return non-zero if an error occurred, zero otherwise.
5279 Exit only if asked to skip beyond end of combined input.
5280 (check_and_close): New function.
5281 (skip, read_block, read_char): Call check_and_close when done
5282 processing the file associated with in_stream.
5283 (skip, read_block, read_char): Set have_read_stdin.
5284 (main): Close stdin (if it was ever read) and check for errors
5285 just before exiting.
5286 (write_block, dump_strings, dump): Don't test return value from
5287 functions that operate on streams. Rely on later ferror tests.
5289 Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5291 * sort.c (main, usage): Add -T option.
5293 Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5295 * tail.c (tail_forever, sigusr1, kill_kids): New functions to
5296 do -f on multiple files.
5297 (main): Call tail_forever.
5298 From Ian Lance Taylor.
5300 Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5302 * cut.c (cut_fields): Add cast.
5304 * od.c (decode_one_format): Remove '#' from pre_fmt_string;
5305 many systems don't support it.
5306 Conditionalize long double support on __STDC__, not __GNUC__.
5307 From Ian Lance Taylor.
5309 Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
5311 * sort.c (numcompare, keycompare): Add parentheses suggested
5312 by gcc -Wall. Put braces around individual monthtab initializers.
5314 * cksum.c: Declare error. Make checksum table `const.'
5316 * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
5318 * split.c (main): Add `default: abort();' to enumeration switch.
5320 * All files: Make all functions and extern variables static.
5321 Make all longopts arrays const as well as static.
5322 Make a couple statically initialized aggregates `const.'
5324 Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5326 * od.c (main): Make old-style format options accumulate.
5329 Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5331 * tr.c (look_up_char_class): Add cast.
5333 * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
5334 Add `const' to variable receiving value from re_compile_pattern.
5336 * wc.c (wc): If doing only -c, use st_size for regular files.
5338 * fold.c (fold_file): Was folding 1 column too early.
5339 From Eric Backus <ericb@lsid.hp.com>.
5341 * memset.c: New file.
5343 Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5345 * cksum.c: New file.
5347 Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5349 * tac.c (tac_stdin): Handle SIGPIPE.
5350 * sort.c (main): Handle SIGTERM.
5354 * system.h [USG || STDC_HEADERS]: Define bcmp.
5356 Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
5358 * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
5360 Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5362 * paste.c (main): Don't write on a string constant.
5364 Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
5366 * tr.c: Minor cleanup. Replaced some assert(0) with abort().
5368 Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5370 * cmp.c, cmp.1: Move to diff distribution.
5372 Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5374 * system.h: Change FOO_MISSING to HAVE_FOO.
5376 Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
5378 * pr.c (COLUMN): Add structure member to remember filename.
5379 (main, init_fps, open_file, close_file): Use it.
5381 (close_file): Don't decrement cols_ready_to_print when closing
5382 a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
5384 Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
5386 * cmp.c: --show-chars -> --print-chars.
5388 * pr.c: Rename some variables.
5390 Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5392 * system.h: Define DEV_BSIZE if not defined.
5394 Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
5396 * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
5398 Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5400 * sort.c (main): Don't stop processing args when we hit "-";
5401 treat it like a regular filename.
5402 From ian@airs.com (Ian Lance Taylor).
5404 * pr.c (print_page): Fix off by one line count when ^L is in input.
5405 From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
5407 Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
5409 * tr.c (validate): Change error message so it doesn't mention
5410 actual name of --truncate-set1 option. From David MacKenzie.
5412 Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
5414 * tr.c (string2_extend, validate): Give an error message when
5415 translating without --truncate-set1, with empty string2, and
5416 with non-empty string1. "tr 1 ''" produced a failed assertion.
5418 Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5420 * system.h: Change how ST_BLKSIZE is calculated to allow for
5421 non-POSIX systems that don't define BSIZE in sys/param.h.
5423 Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5425 * sum.c (main, bsd_sum_file): Don't print filename if BSD
5426 algorithm is used and only one file was given.
5428 Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
5430 * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
5431 with starting character equal to ending character. This is
5432 contrary to the POSIX spec, but what is already implemented
5433 in find_closing_delim.
5435 Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5439 * sort.c (numcompare, checkfp): Add parens to placate gcc2.
5441 * sort.c (mergefps): For -u, output the first, not last, of
5442 the lines that compare equal. From Mike Haertel.
5444 Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5446 * tr.c: Remove initial capitals and periods from error messages.
5448 Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
5450 * sum.c (main): Add -r option for SYSV compat.
5452 Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
5454 * sort.c (compare): If -s given, leave lines in their original order.
5455 (main): Recognize -s.
5456 (usage): Document -s.
5459 Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
5461 * sort.c (sort): Check for complete parsing of buffer into
5462 lines before nixing temp files.
5464 Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5466 * sum.c (sysv_sum_file): Use %lu instead of %u to print a
5467 long. Not that it matters for GNU . . .
5469 * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
5470 (append_normal_char, append_range, append_char_class,
5471 append_repeated_char, append_equiv_class, spec_init):
5472 Initialize `next' field of new `struct List_element'.
5473 From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
5475 Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
5477 * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
5479 Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5483 * nl.c: Support multiple files and "-" for stdin.
5484 (main): Check for read and write errors.
5485 (nl_file): New function.
5487 Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5489 * tr.c (main): -t option was called -b in getopt spec.
5490 (validate): Don't warn that set1 is longer than set2.
5492 * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
5494 Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5496 * nl.c: New program from bin-src.
5498 * nl.c (main): Use a struct linebuffer for line_buf.
5499 (process_file): Use readline instead of fgets, to preserve NULs.
5500 (check_section): Use memcmp instead of strncmp.
5501 (proc_text): Print line_buf with fwrite instead of printf.
5503 * nl.c (main): Usage message if too many args given. Check
5504 for error in closing input file. Lengths of section delimiter
5505 strings were 1 too large. Take separator_str into account in
5506 length of print_no_line_fmt.
5507 (build_print_fmt): Allocate space for print_fmt, in case
5508 separator_str is long.
5509 (proc_text): A blank line is one that contains nothing, not
5510 even nonprinting characters.
5512 Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5514 * All programs: Document `--' instead of `+' to introduce
5515 long-named options, in usage messages.
5517 * sum.c (bsd_sum_file): Renamed from sum_file.
5518 (sysv_sum_file): New function.
5519 (main): Recognize an option to select between the algorithms.
5521 Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
5523 * pr.c (close_file, print_page): Fixed bug that had the command
5524 yes |head |pr -t printing "yyyyyyyyyy".
5525 * (print_page): Fixed bug that had pr -3 -a printing two too few
5526 trailer lines per page.
5527 * (main): Added restriction that -a and -m are incompatible.
5528 Although the POSIX spec doesn't explicitly say they shouldn't
5529 be used together, it says -a modifies the -column option and
5530 that -column shouldn't be used with -m.
5532 Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
5534 * nl.c: Include regex.h after, not before, sys/types.h.
5536 Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
5538 * sort.c (fillbuf) return bytes buffered instead of bytes read.
5540 Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
5542 * sort.c (LINEALLOC): New #define.
5543 (struct lines): New field ``limit''.
5544 (initlines): Set it from new arg ``limit''.
5545 (sort, mergefps, checkfp): Pass new arg to initlines().
5546 (findlines): Don't realloc past lines->limit.
5548 Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5550 * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
5551 HAVE_UNISTD_H and _POSIX_VERSION.
5553 * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
5555 Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
5557 * tr.c: Fixed an inaccurate comment on posix_pedantic.
5559 Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
5561 * tr.c: Changed underscores to hyphens in long option name
5562 "sysv_string2_truncate".
5564 Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5566 * tac.c (main): Set obscure_syntax to tell re_search to
5567 allocate memory for the group registers.
5569 Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5571 * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
5572 signal, which POSIX doesn't have.
5573 * sort.c: Replace inthandler and huphandler with sighandler.
5574 * csplit.c (main): Only handle signals if they were not being
5577 * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
5579 Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
5581 * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
5582 * tr.c (squeeze_filter): Comment a little on why it's better
5583 to step through the input by two.
5584 * tr.c (set_initialize): Write a comment describing the function.
5585 * tr.c: Eliminated the variable `portability_warnings' and replaced
5586 references to it by references to `!posix_pedantic'. One of the
5587 uses of portability_warnings had been wrong.
5589 Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5591 * tr.c: New program.
5593 Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5595 * linebuffer.[ch] (freebuffer): New function (used by cron).
5597 Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5599 * system.h, configure, Makefile.in: Don't include memory.h if
5600 STDC_HEADERS, removing need for MEMORY_H_MISSING.
5602 Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
5604 * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
5605 Somehow, part of my patch didn't make it last time.
5607 Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
5609 * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
5611 * cmp.c (cmp): Print EOF message to stderr, not stdout, for
5614 * sort.c (xfwrite): fwrite never returns < 0, so check if
5615 number written is number we asked to write.
5616 (fillbuf, main): fread never returns < 0, so check ferror instead.
5619 Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
5621 * pr.c (print_page): Really fixed `extra newline at EOF' problem.
5622 * (store_columns): Fixed bug that caused `pr -b -2' to coredump
5623 on files of certain lengths.
5625 Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
5627 * pr.c (print_page): Fixed to not add single spurious newline
5628 at EOF when using -t.
5630 Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
5632 * pr.c (print_page): Don't pad the page if -t given.
5634 * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
5636 Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
5640 * configure, system.h: Include memory.h if it works.
5642 * split.c: Allow `b' unit as well as `k' and `m'.
5644 * head.c, tail.c: Replace -b +blocks option with specifying
5645 units (b, k, or m) after the number.
5646 (parse_unit): New function.
5648 * fold.c (main): Check that -w arg is a number.
5650 * cut.c: +delimiter takes an arg.
5652 Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
5654 * pr.c (close_file): Don't close an already closed file.
5656 Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5658 * memchr.c: New file.
5659 * configure: Check if it's needed.
5661 * csplit.c, gcsplit.1: New program.
5663 * pr.c (cleanup): Only free buffers if they were allocated.
5665 * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
5667 Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
5669 * pr.c: The following 3 bugs appeared (at least) when printing
5670 a single file with the options `-3 -f'.
5671 * (print_white_space): Single spaces were being replaced
5673 * (print_page): Some lines were getting too much white space
5674 at the beginning because spaces_not_printed wasn't being reset
5676 * (read_line): The single space between a truncated column
5677 on its left and the column on its right was omitted. Fixed
5678 so that previous value of input_position is restored before
5681 Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5683 * configure: Only remove /etc from PATH when it's not part of
5686 Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
5688 * linebuffer.c (readline): Fix incorrect recalculation of `end'.
5690 * head.c, tail.c: Replace `mode' variables and bitmasks with
5691 separate variables for each option.
5693 Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
5695 * wc.c: New program.
5697 Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
5699 * fold.c (fold_file): Read in an int, not a char, for EOF
5702 * configure: Check whether st_blksize is missing.
5704 * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
5705 defined, instead of /tmp.
5707 Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5709 * xwrite.c [POSIX]: unistd.h might require sys/types.h.
5711 Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5713 * paste.c (main): Consider -d "" to be like -d "\0",
5714 for POSIX (if I read it right).
5716 * sort.c, join.c: New programs.
5718 * cut.c (set_field): Allow blanks as well as commas to
5719 separate numbers in ranges.
5721 Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
5723 * pr.c: Failure to open an input file is no longer a fatal error.
5724 A message is printed for each failed open. When printing
5725 in parallel, each failed open results in one fewer output column.
5726 Added POSIX -r option to suppress the message.
5727 * pr.c: Added variables: failed_opens, ignore_failed_opens.
5728 These changes were based in part on work by David MacKenzie.
5730 Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
5732 * pr.c: Complain if user gives both -m and -[0-9]+ options.
5734 Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
5738 Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5740 * expand.c: Rename some variables.
5741 (expand): Don't access value off end of array.
5742 * unexpand.c: Rename some variables.
5743 (unexpand): Don't access value off end of array.
5744 Instead of copying tabs verbatim and flushing pending spaces
5745 when one is reached, count them as the proper number of
5746 pending spaces. Instead of changing tabs to single spaces if
5747 the tabstop list is exhausted, print the rest of the line
5748 unchanged (for POSIX).
5750 Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5752 * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
5753 Clear EOF and error conditions on stdin so it can be reused.
5755 * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
5756 as commas to separate tabstops, for POSIX.
5757 * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
5758 the output; send it directly to stdout.
5759 * unexpand.c (main): Make -t stupidly imply -a for POSIX.
5760 (unexpand): If a tab stop list was given and we move past its end,
5761 copy the rest of the line verbatim.
5763 * split.c (convint): New function to allow 'm' and 'k' after
5765 (main): Use it. Change -c option to -b for POSIX.
5767 Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5769 * pr.c: Protect isdigit with isascii, if required.
5771 Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
5773 Most of the following is from Paul Eggert:
5774 * cat.c (main): If stdin is read, check close at end.
5775 * cmp.c (main): Check for stdin being closed.
5776 Check for close errors on stdin and stdout.
5777 (cmp): Return a value instead of exiting.
5778 * cut.c (cut_file): New function, from code in main.
5779 Check for read errors.
5780 (main): Check for close errors.
5781 * expand.c, unexpand.c (main): Check for close errors.
5782 (next_file): Go to next file if one can't be opened.
5783 Check for close errors.
5784 * head.c (main), tail.c (main): If stdin was read, check for
5786 * head.c (head_file), tail.c (tail_file): Check for close errors.
5787 * paste.c (main, paste_parallel, paste_serial), tac.c (main):
5788 Check for close errors. Close stdin if it was read.
5789 * split.c (main): Check for close errors.
5791 * configure, Makefile.in's: Support +srcdir option.
5792 Make config.status. Fix up clean targets.
5794 Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
5796 * linebuffer.h (struct linebuffer): Add a field to indicate
5797 the number of valid chars in the line.
5798 * linebuffer.c (initbuffer, readline): Fill it in.
5799 * uniq.c, comm.c: Use it.
5801 * pr.c (main): Check stdin and stdout fclose for errors.
5802 (init_parameters): If there's no room for header and footer,
5803 omit them rather than dying (for POSIX).
5804 (init_header): Take a file descriptor as additional arg.
5805 (init_fps): Change callers. Note when stdin is read.
5806 (open_file): For filename "-" use stdin.
5807 (close_file): Don't close stdin. Check close for errors.
5808 (print_char, char_to_clump): Use isprint instead of explicit
5811 * memcmp.c: New file (needed for comm).
5812 * bcopy.c: New file (needed for fold).
5813 * system.h: Don't define bcopy as memcpy.
5814 * configure: Check for bcopy and memcmp.
5816 * uniq.c (main): Use "-" instead of NULL to mean stdin or
5818 (check_file): Use "-" instead of NULL to mean stdin or stdout.
5819 Check readline return instead of for NUL character to
5821 Check fclose for errors.
5822 (find_field): Use linebuffer length, not NULs, to detect end
5824 (different): New function, replaces compare. Uses memcmp
5826 (writeline): Use fwrite instead of fputs so NULs are preserved.
5828 * comm.c (compare_files): Return an error indication.
5829 Don't take a filename of NULL to mean stdin.
5830 Use memcmp instead of strcmp to allow for NULs.
5831 Check fclose for errors.
5832 (writeline): Use fwrite instead of fputs so NULs are preserved.
5834 * sum.c (sum_file): Take an arg indicating whether to print
5835 the filename, and don't take NULL meaning stdin. Set a flag
5836 when we read stdin. Check fclose return for errors.
5837 (main): If stdin was read, check fclose return for errors.
5838 Use filename of "-" if no args given.
5840 Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5842 * fold.c: Rewritten from scratch for POSIX.
5844 Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5846 * split.c (line_bytes_split): Use xmalloc instead of alloca.
5847 * system.h: Don't declare alloca.
5849 * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
5850 * system.h: Define SEEK_ macros if not defined.
5852 * pr.c: Rename variable `truncate' to avoid library function conflict.
5854 Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5856 * linebuffer.c, linebuffer.h: New files.
5857 * comm.c, uniq.c (initbuffer, readline): Functions
5858 removed (use versions in linebuffer.c).
5860 Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
5862 * sum.c (sumfile): Always print 5 digits for second number, too.
5863 Interpret "-" to mean stdin.
5865 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
5867 * uniq.c: Use isblank instead of isspace, to support POSIX.2.
5868 * comm.c, pr.c, uniq.c (concat, fatal, error,
5869 pfatal_with_name, xmalloc, xrealloc): Functions removed.
5871 Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5873 * nl.c: Add long-named options. Doc fixes.
5875 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5877 * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
5879 * xwrite.c [POSIX]: Include unistd.h.
5880 [STDC_HEADERS]: Don't declare errno.
5882 Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5884 * uniq.c: Add long-named options. Remove marginally useful -z
5885 option (zero padded repeat counts).
5887 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5889 * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
5890 (cwrite), head.c (head_file), cat.c (main): Check close return
5891 value for delayed error report due to NFS.
5893 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5895 * cat.c: Replace "uchar" with "unsigned char", to avoid
5896 problems with various systems' typedefs.
5898 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
5900 * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
5901 operation is unsupported, for HP-UX 7.0.
5903 Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
5905 * sum.c: Always print five digits for first number.
5907 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
5909 * cat.c, cmp.c: Don't use fileno(); not needed.
5911 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
5913 * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
5915 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
5917 * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
5919 (enlarge_line): Adjust inbufp and outbufp.
5921 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5923 * cat.c: Declare free returning void, not int, so it
5924 doesn't bomb on Xenix.
5926 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
5928 * tac.c: Print error messages before calling cleanup, not after.
5930 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
5932 * tac.c (cleanup): Return SIGTYPE, not int.
5934 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
5936 * cut.c (main, usage): Add -b and -n options for POSIX.
5937 (set_fields): Don't allow SPC or TAB as number separators.
5939 * paste.c (paste_parallel): If open of any file fails, quit
5942 Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
5944 * pr.c: Add POSIX -F option (same as -f).
5946 * uniq.c (check_file): Allow '-' to mean stdin or stdout.
5948 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5950 * head.c, tail.c: Change `chars' to `bytes' globally.
5951 (main, usage): Use POSIX.2 draft 10 option syntax.
5953 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5955 * cat.c (main): Don't delay error messages, so they appear
5957 (main, simple_cat, cat): Make errors in input files nonfatal.
5959 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5961 * cat.c: Remove -c option added for POSIX draft 9, since POSIX
5962 draft 10 removed it.
5964 * tac.c (tac_stdin): Use fstat instead of lseek to determine
5965 whether stdin is seekable, because lseek silently fails on
5966 some special files, like tty's.
5967 tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
5968 don't turn off -f for non-regular files (assume the user knows
5969 what he's doing; it might work for fifo's and sockets).
5971 * paste.c (main): If no files given, use stdin.
5972 Don't let collapse_escapes write on string constant (delim default).
5973 (paste_parallel): Don't close stdin.
5975 * cut.c (main): Use standard input for filename of "-".
5977 * comm.c (compare_files): Allow '-' to mean stdin.
5979 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
5981 * cut.c (enlarge_line): Take an arg giving the required amount
5982 of space. Change callers.
5983 (main): Don't allow -t'<TAB>' without -f.
5984 Make `delim' unsigned to fix sign extension problem in comparison.
5986 Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
5988 * pr.c Deleted excess whitespace from ends of lines.
5989 Modified to work with current version of getopt, which
5990 returns 1 instead of 0 for non-options.
5991 Reversed the meaning of the -f option, to be compatable
5994 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
5996 * cmp.c (main, usage): Rename -L option to -c and don't have
5998 (printc): Take an arg to specify number of chars to pad to,
5999 for column alignment.
6000 (cmp): Respect flag_print_chars in default output format.
6001 Align columns for cmp -cl.
6003 Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
6005 * cmp.c: For +show-chars, have getopt return 'L' so
6006 `flag_print_chars' gets set.
6008 Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
6010 * tac.c (main): Initialize fastmap and translate fields of
6011 regex before compiling it.
6013 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6015 * tac.c: Change +regexp to +regex for consistency with GNU find.
6017 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6019 * cat.c (cat): If FIONREAD is available, only use it if it is
6020 supported by the filesystem that the file is on.
6022 Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6024 * cat.c (main): Add a variable to control whether the check
6025 for input file == output file is made, because no values of
6026 st_dev and st_ino should be assumed to be available for this
6027 purpose. Only do the check for regular files.
6029 * tac.c: Use bcopy instead of memcpy.
6031 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
6033 * head.c: Use longs instead of ints for file offsets, for 16
6036 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6038 * cmp.c: Change some ints to longs for 16 bit machines.
6039 (bcmp_cnt): Make char-pointer counting slightly simpler.
6041 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6043 * cat.c (main): Allow input file to be output file for devices
6044 (ttys, etc.). Check whether input file is output file when
6045 reading standard input. Print any error messages for standard
6048 * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
6049 machines as well as 32 bit ones.
6050 * cmp.c, tail.c: Use longs instead of ints for file offsets.
6052 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6054 * cmp.c: Fix some exit statuses for POSIX.
6056 Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
6058 * tac.c: Use regular expressions as the record boundaries.
6059 Give better error messages.
6060 Reformat code and make it more readable.
6061 (main): Use getopt_long to parse options.
6062 (tac_stdin): Do not make a temporary file if standard input
6064 (tac_file): New function.
6065 (tac): Take an open file desc as an arg.
6066 (output): Rewrite to use its own efficient buffering.
6067 (xmalloc, xrealloc, xwrite): New functions.
6069 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6071 * head.c, tail.c: Use `error' instead of `fatal_perror' and
6072 `nonfatal_perror'. Remove some unnecessary info from messages.
6074 Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
6076 * comm.c (main): Pass the list of files to compare_files as a
6077 char ** instead of a char *.
6078 (compare_files): Make arg a char **.
6080 * uniq.c: Declare some functions as void.
6081 Change global vars `countmode' and `mode' from ints to enums.
6082 (main): Use getopt to parse options and support POSIX options.
6083 Don't use integer_arg to parse numbers, since `-#' can't be
6084 parsed that way using getopt.
6085 (find_field): Use isspace for finding fields boundaries.
6087 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
6089 * comm.c (main): Call usage if given bad option or wrong
6090 number of args. Exit with 0 status normally.
6091 (usage): New function.
6092 Declare some other functions as void.
6094 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
6096 * cmp.c (main, cmp, usage): Replace -q +quick option with -L
6097 +show-chars option to add ASCII representation of bytes to -l format.
6099 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
6101 * cmp.c (cmp): Change EOF message for POSIX compatibility.
6102 For -l format, clear bits > FF.
6104 Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6106 * tail.c: Move global `errors' into main instead of having
6107 nonfatal_perror set it.
6108 (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
6109 Return an error status.
6110 (file_lines, start_chars, start_lines): Reverse the meaning of
6112 (tail_lines, tail_chars): Account for that reversal.
6114 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6116 * head.c: Move global `errors' into main and have the various
6117 functions return an error status instead of setting it in
6120 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
6122 * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
6123 options specified), to compare the two blocks and count
6124 newlines simultaneously.
6125 * cmp.c New function: bcmp_cnt.
6127 * cmp.c (main): Test if output is redirected to /dev/null, and
6128 assume `-s' if this is so.
6130 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6132 * cat.c: Change `argbad' from a char to a short, so it will
6133 work on machines with unsigned chars.
6135 Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
6137 * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
6138 Remove unneccessary variable `c1'. If -l was given, increase
6139 `char_number' by the number of bytes read, after producing output,
6140 rather than by the offset of the first differing bytes, before
6142 Replace if-else-if constructions with case statements for clarity.
6143 (bcmp2): Rename `n' to `nread'.
6145 Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
6147 * nl.c (proc_text): Use re_search instead of re_match.
6149 Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
6151 * nl.c: Indent. Un-nest statements. Use GNU regexp functions
6152 instead of System V ones. Move function declarations together.
6153 (quit): Remove useless function.
6154 (program_name): New variable for error messages.
6155 (main): Use perror in error message.
6156 (xmalloc): New function to replace myalloc.
6157 (myalloc): Function removed.
6158 Global: use program_name and xmalloc.
6160 Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
6162 * uniq.c: Declare some functions.
6163 (main): Initialize infile and outfile. Call usage if given
6164 invalid args. Normally exit with 0 status instead of garbage.
6165 (usage): New function to print usage message and exit.
6166 (check_file): Remove unused variable.
6167 (readline): Compare against EOF, not < 0.
6168 (xmalloc, xrealloc): Return char *, not int.
6169 Ok to return 0 if 0 bytes requested.
6170 (lb1, lb2): Remove unused global vars.
6171 (concat): Remove unused function.
6173 Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
6175 * comm.c: Remove unused global variables lb1, lb2.
6176 (main): Remove unneeded variable.
6177 (compare_files): Remove unused arg.
6178 (readline): un-nest assignment. Test against EOF instead of < 0.
6179 (error): Print to stderr, not stdout.
6180 (xmalloc, xrealloc): Return char * instead of int.
6181 Returning 0 is ok if 0 bytes requested (ANSI C).
6185 version-control: never