*** empty log message ***
[coreutils.git] / old / fileutils / ChangeLog
blobfc9a1a2da358e3eadcd578111d1828683d5abc60
1 1998-01-02  Jim Meyering  <meyering@na-net.ornl.gov>
3         * Version 3.16i.
5         Fix problem with `install -d'.  Reported by Marty Leisner.
7         * src/install.c (get_ids): When otherwise unspecified,
8         set uid and gid to -1.
9         * lib/makepath.c (make_path): Try to change ownership only if we've
10         just created the directory.  Fix latent bug (s/&&/||/ in two places --
11         also, note that it could not be exercised via install or mkdir)
12         whereby chown would not be invoked when only one of owner/group is
13         not -1.
15 1998-01-01  Jim Meyering  <meyering@na-net.ornl.gov>
17         * src/rm.c (remove_cwd_entries): Initialize the entry-name obstack
18         only once and never free it.
20 1997-12-31  Paul Eggert  <eggert@twinsun.com>
22         If the -h or -H options are given, print inode counts and
23         disk allocations using a human readable format.
25         * src/df.c (show_dev): Print inode counts human readably.
26         * src/ls.c (decode_switches): -h and -H override output units.
27         (print_dir, gobble_file, print_long_format,
28         print_file_name_and_frills): Print disk allocations human readably.
29         * doc/fileutils.texi: Document the above changes.
31 1997-12-31  Jim Meyering  <meyering@na-net.ornl.gov>
33         * src/df.c (show_dev): Move declarations and computation of
34         blocks_used etc. and blocks_percent_used and
35         inodes_used etc. and inodes_percent_used into respective branches
36         of the `if (inode_format)' statement where they're actually used.
38         * lib/exclude.h: Define and use PARAMS, not __EXCLUDE_P.
39         * lib/exclude.c: Use PARAMS, not __EXCLUDE_P.
41 1997-12-29  Jim Meyering  <meyering@na-net.ornl.gov>
43         * src/rm.c (remove_cwd_entries): Plug a gross leak -- don't call
44         obstack_init inside the loop.
46         * src/du.c (usage): Replace TABs with spaces in --help message.
47         From Santiago Vila.
49         * lib/argmatch.c (invalid_arg): Use a single fprintf and whole
50         format statements to ease translation.
51         From Santiago Vila.
52         Convert from K&R to ANSI function dcls.
54 1997-12-28  Jim Meyering  <meyering@na-net.ornl.gov>
56         * lib/group-member.c: Use ANSI syntax, not K&R.
58         * lib/makepath.c (make_path) [!__STDC__]: Remove K&R-style definition.
60         * lib/group-member.h: Add PARAMS.
61         * src/chgrp.c: Remove incorrect declaration of group_member.
62         Include group-member.h instead.
63         Based on suggestion from Ulrich Drepper.
65 1997-12-27  Jim Meyering  <meyering@na-net.ornl.gov>
67         * Version 3.16h.
69 1997-12-25  Jim Meyering  <meyering@na-net.ornl.gov>
71         * lib/getline.c: (_GNU_SOURCE): Define only if not already defined.
73         * configure.in: Remove AC_DEFINE of _GNU_SOURCE.
74         * acconfig.h (_GNU_SOURCE): Define if not already defined.
75         Put this code in @TOP@ section.
76         (_GNU_SOURCE): Remove #undef.
78 1997-12-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
80         * configure.in: Move jm_CHECK_DECLS down so that it follows the
81         checks for the headers it requires.
83         * doc/fileutils.texi (mknod invocation): Fix description of file
84         type mnemonics.
86         * src/sys2.h: Declare stpcpy only if not defined as macro.
88         * src/du.c (S_ISLNK): Define this instead of S_ISDIR.
90         * src/dd.c (skip): Compare lseek return value with -1 to allow it
91         to be negative as signed value.
93         * lib/savedir.c: Declare stpcpy only if not defined as macro.
94         * lib/mountlist.c: Likewise.
95         * lib/path-concat.c: Include <string.h> if available.
97         * src/copy.c (copy_internal): Use S_ISLNK only if defined.
99         * src/install.c (get_ids): Don't cast GID_T_MAX to long, it might
100         overflow.
102 1997-12-22  Jim Meyering  <meyering@na-net.ornl.gov>
104         * configure.in: AC_DEFINE _GNU_SOURCE.
105         * acconfig.h: Add _GNU_SOURCE.
107 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
109         * src/copy.h: Use PARAMS, not __P.
110         * src/cp-hash.h: Likewise.
112         * lib/chown.c (rpl_chown): Rename from chown.
113         Undefine chown just after including config.h.
114         Include sys/stat.h.
115         Use correct ordering of uid and gid parameters both in function
116         definition and in call to chown.
117         With patches from Kaveh Ghazi.
119         * sys/fsusage.h: Use PARAMS, not __P.
120         * sys/getline.h: Likewise.
121         * sys/hash.h: Likewise.
122         * sys/human.h: Likewise.
123         * sys/long-options.h: Likewise.
124         * sys/makepath.h: Likewise.
125         * sys/modechange.h: Likewise.
126         * sys/path-concat.h: Likewise.
127         * sys/save-cwd.c: Likewise.
128         * sys/save-cwd.h: Likewise.
129         * sys/savedir.h: Likewise.
130         * sys/strverscmp.h: Likewise.
131         * sys/xalloc.h: Likewise.
132         * sys/xstrtol.h: Likewise.
134 1997-12-16  Paul Eggert  <eggert@twinsun.com>
136         Add --exclude and --exclude-from or -X options to du.
138         * lib/exclude.h, lib/exclude.c: New files.
139         * lib/Makefile.am (libfu_a_SOURCES): Add exclude.c.
140         (noinst_HEADERS): Add exclude.h.
141         * du.c: Include exclude.h.
142         (exclude): New static var.
143         (long_options, usage, main): Add --exclude and --exclude-from or -X.
144         (count_entry): Skip excluded entries.
146 1997-12-16  Jim Meyering  <meyering@na-net.ornl.gov>
148         * src/sys2.h: s/__P/PARAMS/g.
149         * src/chgrp.c: Likewise.
150         * src/chmod.c: Likewise.
151         * src/chown.c: Likewise.
152         * src/copy.c: Likewise.
153         * src/du.c: Likewise.
154         * src/dd.c: Likewise.
155         * src/install.c: Likewise.
156         * src/ls.c: Likewise.
158 1997-12-15  Paul Eggert  <eggert@twinsun.com>
160         * ls.c (struct bin_str): Make len int, not unsigned, to avoid
161         bogus comparison < 0.
162         (quote_filename): Add forward decl.
163         (decode_switches): -b, -e, -N, -Q are now mutually exclusive.
164         (print_dir): Quote directory name as per quoting options.
165         (print_long_format): Don't count color changes as part of file name.
166         (quote_filename): Revamp interface: now accepts stream to output to
167         and filename, and returns length of quoted filename.
168         This removes duplicated code and should make errors less likely.
169         Also, no longer mallocs storage.  All callers changed.
170         Don't quote ' ' if -Q.
171         (OUTCHAR): New macro.
172         (SAVECHAR, SAVE_2_CHARS): Remove.
173         (print_name_with_quoting): New stack arg.  All callers changed.
174         (print_color_indicator): Cast ext len to size_t to avoid warning
175         with GCC 2.8.
176         (length_of_file_name_and_frills): Rewrite to use quote_filename.
177         This fixes bug when computing file name length with -e.
179 1997-12-15  Jim Meyering  <meyering@na-net.ornl.gov>
181         * tests/rm/deep-1 (deep): Remove `find > k' debugging remnant.
183 1997-12-14  Paul Eggert  <eggert@twinsun.com>
185         Add shell style quoting, and make it the default.
187         * NEWS, doc/fileutils.texi: Describe -e, which is now the default.
188         Describe change to --dired output.
190         * src/ls.c (quote_shell): New var.
191         (long_options, decode_switches, usage): New option -e or --quote-shell.
192         (dired_dump_obstack): New arg STYLE.
193         (main): Pass quoting style to dired_dump_obstack.
194         (decode_switches): -N now clears quote_as_string.
195         (quote_filename): Add shell style quoting.
197 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
199         * tests/ln/sf-1: Make sure we get diagnostics in English.
201         * Version 3.16g.
203         * src/system.h: Remove lseek and memchr dcls.
204         * src/sys2.h: Put them here instead.
206         * src/rm.c (ASSIGN_STRDUPA): Cast alloca return value to char*.
208         * lib/hash.h: s/HAVE_DECLARATION_/HAVE_DECL_/.
210 1997-12-13  Jim Meyering  <meyering@na-net.ornl.gov>
212         * tests/Makefile.am (check-local): New target.
214         * tests/.posix-warn: New file.
216         * src/dd.c (usage): Mention that `notrunc' is a conv= option.
217         Change --help output to tell the truth: that for of=FILE,
218         FILE *is* truncated.  Reported by Miles Bader.
219         Remove incomplete, usage-like comment at top of file.
221         * src/mv.c (do_move): If rename fails for any reason (not just when
222         errno == EXDEV), then revert to trying copy-then-unlink.  This is
223         necessary to allow moving files within certain types of Linux NFS
224         mounted filesystems.  Reported by Marty Leisner.
226 1997-12-11  Jim Meyering  <meyering@na-net.ornl.gov>
228         * src/ln.c (do_link): Don't require --force when target exists and
229         using --backup.  This changes makes ln consistent with cp and mv in
230         this respect.  Suggestion from Eli Zaretskii.
232 1997-12-06  Jim Meyering  <meyering@na-net.ornl.gov>
234         * src/du.c: Separate struct dcl and typedef.
235         (String *): Rename from parameter-shadowed `string'.
236         (stringstruct): Remove typedef.
238 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
240         * lib/savedir.c (savedir): Revert last change.  malloc always
241         works when called with zero, because we use the wrapper if the
242         system version is lacking.
244         * configure.in (AC_LFS): Use this macro rather than open-coding it.
245         (jm_AC_HEADER_INTTYPES_H): Likewise.
246         (jm_AC_TYPE_UINTMAX_T): Likewise.
248         * lib/human.c (human_readable): Convert to ANSI-style definition.
249         [lint]: Define `power'.
251         * src/ls.c (print_long_format): Rename inner-scoped `buf' arrays
252         to `hbuf' to avoid shadowing local.
254 1997-11-29  Paul Eggert  <eggert@twinsun.com>
256         Port to LFS and C9X in general, and to Solaris 2.6 in particular.
258         * NEWS: Describe ls -h, -H, rounding, new SI prefixes,
259         64-bit accumulators, and LFS.
261         * acconfig.h (HAVE_INTTYPES_H, uintmax_t): New macros.
263         * configure.in (CPPFLAGS, LDFLAGS, LIBS): Set to appropriate
264         values if large file support needs explicit enabling.
265         (HAVE_INTTYPES_H, uintmax_t): New macros to configure.
267         * doc/fileutils.texi: Describe new -H option, new ls -h option.
268         Clarify about powers of 1000 vs 1024.
270         * lib/Makefile.am (libfu_a_SOURCES): Add new file human.c.
271         (noinst_HEADERS): Add new file human.h.
273         * lib/fileblocks.c (st_blocks): long -> off_t.
274         Avoid arithmetic overflow when size is near max.
275         Depend on _POSIX_SOURCE and BSIZE, not _POSIX_VERSION, for
276         compatibility with system.h.
277         (BSIZE): Remove definition, since if BSIZE is not defined
278         we're never invoked.
280         * lib/fsusage.c: Do all calculations using uintmax_t.
281         Include <inttypes.h> if available.
282         (adjust_blocks, CONVERT_BLOCKS): Remove.
283         (get_fs_usage): Set new member fsu_blocksize, and do not convert
284         numbers to 512-byte block units; this avoids overflow here.
285         Cast lseek arg to off_t, not long.
287         * lib/fsusage.h (struct fs_usage): New member fsu_blocksize.
288         Other members are now uintmax_t, not long.
290         * lib/human.c, lib/human.h: New files.  The interface is inspired
291         by the human_readable function that was in du.c, but it's pretty
292         much rewritten from scratch.
294         * lib/idcache.c (getuidbyname, getgidbyname): Names can now
295         be NULL in cache.  This change merely fixes ifdeffed-out code.
297         * lib/savedir.c (savedir): Check for size zero before invoking
298         malloc; this can occur if st_size arg overflows on conversion to
299         unsigned int.  All callers now cast st_size arg to unsigned int.
301         * src/chgrp.c (<limits.h>, UINT_MAX, UINT_MAX): Remove; now
302         done by system.h.
304         * src/copy.c (copy_reg): Store file size as off_t, not long.
305         Do not assume st_size has been normalized to 512 byte blocks,
306         or that it fits in size_t after dividing by the blocksize.
308         * src/cp-hash.c (<inttypes.h>): Include if HAVE_INTTYPES_H.
309         (hash_insert2): Cast inode number to uintmax_t; this prevents
310         negative remainders if the inode number is negative and ino_t
311         is longer than unsigned.
313         * src/dd.c, src/df.c, src/du.c, src/ls.c (<inttypes.h>): Include if
314         HAVE_INTTYPES_H.
315         ("human.h"): Include.
317         * src/dd.c (input_blocksize, output_blocksize, conversion_blocksize):
318         Now size_t instead of long.  0 means unset.
319         (skip_records, seek_record, max_records): Now uintmax_t, not long.
320         (w_partial, w_full, r_partial, r_full, r_truncate):
321         Now uintmax_t instead of unsigned.
322         (print_stats): Print counts as uintmax_t, not unsigned.
323         (main, skip): Check for overflow when computing file offsets.
324         (skip): Records count arg is uintmax_t, not long; blocksize arg is
325         size_t, not long.  Try lseek even on non regular files, as per comment.
326         (oc, col): Now size_t, not int.
327         (copy): No need to check max_records >= 0 any more, as the
328         default value is now effectively infinity.
329         Cast lseek arg to off_t.
330         (copy, copy_with_block): conversion_blocksize - col can never
331         be negative now, since it's unsigned, so rewrite loops to
332         avoid problems with unsigned.
333         (scanargs): Parse numeric args using uintmax_t, not int.
334         Check for overflow when converting block size args to size_t.
335         Blocksize options are now unsigned, and are now 0 when not set yet.
336         (parse_integer): Return uintmax_t, not int; accept new int * arg
337         to store error indicator, since all returned values are now valid.
338         Check for overflow when scanning integer.
340         * src/df.c (LONGEST_HUMAN_READABLE_1K_BYTE_BLOCKS): Remove.
341         (human_readable_base): Renamed from human_blocks; value is now
342         zero or positive integer, not just zero or nonzero.
343         (output_units): New variable;
344         replaces booleans kilobyte_blocks and megabyte_blocks.
345         (long_options): Add --si or -H.
346         (print_header): Adjust to renamed option variables.
347         (human_readable_1k_blocks): Remove.
348         (show_dev): Count blocks using uintmax_t, not long.
349         Calculate percentages using double, not long; this still isn't
350         perfect as it suffers double rounding, but it's more likely to
351         round correctly in practice than using long did.
352         Adjust to renamed option variables.
353         Use new human_readable library function to format uintmax_t values.
354         (usage): Add -H, --si.
355         (main): Adjust to renamed option variables.
356         Use -H if BLOCKSIZE is SI.  Add -H.
358         * src/du.c (LONGEST_HUMAN_READABLE, enum Output_units): Remove.
359         (count_entry): Now returns uintmax_t, not long.
360         (human_readable_base): Renamed from opt_human_readable; value is now
361         zero or positive integer, not just zero or nonzero.
362         (output_units): Now an integer giving output size.
363         (tot_size): Now uintmax_t, not long.
364         (long_options, usage): Add --si or -H.
365         (main): Adjust to renamed option variables.
366         Use -H if BLOCKSIZE is SI.  Add -H.
367         (human_readable): Remove; rewritten and now in lib/human.c.
368         (print_size): Rewrite in terms of human_readable.
369         Accept extra arg to be printed after size; all callers changed.
371         * src/install.c (BITSPERBYTE): Remove.
372         (UID_T_MAX, GID_T_MAX): Define in terms of TYPE_MAXIMUM.
374         * src/ls.c (<limits.h>): Don't include; system.h does it now.
375         (INT_MAX): Remove.
376         (longdiff): Remove bogus definition that uses subtraction;
377         it gives the wrong answer when overflows occur.
378         (convert_blocks): Remove.
379         (output_units): New variable;
380         replaces booleans kilobyte_blocks and megabyte_blocks.
381         (human_readable_base): New variable.
382         (long_options, usage): Add -h or --human-readable and -H or --si.
383         (decode_switches): Adjust to renamed option variables.
384         Use -H if BLOCKSIZE is SI.  Add -h, -H.
385         (print_dir): Count blocks using uintmax_t, not int.
386         (gobble_file): Now returns uintmax_t, not int.
387         Don't convert blocks to 512 byte units, as this might overflow;
388         let caller handle the problem.  Deduce what caller will print
389         by invoking human_readable.
390         (print_long_format, print_file_name_and_frills): Don't assume
391         inode number, block count, file size fit in unsigned long.
392         Use human_readable to do block count conversion and to print
393         file sizes.
394         (prep_non_filename_text): Print decimal string for time if
395         localtime fails due to enormous time_t.
397         * src/system.h (<limits.h>): Include if HAVE_LIMITS_H.
398         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX, UINT_MAX):
399         New macros.
400         (ST_NBLOCKS): Now counts actual blocks, not 512-byte blocks.
401         (ST_NBLOCKSIZE): New macro.
403 1997-11-24  Jim Meyering  <meyering@na-net.ornl.gov>
405         * src/sys2.h: New file -- but just temporary.
406         * src/system.h: Move lots of pieces into sys2.h.
407         Include sys2.h.
409 1997-11-19  Jim Meyering  <meyering@na-net.ornl.gov>
411         * lib/Makefile.am (AUTOMAKE_OPTIONS): Use ansi2knr so *I* don't
412         have to convert my hash package to use k&r C.
414 1997-11-15  Jim Meyering  <meyering@na-net.ornl.gov>
416         * intl/Makefile.in (distclean): Don't remove libintl.h here.
417         * Makefile.am (DISTCLEANFILES): Remove it here instead.
419 1997-11-13  Jim Meyering  <meyering@na-net.ornl.gov>
421         * lib/mktime.c: Update from FSF.
422         * lib/strftime.c: Update from FSF.
423         * m4/strftime.m4: Check for POSIX.2's %f format spec.
425 1997-11-12  Jim Meyering  <meyering@na-net.ornl.gov>
427         * src/copy.c (copy_dir): Use path_concat rather than open-coding it.
429         * src/rm.c [mempcpy]: Remove definition.
430         * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define here instead.
431         * lib/path-concat.c (path_concat): Use mempcpy, not stpcpy.
433 1997-11-09  Jim Meyering  <meyering@na-net.ornl.gov>
435         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
436         * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
437         (jm_FUNC_GNU_STRFTIME): Use new macro.
438         (jm_FUNC_STRFTIME): New macro.  Likewise.
439         Reported by Noel Cragg.
441 1997-11-08  Jim Meyering  <meyering@na-net.ornl.gov>
443         * m4/getline.m4: Fix typo in comment.
444         Add header check for string.h.
446         * m4/Makefile.am (EXTRA_DIST): Add readdir.m4.
447         * configure.in (jm_FUNC_READDIR): Use it.
448         (AC_FUNC_FNMATCH): Add mempcpy.
450 1997-11-02  Jim Meyering  <meyering@na-net.ornl.gov>
452         * acconfig.h: Add malloc and realloc.
454         * src/rm.c: Put cycle-detecting code inside an
455         #ifdef ENABLE_CYCLE_CHECK, for systems lacking d_ino.
456         [D_INO_IN_DIRENT]: Define ENABLE_CYCLE_CHECK.
458         * src/rm.c: (ASSIGN_STRDUPA): Clean up.
459         (right_justify): Use memcpy return value directly.
460         Suggestions from Ulrich Drepper.
462         (remove_cwd_entries) [! defined HAVE_WORKING_READDIR]: Impose overhead
463         of working around non-POSIX readdir implementation only on systems
464         that need it.
465         (remove_cwd_entries): Temporarily save a copy of each entry name in
466         an obstack rather than on the stack via alloca, then free it in the
467         likely event that we don't save the entry in the hash table.
469 1997-10-25  Jim Meyering  <meyering@na-net.ornl.gov>
471         * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
472         (xcalloc): #ifdef-out unused function.
473         (xrealloc): Remove code to work around deficient versions of realloc.
474         Now we have an autoconf-enabled replacement version.
475         (xmalloc): Remove code to work around deficient versions of malloc.
476         Now we have an autoconf-enabled replacement version.
478         * configure.in (jm_FUNC_MALLOC): Use it.
480         * lib/Makefile.am (EXTRA_DIST): Add malloc.c.
481         * lib/malloc.c: New file.
482         * m4/malloc.m4: New file.
483         * m4/Makefile.am (EXTRA_DIST): Add malloc.m4.
485         * lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
487         * lib/xalloc.h: New file.
488         * lib/xmalloc.c: Updated from textutils.
490         * src/*.c: Remove old-style xmalloc and xrealloc decls.
491         * src/system.h: Include xalloc.h.
492         Remove dcls of xmalloc, xcalloc and xrealloc.
494 1997-10-24  Jim Meyering  <meyering@na-net.ornl.gov>
496         * src/ls.c (gobble_file): Cast pointer arg in xrealloc call to char*.
497         * src/*.c: Remove old-style xmalloc and xrealloc decls.
498         * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
499         Suggestion from Achim Blumensath.
501 1997-10-23  Jim Meyering  <meyering@na-net.ornl.gov>
503         * Makefile.am (aclocal-files): Also depend on m4/Makefile.am.
505         * src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
506         [!HAVE_DECLARATION_MALLOC]: Declare malloc.
507         [!HAVE_DECLARATION_REALLOC]: Declare realloc.
508         [!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
509         [!HAVE_DECLARATION_STRSTR]: Declare strstr.
510         * src/copy.c: Remove stpcpy decl.
511         * src/cp.c: Likewise.
512         * src/install.c: Likewise.
513         * src/ln.c: Likewise.
514         * src/ls.c: Likewise.
515         * src/dircolors.c: Remove free and malloc decls.
516         * src/ls.c: Likewise.
517         * src/rm.c: Remove free, malloc, and realloc decls.
518         On some systems, strstr and stpcpy are macros, so declaring them
519         unconditionally gets syntax errors.
520         Reported by Mark M. Kettenis.
522         * configure.in: Use jm_CHECK_DECLS.
523         * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.
525 1997-10-22  Jim Meyering  <meyering@na-net.ornl.gov>
527         * m4/decl.m4: New file.
528         * m4/check-decl.m4: New file.  New macro, jm_CHECK_DECLS.
530 1997-10-18  Jim Meyering  <meyering@na-net.ornl.gov>
532         * src/rm.c (remove_cwd_entries): Entries in table of processed dir
533         entries are not malloc'd, so don't have hash cleanup free them.
534         Rewind dirp upon NULL readdir, required for at least SunOS.
536 1997-10-13  Jim Meyering  <meyering@na-net.ornl.gov>
538         * configure.in (AC_CHECK_HEADERS): Add termios.h.
539         * src/ls.c: Bracket inclusion of termios.h with #ifdef HAVE_TERMIOS_H.
540         Masami Takikawa reported that this is necessary on NeXTStep 3.0 systems.
542 1997-10-07  Jim Meyering  <meyering@na-net.ornl.gov>
544         * src/*.c: Update bug-reporting address.
546 1997-10-06  Jim Meyering  <meyering@na-net.ornl.gov>
548         * src/install.c (usage): Add a line describing --verbose.
550         * lib/makepath.c (make_path): Print message IFF the directory was
551         just created and the format string is non-NULL.
552         Print the verbose message using fprintf, not error.
554 1997-10-05  Jim Meyering  <meyering@na-net.ornl.gov>
556         * lib/Makefile.am (noinst_HEADERS): Add savedir.h.
558         * src/copy.h (struct cp_options): New field: require_preserve.
559         * src/copy.c (copy_internal): Use require_preserve.
560         * src/cp.c (cp_option_init): Initialize it.
561         (main): Set to 1 for -a and for -p.
563 1997-10-03  Jim Meyering  <meyering@na-net.ornl.gov>
565         * lib/savedir.h (savedir) [__P]: New file with prototype.
566         * lib/savedir.c (savedir): Declare DIR parameter to be const.
567         Include savedir.h.  Indent cpp directives.
568         * src/chgrp.c: Remove old-style savedir dcl.  Include savedir.h for
569         prototype.
570         * src/chmod.c: Likewise.
571         * src/chown.c: Likewise.
572         * src/copy.c: Likewise.
573         * src/du.c: Likewise.
574         Achim Blumensath reported that ``on systems like BeOS, where off_t is
575         64 bits [not having a prototype] results in passing 0 as name_size...''
577 1997-09-27  Jim Meyering  <meyering@na-net.ornl.gov>
579         * src/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), per
580         automake manual.
582 1997-09-20  Jim Meyering  <meyering@na-net.ornl.gov>
584         * lib/Makefile.am (libfu_a_SOURCES): Use hash.c, not oa-hash.c.
585         (noinst_HEADERS): Use hash.h, not oa-hash.h.
587 1997-09-15  Jim Meyering  <meyering@na-net.ornl.gov>
589         * src/rm.c: Use hash.c (chaining) functions, not those of oa-hash.c
590         (open addressing).  The latter implementation is wonderful when
591         deletions are rare, but doen't support the frequent deletions
592         required to implement the active directory set.
594         * lib/hash.c: New file -- replaces oa-hash.c.
595         * lib/hash.h: New file.
596         * lib/oa-hash.c: Remove.
597         * lib/oa-hash.h: Remove.
599         * src/ln.c (do_link): Perform S_ISLNK test only if lstat succeeded.
600         Otherwise, dest_stats could be used uninitialized.
602 1997-09-14  Jim Meyering  <meyering@na-net.ornl.gov>
604         * src/rm.c (full_filename): Use realloc, not xrealloc.
606         * configure.in (jm_FUNC_REALLOC): Use it.
607         * m4/Makefile.am (EXTRA_DIST): Add realloc.m4.
608         * m4/realloc.m4: New file.
609         * lib/Makefile.am (EXTRA_DIST): Add realloc.c.
610         * acconfig.h (realloc): Add #undef.
612         * src/dd.c (equal): Use STREQ (from system.h) instead.
613         (siginfo_handler): New function: handler for SIGINFO/SIGUSR1.
614         (install_handler): New function.
615         (main): Use install_handler instead of open-coding it.
616         Handle SIGINFO (or SIGUSR1 if that's not defined).
617         (print_stats): Move definition to precede first reference.
618         Remove prototype.
620 1997-09-13  Jim Meyering  <meyering@na-net.ornl.gov>
622         * src/ls.c (print_many_per_line): Add some non-essential curly braces.
623         (print_horizontal): Likewise.
624         (struct col_info) [valid_len]: Rename from `valid' which conflicted
625         with the macro in locale.h of SunOS4.1.4.
627         * src/rm.c: (PARAMS): Define.
628         (rm): Guard prototype in forward dcl with PARAMS.
630         * lib/strverscmp.h [HAVE_CONFIG_H]: Include config.h.
631         (PARAMS): Define.
632         Guard prototype with PARAMS.
634         * lib/oa-hash.c: Use K&R style function dcls, not ANSI.
635         (HASH_MALLOC): Prefix with (Type*) cast to placate old compilers.
636         Use assert, not ASSERT.
637         Include assert.h.
638         (HASH_DELETED_ITEM_MARKER): Define to address of file-scoped static,
639         not less-portable ((void *) (~0U)).
640         (HASH_VACANT): Define here, not in hash.h.
642         * lib/oa-hash.h: (HASH_DELETED_ITEM_MARKER): Move definition to hash.c.
643         (HASH_VACANT): Likewise.
645         * lib/strverscmp.c [HAVE_CONFIG_H]: Include config.h.
646         (strverscmp): Use `1' not `+1' -- some compilers (sunos' cc) can't
647         parse it.
649         * lib/strdup.c [HAVE_CONFIG_H]: Include config.h.
651         * src/rm.c: Finish rewrite to use chdir and hash tables.
652         See `Implementation overview' comment in the source.
654 1997-09-11  Jim Meyering  <meyering@na-net.ornl.gov>
656         * src/install.c: Add new option: --verbose (-v).
657         From Andreas Schwab.
659 1997-09-01  Jim Meyering  <meyering@na-net.ornl.gov>
661         * lib/Makefile.am (EXTRA_DIST): Remove mvdir.c and rmdir.c.
662         Add lstat.c and stat.c.
664         * src/ls.c [!STDC_HEADERS]: Declare malloc.
666         * m4/Makefile.am (EXTRA_DIST): Add stat.m4.
667         * m4/stat.m4: New file.
668         * m4/stat.m4 (jm_FUNC_STAT): New macro.
669         * lib/stat.c: New file.
670         * configure.in (jm_FUNC_STAT): Use it.
672         * src/ln.c (do_link): Form destination file name (when DEST is a
673         directory) before checking whether SOURCE and DEST are the same file.
674         See tests/ln/sf-1.  Reported by Michael Veksler.
676         * tests/ln: New directory and test.
677         * tests/Makefile.am (SUBDIRS): Add ln.
678         * configure.in (AC_OUTPUT): Add tests/ln/Makefile.
680 1997-08-31  Jim Meyering  <meyering@na-net.ornl.gov>
682         * src/chgrp.c (change_file_group): Call describe_change with a
683         3-state argument.
684         (describe_change): Report whether the operation was successful,
685         a failure, or that the request was a no-op.
686         Before, running `chgrp --verb bin /' as non-root reported
687           group of / changed to bin
688           chgrp: you are not a member of group `bin': Not owner
690         * src/chown.c (change_file_owner): Call describe_change with a
691         3-state argument.
692         (describe_change): Report whether the operation was successful,
693         a failure, or that the request was a no-op.
694         Before, running `chown --verb bin /' as non-root reported
695           owner of / changed to bin
696           chown: /: Not owner
698         * configure.in (jm_FUNC_LSTAT): Use it.
700         * acconfig.h (lstat): Add #undef.
702         * m4/Makefile.am (EXTRA_DIST): Add lstat.m4.
704         * m4/lstat.m4: New file.
705         * m4/lstat.m4 (jm_FUNC_LSTAT): New macro.
706         * lib/lstat.c: New file.
708         * src/rm.c (fspec_get_full_mode): Don't call error here.
709         (remove_file): Call error after fspec_get_full_mode call, if necessary.
710         Don't print mode when asking whether to descend into write-protected
711         directory.
712         (remove_dir): Don't fail just because we can't stat the file to get
713         the mode for the prompt string.
714         (rm): Exit successfully for missing files when -f is given.
715         (rm): Remove cruft to work around SunOS4's broken lstat now that
716         there is a working replacement function.
718         * lib/oa-hash.c: New file.
719         * lib/oa-hash.h: New file.
721         * lib/Makefile.am (libfu_a_SOURCES): Add oa-hash.c.
722         (noinst_HEADERS): Add oa-hash.h.
724         * lib/stpncpy.c: New file.
725         * configure.in (AC_REPLACE_FUNCS): Add stpncpy.
727         * src/rm.c (remove_cwd_entries): Convert to using oa-hash.c.
729         * m4/Makefile.am (EXTRA_DIST): Add d-ino.m4 and d-type.m4.
731         * tests/rm: New directory and tests.
732         * tests/Makefile.am (SUBDIRS): Add rm.
733         * configure.in (AC_OUTPUT): Add tests/rm/Makefile.
735         * src/dircolors.c [!STDC_HEADERS]: Declare malloc.
736         Remove unnecessary dcl of xmalloc.
738         * src/rm.c: Major rewrite in progress.  Use fchdir/chdir.
740         * m4/d-ino.m4: New file.
741         * m4/d-type.m4: New file.
742         * acconfig.h (D_TYPE_IN_DIRENT): Define.
743         * configure.in: Move code to check for d_ino into its own file.
744         Use jm_STRUCT_DIRENT_D_TYPE and jm_STRUCT_DIRENT_D_INO.
746         * src/chmod.c (change_file_mode): Call describe_change with a 3-state
747         argument.
748         (describe_change): Report whether the operation was successful,
749         a failure, or that the request was a no-op.
750         Before, running `chmod --verb u-r /' as non-root reported
751           mode of / changed to 0355 (-wxr-xr-x)
752           chmod: /: Not owner
753         Reported by Philippe Schnoebelen <phs@hobbes.fing.edu.uy>
755 1997-07-28  Jim Meyering  <meyering@na-net.ornl.gov>
757         * configure.in (AC_OUTPUT): Remove tests/ls/Makefile.
758         Add tests/cp/Makefile and tests/mkdir/Makefile.
760         * lib/modechange.c (mode_create_from_ref): Don't use umask.
761         Don't use MODE_X_IF_ANY_X.
763         * src/install.c (main): New option --preserve-timestamps (-p).
764         (install_file_in_file): Preserve timestamps if requested.
765         (change_timestamps): New function.
766         (usage): Describe --preserve-timestamps.
767         Correct --mode description.
768         From Galen Hazelwood.
770         * src/install.c: Declare pointer parameters const as appropriate.
772 1997-07-13  Jim Meyering  <meyering@na-net.ornl.gov>
774         * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
775         Now, automake includes it automatically.
777 1997-07-09  Jim Meyering  <meyering@na-net.ornl.gov>
779         * tests/mkdir: New directory and associated files.
780         * tests/cp: New directory and associated files.
781         * tests/Makefile.am (SUBDIRS): Add cp and mkdir.
783         * lib/makepath.c (make_path): Chdir to `/' before starting if necessary.
784         Call save_cwd before while loop rather than from first iteration
785         inside it.
787         * lib/strverscmp.c (strverscmp): Add `parenentheses around arithmetic
788         in operand of |' as suggested by gcc -Wall.
790 1997-07-06  Jim Meyering  <meyering@na-net.ornl.gov>
792         * lib/idcache.c (getuidbyname): Declare parameter to be const.
793         (getgidbyname): Declare parameter to be const.
795 1997-07-06 Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>
797         * lib/modechange.h (mode_create_from_ref): Add prototype.
798         (MODE_MASK_ALL): New define.
799         (MODE_BAD_REFERENCE): New define.
800         * lib/modechange.c (mode_create_from_ref): New function.
801         * lib/strverscmp.c: New file.
802         * lib/strverscmp.h: New file.
803         * lib/Makefile.am (noinst_HEADERS): Add strverscmp.h.
805         * configure.in (AC_REPLACE_FUNCS): Add strverscmp.
807         * src/ls.c: Add new option: --sort=version (-v).
808         * src/chgrp.c: Add new option: --reference=FILE.
809         * src/chown.c: Add new option: --reference=FILE.
810         * src/chmod.c: Add new option: --reference=FILE.
812 1997-07-06  Jim Meyering  <meyering@na-net.ornl.gov>
814         * lib/idcache.c (getuser): Return NULL (rather than stringified uid)
815         upon lookup failure.
816         (getgroup): Likewise.
817         (getuidbyname) [NOT_USED]: #ifdef-out unused function.
818         (getgidbyname) [NOT_USED]: #ifdef-out unused function.
819         Suggested by François Pinard.
820         * src/ls.c (print_long_format): Reflect changes in semantics of
821         getuser, getgroup.
823 1997-07-04  Jim Meyering  <meyering@na-net.ornl.gov>
825         * Makefile.am (aclocal-files): Look in source directory, not build dir.
826         From Andreas Schwab.
828 1997-07-03  Jim Meyering  <meyering@na-net.ornl.gov>
830         * src/mv.c (apply_attributes): New function.
831         (copy_reg): Use apply_attributes instead of open-coding the pieces.
832         Now, failure to preserve file attributes does not cause mv to change
833         its exit status, and such failures elicit warning diagnostics.  This
834         behavior is required by POSIX.  Before, failure to preserve ownership
835         due to insufficient access was diagnosed only for root.
836         Prompted by a report from Bengt Martensson.
838 Tue Jul  1 06:42:17 1997  Jim Meyering  <meyering@na-net.ornl.gov>
840         * lib/makepath.c (make_path): Reorder stat-then-mkdir-if-missing
841         calls so that mkdir is called first.  Before make_path would first
842         `stat' a directory, then call mkdir if it didn't exist.  But if
843         some other process created the directory between the stat & mkdir,
844         the mkdir would fail with EEXIST.  Diagnosis and suggestion from
845         Greg McGary.
847 Sun Jun 29 17:19:30 1997  Jim Meyering  <meyering@na-net.ornl.gov>
849         * src/dd.c (copy): Add FIXME comment.
851         * src/mv.c (copy_reg): New parameter, SOURCE_STATS.
852         (do_move): Update caller.
854 Sun Jun 22 08:32:46 1997  Jim Meyering  <meyering@na-net.ornl.gov>
856         Use variable width columns when printing in multi-column mode.
857         * src/ls.c: (init_col_info): New function.
858         (print_current_files): Call init_col_info if format is
859         `many_per_line' or `horizontal'.
860         (print_many_per_line): Calculate and apply optimum column widths.
861         (print_horizontal): Likewise.
862         From Ulrich Drepper.
864         * src/mv.c (movefile): Take new boolean parameter, DEST_IS_DIR,
865         to save a stat per moved file when the destination is a directory.
866         (main): Call movefile with additional argument.
867         (strip_trailing_slashes_2): New function.
868         (movefile): Remove trailing slashes from dest.  Otherwise, stat ("b/")
869         fails with ENOTDIR on systems including Linux w/libc 2.0.30.
870         Reproduce with `rm -rf a b; mkdir a; touch b; ./mv a b/'.
871         (do_move): Fix misleading comment.
873 Sat Jun 21 21:26:57 1997  Jim Meyering  <meyering@na-net.ornl.gov>
875         * configure.in: Remove now-unused definitions of LN, MV, RM.
877 Sun Jun 15 07:04:29 1997  Jim Meyering  <meyering@na-net.ornl.gov>
879         * lib/full-write.c (full_write): Add comment regarding failure due
880         to bug in Linux Slackware 1.2.13 kernel.
882         * lib/makepath.c: Rewrite using save-cwd.c and chdir to remove
883         quadratic component of complexity.  Before, it processed O(n^2)
884         directory name components via stat and mkdir.  Now it's O(n).
885         This makes mkdir -p a lot more efficient when creating directories
886         with very many components.  On a Linux 2.0.30 ext2fs filesystem
887         this command: mkdir -p `perl -e 'print "a/" x 500'`  now runs in
888         0.77 seconds (user+sys).  Contrast that with the 9.5(!) seconds
889         it took before.
891 Sat Jun 14 11:40:17 1997  Jim Meyering  <meyering@na-net.ornl.gov>
893         * man/Makefile.am: (EXTRA_DIST): Put man_MANS here so they are
894         distributed.  This is necessary for automake-1.1p.
896 Tue Jun  3 15:00:00 1997  Jim Meyering  <meyering@na-net.ornl.gov>
898         * lib/fileblocks.c [HAVE_UNISTD_H]: Include unistd.h.
899         John Gatewood Ham reported that this is necessary for DJGPP/Win95.
901 Wed May 28 06:35:56 1997  Jim Meyering  <meyering@na-net.ornl.gov>
903         * lib/mountlist.c (read_filesystem_list): Add `|| defined (__OpenBSD__)'
904         to the NetBSD #if so OpenBSD also uses the f_fstypename member.
905         (fstype_to_string): Add `&& !defined (__OpenBSD__)' to the NetBSD #if
906         expression to exclude this function definition.  OpenBSD 2.1 beta
907         doesn't need it.  Patch from Hugh Daniel <hugh@ecotone.xanadu.com>
909 Tue May 27 04:35:17 1997  Jim Meyering  <meyering@na-net.ornl.gov>
911         * src/cp.c: Use base_name, not basename.
912         * src/dircolors.c: Likewise.
913         * src/install.c: Likewise.
914         * src/ln.c: Likewise.
915         * src/mv.c: Likewise.
916         * src/mvdir.c: Likewise.
917         * src/rm.c: Likewise.
919         * configure.in: Add AC_SYS_LONG_FILE_NAMES.
920         Check for pathconf.
921         Don't replace basename.  Now we use only base_name.
922         Clean up kludge that worked around a bug (now-fixed) in automake.
924         * lib/argmatch.h Change dcl of program_name so it doesn't conflict
925         with the ubiquitous char* one.
927         * lib/addext.c: New file.
928         * lib/Makefile.am (libfu_a_SOURCES): Add addext.c.
929         Remove getversion.c;  get_version is now in backupfile.c.
930         Add basename.c since it's no longer replacible.
932         * lib/getopt.c: Update from glibc via patch-2.2.93.
933         * lib/getopt1.c: Likewise.
934         * lib/getopt.h: Likewise.
935         * lib/argmatch.h: Update from FSF via patch-2.2.93.
936         * lib/argmatch.c: Likewise.
937         * lib/backupfile.c: Likewise.
938         * lib/backupfile.h: Likewise.
939         * lib/basename.c: Likewise.
941 Sun May 25 09:21:01 1997  Jim Meyering  <meyering@na-net.ornl.gov>
943         * src/copy.c (copy_internal): When preserving symlinks
944         (--no-dereference) and the destination file is a symlink,
945         use stat (not xstat) to see if it points back to the source.
946         Reported by James <james@albion.glarp.com>.
948         * src/du.c: Remove global variable opt_human_readable.
949         (enum Output_units): Rename from output_size.
950         Rename size_* to Unit_*.
951         Add Unit_variable to correspond to --human-readable.
952         (convert_blocks): Remove now-unused definition.
953         (human_readable): Rename paramater n_bytes to n_blocks.
954         Adjust conversions to reflect fact that input is now number of
955         512-byte blocks, not bytes.
956         (print_size): New function.
957         (du_files): Use print_size instead of open coding it.
958         (count_entry): Always count in units of 512-byte blocks to delay.
959         This lets du accumulate totals corresponding to a terabyte before
960         overflowing 32-bit long int.
961         Use print_size instead of open coding it.
963         Tue Feb  4 11:58:49 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
965         * src/du.c (convert_blocks): Remove now-unnecessary #undef.
966         (du_files): Pass output_size unchanged to convert_blocks.  No need
967         to test output_size for size_bytes, convert_blocks handles that
968         correctly.
969         (count_entry): Likewise.
971         * src/system.h (convert_blocks): Remove definition.
972         * src/ls.c (convert_blocks): Add definition.
974 Sun May 25 09:11:17 1997  Jim Meyering  <meyering@na-net.ornl.gov>
976         * src/du.c [AIX]: Remove unused #pragma alloca.
978 Sat May 24 09:20:12 1997  Jim Meyering  <meyering@na-net.ornl.gov>
980         * src/rmdir.c: New options: --ignore-fail-on-non-empty and --verbose.
981         (remove_parents): Implement new options.
982         (main): Likewise.
984         * lib/mountlist.c (read_filesystem_list): Show automount-related
985         duplicate filesystems only when --all specified.  With suggestions
986         from Stuart Kemp.  Also indent cpp directives.
988         * configure.in (AC_CHECK_FUNCS): Add hasmntopt.
989         (AC_CHECK_HEADERS): Add sys/mntent.h.
990         (ALL_LINGUAS): Add Czech (cs).
992 Wed Mar 26 23:43:57 1997  Jim Meyering  <meyering@na-net.ornl.gov>
994         * src/du.c (main): Implement new --max-depth=N option.
995         Based on the idea and a patch from Torbjorn Lindgren.
996         (du_files): Likewise.
997         (count_entry): Likewise.
999 Sat Mar 22 20:29:10 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1001         * missing: New file -- from the automake-1.1m distribution.
1003 Fri Mar 21 23:58:12 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1005         * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
1006         (aclocal.m4): Use aclocal's new -I option.
1008 Thu Mar 13 21:27:36 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1010         * lib/mktime.c: (TIME_T_MIN): Work around a bug in Cray C 5.0.3.0.
1012 Wed Mar 12 23:11:11 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1014         * src/chgrp.c (change_file_group): Use uid of -1 to indicate
1015         we don't want to change the file's user ID.
1017         * m4/gettext.m4: Update from gettext-0.10.27.
1019         * acconfig.h (chown): Add #undef.
1021         * configure.in (ALL_LINGUAS): Add ko.
1022         Use jm_FUNC_CHOWN.
1023         * m4/chown.m4: New file.
1024         * m4/Makefile.am (EXTRA_DIST): Add chown.m4.
1025         * lib/chown.c: New file.
1026         * lib/Makefile.am (EXTRA_DIST): Add chown.c.
1028 Sun Mar  9 22:46:41 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1030         * src/ls.c (decode_switches): Ignore value of COLUMNS envionment
1031         variable when it is the empty string.  Suggestion from Ulrich Drepper.
1032         This makes it easier on people using shells (which?) with which it
1033         is not easy to unset environment variables.
1035 Wed Feb 26 23:46:39 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1037         * lib/getdate.y: (tYEAR_UNIT): Increase yyRelYear by $1, not just by 1.
1038         From Andreas Schwab.
1040         * src/copy.c (copy_internal): When there is any potential for
1041         ambiguity in a diagnostic, give explanatory diagnostic in addition
1042         to file name.
1043         * src/cp.c (re_protect): Likewise.
1045 Sat Feb 22 14:10:25 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1047         * lib/getdate.y
1048         (tMONTH_UNIT): Increase yyRelMonth by $1, not just by 1.
1049         (tDAY_UNIT): Likewise for yyRelDay.
1050         (tHOUR_UNIT): Likewise for yyRelHour.
1051         (tMINUTE_UNIT): Likewise for yyRelMinutes.
1052         (tSEC_UNIT): Likewise for yyRelSeconds.
1053         Matthew S. Levine reported that touch -d yesterday didn't work.
1055 Thu Feb 20 20:16:59 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1057         * lib/mktime.c: Update from libc.
1058         * lib/strtol.c: Update from libc.
1060 Wed Feb 19 22:06:32 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1062         * src/ls.c (main): Remove trailing slashes from command line arguments.
1063         Otherwise, running `mkdir x; chmod 644 x; ls -d x/' (note the trailing
1064         slash) makes ls fail with permission denied on at least Linux 1.2.13
1065         and 2.0.14 systems.
1067 Wed Feb  5 21:54:17 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1069         * src/ls.c (quote_filename): Allocate two more bytes (for quotes)
1070         when using --quote-name (-Q).
1071         Feb 2 change wasn't complete.  Patch from Mark Harris.
1073 Mon Feb  3 21:49:55 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1075         * po/POTFILES.in: Add copy.c and cp-hash.c.  Remove cp-aux.c.
1077 Sun Feb  2 09:40:37 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1079         * src/system.h [__GNUC__]: Don't define alloca to __builtin_alloca.
1081         * Makefile.am (SUBDIRS): Add tests.
1083         * configure.in (AC_OUTPUT): Add tests/Makefile and tests/ls/Makefile.
1084         * tests: New directory.
1085         * tests/ls: New directory.
1087         * src/ls.c (quote_filename): Don't backslash-escape double quotes.
1088         This fixes a problem whereby columns weren't aligned when some files
1089         contained double quote characters and ls's --escape (-b) option was
1090         used.  Reported by Mark Harris.
1092         * src/cp-hash.c (struct entry): Move dcl to this file from cp.h.
1093         (struct htab): Likewise.
1094         No longer include cp.h.  Instead, include the things it used to
1095         include.
1096         (hash_insert2): Make function static.  Move this function to precede
1097         the sole function from which it is called.
1099         * src/Makefile.am (noinst_HEADERS): Add copy.h, cp-hash.h.
1100         Remove cp.h.
1101         (EXTRA_DIST): Remove cp-aux.c and cp-hash.c.
1102         (cp_SOURCES): Remove cp-aux.c.  Add cp-hash.c.
1103         * src/cp-aux.c: Remove file.
1104         * src/cp.h: Remove file.
1106         * src/du.c (hash_insert2): Rename local HTAB to HT to avoid shadowing
1107         global.
1109         * src/dircolors.c [obstack_chunk_alloc]: Define to malloc, not xmalloc
1110         to work better with new obstack functions.
1111         * src/ls.c (obstack_chunk_alloc): Likewise.
1113         * src/df.c (main): Rename local I to C to avoid shadowing and to
1114         be more consistent.  Declare I in inner scopes.
1116         * po/Makefile.in.in (POTFILES): Redirect to an intermediate file
1117         and write-protect POTFILES.
1119 Fri Jan 31 21:13:04 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1121         * src/chown.c (usage): Make the parenthetical note on --no-dereference
1122         a little more general.
1124         * src/*.c: Compare getopt_long return value against -1, not EOF.
1125         Use NULL, not `(int *) 0' as last parameter in getopt_long call.
1126         (usage): Bracket bug-reporting address with <> and append a period.
1128 1997-01-27  Paul Eggert  <eggert@twinsun.com>
1130         * src/ls.c (print_long_format): Fix off-by-one problem in size
1131         being passed to strftime.
1133 Sun Jan 26 20:17:50 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1135         * Version 3.16.
1137         * acconfig.h (strftime): Add #undef.  From Marcus Daniels.
1139 Sat Jan 25 00:34:39 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1141         * src/du.c (count_entry): Fix blatant bug (typo?) that made
1142         --megabytes report numbers in units of kilobytes.
1143         Reported by Galen Hazelwood.
1145         * src/cp.h: Remove now-unnecessary prototype for is_ancestor.
1147         * lib/Makefile.am (noinst_HEADERS): Add getdate.h.
1149         * src/cp-aux.c (is_ancestor): Remove function.
1150         * src/cp.c (is_ancestor): Add function.
1152         * src/cp.h: Remove spurious extern dcl of htab.
1154         * m4/getgroups.m4: Move the code from configure.in into
1155         this macro that resorts to looking for getgroups in -lbsd.
1156         Set new shell variable, GETGROUPS_LIB (that callers should check),
1157         if it is found there.
1158         * configure.in: Check $GETGROUPS_LIB just after jm_FUNC_GETGROUPS.
1159         (AC_CHECK_FUNCS): Remove getgroups.
1160         Remove code that resorts to looking for getgroups in -lbsd.
1162         * configure.in (jm_FUNC_GNU_STRFTIME): Use it -- because ls
1163         needs a version of strftime that supports the %e format and
1164         pretty many systems lack that: NextStep 3.3, Mips Ultrix ?.?.
1165         This is a little bit overkill (for now) in that if the strftime
1166         in your C library doesn't have all features of GNU strftime (even
1167         though it may support %e) ls will be linked with the version of
1168         strftime provided with this package.  But for an upcoming release,
1169         GNU ls will provide an option to allow the user to specify the
1170         date format string -- and for that I want to make GNU strftime
1171         the default in any case.  Think of this as an incentive to use
1172         the GNU C library.
1174 Fri Jan 24 23:36:00 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1176         * lib/long-options.c (parse_long_options): Reset optind to zero
1177         before just returning so that getopt internals get initialized from
1178         the probably-new parameters when/if getopt is called later.
1179         From Ulrich Drepper.
1181 Mon Jan 20 06:52:09 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1183         * configure.in (fu_cv_sys_truncating_statfs): Add preprocessor
1184         guard to make sure that this test for Sun brokenness doesn't
1185         get a false positive on any other type of system.  Eirik Fuller
1186         reported that Linux 2.1.20 <sys/vfs.h> has a f_spare member in
1187         the statfs struct.  And that triggered a false positive.
1189 Thu Jan  9 06:23:18 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1191         * m4/gettext.m4: Remove AC_ISC_POSIX.  From Karl Heuer.
1193 Wed Jan  8 16:38:24 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1195         * Version 3.15.
1197         * src/ls.c (print_long_format): Cast alloca return value to char*.
1199         * lib/getopt.c (_getopt_internal): Use `_', rather than the
1200         (sometimes-)expansion `gettext'.
1202 Tue Jan  7 22:49:55 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1204         * lib/getopt.c: New (more POSIX compliant) version from GNU libc.
1205         [_]: Define to gettext also if ENABLE_NLS is defined.
1206         This is temporary.
1208 Sun Jan  5 09:33:07 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1210         * src/ls.c (print_long_format): Avoid making unnecessary copy of
1211         date/time string.  Patch from Paul Eggert.
1212         (print_long_format): NUL-terminate line of output.
1213         (print_long_format): Detect and handle strftime failure
1214         due to pathologically long strings in locale tables.
1215         Patch from Paul Eggert.
1216         (print_long_format): Change references to BIGBUF in use of
1217         FPUTS macro to references to BUF.
1218         Use 11 (not 20) bytes for mode string buffer.
1220 Sat Jan  4 21:14:36 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1222         * src/ls.c (print_long_format): Clean up vestiges of legacy
1223         ctime-oriented code.  With internationalization and strftime,
1224         you can't presume that %a expands to a 3-byte string.
1225         Reported by Ross Ridge.
1226         (print_long_format): Use POSIX-mandated %e (blank-padded numeric
1227         day of month), not %d (the same number, but *zero*-filled).
1229 Fri Jan  3 21:08:29 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1231         * acconfig.h (getgroups): Add #undef.
1232         From Marcus Daniels.
1234 Thu Jan  2 21:16:16 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1236         * lib/Makefile.am (EXTRA_DIST): Add getgroups.c.
1238 Wed Jan  1 17:30:26 1997  Jim Meyering  <meyering@na-net.ornl.gov>
1240         * lib/getgroups.c: New file.
1242         * configure.in (AC_ARG_PROGRAM): Remove explicit use.
1243         It's implicit in AM_INIT_AUTOMAKE.  From Wayne Stewart.
1244         (list_mounted_fs): Fix typo (by declaring NUMSYS) in test for
1245         getfsstat on osf1.  From hitchens@epa001.enet.dec.com.
1247 Sun Dec 29 21:55:13 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1249         * configure.in (jm_FUNC_GETGROUPS): Use it.
1251 Sat Dec 28 14:32:05 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1253         * src/ls.c: Two problems fixed by these changes from Joakim Rosqvist.
1254         Quoting Joakim:
1255         1) The "total" number and the size of the first file as
1256         output from 'ls --color -s' did not get colorized according
1257         to the "no"-argument in LS_COLORS. Fixed by adding a function
1258         prep_non_filename_text which prints the C_LEFT C_NORM C_RIGHT
1259         strings (or C_END). It is called from main before any text is
1260         output, and from print_name_with_quoting after having output a
1261         colorized filename.
1262         2) If the "no"-argument of LS_COLORS is set, the terminal will be
1263         set to print in that color after ls exits. The man-pages suggests
1264         setting "no" and "fi" to the terminals default colors to avoid
1265         the problem, but that would mean I can't use anything but the
1266         default color for regular files and non-filename text. Fixed by
1267         outputting C_LEFT immediately followed by C_RIGHT right before
1268         exit, which restores the default color.
1270 Fri Dec 27 17:29:02 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1272         * Makefile.am (aclocal.m4): No longer depend on acinclude.m4.
1274         * configure.in: AC_REQUIRE version 2.12 of autoconf.
1276 Sun Dec 22 23:29:10 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1278         * acinclude.m4: Move macros to individual files in new directory, m4/.
1279         See ChangeLog entries in sh-utils for the details.
1281 Wed Dec 18 23:09:19 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1283         * src/dircolors.hin (ORPHAN): By default, color orphans red on
1284         a black background.
1286         * src/dircolors.c (usage): Remove --print-data-base.
1287         Now only --print-database remains.  Although it wasn't documented,
1288         --print-data-base was still accepted.  But it made `--p', `--print',
1289         `--print-data', etc. ambiguous.
1291         * src/ls.c (gobble_file): Stat symlinks also when printing with
1292         color and set linkok to reflect existence of referent.
1293         Patches from Joakim Rosqvist, James Antill, and Jesse Thilo.
1295 Tue Dec 17 21:03:40 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1297         * src/system.h (ISDIGIT): Replace with smaller, faster edition
1298         that yields nonzero only on ASCII digits.
1299         (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
1300         used to have.  From Paul Eggert.
1301         * lib/backupfile.c (ISDIGIT): Likewise.
1302         * lib/getdate.y (ISDIGIT): Likewise.
1304         * src/cp.c (ROOT_CHOWN_AFFECTS_SYMLINKS): New macro.
1305         (DO_CHOWN): Take an additional parameter.
1306         (LINK_CHOWN): Remove macro.
1307         (copy): When preserving owner and group of a symlink, use
1308         chown only if ROOT_CHOWN_AFFECTS_SYMLINKS and EUID == 0.
1309         Otherwise, the chown would affect the file referenced through
1310         the symlink.
1312 Sat Dec 14 14:51:50 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1314         * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
1315         name for cross compiling.
1316         Remove definitions of gettext-related macros.  The gettext
1317         installation procedure installs corresponding .m4 files so that
1318         aclocal will use them.
1320 Wed Dec 11 19:34:22 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1322         * Version 3.14.
1324 Tue Dec 10 00:14:24 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1326         * configure.in: Bump version to 3.13k.
1328         * src/install.c [_POSIX_VERSION]: Don't declare wait.  That
1329         declaration conflicted with one in a system header file on
1330         i386-pc-isc3.0, now that I've removed the AC_ISC_POSIX macro
1331         and _POSIX_VERSION is no longer defined.
1332         Reported by Karl Heuer.
1334         * configure.in (AC_ISC_POSIX): Remove kludgy macro.
1335         Use this test instead:
1336         (LIBS): Add -lcposix if it contains strerror.
1337         Patch from Karl Heuer.
1339         * lib/Makefile.am (EXTRA_DIST): Add mktime.c.
1340         Reported by Thomas Bushnell.
1341         * (EXTRA_DIST): Add strftime.c to appease automake.
1342         Although it's not used yet, it'll be used by ls's (to-be-done)
1343         --format=FORMAT option.
1345 Mon Dec  9 18:26:54 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1347         * lib/obstack.h: Include config.h.
1348         [!HAVE_BCOPY && HAVE_MEMCPY && !defined (bcopy)]: Define bcopy
1349         in terms of memcpy.  Reported by Marcus Daniels.
1351         * configure.in (LIBOBJS): After AC_FUNC_FNMATCH, add fnmatch.o
1352         and define fnmatch to rpl_fnmatch if necessary.
1354         * acconfig.h (fnmatch): Add undef.
1356         * src/df.c (find_mount_point): Convert from K&R style header to ANSI.
1357         Patch from Kaveh Ghazi.
1359 Sun Dec  8 07:22:38 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1361         =========== Update for automake-1.1k.
1362         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
1363         * configure.in (AM_CONFIG_HEADER): Use it.
1364         (AC_OUTPUT): Remove stamp-h timestamping statement.
1365         Now, AM_CONFIG_HEADER does it automatically.
1366         * lib/Makefile.am (noinst_LIBRARIES): Rename to libfu.a as per
1367         new automake requirement.
1368         Rename fu_* variables to libfu_a_*.
1370 Mon Dec  2 20:30:20 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1372         * configure.in (jm_FUNC_MKTIME): Use this instead of AM_FUNC_MKTIME.
1374         * src/system.h [!S_IXUGO] (S_IXUGO): Define it.
1376         * src/ls.c (print_color_indicator): Check the file's suffix only
1377         if it's a regular file.
1378         Reported by Santiago Vila Doncel.
1379         (print_type_indicator): Use S_IXUGO instead of writing out
1380         (S_IEXEC | S_IXGRP | S_IXOTH).
1381         (length_of_file_name_and_frills): Likewise.
1383 Sun Dec  1 13:07:39 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1385         * lib/getdate.y (date): Interpret the date, L/M/N, as YYYY/MM/DD
1386         if L >= 1000, otherwise as MM/DD/YY.  With this change,
1387         date --date=DATE accepts dates like those in an RCS log listing.
1389 Sat Nov 30 22:11:42 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1391         * acinclude.m4: (jm_FUNC_MKTIME): New macro.  This is like
1392         AM_FUNC_MKTIME, but with one addition: when it replaces the
1393         function, it also redefines mktime to gnu_mktime.
1395 Fri Nov 29 21:19:13 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1397         * src/install.c (copy_file): Allow installation from non-directory
1398         (rather than only regular) files.  Suggestion from Charles Karney.
1400         * src/df.c (main): Accept -F as a synonym for -t for compatibility
1401         with Solaris.  From Peter Eriksson.
1403         * src/ls.c (main): Close stdout and check result, in case any
1404         deferred writes fail.
1405         Use EXIT_SUCCESS and EXIT_FAILURE in exit and usage calls.
1407 Thu Nov 28 13:10:22 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1409         * src/df.c (find_mount_point): Use strip_trailing_slashes and dirname
1410         instead of open-coding them.  When given FILE containing no slashes,
1411         chdir to the directory containing it (the current directory) rather
1412         than to `..'.
1414         Tue Nov  5 14:51:56 1996  Miles Bader  <miles@gnu.ai.mit.edu>
1416         * src/df.c (find_mount_point): Use save_cwd/restore_cwd.
1417         "save-cwd.h": New include.
1419         Wed Oct 30 00:21:16 1996  Miles Bader  <miles@gnu.ai.mit.edu>
1421         * lib/fsusage.c (get_fs_usage): If DISK is 0 and we needed to use
1422         it, return -1 with 0 in ERRNO.
1423         * src/df.c (show_dev): Deal with null values for DISK and FSTYPE,
1424         including interpreting special 0 errno return from get_fs_usage.
1425         (show_point): Don't fail if we can't find a mount entry for POINT,
1426         just call show_dev with 0 values and let it fail if necessary.
1427         (main): Require a non-zero MOUNT_LIST only if showing all filesystems.
1428         (find_mount_point): New function.
1429         (xgetcwd): New declaration.
1431 Thu Nov 28 00:31:11 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1433         * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
1434         for gettext-0.10.25.
1436 Tue Nov 26 23:24:13 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1438         * acinclude.m4: Update with macros from gettext-0.10.25.
1440 Sun Nov 24 22:43:24 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1442         * acconfig.h (mktime): Add undef for my enhanced (beyond automake's
1443         1.1g version of) AM_FUNC_MKTIME.
1445         * acinclude.m4 (AM_FUNC_GETLINE): Use am_, not su_ prefix for
1446         local/cache variables.
1448 Sat Nov 23 16:11:59 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1450         * lib/Makefile.am (EXTRA_DIST): Add getline.c now that getline
1451         isn't mentioned in AC_REPLACE_FUNCS.
1453         * lib/Makefile.am (EXTRA_DIST):
1455         * chgrp.c (usage): Alphabetize option descriptions the way
1456         sort -f would.
1457         * chown.c (usage): Likewise.
1458         * cp-aux.c (usage): Likewise.
1459         * df.c (usage): Likewise.
1460         * install.c (usage): Likewise.
1461         * ln.c (usage): Likewise.
1462         * ls.c (usage): Likewise.
1463         * mkdir.c (usage): Likewise.
1464         * mv.c (usage): Likewise.
1465         * rm.c (usage): Likewise.
1466         From Karl Berry.
1468 Fri Nov 22 22:14:10 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1470         * configure.in (AC_REPLACE_FUNCS): Don't try to replace getline this
1471         way.  AM_FUNC_GETLINE does it now.
1472         (AM_FUNC_GETLINE): Use it here.
1474         * src/cp.c (copy): With -i and not -f, prompt for any type of
1475         (non-directory) source file before overwriting an existing target.
1476         Reported by Mark A. Thomas and Emile LeBlanc.
1478 Tue Nov 19 23:10:32 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1480         * configure.in (AM_SANITY_CHECK_CC): Remove it.  Autoconf-2.11
1481         has this built-in.
1482         (AC_FUNC_FNMATCH): Use this macro (new with autoconf-2.11) instead
1483         of open-coding it.
1485 Sun Nov 17 20:53:00 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1487         * src/touch.c: Remove unused declaration of mktime.  From Tony Leneis.
1489 Mon Nov  4 23:18:03 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1491         * configure.in (test for group_member): Handle it separately
1492         so I can keep the hyphen (not the underscore) in the filename.
1494         * lib/rename.c: New version from François Pinard.
1496 Sat Nov  2 07:05:36 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1498         * src/ls.c (gobble_file): Set linkok for non-orphaned symlinks.
1499         From Bauke Jan Douma.
1500         (gobble_file): Initialize linkok.
1501         With these two changes, ls --color should display orphaned symlinks
1502         as blinking text on terminals that support it.
1504         * configure.in (ALL_LINGUAS): Add Spanish (es).
1506         * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
1507         Otherwise, the generated info files have names longer than
1508         the 14-byte max of some old systems.
1509         Reported by Karl Heuer.
1511 Tue Oct 29 06:49:16 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1513         * src/ls.c (decode_switches): Make -A set really_all_files to zero
1514         as well as setting all_files to 1.  With this change, ls -f -A prints
1515         everything but . and .., unsorted.  Before, the -A was effectively
1516         ignored.  From Karl Berry.
1518 Tue Oct 22 07:00:00 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1520         * src/Makefile.am (dircolors.h): Depend on dcgen only in maintainer
1521         mode.
1523 Mon Oct 21 16:52:28 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1525         * lib/Makefile.am (EXTRA_DIST): Remove group-member.c.
1526         Add (temporary hack to work around bug in automake-1.1f) mvdir.c and
1527         rmdir.c.
1529         * configure.in: Remove hack that created link from group_member.c
1530         to group-member.c.
1532         * lib/group_member.c: New file.  Renamed from group-member.c.
1533         * lib/group-member.c: Delete.
1535         * src/dircolors.hin: Comment out DOS-style suffixes.
1537 Sun Oct 20 13:49:25 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1539         * lib/Makefile.am (INCLUDES): Add -I../intl.  Reported by Eric Backus.
1541         * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'.
1542         (EXTRA_DIST): Remove.
1544         * configure.in: Remove README_ALPHA related code.  Automake takes
1545         care of it automatically now when in gnits mode.
1547 Sun Oct 13 14:02:41 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1549         * src/ls.c (print_long_format): Use strftime of localtime
1550         (not ctime) to produce the date/time in long listings.
1551         From Rafal Maszkowski.
1553 Sat Oct 12 18:20:38 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1555         * lib/mountlist.c (fstype_to_string): Handle fstypes of freebsd.
1556         From Arne Henrik Juul.
1558 Thu Oct 10 23:47:34 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1560         * lib/Makefile.am (EXTRA_DIST): Remove posixtm.y and getdate.y.
1561         (fu_SOURCES): Put them here instead.
1562         Remove rules for building getdate.c and posixtm.c;  now automake
1563         generates those rules.
1564         * lib/ylwrap: New file.
1565         * lib/interlock: New file.
1567 Wed Oct  9 06:51:47 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1569         * src/ls.c (usage): Improve brief descriptions of --sort and --time.
1570         From François Pinard.
1572         * lib/rpmatch.c [!WITH_REGEX]: Include rx.h.
1573         From Andreas Schwab.
1575 Mon Oct  7 23:31:10 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1577         * lib/Makefile.am (EXTRA_DIST): Remove names of several files
1578         that automake adds automatically.
1579         (fu_SOURCES): Likewise.
1580         (fu_DEPENDENCIES): Depend on fu_LIBADD.
1582         * src/chown.c (usage): Improve usage message.
1583         * src/cp-aux.c (usage): Likewise.
1584         * src/ls.c (usage): Likewise.
1585         * src/install.c (strip): Improve diagnostic.
1586         From Ulisses Alonso.
1588         * src/Makefile.am (noinst_HEADERS): Add dircolors.h.
1589         (dircolors.h): Always depend on dcgen.
1591 Sat Oct  5 08:07:03 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1593         * acinclude.m4 (AM_FUNC_ERROR_AT_LINE): New macro.
1594         (AM_FUNC_OBSTACK): New macro.
1596         * configure.in (AM_FUNC_ERROR_AT_LINE): Use this instead of
1597         open-coding it.
1598         (AM_FUNC_OBSTACK): Likewise.
1600         * lib/filemode.c (ftypelet) [HAVE_ST_DM_MODE]: Add support for
1601         Cray's migrated dmf files.
1602         * src/ls.c (print_long_format) [HAVE_ST_DM_MODE]: Likewise.
1603         * acconfig.h [HAVE_ST_DM_MODE]: New macro.
1604         From Johan Danielsson.
1606         * acinclude.m4 (AC_HEADER_SYS_TIME_H): New macro.
1607         (AM_FUNC_MKTIME): Require AC_HEADER_SYS_TIME_H so that configure's
1608         checking... messages don't get nested.
1610         * configure.in (GNU_PACKAGE): New variable.
1611         (PACKAGE_VERSION): Remove it.
1613         * acconfig.h (GNU_PACKAGE): New variable.
1614         (PACKAGE_VERSION): Remove now-unused variable.
1616         * src/*.c: Update --version output to conform to the coding standard.
1618 Wed Oct  2 21:44:36 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1620         * src/dircolors.c (usage): Deprecate --print-data-base even though
1621         that's the way GNU make writes it.  `database' is one word.
1622         Add description of FILE argument.
1624 Tue Oct  1 12:56:23 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1626         * lib/Makefile.am (fu_SOURCES): Remove getline.c.
1627         (EXTRA_DIST): Add getline.c.
1628         Reported by François Pinard.
1630 Mon Sep 30 20:08:45 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1632         * src/Makefile.am (dircolors.h): Don't depend on anything unless
1633         in maintainer-mode.  Reported by Marcus Daniels.
1635         * lib/path-concat.c (path_concat): Use K&R style function definition.
1637 Sun Sep 29 22:00:44 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1639         * configure.in (ALL_LINGUAS): Add slovenian (sl).
1641         * src/cp-aux.c (usage): Take only one argument -- like all the other
1642         usage functions.
1644         * src/cp.c (do_copy): Give better error message when copying multiple
1645         files and the last one is not a directory.  From Karl Berry.
1646         Call error (0, 0, ... then usage (1) -- instead of calling usage
1647         with two arguments.
1649 Sat Sep 28 13:16:29 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1651         * lib/getversion.c (backup_types): Declare const.
1652         (backup_args): Likewise.
1654 Sat Sep 21 10:22:28 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1656         * src/dircolors.c (xstrndup): Use message that's the same as the one
1657         you get from e.g., xmalloc.  Reported by Santiago Vila.
1659 Thu Sep 19 22:13:31 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1661         * lib/Makefile.am (fu_SOURCES): Remove regex.c and rx.c.
1662         (EXTRA_DIST): Put them here instead.
1664         * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
1665         AM_INIT_AUTOMAKE now does it (as of automake-1.1e).
1667         * lib/Makefile.am (fu_SOURCES): Move getopt.c and getopt1.c back to
1668         here fro EXTRA_DIST.
1669         * configure.in (AC_REPLACE_GNU_GETOPT): Remove it -- it's not
1670         necessary.
1672         * acinclude.m4 (AM_SANITY_CHECK_CC, AC_SYS_POSIX_TERMIOS,
1673         AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Remove definitions.
1674         Now automake's aclocal includes them.
1676 Sun Sep 15 23:08:48 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1678         * Makefile.am (EXTRA_DIST): Remove acinclude.m4.
1680 Mon Sep  9 21:39:49 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1682         * src/cp.c (do_copy): Describe in a little more detail the code
1683         that makes `cp non-directory file/' (eventually) fail.
1685 Sun Sep  8 12:54:31 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1687         * src/dircolors.c (usage): Refer to LS_COLORS, not LS_COLOR.
1688         From Santiago Vila Doncel.
1690         * src/cp.c (do_copy): Set backup_type to `none' only *after*
1691         calling to find_backup_file_name.  Reported by Eli Zaretskii.
1693 Sat Sep  7 12:25:42 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1695         * lib/regex.c, lib/regex.h: New files.
1696         * lib/rx.c, lib/rx.h: New files.
1698         * lib/Makefile.am (INCLUDES): Add -I../intl so compiler will find
1699         libintl.h for rpmatch.c.
1701         * src/system.h: Add comments justifying IS* versions of ctype.h macros.
1703 Thu Sep  5 18:12:44 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1705         * src/chmod.c (main): Don't set verbose flag for --changes.
1706         (change_file_mode): If chmod succeeds and --changes was given,
1707         give a diagnostic describing the new permissions.
1708         Reported by Philippe Schnoebelen (phs@fing.edu.uy).
1710         * src/cp.c (do_copy): When concatenating DEST (with a trailing `/')
1711         and the basename part of non-directory SOURCE, don't add a slash
1712         between them.
1714 Wed Sep  4 21:42:32 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1716         * lib/rpmatch.c: Make sure NULL is defined by including stddef.h
1717         (if STDC_HEADERS || _LIBC) or simply defining it (otherwise).
1718         Include sys/types.h for definition of size_t needed by regex.h.
1720         * lib/Makefile.am (fu_SOURCES): Add regex.c and rx.c.
1721         (noinst_HEADERS): Add regex.h and rx.h.
1723         * configure.in (AM_SANITY_CHECK_CC): Use it.
1724         (AM_WITH_REGEX): Use it.
1726         * acconfig.h (WITH_REGEX): Add it.
1728 Tue Sep  3 08:13:09 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1730         * lib/rpmatch.c (rpmatch): Set yesexpr to "^[yY]" and noexpr to
1731         "^[nN]"; this conforms to POSIX.2. From Paul Eggert
1732         <eggert@twinsun.com>.
1734 Mon Sep  2 10:59:10 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1736         * POTFILES.in: Add lib/rpmatch.c.
1738         * lib/rpmatch.c (ENABLE_NLS): Include libintl.h and define _ to
1739         gettext.
1741         * src/*.c (usage): Tell where to report bugs.
1743 Sat Aug 31 18:48:18 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1745         * src/touch.c (utime_now): Protoize.
1746         Reported by David S. Miller (davem@caip.rutgers.edu).
1748 Sun Aug 25 22:43:15 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1750         * acinclude.m4 (AM_FUNC_MKTIME): New macro.
1751         * configure.in (AM_FUNC_MKTIME): Use it.
1752         (AC_REPLACE_FUNCS): Remove mktime.
1754 Wed Aug 21 23:17:04 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1756         * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
1757         Automake includes them automatically.
1759         * configure.in (AM_INIT_AUTOMAKE): Use it.
1760         (AM_PROG_INSTALL): Remove.  AM_INIT_AUTOMAKE does this.
1761         (AC_PROG_MAKE_SET): Likewise.
1763 Sun Aug 18 09:52:39 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1765         * configure.in (jm_MAINTAINER_MODE, fp_C_PROTOTYPES): Rename with
1766         AM_ prefix for latest automake/aclocal.
1768         * lib/Makefile.am (noinst_HEADERS): Add path-concat.h.
1769         (fu_SOURCES): Add path-concat.c.
1771         * src/mv.c: Include path-concat.h.
1772         (movefile): Use path_concat instead of open-coding its functionality.
1773         Declare pointer parameters const as appropriate.
1775         * src/cp.c: Include path-concat.h.
1776         (do_copy): Check path_concat return value.
1777         (path_concat): Remove function.
1779         * lib/path-concat.h: New file.
1780         * lib/path-concat.c (path_concat): New file.  Just like the function
1781         from cp.c except the stand-alone version uses malloc instead of
1782         xmalloc.
1784         * configure.in (ALL_LINGUAS): Add Dutch (nl).
1786 Fri Aug 16 21:59:24 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1788         * src/chgrp.c (parse_group): Don't abort when given a group number
1789         larger than INT_MAX.  Fix bug whereby root could run
1790         `chgrp INVALID-GROUP FILE' and it wouldn't fail, but rather would
1791         change FILE's group to some indeterminate value.  This problem
1792         was reported as Debian Bug#4119 via Erick Branderhorst
1793         (branderh@IAEhv.nl).
1794         Declare pointer parameters const as appropriate.
1796 Thu Aug  1 22:12:15 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1798         * src/system.h (ST_NBLOCKS) [_CRAY]: Special case for Cray.
1799         * lib/fsusage.c (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define
1800         f_bavail to f_bfree.
1801         From Johan Danielsson.
1803 Wed Jul 31 23:39:23 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1805         * src/ln.c [LINK_TYPE]: Remove macro.  NLS messages aren't
1806         extracted from macros.  Reported by Santiago Vila.
1807         (link_type_string): New global variable to be used instead of
1808         LINK_TYPE.
1809         (main): Set it here.
1810         (do_link): Use it (instead of macro) here.
1812 Tue Jul 30 23:24:18 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1814         * configure.in (AC_CHECK_HEADERS): Add sys/fs/s5param.h.
1815         * lib/fsusage.c [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h
1816         to work around bug in sys/filsys.h of Fujitsu UXP/V.
1817         From by Johan Danielsson.
1819         * src/cp.c (DO_CHOWN): New macro -- derived from code in copy.
1820         (copy): Use DO_CHOWN to assure that any newly-created symbolic
1821         links have proper owner and group.
1823 Sat Jul 27 17:22:14 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1825         * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
1826         redefinition warnings on solaris.
1827         (textdomain) [!ENABLE_NLS]: Likewise.
1829 Thu Jul 25 21:10:42 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1831         * src/chgrp.c (main): Fix typo in getopt_long string: s/n/h/.
1832         Reported by Ken Pizzini.
1834 Wed Jul 24 22:24:37 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1836         * src/dircolors.c (usage): Remove -h.  It is not an option.
1837         Reported by Ulrich Drepper.
1839 Sun Jul 21 11:58:48 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1841         * configure.in (AC_CHECK_HEADERS): Add sys/timeb.h for lib/getdate.y.
1842         This was a problem for SCO OSR5.  From Bela Lubkin <belal@sco.com>.
1843         (statvfs test): Arrange for this test to fail (as it should) for
1844         SCO OSR5.  Suggestion from Bela Lubkin.
1846         * src/Makefile.am (BUILT_SOURCES): Remove @MAINT@.
1847         (dircolors.h): Remove @MAINT@.  These prevented `make distcheck'
1848         from working sometimes.
1850         * lib/yesno.c (yesno) [!HAVE_RPMATCH]: Remove function since we'll
1851         always use the rpmatch-based version.
1852         Declare rpmatch.
1854         * lib/rpmatch.c [STDC_HEADERS]: Guard inclusion of stdlib.h.
1855         (_) [!_]: Define it.
1856         (try): Add RESPONSE parameter.
1857         (rpmatch): Update caller.
1858         Anchor regular expressions to beginning of string.
1860         * configure.in (AC_CHECK_FUNCS): Don't check rpmatch.
1862         * acconfig.h (HAVE_OBSTACK): Undef it.
1864         The following is from Ulrich Drepper.
1866         * configure.in (AC_REPLACE_FUNCS): Add rpmatch.
1867         * lib/Makefile.am (EXTRA_DIST): Add rpmatch.c.
1868         * lib/rpmatch.c: New file.
1869         * lib/yesno.c (yesno): New rpmatch-based version of the function.
1870         * config.h.in (HAVE_RPMATCH): Undef it.
1872         * lib/Makefile.am (EXTRA_DIST): Put error.c and obstack.c here...
1873         (fu_SOURCES): Instead of here.
1875         * configure.in (AC_CHECK_FUNCS): Add rpmatch.
1876         Add checks for error_at_line and obstacks so systems with GNU libc
1877         don't compile and link with distributed error.c and obstack.c.
1879         * configure.in (AC_REPLACE_FUNCS): Replace getline.c.
1880         Add related check for the getdelim function.  As done in gettext.
1882 Sat Jul 20 17:01:56 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1884         * lib/Makefile.am (fu_SOURCES): Remove error.c, and obstack.c.
1885         (EXTRA_DIST): Add error.c, and obstack.c.
1887         * configure.in (PACKAGE_VERSION): Use space instead of hyphen to
1888         separate PACKAGE and VERSION.
1890 Fri Jul 19 23:28:36 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1892         * src/cp.c (path_concat): Rewrite to return new parameter.
1893         (do_copy): Update uses of path_concat to use new parameter.
1894         Use that new pointer to compute correct offset for make_path_private.
1895         Before, cp --recursive --parents SRC DEST failed when SRC was
1896         an absolute file name.  E.g.,
1897           % cd /tmp; rm -rf d f; mkdir d; touch f; cp -PR /tmp/f d
1898           cp: tmp: No such file or directory
1899         Reported by Horst von Brand vonbrand@sleipnir.valparaiso.cl.
1901 Thu Jul 18 21:58:51 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1903         * src/install.c [_AIX]: Add #pragma alloca.
1904         From Bernd Leibing <bernd.leibing@rz.uni-ulm.de>.
1906         * src/chgrp.c (main): Initialize for internationalized message support:
1907         call setlocale, bindtextdomain, and textdomain.  Reported by
1908         Michel Robitaille <robitail@IRO.UMontreal.CA>.
1910 Wed Jul 17 22:37:40 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1912         * configure.in (ALL_LINGUAS): Add polish (pl).
1914 Mon Jul 15 23:42:57 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1916         * Many files: Update FSF address.
1918 Sun Jul 14 07:53:45 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1920         * src/du.c (usage): Sort option descriptions in dictionary order.
1922 Sat Jul 13 07:34:24 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1924         * src/dircolors.c (long_options): Add missing last line of NULL
1925         entries.  From Ralph Loader <loader@maths.ox.ac.uk>.
1927 Thu Jul 11 21:50:48 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1929         * Version 3.13.
1931         * dircolors.1: New file -- but just a pointer to texinfo docs.
1932         * man/Makefile.am (man_MANS): Add dircolors.1.
1934         * configure.in (VERSION): Bump to 3.13.
1936 Wed Jul 10 22:57:29 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1938         * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
1939         so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
1940         those options on that system, sys/stat.h gets compile errors.
1941         With help from Marcus Daniels.
1943         * getopt.c: Update from gettext-0.10.23.
1944         * getopt1.c: Likewise.
1945         * getopt.h: Likewise.
1947 Tue Jul  9 20:19:44 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1949         * src/dircolors.c (usage): Improve --help message.  From Karl Berry.
1950         (long_options): Add print-data-base and print-database.
1952         * src/dircolors.c (dc_parse_stream): Don't give `unrecognized keyword'
1953         message unless we've processed a matching TERM directive.  Reported
1954         by Karl Berry and François Pinard.
1956         * src/install.c (UID_T_MAX): Use `(unsigned long)1' rather than
1957         `(uid_t)1' to avoid problems on systems where uid_t is signed.
1958         (GID_T_MAX): Likewise for gid_t.
1959         From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
1961 Sun Jul  7 22:40:08 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1963         * src/ls.c: Change initial colors for `color_indicator' to match
1964         those currently in dircolors.hin.  From Joshua Cowan.
1966         * src/dircolors.hin: Recognize more filename extensions.
1967         From Joshua Cowan.
1969         * src/Makefile.am (CLEANFILES): Add dcgen.  From Joshua Cowan
1970         <jcowan@jcowan.reslife.okstate.edu>.
1972         * src/Makefile.am (MAINTAINERCLEANFILES): Add dircolors.h.
1974         * configure.in (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use it.
1975         * acconfig.h [GWINSZ_IN_SYS_IOCTL]: Add #undef.
1977         * src/ls.c: Include termios.h.
1978         Guard inclusion of sys/ioctl.h with #ifdef GWINSZ_IN_SYS_IOCTL,
1979         rather than HAVE_SYS_IOCTL_H.  Modelled after sh-utils' stty.c
1980         at suggestion from Chip Bennett <BennettC@j64.stratcom.af.mil>
1981         to make ls adjust its idea of screen width upon window resize
1982         on systems (SunOS, Solaris) where TIOCGWINSZ is defined in
1983         termios.h, and not sys/ioctl.h.
1985         * aclocal.m4 (AM_SYS_POSIX_TERMIOS): New macro, derived from test
1986         in the configure.in from sh-utils.
1987         (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
1989 Sat Jul  6 12:46:27 1996  Jim Meyering  <meyering@na-net.ornl.gov>
1991         * src/cp-aux.c (usage): Factor out backup-related text into
1992         separate string/printf statement so translators deal with only
1993         one corresponding string in .pot file.
1994         * src/install.c (usage): Likewise.
1995         * src/ln.c (usage): Likewise.
1996         * src/mv.c (usage): Likewise.
1997         Suggestion from Santiago Vila Doncel.
1999         * configure.in (AC_REPLACE_FUNCS): Add group_member.
2000         (AC_LINK_FILES): Create link lib/group_member.c to lib/group-member.c.
2001         * lib/Makefile.am (fu_SOURCES): Remove group-member.c.
2002         (EXTRA_DIST): Add group-member.c here.
2004 Fri Jul  5 22:16:13 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2006         * src/dircolors.c [!STDC_HEADERS]: Declare free.
2007         From Marcus Daniels.
2009 Thu Jul  4 12:34:50 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2011         * src/dd.c (usage): Remove space before newline in usage message.
2012         * src/mknod.c (usage): Likewise.
2013         * src/mv.c (usage): Likewise.
2015         * src/Makefile.am (libexec_PROGRAMS): Regenerate using patched
2016         automake-1.0 to work around rm -f bug on Solaris2.4.
2017         Reported by Kaveh Ghazi.
2019         * src/ls.c: Make `dir --version' and `vdir --version' print their
2020         names, not `ls'.
2021         Reported by Ulrich Drepper.
2023 Wed Jul  3 17:41:15 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2025         * src/dircolors.c: Include sys/types.h before system.h.
2026         From Jim Blandy (jimb@cyclic.com).
2028         * src/chgrp.c [!MAXUID]: Define after inclusion of system.h to avoid
2029         warning about redefinition on SunOS4, Solaris2.4 and SGI-irix5.3.
2030         From Kaveh Ghazi.  Also, Santiago Vila Doncel reported that defining
2031         MAXUID before including system.h caused a compilation failure on some
2032         ConvexOS system.
2034 Tue Jul  2 22:56:03 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2036         * configure.in (VERSION): Bump to 3.12q.
2038         * src/system.h [!EXIT_SUCCESS]: Define it.
2039         [!EXIT_FAILURE]: Define it.
2041         * lib/strndup.c (strndup): Include stdio.h and sys/types.h to
2042         get definition of NULL and size_t on SunOS4.1.3.
2044 Mon Jul  1 23:47:29 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2046         * src/ln.c (do_link): Update messages to ease translation.
2047         Suggestion from Santiago Vila.
2049 Sun Jun 30 16:41:45 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2051         * src/install.c (usage): Fix typo, 3nd->3rd, in usage message.
2052         From Santiago Vila Doncel.
2054 Sat Jun 29 00:33:31 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2056         * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so we see
2057         it in the output of --version.  Reported by RMS.
2059         * src/Makefile.am (BUILT_SOURCES): Guard dependency on dircolors.h
2060         with @MAINT@ so it won't be removed with a casual disctlean.
2061         (EXTRA_DIST): Add dcgen.pl and dircolors.hin.
2063 Fri Jun 28 22:56:00 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2065         * src/dircolors.c (dc_parse_stream): Move `enum states' dcl into
2066         this function.
2068         * src/ln.c (do_link): Allow `ln -sf --backup k k' to succeed in
2069         creating the self-referential symlink, since doing so doesn't
2070         remove the source but merely renames it.
2072 Wed Jun 26 06:58:58 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2074         * ln.c (same_name): New function.
2075         (do_link): Use it to test reliably whether A and B (from
2076         ln --force A B) are hard links to the same file.
2077         From Andreas Schwab.
2079 Tue Jun 25 00:03:43 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2081         * lib/getline.c: New file.
2082         * lib/getline.h: New file.
2083         * lib/Makefile.am (fu_SOURCES): Add getline.c.
2084         (noinst_HEADERS): Add getline.h.
2086 Mon Jun 24 22:39:02 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2088         * configure.in (AC_REPLACE_FUNCS): Add strndup.
2089         (AC_PATH_PROG): Check for perl.
2091         * ls.c (decode_switches): Allow 0 as argument to --tabsize (-T) option.
2092         Interpret as a directive to use no TAB characters to separate columns.
2093         (indent): Handle TABSIZE == 0.
2095         * dircolors.c (dc_parse_stream): Remove spurious newline in
2096         error message.
2097         (dc_parse_stream): Give `unrecognized keyword' diagnostic for
2098         misspelled `TERM' keyword as well as for others.
2100 Sun Jun 23 12:58:32 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2102         * dircolors.hin: New file.
2103         * dcgen.pl: New file.
2104         * src/Makefile.am (dircolors.h): Add a rule to create this file.
2105         (dcgen): Likewise.
2107         * dircolors.c (parse_line): Rewrite to avoid modifying LINE.
2108         Put LINE first in parameter list.
2109         Adjust caller.
2110         (dc_parse_stream): Free KEYWD and ARG.
2111         (main): Give diagnostic for unreasonable combinations of
2112         options/arguments.
2114         * lib/Makefile.am (EXTRA_DIST): Add strndup.c.
2115         * configure.in (AC_REPLACE_FUNCS): Add strndup.
2116         * strndup.c: New file.  From id-utils-3.0k.
2117         (strndup): Deansify.
2118         [!STDC_HEADERS]: Include string.h and stdlib.h.
2120 Sat Jun 22 16:57:53 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2122         * dircolors.c: Major overhaul.  No longer read from /etc/DIR_COLORS
2123         or from ~/.dircolors.  Defaults are now compiled in.  If you specify
2124         a file on the command line, it is used instead of the compiled-in
2125         defaults.
2126         (main): New option --print-database (-p).
2127         Detect write failure.
2128         Add --bourne-shell and --c-shell aliases for --sh and --csh resp.
2130 Tue Jun 18 20:54:05 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2132         * cp.c (copy_reg): Cast both sides of comparison to size_t
2133         to avoid a warning about `comparison between signed and unsigned'
2134         from gcc -Wall.
2135         Declare pointer parameters const as appropriate.
2137         * ln.c (do_link): Refine last change so we don't disallow commands
2138         like `ln --force A B' when A and B are hard links to the same file.
2139         See comments in the source.  Reported by Erik Naggum <erik@naggum.no>
2140         and Andreas Schwab.
2142         * ls.c (decode_switches): Correct typo in error messages:
2143         enironment -> environment.  From Santiago Vila Doncel
2144         <sanvila@unex.es>.
2146         * aclocal.m4: Update from gettext-0.10.20.
2147         * ABOUT-NLS: Likewise.
2148         * intl/*: Likewise.
2150         * cp.c (do_copy): Change message from `missing file argument' to
2151         more precise `missing destination file'.  From Karl Berry.
2153         * ln.c (STREQ): Remove macro definition
2154         * system.h (STREQ): Add it here instead.
2155         * cp.c (do_copy): Use STREQ here instead of strcmp(...) == 0.
2156         * ls.c (parse_ls_color): Likewise.
2157         * df.c (selected_fstype, excluded_fstype, show_disk, main): Likewise.
2159         * cp.c (do_copy): When the force and backup options have been
2160         specified and the source and destination are the same name for an
2161         existing, regular file, convert the user's command, e.g.
2162         `cp --force --backup foo foo' to `cp --force foo fooSUFFIX'
2163         where SUFFIX is determined by any version control options used.
2164         (usage): Update --help message.
2165         At urging of (most recently) Karl Berry.
2167 Sun Jun 16 13:40:22 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2169         * doc/Makefile.am (EXTRA_DIST): Add texinfo.tex.
2171         * Makefile.am (cvs-dist): Use -c option in cvs tag command.
2173 Sat Jun 15 22:21:09 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2175         * configure.in (ALL_LINGUAS): Add pt.
2176         (AC_REPLACE_FUNCS): Add basename.
2178         * Makefile.am (EXTRA_DIST): Add basename.c.
2179         (fu_SOURCES): Remove basename.c.
2181 Thu Jun  6 21:57:08 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2183         * po/Makefile.in.in: Update from gettext-0.10.16.
2184         * intl/*: Likewise.
2185         * ABOUT-NLS: Likewise.
2186         * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
2187         gettext-related ones.
2188         Update from gettext-0.10.16.
2190 Sat Jun  1 12:44:51 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2192         * ls.c: Rename options and internal variables to reflect change to
2193         --color=WHEN where WHEN is never, always, or auto (for consistency
2194         with e.g. cp --sparse=WHEN.  For at least a while, the original
2195         slackware-supported arguments `none', `force', `yes', etc will be
2196         supported but deprecated by lack of documentation.
2197         (decode_switches): Use STDOUT_FILENO instead of `1' in isatty test.
2198         (usage): Update/add description of the --color option.
2200         * ls.c: Declare pointer parameters const as appropriate.
2202 Tue May 28 18:39:49 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2204         * dd.c (print_stats): Don't mark "%u %s" as a translatable string.
2205         * mv.c (main): Don't mark "%s" as a translatable string.
2206         From Göran Uddeborg.
2208 Thu May 23 07:50:38 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2210         * ls.c (usage): Make --literal (-N) description clearer.
2212         * acconfig.h (MOUNTED_LISTMNTENT): Add it.
2213         * fsusage [_CRAY]: Don't include sys/filsys.h because although
2214         Unicos-9 has it, it's not needed and would cause other problems
2215         because it requires inclusion of other, non-standard headers.
2216         * mountlist.c (read_filesystem_list) [MOUNTED_LISTMNTENT]: New
2217         function.
2218         From Johan Danielsson (joda@pdc.kth.se).
2220         * configure.in (AC_CHECK_FUNCS): Add listmntent for Unicos-9.
2221         Define MOUNTED_LISTMNTENT #ifdef _CRAY and HAVE_GETMNTENT.
2222         With an initial patch from Johan Danielsson.
2224 Wed May 22 18:58:01 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2226         * configure.in (LINGUAS): Add sv.
2228 Tue May 21 07:06:30 1996  Jim Meyering  <meyering@na-net.ornl.gov>
2230         * lib/euidaccess.c (euidaccess) [!S_IROTH]: Define.
2231         [!S_IWOTH]: Define.
2232         [!S_IXOTH]: Define.
2233         Marcus Daniels <marcus@sysc.pdx.edu> reported that m68k NEXTSTEP 3.2
2234         doesn't define S_IROTH or S_IWOTH unless some posix compile option
2235         is used and associated symbols defined.
2237 Sun May 19 09:32:51 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2239         * chown.c: New option: --no-dereference (-h).  Solaris 5.4's chown
2240         provides -h.
2241         (change_file_owner): Use lchown if --no-dereference (-h) was given.
2242         (usage): Update.
2243         (main): Fail if user requests --no-dereference on a system that
2244         doesn't have support for it.
2246         * chgrp.c: New option: --no-dereference (-h).
2247         [!MAXUID]: Define to INT_MAX.
2248         (change_file_group): Use lchown if --no-dereference (-h) was given.
2249         (usage): Update.
2250         (main): Fail if user requests --no-dereference on a system that
2251         doesn't have support for it.
2253 Wed May 15 22:54:31 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2255         * fsusage.c (get_fs_usage): Declare parameter PATH to be const.
2256         * fsusage.h: Update prototype to match.
2258         * chmod.c (describe_change): Declare pointer parameters to be const.
2259         (change_file_mode): Likewise.
2260         (change_dir_mode): Likewise.
2262         * ln.c (do_link): Declare pointer parameters to be const.
2264         * df.c (main): Fail with a diagnostic if both --human-readable and
2265         --portability are used.
2266         Likewise if --megabytes and --portability are used.
2267         Rearrange function definitions to precede respective uses to obviate
2268         all forward dcls. Remove forward dcls.
2269         Declare parameters const as appropriate.
2271         * modechange.c (mode_compile): Declare parameter MODE_STRING const.
2272         Remove register attribute.
2273         (mode_adjust): Likewise for CHANGES.
2274         * modechange.h: Reflect above changes in prototypes.
2276         * lib/Makefile.am (getdate.c): Disable dependencies that can
2277         require rerunning YACC when not in maintainer mode.
2278         (posixtm.c): Likewise.
2280 Tue May 14 23:36:54 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2282         * dd.c (print_stats): Restructure pluralization of error message
2283         so it's easier to translate.  Reported by Göran Uddeborg
2284         <gvran@uddeborg.pp.se>.
2285         * mv.c (main): Likewise.
2287 Tue May  7 22:10:20 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2289         * configure.in: Require autoconf-2.10.
2291         * aclocal.m4 (jm_MAINTAINER_MODE): New macro.
2292         * configure.in (jm_MAINTAINER_MODE): Use it.
2294 Sun May  5 20:27:47 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2296         * src/Makefile.am (bin_PROGRAMS): Add dircolors.
2297         (DEFS): Add -DSHAREDIR=\"$(datadir)\".
2298         (GNUVER): Remove definition of unused variable.
2300 Sat May  4 20:54:32 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2302         * system.h [IN_CTYPE_DOMAIN]: Rename from ISASCII.
2303         * backupfile.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
2305         * dircolors.c: Make enumerated constants upper case.
2306         (main): Don't use ANSI-style string concatenation.
2307         Add `static' and/or `const' to some file scope variables.
2309 Wed May  1 00:20:00 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2311         * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c.
2312         * configure.in (AC_REPLACE_FUNCS): Add strcasecmp.
2314         * ls.c (parse_ls_color, usage): Remove support for alternate spellings:
2315         --colours and LS_COLOURS.
2316         (parse_ls_color): Reverse sense of test for LS_COLORS environment
2317         variable and return -- save a level of indentation on a 100+-line
2318         block.
2320 Mon Apr 29 22:07:41 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2322         * POTFILES.in: Add chgrp.c.  From François Pinard.
2323         Add dircolors.c.
2324         * dircolors.c: New file.  Written by H. Peter Anvin.
2326 Sun Apr 28 16:32:38 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2328         * ls.c: Apply color ls changes by Peter Anvin <Peter.Anvin@linux.org>
2329         and Dennis Flaherty <dennisf@denix.elk.miles.com> based on original
2330         patches by Greg Lee <lee@uhunix.uhcc.hawaii.edu>.  And on top of all
2331         that, a few changes from Ulrich Drepper.
2333         * ls.c (parse_ls_color): Use strcpy to initialize 3-character array.
2334         Automatic aggregate initialization isn't portable.
2335         Remove all ^L's.
2336         (get_funky_string): Declare static and move to precede single
2337         caller: parse_ls_color.
2338         Make some globals `static' and/or `const'.
2339         (LEN_STR_PAIR): New macro.
2340         (color_indicator): Use it in this declaration.
2341         (parse_ls_color): Use error, not fprintf.
2342         (decode_switches): Add a comment.
2343         (print_name_with_quoting): Add braces around inner if-else
2344         statement to clarify.
2346         * configure.in: Add a comment that fp_C_PROTOTYPES must precede
2347         AC_C_INLINE.  Otherwise, some systems lose because the value
2348         AC_C_INLINE choses with plain `cc' is different from that chosen
2349         when using the ANSI-mode C compiler.  From Kaveh Ghazi.
2351         * fileblocks.c [HAVE_ST_BLOCKS || _POSIX_VERSION]: Add extern dcl
2352         of unused variable so that after preprocessing, the file will never
2353         be empty.  Otherwise, some compilers in ANSI mode (among them, the
2354         Dec Alpha OSF 2.0 C compiler) reject empty files.  From Kaveh Ghazi.
2355         Indent CPP conditionals.
2357 Fri Apr 26 05:52:03 1996  Karl Eichwalder  <ke@ke.Central.DE>
2359         * ls.c (usage): Add newline at end of printf format string.
2361 Wed Apr 24 21:33:43 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2363         * ln.c (do_link): Remove duplicate `if (lstat(...' block.
2365         * ln.c (do_link): With --force, don't remove DEST when it's
2366         the same as SOURCE.  Before, `ln -f FILE FILE' would remove FILE.
2367         Reported by Bruno Haible (haible@ilog.fr).
2369         * mkdir.c (main): Use verbose_fmt_string, not string literal in
2370         call to make_path for --parents.  Reported by Ulrich Drepper.
2372         * doc/mdate-sh: Get year as last rather than 6th field in output
2373         of date.  Otherwise, people with 2-word TZ (like `MET DST') lost.
2374         From Andreas Schwab.
2376 Tue Apr 23 22:05:35 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2378         * src/*.c, src/*.h: Update Copyright years to include 1996.
2380         * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
2381         * configure.in: Use it.
2382         * lib/Makefile.am (fu_SOURCES): Remove getopt.c and getopt1.c.
2383         (EXTRA_DIST): Add getopt.c and getopt1.c
2385         * configure.in (AC_CHECK_FUNCS): Add lchown.
2386         * chgrp.c [HAVE_LCHOWN]: Define chown to lchown.
2387         * chown.c [HAVE_LCHOWN]: Likewise.
2388         * cp.c [HAVE_LCHOWN]: Likewise.
2389         * mv.c [HAVE_LCHOWN]: Likewise.
2390         Suggested by François Pinard.
2392         * backupfile.c (find_backup_file_name, max_backup_version,
2393         make_version_name, version_number, concat): Const-ify decls of
2394         formal parameters.
2395         * backupfile.h: Likewise.
2397         * du.c (usage): The long-named arg is --human-readable, not --human.
2398         * df.c: Be consistent.  Accept --human-readable, not just --human.
2399         (usage): Reflect the change.
2400         From Karl Berry.
2402 Sun Apr 21 08:04:51 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2404         * df.c (usage): Reflect that now --no-sync is the default.
2406         * Makefile.am (LDADD): Put @INTLLIBS@ before package library.
2408 Sat Apr 20 22:48:59 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2410         * ls.c: Include xstrtol.h.
2411         (decode_switches): Use xstrtol, not atoi.
2412         Detect and ignore invalid value for COLUMNS environment variable.
2413         In error about invalid TABSIZE, don't reference optarg!
2414         [!POSIXLY_CORRECT]: Don't consider TABSIZE environment variable.
2416         * install.c: Include xstrtol.h.
2417         [HAVE_VALUES_H]: Include <values.h>.
2418         [!BITSPERBYTE]: Define.
2419         [!UID_T_MAX]: Define.
2420         [!GID_T_MAX]: Define.
2421         (get_ids): Use xstrtol, not atoi.
2422         (is_number): Remove now-unused function.
2423         * configure.in (AC_CHECK_HEADERS): Add values.h.
2425 Fri Apr 19 00:06:02 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2427         * Makefile.am (cvs-dist): New rule.  Based on the one from
2428         Tom Tromey's automake.
2430         * df.c: No longer call sync by default.
2432         * cp.c (copy_reg): Rearrange arithmetic in conditional to avoid
2433         integer overflow with large files.
2435 Fri Apr 12 21:40:44 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2437         * mkdir.c (main): Add new option: --verbose.
2438         Remove long-deprecated and nowhere-documented --path, a synonym
2439         for --parents.  It was confusing to get an error about `--p'
2440         being ambiguous.
2442 Thu Apr  4 21:28:03 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2444         * configure.in (LINGUAS): Add de.
2445         * po/de.po: New file.
2447         * src/Makefile.am (EXTRAdir): Set to $(bindir).
2449 Wed Apr  3 06:12:23 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2451         * cp.c (copy_reg): Use `ST_NBLOCKS (sb) * 512', not `sb.st_blocks *
2452         DEV_BSIZE.'  From H.J. Lu (hjl@lucon.org).
2454         * mvdir.c: Protoize.
2455         Include save-cwd.h.
2456         (fullpath): Rewrite to use save_cwd, xgetcwd, and restore_cwd
2457         rather than explicit chdir/getcwd calls.
2459         * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
2460         when srcdir != builddir.  From Kaveh Ghazi.
2462 Mon Apr  1 23:50:29 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2464         * cp.c: Include assert.h (disabled).
2465         (path_concat): New function.
2466         (do_copy): Use path_concat instead of open-coding part of its
2467         functionality in two places.  This has the additional benefit
2468         of avoiding forming destination names like `D//file' when the
2469         destination directory D includes a trailing slash -- as would
2470         happen when cp is used like this:
2471         mkdir D; touch file D/file; cp -i file D/
2472         Reported by François Pinard.
2474 Sun Mar 31 11:18:09 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2476         * ls.c (quote_filename): Use ISGRAPH and ISPRINT in place of
2477         ASCII-centric tests against literals.
2478         (length_of_file_name_and_frills): Likewise.
2480 Thu Mar 21 16:43:13 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2482         * src/*.c (main): Declare to be of type int, not void.
2484 Sat Mar 16 10:46:23 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2486         * configure.in (PACKAGE_VERSION): New macro.
2487         * acconfig.h (PACKAGE_VERSION): Add it.
2488         * src/Makefile.am: Remove rules for generating version.c.
2489         Remove references to version.o, version.h, and stamp-v.
2490         * version.c: Remove file.
2491         * version.h: Remove file.
2492         * chgrp.c chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c
2493         ls.c mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c
2494         touch.c: Don't include version.h.
2495         (main): Use PACKAGE_VERSION instead of version_string.
2497 Sun Mar 10 22:36:11 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2499         * backupfile.c (max_backup_version): Declare file_name_length to
2500         be of type size_t.  This avoids a warning from gcc -Wall.
2502         * chmod.c chown.c cp.c dd.c df.c du.c install.c ln.c ls.c
2503         mkdir.c mkfifo.c mknod.c mv.c mvdir.c rm.c rmdir.c sync.c
2504         touch.c (main): Initialize for internationalized message support:
2505         call setlocale, bindtextdomain, and textdomain.
2506         * system.h: Add definitions and includes for NLS.
2507         * Makefile.am (SUBDIRS): Add intl and po.
2508         * src/Makefile.am (datadir): Define.
2509         (localedir): Define.
2510         (DEFS): Add LOCALEDIR definition.
2511         (LDADD): Add @INTLLIBS@.
2512         * aclocal.m4: Add NLS-related macro definitions from
2513         gettext distribution.
2514         * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
2515         HAVE_STPCPY): New macros.
2516         Add PACKAGE and VERSION.
2517         * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
2518         (VERSION): Likewise.
2519         (ALL_LINGUAS): Define.
2520         (ud_GNU_GETTEXT): Use it.
2521         Link an nls file.
2522         (AC_OUTPUT): Reflect addition of two new directories, intl and po.
2523         Create po/Makefile.
2524         From François Pinard.
2526 Thu Mar  7 20:26:07 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2528         * df.c (main): Tell read_filesystem_list that it should determine
2529         file system type when the user specifies --print-type or -T.
2530         From Michael Rendell <michael@cs.mun.ca>.
2532 Tue Feb 27 23:13:46 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2534         * src/Makefile.am: Adapt for automake-0.30.
2535         (noinst_HEADERS): Rename from HEADERS.
2536         (EXTRA_PROGRAMS): Set to `df mvdir'.
2537         (PROGRAMS): Remove definition.
2538         (bin_PROGRAMS): Remove hard-coded df.  Use @DF_PROG@ instead.
2539         (libexec_PROGRAMS): Remove hard-coded mvdir.  Use @MVDIR_PROG@ instead.
2540         * lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
2542         * configure.in (DF_PROG, MVDIR_PROG): Use these instead of bundling
2543         both into PROGS.
2545 Mon Feb 26 21:23:58 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2547         * dd.c (copy): Remove bogus (now that we're using full_write)
2548         increment of w_partial.
2549         Change sense of the tests (though they're equivalent) that check
2550         the value returned by full_write. making it clearer where errno
2551         is valid.  full_write always writes the full amount or fails.
2553 Thu Feb 15 23:08:41 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2555         * cp.c (copy): Detect (and fail) when creating backup file would
2556         destroy the source file.  Before, running the commands
2557         cd /tmp; rm -f a a~; : > a; echo A > a~; cp -b -V simple a~ a
2558         would leave two zero-length files: a and a~.
2559         Reported by Martin C. Martin <mcm@cs.cmu.edu>.
2561 Mon Feb 12 23:23:25 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2563         * configure.in (LIBOBJS): Split assignment into two statements to
2564         accomodate automake-0.29 buglet.
2566         Update for automake-0.29.
2567         * Makefile.am (CONFIG_HEADER): Don't define.  Automake now does it.
2568         * src/Makefile.am: Likewise.
2569         * lib/Makefile.am: Likewise.
2570         * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
2571         * man/Makefile.am (man_MANS): Renamed from MANS.
2573 Wed Jan 31 21:50:41 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2575         * dd.c (skip): Change type of parameter #5 from char* to
2576         unsigned char* to match type of argument.
2577         (copy): Cast first arg in memset call to char* to avoid warnings
2578         from SunOS's acc.
2579         (copy_simple): Likewise.
2581         * du.c: Remove comma after last item in enum.
2583         * df.c: Remove block of usage comments at beginning of file.
2585         * df.c (main): New options --human-readable (-h) and --megabytes (-m).
2586         (human_readable_1k_blocks): New function.
2587         (print_header): Honor new options.
2588         (show_dev): Honor new options.
2589         Add ifdef'd-out code to avoid printing lines for mount points that
2590         match ^/auto/.* and ^/tmp_mnt.*.  Rather than hard-coding those
2591         two prefixes, the code should allow the user to specify a regular
2592         expression.  From Larry McVoy (lm@sgi.com).
2594         * du.c (human_readable): Fix off-by-one error that converted
2595         1024*1024 to 1024K rather than 1G.  Describe the function.
2596         * df.c (human_readable_1k_blocks): Likewise
2597         (usage): Update usage message to reflect additions.
2599 Sat Jan 20 06:00:09 1996  Jim Meyering  (meyering@na-net.ornl.gov)
2601         * cp-aux.c (usage): Fix description of --archive.  From Andreas Schwab.
2603         * install.c (copy_files): Accept backup/suffix options just as cp,
2604         ln, and mv do.  From Marty Leisner <leisner@sdsp.mc.xerox.com>.
2606         * src/Makefile.am (DISTCLEANFILES): Set to stamp-v version.c.
2607         (version.c): Update with rules from textutils.
2608         (transform): Add `s/ginstall/install/;' prefix.
2610         * lib/Makefile.am (BUILT_SOURCES): Set to posixtm.c getdate.c so
2611         autodependencies work after `make maintainer-clean.'
2613         * du.c (main): New options --human-readable (-h) and --megabytes (-m).
2614         (human_readable): New function.
2615         From Larry McVoy (lm@sgi.com).
2617 Fri Dec 22 21:34:55 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2619         * configure.in: Touch stamp-h only if config.h is remade.
2621 Sat Dec 23 11:33:19 1995  Jim Meyering  (meyering@comco.com)
2623         * ls.c (decode_switches): Make -o a synonym for -lG for compatibility
2624         with most other versions of ls.  Reported by Karl Berry.
2625         (usage): Update.
2627 Fri Dec 22 00:48:01 1995  Jim Meyering  (meyering@comco.com)
2629         * dd.c (cleanup): New function -- broken out from quit.
2630         (interrupt_handler): Rewrite to reset default signal handler,
2631         call cleanup, then repost caught signal.
2633 Thu Dec 21 23:15:06 1995  Jim Meyering  (meyering@comco.com)
2635         * argmatch.h: New file.
2636         * lib/Makefile.am (HEADERS): Add argmatch.h.
2637         * argmatch.c: (argmatch): Add const attribute to parameters.
2638         (invalid_arg): Add const attribute to parameters.
2640         * cp.c: Include argmatch.h.
2641         * ls.c: Likewise.
2642         * touch.c: Likewise.
2644         * cp.c (main): Accept new option, --sparse={never,auto,always},
2645         to control creation of sparse files.
2646         (copy_reg): Set local, make_holes, from global flag_sparse.
2647         * cp-aux (usage): Describe new option.
2649 Mon Dec 18 22:29:49 1995  Jim Meyering  (meyering@comco.com)
2651         * ln.c: [SYMBOLIC_SPACE_STRING]: New macro.
2652         (do_link): Use SYMBOLIC_SPACE_STRING instead of open-coded #ifdef.
2653         For --verbose, output `create [symbolic ]link DEST to SRC' instead
2654         of ambiguous (or inconsistent with cp -v and mv -v) `SRC -> DEST.'
2656 Tue Dec  5 17:38:11 1995  Jim Meyering  (meyering@comco.com)
2658         * rm.c (rm): Work around SunOS 4 bug whereby lstat doesn't fail
2659         when given a zero-length file name argument.  Reported by
2660         Mark Calabretta <mcalabre@atnf.csiro.au>.
2662 Wed Nov 22 23:12:47 1995  Jim Meyering  (meyering@comco.com)
2664         * Makefile.in (all et. al.): If make was invoked with -k and a
2665         sub-make fails, fail after the loop rather than exiting right away.
2666         Otherwise, make's -k option could be ineffective.
2668 Thu Nov 16 21:25:45 1995  Jim Meyering  (meyering@comco.com)
2670         * Makefile.in (default): New default target.  Depend on `all' to work
2671         around bug in AIX-3.2.5's /bin/make.  Reported by Andreas Luik
2672         <luik@isa.de>.
2674 Fri Nov 10 23:31:46 1995  Jim Meyering  (meyering@comco.com)
2676         * src/Makefile.in (.c._o, ._c._o): Remove temporary source files.
2677         (.c._c): Don't redirect directly to $@.
2679         * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
2680         (clean): Remove temp files generated by ansi2knr rules.
2681         (ansi2knr): New rule.
2682         Add suffixes, dependencies, and rules to convert ANSI source to K&R
2683         when required.
2684         ($(OBJECTS)): Depend on $(ANSI2KNR)
2686         * configure.in: Add fp_C_PROTOTYPES.
2688         * Makefile.in (DISTFILES): Add aclocal.m4.
2689         (configure): Depend on aclocal.m4.
2690         (stamp.h.in): Depend on aclocal.m4 and acconfig.h.
2691         * acconfig.h: Add PROTOTYPES.
2693         * cp.h: Remove declaration of error.  Include error.h instead.
2694         Protoize forward dcls of functions in cp-hash.c and cp-aux.c
2695         * cp-aux.c: Protoize and add const attribute to parameters.
2696         * cp-hash.c: Likewise.
2698 Thu Nov  9 23:27:05 1995  Jim Meyering  (meyering@comco.com)
2700         * system.h [__P]: Define it.
2702         * src/*.c: Protoize.
2704         * ls.c (enum filetype): Move dcl to precede prototypes.
2705         (struct fileinfo): Likewise.
2706         Add const attribute to some parameters.
2708         * rm.c (struct pathstack): Move dcl to precede prototypes.
2710         * dd.c (translate_charset): Make parameter `const'.
2712         * ln.c (main): Move to the end.
2713         Remove most fwd dcls.
2714         * chmod.c: Likewise.
2715         * chown.c: Likewise.
2716         * chgrp.c: Likewise.
2717         * mkdir.c: Likewise.
2718         * mkfifo.c: Likewise.
2719         * mknod.c: Likewise.
2720         * mvdir.c: Likewise.
2721         * touch.c: Likewise.
2723         * mv.c: Rearrange functions to obviate forward dcls.
2724         Remove forward dcls.
2726         * cp.c: Protect prototyped forward dcls with __P.
2727         * dd.c: Likewise.
2728         * df.c: Likewise.
2729         * du.c: Likewise.
2730         * install.c: Likewise.
2731         * ls.c: Likewise.
2732         * rm.c: Likewise.
2734 Wed Nov  1 23:11:05 1995  Jim Meyering  (meyering@comco.com)
2736         * cp.c (copy): Use euidaccess instead of euidaccess_stat.
2737         * mv.c (do_move): Likewise.
2738         * rm.c (remove_file, remove_dir): Likewise.
2740 Sun Oct 29 06:06:13 1995  Jim Meyering  (meyering@comco.com)
2742         * aclocal.m4 (jm_WITH_AUTODEPS): New directive.
2743         * configure.in: Use it.
2745         * lib/Makefile.in (INCLUDE, COMPILE): New variables.
2746         (.c.o): Rewrite to be more like src/Makefile.in.
2747         Add line that (--with-autodeps) will include mkdep-Makefile.
2748         (distclean): Remove .deps.
2749         * src/Makefile.in: Likewise.
2751         * src/Makefile.in (test.o): Remove special rule.
2753         * mkdep-Makefile: New file.
2754         * Makefile.in (DISTFILES): Add mkdep-Makefile.
2756         * doc/Makefile.in (mostlyclean): Remove *.info.
2758         * touch.c: Change long option name `--file' to `--reference'.
2759         Leave --file as an alias, for now.  It will be removed later.
2760         (usage): Reflect option name change.  From Franc,ois Pinard.
2762 Wed Oct 18 23:09:55 1995  Jim Meyering  (meyering@comco.com)
2764         * configure.in (AC_CHECK_HEADERS): Add sys/wait.h and sys/ioctl.h.
2765         (AC_CHECK_FUNCS): Add endpwent.
2767         * fileblocks.c: Use _POSIX_VERSION, not _POSIX_SOURCE.
2769         * userspec.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
2770         [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
2772         * chgrp.c [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
2774         * chown.c [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
2775         [endgrent]: Remove unused definition.
2777         * df.c (main): Fail if the same file system type was both selected
2778         and excluded.  Reported by Paul Close pdc@lunch.engr.sgi.com.
2780         * rm.c (duplicate_entry): Always return 0 if !D_INO_IN_DIRENT,
2781         rather than if _POSIX_SOURCE.
2783         * install.c: Use HAVE_SYS_WAIT_H, not _POSIX_VERSION in conditional
2784         inclusion of sys/wait.h.
2785         [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE.
2786         [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
2788         * ls.c Use HAVE_SYS_IOCTL_H, rather than !_POSIX_SOURCE || _AIX.
2790 Thu Oct  5 21:49:34 1995  Jim Meyering  (meyering@comco.com)
2792         * configure.in (HAVE_STRUCT_UTIMBUF): Add new test.  Testing for
2793         the existence of <utime.h> is insufficient on some Next systems.
2794         * acconfig.h (HAVE_STRUCT_UTIMBUF): Add it.
2795         * system.h [!HAVE_UTIME_H]: Don't declare struct utimbuf here.
2796         [!HAVE_STRUCT_UTIMBUF]: Declare struct utimbuf here instead.
2798         * chgrp.c: Include limits.h.
2799         [!INT_MAX]: Define it.
2801         * df.c (show_point): Cast -2 to dev_t before assignment.
2802         * mountlist.c (read_filesystem_list): Cast -1 to dev_t before
2803         assignment.
2805 Sun Oct  1 13:22:36 1995  Jim Meyering  (meyering@comco.com)
2807         * configure.in (AC_REPLACE_FUNCS): Add strtoul.
2808         * strtoul.c: New file.
2809         * lib/Makefile.in (SOURCES): Add strtoul.c.
2811         * acconfig.h (STATFS_TRUNCATES_BLOCK_COUNTS): Add it.
2812         * configure.in (STATFS_TRUNCATES_BLOCK_COUNTS): New check to enable
2813         workaround for SunOS statfs brokenness.  Block counts in struct
2814         statfs for partitions 2GB and larger are truncated, but correct
2815         values are stored in f_spare array member.
2817         * fsusage.c (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy
2818         untruncated block counts from f_spare array into proper members
2819         of struct statfs. From Eirik Fuller (eirik@netapp.com);
2821         * ls.c (dired_dump_obstack): Don't generate any output if the
2822         obstack is empty.
2823         (main): Always initialize and dump subdired_obstack, not just if -R.
2824         `ls -lDR dir dir2' was using uninitialized subdired_obstack.
2825         Reported by Samuli K{rkk{inen <hskarkka@snakemail.hut.fi>.
2827 Tue Sep 26 23:05:01 1995  Jim Meyering  (meyering@comco.com)
2829         * man/Makefile.in (install-data, uninstall): Use sed not basename.
2830         The GNU Coding Standard suggests that only a select set of
2831         relatively standard utilities be used in Makefiles.  basename is
2832         not among them.  Suggested by Ulrich Drepper.
2834 Mon Sep 25 23:12:37 1995  Jim Meyering  <meyering@gremlin.comco.com>
2836         * src/df.c (show_point): Ignore mtab entries with either
2837         nonexistent mount points or with inconsistent device number.
2838         From Eirik Fuller <eirik@synopsys.com>.
2840 Wed Aug  9 00:33:05 1995  Jim Meyering  (meyering@comco.com)
2842         * mknod.c (my_strtol): Remove function.
2843         (main): Use xstrtol instead.
2845 Mon Aug  7 23:27:54 1995  Jim Meyering  (meyering@comco.com)
2847         * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
2848         From Franc,ois.
2850 Fri Aug  4 22:11:06 1995  Jim Meyering  (meyering@comco.com)
2852         * install.c (isnumber): Rename to is_number to avoid conflict with
2853         FreeBSD 2.0.5 macro definition.  Reported by David O'Brien
2854         (obrien@sea.legent.com).
2856         * lib/save-cwd.c: New file.
2857         * lib/save-cwd.h: New file.
2858         * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files.
2860         * configure.in: (AC_REPLACE_FUNCS): Remove fnmatch.
2861         Add check for working fnmatch functions so that
2862         systems providing it don't incur the space overhead of linking
2863         with the version in lib.  Cross compiling builds always use the
2864         version in lib.
2866         * ls.c (decode_switches): Set SORT_TYPE.  Before, ls -c was sorting
2867         by name, rather than change time.  Reported by Ken Estes
2868         (m-ke0082@sparky.cs.nyu.edu).
2870         * du.c: (save_cwd, restore_cwd, free_cwd): Remove functions.
2871         New versions have been broken out into save-cwd.c.
2872         (du_files): Adapt to handle status code returned by new versions
2873         of save_cwd and restore_cwd.
2874         (count_entry): Likewise.
2876         * all programs (main): Include program name in --version output.
2878         * src/Makefile.in (cp.o): Depend on ../lib/obstack.h.
2880         * xstrtol.c, xstrtol.h: New files.
2881         * xstrtoul.c, xstrtoul.h: New files.
2882         * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Update for new files.
2884         * chgrp.c (parse_group): Use xstrtoul instead of isnumber; the
2885         latter would silently overflow, accepting a group id larger
2886         than INT_MAX.
2887         (isnumber): Remove now-unused static function.
2888         (change_file_group) [MAXUID]: Give a more descriptive message
2889         when numeric group id is larger than MAXUID.
2891 Sat May 27 00:35:47 1995  Jim Meyering  (meyering@comco.com)
2893         * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
2894         Without this, SunOS doesn't get type for memchr.
2895         Reported by Kaveh Ghazi.
2897 Sun May 21 07:20:55 1995  Jim Meyering  (meyering@comco.com)
2899         * all source files (usage): Include one- or two-line synopsis
2900         in --help output.  From Karl Berry.
2902         * Makefile.in (.PHONY): TAGS is not a phony target.  From Franc,ois.
2904         * All Makefile.in (install-exec, install-exec): New targets.
2905         From Karl Berry.
2907         * all Makefile.in (maintainer-clean): Renamed from realclean
2908         per GNU Standards.
2910         * euidaccess.c: No longer include safe-l?stat.h.
2911         * fsusage.c: Likewise.
2912         * isdir.c: Likewise.
2913         * makepath.c: Likewise.
2914         * mkdir.c: Likewise.
2915         * rename.c : Likewise.
2916         * rmdir.c: Likewise.
2918 Sat May 13 07:47:44 1995  Jim Meyering  (meyering@comco.com)
2920         * lib/Makefile.in: Remove safe-l?stat.[ch]in and related rules.
2921         (maintainer-clean): Rename from realclean.
2922         (.PHONY): New dependencies.
2923         [.c.o]: Remove -I. since safe-l?stat.h are no longer used.
2925         * argmatch.c (argmatch): Include sys/types.h and declare length
2926         argument with type size_t.
2928         * backupfile.c: Remove unnecessary definitions for r?index.
2929         Update definitions for ISDIGIT.
2931         * basename.c (basename): Make argument const.
2933         * euidaccess.c (eaccess_stat): Make statp and path arguments const.
2934         (euidaccess): Make statp argument const.  Use stat, not safe_stat.
2936         * fsusage.c (statfs): Use stat, not safe_stat.
2937         * isdir.c (isdir): Likewise.
2938         * mkdir.c (mkdir): Likewise.
2939         * rename.c (rename): Likewise.
2940         * rmdir.c (rmdir): Likewise.
2942         * userspec.c (parse_user_spec): Use strchr, not index.
2943         [!HAVE_STRING_H]: Define strchr in terms of index, not the
2944         other way around.
2946         * makepath.c: (make_path): Use stat, not SAFE_STAT.
2947         Use strchr, not index.  Adjust defines accordingly.
2949         * makepath.h: Undef __P before defining.
2950         Guard definition with simpler `#if __STDC__'.
2952         * chgrp.c: Use stat (lstat), not safe_stat (safe_lstat).
2953         * chmod.c: Likewise.
2954         * chown.c: Likewise.
2955         * cp-hash.c: Likewise.
2956         * cp.c: Likewise.
2957         * df.c: Likewise.
2958         * du.c: Likewise.
2959         * install.c: Likewise.
2960         * ln.c: Likewise.
2961         * ls.c: Likewise.
2962         * mv.c: Likewise.
2963         * mvdir.c: Likewise.
2964         * rm.c: Likewise.
2965         * touch.c: Likewise.
2967 Fri May 12 21:21:23 1995  Jim Meyering  (meyering@comco.com)
2969         * mv.c (movefile): Remove a single trailing slash from destdir
2970         before concatenating with `/' and filename for `ok to overwrite...'
2971         message.  Reported by Franc,ois Pinard.
2973 Mon May  1 23:03:30 1995  Jim Meyering  (meyering@comco.com)
2975         * ls.c (quote_filename): Never return NULL when quoting filenames
2976         as C-strings.  --quote-name was quoting only strings containing
2977         at least one C-quotable character.  Reported by David J. MacKenzie.
2979 Mon Mar 20 21:44:40 1995  Jim Meyering  (meyering@comco.com)
2981         * rename.c (rename): Compare src and dest inode numbers rather
2982         than src inode and dest dev when determining whether they refer
2983         to the same file.  From marc@math.cornell.edu (Marc Parmet).
2985         * df.c (usage): Add ellipsis after `[OPTION]'.  Use FILE,
2986         not deprecated PATH in text of help message.  From Karl Berry.
2988 Fri Mar 10 21:13:23 1995  Jim Meyering  (meyering@comco.com)
2990         * src/*.c: Update Copyright dates.
2992         * src/Makefile.in (uninstall): Handle case in which LIBPROGS is empty.
2993         Reported by Peter Smidt <smidt@cd.chalmers.se>.
2995 Thu Feb 23 22:29:11 1995  Jim Meyering  (meyering@comco.com)
2997         * du.c (save_cwd) [!HAVE_FCHDIR]: Always initialize cwd->desc.
2998         (restore_cwd) [!HAVE_FCHDIR]: Remove unnecessary redefinition
2999         of fchdir.  Both from Bruno Haible.
3001 Mon Feb 20 22:54:39 1995  Jim Meyering  (meyering@comco.com)
3003         * du.c (save_cwd, restore_cwd): New functions.
3004         (main): Use them instead of open coded versions.
3005         (count_entry): Use them here instead of relying on chdir ("..") --
3006         but only when necessary.  Before, with --dereference (-L),
3007         traversing a symlink caused failure because chdir ("..") didn't
3008         work as expected.  Reported by Bruno Haible.
3010 Sat Feb 11 07:52:01 1995  Jim Meyering  (meyering@comco.com)
3012         * configure.in (AC_REPLACE_FUNCS): Add memcmp, memcpy, and memset.
3013         (AC_CHECK_FUNCS): Add strchr and strrchr.
3014         * lib/Makefile.in (SOURCES): Add memcmp.c, memcpy.c, and memset.c.
3016         * system.h: Remove index/rindex and bcmp/bcopy/bzero references.
3017         Separate errno declaration from STDC_HEADERS.
3019         * dd.c (copy): Use memset, not bzero.
3020         (copy_simple): Use memcpy, not bcopy.
3022         * fsusage.c (get_fs_usage, statfs): Use safe_read, and safe_stat
3023         rather than bare read and stat.  From Bruno Haible.
3025         * lib/Makefile.in (DISTFILES): Add error.h.
3027         * chgrp.c, chmod.c, chown.c, cp-hash.c, cp.c, df.c, du.c, install.c,
3028         ln.c, ls.c, mv.c, mvdir.c, rm.c, touch.c: Rename SAFE_STAT and
3029         SAFE_LSTAT to safe_stat and safe_lstat.
3031         * basename.c (basename): Use strrchr, not rindex.
3032         [!STDC_HEADERS && !HAVE_STRING_H]: Define strrchr to rindex.
3034 Tue Dec 27 07:07:53 1994  Jim Meyering  (meyering@comco.com)
3036         * src/*.c: Include "error.h" rather than simply declaring
3037         `void error ();'.
3038         * src/Makefile.in (OBJECTS): Depend on ../lib/error.h.
3040         * sync.c (main): Make error message accurate.
3042         * dd.c (skip): Use safe_read instead of read.
3043         (copy): Use full_write instead of write.
3044         From Bruno Haible.
3046 Sat Dec 10 00:02:09 1994  Jim Meyering  (meyering@comco.com)
3048         * Makefile.in (install): Install `install' first as transformed
3049         `ginstall,' then remove the target (transformed `install')
3050         and move GNU install into its place.  Before, the installation
3051         process failed on systems (e.g. HPUX) that can't overwrite the
3052         executable associated with a running process.
3054         * system.h [!HAVE_STRING_H]: Define strchr to index and strrchr to
3055         rindex instead of the other way around.
3056         * rmdir.c (remove_parents): Use strr?chr instead of r?index.
3057         * mvdir.c (main): Likewise.
3058         * dd.c (parse_conversion, scan_args): Likewise.
3059         * cp.c (copy, make_path_private): Likewise.
3061         * system.h: Include <ctype.h> and define IS* macros.
3062         * touch.c: No longer include <ctype.h>.
3063         * chown.c: Likewise.
3064         * install.c: Likewise.
3065         [isascii, ISDIGIT]: Remove definitions.
3066         * chgrp.c: Likewise.
3067         * dd.c: Likewise.
3069 Sun Dec  4 14:53:12 1994  Jim Meyering  (meyering@comco.com)
3071         * doc/Makefile.in (DISTFILES): Add getdate.texi.
3073 Fri Nov 11 11:15:20 1994  Jim Meyering  (meyering@comco.com)
3075         * mknod.c (my_strtol): New function.
3076         (main): Use it instead of atoi to convert argument strings to
3077         major and minor device numbers.  Now, mknod diagnoses invalid
3078         device numbers and accepts octal and hexadecimal as well as
3079         decimal string arguments.  Ralf Lammers
3080         <rlammers@physik.uni-osnabrueck.de> suggested that mknod accept
3081         hex device numbers for compatibility with HPUX's mknod program.
3083         * configure.in (AC_REPLACE_FUNCS): Add strtol.
3084         * lib/Makefile.in (SOURCES): Add strtol.c.
3086 Sun Nov 06 00:18:56 1994  Jim Meyering  (meyering@comco.com)
3088         * Version 3.12.
3090 Sat Nov 05 15:20:07 1994  Jim Meyering  (meyering@comco.com)
3092         * group-member.c: Use up-to-date version.
3093         * group-member.h: New file.
3094         * lib/Makefile.in (DISTFILES): Add group-member.h.
3095         (group-member.o): Depend on group-member.h.
3097         * Version 3.11.
3099         * src/Makefile.in (obstack.o): Depend on obstack.h.
3100         * makepath.c (makepath) [__STDC__]: Add an ANSI-style prototype.
3101         From Kaveh Ghazi.
3103 Fri Nov 04 17:27:55 1994  Jim Meyering  (meyering@comco.com)
3105         * Version 3.10.
3107 Thu Nov 03 12:59:34 1994  Jim Meyering  (meyering@comco.com)
3109         * makepath.h: New file.
3110         * makepath.c: Include it.
3111         Add an argument: PRESERVE_EXISTING.
3112         Declare char* arguments const.
3113         * install.c, mkdir.c: Update callers.  Set it in mkdir.c so
3114         that `mkdir -p' ignores existing directories as POSIX mandates.
3115         Before, it would try to change owner and/or permissions of such
3116         directories.  Christopher S. Arthur <csa@halcyon.com> reported
3117         the mkdir -p failure.
3118         * lib/Makefile.in (DISTFILES): Add it.
3119         (makepath.o): Depend on makepath.h.
3120         * src/Makefile.in (install.o, mkdir.o): Depend on makepath.h.
3121         * cp.c (make_path_private): Rename function from make_path to
3122         avoid confusion.
3123         (do_copy): Update caller.
3125         * ls.c: Include <limits.h> before system.h because limits.h on
3126         some systems undefines PATH_MAX, whereas system.h includes pathmax.h
3127         which sets PATH_MAX.  From Kaveh Ghazi.
3129         * euidaccess.c: Define S_IXUSR, S_IXGRP, and S_IXOTH in terms of
3130         S_IEXEC if they're not already defined.  Reported by Kaveh Ghazi
3131         and Daniel Hagerty <hag@gnu.ai.mit.edu>.
3133 Tue Nov 01 06:18:20 1994  Jim Meyering  (meyering@comco.com)
3135         * eaccess.c (euidaccess): Rename from eaccess to avoid conflict
3136         with like-named, different function in some C libraries.
3137         * euidaccess.c: Renamed from eaccess.c
3138         * lib/Makefile.in (SOURCES): Rename eaccess.c.
3139         Update dependency, too.
3140         * configure.in (AC_REPLACE_FUNCS): Check for euidaccess
3142 Mon Oct 31 08:02:31 1994  Jim Meyering  (meyering@comco.com)
3144         * ls.c (dired_dump_obstack): Cast obstack_finish for non-ANSI
3145         compilers.  Kaveh Ghazi reported the problem.
3147 Sat Oct 29 00:42:18 1994  Jim Meyering  (meyering@comco.com)
3149         * fsusage.c (get_fs_usage) [STAT_STATFS4]: Define CONVERT_BLOCKS
3150         to adjust_blocks for _AIX.  Was getting off-by-8x numbers.
3152         * df.c: Make --sync the default.
3153         Add new option: --no-sync.
3154         Remove short option alias for --sync.
3155         (usage): Update.
3157         * ls.c [!STDC_HEADERS]: Declare free.
3158         (dired_dump_obstack): Cast pos[i] (of type size_t) to int so it
3159         matches %d in printf.
3160         (quote_filename): Fix typo in stpcpy call.
3162 Thu Oct 27 00:02:45 1994  Jim Meyering  (meyering@comco.com)
3164         * fsusage.c: Include <sys/stat.h> before safe-stat.h.
3166         * cp.c (make_path): Don't change protections on existing directory.
3167         Reported by Andreas Schwab.
3169         * df.c: New option: --sync.  No longer perform sync by default.
3170         Do it only when this option is used.  Invoking sync can be very
3171         expensive, and it's not clear that doing so yields more up to date
3172         results.  With encouragement/prodding from Paolo Zeppegno
3173         (paolo@to.sem.it), Nick Holloway, and Kaveh Ghazi.
3175 Thu Oct 20 00:52:59 1994  Jim Meyering  (meyering@comco.com)
3177         * system.h [!S_IEXEC]: Define as S_IXUSR.
3179         * cp.h [S_IEXEC]: Remove definition.  cp.c doesn't use it.
3181         * ls.c [!INT_MAX]: Define to 2^31 - 1 so subsequent #if test works.
3182         [S_IEXEC]: Remove definition.  It's in system.h now.
3183         (usage): Sort options, but without segregating upper and lower case.
3185         * ls.c: Support for new option: --dired (-D).
3186         (dired, dired_pos, dired_obstack, subdired_obstack): Global variables.
3187         [PUTCHAR, FPUTS, FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS]: New macros
3188         (dired_dump_obstack, quote_filename): New functions.
3189         (main): Initialize obstacks.
3190         (decode_switches): Recognize -D.
3191         (print_dir): Make arguments `const.'
3192         Record directory name indices in obstack.
3193         (print_dir, print_long_format, print_type_indicator): Use macros
3194         FPUTS, FPUTS_LITERAL, PUTCHAR for output.
3195         (print_long_format): Record file name indices in obstack.
3196         (print_name_with_quoting): Just call quote_filename and output the
3197         result.
3199 Mon Oct 17 23:56:36 1994  Jim Meyering  (meyering@comco.com)
3201         * savedir.c: Indent CPP conditionals.  Change some #ifdefs to #ifs.
3202         From Franc,ois Pinard.
3204 Mon Oct 17 10:27:26 1994  David J. MacKenzie  (djm@duality.gnu.ai.mit.edu)
3206         * lib/dirname.c: Use strrchr, not rindex.
3208 Sun Oct 16 07:53:27 1994  Jim Meyering  (meyering@comco.com)
3210         * system.h (S_IXUSR, S_IXGRP, S_IXOTH): Define these in terms of
3211         S_IEXEC if they're not already defined. From Kaveh Ghazi.
3213         * eaccess.c (eaccess_stat): Don't use NULL in comparison.
3214         Some systems don't define it except in stdio.h -- and including
3215         (yes, just including) stdio.h has been known to significantly
3216         increase object code size (though admittedly, that probably
3217         happens only on old systems).  Kaveh Ghazi reported the problem.
3219         * src/Makfile.in lib/Makfile.in (DEFS): Remove -Dlint.
3220         It causes problems on broken pyramid system.
3221         From Kaveh Ghazi.
3223 Sat Oct 08 10:39:32 1994  Jim Meyering  (meyering@comco.com)
3225         * mountlist.c: Always include <sys/param.h> if it exists.
3226         (fstype_to_string) [__NetBSD__]: Don't define this function.
3227         (read_filesystem_list) [__NetBSD__]: Use fsp's f_fstypename field,
3228         rather than fstype_to_string (f_type).  With suggestions from
3229         Greg Hudson (ghudson@mit.edu).
3231         * lib/Makefile.in (OBJECTS): Remove eaccess.o.
3232         * configure.in (AC_REPLACE_FUNCS): Add `eaccess' here instead.
3233         The Hurd and Linux will have it.
3235 Fri Oct 07 20:27:48 1994  Jim Meyering  (meyering@comco.com)
3237         * (doc): New subdirectory with texinfo documentation.
3238         * fileutils.texi: Thanks to Franc,ois Pinard and Karl Berry!
3240         * Makefile.in (All of them): Update from the ones in sh-utils.
3241         From now on, rules and definitions that are comon to the fileutils,
3242         textutils, and sh-utils will get ChangeLog entries only in the
3243         sh-utils.
3245         * Makefile.in (install, uninstall): Prepend ginstall->install
3246         mapping to standard $(transform) sed mapping.
3248         * chgrp.c, chmod.c, chown.c, install.c, mkdir.c, mkfifo.c, mknod.c,
3249         rm.c, rmdir.c (main): Diagnose wrong number of argument -- usually
3250         too few -- instead of just referring the user to the --help option.
3251         * mknod.c (main): Give diagnostics explaining specific problems
3252         instead of just the usage message.  Reported by Karl Berry.
3254         * configure.in: Overhaul tests that determine how to get filesystem
3255         usage statistics.  Now, most use AC_TRY_RUN and test for the precise
3256         feature that will be used.  I know that that will make configuring a
3257         little harder for the people who cross compile, but if one of them
3258         is annoyed enough (or complains loudly enough :-) maybe someone will
3259         find the time to add tests to be used solely when cross compiling.
3260         * acconfig.h (STAT_READ): Rename to STAT_READ_FILSYS.
3261         * fsusage.c: Reorganize accordingly.
3263 Tue Oct 04 20:38:12 1994  Jim Meyering  (meyering@comco.com)
3265         * chmod.c (main): Remove trailing slashes from file name arguments.
3266         Otherwise, `chmod 600 foo/; chmod 700 foo/' failed with the error
3267         `chmod: foo/: Permission denied' under Linux 1.1.51.  Reported by
3268         Thomas Koenig (ig25@fg70.rz.uni-karlsruhe.de).
3269         * chown.c (main): Likewise.
3271 Thu Oct  2 23:03:32 1994  Jim Meyering  (meyering@comco.com)
3273         * configure.in: Replace obsolete AC_DIR_HEADER with AC_HEADER_DIRENT
3274         and AC_FUNC_CLOSEDIR_VOID.
3276         * configure.in: Remove AC_SIZEOF_TYPE(int).
3277         ls.c: Instead of comparing SIZEOF_INT == 2, compare INT_MAX to 2^16.
3278         Suggestion from Roland McGrath.
3280 Sat Oct 01 21:23:27 1994  Jim Meyering  (meyering@comco.com)
3282         * src/*.c: Remove CONFIG_BROKETS conditional.
3284         * {*/,}Makefile.in: Revamp to look much like those in sh-utils.
3285         * acconfig.h (HAVE_FTRUNCATE): Remove it.
3286         (ino_t, D_INO_IN_DIRENT): Add these.
3288         * configure.in: Convert for autoconf-2.0.
3289         * backupfile.c: Likewise.
3290         * savedir.c: Likewise.
3292         * mkdir.c, rmdir.c: Split the two functions from old mkdir.c into
3293         separate files.
3295         * chgrp.c [_POSIX_VERSION]: Test this instead of _POSIX_SOURCE.
3297         * ls.c: Don't use SIZEOF_INT because it would require configure
3298         to run a program -- then cross compilers would lose.  Instead,
3299         compare INT_MAX to 64k-1 since all we need to know is whether
3300         an int is 2 bytes or larger.
3302         * rm.c [D_INO]: Use D_INO_IN_DIRENT rather than _POSIX_SOURCE in the
3303         test for how to define this macro.
3305         * system.h: Use HAVE_SYS_PARAM_H (not _POSIX_SOURCE) in test
3306         for whether to include <sys/param.h>.
3307         Likewise for <utime.h>.
3308         Update for DIRENT->HAVE_DIRENT_H etc. autoconf-2.0 changes.
3309         Ditto for VOID_CLOSEDIR->CLOSEDIR_VOID.
3311         * xgetcwd.c [!_POSIX_VERSION && !HAVE_GETCWD]: Remove
3312         !defined (_POSIX_VERSION) conjunct.  From Kaveh Ghazi.
3314 Mon Sep 26 17:47:17 1994  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
3316         * lib/*.c: Remove CONFIG_BROKETS conditional.
3317         * lib/Makefile.in src/Makefile.in: Don't define it.
3319 Sun Sep 25 12:20:52 1994  Jim Meyering  (meyering@comco.com)
3321         * ln.c (do_link): Give a diagnostic when trying to make a hard
3322         link to a nonexistent source file.  Before, running the command
3323         `ln -i no-such-file existing-file' and responding `yes' to the
3324         prompt would both remove `existing-file' and fail to make a link.
3325         Karl Berry reported the problem.
3327 Sat Sep 10 04:34:34 1994  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
3329         * src/rm.c (remove_dir): Pass pathname to eaccess_stat.
3331 Fri Sep  2 13:54:13 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>
3333         * lib/Makefile.in (safe-lstat.c, safe-lstat.h, safe-stat.c,
3334         safe-stat.h): Use $(srcdir) to find source files.
3335         (.c.o): Use -I. to get safe-lstat.h and safe-stat.h from the
3336         build directory.
3337         * src/Makefile.in (incl): Add -I../lib to get lib/safe-lstat.h and
3338         lib/safe-stat.h from the build directory.
3340 Sat Aug 27 16:33:04 1994  Jim Meyering  (meyering@comco.com)
3342         * ln.c (main): Accept new option --no-dereference (-n).
3343         (do_link): If the destination command line argument is a symlink
3344         to a directory and --no-dereference is given, use that as the
3345         destination instead of the file in the directory.
3346         * ln.1: Document this.
3348         * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
3349         From Francois Pinard.
3351         * isdir.c, makepath.c, rename.c [STAT_MACRO_BROKEN]: Remove
3352         spurious #ifdef's.
3354 Thu Aug 25 00:12:20 1994  Jim Meyering  (meyering@comco.com)
3356         * dd.c (copy): Clean up and fix off-by-one error when freeing
3357         the input buffer.
3359 Thu Aug 18 11:41:16 1994  Jim Meyering  (meyering@comco.com)
3361         * du.c (du_files) [HAVE_FCHDIR]: Use open (".", ...) and fchdir
3362         instead of xgetcwd and chdir.  Otherwise, running du in a subdirectory
3363         of an unreadable directory would fail because xgetcwd fails.
3364         * configure.in (AC_HAVE_FUNCS): Add fchdir.  AIX-2.3 (for one)
3365         doesn't have it.
3367         * lib/Makefile.in (DISTFILES): Include getdate.c and posixtim.c
3368         so one doesn't need $(YACC).
3369         Add dependencies on safe-stat.h.
3371 Sat Jul 30 08:08:02 1994  Jim Meyering  (meyering@comco.com)
3373         * du.c (main): Don't initialize automatic array CWD_ONLY in declaration.
3374         Some compilers don't allow that.
3376         * backupfile.c [DIRENT]: Remove spurious `|| defined(_POSIX_VERSION)'.
3377         * savedir.c: Ditto.
3379         * safe-xstat.c.in, safe-xstat.h.in: New files.
3380         * lib/Makefile.in: Add rules and dependencies for building safe-stat.c,
3381         safe-stat.h, safe-lstat.c, and safe-lstat.h from them.
3383         * eaccess.c (eaccess): Use SAFE_STAT instead of stat
3384         (and/or SAFE_LSTAT instead of lstat) to avoid unnecessary failure
3385         on systems for which stat (lstat) can return EINTR.
3386         * fsusage.c (statfs): Ditto.
3387         * isdir.c (isdir): Ditto.
3388         * makepath.c (make_path): Ditto.
3389         * rename.c (rename): Ditto.
3390         * chgrp.c (change_file_group): Ditto.
3391         * chmod.c (change_file_mode): Ditto.
3392         * chown.c (change_file_owner): Ditto.
3393         * cp-hash.c (remember_created): Ditto.
3394         * cp.c (main, do_copy): Ditto.
3395         * df.c (main, show_point): Ditto.
3396         * du.c (main, du_files, count_entry): Ditto.
3397         * install.c (copy_file): Ditto.
3398         * ln.c (main, do_link): Ditto.
3399         * ls.c (gobble_file): Ditto.
3400         * mv.c (is_real_dir, do_move): Ditto.
3401         * mvdir.c (main): Ditto.
3402         * rm.c (rm): Ditto.
3403         * touch.c (main, touch): Ditto.
3405         * Makefile.in (install): Tell GNU make that this target is .PHONY
3406         so it doesn't unnecessarily build ./install from install.sh.
3408 Tue Jul 26 11:33:53 1994  Jim Meyering  (meyering@comco.com)
3410         * system.h: Remove `|| defined(_POSIX_VERSION)' from test that
3411         decides whether to include <fcntl.h>.  From Francois Pinard.
3413 Sun Jul 03 08:44:00 1994  Jim Meyering  (meyering@comco.com)
3415         * configure.in [AC_HAVE_HEADERS]: Add sys/param.h, for definition
3416         of HAVE_SYS_PARAM_H, now tested in pathmax.h.
3418         * makepath.c (make_path): Avoid spurious failure for file names
3419         that contain `/.' or `/..'.  From Andreas Schwab
3420         <schwab@issan.informatik.uni-dortmund.de>.
3422         * dd.c (main): Handle SIGPIPE like other interrupts.
3423         From Scott L. Burson <gyro@zeta-soft.com>.
3425         * df.c (main, show_dev, usage): New option --print-type=fstype.
3426         From Arne Henrik Juul.
3427         * df.1: Update.
3429 Thu Jun 30 10:28:32 1994  Jim Meyering  (meyering@comco.com)
3431         * ls.c (longdiff) [SIZEOF_INT == 2]: Choose which version of this
3432         macro to use based on SIZEOF_INT rather than obsolete INT_16_BITS.
3433         [INODE_DIGITS]: New macro.
3434         (print_long_format): Use it.
3435         (print_file_name_and_frills): Ditto.
3436         (length_of_file_name_and_frills): Ditto.
3437         (print_long_format): Add a couple casts to unsigned types.
3439         * ls.c: Change type name from `struct file' to `struct fileinfo'.
3440         David J. Mackenzie reported a name conflict on HPUX with the former.
3442         * dd.c (copy): Allocate an extra byte so I/O buffer begins on an
3443         even address.  This because the ITOS 3000WS running SEIUX 3.1
3444         (a descendant of MIPS RISC/OS 4.x) has SCSI device drivers that
3445         require the I/O buffer begin on an even address.  From
3446         Tilman Schmidt <tilman@gb1.sema.de>.
3448 Mon Jun 20 23:45:34 1994  Jim Meyering  (meyering@comco.com)
3450         * configure.in: Use AC_PROGRAM_PATH to get values for LN, MV, RM.
3451         (AC_HAVE_FUNCS): Add getgroups.
3452         (AC_OUTPUT): Remove touch command.
3454         * eaccess.c (in_group): Remove static function.  Use group_member
3455         instead.
3456         (eaccess_stat, eaccess): Change calling sequence to take filename.
3457         Save UID and GID and use access if they are the same as effective IDs.
3458         (main) [TEST]: Test driver.
3459         * cp.c (copy): Update callers.
3460         * mv.c (do_move): Ditto.
3461         * rm.c (remove_file): Ditto.
3463         * cp.c (copy): With --preserve (-p) for non-root users, don't even
3464         try to preserve file ownership in chown call.  Otherwise, on systems
3465         with the mis-feature allowing non-root users to change file ownership,
3466         the subsequent chmod would fail.
3468         * userspec.c (parse_user_spec): Rewrite.  Be careful to free all
3469         allocated memory upon error.
3470         (main) [TEST]: Test driver.
3472         * src/Makefile.in (uninstall): Delete $(LIBPROGS) one at a time
3473         instead of like `rm -f $(libdir)/$(LIBPROGS)'.  The old way loses
3474         when LIBPROGS is empty and $(libdir) is a non-directory, and would
3475         lose if LIBPROGS could ever have more than one word.
3476         * (RM, LN, MV, INSTALL): Use values determined by ./configure instead
3477         of the newly built binaries so people can build with a cross
3478         compiler and still run `make (un)install.'
3480         * chgrp.c (change_file_group): Give a better error message when
3481         failing because the invoking user does not belong to the requested
3482         group.  This affects systems on which chown sets errno to EPERM
3483         for both `inaccessible file' and `user not a member of the specified
3484         group' errors.  Before, `chgrp bin file-I-own' would give the
3485         misleading and incorrect diagnostic `chgrp: file-I-own: Not owner'.
3486         Now it reports `you are not a member of group `bin''.
3487         Thomas A Peterson (tap@src.honeywell.com) reported this weakness.
3489         * long-options.c: Move from src/ to lib/.
3490         * long-options.h: Ditto.
3491         * src/Makefile.in: Remove references to long-options.[ch].
3492         * lib/Makefile.in (SOURCES, OBJECTS): Add long-options.[co].
3494 Sat Jun 18 15:45:34 1994  Jim Meyering  (meyering@comco.com)
3496         * du.c (count_entry): Print "/" instead of zero-length string.
3497         From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
3499 Sun May 29 13:43:50 1994  Jim Meyering  (meyering@comco.com)
3501         * group-member.c: New file.
3502         * lib/Makefile.in (SOURCES, OBJECTS): Add group-member.[co].
3504         * sync.c: New file.
3505         * Makefile.in (PROGS): Add sync.
3506         (SOURCES): Add sync.c
3507         * src/Makefile.in: Add rules and dependencies for sync.
3509         * configure.in: Use AC_SET_MAKE and AC_PROG_INSTALL.
3510         If AC_FUNC_CHECK doesn't find getgroups, add -lbsd if possible.
3511         This was reported by Tilman Schmidt <ts@gb1.sema.de>
3512         to be necessary on an ITOS 3000WS running SEIUX 3.1.
3514         * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
3515         (Makefile): Remove dependencies on */Makefile.in.
3516         Change the rule so running config.status creates only Makefile.
3517         (stamp-config): Have config.status generate only config.h.
3519         * {lib,man,src}/Makefile.in (Makefile): Add single dependency on
3520         Makefile.in and rule to make config.status create only Makefile.
3522         * system.h: Move from lib to src.
3523         * src/Makefile.in (DISTFILES): Add system.h.
3524         * lib/Makefile.in (DISTFILES): Remove system.h.
3526 Mon Apr 18 19:54:24 1994  Jim Meyering  (meyering@comco.com)
3528         * documentation: Change uses of `pathname' and `path' as per
3529         GNU standards.
3531 Fri Apr 15 20:41:15 1994  Jim Meyering  (meyering@comco.com)
3533         * mv.c (main): Give a reason for failure when given fewer than
3534         two non-option arguments, rather than just the pointer to --help.
3535         * ln.c (main): Ditto, but for no non-option arguments.
3537         * configure.in: Update for autoconf-1.8.
3538         Use AC_CHECKING instead of echo.
3539         Use AC_SIZEOF_TYPE instead of obsolete AC_INT_16_BITS.
3541 Wed Apr 13 11:18:19 1994  Jim Meyering  (meyering@comco.com)
3543         * cp.c (copy_reg): Correct off-by-DEV_BSIZE error in test for
3544         whether a file has holes.  From Michael Bushnell <mib@gnu.ai.mit.edu>.
3546 Wed Mar 30 08:53:21 1994  Jim Meyering  (meyering@comco.com)
3548         * configure.in: Use AC_SET_MAKE.
3549         * Makefile.in: Edit MAKE assignments into @SET_MAKE@.
3551 Mon Mar 14 11:01:09 1994  Jim Meyering  (meyering@comco.com)
3553         * fsusage.c (adjust_blocks): Return -1 when FROMSIZE is non-positive.
3554         Suggestion from Andries.Brouwer@cwi.nl.  He reported that df failed
3555         with divide by zero when trying to process an entry for an nfs file
3556         system mounted over a SLIP line after the SLIP connection had been
3557         broken.
3558         [convert_blocks]: Rename macro to CONVERT_BLOCKS.
3560 Sat Jan 29 13:24:07 1994  Jim Meyering  (meyering@comco.com)
3562         * du.c (main): Call du_files (with ".") when there are no
3563         non-option arguments rather than treating that as a special case.
3564         (du_files): Ignore return value from count_entry.
3565         (count_entry): Accumulate file sizes into new global sum used for
3566         the -c option;  the return value is unchanged and is still used
3567         by recursive calls.  Now, using -S and -c together works.
3568         Add parentheses to clarify precedence.
3570 Fri Jan 28 11:02:21 1994  Jim Meyering  (meyering@comco.com)
3572         * configure.in: Don't set LDFLAGS since linking now uses both
3573         LDFLAGS and CFLAGS.
3575 Thu Jan 13 17:27:38 1994  Jim Meyering  (meyering@comco.com)
3577         * src/Makefile.in: Change all link commands to use both $(CFLAGS)
3578         and $(LDFLAGS).
3580 Mon Jan 10 01:20:38 1994  Jim Meyering  (meyering@comco.com)
3582         * man/Makefile.in (manprefix): Use binprefix as the default.
3584 Thu Dec 30 23:11:10 1993  Jim Meyering  (meyering@comco.com)
3586         * The following changes are necessary to avoid spurious failures
3587         when a read or write system call is interrupted (e.g. by SIGTSTP).
3588         A POSIX implementation of those system calls may either return
3589         -1 and set errno to EINTR or return a positive value indicating
3590         that a partial read or write has completed successfully.  On Linux
3591         0.99.14, interrupted read and write system calls return -1/EINTR.
3592         Thanks to Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de>
3593         for pointing this out.
3595         * full-write.c, safe-read.c: New files.
3597         * cp.c (copy_reg): Use full_write instead of write.  Handle
3598         errno == EINTR (instead of failing) after read system call.
3599         * dd.c (skip): Handle errno == EINTR (instead of failing) after
3600         read system call.
3601         (copy): Use safe_read instead of read.
3602         * install.c (copy_file): Use safe_read and full_write instead of
3603         read and write system calls.
3604         * mv.c (copy_reg): Ditto.
3605         * touch.c (utime_now): Ditto.
3607 Tue Dec 28 15:49:32 1993  Jim Meyering  (meyering@comco.com)
3609         * install.sh: New file.
3610         Makefile.in [DISTFILES]: Add it.
3612 Sat Dec 18 01:12:24 1993  Jim Meyering  (meyering@comco.com)
3614         * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
3615         so it goes in config.status.  This eliminates unnecessary second run
3616         of configure.
3618 Thu Nov 18 00:03:24 1993  Jim Meyering  (meyering@comco.com)
3620         * configure.in [STAT_STATFS2_FSIZE]: Fix test (that had obsolete
3621         and now-broken use of AC_HEADER_EGREP) so that this flag is set
3622         for NetBSD 0.9.
3624 Mon Oct 25 20:27:00 1993  Jim Meyering  (meyering@comco.com)
3626         * cp-aux.c, df.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c,
3627         mknod.c, mv.c, touch.c: Use the preferred `--longopt=arg'
3628         syntax in --help message rather than `--longopt arg'.
3629         From Francois Pinard.
3631 Tue Oct 19 07:02:18 1993  Jim Meyering  (meyering@comco.com)
3633         * Version 3.9.
3635 Mon Oct 18 00:13:40 1993  Jim Meyering  (meyering@comco.com)
3637         * src/*.c (usage): Now the usage message is simply
3638         "Try `%s --help' for more information.  From Francois Pinard.
3640         * src/Makefile.in [LIBPROGS]: Depend on ../lib/libfu.a and
3641         version.o.  From Francois Pinard.
3643         * src/*.c (usage): Remove blank line before "Try `%s --help..."
3644         in usage message.
3646 Sun Oct 17 00:19:58 1993  Jim Meyering  (meyering@comco.com)
3648         * fileblocks.c [!NINDIR]: Define BSIZE only if it's not already
3649         defined.
3651         * ls.c (print_long_format): Cast printf args major and minor
3652         so they'll have types matching %u format even on systems
3653         where those macros have signed type.
3655 Sat Oct 16 00:25:42 1993  Jim Meyering  (meyering@comco.com)
3657         * chmod.c (change_file_mode): Reapply Oct 6 change for symlinks.
3658         Somehow it got removed from working sources.
3660         * lib/Makefile.in [OBJECTS]: Change dependency to ../config.h so
3661         it works when building in a subdirectory.  From Rick Sladkey
3662         (jrs@world.std.com).
3664 Wed Oct 13 19:43:47 1993  Jim Meyering  (meyering@comco.com)
3666         * cp.c (copy), ls.c (get_link_name): Complete Aug 27 change so
3667         that we use PATH_MAX + 1 rather than sizeof(char*) as size of
3668         buffer in readlink call.  This was causing spurious errors.
3670         * cp.c (copy), mv.c (do_move), rm.c (remove_file, remove_dir):
3671         Cast to `unsigned int' stat->st_mode printf arguments corresponding
3672         to %o formats to avoid warnings.
3674         * lib/Makefile.in [DEFS]: Remove -DMVDIR.  Add -DCONFIG_BROKETS.
3675         (rename.o): Add a specific rule.  Use -DMVDIR=... here instead.
3677         * src/Makefile.in [DEFS]: Add -DCONFIG_BROKETS.
3678         (distclean): Don't delete dir.c and vdir.c; they aren't
3679         created anymore.
3681         * lib/Makefile.in: Make all .o files depend on $(srcdir)/../config.h.
3682         * src/Makefile.in: Ditto.
3684 Sun Oct 10 13:38:54 1993  Jim Meyering  (meyering@comco.com)
3686         * src/Makefile.in (dist): Depend on $(DISTFILES).
3688         * src/Makefile.in [libdir, LIBPROGS]: Define them.
3689         From Francois Pinard.
3691         * posixtm.y: [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
3692         or "config.h".  From Francois Pinard.
3694         * makepath.c: [HAVE_CONFIG_H, CONFIG_BROKETS]: Remove the duplicate
3695         #ifdef block following the alloca #ifdefs.  From Francois Pinard.
3697         * df.c: Remove unnecessary dcl of strstr.
3699 Sat Oct  9 13:30:28 1993  Jim Meyering  (meyering@comco.com)
3701         * configure.in [STATFS_OSF1]: Change name to STAT_STATFS3_OSF1
3702         to be consistent with names of the other STAT_* macros.
3703         * acconfig.h: Ditto.
3704         * fsusage.c: Ditto.
3706         * acconfig.h: Add comments.
3707         * Makefile.in: Remove comments about -D flags that could be added
3708         to DEFS; now (using autoheader) those comments end up in config.h.
3710         * Makefile.in (configure, config.h.in): Warn that they may not be
3711         up to date.  Don't touch them.
3713         * ls.c (usage): Split long usage string between two fprintf
3714         statements to avoid default limit of SGI's cc on string length.
3716         * Makefile.in, src/Makefile.in [PROGS]: Alphabetize.
3718         * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.
3720 Thu Oct 07 12:57:10 1993  Jim Meyering  (meyering@comco.com)
3722         * chgrp.c, chmod.c, chown.c, cp-aux.c, cp.c, dd.c, df.c, du.c,
3723         install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c, mv.c, mvdir.c,
3724         rm.c, rmdir.c, touch.c (usage): Using --help gets long well-
3725         formatted help.  Now --help writes to stdout and exits successfully.
3726         From Francois Pinard <pinard@iro.umontreal.ca>.
3728         * lib/Makefile.in [libdir]: Make sure it's defined.
3730         * posixtm.y [!__GNUC__ && !HAVE_ALLOCA_H]: Declare alloca as void*
3731         rather than char*.  The latter conflicts with a dcl from bison.simple.
3733 Wed Oct 06 18:22:00 1993  Jim Meyering  (meyering@comco.com)
3735         * chmod.c (change_file_mode): Add an argument to control how symbolic
3736         links are treated.
3737         (main, change_dir_mode): Reflect changed calling sequence.
3738         Now symlinks listed on the command line are processed (they
3739         were ignored before); the permissions of the dereferenced files are
3740         changed.  Symlinks encountered in recursive traversals are still
3741         ignored.  This makes GNU chmod act more like e.g. Sun's.
3742         From Nick Holloway <alfie@dcs.warwick.ac.uk>.
3743         * chmod.1: Document it.
3745 Tue Oct 05 14:52:02 1993  Jim Meyering  (meyering@comco.com)
3747         * configure.in: Add AC_STAT_MACROS_BROKEN.
3749         * isdir.c, makepath.c, rename.c, system.h [STAT_MACROS_BROKEN]:
3750         Test this.
3752         * install.c (install_file_in_dir): Use stpcpy instead of slow sprintf.
3754         * argmatch.c, backupfile.c, basename.c, dirname.c, eaccess.c,
3755         fileblocks.c, fsusage.c, getversion.c, idcache.c, isdir.c,
3756         makepath.c, mountlist.c, rename.c, savedir.c, stripslash.c,
3757         userspec.c, xgetcwd.c, xstrdup.c, yesno.c, [HAVE_CONFIG_H,
3758         CONFIG_BROKETS]: Include <config.h> or "config.h".
3760         * lib/Makefile.in, src/Makefile.in [.c.o]: Put -I.. before
3761         -I$(srcdir) so <config.h> will get the right file.
3763         * chgrp.c, chmod.c, chown.c, cp-aux.c, cp-hash.c, cp.c, dd.c,
3764         df.c, du.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c,
3765         mv.c, mvdir.c, rm.c, rmdir.c, touch.c, version.c [HAVE_CONFIG_H,
3766         CONFIG_BROKETS]: Include <config.h> or "config.h".
3768         * configure.in [AC_CONFIG_HEADER]: Use it.
3770         * configure.in (rename.o) [MVDIR definition]: Remove it.
3771         * lib/Makefile.in [DEFS]: Put it here instead.
3773         * config.h.in, acconfig.h: New files
3774         * Makefile [DISTFILES]: Add them.
3775         (config.h.in): Add a rule to warn if it may need to be rebuilt.
3777         * lib/Makefile [YACC]: Get definition from @YACC@.
3779         * system.h: Include <unistd.h>.  This is needed for the definition
3780         of _POSIX_VERSION.
3782 Thu Sep  9 08:52:10 1993  Jim Meyering  (meyering@comco.com)
3784         * src/*.c: Print version on standard output, not stderr.
3786 Fri Aug 27 23:53:50 1993  Jim Meyering  (meyering@comco.com)
3788         * cp.c (copy), ls.c (get_link_name): Don't use PATH_MAX as array
3789         length in declarations because on some systems it gets defined
3790         to the function pathconf.  Use dynamic allocation instead.
3792         * fsusage.c (adjust_blocks): Use `1' instead of `+1'.  Many
3793         compilers don't parse the latter.  From Kaveh R. Ghazi.
3795 Thu Aug 26 22:26:09 1993  Jim Meyering  (meyering@comco.com)
3797         * ls.c (print_long_format, print_file_name_and_frills): Cast inode
3798         number to unsigned long and print it with %lu to avoid warnings from
3799         gcc -Wformat because the size and type of ino_t are system dependent.
3801         * cp.c (do_copy): Plug a memory leak with --parents.
3803         * ln.c (main): Like mv and cp, convert `ln x y/' to ln x y/x
3804         when a is not a directory.
3805         [PATH_BASENAME_CONCAT]: New macro.
3806         (do_link): Use it here, too.
3808         * ls.c (sort_files): Add `default: abort();' clause to switch stmts.
3810         * cp.c (do_copy): Don't remove trailing slashes from source.
3812 Wed Aug 25 21:40:00 1993  Jim Meyering  (meyering@comco.com)
3814         * cp.c: Add --parents as synonym for --path.  Change --path to
3815         --parents in comments.  --path is deprecated.
3817         * rm.c (clear_directory): Fix incorrect test for determining when
3818         to reallocate buffer.  Thanks to Ric Anderson <ric@CS.Arizona.EDU>.
3820 Fri Aug 13 17:19:52 1993  Jim Meyering  (meyering@comco.com)
3822         * fsusage (adjust_blocks): Round away from zero -- this matters
3823         when computing the negative free-block count for disks that are
3824         more than 100% full.
3826         * mv.c (movefile): Use nested calls to stpcpy instead of sprintf.
3827         (is_real_dir): New function.
3828         (movefile): In addition to when dest is a directory, if dest has
3829         a trailing `/' and source is not a directory, presume the target
3830         is dest/`basename source`.  This converts `mv x y/' to `mv x y/x'
3831         when x is not a directory.  This change means that the command
3832         `mv any file/' will now fail rather than performing the move.
3834         * cp.c (do_copy): Similarly, convert `cp x y/' to cp x y/x when
3835         x is not a directory.
3837 Wed Aug  4 17:43:18 1993  Jim Meyering  (meyering@comco.com)
3839         * ls.c (get_link_name): Don't ever use the stat field st_size as a
3840         buffer size.  Too many systems don't set it properly for mount points.
3841         Instead, use a fixed-length buffer.  From Michael Joosten
3842         <joost@ori.CAdlab.DE>.
3843         * cp.c (copy): Ditto.
3845 Mon Jul 19 17:39:01 1993  Jim Meyering  (meyering@comco.com)
3847         * backupfile.c (concat): Temporary STR1_LENGTH should have type `int'
3848         instead of `char.'
3850 Fri Jul 16 22:00:16 1993  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
3852         * dd.c (print_stats): Change message from "truncated blocks"
3853         to "truncated records" for final POSIX.2 spec.
3855 Fri Jun 25 17:18:15 1993  Jim Meyering  (meyering@comco.com)
3857         * mkdir.c, rmdir.c: Change --path long option to --parents to avoid
3858         confusion with search-path semantics of --path as an option to other
3859         programs.  --path will still work, but is no longer documented.
3861 Tue Jun  8 00:46:26 1993  Jim Meyering  (meyering@comco.com)
3863         * dd.c (parse_integer): Also accept `c' multiplier for consistency
3864         with find's -size option.
3866 Thu May 27 00:03:51 1993  Jim Meyering  (meyering@comco.com)
3868         * Version 3.8.
3870         * configure.in (STAT_OSF1): Reference the statfs f_fsize member
3871         so that configure defines STAT_OSF1 only if there is such a member.
3872         Without such a reference, a Pyramid MIServer running OSx 5.1
3873         improperly defined STAT_OSF1 instead of the one it needed:
3874         STAT_STATFS2_BSIZE.
3876 Wed May 26 00:57:46 1993  Jim Meyering  (meyering@comco.com)
3878         * ls.h, ls-ls.c ls-dir.c, ls-vdir.c: New files that define or
3879         simply set the new global variable ls_mode.  ls_mode defines whether
3880         the executable built from ls.o should act like ls, dir, or vdir.
3881         * ls.c (decode_switches): Use the variable instead of #ifdefs.
3882         This is modelled after the approach used in GNU binutils 2.x for
3883         ar and ranlib.  Here we avoid two redundant compilations.
3885         * install.c (change_attributes, copy_file, install_file_in_file):
3886         Don't call chown if we can efficiently determine that doing so is
3887         unnecessary.  On some systems, calls to chown (even with your own
3888         uid and gid) fail unless made by root.  On such systems install
3889         got spurious failures.
3891 Sat May 22 02:13:12 1993  Jim Meyering  (meyering@comco.com)
3893         * Version 3.6.
3895 Fri May 21 18:42:27 1993  Jim Meyering  (meyering@comco.com)
3897         * rename.c (rename): Be careful not to unlink `from' if it happens
3898         to be equal to `to' or (on filesystems that silently truncate
3899         filenames after 14 characters) if `from' and `to' share the
3900         significant characters.  From Bruno Haible
3901         <haible@ma2s2.mathematik.uni-karlsruhe.de>.
3903         * mountlist.c, fsusage.c: Make these work under m88k DolphinOS.
3904         From Kjetil Wiekhorst J|rgensen <jorgens@pvv.unit.no>.
3906 Tue May 18 23:49:26 1993  Jim Meyering  (meyering@comco.com)
3908         * mkinstalldirs: New file.
3909         * Makefile.in (installdirs): Use it.
3911 Sat May 15 01:20:26 1993  Jim Meyering  (meyering@comco.com)
3913         * ln.c (do_link): Make `ln -s dir_pathname .' work when the
3914         pathname has a trailing slash.
3916 Fri May 14 23:45:52 1993  Jim Meyering  (meyering@comco.com)
3918         * all source: With --version, print version and exit immediately.
3920 Wed May 12 20:48:55 1993  Jim Meyering  (meyering@comco.com)
3922         * configure.in: Add check for the -ldgc library that is required
3923         for getmntent on m88k DGUX-5.4 systems.
3925         * Makefile.in (installdirs): New rules for creating installation
3926         directories. (install): Depend on it.
3928 Sat May  8 11:31:14 1993  Jim Meyering  (meyering@comco.com)
3930         * lib/Makefile.in (dist): Use `cp -p' instead of just `cp'
3931         if linking fails.
3933 Thu May  6 22:45:25 1993  Jim Meyering  (meyering@comco.com)
3935         * makepath.c: Use explicit dcl of errno only if !STDC_HEADERS.
3936         Some systems have <errno.h> but don't declare errno.
3937         From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
3939         * getdate.y: Test TIME_WITH_SYS_TIME, not TIME_AND_SYS_TIME.
3941 Wed May  5 00:21:12 1993  Jim Meyering  (meyering@comco.com)
3943         * configure.in: Add AC_TIME_WITH_SYS_TIME.
3944         * getdate.y: Use it (this is a version local to fileutils).
3946 Tue May  4 20:25:41 1993  Jim Meyering  (meyering@comco.com)
3948         * du.c (count_entry): Give an error and exit if chdir ("..") fails.
3949         From Bruce Evans <bde@runx.oz.AU>.
3951         * eaccess (eaccess_stat): Cast NGROUPS_MAX to appropriate types.
3952         From Bruce Evans <bde@runx.oz.AU>.
3954 Mon May  3 22:09:24 1993  Jim Meyering  (meyering@comco.com)
3956         * configure.in: Add AC_GETGROUPS_T.
3957         * eaccess.c: Don't define GETGROUPS_T.  Now configure does it.
3959 Sun May  2 09:18:53 1993  Jim Meyering  (meyering@comco.com)
3961         * configure.in: Check for libypsec.a on Dolphin M88K machines.
3962         This can result in significant speedup for programs that access
3963         YP information.  From Kjetil Wiekhorst J{\o}rgensen
3964         <jorgens@pvv.unit.no>.
3966 Fri Apr 30 02:21:48 1993  Jim Meyering  (meyering@comco.com)
3968         * ls.c (main): Make `-f' work like on standard Unix ls, instead
3969         of as a short equivalent of --full-time.
3970         * ls.1: Document it.
3972 Thu Apr 29 00:46:46 1993  Jim Meyering  (meyering@comco.com)
3974         * src/Makefile.in [dir.o, vdir.o]: Make ordering of CFLAGS etc
3975         in compilation rules consistent with that in .c.o rule.
3977         * Makefile.in (dist): Depend on Makefile so that changes to
3978         Makefile.in (like adding new files to DISTRIB) are reflected
3979         in the new distribution.
3981 Tue Apr 27 21:35:11 1993  Jim Meyering  (meyering@comco.com)
3983         * configure.in: Remove unnecessary AC_PROG_INSTALL.
3985 Fri Apr 23 23:39:16 1993  Jim Meyering  (meyering@comco.com)
3987         * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
3988         other options so users can use them to override DEFS.
3990         * lib/mktime.c: Use new version from glibc instead of one from
3991         libc-subst.  `touch' built with the latter didn't set proper
3992         time unless given a specific --date option.
3994 Thu Apr 22 00:22:25 1993  Jim Meyering  (meyering@comco.com)
3996         * makepath.c: Decouple inclusion of errno.h from definition of
3997         STDC_HEADERS; many systems have errno.h, yet shouldn't define
3998         STDC_HEADERS.
3999         * makepath.c (make_path): Add EPERM clause only if both AFS and
4000         EPERM are defined.
4001         * configure.in: Test for errno.h header file.
4003 Mon Apr 19 11:21:14 1993  Jim Meyering  (meyering@comco.com)
4005         * Version 3.5.
4007         * ls.c, touch.c: Don't include time.h explicitly -- it's included
4008         by system.h.  From Franc,ois Pinard.
4010         * posixtm.y: Use TM_IN_SYS_TIME.
4012         * backupfile.c [index, rindex]: Don't redefine them.
4014         * system.h [alloca]: Don't redefine it.
4016         * configure.in: Check for sys/time.h; getdate.y needs it for
4017         structs timeval and timezone on some systems.
4019 Sun Apr 18 22:40:19 1993  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
4021         * ls.c: Include fnmatch.h after system.h, so we get our
4022         definitions of FNM_*, not those from unistd.h.
4024         * mountlist.c [MOUNTED_GETMNTINFO]: Add #ifdef around MOUNT_PC.
4026         * configure.in: Fix test for 4.4BSD statfs to not grep for a
4027         macro in cpp output.
4029 Sun Apr 18 02:35:36 1993  Jim Meyering  (meyering@comco.com)
4031         * configure.in: Check for gettimeofday.
4032         Check for `struct tm'.
4033         Change MVDIR definition so it works with new AC_DEFINE.
4035         * system.h: Remove last vestiges of USG;  instead, use specific
4036         test for TM_IN_SYS_TIME to determine whether to include time.h
4037         or sys/time.h.
4039         * src/Makefile.in (install): Rewrite the test for whether to install
4040         mvdir so that it doesn't cause gratuitous failures with broken shells.
4041         Split long rule so the pieces fit in 80-column lines.
4043 Thu Apr 15 23:44:01 1993  Jim Meyering  (meyering@comco.com)
4045         * lib/Makefile.in (posixtm.c): Add dependency on getdate.c to enforce
4046         sequential invocations of YACC.
4047         * (posixtm.c, getdate.c): Remove use of `bison -o' and associated
4048         conditional rename commands -- not needed since the parser generators
4049         won't be run in parallel;  now bison (when used) is always invoked
4050         with -y.
4052 Tue Apr 13 09:18:18 1993  Jim Meyering  (meyering@comco.com)
4054         * configure.in: Find a parser generator.
4055         * Makefile.in [MDEFINES]: Add YACC to the list of variables passed to
4056         sub-makes.
4057         * lib/Makefile.in (posixtm.c, getdate.c): Try first to build with
4058         `bison -o' -- for parallel makes.  If that fails, use $(YACC).
4060         * posixtm.y [HAVE_MEMCPY && !HAVE_BCOPY]: Define bcopy in terms
4061         of memcpy for old versions of bison that generate parsers that
4062         use bcopy.
4064         * configure.in: Add tests for memcpy and bcopy.
4066 Mon Apr 12 23:02:14 1993  Jim Meyering  (meyering@comco.com)
4068         * configure.in (mounted, space): Add filesystem checks for DEC Alpha
4069         running OSF/1 to complement new code in mountlist.c and fsusage.c.
4071         * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETFSSTAT]: Add code
4072         to do it the OSF/1 way on a DEC alpha.
4073         From Brian Fox (bfox@tinker.crseo.ucsb.edu).
4075         * lib/fsusage.c (get_fs_usage) [STATFS_OSF1]: Add code to call OSF/1's
4076         variant of statfs.  From Brian Fox (bfox@tinker.crseo.ucsb.edu).
4078 Sun Apr 11 20:29:31 1993  Jim Meyering  (meyering@comco.com)
4080         * df.c (main, show_dev): Don't list dummy (automounter) filesystems
4081         unless they're explicitly listed on the command line or if the -a
4082         option is given.
4084 Fri Apr  9 11:40:48 1993  Jim Meyering  (meyering@comco.com)
4086         * src/Makefile.in [.c.o]: Put CFLAGS after include directives.
4088 Wed Apr  7 23:54:48 1993  Jim Meyering  (meyering@comco.com)
4090         * eaccess.c: Undefine NGROUPS_MAX before redefining it.
4091         From ghazi@caip.rutgers.edu (Kaveh R. Ghazi).
4093 Mon Apr  5 20:14:17 1993  Jim Meyering  (meyering@comco.com)
4095         * chgrp.c, chmod.c, chown.c, install.c, ls.c, mkfifo.c, mknod.c,
4096         touch.c: Add `case 0: break;' for long-only options help and version.
4098 Sun Apr  4 09:38:00 1993  Jim Meyering  (meyering@comco.com)
4100         * src/*.c (usage): Mention --help and --version.
4101         (main): Handle flag_help and flag_version before checking for
4102         invocation errors.
4104         * cp.c (copy): Declare to be static.
4106         * cp.c (copy, make_path, re_protect): Explicitly cast alloca return
4107         value to (char *).
4108         * ln.c (do_link): Ditto
4109         * mv.c (do_move): Ditto
4110         * makepath.c (make_path): Ditto
4112         * lib/eaccess.c (eaccess_stat): Cast to unsigned the value to
4113         be right-shifted to avoid ANSI vs K&R semantic ambiguity.
4115         * src/Makefile.in (incl): New variable.
4117         * chown.c (main): Explicitly cast -1 to [ug]id_t to avoid compiler
4118         warnings.
4120         * cp.h: Remove unneeded extern dcl of exit_status.
4122         * basename.c [rindex]: Don't redefine it.
4123         * system.h [rindex, incl, bcopy, bzero]: Ditto.
4124         * userspec.c [index]: Ditto.
4126         * Makefile.in [CFLAGS, LDFLAGS]: Don't hard-code these; get their
4127         definitions from configure.
4128         * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.
4130 Sat Apr  3 18:17:23 1993  Jim Meyering  (meyering@comco.com)
4132         * Makefile.in [Makefile]: Add dependencies and a rule to remake it.
4133         [targets that cd then run make in subdirectories]: Don't depend
4134         on `cd ..';  use a subshell instead.
4135         [info, install-info, dvi, check, installcheck]: New targets but no
4136         rules; comply with standards.
4138         * src/Makefile.in [.c.o, dir.o, vdir.o]: Put CFLAGS after DEFS and
4139         CPPFLAGS per standards.texi.
4140         Use automatically generated dependencies.
4142         * mvdir.c (main): Remove dcl of unused variable.
4144 Thu Apr  1 18:05:48 1993  Jim Meyering  (meyering@comco.com)
4146         * install.c, chgrp.c, dd.c [isascii]: Undefine before redefining.
4148         * ls.c: Move some dcls so they appear before first function.
4150         * all programs: Add --help and --version options.
4151         * version.c: Remove `Version: ' and newlines from version string.
4153         * dd.c: Convert usage to take no arguments.
4154         * lib/Makefile.in [DISTFILES]: Add version.h.
4156 Wed Mar 31 22:03:28 1993  Jim Meyering  (meyering@comco.com)
4158         * configure.in [MVDIR]: Don't quote right hand side.
4159         * backupfile.c, chgrp.c, install.c: Define isascii macro to be 1
4160         also if STDC_HEADERS.
4162 Tue Mar 30 17:42:11 1993  david d `zoo' zuhn  (zoo at cirdan.cygnus.com)
4164         * ls.c: Add -G,--no-group option to inhibit display of group
4165         information.
4166         * ls.1: Document it.
4168 Mon Mar 29 22:22:40 1993  Jim Meyering  (meyering@comco.com)
4170         * system.h [ST_NBLOCKS]:  Check also for __hpux.  From Henrik B}kman
4171         <Henrik.Bakman@csd.uu.se>.
4173 Sun Mar 28 21:22:30 1993  Jim Meyering  (meyering@comco.com)
4175         * Makefile.in (dist): Use cp when hard link fails.
4176         Use tar-1.11.2's -z option instead of -Z.
4178         * makepath.c [index]: Don't redefine.
4180 Fri Mar 26 00:32:39 1993  Jim Meyering  (meyering@comco.com)
4182         * df.c (add_excluded_fs_type, excluded_fs_type): New functions adding
4183         support for --exclude-type option.  Derived from Kaveh R. Ghazi
4184         <ghazi@caip.rutgers.edu>.
4186         * ls.c (decode_switches, print_long_format): New option: --full-time.
4187         From K. Richard Pixley (rich@rtl.cygnus.com)
4189 Thu Mar 25 21:02:36 1993  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
4191         * dirname.c [rindex]: Don't redefine.
4193 Tue Mar 23 23:13:33 1993  Jim Meyering  (meyering@comco.com)
4195         * ls.c (gobble_file): Don't stat symlinks unless we need to.
4196         From Mike Rendell <michael@mercury.cs.mun.ca>.
4198         * dd.c (copy, copy_with_block, copy_with_block): Decrement
4199         pending_spaces only if it's > 0. The following command didn't
4200         terminate:
4201         perl -e 'print "a  a\n";'| dd of=/dev/null ibs=1 cbs=3 conv=unblock
4202         With suggestions from Chris Weber <weber@bucknell.edu>,
4203         Marlys.A.Nelson@uwrf.edu, and Albert-Lunde@nwu.edu.
4205 Fri Mar 05 00:02:53 1993  Jim Meyering  (meyering@comco.com)
4207         * chmod.c: Add long-named options.
4209 Mon Feb 15 23:34:55 1993  Jim Meyering  (meyering@comco.com)
4211         * rm.c (remove_file): Don't ask about overriding a mode if the
4212         target is a symbolic link -- some systems (like SGI's Irix 4.0)
4213         zero the permissions fields of symbolic links.
4214         From Arne Henrik Juul (arnej@imf.unit.no).
4216 Fri Dec 11 16:46:50 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
4218         * rm.c (main): If -f is given, don't complain if no file args
4219         are given.
4221 Tue Dec  8 21:09:16 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
4223         * posixtm.y: Include alloca.h if HAVE_ALLOCA_H, not if sparc.
4225 Mon Dec  7 20:09:59 1992  Jim Meyering  (meyering@idefix.comco.com)
4227         * install.c (isnumber), chgrp.c (change_file_group): Define ISDIGIT
4228         and use it instead of isdigit.
4230         * dd.c: Define ISLOWER and ISUPPER independent of STDC_HEADERS.
4231         Define ISDIGIT and use it instead of isdigit.
4233 Wed Dec  2 12:28:10 1992  Jim Meyering  (meyering@idefix.comco.com)
4235         * all files using getopt.h: Convert static declarations of
4236         struct option to use new macros from getopt.h: no_argument,
4237         required_argument, and optional_argument.
4239 Tue Nov 24 07:54:45 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
4241         * system.h: Use HAVE_FCNTL_H instead of USG.
4243         * xgetcwd.c: Use HAVE_GETCWD instead of USG.
4245         * backupfile.c, basename.c, dirname.c, idcache.c, makepath.c,
4246         mountlist.c, stripslash.c, userspec.c, xstrdup.c, system.h:
4247         Use HAVE_STRING_H instead of USG.
4249         * system.h: Use SYSDIR and NDIR instead of USG.
4250         Define direct as dirent, not vice-versa.
4251         * ls.c, rm.c, backupfile.c, savedir.c: Use `struct dirent',
4252         not `struct direct'.
4254 Thu Nov 12 23:10:56 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
4256         * system.h: If dirent is #defined, don't define direct as dirent;
4257         for Sinix.  Derived from Heinfried Korn (korn@med-in.uni-sb.de).
4259 Mon Nov  9 14:13:57 1992  Jim Meyering  (meyering@idefix.comco.com)
4261         * fsusage.c (adjust_blocks): Reverse Oct 31 change --
4262         the function is more readable than the macro.
4264         * All files in src: Make all functions and extern variables static.
4265         Make all longopts arrays const as well as static.
4266         Make a couple statically initialized aggregates `const.'
4268 Sat Oct 31 16:32:17 1992  Jim Meyering  (meyering@idefix.comco.com)
4270         * fsusage.c (adjust_blocks): Convert to a macro.  The static
4271         function wasn't always used.
4273         * makepath.c, cp.c, ls.c: Add parentheses to expressions
4274         like (c = *p++) as per suggestion from gcc -Wall.
4276         * dd.c (swab_buffer): Fix typo that incremented pointer instead
4277         of counter.  Add braces around static struct initializers.
4279 Fri Oct 30 11:40:58 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
4281         * ln.c, cp.c (main): Make -s on systems without symlinks an
4282         error, not a warning.
4284 Thu Oct 29 14:57:21 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
4286         * Version 3.4.
4288         * cp.c (copy, re_protect), mv.c (copy_reg): Do utime and chown
4289         before chmod, so set[ug]id bits don't get nuked.
4290         Don't use fchmod.
4292 Wed Oct 28 16:13:18 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
4294         * cp.c, mv.c, ln.c: Rename some variables to use consistent
4295         terminology: source and destination.
4297         * ln.c, mkdir.c, mkfifo.c, mknod.c: Don't strip trailing slashes.
4298         * install.c: Don't strip slashes from dest. dirs.
4300 Mon Aug 24 12:49:14 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4302         * xgetcwd.c: Make path_max unsigned, not long.  From Bruce Evans.
4304 Sun Aug 23 03:06:04 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4306         * idcache.c: Use a union for uid_t and gid_t.  From
4307         bde@runx.oz.au (Bruce Evans).
4309         * eaccess.c: Use NGROUPS_MAX if it's defined.  386BSD is like sun.
4311 Sat Aug 22 02:36:49 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
4313         * makepath.c: Use uid_t and gid_t.
4315         * system.h, makepath.c: Use HAVE_ALLOCA_H, not sparc.
4317         * cp.c (make_path, re_protect): Allocate room for terminating NULs.
4319 Fri Aug 21 21:12:18 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4321         * fsusage.c [STAT_STATVFS]: Use f_bsize if f_frsize is 0.
4322         From Paul M Reilly <pmr@rock.concert.net>.
4324         * xgetcwd.c [!errno]: Declare errno.  From Karl Berry.
4326         * chown.c (main, change_file_owner, change_dir_owner): Use
4327         uid_t and gid_t.  From Rob McMahon <cudcv@csv.warwick.ac.uk>
4328         and glaze@cs.mu.oz.au (Glaze).
4330 Thu Jul 23 14:29:17 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4332         * Version 3.3.
4334 Sat Jul 18 20:12:56 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4336         * idcache.c: Use uid_t and gid_t.
4337         (getuidbyname, getgidbyname): New functions, for cpio.
4339         * userspec.c: New file, from code in chown.c.
4340         * chown.c: Use it.
4342 Fri Jul 17 00:43:38 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4344         * system.h: Protect from getopt prototype in stdlib.h.
4346         * ls.c [_AIX]: Include sys/ioctl.h.
4347         * fsusage.c: Include sys/vfs.h if AIX PS/2, but not if RS6000.
4348         From tranle@intellicorp.com (Minh Tran-Le).
4350         * mvdir.c: Declare getcwd.  From Francois Pinard.
4352         * chown.c, chgrp.c, install.c [_POSIX_SOURCE]: Define endpwent
4353         and endgrent as empty.
4355         * makepath.c (make_path): Add cast to alloca call.
4356         From Jim Meyering.
4358         * cp.c (copy, re_protect), mv.c (copy_reg): Notify root of
4359         EPERM errors from chown.
4360         * makepath.c, install.c [AFS]: Ignore EPERM from chown.
4362         * system.h (ST_NBLOCKS) [_AIX && _I386]: st_blocks is in 4K units.
4363         * fsusage.c (statfs) [_AIX && _I386]: Supply this function.
4364         From tranle@intellicorp.com (Minh Tran-Le).
4366 Thu Jul 16 23:08:39 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4368         * df.c (print_header, show_dev): In inode format, print the
4369         total number of inodes as well.
4371         * fsusage.[ch], df.c (show_dev): Count internally using
4372         512-byte blocks, not 1024-byte, to avoid rounding errors.
4374 Mon Jul  6 20:03:54 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4376         * rename.c: Use S_ISDIR instead of S_IFDIR.
4378 Fri Jul  3 14:36:34 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4380         * fileblocks.c, system.h, cp.c, dd.c, mv.c, touch.c: Change
4381         FOO_MISSING to HAVE_FOO.
4383 Wed Jun  3 19:28:04 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4385         * xgetcwd.c (xgetcwd): Accept errno==EINVAL as nonfatal.
4387 Wed May 20 00:05:52 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
4389         * system.h: If we include a header file specifically to get
4390         major et al., assume we have them.
4392 Mon May 11 20:04:10 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
4394         * chgrp.c, chown.c: --show-changes -> --changes.
4396 Sat May  9 18:39:38 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4398         * system.h: Define DEV_BSIZE if not defined.
4400 Thu Apr 30 13:55:37 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
4402         * du.c (count_entry): Remove the trailing "/" before printing.
4404 Wed Apr 29 11:34:38 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
4406         * rename.c (rename): If removing `from' fails, remove `to' to
4407         clean up.  From Matthew Farwell <dylan@ibmpcug.co.uk>.
4409 Thu Apr 23 21:14:16 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
4411         * ls.c (gobble_file): Only read the link contents if -l or the
4412         file was named on the command line.
4414 Wed Apr 22 02:16:38 1992  David J. MacKenzie  (djm@churchy.gnu.ai.mit.edu)
4416         * fsusage.c (get_fs_usage) [STAT_STATFS4 and _SEQUENT_]: Has f_bavail.
4417         From Donn Cave <donn@carson.u.washington.edu>.
4419         * getversion.c (get_version): If given invalid arg, exit.
4421         * cp.c (copy): Fix mode with chmod if copying as a regular file.
4423         * system.h, dd.c: SIGTYPE -> RETSIGTYPE.
4425 Sat Apr 18 00:18:41 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4427         * fsusage.[ch] (get_fs_usage): Take another arg, the device name.
4428         * fsusage.c (get_fs_usage) [STAT_READ]: Fix number of inodes
4429         calculation.  Use the device name.  From Brian Matthews.
4430         * df.c (show_dev): Pass the device name.
4432 Fri Apr 17 11:25:28 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4434         * fsusage.c: Special-case AIX.
4436         * mountlist.c [MOUNTED_VMOUNT]: New code for AIX, from
4437         Garrett A. Wollman (wollman@uvm.edu).
4439         * ls.c (gobble_file): Use stat, not lstat, on symlinked-to
4440         file, for Unix compat.  From ian@airs.com (Ian Lance Taylor).
4442 Mon Apr  6 14:16:06 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4444         * xgetcwd.c: Include stdio.h to get NULL.
4446 Thu Apr  2 14:41:18 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4448         * df.c: Call sync only once, instead of once per filesystem.
4450 Wed Apr  1 16:00:08 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4452         * Version 3.2.
4454 Tue Mar 31 13:39:06 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4456         * df.c (main): stat all arg pathnames before getting
4457         list of mounted filesystems.
4458         (show_entry, show_point): Take a struct stat * as another arg,
4459         to avoid repeatedly statting files.
4461 Mon Mar 30 12:21:28 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4463         * install.c (main): Allow symbolic modes for -m.
4464         (atoo): Function removed.
4466         * mkdir.c (main): Include invalid -m arg in error message.
4468         * fsusage.c (get_fs_usage) [STAT_STATFS4]: Go back to using
4469         512 instead of f_bsize.  Empirically, it gives the right answer.
4471         * mvdir.c (main): Don't deref NULL pointer on last iteration
4472         of loop.
4474         * fsusage.c (adjust_blocks): New function.
4475         (get_fs_usage): Call it.
4477         * mvdir.c (main): Don't possibly try to use ".." entry of new dir
4478         before creating it.
4480         * fsusage.c (get_fs_usage) [STAT_STATFS4]: Use f_bsize member
4481         of struct statfs.
4483 Sat Mar 28 00:36:57 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4485         * dd.c (copy_simple, copy_with_block, copy_with_unblock,
4486         translate_buffer, swab_buffer): New functions, mostly made
4487         from code taken from copy.  Incorporate some optimizations due
4488         to Stuart Kemp: For each type of conversion, only check
4489         whether to do it once per buffer read, instead of once per character.
4490         (copy): If conv=block and the input didn't end with a newline,
4491         pad the final block with spaces.
4493 Wed Mar 25 14:35:17 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4495         * system.h: Don't use BSIZE for calculating ST_BLKSIZE if it
4496         isn't defined.
4498         * mountlist.c [MOUNTED_FREAD], fsusage.c [STAT_READ]: New code
4499         for SVR2, from archive@ideahb.sublink.org (Lele Gaifax).
4501 Tue Mar 24 14:53:19 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4503         * mvdir.c: Use getcwd, not getwd.
4505         * system.h, xgetcwd.c: Redo how PATH_MAX is figured out, to
4506         work on SVR3.
4508         * fsusage.c, mountlist.c: New files split from fsinfo.c.
4509         Revise conditionals to make the two files independent of each other.
4510         * fsusage.h, mountlist.h: New files split from fsinfo.h.
4511         * df.c: Use them.
4513 Mon Mar 23 13:01:07 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4515         * fsinfo.c (read_filesystem_list): Take another arg, all_fs.
4516         [FS_MNTENT]: Ignore type "auto" (from amd) as well as "ignore"
4517         (from automounter), if not all_fs.
4518         * df.c (main): Pass the new arg.
4520         * fsinfo.h: Add function decls.
4522         * chown.c, chgrp.c, chmod.c: Remove -L option.  Didn't handle
4523         changing symlinks correctly and wasn't very useful.
4525 Sat Mar 14 17:38:38 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4527         * dirname.c (dirname): Don't use strdup.
4529 Fri Mar 13 14:56:15 1992  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
4531         * rm.c (remove_file, remove_dir, clear_directory): If -f was
4532         given, don't complain about ENOENT when removing.
4534 Mon Mar  9 00:09:48 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4536         * install.c (main): Allow making multiple dirs with -d.
4537         (usage): Document it.
4538         * makepath.c (make_path): Clear umask while working and
4539         restore it when done.  chmod dirs that should have
4540         set[ug]id or sticky bits set, if we're chowning them.
4541         Make chown failure nonfatal.  Do chmod after chown, not before.
4543         * du.c (count_entry): Set exit_status on nonfatal error.
4544         (main): Use it.
4546 Sun Mar  8 22:07:50 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
4548         * du.c (du_files): New function, from code in main.
4549         Use xgetcwd instead of getcwd or getwd.
4550         * system.h: Don't declare getcwd or getwd.
4552         * xgetcwd.c: New file.
4554         * ls.c (main): Exit with `exit_status' instead of 0.
4555         (print_dir, gobble_file, get_link_name): Set exit_status on error.
4557         * ls.c (print_long_format): Allow a slop factor for deciding
4558         what is in the future.
4560         * All programs: Change usage messages and documentation for
4561         long options to use -- instead of +.
4563         * df.c (main, usage): Add -v option for SysV compat.
4565 Tue Feb  4 12:45:09 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4567         * fileblocks.c [!NINDIR]: Try to fake indirect block info for
4568         systems that don't define it.
4570 Thu Jan 16 01:04:16 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4572         * df.c (print_header): Capitalize some header words for
4573         POSIX.2a draft 8.
4575 Sat Jan  4 01:19:25 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4577         * posixtm.y: Capitalize token name.
4579 Tue Dec 24 01:05:44 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4581         * system.h, makepath.c, idcache.c, eaccess.c, backupfile.c,
4582         install.c, dd.c, chown.c, chgrp.c: Change POSIX ifdefs to
4583         HAVE_UNISTD_H.
4585 Wed Dec 18 16:42:00 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4587         * system.h: To get major, minor and makedev, don't check for
4588         _POSIX_SOURCE and USG; use MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS.
4590 Mon Dec 16 18:16:42 1991  David J. MacKenzie  (djm at wombat.gnu.ai.mit.edu)
4592         * dd.c (skip): Fix typos in arg name.
4593         (output_char): Fix off by one error in check.
4595 Sun Dec  8 19:55:06 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4597         * system.h: Only define major et al. if not already defined.
4599 Fri Dec  6 18:26:53 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4601         * dd.c (main) [POSIX]: Use sigaction instead of signal, which
4602         POSIX doesn't have.
4604         * df.c, du.c, ls.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.
4606 Wed Dec  4 14:30:16 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4608         * dd.c: Cleanups, mostly from Stuart Kemp:
4609         (output_char): New macro, from code in copy.
4610         (write_output): New function, used by output_char, from code
4611         in copy.
4612         (skip): New function, from code in copy.
4613         (copy): Use output_char and skip.
4614         Simplify test for quitting before main loop.
4615         Zero buffer using bzero for speed.
4617 Sun Nov 17 19:39:04 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4619         * fsinfo.c (get_fs_usage) [FS_MNTENT]: Take blocksize into account.
4620         (read_filesystem_list) [FS_MNTENT]: Ignore filesystems of type
4621         "ignore" (automounter dummy entries).
4623         * install.c (change_attributes): Do chmod even if chown fails.
4625 Thu Oct 24 23:50:46 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4627         * chown.c (change_file_owner), chgrp.c (change_file_group):
4628         don't skip symlinks, since the chown system call works on them.
4630 Fri 18 Oct 1991 23:29:24  Jim Meyering  (meyering at wombat)
4632         * configure: fixed test to detect sequent's strange interpretation
4633         of utime(file, NULL).
4635 Fri Oct 18 00:30:42 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4637         * eaccess.c: GID_T -> GETGROUPS_T, for clarity.
4639 Sat Oct 12 12:25:55 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)
4641         * configure: Define uid_t and gid_t as int if they're not
4642         defined in sys/types.h.  That's probably right for old Unixes
4643         and avoids trying to find the C preprocessor.
4645         * df.c: Don't declare sync, to avoid conflict with Minix (and
4646         maybe others) unistd.h.
4647         (show_point): Cast -1 to dev_t before comparing, in case dev_t
4648         is unsigned.  From Rainer Orth.
4650         * chown.c [!POSIX]: Declare getgrgid.
4652 Fri Sep 13 14:55:41 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)
4654         * eaccess.c [POSIX]: Always use sysconf to get NGROUPS_MAX.
4656 Thu Sep  5 23:40:39 1991  David J. MacKenzie  (djm at apple-gunkies)
4658         * system.h: Instead of defining getwd in terms of getcwd with
4659         PATH_MAX as an arg (which might be -1 on POSIX), define getcwd
4660         in terms of getwd.
4661         * du.c (main): Call getcwd with path_max as an arg.
4663         * install.c (change_attributes): Do chown before chmod, so
4664         chown doesn't remove set[ug]id bits.
4666 Wed Aug 28 20:53:50 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4668         * Version 3.1.
4670 Mon Aug 26 15:44:16 1991  David J. MacKenzie  (djm at pogo.gnu.ai.mit.edu)
4672         * du.c (main): If pathconf fails, use 1024 for PATH_MAX.  This
4673         happens if "/" is NFS-mounted.
4675 Sun Aug 25 00:56:11 1991  David J. MacKenzie  (djm at apple-gunkies)
4677         * df.c, fsinfo.c, fsinfo.h: New program.
4678         * configure: Check for various ways of getting info on mounted
4679         filesystems.
4681 Thu Aug 22 10:53:23 1991  David J. MacKenzie  (djm at apple-gunkies)
4683         * src/Makefile.in: Workaround #10006 for C compilers that are
4684         too dumb to allow -c and -o together.  Copy the source files.
4685         * system.h: Moved from src to lib to avoid having to add yet
4686         more -I options to CFLAGS.
4688         * du.c, ls.c: If POSIX_ME_HARDER is set in environment, use
4689         512-byte blocks by default.
4691 Wed Aug 21 13:03:14 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4693         * Version 3.0.
4695         * du.c, ls.c: Make 1K blocks the default size, and -k a no-op.
4696         Down with dumb standards!
4698         * system.h, backupfile.c, savedir.c [VOID_CLOSEDIR]: Fake a
4699         return value for closedir, which returns void on some systems,
4700         like Sequents.
4701         * configure: Check sys/dir.h for 'void closedir'.
4703 Tue Aug 20 22:22:47 1991  Jim Meyering  (meyering at nutrimat)
4705         * mvdir.c (main):  Clean up loop to stat component
4706         directories -- as in makepath and pathchk.
4708 Tue Aug 20 22:10:47 1991  Jim Meyering  (meyering at nutrimat)
4710         * dirname.c (dirname):  Allocate exact amount of space
4711         needed for result.
4713 Tue Aug 20 02:13:40 1991  David J. MacKenzie  (djm at apple-gunkies)
4715         * savedir.c (savedir): Try to open directory before allocating
4716         buffer.  From Jim Meyering.
4718 Mon Aug 19 01:14:13 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4720         * Many files: indent '#pragma alloca' so non-ANSI compilers
4721         don't choke on it.
4723         * backupfile.c (max_backup_version): Check closedir return
4724         value (though it might not do any good).
4726 Tue Aug  6 20:50:56 1991  David J. MacKenzie  (djm at wheat-chex)
4728         * configure, Makefile.in's: Support +srcdir option, using VPATH.
4729         Don't check for bison, just try it and if it fails use yacc.
4730         Create config.status.  Fix up clean targets.
4732         * posixtm.y (posixtm): New function.
4734         Most of the following is from Paul Eggert:
4735         * savedir.c (savedir), ls.c (print_dir), rm.c
4736         (clear_directory): Check closedir return for errors.
4737         * dd.c (main): Check for stdin or stdout being closed.
4738         * dd.c (quit), install.c (copy_file): Check for close errors.
4739         * mv.c (copy): Was missing a close.
4741 Sat Aug  3 02:05:51 1991  David J. MacKenzie  (djm at apple-gunkies)
4743         * ln.c: Declare link() unconditionally (SCO UNIX needs it).
4745 Tue Jul 30 00:23:19 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4747         * configure: NEED_TZSET has become FTIME_MISSING.
4749         * configure: Define uid_t and gid_t if sys/types.h doesn't.
4751 Sat Jul 27 00:55:16 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4753         * configure: Only compile fileblocks.c if st_blocks is missing.
4755         * cp.c (copy): Make directories with initial mode of source
4756         permissions minus umask, plus 0700.  For POSIX and John Gilmore.
4758         * system.h: Include errno.h and, if STDC_HEADERS, stdlib.h.
4759         * All programs: Remove includes of those files.
4761         * ftruncate.c: New file.
4762         * configure: Use it if needed.
4764 Wed Jul 24 02:09:45 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4766         * ls.c (get_name_link), cp.c (copy) [_AIX]: Allocate extra
4767         space for the buffer, since st_size is wrong.
4769         * system.h: Don't declare alloca for AIX.
4770         * makepath.c, posixtm.y, cp.c, du.c, ln.c, ls.c, mv.c:
4771         Declare alloca first (AIX needs it).
4773         * cp.c, dd.c, touch.c: Use SEEK_ instead of L_.
4774         * system.h: Define SEEK_ if not defined.
4776 Tue Jul 23 15:02:20 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4778         * eaccess.c: GID_T is int if ultrix as well as if sun.
4780 Mon Jul 22 11:39:31 1991  David J. MacKenzie  (djm at bleen)
4782         * install.c: Use uid_t and gid_t.
4784         * eaccess.c: Support POSIX method of getting multiple groups.
4786 Sat Jul 20 14:24:40 1991  David J. MacKenzie  (djm at bleen)
4788         * Move cat cmp cut expand head paste split tac tail unexpand
4789         to textutils.
4791         * system.h [MKFIFO_MISSING]: Define mkfifo macro.
4792         * cp.c, mkfifo.c: Don't define it.
4794         * mknod.c, gmknod.1: New files.
4796 Fri Jul 19 13:43:01 1991  David J. MacKenzie  (djm at apple-gunkies)
4798         * version.c: New file.
4799         * All C programs: Link with it, to get version number in the
4800         binary where at least `strings -' and GNU grep can find it.
4802 Mon Jul 15 13:46:53 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4804         * configure: Also look in sys/signal.h for signal decl.
4806 Sun Jul 14 22:43:57 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4808         * Rename touchtm.y back to posixtm.y, as the date command will
4809         use it too.
4811 Mon Jul  8 22:56:36 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
4813         * Replace lib/Makefile with lib/Makefile.in.
4814         * configure: For some library functions that might be missing,
4815         conditionally add the .o files to lib/Makefile instead of
4816         defining func_MISSING.
4817         * lib/mkdir.c: Renamed from lib/mkrmdir.c.
4819 Sat Jul  6 02:19:09 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4821         * xstrdup.c [STDC_HEADERS]: Include string.h.
4823         * stripslash.h: Include string header file.
4825         * configure: Add to DEFS if Minix.
4827         * system.h [_POSIX_SOURCE]: Make ST_BLKSIZE 1024 instead of
4828         512, for better performance.
4830         * system.h, configure: If sys/mkdev.h exists, use it instead
4831         of sys/sysmacros.h.
4833         * configure: echo messages to stdout, not stderr.
4834         Use test programs to see if alloca needs -lPW and if chars are
4835         unsigned.
4837 Tue Jul  2 03:16:32 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4839         * chown.c, chgrp.c [!POSIX]: Declare pwd.h and grp.h functions.
4841 Sat Jun 29 16:46:12 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4843         * cp.h: Don't declare `open', to avoid conflict with varargs
4844         prototypes.
4846         * chown.c, chgrp.c: Include sys/types.h before, not after,
4847         pwd.h and grp.h, to get uid_t and gid_t if necessary.
4849 Fri Jun 28 01:12:45 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4851         * ls.c: Use time_t instead of long, where appropriate.
4853 Thu Jun 27 16:31:45 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4855         * touchtm.y: Renamed from posixtime.y for SysV systems with Bison.
4857         * configure: No longer need to pass bison the -y option.
4858         Now lib/Makefile should allow a parallel make with bison.
4860         * cp.c (copy_reg), cat.c (main),
4861         touch.c (touch, utime_now), mv.c (copy): Check close return
4862         value for delayed error report due to NFS.
4864 Thu Jun 20 01:33:06 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4866         * configure: Include $DEFS when compiling test programs.
4868         * configure: Use test programs instead of grep to check for
4869         USG, POSIX, and ANSI C headers, in case symbols are defined in
4870         header files included by the standard ones.  Check for BSD
4871         memory functions (bcopy et al.) as well as string functions.
4872         Add notice to top of generated Makefile saying that it's
4873         automatically generated.
4875 Thu Jun 13 00:50:18 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4877         * Version 2.1.
4879         * configure: If rename is missing, define MVDIR.
4880         Use , instead of / as sed substitution separator so variables'
4881         values can contain slashes.
4883         * du.c (main): Use alloca to allocate `wd' instead of making
4884         it an auto array, since PATH_MAX might be a call to pathconf.
4886 Wed Jun 12 19:56:22 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4888         * cp-aux.c (usage), install.c (usage), ln.c (usage), mv.c
4889         (usage): Combine the option lists for the multiple usage forms.
4891 Tue Jun 11 00:12:15 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4893         * idcache.c: pwd.h and grp.h might need sys/types.h.
4895         * configure: Create Makefile from Makefile.in instead of
4896         makefile from makefile.skel, to more closely follow the new
4897         GNU coding standards.
4899         * ls.c (file_interesting): Use POSIX.2 fnmatch instead of glob_match.
4901         * configure: If $RANDOM is implemented (ksh, bash or zsh), use
4902         the `type' builtin to determine if gcc, bison, ranlib are
4903         available.  ksh writes "fubar: command not found" to stderr,
4904         foiling the test -n "`command 2>&1`" method.
4905         Remove makefile on signal.
4907         * system.h: Include sys/param.h if not _POSIX_SOURCE instead
4908         of if not POSIX, to get DEV_BSIZE.
4910         * makepath.c, posixtime.y, system.h: Add _AIX case to alloca decl.
4912 Sun Jun  9 01:26:27 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4914         * Version 2.0.
4916         * basename.c, dirname.c: Use str[r]chr and string.h if
4917         STDC_HEADERS as well as if USG.
4919         * touch.c (utime_now): Created from code in touch ().
4921 Sat Jun  8 11:02:32 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4923         * backupfile.c: Use POSIX instead of _POSIX_SOURCE to
4924         determine whether to check whether readdir returned a valid
4925         entry.
4927 Fri Jun  7 21:44:51 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4929         * fileblocks.c (st_blocks), system.h (ST_NBLOCKS): Always
4930         return number of 512 byte blocks, not DEV_BSIZE blocks.
4931         (convert_blocks): Always expect 512-byte blocks.
4933 Thu Jun  6 12:54:26 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4935         * system.h [POSIX]: If PATH_MAX not defined, use pathconf.
4936         Remove NAME_MAX stuff; not used.
4938         * system.h: Make #include <strings.h> depend on not (USG or
4939         STDC_HEADERS) instead of not (USG or POSIX).
4941         * configure: New shell script to aid compilation.
4943 Mon Jun  3 16:42:41 1991  David J. MacKenzie  (djm at wheat-chex)
4945         * cp.h: Remove some decls of functions returning int that
4946         conflict with prototypes on HPUX.
4948         * cp.c (make_path, re_protect): New functions from Jim
4949         Meyering.  Changes to other functions as well, to add +path,
4950         +link, +symbolic-link options.
4952 Sun Jun  2 15:45:24 1991  David J. MacKenzie  (djm at wheat-chex)
4954         * most files: use GPL version 2.
4956 Sat Jun  1 20:17:35 1991  David J. MacKenzie  (djm at wheat-chex)
4958         * rm.c, backupfile.c: If _POSIX_SOURCE, don't refer to d_ino.
4960 Sun May 19 18:42:09 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)
4962         * touch.c: Renamed getdate to get_date to avoid SVR4 conflict.
4964 Thu May 16 23:12:01 1991  David J. MacKenzie  (djm at albert.gnu.ai.mit.edu)
4966         * cp.c, mv.c, ln.c: Use alloca and strcpy directly instead of
4967         in a macro for generating backup filename.  The latter
4968         sometimes coredumps for some reason.
4970 Sat Apr 20 00:03:09 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
4972         * dd.c: Add conv=notrunc and truncate output file by default,
4973         for POSIX.
4975         * rm.c (rm): Refuse to remove path/. and path/.., as well as `.'
4976         and `..', for POSIX.
4978         * chown.c: Allow `:' as well as `.' to separate group from
4979         user, for POSIX.2 draft 11.
4981         * Many programs: Don't bother to get the long-option index
4982         value from getopt_long, since we ignore it.
4984         * Many programs: Separate long-option option names from their
4985         args with `=' instead of ` ' in usage messages.
4987         * touch.c (touch): Don't refuse to touch non-regular files.
4989 Wed Apr 10 12:19:30 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)
4991         * cp.c, cp-aux.c: Add -a +archive option, an easier to
4992         remember synonym for -dpR.
4994 Fri Mar 15 16:16:54 1991  David J. MacKenzie  (djm at geech.ai.mit.edu)
4996         * mv.c (copy): Try to preserve file ownership in
4997         cross-filesystem copies.
4999         * backupfile.c, rm.c: Go back to using d_ino instead of
5000         d_fileno.  POSIX.1 specifies neither, and d_ino is more
5001         common, perhaps ubiquitous.
5003         * chown.c (describe_change): Don't print the group name if it
5004         didn't change (thus is a null pointer).
5005         (main): Initialize group name to null.
5007 Mon Feb 25 11:44:14 1991  David J. MacKenzie  (djm at geech.ai.mit.edu)
5009         * dd.c (copy): Only seek if not seeking to start of file, so
5010         "dd >> foo" works with Minix shell that doesn't open foo in
5011         append mode.
5013 Thu Feb 21 11:59:39 1991  David J. MacKenzie  (djm at geech.ai.mit.edu)
5015         * ln.c (do_link), mv.c (do_move), cp.c (copy): Store backup
5016         filename using alloca so we don't have to free it every place
5017         we return.  From Jim Meyering.
5019 Thu Feb 14 00:41:43 1991  David J. MacKenzie  (djm at geech.ai.mit.edu)
5021         * cp.c (copy_reg): Only make holes when copying a regular file
5022         onto a regular file.
5024 Fri Jan 18 06:31:59 1991  David J. MacKenzie  (djm at albert.ai.mit.edu)
5026         * ls.c: Move defn. of S_IEXEC to after header files are included.
5027         * cp.h: Always declare stat and lstat.
5029 Thu Jan 10 02:16:55 1991  David J. MacKenzie  (djm at albert.ai.mit.edu)
5031         * cp.h: Only declare some system calls if not POSIX.
5033         * eaccess.c, idcache.c, dd.c, install.c, ln.c, system.h:
5034         Change _POSIX_SOURCE to POSIX.
5036         * fileblocks.c, system.h: Change STBLOCKS_MISSING to
5037         ST_BLOCKS_MISSING (was already that way in cp.c).
5039 Fri Dec 28 18:40:34 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5041         * chmod.c, chown.c, chgrp.c, du.c: Rename -d option to -L for
5042         similarity to ls and cpio.
5044 Thu Dec 27 00:06:45 1990  David J. MacKenzie  (djm at egypt)
5046         * rm.c (clear_directory): Keep looking for files to remove
5047         until we don't find any, so that any .nfs* files created by
5048         removing other files are also removed, eventually.
5050         * install.c (main): Strip trailing slashes on all args.
5052         * mv.c (copy): Open target file with mode 0600, not 0777.
5053         [FCHMOD_MISSING]: Perform chmod after closing files, not
5054         before, for MS-DOS.
5056         * cp.c (do_copy): Don't append `..' to target dir name.
5058         * du.c (main, count_entry, usage): Add -D +dereference-args
5059         and -d +dereference options.
5061 Wed Dec 26 03:39:18 1990  David J. MacKenzie  (djm at egypt)
5063         * dirname.c, xstrdup.c: Get decls from standard files, if available.
5065 Thu Dec 20 23:10:22 1990  David J. MacKenzie  (djm at egypt)
5067         * makepath.c: New file, adapted from code in mkdir.c,
5068         install.c, and cpio util.c by Jim Meyering.
5069         * mkdir.c, install.c: Use make_path.
5071 Sun Dec 16 00:56:54 1990  David J. MacKenzie  (djm at egypt)
5073         * chown.c, chgrp.c: New files.
5075 Sat Dec 15 20:42:32 1990  David J. MacKenzie  (djm at egypt)
5077         * cp.h: Declare POSIX functions always -- _POSIX_SOURCE
5078         doesn't imply STDC declarations.
5080         * system.h: Define S_ISTYPE macros not defined by sys/stat.h.
5082         * Many files: Use S_ISTYPE macros.
5084         * backupfile.c, rm.c: Use name d_fileno for member of struct
5085         dirent instead of d_ino, for POSIX.
5087 Wed Dec 12 23:38:22 1990  David J. MacKenzie  (djm at egypt)
5089         * ls.c: Declare time() as time_t instead of long, to prevent
5090         conflict with standard header files.
5092         * cp.c (copy_reg): Instead of using NO_SPARSE_FILES, use
5093         st_blocks to determine whether the original file contains any
5094         sparse blocks, and only create them if so.  On systems without
5095         st_blocks, to be safe, never create sparse blocks.
5097 Thu Nov  8 12:16:27 1990  David J. MacKenzie  (djm at apple-gunkies)
5099         * idcache.c: If _POSIX_SOURCE not defined, declare getpw and
5100         getgr functions (not an optimal solution, but I hate to add
5101         yet another configuration macro).
5103         * Makefile: Define AR and RANLIB and pass to child makes.
5104         lib/Makefile: Use them.
5106 Tue Nov  6 23:18:06 1990  David J. MacKenzie  (djm at mole.ai.mit.edu)
5108         * idcache.c: New file from code in ls.c.
5110 Fri Nov  2 14:34:40 1990  David J. MacKenzie  (djm at apple-gunkies)
5112         * Move files into src and lib directories, split out library
5113         functions into separate files in lib, and rewrite Makefiles.
5115 Mon Oct 29 01:20:46 1990  David J. MacKenzie  (djm at apple-gunkies)
5117         * mv.c (do_move), rm.c (remove_file, remove_dir): If stdin is
5118         a tty and file is unwritable, prompt before overwriting.
5120         * cp.c (copy_reg): Only make sparse files if
5121         NO_SPARSE_FILES is undefined, to accommodate dumb kernels.
5123         * du.c (count_entry): Remove misinformed HPUX kludge that
5124         doesn't really fix the problem.
5126         * rm.c (rm): Check for textual equality with '.' and '..', not
5127         dev/inode equality.
5129 Sat Oct 27 23:38:55 1990  David J. MacKenzie  (djm at apple-gunkies)
5131         * rm.c (check_stack): If not interactive, don't prompt when
5132         corruption is found, just quit.
5133         (remove_file, remove_dir): Delete leading spaces in verbose
5134         output.
5136         * cp.c (copy), rm.c (remove_dir): If we think the dest. file
5137         is unwritable, warn the user in the interactive prompt instead
5138         of automatically skipping the file.  Because of race
5139         conditions and other protection mechanisms we might not know
5140         about, and POSIX.
5142 Mon Oct  8 18:51:25 1990  David J. MacKenzie  (djm at apple-gunkies)
5144         * du.c (main, usage, count_entry): Add +separate-dirs -S option.
5146         * dd.c (main): Don't trap SIGINT if it was being ignored.
5148 Tue Sep 25 16:40:43 1990  David J. MacKenzie  (djm at apple-gunkies)
5150         * install.c (copy_file, install_file_in_file): Change
5151         attributes after stripping, to guard against strip programs
5152         that clear setuid bits, etc.
5154 Fri Sep 21 22:31:43 1990  David J. MacKenzie  (djm at apple-gunkies)
5156         * cp.c (copy_reg): Put back ftruncate way of making holes
5157         because the other way can't make a hole at the end of a file.
5159 Tue Sep 18 03:47:45 1990  David J. MacKenzie  (djm at apple-gunkies)
5161         * install.c (change_attributes): Don't ignore EPERM for chown,
5162         since the default uid is now the current uid.
5164 Sun Sep  9 16:54:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5166         * Version 1.4.
5168         * cp.h: Declare free returning void, not int, so it
5169         doesn't bomb on Xenix.
5171 Fri Sep  7 04:35:35 1990  David J. MacKenzie  (djm at apple-gunkies)
5173         * system.h, backupfile.c, savedir.c [DIRENT]: if direct is
5174         defined (as on Ultrix 4.0), undefine it before redefining it.
5176 Tue Sep  4 03:10:24 1990  David J. MacKenzie  (djm at apple-gunkies)
5178         * dd.c (apply_translations, translate_charset): Code moved
5179         from parse_conversion.
5180         (apply_translations): Convert from EBCDIC to ASCII before
5181         converting case.
5183         * mvdir.c (fullpath): Return a value.
5185         * dd.c (copy): Increment count of truncated records once
5186         per record, not once per character that overflows.
5188 Mon Sep  3 22:23:57 1990  David J. MacKenzie  (djm at coke)
5190         * dd.c (swab_array): Function removed.
5191         (copy): Rewrite conv=swab to work when odd number of bytes
5192         are read.
5193         (scanargs): Die if invalid numeric value is given.
5194         (parse_integer): Return -1 if invalid arg.
5195         (bit_count): Faster version from Jim Meyering.
5197         * cp.c, mkfifo.c [MKFIFO_MISSING]: Define mkfifo.
5199 Thu Aug 30 00:17:02 1990  David J. MacKenzie  (djm at apple-gunkies)
5201         * mvdir.c (main): Make sure `from' is not a parent of any part
5202         of `to', not just the explicitly given part.
5203         (fullpath): New function.
5205 Wed Aug 29 19:50:05 1990  David J. MacKenzie  (djm at apple-gunkies)
5207         * mvdir.c: Renamed from mv_dir.c, for consistency with mkdir and rmdir.
5208         * dirlib.c: Caller changed.
5210 Tue Aug 28 18:05:24 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5212         * touch.c (main): Don't interpret first non-option arg as a
5213         time if `--' is given (POSIX-required kludge).
5215         * touch.c: Add long-named options.
5217         * Many files: Include <getopt.h> instead of "getopt.h" since
5218         getopt.h will be in the GNU /usr/include.
5220         * install.c: Declare some functions.
5222         * touch.c, getdate.y, posixtime.y, mktime.c: New files, from bin-src.
5224         * posixtime.y: Move year from before time to after it (but
5225         before the seconds), for 1003.2 draft 10.
5227 Mon Aug 27 03:25:36 1990  David J. MacKenzie  (djm at apple-gunkies)
5229         * touch.c (main): If no time is given and first arg is a valid
5230         timespec, use it as one.
5232 Sat Aug 25 01:36:16 1990  David J. MacKenzie  (djm at apple-gunkies)
5234         * posixtime.y: Enclose YYABORT in braces in case some yacc's
5235         need it.
5237         * touch.c: Remove -i option.  Change some error messages.
5238         (readname): Function removed.
5240 Thu Aug 23 12:56:33 1990  David J. MacKenzie  (djm at apple-gunkies)
5242         * cp.c (copy): Only restore dir mode if it was changed.
5244 Wed Aug 22 01:45:54 1990  David J. MacKenzie  (djm at apple-gunkies)
5246         * cp.c (copy): Don't only backup files when -f is given.
5248         * ls.c: Add -X +sort=extension option.  Rename
5249         +kilobyte-file-size to +kilobytes.
5251         * du.c: Rename -f option to -x, for POSIX.  Rename
5252         +kilobyte-file-size to +kilobytes.  Add -b, +bytes option for
5253         POSIX.
5255         * cp-aux.c (usage): Change -o to -x.
5256         (stpcpy): Renamed from str_cpy.  Change callers in cp.c.
5258         * cp.c: New variable, `flag_copy_as_regular'.
5259         (main): For -R, unset `flag_copy_as_regular'.
5260         Rename -o to -x for consistency with du.
5261         (copy): Only unlink destination files when -f is given.
5262         Only prompt when -i given and copying as a regular file.
5263         Move check for previous link after other checks, reducing
5264         duplicate code.
5265         Create directories with mode 0700 initially, for POSIX.
5267 Mon Aug 20 03:29:08 1990  David J. MacKenzie  (djm at apple-gunkies)
5269         * dd.c (copy): Swap input bytes instead of output bytes.
5270         (swab_array): New function.
5272         * dd.c (copy): If sync and noerror, zero the buffer before the
5273         read instead of after so that any data read before an error
5274         occurred are preserved.
5275         On read error, print stats and seek past the bad block if noerror.
5276         noerror doesn't affect write errors, for POSIX.
5277         (scanargs): Use two buffers if no buffer sizes given.
5278         Do not block or unblock if cbs not given.
5279         (print_stats): New function.
5280         (quit): Call it.
5282 Mon Aug 13 23:30:03 1990  David J. MacKenzie  (djm at apple-gunkies)
5284         * cp.c (copy): If dest. exists and is unwritable, skip the file.
5286         * rm.c, mv.c, cp.c, ln.c (main): Respect the last -f or -i given,
5287         for POSIX.
5289         * rm.c (remove_file): Only prompt if -i is given.
5290         (main, usage): Remove -o +override-mode option, obsolete if
5291         POSIX accepts our objection about prompting.
5293         * mv.c (do_move): Only prompt if -i is given.
5295         * ln.c (do_link): If dest. file exists and -i and -f not
5296         given, skip the file.
5298 Tue Aug  7 12:51:18 1990  David J. MacKenzie  (djm at apple-gunkies)
5300         * dd.c (main): If seek= given, don't truncate output file.
5301         (copy): Use `read' to skip output blocks if not regular file.
5302         Sync with NUL instead of SPC.
5304 Mon Aug  6 14:43:30 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
5306         * rm.c: Rename `ignore_errors' to `ignore_missing_files', and
5307         have it only suppress messages about nonexisting files.
5308         (main): Get dev and ino of `.' and `..'.
5309         (rm): If file is the same as `.' or `..', return with error.
5310         (remove_file): Remove the file rather than skipping it if
5311         unwritable, no -i, and stdin not tty.
5312         (remove_dir): Return an error if directory is nonwritable,
5313         rather than nonreadable or nonsearchable, for POSIX.2 draft 10.
5315         * chmod.c (main): Use fixed error checking to make sure that
5316         options aren't mixed together in the same args as mode specifiers.
5318 Sun Aug  5 11:51:12 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
5320         * chmod.c (main): Use umask for '-' op.
5322 Sat Aug  4 10:11:30 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
5324         * mkfifo.c: Remove -p +path option, no longer specified by POSIX.
5326 Fri Aug  3 13:38:28 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
5328         * mkdir.c, mkfifo.c, create.c (main): Don't tell mode_compile to
5329         respect the umask for certain operations, since the umask is 0 anyway.
5331         * install.c (get_ids): Use getuid and getgid to get defaults,
5332         instead of -1.
5334 Fri Jul 27 14:32:40 1990  David J. MacKenzie  (djm at apple-gunkies)
5336         * backupfile.c (dirname): Always replace frontmost slash with a null.
5338 Thu Jul 26 00:20:35 1990  David J. MacKenzie  (djm at apple-gunkies)
5340         * cp.h: Declare umask as unsigned short.
5342         * eaccess.c: Make uid and gid unsigned short, and group array unsigned.
5344 Wed Jul 25 18:38:57 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5346         * rm.c (remove_file, remove_dir): Print verbose message right
5347         before actually trying to remove the file, after the prompting.
5349         * ls.c (getuser, getgroup): Make uid and gid unsigned short, not int.
5351 Tue Jul 24 03:39:42 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5353         * cp.c (copy), ln.c (do_link), mv.c (do_move): For +verbose,
5354         print the file names just before actually attempting the
5355         copy/link/move, to produce a list of the files that they
5356         actually try to copy/link/move, omitting skipped files.
5357         Remove leading spaces from +verbose output.
5359 Mon Jul 23 16:57:44 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5361         * cp.c (copy): Make +update operate silently, like +one-file-system.
5363         * ln.c: Add -F as synonym for -d, for SunOS compatibility.
5365 Sun Jul 15 23:23:28 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5367         * cp.c (copy): Go back to using xstat on dest.
5369 Wed Jul 11 12:10:33 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5371         * cp.c (copy): Make directories with desired mode plus u+wx so
5372         if the copy is interrupted, the dir is closer to the desired mode.
5373         Don't backup directories.
5375 Sun Jul  8 00:39:31 1990  David J. MacKenzie  (djm at apple-gunkies)
5377         * rm.c (main, usage): Add new option -d, +directory.
5378         (rm): If -d given, use remove_file instead of remove_dir for
5379         directories.
5380         (remove_file): If directory, print "remove directory `foo'?"
5381         for interactive instead of "remove `foo'?".
5383         * ln.c (main): If -s given, print warning message if symlinks
5384         are not available.
5385         * mkfifo.c (main): If fifo's are not available, print message
5386         and exit.
5388 Fri Jul  6 02:02:49 1990  David J. MacKenzie  (djm at apple-gunkies)
5390         * install.c (main): Use the current user and group ID for the
5391         default owner and group.
5393         * mv.c (main): New option -u, +update.
5394         (do_move): Don't move nondirectories if -u and there is an existing
5395         destination that has the same or newer mtime.
5396         (usage): Document -u, +update.
5398         * cp.c (main): New option -u, +update.
5399         (copy): Don't copy nondirectories if -u and there is an existing
5400         destination that has the same or newer mtime.
5401         * cp-aux.c (usage): Document -u ,+update.
5403 Thu Jul  5 10:04:12 1990  David J. MacKenzie  (djm at apple-gunkies)
5405         * ln.c (do_link): Don't check whether OLD exists before trying
5406         to make link.
5408 Tue Jul  3 01:51:55 1990  David J. MacKenzie  (djm at apple-gunkies)
5410         * ls.c: Allow "+time=atime" and "+time=ctime" for C hackers.
5412         * chmod.c (main): Don't check whether multiple mode arguments
5413         are given, because optind has a different value depending on
5414         whether or not the option is the last character in the
5415         ARGV-element.
5417 Sat Jun 30 12:32:51 1990  David J. MacKenzie  (djm at apple-gunkies)
5419         * cp.c (copy): Use lstat on dest. file, not *xstat.
5421 Mon Jun 25 18:07:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5423         * ls.c (print_long_format): Truncate user and group names to 8
5424         chars to preserve column alignment.
5425         (length_of_file_name_and_frills): Don't assume type indicator
5426         will be printed for unknown file types that some os's have.
5428         * install.c: Declare getgrnam for systems where grp.h doesn't.
5430 Sat Jun 23 00:06:35 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5432         * Version 1.3.
5434         * du.c (count_entry) [HPUX_NFS_BUG]: If the size of the file
5435         according to the number of blocks reported is twice or more than
5436         the size of the file according to the number of bytes
5437         reported, halve the number of blocks.
5439 Fri Jun 22 00:38:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5441         * cp.c (copy_dir): Initialize 'ret' to 0.
5443         * cp.c (main), ln.c (main), mv.c (main), rm.c (main):
5444         Make -i override -f and -o, to be conservative about
5445         removing peoples' files.
5447         * mkdir.c (make_path), mkfifo.c (make_path): Don't try to stat
5448         "" or "/".
5450         * rm.c, rmdir.c, mkdir.c, mkfifo.c: Move code to remove
5451         slashes at the end of an arg from main to
5452         strip_trailing_slashes.
5454         * install.c (strip): Print error message if the `strip'
5455         program can't be run.
5457         * system.h (convert_blocks): Macro moved from du.c and ls.c.
5458         Take a second parameter indicating whether to convert to
5459         kilobytes or 512 byte blocks.
5460         * ls.c, du.c: Pass second parameter to convert_blocks.
5462 Thu Jun 21 01:19:28 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5464         * ls.c (print_long_format): Use mode_string instead of filemodestring.
5466         * ls.c (print_long_format): Compare times as longs, not ints.
5467         (longdiff): Macro to compare two longs efficiently if sizeof
5468         int == sizeof long and less efficiently but correctly if they
5469         are different sizes.
5470         (compare_ctime, etc.): Use longdiff.
5472         * ls.c (decode_switches): Make -k not imply -s, to allow the
5473         summary directory size printed by -l to be in 1k blocks
5474         without having the size of each file printed as well.
5475         (convert_blocks): Provide for systems with a blocksize that is
5476         other than 512 or 1024 bytes.
5478         * du.c (main): Exit with status 0 normally.
5479         (convert_blocks): Provide for systems with a blocksize that is
5480         other than 512 or 1024 bytes.
5482 Wed Jun 20 01:46:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5484         * ln.c (do_link): Take out code to give an error if source and
5485         dest are the same file.  The dubious usefulness of the special
5486         case to prevent 'ln x x' from removing 'x' (ln -i can be used
5487         instead) is not worth preventing 'ln x y' from failing the
5488         second time in a row, and appears to contradict POSIX anyway.
5490 Mon Jun 18 02:48:17 1990  David J. MacKenzie  (djm at apple-gunkies)
5492         * ls.c (print_file_name_and_frills):
5493         (length_of_file_name_and_frills, print_long_format):
5494         Allow 6 digits for i-number, not 5.
5496 Sun Jun 17 00:09:23 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5498         * install.c (install_dir): Don't check whether "" or the root
5499         directory exists (the former fails on some systems).
5501         * system.h: Make inclusion of sys/file.h conditional on USG
5502         and _POSIX_SOURCE, not DIRENT.
5504         * chmod.c (change_dir_mode): Use xrealloc instead of free and
5505         xmalloc in case malloc already left extra room.
5506         (xrealloc): New function.
5508         * rm.c (clear_directory): Prevent buffer overruns.
5509         More efficient string handling.  Don't skip rest of directory
5510         if continuing after finding circular inode.
5511         (xrealloc): New function.
5513 Sat Jun 16 01:45:42 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5515         * argmatch.c (invalid_arg): Change order in which the items
5516         are printed.
5518         * ls.c: Add +tabsize (-T) option.
5520 Fri Jun 15 23:40:55 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5522         * dd.c (scanargs): For ibs and obs, set C_HARDWAY.
5523         (copy): Use different buffers only if C_HARDWAY, not if
5524         blocksizes are the same, to ensure constant output block sizes.
5526 Wed Jun 13 23:56:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5528         * savedir.c: New file from code in chmod.c, modified to
5529         prevent buffer overruns.
5530         * chmod.c (change_dir_mode), cp.c (copy_dir), du.c
5531         (count_entry): Use savedir.
5533 Thu Jun  7 03:52:02 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5535         * system.h (ST_BLKSIZE) [!STBLOCKS_MISSING]: If st_blksize is
5536         0 (as on pipe reads on some systems), use BSIZE instead.
5537         Define BSIZE as DEV_BSIZE if necessary.
5539         * Makefile, system.h, fileblocks.c: Use STBLOCKS_MISSING to
5540         control whether st_blksize and st_blocks are used.
5541         * Makefile, system.h, backupfile.c: Use DIRENT to control
5542         whether <dirent.h> is used.
5544 Thu May 31 00:55:36 1990  David J. MacKenzie  (djm at apple-gunkies)
5546         * fileblocks.c: New file.
5547         * du.c (blocks_to_kb): Replace with convert_blocks macro.
5548         (main): Recognize new -k option.
5549         (usage): Document it.
5550         * ls.c (nblocks): Replace with convert_blocks macro.
5551         * system.h (ST_BLKSIZE) [USG]: Use BSIZE from sys/param.h instead of
5552         having the user define BLKSIZE.
5553         (ST_NBLOCKS) [USG]: Use st_blocks from fileblocks.c.
5555 Wed May 23 00:40:39 1990  David J. MacKenzie  (djm at apple-gunkies)
5557         * argmatch.c: New file, taken from ls.c.
5558         * getversion.c (get_version): Use argmatch, to allow
5559         abbreviations.  Default backup type is existing_numbered.
5560         * mv.c (main), ln.c (main), cp.c (main): Only make backups if
5561         -b (+backup) is given.  If envar SIMPLE_BACKUP_SUFFIX is set,
5562         use it as a default instead of `~'.
5563         * mv.c (usage), ln.c (usage), cp-aux.c (usage): Update messages.
5565 Tue May 22 00:56:51 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5567         * install.c: New file (from ../bin-src).
5569         * dd.c (copy): Don't count completely failed writes as partial
5570         writes.  Make buffers unsigned.  If blocking or unblocking,
5571         pad final partial buffer if necessary.
5573         * getversion.c: New file.
5574         * mv.c (main), cp.c (main), ln.c (main): Control backup types
5575         with getenv ("VERSION_CONTROL") and +version-control or -V.
5577         * cp.c (yesno), mv.c (yesno), ln.c (yesno): Stop reading if
5578         EOF reached as well as at newline.
5580         * backupfile.[ch]: Rename var `version_control' to `backup_type'.
5582 Sat May 19 23:38:46 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5584         * touch.c: Change some error messages.  Include "getopt.h".
5586 Sat May 19 00:16:50 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5588         * mv.c (main), ln.c (main), cp.c (main): Revise
5589         backup-creation options.
5590         * mv.c (usage), ln.c (usage), cp-aux.c (usage): Revise messages.
5592         * chmod.c (describe_change): Use mode_string instead of
5593         filemodestring.
5595         * cp.c (main): Recognize new options for making backups.
5596         * cp.c (copy): Make backups if requested.  Fix typo.
5597         * cp-aux.c (usage): Update message.
5599         * mv.c, cp.c: Remove code to conditionally use utimes instead
5600         of utime, since the extra resolution of utimes was not being
5601         used, the emulation overhead is probably insignificant,
5602         and utime is a standard function.
5604         * cp-hash.c: Fix up comments.
5606 Fri May 18 23:06:23 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5608         * mv.c (do_move): Only make backup if dest file exists.
5609         Don't continue moving file if dest can't be backed up.
5610         * ln.c (do_link): Don't try to unlink dest if it was backed up.
5611         Don't continue moving file if dest can't be backed up.
5613         * system.h: Make SIGTYPE default to void if not defined.
5615         * modechange.[ch]: Rename struct and external functions to start
5616         with 'mode_'.
5617         * modechange.c (oatoi): Make static.
5618         (mode_compile): Take an additional arg indicating which
5619         symbolic operators should be affected by the umask.
5620         * modechange.h: Add defines for mode_compile arg mask.
5621         If __STDC__, use prototypes.
5622         * chmod.c, mkdir.c, mkfifo.c, create.c: Account for above changes.
5624 Tue May 15 16:17:34 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5626         * dd.c (copy): Quit with nonzero status if final write fails.
5628 Mon May 14 14:34:10 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5630         * dd.c: Make translation tables unsigned.
5631         (main): Give `input_file' and `output_file' nonzero values for
5632         stdin and stdout.
5633         (parse_conversion): Set new global vars 'space_character' and
5634         'newline_character' to correct values when translating to EBCDIC
5635         (either flavor).
5636         (copy): Use 'space_character' and 'newline_character' instead
5637         of hardcoded ASCII values.  Ignore attempts to seek on output pipe,
5638         socket, or fifo.  If possible, seek instead of reading to skip
5639         initial input records.  Sync with `space_character' instead of
5640         nulls, for POSIX.
5642         * cp.c (copy_reg): Compare lseek values as longs, not ints.
5644 Sat May 12 01:16:42 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5646         * cp-hash (remember_created): Return error status instead of
5647         fatal error.
5648         * cp.c (copy): Change caller.
5649         (do_copy, copy_reg): Return error status instead of fatal error.
5651         * Move rename emulation from mv.c to dirlib.c so other
5652         programs can use it.
5653         * mv.c, ln.c (main): Recognize new options for making backups.
5654         * mv.c (do_move), ln.c (do_link): Make backups if requested.
5655         * mv.c, ln.c (usage): Update message.
5656         * backupfile.c, backupfile.h: New files.
5658         * cp.h: Ifdef out decl of umask because of SunOS 4.1 (POSIX) conflict.
5660         * Define all `main' functions as returning void.
5662 Fri May 11 02:11:03 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5664         * ln.c, mv.c, rm.c, rmdir.c, create.c, chmod.c: Change some
5665         error messages.
5667         * du.c, cp-aux.c (error): Function removed.
5668         Change callers to use error.c version.
5669         * cp.c (copy, do_copy, copy_dir): Return an error status.
5670         * ls.c (error, fatal, perror_with_name): Functions removed.
5671         Change callers to use error.c.
5673 Sat May  5 23:46:48 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5675         * ln.c (do_link): Don't allow trying to link a file to itself,
5676         because the source file would be removed if they are the same
5677         directory entry, and also for consistency with mv and cp.
5679 Fri May  4 13:42:53 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5681         * cp.c (copy_reg): Only write a null to the end of the file if
5682         the end of the file was sparse.
5684         * ls.c (print_name_with_quoting): Make the char to print
5685         unsigned to prevent sign extension problems with -b.
5687 Fri Apr 20 13:52:15 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5689         * Version 1.2 released.
5691 Wed Apr 18 14:36:15 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5693         * Makefile: Use chsize for ftruncate on Xenix.
5695         * cp.c (copy): Remove broken code that attempted to
5696         substitute for ftruncate on systems missing it.
5698 Mon Apr 16 13:58:01 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5700         * cp-aux.c (usage): Fix mistake in message.
5702         * Version 1.1 released.
5704 Sat Apr 14 17:23:11 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5706         * ls.c (main): Don't remove leading path from program_name.
5707         (basename): Function removed.
5708         (length_of_file_name_and_frills): Don't add 1 for type indicator
5709         for block and character special files.
5711 Thu Apr 12 19:50:15 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5713         * Makefile: Suggest using -DBLKSIZE=512 instead of 1024 for USG.
5715         * dd.c (copy): Print copying statistics when exiting because
5716         of a read or seek error.
5717         (interrupt_handler): New function.
5718         (main): Trap SIGINT to run interrupt_handler, for POSIX.
5720 Tue Apr 10 01:09:38 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5722         * chmod.c (change_file_mode): Don't change the mode of
5723         symbolic links.
5725 Mon Apr  9 13:30:00 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5727         * modechange.c (compile_mode): Return an error if an octal
5728         number argument is too large.
5730 Sun Apr  8 20:33:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5732         * dd.c: Use `error' instead of `fatal' and `pfatal_with_name',
5733         for greater control of the message format.
5734         * head.c, tail.c: Use `error' instead of `fatal_perror' and
5735         `nonfatal_perror'.  Remove some unnecessary info from messages.
5736         * chmod.c, create.c, ln.c, mkdir.c, mkfifo.c, mv.c, mv_dir.c,
5737         rm.c, rmdir.c: Remove definition of `error'.
5738         * error.c: New file created from code in mv.c.
5739         * Makefile: Link the above programs with error.o.
5741         * ln.c (do_link): Use eaccess_stat to determine writability.
5742         * mv.c (do_move): Ditto.
5743         * rm.c (remove_file): Ditto.
5744         (remove_dir): Use eaccess_stat to determine readability and
5745         searchability.  Move initial interactive query here from
5746         clear_directory.
5747         * Makefile: Link ln, mv, and rm with eaccess.o.
5749 Sat Apr  7 11:47:52 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5751         * Makefile: Link cp with eaccess.o.
5752         * eaccess.c: New file adapted from code in cp.c and cp-aux.c.
5753         * cp.c (copy): Use eaccess_stat to determine writability.
5754         Consider a file unwritable by root if it has no permissions.
5755         (main): Remove groups initialization code.
5756         * cp-aux.c (member): Function deleted.
5758         * cp.c (copy): Temporarily change the mode of directories if
5759         necessary to overwrite them when running recursively.
5760         Consider a directory to be non-overwritable if it lacks write
5761         permission as well as if it lacks execute permission.
5763         * rm.c, mv.c, mv_dir.c, chmod.c, create.c, ln.c: Remove some
5764         irrelevant or redundant information from error messages.
5766 Fri Apr  6 15:20:45 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5768         * cp.c (copy): Only change mode of regular files and directories;
5769         others are already correct.
5771 Thu Apr  5 04:31:56 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5773         * dd.c: Remove the vars that are set by command line options
5774         from a useless struct and give them more meaningful names.
5776 Mon Apr  2 02:58:34 1990  David J. MacKenzie  (djm at spike.ai.mit.edu)
5778         * cp.c (main): Use NGROUPS from sys/param.h to determine
5779         whether BSD multiple groups are supported and how large to
5780         make the array.
5781         * Makefile: Remove references to GETGROUPS_MISSING.
5783 Sun Apr  1 18:53:57 1990  David J. MacKenzie  (djm at spike.ai.mit.edu)
5785         * cp.c (main): Always initialize group info.
5787 Sat Mar 31 22:29:57 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5789         * mv.c [RENAME_MISSING] (rename): To rename directories, run
5790         setuid root mv_dir program.
5792 Tue Mar 20 14:28:25 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)
5794         * touch.c: Remove POSIX_COMPAT ifdef since there is no reason
5795         to disable the GNU extensions.
5796         (main): Set new global var `program_name'.
5797         (error): Replace with more versatile version.
5798         Global: Change calls to fprintf and error to use the new error.
5799         (main): Initialize global variables.  Don't bother making
5800         temporary copy of arg to -d.  Don't ignore any files named on
5801         the command line if -i is given.
5802         (usage): Don't take an arg.  Use `program_name' instead of
5803         hardcoded name.
5804         (touch): In utime emulation for BSD, ftruncate the file to its
5805         original size so empty files stay empty after being touched.
5807 Sun Mar 18 01:02:39 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5809         * ln.c (strip_trailing_slashes): New function.
5810         (main, do_link): Call it.
5812         * cp-aux.c (strip_trailing_slashes): New function.
5813         * cp.c (do_copy): Call it.
5814         * cp.h: Declare it.
5816         * mv.c (strip_trailing_slashes): New function.
5817         (main, movefile): Call it.
5819 Sat Mar 17 21:45:35 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5821         * cp-aux.c, cp.h: Rename user_confirm_overwriting to yesno and
5822         don't have it print a prompt, so it can be used in several
5823         places.
5825         * cp.c (do_copy): Change an error message to resemble mv's.
5826         Remove all trailing slashes from all non-option args.
5827         (main): Set new global var `stdin_not_tty'.
5828         (copy): Use POSIX method of handling file overwriting and
5829         prompting.
5831         * dirlib.c (mkdir): Use chmod to set the directory mode after
5832         successful creation, so set[ug]id and sticky bits are set
5833         correctly.
5835 Thu Mar 15 12:33:23 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5837         * Makefile: Add commented out definitions for SCO Xenix.
5839         * ls.c (print_type_indicator): Don't print a '*' next to
5840         executable block or character special files.
5842         * chmod.c (error): New function, replacing nonfatal_perror,
5843         memory_out, and invalid_mode.
5844         Global: Call error instead of the above functions.
5845         (change_dir_mode): Make the new size of the path twice the
5846         size of the name that was too long, rather than twice its old
5847         size.
5849         * rm.c: Move interactive query about whether to remove a
5850         directory from remove_dir to clear_directory; only query for
5851         directories that are not empty.
5853 Wed Mar 14 10:48:40 1990  David J. MacKenzie  (djm at rice-chex)
5855         * system.h [USG]: Define X_OK.
5857         * rm.c (main): Set new global var `stdin_not_tty'.
5858         (rm): Most of code moved to two new functions, remove_file and
5859         remove_dir.
5860         (remove_file): Use POSIX method of determining whether to remove
5861         non-directories.
5862         (remove_dir): Use POSIX method of determining whether to
5863         remove directories, almost.
5864         (perror_with_name): Function removed.
5865         (error): Simple version replaced with more powerful version.
5866         Global: Change calls to fprintf, perror_with_name, and old
5867         error to calls to new error.
5869         * ln.c (main): Set new global var `stdin_not_tty'.
5870         If force, turn off interactive.
5871         (do_link): By default, don't allow hard links to symbolic links to
5872         directories.  Use POSIX method of determining whether to
5873         overwrite destination.
5874         (yesno): Function renamed from confirm, and arg removed.
5875         (lisdir): Function removed.
5877         * mv.c (main): Set new global var `stdin_not_tty'.
5878         (yesno): Function renamed from yes.
5879         (do_move): Use POSIX method of determining whether to
5880         overwrite destination.
5882         * Makefile: Make executables depend on .o files, not .c files,
5883         to allow for parallel compilation.
5885 Tue Mar 13 00:50:14 1990  David J. MacKenzie  (djm at rice-chex)
5887         * rm.c (main): Disallow removal of paths that have '..' as the
5888         final element.
5889         (basename): New function.
5891         * ls.c (print_type_indicator): Mark FIFOs with '|' and sockets
5892         with '='.
5893         (print_long_format): Print numbers as unsigned and add extra
5894         space for POSIX flag.
5896         * dd.c: Make the record counts unsigned.
5897         (quit): Print them as unsigned.
5899         * modechange.c (compile_mode): Only get umask value when needed.
5900         If users are not given or are `a', affect set?id and sticky bits.
5901         If memory is exhausted while allocating a new list element,
5902         free the old elements before returning.
5904         * Makefile (CC): Add comment noting that either fixincludes or
5905         -traditional needs to be used for gcc to compile ioctl calls
5906         correctly.
5908 Mon Mar 12 16:25:23 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
5910         * touch.c [UTIME_OF_NULL_MISSING]: Call lseek() before write().
5912         * posixtime.y [__GNUC__]: Use __builtin_alloca.
5914 Fri Mar  9 10:25:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5916         * chmod.c (main): Recognize "a,+-=" as valid options.
5918         * mv.c: Move the code to copy files across filesystems from
5919         do_move to a new function, copy, which will eventually be
5920         replaced with modules from cp and rm (POSIX requires mv to
5921         move directories recursively across filesystems).
5922         (do_move): Don't query about overriding a mode that prohibits
5923         writing if interactive.  Remove unneeded variable.
5924         (copy): Unlink target if copy fails partway through.
5926 Thu Mar  8 10:56:16 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5928         * cp.c (copy): Don't remove a destination file of a different
5929         type unless +force is given.
5931         * ls.c (decode_switches, usage): Add -U (for "unsorted") as an
5932         equivalent to +sort=none.
5934 Mon Mar  5 16:31:14 1990  Torbj|rn Granlund  (tege at echnaton)
5936         * cp.c (copy): Test for temporarily modified permission mode
5937           after the other test, so that `-p' work for files whose mode
5938           needed a temporary mode change.
5939         * cp.c (copy): Don't waste time calling unlink if we already
5940           know that the destination doesn't exists.
5941         * cp.c (comment before do_copy): Correct.
5942         * cp.c (comment before copy): Describe all params.
5943         * cp.c (copy): Only change permission mode for regular files
5944           and directories.
5945         * cp.c (copy): Unlink the destination file if its type is
5946           different from the source.  If the destination is a
5947           directory,  error.
5949 Mon Mar  5 00:34:36 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5951         * chmod.c (nonfatal_perror): Don't check for force_silent.
5952         (change_file_mode, change_dir_mode): If force_silent, don't
5953         print error messages.
5955         * mv.c (main): If force, turn off interactive.
5956         (do_move): Simplify check for query.  Rename `stb' to
5957         `to_stats' and `stbf' to `from_stats'.
5958         Return error condition if original file could not be renamed or
5959         unlinked.
5961         * rm.c: Rename global `force_flag' to `ignore_errors' and change its
5962         meaning so that it does not overlap with `override_mode'.
5963         (main): Have -f +force set override_mode.  If override_mode is
5964         set, turn off interactive.
5965         (rm): Simplify checks for whether to query the user, based on
5966         the new relationship between override_mode and interactive.
5968 Sun Mar  4 23:39:03 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5970         * ln.c (main): Reword an error message to be more like mv's.
5972         * rmdir.c: Move global `errors' into main instead of having
5973         error set it.
5975         * mkdir.c: Move global `errors' into main and have make_path
5976         return an error status instead of having error set it.
5978         * chmod.c: Move global `errors' into main and have
5979         change_file_mode and change_dir_mode return an error status
5980         instead of setting it in nonfatal_perror.
5982 Sat Mar  3 13:59:40 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
5984         * ln.c (main): Don't strip leading dirs from argv[0].
5986         * ln.c (confirm), mv.c (yes, do_move),
5987         cp-aux.c (user_confirm_overwriting), rm.c (rm, yesno, check_stack):
5988         Print query messages to stderr instead of stdout, for POSIX.
5989         Include program name in messages.
5991 Sat Mar  3 11:27:27 1990  Torbj|rn Granlund  (tege at echnaton)
5993         * cp.c (copy): Don't unlink directories with flag_force
5994           (`-f').  Also avoid using force when not necessary.
5995           Always copy fifo's and symbolic links as themselves.
5997         * cp.c (copy_reg): Make int scan first, char scan then, to
5998           find first non-zero byte.  This to avoid false hole
5999           creation.
6001 Sat Mar  3 10:22:28 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6003         * mv.c: Rename `pgm' to `program_name'.  Move global `errors'
6004         into main.  Have do_move and movefile return an error status
6005         instead having error set it.  Remove global vars `args'
6006         and `args_left'.
6007         (main): Rename `ac' and `av' to `argc' and `argv' and use them
6008         and `optind' instead of `args' and `args_left'.
6010         * cp.c (copy): Don't ignore errors other than EPERM from chown.
6012 Fri Mar  2 16:20:57 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6014         * rm.c (main, usage): Allow -R as a synonym for -r, for POSIX.
6016         * cp.c (copy): If flag_preserve, preserve the owner and group
6017         if possible, as well as mode.
6018         (main): Allow -R as a synonym for -r option, for POSIX.
6019         * cp-aux.c (usage): Mention -R.
6021 Tue Feb 27 11:49:04 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6023         * cp.c (copy): If not recursive, copy special files and
6024         symlinks like regular files and omit fifos.
6026 Mon Feb 26 19:55:24 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
6028         * ls.c (print_long_format): If time is in the future, print the year.
6029         Make the cutoff for old files 6 months not 300 days.
6031 Mon Feb 26 13:31:07 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
6033         * touch.c, Makefile: Use getdate.y instead of unctime.y.
6035         * touch.c: Remove posixtime.
6036         (main): Check for error from posixtime.
6037         posixtime.y: New file.
6039         * touch.c: Change a few cryptic error messages.
6040         Include <errno.h> not <sys/errno.h>.
6041         (just_set_amtime): New variable.
6042         (touch): Add if (just_set_amtime) code.
6044 Mon Feb 26 15:03:29 1990  Torbj|rn Granlund  (tege at echnaton)
6046         * cp.c (copy): Test for recursive copy in DIR alternative in
6047           the switch statement, so all file types are copied correctly
6048           even in a non-recursive copy.
6049         * cp.c (copy): Return after having created a symlink, since
6050           chmod and utimes dereference, and would affect the symlink
6051           target.  Remove test for symlinks after switch.
6053 Sun Feb 25 18:31:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6055         * Makefile: Compile ls after vdir so systems with a cc that
6056         can't do -c -o don't have to compile ls.c twice for ls.
6058         * dd.c (usage): Add braces around alternatives.
6060         * ls.c (print_long_format): Always print the group, for POSIX.
6061         (decode_switches): Make -g option a no-op for BSD users.
6062         (usage): Remove +group option.
6064 Wed Feb 21 11:13:26 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6066         * ln.c (error): New function.
6067         (main, do_link): Call error instead of fprintf and exit.
6068         (main): Recognize new -d +directory option to allow superuser to
6069         make hard links to dirs, like the BSD ln -f option.
6070         (do_link): Don't allow hard links to dirs (they are hard to
6071         get rid of -- rmdir and unlink don't do it), unless -d was given.
6072         (usage): Mention -d +directory option.
6074         * rmdir.c (main): Remove trailing slashes from args (added by
6075         shell file completion but the rmdir syscall can't handle them).
6076         * mkdir.c (main): Remove trailing slashes from args, for
6077         uniformity with rmdir (you can't do file completion on dirs
6078         that haven't been made yet . . .).
6080         * mv.c: Rename global var `nargs' to `args_left' to avoid
6081         conflict with undocumented BSD libc function (the new name is
6082         clearer, anyway).
6084 Tue Feb 20 17:09:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6086         * dd.c: Use new global var `program_name' in error messages
6087         instead of hardcoded "dd".
6088         (main): Set program_name from argv[0].
6090         * chmod.c, head.c, tail.c (main): Don't strip leading dirs
6091         from argv[0].
6092         (basename): Function removed.
6094         * rm.c (main): Don't strip leading dirs from argv[0].
6096 Mon Feb 19 14:34:18 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6098         * rm.c (main): Strip trailing slashes from each arg.
6100 Thu Feb 15 13:23:52 1990  David J. MacKenzie  (djm at rice-chex)
6102         * Makefile [HPUX CFLAGS]: Add -DUTIMES_MISSING.
6104 Wed Feb 14 15:01:18 1990  David J. MacKenzie  (djm at rice-chex)
6106         * Makefile (dist): Don't make a non-compressed tar file.
6108         * mv.c (do_move): Refuse to copy non-regular files across filesystems.
6110 Tue Feb 13 15:06:18 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
6112         * touch.c (getname): New function.
6113         (main): Use it.
6115 Mon Feb 12 11:30:45 1990  David J. MacKenzie  (djm at rice-chex)
6117         * ln.c (do_link): Check error return from unlink.
6118         Include errno.h.
6120         * du.c (main): Check error return from stat.
6121         (str_copyc, str_concatc): Don't return a value, since it is
6122         ignored.
6124         * cp.c (copy): Check error return from unlink and chmod.  Fix
6125         typo in call to error.
6127         * mv.c (do_move): Check error return of fchmod/chmod and utime[s].
6128         (rename): Check error return of unlink.
6130         * Makefile Definitions of preprocessor macros moved from
6131         cp.c and mv.c.  HAVE_FTRUNCATE changed to FTRUNCATE_MISSING.
6132         * Makefile, dirlib.c: NEED_MKDIR changed to MKDIR_MISSING.
6133         * mv.c, cp.c: Change USG ifdefs to UTIMES_MISSING.
6135 Sun Feb 11 17:50:29 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6137         * chmod.c (usage): Add yet another ellipsis.
6139 Sun Feb 11 16:41:30 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
6141         * cp.c (copy_reg): Use HAVE_FTRUNCATE to decide whether to
6142         use ftruncate().
6143         (main): Use GETGROUPS_MISSING to decide whether to use getgroups().
6144         [hpux || !USG]: Define HAVE_FTRUNCATE.
6145         [USG && !hpux]: Define GETGROUPS_MISSING.
6146         mv.c (rename): Put in #ifdef RENAME_MISSING not #ifdef USG.
6147         (do_move): Use FCHMOD_MISSING to decide whether to use fchmod().
6148         [USG && !hpux]: Define FCHMOD_MISSING and RENAME_MISSING.
6150 Fri Feb  9 10:25:03 1990  David J. MacKenzie  (djm at rice-chex)
6152         * mv.c (movefile): Remove trailing slashes from FROM (some
6153         filename completion systems add them for dirs, and they cause
6154         the rename syscall to fail).
6156 Thu Feb  8 22:50:12 1990  Torbj|rn Granlund  (tege at sics.se)
6158         * cp.c (copy_reg): Change error handling after lseek, since
6159           this is a fatal error.  Also change error message to
6160           something more generally understood.
6161         * Handle files that end in a zero block on USG systems.
6163         * cp-aux.c (error): Use FATAL to recog fatal errs.
6165 Thu Feb  8 21:25:40 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6167         * ln.c: Remove incorrect comment.
6169         * cp.c, cp-aux.c (usage): Change +dereference option to
6170         +no-dereference, since dereferencing is done by default and
6171         the option turns it off.
6173 Mon Feb  5 17:29:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
6175         * Version 1.0 released.
6177 Local Variables:
6178 version-control: never
6179 End: