summaryrefslogtreecommitdiff
path: root/lib/libcurses
diff options
context:
space:
mode:
authordsl <dsl@NetBSD.org>2003-05-18 10:02:07 +0000
committerdsl <dsl@NetBSD.org>2003-05-18 10:02:07 +0000
commit1473d232c3a56bec6c19a8d993209680e73d378d (patch)
tree93a41bf0461de323ce7cd0c83c0caba148d7a891 /lib/libcurses
parentcc3f08f723254992a07e2530f2dfff4c0a8b8127 (diff)
Don't do __stopwin() if it is already stopped.
Allows error messages from programs like sysinst() to be seen. (There is an explicit stopwin() before the error message is output, and a second in the atexit() called cleanup() routine)
Diffstat (limited to 'lib/libcurses')
-rw-r--r--lib/libcurses/tstp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libcurses/tstp.c b/lib/libcurses/tstp.c
index 2c5d2484175..83290b06a49 100644
--- a/lib/libcurses/tstp.c
+++ b/lib/libcurses/tstp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tstp.c,v 1.26 2002/08/04 14:11:59 jdc Exp $ */
+/* $NetBSD: tstp.c,v 1.27 2003/05/18 10:02:07 dsl Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)tstp.c 8.3 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: tstp.c,v 1.26 2002/08/04 14:11:59 jdc Exp $");
+__RCSID("$NetBSD: tstp.c,v 1.27 2003/05/18 10:02:07 dsl Exp $");
#endif
#endif /* not lint */
@@ -119,6 +119,9 @@ __restore_stophandler(void)
int
__stopwin(void)
{
+ if (_cursesi_screen->endwin)
+ return OK;
+
/* Get the current terminal state (which the user may have changed). */
(void) tcgetattr(fileno(_cursesi_screen->infd),
&_cursesi_screen->save_termios);