]> git.ipfire.org Git - thirdparty/coreutils.git/commit
(struct bin_str): Make len int, not unsigned, to avoid
authorJim Meyering <jim@meyering.net>
Tue, 16 Dec 1997 15:09:19 +0000 (15:09 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 16 Dec 1997 15:09:19 +0000 (15:09 +0000)
commit36665a74644aa91bae9dac292f85ad246fd8de3e
tree5bbc35b1b536ae92b18f4916f0de8d7150acec9d
parent1ca40285b28543af1e99434f22c889647ddf9647
(struct bin_str): Make len int, not unsigned, to avoid
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.
src/ls.c