summaryrefslogtreecommitdiff
path: root/src/ls.c
AgeCommit message (Collapse)Author
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
1998-08-13Include filemode.h.Jim Meyering
1998-08-02(compare_ctime, rev_cmp_ctime, compare_mtime,Jim Meyering
rev_cmp_mtime, compare_atime, rev_cmp_atime): Compare time stamps with subsecond resolution if available.
1998-06-29revert back to using lower case _unlocked wrapper namesJim Meyering
1998-06-29(human_readable_base, output_units): Remove;Jim Meyering
replace with new variable output_block_size. All uses changed. (long_options, usage, main): Add --block-size. (main, decode_switches): Use new human_block_size function to initialize output block size consistently with other programs. From Paul Eggert.
1998-06-29(usage): Make --kilobytes description consistent withJim Meyering
that in du and df. From Göran Uddeborg.
1998-06-29Change all uses of unlocked-wrapped functions to their upper case wrapper names.Jim Meyering
1998-06-28Add DIRED_ prefix to the macros: FPUTS and FPUTS_LITERAL.Jim Meyering
1998-06-28s/PUTCHAR/DIRED_PUTCHAR/g.Jim Meyering
1998-04-14Use STREQ in string equality tests, not strcmp.Jim Meyering
1998-04-01(compare_ctime, rev_cmp_ctime, compare_mtime,Jim Meyering
rev_cmp_mtime, compare_atime, rev_cmp_atime, compare_size, rev_cmp_size): Use file name as secondary sort key to get consistent sorting.
1998-03-21(decode_switches): Pass a null pointer instead of addressJim Meyering
of quotearg_quoting_options.
1998-03-15Use #if, not #ifdef with HAVE_ macros.Jim Meyering
Use #if !, not #ifndef with HAVE_ macros.
1998-02-25Include new file quotearg.h.Jim Meyering
(enum indicator_style): Rename all to classify, and not_programs to file_type, to match option spellings. All users changed. (indicator_style_args): New constant. (quote_funny_chars, quote_as_string, quote_shell): Remove; (filename_quoting_options, dirname_quoting_options): Use these variables instead. (long_options): Add --indicator-style, --quoting-style, --show-control-chars. Remove --quote-shell. (dired_dump_obstack): Remove style parameter and don't output style. (main): Go back to previous method of outputting //DIRED// and //SUBDIRED// lines, without style. But add a new //DIRED-OPTIONS// line that does output style. (decode_switches, usage): Add --indicator-style, --quoting-style, --show-control-chars. Remove --quote-shell. (decode_switches): Default from QUOTING_STYLE environment variable. Set new quoting vars. (quote_name): Renamed from quote_filename. Take new arg specifying quoting options. Always print; do not have a special case for null FILE * argument. All callers changed. Move the guts of this function to new file quotearg.c. (length_of_file_name_and_frills): Use quotearg_buffer instead of (old) quote_filename to find length of file name. (decode_switches, parse_ls_color, print_dir, gobble_file, get_link_name): Quote output in diagnostics.
1998-01-23add curliesJim Meyering
1998-01-10(usage): Correct descriptions of --sort, --time, and -t.Jim Meyering
Suggestions from Andreas Schwab.
1998-01-10(decode_switches) [-u]: Fix bug whereby -u had no effectJim Meyering
without -l or -t. Now, -u (like -c) implies --sort=time. Suggestion from Andreas Schwab.
1998-01-04(main, usage): Check for write error to stdout before exiting.Jim Meyering
Include "closeout.h".
1997-12-31(decode_switches): -h and -H override output units.Jim Meyering
(print_dir, gobble_file, print_long_format, print_file_name_and_frills): Print disk allocations human readably.
1997-12-16s/__P/PARAMS/gJim Meyering
1997-12-16tweak indentationJim Meyering
1997-12-16(struct bin_str): Make len int, not unsigned, to avoidJim Meyering
bogus comparison < 0. (quote_filename): Add forward decl. (decode_switches): -b, -e, -N, -Q are now mutually exclusive. (print_dir): Quote directory name as per quoting options. (print_long_format): Don't count color changes as part of file name. (quote_filename): Revamp interface: now accepts stream to output to and filename, and returns length of quoted filename. This removes duplicated code and should make errors less likely. Also, no longer mallocs storage. All callers changed. Don't quote ' ' if -Q. (OUTCHAR): New macro. (SAVECHAR, SAVE_2_CHARS): Remove. (print_name_with_quoting): New stack arg. All callers changed. (print_color_indicator): Cast ext len to size_t to avoid warning with GCC 2.8. (length_of_file_name_and_frills): Rewrite to use quote_filename. This fixes bug when computing file name length with -e. 1997-12-14 Paul Eggert <eggert@twinsun.com> Add shell style quoting, and make it the default. * NEWS, doc/fileutils.texi: Describe -e, which is now the default. Describe change to --dired output. * src/ls.c (quote_shell): New var. (long_options, decode_switches, usage): New option -e or --quote-shell. (dired_dump_obstack): New arg STYLE. (main): Pass quoting style to dired_dump_obstack. (decode_switches): -N now clears quote_as_string. (quote_filename): Add shell style quoting.
1997-11-30(print_long_format): Rename inner-scoped `buf' arrays to `hbuf'Jim Meyering
to avoid shadowing local.
1997-11-30(<inttypes.h>): Include if HAVE_INTTYPES_H.Jim Meyering
("human.h"): Include. (<limits.h>): Don't include; system.h does it now. (INT_MAX): Remove. (longdiff): Remove bogus definition that uses subtraction; it gives the wrong answer when overflows occur. (convert_blocks): Remove. (output_units): New variable; replaces booleans kilobyte_blocks and megabyte_blocks. (human_readable_base): New variable. (long_options, usage): Add -h or --human-readable and -H or --si. (decode_switches): Adjust to renamed option variables. Use -H if BLOCKSIZE is SI. Add -h, -H. (print_dir): Count blocks using uintmax_t, not int. (gobble_file): Now returns uintmax_t, not int. Don't convert blocks to 512 byte units, as this might overflow; let caller handle the problem. Deduce what caller will print by invoking human_readable. (print_long_format, print_file_name_and_frills): Don't assume inode number, block count, file size fit in unsigned long. Use human_readable to do block count conversion and to print file sizes. (prep_non_filename_text): Print decimal string for time if localtime fails due to enormous time_t.
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
1997-10-23Remove stpcpy decl.Jim Meyering
Remove free and malloc decls.
1997-10-13Bracket inclusion of termios.h with #ifdef HAVE_TERMIOS_H.Jim Meyering
Masami Takikawa reported that this is necessary on NeXTStep 3.0 systems.
1997-10-07update bug-reporting addressJim Meyering
1997-09-14(struct col_info) [valid_len]: Rename from `valid' which conflictedJim Meyering
with the macro in locale.h of SunOS4.1.4.
1997-09-14(print_horizontal): Add some non-essential curly braces.Jim Meyering
1997-09-14(print_many_per_line): Add some non-essential curly braces.Jim Meyering
1997-09-02[!STDC_HEADERS]: Declare malloc.Jim Meyering
1997-07-06Add new option: --sort=version (-v).Jim Meyering
1997-07-06(print_long_format): Reflect changes in semantics of getuser, getgroup.Jim Meyering
1997-06-22Use variable width columns when printing in multi-column mode.Jim Meyering
(init_col_info): New function. (print_current_files): Call init_col_info if format is `many_per_line' or `horizontal'. (print_many_per_line): Calculate optimum column widths. (print_horizontal): Likewise. From Ulrich Drepper.
1997-05-25declare strip_trailing_slashesJim Meyering