summaryrefslogtreecommitdiffstats
path: root/contrib/libreadline/rltty.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1999-05-28 01:59:23 +0000
committerache <ache@FreeBSD.org>1999-05-28 01:59:23 +0000
commit2fbece35f71145c1c63d12046e54a9c059114d69 (patch)
treeb727625e73f35f475e06719785a6f7a2d5126754 /contrib/libreadline/rltty.c
parent27ef633cd3f7fd5fb6cb033edd2c1747a6e59acb (diff)
downloadFreeBSD-src-2fbece35f71145c1c63d12046e54a9c059114d69.zip
FreeBSD-src-2fbece35f71145c1c63d12046e54a9c059114d69.tar.gz
readline v4.0
Diffstat (limited to 'contrib/libreadline/rltty.c')
-rw-r--r--contrib/libreadline/rltty.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/libreadline/rltty.c b/contrib/libreadline/rltty.c
index 8312963..a5ef938 100644
--- a/contrib/libreadline/rltty.c
+++ b/contrib/libreadline/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)
OpenPOWER on IntegriCloud