summaryrefslogtreecommitdiff
path: root/src/ls.c
AgeCommit message (Collapse)Author
2006-05-03(xstrcoll_df_version, rev_xstrcoll_df_version): Add space after commaJim Meyering
in arg list, from Eric Blake.
2006-04-23(sort_type): Rearrange to use as an array index whenJim Meyering
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.
2006-04-17(HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.Paul Eggert
(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.
2006-03-26(basename_is_dot_or_dotdot): Use new last_component, in place of base_name.Jim Meyering
2006-03-06(usage): Mention that -f disables --color.Paul Eggert
2006-02-26In ls, avoid calling stat for --inode (-i), when possible.Jim Meyering
(main): Prefer dirent.d_ino to stat when possible. (gobble_file): Add inode argument. (print_dir): Pass inode if available. (usage): Remove inaccuracy.
2006-01-10(gobble_file): Use DTTOIF only if it's defined.Jim Meyering
This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
2005-12-17Switch back from HAVE_ACL to USE_ACL: The acl() syscallJim Meyering
is no requirement for ACL support; particularly, it does not exist on systems that have POSIX ACLs.
2005-11-17(basename_is_dot_or_dotdot): Correct wording in comment.Jim Meyering
2005-11-08(decode_switches): ls now defaults to --time-style='locale', which inPaul Eggert
turn acts like --time-style='posix-long-iso' if the locale settings are messed up.
2005-11-07(usage): Fix descriptions of --sort, --time.Jim Meyering
2005-10-15(decode_switches): Warn about the deprecated --kilobytes option.Jim Meyering
2005-09-16Include stat-time.h, and use its functions instead of the obsoletePaul Eggert
TIMESPEC_NS macro.
2005-09-05Colorize set-user-ID and set-group-ID files and sticky,Jim Meyering
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.
2005-08-14(long_time_expected_width): Revert last change, just toJim Meyering
be paranoid, and add a comment explaining why. Paul Eggert mentioned the possibility.
2005-08-12(long_time_expected_width): Don't test for failed localtime.Jim Meyering
That cannot happen when the result date's year is in range. Add an assertion instead.
2005-08-12(sort_files): Use cleaner `sizeof *VAR_NAME' rather than `sizeof (TYPE_NAME)'.Jim Meyering
2005-07-09Use only HAVE_SYS_IOCTL_H to decide whether to include sys/ioctl.h.Paul Eggert
stropt.h -> stropts.h
2005-07-08Include stropt.h if available.Paul Eggert
2005-07-03Include "lstat.h" rather than rolling our own.Paul Eggert
2005-06-30Add uses of ARGMATCH_VERIFY to ensure thatJim Meyering
corresponding option string and value arrays are consistent.
2005-06-29(gobble_file): Use stat.st_author, not stat.st_uidJim Meyering
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.
2005-06-10(any_has_acl): New var.Paul Eggert
(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.
2005-06-02Don't use "path" or "filename".Paul Eggert
(make_link_name): Renamed from make_link_path. All uses changed.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-12Assume `free (NULL)' works.Jim Meyering
2005-05-02(usage): ls --indicator-style=directory renamed to lsPaul Eggert
--indicator-style=slash, to avoid confusion with ls --directory. (slash): Renamed from directory_only. All uses changed.
2005-04-29(enum indicator_style): New constant directory_only,Paul Eggert
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 ">".
2005-04-12(usage): uid -> user IDPaul Eggert
2005-04-09(SA_NOCLDSTOP): Define to 0 if not defined.Paul Eggert
All uses changed. (siginterrupt) [! HAVE_SIGINTERRUPT]: New macro. (main) [! SA_NOCLDSTOP]: Use it.
2005-03-28(time_style_args, indicator_style_args, long_options)Jim Meyering
(format_args, sort_args, time_args, decode_switches) (gobble_file): Use NULL, not `0'.
2005-03-26(usage): Document usage of LS_COLORS.Jim Meyering
2005-03-22(get_funky_string): Use '\a', rather than 7, for portability to EBCDIC hosts.Jim Meyering
2005-03-11(TIME_STAMP_LEN_MAXIMUM): New constant.Paul Eggert
(long_time_expected_width, print_long_format): Use it, to avoid some possible denial-of-service attacks.
2005-03-10(long_time_expected_width): Use x2nrealloc, not alloca,Jim Meyering
so format string abuse cannot provoke stack overflow. (print_long_format): Likewise.
2005-03-06Remove `register' keyword.Jim Meyering
2005-02-21(time): Remove obsolete decl.Paul Eggert
(get_current_time): gettimeofday always returns 0, so don't check its result.
2004-12-17(print_dir): Use "%s: not listing already-listedPaul Eggert
directory", not "not listing already-listed directory: %s", to format already-listed directories, to be consistent with other diagnostics involving file names and colons.
2004-12-14(gobble_file): Change arg name to be command_line_argPaul Eggert
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.
2004-12-09(LS_MINOR_PROBLEM, LS_FAILURE): New constants.Paul Eggert
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.
2004-12-02With using --color and with LS_COLORS saying not to colorJim Meyering
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.
2004-12-02(sort_files): Minor cleanup. Remove an unnecessaryPaul Eggert
'volatile' on a local variable. Rewrite to avoid unnecessary double-assignment to 'func' in the usual case where strcoll does not fail.
2004-11-19(usage): Clarified description of --no-group (-G),Jim Meyering
--human-readable (-h), --inode (-i), --size (-s), --time, and --time-style.
2004-11-19(usage): Clarify description of --author.Jim Meyering
Tweak indentation so that help2man creates better nroff.
2004-10-05(ignore_mode): Renamed from ignore, to avoid shadowingPaul Eggert
problems. All uses changed.
2004-10-05remove trailing blanks.Jim Meyering
2004-09-26Add "ls --hide".Paul Eggert
(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.
2004-09-26Remove unused variable.Paul Eggert
2004-09-26(gobble_file, print_long_format): Don't assume thatPaul Eggert
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.