Jim Meyering [Thu, 21 Nov 2002 12:21:55 +0000 (12:21 +0000)]
stty doesn't support all baud rates available in current Linux kernels.
When trying to set a high baud rate using stty, it says "invalid
argument". When the high rate is already configured, "stty -a"
returns 0 instead of the true baud rate.
(struct speeds): Add support for all baud rates defined
in linux-2.4.19.
Jim Meyering [Thu, 21 Nov 2002 09:35:51 +0000 (09:35 +0000)]
Merge argmatch cleanups from Bison. Assume C89.
Do not include <config.h> or <sys/types.h>.
Include <stddef.h> instead, since it's all we need for size_t.
(PARAMS): Remove. All uses removed.
(ARRAY_CARDINALITY): Do not bother to #undef.
(ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
Remove unnecessary parentheses.
(ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
Insert necessary parentheses.
(ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
(ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
Jim Meyering [Thu, 21 Nov 2002 09:24:43 +0000 (09:24 +0000)]
Merge argmatch cleanups from Bison. Assume C89.
Include config.h here, not in argmatch.h.
Include stdlib.h, for EXIT_FAILURE.
Always include <string.h>, since we assume C89.
(EXIT_FAILURE): Remove pre-C89 bug workaround.
Jim Meyering [Thu, 21 Nov 2002 08:47:44 +0000 (08:47 +0000)]
(quotearg_buffer_restyled): If mbrtowc returns
`(size_t) -1' (at which point it would also set errno to EILSEQ),
then restore errno to its previous value.
Reported by Phillip Jones via Tim Waugh as
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=76334.
Jim Meyering [Tue, 19 Nov 2002 08:05:29 +0000 (08:05 +0000)]
Avoid a link-time failure on some Linux systems.
(STATIC): Define to be empty (_LIBC) or `static' (otherwise).
(__mon_yday): Declare with the STATIC attribute.
(__mktime_internal): Likewise.
Based on a report from Greg Schafer.
Jim Meyering [Thu, 14 Nov 2002 12:09:16 +0000 (12:09 +0000)]
Sync with Bison, i.e.:
(po-check): Scan .l and .y files instead of the
.c and the .h files that they generate. This fixes the bug
reported by Tim Van Holder in:
<http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
Look for N_ as well as for _. Try to avoid matching #define for
N_ and _.
From Paul Eggert.
Jim Meyering [Sun, 10 Nov 2002 11:11:34 +0000 (11:11 +0000)]
(restore_default_color_handler, sigtstp_handler): Remove functions.
(sighandler): New function, based on the one in sort.c.
(main): Use sigaction, if possible; otherwise signal.
Handle these signals:
SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP.
Don't register our handler if the signal is already being ignored.
Jim Meyering [Sat, 9 Nov 2002 22:27:27 +0000 (22:27 +0000)]
ls --color: restore terminal state (color) upon signal.
Include "full-write.h" and <signal.h>.
(restore_default_color, restore_default_color_handler): New functions.
(sigtstp_handler, put_indicator_direct): New functions.
(main) [print_with_color]: Register signal handlers.
Patch mostly by Solar Designer and Stanislav Ievlev.
Jim Meyering [Sat, 9 Nov 2002 12:39:34 +0000 (12:39 +0000)]
Make it work even when names contain spaces or shell metachars.
Write diagnostics to stderr, not stdout.
Normalize spacing in diagnostics: use one space (not two, and not a TAB)
after the leading `install:'.
Add double quotes around `$src' here: $doit $instcmd "$src" "$dsttmp"