Jim Meyering [Thu, 28 Nov 1996 23:50:13 +0000 (23:50 +0000)]
(find_mount_point): Use strip_trailing_slashes and dirname
instead of open-coding them. When given FILE containing no slashes,
chdir to the directory containing it (the current directory) rather
than to `..'.
Jim Meyering [Thu, 28 Nov 1996 19:35:33 +0000 (19:35 +0000)]
(find_mount_point): Use save_cwd/restore_cwd.
"save-cwd.h": New include.
(show_dev): Deal with null values for DISK and FSTYPE,
including interpreting special 0 errno return from get_fs_usage.
(show_point): Don't fail if we can't find a mount entry for POINT,
just call show_dev with 0 values and let it fail if necessary.
(main): Require a non-zero MOUNT_LIST only if showing all filesystems.
(find_mount_point): New function.
(xgetcwd): New declaration.
Jim Meyering [Mon, 25 Nov 1996 03:07:52 +0000 (03:07 +0000)]
(set_ordering): Revert 1994-05-04 change to this function
so that blanks are not unconditionally ignored when computing start
and end positions for numeric keys. Reported by Markus Demleitner.
Jim Meyering [Sun, 24 Nov 1996 18:06:35 +0000 (18:06 +0000)]
(get_win_size): Take a FILENO parameter rather than
trying to get a size from both stdin and stdout.
Update callers.
Use STDIN_FILENO and STDOUT_FILENO instead of literal 0, 1.
Jim Meyering [Sat, 23 Nov 1996 02:32:10 +0000 (02:32 +0000)]
(process_regexp): Update CURRENT_LINE only if
the new value would be larger. This avoids the infinite loop
otherwise provoked by situations like this:
printf "\na\n" | csplit - '/a/-1' '{*}'
From Jens Schmidt.
Jim Meyering [Tue, 5 Nov 1996 04:38:41 +0000 (04:38 +0000)]
Thu Oct 31 19:32:32 1996 Miles Bader <miles@gnu.ai.mit.edu>
[ENAMETOOLONG] (xgethostname): If gethostname
returns an error other than buffer overflow, exit with an error
message instead of allocating infinite amounts of space.
[!EXIT_FAILURE] (EXIT_FAILURE): New macro.
<errno.h>: New include.
[!errno] (errno): New declaration.
Jim Meyering [Sun, 3 Nov 1996 20:59:43 +0000 (20:59 +0000)]
Include sys/types.h for the definitions
(otherwise missing on some systems) of caddr_t (used by
sys/socket.h) and ushort (used by netinet/in.h). From Karl Heuer.
Jim Meyering [Sat, 2 Nov 1996 15:28:08 +0000 (15:28 +0000)]
(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.