diff options
| author | Jari Aalto <jari.aalto@cante.net> | 1999-02-19 17:11:39 +0000 |
|---|---|---|
| committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:52 +0000 |
| commit | b72432fdcc59300c6fe7c9d6c8a31ad3447933f5 (patch) | |
| tree | b9899162338c2ff3fd83a8aef8831cb119e85cd7 /lib/readline/rltty.c | |
| parent | bc4cd23ce958feda898c618215f94d8a4e8f4ffa (diff) | |
| download | bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.tar.gz | |
Imported from ../bash-2.03.tar.gz.
Diffstat (limited to 'lib/readline/rltty.c')
| -rw-r--r-- | lib/readline/rltty.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/readline/rltty.c b/lib/readline/rltty.c index 8312963a..a5ef938b 100644 --- a/lib/readline/rltty.c +++ b/lib/readline/rltty.c @@ -37,9 +37,9 @@ #include "rldefs.h" -#if !defined (SHELL) && defined (GWINSZ_IN_SYS_IOCTL) +#if defined (GWINSZ_IN_SYS_IOCTL) # include <sys/ioctl.h> -#endif /* !SHELL && GWINSZ_IN_SYS_IOCTL */ +#endif /* GWINSZ_IN_SYS_IOCTL */ #include "rltty.h" #include "readline.h" @@ -144,7 +144,7 @@ static int terminal_prepped; static int ksrflow; #endif -#if !defined (SHELL) && defined (TIOCGWINSZ) +#if defined (TIOCGWINSZ) /* Dummy call to force a backgrounded readline to stop before it tries to get the tty settings. */ static void @@ -156,9 +156,7 @@ set_winsize (tty) if (ioctl (tty, TIOCGWINSZ, &w) == 0) (void) ioctl (tty, TIOCSWINSZ, &w); } -#else /* SHELL || !TIOCGWINSZ */ -# define set_winsize(tty) -#endif /* SHELL || !TIOCGWINSZ */ +#endif /* TIOCGWINSZ */ #if defined (NEW_TTY_DRIVER) @@ -389,6 +387,7 @@ get_tty_settings (tty, tiop) TIOTYPE *tiop; { int ioctl_ret; + set_winsize (tty); while (1) |
