freebsd-dev/gnu/lib/libreadline/tcsh_hack.readme
Andrey A. Chernov 8a67c71748 Port readline lib into gnu system tree.
Really we don't need copy of this library into each program
(gdb f.e.)

P.S. it is much cleaner port than /usr/ports version and based
on /usr/ports version. /usr/ports version will be removed.
1994-05-09 15:59:10 +00:00

51 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

*** readline.c.orig Thu May 5 04:02:17 1994
--- readline.c Mon May 9 00:33:44 1994
***************
*** 32,37 ****
--- 32,38 ----
#include <stdio.h>
#include <sys/types.h>
+ #include <sys/ioctl.h>
#include <fcntl.h>
#include <sys/file.h>
#include <signal.h>
***************
*** 280,285 ****
--- 281,295 ----
/* Non-zero means to save keys that we dispatch on in a kbd macro. */
static int defining_kbd_macro = 0;
+ /* XXX this prevents to got editing mode from tcsh */
+ static void wait_foreground(void)
+ {
+ struct winsize w;
+ int tty = fileno (rl_instream);
+
+ if (ioctl (tty, TIOCGWINSZ, &w) == 0)
+ (void) ioctl (tty, TIOCSWINSZ, &w);
+ }
/* **************************************************************** */
/* */
***************
*** 1153,1158 ****
--- 1163,1169 ----
#endif /* POSIX */
int tty = fileno (rl_instream);
+ wait_foreground (); /* XXX this prevents to got editing mode from tcsh */
#if defined (_POSIX_VERSION)
if (tcgetattr (tty, &ttybuff) != -1)
#else
***************
*** 2307,2312 ****
--- 2318,2324 ----
# endif /* HAVE_BSD_SIGNALS */
#endif /* POSIX */
+ wait_foreground (); /* XXX this prevents to got editing mode from tcsh */
#if defined (_POSIX_VERSION)
tcgetattr (tty, &tio);
#else