Age | Commit message (Collapse) | Author |
|
that in du and df. From Göran Uddeborg.
|
|
|
|
|
|
|
|
|
|
rev_cmp_mtime, compare_atime, rev_cmp_atime, compare_size,
rev_cmp_size): Use file name as secondary sort key to get
consistent sorting.
|
|
of quotearg_quoting_options.
|
|
Use #if !, not #ifndef with HAVE_ macros.
|
|
(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.
|
|
|
|
Suggestions from Andreas Schwab.
|
|
without -l or -t. Now, -u (like -c) implies --sort=time.
Suggestion from Andreas Schwab.
|
|
Include "closeout.h".
|
|
(print_dir, gobble_file, print_long_format,
print_file_name_and_frills): Print disk allocations human readably.
|
|
|
|
|
|
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.
|
|
to avoid shadowing local.
|
|
("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.
|
|
|
|
Remove free and malloc decls.
|
|
Masami Takikawa reported that this is necessary on NeXTStep 3.0 systems.
|
|
|
|
with the macro in locale.h of SunOS4.1.4.
|
|
|
|
|
|
|
|
|
|
|
|
(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.
|
|
|
|
|
|
variable when it is the empty string. Suggestion from Ulrich Drepper.
|
|
Otherwise, running `mkdir x; chmod 644 x; ls -d x/' (note the trailing
slash) makes ls fail with permission denied on at least Linux 1.2.13
and 2.0.14 systems.
|
|
|
|
when using --quote-name (-Q).
Feb 2 change wasn't complete. Patch from Mark Harris.
|
|
This fixes a problem whereby columns weren't aligned when some files
contained double quote characters and ls's --escape (-b) option was
used. Reported by Mark Harris.
|
|
to work better with new obstack functions.
|
|
|
|
*) 0' as last parameter in getopt_long call.
|
|
|
|
|
|
|
|
|
|
due to pathologically long strings in locale tables. Patch from Paul Eggert.
(print_long_format): Change references to BIGBUF in use of FPUT macro
to references to BUF.
Use 11 (not 20) bytes for mode string buffer.
|
|
|
|
|
|
ctime-oriented code. With internationalization and strftime,
you can't presume that %a expands to a 3-byte string.
Reported by Ross Ridge.
|
|
Quoting Joakim:
1) The "total" number and the size of the first file as
output from 'ls --color -s' did not get colorized according
to the "no"-argument in LS_COLORS. Fixed by adding a function
prep_non_filename_text which prints the C_LEFT C_NORM C_RIGHT
strings (or C_END). It is called from main before any text is
output, and from print_name_with_quoting after having output a
colorized filename.
2) If the "no"-argument of LS_COLORS is set, the terminal will be
set to print in that color after ls exits. The man-pages suggests
setting "no" and "fi" to the terminals default colors to avoid
the problem, but that would mean I can't use anything but the
default color for regular files and non-filename text. Fixed by
outputting C_LEFT immediately followed by C_RIGHT right before
exit, which restores the default color.
|
|
|