aboutsummaryrefslogtreecommitdiff
path: root/ncurses/base/lib_redrawln.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-02-28 19:12:44 +0000
committerXin LI <delphij@FreeBSD.org>2014-02-28 19:12:44 +0000
commit4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a (patch)
treeb8f6e12b479a78216f3bffb8e1258d54087268de /ncurses/base/lib_redrawln.c
parente07762606a5bf651a501cb095c98cba90e4a8fe2 (diff)
downloadsrc-4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a.tar.gz
src-4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a.zip
Undo two previous imports which was never done in preparation of doing a
new import.
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=262616
Diffstat (limited to 'ncurses/base/lib_redrawln.c')
-rw-r--r--ncurses/base/lib_redrawln.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/ncurses/base/lib_redrawln.c b/ncurses/base/lib_redrawln.c
index 72905f84d656..6b0905f07d67 100644
--- a/ncurses/base/lib_redrawln.c
+++ b/ncurses/base/lib_redrawln.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_redrawln.c,v 1.17 2010/12/19 00:03:23 tom Exp $")
+MODULE_ID("$Id: lib_redrawln.c,v 1.12 2007/10/13 20:08:56 tom Exp $")
NCURSES_EXPORT(int)
wredrawln(WINDOW *win, int beg, int num)
@@ -47,40 +47,37 @@ wredrawln(WINDOW *win, int beg, int num)
int i;
int end;
size_t len;
- SCREEN *sp;
- T((T_CALLED("wredrawln(%p,%d,%d)"), (void *) win, beg, num));
+ T((T_CALLED("wredrawln(%p,%d,%d)"), win, beg, num));
if (win == 0)
returnCode(ERR);
- sp = _nc_screen_of(win);
-
if (beg < 0)
beg = 0;
if (touchline(win, beg, num) == ERR)
returnCode(ERR);
- if (touchline(CurScreen(sp), beg + win->_begy, num) == ERR)
+ if (touchline(curscr, beg + win->_begy, num) == ERR)
returnCode(ERR);
end = beg + num;
- if (end > CurScreen(sp)->_maxy + 1 - win->_begy)
- end = CurScreen(sp)->_maxy + 1 - win->_begy;
+ if (end > curscr->_maxy + 1)
+ end = curscr->_maxy + 1;
if (end > win->_maxy + 1)
end = win->_maxy + 1;
- len = (size_t) (win->_maxx + 1);
- if (len > (size_t) (CurScreen(sp)->_maxx + 1 - win->_begx))
- len = (size_t) (CurScreen(sp)->_maxx + 1 - win->_begx);
- len *= sizeof(CurScreen(sp)->_line[0].text[0]);
+ len = (win->_maxx + 1);
+ if (len > (size_t) (curscr->_maxx + 1))
+ len = (size_t) (curscr->_maxx + 1);
+ len *= sizeof(curscr->_line[0].text[0]);
for (i = beg; i < end; i++) {
int crow = i + win->_begy;
- memset(CurScreen(sp)->_line[crow].text + win->_begx, 0, len);
- NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_ARGx crow);
+ memset(curscr->_line[crow].text + win->_begx, 0, len);
+ _nc_make_oldhash(crow);
}
returnCode(OK);