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