summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorLines
2003-01-31ditto for invalid optionsJim Meyering-2/+2
2003-01-31(main): Upon processing a bad --exclude-from or --max-depthJim Meyering-12/+21
option argument, don't exit right away, in case there are others. Rather record the failure and exit after processing other options.
2003-01-31Rewrite to perform directory traversal using nftw.Jim Meyering-254/+239
Include "dirname.h", "ftw.h", and "quotearg.h". (AUTHORS): Add self. (opt_one_file_system): Move global into `main'. (path, xstat, exit_status): Remove declarations. (arg_length, suffix_length): New globals. (G_fail): New global, sort of like the old `exit_status'. (IS_FTW_DIR_TYPE): Define. (print_only_size): New function. (process_file): New function. (str_init, ensure_space, str_copyc, str_concatc): Remove functions. (str_trunc, pop_dir, count_entry): Likewise. (du_files): Rewrite to use nftw.
2003-01-27(quote_name): Add fourth parameter, width, into which toJim Meyering-12/+29
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-0/+5
2003-01-27(print_stat): Use ST_NBLOCKS rather than `->st_blocks'.Jim Meyering-2/+2
2003-01-27(decode_switches): If `dired' is set withoutJim Meyering-6/+10
`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-1/+1
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-25/+27
2003-01-20Remove some unnecessary parentheses.Jim Meyering-6/+6
2003-01-19Include "canonicalize.h".Jim Meyering-0/+1
2003-01-18(Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]: New member.Jim Meyering-9/+30
(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-18/+11
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-31/+49
2003-01-15(gobble_file): Fall back on using lstat when required:Jim Meyering-5/+31
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-5/+7
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-2/+8
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-1/+1
Patch by Michael Stone.
2003-01-12(usage): Document --first-only and mention that --tabs=N (-t) enables --all ↵Jim Meyering-6/+7
(-a).
2003-01-11Include "canonicalize.h".Jim Meyering-72/+4
Use canonicalize_file_name unconditionally.
2003-01-10*** empty log message ***Jim Meyering-0/+1
2003-01-10Don't include xalloc.h.Jim Meyering-1/+0
It's already included via system.h.
2003-01-10Include "xgetcwd.h".Jim Meyering-6/+4
2003-01-10Remove declaration of xstrdup.Jim Meyering-1/+1
Instead, include "xalloc.h".
2003-01-09copyrightJim Meyering-1/+1
2003-01-09(bin_PROGRAMS): Add readlink.Jim Meyering-1/+1
2003-01-09New program, by Dmitry V. Levin.Jim Meyering-0/+156
2003-01-09When selecting ranges of byte offsets (as opposed to ranges of fields)Jim Meyering-12/+55
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-1/+1
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-2/+2
2003-01-07tweak commentJim Meyering-2/+3
2003-01-07add a commentJim Meyering-0/+2
2003-01-04Remove use of PARAMS.Jim Meyering-5/+5
2003-01-04Remove use of PARAMS.Jim Meyering-3/+3
2003-01-04Remove use of PARAMS.Jim Meyering-2/+2
2003-01-04rm could be tricked into mistakenly reporting a cycle.Jim Meyering-40/+24
* 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-9/+6
2003-01-04Don't include trailing /. in diagnostics about directories.Jim Meyering-5/+15
(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-2/+2
2003-01-04(struct dirstack_state): Define.Jim Meyering-104/+138
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-1/+7
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-12/+1
They're already defined in sys2.h.
2003-01-04remove blank lineJim Meyering-1/+0
2003-01-04(count_entry) [S_ISLNK]: Don't define.Jim Meyering-4/+2
It's already defined in sys2.h.
2003-01-04[S_ISLNK]: Don't define. It's already defined in sys2.h.Jim Meyering-5/+1
2003-01-03Add copyright.Jim Meyering-1/+18
(AUTHORS): I suppose I've written it.
2003-01-03(false.c): Make the generated file be read-only.Jim Meyering-0/+2
2003-01-03(do_copy): Tweak diagnostic to be consistent with the oneJim Meyering-2/+2
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-8/+2
[struct dev_ino]: Remove declaration.
2002-12-21.Jim Meyering-1/+1