Back to index

tetex-bin  3.0
Functions
lib_redrawln.c File Reference
#include <curses.priv.h>

Go to the source code of this file.

Functions

 wredrawln (WINDOW *win, int beg, int num)

Function Documentation

wredrawln ( WINDOW win,
int  beg,
int  num 
)

Definition at line 45 of file lib_redrawln.c.

{
    int i;
    int end;
    size_t len = (win->_maxx + 1);

    T((T_CALLED("wredrawln(%p,%d,%d)"), win, beg, num));

    if (beg < 0)
       beg = 0;

    if (touchline(win, beg, num) == ERR)
       returnCode(ERR);

    end = beg + num;
    if (end > curscr->_maxy + 1)
       end = curscr->_maxy + 1;
    if (end > win->_maxy + 1)
       end = win->_maxy + 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++) {
       memset(curscr->_line[i + win->_begy].text + win->_begx, 0, len);
       _nc_make_oldhash(i + win->_begy);
    }

    returnCode(OK);
}

Here is the call graph for this function: