summaryrefslogtreecommitdiff
path: root/src/ls.c
AgeCommit message (Collapse)Author
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.
2000-11-19(BLOCK_SIZE_OPTION, COLOR_OPTION, FORMAT_OPTION,Jim Meyering
INDICATOR_STYLE_OPTION, QUOTING_STYLE_OPTION, SHOW_CONTROL_CHARS_OPTION, SORT_OPTION, TIME_OPTION): New enum values, to ensure that option values can't collide with chars. (long_options, decode_switches): Use them.
2000-11-18Revert change of 2000-11-11. It inadvertently changeJim Meyering
the output format of `ls -l --full-time'.
2000-11-12(print_long_format): Remove obsolete comment (strftime vs. ctime).Jim Meyering
From Paul Eggert.
2000-11-12(<langinfo.h>): Include if HAVE_LANGINFO_H.Jim Meyering
(DATE_FMT_LANGINFO): New macro, taken from sh-utils/src/date.c. (print_long_format): Use it to determine "date" format. Do not wrap "%b %e %Y" and "%b %e %H:%M" in _(), as it results in incorrect behavior when LC_ALL is unset, LC_TIME is "C", and LC_MESSAGES or LANG is set to something disagreeing with the POSIX locale.
2000-11-11(print_long_format): Wrap the --full-time' date formatJim Meyering
string in _(...), so it too may be internationalized. Suggestion from Jungshik Shin.
2000-10-29(DT_INIT): Define.Jim Meyering
[enum filetype]: Remove the #ifdef, and use DT_INIT on the initializers instead.
2000-10-28[enum filetype] (arg_directory): Rather than `100', useJim Meyering
a number that should never conflict with another DT_* value. From Ulrich Drepper.
2000-10-28(main): In call to gobble_file with `"."', use `directory'Jim Meyering
as the type, not `unknown'. From Ulrich Drepper.
2000-10-28Make `ls' a lot more efficient on systems (e.g., linux-2.4.*)Jim Meyering
that save file type information in directory entries. [enum filetype] (unknown): Add members (as yet unused): (HAVE_STRUCT_DIRENT_D_TYPE): Define. (format_needs_type): New global. (main): Set it. (print_dir): Set `type' from directory entry, if possible. (gobble_file): Add a parameter, TYPE. Stat the file only if its type is unknown and we need the type. Patch from Ulrich Drepper.
2000-10-22(print_long_format): Wrap date format strings in _(...)Jim Meyering
so they may be internationalized. Suggestion from Christian Rose.
2000-09-03Use strcoll (not strcmp) when comparing file names.Jim Meyering
2000-07-29Include <limits.h>, <stdlib.h>, <wchar.h>, <wctype.h>.Jim Meyering
(quote_name): Use mbrtowc to step through the filename string while replacing nonprintables with question marks. Return the screen width, not the strlen length. Do no output if the out stream is NULL. (length_of_file_name_and_frills): Use the quote_name return value.
2000-07-17Avoid warnings.Jim Meyering
(struct bin_str): Declare `string' member to be `const'. (put_indicator): Declare local `p' to be `const'.
2000-06-16(print_dir, gobble_file, print_long_format, print_file_name_and_frills):Jim Meyering
Round disk usage up.