summaryrefslogtreecommitdiff
path: root/src/ls.c
AgeCommit message (Collapse)Author
2000-11-19(BLOCK_SIZE_OPTION, COLOR_OPTION, FORMAT_OPTION,Jim Meyering
INDICATOR_STYLE_OPTION, QUOTING_STYLE_OPTION, SHOW_CONTROL_CHARS_OPTION, SORT_OPTION, TIME_OPTION): New enum values, to ensure that option values can't collide with chars. (long_options, decode_switches): Use them.
2000-11-18Revert change of 2000-11-11. It inadvertently changeJim Meyering
the output format of `ls -l --full-time'.
2000-11-12(print_long_format): Remove obsolete comment (strftime vs. ctime).Jim Meyering
From Paul Eggert.
2000-11-12(<langinfo.h>): Include if HAVE_LANGINFO_H.Jim Meyering
(DATE_FMT_LANGINFO): New macro, taken from sh-utils/src/date.c. (print_long_format): Use it to determine "date" format. Do not wrap "%b %e %Y" and "%b %e %H:%M" in _(), as it results in incorrect behavior when LC_ALL is unset, LC_TIME is "C", and LC_MESSAGES or LANG is set to something disagreeing with the POSIX locale.
2000-11-11(print_long_format): Wrap the --full-time' date formatJim Meyering
string in _(...), so it too may be internationalized. Suggestion from Jungshik Shin.
2000-10-29(DT_INIT): Define.Jim Meyering
[enum filetype]: Remove the #ifdef, and use DT_INIT on the initializers instead.
2000-10-28[enum filetype] (arg_directory): Rather than `100', useJim Meyering
a number that should never conflict with another DT_* value. From Ulrich Drepper.
2000-10-28(main): In call to gobble_file with `"."', use `directory'Jim Meyering
as the type, not `unknown'. From Ulrich Drepper.
2000-10-28Make `ls' a lot more efficient on systems (e.g., linux-2.4.*)Jim Meyering
that save file type information in directory entries. [enum filetype] (unknown): Add members (as yet unused): (HAVE_STRUCT_DIRENT_D_TYPE): Define. (format_needs_type): New global. (main): Set it. (print_dir): Set `type' from directory entry, if possible. (gobble_file): Add a parameter, TYPE. Stat the file only if its type is unknown and we need the type. Patch from Ulrich Drepper.
2000-10-22(print_long_format): Wrap date format strings in _(...)Jim Meyering
so they may be internationalized. Suggestion from Christian Rose.
2000-09-03Use strcoll (not strcmp) when comparing file names.Jim Meyering
2000-07-29Include <limits.h>, <stdlib.h>, <wchar.h>, <wctype.h>.Jim Meyering
(quote_name): Use mbrtowc to step through the filename string while replacing nonprintables with question marks. Return the screen width, not the strlen length. Do no output if the out stream is NULL. (length_of_file_name_and_frills): Use the quote_name return value.
2000-07-17Avoid warnings.Jim Meyering
(struct bin_str): Declare `string' member to be `const'. (put_indicator): Declare local `p' to be `const'.
2000-06-16(print_dir, gobble_file, print_long_format, print_file_name_and_frills):Jim Meyering
Round disk usage up.
2000-05-13Arrange to call close_stdout only upon exit.Jim Meyering
2000-04-08Add support for "ln=target" in the LS_COLORS variable,Jim Meyering
to colorize links as for the file/directory pointed to.
2000-02-29(decode_switches): Remove `e' from getopt_long's list ofJim Meyering
option characters. Reported by John Summerfield.
1999-12-19[! LSTAT_FOLLOWS_SLASHED_SYMLINK]: Use lstat wrapper.Jim Meyering
[Notice the new test in m4/lstat-slash.m4. ] (main): Back out change from 1999-02-19 that made ls remove trailing slashes from command line arguments to accommodate early versions of Linux. Now, `ls symlink-to-dir/' acts like `ls symlink-to-dir/.' thus following the symbolic link, as POSIX says it should. Suggestion from Bruno Haible and Andreas Schwab.
1999-12-15(decode_switches): If -c or -u is specified and not -l (or any otherJim Meyering
option that implies -l), and no sort-type was specified, then sort by the ctime (-c) or atime (-u). Part of this change reverts the 1998-01-10 delta. (usage): Update to reflect this change. Reported by Paul Slootman via Michael Stone.
1999-12-04(check_symlink_color): New variable.Jim Meyering
(main): Set it if we need to check for dangling symlinks when displaying colors. (gobble_file): Check check_symlink_color instead of print_with_color.
1999-11-30(usage): Shorten help for --show-control-chars.Jim Meyering
1999-11-06(long_options): Correct typo (s/'F'/'p'/) so that `-p'Jim Meyering
works as the short form of --file-type, per the documentation. From Michael Stone.
1999-09-01Remove declaration of xstrdup.Jim Meyering
1999-08-10(usage): Add ls --quoting-style=locale.Jim Meyering
1999-07-30(usage): Explain about default wrt --hide-control-chars andJim Meyering
--show-control-chars. Reported by Germano Leichsenring.
1999-05-05(USE_ACL): Define this only #ifJim Meyering
(HAVE_SYS_ACL_H && HAVE_ACL && defined GETACLCNT). Use `USE_ACL' in place of `HAVE_ACL' everywhere else. From Kaveh Ghazi.
1999-05-01(decode_switches): Use STDIN_FILENO, STDOUT_FILENO instead of 0, 1.Jim Meyering
1999-04-11`ls --color' would segfaultJim Meyering
Include assert.h. (color_indicator[]): Add an entry for the type, `door.' (main): Assert that the lengths of the color_indicator and indicator_name arrays are appropriately related.
1999-04-04(print_long_format): Add a space between %s and %3u. ThisJim Meyering
assures that even when modebuf has the trailing `+' and there are more than 99 hard links to a file, the permissions string and the link count will be separated.
1999-04-02[HAVE_SYS_ACL_H]: Include sys/acl.h.Jim Meyering
(struct fileinfo): New member `have_acl'. (gobble_file): Initialize it. (print_long_format): Use it. Mostly from Alen Muzinic.
1999-03-31Don't include closeout.h or version-etc.h explicitly. Now, they're included ↵Jim Meyering
via sys2.h.
1999-03-31(AUTHORS): Actually define and use.Jim Meyering
1999-03-26No longer include long-options.h.Jim Meyering
Include version-etc.h instead. (PROGRAM_NAME): Define. [long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
1999-03-20[WINSIZE_IN_PTEM]: Include sys/stream.h and sys/ptem.h.Jim Meyering
Required by SCO ODT 2.0 systems. Reported by William Bader.
1999-03-04Include long-options.hJim Meyering
[long_options]: Remove the "help" and "version" entries. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-02-03(S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR):Jim Meyering
Define to zero if not already defined. (HAVE_SYMLINKS): Define. (gobble_file): Remove #ifdef. (get_link_name, make_link_path): Guard these with #if HAVE_SYMLINKS rather than #ifdef S_ISLNK. (print_type_indicator): Remove #ifdefs and reorganize. (print_color_indicator): Remove #ifdefs. (length_of_file_name_and_frills): Likewise.
1999-02-03(print_type_indicator): Print doors as '>'.Jim Meyering
(length_of_file_name_and_frills): Account for this.
1999-01-16Don't declare base_name.Jim Meyering
Use function-style XARGMATCH once again.
1999-01-11(decode_switches): Now that escape_quoting_style no longerJim Meyering
escapes the SPACE character, arrange for SPACEs to be quoted here.
1999-01-02Adapt to use new interface to XARGMATCH.Jim Meyering
1999-01-02use XARGMATCH, not XARGCASEMATCHJim Meyering
1998-12-31(indicator_style_types): New variable.Jim Meyering
(format_types): Rename from `formats'. (color_args): Remove unnecessary `no' string. (color_types): Remove corresponding `color_never' entry. (main): Use ARGMATCH_TO_ARGUMENT. (decode_switches): Use ARGCASEMATCH instead of argmatch code in each of several cases. From Akim Demaille.
1998-12-12In order to distinguish col(umn|or):Jim Meyering
(init_column_info): Renamed from init_col_info. (struct column_info): Renamed from struct col_info. (struct color_ext_type): Renamed from struct col_ext_type. From Akim Demaille.
1998-12-12* src/ls.c: Group DIRED's code together.Jim Meyering
(full_time, inhibit_group, col_ext_type): Declare static. (dired_dump_obstack): Apply sizeof to variable, instead of its type. (parse_ls_color): Rename ext2 as e2. Move into the block where it is used. From Akim Demaille.
1998-12-07declare base_nameJim Meyering
1998-12-06Fix `ls -R .' formatting bug that broke mktexlsr.Jim Meyering
Include path-concat.h. (basename_is_dot_or_dotdot): New function, derived from is_not_dot_or_dotdot. (is_not_dot_or_dotdot): Remove function. (extract_dirs_from_files): Use `!basename_is_dot_or_dotdot' instead of is_not_dot_or_dotdot and use path_concat instead of attach.
1998-09-19update bug-reporting addressJim Meyering
1998-09-07(print_dir_name): Put back.Jim Meyering
(print_dir): Also print directory name header if print_dir_name is true.
1998-08-29(print_dir_name): Remove global variable.Jim Meyering
(print_dir): When trace_dirs is set, always print the directory name header.
1998-08-15(qmark_funny_chars): Add comment from Paul eggert.Jim Meyering