Back to index

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

Go to the source code of this file.

Functions

 werase (WINDOW *win)

Function Documentation

werase ( WINDOW win)

Definition at line 46 of file lib_erase.c.

{
    int code = ERR;
    int y;
    NCURSES_CH_T blank;
    NCURSES_CH_T *sp, *end, *start;

    T((T_CALLED("werase(%p)"), win));

    if (win) {
       blank = win->_nc_bkgd;
       for (y = 0; y <= win->_maxy; y++) {
           start = win->_line[y].text;
           end = &start[win->_maxx];

           for (sp = start; sp <= end; sp++)
              *sp = blank;

           win->_line[y].firstchar = 0;
           win->_line[y].lastchar = win->_maxx;
       }
       win->_curx = win->_cury = 0;
       win->_flags &= ~_WRAPPED;
       _nc_synchook(win);
       code = OK;
    }
    returnCode(code);
}

Here is the call graph for this function:

Here is the caller graph for this function: