1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-26 10:39:01 +02:00
Commit Graph

10906 Commits

Author SHA1 Message Date
Jim Meyering 786d944b5e (parse_obsolescent_option): Use t_count_lines, not
count_lines, in error message.
2001-05-15 15:45:58 +00:00
Jim Meyering 8f0403a90f *** empty log message *** 2001-05-15 14:02:28 +00:00
Jim Meyering bd510c7b11 Use proper quoting so brackets appear in the test program. 2001-05-15 14:02:19 +00:00
Jim Meyering 345f20440e *** empty log message *** 2001-05-15 10:11:19 +00:00
Jim Meyering 9e879e9c09 (struct fileinfo.linkmode): Now st_mode.
(print_color_indicator, print_name_with_quoting, print_type_indicator,
length_of_file_name_and_frills):
Use mode_t, not unsigned int, to store modes.
(dired_dump_obstack): Do not assume size fits in 'int'.
(get_link_name): readlink returns ssize_t, not int.
(make_link_path): Store buffer size as size_t, not int.
(print_long_format): Use unsigned long, not unsigned, to print
nlink_t, uid_t, gid_t, major_t, minor_t.
2001-05-15 10:11:15 +00:00
Jim Meyering 3b6ddee01e *** empty log message *** 2001-05-13 18:24:57 +00:00
Jim Meyering c2fc3f28dd (major_t, minor_t): Define to unsigned int if undefined. 2001-05-13 18:24:44 +00:00
Jim Meyering f7eab80b3c *** empty log message *** 2001-05-13 18:23:39 +00:00
Jim Meyering a8219ddccd (main): Check for NODEV device only if NODEV is defined. 2001-05-13 18:23:05 +00:00
Jim Meyering b8b5b82220 (NODEV): Remove, undoing previous change. 2001-05-13 18:22:54 +00:00
Jim Meyering 8cc6b069b6 *** empty log message *** 2001-05-13 15:29:21 +00:00
Jim Meyering a5bd412ed0 (dir_name, dir_len): Define to different names
to avoid shadowing warnings due to new declarations from dirname.h.
2001-05-13 15:29:15 +00:00
Jim Meyering dad1592217 *** empty log message *** 2001-05-13 15:23:54 +00:00
Jim Meyering 2f7d346fb1 Add new --dereference-command-line option.
-H now means this instead of meaning --si, as POSIX requires.
2001-05-13 15:23:20 +00:00
Jim Meyering 1650fcd3f7 *** empty log message *** 2001-05-13 15:22:28 +00:00
Jim Meyering cf3a6f7638 (run_tests): Fail if any test name is longer than 12 bytes. 2001-05-13 15:22:23 +00:00
Jim Meyering f4456619fa Shorten test names so the length of a resulting file name doesn't exceed 14. 2001-05-13 15:21:50 +00:00
Jim Meyering b1cb63869d Rename slink-dir test to slink-dir-dF. Add new tests
slink-dir-F, slink-dir-dFH, slink-dir-dFL.
2001-05-13 15:14:20 +00:00
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