* @ret rc return status code
*/
int delwin ( WINDOW *win ) {
- if ( win == NULL )
- return ERR;
-
/* I think we should blank the region covered by the window -
ncurses doesn't do this, but they have a buffer, so they
may just be deleting from an offscreen context whereas we
WINDOW *derwin ( WINDOW *parent, int nlines, int ncols,
int begin_y, int begin_x ) {
WINDOW *child;
- if ( parent == NULL )
- return NULL;
if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL )
return NULL;
if ( ( (unsigned)ncols > parent->width ) ||
*/
WINDOW *dupwin ( WINDOW *orig ) {
WINDOW *copy;
- if ( orig == NULL )
- return NULL;
if ( ( copy = malloc( sizeof( WINDOW ) ) ) == NULL )
return NULL;
copy->scr = orig->scr;
* @ret rc return status code
*/
int mvwin ( WINDOW *win, int y, int x ) {
- if ( win == NULL )
- return ERR;
if ( ( ( (unsigned)y + win->height ) > LINES ) ||
( ( (unsigned)x + win->width ) > COLS ) )
return ERR;
WINDOW *subwin ( WINDOW *parent, int nlines, int ncols,
int begin_y, int begin_x ) {
WINDOW *child;
- if ( parent == NULL )
- return NULL;
if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL )
return NULL;
child = newwin( nlines, ncols, begin_y, begin_x );