summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/lib_mvwin.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-12-14 23:15:36 +0000
committermillert <millert@openbsd.org>1997-12-14 23:15:36 +0000
commitd2ffe6bf7b0cd86fe399a2efc19fa1415cfaf318 (patch)
tree864ea84dbd1bce6237cf47ecad8ddbcf89531f33 /lib/libcurses/lib_mvwin.c
parentcheck the length of data in memcpy's (diff)
downloadwireguard-openbsd-d2ffe6bf7b0cd86fe399a2efc19fa1415cfaf318.tar.xz
wireguard-openbsd-d2ffe6bf7b0cd86fe399a2efc19fa1415cfaf318.zip
ncurses-4.1-971213
Diffstat (limited to 'lib/libcurses/lib_mvwin.c')
-rw-r--r--lib/libcurses/lib_mvwin.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/lib/libcurses/lib_mvwin.c b/lib/libcurses/lib_mvwin.c
index acc84ead00d..020c8db4aca 100644
--- a/lib/libcurses/lib_mvwin.c
+++ b/lib/libcurses/lib_mvwin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_mvwin.c,v 1.3 1997/12/03 05:21:24 millert Exp $ */
+/* $OpenBSD: lib_mvwin.c,v 1.4 1997/12/14 23:15:47 millert Exp $ */
/***************************************************************************
@@ -32,7 +32,7 @@
#include <curses.priv.h>
-MODULE_ID("Id: lib_mvwin.c,v 1.5 1997/09/20 15:02:34 juergen Exp $")
+MODULE_ID("Id: lib_mvwin.c,v 1.6 1997/12/03 15:47:41 Alexander.V.Lukyanov Exp $")
int mvwin(WINDOW *win, int by, int bx)
{
@@ -86,34 +86,7 @@ int mvwin(WINDOW *win, int by, int bx)
|| by < 0
|| bx < 0)
returnCode(ERR);
- else { /* We have to clear the area on the virtual screen where the
- * window is currently. Actually the following code is
- * equivalent to erase() the window at it's current place and
- * then to call a wnoutrefresh(). We can't do it this easy way,
- * because we still need the content of the window at its new
- * place:-)
- * N.B.: Its not worth to think about an optimization to
- * clear only the parts that are not overlapped by the new
- * location of the window. The overlapped region will already
- * be replaced by the next wnoutrefresh() for this window.
- */
- int x,y;
- for(y=0;y<=win->_maxy;y++) {
- struct ldat* nline = &(newscr->_line[y+win->_begy+win->_yoffset]);
- for(x=0;x<=win->_maxx;x++) {
- nline->text[x+win->_begx] = newscr->_bkgd;
- }
- if (nline->firstchar==_NOCHANGE) {
- nline->firstchar = win->_begx;
- nline->lastchar = win->_begx + win->_maxx;
- } else {
- if (nline->firstchar > win->_begx)
- nline->firstchar = win->_begx;
- if (nline->lastchar < (win->_begx + win->_maxx))
- nline->lastchar = (win->_begx + win->_maxx);
- }
- }
- }
+
/*
* Whether or not the window is moved, touch the window's contents so
* that a following call to 'wrefresh()' will paint the window at the