1 Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
3 * sort.c (write_bytes): Renamed from xfwrite.
4 Remove SIZE parameter. It was always 1. Update all callers.
5 Rename NELEM parameter to N_BYTES and change its type to size_t.
7 Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
9 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
10 fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
11 split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
12 Initialize for internationalized message support: call setlocale,
13 bindtextdomain, and textdomain.
14 * system.h: Add definitions and includes for NLS.
15 * Makefile.am (SUBDIRS): Add intl and po.
16 * src/Makefile.am (datadir): Define.
18 (DEFS): Add LOCALEDIR definition.
19 (LDADD): Add @INTLLIBS@.
20 * aclocal.m4: Add NLS-related macro definitions from
22 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
23 HAVE_STPCPY): New macros.
24 Add PACKAGE and VERSION.
25 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
27 (ALL_LINGUAS): Define.
28 (AC_CHECK_HEADERS): Add float.h.
29 (ud_GNU_GETTEXT): Use it.
31 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
35 * tr.c (star_digits_closebracket): Declare formal param, IDX,
36 and local I to be of type size_t (rather than int) to avoid
37 warnings from gcc -Wall.
39 Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
41 * src/Makefile.am: Adapt for automake-0.30.
42 (noinst_HEADERS): Rename from HEADERS.
43 (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
44 to DEFS automatically.
45 * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
47 Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
49 * join.c (xfields) [without -t]: Ignore leading blanks.
50 From David Dyck (dcd@tc.fluke.COM).
52 Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
54 * join.c [TOLOWER]: Define.
55 (usage): Briefly describe new --ignore-case (-i) option.
56 (memcasecmp): New function.
57 (main): Set IGNORE_CASE for -i.
58 (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
59 Suggestion and an initial patch from Alberto Accomazzi
60 <alberto@cfa0.harvard.edu>.
62 Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
64 * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
66 (main): Set eolchar to 0 for -z.
67 From Mark W. Eichin <eichin@cygnus.com>.
69 Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
71 * join.c (main): Mark two strings for translation.
72 * md5sum.c (md5_check): Mark a string for translation.
75 Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
77 Update for automake-0.29.
78 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
79 * src/Makefile.am: Likewise.
80 * lib/Makefile.am: Likewise.
81 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
82 * man/Makefile.am (man_MANS): Renamed from MANS.
84 * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
86 From Derek Clegg (dclegg@next.com).
88 Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
92 Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
94 * tail.c (dump_remainder): Flush stdout when tailing-forever on
95 multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
97 Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
99 * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
100 not just -Xc. From François Pinard.
102 * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
103 distributed automatically. From Tom Tromey.
105 Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
107 * nl.c: Include rx.h after limit.h (not before) to avoid warning
108 about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
109 its definition. From Kaveh Ghazi.
111 * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
112 works again. Reported by François Pinard and Kaveh Ghazi.
114 * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
115 [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
116 (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
117 mismatch errors from e.g. SunOS's /bin/cc.
118 Reported by Kaveh Ghazi.
120 Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
122 * configure.in (VERSION): Set variable directly rather than from
124 * Makefile.am (DIST_OTHER): Remove VERSION.
125 * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
126 (stamp-v): New target; depend on Makefile.
127 (DISTCLEANFILES): Add stamp-v, version.c.
129 Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
131 * sort.c (keycompare): Rewrite cases handling ignored characters
132 so that they really are ignored. Reported by Carl Johnson
133 <carlj@cjlinux.home.org>.
135 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
137 * configure.in: Touch stamp-h only if config.h is remade.
139 * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
142 Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
144 Use automake to generate Makefile.in files.
145 * Makefile.am: New file.
146 * doc/Makefile.am: New file.
147 * lib/Makefile.am: New file.
148 * man/Makefile.am: New file.
149 * src/Makefile.am: New file.
151 Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
153 * fmt.c (main): Use xstrtol instead of atoi.
155 * fold.c (main): Use xstrtol instead of atoi.
156 (fold_file): Make a couple locals `int', not size_t, and cast
157 fwrite's third parameter to size_t.
159 * nl.c (main): Use xstrtol instead of atoi.
160 Rename misleading --first-page=N option to --starting-line-number=N.
163 * uniq.c (main): Use xstrtol instead of atoi.
165 Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
167 * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
169 Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
171 * aclocal.m4 (ud_WITH_REGEX): New macro.
172 * configure.in: Use it.
173 * rx.c, rx.h: New files.
174 * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
175 (SOURCES, DISTFILES): Add rx.c, rx.h.
176 * acconfig.h (WITH_REGEX): Add it.
177 * csplit.c [!WITH_REGEX]: Include rx.h.
178 * nl.c [!WITH_REGEX]: Likewise.
179 * tac.c [!WITH_REGEX]: Likewise.
180 From Ulrich Drepper and François Pinard.
182 Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
184 * sort.c (main): Diagnose invalid arguments to -k, then fail.
186 * sort.c (numcompare): Properly handle all cases in which signs differ.
189 * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
190 Append `/man1'. Reported by Karl Heuer.
192 * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
194 * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
196 Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
198 * lib/Makefile.in (default): New target.
200 * sort.c (numcompare): Properly order `-' and valid integers;
201 treat `-' as if it were zero. Reported by Ross Alexander
202 <r.alexander@auckland.ac.nz>.
204 * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
205 (.PHONY): Depend on default.
207 Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
209 * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
210 (jm_AUTODEPS): Likewise.
211 (jm_WITH_GNU_MAKE): Likewise.
212 * configure.in (jm_AUTODEPS): Remove.
214 * sort.c (begfield): Replace loop with equivalent if-else.
215 (limfield): Fix bug that made field specs like -k1.5 return a
216 pointer into LINE beyond the first field.
217 Don't try to trim trailing blanks here; it's not
218 possible because we don't know where the field begins.
219 Replace loop with equivalent if-else.
220 (trim_trailing_blanks): New function.
221 (findlines): Call it.
222 (keycompare): Likewise.
223 (main): Don't decrement T2 corresponding to `x' in field
224 specs like -ku.v,w.x.
226 Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
228 * csplit.c [!UINT_MAX]: Define.
231 (string_to_number): Remove function.
232 (check_for_offset): Use xstrtoul instead of string_to_number.
233 (parse_repeat_count): Likewise.
234 (parse_patterns): Likewise.
237 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
239 * Makefile.in (all et. al.): If make was invoked with -k and a
240 sub-make fails, fail after the loop rather than exiting right away.
241 Otherwise, make's -k option could be ineffective.
243 Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
245 * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
247 Update for autoconf-2.5:
248 * src/Makefile.in (libdir): Set to @libdir@.
249 (bindir): Set to @bindir@.
250 * doc/Makefile.in (infodir): Set to @infodir@.
251 * man/Makefile.in (exec_prefix): Remove it.
252 (mandir): Set to @mandir@.
255 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
257 * Makefile.in (default): New default target. Depend on `all' to
258 work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
261 Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
263 * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
265 * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
266 * src/Makefile.in (C_MKDEP): Rename from MKDEP.
267 * lib/Makefile.in (C_MKDEP): Likewise.
268 * mkdep-Makefile (C_MKDEP): Likewise.
271 * csplit.c [__P]: Don't define it here.
272 * pr.c [__P]: Don't define it here.
273 * fmt.c [__P]: Don't define it here.
274 * system.h [__P]: Define it here.
276 * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
277 Revamp, with suggestions from Franc,ois Pinard.
278 (jm_WITH_GNU_MAKE): New macro.
279 (jm_PROG_MKDEP): New macro.
280 * configure.in (jm_PROG_MKDEP): Use it.
281 * src/Makefile.in (MKDEP): Set it.
282 * lib/Makefile.in (MKDEP): Likewise.
283 * mkdep-Makefile: Use MKDEP, not DEP_CC.
284 (DEP_CFLAGS): Remove it.
286 Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
288 * sort.c: Add support for sorting numbers in scientific notation.
290 (struct keyfield): Add field: general_numeric.
291 (usage): Describe -g option.
292 (general_numcompare): New function.
293 (keycompare): Use new comparison function when general_numeric
295 (set_ordering): Honor `g' flag.
296 (main): Initialize and use new field.
297 From Marcus Daniels <marcus@sysc.pdx.edu>.
299 * configure.in (AC_REPLACE_FUNCS): Add strtod.
300 * lib/Makefile.in (SOURCES): Add xstrtod.c.
301 (OBJECTS): Add xstrtod.o.
302 (DISTFILES): Add xstrtod.h.
304 * csplit.c (cleanup): Don't exit.
305 (interrupt_handler): Rewrite to reset default signal handler
306 then repost caught signal.
307 (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
308 process_line_count, process_regexp, create_output_file,
309 close_output_file): Call cleanup_fatal, not cleanup.
310 Add const attribute to lots of parameters.
311 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
314 * tac.c: (cleanup): Don't exit.
315 (cleanup_fatal): New function. Call cleanup, then exit.
316 (sighandler): New function.
317 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
319 (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
321 Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
323 * od.c (skip): Cast fseek's offset argument to `long'.
324 Erik Bennett <bennett@cvo.oneworld.com> reported that this is
325 necessary on BSDI systems. And if offset doesn't fit in a long,
326 then try using lseek instead.
328 * sort.c (xmalloc): Declare static.
329 (xrealloc): Likewise.
331 * tac.c (cleanup): Add signal number parameter.
334 * cat.c (main): Don't die when dev/ino of input and output are
335 the same and the file descriptors correspond to stdin and stdout.
336 This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
337 Otherwise, running `cat << X > $$' would fail with `cat: -: input
338 file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
340 * Makefile.in (DISTFILES): Add @README_ALPHA@.
341 (config.status) Depend on VERSION.
342 * configure.in: Set README_ALPHA if the version number ends in [a-z].
344 Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
346 * fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
348 src/Makefile.in (.c._c): Don't redirect directly to $@.
349 (._c._o, .c._o): Remove temporary src file.
351 Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
354 * configure.in (VERSION): New variable.
355 (PACKAGE): New variable.
357 * Makefile.in (DISTFILES): Add VERSION.
358 (distdir): Use @PACKAGE@-@VERSION@, not distname.
359 Remove all references to distname.
360 * src/Makefile.in (version.c): Generate it.
361 (SOURCES): Remove now-generated version.c.
362 (distclean): Delete version.c.
363 * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
366 * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
367 Remove all references to distname.
369 * split.c: New option: --verbose.
370 (main): Recognize it.
371 (usage): Document it.
372 From Marty Leisner <leisner@sdsp.mc.xerox.com>.
374 Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
376 * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
380 (store_columns): Remove spurious 2nd argument in call to read_line.
381 [__P]: Define. Use it in prototyped forward decls.
383 * csplit.c: Move prototypes after struct declarations.
384 Remove prototypes for xmalloc, xrealloc.
385 Protect prototypes with __P.
386 (new_control_record): Cast arg 1 to realloc.
388 * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
391 Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
393 * csplit.c (close_output_file): Set output_stream to NULL so we
394 don't recurse endlessly between this function and cleanup.
396 * unexpand.c: Reorder functions to obviate forward dcls. Remove
397 forward dcls. Protoize. Add `const' attribute to some parameters.
399 Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
401 * wc.c: Reorder functions to obviate forward dcls. Remove
402 forward dcls. Protoize. Add `const' attribute to some parameters.
406 * split.c (isdigits, convint): Remove these.
407 (main): Use xstrtol instead.
409 Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
411 * paste.c (main): Move function body to end of file.
412 Remove forward dcls and protoize.
413 * sum.c (main): Likewise.
414 * nl.c: Protoize. Reorder functions to obviate forward dcls.
417 * src/Makefile.in (OBJECTS): Reflect that all of the above
420 * sum.c (bsd_sum_file): Give file name parameter const attribute.
421 (sysv_sum_file): Likewise.
423 * tac.c (xwrite): Give output buffer parameter const attribute.
424 (output): Likewise for both parameters.
425 (tac): Likewise for file name parameter.
426 (tac_file): Likewise.
428 Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
430 * md5sum.c (md5_check): Use the same message format when there is
431 a single file and it gets a read error or checksum mismatch as when
432 there are more. Write that warning to standard error, not standard
433 output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
435 Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
437 * sort.c (xtmpfopen): New function to set proper permissions on
438 temporary files. Use it instead of xfopen. Reported by Erik Corry
439 (erik@kroete2.freinet.de).
441 Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
443 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
444 * configure.in: Use it.
446 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
447 (.c.o): Rewrite to be more like src/Makefile.in.
449 * src/Makefile.in (distclean): Remove .deps.
450 Include @top_srcdir@/mkdep-Makefile.
452 * mkdep.Makefile: New file.
453 * Makefile.in (DISTFILES): Add mkdep-Makefile.
454 * doc/Makefile.in (mostlyclean): Also remove *.info.
456 Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
458 * od.c: Indent cpp directives.
460 * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
461 with large repeat counts.
462 (struct E_string): New struct.
463 (find_closing_delim): Take E_string arg rather than char* and length.
464 (find_bracketed_repeat): Likewise.
465 (star_digits_closebracket): New function.
466 (append_char_class): No longer give diagnostic.
467 (append_equiv_class): Likewise.
468 (build_spec_list): Give them here instead, allowing string1 like
469 [:*][:upper:] that got errors before.
470 Take E_string arg rather than char*.
471 Convert switch stmts into if-then so as to use ES_MATCH.
473 Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
475 * cat.c: Protoize. Reorder functions to obviate forward dcls.
477 * expand.c: Likewise.
484 * src/Makefile.in (OBJECTS): Reflect that all of the above
487 * head.c: Add `const' attribute to dcls of lots of formals.
489 * sort.c: Add `const' attribute to dcls of lots of formals.
490 Move struct dcls to precede dcls of file-scope variables.
491 (monthtab, keyhead): Separate variable dcls from type dcls.
493 Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
495 * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
496 list item separators, per POSIX spec.
497 (prjoin): Rewrite loop that iterates over field specs.
498 Handle case in which file spec is 0.
500 Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
502 * strpbrk.c: New file.
503 * lib/Makefile.in (SOURCES): Add strpbrk.c.
506 Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
508 * join.c (add_field): No longer return a value.
509 (decode_field_spec): New function.
510 (add_field_list): Rewrite to be more strict.
511 Before, `,1.2' was accepted as valid.
512 (main): Use xstrtol instead atoi.
513 Combine nearly identical -a and -v cases.
516 Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
518 * join.c (main): Report `too few/many non-option arguments'
519 then print --help output rather than just the latter.
520 Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
521 (usage): Describe POSIX -1, -2 options and deprecate -j* ones
523 * join.c (usage): Move to precede all other functions.
527 Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
529 * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
530 to determine whether `sigaction' functions are available.
531 Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
532 Fix suggested by Karl Berry.
534 * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
537 * cut.c: Convert many declarations using `int' to use `unsigned int'
538 to avoid warnings from `gcc -Wall' about comparing signed and
540 (set_fields): Use memset (not open coded loop) to initialize array.
542 Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
546 * Makefile.in (DISTFILES): Remove README.alpha for major release.
548 * od.c (decode_one_format): Remove spurious semicolon.
549 From John Kodis (kodis@daacdev1.stx.com).
551 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
553 * man/Makefile.in (install-data, uninstall): Use sed not basename.
554 The GNU Coding Standard suggests that only a select set of
555 relatively standard utilities be used in Makefiles. basename is
556 not among them. Suggested by Ulrich Drepper.
558 Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
563 * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
565 (cksum): Depend on cksum$O.
566 (cut): Depend on cut$O.
568 Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
572 * Makefile.in (DISTFILES): Add README.alpha.
574 * lib/Makfile.in: (GETOPT, MEMCHR, REGEX): New variables.
575 (OBJECTS): Use them instead of hardcoding object file names.
576 Suggested by Ulrich Drepper.
578 * md5sum.c (md5_check): Distinguish between open/read failure
579 and checksum mismatch.
581 Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
583 * md5sum.c: Protoize.
584 * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
585 (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
586 (md5sum): Depend on md5sum$O.
588 * md5sum.c (main, usage): Remove -h, -s, -v short options.
589 Rename --verbose to --warn, --quiet to --status.
590 (main): Handle --help and --version using parse_long_options.
591 (md5_check): Check ferror.
593 * sort.c (tempname): Replace `16' with a more readable expansion.
594 Make sure that counter never exceeds 99999.
595 (checkfp): Rearrange loop to avoid duplicate test.
596 Move a couple dcls from function scope into inner block.
598 Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
600 * md5sum.c (main): Fail if either --verbose or --quiet is specified
601 when not verifying checksums.
603 * md5sum.c (md5_check): Fail if no valid line is found.
604 Don't use the word `fail' unless there were failures --
605 instead, say `all N tests passed.'
607 * md5sum.c (main) [handling --string option]: Don't output
608 nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
609 * md5-test.rfc: Remove now-inconsistant `b' marker.
610 (usage): Clarify help message. With suggestions from Greg Troxel.
612 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
614 * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
615 compiler warning. From Ulrich Drepper.
617 * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
618 compiler warning. From Ulrich Drepper.
620 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
623 Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
625 * system.h (_): Define macro -- as empty for now.
626 * src/*.c: Annotate localizable strings with _(...). From Franc,ois.
628 Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
632 * configure.in: Add fp_C_PROTOTYPES.
634 Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
636 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
637 Add suffixes, dependencies, and rules to convert ANSI source to K&R
638 when required. Mark tr.o and comm.o as the only such files (for now).
643 * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
644 (configure): Depend on aclocal.m4.
645 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
647 Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
649 * md5sum.c (md5_check): Use getline instead of fgets.
651 * lib/Makefile.in: (SOURCES): Add getline.c.
652 (OBJECTS): Add getline.o.
653 (DISTFILES): Add getline.h.
654 (getline.o): Depend on getline.h.
656 * md5.c [memcpy]: Define to bcopy if needed.
657 (md5_buffer): Explicitely cast SWAP expressions to unsigned
660 * lib/Makefile.in (strtoul.o): Depend on strtol.c.
662 * sort.c (check): Print `disorder on...' message on standard error,
663 not stdout. This is a minor concession to POSIX which says
664 `no output shall be produced...'.
666 * sort.c (main): Fix -k so it works. -k 2,3 was being treated
667 like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
669 Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
671 * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
672 before applying $(transform) to manual name. From Karl Berry.
674 * md5sum.c (have_read_stdin): New global variable.
675 (md5_file, md5_check): Set it.
678 * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
679 (md5_file): Take a new parameter, MD5_RESULT, and no longer
681 (md5_check): Invoke md5_file instead of calling fopen directly.
682 When giving a diagnostic for a line with invalid format, also report
684 (main): Generate output after a successful md5_file call.
685 [in many places]: Upon detection of an error, rather than exiting
686 immediately, issue a diagnostic, note that an error occurred and
689 Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
691 * tail.c (tail_bytes) [from_start]: For regular files, seek
692 relative to the initial input file pointer position, not
693 necessarily from the beginning of the file.
694 [!from_start]: Don't back up past the initial position of the
696 (tail_lines): Call file_lines only if FD refers to a regular file
697 with its file pointer positioned at beginning of file. Otherwise,
698 call pipe_lines. This is a kludge. Once there's a decent test
699 suite, fix this properly.
700 Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
701 would output both lines of the input file even though the first had
702 already been read. Reported by John Roll (john@panic.harvard.edu).
704 * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
706 * csplit.c (main): When too few arguments are given, don't just
707 issue the usage message; also report why.
709 Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
711 * md5sum.c (md5_check): New function -- extracted from main.
713 Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
715 * md5sum.c (md5_file): New function -- extracted from main.
716 (main): Call the new function instead of doing all that in an
717 if-stmt. Always use "%s" format rather than raw filename as
718 format argument in printf-style functions like error. Otherwise,
719 filenames containing `%' are likely to lose.
720 Remove all mention of `old format'.
721 (split_3): No longer parse the `new format.' There is only one
722 valid format now: the compatible one.
724 * lib/Makefile.in: (SOURCES): Add md5.c.
725 (OBJECTS): Add md5.o.
726 (DISTFILES): Add md5.h.
727 (md5.o): Depend on md5.h.
729 * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
730 * lib/md5.c (md5_stream): Check for read failure and return
731 indication of success rather than second argument.
732 * lib/md5.h (md5_stream): Update prototype.
734 * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
735 (main): Report an error if md5_stream fails. Otherwise, running
736 `md5sum dir-on-mounted-filesystem' always reported the checksum
737 for an empty file. Now it gets the `is a directory' error.
738 Greg McGary (gkm@magilla.cichlid.com) reported that the released
739 version got stuck in an infinite loop with such arguments.
741 * lib/md5.c: New file.
742 * lib/md5.h: New file.
743 * md5sum.c: Rewritten to use library interface.
746 Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
748 * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
750 Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
752 * md5sum.c Add #else block after #ifdef VMS.
753 (main): Rename local variable.
754 Add FIXME: allow newlines in filenames.
755 Detect and report failed fclose calls on stdout and checkfile_stream.
757 * tr.c (unqote): Comment out unreachable break stmts.
758 (append_range): Declare FIRST and LAST parameters to be unsigned int,
760 (find_closing_delim): Clean up interface, separating boolean success
762 (find_bracketed_repeat): Likewise.
763 (build_spec_list): Adapt to use new interfaces.
764 Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
765 type size_t, not int.
766 (main): Declare NR and CHARS_READ to be of type long, not int.
768 * sort.c (main): Comment out unreachable break stmt.
770 * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
771 call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
772 off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
773 long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
775 * comm.c: Reorder functions so main is last, so no forward dcls
778 Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
780 * sort.c (main): When using obsolescent +pos -pos syntax, allow
781 omission of field spec only when character offset is specified.
782 Otherwise, -. +. would be accepted.
784 Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
786 * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
787 position specification. For compatibility with existing practice
788 (what vendors?), omitting M is now equivalent to specifying `0' for M,
789 but only when using the +pos -pos syntax, not with the -k option.
790 From Rick Sladkey (jrs@world.std.com).
792 Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
794 * od.c (dump): Correct loop-termination criterion.
795 Before, running `printf 1234| ./od --width=4 --read-bytes=4'
796 printed output for 8 bytes -- the last four were garbage.
797 This happened only when the dump limit, N, was specified (with
798 --read-bytes=N) and N was a multiple of bytes_per_block
799 (usually 16, but 4 in this example). From Andreas Schwab.
801 Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
803 * lib/Makefile.in (check): Depend on libtu.a.
805 * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
806 (main): Print each sum line in (de facto) standard Plumb/Lankester
809 Check option no longer takes an argument.
810 When checking, exit status reflects success.
812 Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
814 * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
815 Autoconf (via config.h) defines it away for compilers that don't
818 * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
819 defining to avoid redefinition warning on some systems.
821 * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
822 This avoids potential conflict with max macro from some system's
823 header files when using bad pre-ANSI compilers.
825 * uniq.c (usage): Fix typo in text of --help output.
826 From Steve McConnel <steve@acadcomp.sil.org>
828 * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
829 also check `unsigned long', as a concession to systems with
830 int's smaller than 32 bits.
832 * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
833 AC_FUNC_MEMCMP already handles it. This avoids warnings from
834 ranlib on nextstep systems. From Kaveh Ghazi.
836 * csplit.c (interrupt_handler): Declare to have a single integer
837 parameter. Otherwise, some compilers fail with a type mismatch
838 error in sa_handler assignment.
840 * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
841 headers that typedef `word' get syntax errors because of the
842 variable by the same name.
844 * join.c [join]: Redefine to avoid conflict with prototype in some
845 system header file. Also for Unicos.
847 * md5sum.c (main): Remove spurious colon in getopt spec string.
848 From Ken Pizzini <kenp@spry.com>.
850 Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
852 * md5sum.c (md5_file): Initialize two elements of LEN portably,
853 rather than with ANSI aggregate initialization. Reported by
854 Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
856 Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
860 * md5sum.c (process_buffer): Copy values from struct into
861 individual local variables before performing computation on them,
862 then copy results back into returned struct. Solely for better
863 optimization by compilers that can't keep struct members in
864 registers. From Ulrich Drepper.
866 Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
868 * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
869 Don't use #elif. Some older compilers don't grok it.
870 (split_3): New function to parse out sum, flag, and filename
871 when reading check file.
872 (hex_digits): Remove length parameter since string parameter is
874 (main): Don't allocate separate arrays for filename and sum
875 when checking. Get pointers into line buffer with split_3 instead
877 (main): Treat `no file args' just like `-' when not checking
879 (hex_digits): Unprotoize.
881 * md5sum.c (main): Don't use a separate loop to convert to lower
882 case. Suggested by Ulrich Drepper.
887 * md5sum.c: Don't include values.h.
890 * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
891 and _POSIX_VERSION. Reported by Arne H. Juul.
893 Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
895 * tr.c [NDEBUG]: Define it to disable assertions. Some systems
896 have a broken <assert.h> header.
897 (is_char_class_member): Set a variable in each branch of switch
898 stmt and return that value after the switch (rather than returning
899 directly from every branch).
900 (unquote): More int->size_t changes.
901 (build_spec_list): More int->size_t changes.
902 Be very careful about comparison now that variables are unsigned:
903 Use i + 2 < len rather than i < len - 2. The latter didn't work
904 for len < 2. Caught early thanks to a thorough regression test
907 Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
909 * sort.c (xfclose): Don't try to flush stdin, only stdout.
910 Otherwise, at least Ultrix-4.3's fflush would return EOF.
911 Reported by Jim Blandy (jimb@cyclic.com).
913 * tr.c (non_neg_strtol): Don't compare signed and unsigned.
914 [struct Spec_list] (indefinite_repeat_element): New member.
915 Use size_t rather than int or unsigned long where reasonable.
916 (get_spec_status): Make interface cleaner.
917 (get_s1_spec_status): New function.
918 (get_s2_spec_status): New function.
919 (validate): Use new functions instead of get_spec_status.
921 Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
923 * md5sum.c: New file. From Ulrich Drepper.
924 * md5-test.rfc: New file.
925 * Makefile.in: (PROGS): Add md5sum.
926 (check): Run a recursive make in each subdirectory.
927 * man/Makefile.in: (MANFILES): Add md5sum.1.
928 * src/Makefile.in: (SOURCES): Add md5sum.c.
929 (OBJECTS): Add md5sum.o.
931 (check): Add basic checks for md5sum.
932 (md5sum): Add dependency and link rule.
933 (DISTFILES): Add md5-test.rfc.
935 * tr.c (look_up_char_class, append_char_class, append_equiv_class):
936 Use const attribute when appropriate.
938 Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
940 * join.c: Overhauled to make -a1 and -a2 options work.
941 Passed all tests in a fairly thorough test suite.
942 Reported by Michael Hasselberg (mikelh@zonta.ping.de).
944 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
946 * tail.c (main): Remove dcl of and statements that set now-unused
949 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
950 Without this, SunOS doesn't get type for memchr.
951 Reported by Kaveh Ghazi.
953 Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
955 * tail.c (tail_lines): Change one more `long' to `off_t'.
956 Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
958 * csplit.c [struct control]: Change type of `repeat' to unsigned
959 long to avoid conversion warning.
961 Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
963 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
965 * xstrtol.c (__strtol): Remove prototype altogether.
966 Move inclusion of xstrtol.h back so that it follows system headers.
970 Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
972 * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
975 * xstrtol.c: Define NDEBUG for systems with losing assert.h.
976 (__strtol): Add __unsigned to prototype and use __P.
977 Move inclusion of xstrtol.h to precede prototype.
980 * memmove.c: Include config.h for definition of const.
983 * All Makefile.in (install-exec, install-exec): New targets.
986 * tr.c (look_up_char_class): Take a string length argument -- required
987 because the argument is a string that is *not* NUL-terminated.
988 Use strncmp, not strcmp and add string lengths comparison.
989 (append_char_class): Update caller. Before this change,
990 tr '[:upper:]' '[:lower:]' read one uninitialized byte.
993 * split.c (next_file_name): Move dcls of file-scope variables into
994 this function. Don't rely on arithmetic being two's complement.
996 * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
997 Instead, declare two FILE structs and use their addresses.
999 * csplit.c (record_line_starts): Remove set-but-not-used,
1000 file-scope variable.
1002 Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
1004 * all source files (usage): Include one- or two-line synopsis
1005 in --help output. From Karl Berry.
1007 * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
1010 Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
1014 Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
1016 * all Makefile.in (maintainer-clean): Renamed from realclean
1019 Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
1021 * sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
1022 Don't include safe-stat.h.
1024 * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
1025 Remove all associated rules. safe-l?stat.h are no longer used.
1027 * sort.c Don't hard-code /tmp.
1028 [DEFAULT_TMPDIR]: Use this instead.
1029 * tac.c (save_stdin): Likewise.
1031 * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
1032 Reported by John Salmon (johns@mullet.anu.edu.au).
1033 Patch from Mike Haertel.
1035 Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
1037 * sort.c (tempname): AND-off high bits of pid so that its decimal
1038 string representation is no longer than five digits.
1039 From Hans Verkuil (hans@wyst.hobby.nl).
1041 Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
1043 * expand.c (add_tabstop): Give correct size when reallocating
1044 tab_list buffer. From Geoff Odhner (geoff@franklin.com).
1045 Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
1047 Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
1049 * configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
1050 unnecessary conflicts for people using version control software
1052 (AC_ARG_PROGRAM): Use it.
1054 Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
1056 * head.c: Remove block of redundant comments describing options.
1057 (usage): Remove reference to -l option. It's not valid.
1059 * od.c (write_block): Declare index I as unsigned int, not int.
1060 (get_lcm): Likewise.
1061 (dump_strings): Likewise.
1063 (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
1064 (dump_strings): Declare bufsize to be of type size_t, not int.
1066 * split.c (next_file_name): Don't reuse X as an index.
1067 Declare new variable I instead.
1069 Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
1071 * csplit.c: Declare as `unsigned int' all variables that were
1073 (make_filename): Change type of arg to unsigned int.
1074 (split_file): Change type of indices to unsigned int.
1076 Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
1078 * od.c (main): Detect and fail when argument to -N is too large
1081 Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
1083 * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
1084 Remove check for sizeof long.
1086 * linebuffer.h: Undefine __P before defining it.
1087 * long-options.h: Likewise.
1088 * xstrtol.h: Likewise.
1090 * memcpy.c: New file.
1091 * lib/Makefile.in (SOURCES): Add memcpy.c.
1093 Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
1095 * src/*.c: Update Copyright dates.
1097 Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
1099 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
1100 Separate errno declaration from STDC_HEADERS.
1102 * wc.c (wc): For efficiency, handle separately the cases in which
1103 words need not be counted. Suggested by Karl Heuer.
1105 * wc.c (wc): Don't overcount the number of bytes when reading
1106 from a regular file on stdin with file pointer not at BOF.
1107 From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
1108 `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
1109 the size of the file. Now it outputs `0'.
1111 Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
1113 * cat.c (cat): Use memmove rather than bcopy.
1114 * csplit.c (load_buffer): Use memcpy rather than bcopy.
1115 (extract_regexp): Use strrchr, not rindex.
1116 * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
1117 (flush_paragraph): Use memmove instead of bcopy.
1118 * fold.c (fold_file): Use memmove instead of bcopy.
1119 * od.c (decode_format_string): Use memmove instead of bcopy.
1120 [EQUAL_BLOCKS]: Use memcmp, not bcmp.
1121 (parse_old_offset): Use strchr, not index.
1122 (dump): Use memset, not bzero.
1123 * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
1124 (fillbuf): Use memmove instead of bcopy.
1125 * split.c (main): Use memset, not bzero.
1126 (line_bytes_split): Use memmove instead of bcopy.
1127 * tac.c (tac): Use memmove instead of bcopy.
1128 (output): Use memcpy instead of bcopy.
1129 * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
1130 * tr.c (substr): Use memcpy instead of bcopy.
1131 (card_of_complement, set_initialize): Use memset, not bzero.
1133 * tr.c (substr): Don't allocate a byte for trailing NUL in result
1134 since the result needn't be NUL-terminated. Don't NUL terminate it.
1136 * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
1138 (AC_CHECK_FUNCS): Add strchr and strrchr.
1140 * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
1141 * memmove.c: New file.
1142 * memcpy.c: New file.
1144 Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
1146 * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
1147 not followed by a newline would be followed by data copied from
1148 uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
1149 Reported by Franc,ois Pinard.
1151 * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
1152 AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
1153 Be careful to use off_t instead of explicit `unsigned long'.
1154 Otherwise, systems like 4.4BSD lose on calls to fseek that
1155 expect off_t (which is long long on that system).
1156 (parse_old_offset): Use xstrtoul
1159 * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
1161 Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
1163 * tail.c (numerous functions): Give char* filename arguments the
1166 * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
1167 Add xstrtol.c and xstrtoul.c.
1168 (OBJECTS): Likewise for .o files.
1169 (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
1171 * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
1172 (distclean): Remove references to safe-l?stat.c.
1173 Remove all related rules and dependencies.
1175 * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
1177 Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
1179 * tail.c (tail_file): Fix call to error with %s in format, but
1180 no corresponding argument.
1182 * src/*.c: Include "error.h" instead of simply declaring
1184 * od.c (main): Use %lu, not %d for unsigned long.
1185 (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
1186 and STRTOL_FATAL_ERROR instead.
1188 Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
1190 * sort.c (main): Fix interpretation of field offsets when specified
1191 via -k option. They were being interpreted as zero-indexed. POSIX
1192 says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
1193 (keycompare): Don't ignore characters at the end of words when
1194 otherwise they would compare equal. From Rik Faith.
1196 * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
1197 to off_t because n_bytes is used as the option to fseek and off_t may
1198 be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
1199 imposed is in the string-to-integer converstion of xstrtol.
1200 (main): Use xstrtol instead of manual string to integer conversion.
1202 * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
1203 comparisons against '0' and '9'.
1205 * tr.c [!ULONGMAX]: Define it.
1206 [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
1208 * full-write.c: Declare (or not) errno based on definedness or
1209 errno, not STDC_HEADERS.
1210 * safe-read.c: Likewise.
1211 * xwrite.c: Likewise.
1213 Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
1215 * tail.c (dump_remainder): Flush standard output just before
1216 sleeping so that `tail -f' will output partial lines sooner.
1217 This applies only when following the end of a single file.
1218 From Leonard N. Zubkoff <lnz@dandelion.com>.
1220 * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
1221 start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
1223 * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
1224 * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
1225 not already defined.
1227 Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
1229 * tr.c: Include <getopt.h> instead of "getopt.h".
1231 * sort.c (tempname): Merge two very similar sprintf stmts into one.
1233 * tail.c: Use BUFSIZ instead of BUFSIZE.
1235 * cut.c: Declare DELIM to be `int' rather than unsigned char.
1237 * fmt.c: Use index, not strchr -- per GNU Standards.
1238 Reported by Kaveh Ghazi.
1239 Always include <config.h>.
1240 (main): Include program name in --version output.
1242 Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
1246 Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
1248 * memcmp.c, srtoul.c: Use up-to-date versions.
1249 Reported by Franc,ois Pinard.
1251 * src/Makefile.in (DEFS): Remove -Dlint... again.
1253 * src/Makefile.in (PROGS): Add fmt!
1254 Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
1256 Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
1260 Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
1262 * linebuffer.h: Use __P instead of _P since the latter conflicts
1263 with a definition in some <ctype.h>. From Kaveh Ghazi.
1265 Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
1267 * tr.c: Add const attribute where appropriate.
1269 * tail.c (BUFSIZ): Use definition from <stdio.h>.
1271 Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
1273 * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
1274 n_bytes is positive. Turn off assertions. `tail /dev/null' was
1275 getting a failed assertion. Reported by Doug McLaren
1278 * cut.c (cut_bytes): Print at least a newline for every line of input.
1279 (cut_fields): Print a newline even for lines whose only selected
1280 field is empty. But print nothing when using -s without -f1.
1281 And print nothing for empty input. Reported by
1282 Richard_Sharman@software.mitel.com.
1284 Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
1286 * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
1287 * linebuffer.h: Likewise.
1289 Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
1291 * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
1292 already handles it. From Kaveh Ghazi.
1294 * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
1295 get failures when it's defined. From Kaveh Ghazi.
1297 * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
1298 defined on some Next and Alliant systems. From Kaveh Ghazi.
1300 * sort.c join.c (main): Include version.h and call parse_long_options
1301 with the proper number of arguments. Reported by Franc,ois Pinard.
1303 Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
1305 * (configure.in): Add AC_OFF_T and rearrange by type along the
1306 same lines as autoscan.
1308 * fmt.c, fmt.1: New files.
1309 Both from Ross Paterson (rap@doc.ic.ac.uk).
1311 * Makefile.in (PROGS): Add fmt.
1312 * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
1313 (fmt): Add a link rule.
1314 * man/Makefile.in (MANFILES): Add fmt.1.
1316 Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
1318 * Makefile.in (All of them): Update from the ones in sh-utils.
1319 From now on, rules and definitions that are comon to the fileutils,
1320 textutils, and sh-utils will get ChangeLog entries only in the
1323 Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
1325 * od.c (my_strtoul): Set errno to zero before calling strtoul.
1326 Otherwise, od can fail complaining about a valid integer argument.
1327 From Andreas Schwab.
1329 Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
1331 * tr.c (main): Give an error and fail when squeezing repeats
1332 and no non-options are given. Reported by Tony Robinson
1333 (ajr@eng.cam.ac.uk).
1335 * sort.c (main): Temporarily copy each input file that might be
1336 another name for the output file. When in doubt (e.g. a pipe),
1337 copy. This allows the dangerous (historical -- in cnews) idiom
1338 `cat file | sort -o file' to work properly. Don't rely on this
1339 behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
1341 Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1343 * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
1344 Remove CONFIG_BROKETS ifdef.
1345 * src/Makefile.in lib/Makefile.in: Don't define it.
1347 Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
1349 * full-write.c (full_write): Declare argument LEN to be size_t.
1351 Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
1353 * tail.c (tail_file): [For multiple files only]: Report truncation
1354 of monitored file and reset current file size. From Franc,ois Pinard.
1356 Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
1358 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
1359 From Franc,ois Pinard.
1361 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
1363 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
1364 decides whether to include <fcntl.h>. From Francois Pinard.
1366 Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
1368 * tr.c (substr): Fix off-by-one allocation error.
1370 Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
1372 * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
1373 (tac): Fix typo that had `1' as arg #2 of error after failed read.
1374 Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
1376 Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
1378 * configure.in [INSTALL]: Revert change of March 25. autoconf
1381 Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
1383 * join.c (prline): Remove unused function. Indent.
1385 Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
1387 * tail.c (tail_forever): Don't print headers when asked not to.
1388 From Karsten Thygesen <karthy@kom.auc.dk>.
1390 * wc.c (wc): Optimize for the case when only bytes are being counted
1391 and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
1393 Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
1395 * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
1396 * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
1398 Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
1400 * csplit.c (struct control): Add new field, repeat_forever.
1401 Remove now-unneeded definition of INT_MAX.
1402 (process_regexp): Test repeat_forever instead of comparing `repeat'
1404 (split_file): Don't even reference `repeat' count if repeat_forever
1406 (new_control_record): Initialize repeat_forever field.
1407 (parse_repeat_count): Set it instead of setting repeat count to
1409 (process_line_count): Abort for internal error instead of calling
1412 * long-options.c (parse_long_options): Take a new argument indicating
1413 the utility name (e.g. "join", not "gjoin") for version output.
1414 Print both the utility and the package names, e.g. `join - GNU
1415 textutils-1.9.1' instead of just the package name.
1417 * join.c (main): Call parse_long_options with program name arg.
1418 * sort.c (main): Ditto.
1420 * All source except sort.c and join.c (main): Change --version output
1421 to include utility name as well as package name and version info.
1423 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
1425 * configure.in: Use AC_SET_MAKE.
1426 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
1428 Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
1430 * tr.c (main): In addition to the --help usage pointer, give an
1431 explicit error message for too many arguments.
1433 Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
1435 * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
1436 of explicit echo commands.
1437 [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
1438 `./install.sh', make it `../install.sh' instead since that
1439 script will be invoked only from subdirectories.
1440 [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
1442 * cat.c (cat): The command `:|cat -s' failed on Irix5 because
1443 ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
1444 it returned EINVAL. Detect this.
1445 (main) [lint]: Initialize variables to suppress `used before
1446 initialized' warnings.
1448 * csplit.c: Change long option name from --suffix to --suffix-format.
1450 * od.c (skip): Correct a comment.
1451 (main): Don't output anything to stdout if the sole input file
1452 doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
1454 * od.c (dump) [lint]: Initialize a variable to suppress `used before
1455 initialized' warning.
1456 (main) [lint]: Ditto.
1457 * paste.c (paste_parallel) [lint]: Ditto.
1459 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
1461 * configure.in: Don't set LDFLAGS since linking now uses both
1464 Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
1466 * unexpand.c (unexpand): Don't segfault when given a name of a
1468 * expand.c (expand): Ditto.
1469 Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
1471 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
1473 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
1476 * csplit.c (load_buffer): Rather than incrementing buffer size,
1477 double it each time we fail to find a newline. Otherwise, csplit
1478 would run out of memory when processing files with very long lines.
1480 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
1482 * man/Makefile.in (manprefix): Use binprefix as the default.
1484 Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
1486 * cat.c: Use full_write and safe_read instead of write and read resp.
1492 * sum.c: Use safe_read instead of read.
1496 * tail.c: Replace calls to xwrite with calls to fwrite.
1497 Use fopen/fclose instead of open/close.
1498 (write_header): Use a single call to printf instead of four to xwrite.
1499 Use safe_read instead of read.
1502 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
1504 * install.sh: New file.
1505 Makefile.in [DISTFILES]: Add it.
1507 Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
1509 * memcmp.c: Use the latest version from the GNU C library.
1511 * cut.c [ADD_RANGE_PAIR]: New macro.
1512 (set_fields): Collect the list of all selected ranges before
1513 allocating and initializing the boolean lookup table.
1514 (cut_bytes, cut_fields): Complete rewrite. Avoid copying
1515 into buffer whenever possible. Properly handle input without
1517 (getstr): New function. Copied from getline.c, but with minor changes.
1519 * sort.c (main): Properly handle -Tdir.
1520 Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
1521 Reported by Kristoffer Rose (kris@diku.dk).
1523 * cut.c (main): Give separate errors for `-s without -f'
1524 and `-d without -f'.
1525 (main): Now -d '' means `use the NUL byte as the delimiter'.
1526 Before, it got an error.
1528 Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
1530 * configure.in [test for 8-bit clean memcmp]: Add a test to detect
1531 losing memcmp from SunOS4.1.x. From Robert H. de Vries
1534 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
1536 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
1537 so it goes in config.status. This eliminates unnecessary second run
1540 Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
1542 * configure.in (AC_HAVE_FUNCS): Add isascii.
1543 * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
1544 on AIX PS/2 1.3 systems because isascii is a function and it is used
1545 in definitions (with the necessary side effect of assigning to a
1546 global variable) of the is* macros. Also test HAVE_ISASCII and
1547 redefine ISASCII(c) instead of isascii.
1548 Reported by Minh Tran-Le (tranle@intellicorp.com).
1550 Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
1552 * configure.in: Don't run the test for 8-bit clean memcmp if we
1553 already know we'll be using our replacement.
1555 Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
1559 * tac.c (usage): Fix typo in long usage.
1560 * sort.c (usage): Likewise.
1561 From Philippe.Schnoebelen@imag.fr.
1563 * cut.c [FATAL_ERROR]: New macro.
1564 (main): Call both error and usage (2) through FATAL_ERROR in
1565 many places. Before, only `error (2...' was called.
1566 (invalid_list): Removed. This function is subsumed by FATAL_ERROR.
1568 * cut.c (cut_fields): Properly handle input lacking a terminating
1569 newline. Before, the command `printf "a\tb" |cut -f 1' generated
1572 Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
1574 od.c (usage): Change --backward-compatible to --traditional in
1575 the long usage message.
1577 Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
1581 Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
1583 * cut.c (cut_fields): Revert July 27 change. Instead, strip off
1584 trailing delimiter unless given a range of fields like `3-' that
1585 extends to end of line.
1586 (set_fields): Moved local `eol_range_start' to file-scope.
1587 Reported by Arne H. Juul (arnej@solan.unit.no).
1589 Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
1591 * fold.c (fold_file): Don't get stuck in an endless loop when
1592 width is smaller than 8 and there are TABs in the input.
1594 Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
1596 * join.c: Remove now-unused dcls of show_help and show_version.
1598 Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
1600 * csplit.c [INT_MAX]: Make sure it's defined.
1601 [not HAVE_LIMITS_H]: Don't include limits.h.
1602 From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
1604 Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
1608 Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
1610 * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
1611 From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
1613 * sort.c (main): Handle --help and --version options.
1614 * Makefile.in (sort.o): Depend on long-options.h.
1616 Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
1618 * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
1619 split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
1620 `--longopt=arg' syntax in --help message rather than `--longopt arg'.
1621 From Francois Pinard.
1623 * tail.c: Don't include <signal.h>. It hasn't been necessary
1624 since the Dec 12, 1992 change.
1626 * join.c (main): Accept `-v 1' again. Adding the --version
1627 long option had broken it, although -v1 still worked. Call
1628 parse_long_options instead of adding "help" and "version"
1629 to join's longopt strct.
1630 * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
1632 * (join): Depend on and link with long-options.o.
1633 * (join.o): Depend on long-options.h.
1635 * od.c: Change --compatible (-C) to --backward-compatible (-B).
1637 * csplit.c: Change --abandon-null-files to --elide-empty-files.
1639 Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
1641 * tr.c (get_next, string2_extend): Add default: label to switch stmt.
1643 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
1644 join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
1645 tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
1646 Exit successfully for --help, non-zero for usage error.
1647 From Francois Pinard.
1649 * configure.in: Add AC_STAT_MACROS_BROKEN.
1650 * system.h [AC_STAT_MACROS_BROKEN]: Test it.
1652 Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
1654 * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
1655 <config.h> or "config.h".
1656 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
1657 join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
1658 tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
1660 * configure.in: Use AC_CONFIG_HEADER.
1661 * Makefile.in [DIST]: Add config.h.in.
1663 * Makefile.in: Convert so make may be run from subdirectories.
1664 Add dependencies on config.h.
1665 * src/Makefile.in: Ditto.
1666 * lib/Makefile.in: Ditto.
1667 * man/Makefile.in: Ditto.
1669 Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
1671 * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
1672 In the 64-bit assignment, be careful to cast the shift operand to
1674 Abort if sizeof (unsigned long) > 8.
1676 Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
1678 * csplit.c: Allow repeat counts to be specified via `{*}'.
1679 New option --suffix=format. Supercedes --digits option.
1680 New option --abandon-null-files.
1681 From Ronald F. Guilmette (rfg@netcom.com).
1683 * csplit.1: Updated.
1684 From Ronald F. Guilmette.
1686 * csplit.c: Remove register keyword (replace with `int' in two cases).
1688 * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
1689 (bytes_to_octal_digits): New static array.
1690 (get_format_flags): Combine '+' and ' ' cases of switch stmt.
1691 Return count if for loop terminates.
1692 (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
1693 (get_format_prec): Make sure is_negative is defined before used.
1694 (get_format_conv_type): Give a different error message if there
1695 is no conversion specifier.
1696 Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
1697 (max_out): Use `%%' rather than `%' in format string.
1699 Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
1701 * pr.c (main): When argc == 1, don't try to xmalloc (0).
1703 Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
1705 * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
1708 Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
1710 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
1712 Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
1714 * src/*.c: Print version on standard output, not stderr.
1716 * configure.in: Add AC_LONG_64_BITS.
1717 * memchr.c: Use #ifdef LONG_64_BITS instead of
1718 `if (sizeof(longword) > 4)'.
1720 Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
1722 * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
1723 always handle devices. Ignore errno == EINVAL and errno == ENODEV.
1724 `cat -v /dev/null' was failing on many systems.
1726 * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
1727 `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
1728 From William Dowling <will@franklin.com>.
1730 Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
1734 * memchr.c: De-ansify the fixed version from glibc.
1735 It is supposed to work on systems with 64-bit long ints.
1737 Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
1741 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
1745 Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
1747 * pr.c (cols_ready_to_print): New function. It replaces a global
1748 variable by the same name and computes on the fly the value that
1749 was supposed to be maintained through that variable. This should
1750 put to rest the `pr -2a' bug.
1751 (main): Don't let getopt_long reorder arguments so we can
1752 distinguish between `pr -1 -2' and `pr -12'. Rework handling of
1755 * fold.c: Declare xmalloc.
1757 Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
1759 * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
1761 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
1763 * mkinstalldirs: New file.
1764 * Makefile.in (installdirs): Use it to create installation directories.
1766 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
1768 * all source: With --version, print version and exit immediately.
1770 Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
1772 * Makefile.in (installdirs): New rules for creating installation
1773 directories. (install): depend on it.
1775 * tail.c (main): Remove --compatible since `+1f' may be used
1776 to get the BSD `-0f' behavior portably.
1778 * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
1779 From Ian Lance Taylor (ian@cygnus.com).
1781 Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
1783 * tail.c (main): New option -C, --compatible to make `tail -0f'
1784 work like `tail +1f' for compatibility with BSD tail.
1786 Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
1788 * pr.c (print_page): Decrement cols_ready_to_print even when
1789 lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
1790 terminate. Add parentheses for clarity.
1792 Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
1796 * od.c (main): Remove set-but-not-used variable, `usage_error'.
1798 * split.c (main): Call usage with an argument.
1800 Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
1802 * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
1803 for 8-bit clean memcmp.
1805 * cat.c (usage, main): Remove unused argument.
1807 * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
1808 (check_for_offset): Remove unused argument `argnum.'
1810 * configure.in: Add AC_SIZE_T.
1812 Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
1814 * uniq.c (main): Interpret non-option arguments with a leading `+'
1815 only if we haven't seen `--'.
1817 * tr.c (main): Change variable name to avoid shadowed dcl.
1818 * wc.c (write_counts): Ditto.
1820 * sum.1: Make documentation agree with the code.
1822 * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
1824 Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
1826 * configure.in [AC_HAVE_HEADERS]: Add limits.h.
1828 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
1830 * od.c (parse_old_offset): Don't use prototype in function
1831 definition. Remove unnecessary conjunct from test for hexadecimal
1834 * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
1835 for long double support; there are compilers (Stardent Vistra svr4)
1836 without long double but still define __STDC__.
1838 Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
1840 * src/*.c and man/*.c except for sort: Add --help and --version
1843 * pr.c: Convert to use getopt_long.
1845 * lib/memcmp.c: Use version from glibc.
1846 [WORDS_BIGENDIAN]: Test this instead of the using glibc's
1848 * configure.in: Use AC_WORDS_BIGENDIAN to set it.
1850 * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
1853 * Makefile.in (dist): Depend on Makefile so that changes to
1854 Makefile.in (like adding new files to DISTRIB) are reflected
1855 in the new distribution.
1857 Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
1859 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
1860 other options so users can use them to override DEFS.
1861 * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
1863 * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
1864 configure's AC_SUBST will set these.
1866 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
1867 [targets that cd then run make in subdirectories]: Don't depend
1868 on `cd ..'; use a subshell instead.
1870 * Makefile.in [info, install-info, dvi, check, installcheck]:
1871 New targets but no rules; comply with standards.
1873 * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
1874 hasn't specified CFLAGS.
1875 [LDFLAGS]: Substitute into Makefile.
1877 Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
1879 * od.c: New option --compatible, -C.
1880 (parse_old_offset): New function.
1881 * od.1: Document new option.
1883 Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
1885 * cut.c, expand.c, join.c, nl.c: Always call error with errno
1886 (not zero) after failed fclose or non-zero ferror.
1888 Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
1890 * configure.in: Add check for working memcmp; use GNU's if
1891 the system's doesn't grok the 8th bit.
1892 * memcmp.c: Fix it so it groks the 8th bit.
1893 TODO: We really need to provide a fast memcmp, since most
1894 machines will have a broken memcmp. Probably should get
1896 * sort.c (mergefps): Maintain keybeg and keylim when copying
1897 the current line to `saved'.
1898 (numcompare): Skip white space here since -n no longer implies -b.
1899 (getmonth): Skip white space here since -M no longer implies -b.
1900 (compare): Completely overhauled to make the 8th bit work right,
1901 also to properly handle the global reverse option.
1902 (set_ordering): -n no longer implies -b, according to Posix.
1903 For consistency, -M also no longer implies -b.
1904 (main): Correct treatment of -r and global keys.
1905 (findlines): Clear keybeg and keylim if no keys are used.
1906 (sort): Avoid overwriting tempfiles[] array bounds.
1908 Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
1910 * pr.c (close_file): Reverse May 13, '92 change, but add the condition
1911 that cols_ready_to_print not be decremented when printing across.
1912 The command `echo |pr -2ta' didn't terminate.
1913 (print_page): Rewrite conditional (that had side effects in second
1914 conjunct) using nested if statements to make it clear that we do
1915 indeed want those semantics.
1917 Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
1921 * system.h: Try BBSIZE if BSIZE isn't defined.
1922 From Tony Robinson <ajr@eng.cam.ac.uk>.
1924 Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
1926 * tail.c (tail_forever): Use an array of file descriptors
1927 instead of forking processes.
1928 (dump_remainder): Return number of bytes read.
1929 (tail_file): Fill in the new array.
1930 From Ian Lance Taylor.
1932 Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
1934 * system.h: Only define index, bcmp, etc. if not already defined.
1936 Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
1938 * tr.c (is_char_class_member): Remove unreached return after abort.
1940 Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
1942 * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
1943 sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
1944 of <ctype.h> and definitions of is* ctype macros to system.h.
1945 Change a few more uses of is* ctype macros to (protected) upper
1948 * system.h: Add isascii-protected ctype IS* macros.
1950 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
1952 * all files using getopt.h: Convert static declarations of
1953 struct option to use new macros from getopt.h: no_argument,
1954 required_argument, and optional_argument.
1956 Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
1958 * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
1960 * tr.c (main): Close stdin and stdout and check return status.
1962 Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
1964 * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
1967 Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
1969 * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
1970 use isascii if it is defined.
1971 (is_char_class_member, make_printable_char, make_printable_str,
1972 non_neg_strtol): Use new macros instead of lower case ones
1975 * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
1976 macros like pr.c. Suggested by David J. MacKenzie.
1978 * od.c (print_ascii, dump_strings): Check for isascii before isprint.
1979 (dump_strings): Free malloc'd buffer before returning.
1980 (skip): Return non-zero if an error occurred, zero otherwise.
1981 Exit only if asked to skip beyond end of combined input.
1982 (check_and_close): New function.
1983 (skip, read_block, read_char): Call check_and_close when done
1984 processing the file associated with in_stream.
1985 (skip, read_block, read_char): Set have_read_stdin.
1986 (main): Close stdin (if it was ever read) and check for errors
1987 just before exiting.
1988 (write_block, dump_strings, dump): Don't test return value from
1989 functions that operate on streams. Rely on later ferror tests.
1991 Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
1993 * sort.c (main, usage): Add -T option.
1995 Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
1997 * tail.c (tail_forever, sigusr1, kill_kids): New functions to
1998 do -f on multiple files.
1999 (main): Call tail_forever.
2000 From Ian Lance Taylor.
2002 Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2004 * cut.c (cut_fields): Add cast.
2006 * od.c (decode_one_format): Remove '#' from pre_fmt_string;
2007 many systems don't support it.
2008 Conditionalize long double support on __STDC__, not __GNUC__.
2009 From Ian Lance Taylor.
2011 Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
2013 * sort.c (numcompare, keycompare): Add parentheses suggested
2014 by gcc -Wall. Put braces around individual monthtab initializers.
2016 * cksum.c: Declare error. Make checksum table `const.'
2018 * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
2020 * split.c (main): Add `default: abort();' to enumeration switch.
2022 * All files: Make all functions and extern variables static.
2023 Make all longopts arrays const as well as static.
2024 Make a couple statically initialized aggregates `const.'
2026 Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2028 * od.c (main): Make old-style format options accumulate.
2031 Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2033 * tr.c (look_up_char_class): Add cast.
2035 * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
2036 Add `const' to variable receiving value from re_compile_pattern.
2038 * wc.c (wc): If doing only -c, use st_size for regular files.
2040 * fold.c (fold_file): Was folding 1 column too early.
2041 From Eric Backus <ericb@lsid.hp.com>.
2043 * memset.c: New file.
2045 Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2047 * cksum.c: New file.
2049 Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2051 * tac.c (tac_stdin): Handle SIGPIPE.
2052 * sort.c (main): Handle SIGTERM.
2056 * system.h [USG || STDC_HEADERS]: Define bcmp.
2058 Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2060 * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
2062 Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2064 * paste.c (main): Don't write on a string constant.
2066 Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
2068 * tr.c: Minor cleanup. Replaced some assert(0) with abort().
2070 Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2072 * cmp.c, cmp.1: Move to diff distribution.
2074 Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2076 * system.h: Change FOO_MISSING to HAVE_FOO.
2078 Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2080 * pr.c (COLUMN): Add structure member to remember filename.
2081 (main, init_fps, open_file, close_file): Use it.
2083 (close_file): Don't decrement cols_ready_to_print when closing
2084 a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
2086 Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2088 * cmp.c: --show-chars -> --print-chars.
2090 * pr.c: Rename some variables.
2092 Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2094 * system.h: Define DEV_BSIZE if not defined.
2096 Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2098 * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
2100 Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2102 * sort.c (main): Don't stop processing args when we hit "-";
2103 treat it like a regular filename.
2104 From ian@airs.com (Ian Lance Taylor).
2106 * pr.c (print_page): Fix off by one line count when ^L is in input.
2107 From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
2109 Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
2111 * tr.c (validate): Change error message so it doesn't mention
2112 actual name of --truncate-set1 option. From David MacKenzie.
2114 Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
2116 * tr.c (string2_extend, validate): Give an error message when
2117 translating without --truncate-set1, with empty string2, and
2118 with non-empty string1. "tr 1 ''" produced a failed assertion.
2120 Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2122 * system.h: Change how ST_BLKSIZE is calculated to allow for
2123 non-POSIX systems that don't define BSIZE in sys/param.h.
2125 Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2127 * sum.c (main, bsd_sum_file): Don't print filename if BSD
2128 algorithm is used and only one file was given.
2130 Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
2132 * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
2133 with starting character equal to ending character. This is
2134 contrary to the POSIX spec, but what is already implemented
2135 in find_closing_delim.
2137 Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2141 * sort.c (numcompare, checkfp): Add parens to placate gcc2.
2143 * sort.c (mergefps): For -u, output the first, not last, of
2144 the lines that compare equal. From Mike Haertel.
2146 Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2148 * tr.c: Remove initial capitals and periods from error messages.
2150 Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2152 * sum.c (main): Add -r option for SYSV compat.
2154 Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2156 * sort.c (compare): If -s given, leave lines in their original order.
2157 (main): Recognize -s.
2158 (usage): Document -s.
2161 Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
2163 * sort.c (sort): Check for complete parsing of buffer into
2164 lines before nixing temp files.
2166 Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2168 * sum.c (sysv_sum_file): Use %lu instead of %u to print a
2169 long. Not that it matters for GNU . . .
2171 * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
2172 (append_normal_char, append_range, append_char_class,
2173 append_repeated_char, append_equiv_class, spec_init):
2174 Initialize `next' field of new `struct List_element'.
2175 From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
2177 Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
2179 * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
2181 Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2185 * nl.c: Support multiple files and "-" for stdin.
2186 (main): Check for read and write errors.
2187 (nl_file): New function.
2189 Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2191 * tr.c (main): -t option was called -b in getopt spec.
2192 (validate): Don't warn that set1 is longer than set2.
2194 * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
2196 Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2198 * nl.c: New program from bin-src.
2200 * nl.c (main): Use a struct linebuffer for line_buf.
2201 (process_file): Use readline instead of fgets, to preserve NULs.
2202 (check_section): Use memcmp instead of strncmp.
2203 (proc_text): Print line_buf with fwrite instead of printf.
2205 * nl.c (main): Usage message if too many args given. Check
2206 for error in closing input file. Lengths of section delimiter
2207 strings were 1 too large. Take separator_str into account in
2208 length of print_no_line_fmt.
2209 (build_print_fmt): Allocate space for print_fmt, in case
2210 separator_str is long.
2211 (proc_text): A blank line is one that contains nothing, not
2212 even nonprinting characters.
2214 Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2216 * All programs: Document `--' instead of `+' to introduce
2217 long-named options, in usage messages.
2219 * sum.c (bsd_sum_file): Renamed from sum_file.
2220 (sysv_sum_file): New function.
2221 (main): Recognize an option to select between the algorithms.
2223 Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
2225 * pr.c (close_file, print_page): Fixed bug that had the command
2226 yes |head |pr -t printing "yyyyyyyyyy".
2227 * (print_page): Fixed bug that had pr -3 -a printing two too few
2228 trailer lines per page.
2229 * (main): Added restriction that -a and -m are incompatible.
2230 Although the POSIX spec doesn't explicitly say they shouldn't
2231 be used together, it says -a modifies the -column option and
2232 that -column shouldn't be used with -m.
2234 Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
2236 * nl.c: Include regex.h after, not before, sys/types.h.
2238 Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
2240 * sort.c (fillbuf) return bytes buffered instead of bytes read.
2242 Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
2244 * sort.c (LINEALLOC): New #define.
2245 (struct lines): New field ``limit''.
2246 (initlines): Set it from new arg ``limit''.
2247 (sort, mergefps, checkfp): Pass new arg to initlines().
2248 (findlines): Don't realloc past lines->limit.
2250 Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2252 * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
2253 HAVE_UNISTD_H and _POSIX_VERSION.
2255 * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
2257 Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
2259 * tr.c: Fixed an inaccurate comment on posix_pedantic.
2261 Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
2263 * tr.c: Changed underscores to hyphens in long option name
2264 "sysv_string2_truncate".
2266 Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2268 * tac.c (main): Set obscure_syntax to tell re_search to
2269 allocate memory for the group registers.
2271 Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2273 * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
2274 signal, which POSIX doesn't have.
2275 * sort.c: Replace inthandler and huphandler with sighandler.
2276 * csplit.c (main): Only handle signals if they were not being
2279 * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
2281 Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
2283 * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
2284 * tr.c (squeeze_filter): Comment a little on why it's better
2285 to step through the input by two.
2286 * tr.c (set_initialize): Write a comment describing the function.
2287 * tr.c: Eliminated the variable `portability_warnings' and replaced
2288 references to it by references to `!posix_pedantic'. One of the
2289 uses of portability_warnings had been wrong.
2291 Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2293 * tr.c: New program.
2295 Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2297 * linebuffer.[ch] (freebuffer): New function (used by cron).
2299 Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2301 * system.h, configure, Makefile.in: Don't include memory.h if
2302 STDC_HEADERS, removing need for MEMORY_H_MISSING.
2304 Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
2306 * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
2307 Somehow, part of my patch didn't make it last time.
2309 Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2311 * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
2313 * cmp.c (cmp): Print EOF message to stderr, not stdout, for
2316 * sort.c (xfwrite): fwrite never returns < 0, so check if
2317 number written is number we asked to write.
2318 (fillbuf, main): fread never returns < 0, so check ferror instead.
2321 Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
2323 * pr.c (print_page): Really fixed `extra newline at EOF' problem.
2324 * (store_columns): Fixed bug that caused `pr -b -2' to coredump
2325 on files of certain lengths.
2327 Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
2329 * pr.c (print_page): Fixed to not add single spurious newline
2330 at EOF when using -t.
2332 Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
2334 * pr.c (print_page): Don't pad the page if -t given.
2336 * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
2338 Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2342 * configure, system.h: Include memory.h if it works.
2344 * split.c: Allow `b' unit as well as `k' and `m'.
2346 * head.c, tail.c: Replace -b +blocks option with specifying
2347 units (b, k, or m) after the number.
2348 (parse_unit): New function.
2350 * fold.c (main): Check that -w arg is a number.
2352 * cut.c: +delimiter takes an arg.
2354 Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2356 * pr.c (close_file): Don't close an already closed file.
2358 Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2360 * memchr.c: New file.
2361 * configure: Check if it's needed.
2363 * csplit.c, gcsplit.1: New program.
2365 * pr.c (cleanup): Only free buffers if they were allocated.
2367 * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
2369 Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
2371 * pr.c: The following 3 bugs appeared (at least) when printing
2372 a single file with the options `-3 -f'.
2373 * (print_white_space): Single spaces were being replaced
2375 * (print_page): Some lines were getting too much white space
2376 at the beginning because spaces_not_printed wasn't being reset
2378 * (read_line): The single space between a truncated column
2379 on its left and the column on its right was omitted. Fixed
2380 so that previous value of input_position is restored before
2383 Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2385 * configure: Only remove /etc from PATH when it's not part of
2388 Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
2390 * linebuffer.c (readline): Fix incorrect recalculation of `end'.
2392 * head.c, tail.c: Replace `mode' variables and bitmasks with
2393 separate variables for each option.
2395 Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
2397 * wc.c: New program.
2399 Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
2401 * fold.c (fold_file): Read in an int, not a char, for EOF
2404 * configure: Check whether st_blksize is missing.
2406 * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
2407 defined, instead of /tmp.
2409 Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2411 * xwrite.c [POSIX]: unistd.h might require sys/types.h.
2413 Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2415 * paste.c (main): Consider -d "" to be like -d "\0",
2416 for POSIX (if I read it right).
2418 * sort.c, join.c: New programs.
2420 * cut.c (set_field): Allow blanks as well as commas to
2421 separate numbers in ranges.
2423 Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
2425 * pr.c: Failure to open an input file is no longer a fatal error.
2426 A message is printed for each failed open. When printing
2427 in parallel, each failed open results in one fewer output column.
2428 Added POSIX -r option to suppress the message.
2429 * pr.c: Added variables: failed_opens, ignore_failed_opens.
2430 These changes were based in part on work by David MacKenzie.
2432 Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
2434 * pr.c: Complain if user gives both -m and -[0-9]+ options.
2436 Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
2440 Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2442 * expand.c: Rename some variables.
2443 (expand): Don't access value off end of array.
2444 * unexpand.c: Rename some variables.
2445 (unexpand): Don't access value off end of array.
2446 Instead of copying tabs verbatim and flushing pending spaces
2447 when one is reached, count them as the proper number of
2448 pending spaces. Instead of changing tabs to single spaces if
2449 the tabstop list is exhausted, print the rest of the line
2450 unchanged (for POSIX).
2452 Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2454 * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
2455 Clear EOF and error conditions on stdin so it can be reused.
2457 * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
2458 as commas to separate tabstops, for POSIX.
2459 * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
2460 the output; send it directly to stdout.
2461 * unexpand.c (main): Make -t stupidly imply -a for POSIX.
2462 (unexpand): If a tab stop list was given and we move past its end,
2463 copy the rest of the line verbatim.
2465 * split.c (convint): New function to allow 'm' and 'k' after
2467 (main): Use it. Change -c option to -b for POSIX.
2469 Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2471 * pr.c: Protect isdigit with isascii, if required.
2473 Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
2475 Most of the following is from Paul Eggert:
2476 * cat.c (main): If stdin is read, check close at end.
2477 * cmp.c (main): Check for stdin being closed.
2478 Check for close errors on stdin and stdout.
2479 (cmp): Return a value instead of exiting.
2480 * cut.c (cut_file): New function, from code in main.
2481 Check for read errors.
2482 (main): Check for close errors.
2483 * expand.c, unexpand.c (main): Check for close errors.
2484 (next_file): Go to next file if one can't be opened.
2485 Check for close errors.
2486 * head.c (main), tail.c (main): If stdin was read, check for
2488 * head.c (head_file), tail.c (tail_file): Check for close errors.
2489 * paste.c (main, paste_parallel, paste_serial), tac.c (main):
2490 Check for close errors. Close stdin if it was read.
2491 * split.c (main): Check for close errors.
2493 * configure, Makefile.in's: Support +srcdir option.
2494 Make config.status. Fix up clean targets.
2496 Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
2498 * linebuffer.h (struct linebuffer): Add a field to indicate
2499 the number of valid chars in the line.
2500 * linebuffer.c (initbuffer, readline): Fill it in.
2501 * uniq.c, comm.c: Use it.
2503 * pr.c (main): Check stdin and stdout fclose for errors.
2504 (init_parameters): If there's no room for header and footer,
2505 omit them rather than dying (for POSIX).
2506 (init_header): Take a file descriptor as additional arg.
2507 (init_fps): Change callers. Note when stdin is read.
2508 (open_file): For filename "-" use stdin.
2509 (close_file): Don't close stdin. Check close for errors.
2510 (print_char, char_to_clump): Use isprint instead of explicit
2513 * memcmp.c: New file (needed for comm).
2514 * bcopy.c: New file (needed for fold).
2515 * system.h: Don't define bcopy as memcpy.
2516 * configure: Check for bcopy and memcmp.
2518 * uniq.c (main): Use "-" instead of NULL to mean stdin or
2520 (check_file): Use "-" instead of NULL to mean stdin or stdout.
2521 Check readline return instead of for NUL character to
2523 Check fclose for errors.
2524 (find_field): Use linebuffer length, not NULs, to detect end
2526 (different): New function, replaces compare. Uses memcmp
2528 (writeline): Use fwrite instead of fputs so NULs are preserved.
2530 * comm.c (compare_files): Return an error indication.
2531 Don't take a filename of NULL to mean stdin.
2532 Use memcmp instead of strcmp to allow for NULs.
2533 Check fclose for errors.
2534 (writeline): Use fwrite instead of fputs so NULs are preserved.
2536 * sum.c (sum_file): Take an arg indicating whether to print
2537 the filename, and don't take NULL meaning stdin. Set a flag
2538 when we read stdin. Check fclose return for errors.
2539 (main): If stdin was read, check fclose return for errors.
2540 Use filename of "-" if no args given.
2542 Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2544 * fold.c: Rewritten from scratch for POSIX.
2546 Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2548 * split.c (line_bytes_split): Use xmalloc instead of alloca.
2549 * system.h: Don't declare alloca.
2551 * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
2552 * system.h: Define SEEK_ macros if not defined.
2554 * pr.c: Rename variable `truncate' to avoid library function conflict.
2556 Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2558 * linebuffer.c, linebuffer.h: New files.
2559 * comm.c, uniq.c (initbuffer, readline): Functions
2560 removed (use versions in linebuffer.c).
2562 Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2564 * sum.c (sumfile): Always print 5 digits for second number, too.
2565 Interpret "-" to mean stdin.
2567 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
2569 * uniq.c: Use isblank instead of isspace, to support POSIX.2.
2570 * comm.c, pr.c, uniq.c (concat, fatal, error,
2571 pfatal_with_name, xmalloc, xrealloc): Functions removed.
2573 Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2575 * nl.c: Add long-named options. Doc fixes.
2577 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2579 * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
2581 * xwrite.c [POSIX]: Include unistd.h.
2582 [STDC_HEADERS]: Don't declare errno.
2584 Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2586 * uniq.c: Add long-named options. Remove marginally useful -z
2587 option (zero padded repeat counts).
2589 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2591 * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
2592 (cwrite), head.c (head_file), cat.c (main): Check close return
2593 value for delayed error report due to NFS.
2595 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2597 * cat.c: Replace "uchar" with "unsigned char", to avoid
2598 problems with various systems' typedefs.
2600 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2602 * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
2603 operation is unsupported, for HP-UX 7.0.
2605 Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
2607 * sum.c: Always print five digits for first number.
2609 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
2611 * cat.c, cmp.c: Don't use fileno(); not needed.
2613 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
2615 * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
2617 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
2619 * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
2621 (enlarge_line): Adjust inbufp and outbufp.
2623 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2625 * cat.c: Declare free returning void, not int, so it
2626 doesn't bomb on Xenix.
2628 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
2630 * tac.c: Print error messages before calling cleanup, not after.
2632 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2634 * tac.c (cleanup): Return SIGTYPE, not int.
2636 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
2638 * cut.c (main, usage): Add -b and -n options for POSIX.
2639 (set_fields): Don't allow SPC or TAB as number separators.
2641 * paste.c (paste_parallel): If open of any file fails, quit
2644 Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
2646 * pr.c: Add POSIX -F option (same as -f).
2648 * uniq.c (check_file): Allow '-' to mean stdin or stdout.
2650 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2652 * head.c, tail.c: Change `chars' to `bytes' globally.
2653 (main, usage): Use POSIX.2 draft 10 option syntax.
2655 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2657 * cat.c (main): Don't delay error messages, so they appear
2659 (main, simple_cat, cat): Make errors in input files nonfatal.
2661 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2663 * cat.c: Remove -c option added for POSIX draft 9, since POSIX
2664 draft 10 removed it.
2666 * tac.c (tac_stdin): Use fstat instead of lseek to determine
2667 whether stdin is seekable, because lseek silently fails on
2668 some special files, like tty's.
2669 tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
2670 don't turn off -f for non-regular files (assume the user knows
2671 what he's doing; it might work for fifo's and sockets).
2673 * paste.c (main): If no files given, use stdin.
2674 Don't let collapse_escapes write on string constant (delim default).
2675 (paste_parallel): Don't close stdin.
2677 * cut.c (main): Use standard input for filename of "-".
2679 * comm.c (compare_files): Allow '-' to mean stdin.
2681 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2683 * cut.c (enlarge_line): Take an arg giving the required amount
2684 of space. Change callers.
2685 (main): Don't allow -t'<TAB>' without -f.
2686 Make `delim' unsigned to fix sign extension problem in comparison.
2688 Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
2690 * pr.c Deleted excess whitespace from ends of lines.
2691 Modified to work with current version of getopt, which
2692 returns 1 instead of 0 for non-options.
2693 Reversed the meaning of the -f option, to be compatable
2696 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
2698 * cmp.c (main, usage): Rename -L option to -c and don't have
2700 (printc): Take an arg to specify number of chars to pad to,
2701 for column alignment.
2702 (cmp): Respect flag_print_chars in default output format.
2703 Align columns for cmp -cl.
2705 Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
2707 * cmp.c: For +show-chars, have getopt return 'L' so
2708 `flag_print_chars' gets set.
2710 Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
2712 * tac.c (main): Initialize fastmap and translate fields of
2713 regex before compiling it.
2715 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2717 * tac.c: Change +regexp to +regex for consistency with GNU find.
2719 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2721 * cat.c (cat): If FIONREAD is available, only use it if it is
2722 supported by the filesystem that the file is on.
2724 Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2726 * cat.c (main): Add a variable to control whether the check
2727 for input file == output file is made, because no values of
2728 st_dev and st_ino should be assumed to be available for this
2729 purpose. Only do the check for regular files.
2731 * tac.c: Use bcopy instead of memcpy.
2733 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
2735 * head.c: Use longs instead of ints for file offsets, for 16
2738 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2740 * cmp.c: Change some ints to longs for 16 bit machines.
2741 (bcmp_cnt): Make char-pointer counting slightly simpler.
2743 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2745 * cat.c (main): Allow input file to be output file for devices
2746 (ttys, etc.). Check whether input file is output file when
2747 reading standard input. Print any error messages for standard
2750 * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
2751 machines as well as 32 bit ones.
2752 * cmp.c, tail.c: Use longs instead of ints for file offsets.
2754 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2756 * cmp.c: Fix some exit statuses for POSIX.
2758 Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
2760 * tac.c: Use regular expressions as the record boundaries.
2761 Give better error messages.
2762 Reformat code and make it more readable.
2763 (main): Use getopt_long to parse options.
2764 (tac_stdin): Do not make a temporary file if standard input
2766 (tac_file): New function.
2767 (tac): Take an open file desc as an arg.
2768 (output): Rewrite to use its own efficient buffering.
2769 (xmalloc, xrealloc, xwrite): New functions.
2771 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2773 * head.c, tail.c: Use `error' instead of `fatal_perror' and
2774 `nonfatal_perror'. Remove some unnecessary info from messages.
2776 Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2778 * comm.c (main): Pass the list of files to compare_files as a
2779 char ** instead of a char *.
2780 (compare_files): Make arg a char **.
2782 * uniq.c: Declare some functions as void.
2783 Change global vars `countmode' and `mode' from ints to enums.
2784 (main): Use getopt to parse options and support POSIX options.
2785 Don't use integer_arg to parse numbers, since `-#' can't be
2786 parsed that way using getopt.
2787 (find_field): Use isspace for finding fields boundaries.
2789 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2791 * comm.c (main): Call usage if given bad option or wrong
2792 number of args. Exit with 0 status normally.
2793 (usage): New function.
2794 Declare some other functions as void.
2796 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
2798 * cmp.c (main, cmp, usage): Replace -q +quick option with -L
2799 +show-chars option to add ASCII representation of bytes to -l format.
2801 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
2803 * cmp.c (cmp): Change EOF message for POSIX compatibility.
2804 For -l format, clear bits > FF.
2806 Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2808 * tail.c: Move global `errors' into main instead of having
2809 nonfatal_perror set it.
2810 (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
2811 Return an error status.
2812 (file_lines, start_chars, start_lines): Reverse the meaning of
2814 (tail_lines, tail_chars): Account for that reversal.
2816 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2818 * head.c: Move global `errors' into main and have the various
2819 functions return an error status instead of setting it in
2822 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
2824 * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
2825 options specified), to compare the two blocks and count
2826 newlines simultaneously.
2827 * cmp.c New function: bcmp_cnt.
2829 * cmp.c (main): Test if output is redirected to /dev/null, and
2830 assume `-s' if this is so.
2832 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2834 * cat.c: Change `argbad' from a char to a short, so it will
2835 work on machines with unsigned chars.
2837 Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2839 * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
2840 Remove unneccessary variable `c1'. If -l was given, increase
2841 `char_number' by the number of bytes read, after producing output,
2842 rather than by the offset of the first differing bytes, before
2844 Replace if-else-if constructions with case statements for clarity.
2845 (bcmp2): Rename `n' to `nread'.
2847 Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
2849 * nl.c (proc_text): Use re_search instead of re_match.
2851 Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
2853 * nl.c: Indent. Un-nest statements. Use GNU regexp functions
2854 instead of System V ones. Move function declarations together.
2855 (quit): Remove useless function.
2856 (program_name): New variable for error messages.
2857 (main): Use perror in error message.
2858 (xmalloc): New function to replace myalloc.
2859 (myalloc): Function removed.
2860 Global: use program_name and xmalloc.
2862 Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
2864 * uniq.c: Declare some functions.
2865 (main): Initialize infile and outfile. Call usage if given
2866 invalid args. Normally exit with 0 status instead of garbage.
2867 (usage): New function to print usage message and exit.
2868 (check_file): Remove unused variable.
2869 (readline): Compare against EOF, not < 0.
2870 (xmalloc, xrealloc): Return char *, not int.
2871 Ok to return 0 if 0 bytes requested.
2872 (lb1, lb2): Remove unused global vars.
2873 (concat): Remove unused function.
2875 Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
2877 * comm.c: Remove unused global variables lb1, lb2.
2878 (main): Remove unneeded variable.
2879 (compare_files): Remove unused arg.
2880 (readline): un-nest assignment. Test against EOF instead of < 0.
2881 (error): Print to stderr, not stdout.
2882 (xmalloc, xrealloc): Return char * instead of int.
2883 Returning 0 is ok if 0 bytes requested (ANSI C).
2889 version-control: never