diff options
author | 1998-01-17 16:27:30 +0000 | |
---|---|---|
committer | 1998-01-17 16:27:30 +0000 | |
commit | 3ef968cd5e6a7f59ac4f665918a97e4597335327 (patch) | |
tree | 6a160bb76b356b97b64f438f63a11b6c82c5bb8a /lib/libcurses/lib_refresh.c | |
parent | Add _ti_get_screensize(), like ncurses's _nc_get_screensize() (diff) | |
download | wireguard-openbsd-3ef968cd5e6a7f59ac4f665918a97e4597335327.tar.xz wireguard-openbsd-3ef968cd5e6a7f59ac4f665918a97e4597335327.zip |
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_refresh.c')
-rw-r--r-- | lib/libcurses/lib_refresh.c | 12 |
1 files changed, 8 insertions, 4 deletions
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 <curses.priv.h> -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. |