wresize(3X)

NAME
wresize - resize a curses window

SYNOPSIS
#include <curses.h> int wresize(WINDOW *win, int lines, int columns);

DESCRIPTION
The wresize function adjusts the dimensions of an ncurses window to the specified values, reallocating storage as necessary. If either dimension is larger than the current values, the window's data is filled with blanks that have the current background rendition (as set by wbkgndset) merged into them. If the current cursor position is outside the retained area of the window, the cursor is moved to within the nearest window edge. Window data is otherwise preserved. This function will fail if either of the new dimensions less than or equal to zero, or if memory cannot be allocated or reallocated for the window. Note that wresize performs non-reentrant malloc(3x) operations, so it isn't advisable to resize from within an interrupt handler. Instead, have your handler set an event flag to be interpreted next time around your program's command loop.

PORTABILITY
This call was designed for ncurses(3x), and is not found in SVr4 curses, 4.4BSD curses, or any other previous version of curses. It is recommended that you conditionalize all code depending on it with the symbol NCURSES.

RETURN VALUE
The function returns the integer ERR upon failure and OK on success.