diff options
author | Peter Wemm <peter@FreeBSD.org> | 1999-08-30 07:58:08 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1999-08-30 07:58:08 +0000 |
commit | 99af2e21c73f07587da16d34eb6795f4a46cc5be (patch) | |
tree | 5df591f7e443330146099aa76e2f474a81669ebf /lib/libncurses/lib_refresh.c | |
parent | 02e1576966f0a3b9300a7269c3e6894e62b1f3ba (diff) |
Use src/contrib/ncurses, v5.0.990821 prerelease.
This isn't quite finished yet, there are still some unresolved problems
with ospeed and the sgtty.h (non-posix) terminal interface. Mostly
this only causes problems with src/games.
The other tools and libraries (libform,libpanel,libmenu) will come
shortly but are seperate.
Beware, there be dragons here! (The build will be broken for a short
while)
Notes
Notes:
svn path=/head/; revision=50624
Diffstat (limited to 'lib/libncurses/lib_refresh.c')
-rw-r--r-- | lib/libncurses/lib_refresh.c | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/lib/libncurses/lib_refresh.c b/lib/libncurses/lib_refresh.c deleted file mode 100644 index 994802525a14..000000000000 --- a/lib/libncurses/lib_refresh.c +++ /dev/null @@ -1,91 +0,0 @@ - -/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for * -* details. If they are missing then this copy is in violation of * -* the copyright conditions. */ - -/* - * lib_refresh.c - * - * The routines wredrawln(), wrefresh() and wnoutrefresh(). - * - */ - -#include "curses.priv.h" - -int wredrawln(WINDOW *win, int beg, int num) -{ - T(("wredrawln(%x,%d,%d) called", win, beg, num)); - touchline(win, beg, num); - wrefresh(win); - return OK; -} - -int wrefresh(WINDOW *win) -{ - T(("wrefresh(%x) called", win)); - - if (win == curscr) - curscr->_clear = TRUE; - else - wnoutrefresh(win); - return(doupdate()); -} - -int wnoutrefresh(WINDOW *win) -{ -int i, j; -int begx = win->_begx; -int begy = win->_begy; -int m, n; - - T(("wnoutrefresh(%x) called", win)); - - /* - * This function will break badly if we try to refresh a pad. - */ - if ((win == 0) - || (win->_flags & _ISPAD)) - return(ERR); - - /* - * If 'newscr' has a different background than the window that we're - * trying to refresh, we'll have to copy the whole thing. - */ - if (win->_bkgd != newscr->_bkgd) { - touchwin(win); - newscr->_bkgd = win->_bkgd; - } - newscr->_attrs = win->_attrs; - - win->_flags &= ~_HASMOVED; - for (i = 0, m = begy; i <= win->_maxy; i++, m++) { - if (win->_firstchar[i] != _NOCHANGE) { - j = win->_firstchar[i]; - n = j + begx; - for (; j <= win->_lastchar[i]; j++, n++) { - if (win->_line[i][j] != newscr->_line[m][n]) { - newscr->_line[m][n] = win->_line[i][j]; - - if (newscr->_firstchar[m] == _NOCHANGE) - newscr->_firstchar[m] = newscr->_lastchar[m] = n; - else if (n < newscr->_firstchar[m]) - newscr->_firstchar[m] = n; - else if (n > newscr->_lastchar[m]) - newscr->_lastchar[m] = n; - } - } - } - win->_firstchar[i] = win->_lastchar[i] = _NOCHANGE; - } - - if (win->_clear) { - win->_clear = FALSE; - newscr->_clear = TRUE; - } - - if (! win->_leave) { - newscr->_cury = win->_cury + win->_begy; - newscr->_curx = win->_curx + win->_begx; - } - return(OK); -} |