Age | Commit message (Collapse) | Author |
|
Change "path" to "file name" whenever possible.
Remove usage comment, as it was a duplication of the code or doc.
Include <wchar.h> if available.
(mbrlen, mbstate_t) [! (HAVE_MBRLEN && HAVE_MBSTATE_T)]: Define.
(NEED_PATHCONF_WRAPPER, PATH_MAX, PATH_MAX_FOR, NAME_MAX,
pathconf_wrapper, portable_chars, dir_ok): Remove.
(NAME_MAX_MINIMUM, PATH_MAX_MINIMUM): New macros.
(pathconf, _PC_NAME_MAX, _PC_PATH_MAX): Define if nonexistent.
(portable_chars_only): New arg FILELEN.
Don't assume ASCII; we might be on an EBCDIC host.
Don't assume unibyte locale in diagnostic.
(component_start, component_len): New functions.
(validate_file_name): Renamed from validate_path. All uses changed.
Pretty much a complete rewrite.
Don't make copy of file arg. Always append trailing slash to
pathconf arg, just in case it's a symlink (this is pure paranoia;
we don't know of any hosts where the trailing slash is required).
Use size_t instead of long int when possible.
Avoid need to call pathconf in most practical cases.
Don't use euidaccess several times to test searchability;
just use lstat once. Reword diagnostic to put the (often very long)
file names last.
|
|
|
|
|
|
|
|
problems. All uses changed.
|
|
|
|
reference to obsolescent macro XMALLOC.
All uses replaced by xmalloc and free.
|
|
|
|
Reported by Nik A. Melchior in http://bugs.debian.org/273781.
|
|
|
|
|
|
and both cvs and cvsu handle the former.
|
|
(file_ignored): Renamed from file_interesting, with
inverted return value. Accept the file name, not a struct dirent *.
All uses changed. Avoid the expense of calling fnmatch if the
file is ignorable due to leading '.'.
(all_files, really_all_files): Removed; replaced by:
(ignore): New variable. All uses changed.
(IGNORE_DEFAULT, IGNORE_DOT_AND_DOTDOT, IGNORE_MINIMAL, HIDE_OPTION):
New constants.
(hide_patterns): New variable.
(long_options, decode_switches, file_ignored, usage):
Add support for --hide.
(patterns_match): New function.
(usage): Replace "hide" with "ignore" in explanation, to avoid
confusion.
|
|
|
|
human-readable output has a byte count equal to its column width;
this isn't always true in locales where the radix character is not
'.' or ','.
(format_user_or_group): Revamp code to match the above fix;
this avoids the (very faint) possibility of integer overflow.
|
|
|
|
to avoid a warning from gcc-3.4.1. Reported by Paul Eggert.
|
|
for obsolete option followed by non-obsolete, or by more
than one file. When obsolete, conform to SUSv2 rather than
original POSIX 1003.2-1992, as SUSv2 corrected the case of
"tail -c". Add support for the SUSv2 "b" modifier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(check): Depend on it.
|
|
|
|
|
|
|
|
to SIZE_MAX: GCC sometimes complains.
|
|
|
|
(verbose): Now bool, not int.
(VERBOSE_OPTION): New enum.
(longopts, main): Use it.
|
|
|
|
(main): Remove unused "case 0".
|
|
(main): Use longopts rather than parse_long_options.
Don't include "long-options.h".
|
|
(main): Use longopts rather than parse_long_options.
(main): Don't reorder arguments, so that we can check weird file names.
|
|
(long_opts): Standardize on NULL vs 0.
|
|
(long_options): Standardize on NULL vs 0.
|
|
(main): Use getopt where it suffices, not getopt_long.
|
|
|
|
|
|
|
|
(main): Use getopt where it suffices, not getopt_long.
|
|
(main): Reject unknown options.
|
|
(main): Reject unknown options.
|
|
|
|
(long_options, main): Remove support for undocumented and
obsolete --string option, as suggested in the 1996-09-26 patch.
|
|
(long_options, main): Use them instead of magic numbers 2 and 1.
For --string, optarg can't possibly be NULL.
|
|
(scanargs): Don't mess with argc, argv; getopt_long handles this now.
Say "operands" for operands, not "options".
(main): Use getopt_long, so that "dd --" works as POSIX requires.
|
|
|