Back to index

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

Go to the source code of this file.

Functions

 wvline_set (WINDOW *win, const cchar_t *ch, int n)

Function Documentation

wvline_set ( WINDOW win,
const cchar_t *  ch,
int  n 
)

Definition at line 45 of file lib_vline_set.c.

{
    int code = ERR;
    NCURSES_SIZE_T row, col;
    NCURSES_SIZE_T end;

    T((T_CALLED("wvline(%p,%s,%d)"), win, _tracecchar_t(ch), n));

    if (win) {
       NCURSES_CH_T wch;
       row = win->_cury;
       col = win->_curx;
       end = row + n - 1;
       if (end > win->_maxy)
           end = win->_maxy;

       if (ch == 0)
           wch = *WACS_VLINE;
       else
           wch = *ch;
       wch = _nc_render(win, wch);

       while (end >= row) {
           struct ldat *line = &(win->_line[end]);
           line->text[col] = wch;
           CHANGED_CELL(line, col);
           end--;
       }

       _nc_synchook(win);
       code = OK;
    }
    returnCode(code);
}

Here is the call graph for this function: