Back to index

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

Go to the source code of this file.

Functions

 winchnstr (WINDOW *win, chtype *str, int n)

Function Documentation

winchnstr ( WINDOW win,
chtype str,
int  n 
)

Definition at line 46 of file lib_inchstr.c.

{
    int i = 0;

    T((T_CALLED("winchnstr(%p,%p,%d)"), win, str, n));

    if (!str)
       returnCode(0);

    if (win) {
       for (; (n < 0 || (i < n)) && (win->_curx + i <= win->_maxx); i++)
           str[i] =
              CharOf(win->_line[win->_cury].text[win->_curx + i]) |
              AttrOf(win->_line[win->_cury].text[win->_curx + i]);
    }
    str[i] = (chtype) 0;

    returnCode(i);
}