From 3ef968cd5e6a7f59ac4f665918a97e4597335327 Mon Sep 17 00:00:00 2001 From: millert Date: Sat, 17 Jan 1998 16:27:30 +0000 Subject: 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. --- lib/libcurses/lib_refresh.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/libcurses/lib_refresh.c') diff --git a/lib/libcurses/lib_refresh.c b/lib/libcurses/lib_refresh.c index 65c32f7d7e9..577f9b2ffc9 100644 --- a/lib/libcurses/lib_refresh.c +++ b/lib/libcurses/lib_refresh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_refresh.c,v 1.3 1997/12/03 05:21:28 millert Exp $ */ +/* $OpenBSD: lib_refresh.c,v 1.4 1998/01/17 16:27:35 millert Exp $ */ /*************************************************************************** @@ -32,7 +32,7 @@ #include -MODULE_ID("Id: lib_refresh.c,v 1.17 1997/11/29 19:54:29 tom Exp $") +MODULE_ID("Id: lib_refresh.c,v 1.18 1997/12/19 17:04:06 xtang Exp $") int wrefresh(WINDOW *win) { @@ -61,8 +61,8 @@ int code; int wnoutrefresh(WINDOW *win) { short i, j; -short begx = win->_begx; -short begy = win->_begy; +short begx; +short begy; short m, n; bool wide; @@ -79,6 +79,10 @@ bool wide; || (win->_flags & _ISPAD)) returnCode(ERR); + /* put them here so "win == 0" won't break our code */ + begx = win->_begx; + begy = win->_begy; + /* * If 'newscr' has a different background than the window that we're * trying to refresh, we'll have to copy the whole thing. -- cgit v1.2.3-59-g8ed1b