Age | Commit message (Collapse) | Author |
|
|
|
From Justin Pryzby.
|
|
|
|
Use better macro parameter names: s/basename/key_name/,
s/basefunc/key_cmp_func. Fix typo in comment.
|
|
implies format_needs_type, not format_needs_stat.
|
|
in arg list, from Eric Blake.
|
|
choosing sort function; added new sort_numtypes member for
compile-time check.
(time_type): Add new time_numtypes member for compile-time check.
(directories_first): New global variable.
(GROUP_DIRECTORIES_FIRST_OPTION): New enum.
(long_options): Add --directories-first.
(main): Support new option.
(is_directory): New function.
(extract_dirs_from_files): Use it.
(DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
(LIST_SORTFUNCTION_VARIANTS): New macros.
(sort_functions): New global variable.
(sort_files): Use it.
(usage): Document new option.
|
|
(print_long_format): Use (new) filemodestring rather than
(old) mode_string, so that we get more file types right, at least
in theory. Adjust to filemode changes.
|
|
|
|
|
|
(main): Prefer dirent.d_ino to stat when possible.
(gobble_file): Add inode argument.
(print_dir): Pass inode if available.
(usage): Remove inaccuracy.
|
|
This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
|
|
is no requirement for ACL support; particularly, it does not exist
on systems that have POSIX ACLs.
|
|
|
|
turn acts like --time-style='posix-long-iso' if the locale settings
are messed up.
|
|
|
|
|
|
TIMESPEC_NS macro.
|
|
other-writable, and sticky-and-other-writable directories.
(indicator_no[]): Add new symbols.
(indicator_name[]): Add corresponding mode strings.
(color_indicator[]): Add an entry for each new mode string.
(print_color_indicator): Honor new types.
From Mike Frysinger, based on a patch from Fedora.
|
|
be paranoid, and add a comment explaining why.
Paul Eggert mentioned the possibility.
|
|
That cannot happen when the result date's year is in range.
Add an assertion instead.
|
|
|
|
stropt.h -> stropts.h
|
|
|
|
|
|
corresponding option string and value arrays are consistent.
|
|
when computing the --author column width. This bug might have
resulted in misaligned columns when using the --author option
on the Hurd. Spotted by Arnold Robbins.
The bug was introduced on 2003-12-03.
|
|
(clear_files): Clear it.
(gobble_file): Set it if a file has an ACL.
(print_long_format): Omit needless space unless some file has an ACL.
|
|
(make_link_name): Renamed from make_link_path. All uses changed.
|
|
|
|
|
|
|
|
--indicator-style=slash, to avoid confusion with ls --directory.
(slash): Renamed from directory_only. All uses changed.
|
|
for -p.
(indicator_style_args, indicator_style_types): Set it appropriately.
(decode_switches, gobble_file, print_type_indicator):
(length_of_file_name_and_frills):
Implement the change described in NEWS.
(decode_switches): Quote ">", too.
(usage): Update to match the new behavior. Describe ">".
|
|
|
|
All uses changed.
(siginterrupt) [! HAVE_SIGINTERRUPT]: New macro.
(main) [! SA_NOCLDSTOP]: Use it.
|
|
(format_args, sort_args, time_args, decode_switches)
(gobble_file): Use NULL, not `0'.
|
|
|
|
|
|
(long_time_expected_width, print_long_format): Use it, to avoid
some possible denial-of-service attacks.
|
|
so format string abuse cannot provoke stack overflow.
(print_long_format): Likewise.
|
|
|
|
(get_current_time): gettimeofday always returns 0, so don't
check its result.
|
|
directory", not "not listing already-listed directory: %s", to
format already-listed directories, to be consistent with other
diagnostics involving file names and colons.
|
|
rather than explicit_arg, for consistency with copy.c.
(extract_dirs_from_files): Remove ignore_dot_and_dot_dot arg, since
it is deducible from dirname arg. All callers changed.
(extract_dirs_from_files, print_dir, queue_directory):
Add command_line_arg arg. All callers changed.
(struct pending): Add command_line_arg member.
(main): Use NULL rather than 0 when appropriate.
(set_exit_status, file_failure): New functions.
(queue_directory): Store command_line_arg into new structure.
(print_dir, gobble_file, get_link_name):
Use file_failure to report problems in accessing files,
so that the exit status is set consistently.
(print_dir): Simplify readdir failure code yet again.
If closedir fails, report "closing directory" rather than "reading
directory" failure.
(xstrcoll): Use set_exit_status to set status on failure.
|
|
All uses of EXIT_FAILURE replaced with LS_FAILURE, unless
specified below.
(main): Initialize exit failure to LS_FAILURE.
(print_dir, gobble_file, get_link_name, xstrcoll):
Set exit status to LS_MINOR_PROBLEM if the failure is minor.
(print_dir): Do not give up on entire directory merely because readdir
returns EOVERFLOW.
(usage): Explain exit status.
|
|
executables, don't stat every file.
(is_colored): New function.
(gobble_file): Use it.
(main): Use it here, in place of too-strict tests against NULL:
if either ORPHAN or MISSING was set to 0 from LS_COLORS, the
old test would fail.
|
|
'volatile' on a local variable. Rewrite to avoid unnecessary
double-assignment to 'func' in the usual case where strcoll does
not fail.
|
|
--human-readable (-h), --inode (-i), --size (-s), --time,
and --time-style.
|
|
Tweak indentation so that help2man creates better nroff.
|