summaryrefslogtreecommitdiff
path: root/src/ls.c
AgeCommit message (Collapse)Author
2001-09-04(get_link_name): Update use of xreadlink.Jim Meyering
2001-09-01(get_link_name): Restore error-handling that was removed by preceding delta.Jim Meyering
2001-09-01Include "xreadlink.h".Jim Meyering
(get_link_name): Don't use PATH_MAX. Rewrite to use xreadlink.
2001-08-14(AUTHORS): Mark string for translation, since it contains the English word ↵Jim Meyering
`and'.
2001-08-12Work around non-compliant gettimeofday on Mac OS X 10.0.4,Jim Meyering
(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.
2001-08-10(print_long_format): Simplify previous patch forJim Meyering
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. :-)
2001-08-10(print_long_format): Multiply the shift width by zeroJim Meyering
to avoid a warning from gcc on hosts with an unsigned type for the st_size member.
2001-08-10(print_long_format): If a file size is negative, assumeJim Meyering
the typical case where it has wrapped around from a positive value.
2001-08-04(quote_name): Pass 0 to mbsnwidth, since the defaultJim Meyering
got changed and we want the default now.
2001-06-16(main): Recheck global print_with_color after callingJim Meyering
parse_ls_color, since that function may have reset it. Based on a patch from Richard Dawe.
2001-06-16(print_long_format): Don't truncate user namesJim Meyering
or group names that are longer than 8 characters.
2001-05-24Use `#if D_TYPE_IN_DIRENT && defined DTTOIF' toJim Meyering
determine whether to enable the DT_INIT definition, not the less portable `#if defined _DIRENT_HAVE_D_TYPE || defined DTTOIF'. Reported by Eli Zaretskii.
2001-05-20Include "hard-locale.h".Jim Meyering
(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.
2001-05-15(struct fileinfo.linkmode): Now st_mode.Jim Meyering
(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.
2001-05-13(enum Dereference_symlink): New type.Jim Meyering
(dereference): New var, replacing trace_links, which was removed. (long_options, main, decode_switches, gobble_file, usage): Implement the changes.
2001-05-12Include dirname.h, to get base_nameJim Meyering
2001-05-12(usage): Minor wording changes related to -o, -n, and -g.Jim Meyering
From Paul Eggert.
2001-05-05tweak diagnosticJim Meyering
2001-05-05(decode_switches): Complain if the envvar, QUOTING_STYLE,Jim Meyering
is set to an invalid value. Move some declarations of locals into scopes where they're used.
2001-05-05(print_owner): New global variable.Jim Meyering
(usage): Update the description of -g. (decode_switches): Honor the -g option (omit owner information), now that POSIX specifies it. (print_long_format): Don't print owner name if -g was specified. Move declaration of `user_name' into the scope where it's used. (print_group): Rename global from `inhibit_group'. Update all uses accordingly. (decode_switches): Make -n work just like -l, except with numeric IDs, per POSIX. Before, to have any effect, -n had to be used with -l. Reported by Dale Scheetz. (usage): Update the description of -n. Separate the descriptions of -n and --numeric-uid-gid. Split string in --help output that had exceeded my limit of 2048 bytes.
2001-04-22fix typo in commentJim Meyering
2001-04-22(decode_switches): Ensure that -1 has no effect when it follows -l.Jim Meyering
2001-04-22(main): Fix off-by-one error introduced with last change.Jim Meyering
2001-04-21(main): When given two or more arguments but the only oneJim Meyering
that exists is a directory, don't treat it as if it were the only argument. Before, `mkdir d; ls no-dir d 2>/dev/null' would act like `ls d' and produce no output. Now, it prints `d:'.
2001-04-04Don't inspect MB_LEN_MAX. Paul Eggert says it'sJim Meyering
not always defined correctly.
2001-02-20(FULL_TIME_OPTION): Renamed from FULL_TIME, forJim Meyering
consistency with the other enum values.
2001-02-20(SI_OPTION): New enum value.Jim Meyering
(long_options): Use it instead of 'H' for --si. (decode_switches): Warn that -H will change soon. (usage): Likewise.
2001-02-20revert last change, until after the releaseJim Meyering
2001-02-20`ls -Fd symlink-to-directory' would print a trailing `/'Jim Meyering
Now it prints a trailing `@'. (gobble_file): Don't clobber lstat stats of command line arguments when using -d and -F (--directory and --classify) options.
2001-02-17(mbrtowc, mbsinit):Jim Meyering
Remove workaround macros for hosts that have mbrtowc but not mbstate_t, as we now insist on proper declarations for both before using mbrtowc.
2001-01-28(gobble_file): Add a FIXME comment.Jim Meyering
2001-01-28[FULL_TIME]: Define.Jim Meyering
(long_options): Use it. (decode_switches): Make --full-time imply -l.
2001-01-07clean up after commit hook testingJim Meyering
2001-01-07testing -- commit should failJim Meyering
2001-01-07testing -- commit should failJim Meyering
2001-01-07testing -- commit should failJim Meyering
2001-01-07(usage): Untabify.Jim Meyering
2001-01-03Use the more precise algorithm of GNU "make" to decide whetherJim Meyering
a file is in the future, by looking at high-resolution time stamps if available. (TIMESPEC_NS): New macro. (current_time): Initialize to the minimum value. (current_time_ns): New var. (main): Do not bother to initialize current_time; it's no longer needed. (get_current_time): New function. (print_long_format): Use it when a file appears to be in the future. Get the nanoseconds of the file's time stamp, if available, and use that to decide whether the file appears to be in the future.
2001-01-03(long_time_expected_width, print_long_format): FixJim Meyering
bug: the initial byte passed to strftime wasn't initialized to a nonzero value after the buffer was reallocated.
2001-01-03(decode_switches): Use dcgettext with LC_TIME,Jim Meyering
not plain gettext, to get the translations of time formats.
2001-01-03(long_time_expected_width): New function.Jim Meyering
(print_long_format): Use it, so that we don't assume a particular width for time stamps in an internationalized environment.
2001-01-02copyrightJim Meyering
2001-01-02(print_long_format):Jim Meyering
Report the year for files even slightly in the future. Avoid overflow problems near Y2038 on 32-bit hosts. To calculate "six months", take half the average Gregorian year, not 180 days.
2000-12-31Improve performance by invoking gettext twice at the start,Jim Meyering
instead of once for each file. (long_time_format): New var. (decode_switches): Initialize it, if format == long_format. (print_long_format): Use it.
2000-12-31(print_long_format): Don't dump core if strftime returns the empty string.Jim Meyering
2000-12-31(gobble_file): If not using long format, don't invoke acl; it's not needed.Jim Meyering
2000-12-25(extract_dirs_from_files): Remove unused variable.Jim Meyering
(gobble_file): Move decl of local, val, into the scope where it's used.
2000-12-03(gobble_file) [USE_ACL]: Set have_acl member unconditionallyJim Meyering
to avoid uninitialized memory reference via FILE_HAS_ACL.
2000-12-02add back the parens Paul removed :-)Jim Meyering
2000-12-02(gobble_file): Do not fall back on lstat if statJim Meyering
fails; POSIX.2 does not allow this. Invoke acl only on non-symlinks, and only if lstat or stat succeeds.