Commit Graph
22888 Commits
Author SHA1 Message Date
Jim Meyering 8bd003b434 (enum Dereference_symlink): New type.
(dereference): New var, replacing trace_links, which was removed.
(long_options, main, decode_switches, gobble_file, usage):
Implement the changes.
2001-05-13 15:14:00 +00:00
Jim Meyering 331635b016 *** empty log message *** 2001-05-13 10:21:25 +00:00
Jim Meyering 271a090daa (NODEV): New macro, if not already defined. 2001-05-13 10:21:08 +00:00
Jim Meyering 9426be56f5 (main): Check for overflow when converting out of uintmax_t.
Do not assume that major_t and minor_t are no wider than int.
Check for makedev failures.  Convert device numbers via uintmax_t, not
unsigned long, just in case.  Coalesce duplicate code in the block and
character device cases.
2001-05-13 10:20:36 +00:00
Jim Meyering ed582f5612 . 2001-05-12 20:55:19 +00:00
Jim Meyering e364b0d6b8 *** empty log message *** 2001-05-12 16:06:36 +00:00
Jim Meyering 2227cb6a07 Include "dirname.h".
(base_name): Remove decl; now in dirname.h.
2001-05-12 16:05:51 +00:00
Jim Meyering 04a872f0d3 Include "dirname.h".
(base_name, strip_trailing_slashes): Remove decls; now in dirname.h.
(main): Use base_len instead of strip_trailing_slashes to strip
trailing slashes.
2001-05-12 16:05:12 +00:00
Jim Meyering 992b068bd2 (strip_trailing_slashes): Remove decl; now in dirname.h.
(main): Use dir_len rather than dir_name_r.
2001-05-12 16:03:19 +00:00
Jim Meyering d8535172f6 *** empty log message *** 2001-05-12 15:50:50 +00:00
Jim Meyering b6678c419b (ISSLASH): Remove; now in dirname.h.
(strip_trailing_slashes): Return nonzero if
a slash was stripped.  Do not strip the last slash after a
file system prefix.
2001-05-12 15:50:27 +00:00
Jim Meyering 8989b5b65c (base_name): Remove; now in dirname.h.
(STREQ): Remove.
(same_name): Handle the case where the basename ends in trailing '/'.
2001-05-12 15:48:00 +00:00
Jim Meyering dbe66b162b (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN): New macros.
(base_name, base_len, dir_len, strip_trailing_slashes): New decls.
2001-05-12 15:46:36 +00:00
Jim Meyering f6e82b7dea (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
(path_concat): Use base_len to compute
base length, not strlen; this means we cannot rely on memcpy
to null-terminate.
2001-05-12 15:45:43 +00:00
Jim Meyering 1450c855b6 Use "", not <> to include non-system header files. 2001-05-12 15:41:11 +00:00
Jim Meyering 3c9e00c4fd Use "", not <> to include non-system header files. 2001-05-12 15:40:47 +00:00
Jim Meyering e149a84b32 Use "", not <> to include dirname.h. 2001-05-12 15:39:45 +00:00
Jim Meyering 521f5344c8 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
Include <string.h> instead of <stdlib.h>.
Do not include <assert.h>; no longer needed.
Include xalloc.h.
(memrchr): Remove decl.
(dir_name_r): Remove.
(dir_len): Renamed from dirlen.  All callers changed.
Rewrite in terms of base_name, for simplicity and consistency.
(dir_name): Never return NULL.  All callers changed.
Do not include <stdlib.h> in test program; no longer needed.
return 0; is fine for test program.
2001-05-12 15:38:00 +00:00
Jim Meyering 4b8000742f (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
Do not include <stdio.h>, <assert.h>; no longer needed.
Include <string.h>, <dirname.h>.
(base_name): Allow file names ending in slashes, other than names
that are all slashes.  In this case, return the basename followed
by the slashes.  This is more general, and can be used in places
where the original base_name purposely had an assertion failure.
(base_len): New function.
2001-05-12 14:23:49 +00:00
Jim Meyering 9ce2d23774 (base_name): Remove; now in dirname.h.
Include <dirname.h> after size_t is defined.
(find_backup_file_name, max_backup_version): Use base_len instead of
rolling it ourselves.
Handle the case of "" and (on DOS) "C:" correctly.
2001-05-12 14:20:43 +00:00
Jim Meyering d45e530c21 (ISSLASH, base_name): Remove; now in dirname.h.
Include <dirname.h> after size_t is defined.

(addext): Use base_len to trim redundant
trailing slashes instead of doing it ourselves.
But do not trim the last slash if it is not redundant.
2001-05-12 14:13:36 +00:00
Jim Meyering 1fecbd7863 Include dirname.h.
(strip_trailing_slashes): Remove decl; now in dirname.h.
2001-05-12 10:05:42 +00:00
Jim Meyering bef1bc6137 Include dirname.h.
(strip_trailing_slashes): Remove decl; now in dirname.h.
2001-05-12 10:05:15 +00:00
Jim Meyering daa8b2b1a3 . 2001-05-12 10:04:13 +00:00
Jim Meyering 37f9f5ed29 *** empty log message *** 2001-05-12 10:03:16 +00:00
Jim Meyering b4c2f799ec (strip_trailing_slashes): Likewise.
(find_mount_point): No need to strip trailing
slashes before invoking new dir_name.
2001-05-12 10:03:07 +00:00
Jim Meyering 98e643ab3b (strip_trailing_slashes): Remove; now in dirname.h.
(make_path_private): Use dir_len instead of
dir_name, and avoid an extra mealloc call.
2001-05-12 10:00:52 +00:00
Jim Meyering b2604c5d12 (copy_internal): Remove the code that tested for NULL
dir_name return value.  That can't happen.
2001-05-12 09:58:03 +00:00
Jim Meyering b489ba12d8 Include "dirname.h".
(strip_trailing_slashes_2): Remove; now done by
strip_trailing_slashes.  All callers changed.
2001-05-12 09:54:19 +00:00
Jim Meyering 966d1cd6e6 (base_name): Remove decl; now in dirname.h. 2001-05-12 09:53:45 +00:00
Jim Meyering 99fa315bf8 Include dirname.h, to get base_name 2001-05-12 09:52:56 +00:00
Jim Meyering 7ed10357bc include dirname.h. 2001-05-12 09:51:59 +00:00
Jim Meyering 4a94a06aa6 (strip_trailing_slashes): Remove declaration; now in dirname.h. 2001-05-12 09:51:23 +00:00
Jim Meyering c29cb48a98 Wording changes related to -o, -n, and -g. 2001-05-12 08:44:31 +00:00
Jim Meyering 2034cba6f7 (usage): Minor wording changes related to -o, -n, and -g.
From Paul Eggert.
2001-05-12 08:23:23 +00:00
Jim Meyering 8e3f835a46 *** empty log message *** 2001-05-12 08:10:33 +00:00
Jim Meyering b338208678 *** empty log message *** 2001-05-12 08:04:52 +00:00
Jim Meyering ba94ef5b1b (mode_changed, change_file_mode):
There's no need to invoke both lstat and stat here, so call just
one of the two functions.
2001-05-12 08:04:44 +00:00
Jim Meyering 1af93e3d71 . 2001-05-11 14:06:22 +00:00
Jim Meyering 5848516f26 (shred invocation): Warn about backups and mirrors. 2001-05-11 11:23:37 +00:00
Jim Meyering a46bcc4636 (usage): Warn about backups and mirrors. 2001-05-11 11:23:24 +00:00
Jim Meyering e8256c3c7c s/POSIX/posix/ 2001-05-11 10:38:56 +00:00
Jim Meyering 22f4434076 remove trailing spaces 2001-05-11 10:38:23 +00:00
Jim Meyering 500f90eab5 fix typo: missing `r}' in this line:
@itemx --temporary-directory=@var{tempdir}
2001-05-11 10:38:13 +00:00
Jim Meyering 902a2a5d7a shift off the leading `_' 2001-05-11 09:14:22 +00:00
Jim Meyering 677cb6c6a9 Factor out the root-only test into this ...
Source ../root-only instead.
2001-05-11 09:10:09 +00:00
Jim Meyering c08bfa1060 *** empty log message *** 2001-05-11 08:19:41 +00:00
Jim Meyering f49ad025e6 (shred invocation): Warn about backups. From Nelson Beebe. 2001-05-11 08:18:18 +00:00
Jim Meyering e57fb62f7f add a space after a period
(true invocation): fix a typo
2001-05-11 07:53:44 +00:00
Jim Meyering 0246568205 s/restriction deletion flag
/restricted deletion flag/
2001-05-11 07:36:22 +00:00