Back to index

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

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 45 of file lib_hline_set.c.

{
    int code = ERR;
    NCURSES_SIZE_T start;
    NCURSES_SIZE_T end;

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

    if (win) {
       struct ldat *line = &(win->_line[win->_cury]);
       NCURSES_CH_T wch;

       start = win->_curx;
       end = start + n - 1;
       if (end > win->_maxx)
           end = win->_maxx;

       CHANGED_RANGE(line, start, end);

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

       while (end >= start) {
           line->text[end] = wch;
           end--;
       }

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

Here is the call graph for this function: