Jim Meyering
5f0b9f1d99
(print_long_format): Detect and handle strftime failure
...
due to pathologically long strings in locale tables. Patch from Paul Eggert.
(print_long_format): Change references to BIGBUF in use of FPUT macro
to references to BUF.
Use 11 (not 20) bytes for mode string buffer.
1997-01-05 20:32:49 +00:00
Jim Meyering
8ebfd37293
(print_long_format): NUL-terminate line of output.
1997-01-05 15:39:27 +00:00
Jim Meyering
cb6351aa82
(print_long_format): First patch from Paul Eggert.
1997-01-05 15:33:44 +00:00
Jim Meyering
783bace690
(print_long_format): Clean up vestiges of legacy
...
ctime-oriented code. With internationalization and strftime,
you can't presume that %a expands to a 3-byte string.
Reported by Ross Ridge.
1997-01-05 03:18:49 +00:00
Jim Meyering
635a7c3186
(init_fps): Initialize lines_stored field in three places.
...
This avoids uninitialized memory reads in close_file.
1997-01-03 03:20:14 +00:00
Jim Meyering
1ba3bd3896
(init_header): Plug a small memory leak by using stack
...
rather than heap for a 15-byte temporary buffer.
1996-12-30 05:43:58 +00:00
Jim Meyering
5ae342e1a9
Two problems fixed by these changes from Joakim Rosqvist.
...
Quoting Joakim:
1) The "total" number and the size of the first file as
output from 'ls --color -s' did not get colorized according
to the "no"-argument in LS_COLORS. Fixed by adding a function
prep_non_filename_text which prints the C_LEFT C_NORM C_RIGHT
strings (or C_END). It is called from main before any text is
output, and from print_name_with_quoting after having output a
colorized filename.
2) If the "no"-argument of LS_COLORS is set, the terminal will be
set to print in that color after ls exits. The man-pages suggests
setting "no" and "fi" to the terminals default colors to avoid
the problem, but that would mean I can't use anything but the
default color for regular files and non-filename text. Fixed by
outputting C_LEFT immediately followed by C_RIGHT right before
exit, which restores the default color.
1996-12-29 03:47:34 +00:00
Jim Meyering
42640f71df
Correct obsolete comment referring to macro that is now ls_mode.
1996-12-28 20:32:39 +00:00
Jim Meyering
da7809f65c
(TAB_WIDTH): Cleaned up definition and renamed from tab_width.
...
(POS_AFTER_TAB): Cleaned up definition and renamed from pos_after_tab.
1996-12-28 06:04:36 +00:00
Jim Meyering
4650315342
Indent cpp directives.
1996-12-28 04:58:26 +00:00
Jim Meyering
fbfde91f6a
[!WTMP_FILE]: Provide default path.
...
(UTMP_FILE) [UTMPX_FILE]: Use UTMPX_FILE in favor of UTMP_FILE.
Patch from Kaveh R. Ghazi.
1996-12-28 04:44:35 +00:00
Jim Meyering
5e58599e6e
(usage): Break long string literal into two separate
...
printf statements to accomodate default maximum of 2048 characters
for Irix-4.0.5. Reported by Kaveh Ghazi.
1996-12-28 02:28:56 +00:00
Jim Meyering
3bcffe04d7
revert last change
1996-12-23 23:57:56 +00:00
Jim Meyering
79523152dd
remove support for --string option
1996-12-23 23:57:09 +00:00
Jim Meyering
41a41dd48e
Replace hard-coded /etc/wtmp with WTMP_FILE. Suggestion from Eivind.
1996-12-21 04:14:45 +00:00
Jim Meyering
e95fe088e1
(usage): Say that UTMP_FILE is the default FILE
...
rather than hard-coding /etc/utmp.
1996-12-21 04:08:25 +00:00
Jim Meyering
e13281014a
(usage): Tweak --usage text.
1996-12-21 03:59:26 +00:00
Jim Meyering
cecde31171
(ORPHAN): By default, color orphans red on a black background.
1996-12-19 05:21:40 +00:00
Jim Meyering
ae6c43a3ab
(usage): Remove --print-data-base.
...
Now only --print-database remains. Although it wasn't documented,
--print-data-base was still accepted. But it made `--p', `--print',
`--print-data', etc. ambiguous.
1996-12-19 05:20:06 +00:00
Jim Meyering
c835f92a61
(gobble_file): Stat symlinks also when printing with
...
color and set linkok to reflect existence of referent.
Patches from Joakim Rosqvist, James Antill, and Jesse Thilo.
1996-12-19 05:15:34 +00:00
Jim Meyering
858afc04d2
[HAVE_PATHS_H]: Include <paths.h>.
...
[_PATH_DEFPATH]: Use this to define DEFAULT_LOGIN_PATH.
[_PATH_DEFPATH_ROOT]: Use this to define DEFAULT_ROOT_LOGIN_PATH.
From Rik Faith.
1996-12-19 04:20:53 +00:00
Jim Meyering
357c53621f
(ISDIGIT): Replace with smaller, faster edition
...
that yields nonzero only on ASCII digits.
(ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
used to have. From Paul Eggert.
1996-12-18 03:22:56 +00:00
Jim Meyering
561e4c139e
(ROOT_CHOWN_AFFECTS_SYMLINKS): New macro.
...
(DO_CHOWN): Take an additional parameter.
(LINK_CHOWN): Remove macro.
(copy): When preserving owner and group of a symlink, use
chown only if ROOT_CHOWN_AFFECTS_SYMLINKS and EUID == 0.
Otherwise, the chown would affect the file referenced through the symlink.
1996-12-18 03:13:09 +00:00
Jim Meyering
3008ad90f4
twiddle FSF address in comment.
1996-12-14 05:23:41 +00:00
Jim Meyering
8c5b30bc1e
(get_format_width, get_format_prec): Avoid
...
unnecessary comparison of digit to '\0'.
1996-12-14 05:22:46 +00:00
Jim Meyering
f0fa287b4f
(digits): Remove; subsumed by new ISDIGIT.
...
(inittables): Remove initialization of `digits'.
(fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
(fraccompare, numcompare): Avoid casts to unsigned char that are no
longer needed.
1996-12-14 05:22:17 +00:00
Jim Meyering
4ecb3b28f1
(is_char_class_member): Use ISDIGIT_LOCALE instead of
...
ISDIGIT to test for characters in CC_DIGIT class.
1996-12-14 05:21:51 +00:00
Jim Meyering
90d97b9703
(usage): Clarify description of -u option.
...
From Karl Berry.
1996-12-13 05:43:26 +00:00
Jim Meyering
a7f5043de8
(usage): Update bug-reporting address.
1996-12-13 02:47:33 +00:00
Jim Meyering
d3d5565035
[_POSIX_VERSION]: Don't declare wait. That declaration
...
conflicted with the one on i386-pc-isc3.0, now that I've removed the
AC_ISC_POSIX macro and _POSIX_VERSION is no longer defined.
1996-12-11 04:48:51 +00:00
Jim Meyering
1d3c57118b
(find_mount_point): Convert from K&R style header to ANSI.
...
Patch from Kaveh Ghazi.
1996-12-10 00:28:02 +00:00
Jim Meyering
ba788477a8
Include config.h before testing for TERMIOS_NEEDS_XOPEN_SOURCE.
...
Patch from Karl Heuer.
1996-12-10 00:20:17 +00:00
Jim Meyering
2a1d6f9b5f
(get_win_size): Rename formal parameter from fileno to FD.
1996-12-08 06:09:21 +00:00
Jim Meyering
acc8601b65
(main): Call setlocale, bindtextdomain, and textdomain.
...
From Michel Robitaille.
1996-12-08 04:24:35 +00:00
Jim Meyering
0ccd71dd94
(init_header): Fix typo: cons tchar' -> const char'. From Roland.
1996-12-07 19:12:44 +00:00
Jim Meyering
f86df3250c
(init_store_cols): Put parens around ... ? ... : ... expr.
1996-12-05 05:01:30 +00:00
Jim Meyering
65a915647c
Use NULL instead of e.g., `(char *) 0'.
1996-12-05 04:59:26 +00:00
Jim Meyering
2882d4477d
(init_header): Move dcl of FMT into block where it's used.
1996-12-05 04:55:51 +00:00
Jim Meyering
2793223907
Reindent with -TCOLUMN.
...
(main): Add two sets of curly braces for readability.
1996-12-05 04:49:12 +00:00
Jim Meyering
a5937bbc71
(usage): Add \n\ at end of first line.
1996-12-05 04:43:19 +00:00
Jim Meyering
d0cac59c72
(separator_string): dcl parameter const.
...
Add __P in fwd dcl.
1996-12-05 04:35:39 +00:00
Jim Meyering
ed0923a11c
Apply big patch (patch-20) from Roland Huebner.
1996-12-05 04:33:33 +00:00
Jim Meyering
4a1512e4b2
(main) [!POSIXLY_CORRECT]: Allow the identity mappings:
...
[:upper:] to [:upper:] and [:lower:] to [:lower:].
(main) [POSIXLY_CORRECT]: Give a more specific diagnostic for the
identity mappings [:upper:] to [:upper:] and [:lower:] to [:lower:].
(class_ok): Update table to reflect that tr now allows these
identity mappings.
1996-12-05 03:13:33 +00:00
Jim Meyering
ad44ac84c8
(print_color_indicator): Initialize EXT to NULL.
1996-12-04 01:21:28 +00:00
Jim Meyering
b87899c834
(print_color_indicator): Check the file's suffix only
...
if it's a regular file.
(print_type_indicator): Use S_IXUGO instead of writing out
(S_IEXEC | S_IXGRP | S_IXOTH).
(length_of_file_name_and_frills): Likewise.
1996-12-03 02:33:09 +00:00
Jim Meyering
4accfeb4e0
[!S_IXUGO] (S_IXUGO): Define it.
1996-12-03 02:32:44 +00:00
Jim Meyering
0682a5efe9
(copy_file): Allow installation from non-directory (rather than only regular)
...
files. Suggestion from Charles Karney.
1996-11-30 04:33:30 +00:00
Jim Meyering
f03282e857
(main) [HAVE_SYSINFO && SI_ARCHITECTURE]: Support -p (print processor type).
...
(usage): Document it.
1996-11-30 04:18:19 +00:00
Jim Meyering
7e9e29f392
(main): Accept -F as a synonym for -t for compatibility
...
with Solaris. From Peter Eriksson.
1996-11-30 04:08:02 +00:00
Jim Meyering
d740a98d4a
(main): Close stdout and check result, in case any deferred writes fail.
...
Use EXIT_SUCCESS and EXIT_FAILURE in exit and usage calls.
1996-11-30 03:20:48 +00:00