Age | Commit message (Collapse) | Author |
|
|
|
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
|
|
|
|
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
|
|
|
|
clobbered by a `longjmp' into this function.
|
|
Don't include stdlib.h.
|
|
adequate, since join.c uses alloca, yet lacked an in-file #pragma.
Remove `#pragma alloca'.
|
|
|
|
in e.g. 1,000,000 and 1,048,576. Instead, do this:
`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
|
|
|
|
|
|
store the screen columns, and return the number of bytes instead.
(print_dir): Pass NULL as fourth parameter of quote_name.
(print_name_with_quoting): Likewise.
(length_of_file_name_and_frills): Get the width from the fourth
parameter of quote_name instead of return value.
|
|
`format == long_format', then silently reset dired. This doesn't
change the behavior of ls (all prior uses of dired were protected
by `&& format == long_format'), and lets us...
(DIRED_INDENT): ... remove `format == long_format' conjunct.
(PUSH_CURRENT_DIRED_POS): Likewise.
(main): Likewise.
|
|
(enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member.
(long_options): Add option --dereference-command-line-symlink-to-dir.
(main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default,
rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the
-d, -F, -l options is specified.
(decode_switches): Handle --dereference-command-line-symlink-to-dir.
(gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR.
Change --dereference-command-line (-H) to dereference *all*
command line arguments, including broken symlinks.
|
|
compatible with FreeBSD and the POSIX spec is confusing
and somewhat contradictory.
(DEREF_COMMAND_LINE_ARGUMENTS): Change name back
from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses.
(long_options): Change the long option name back.
(usage): Change the usage back.
(gobble_file): When -H is specified, dereference a top-level
arg even if it points to a non-directory.
|
|
when --dereference (-L) is not specified, and
- when operating on a dangling symlink
- when operating on command-line-symlink-to-directories
This fixes numerous problems. Here are examples:
- `ls dangling-symlink' would fail with `no such file...'
Now it prints `dangling-symlink'.
- `ls -i symlink' would mistakenly print the inode of the referent.
Now it prints the inode of the symlink. Likewise for --size (-s).
Based on a patch from Michael Stone.
Reported by Deepak Goel as Debian bug #173793.
|
|
option to --dereference-command-line-symlink-to-dir.
[enum Dereference_symlink]
(DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from
DEREF_COMMAND_LINE_ARGUMENTS. Update all uses.
(long_options): Rename the option.
(usage): Say that --dereference-... changes how ls treats
only symlinks to directories specified on the command line.
|
|
so that ls --color would no longer highlight the names of files with
the execute bit set when not specified on the command line.
Patch by Michael Stone. Reported by Stephen Depooter as
Debian bug 175135.
|
|
[struct dev_ino]: Remove declaration.
|
|
|
|
Include strftime.h instead.
|
|
regular file and --indicator-style=classify (aka -F).
|
|
entry on systems with valid dirent.d_type.
(print_dir): Add DT_LNK and DT_REG.
(main): Make --recursive set format_needs_type, not format_needs_stat.
(gobble_file): Remove a FIXME comment, now that this is fixed.
|
|
`ls --color -F symlink-to-dir' to list the files in
`symlink-to-dir/.'. Now, it prints `symlink-to-dir@',
(just like `ls -F symlink-to-dir') but with the addition
of highlighting.
|
|
decode the QUOTING_STYLE environment variable. This is more
consistent with the documentation, and with --quoting-style.
|
|
Replace sole use with equivalent `#ifdef S_ISLNK'.
Inconsistency reported by Dmitry V. Levin.
|
|
Based on suggestions from Solar Designer and Dmitry V. Levin.
Add comments.
|
|
(sighandler): New function, based on the one in sort.c.
(main): Use sigaction, if possible; otherwise signal.
Handle these signals:
SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP.
Don't register our handler if the signal is already being ignored.
|
|
|
|
Include "full-write.h" and <signal.h>.
(restore_default_color, restore_default_color_handler): New functions.
(sigtstp_handler, put_indicator_direct): New functions.
(main) [print_with_color]: Register signal handlers.
Patch mostly by Solar Designer and Stanislav Ievlev.
|
|
Use primitives from inttostr.h, not
human.h, to print large numbers simply.
(human_output_opts): New var.
(output_block_size): Now uintmax_t, not int, to handle larger
block sizes. All uses changed.
(file_output_block_size): New var, to distinguish
file sizes from other sizes.
(decode_switches): Set it.
|
|
since it's already included from sys2.h via system.h.
|
|
On some systems (at least EMC Celerra and Solaris5.8),
this appears to be necessary.
(print_dir): Rename local variable: reading -> dirp.
|
|
|
|
Add long_iso_time_style.
(time_style_args, time_style_types, decode_switches): Likewise.
(decode_switches): If a time style is prefixed by "posix-", ignore
it if in the POSIX locale. Default style is now posix-long-iso.
(usage): Explain the above.
|
|
|
|
(ID_LENGTH_MAX): Define.
(ST_DM_MODE): New macro. Code moved from...
(print_long_format): ...here.
(print_long_format): Itemize and comment the individual parts
of init_bigbuf. Use the above *_MAX macros.
|
|
(print_author): New var.
(AUTHOR_OPTION): New enum val.
(long_options, decode_switches, print_long_format, usage):
Support --author.
(format_user): New function.
(print_long_format): Use it. Make print buffer a bit bigger.
|
|
|
|
|
|
|
|
(USE_ACL): Remove; replaced by HAVE_ACL everywhere.
(gobble_file): Use file_has_acl rather than doing it ourselves.
|
|
|
|
by resorting the directory with strcmp instead.
Include <setjmp.h>.
Include "quote.h".
(compare_atime, rev_cmp_atime, compare_ctime, rev_cmp_ctime,
compare_mtime, rev_cmp_mtime, compare_size, rev_comp_size,
compare_name, rev_cmp_name, compare_extension, rev_cmp_extension,
compare_version, rev_compare_version): Move before use, so that
we can remove the forward declaration. Reimplement in terms of
the new functions described below, using xstrcoll instead of strcoll.
(failed_strcoll): New var.
(xstrcoll): New function.
(V): New type.
(cmp_ctime, compstr_ctime, rev_str_ctime): New functions.
(cmp_mtime, compstr_mtime, rev_str_mtime): Likewise.
(cmp_atime, compstr_atime, rev_str_atime): Likewise.
(cmp_size, compstr_size, rev_str_size): Likewise.
(cmp_version): Likewise.
(cmp_name, compstr_name, rev_str_name): Likewise.
(cmp_extension, compstr_extension, rev_str_extension): Likewise.
(sort_files): Use prototype for internal function var.
If the strcoll-based comparison fails, fall back on a strcmp-based one.
|
|
|
|
|
|
instead of hard-coding --help and --version descriptions.
|
|
listings didn't have a blank line between per-directory groups of files.
(print_dir): Print a newline before each directory name
except the first one, rather than after each except the last, since
now (after the changes of 2001-11-01) detecting whether a `pending*'
is the last would involve more work. Reported by Andreas Schwab.
This change has no net effect.
(main): Remove always-true conjunct and add a comment.
|
|
(main): Don't `call' GETTIMEOFDAY_INIT.
|