1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-26 10:39:01 +02:00
Commit Graph

152 Commits

Author SHA1 Message Date
Jim Meyering df445b0891 Remove old-style xmalloc and xrealloc decls. 1997-10-25 22:03:55 +00:00
Jim Meyering 3faf14fe5c Remove stpcpy decl.
Remove free and malloc decls.
1997-10-23 16:05:59 +00:00
Jim Meyering a41c38cb7d Bracket inclusion of termios.h with #ifdef HAVE_TERMIOS_H.
Masami Takikawa reported that this is necessary on NeXTStep 3.0 systems.
1997-10-13 14:08:38 +00:00
Jim Meyering 05bbdbd786 update bug-reporting address 1997-10-07 23:53:36 +00:00
Jim Meyering d5f56f9cd7 (struct col_info) [valid_len]: Rename from `valid' which conflicted
with the macro in locale.h of SunOS4.1.4.
1997-09-14 04:16:37 +00:00
Jim Meyering 22c2c69da4 (print_horizontal): Add some non-essential curly braces. 1997-09-14 04:08:52 +00:00
Jim Meyering d9f0902259 (print_many_per_line): Add some non-essential curly braces. 1997-09-14 04:07:28 +00:00
Jim Meyering 2d93d34275 [!STDC_HEADERS]: Declare malloc. 1997-09-02 01:51:39 +00:00
Jim Meyering d0caad54ae Add new option: --sort=version (-v). 1997-07-06 21:23:42 +00:00
Jim Meyering 2b0ecc7fa5 (print_long_format): Reflect changes in semantics of getuser, getgroup. 1997-07-06 13:51:16 +00:00
Jim Meyering 6700c89ac7 Use variable width columns when printing in multi-column mode.
(init_col_info): New function.
(print_current_files): Call init_col_info if format is
`many_per_line' or `horizontal'.
(print_many_per_line): Calculate optimum column widths.
(print_horizontal): Likewise.
From Ulrich Drepper.
1997-06-22 19:52:24 +00:00
Jim Meyering a65a081656 declare strip_trailing_slashes 1997-05-25 21:25:28 +00:00
Jim Meyering 07876bcb5d (convert_blocks): Add definition. 1997-05-25 15:10:03 +00:00
Jim Meyering 613357b0ab (decode_switches): Ignore value of COLUMNS envionment
variable when it is the empty string.  Suggestion from Ulrich Drepper.
1997-03-10 04:47:32 +00:00
Jim Meyering 4af2c36dfa (main): Remove trailing slashes from command line arguments.
Otherwise, running `mkdir x; chmod 644 x; ls -d x/' (note the trailing
slash) makes ls fail with permission denied on at least Linux 1.2.13
and 2.0.14 systems.
1997-02-20 04:54:56 +00:00
Jim Meyering b7ffe8cdaf update copyrights for 1997 1997-02-09 04:52:50 +00:00
Jim Meyering b7a12bb110 (quote_filename): Allocate two more bytes (for quotes)
when using --quote-name (-Q).
Feb 2 change wasn't complete.  Patch from Mark Harris.
1997-02-06 03:58:09 +00:00
Jim Meyering 6a203a2347 (quote_filename): Don't backslash-escape double quotes.
This fixes a problem whereby columns weren't aligned when some files
contained double quote characters and ls's --escape (-b) option was
used.  Reported by Mark Harris.
1997-02-03 00:10:40 +00:00
Jim Meyering b63df62ce1 [obstack_chunk_alloc]: Define to malloc, not xmalloc
to work better with new obstack functions.
1997-02-02 20:11:54 +00:00
Jim Meyering a882d55b52 bracket bug address with <> and append a period 1997-02-01 04:24:08 +00:00
Jim Meyering 4f51b86bfb Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call. 1997-02-01 03:03:44 +00:00
Jim Meyering 771ab6e1bf (print_long_format): Fix off-by-one problem in size being passed to strftime. 1997-01-28 03:40:18 +00:00
Jim Meyering fe6c711f48 Restore dcl of free. with obstacks, you need it. 1997-01-26 05:57:04 +00:00
Jim Meyering 5aa14aeef0 [!STDC_HEADERS]: Remove unnecessary declaration of free. 1997-01-15 04:42:05 +00:00
Jim Meyering 9ca6f19a2d (print_long_format): Cast alloca return value to char*. 1997-01-09 02:33:44 +00:00
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 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 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 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 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
Jim Meyering bded355394 (usage): Alphabetize option descriptions the way sort -f would. 1996-11-23 22:13:00 +00:00
Jim Meyering 5582e6dad3 change bug-reporting address 1996-11-03 03:16:27 +00:00
Jim Meyering b8e689dc67 change bug-reporting address 1996-11-02 20:44:15 +00:00
Jim Meyering 1a58046071 (gobble_file): Set linkok for non-orphaned symlinks.
From Bauke Jan Douma.
(gobble_file): Initialize linkok.
With these two changes, ls --color should display orphaned symlinks
as blinking text on terminals that support it.
1996-11-02 15:28:08 +00:00
Jim Meyering d7749da3e9 (decode_switches): Make -A set really_all_files to zero
as well as setting all_files to 1.  With this change, ls -f -A prints
everything but . and .., unsorted.  Before, the -A was effectively
ignored.  From Karl Berry.
1996-10-29 12:51:37 +00:00
Jim Meyering beb67dc954 (print_long_format): Use strftime of localtime
(not ctime) to produce the date/time in long listings.
From Rafal Maszkowski.
1996-10-13 19:04:51 +00:00
Jim Meyering 2dc3ad1a76 (usage): Improve brief descriptions of --sort and --time.
From Fran?ois Pinard.
1996-10-09 12:24:26 +00:00
Jim Meyering d4cf394f30 (usage): Improve usage messages 1996-10-08 04:35:19 +00:00
Jim Meyering 7c17502e74 (print_long_format): Add support for Cray's migrated dmf files.
From Johan Danielsson.
1996-10-05 20:17:09 +00:00
Jim Meyering 4f28f318d8 (main): update --version output to conform to coding standard 1996-10-05 13:14:11 +00:00
Jim Meyering c9fff51897 (usage): remove spurious trailing \n in puts. 1996-08-31 04:44:31 +00:00
Jim Meyering 7e294bac78 (usage): Tell where to report bugs. 1996-08-29 05:05:57 +00:00
Jim Meyering 013f2fe433 Make initial colors for `color_indicator' match those
currently in dircolors.hin.
1996-07-08 04:25:49 +00:00
Jim Meyering 9d691ba42f Include termios.h.
Guard inclusion of sys/ioctl.h with #ifdef GWINSZ_IN_SYS_IOCTL,
rather than HAVE_SYS_IOCTL_H.  Modelled after sh-utils' stty.c
at suggestion from Chip Bennett <BennettC@j64.stratcom.af.mil>.
1996-07-08 04:19:36 +00:00
Jim Meyering a7d29c59fa (main): Fix typo in last change. 1996-07-04 17:41:05 +00:00