Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
by resorting the directory with strcmp instead.
Include <setjmp.h>.
Include "quote.h".
(compare_atime, rev_cmp_atime, compare_ctime, rev_cmp_ctime,
compare_mtime, rev_cmp_mtime, compare_size, rev_comp_size,
compare_name, rev_cmp_name, compare_extension, rev_cmp_extension,
compare_version, rev_compare_version): Move before use, so that
we can remove the forward declaration. Reimplement in terms of
the new functions described below, using xstrcoll instead of strcoll.
(failed_strcoll): New var.
(xstrcoll): New function.
(V): New type.
(cmp_ctime, compstr_ctime, rev_str_ctime): New functions.
(cmp_mtime, compstr_mtime, rev_str_mtime): Likewise.
(cmp_atime, compstr_atime, rev_str_atime): Likewise.
(cmp_size, compstr_size, rev_str_size): Likewise.
(cmp_version): Likewise.
(cmp_name, compstr_name, rev_str_name): Likewise.
(cmp_extension, compstr_extension, rev_str_extension): Likewise.
(sort_files): Use prototype for internal function var.
If the strcoll-based comparison fails, fall back on a strcmp-based one.
|
|
|
|
unless POSIXLY_CORRECT.
|
|
|
|
|
|
(xmemdup): Rename from `substr' and rewrite to
take only pointer/length parameters.
(build_spec_list): Update sole caller.
Properly diagnose the invalid specs [::] and [==].
Pawel Prokop reported that `tr [::] _' elicits a failed assertion.
|
|
|
|
support of the obsolete `touch [-acm] MMDDhhmm[YY] FILE...' syntax.
(usage, main): Implement this.
|
|
|
|
|
|
|
|
|
|
|
|
support of obsolete "+" option syntax in sort, tail, and uniq.
(usage, main): Implement this.
|
|
|
|
support of obsolete "+" option syntax in sort, tail, and uniq.
(usage, main): Implement this.
|
|
support of obsolete "+" option syntax in sort, tail, and uniq.
(usage, parse_obsolescent_option): Implement the above.
|
|
In particular, POSIX.2 is now obsolete.
|
|
In particular, POSIX.2 is now obsolete.
|
|
In particular, POSIX.2 is now obsolete.
|
|
|
|
(same_file_ok): Detect a case that would have lead to the errno==ENOENT
condition above (and a misleading diagnostic), and return 0 so we give
a diagnostic about the source and destination being the same file.
(copy_internal): Use an explicit test for errno==EXDEV to detect
that rename has failed because source and destination are on
different devices. This reverts part of a change from 1997-12-13,
and is to avoid letting a race condition evoke a bogus diagnostic.
Note that while POSIX has encouraged the errno==EXDEV test for
years, it was inadequate back in 1997. I'm hoping that many
more systems have conforming support these days.
Reported by Michael Gaughen <mgaughen@polyserve.com>
|
|
|
|
|
|
|
|
code in lib/ for compiling this program without config.h.
|
|
|
|
(long_options, usage, main): Add -B.
(usage): Deprecate --kilobytes, -m, --megabytes.
Document size suffixes.
(print_header, show_dev): Enlarge column widths for trailing "B".
|
|
(long_options, usage, main): Add -B.
(usage): Deprecate --kilobytes, -m, --megabytes.
Document size suffixes.
|
|
|
|
now preferred, as it connotes 1024) as well as 'k'.
|
|
|
|
is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
Accept 'K' as well as 'k'.
|
|
|
|
|
|
instead of hard-coding --help and --version descriptions.
Split --help output into smaller pieces.
Use fputs, not printf.
|
|
|
|
the ASCII space character.
|
|
Include the word `fail' in some diagnostics to make it clearer
that they indicate a failure.
s/getting attributes/failed to get attributes/
|
|
|
|
Include the word `fail' in some diagnostics to make it clearer
that they indicate a failure.
s/getting attributes/failed to get attributes/
|
|
Include the word `fail' in some diagnostics to make it clearer
that they indicate a failure.
s/getting attributes/failed to get attributes/
|
|
Include the word `fail' in some diagnostics to make it clearer
that they indicate a failure.
s/getting attributes/failed to get attributes/
|
|
Include the word `fail' in some diagnostics to make it clearer
that they indicate a failure.
s/getting attributes/failed to get attributes/
|