1 Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
5 * intl/Makefile.in (installcheck): New target.
6 * po/Makefile.in.in (installcheck): New target.
8 * od.c (decode_one_format): Take another parameter.
9 Give a specific diagnostic for invalid format spec here rather
10 than an overly general one from caller's caller.
11 (decode_format_string): Update caller.
12 (main): Don't give diagnostic here when decode_format_string fails.
13 Remove assertions that could fail on some Crays because they don't
15 Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.
17 Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
19 * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
20 less portable fileno (stdin) and fileno (stdout).
21 * sort.c (main): Use STDIN_FILENO instead of less portable
24 Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov)
26 * Makefile.am (distcheck): Remove target and rule -- automake-0.33
27 adds it automatically.
29 Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov)
31 * configure.in (LINGUAS): Add ko.
32 * Makefile.am (distcheck): Remove @MAINT@ prefix from first command.
34 Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov)
36 * Makefile.am (distcheck): New target. From Gord Matzigkeit.
38 Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
40 * po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise
41 they won't be built and install could fail. From Ulrich Drepper.
42 (.po.mo): Disable dependency and rule when not in maintainer mode.
44 * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
45 on whether we're using GNU gettext. From Ulrich Drepper.
47 Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov)
49 * intl/Makefile.in (distdir): Renamed from dist. For compatibility
51 * po/Makefile.in.in (distdir): Likewise.
53 * po/Makefile.in.in (all-yes): Depend on GMOFILES.
54 Depend on CATALOGS and GMOFILES files only in maintainer mode.
56 Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov)
58 * configure.in: Require autoconf-2.10.
60 * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
61 * configure.in (jm_MAINTAINER_MODE): Use it.
63 Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov)
65 * configure.in (LINGUAS): Add de.
68 * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
69 * regex.c [IN_CTYPE_DOMAIN]: Likewise.
70 * system.h [IN_CTYPE_DOMAIN]: Likewise.
72 Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov)
74 * fmt.c (copy_rest): Don't copy past end of prefix. Output
75 trailing spaces if the prefix had any. Before, fmt would
76 improperly output NUL bytes. The command
77 perl -e 'print "| S";' |fmt -p' | '|tr '\0' @
78 output `|@S'. Reported by François Pinard.
80 * sort.c (main): Give a better diagnostic for `sort -0'.
81 Reported by Karl Berry.
83 * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
84 Otherwise, some systems lose because the value AC_C_INLINE choses
85 with plain `cc' is different from that chosen when using the ANSI-mode
86 C compiler. From Kaveh Ghazi.
88 Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov)
90 * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
91 * configure.in: Use it.
92 * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
93 (EXTRA_DIST): Add getopt.c and getopt1.c
95 * src/*.c, src/*.h: Update Copyright years to include 1996.
97 Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov)
99 * getline.c: New version from gettext-0.10.12.
100 * getline.h: Likewise.
101 * configure.in (AC_CHECK_FUNCS): Add getdelim.
102 Suggested by Ulrich Drepper.
104 * md5sum.c (md5_check): Remove spurious newline at end of error
107 * od.c (decode_one_format): Use printf's L modifier for long doubles,
108 not `l'. From Eric Backus.
110 * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
112 * od.c: Include <values.h>.
113 [!BITSPERBYTE]: Define.
114 [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
115 * configure.in (AC_CHECK_HEADERS): Add values.h.
117 Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov)
119 * Makefile.am (cvs-dist): New rule. Based on the one from
120 Tom Tromey's automake.
122 Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
124 * tail.c (main): Make code clearer: use new variable `n_files' in
125 place of `argc - optind'. Use `file' instead of `argv + optind'.
127 Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov)
129 * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
132 * memcasecmp.c: Unprotoize.
136 * join.c (decode_field_spec): Rename local variable `valid'
137 to invalid (and reverse sense) to avoid conflict with the
138 macro definition in /usr/include/locale.h on SunOS 4.1.3.
140 Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
142 * uniq.c: Add new option --ignore-case (-i).
143 Include memcasecmp.h.
144 (different): Compare with memcasecmp if ignoring case.
147 * join.c (memcasecmp): Remove static definition of function.
148 Include memcasecmp.h instead.
150 * memcasecmp.c: New file.
151 * memcasecmp.h: New file.
152 * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
153 (noinst_HEADERS): Add memcasecmp.h.
155 Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov)
157 * tr.c: The following commands all failed unnecessarily.
158 tr -cs '[:upper:]' '[X*]'
159 tr -dcs '[:lower:]' n-rs-z
160 tr -ds '[:xdigit:]' [:alnum:]'
161 tr -dcs '[:alnum:]' [:digit:]'
163 Reported by Ross Ridge (ross@worf.mks.com).
164 (validate): Add missing conjunct (translating) in test for
165 `translating and complementing character classes' error. Before,
166 valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
167 (homogeneous_spec_list): New function.
168 (validate): Use it to relax the old (overly restrictive) restriction
169 that prohibited use of complemented character classes when translating.
170 Now, that is allowed as long as the translation maps many to one.
171 (get_spec_stats): Rename and redefine global has_char_class from
174 Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov)
176 * aclocal.m4: Update NLS macros from gettext-0.10.11.
178 * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
179 when srcdir != builddir. From Kaveh Ghazi.
181 Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov)
183 * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
184 to be POSIX compliant. From Stephen Gildea <gildea@x.org>.
186 Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
188 * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
189 * od.c (skip, main): Likewise.
190 * tr.c (main): Likewise.
192 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
193 join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
194 tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
195 EXIT_FAILURE, rather than 0 or 1.
197 Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
199 * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
200 is defined to zero. Suggested by Paul Eggert.
202 * sort.c [SORT_FAILURE]: New macro.
203 Be careful to exit with 1 only when -c is used and the
204 input is not properly sorted. In all other cases, use
205 SORT_FAILURE as required by POSIX.
206 (main): Change some `error (1, ...' to use SORT_FAILURE.
207 Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
208 Replace all uses of `2' (as exit code) with SORT_FAILURE.
210 Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov)
212 * csplit.c: Include assert.h, but disable assertions.
213 (process_line_count): Replace if-abort with a slightly relaxed
214 assertion. Before, `echo |csplit - 1 1' would abort.
215 Reported by Samuli.Karkkainen@hut.fi.
216 (parse_patterns): Disallow uses like `csplit FILE 0' with zero
217 line number, `csplit FILE 2 1' with decreasing line numbers, and
218 warn about uses like `csplit FILE 3 3' that have equal line numbers.
220 * sort.c (main): Declare to be of type int, not void.
221 From Peter Seebach <seebs@taniemarie.solon.com>.
222 * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
223 nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
224 wc.c (main): Likewise.
226 Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov)
228 * configure.in (PACKAGE_VERSION): New macro.
229 * acconfig.h (PACKAGE_VERSION): Add it.
230 * src/Makefile.am: Remove rules for generating version.c.
231 Remove references to version.o, version.h, and stamp-v.
232 * version.c: Remove file.
233 * version.h: Remove file.
234 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
235 head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
236 sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
238 (main): Use PACKAGE_VERSION instead of version_string.
240 Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov)
242 * sort.c (write_bytes): Renamed from xfwrite.
243 Remove SIZE parameter. It was always 1. Update all callers.
244 Rename NELEM parameter to N_BYTES and change its type to size_t.
246 Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov)
248 * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
249 fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
250 split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
251 Initialize for internationalized message support: call setlocale,
252 bindtextdomain, and textdomain.
253 * system.h: Add definitions and includes for NLS.
254 * Makefile.am (SUBDIRS): Add intl and po.
255 * src/Makefile.am (datadir): Define.
257 (DEFS): Add LOCALEDIR definition.
258 (LDADD): Add @INTLLIBS@.
259 * aclocal.m4: Add NLS-related macro definitions from
260 gettext distribution.
261 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
262 HAVE_STPCPY): New macros.
263 Add PACKAGE and VERSION.
264 * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
266 (ALL_LINGUAS): Define.
267 (AC_CHECK_HEADERS): Add float.h.
268 (ud_GNU_GETTEXT): Use it.
270 (AC_OUTPUT): Reflect addition of two new directories, intl and po.
272 From François Pinard.
274 * tr.c (star_digits_closebracket): Declare formal param, IDX,
275 and local I to be of type size_t (rather than int) to avoid
276 warnings from gcc -Wall.
278 Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
280 * src/Makefile.am: Adapt for automake-0.30.
281 (noinst_HEADERS): Rename from HEADERS.
282 (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
283 to DEFS automatically.
284 * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
286 Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
288 * join.c (xfields) [without -t]: Ignore leading blanks.
289 From David Dyck (dcd@tc.fluke.COM).
291 Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
293 * join.c [TOLOWER]: Define.
294 (usage): Briefly describe new --ignore-case (-i) option.
295 (memcasecmp): New function.
296 (main): Set IGNORE_CASE for -i.
297 (keycmp): Compare with memcasecmp if IGNORE_CASE is set.
298 Suggestion and an initial patch from Alberto Accomazzi
299 <alberto@cfa0.harvard.edu>.
301 Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
303 * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'.
304 (usage): Describe it.
305 (main): Set eolchar to 0 for -z.
306 From Mark W. Eichin <eichin@cygnus.com>.
308 Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov)
310 * join.c (main): Mark two strings for translation.
311 * md5sum.c (md5_check): Mark a string for translation.
312 From François Pinard.
314 Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
316 Update for automake-0.29.
317 * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it.
318 * src/Makefile.am: Likewise.
319 * lib/Makefile.am: Likewise.
320 * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
321 * man/Makefile.am (man_MANS): Renamed from MANS.
323 * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
325 From Derek Clegg (dclegg@next.com).
327 Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov)
331 Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov)
333 * tail.c (dump_remainder): Flush stdout when tailing-forever on
334 multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>.
336 Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov)
338 * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
339 not just -Xc. From François Pinard.
341 * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is
342 distributed automatically. From Tom Tromey.
344 Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov)
346 * nl.c: Include rx.h after limit.h (not before) to avoid warning
347 about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects
348 its definition. From Kaveh Ghazi.
350 * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
351 works again. Reported by François Pinard and Kaveh Ghazi.
353 * rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
354 [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
355 (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
356 mismatch errors from e.g. SunOS's /bin/cc.
357 Reported by Kaveh Ghazi.
359 Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov)
361 * configure.in (VERSION): Set variable directly rather than from
363 * Makefile.am (DIST_OTHER): Remove VERSION.
364 * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
365 (stamp-v): New target; depend on Makefile.
366 (DISTCLEANFILES): Add stamp-v, version.c.
368 Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov)
370 * sort.c (keycompare): Rewrite cases handling ignored characters
371 so that they really are ignored. Reported by Carl Johnson
372 <carlj@cjlinux.home.org>.
374 Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
376 * configure.in: Touch stamp-h only if config.h is remade.
378 * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
381 Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com)
383 Use automake to generate Makefile.in files.
384 * Makefile.am: New file.
385 * doc/Makefile.am: New file.
386 * lib/Makefile.am: New file.
387 * man/Makefile.am: New file.
388 * src/Makefile.am: New file.
390 Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com)
392 * fmt.c (main): Use xstrtol instead of atoi.
394 * fold.c (main): Use xstrtol instead of atoi.
395 (fold_file): Make a couple locals `int', not size_t, and cast
396 fwrite's third parameter to size_t.
398 * nl.c (main): Use xstrtol instead of atoi.
399 Rename misleading --first-page=N option to --starting-line-number=N.
402 * uniq.c (main): Use xstrtol instead of atoi.
404 Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com)
406 * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.
408 Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com)
410 * aclocal.m4 (ud_WITH_REGEX): New macro.
411 * configure.in: Use it.
412 * rx.c, rx.h: New files.
413 * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o.
414 (SOURCES, DISTFILES): Add rx.c, rx.h.
415 * acconfig.h (WITH_REGEX): Add it.
416 * csplit.c [!WITH_REGEX]: Include rx.h.
417 * nl.c [!WITH_REGEX]: Likewise.
418 * tac.c [!WITH_REGEX]: Likewise.
419 From Ulrich Drepper and François Pinard.
421 Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com)
423 * sort.c (main): Diagnose invalid arguments to -k, then fail.
425 * sort.c (numcompare): Properly handle all cases in which signs differ.
428 * Makefile.in (mandir): @mandir@ is just $(prefix)/man.
429 Append `/man1'. Reported by Karl Heuer.
431 * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer.
433 * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi.
435 Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com)
437 * lib/Makefile.in (default): New target.
439 * sort.c (numcompare): Properly order `-' and valid integers;
440 treat `-' as if it were zero. Reported by Ross Alexander
441 <r.alexander@auckland.ac.nz>.
443 * Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
444 (.PHONY): Depend on default.
446 Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com)
448 * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
449 (jm_AUTODEPS): Likewise.
450 (jm_WITH_GNU_MAKE): Likewise.
451 * configure.in (jm_AUTODEPS): Remove.
453 * sort.c (begfield): Replace loop with equivalent if-else.
454 (limfield): Fix bug that made field specs like -k1.5 return a
455 pointer into LINE beyond the first field.
456 Don't try to trim trailing blanks here; it's not
457 possible because we don't know where the field begins.
458 Replace loop with equivalent if-else.
459 (trim_trailing_blanks): New function.
460 (findlines): Call it.
461 (keycompare): Likewise.
462 (main): Don't decrement T2 corresponding to `x' in field
463 specs like -ku.v,w.x.
465 Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com)
467 * csplit.c [!UINT_MAX]: Define.
470 (string_to_number): Remove function.
471 (check_for_offset): Use xstrtoul instead of string_to_number.
472 (parse_repeat_count): Likewise.
473 (parse_patterns): Likewise.
476 Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com)
478 * Makefile.in (all et. al.): If make was invoked with -k and a
479 sub-make fails, fail after the loop rather than exiting right away.
480 Otherwise, make's -k option could be ineffective.
482 Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com)
484 * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.
486 Update for autoconf-2.5:
487 * src/Makefile.in (libdir): Set to @libdir@.
488 (bindir): Set to @bindir@.
489 * doc/Makefile.in (infodir): Set to @infodir@.
490 * man/Makefile.in (exec_prefix): Remove it.
491 (mandir): Set to @mandir@.
494 Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com)
496 * Makefile.in (default): New default target. Depend on `all' to
497 work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik
500 Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com)
502 * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.
504 * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
505 * src/Makefile.in (C_MKDEP): Rename from MKDEP.
506 * lib/Makefile.in (C_MKDEP): Likewise.
507 * mkdep-Makefile (C_MKDEP): Likewise.
510 * csplit.c [__P]: Don't define it here.
511 * pr.c [__P]: Don't define it here.
512 * fmt.c [__P]: Don't define it here.
513 * system.h [__P]: Define it here.
515 * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
516 Revamp, with suggestions from Franc,ois Pinard.
517 (jm_WITH_GNU_MAKE): New macro.
518 (jm_PROG_MKDEP): New macro.
519 * configure.in (jm_PROG_MKDEP): Use it.
520 * src/Makefile.in (MKDEP): Set it.
521 * lib/Makefile.in (MKDEP): Likewise.
522 * mkdep-Makefile: Use MKDEP, not DEP_CC.
523 (DEP_CFLAGS): Remove it.
525 Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
527 * sort.c: Add support for sorting numbers in scientific notation.
529 (struct keyfield): Add field: general_numeric.
530 (usage): Describe -g option.
531 (general_numcompare): New function.
532 (keycompare): Use new comparison function when general_numeric
534 (set_ordering): Honor `g' flag.
535 (main): Initialize and use new field.
536 From Marcus Daniels <marcus@sysc.pdx.edu>.
538 * configure.in (AC_REPLACE_FUNCS): Add strtod.
539 * lib/Makefile.in (SOURCES): Add xstrtod.c.
540 (OBJECTS): Add xstrtod.o.
541 (DISTFILES): Add xstrtod.h.
543 * csplit.c (cleanup): Don't exit.
544 (interrupt_handler): Rewrite to reset default signal handler
545 then repost caught signal.
546 (xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
547 process_line_count, process_regexp, create_output_file,
548 close_output_file): Call cleanup_fatal, not cleanup.
549 Add const attribute to lots of parameters.
550 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
553 * tac.c: (cleanup): Don't exit.
554 (cleanup_fatal): New function. Call cleanup, then exit.
555 (sighandler): New function.
556 (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
558 (tac_stdin): Set up sighandler as signal handler, not `cleanup'.
560 Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com)
562 * od.c (skip): Cast fseek's offset argument to `long'.
563 Erik Bennett <bennett@cvo.oneworld.com> reported that this is
564 necessary on BSDI systems. And if offset doesn't fit in a long,
565 then try using lseek instead.
567 * sort.c (xmalloc): Declare static.
568 (xrealloc): Likewise.
570 * tac.c (cleanup): Add signal number parameter.
573 * cat.c (main): Don't die when dev/ino of input and output are
574 the same and the file descriptors correspond to stdin and stdout.
575 This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
576 Otherwise, running `cat << X > $$' would fail with `cat: -: input
577 file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>.
579 * Makefile.in (DISTFILES): Add @README_ALPHA@.
580 (config.status) Depend on VERSION.
581 * configure.in: Set README_ALPHA if the version number ends in [a-z].
583 Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com)
585 * fold.c (usage): Clarify meaning of --spaces. From Karl Berry.
587 src/Makefile.in (.c._c): Don't redirect directly to $@.
588 (._c._o, .c._o): Remove temporary src file.
590 Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com)
593 * configure.in (VERSION): New variable.
594 (PACKAGE): New variable.
596 * Makefile.in (DISTFILES): Add VERSION.
597 (distdir): Use @PACKAGE@-@VERSION@, not distname.
598 Remove all references to distname.
599 * src/Makefile.in (version.c): Generate it.
600 (SOURCES): Remove now-generated version.c.
601 (distclean): Delete version.c.
602 * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@,
605 * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname.
606 Remove all references to distname.
608 * split.c: New option: --verbose.
609 (main): Recognize it.
610 (usage): Document it.
611 From Marty Leisner <leisner@sdsp.mc.xerox.com>.
613 Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com)
615 * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
619 (store_columns): Remove spurious 2nd argument in call to read_line.
620 [__P]: Define. Use it in prototyped forward decls.
622 * csplit.c: Move prototypes after struct declarations.
623 Remove prototypes for xmalloc, xrealloc.
624 Protect prototypes with __P.
625 (new_control_record): Cast arg 1 to realloc.
627 * fmt.c [__P]: Test PROTOTYPES, not __STDC__.
630 Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com)
632 * csplit.c (close_output_file): Set output_stream to NULL so we
633 don't recurse endlessly between this function and cleanup.
635 * unexpand.c: Reorder functions to obviate forward dcls. Remove
636 forward dcls. Protoize. Add `const' attribute to some parameters.
638 Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com)
640 * wc.c: Reorder functions to obviate forward dcls. Remove
641 forward dcls. Protoize. Add `const' attribute to some parameters.
645 * split.c (isdigits, convint): Remove these.
646 (main): Use xstrtol instead.
648 Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com)
650 * paste.c (main): Move function body to end of file.
651 Remove forward dcls and protoize.
652 * sum.c (main): Likewise.
653 * nl.c: Protoize. Reorder functions to obviate forward dcls.
656 * src/Makefile.in (OBJECTS): Reflect that all of the above
659 * sum.c (bsd_sum_file): Give file name parameter const attribute.
660 (sysv_sum_file): Likewise.
662 * tac.c (xwrite): Give output buffer parameter const attribute.
663 (output): Likewise for both parameters.
664 (tac): Likewise for file name parameter.
665 (tac_file): Likewise.
667 Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com)
669 * md5sum.c (md5_check): Use the same message format when there is
670 a single file and it gets a read error or checksum mismatch as when
671 there are more. Write that warning to standard error, not standard
672 output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com).
674 Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com)
676 * sort.c (xtmpfopen): New function to set proper permissions on
677 temporary files. Use it instead of xfopen. Reported by Erik Corry
678 (erik@kroete2.freinet.de).
680 Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com)
682 * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
683 * configure.in: Use it.
685 * lib/Makefile.in (INCLUDE, COMPILE): New variables.
686 (.c.o): Rewrite to be more like src/Makefile.in.
688 * src/Makefile.in (distclean): Remove .deps.
689 Include @top_srcdir@/mkdep-Makefile.
691 * mkdep.Makefile: New file.
692 * Makefile.in (DISTFILES): Add mkdep-Makefile.
693 * doc/Makefile.in (mostlyclean): Also remove *.info.
695 Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com)
697 * od.c: Indent cpp directives.
699 * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
700 with large repeat counts.
701 (struct E_string): New struct.
702 (find_closing_delim): Take E_string arg rather than char* and length.
703 (find_bracketed_repeat): Likewise.
704 (star_digits_closebracket): New function.
705 (append_char_class): No longer give diagnostic.
706 (append_equiv_class): Likewise.
707 (build_spec_list): Give them here instead, allowing string1 like
708 [:*][:upper:] that got errors before.
709 Take E_string arg rather than char*.
710 Convert switch stmts into if-then so as to use ES_MATCH.
712 Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com)
714 * cat.c: Protoize. Reorder functions to obviate forward dcls.
716 * expand.c: Likewise.
723 * src/Makefile.in (OBJECTS): Reflect that all of the above
726 * head.c: Add `const' attribute to dcls of lots of formals.
728 * sort.c: Add `const' attribute to dcls of lots of formals.
729 Move struct dcls to precede dcls of file-scope variables.
730 (monthtab, keyhead): Separate variable dcls from type dcls.
732 Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com)
734 * join.c (add_field_list): Allow SPACE and TAB as well as `,' as
735 list item separators, per POSIX spec.
736 (prjoin): Rewrite loop that iterates over field specs.
737 Handle case in which file spec is 0.
739 Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com)
741 * strpbrk.c: New file.
742 * lib/Makefile.in (SOURCES): Add strpbrk.c.
745 Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com)
747 * join.c (add_field): No longer return a value.
748 (decode_field_spec): New function.
749 (add_field_list): Rewrite to be more strict.
750 Before, `,1.2' was accepted as valid.
751 (main): Use xstrtol instead atoi.
752 Combine nearly identical -a and -v cases.
755 Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com)
757 * join.c (main): Report `too few/many non-option arguments'
758 then print --help output rather than just the latter.
759 Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
760 (usage): Describe POSIX -1, -2 options and deprecate -j* ones
762 * join.c (usage): Move to precede all other functions.
766 Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com)
768 * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
769 to determine whether `sigaction' functions are available.
770 Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
771 Fix suggested by Karl Berry.
773 * md5sum.c (main): Declare counter, N_STRINGS, to be an integral
776 * cut.c: Convert many declarations using `int' to use `unsigned int'
777 to avoid warnings from `gcc -Wall' about comparing signed and
779 (set_fields): Use memset (not open coded loop) to initialize array.
781 Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com)
785 * Makefile.in (DISTFILES): Remove README.alpha for major release.
787 * od.c (decode_one_format): Remove spurious semicolon.
788 From John Kodis (kodis@daacdev1.stx.com).
790 Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com)
792 * man/Makefile.in (install-data, uninstall): Use sed not basename.
793 The GNU Coding Standard suggests that only a select set of
794 relatively standard utilities be used in Makefiles. basename is
795 not among them. Suggested by Ulrich Drepper.
797 Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com)
802 * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
804 (cksum): Depend on cksum$O.
805 (cut): Depend on cut$O.
807 Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
811 * Makefile.in (DISTFILES): Add README.alpha.
813 * lib/Makfile.in: (GETOPT, MEMCHR, REGEX): New variables.
814 (OBJECTS): Use them instead of hardcoding object file names.
815 Suggested by Ulrich Drepper.
817 * md5sum.c (md5_check): Distinguish between open/read failure
818 and checksum mismatch.
820 Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com)
822 * md5sum.c: Protoize.
823 * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
824 (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
825 (md5sum): Depend on md5sum$O.
827 * md5sum.c (main, usage): Remove -h, -s, -v short options.
828 Rename --verbose to --warn, --quiet to --status.
829 (main): Handle --help and --version using parse_long_options.
830 (md5_check): Check ferror.
832 * sort.c (tempname): Replace `16' with a more readable expansion.
833 Make sure that counter never exceeds 99999.
834 (checkfp): Rearrange loop to avoid duplicate test.
835 Move a couple dcls from function scope into inner block.
837 Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com)
839 * md5sum.c (main): Fail if either --verbose or --quiet is specified
840 when not verifying checksums.
842 * md5sum.c (md5_check): Fail if no valid line is found.
843 Don't use the word `fail' unless there were failures --
844 instead, say `all N tests passed.'
846 * md5sum.c (main) [handling --string option]: Don't output
847 nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com).
848 * md5-test.rfc: Remove now-inconsistant `b' marker.
849 (usage): Clarify help message. With suggestions from Greg Troxel.
851 Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
853 * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
854 compiler warning. From Ulrich Drepper.
856 * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
857 compiler warning. From Ulrich Drepper.
859 * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
862 Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com)
864 * system.h (_): Define macro -- as empty for now.
865 * src/*.c: Annotate localizable strings with _(...). From Franc,ois.
867 Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com)
871 * configure.in: Add fp_C_PROTOTYPES.
873 Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com)
875 * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
876 Add suffixes, dependencies, and rules to convert ANSI source to K&R
877 when required. Mark tr.o and comm.o as the only such files (for now).
882 * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
883 (configure): Depend on aclocal.m4.
884 (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
886 Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
888 * md5sum.c (md5_check): Use getline instead of fgets.
890 * lib/Makefile.in: (SOURCES): Add getline.c.
891 (OBJECTS): Add getline.o.
892 (DISTFILES): Add getline.h.
893 (getline.o): Depend on getline.h.
895 * md5.c [memcpy]: Define to bcopy if needed.
896 (md5_buffer): Explicitely cast SWAP expressions to unsigned
899 * lib/Makefile.in (strtoul.o): Depend on strtol.c.
901 * sort.c (check): Print `disorder on...' message on standard error,
902 not stdout. This is a minor concession to POSIX which says
903 `no output shall be produced...'.
905 * sort.c (main): Fix -k so it works. -k 2,3 was being treated
906 like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
908 Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com)
910 * man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
911 before applying $(transform) to manual name. From Karl Berry.
913 * md5sum.c (have_read_stdin): New global variable.
914 (md5_file, md5_check): Set it.
917 * md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
918 (md5_file): Take a new parameter, MD5_RESULT, and no longer
920 (md5_check): Invoke md5_file instead of calling fopen directly.
921 When giving a diagnostic for a line with invalid format, also report
923 (main): Generate output after a successful md5_file call.
924 [in many places]: Upon detection of an error, rather than exiting
925 immediately, issue a diagnostic, note that an error occurred and
928 Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com)
930 * tail.c (tail_bytes) [from_start]: For regular files, seek
931 relative to the initial input file pointer position, not
932 necessarily from the beginning of the file.
933 [!from_start]: Don't back up past the initial position of the
935 (tail_lines): Call file_lines only if FD refers to a regular file
936 with its file pointer positioned at beginning of file. Otherwise,
937 call pipe_lines. This is a kludge. Once there's a decent test
938 suite, fix this properly.
939 Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
940 would output both lines of the input file even though the first had
941 already been read. Reported by John Roll (john@panic.harvard.edu).
943 * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.
945 * csplit.c (main): When too few arguments are given, don't just
946 issue the usage message; also report why.
948 Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com)
950 * md5sum.c (md5_check): New function -- extracted from main.
952 Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
954 * md5sum.c (md5_file): New function -- extracted from main.
955 (main): Call the new function instead of doing all that in an
956 if-stmt. Always use "%s" format rather than raw filename as
957 format argument in printf-style functions like error. Otherwise,
958 filenames containing `%' are likely to lose.
959 Remove all mention of `old format'.
960 (split_3): No longer parse the `new format.' There is only one
961 valid format now: the compatible one.
963 * lib/Makefile.in: (SOURCES): Add md5.c.
964 (OBJECTS): Add md5.o.
965 (DISTFILES): Add md5.h.
966 (md5.o): Depend on md5.h.
968 * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
969 * lib/md5.c (md5_stream): Check for read failure and return
970 indication of success rather than second argument.
971 * lib/md5.h (md5_stream): Update prototype.
973 * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
974 (main): Report an error if md5_stream fails. Otherwise, running
975 `md5sum dir-on-mounted-filesystem' always reported the checksum
976 for an empty file. Now it gets the `is a directory' error.
977 Greg McGary (gkm@magilla.cichlid.com) reported that the released
978 version got stuck in an infinite loop with such arguments.
980 * lib/md5.c: New file.
981 * lib/md5.h: New file.
982 * md5sum.c: Rewritten to use library interface.
985 Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com)
987 * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.
989 Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com)
991 * md5sum.c Add #else block after #ifdef VMS.
992 (main): Rename local variable.
993 Add FIXME: allow newlines in filenames.
994 Detect and report failed fclose calls on stdout and checkfile_stream.
996 * tr.c (unqote): Comment out unreachable break stmts.
997 (append_range): Declare FIRST and LAST parameters to be unsigned int,
999 (find_closing_delim): Clean up interface, separating boolean success
1000 indicator and index.
1001 (find_bracketed_repeat): Likewise.
1002 (build_spec_list): Adapt to use new interfaces.
1003 Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
1004 type size_t, not int.
1005 (main): Declare NR and CHARS_READ to be of type long, not int.
1007 * sort.c (main): Comment out unreachable break stmt.
1009 * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
1010 call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type
1011 off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
1012 long. Reported by Dan Hagerty (hag@gnu.ai.it.edu).
1014 * comm.c: Reorder functions so main is last, so no forward dcls
1017 Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com)
1019 * sort.c (main): When using obsolescent +pos -pos syntax, allow
1020 omission of field spec only when character offset is specified.
1021 Otherwise, -. +. would be accepted.
1023 Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com)
1025 * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
1026 position specification. For compatibility with existing practice
1027 (what vendors?), omitting M is now equivalent to specifying `0' for M,
1028 but only when using the +pos -pos syntax, not with the -k option.
1029 From Rick Sladkey (jrs@world.std.com).
1031 Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com)
1033 * od.c (dump): Correct loop-termination criterion.
1034 Before, running `printf 1234| ./od --width=4 --read-bytes=4'
1035 printed output for 8 bytes -- the last four were garbage.
1036 This happened only when the dump limit, N, was specified (with
1037 --read-bytes=N) and N was a multiple of bytes_per_block
1038 (usually 16, but 4 in this example). From Andreas Schwab.
1040 Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com)
1042 * lib/Makefile.in (check): Depend on libtu.a.
1044 * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
1045 (main): Print each sum line in (de facto) standard Plumb/Lankester
1047 New option: --quiet.
1048 Check option no longer takes an argument.
1049 When checking, exit status reflects success.
1051 Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com)
1053 * md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
1054 Autoconf (via config.h) defines it away for compilers that don't
1057 * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
1058 defining to avoid redefinition warning on some systems.
1060 * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
1061 This avoids potential conflict with max macro from some system's
1062 header files when using bad pre-ANSI compilers.
1064 * uniq.c (usage): Fix typo in text of --help output.
1065 From Steve McConnel <steve@acadcomp.sil.org>
1067 * md5sum.c [uint32]: When testing for 32-bit arithmetic type,
1068 also check `unsigned long', as a concession to systems with
1069 int's smaller than 32 bits.
1071 * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
1072 AC_FUNC_MEMCMP already handles it. This avoids warnings from
1073 ranlib on nextstep systems. From Kaveh Ghazi.
1075 * csplit.c (interrupt_handler): Declare to have a single integer
1076 parameter. Otherwise, some compilers fail with a type mismatch
1077 error in sa_handler assignment.
1079 * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with
1080 headers that typedef `word' get syntax errors because of the
1081 variable by the same name.
1083 * join.c [join]: Redefine to avoid conflict with prototype in some
1084 system header file. Also for Unicos.
1086 * md5sum.c (main): Remove spurious colon in getopt spec string.
1087 From Ken Pizzini <kenp@spry.com>.
1089 Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com)
1091 * md5sum.c (md5_file): Initialize two elements of LEN portably,
1092 rather than with ANSI aggregate initialization. Reported by
1093 Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
1095 Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com)
1099 * md5sum.c (process_buffer): Copy values from struct into
1100 individual local variables before performing computation on them,
1101 then copy results back into returned struct. Solely for better
1102 optimization by compilers that can't keep struct members in
1103 registers. From Ulrich Drepper.
1105 Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com)
1107 * md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
1108 Don't use #elif. Some older compilers don't grok it.
1109 (split_3): New function to parse out sum, flag, and filename
1110 when reading check file.
1111 (hex_digits): Remove length parameter since string parameter is
1113 (main): Don't allocate separate arrays for filename and sum
1114 when checking. Get pointers into line buffer with split_3 instead
1116 (main): Treat `no file args' just like `-' when not checking
1118 (hex_digits): Unprotoize.
1120 * md5sum.c (main): Don't use a separate loop to convert to lower
1121 case. Suggested by Ulrich Drepper.
1124 From Ulrich Drepper.
1126 * md5sum.c: Don't include values.h.
1129 * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
1130 and _POSIX_VERSION. Reported by Arne H. Juul.
1132 Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com)
1134 * tr.c [NDEBUG]: Define it to disable assertions. Some systems
1135 have a broken <assert.h> header.
1136 (is_char_class_member): Set a variable in each branch of switch
1137 stmt and return that value after the switch (rather than returning
1138 directly from every branch).
1139 (unquote): More int->size_t changes.
1140 (build_spec_list): More int->size_t changes.
1141 Be very careful about comparison now that variables are unsigned:
1142 Use i + 2 < len rather than i < len - 2. The latter didn't work
1143 for len < 2. Caught early thanks to a thorough regression test
1146 Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com)
1148 * sort.c (xfclose): Don't try to flush stdin, only stdout.
1149 Otherwise, at least Ultrix-4.3's fflush would return EOF.
1150 Reported by Jim Blandy (jimb@cyclic.com).
1152 * tr.c (non_neg_strtol): Don't compare signed and unsigned.
1153 [struct Spec_list] (indefinite_repeat_element): New member.
1154 Use size_t rather than int or unsigned long where reasonable.
1155 (get_spec_status): Make interface cleaner.
1156 (get_s1_spec_status): New function.
1157 (get_s2_spec_status): New function.
1158 (validate): Use new functions instead of get_spec_status.
1160 Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
1162 * md5sum.c: New file. From Ulrich Drepper.
1163 * md5-test.rfc: New file.
1164 * Makefile.in: (PROGS): Add md5sum.
1165 (check): Run a recursive make in each subdirectory.
1166 * man/Makefile.in: (MANFILES): Add md5sum.1.
1167 * src/Makefile.in: (SOURCES): Add md5sum.c.
1168 (OBJECTS): Add md5sum.o.
1169 (PROGS): Add md5sum.
1170 (check): Add basic checks for md5sum.
1171 (md5sum): Add dependency and link rule.
1172 (DISTFILES): Add md5-test.rfc.
1174 * tr.c (look_up_char_class, append_char_class, append_equiv_class):
1175 Use const attribute when appropriate.
1177 Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com)
1179 * join.c: Overhauled to make -a1 and -a2 options work.
1180 Passed all tests in a fairly thorough test suite.
1181 Reported by Michael Hasselberg (mikelh@zonta.ping.de).
1183 Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com)
1185 * tail.c (main): Remove dcl of and statements that set now-unused
1188 * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
1189 Without this, SunOS doesn't get type for memchr.
1190 Reported by Kaveh Ghazi.
1192 Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com)
1194 * tail.c (tail_lines): Change one more `long' to `off_t'.
1195 Otherwise, tail didn't work on NetBSD. From Arne H. Juul.
1197 * csplit.c [struct control]: Change type of `repeat' to unsigned
1198 long to avoid conversion warning.
1200 Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com)
1202 * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois.
1204 * xstrtol.c (__strtol): Remove prototype altogether.
1205 Move inclusion of xstrtol.h back so that it follows system headers.
1209 Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com)
1211 * join.c (ADD_FIELD): Declare in K&R style, not ANSI.
1214 * xstrtol.c: Define NDEBUG for systems with losing assert.h.
1215 (__strtol): Add __unsigned to prototype and use __P.
1216 Move inclusion of xstrtol.h to precede prototype.
1219 * memmove.c: Include config.h for definition of const.
1222 * All Makefile.in (install-exec, install-exec): New targets.
1225 * tr.c (look_up_char_class): Take a string length argument -- required
1226 because the argument is a string that is *not* NUL-terminated.
1227 Use strncmp, not strcmp and add string lengths comparison.
1228 (append_char_class): Update caller. Before this change,
1229 tr '[:upper:]' '[:lower:]' read one uninitialized byte.
1230 From Andreas Schwab.
1232 * split.c (next_file_name): Move dcls of file-scope variables into
1233 this function. Don't rely on arithmetic being two's complement.
1235 * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
1236 Instead, declare two FILE structs and use their addresses.
1238 * csplit.c (record_line_starts): Remove set-but-not-used,
1239 file-scope variable.
1241 Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com)
1243 * all source files (usage): Include one- or two-line synopsis
1244 in --help output. From Karl Berry.
1246 * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
1249 Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com)
1253 Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com)
1255 * all Makefile.in (maintainer-clean): Renamed from realclean
1258 Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com)
1260 * sort.c (main): Use stat, not safe_stat. The latter was unnecessary.
1261 Don't include safe-stat.h.
1263 * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
1264 Remove all associated rules. safe-l?stat.h are no longer used.
1266 * sort.c Don't hard-code /tmp.
1267 [DEFAULT_TMPDIR]: Use this instead.
1268 * tac.c (save_stdin): Likewise.
1270 * sort.c (set_ordering): Properly parse arguments like `+x.yn'.
1271 Reported by John Salmon (johns@mullet.anu.edu.au).
1272 Patch from Mike Haertel.
1274 Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com)
1276 * sort.c (tempname): AND-off high bits of pid so that its decimal
1277 string representation is no longer than five digits.
1278 From Hans Verkuil (hans@wyst.hobby.nl).
1280 Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
1282 * expand.c (add_tabstop): Give correct size when reallocating
1283 tab_list buffer. From Geoff Odhner (geoff@franklin.com).
1284 Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.
1286 Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
1288 * configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
1289 unnecessary conflicts for people using version control software
1291 (AC_ARG_PROGRAM): Use it.
1293 Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com)
1295 * head.c: Remove block of redundant comments describing options.
1296 (usage): Remove reference to -l option. It's not valid.
1298 * od.c (write_block): Declare index I as unsigned int, not int.
1299 (get_lcm): Likewise.
1300 (dump_strings): Likewise.
1302 (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
1303 (dump_strings): Declare bufsize to be of type size_t, not int.
1305 * split.c (next_file_name): Don't reuse X as an index.
1306 Declare new variable I instead.
1308 Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com)
1310 * csplit.c: Declare as `unsigned int' all variables that were
1312 (make_filename): Change type of arg to unsigned int.
1313 (split_file): Change type of indices to unsigned int.
1315 Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com)
1317 * od.c (main): Detect and fail when argument to -N is too large
1320 Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com)
1322 * configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
1323 Remove check for sizeof long.
1325 * linebuffer.h: Undefine __P before defining it.
1326 * long-options.h: Likewise.
1327 * xstrtol.h: Likewise.
1329 * memcpy.c: New file.
1330 * lib/Makefile.in (SOURCES): Add memcpy.c.
1332 Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com)
1334 * src/*.c: Update Copyright dates.
1336 Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com)
1338 * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
1339 Separate errno declaration from STDC_HEADERS.
1341 * wc.c (wc): For efficiency, handle separately the cases in which
1342 words need not be counted. Suggested by Karl Heuer.
1344 * wc.c (wc): Don't overcount the number of bytes when reading
1345 from a regular file on stdin with file pointer not at BOF.
1346 From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command
1347 `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
1348 the size of the file. Now it outputs `0'.
1350 Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com)
1352 * cat.c (cat): Use memmove rather than bcopy.
1353 * csplit.c (load_buffer): Use memcpy rather than bcopy.
1354 (extract_regexp): Use strrchr, not rindex.
1355 * fmt.c (isopen, isclose, isperiod): Use strchr, not index.
1356 (flush_paragraph): Use memmove instead of bcopy.
1357 * fold.c (fold_file): Use memmove instead of bcopy.
1358 * od.c (decode_format_string): Use memmove instead of bcopy.
1359 [EQUAL_BLOCKS]: Use memcmp, not bcmp.
1360 (parse_old_offset): Use strchr, not index.
1361 (dump): Use memset, not bzero.
1362 * sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
1363 (fillbuf): Use memmove instead of bcopy.
1364 * split.c (main): Use memset, not bzero.
1365 (line_bytes_split): Use memmove instead of bcopy.
1366 * tac.c (tac): Use memmove instead of bcopy.
1367 (output): Use memcpy instead of bcopy.
1368 * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
1369 * tr.c (substr): Use memcpy instead of bcopy.
1370 (card_of_complement, set_initialize): Use memset, not bzero.
1372 * tr.c (substr): Don't allocate a byte for trailing NUL in result
1373 since the result needn't be NUL-terminated. Don't NUL terminate it.
1375 * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
1377 (AC_CHECK_FUNCS): Add strchr and strrchr.
1379 * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
1380 * memmove.c: New file.
1381 * memcpy.c: New file.
1383 Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com)
1385 * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph
1386 not followed by a newline would be followed by data copied from
1387 uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
1388 Reported by Franc,ois Pinard.
1390 * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead.
1391 AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
1392 Be careful to use off_t instead of explicit `unsigned long'.
1393 Otherwise, systems like 4.4BSD lose on calls to fseek that
1394 expect off_t (which is long long on that system).
1395 (parse_old_offset): Use xstrtoul
1398 * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.
1400 Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com)
1402 * tail.c (numerous functions): Give char* filename arguments the
1405 * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used.
1406 Add xstrtol.c and xstrtoul.c.
1407 (OBJECTS): Likewise for .o files.
1408 (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.
1410 * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
1411 (distclean): Remove references to safe-l?stat.c.
1412 Remove all related rules and dependencies.
1414 * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.
1416 Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com)
1418 * tail.c (tail_file): Fix call to error with %s in format, but
1419 no corresponding argument.
1421 * src/*.c: Include "error.h" instead of simply declaring
1423 * od.c (main): Use %lu, not %d for unsigned long.
1424 (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul
1425 and STRTOL_FATAL_ERROR instead.
1427 Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com)
1429 * sort.c (main): Fix interpretation of field offsets when specified
1430 via -k option. They were being interpreted as zero-indexed. POSIX
1431 says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>.
1432 (keycompare): Don't ignore characters at the end of words when
1433 otherwise they would compare equal. From Rik Faith.
1435 * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
1436 to off_t because n_bytes is used as the option to fseek and off_t may
1437 be long long (e.g. on BSD4.4). The only place where a 32-bit limit is
1438 imposed is in the string-to-integer converstion of xstrtol.
1439 (main): Use xstrtol instead of manual string to integer conversion.
1441 * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
1442 comparisons against '0' and '9'.
1444 * tr.c [!ULONGMAX]: Define it.
1445 [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.
1447 * full-write.c: Declare (or not) errno based on definedness or
1448 errno, not STDC_HEADERS.
1449 * safe-read.c: Likewise.
1450 * xwrite.c: Likewise.
1452 Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com)
1454 * tail.c (dump_remainder): Flush standard output just before
1455 sleeping so that `tail -f' will output partial lines sooner.
1456 This applies only when following the end of a single file.
1457 From Leonard N. Zubkoff <lnz@dandelion.com>.
1459 * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
1460 start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
1462 * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
1463 * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
1464 not already defined.
1466 Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com)
1468 * tr.c: Include <getopt.h> instead of "getopt.h".
1470 * sort.c (tempname): Merge two very similar sprintf stmts into one.
1472 * tail.c: Use BUFSIZ instead of BUFSIZE.
1474 * cut.c: Declare DELIM to be `int' rather than unsigned char.
1476 * fmt.c: Use index, not strchr -- per GNU Standards.
1477 Reported by Kaveh Ghazi.
1478 Always include <config.h>.
1479 (main): Include program name in --version output.
1481 Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com)
1485 Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com)
1487 * memcmp.c, srtoul.c: Use up-to-date versions.
1488 Reported by Franc,ois Pinard.
1490 * src/Makefile.in (DEFS): Remove -Dlint... again.
1492 * src/Makefile.in (PROGS): Add fmt!
1493 Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU).
1495 Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com)
1499 Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com)
1501 * linebuffer.h: Use __P instead of _P since the latter conflicts
1502 with a definition in some <ctype.h>. From Kaveh Ghazi.
1504 Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com)
1506 * tr.c: Add const attribute where appropriate.
1508 * tail.c (BUFSIZ): Use definition from <stdio.h>.
1510 Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com)
1512 * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
1513 n_bytes is positive. Turn off assertions. `tail /dev/null' was
1514 getting a failed assertion. Reported by Doug McLaren
1517 * cut.c (cut_bytes): Print at least a newline for every line of input.
1518 (cut_fields): Print a newline even for lines whose only selected
1519 field is empty. But print nothing when using -s without -f1.
1520 And print nothing for empty input. Reported by
1521 Richard_Sharman@software.mitel.com.
1523 Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com)
1525 * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
1526 * linebuffer.h: Likewise.
1528 Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com)
1530 * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
1531 already handles it. From Kaveh Ghazi.
1533 * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems
1534 get failures when it's defined. From Kaveh Ghazi.
1536 * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not
1537 defined on some Next and Alliant systems. From Kaveh Ghazi.
1539 * sort.c join.c (main): Include version.h and call parse_long_options
1540 with the proper number of arguments. Reported by Franc,ois Pinard.
1542 Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com)
1544 * (configure.in): Add AC_OFF_T and rearrange by type along the
1545 same lines as autoscan.
1547 * fmt.c, fmt.1: New files.
1548 Both from Ross Paterson (rap@doc.ic.ac.uk).
1550 * Makefile.in (PROGS): Add fmt.
1551 * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
1552 (fmt): Add a link rule.
1553 * man/Makefile.in (MANFILES): Add fmt.1.
1555 Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com)
1557 * Makefile.in (All of them): Update from the ones in sh-utils.
1558 From now on, rules and definitions that are comon to the fileutils,
1559 textutils, and sh-utils will get ChangeLog entries only in the
1562 Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com)
1564 * od.c (my_strtoul): Set errno to zero before calling strtoul.
1565 Otherwise, od can fail complaining about a valid integer argument.
1566 From Andreas Schwab.
1568 Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com)
1570 * tr.c (main): Give an error and fail when squeezing repeats
1571 and no non-options are given. Reported by Tony Robinson
1572 (ajr@eng.cam.ac.uk).
1574 * sort.c (main): Temporarily copy each input file that might be
1575 another name for the output file. When in doubt (e.g. a pipe),
1576 copy. This allows the dangerous (historical -- in cnews) idiom
1577 `cat file | sort -o file' to work properly. Don't rely on this
1578 behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com).
1580 Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
1582 * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
1583 Remove CONFIG_BROKETS ifdef.
1584 * src/Makefile.in lib/Makefile.in: Don't define it.
1586 Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com)
1588 * full-write.c (full_write): Declare argument LEN to be size_t.
1590 Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com)
1592 * tail.c (tail_file): [For multiple files only]: Report truncation
1593 of monitored file and reset current file size. From Franc,ois Pinard.
1595 Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com)
1597 * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
1598 From Franc,ois Pinard.
1600 Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com)
1602 * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
1603 decides whether to include <fcntl.h>. From Francois Pinard.
1605 Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com)
1607 * tr.c (substr): Fix off-by-one allocation error.
1609 Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com)
1611 * tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
1612 (tac): Fix typo that had `1' as arg #2 of error after failed read.
1613 Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>.
1615 Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com)
1617 * configure.in [INSTALL]: Revert change of March 25. autoconf
1620 Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com)
1622 * join.c (prline): Remove unused function. Indent.
1624 Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com)
1626 * tail.c (tail_forever): Don't print headers when asked not to.
1627 From Karsten Thygesen <karthy@kom.auc.dk>.
1629 * wc.c (wc): Optimize for the case when only bytes are being counted
1630 and the input is not a regular file. From Jeff Moore <jbm@mordor.com>.
1632 Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com)
1634 * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
1635 * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.
1637 Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com)
1639 * csplit.c (struct control): Add new field, repeat_forever.
1640 Remove now-unneeded definition of INT_MAX.
1641 (process_regexp): Test repeat_forever instead of comparing `repeat'
1643 (split_file): Don't even reference `repeat' count if repeat_forever
1645 (new_control_record): Initialize repeat_forever field.
1646 (parse_repeat_count): Set it instead of setting repeat count to
1648 (process_line_count): Abort for internal error instead of calling
1651 * long-options.c (parse_long_options): Take a new argument indicating
1652 the utility name (e.g. "join", not "gjoin") for version output.
1653 Print both the utility and the package names, e.g. `join - GNU
1654 textutils-1.9.1' instead of just the package name.
1656 * join.c (main): Call parse_long_options with program name arg.
1657 * sort.c (main): Ditto.
1659 * All source except sort.c and join.c (main): Change --version output
1660 to include utility name as well as package name and version info.
1662 Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com)
1664 * configure.in: Use AC_SET_MAKE.
1665 * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
1667 Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com)
1669 * tr.c (main): In addition to the --help usage pointer, give an
1670 explicit error message for too many arguments.
1672 Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com)
1674 * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
1675 of explicit echo commands.
1676 [INSTALL]: When AC_PROG_INSTALL resorts to setting this to
1677 `./install.sh', make it `../install.sh' instead since that
1678 script will be invoked only from subdirectories.
1679 [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.
1681 * cat.c (cat): The command `:|cat -s' failed on Irix5 because
1682 ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
1683 it returned EINVAL. Detect this.
1684 (main) [lint]: Initialize variables to suppress `used before
1685 initialized' warnings.
1687 * csplit.c: Change long option name from --suffix to --suffix-format.
1689 * od.c (skip): Correct a comment.
1690 (main): Don't output anything to stdout if the sole input file
1691 doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>.
1693 * od.c (dump) [lint]: Initialize a variable to suppress `used before
1694 initialized' warning.
1695 (main) [lint]: Ditto.
1696 * paste.c (paste_parallel) [lint]: Ditto.
1698 Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com)
1700 * configure.in: Don't set LDFLAGS since linking now uses both
1703 Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com)
1705 * unexpand.c (unexpand): Don't segfault when given a name of a
1707 * expand.c (expand): Ditto.
1708 Both from Bauke Jan Douma <bjd@dds.hacktic.nl>.
1710 Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com)
1712 * src/Makefile.in: Change all link commands to use both $(CFLAGS)
1715 * csplit.c (load_buffer): Rather than incrementing buffer size,
1716 double it each time we fail to find a newline. Otherwise, csplit
1717 would run out of memory when processing files with very long lines.
1719 Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com)
1721 * man/Makefile.in (manprefix): Use binprefix as the default.
1723 Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com)
1725 * cat.c: Use full_write and safe_read instead of write and read resp.
1731 * sum.c: Use safe_read instead of read.
1735 * tail.c: Replace calls to xwrite with calls to fwrite.
1736 Use fopen/fclose instead of open/close.
1737 (write_header): Use a single call to printf instead of four to xwrite.
1738 Use safe_read instead of read.
1741 Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com)
1743 * install.sh: New file.
1744 Makefile.in [DISTFILES]: Add it.
1746 Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com)
1748 * memcmp.c: Use the latest version from the GNU C library.
1750 * cut.c [ADD_RANGE_PAIR]: New macro.
1751 (set_fields): Collect the list of all selected ranges before
1752 allocating and initializing the boolean lookup table.
1753 (cut_bytes, cut_fields): Complete rewrite. Avoid copying
1754 into buffer whenever possible. Properly handle input without
1756 (getstr): New function. Copied from getline.c, but with minor changes.
1758 * sort.c (main): Properly handle -Tdir.
1759 Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
1760 Reported by Kristoffer Rose (kris@diku.dk).
1762 * cut.c (main): Give separate errors for `-s without -f'
1763 and `-d without -f'.
1764 (main): Now -d '' means `use the NUL byte as the delimiter'.
1765 Before, it got an error.
1767 Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com)
1769 * configure.in [test for 8-bit clean memcmp]: Add a test to detect
1770 losing memcmp from SunOS4.1.x. From Robert H. de Vries
1773 Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com)
1775 * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
1776 so it goes in config.status. This eliminates unnecessary second run
1779 Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com)
1781 * configure.in (AC_HAVE_FUNCS): Add isascii.
1782 * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
1783 on AIX PS/2 1.3 systems because isascii is a function and it is used
1784 in definitions (with the necessary side effect of assigning to a
1785 global variable) of the is* macros. Also test HAVE_ISASCII and
1786 redefine ISASCII(c) instead of isascii.
1787 Reported by Minh Tran-Le (tranle@intellicorp.com).
1789 Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com)
1791 * configure.in: Don't run the test for 8-bit clean memcmp if we
1792 already know we'll be using our replacement.
1794 Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com)
1798 * tac.c (usage): Fix typo in long usage.
1799 * sort.c (usage): Likewise.
1800 From Philippe.Schnoebelen@imag.fr.
1802 * cut.c [FATAL_ERROR]: New macro.
1803 (main): Call both error and usage (2) through FATAL_ERROR in
1804 many places. Before, only `error (2...' was called.
1805 (invalid_list): Removed. This function is subsumed by FATAL_ERROR.
1807 * cut.c (cut_fields): Properly handle input lacking a terminating
1808 newline. Before, the command `printf "a\tb" |cut -f 1' generated
1811 Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com)
1813 od.c (usage): Change --backward-compatible to --traditional in
1814 the long usage message.
1816 Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com)
1820 Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com)
1822 * cut.c (cut_fields): Revert July 27 change. Instead, strip off
1823 trailing delimiter unless given a range of fields like `3-' that
1824 extends to end of line.
1825 (set_fields): Moved local `eol_range_start' to file-scope.
1826 Reported by Arne H. Juul (arnej@solan.unit.no).
1828 Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com)
1830 * fold.c (fold_file): Don't get stuck in an endless loop when
1831 width is smaller than 8 and there are TABs in the input.
1833 Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com)
1835 * join.c: Remove now-unused dcls of show_help and show_version.
1837 Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com)
1839 * csplit.c [INT_MAX]: Make sure it's defined.
1840 [not HAVE_LIMITS_H]: Don't include limits.h.
1841 From Kaveh R. Ghazi (ghazi@noc.rutgers.edu).
1843 Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com)
1847 Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com)
1849 * sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
1850 From Chuck Hedrick (hedrick@klinzhai.rutgers.edu).
1852 * sort.c (main): Handle --help and --version options.
1853 * Makefile.in (sort.o): Depend on long-options.h.
1855 Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com)
1857 * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
1858 split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
1859 `--longopt=arg' syntax in --help message rather than `--longopt arg'.
1860 From Francois Pinard.
1862 * tail.c: Don't include <signal.h>. It hasn't been necessary
1863 since the Dec 12, 1992 change.
1865 * join.c (main): Accept `-v 1' again. Adding the --version
1866 long option had broken it, although -v1 still worked. Call
1867 parse_long_options instead of adding "help" and "version"
1868 to join's longopt strct.
1869 * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
1871 * (join): Depend on and link with long-options.o.
1872 * (join.o): Depend on long-options.h.
1874 * od.c: Change --compatible (-C) to --backward-compatible (-B).
1876 * csplit.c: Change --abandon-null-files to --elide-empty-files.
1878 Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com)
1880 * tr.c (get_next, string2_extend): Add default: label to switch stmt.
1882 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
1883 join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
1884 tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
1885 Exit successfully for --help, non-zero for usage error.
1886 From Francois Pinard.
1888 * configure.in: Add AC_STAT_MACROS_BROKEN.
1889 * system.h [AC_STAT_MACROS_BROKEN]: Test it.
1891 Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com)
1893 * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
1894 <config.h> or "config.h".
1895 * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
1896 join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
1897 tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.
1899 * configure.in: Use AC_CONFIG_HEADER.
1900 * Makefile.in [DIST]: Add config.h.in.
1902 * Makefile.in: Convert so make may be run from subdirectories.
1903 Add dependencies on config.h.
1904 * src/Makefile.in: Ditto.
1905 * lib/Makefile.in: Ditto.
1906 * man/Makefile.in: Ditto.
1908 Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com)
1910 * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
1911 In the 64-bit assignment, be careful to cast the shift operand to
1913 Abort if sizeof (unsigned long) > 8.
1915 Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com)
1917 * csplit.c: Allow repeat counts to be specified via `{*}'.
1918 New option --suffix=format. Supercedes --digits option.
1919 New option --abandon-null-files.
1920 From Ronald F. Guilmette (rfg@netcom.com).
1922 * csplit.1: Updated.
1923 From Ronald F. Guilmette.
1925 * csplit.c: Remove register keyword (replace with `int' in two cases).
1927 * csplit.c: [MAX]: Macro renamed from max and moved to top of file.
1928 (bytes_to_octal_digits): New static array.
1929 (get_format_flags): Combine '+' and ' ' cases of switch stmt.
1930 Return count if for loop terminates.
1931 (get_format_width): Use `bytes_to_octal_digits' instead of just 11.
1932 (get_format_prec): Make sure is_negative is defined before used.
1933 (get_format_conv_type): Give a different error message if there
1934 is no conversion specifier.
1935 Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
1936 (max_out): Use `%%' rather than `%' in format string.
1938 Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com)
1940 * pr.c (main): When argc == 1, don't try to xmalloc (0).
1942 Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com)
1944 * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
1947 Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com)
1949 * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
1951 Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com)
1953 * src/*.c: Print version on standard output, not stderr.
1955 * configure.in: Add AC_LONG_64_BITS.
1956 * memchr.c: Use #ifdef LONG_64_BITS instead of
1957 `if (sizeof(longword) > 4)'.
1959 Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com)
1961 * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
1962 always handle devices. Ignore errno == EINVAL and errno == ENODEV.
1963 `cat -v /dev/null' was failing on many systems.
1965 * cut.c (cut_fields): Don't strip off trailing delimiter e.g.
1966 `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
1967 From William Dowling <will@franklin.com>.
1969 Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com)
1973 * memchr.c: De-ansify the fixed version from glibc.
1974 It is supposed to work on systems with 64-bit long ints.
1976 Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com)
1980 Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com)
1984 Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com)
1986 * pr.c (cols_ready_to_print): New function. It replaces a global
1987 variable by the same name and computes on the fly the value that
1988 was supposed to be maintained through that variable. This should
1989 put to rest the `pr -2a' bug.
1990 (main): Don't let getopt_long reorder arguments so we can
1991 distinguish between `pr -1 -2' and `pr -12'. Rework handling of
1994 * fold.c: Declare xmalloc.
1996 Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com)
1998 * sort.c (main): fflush before exit, so a closed stdout doesn't lose.
2000 Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com)
2002 * mkinstalldirs: New file.
2003 * Makefile.in (installdirs): Use it to create installation directories.
2005 Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com)
2007 * all source: With --version, print version and exit immediately.
2009 Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com)
2011 * Makefile.in (installdirs): New rules for creating installation
2012 directories. (install): depend on it.
2014 * tail.c (main): Remove --compatible since `+1f' may be used
2015 to get the BSD `-0f' behavior portably.
2017 * fold.c (main): Turn -N arguments, where N is a digit, into -wN.
2018 From Ian Lance Taylor (ian@cygnus.com).
2020 Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com)
2022 * tail.c (main): New option -C, --compatible to make `tail -0f'
2023 work like `tail +1f' for compatibility with BSD tail.
2025 Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com)
2027 * pr.c (print_page): Decrement cols_ready_to_print even when
2028 lines_to_print == 0. The command `echo |pr -2ta' *still* didn't
2029 terminate. Add parentheses for clarity.
2031 Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
2035 * od.c (main): Remove set-but-not-used variable, `usage_error'.
2037 * split.c (main): Call usage with an argument.
2039 Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
2041 * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
2042 for 8-bit clean memcmp.
2044 * cat.c (usage, main): Remove unused argument.
2046 * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
2047 (check_for_offset): Remove unused argument `argnum.'
2049 * configure.in: Add AC_SIZE_T.
2051 Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
2053 * uniq.c (main): Interpret non-option arguments with a leading `+'
2054 only if we haven't seen `--'.
2056 * tr.c (main): Change variable name to avoid shadowed dcl.
2057 * wc.c (write_counts): Ditto.
2059 * sum.1: Make documentation agree with the code.
2061 * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
2063 Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
2065 * configure.in [AC_HAVE_HEADERS]: Add limits.h.
2067 * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
2069 * od.c (parse_old_offset): Don't use prototype in function
2070 definition. Remove unnecessary conjunct from test for hexadecimal
2073 * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
2074 for long double support; there are compilers (Stardent Vistra svr4)
2075 without long double but still define __STDC__.
2077 Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com)
2079 * src/*.c and man/*.c except for sort: Add --help and --version
2082 * pr.c: Convert to use getopt_long.
2084 * lib/memcmp.c: Use version from glibc.
2085 [WORDS_BIGENDIAN]: Test this instead of the using glibc's
2087 * configure.in: Use AC_WORDS_BIGENDIAN to set it.
2089 * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
2092 * Makefile.in (dist): Depend on Makefile so that changes to
2093 Makefile.in (like adding new files to DISTRIB) are reflected
2094 in the new distribution.
2096 Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com)
2098 * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
2099 other options so users can use them to override DEFS.
2100 * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.
2102 * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
2103 configure's AC_SUBST will set these.
2105 * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
2106 [targets that cd then run make in subdirectories]: Don't depend
2107 on `cd ..'; use a subshell instead.
2109 * Makefile.in [info, install-info, dvi, check, installcheck]:
2110 New targets but no rules; comply with standards.
2112 * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
2113 hasn't specified CFLAGS.
2114 [LDFLAGS]: Substitute into Makefile.
2116 Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com)
2118 * od.c: New option --compatible, -C.
2119 (parse_old_offset): New function.
2120 * od.1: Document new option.
2122 Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com)
2124 * cut.c, expand.c, join.c, nl.c: Always call error with errno
2125 (not zero) after failed fclose or non-zero ferror.
2127 Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu)
2129 * configure.in: Add check for working memcmp; use GNU's if
2130 the system's doesn't grok the 8th bit.
2131 * memcmp.c: Fix it so it groks the 8th bit.
2132 TODO: We really need to provide a fast memcmp, since most
2133 machines will have a broken memcmp. Probably should get
2135 * sort.c (mergefps): Maintain keybeg and keylim when copying
2136 the current line to `saved'.
2137 (numcompare): Skip white space here since -n no longer implies -b.
2138 (getmonth): Skip white space here since -M no longer implies -b.
2139 (compare): Completely overhauled to make the 8th bit work right,
2140 also to properly handle the global reverse option.
2141 (set_ordering): -n no longer implies -b, according to Posix.
2142 For consistency, -M also no longer implies -b.
2143 (main): Correct treatment of -r and global keys.
2144 (findlines): Clear keybeg and keylim if no keys are used.
2145 (sort): Avoid overwriting tempfiles[] array bounds.
2147 Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com)
2149 * pr.c (close_file): Reverse May 13, '92 change, but add the condition
2150 that cols_ready_to_print not be decremented when printing across.
2151 The command `echo |pr -2ta' didn't terminate.
2152 (print_page): Rewrite conditional (that had side effects in second
2153 conjunct) using nested if statements to make it clear that we do
2154 indeed want those semantics.
2156 Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2160 * system.h: Try BBSIZE if BSIZE isn't defined.
2161 From Tony Robinson <ajr@eng.cam.ac.uk>.
2163 Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2165 * tail.c (tail_forever): Use an array of file descriptors
2166 instead of forking processes.
2167 (dump_remainder): Return number of bytes read.
2168 (tail_file): Fill in the new array.
2169 From Ian Lance Taylor.
2171 Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu)
2173 * system.h: Only define index, bcmp, etc. if not already defined.
2175 Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com)
2177 * tr.c (is_char_class_member): Remove unreached return after abort.
2179 Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com)
2181 * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
2182 sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion
2183 of <ctype.h> and definitions of is* ctype macros to system.h.
2184 Change a few more uses of is* ctype macros to (protected) upper
2187 * system.h: Add isascii-protected ctype IS* macros.
2189 Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com)
2191 * all files using getopt.h: Convert static declarations of
2192 struct option to use new macros from getopt.h: no_argument,
2193 required_argument, and optional_argument.
2195 Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com)
2197 * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.
2199 * tr.c (main): Close stdin and stdout and check return status.
2201 Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2203 * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
2206 Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com)
2208 * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
2209 use isascii if it is defined.
2210 (is_char_class_member, make_printable_char, make_printable_str,
2211 non_neg_strtol): Use new macros instead of lower case ones
2214 * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
2215 macros like pr.c. Suggested by David J. MacKenzie.
2217 * od.c (print_ascii, dump_strings): Check for isascii before isprint.
2218 (dump_strings): Free malloc'd buffer before returning.
2219 (skip): Return non-zero if an error occurred, zero otherwise.
2220 Exit only if asked to skip beyond end of combined input.
2221 (check_and_close): New function.
2222 (skip, read_block, read_char): Call check_and_close when done
2223 processing the file associated with in_stream.
2224 (skip, read_block, read_char): Set have_read_stdin.
2225 (main): Close stdin (if it was ever read) and check for errors
2226 just before exiting.
2227 (write_block, dump_strings, dump): Don't test return value from
2228 functions that operate on streams. Rely on later ferror tests.
2230 Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2232 * sort.c (main, usage): Add -T option.
2234 Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2236 * tail.c (tail_forever, sigusr1, kill_kids): New functions to
2237 do -f on multiple files.
2238 (main): Call tail_forever.
2239 From Ian Lance Taylor.
2241 Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2243 * cut.c (cut_fields): Add cast.
2245 * od.c (decode_one_format): Remove '#' from pre_fmt_string;
2246 many systems don't support it.
2247 Conditionalize long double support on __STDC__, not __GNUC__.
2248 From Ian Lance Taylor.
2250 Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com)
2252 * sort.c (numcompare, keycompare): Add parentheses suggested
2253 by gcc -Wall. Put braces around individual monthtab initializers.
2255 * cksum.c: Declare error. Make checksum table `const.'
2257 * pr.c: Remove comment and dcl of unused variable, `print_a_number'.
2259 * split.c (main): Add `default: abort();' to enumeration switch.
2261 * All files: Make all functions and extern variables static.
2262 Make all longopts arrays const as well as static.
2263 Make a couple statically initialized aggregates `const.'
2265 Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2267 * od.c (main): Make old-style format options accumulate.
2270 Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2272 * tr.c (look_up_char_class): Add cast.
2274 * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
2275 Add `const' to variable receiving value from re_compile_pattern.
2277 * wc.c (wc): If doing only -c, use st_size for regular files.
2279 * fold.c (fold_file): Was folding 1 column too early.
2280 From Eric Backus <ericb@lsid.hp.com>.
2282 * memset.c: New file.
2284 Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2286 * cksum.c: New file.
2288 Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2290 * tac.c (tac_stdin): Handle SIGPIPE.
2291 * sort.c (main): Handle SIGTERM.
2295 * system.h [USG || STDC_HEADERS]: Define bcmp.
2297 Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
2299 * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk.
2301 Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2303 * paste.c (main): Don't write on a string constant.
2305 Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
2307 * tr.c: Minor cleanup. Replaced some assert(0) with abort().
2309 Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2311 * cmp.c, cmp.1: Move to diff distribution.
2313 Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2315 * system.h: Change FOO_MISSING to HAVE_FOO.
2317 Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2319 * pr.c (COLUMN): Add structure member to remember filename.
2320 (main, init_fps, open_file, close_file): Use it.
2322 (close_file): Don't decrement cols_ready_to_print when closing
2323 a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein).
2325 Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2327 * cmp.c: --show-chars -> --print-chars.
2329 * pr.c: Rename some variables.
2331 Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2333 * system.h: Define DEV_BSIZE if not defined.
2335 Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu)
2337 * system.h, tac.c: SIGTYPE -> RETSIGTYPE.
2339 Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2341 * sort.c (main): Don't stop processing args when we hit "-";
2342 treat it like a regular filename.
2343 From ian@airs.com (Ian Lance Taylor).
2345 * pr.c (print_page): Fix off by one line count when ^L is in input.
2346 From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de).
2348 Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu)
2350 * tr.c (validate): Change error message so it doesn't mention
2351 actual name of --truncate-set1 option. From David MacKenzie.
2353 Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu)
2355 * tr.c (string2_extend, validate): Give an error message when
2356 translating without --truncate-set1, with empty string2, and
2357 with non-empty string1. "tr 1 ''" produced a failed assertion.
2359 Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2361 * system.h: Change how ST_BLKSIZE is calculated to allow for
2362 non-POSIX systems that don't define BSIZE in sys/param.h.
2364 Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2366 * sum.c (main, bsd_sum_file): Don't print filename if BSD
2367 algorithm is used and only one file was given.
2369 Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu)
2371 * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
2372 with starting character equal to ending character. This is
2373 contrary to the POSIX spec, but what is already implemented
2374 in find_closing_delim.
2376 Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2380 * sort.c (numcompare, checkfp): Add parens to placate gcc2.
2382 * sort.c (mergefps): For -u, output the first, not last, of
2383 the lines that compare equal. From Mike Haertel.
2385 Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2387 * tr.c: Remove initial capitals and periods from error messages.
2389 Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
2391 * sum.c (main): Add -r option for SYSV compat.
2393 Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu)
2395 * sort.c (compare): If -s given, leave lines in their original order.
2396 (main): Recognize -s.
2397 (usage): Document -s.
2400 Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu)
2402 * sort.c (sort): Check for complete parsing of buffer into
2403 lines before nixing temp files.
2405 Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2407 * sum.c (sysv_sum_file): Use %lu instead of %u to print a
2408 long. Not that it matters for GNU . . .
2410 * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
2411 (append_normal_char, append_range, append_char_class,
2412 append_repeated_char, append_equiv_class, spec_init):
2413 Initialize `next' field of new `struct List_element'.
2414 From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel).
2416 Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu)
2418 * join.c (get_line): Renamed from getline to avoid GNU libc conflict.
2420 Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2424 * nl.c: Support multiple files and "-" for stdin.
2425 (main): Check for read and write errors.
2426 (nl_file): New function.
2428 Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2430 * tr.c (main): -t option was called -b in getopt spec.
2431 (validate): Don't warn that set1 is longer than set2.
2433 * tr.c: Rename --sysv-string2-truncate to --truncate-string1.
2435 Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2437 * nl.c: New program from bin-src.
2439 * nl.c (main): Use a struct linebuffer for line_buf.
2440 (process_file): Use readline instead of fgets, to preserve NULs.
2441 (check_section): Use memcmp instead of strncmp.
2442 (proc_text): Print line_buf with fwrite instead of printf.
2444 * nl.c (main): Usage message if too many args given. Check
2445 for error in closing input file. Lengths of section delimiter
2446 strings were 1 too large. Take separator_str into account in
2447 length of print_no_line_fmt.
2448 (build_print_fmt): Allocate space for print_fmt, in case
2449 separator_str is long.
2450 (proc_text): A blank line is one that contains nothing, not
2451 even nonprinting characters.
2453 Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2455 * All programs: Document `--' instead of `+' to introduce
2456 long-named options, in usage messages.
2458 * sum.c (bsd_sum_file): Renamed from sum_file.
2459 (sysv_sum_file): New function.
2460 (main): Recognize an option to select between the algorithms.
2462 Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu)
2464 * pr.c (close_file, print_page): Fixed bug that had the command
2465 yes |head |pr -t printing "yyyyyyyyyy".
2466 * (print_page): Fixed bug that had pr -3 -a printing two too few
2467 trailer lines per page.
2468 * (main): Added restriction that -a and -m are incompatible.
2469 Although the POSIX spec doesn't explicitly say they shouldn't
2470 be used together, it says -a modifies the -column option and
2471 that -column shouldn't be used with -m.
2473 Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu)
2475 * nl.c: Include regex.h after, not before, sys/types.h.
2477 Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu)
2479 * sort.c (fillbuf) return bytes buffered instead of bytes read.
2481 Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu)
2483 * sort.c (LINEALLOC): New #define.
2484 (struct lines): New field ``limit''.
2485 (initlines): Set it from new arg ``limit''.
2486 (sort, mergefps, checkfp): Pass new arg to initlines().
2487 (findlines): Don't realloc past lines->limit.
2489 Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2491 * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
2492 HAVE_UNISTD_H and _POSIX_VERSION.
2494 * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.
2496 Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat)
2498 * tr.c: Fixed an inaccurate comment on posix_pedantic.
2500 Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal)
2502 * tr.c: Changed underscores to hyphens in long option name
2503 "sysv_string2_truncate".
2505 Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2507 * tac.c (main): Set obscure_syntax to tell re_search to
2508 allocate memory for the group registers.
2510 Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2512 * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of
2513 signal, which POSIX doesn't have.
2514 * sort.c: Replace inthandler and huphandler with sighandler.
2515 * csplit.c (main): Only handle signals if they were not being
2518 * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
2520 Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat)
2522 * tr.c (unquote): Reformat code so it doesn't go beyond column 80.
2523 * tr.c (squeeze_filter): Comment a little on why it's better
2524 to step through the input by two.
2525 * tr.c (set_initialize): Write a comment describing the function.
2526 * tr.c: Eliminated the variable `portability_warnings' and replaced
2527 references to it by references to `!posix_pedantic'. One of the
2528 uses of portability_warnings had been wrong.
2530 Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2532 * tr.c: New program.
2534 Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2536 * linebuffer.[ch] (freebuffer): New function (used by cron).
2538 Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2540 * system.h, configure, Makefile.in: Don't include memory.h if
2541 STDC_HEADERS, removing need for MEMORY_H_MISSING.
2543 Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat)
2545 * pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
2546 Somehow, part of my patch didn't make it last time.
2548 Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2550 * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.
2552 * cmp.c (cmp): Print EOF message to stderr, not stdout, for
2555 * sort.c (xfwrite): fwrite never returns < 0, so check if
2556 number written is number we asked to write.
2557 (fillbuf, main): fread never returns < 0, so check ferror instead.
2560 Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy)
2562 * pr.c (print_page): Really fixed `extra newline at EOF' problem.
2563 * (store_columns): Fixed bug that caused `pr -b -2' to coredump
2564 on files of certain lengths.
2566 Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy)
2568 * pr.c (print_page): Fixed to not add single spurious newline
2569 at EOF when using -t.
2571 Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies)
2573 * pr.c (print_page): Don't pad the page if -t given.
2575 * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.
2577 Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2581 * configure, system.h: Include memory.h if it works.
2583 * split.c: Allow `b' unit as well as `k' and `m'.
2585 * head.c, tail.c: Replace -b +blocks option with specifying
2586 units (b, k, or m) after the number.
2587 (parse_unit): New function.
2589 * fold.c (main): Check that -w arg is a number.
2591 * cut.c: +delimiter takes an arg.
2593 Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
2595 * pr.c (close_file): Don't close an already closed file.
2597 Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2599 * memchr.c: New file.
2600 * configure: Check if it's needed.
2602 * csplit.c, gcsplit.1: New program.
2604 * pr.c (cleanup): Only free buffers if they were allocated.
2606 * sort.c [!USG && !STDC_HEADERS]: Declare memchr.
2608 Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy)
2610 * pr.c: The following 3 bugs appeared (at least) when printing
2611 a single file with the options `-3 -f'.
2612 * (print_white_space): Single spaces were being replaced
2614 * (print_page): Some lines were getting too much white space
2615 at the beginning because spaces_not_printed wasn't being reset
2617 * (read_line): The single space between a truncated column
2618 on its left and the column on its right was omitted. Fixed
2619 so that previous value of input_position is restored before
2622 Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2624 * configure: Only remove /etc from PATH when it's not part of
2627 Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies)
2629 * linebuffer.c (readline): Fix incorrect recalculation of `end'.
2631 * head.c, tail.c: Replace `mode' variables and bitmasks with
2632 separate variables for each option.
2634 Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies)
2636 * wc.c: New program.
2638 Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies)
2640 * fold.c (fold_file): Read in an int, not a char, for EOF
2643 * configure: Check whether st_blksize is missing.
2645 * tac.c (save_stdin): Put copy of pipe input in TMPDIR if
2646 defined, instead of /tmp.
2648 Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2650 * xwrite.c [POSIX]: unistd.h might require sys/types.h.
2652 Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2654 * paste.c (main): Consider -d "" to be like -d "\0",
2655 for POSIX (if I read it right).
2657 * sort.c, join.c: New programs.
2659 * cut.c (set_field): Allow blanks as well as commas to
2660 separate numbers in ranges.
2662 Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies)
2664 * pr.c: Failure to open an input file is no longer a fatal error.
2665 A message is printed for each failed open. When printing
2666 in parallel, each failed open results in one fewer output column.
2667 Added POSIX -r option to suppress the message.
2668 * pr.c: Added variables: failed_opens, ignore_failed_opens.
2669 These changes were based in part on work by David MacKenzie.
2671 Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo)
2673 * pr.c: Complain if user gives both -m and -[0-9]+ options.
2675 Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies)
2679 Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2681 * expand.c: Rename some variables.
2682 (expand): Don't access value off end of array.
2683 * unexpand.c: Rename some variables.
2684 (unexpand): Don't access value off end of array.
2685 Instead of copying tabs verbatim and flushing pending spaces
2686 when one is reached, count them as the proper number of
2687 pending spaces. Instead of changing tabs to single spaces if
2688 the tabstop list is exhausted, print the rest of the line
2689 unchanged (for POSIX).
2691 Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2693 * cut.c (cut_file), paste.c (paste_parallel, paste_serial):
2694 Clear EOF and error conditions on stdin so it can be reused.
2696 * expand.c, unexpand.c (parse_tabstops): Allow blanks as well
2697 as commas to separate tabstops, for POSIX.
2698 * expand.c (expand), unexpand.c (unexpand): Don't line-buffer
2699 the output; send it directly to stdout.
2700 * unexpand.c (main): Make -t stupidly imply -a for POSIX.
2701 (unexpand): If a tab stop list was given and we move past its end,
2702 copy the rest of the line verbatim.
2704 * split.c (convint): New function to allow 'm' and 'k' after
2706 (main): Use it. Change -c option to -b for POSIX.
2708 Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2710 * pr.c: Protect isdigit with isascii, if required.
2712 Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex)
2714 Most of the following is from Paul Eggert:
2715 * cat.c (main): If stdin is read, check close at end.
2716 * cmp.c (main): Check for stdin being closed.
2717 Check for close errors on stdin and stdout.
2718 (cmp): Return a value instead of exiting.
2719 * cut.c (cut_file): New function, from code in main.
2720 Check for read errors.
2721 (main): Check for close errors.
2722 * expand.c, unexpand.c (main): Check for close errors.
2723 (next_file): Go to next file if one can't be opened.
2724 Check for close errors.
2725 * head.c (main), tail.c (main): If stdin was read, check for
2727 * head.c (head_file), tail.c (tail_file): Check for close errors.
2728 * paste.c (main, paste_parallel, paste_serial), tac.c (main):
2729 Check for close errors. Close stdin if it was read.
2730 * split.c (main): Check for close errors.
2732 * configure, Makefile.in's: Support +srcdir option.
2733 Make config.status. Fix up clean targets.
2735 Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal)
2737 * linebuffer.h (struct linebuffer): Add a field to indicate
2738 the number of valid chars in the line.
2739 * linebuffer.c (initbuffer, readline): Fill it in.
2740 * uniq.c, comm.c: Use it.
2742 * pr.c (main): Check stdin and stdout fclose for errors.
2743 (init_parameters): If there's no room for header and footer,
2744 omit them rather than dying (for POSIX).
2745 (init_header): Take a file descriptor as additional arg.
2746 (init_fps): Change callers. Note when stdin is read.
2747 (open_file): For filename "-" use stdin.
2748 (close_file): Don't close stdin. Check close for errors.
2749 (print_char, char_to_clump): Use isprint instead of explicit
2752 * memcmp.c: New file (needed for comm).
2753 * bcopy.c: New file (needed for fold).
2754 * system.h: Don't define bcopy as memcpy.
2755 * configure: Check for bcopy and memcmp.
2757 * uniq.c (main): Use "-" instead of NULL to mean stdin or
2759 (check_file): Use "-" instead of NULL to mean stdin or stdout.
2760 Check readline return instead of for NUL character to
2762 Check fclose for errors.
2763 (find_field): Use linebuffer length, not NULs, to detect end
2765 (different): New function, replaces compare. Uses memcmp
2767 (writeline): Use fwrite instead of fputs so NULs are preserved.
2769 * comm.c (compare_files): Return an error indication.
2770 Don't take a filename of NULL to mean stdin.
2771 Use memcmp instead of strcmp to allow for NULs.
2772 Check fclose for errors.
2773 (writeline): Use fwrite instead of fputs so NULs are preserved.
2775 * sum.c (sum_file): Take an arg indicating whether to print
2776 the filename, and don't take NULL meaning stdin. Set a flag
2777 when we read stdin. Check fclose return for errors.
2778 (main): If stdin was read, check fclose return for errors.
2779 Use filename of "-" if no args given.
2781 Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2783 * fold.c: Rewritten from scratch for POSIX.
2785 Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2787 * split.c (line_bytes_split): Use xmalloc instead of alloca.
2788 * system.h: Don't declare alloca.
2790 * tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
2791 * system.h: Define SEEK_ macros if not defined.
2793 * pr.c: Rename variable `truncate' to avoid library function conflict.
2795 Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2797 * linebuffer.c, linebuffer.h: New files.
2798 * comm.c, uniq.c (initbuffer, readline): Functions
2799 removed (use versions in linebuffer.c).
2801 Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
2803 * sum.c (sumfile): Always print 5 digits for second number, too.
2804 Interpret "-" to mean stdin.
2806 Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen)
2808 * uniq.c: Use isblank instead of isspace, to support POSIX.2.
2809 * comm.c, pr.c, uniq.c (concat, fatal, error,
2810 pfatal_with_name, xmalloc, xrealloc): Functions removed.
2812 Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2814 * nl.c: Add long-named options. Doc fixes.
2816 Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2818 * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.
2820 * xwrite.c [POSIX]: Include unistd.h.
2821 [STDC_HEADERS]: Don't declare errno.
2823 Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2825 * uniq.c: Add long-named options. Remove marginally useful -z
2826 option (zero padded repeat counts).
2828 Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2830 * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
2831 (cwrite), head.c (head_file), cat.c (main): Check close return
2832 value for delayed error report due to NFS.
2834 Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2836 * cat.c: Replace "uchar" with "unsigned char", to avoid
2837 problems with various systems' typedefs.
2839 Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
2841 * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
2842 operation is unsupported, for HP-UX 7.0.
2844 Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu)
2846 * sum.c: Always print five digits for first number.
2848 Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
2850 * cat.c, cmp.c: Don't use fileno(); not needed.
2852 Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu)
2854 * tac.c, tail.c: Change _POSIX_SOURCE to POSIX.
2856 Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt)
2858 * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
2860 (enlarge_line): Adjust inbufp and outbufp.
2862 Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2864 * cat.c: Declare free returning void, not int, so it
2865 doesn't bomb on Xenix.
2867 Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke)
2869 * tac.c: Print error messages before calling cleanup, not after.
2871 Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2873 * tac.c (cleanup): Return SIGTYPE, not int.
2875 Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies)
2877 * cut.c (main, usage): Add -b and -n options for POSIX.
2878 (set_fields): Don't allow SPC or TAB as number separators.
2880 * paste.c (paste_parallel): If open of any file fails, quit
2883 Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies)
2885 * pr.c: Add POSIX -F option (same as -f).
2887 * uniq.c (check_file): Allow '-' to mean stdin or stdout.
2889 Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2891 * head.c, tail.c: Change `chars' to `bytes' globally.
2892 (main, usage): Use POSIX.2 draft 10 option syntax.
2894 Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2896 * cat.c (main): Don't delay error messages, so they appear
2898 (main, simple_cat, cat): Make errors in input files nonfatal.
2900 Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2902 * cat.c: Remove -c option added for POSIX draft 9, since POSIX
2903 draft 10 removed it.
2905 * tac.c (tac_stdin): Use fstat instead of lseek to determine
2906 whether stdin is seekable, because lseek silently fails on
2907 some special files, like tty's.
2908 tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
2909 don't turn off -f for non-regular files (assume the user knows
2910 what he's doing; it might work for fifo's and sockets).
2912 * paste.c (main): If no files given, use stdin.
2913 Don't let collapse_escapes write on string constant (delim default).
2914 (paste_parallel): Don't close stdin.
2916 * cut.c (main): Use standard input for filename of "-".
2918 * comm.c (compare_files): Allow '-' to mean stdin.
2920 Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
2922 * cut.c (enlarge_line): Take an arg giving the required amount
2923 of space. Change callers.
2924 (main): Don't allow -t'<TAB>' without -f.
2925 Make `delim' unsigned to fix sign extension problem in comparison.
2927 Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
2929 * pr.c Deleted excess whitespace from ends of lines.
2930 Modified to work with current version of getopt, which
2931 returns 1 instead of 0 for non-options.
2932 Reversed the meaning of the -f option, to be compatable
2935 Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies)
2937 * cmp.c (main, usage): Rename -L option to -c and don't have
2939 (printc): Take an arg to specify number of chars to pad to,
2940 for column alignment.
2941 (cmp): Respect flag_print_chars in default output format.
2942 Align columns for cmp -cl.
2944 Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies)
2946 * cmp.c: For +show-chars, have getopt return 'L' so
2947 `flag_print_chars' gets set.
2949 Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies)
2951 * tac.c (main): Initialize fastmap and translate fields of
2952 regex before compiling it.
2954 Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2956 * tac.c: Change +regexp to +regex for consistency with GNU find.
2958 Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2960 * cat.c (cat): If FIONREAD is available, only use it if it is
2961 supported by the filesystem that the file is on.
2963 Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2965 * cat.c (main): Add a variable to control whether the check
2966 for input file == output file is made, because no values of
2967 st_dev and st_ino should be assumed to be available for this
2968 purpose. Only do the check for regular files.
2970 * tac.c: Use bcopy instead of memcpy.
2972 Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies)
2974 * head.c: Use longs instead of ints for file offsets, for 16
2977 Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2979 * cmp.c: Change some ints to longs for 16 bit machines.
2980 (bcmp_cnt): Make char-pointer counting slightly simpler.
2982 Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2984 * cat.c (main): Allow input file to be output file for devices
2985 (ttys, etc.). Check whether input file is output file when
2986 reading standard input. Print any error messages for standard
2989 * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
2990 machines as well as 32 bit ones.
2991 * cmp.c, tail.c: Use longs instead of ints for file offsets.
2993 Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
2995 * cmp.c: Fix some exit statuses for POSIX.
2997 Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss)
2999 * tac.c: Use regular expressions as the record boundaries.
3000 Give better error messages.
3001 Reformat code and make it more readable.
3002 (main): Use getopt_long to parse options.
3003 (tac_stdin): Do not make a temporary file if standard input
3005 (tac_file): New function.
3006 (tac): Take an open file desc as an arg.
3007 (output): Rewrite to use its own efficient buffering.
3008 (xmalloc, xrealloc, xwrite): New functions.
3010 Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3012 * head.c, tail.c: Use `error' instead of `fatal_perror' and
3013 `nonfatal_perror'. Remove some unnecessary info from messages.
3015 Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3017 * comm.c (main): Pass the list of files to compare_files as a
3018 char ** instead of a char *.
3019 (compare_files): Make arg a char **.
3021 * uniq.c: Declare some functions as void.
3022 Change global vars `countmode' and `mode' from ints to enums.
3023 (main): Use getopt to parse options and support POSIX options.
3024 Don't use integer_arg to parse numbers, since `-#' can't be
3025 parsed that way using getopt.
3026 (find_field): Use isspace for finding fields boundaries.
3028 Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu)
3030 * comm.c (main): Call usage if given bad option or wrong
3031 number of args. Exit with 0 status normally.
3032 (usage): New function.
3033 Declare some other functions as void.
3035 Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex)
3037 * cmp.c (main, cmp, usage): Replace -q +quick option with -L
3038 +show-chars option to add ASCII representation of bytes to -l format.
3040 Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex)
3042 * cmp.c (cmp): Change EOF message for POSIX compatibility.
3043 For -l format, clear bits > FF.
3045 Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3047 * tail.c: Move global `errors' into main instead of having
3048 nonfatal_perror set it.
3049 (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
3050 Return an error status.
3051 (file_lines, start_chars, start_lines): Reverse the meaning of
3053 (tail_lines, tail_chars): Account for that reversal.
3055 Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3057 * head.c: Move global `errors' into main and have the various
3058 functions return an error status instead of setting it in
3061 Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton)
3063 * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
3064 options specified), to compare the two blocks and count
3065 newlines simultaneously.
3066 * cmp.c New function: bcmp_cnt.
3068 * cmp.c (main): Test if output is redirected to /dev/null, and
3069 assume `-s' if this is so.
3071 Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3073 * cat.c: Change `argbad' from a char to a short, so it will
3074 work on machines with unsigned chars.
3076 Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
3078 * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
3079 Remove unneccessary variable `c1'. If -l was given, increase
3080 `char_number' by the number of bytes read, after producing output,
3081 rather than by the offset of the first differing bytes, before
3083 Replace if-else-if constructions with case statements for clarity.
3084 (bcmp2): Rename `n' to `nread'.
3086 Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
3088 * nl.c (proc_text): Use re_search instead of re_match.
3090 Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
3092 * nl.c: Indent. Un-nest statements. Use GNU regexp functions
3093 instead of System V ones. Move function declarations together.
3094 (quit): Remove useless function.
3095 (program_name): New variable for error messages.
3096 (main): Use perror in error message.
3097 (xmalloc): New function to replace myalloc.
3098 (myalloc): Function removed.
3099 Global: use program_name and xmalloc.
3101 Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
3103 * uniq.c: Declare some functions.
3104 (main): Initialize infile and outfile. Call usage if given
3105 invalid args. Normally exit with 0 status instead of garbage.
3106 (usage): New function to print usage message and exit.
3107 (check_file): Remove unused variable.
3108 (readline): Compare against EOF, not < 0.
3109 (xmalloc, xrealloc): Return char *, not int.
3110 Ok to return 0 if 0 bytes requested.
3111 (lb1, lb2): Remove unused global vars.
3112 (concat): Remove unused function.
3114 Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
3116 * comm.c: Remove unused global variables lb1, lb2.
3117 (main): Remove unneeded variable.
3118 (compare_files): Remove unused arg.
3119 (readline): un-nest assignment. Test against EOF instead of < 0.
3120 (error): Print to stderr, not stdout.
3121 (xmalloc, xrealloc): Return char * instead of int.
3122 Returning 0 is ok if 0 bytes requested (ANSI C).
3128 version-control: never