Age | Commit message (Collapse) | Author |
|
Define to 256, not 255, as per modern POSIX.
|
|
|
|
|
|
|
|
(longopts, usage, main, validate_file_name):
Add support for new -P option.
Reject empty file names (unless -p is not specified and the
current system allows empty file names).
Change --portability so that is now equivalent to -p -P.
Don't test whether file name is too long, if it is known to exist.
(no_leading_hyphen): New function.
|
|
diagnostic when pathconf fails. This also avoids an unwarranted
warning from gcc-3.3.5 about a format not being a string literal.
|
|
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.
|
|
(main): Use longopts rather than parse_long_options.
(main): Don't reorder arguments, so that we can check weird file names.
|
|
(portable_chars_only): Use to_uchar rather than a cast.
|
|
(dir_ok): Use euidaccess, not access.
|
|
|
|
too few operands ("missing operand after `xxx'") or
too many operands ("extra operand `xxx'").
Include "quote.h" and/or "error.h" if it wasn't already being included.
|
|
|
|
parse_long_options, so that it works even on systems for which
sizeof char* != sizeof int.
|
|
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.
* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
|
|
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
|
|
|
|
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
|
|
|
|
so it matches `%ld' format even on 32-bit systems.
|
|
|
|
Don't include closeout.h.
|
|
|
|
|
|
in cast to avoid warning from icc. Reported by Alexandre Duret-Lutz.
|
|
|
|
in case it's already defined.
|
|
(pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
not its (constant) address -- against zero.
|
|
In particular, POSIX.2 is now obsolete.
|
|
instead of hard-coding --help and --version descriptions.
Split --help output into smaller pieces.
Use fputs, not printf.
|
|
`and'.
|
|
rather than with `#ifdef _POSIX_VERSION'.
|
|
(NAME_MAX_FOR): Likewise.
(pathconf_wrapper): New function.
(validate_path): Declare length variables to be `long', not `int'.
Adjust corresponding printf-style specs to use %ld.
|
|
(main): Call atexit with close_stdout.
|
|
|
|
|
|
|
|
|
|
[long_options]: Remove the "help" and "version" entries.
Remove declarations of show_help and show_version.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
|
|
Move function be the first in the file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|