1 Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
3 * configure.in (ALL_LINGUAS): Add polish (pl).
5 Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
7 * configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
8 * checks/Makefile.am (SUBDIRS): Add sort-test.
10 Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
12 * Makefile.am (EXTRA_DIST): Add acinclude.m4.
14 Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
16 * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
17 Automake includes them automatically.
19 * configure.in (AM_INIT_AUTOMAKE): Use it.
20 (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
21 (AC_PROG_MAKE_SET): Likewise.
23 Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov>
25 * configure.in: Rename a few macros for automake-1.1c.
26 (AC_REPLACE_GNU_GETOPT): Remove.
27 (AC_PATH_PROG): Find perl -- needed only for checks if you
28 change or remove things with e.g. make maintainerclean.
31 * lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX
32 adds .o files to @LIBOBJ@.
33 (tu_SOURCES): Add getopt.c and getopt1.c.
34 (EXTRA_DIST): Remove getopt.c and getopt1.c.
36 * acinclude.m4: New file -- derived from aclocal.m4.
37 * aclocal.m4: This file is now generated by the aclocal program
38 (which comes with the automake package.)
40 Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
42 * checks/: New directory.
43 * checks/Makefile.am: New file.
44 * configure.in (AC_OUTPUT): Add new directories: checks,
46 * Makefile.am (SUBDIRS): Likewise.
48 Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
50 * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
51 redefinition warnings on solaris.
52 (textdomain) [!ENABLE_NLS]: Likewise.
54 Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov>
56 * src/unexpand.c (unexpand): Move EOF check to follow code that
57 processes and generates output for pending spaces. Before
58 `printf ' ' |unexpand -t 1,2' generated no output.
60 * src/md5sum.c (md5_check): Remove parameter, BINARY.
61 Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
62 from the input stream rather than the one from the command line.
63 (main): Fail with a diagnostic if --binary or --text is specified
64 when verifying checksums.
65 Reported by Eli Zaretskii <eliz@is.elta.co.il>.
67 Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
69 * configure.in: Add check for error_at_line so systems with
70 GNU libc don't compile and link with distributed error.c.
71 * lib/Makefile.am (tu_SOURCES): Remove error.c.
72 (EXTRA_DIST): Add error.c.
74 * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
75 Add related check for the getdelim function.
76 From Ulrich Drepper -- as done in gettext.
78 Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
80 * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
81 separate PACKAGE and VERSION.
83 * aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from
84 macros from Bruno Haible and from Cygnus.
85 * configure.in (AM_SANITY_CHECK_CC): Use it.
87 Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
89 * install-sh: Get version with MIT copyright.
91 Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
93 * aclocal.m4 (fp_C_PROTOTYPES): Improved version from
95 Update all other macros to reference $fp_cv_prog_cc_stdc, rather
96 than $ac_cv_prog_cc_stdc.
98 * src/od.c (OFF_T_MAX): Remove definition.
99 (main): Compare against LONG_MAX rather than OFF_T_MAX.
101 Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
103 * Many files: Update FSF address.
105 Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
107 * src/unexpand.c (unexpand): Fix bug that contributed to endless loop
108 when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not
109 tab_index in inner flush_pend: while loop. From Keith Owens
110 <kaos@audio.apana.org.au>.
112 * src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
113 [!INT_MAX]: Define it.
114 (main): Append INT_MAX to command-line-specified tab list to
115 ensure termination in unexpand's inner loop.
116 Derived from a patch from Keith Owens.
118 Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
122 * configure.in (VERSION): Bump to 1.19.
124 Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
126 * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
127 so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
128 those options on that system, sys/stat.h gets compile errors.
129 With help from Marcus Daniels.
131 * getopt.c: Update from gettext-0.10.23.
132 * getopt1.c: Likewise.
133 * getopt.h: Likewise.
135 Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
137 * src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
138 so the left operand of the << isn't signed.
139 From Kjetil Torgrim Homme.
141 * po/Makefile.in.in (install-data): Don't install NLS files when
142 they're not requested. From Ulrich Drepper. Reported by
143 Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
145 Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
147 * po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
148 * ABOUT-NLS: Likewise.
150 * aclocal.m4: Likewise.
152 Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
154 * src/uniq.c (usage): Remove space before newline in usage message.
156 * src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
157 [NEWLINE_REPLACEMENT_STRING*]: Remove macros.
158 (main): Output a leading backslash for a line describing a file
159 whose name contains a newline. Then translate each NEWLINE byte
160 in the file name to the string, "\\n", and each backslash to "\\\\".
161 File names that don't contain NEWLINE aren't translated.
162 (split_3): Rewrite to handle file names with embedded newlines.
163 Miles Bader and Jim Blandy suggested this new encoding scheme.
165 * src/md5sum.c (md5_file): Replace obsolete comment with a description
167 (md5_check): Don't use "s"-adding trick to form the plural of
168 `checksum.' That doesn't work well with translation.
169 Suggestions from Ulrich Drepper.
170 (split_3): Add missing semicolon so it compiles. From Jim Blandy.
172 Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
174 * src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
175 fact that leading blanks may be stripped.
177 Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
179 * configure.in (ALL_LINGUAS): Add dutch (nl).
181 Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
183 * src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
184 (split_3): Translate NL bytes not to NUL, but to
185 NEWLINE_REPLACEMENT_STRING.
186 Suggested by Ulrich Drepper.
187 (main): Translate back to NL-containing filename.
189 Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
191 * src/md5sum.c (split_3): Take an additional parameter, S_LEN.
193 Map translated NEWLINE-containing filename back into the original
194 NEWLINE-containing name.
195 (md5_check): Translate NEWLINE bytes to NUL bytes in filename.
197 Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
199 * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
200 appears in the output of --version. Reported by RMS.
202 Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
204 * src/Makefile.am (LDADD): Remove sort-specific hack to link
206 * aclocal.m4 (AM_FUNC_STRTOD): New macro.
207 * configure.in (AM_FUNC_STRTOD): Use it.
208 (AC_REPLACE_FUNCS): Remove strtod.
209 Suggested by Tom Tromey.
211 * po/Makefile.in.in (install-data): Add `else true;' to avoid
212 letting failing if-condition cause make failure.
213 From Fred Fish (fnf@ninemoons.com).
215 Tue Jun 25 21:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
219 Tue Jun 18 20:43:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
221 * aclocal.m4: Update from gettext-0.10.20.
222 * ABOUT-NLS: Likewise.
225 Thu Jun 13 22:31:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
227 * configure.in (VERSION): Bump to 1.18a.
229 * po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
230 Depend on POTFILES only when using maintainer mode.
232 * intl/*: Update from gettext-0.10.18.
234 Tue Jun 11 23:32:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
238 * po/Makefile.in.in: Update from gettext-0.10.17.
240 * ABOUT-NLS: Likewise.
242 Mon Jun 10 18:22:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
244 * Makefile.am (cvs-dist): Use -c option in cvs tag command.
246 Fri Jun 7 22:06:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
248 * configure.in (VERSION): Set to 1.18.
250 * src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
251 the strtod supplied with this package. Otherwise, linking failed on
252 Solaris-2.4 systems. Reported by Wayne Stewart <wstewa@atl.com>.
254 Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
256 * po/Makefile.in.in: Update from gettext-0.10.16.
258 * ABOUT-NLS: Likewise.
259 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
260 gettext-related ones.
261 Update from gettext-0.10.16.
263 Fri May 31 22:04:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
267 * Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
270 Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
274 * tail.c (main): Interpret the old-style +VALUE and -VALUE options
275 like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
276 suffix multipliers. This makes the code consistent with --help
277 output. Reported by Karl Heuer.
279 * sort.c (limfield): #ifdef-out a block of code that makes
280 GNU sort incompatible with Unix sort when a key-end spec refers
281 to the N'th character in a field that has fewer than N characters.
282 The POSIX spec doesn't appear to specify behavior for this case.
285 * po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
286 longer than 14 characters.
287 (mostlyclean): Likewise.
290 * po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
291 when using maintainer mode. Reported by Karl Heuer.
293 * po/Makefile.in.in (.po.mo): Reenable dependency and rule.
294 It is required when using native NLS, e.g. on Solaris.
297 * od.c (decode_one_format): Use %lu (not %d) printf format
298 corresponding to unsigned long, SIZE.
302 * intl/Makefile.in (installcheck): New target.
303 * po/Makefile.in.in (installcheck): New target.
305 * od.c (decode_one_format): Take another parameter.
306 Give a specific diagnostic for invalid format spec here rather
307 than an overly general one from caller's caller.
308 (decode_format_string): Update caller.
309 (main): Don't give diagnostic here when decode_format_string fails.
310 Remove assertions that could fail on some Crays because they don't
311 have a two-byte type.
312 Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
314 Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
316 * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
317 less portable fileno (stdin) and fileno (stdout).
318 * sort.c (main): Use STDIN_FILENO instead of less portable
321 Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
323 * Makefile.am (distcheck): Remove target and rule -- automake-0.33
324 adds it automatically.
326 Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov)
328 * configure.in (LINGUAS): Add ko.
329 * Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
331 Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
333 * Makefile.am (distcheck): New target. From Gord Matzigkeit.
335 Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
337 * po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise
338 they won't be built and install could fail. From Ulrich Drepper.
339 (.po.mo): Disable dependency and rule when not in maintainer mode.
341 * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
342 on whether we're using GNU gettext. From Ulrich Drepper.
344 Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
346 * intl/Makefile.in (distdir): Renamed from dist. For compatibility
348 * po/Makefile.in.in (distdir): Likewise.
350 * po/Makefile.in.in (all-yes): Depend on GMOFILES.
351 Depend on CATALOGS and GMOFILES files only in maintainer mode.
353 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
355 * configure.in: Require autoconf-2.10.
357 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
358 * configure.in (jm_MAINTAINER_MODE): Use it.
360 Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov)
362 * configure.in (LINGUAS): Add de.
363 * po/de.po: New file.
365 * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
366 * regex.c [IN_CTYPE_DOMAIN]: Likewise.
367 * system.h [IN_CTYPE_DOMAIN]: Likewise.
369 Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
371 * fmt.c (copy_rest): Don't copy past end of prefix. Output
372 trailing spaces if the prefix had any. Before, fmt would
373 improperly output NUL bytes. The command
374 perl -e 'print "| S";' |fmt -p' | '|tr '\0' @
375 output `|@S'. Reported by François Pinard.
377 * sort.c (main): Give a better diagnostic for `sort -0'.
378 Reported by Karl Berry.
380 * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
381 Otherwise, some systems lose because the value AC_C_INLINE choses
382 with plain `cc' is different from that chosen when using the ANSI-mode
383 C compiler. From Kaveh Ghazi.
385 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
387 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
388 * configure.in: Use it.
389 * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
390 (EXTRA_DIST): Add getopt.c and getopt1.c
392 * src/*.c, src/*.h: Update Copyright years to include 1996.
394 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
396 * getline.c: New version from gettext-0.10.12.
397 * getline.h: Likewise.
398 * configure.in (AC_CHECK_FUNCS): Add getdelim.
399 Suggested by Ulrich Drepper.
401 * md5sum.c (md5_check): Remove spurious newline at end of error
404 * od.c (decode_one_format): Use printf's L modifier for long doubles,
405 not `l'. From Eric Backus.
407 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
409 * od.c: Include <values.h>.
410 [!BITSPERBYTE]: Define.
411 [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
412 * configure.in (AC_CHECK_HEADERS): Add values.h.
414 Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov)
416 * Makefile.am (cvs-dist): New rule. Based on the one from
417 Tom Tromey's automake.
419 Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
421 * tail.c (main): Make code clearer: use new variable `n_files' in
422 place of `argc - optind'. Use `file' instead of `argv + optind'.
424 Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
426 * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
429 * memcasecmp.c: Unprotoize.
433 * join.c (decode_field_spec): Rename local variable `valid'
434 to invalid (and reverse sense) to avoid conflict with the
435 macro definition in /usr/include/locale.h on SunOS 4.1.3.
437 Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
439 * uniq.c: Add new option --ignore-case (-i).
440 Include memcasecmp.h.
441 (different): Compare with memcasecmp if ignoring case.
444 * join.c (memcasecmp): Remove static definition of function.
445 Include memcasecmp.h instead.
447 * memcasecmp.c: New file.
448 * memcasecmp.h: New file.
449 * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
450 (noinst_HEADERS): Add memcasecmp.h.
452 Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov)
454 * tr.c: The following commands all failed unnecessarily.
455 tr -cs '[:upper:]' '[X*]'
456 tr -dcs '[:lower:]' n-rs-z
457 tr -ds '[:xdigit:]' [:alnum:]'
458 tr -dcs '[:alnum:]' [:digit:]'
460 Reported by Ross Ridge (ross@worf.mks.com).
461 (validate): Add missing conjunct (translating) in test for
462 `translating and complementing character classes' error. Before,
463 valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
464 (homogeneous_spec_list): New function.
465 (validate): Use it to relax the old (overly restrictive) restriction
466 that prohibited use of complemented character classes when translating.
467 Now, that is allowed as long as the translation maps many to one.
468 (get_spec_stats): Rename and redefine global has_char_class from
471 Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
473 * aclocal.m4: Update NLS macros from gettext-0.10.11.
475 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
476 when srcdir != builddir. From Kaveh Ghazi.
478 Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov)
480 * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
481 to be POSIX compliant. From Stephen Gildea <gildea@x.org>.
483 Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
485 * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
486 * od.c (skip, main): Likewise.
487 * tr.c (main): Likewise.
489 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
490 join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
491 tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
492 EXIT_FAILURE, rather than 0 or 1.
494 Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
496 * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
497 is defined to zero. Suggested by Paul Eggert.
499 * sort.c [SORT_FAILURE]: New macro.
500 Be careful to exit with 1 only when -c is used and the
501 input is not properly sorted. In all other cases, use
502 SORT_FAILURE as required by POSIX.
503 (main): Change some `error (1, ...' to use SORT_FAILURE.
504 Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
505 Replace all uses of `2' (as exit code) with SORT_FAILURE.
507 Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov)
509 * csplit.c: Include assert.h, but disable assertions.
510 (process_line_count): Replace if-abort with a slightly relaxed
511 assertion. Before, `echo |csplit - 1 1' would abort.
512 Reported by Samuli.Karkkainen@hut.fi.
513 (parse_patterns): Disallow uses like `csplit FILE 0' with zero
514 line number, `csplit FILE 2 1' with decreasing line numbers, and
515 warn about uses like `csplit FILE 3 3' that have equal line numbers.
517 * sort.c (main): Declare to be of type int, not void.
518 From Peter Seebach <seebs@taniemarie.solon.com>.
519 * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
520 nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
521 wc.c (main): Likewise.
523 Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
525 * configure.in (PACKAGE_VERSION): New macro.
526 * acconfig.h (PACKAGE_VERSION): Add it.
527 * src/Makefile.am: Remove rules for generating version.c.
528 Remove references to version.o, version.h, and stamp-v.
529 * version.c: Remove file.
530 * version.h: Remove file.
531 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
532 head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
533 sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
535 (main): Use PACKAGE_VERSION instead of version_string.
537 Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
539 * sort.c (write_bytes): Renamed from xfwrite.
540 Remove SIZE parameter. It was always 1. Update all callers.
541 Rename NELEM parameter to N_BYTES and change its type to size_t.
543 Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
545 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
546 fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
547 split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
548 Initialize for internationalized message support: call setlocale,
549 bindtextdomain, and textdomain.
550 * system.h: Add definitions and includes for NLS.
551 * Makefile.am (SUBDIRS): Add intl and po.
552 * src/Makefile.am (datadir): Define.
554 (DEFS): Add LOCALEDIR definition.
555 (LDADD): Add @INTLLIBS@.
556 * aclocal.m4: Add NLS-related macro definitions from
557 gettext distribution.
558 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
559 HAVE_STPCPY): New macros.
560 Add PACKAGE and VERSION.
561 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
563 (ALL_LINGUAS): Define.
564 (AC_CHECK_HEADERS): Add float.h.
565 (ud_GNU_GETTEXT): Use it.
567 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
569 From François Pinard.
571 * tr.c (star_digits_closebracket): Declare formal param, IDX,
572 and local I to be of type size_t (rather than int) to avoid
573 warnings from gcc -Wall.
575 Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
577 * src/Makefile.am: Adapt for automake-0.30.
578 (noinst_HEADERS): Rename from HEADERS.
579 (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
580 to DEFS automatically.
581 * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
583 Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
585 * join.c (xfields) [without -t]: Ignore leading blanks.
586 From David Dyck (dcd@tc.fluke.COM).
588 Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
590 * join.c [TOLOWER]: Define.
591 (usage): Briefly describe new --ignore-case (-i) option.
592 (memcasecmp): New function.
593 (main): Set IGNORE_CASE for -i.
594 (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
595 Suggestion and an initial patch from Alberto Accomazzi
596 <alberto@cfa0.harvard.edu>.
598 Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
600 * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
601 (usage): Describe it.
602 (main): Set eolchar to 0 for -z.
603 From Mark W. Eichin <eichin@cygnus.com>.
605 Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
607 * join.c (main): Mark two strings for translation.
608 * md5sum.c (md5_check): Mark a string for translation.
609 From François Pinard.
611 Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
613 Update for automake-0.29.
614 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
615 * src/Makefile.am: Likewise.
616 * lib/Makefile.am: Likewise.
617 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
618 * man/Makefile.am (man_MANS): Renamed from MANS.
620 * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
622 From Derek Clegg (dclegg@next.com).
624 Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
628 Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
630 * tail.c (dump_remainder): Flush stdout when tailing-forever on
631 multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
633 Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
635 * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
636 not just -Xc. From François Pinard.
638 * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
639 distributed automatically. From Tom Tromey.
641 Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
643 * nl.c: Include rx.h after limit.h (not before) to avoid warning
644 about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
645 its definition. From Kaveh Ghazi.
647 * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
648 works again. Reported by François Pinard and Kaveh Ghazi.
650 * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
651 [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
652 (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
653 mismatch errors from e.g. SunOS's /bin/cc.
654 Reported by Kaveh Ghazi.
656 Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
658 * configure.in (VERSION): Set variable directly rather than from
660 * Makefile.am (DIST_OTHER): Remove VERSION.
661 * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
662 (stamp-v): New target; depend on Makefile.
663 (DISTCLEANFILES): Add stamp-v, version.c.
665 Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
667 * sort.c (keycompare): Rewrite cases handling ignored characters
668 so that they really are ignored. Reported by Carl Johnson
669 <carlj@cjlinux.home.org>.
671 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
673 * configure.in: Touch stamp-h only if config.h is remade.
675 * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
678 Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
680 Use automake to generate Makefile.in files.
681 * Makefile.am: New file.
682 * doc/Makefile.am: New file.
683 * lib/Makefile.am: New file.
684 * man/Makefile.am: New file.
685 * src/Makefile.am: New file.
687 Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
689 * fmt.c (main): Use xstrtol instead of atoi.
691 * fold.c (main): Use xstrtol instead of atoi.
692 (fold_file): Make a couple locals `int', not size_t, and cast
693 fwrite's third parameter to size_t.
695 * nl.c (main): Use xstrtol instead of atoi.
696 Rename misleading --first-page=N option to --starting-line-number=N.
699 * uniq.c (main): Use xstrtol instead of atoi.
701 Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
703 * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
705 Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
707 * aclocal.m4 (ud_WITH_REGEX): New macro.
708 * configure.in: Use it.
709 * rx.c, rx.h: New files.
710 * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
711 (SOURCES, DISTFILES): Add rx.c, rx.h.
712 * acconfig.h (WITH_REGEX): Add it.
713 * csplit.c [!WITH_REGEX]: Include rx.h.
714 * nl.c [!WITH_REGEX]: Likewise.
715 * tac.c [!WITH_REGEX]: Likewise.
716 From Ulrich Drepper and François Pinard.
718 Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
720 * sort.c (main): Diagnose invalid arguments to -k, then fail.
722 * sort.c (numcompare): Properly handle all cases in which signs differ.
725 * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
726 Append `/man1'. Reported by Karl Heuer.
728 * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
730 * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
732 Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
734 * lib/Makefile.in (default): New target.
736 * sort.c (numcompare): Properly order `-' and valid integers;
737 treat `-' as if it were zero. Reported by Ross Alexander
738 <r.alexander@auckland.ac.nz>.
740 * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
741 (.PHONY): Depend on default.
743 Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
745 * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
746 (jm_AUTODEPS): Likewise.
747 (jm_WITH_GNU_MAKE): Likewise.
748 * configure.in (jm_AUTODEPS): Remove.
750 * sort.c (begfield): Replace loop with equivalent if-else.
751 (limfield): Fix bug that made field specs like -k1.5 return a
752 pointer into LINE beyond the first field.
753 Don't try to trim trailing blanks here; it's not
754 possible because we don't know where the field begins.
755 Replace loop with equivalent if-else.
756 (trim_trailing_blanks): New function.
757 (findlines): Call it.
758 (keycompare): Likewise.
759 (main): Don't decrement T2 corresponding to `x' in field
760 specs like -ku.v,w.x.
762 Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
764 * csplit.c [!UINT_MAX]: Define.
767 (string_to_number): Remove function.
768 (check_for_offset): Use xstrtoul instead of string_to_number.
769 (parse_repeat_count): Likewise.
770 (parse_patterns): Likewise.
773 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
775 * Makefile.in (all et. al.): If make was invoked with -k and a
776 sub-make fails, fail after the loop rather than exiting right away.
777 Otherwise, make's -k option could be ineffective.
779 Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
781 * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
783 Update for autoconf-2.5:
784 * src/Makefile.in (libdir): Set to @libdir@.
785 (bindir): Set to @bindir@.
786 * doc/Makefile.in (infodir): Set to @infodir@.
787 * man/Makefile.in (exec_prefix): Remove it.
788 (mandir): Set to @mandir@.
791 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
793 * Makefile.in (default): New default target. Depend on `all' to
794 work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
797 Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
799 * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
801 * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
802 * src/Makefile.in (C_MKDEP): Rename from MKDEP.
803 * lib/Makefile.in (C_MKDEP): Likewise.
804 * mkdep-Makefile (C_MKDEP): Likewise.
807 * csplit.c [__P]: Don't define it here.
808 * pr.c [__P]: Don't define it here.
809 * fmt.c [__P]: Don't define it here.
810 * system.h [__P]: Define it here.
812 * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
813 Revamp, with suggestions from Franc,ois Pinard.
814 (jm_WITH_GNU_MAKE): New macro.
815 (jm_PROG_MKDEP): New macro.
816 * configure.in (jm_PROG_MKDEP): Use it.
817 * src/Makefile.in (MKDEP): Set it.
818 * lib/Makefile.in (MKDEP): Likewise.
819 * mkdep-Makefile: Use MKDEP, not DEP_CC.
820 (DEP_CFLAGS): Remove it.
822 Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
824 * sort.c: Add support for sorting numbers in scientific notation.
826 (struct keyfield): Add field: general_numeric.
827 (usage): Describe -g option.
828 (general_numcompare): New function.
829 (keycompare): Use new comparison function when general_numeric
831 (set_ordering): Honor `g' flag.
832 (main): Initialize and use new field.
833 From Marcus Daniels <marcus@sysc.pdx.edu>.
835 * configure.in (AC_REPLACE_FUNCS): Add strtod.
836 * lib/Makefile.in (SOURCES): Add xstrtod.c.
837 (OBJECTS): Add xstrtod.o.
838 (DISTFILES): Add xstrtod.h.
840 * csplit.c (cleanup): Don't exit.
841 (interrupt_handler): Rewrite to reset default signal handler
842 then repost caught signal.
843 (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
844 process_line_count, process_regexp, create_output_file,
845 close_output_file): Call cleanup_fatal, not cleanup.
846 Add const attribute to lots of parameters.
847 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
850 * tac.c: (cleanup): Don't exit.
851 (cleanup_fatal): New function. Call cleanup, then exit.
852 (sighandler): New function.
853 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
855 (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
857 Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
859 * od.c (skip): Cast fseek's offset argument to `long'.
860 Erik Bennett <bennett@cvo.oneworld.com> reported that this is
861 necessary on BSDI systems. And if offset doesn't fit in a long,
862 then try using lseek instead.
864 * sort.c (xmalloc): Declare static.
865 (xrealloc): Likewise.
867 * tac.c (cleanup): Add signal number parameter.
870 * cat.c (main): Don't die when dev/ino of input and output are
871 the same and the file descriptors correspond to stdin and stdout.
872 This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
873 Otherwise, running `cat << X > $$' would fail with `cat: -: input
874 file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
876 * Makefile.in (DISTFILES): Add @README_ALPHA@.
877 (config.status) Depend on VERSION.
878 * configure.in: Set README_ALPHA if the version number ends in [a-z].
880 Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
882 * fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
884 src/Makefile.in (.c._c): Don't redirect directly to $@.
885 (._c._o, .c._o): Remove temporary src file.
887 Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
890 * configure.in (VERSION): New variable.
891 (PACKAGE): New variable.
893 * Makefile.in (DISTFILES): Add VERSION.
894 (distdir): Use @PACKAGE@-@VERSION@, not distname.
895 Remove all references to distname.
896 * src/Makefile.in (version.c): Generate it.
897 (SOURCES): Remove now-generated version.c.
898 (distclean): Delete version.c.
899 * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
902 * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
903 Remove all references to distname.
905 * split.c: New option: --verbose.
906 (main): Recognize it.
907 (usage): Document it.
908 From Marty Leisner <leisner@sdsp.mc.xerox.com>.
910 Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
912 * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
916 (store_columns): Remove spurious 2nd argument in call to read_line.
917 [__P]: Define. Use it in prototyped forward decls.
919 * csplit.c: Move prototypes after struct declarations.
920 Remove prototypes for xmalloc, xrealloc.
921 Protect prototypes with __P.
922 (new_control_record): Cast arg 1 to realloc.
924 * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
927 Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
929 * csplit.c (close_output_file): Set output_stream to NULL so we
930 don't recurse endlessly between this function and cleanup.
932 * unexpand.c: Reorder functions to obviate forward dcls. Remove
933 forward dcls. Protoize. Add `const' attribute to some parameters.
935 Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
937 * wc.c: Reorder functions to obviate forward dcls. Remove
938 forward dcls. Protoize. Add `const' attribute to some parameters.
942 * split.c (isdigits, convint): Remove these.
943 (main): Use xstrtol instead.
945 Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
947 * paste.c (main): Move function body to end of file.
948 Remove forward dcls and protoize.
949 * sum.c (main): Likewise.
950 * nl.c: Protoize. Reorder functions to obviate forward dcls.
953 * src/Makefile.in (OBJECTS): Reflect that all of the above
956 * sum.c (bsd_sum_file): Give file name parameter const attribute.
957 (sysv_sum_file): Likewise.
959 * tac.c (xwrite): Give output buffer parameter const attribute.
960 (output): Likewise for both parameters.
961 (tac): Likewise for file name parameter.
962 (tac_file): Likewise.
964 Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
966 * md5sum.c (md5_check): Use the same message format when there is
967 a single file and it gets a read error or checksum mismatch as when
968 there are more. Write that warning to standard error, not standard
969 output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
971 Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
973 * sort.c (xtmpfopen): New function to set proper permissions on
974 temporary files. Use it instead of xfopen. Reported by Erik Corry
975 (erik@kroete2.freinet.de).
977 Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
979 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
980 * configure.in: Use it.
982 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
983 (.c.o): Rewrite to be more like src/Makefile.in.
985 * src/Makefile.in (distclean): Remove .deps.
986 Include @top_srcdir@/mkdep-Makefile.
988 * mkdep.Makefile: New file.
989 * Makefile.in (DISTFILES): Add mkdep-Makefile.
990 * doc/Makefile.in (mostlyclean): Also remove *.info.
992 Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
994 * od.c: Indent cpp directives.
996 * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
997 with large repeat counts.
998 (struct E_string): New struct.
999 (find_closing_delim): Take E_string arg rather than char* and length.
1000 (find_bracketed_repeat): Likewise.
1001 (star_digits_closebracket): New function.
1002 (append_char_class): No longer give diagnostic.
1003 (append_equiv_class): Likewise.
1004 (build_spec_list): Give them here instead, allowing string1 like
1005 [:*][:upper:] that got errors before.
1006 Take E_string arg rather than char*.
1007 Convert switch stmts into if-then so as to use ES_MATCH.
1009 Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
1011 * cat.c: Protoize. Reorder functions to obviate forward dcls.
1012 Remove forward dcls.
1013 * expand.c: Likewise.
1020 * src/Makefile.in (OBJECTS): Reflect that all of the above
1023 * head.c: Add `const' attribute to dcls of lots of formals.
1025 * sort.c: Add `const' attribute to dcls of lots of formals.
1026 Move struct dcls to precede dcls of file-scope variables.
1027 (monthtab, keyhead): Separate variable dcls from type dcls.
1029 Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
1031 * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
1032 list item separators, per POSIX spec.
1033 (prjoin): Rewrite loop that iterates over field specs.
1034 Handle case in which file spec is 0.
1036 Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
1038 * strpbrk.c: New file.
1039 * lib/Makefile.in (SOURCES): Add strpbrk.c.
1042 Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
1044 * join.c (add_field): No longer return a value.
1045 (decode_field_spec): New function.
1046 (add_field_list): Rewrite to be more strict.
1047 Before, `,1.2' was accepted as valid.
1048 (main): Use xstrtol instead atoi.
1049 Combine nearly identical -a and -v cases.
1052 Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
1054 * join.c (main): Report `too few/many non-option arguments'
1055 then print --help output rather than just the latter.
1056 Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
1057 (usage): Describe POSIX -1, -2 options and deprecate -j* ones
1059 * join.c (usage): Move to precede all other functions.
1063 Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
1065 * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
1066 to determine whether `sigaction' functions are available.
1067 Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
1068 Fix suggested by Karl Berry.
1070 * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
1073 * cut.c: Convert many declarations using `int' to use `unsigned int'
1074 to avoid warnings from `gcc -Wall' about comparing signed and
1076 (set_fields): Use memset (not open coded loop) to initialize array.
1078 Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
1082 * Makefile.in (DISTFILES): Remove README.alpha for major release.
1084 * od.c (decode_one_format): Remove spurious semicolon.
1085 From John Kodis (kodis@daacdev1.stx.com).
1087 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
1089 * man/Makefile.in (install-data, uninstall): Use sed not basename.
1090 The GNU Coding Standard suggests that only a select set of
1091 relatively standard utilities be used in Makefiles. basename is
1092 not among them. Suggested by Ulrich Drepper.
1094 Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
1096 * cksum.c: Protoize.
1099 * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
1101 (cksum): Depend on cksum$O.
1102 (cut): Depend on cut$O.
1104 Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
1108 * Makefile.in (DISTFILES): Add README.alpha.
1110 * lib/Makfile.in: (GETOPT, MEMCHR, REGEX): New variables.
1111 (OBJECTS): Use them instead of hardcoding object file names.
1112 Suggested by Ulrich Drepper.
1114 * md5sum.c (md5_check): Distinguish between open/read failure
1115 and checksum mismatch.
1117 Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
1119 * md5sum.c: Protoize.
1120 * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
1121 (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
1122 (md5sum): Depend on md5sum$O.
1124 * md5sum.c (main, usage): Remove -h, -s, -v short options.
1125 Rename --verbose to --warn, --quiet to --status.
1126 (main): Handle --help and --version using parse_long_options.
1127 (md5_check): Check ferror.
1129 * sort.c (tempname): Replace `16' with a more readable expansion.
1130 Make sure that counter never exceeds 99999.
1131 (checkfp): Rearrange loop to avoid duplicate test.
1132 Move a couple dcls from function scope into inner block.
1134 Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
1136 * md5sum.c (main): Fail if either --verbose or --quiet is specified
1137 when not verifying checksums.
1139 * md5sum.c (md5_check): Fail if no valid line is found.
1140 Don't use the word `fail' unless there were failures --
1141 instead, say `all N tests passed.'
1143 * md5sum.c (main) [handling --string option]: Don't output
1144 nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
1145 * md5-test.rfc: Remove now-inconsistant `b' marker.
1146 (usage): Clarify help message. With suggestions from Greg Troxel.
1148 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
1150 * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
1151 compiler warning. From Ulrich Drepper.
1153 * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
1154 compiler warning. From Ulrich Drepper.
1156 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
1159 Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
1161 * system.h (_): Define macro -- as empty for now.
1162 * src/*.c: Annotate localizable strings with _(...). From Franc,ois.
1164 Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
1168 * configure.in: Add fp_C_PROTOTYPES.
1170 Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
1172 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
1173 Add suffixes, dependencies, and rules to convert ANSI source to K&R
1174 when required. Mark tr.o and comm.o as the only such files (for now).
1179 * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
1180 (configure): Depend on aclocal.m4.
1181 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
1183 Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
1185 * md5sum.c (md5_check): Use getline instead of fgets.
1187 * lib/Makefile.in: (SOURCES): Add getline.c.
1188 (OBJECTS): Add getline.o.
1189 (DISTFILES): Add getline.h.
1190 (getline.o): Depend on getline.h.
1192 * md5.c [memcpy]: Define to bcopy if needed.
1193 (md5_buffer): Explicitely cast SWAP expressions to unsigned
1196 * lib/Makefile.in (strtoul.o): Depend on strtol.c.
1198 * sort.c (check): Print `disorder on...' message on standard error,
1199 not stdout. This is a minor concession to POSIX which says
1200 `no output shall be produced...'.
1202 * sort.c (main): Fix -k so it works. -k 2,3 was being treated
1203 like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
1205 Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
1207 * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
1208 before applying $(transform) to manual name. From Karl Berry.
1210 * md5sum.c (have_read_stdin): New global variable.
1211 (md5_file, md5_check): Set it.
1214 * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
1215 (md5_file): Take a new parameter, MD5_RESULT, and no longer
1217 (md5_check): Invoke md5_file instead of calling fopen directly.
1218 When giving a diagnostic for a line with invalid format, also report
1220 (main): Generate output after a successful md5_file call.
1221 [in many places]: Upon detection of an error, rather than exiting
1222 immediately, issue a diagnostic, note that an error occurred and
1225 Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
1227 * tail.c (tail_bytes) [from_start]: For regular files, seek
1228 relative to the initial input file pointer position, not
1229 necessarily from the beginning of the file.
1230 [!from_start]: Don't back up past the initial position of the
1232 (tail_lines): Call file_lines only if FD refers to a regular file
1233 with its file pointer positioned at beginning of file. Otherwise,
1234 call pipe_lines. This is a kludge. Once there's a decent test
1235 suite, fix this properly.
1236 Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
1237 would output both lines of the input file even though the first had
1238 already been read. Reported by John Roll (john@panic.harvard.edu).
1240 * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
1242 * csplit.c (main): When too few arguments are given, don't just
1243 issue the usage message; also report why.
1245 Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
1247 * md5sum.c (md5_check): New function -- extracted from main.
1249 Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
1251 * md5sum.c (md5_file): New function -- extracted from main.
1252 (main): Call the new function instead of doing all that in an
1253 if-stmt. Always use "%s" format rather than raw filename as
1254 format argument in printf-style functions like error. Otherwise,
1255 filenames containing `%' are likely to lose.
1256 Remove all mention of `old format'.
1257 (split_3): No longer parse the `new format.' There is only one
1258 valid format now: the compatible one.
1260 * lib/Makefile.in: (SOURCES): Add md5.c.
1261 (OBJECTS): Add md5.o.
1262 (DISTFILES): Add md5.h.
1263 (md5.o): Depend on md5.h.
1265 * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
1266 * lib/md5.c (md5_stream): Check for read failure and return
1267 indication of success rather than second argument.
1268 * lib/md5.h (md5_stream): Update prototype.
1269 [__P]: Define macro.
1270 * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
1271 (main): Report an error if md5_stream fails. Otherwise, running
1272 `md5sum dir-on-mounted-filesystem' always reported the checksum
1273 for an empty file. Now it gets the `is a directory' error.
1274 Greg McGary (gkm@magilla.cichlid.com) reported that the released
1275 version got stuck in an infinite loop with such arguments.
1277 * lib/md5.c: New file.
1278 * lib/md5.h: New file.
1279 * md5sum.c: Rewritten to use library interface.
1280 From Ulrich Drepper.
1282 Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
1284 * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
1286 Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
1288 * md5sum.c Add #else block after #ifdef VMS.
1289 (main): Rename local variable.
1290 Detect and report failed fclose calls on stdout and checkfile_stream.
1292 * tr.c (unqote): Comment out unreachable break stmts.
1293 (append_range): Declare FIRST and LAST parameters to be unsigned int,
1295 (find_closing_delim): Clean up interface, separating boolean success
1296 indicator and index.
1297 (find_bracketed_repeat): Likewise.
1298 (build_spec_list): Adapt to use new interfaces.
1299 Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
1300 type size_t, not int.
1301 (main): Declare NR and CHARS_READ to be of type long, not int.
1303 * sort.c (main): Comment out unreachable break stmt.
1305 * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
1306 call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
1307 off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
1308 long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
1310 * comm.c: Reorder functions so main is last, so no forward dcls
1313 Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
1315 * sort.c (main): When using obsolescent +pos -pos syntax, allow
1316 omission of field spec only when character offset is specified.
1317 Otherwise, -. +. would be accepted.
1319 Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
1321 * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
1322 position specification. For compatibility with existing practice
1323 (what vendors?), omitting M is now equivalent to specifying `0' for M,
1324 but only when using the +pos -pos syntax, not with the -k option.
1325 From Rick Sladkey (jrs@world.std.com).
1327 Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
1329 * od.c (dump): Correct loop-termination criterion.
1330 Before, running `printf 1234| ./od --width=4 --read-bytes=4'
1331 printed output for 8 bytes -- the last four were garbage.
1332 This happened only when the dump limit, N, was specified (with
1333 --read-bytes=N) and N was a multiple of bytes_per_block
1334 (usually 16, but 4 in this example). From Andreas Schwab.
1336 Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
1338 * lib/Makefile.in (check): Depend on libtu.a.
1340 * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
1341 (main): Print each sum line in (de facto) standard Plumb/Lankester
1343 New option: --quiet.
1344 Check option no longer takes an argument.
1345 When checking, exit status reflects success.
1347 Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
1349 * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
1350 Autoconf (via config.h) defines it away for compilers that don't
1353 * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
1354 defining to avoid redefinition warning on some systems.
1356 * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
1357 This avoids potential conflict with max macro from some system's
1358 header files when using bad pre-ANSI compilers.
1360 * uniq.c (usage): Fix typo in text of --help output.
1361 From Steve McConnel <steve@acadcomp.sil.org>
1363 * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
1364 also check `unsigned long', as a concession to systems with
1365 int's smaller than 32 bits.
1367 * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
1368 AC_FUNC_MEMCMP already handles it. This avoids warnings from
1369 ranlib on nextstep systems. From Kaveh Ghazi.
1371 * csplit.c (interrupt_handler): Declare to have a single integer
1372 parameter. Otherwise, some compilers fail with a type mismatch
1373 error in sa_handler assignment.
1375 * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
1376 headers that typedef `word' get syntax errors because of the
1377 variable by the same name.
1379 * join.c [join]: Redefine to avoid conflict with prototype in some
1380 system header file. Also for Unicos.
1382 * md5sum.c (main): Remove spurious colon in getopt spec string.
1383 From Ken Pizzini <kenp@spry.com>.
1385 Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
1387 * md5sum.c (md5_file): Initialize two elements of LEN portably,
1388 rather than with ANSI aggregate initialization. Reported by
1389 Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
1391 Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
1395 * md5sum.c (process_buffer): Copy values from struct into
1396 individual local variables before performing computation on them,
1397 then copy results back into returned struct. Solely for better
1398 optimization by compilers that can't keep struct members in
1399 registers. From Ulrich Drepper.
1401 Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
1403 * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
1404 Don't use #elif. Some older compilers don't grok it.
1405 (split_3): New function to parse out sum, flag, and filename
1406 when reading check file.
1407 (hex_digits): Remove length parameter since string parameter is
1409 (main): Don't allocate separate arrays for filename and sum
1410 when checking. Get pointers into line buffer with split_3 instead
1412 (main): Treat `no file args' just like `-' when not checking
1414 (hex_digits): Unprotoize.
1416 * md5sum.c (main): Don't use a separate loop to convert to lower
1417 case. Suggested by Ulrich Drepper.
1420 From Ulrich Drepper.
1422 * md5sum.c: Don't include values.h.
1425 * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
1426 and _POSIX_VERSION. Reported by Arne H. Juul.
1428 Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
1430 * tr.c [NDEBUG]: Define it to disable assertions. Some systems
1431 have a broken <assert.h> header.
1432 (is_char_class_member): Set a variable in each branch of switch
1433 stmt and return that value after the switch (rather than returning
1434 directly from every branch).
1435 (unquote): More int->size_t changes.
1436 (build_spec_list): More int->size_t changes.
1437 Be very careful about comparison now that variables are unsigned:
1438 Use i + 2 < len rather than i < len - 2. The latter didn't work
1439 for len < 2. Caught early thanks to a thorough regression test
1442 Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
1444 * sort.c (xfclose): Don't try to flush stdin, only stdout.
1445 Otherwise, at least Ultrix-4.3's fflush would return EOF.
1446 Reported by Jim Blandy (jimb@cyclic.com).
1448 * tr.c (non_neg_strtol): Don't compare signed and unsigned.
1449 [struct Spec_list] (indefinite_repeat_element): New member.
1450 Use size_t rather than int or unsigned long where reasonable.
1451 (get_spec_status): Make interface cleaner.
1452 (get_s1_spec_status): New function.
1453 (get_s2_spec_status): New function.
1454 (validate): Use new functions instead of get_spec_status.
1456 Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
1458 * md5sum.c: New file. From Ulrich Drepper.
1459 * md5-test.rfc: New file.
1460 * Makefile.in: (PROGS): Add md5sum.
1461 (check): Run a recursive make in each subdirectory.
1462 * man/Makefile.in: (MANFILES): Add md5sum.1.
1463 * src/Makefile.in: (SOURCES): Add md5sum.c.
1464 (OBJECTS): Add md5sum.o.
1465 (PROGS): Add md5sum.
1466 (check): Add basic checks for md5sum.
1467 (md5sum): Add dependency and link rule.
1468 (DISTFILES): Add md5-test.rfc.
1470 * tr.c (look_up_char_class, append_char_class, append_equiv_class):
1471 Use const attribute when appropriate.
1473 Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
1475 * join.c: Overhauled to make -a1 and -a2 options work.
1476 Passed all tests in a fairly thorough test suite.
1477 Reported by Michael Hasselberg (mikelh@zonta.ping.de).
1479 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
1481 * tail.c (main): Remove dcl of and statements that set now-unused
1484 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
1485 Without this, SunOS doesn't get type for memchr.
1486 Reported by Kaveh Ghazi.
1488 Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
1490 * tail.c (tail_lines): Change one more `long' to `off_t'.
1491 Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
1493 * csplit.c [struct control]: Change type of `repeat' to unsigned
1494 long to avoid conversion warning.
1496 Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
1498 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
1500 * xstrtol.c (__strtol): Remove prototype altogether.
1501 Move inclusion of xstrtol.h back so that it follows system headers.
1505 Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
1507 * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
1510 * xstrtol.c: Define NDEBUG for systems with losing assert.h.
1511 (__strtol): Add __unsigned to prototype and use __P.
1512 Move inclusion of xstrtol.h to precede prototype.
1515 * memmove.c: Include config.h for definition of const.
1518 * All Makefile.in (install-exec, install-exec): New targets.
1521 * tr.c (look_up_char_class): Take a string length argument -- required
1522 because the argument is a string that is *not* NUL-terminated.
1523 Use strncmp, not strcmp and add string lengths comparison.
1524 (append_char_class): Update caller. Before this change,
1525 tr '[:upper:]' '[:lower:]' read one uninitialized byte.
1526 From Andreas Schwab.
1528 * split.c (next_file_name): Move dcls of file-scope variables into
1529 this function. Don't rely on arithmetic being two's complement.
1531 * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
1532 Instead, declare two FILE structs and use their addresses.
1534 * csplit.c (record_line_starts): Remove set-but-not-used,
1535 file-scope variable.
1537 Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
1539 * all source files (usage): Include one- or two-line synopsis
1540 in --help output. From Karl Berry.
1542 * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
1545 Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
1549 Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
1551 * all Makefile.in (maintainer-clean): Renamed from realclean
1554 Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
1556 * sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
1557 Don't include safe-stat.h.
1559 * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
1560 Remove all associated rules. safe-l?stat.h are no longer used.
1562 * sort.c Don't hard-code /tmp.
1563 [DEFAULT_TMPDIR]: Use this instead.
1564 * tac.c (save_stdin): Likewise.
1566 * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
1567 Reported by John Salmon (johns@mullet.anu.edu.au).
1568 Patch from Mike Haertel.
1570 Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
1572 * sort.c (tempname): AND-off high bits of pid so that its decimal
1573 string representation is no longer than five digits.
1574 From Hans Verkuil (hans@wyst.hobby.nl).
1576 Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
1578 * expand.c (add_tabstop): Give correct size when reallocating
1579 tab_list buffer. From Geoff Odhner (geoff@franklin.com).
1580 Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
1582 Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
1584 * configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
1585 unnecessary conflicts for people using version control software
1587 (AC_ARG_PROGRAM): Use it.
1589 Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
1591 * head.c: Remove block of redundant comments describing options.
1592 (usage): Remove reference to -l option. It's not valid.
1594 * od.c (write_block): Declare index I as unsigned int, not int.
1595 (get_lcm): Likewise.
1596 (dump_strings): Likewise.
1598 (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
1599 (dump_strings): Declare bufsize to be of type size_t, not int.
1601 * split.c (next_file_name): Don't reuse X as an index.
1602 Declare new variable I instead.
1604 Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
1606 * csplit.c: Declare as `unsigned int' all variables that were
1608 (make_filename): Change type of arg to unsigned int.
1609 (split_file): Change type of indices to unsigned int.
1611 Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
1613 * od.c (main): Detect and fail when argument to -N is too large
1616 Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
1618 * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
1619 Remove check for sizeof long.
1621 * linebuffer.h: Undefine __P before defining it.
1622 * long-options.h: Likewise.
1623 * xstrtol.h: Likewise.
1625 * memcpy.c: New file.
1626 * lib/Makefile.in (SOURCES): Add memcpy.c.
1628 Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
1630 * src/*.c: Update Copyright dates.
1632 Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
1634 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
1635 Separate errno declaration from STDC_HEADERS.
1637 * wc.c (wc): For efficiency, handle separately the cases in which
1638 words need not be counted. Suggested by Karl Heuer.
1640 * wc.c (wc): Don't overcount the number of bytes when reading
1641 from a regular file on stdin with file pointer not at BOF.
1642 From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
1643 `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
1644 the size of the file. Now it outputs `0'.
1646 Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
1648 * cat.c (cat): Use memmove rather than bcopy.
1649 * csplit.c (load_buffer): Use memcpy rather than bcopy.
1650 (extract_regexp): Use strrchr, not rindex.
1651 * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
1652 (flush_paragraph): Use memmove instead of bcopy.
1653 * fold.c (fold_file): Use memmove instead of bcopy.
1654 * od.c (decode_format_string): Use memmove instead of bcopy.
1655 [EQUAL_BLOCKS]: Use memcmp, not bcmp.
1656 (parse_old_offset): Use strchr, not index.
1657 (dump): Use memset, not bzero.
1658 * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
1659 (fillbuf): Use memmove instead of bcopy.
1660 * split.c (main): Use memset, not bzero.
1661 (line_bytes_split): Use memmove instead of bcopy.
1662 * tac.c (tac): Use memmove instead of bcopy.
1663 (output): Use memcpy instead of bcopy.
1664 * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
1665 * tr.c (substr): Use memcpy instead of bcopy.
1666 (card_of_complement, set_initialize): Use memset, not bzero.
1668 * tr.c (substr): Don't allocate a byte for trailing NUL in result
1669 since the result needn't be NUL-terminated. Don't NUL terminate it.
1671 * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
1673 (AC_CHECK_FUNCS): Add strchr and strrchr.
1675 * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
1676 * memmove.c: New file.
1677 * memcpy.c: New file.
1679 Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
1681 * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
1682 not followed by a newline would be followed by data copied from
1683 uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
1684 Reported by Franc,ois Pinard.
1686 * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
1687 AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
1688 Be careful to use off_t instead of explicit `unsigned long'.
1689 Otherwise, systems like 4.4BSD lose on calls to fseek that
1690 expect off_t (which is long long on that system).
1691 (parse_old_offset): Use xstrtoul
1694 * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
1696 Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
1698 * tail.c (numerous functions): Give char* filename arguments the
1701 * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
1702 Add xstrtol.c and xstrtoul.c.
1703 (OBJECTS): Likewise for .o files.
1704 (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
1706 * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
1707 (distclean): Remove references to safe-l?stat.c.
1708 Remove all related rules and dependencies.
1710 * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
1712 Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
1714 * tail.c (tail_file): Fix call to error with %s in format, but
1715 no corresponding argument.
1717 * src/*.c: Include "error.h" instead of simply declaring
1719 * od.c (main): Use %lu, not %d for unsigned long.
1720 (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
1721 and STRTOL_FATAL_ERROR instead.
1723 Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
1725 * sort.c (main): Fix interpretation of field offsets when specified
1726 via -k option. They were being interpreted as zero-indexed. POSIX
1727 says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
1728 (keycompare): Don't ignore characters at the end of words when
1729 otherwise they would compare equal. From Rik Faith.
1731 * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
1732 to off_t because n_bytes is used as the option to fseek and off_t may
1733 be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
1734 imposed is in the string-to-integer converstion of xstrtol.
1735 (main): Use xstrtol instead of manual string to integer conversion.
1737 * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
1738 comparisons against '0' and '9'.
1740 * tr.c [!ULONGMAX]: Define it.
1741 [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
1743 * full-write.c: Declare (or not) errno based on definedness or
1744 errno, not STDC_HEADERS.
1745 * safe-read.c: Likewise.
1746 * xwrite.c: Likewise.
1748 Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
1750 * tail.c (dump_remainder): Flush standard output just before
1751 sleeping so that `tail -f' will output partial lines sooner.
1752 This applies only when following the end of a single file.
1753 From Leonard N. Zubkoff <lnz@dandelion.com>.
1755 * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
1756 start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
1758 * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
1759 * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
1760 not already defined.
1762 Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
1764 * tr.c: Include <getopt.h> instead of "getopt.h".
1766 * sort.c (tempname): Merge two very similar sprintf stmts into one.
1768 * tail.c: Use BUFSIZ instead of BUFSIZE.
1770 * cut.c: Declare DELIM to be `int' rather than unsigned char.
1772 * fmt.c: Use index, not strchr -- per GNU Standards.
1773 Reported by Kaveh Ghazi.
1774 Always include <config.h>.
1775 (main): Include program name in --version output.
1777 Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
1781 Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
1783 * memcmp.c, srtoul.c: Use up-to-date versions.
1784 Reported by Franc,ois Pinard.
1786 * src/Makefile.in (DEFS): Remove -Dlint... again.
1788 * src/Makefile.in (PROGS): Add fmt!
1789 Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
1791 Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
1795 Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
1797 * linebuffer.h: Use __P instead of _P since the latter conflicts
1798 with a definition in some <ctype.h>. From Kaveh Ghazi.
1800 Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
1802 * tr.c: Add const attribute where appropriate.
1804 * tail.c (BUFSIZ): Use definition from <stdio.h>.
1806 Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
1808 * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
1809 n_bytes is positive. Turn off assertions. `tail /dev/null' was
1810 getting a failed assertion. Reported by Doug McLaren
1813 * cut.c (cut_bytes): Print at least a newline for every line of input.
1814 (cut_fields): Print a newline even for lines whose only selected
1815 field is empty. But print nothing when using -s without -f1.
1816 And print nothing for empty input. Reported by
1817 Richard_Sharman@software.mitel.com.
1819 Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
1821 * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
1822 * linebuffer.h: Likewise.
1824 Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
1826 * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
1827 already handles it. From Kaveh Ghazi.
1829 * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
1830 get failures when it's defined. From Kaveh Ghazi.
1832 * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
1833 defined on some Next and Alliant systems. From Kaveh Ghazi.
1835 * sort.c join.c (main): Include version.h and call parse_long_options
1836 with the proper number of arguments. Reported by Franc,ois Pinard.
1838 Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
1840 * (configure.in): Add AC_OFF_T and rearrange by type along the
1841 same lines as autoscan.
1843 * fmt.c, fmt.1: New files.
1844 Both from Ross Paterson (rap@doc.ic.ac.uk).
1846 * Makefile.in (PROGS): Add fmt.
1847 * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
1848 (fmt): Add a link rule.
1849 * man/Makefile.in (MANFILES): Add fmt.1.
1851 Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
1853 * Makefile.in (All of them): Update from the ones in sh-utils.
1854 From now on, rules and definitions that are comon to the fileutils,
1855 textutils, and sh-utils will get ChangeLog entries only in the
1858 Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
1860 * od.c (my_strtoul): Set errno to zero before calling strtoul.
1861 Otherwise, od can fail complaining about a valid integer argument.
1862 From Andreas Schwab.
1864 Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
1866 * tr.c (main): Give an error and fail when squeezing repeats
1867 and no non-options are given. Reported by Tony Robinson
1868 (ajr@eng.cam.ac.uk).
1870 * sort.c (main): Temporarily copy each input file that might be
1871 another name for the output file. When in doubt (e.g. a pipe),
1872 copy. This allows the dangerous (historical -- in cnews) idiom
1873 `cat file | sort -o file' to work properly. Don't rely on this
1874 behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
1876 Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1878 * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
1879 Remove CONFIG_BROKETS ifdef.
1880 * src/Makefile.in lib/Makefile.in: Don't define it.
1882 Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
1884 * full-write.c (full_write): Declare argument LEN to be size_t.
1886 Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
1888 * tail.c (tail_file): [For multiple files only]: Report truncation
1889 of monitored file and reset current file size. From Franc,ois Pinard.
1891 Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
1893 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
1894 From Franc,ois Pinard.
1896 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
1898 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
1899 decides whether to include <fcntl.h>. From Francois Pinard.
1901 Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
1903 * tr.c (substr): Fix off-by-one allocation error.
1905 Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
1907 * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
1908 (tac): Fix typo that had `1' as arg #2 of error after failed read.
1909 Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
1911 Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
1913 * configure.in [INSTALL]: Revert change of March 25. autoconf
1916 Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
1918 * join.c (prline): Remove unused function. Indent.
1920 Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
1922 * tail.c (tail_forever): Don't print headers when asked not to.
1923 From Karsten Thygesen <karthy@kom.auc.dk>.
1925 * wc.c (wc): Optimize for the case when only bytes are being counted
1926 and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
1928 Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
1930 * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
1931 * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
1933 Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
1935 * csplit.c (struct control): Add new field, repeat_forever.
1936 Remove now-unneeded definition of INT_MAX.
1937 (process_regexp): Test repeat_forever instead of comparing `repeat'
1939 (split_file): Don't even reference `repeat' count if repeat_forever
1941 (new_control_record): Initialize repeat_forever field.
1942 (parse_repeat_count): Set it instead of setting repeat count to
1944 (process_line_count): Abort for internal error instead of calling
1947 * long-options.c (parse_long_options): Take a new argument indicating
1948 the utility name (e.g. "join", not "gjoin") for version output.
1949 Print both the utility and the package names, e.g. `join - GNU
1950 textutils-1.9.1' instead of just the package name.
1952 * join.c (main): Call parse_long_options with program name arg.
1953 * sort.c (main): Ditto.
1955 * All source except sort.c and join.c (main): Change --version output
1956 to include utility name as well as package name and version info.
1958 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
1960 * configure.in: Use AC_SET_MAKE.
1961 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
1963 Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
1965 * tr.c (main): In addition to the --help usage pointer, give an
1966 explicit error message for too many arguments.
1968 Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
1970 * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
1971 of explicit echo commands.
1972 [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
1973 `./install.sh', make it `../install.sh' instead since that
1974 script will be invoked only from subdirectories.
1975 [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
1977 * cat.c (cat): The command `:|cat -s' failed on Irix5 because
1978 ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
1979 it returned EINVAL. Detect this.
1980 (main) [lint]: Initialize variables to suppress `used before
1981 initialized' warnings.
1983 * csplit.c: Change long option name from --suffix to --suffix-format.
1985 * od.c (skip): Correct a comment.
1986 (main): Don't output anything to stdout if the sole input file
1987 doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
1989 * od.c (dump) [lint]: Initialize a variable to suppress `used before
1990 initialized' warning.
1991 (main) [lint]: Ditto.
1992 * paste.c (paste_parallel) [lint]: Ditto.
1994 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
1996 * configure.in: Don't set LDFLAGS since linking now uses both
1999 Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
2001 * unexpand.c (unexpand): Don't segfault when given a name of a
2003 * expand.c (expand): Ditto.
2004 Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
2006 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
2008 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
2011 * csplit.c (load_buffer): Rather than incrementing buffer size,
2012 double it each time we fail to find a newline. Otherwise, csplit
2013 would run out of memory when processing files with very long lines.
2015 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
2017 * man/Makefile.in (manprefix): Use binprefix as the default.
2019 Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
2021 * cat.c: Use full_write and safe_read instead of write and read resp.
2027 * sum.c: Use safe_read instead of read.
2031 * tail.c: Replace calls to xwrite with calls to fwrite.
2032 Use fopen/fclose instead of open/close.
2033 (write_header): Use a single call to printf instead of four to xwrite.
2034 Use safe_read instead of read.
2037 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
2039 * install.sh: New file.
2040 Makefile.in [DISTFILES]: Add it.
2042 Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
2044 * memcmp.c: Use the latest version from the GNU C library.
2046 * cut.c [ADD_RANGE_PAIR]: New macro.
2047 (set_fields): Collect the list of all selected ranges before
2048 allocating and initializing the boolean lookup table.
2049 (cut_bytes, cut_fields): Complete rewrite. Avoid copying
2050 into buffer whenever possible. Properly handle input without
2052 (getstr): New function. Copied from getline.c, but with minor changes.
2054 * sort.c (main): Properly handle -Tdir.
2055 Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
2056 Reported by Kristoffer Rose (kris@diku.dk).
2058 * cut.c (main): Give separate errors for `-s without -f'
2059 and `-d without -f'.
2060 (main): Now -d '' means `use the NUL byte as the delimiter'.
2061 Before, it got an error.
2063 Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
2065 * configure.in [test for 8-bit clean memcmp]: Add a test to detect
2066 losing memcmp from SunOS4.1.x. From Robert H. de Vries
2069 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
2071 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
2072 so it goes in config.status. This eliminates unnecessary second run
2075 Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
2077 * configure.in (AC_HAVE_FUNCS): Add isascii.
2078 * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
2079 on AIX PS/2 1.3 systems because isascii is a function and it is used
2080 in definitions (with the necessary side effect of assigning to a
2081 global variable) of the is* macros. Also test HAVE_ISASCII and
2082 redefine ISASCII(c) instead of isascii.
2083 Reported by Minh Tran-Le (tranle@intellicorp.com).
2085 Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
2087 * configure.in: Don't run the test for 8-bit clean memcmp if we
2088 already know we'll be using our replacement.
2090 Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
2094 * tac.c (usage): Fix typo in long usage.
2095 * sort.c (usage): Likewise.
2096 From Philippe.Schnoebelen@imag.fr.
2098 * cut.c [FATAL_ERROR]: New macro.
2099 (main): Call both error and usage (2) through FATAL_ERROR in
2100 many places. Before, only `error (2...' was called.
2101 (invalid_list): Removed. This function is subsumed by FATAL_ERROR.
2103 * cut.c (cut_fields): Properly handle input lacking a terminating
2104 newline. Before, the command `printf "a\tb" |cut -f 1' generated
2107 Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
2109 od.c (usage): Change --backward-compatible to --traditional in
2110 the long usage message.
2112 Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
2116 Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
2118 * cut.c (cut_fields): Revert July 27 change. Instead, strip off
2119 trailing delimiter unless given a range of fields like `3-' that
2120 extends to end of line.
2121 (set_fields): Moved local `eol_range_start' to file-scope.
2122 Reported by Arne H. Juul (arnej@solan.unit.no).
2124 Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
2126 * fold.c (fold_file): Don't get stuck in an endless loop when
2127 width is smaller than 8 and there are TABs in the input.
2129 Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
2131 * join.c: Remove now-unused dcls of show_help and show_version.
2133 Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
2135 * csplit.c [INT_MAX]: Make sure it's defined.
2136 [not HAVE_LIMITS_H]: Don't include limits.h.
2137 From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
2139 Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
2143 Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
2145 * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
2146 From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
2148 * sort.c (main): Handle --help and --version options.
2149 * Makefile.in (sort.o): Depend on long-options.h.
2151 Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
2153 * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
2154 split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
2155 `--longopt=arg' syntax in --help message rather than `--longopt arg'.
2156 From Francois Pinard.
2158 * tail.c: Don't include <signal.h>. It hasn't been necessary
2159 since the Dec 12, 1992 change.
2161 * join.c (main): Accept `-v 1' again. Adding the --version
2162 long option had broken it, although -v1 still worked. Call
2163 parse_long_options instead of adding "help" and "version"
2164 to join's longopt strct.
2165 * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
2167 * (join): Depend on and link with long-options.o.
2168 * (join.o): Depend on long-options.h.
2170 * od.c: Change --compatible (-C) to --backward-compatible (-B).
2172 * csplit.c: Change --abandon-null-files to --elide-empty-files.
2174 Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
2176 * tr.c (get_next, string2_extend): Add default: label to switch stmt.
2178 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
2179 join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
2180 tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
2181 Exit successfully for --help, non-zero for usage error.
2182 From Francois Pinard.
2184 * configure.in: Add AC_STAT_MACROS_BROKEN.
2185 * system.h [AC_STAT_MACROS_BROKEN]: Test it.
2187 Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
2189 * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
2190 <config.h> or "config.h".
2191 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
2192 join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
2193 tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
2195 * configure.in: Use AC_CONFIG_HEADER.
2196 * Makefile.in [DIST]: Add config.h.in.
2198 * Makefile.in: Convert so make may be run from subdirectories.
2199 Add dependencies on config.h.
2200 * src/Makefile.in: Ditto.
2201 * lib/Makefile.in: Ditto.
2202 * man/Makefile.in: Ditto.
2204 Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
2206 * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
2207 In the 64-bit assignment, be careful to cast the shift operand to
2209 Abort if sizeof (unsigned long) > 8.
2211 Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
2213 * csplit.c: Allow repeat counts to be specified via `{*}'.
2214 New option --suffix=format. Supercedes --digits option.
2215 New option --abandon-null-files.
2216 From Ronald F. Guilmette (rfg@netcom.com).
2218 * csplit.1: Updated.
2219 From Ronald F. Guilmette.
2221 * csplit.c: Remove register keyword (replace with `int' in two cases).
2223 * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
2224 (bytes_to_octal_digits): New static array.
2225 (get_format_flags): Combine '+' and ' ' cases of switch stmt.
2226 Return count if for loop terminates.
2227 (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
2228 (get_format_prec): Make sure is_negative is defined before used.
2229 (get_format_conv_type): Give a different error message if there
2230 is no conversion specifier.
2231 Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
2232 (max_out): Use `%%' rather than `%' in format string.
2234 Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
2236 * pr.c (main): When argc == 1, don't try to xmalloc (0).
2238 Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
2240 * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
2243 Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
2245 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
2247 Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
2249 * src/*.c: Print version on standard output, not stderr.
2251 * configure.in: Add AC_LONG_64_BITS.
2252 * memchr.c: Use #ifdef LONG_64_BITS instead of
2253 `if (sizeof(longword) > 4)'.
2255 Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
2257 * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
2258 always handle devices. Ignore errno == EINVAL and errno == ENODEV.
2259 `cat -v /dev/null' was failing on many systems.
2261 * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
2262 `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
2263 From William Dowling <will@franklin.com>.
2265 Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
2269 * memchr.c: De-ansify the fixed version from glibc.
2270 It is supposed to work on systems with 64-bit long ints.
2272 Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
2276 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
2280 Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
2282 * pr.c (cols_ready_to_print): New function. It replaces a global
2283 variable by the same name and computes on the fly the value that
2284 was supposed to be maintained through that variable. This should
2285 put to rest the `pr -2a' bug.
2286 (main): Don't let getopt_long reorder arguments so we can
2287 distinguish between `pr -1 -2' and `pr -12'. Rework handling of
2290 * fold.c: Declare xmalloc.
2292 Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
2294 * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
2296 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
2298 * mkinstalldirs: New file.
2299 * Makefile.in (installdirs): Use it to create installation directories.
2301 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
2303 * all source: With --version, print version and exit immediately.
2305 Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
2307 * Makefile.in (installdirs): New rules for creating installation
2308 directories. (install): depend on it.
2310 * tail.c (main): Remove --compatible since `+1f' may be used
2311 to get the BSD `-0f' behavior portably.
2313 * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
2314 From Ian Lance Taylor (ian@cygnus.com).
2316 Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
2318 * tail.c (main): New option -C, --compatible to make `tail -0f'
2319 work like `tail +1f' for compatibility with BSD tail.
2321 Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
2323 * pr.c (print_page): Decrement cols_ready_to_print even when
2324 lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
2325 terminate. Add parentheses for clarity.
2327 Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
2331 * od.c (main): Remove set-but-not-used variable, `usage_error'.
2333 * split.c (main): Call usage with an argument.
2335 Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
2337 * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
2338 for 8-bit clean memcmp.
2340 * cat.c (usage, main): Remove unused argument.
2342 * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
2343 (check_for_offset): Remove unused argument `argnum.'
2345 * configure.in: Add AC_SIZE_T.
2347 Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
2349 * uniq.c (main): Interpret non-option arguments with a leading `+'
2350 only if we haven't seen `--'.
2352 * tr.c (main): Change variable name to avoid shadowed dcl.
2353 * wc.c (write_counts): Ditto.
2355 * sum.1: Make documentation agree with the code.
2357 * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
2359 Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
2361 * configure.in [AC_HAVE_HEADERS]: Add limits.h.
2363 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
2365 * od.c (parse_old_offset): Don't use prototype in function
2366 definition. Remove unnecessary conjunct from test for hexadecimal
2369 * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
2370 for long double support; there are compilers (Stardent Vistra svr4)
2371 without long double but still define __STDC__.
2373 Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
2375 * src/*.c and man/*.c except for sort: Add --help and --version
2378 * pr.c: Convert to use getopt_long.
2380 * lib/memcmp.c: Use version from glibc.
2381 [WORDS_BIGENDIAN]: Test this instead of the using glibc's
2383 * configure.in: Use AC_WORDS_BIGENDIAN to set it.
2385 * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
2388 * Makefile.in (dist): Depend on Makefile so that changes to
2389 Makefile.in (like adding new files to DISTRIB) are reflected
2390 in the new distribution.
2392 Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
2394 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
2395 other options so users can use them to override DEFS.
2396 * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
2398 * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
2399 configure's AC_SUBST will set these.
2401 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
2402 [targets that cd then run make in subdirectories]: Don't depend
2403 on `cd ..'; use a subshell instead.
2405 * Makefile.in [info, install-info, dvi, check, installcheck]:
2406 New targets but no rules; comply with standards.
2408 * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
2409 hasn't specified CFLAGS.
2410 [LDFLAGS]: Substitute into Makefile.
2412 Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
2414 * od.c: New option --compatible, -C.
2415 (parse_old_offset): New function.
2416 * od.1: Document new option.
2418 Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
2420 * cut.c, expand.c, join.c, nl.c: Always call error with errno
2421 (not zero) after failed fclose or non-zero ferror.
2423 Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
2425 * configure.in: Add check for working memcmp; use GNU's if
2426 the system's doesn't grok the 8th bit.
2427 * memcmp.c: Fix it so it groks the 8th bit.
2428 TODO: We really need to provide a fast memcmp, since most
2429 machines will have a broken memcmp. Probably should get
2431 * sort.c (mergefps): Maintain keybeg and keylim when copying
2432 the current line to `saved'.
2433 (numcompare): Skip white space here since -n no longer implies -b.
2434 (getmonth): Skip white space here since -M no longer implies -b.
2435 (compare): Completely overhauled to make the 8th bit work right,
2436 also to properly handle the global reverse option.
2437 (set_ordering): -n no longer implies -b, according to Posix.
2438 For consistency, -M also no longer implies -b.
2439 (main): Correct treatment of -r and global keys.
2440 (findlines): Clear keybeg and keylim if no keys are used.
2441 (sort): Avoid overwriting tempfiles[] array bounds.
2443 Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
2445 * pr.c (close_file): Reverse May 13, '92 change, but add the condition
2446 that cols_ready_to_print not be decremented when printing across.
2447 The command `echo |pr -2ta' didn't terminate.
2448 (print_page): Rewrite conditional (that had side effects in second
2449 conjunct) using nested if statements to make it clear that we do
2450 indeed want those semantics.
2452 Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2456 * system.h: Try BBSIZE if BSIZE isn't defined.
2457 From Tony Robinson <ajr@eng.cam.ac.uk>.
2459 Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2461 * tail.c (tail_forever): Use an array of file descriptors
2462 instead of forking processes.
2463 (dump_remainder): Return number of bytes read.
2464 (tail_file): Fill in the new array.
2465 From Ian Lance Taylor.
2467 Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2469 * system.h: Only define index, bcmp, etc. if not already defined.
2471 Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
2473 * tr.c (is_char_class_member): Remove unreached return after abort.
2475 Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
2477 * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
2478 sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
2479 of <ctype.h> and definitions of is* ctype macros to system.h.
2480 Change a few more uses of is* ctype macros to (protected) upper
2483 * system.h: Add isascii-protected ctype IS* macros.
2485 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
2487 * all files using getopt.h: Convert static declarations of
2488 struct option to use new macros from getopt.h: no_argument,
2489 required_argument, and optional_argument.
2491 Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
2493 * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
2495 * tr.c (main): Close stdin and stdout and check return status.
2497 Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2499 * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
2502 Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
2504 * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
2505 use isascii if it is defined.
2506 (is_char_class_member, make_printable_char, make_printable_str,
2507 non_neg_strtol): Use new macros instead of lower case ones
2510 * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
2511 macros like pr.c. Suggested by David J. MacKenzie.
2513 * od.c (print_ascii, dump_strings): Check for isascii before isprint.
2514 (dump_strings): Free malloc'd buffer before returning.
2515 (skip): Return non-zero if an error occurred, zero otherwise.
2516 Exit only if asked to skip beyond end of combined input.
2517 (check_and_close): New function.
2518 (skip, read_block, read_char): Call check_and_close when done
2519 processing the file associated with in_stream.
2520 (skip, read_block, read_char): Set have_read_stdin.
2521 (main): Close stdin (if it was ever read) and check for errors
2522 just before exiting.
2523 (write_block, dump_strings, dump): Don't test return value from
2524 functions that operate on streams. Rely on later ferror tests.
2526 Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2528 * sort.c (main, usage): Add -T option.
2530 Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2532 * tail.c (tail_forever, sigusr1, kill_kids): New functions to
2533 do -f on multiple files.
2534 (main): Call tail_forever.
2535 From Ian Lance Taylor.
2537 Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2539 * cut.c (cut_fields): Add cast.
2541 * od.c (decode_one_format): Remove '#' from pre_fmt_string;
2542 many systems don't support it.
2543 Conditionalize long double support on __STDC__, not __GNUC__.
2544 From Ian Lance Taylor.
2546 Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
2548 * sort.c (numcompare, keycompare): Add parentheses suggested
2549 by gcc -Wall. Put braces around individual monthtab initializers.
2551 * cksum.c: Declare error. Make checksum table `const.'
2553 * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
2555 * split.c (main): Add `default: abort();' to enumeration switch.
2557 * All files: Make all functions and extern variables static.
2558 Make all longopts arrays const as well as static.
2559 Make a couple statically initialized aggregates `const.'
2561 Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2563 * od.c (main): Make old-style format options accumulate.
2566 Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2568 * tr.c (look_up_char_class): Add cast.
2570 * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
2571 Add `const' to variable receiving value from re_compile_pattern.
2573 * wc.c (wc): If doing only -c, use st_size for regular files.
2575 * fold.c (fold_file): Was folding 1 column too early.
2576 From Eric Backus <ericb@lsid.hp.com>.
2578 * memset.c: New file.
2580 Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2582 * cksum.c: New file.
2584 Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2586 * tac.c (tac_stdin): Handle SIGPIPE.
2587 * sort.c (main): Handle SIGTERM.
2591 * system.h [USG || STDC_HEADERS]: Define bcmp.
2593 Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2595 * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
2597 Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2599 * paste.c (main): Don't write on a string constant.
2601 Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
2603 * tr.c: Minor cleanup. Replaced some assert(0) with abort().
2605 Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2607 * cmp.c, cmp.1: Move to diff distribution.
2609 Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2611 * system.h: Change FOO_MISSING to HAVE_FOO.
2613 Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2615 * pr.c (COLUMN): Add structure member to remember filename.
2616 (main, init_fps, open_file, close_file): Use it.
2618 (close_file): Don't decrement cols_ready_to_print when closing
2619 a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
2621 Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2623 * cmp.c: --show-chars -> --print-chars.
2625 * pr.c: Rename some variables.
2627 Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2629 * system.h: Define DEV_BSIZE if not defined.
2631 Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2633 * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
2635 Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2637 * sort.c (main): Don't stop processing args when we hit "-";
2638 treat it like a regular filename.
2639 From ian@airs.com (Ian Lance Taylor).
2641 * pr.c (print_page): Fix off by one line count when ^L is in input.
2642 From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
2644 Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
2646 * tr.c (validate): Change error message so it doesn't mention
2647 actual name of --truncate-set1 option. From David MacKenzie.
2649 Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
2651 * tr.c (string2_extend, validate): Give an error message when
2652 translating without --truncate-set1, with empty string2, and
2653 with non-empty string1. "tr 1 ''" produced a failed assertion.
2655 Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2657 * system.h: Change how ST_BLKSIZE is calculated to allow for
2658 non-POSIX systems that don't define BSIZE in sys/param.h.
2660 Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2662 * sum.c (main, bsd_sum_file): Don't print filename if BSD
2663 algorithm is used and only one file was given.
2665 Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
2667 * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
2668 with starting character equal to ending character. This is
2669 contrary to the POSIX spec, but what is already implemented
2670 in find_closing_delim.
2672 Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2676 * sort.c (numcompare, checkfp): Add parens to placate gcc2.
2678 * sort.c (mergefps): For -u, output the first, not last, of
2679 the lines that compare equal. From Mike Haertel.
2681 Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2683 * tr.c: Remove initial capitals and periods from error messages.
2685 Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2687 * sum.c (main): Add -r option for SYSV compat.
2689 Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2691 * sort.c (compare): If -s given, leave lines in their original order.
2692 (main): Recognize -s.
2693 (usage): Document -s.
2696 Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
2698 * sort.c (sort): Check for complete parsing of buffer into
2699 lines before nixing temp files.
2701 Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2703 * sum.c (sysv_sum_file): Use %lu instead of %u to print a
2704 long. Not that it matters for GNU . . .
2706 * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
2707 (append_normal_char, append_range, append_char_class,
2708 append_repeated_char, append_equiv_class, spec_init):
2709 Initialize `next' field of new `struct List_element'.
2710 From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
2712 Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
2714 * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
2716 Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2720 * nl.c: Support multiple files and "-" for stdin.
2721 (main): Check for read and write errors.
2722 (nl_file): New function.
2724 Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2726 * tr.c (main): -t option was called -b in getopt spec.
2727 (validate): Don't warn that set1 is longer than set2.
2729 * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
2731 Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2733 * nl.c: New program from bin-src.
2735 * nl.c (main): Use a struct linebuffer for line_buf.
2736 (process_file): Use readline instead of fgets, to preserve NULs.
2737 (check_section): Use memcmp instead of strncmp.
2738 (proc_text): Print line_buf with fwrite instead of printf.
2740 * nl.c (main): Usage message if too many args given. Check
2741 for error in closing input file. Lengths of section delimiter
2742 strings were 1 too large. Take separator_str into account in
2743 length of print_no_line_fmt.
2744 (build_print_fmt): Allocate space for print_fmt, in case
2745 separator_str is long.
2746 (proc_text): A blank line is one that contains nothing, not
2747 even nonprinting characters.
2749 Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2751 * All programs: Document `--' instead of `+' to introduce
2752 long-named options, in usage messages.
2754 * sum.c (bsd_sum_file): Renamed from sum_file.
2755 (sysv_sum_file): New function.
2756 (main): Recognize an option to select between the algorithms.
2758 Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
2760 * pr.c (close_file, print_page): Fixed bug that had the command
2761 yes |head |pr -t printing "yyyyyyyyyy".
2762 * (print_page): Fixed bug that had pr -3 -a printing two too few
2763 trailer lines per page.
2764 * (main): Added restriction that -a and -m are incompatible.
2765 Although the POSIX spec doesn't explicitly say they shouldn't
2766 be used together, it says -a modifies the -column option and
2767 that -column shouldn't be used with -m.
2769 Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
2771 * nl.c: Include regex.h after, not before, sys/types.h.
2773 Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
2775 * sort.c (fillbuf) return bytes buffered instead of bytes read.
2777 Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
2779 * sort.c (LINEALLOC): New #define.
2780 (struct lines): New field ``limit''.
2781 (initlines): Set it from new arg ``limit''.
2782 (sort, mergefps, checkfp): Pass new arg to initlines().
2783 (findlines): Don't realloc past lines->limit.
2785 Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2787 * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
2788 HAVE_UNISTD_H and _POSIX_VERSION.
2790 * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
2792 Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
2794 * tr.c: Fixed an inaccurate comment on posix_pedantic.
2796 Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
2798 * tr.c: Changed underscores to hyphens in long option name
2799 "sysv_string2_truncate".
2801 Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2803 * tac.c (main): Set obscure_syntax to tell re_search to
2804 allocate memory for the group registers.
2806 Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2808 * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
2809 signal, which POSIX doesn't have.
2810 * sort.c: Replace inthandler and huphandler with sighandler.
2811 * csplit.c (main): Only handle signals if they were not being
2814 * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
2816 Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
2818 * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
2819 * tr.c (squeeze_filter): Comment a little on why it's better
2820 to step through the input by two.
2821 * tr.c (set_initialize): Write a comment describing the function.
2822 * tr.c: Eliminated the variable `portability_warnings' and replaced
2823 references to it by references to `!posix_pedantic'. One of the
2824 uses of portability_warnings had been wrong.
2826 Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2828 * tr.c: New program.
2830 Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2832 * linebuffer.[ch] (freebuffer): New function (used by cron).
2834 Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2836 * system.h, configure, Makefile.in: Don't include memory.h if
2837 STDC_HEADERS, removing need for MEMORY_H_MISSING.
2839 Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
2841 * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
2842 Somehow, part of my patch didn't make it last time.
2844 Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2846 * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
2848 * cmp.c (cmp): Print EOF message to stderr, not stdout, for
2851 * sort.c (xfwrite): fwrite never returns < 0, so check if
2852 number written is number we asked to write.
2853 (fillbuf, main): fread never returns < 0, so check ferror instead.
2856 Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
2858 * pr.c (print_page): Really fixed `extra newline at EOF' problem.
2859 * (store_columns): Fixed bug that caused `pr -b -2' to coredump
2860 on files of certain lengths.
2862 Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
2864 * pr.c (print_page): Fixed to not add single spurious newline
2865 at EOF when using -t.
2867 Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
2869 * pr.c (print_page): Don't pad the page if -t given.
2871 * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
2873 Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2877 * configure, system.h: Include memory.h if it works.
2879 * split.c: Allow `b' unit as well as `k' and `m'.
2881 * head.c, tail.c: Replace -b +blocks option with specifying
2882 units (b, k, or m) after the number.
2883 (parse_unit): New function.
2885 * fold.c (main): Check that -w arg is a number.
2887 * cut.c: +delimiter takes an arg.
2889 Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2891 * pr.c (close_file): Don't close an already closed file.
2893 Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2895 * memchr.c: New file.
2896 * configure: Check if it's needed.
2898 * csplit.c, gcsplit.1: New program.
2900 * pr.c (cleanup): Only free buffers if they were allocated.
2902 * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
2904 Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
2906 * pr.c: The following 3 bugs appeared (at least) when printing
2907 a single file with the options `-3 -f'.
2908 * (print_white_space): Single spaces were being replaced
2910 * (print_page): Some lines were getting too much white space
2911 at the beginning because spaces_not_printed wasn't being reset
2913 * (read_line): The single space between a truncated column
2914 on its left and the column on its right was omitted. Fixed
2915 so that previous value of input_position is restored before
2918 Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2920 * configure: Only remove /etc from PATH when it's not part of
2923 Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
2925 * linebuffer.c (readline): Fix incorrect recalculation of `end'.
2927 * head.c, tail.c: Replace `mode' variables and bitmasks with
2928 separate variables for each option.
2930 Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
2932 * wc.c: New program.
2934 Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
2936 * fold.c (fold_file): Read in an int, not a char, for EOF
2939 * configure: Check whether st_blksize is missing.
2941 * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
2942 defined, instead of /tmp.
2944 Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2946 * xwrite.c [POSIX]: unistd.h might require sys/types.h.
2948 Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2950 * paste.c (main): Consider -d "" to be like -d "\0",
2951 for POSIX (if I read it right).
2953 * sort.c, join.c: New programs.
2955 * cut.c (set_field): Allow blanks as well as commas to
2956 separate numbers in ranges.
2958 Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
2960 * pr.c: Failure to open an input file is no longer a fatal error.
2961 A message is printed for each failed open. When printing
2962 in parallel, each failed open results in one fewer output column.
2963 Added POSIX -r option to suppress the message.
2964 * pr.c: Added variables: failed_opens, ignore_failed_opens.
2965 These changes were based in part on work by David MacKenzie.
2967 Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
2969 * pr.c: Complain if user gives both -m and -[0-9]+ options.
2971 Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
2975 Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2977 * expand.c: Rename some variables.
2978 (expand): Don't access value off end of array.
2979 * unexpand.c: Rename some variables.
2980 (unexpand): Don't access value off end of array.
2981 Instead of copying tabs verbatim and flushing pending spaces
2982 when one is reached, count them as the proper number of
2983 pending spaces. Instead of changing tabs to single spaces if
2984 the tabstop list is exhausted, print the rest of the line
2985 unchanged (for POSIX).
2987 Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2989 * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
2990 Clear EOF and error conditions on stdin so it can be reused.
2992 * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
2993 as commas to separate tabstops, for POSIX.
2994 * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
2995 the output; send it directly to stdout.
2996 * unexpand.c (main): Make -t stupidly imply -a for POSIX.
2997 (unexpand): If a tab stop list was given and we move past its end,
2998 copy the rest of the line verbatim.
3000 * split.c (convint): New function to allow 'm' and 'k' after
3002 (main): Use it. Change -c option to -b for POSIX.
3004 Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3006 * pr.c: Protect isdigit with isascii, if required.
3008 Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
3010 Most of the following is from Paul Eggert:
3011 * cat.c (main): If stdin is read, check close at end.
3012 * cmp.c (main): Check for stdin being closed.
3013 Check for close errors on stdin and stdout.
3014 (cmp): Return a value instead of exiting.
3015 * cut.c (cut_file): New function, from code in main.
3016 Check for read errors.
3017 (main): Check for close errors.
3018 * expand.c, unexpand.c (main): Check for close errors.
3019 (next_file): Go to next file if one can't be opened.
3020 Check for close errors.
3021 * head.c (main), tail.c (main): If stdin was read, check for
3023 * head.c (head_file), tail.c (tail_file): Check for close errors.
3024 * paste.c (main, paste_parallel, paste_serial), tac.c (main):
3025 Check for close errors. Close stdin if it was read.
3026 * split.c (main): Check for close errors.
3028 * configure, Makefile.in's: Support +srcdir option.
3029 Make config.status. Fix up clean targets.
3031 Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
3033 * linebuffer.h (struct linebuffer): Add a field to indicate
3034 the number of valid chars in the line.
3035 * linebuffer.c (initbuffer, readline): Fill it in.
3036 * uniq.c, comm.c: Use it.
3038 * pr.c (main): Check stdin and stdout fclose for errors.
3039 (init_parameters): If there's no room for header and footer,
3040 omit them rather than dying (for POSIX).
3041 (init_header): Take a file descriptor as additional arg.
3042 (init_fps): Change callers. Note when stdin is read.
3043 (open_file): For filename "-" use stdin.
3044 (close_file): Don't close stdin. Check close for errors.
3045 (print_char, char_to_clump): Use isprint instead of explicit
3048 * memcmp.c: New file (needed for comm).
3049 * bcopy.c: New file (needed for fold).
3050 * system.h: Don't define bcopy as memcpy.
3051 * configure: Check for bcopy and memcmp.
3053 * uniq.c (main): Use "-" instead of NULL to mean stdin or
3055 (check_file): Use "-" instead of NULL to mean stdin or stdout.
3056 Check readline return instead of for NUL character to
3058 Check fclose for errors.
3059 (find_field): Use linebuffer length, not NULs, to detect end
3061 (different): New function, replaces compare. Uses memcmp
3063 (writeline): Use fwrite instead of fputs so NULs are preserved.
3065 * comm.c (compare_files): Return an error indication.
3066 Don't take a filename of NULL to mean stdin.
3067 Use memcmp instead of strcmp to allow for NULs.
3068 Check fclose for errors.
3069 (writeline): Use fwrite instead of fputs so NULs are preserved.
3071 * sum.c (sum_file): Take an arg indicating whether to print
3072 the filename, and don't take NULL meaning stdin. Set a flag
3073 when we read stdin. Check fclose return for errors.
3074 (main): If stdin was read, check fclose return for errors.
3075 Use filename of "-" if no args given.
3077 Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3079 * fold.c: Rewritten from scratch for POSIX.
3081 Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3083 * split.c (line_bytes_split): Use xmalloc instead of alloca.
3084 * system.h: Don't declare alloca.
3086 * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
3087 * system.h: Define SEEK_ macros if not defined.
3089 * pr.c: Rename variable `truncate' to avoid library function conflict.
3091 Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3093 * linebuffer.c, linebuffer.h: New files.
3094 * comm.c, uniq.c (initbuffer, readline): Functions
3095 removed (use versions in linebuffer.c).
3097 Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
3099 * sum.c (sumfile): Always print 5 digits for second number, too.
3100 Interpret "-" to mean stdin.
3102 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
3104 * uniq.c: Use isblank instead of isspace, to support POSIX.2.
3105 * comm.c, pr.c, uniq.c (concat, fatal, error,
3106 pfatal_with_name, xmalloc, xrealloc): Functions removed.
3108 Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3110 * nl.c: Add long-named options. Doc fixes.
3112 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3114 * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
3116 * xwrite.c [POSIX]: Include unistd.h.
3117 [STDC_HEADERS]: Don't declare errno.
3119 Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3121 * uniq.c: Add long-named options. Remove marginally useful -z
3122 option (zero padded repeat counts).
3124 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3126 * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
3127 (cwrite), head.c (head_file), cat.c (main): Check close return
3128 value for delayed error report due to NFS.
3130 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3132 * cat.c: Replace "uchar" with "unsigned char", to avoid
3133 problems with various systems' typedefs.
3135 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
3137 * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
3138 operation is unsupported, for HP-UX 7.0.
3140 Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
3142 * sum.c: Always print five digits for first number.
3144 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
3146 * cat.c, cmp.c: Don't use fileno(); not needed.
3148 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
3150 * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
3152 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
3154 * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
3156 (enlarge_line): Adjust inbufp and outbufp.
3158 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3160 * cat.c: Declare free returning void, not int, so it
3161 doesn't bomb on Xenix.
3163 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
3165 * tac.c: Print error messages before calling cleanup, not after.
3167 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3169 * tac.c (cleanup): Return SIGTYPE, not int.
3171 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
3173 * cut.c (main, usage): Add -b and -n options for POSIX.
3174 (set_fields): Don't allow SPC or TAB as number separators.
3176 * paste.c (paste_parallel): If open of any file fails, quit
3179 Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
3181 * pr.c: Add POSIX -F option (same as -f).
3183 * uniq.c (check_file): Allow '-' to mean stdin or stdout.
3185 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3187 * head.c, tail.c: Change `chars' to `bytes' globally.
3188 (main, usage): Use POSIX.2 draft 10 option syntax.
3190 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3192 * cat.c (main): Don't delay error messages, so they appear
3194 (main, simple_cat, cat): Make errors in input files nonfatal.
3196 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3198 * cat.c: Remove -c option added for POSIX draft 9, since POSIX
3199 draft 10 removed it.
3201 * tac.c (tac_stdin): Use fstat instead of lseek to determine
3202 whether stdin is seekable, because lseek silently fails on
3203 some special files, like tty's.
3204 tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
3205 don't turn off -f for non-regular files (assume the user knows
3206 what he's doing; it might work for fifo's and sockets).
3208 * paste.c (main): If no files given, use stdin.
3209 Don't let collapse_escapes write on string constant (delim default).
3210 (paste_parallel): Don't close stdin.
3212 * cut.c (main): Use standard input for filename of "-".
3214 * comm.c (compare_files): Allow '-' to mean stdin.
3216 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3218 * cut.c (enlarge_line): Take an arg giving the required amount
3219 of space. Change callers.
3220 (main): Don't allow -t'<TAB>' without -f.
3221 Make `delim' unsigned to fix sign extension problem in comparison.
3223 Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
3225 * pr.c Deleted excess whitespace from ends of lines.
3226 Modified to work with current version of getopt, which
3227 returns 1 instead of 0 for non-options.
3228 Reversed the meaning of the -f option, to be compatable
3231 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
3233 * cmp.c (main, usage): Rename -L option to -c and don't have
3235 (printc): Take an arg to specify number of chars to pad to,
3236 for column alignment.
3237 (cmp): Respect flag_print_chars in default output format.
3238 Align columns for cmp -cl.
3240 Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
3242 * cmp.c: For +show-chars, have getopt return 'L' so
3243 `flag_print_chars' gets set.
3245 Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
3247 * tac.c (main): Initialize fastmap and translate fields of
3248 regex before compiling it.
3250 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3252 * tac.c: Change +regexp to +regex for consistency with GNU find.
3254 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3256 * cat.c (cat): If FIONREAD is available, only use it if it is
3257 supported by the filesystem that the file is on.
3259 Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3261 * cat.c (main): Add a variable to control whether the check
3262 for input file == output file is made, because no values of
3263 st_dev and st_ino should be assumed to be available for this
3264 purpose. Only do the check for regular files.
3266 * tac.c: Use bcopy instead of memcpy.
3268 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
3270 * head.c: Use longs instead of ints for file offsets, for 16
3273 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3275 * cmp.c: Change some ints to longs for 16 bit machines.
3276 (bcmp_cnt): Make char-pointer counting slightly simpler.
3278 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3280 * cat.c (main): Allow input file to be output file for devices
3281 (ttys, etc.). Check whether input file is output file when
3282 reading standard input. Print any error messages for standard
3285 * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
3286 machines as well as 32 bit ones.
3287 * cmp.c, tail.c: Use longs instead of ints for file offsets.
3289 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3291 * cmp.c: Fix some exit statuses for POSIX.
3293 Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
3295 * tac.c: Use regular expressions as the record boundaries.
3296 Give better error messages.
3297 Reformat code and make it more readable.
3298 (main): Use getopt_long to parse options.
3299 (tac_stdin): Do not make a temporary file if standard input
3301 (tac_file): New function.
3302 (tac): Take an open file desc as an arg.
3303 (output): Rewrite to use its own efficient buffering.
3304 (xmalloc, xrealloc, xwrite): New functions.
3306 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3308 * head.c, tail.c: Use `error' instead of `fatal_perror' and
3309 `nonfatal_perror'. Remove some unnecessary info from messages.
3311 Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3313 * comm.c (main): Pass the list of files to compare_files as a
3314 char ** instead of a char *.
3315 (compare_files): Make arg a char **.
3317 * uniq.c: Declare some functions as void.
3318 Change global vars `countmode' and `mode' from ints to enums.
3319 (main): Use getopt to parse options and support POSIX options.
3320 Don't use integer_arg to parse numbers, since `-#' can't be
3321 parsed that way using getopt.
3322 (find_field): Use isspace for finding fields boundaries.
3324 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3326 * comm.c (main): Call usage if given bad option or wrong
3327 number of args. Exit with 0 status normally.
3328 (usage): New function.
3329 Declare some other functions as void.
3331 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
3333 * cmp.c (main, cmp, usage): Replace -q +quick option with -L
3334 +show-chars option to add ASCII representation of bytes to -l format.
3336 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
3338 * cmp.c (cmp): Change EOF message for POSIX compatibility.
3339 For -l format, clear bits > FF.
3341 Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3343 * tail.c: Move global `errors' into main instead of having
3344 nonfatal_perror set it.
3345 (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
3346 Return an error status.
3347 (file_lines, start_chars, start_lines): Reverse the meaning of
3349 (tail_lines, tail_chars): Account for that reversal.
3351 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3353 * head.c: Move global `errors' into main and have the various
3354 functions return an error status instead of setting it in
3357 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
3359 * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
3360 options specified), to compare the two blocks and count
3361 newlines simultaneously.
3362 * cmp.c New function: bcmp_cnt.
3364 * cmp.c (main): Test if output is redirected to /dev/null, and
3365 assume `-s' if this is so.
3367 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3369 * cat.c: Change `argbad' from a char to a short, so it will
3370 work on machines with unsigned chars.
3372 Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3374 * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
3375 Remove unneccessary variable `c1'. If -l was given, increase
3376 `char_number' by the number of bytes read, after producing output,
3377 rather than by the offset of the first differing bytes, before
3379 Replace if-else-if constructions with case statements for clarity.
3380 (bcmp2): Rename `n' to `nread'.
3382 Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
3384 * nl.c (proc_text): Use re_search instead of re_match.
3386 Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
3388 * nl.c: Indent. Un-nest statements. Use GNU regexp functions
3389 instead of System V ones. Move function declarations together.
3390 (quit): Remove useless function.
3391 (program_name): New variable for error messages.
3392 (main): Use perror in error message.
3393 (xmalloc): New function to replace myalloc.
3394 (myalloc): Function removed.
3395 Global: use program_name and xmalloc.
3397 Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
3399 * uniq.c: Declare some functions.
3400 (main): Initialize infile and outfile. Call usage if given
3401 invalid args. Normally exit with 0 status instead of garbage.
3402 (usage): New function to print usage message and exit.
3403 (check_file): Remove unused variable.
3404 (readline): Compare against EOF, not < 0.
3405 (xmalloc, xrealloc): Return char *, not int.
3406 Ok to return 0 if 0 bytes requested.
3407 (lb1, lb2): Remove unused global vars.
3408 (concat): Remove unused function.
3410 Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
3412 * comm.c: Remove unused global variables lb1, lb2.
3413 (main): Remove unneeded variable.
3414 (compare_files): Remove unused arg.
3415 (readline): un-nest assignment. Test against EOF instead of < 0.
3416 (error): Print to stderr, not stdout.
3417 (xmalloc, xrealloc): Return char * instead of int.
3418 Returning 0 is ok if 0 bytes requested (ANSI C).
3424 version-control: never