summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2003-01-27(quote_name): Add fourth parameter, width, into which toJim Meyering
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.
2003-01-27(check-misc): Check for st_blocks, too.Jim Meyering
2003-01-27(print_stat): Use ST_NBLOCKS rather than `->st_blocks'.Jim Meyering
2003-01-27(decode_switches): If `dired' is set withoutJim Meyering
`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.
2003-01-21(remove_entry) [ROOT_CAN_UNLINK_DIRS && HAVE_STRUCT_DIRENT_D_TYPE]: If a fileJim Meyering
has d_type == DT_UNKNOWN it may still be a directory -- or not (e.g., with FreeBSD on an NFS-mounted file system), so resort to calling lstat to find out.
2003-01-20Rename type: DS -> Dirstack_state.Jim Meyering
2003-01-20Remove some unnecessary parentheses.Jim Meyering
2003-01-19Include "canonicalize.h".Jim Meyering
2003-01-18(Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]: New member.Jim Meyering
(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.
2003-01-18Change ls -H back to the way it was yesterday, since this isJim Meyering
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.
2003-01-16.Jim Meyering
2003-01-15(gobble_file): Fall back on using lstat when required:Jim Meyering
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.
2003-01-15Rename ls's --dereference-command-line (-H)Jim Meyering
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.
2003-01-14(gobble_file): Fix a bug introduced in 4.5.4 that made itJim Meyering
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.
2003-01-13(long_opts): --zero does not require an argument.Jim Meyering
Patch by Michael Stone.
2003-01-12(usage): Document --first-only and mention that --tabs=N (-t) enables --all ↵Jim Meyering
(-a).
2003-01-11Include "canonicalize.h".Jim Meyering
Use canonicalize_file_name unconditionally.
2003-01-10*** empty log message ***Jim Meyering
2003-01-10Don't include xalloc.h.Jim Meyering
It's already included via system.h.
2003-01-10Include "xgetcwd.h".Jim Meyering
2003-01-10Remove declaration of xstrdup.Jim Meyering
Instead, include "xalloc.h".
2003-01-09copyrightJim Meyering
2003-01-09(bin_PROGRAMS): Add readlink.Jim Meyering
2003-01-09New program, by Dmitry V. Levin.Jim Meyering
2003-01-09When selecting ranges of byte offsets (as opposed to ranges of fields)Jim Meyering
and when --output-delimiter=STRING is specified, output STRING between ranges of selected bytes. (RANGE_START_SENTINEL): Define. (output_delimiter_specified): New global. (print_kth): Add parameter. Adjust all callers. (set_fields): Mark each range-start index with RANGE_START_SENTINEL. (cut_bytes): When requested, output STRING between ranges of selected bytes. (main): Make a diagnostic a little clearer. Based on a patch from Jan Nieuwenhuizen.
2003-01-09(set_fields): Make code agree with comment:Jim Meyering
Don't merge abutting ranges like 4- and 2-3. This makes no difference currently, but is required to support an upcoming change.
2003-01-07(set_fields): Fix typo in comment.Jim Meyering
2003-01-07tweak commentJim Meyering
2003-01-07add a commentJim Meyering
2003-01-04Remove use of PARAMS.Jim Meyering
2003-01-04Remove use of PARAMS.Jim Meyering
2003-01-04Remove use of PARAMS.Jim Meyering
2003-01-04rm could be tricked into mistakenly reporting a cycle.Jim Meyering
* src/remove.c: [cycle_check_state]: New global. (remove_cwd_entries): Adapt to new semantics of cycle_check. (rm): Call cycle_check_init and cycle_check_free for each file. When rm detects a cycle, don't abort the entire command, but rather just the affected command line argument. * src/remove.c: Include <setjmp.h> (struct dirstack_state) [current_arg_jumpbuf]: New member. (remove_cwd_entries): Call longjmp if we detect a cycle. (rm): Call setjmp here. * src/remove.c (cycle_check, is_power_of_two): Remove functions. Instead, include cycle-check.h and use it.
2003-01-04(struct dev_ino): Remove declaration.Jim Meyering
2003-01-04Don't include trailing /. in diagnostics about directories.Jim Meyering
(full_filename_): When FILENAME is just `.' and there is a nonempty directory-name part, don't append `/.'.
2003-01-04(remove_cwd_entries): Fix typos in comment.Jim Meyering
2003-01-04(struct dirstack_state): Define.Jim Meyering
To be used in place of these file-scoped globals ... (dir_stack, len_stack, Active_dir): Remove globals. (ds_init, ds_free): New functions. (full_filename): Define. (full_filename_): Rename from full_filename. Begin to make AD_* functions more generic. (AD_push_initial): Don't set status to RM_OK here. (AD_push): Likewise. (AD_INIT_OTHER_MEMBERS): Define. (remove_dir): Define the `status' member manually after each call to AD_push or AD_push_initial.
2003-01-04(check-misc): New rule, to ensure that no moreJim Meyering
S_IS* macro definitions sneak into the code. (check): Depend on check-misc.
2003-01-04[S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define.Jim Meyering
They're already defined in sys2.h.
2003-01-04remove blank lineJim Meyering
2003-01-04(count_entry) [S_ISLNK]: Don't define.Jim Meyering
It's already defined in sys2.h.
2003-01-04[S_ISLNK]: Don't define. It's already defined in sys2.h.Jim Meyering
2003-01-03Add copyright.Jim Meyering
(AUTHORS): I suppose I've written it.
2003-01-03(false.c): Make the generated file be read-only.Jim Meyering
2003-01-03(do_copy): Tweak diagnostic to be consistent with the oneJim Meyering
from mv: s/missing file arguments/missing file argument/. With --target-directory=DIR, cp and mv work with a single file argument. Reported by Karl Berry.
2003-01-03Include "dev-ino.h".Jim Meyering
[struct dev_ino]: Remove declaration.
2002-12-21.Jim Meyering
2002-12-20(touch): Change the wording of a diagnostic soJim Meyering
that it makes sense both when the file exists and when it doesn't.
2002-12-18(valid_options): Declare to be static.Jim Meyering
2002-12-15Remove all uses of `PARAMS'.Jim Meyering