summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2003-02-05(show_entry): Update sole use of show_disk.Jim Meyering
2003-02-04`df /dev/block-or-char-device-file--not-mounted' now reportsJim Meyering
the name of the file system on which the file resides, usually `/'. Before, it would leave the `Mounted on' field blank. (show_disk): Add parameter: STATP. If we don't find a matching device name, then resort to calling find_mount_point.
2003-02-04(show_disk): Move function to precede find_mount_point.Jim Meyering
2003-02-01Don't put decl after non-decl.Jim Meyering
2003-02-01.Jim Meyering
2003-02-01(MAX_N_DESCRIPTORS): Define.Jim Meyering
2003-02-01(G_fail): New global.Jim Meyering
(human_time): Diagnose failed localtime, not failed nstrftime. (main): Fail if G_fail is set.
2003-01-31Include "file-type.h"Jim Meyering
(print_human_type): Remove function. (human_access): Rename from print_human_access. Return a string. (human_time): Rename from print_human_time. Return a string. (print_stat): Arrange so that field width and an alignment specifier are honored for the %A, %F, %x, %y, and %z formats. [%F]: Use file_type; this gives slightly different file type strings, e.g., `directory' instead of `Directory' and `regular file' or `regular empty file' instead of `Regular file'.
2003-01-31(print_stat): Use S_ISLNK rather than an explicitJim Meyering
test using S_IFMT and S_IFLNK. S_IFLNK may not be defined.
2003-01-31ditto for invalid optionsJim Meyering
2003-01-31(main): Upon processing a bad --exclude-from or --max-depthJim Meyering
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
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
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.