summaryrefslogtreecommitdiff
path: root/lib/libcurses/lib_newterm.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-01-17 16:27:39 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-01-17 16:27:39 +0000
commitfc75df79b339ce5f679b6cdb5395378328fd8510 (patch)
tree6e79365e27ab3167f64f5e6b6a7767a06ba19580 /lib/libcurses/lib_newterm.c
parent5af16d68f427511a7d63fc23f6e315c81674d436 (diff)
Use _ti_get_screensize() from libtermlib to update screen size if changed
after a program is suspended. Define EXTERN_TERMINFO in curses.h. Update to ncurses-4.1-980103 and crank minor.
Diffstat (limited to 'lib/libcurses/lib_newterm.c')
-rw-r--r--lib/libcurses/lib_newterm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libcurses/lib_newterm.c b/lib/libcurses/lib_newterm.c
index a1076190e60..4c00a4ecd12 100644
--- a/lib/libcurses/lib_newterm.c
+++ b/lib/libcurses/lib_newterm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_newterm.c,v 1.3 1997/12/03 05:21:25 millert Exp $ */
+/* $OpenBSD: lib_newterm.c,v 1.4 1998/01/17 16:27:34 millert Exp $ */
/***************************************************************************
@@ -38,7 +38,7 @@
#include <term.h> /* clear_screen, cup & friends, cur_term */
-MODULE_ID("Id: lib_newterm.c,v 1.30 1997/11/08 17:32:31 tom Exp $")
+MODULE_ID("Id: lib_newterm.c,v 1.31 1997/12/28 00:36:51 tom Exp $")
#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */
#define ONLCR 0
@@ -177,6 +177,14 @@ char *t = getenv("NCURSES_TRACE");
#endif
SP->_endwin = FALSE;
+ /* Check whether we can optimize scrolling under dumb terminals in case
+ * we do not have any of these capabilities, scrolling optimization
+ * will be useless.
+ */
+ SP->_scrolling = ((scroll_forward && scroll_reverse) ||
+ ((parm_rindex || parm_insert_line || insert_line) &&
+ (parm_index || parm_delete_line || delete_line)));
+
baudrate(); /* sets a field in the SP structure */
/* compute movement costs so we can do better move optimization */