Age | Commit message (Collapse) | Author |
|
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.
|
|
for short options too.''
|
|
descriptions are alone in their own string.
|
|
Use fputs, not printf.
|
|
(dev_ino_pop): Likewise.
|
|
before negating to avoid warning from gcc on systems with 64-bit size_t.
Rename global: s/trace_dirs/recursive/.
(extract_dirs_from_files): Rename parameter:
s/recursive/ignore_dot_and_dot_dot/.
|
|
|
|
|
|
(print_dir): If dirfd fails, resort to using stat.
|
|
(queue_directory): Remove just-added 3rd parameter
and associated code, and update callers.
(print_dir): Get dev/inode pair via `fstat (dirfd (reading), ...',
and call visit_dir to detect cycles here.
Push the dev/inode pair onto the new stack.
(dev_ino_obstack): New global.
(DEV_INO_PUSH): New macro.
(dev_ino_pop): New function.
(ASSERT_MATCHING_DEV_INO): New macro.
(visit_dir): Take two parameters (dev,ino), not one `pending'.
(main): Initialized the dev_ino_obstack.
Don't call visit_dir here.
Get the dev/ino pair from the new stack, not from the pending entry.
|
|
Include hash.h, same.h, and xalloc.h.
(INITIAL_TABLE_SIZE, LOOP_DETECT): Define.
(active_dir_set): New global.
(struct dev_ino): Declare.
(dev_ino_hash, dev_ino_compare, dev_ino_free): New functions.
(visit_dir, free_pending_ent): New functions.
(main): Initialize the active_dir_set hash table, if necessary.
Don't confuse a marker entry with a real one.
Detect loops.
Manage the set of active directories.
Free the hash table.
(queue_directory): Add a new parameter.
Ensure that we set the new dev/ino members for each enqueued directory.
Update all callers.
(print_dir): Don't confuse a marker entry with a real one.
(extract_dirs_from_files): Insert a marker entry before inserting
the entries for subdirectories.
|
|
(main): Don't use ARGMATCH_TO_ARGUMENT.
This reverts part of the 1998-12-31 change.
|
|
|
|
|
|
-H now means --dereference-command-line.
|
|
|
|
|
|
(get_link_name): Don't use PATH_MAX.
Rewrite to use xreadlink.
|
|
`and'.
|
|
(aka Darwin 1.3.7) that caused the date of the first file listed
in long output to be the current time rather than the file's mtime.
The real work is in m4/gettimeofday.m4 and the wrapper function,
lib/gettimeofday.c.
Include gtod.h.
(main): `Call' GETTIMEOFDAY_INIT.
(print_long_format): Add a comment about gettimeofday.
|
|
listing negative sizes, by adding OFF_T_MAX - OFF_T_MIN + 1
instead of doing a fancy conditional shift. This is simpler
and it avoids GCC's bogus compile-time warning about shift
counts. (As a bonus, it is portable to hosts that do not use
twos-complement arithmetic. :-)
|
|
to avoid a warning from gcc on hosts with an unsigned type for the
st_size member.
|
|
the typical case where it has wrapped around from a positive value.
|
|
got changed and we want the default now.
|
|
parse_ls_color, since that function may have reset it.
Based on a patch from Richard Dawe.
|
|
or group names that are longer than 8 characters.
|
|
determine whether to enable the DT_INIT definition, not the less
portable `#if defined _DIRENT_HAVE_D_TYPE || defined DTTOIF'.
Reported by Eli Zaretskii.
|
|
(nstrftime): New decl.
(enum time_style): New enum.
(time_style_args, time_style_types): New constants.
(full_time): Remove.
(long_time_format): Initialize to POSIX defaults.
(TIME_STYLE_OPTION): New constant.
(long_options, decode_switches, usage): Add --time-style support.
(long_time_expected_width): Use nstrftime, not strftime.
(print_long_format): Likewise.
Increase initial size to match new full-iso time style.
|
|
(print_color_indicator, print_name_with_quoting, print_type_indicator,
length_of_file_name_and_frills):
Use mode_t, not unsigned int, to store modes.
(dired_dump_obstack): Do not assume size fits in 'int'.
(get_link_name): readlink returns ssize_t, not int.
(make_link_path): Store buffer size as size_t, not int.
(print_long_format): Use unsigned long, not unsigned, to print
nlink_t, uid_t, gid_t, major_t, minor_t.
|
|
(dereference): New var, replacing trace_links, which was removed.
(long_options, main, decode_switches, gobble_file, usage):
Implement the changes.
|
|
|
|
From Paul Eggert.
|
|
|