DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

curses(S-osr5)


curses -- CRT screen handling and optimization package

Syntax

cc ... -lcurses

#include <curses.h>

Description

The curses library routines give the user a terminal-independent method of updating character screens with reasonable optimization. A program using these routines must be compiled with the -lcurses option of cc(CP).

The curses package allows:

To initialize the routines, you must call the routine initscr or newterm before using any of the other routines that deal with windows and screens. The routine endwin(S-osr5) must be called before exiting. Most interactive, screen-oriented programs want single-character input without echoing. To get it, use this sequence:

cbreak();
noecho();

Most programs would also use the sequence:

nonl();
intrflush(stdscr,FALSE);
keypad(stdscr,TRUE);

Before you run a curses( ) program, set the tab stops of the terminal and output its initialization strings if they are defined. You can do this using the command:

tput init

after the shell environment variable TERM has been exported. (See terminfo(F) and terminfo(M) for details.)

The curses( ) library lets you manipulate data structures, called windows, which can be thought of as two-dimensional arrays of characters. The library supplies a default window called stdscr, which is the size of the terminal screen. You can create others using newwin( ).

Windows are referred to by variables declared as WINDOW *. These data structures are manipulated with routines described on curses pages (whose names begin with ``curs_''). Among the most basic routines are move( ) and addch( ). The library includes more general versions of these routines that allow you to specify a window.

After routines manipulate a window, refresh( ) is called, telling curses( ) to make the user's screen look like stdscr. The characters in a window are actually of type chtype (character and attribute data) so that other information about the character can also be stored with each character.

Special windows called pads can also be manipulated. They are windows that might not be associated with a viewable part of the screen. See curs_pad(S-osr5) for more information.

In addition to drawing characters on the screen, you can use video attributes and colors, producing characters that are underlined, reverse video, or in color on terminals that support those modes. You can also output line-drawing characters. On input, curses( ) can also translate the escape sequences from arrow and function keys into single values. The video attributes, line-drawing characters, and input values use names, defined in curses.h, such as A_REVERSE, ACS_HLINE, and KEY_LEFT.

curses( ) has routines that manipulate color on color alphanumeric terminals. To use them, call start_color( ), usually right after initscr( ). Colors are always used in pairs, called color-pairs. A color-pair has a foreground color (the character) and a background color (the field on which the character is displayed).

You initialize a color-pair with the routine init_pair( ). After it has been initialized, you can use COLOR_PAIR(n), a macro defined in curses.h, in the same way that you use other video attributes. If a terminal can redefine colors, the following routines are useful:

If the environment variables LINES and COLUMNS are set, or if the program is running in a window environment, line and column information in the environment overrides information read by terminfo( ). Programs running in a window environment need this because the size of a screen is changeable.

If the environment variable TERMINFO is defined, any program using curses( ) checks for a local terminal definition before checking in the standard place. For example, if TERM is set to wyse150, then the compiled terminal definition is found in

/usr/lib/terminfo/w/wyse150

(The w is copied from the first letter of wyse150 to avoid creating huge directories.) However, if TERMINFO is set to $HOME/myterms, curses( ) first checks

$HOME/myterms/w/wyse150

and if that fails, it checks

/usr/lib/terminfo/w/wyse150

This is useful for developing experimental definitions or when write permission in /usr/lib/terminfo is not available.

The integer variables LINES and COLS are defined in curses.h and are filled in by initscr( ) with the size of the screen. The constant TRUE has the value 1; and the constant FALSE has the value 0.

curses routines also define the WINDOW * variable curscr, which is used for certain low-level operations such as clearing and redrawing a screen. However, curscr can be used in only a few routines.

International functions

The number of bytes and the number of columns to hold a character from the supplementary character set is locale-specific (locale category LC_CTYPE). You can specify it in the character class table.

For editing, it is entirely appropriate to operate at the character level. But for screen formatting, arbitrary movement of characters on screen is not desirable.

Routines that overwrite characters (such as addch( )) operate on a screen level. Overwriting a character with a character that requires a different number of columns can produce orphaned columns. They are filled with background characters.

Routines that insert characters (such as insch( )) operate on a character level (that is, at the character boundaries). A new character is inserted right before the current character, regardless of which column of a character the cursor points to. Before insertion, the cursor moves to the first column of the character.

Routines that delete characters (such as delch( )) also operate on a character level (that is, at the character boundaries). The character at the cursor is deleted, no matter which column of the character the cursor points to. Before deletion, the cursor moves to the first column of the character.

You cannot place a multi-column character on the last column of a line. If you try, the last column is set to the background character. Such an operation can also create orphaned columns, filled with background characters.

Overlapping and overwriting a window follows the operation of overwriting characters around its edge. The orphaned columns, if any, are handled as in character operations.

The cursor can be placed anywhere in a window. It moves to the first column of a multi-column character before an insertion or deletion.

Routine and argument names

Many curses( ) routines have two or more versions: In each case, win is the window affected, and pad is the pad affected; win and pad are always pointers to type WINDOW.

Routines that set options require a Boolean flag bf with the value TRUE or FALSE; the flag bf is always of type bool. The variables ch and attrs are always of type chtype. The types WINDOW, SCREEN, bool, and chtype are defined in curses.h. The type TERMINAL, is defined in term.h. All other arguments are integers.

Many routines can be optimized by inlining them as macros. Compile them with

cc ... -DPERFORMANCE

to explicitly enable this (see tinfo.h).

Routine name index

The following table lists each curses routine and the name of the manual page on which it is described.

curses Routine Name Manual Page Name
addch curs_addch(S-osr5)
addchnstr curs_addchstr(S-osr5)
addchstr curs_addchstr(S-osr5)
addnstr curs_addstr(S-osr5)
addnwstr curs_addwstr(S-osr5)
addstr curs_addstr(S-osr5)
addwch curs_addwch(S-osr5)
addwchnstr curs_addwchstr(S-osr5)
addwchstr curs_addwchstr(S-osr5)
addwstr curs_addwstr(S-osr5)
attroff curs_attr(S-osr5)
attron curs_attr(S-osr5)
attrset curs_attr(S-osr5)
baudrate curs_termattrs(S-osr5)
beep curs_beep(S-osr5)
bkgd curs_bkgd(S-osr5)
bkgdset curs_bkgd(S-osr5)
border curs_border(S-osr5)
box curs_border(S-osr5)
can_change_color curs_color(S-osr5)
cbreak curs_inopts(S-osr5)
clear curs_clear(S-osr5)
clearok curs_outopts(S-osr5)
clrtobot curs_clear(S-osr5)
clrtoeol curs_clear(S-osr5)
color_content curs_color(S-osr5)
copywin curs_overlay(S-osr5)
curs_set curs_kernel(S-osr5)
def_prog_mode curs_kernel(S-osr5)
def_shell_mode curs_kernel(S-osr5)
del_curterm curs_terminfo(S-osr5)
delay_output curs_util(S-osr5)
delch curs_delch(S-osr5)
deleteln curs_deleteln(S-osr5)
delscreen curs_initscr(S-osr5)
delwin curs_window(S-osr5)
derwin curs_window(S-osr5)
doupdate curs_refresh(S-osr5)
draino curs_util(S-osr5)
dupwin curs_window(S-osr5)
echo curs_inopts(S-osr5)
echochar curs_addch(S-osr5)
echowchar curs_addwch(S-osr5)
endwin curs_initscr(S-osr5)
erase curs_clear(S-osr5)
erasechar curs_termattrs(S-osr5)
filter curs_util(S-osr5)
flash curs_beep(S-osr5)
flushinp curs_util(S-osr5)
getbegyx curs_getyx(S-osr5)
getch curs_getch(S-osr5)
getmaxyx curs_getyx(S-osr5)
getnwstr curs_getwstr(S-osr5)
getparyx curs_getyx(S-osr5)
getstr curs_getstr(S-osr5)
getsyx curs_kernel(S-osr5)
getwch curs_getwch(S-osr5)
getwin curs_util(S-osr5)
getwstr curs_getwstr(S-osr5)
getyx curs_getyx(S-osr5)
halfdelay curs_inopts(S-osr5)
has_colors curs_color(S-osr5)
has_ic curs_termattrs(S-osr5)
has_il curs_termattrs(S-osr5)
hline curs_border(S-osr5)
idcok curs_outopts(S-osr5)
idlok curs_outopts(S-osr5)
immedok curs_outopts(S-osr5)
inch curs_inch(S-osr5)
inchnstr curs_inchstr(S-osr5)
inchstr curs_inchstr(S-osr5)
init_color curs_color(S-osr5)
init_pair curs_color(S-osr5)
initscr curs_initscr(S-osr5)
innstr curs_instr(S-osr5)
innwstr curs_inwstr(S-osr5)
insch curs_insch(S-osr5)
insdelln curs_deleteln(S-osr5)
insertln curs_deleteln(S-osr5)
insnstr curs_insstr(S-osr5)
insnwstr curs_inswstr(S-osr5)
insstr curs_insstr(S-osr5)
instr curs_instr(S-osr5)
inswch curs_inswch(S-osr5)
inswstr curs_inswstr(S-osr5)
intrflush curs_inopts(S-osr5)
inwch curs_inwch(S-osr5)
inwchnstr curs_inwchstr(S-osr5)
inwchstr curs_inwchstr(S-osr5)
inwstr curs_inwstr(S-osr5)
is_linetouched curs_touch(S-osr5)
is_wintouched curs_touch(S-osr5)
isendwin curs_initscr(S-osr5)
keyname curs_util(S-osr5)
keypad curs_inopts(S-osr5)
killchar curs_termattrs(S-osr5)
leaveok curs_outopts(S-osr5)
longname curs_termattrs(S-osr5)
meta curs_inopts(S-osr5)
move curs_move(S-osr5)
mvaddch curs_addch(S-osr5)
mvaddchnstr curs_addchstr(S-osr5)
mvaddchstr curs_addchstr(S-osr5)
mvaddnstr curs_addstr(S-osr5)
mvaddnwstr curs_addwstr(S-osr5)
mvaddstr curs_addstr(S-osr5)
mvaddwch curs_addwch(S-osr5)
mvaddwchnstr curs_addwchstr(S-osr5)
mvaddwchstr curs_addwchstr(S-osr5)
mvaddwstr curs_addwstr(S-osr5)
mvcur curs_terminfo(S-osr5)
mvdelch curs_delch(S-osr5)
mvderwin curs_window(S-osr5)
mvgetch curs_getch(S-osr5)
mvgetnwstr curs_getwstr(S-osr5)
mvgetstr curs_getstr(S-osr5)
mvgetwch curs_getwch(S-osr5)
mvgetwstr curs_getwstr(S-osr5)
mvinch curs_inch(S-osr5)
mvinchnstr curs_inchstr(S-osr5)
mvinchstr curs_inchstr(S-osr5)
mvinnstr curs_instr(S-osr5)
mvinnwstr curs_inwstr(S-osr5)
mvinsch curs_insch(S-osr5)
mvinsnstr curs_insstr(S-osr5)
mvinsnwstr curs_inswstr(S-osr5)
mvinsstr curs_insstr(S-osr5)
mvinstr curs_instr(S-osr5)
mvinswch curs_inswch(S-osr5)
mvinswstr curs_inswstr(S-osr5)
mvinwch curs_inwch(S-osr5)
mvinwchnstr curs_inwchstr(S-osr5)
mvinwchstr curs_inwchstr(S-osr5)
mvinwstr curs_inwstr(S-osr5)
mvprintw curs_printw(S-osr5)
mvscanw curs_scanw(S-osr5)
mvwaddch curs_addch(S-osr5)
mvwaddchnstr curs_addchstr(S-osr5)
mvwaddchstr curs_addchstr(S-osr5)
mvwaddnstr curs_addstr(S-osr5)
mvwaddnwstr curs_addwstr(S-osr5)
mvwaddstr curs_addstr(S-osr5)
mvwaddwch curs_addwch(S-osr5)
mvwaddwchnstr curs_addwchstr(S-osr5)
mvwaddwchstr curs_addwchstr(S-osr5)
mvwaddwstr curs_addwstr(S-osr5)
mvwdelch curs_delch(S-osr5)
mvwgetch curs_getch(S-osr5)
mvwgetnwstr curs_getwstr(S-osr5)
mvwgetstr curs_getstr(S-osr5)
mvwgetwch curs_getwch(S-osr5)
mvwgetwstr curs_getwstr(S-osr5)
mvwin curs_window(S-osr5)
mvwinch curs_inch(S-osr5)
mvwinchnstr curs_inchstr(S-osr5)
mvwinchstr curs_inchstr(S-osr5)
mvwinnstr curs_instr(S-osr5)
mvwinnwstr curs_inwstr(S-osr5)
mvwinsch curs_insch(S-osr5)
mvwinsnstr curs_insstr(S-osr5)
mvwinsstr curs_insstr(S-osr5)
mvwinstr curs_instr(S-osr5)
mvwinswch curs_inswch(S-osr5)
mvwinswstr curs_inswstr(S-osr5)
mvwinwch curs_inwch(S-osr5)
mvwinwchnstr curs_inwchstr(S-osr5)
mvwinwchstr curs_inwchstr(S-osr5)
mvwinwstr curs_inwstr(S-osr5)
mvwprintw curs_printw(S-osr5)
mvwscanw curs_scanw(S-osr5)
napms curs_kernel(S-osr5)
newpad curs_pad(S-osr5)
newterm curs_initscr(S-osr5)
newwin curs_window(S-osr5)
nl curs_outopts(S-osr5)
nocbreak curs_inopts(S-osr5)
nodelay curs_inopts(S-osr5)
noecho curs_inopts(S-osr5)
nonl curs_outopts(S-osr5)
noqiflush curs_inopts(S-osr5)
noraw curs_inopts(S-osr5)
notimeout curs_inopts(S-osr5)
overlay curs_overlay(S-osr5)
overwrite curs_overlay(S-osr5)
pair_content curs_color(S-osr5)
pechochar curs_pad(S-osr5)
pechowchar curs_pad(S-osr5)
pnoutrefresh curs_pad(S-osr5)
prefresh curs_pad(S-osr5)
printw curs_printw(S-osr5)
putp curs_terminfo(S-osr5)
putwin curs_util(S-osr5)
qiflush curs_inopts(S-osr5)
raw curs_inopts(S-osr5)
redrawwin curs_refresh(S-osr5)
refresh curs_refresh(S-osr5)
reset_prog_mode curs_kernel(S-osr5)
reset_shell_mode curs_kernel(S-osr5)
resetty curs_kernel(S-osr5)
restartterm curs_terminfo(S-osr5)
ripoffline curs_kernel(S-osr5)
savetty curs_kernel(S-osr5)
scanw curs_scanw(S-osr5)
scr_dump curs_scr_dump(S-osr5)
scr_init curs_scr_dump(S-osr5)
scr_restore curs_scr_dump(S-osr5)
scr_set curs_scr_dump(S-osr5)
scrl curs_scroll(S-osr5)
scroll curs_scroll(S-osr5)
scrollok curs_outopts(S-osr5)
set_curterm curs_terminfo(S-osr5)
set_term curs_initscr(S-osr5)
setscrreg curs_outopts(S-osr5)
setsyx curs_kernel(S-osr5)
setterm curs_terminfo(S-osr5)
setupterm curs_terminfo(S-osr5)
slk_attroff curs_slk(S-osr5)
slk_attron curs_slk(S-osr5)
slk_attrset curs_slk(S-osr5)
slk_clear curs_slk(S-osr5)
slk_init curs_slk(S-osr5)
slk_label curs_slk(S-osr5)
slk_noutrefresh curs_slk(S-osr5)
slk_refresh curs_slk(S-osr5)
slk_restore curs_slk(S-osr5)
slk_set curs_slk(S-osr5)
slk_touch curs_slk(S-osr5)
standend curs_attr(S-osr5)
standout curs_attr(S-osr5)
start_color curs_color(S-osr5)
subpad curs_pad(S-osr5)
subwin curs_window(S-osr5)
syncok curs_window(S-osr5)
termattrs curs_termattrs(S-osr5)
termname curs_termattrs(S-osr5)
tgetent curs_termcap(S-osr5)
tgetflag curs_termcap(S-osr5)
tgetnum curs_termcap(S-osr5)
tgetstr curs_termcap(S-osr5)
tgoto curs_termcap(S-osr5)
tigetflag curs_terminfo(S-osr5)
tigetnum curs_terminfo(S-osr5)
tigetstr curs_terminfo(S-osr5)
timeout curs_inopts(S-osr5)
touchline curs_touch(S-osr5)
touchwin curs_touch(S-osr5)
tparm curs_terminfo(S-osr5)
tputs curs_termcap(S-osr5)
tputs curs_terminfo(S-osr5)
typeahead curs_inopts(S-osr5)
unctrl curs_util(S-osr5)
ungetch curs_getch(S-osr5)
ungetwch curs_getwch(S-osr5)
untouchwin curs_touch(S-osr5)
use_env curs_util(S-osr5)
vidattr curs_terminfo(S-osr5)
vidputs curs_terminfo(S-osr5)
vline curs_border(S-osr5)
vwprintw curs_printw(S-osr5)
vwscanw curs_scanw(S-osr5)
waddch curs_addch(S-osr5)
waddchnstr curs_addchstr(S-osr5)
waddchstr curs_addchstr(S-osr5)
waddnstr curs_addstr(S-osr5)
waddnwstr curs_addwstr(S-osr5)
waddstr curs_addstr(S-osr5)
waddwch curs_addwch(S-osr5)
waddwchnstr curs_addwchstr(S-osr5)
waddwchstr curs_addwchstr(S-osr5)
waddwstr curs_addwstr(S-osr5)
wattroff curs_attr(S-osr5)
wattron curs_attr(S-osr5)
wattrset curs_attr(S-osr5)
wbkgd curs_bkgd(S-osr5)
wbkgdset curs_bkgd(S-osr5)
wborder curs_border(S-osr5)
wclear curs_clear(S-osr5)
wclrtobot curs_clear(S-osr5)
wclrtoeol curs_clear(S-osr5)
wcursyncup curs_window(S-osr5)
wdelch curs_delch(S-osr5)
wdeleteln curs_deleteln(S-osr5)
wechochar curs_addch(S-osr5)
wechowchar curs_addwch(S-osr5)
werase curs_clear(S-osr5)
wgetch curs_getch(S-osr5)
wgetnstr curs_getstr(S-osr5)
wgetnwstr curs_getwstr(S-osr5)
wgetstr curs_getstr(S-osr5)
wgetwch curs_getwch(S-osr5)
wgetwstr curs_getwstr(S-osr5)
whline curs_border(S-osr5)
winch curs_inch(S-osr5)
winchnstr curs_inchstr(S-osr5)
winchstr curs_inchstr(S-osr5)
winnstr curs_instr(S-osr5)
winnwstr curs_inwstr(S-osr5)
winsch curs_insch(S-osr5)
winsdelln curs_deleteln(S-osr5)
winsertln curs_deleteln(S-osr5)
winsnstr curs_insstr(S-osr5)
winsnwstr curs_inswstr(S-osr5)
winsstr curs_insstr(S-osr5)
winstr curs_instr(S-osr5)
winswch curs_inswch(S-osr5)
winswstr curs_inswstr(S-osr5)
winwch curs_inwch(S-osr5)
winwchnstr curs_inwchstr(S-osr5)
winwchstr curs_inwchstr(S-osr5)
winwstr curs_inwstr(S-osr5)
wmove curs_move(S-osr5)
wnoutrefresh curs_refresh(S-osr5)
wprintw curs_printw(S-osr5)
wredrawln curs_refresh(S-osr5)
wrefresh curs_refresh(S-osr5)
wscanw curs_scanw(S-osr5)
wscrl curs_scroll(S-osr5)
wsetscrreg curs_outopts(S-osr5)
wstandend curs_attr(S-osr5)
wstandout curs_attr(S-osr5)
wsyncdown curs_window(S-osr5)
wsyncup curs_window(S-osr5)
wtimeout curs_inopts(S-osr5)
wtouchln curs_touch(S-osr5)
wvline curs_border(S-osr5)

 curses Routine Name    Manual Page Name
 addch                  curs_addch(S-osr5)
 addchnstr              curs_addchstr(S-osr5)
 addchstr               curs_addchstr(S-osr5)
 addnstr                curs_addstr(S-osr5)
 addnwstr               curs_addwstr(S-osr5)
 addstr                 curs_addstr(S-osr5)
 addwch                 curs_addwch(S-osr5)
 addwchnstr             curs_addwchstr(S-osr5)
 addwchstr              curs_addwchstr(S-osr5)
 addwstr                curs_addwstr(S-osr5)
 attroff                curs_attr(S-osr5)
 attron                 curs_attr(S-osr5)
 attrset                curs_attr(S-osr5)
 baudrate               curs_termattrs(S-osr5)
 beep                   curs_beep(S-osr5)
 bkgd                   curs_bkgd(S-osr5)
 bkgdset                curs_bkgd(S-osr5)
 border                 curs_border(S-osr5)
 box                    curs_border(S-osr5)
 can_change_color       curs_color(S-osr5)
 cbreak                 curs_inopts(S-osr5)
 clear                  curs_clear(S-osr5)
 clearok                curs_outopts(S-osr5)
 clrtobot               curs_clear(S-osr5)
 clrtoeol               curs_clear(S-osr5)
 color_content          curs_color(S-osr5)
 copywin                curs_overlay(S-osr5)
 curs_set               curs_kernel(S-osr5)
 def_prog_mode          curs_kernel(S-osr5)
 def_shell_mode         curs_kernel(S-osr5)
 del_curterm            curs_terminfo(S-osr5)
 delay_output           curs_util(S-osr5)
 delch                  curs_delch(S-osr5)
 deleteln               curs_deleteln(S-osr5)
 delscreen              curs_initscr(S-osr5)
 delwin                 curs_window(S-osr5)
 derwin                 curs_window(S-osr5)
 doupdate               curs_refresh(S-osr5)
 draino                 curs_util(S-osr5)
 dupwin                 curs_window(S-osr5)
 echo                   curs_inopts(S-osr5)
 echochar               curs_addch(S-osr5)
 echowchar              curs_addwch(S-osr5)
 endwin                 curs_initscr(S-osr5)
 erase                  curs_clear(S-osr5)
 erasechar              curs_termattrs(S-osr5)
 filter                 curs_util(S-osr5)
 flash                  curs_beep(S-osr5)
 flushinp               curs_util(S-osr5)
 getbegyx               curs_getyx(S-osr5)
 getch                  curs_getch(S-osr5)
 getmaxyx               curs_getyx(S-osr5)
 getnwstr               curs_getwstr(S-osr5)
 getparyx               curs_getyx(S-osr5)
 getstr                 curs_getstr(S-osr5)
 getsyx                 curs_kernel(S-osr5)
 getwch                 curs_getwch(S-osr5)
 getwin                 curs_util(S-osr5)
 getwstr                curs_getwstr(S-osr5)
 getyx                  curs_getyx(S-osr5)
 halfdelay              curs_inopts(S-osr5)
 has_colors             curs_color(S-osr5)
 has_ic                 curs_termattrs(S-osr5)
 has_il                 curs_termattrs(S-osr5)
 hline                  curs_border(S-osr5)
 idcok                  curs_outopts(S-osr5)
 idlok                  curs_outopts(S-osr5)
 immedok                curs_outopts(S-osr5)
 inch                   curs_inch(S-osr5)
 inchnstr               curs_inchstr(S-osr5)
 inchstr                curs_inchstr(S-osr5)
 init_color             curs_color(S-osr5)
 init_pair              curs_color(S-osr5)
 initscr                curs_initscr(S-osr5)
 innstr                 curs_instr(S-osr5)
 innwstr                curs_inwstr(S-osr5)
 insch                  curs_insch(S-osr5)
 insdelln               curs_deleteln(S-osr5)
 insertln               curs_deleteln(S-osr5)
 insnstr                curs_insstr(S-osr5)
 insnwstr               curs_inswstr(S-osr5)
 insstr                 curs_insstr(S-osr5)
 instr                  curs_instr(S-osr5)
 inswch                 curs_inswch(S-osr5)
 inswstr                curs_inswstr(S-osr5)
 intrflush              curs_inopts(S-osr5)
 inwch                  curs_inwch(S-osr5)
 inwchnstr              curs_inwchstr(S-osr5)
 inwchstr               curs_inwchstr(S-osr5)
 inwstr                 curs_inwstr(S-osr5)
 is_linetouched         curs_touch(S-osr5)
 is_wintouched          curs_touch(S-osr5)
 isendwin               curs_initscr(S-osr5)
 keyname                curs_util(S-osr5)
 keypad                 curs_inopts(S-osr5)
 killchar               curs_termattrs(S-osr5)
 leaveok                curs_outopts(S-osr5)
 longname               curs_termattrs(S-osr5)
 meta                   curs_inopts(S-osr5)
 move                   curs_move(S-osr5)
 mvaddch                curs_addch(S-osr5)
 mvaddchnstr            curs_addchstr(S-osr5)
 mvaddchstr             curs_addchstr(S-osr5)
 mvaddnstr              curs_addstr(S-osr5)
 mvaddnwstr             curs_addwstr(S-osr5)
 mvaddstr               curs_addstr(S-osr5)
 mvaddwch               curs_addwch(S-osr5)
 mvaddwchnstr           curs_addwchstr(S-osr5)
 mvaddwchstr            curs_addwchstr(S-osr5)
 mvaddwstr              curs_addwstr(S-osr5)
 mvcur                  curs_terminfo(S-osr5)
 mvdelch                curs_delch(S-osr5)
 mvderwin               curs_window(S-osr5)
 mvgetch                curs_getch(S-osr5)
 mvgetnwstr             curs_getwstr(S-osr5)
 mvgetstr               curs_getstr(S-osr5)
 mvgetwch               curs_getwch(S-osr5)
 mvgetwstr              curs_getwstr(S-osr5)
 mvinch                 curs_inch(S-osr5)
 mvinchnstr             curs_inchstr(S-osr5)
 mvinchstr              curs_inchstr(S-osr5)
 mvinnstr               curs_instr(S-osr5)
 mvinnwstr              curs_inwstr(S-osr5)
 mvinsch                curs_insch(S-osr5)
 mvinsnstr              curs_insstr(S-osr5)
 mvinsnwstr             curs_inswstr(S-osr5)
 mvinsstr               curs_insstr(S-osr5)
 mvinstr                curs_instr(S-osr5)
 mvinswch               curs_inswch(S-osr5)
 mvinswstr              curs_inswstr(S-osr5)
 mvinwch                curs_inwch(S-osr5)
 mvinwchnstr            curs_inwchstr(S-osr5)
 mvinwchstr             curs_inwchstr(S-osr5)
 mvinwstr               curs_inwstr(S-osr5)
 mvprintw               curs_printw(S-osr5)
 mvscanw                curs_scanw(S-osr5)
 mvwaddch               curs_addch(S-osr5)
 mvwaddchnstr           curs_addchstr(S-osr5)
 mvwaddchstr            curs_addchstr(S-osr5)
 mvwaddnstr             curs_addstr(S-osr5)
 mvwaddnwstr            curs_addwstr(S-osr5)
 mvwaddstr              curs_addstr(S-osr5)
 mvwaddwch              curs_addwch(S-osr5)
 mvwaddwchnstr          curs_addwchstr(S-osr5)
 mvwaddwchstr           curs_addwchstr(S-osr5)
 mvwaddwstr             curs_addwstr(S-osr5)
 mvwdelch               curs_delch(S-osr5)
 mvwgetch               curs_getch(S-osr5)
 mvwgetnwstr            curs_getwstr(S-osr5)
 mvwgetstr              curs_getstr(S-osr5)
 mvwgetwch              curs_getwch(S-osr5)
 mvwgetwstr             curs_getwstr(S-osr5)
 mvwin                  curs_window(S-osr5)
 mvwinch                curs_inch(S-osr5)
 mvwinchnstr            curs_inchstr(S-osr5)
 mvwinchstr             curs_inchstr(S-osr5)
 mvwinnstr              curs_instr(S-osr5)
 mvwinnwstr             curs_inwstr(S-osr5)
 mvwinsch               curs_insch(S-osr5)
 mvwinsnstr             curs_insstr(S-osr5)
 mvwinsstr              curs_insstr(S-osr5)
 mvwinstr               curs_instr(S-osr5)
 mvwinswch              curs_inswch(S-osr5)
 mvwinswstr             curs_inswstr(S-osr5)
 mvwinwch               curs_inwch(S-osr5)
 mvwinwchnstr           curs_inwchstr(S-osr5)
 mvwinwchstr            curs_inwchstr(S-osr5)
 mvwinwstr              curs_inwstr(S-osr5)
 mvwprintw              curs_printw(S-osr5)
 mvwscanw               curs_scanw(S-osr5)
 napms                  curs_kernel(S-osr5)
 newpad                 curs_pad(S-osr5)
 newterm                curs_initscr(S-osr5)
 newwin                 curs_window(S-osr5)
 nl                     curs_outopts(S-osr5)
 nocbreak               curs_inopts(S-osr5)
 nodelay                curs_inopts(S-osr5)
 noecho                 curs_inopts(S-osr5)
 nonl                   curs_outopts(S-osr5)
 noqiflush              curs_inopts(S-osr5)
 noraw                  curs_inopts(S-osr5)
 notimeout              curs_inopts(S-osr5)
 overlay                curs_overlay(S-osr5)
 overwrite              curs_overlay(S-osr5)
 pair_content           curs_color(S-osr5)
 pechochar              curs_pad(S-osr5)
 pechowchar             curs_pad(S-osr5)
 pnoutrefresh           curs_pad(S-osr5)
 prefresh               curs_pad(S-osr5)
 printw                 curs_printw(S-osr5)
 putp                   curs_terminfo(S-osr5)
 putwin                 curs_util(S-osr5)
 qiflush                curs_inopts(S-osr5)
 raw                    curs_inopts(S-osr5)
 redrawwin              curs_refresh(S-osr5)
 refresh                curs_refresh(S-osr5)
 reset_prog_mode        curs_kernel(S-osr5)
 reset_shell_mode       curs_kernel(S-osr5)
 resetty                curs_kernel(S-osr5)
 restartterm            curs_terminfo(S-osr5)
 ripoffline             curs_kernel(S-osr5)
 savetty                curs_kernel(S-osr5)
 scanw                  curs_scanw(S-osr5)
 scr_dump               curs_scr_dump(S-osr5)
 scr_init               curs_scr_dump(S-osr5)
 scr_restore            curs_scr_dump(S-osr5)
 scr_set                curs_scr_dump(S-osr5)
 scrl                   curs_scroll(S-osr5)
 scroll                 curs_scroll(S-osr5)
 scrollok               curs_outopts(S-osr5)
 set_curterm            curs_terminfo(S-osr5)
 set_term               curs_initscr(S-osr5)
 setscrreg              curs_outopts(S-osr5)
 setsyx                 curs_kernel(S-osr5)
 setterm                curs_terminfo(S-osr5)
 setupterm              curs_terminfo(S-osr5)
 slk_attroff            curs_slk(S-osr5)
 slk_attron             curs_slk(S-osr5)
 slk_attrset            curs_slk(S-osr5)
 slk_clear              curs_slk(S-osr5)
 slk_init               curs_slk(S-osr5)
 slk_label              curs_slk(S-osr5)
 slk_noutrefresh        curs_slk(S-osr5)
 slk_refresh            curs_slk(S-osr5)
 slk_restore            curs_slk(S-osr5)
 slk_set                curs_slk(S-osr5)
 slk_touch              curs_slk(S-osr5)
 standend               curs_attr(S-osr5)
 standout               curs_attr(S-osr5)
 start_color            curs_color(S-osr5)
 subpad                 curs_pad(S-osr5)
 subwin                 curs_window(S-osr5)
 syncok                 curs_window(S-osr5)
 termattrs              curs_termattrs(S-osr5)
 termname               curs_termattrs(S-osr5)
 tgetent                curs_termcap(S-osr5)
 tgetflag               curs_termcap(S-osr5)
 tgetnum                curs_termcap(S-osr5)
 tgetstr                curs_termcap(S-osr5)
 tgoto                  curs_termcap(S-osr5)
 tigetflag              curs_terminfo(S-osr5)
 tigetnum               curs_terminfo(S-osr5)
 tigetstr               curs_terminfo(S-osr5)
 timeout                curs_inopts(S-osr5)
 touchline              curs_touch(S-osr5)
 touchwin               curs_touch(S-osr5)
 tparm                  curs_terminfo(S-osr5)
 tputs                  curs_termcap(S-osr5)
 tputs                  curs_terminfo(S-osr5)
 typeahead              curs_inopts(S-osr5)
 unctrl                 curs_util(S-osr5)
 ungetch                curs_getch(S-osr5)
 ungetwch               curs_getwch(S-osr5)
 untouchwin             curs_touch(S-osr5)
 use_env                curs_util(S-osr5)
 vidattr                curs_terminfo(S-osr5)
 vidputs                curs_terminfo(S-osr5)
 vline                  curs_border(S-osr5)
 vwprintw               curs_printw(S-osr5)
 vwscanw                curs_scanw(S-osr5)
 waddch                 curs_addch(S-osr5)
 waddchnstr             curs_addchstr(S-osr5)
 waddchstr              curs_addchstr(S-osr5)
 waddnstr               curs_addstr(S-osr5)
 waddnwstr              curs_addwstr(S-osr5)
 waddstr                curs_addstr(S-osr5)
 waddwch                curs_addwch(S-osr5)
 waddwchnstr            curs_addwchstr(S-osr5)
 waddwchstr             curs_addwchstr(S-osr5)
 waddwstr               curs_addwstr(S-osr5)
 wattroff               curs_attr(S-osr5)
 wattron                curs_attr(S-osr5)
 wattrset               curs_attr(S-osr5)
 wbkgd                  curs_bkgd(S-osr5)
 wbkgdset               curs_bkgd(S-osr5)
 wborder                curs_border(S-osr5)
 wclear                 curs_clear(S-osr5)
 wclrtobot              curs_clear(S-osr5)
 wclrtoeol              curs_clear(S-osr5)
 wcursyncup             curs_window(S-osr5)
 wdelch                 curs_delch(S-osr5)
 wdeleteln              curs_deleteln(S-osr5)
 wechochar              curs_addch(S-osr5)
 wechowchar             curs_addwch(S-osr5)
 werase                 curs_clear(S-osr5)
 wgetch                 curs_getch(S-osr5)
 wgetnstr               curs_getstr(S-osr5)
 wgetnwstr              curs_getwstr(S-osr5)
 wgetstr                curs_getstr(S-osr5)
 wgetwch                curs_getwch(S-osr5)
 wgetwstr               curs_getwstr(S-osr5)
 whline                 curs_border(S-osr5)
 winch                  curs_inch(S-osr5)
 winchnstr              curs_inchstr(S-osr5)
 winchstr               curs_inchstr(S-osr5)
 winnstr                curs_instr(S-osr5)
 winnwstr               curs_inwstr(S-osr5)
 winsch                 curs_insch(S-osr5)
 winsdelln              curs_deleteln(S-osr5)
 winsertln              curs_deleteln(S-osr5)
 winsnstr               curs_insstr(S-osr5)
 winsnwstr              curs_inswstr(S-osr5)
 winsstr                curs_insstr(S-osr5)
 winstr                 curs_instr(S-osr5)
 winswch                curs_inswch(S-osr5)
 winswstr               curs_inswstr(S-osr5)
 winwch                 curs_inwch(S-osr5)
 winwchnstr             curs_inwchstr(S-osr5)
 winwchstr              curs_inwchstr(S-osr5)
 winwstr                curs_inwstr(S-osr5)
 wmove                  curs_move(S-osr5)
 wnoutrefresh           curs_refresh(S-osr5)
 wprintw                curs_printw(S-osr5)
 wredrawln              curs_refresh(S-osr5)
 wrefresh               curs_refresh(S-osr5)
 wscanw                 curs_scanw(S-osr5)
 wscrl                  curs_scroll(S-osr5)
 wsetscrreg             curs_outopts(S-osr5)
 wstandend              curs_attr(S-osr5)
 wstandout              curs_attr(S-osr5)
 wsyncdown              curs_window(S-osr5)
 wsyncup                curs_window(S-osr5)
 wtimeout               curs_inopts(S-osr5)
 wtouchln               curs_touch(S-osr5)
 wvline                 curs_border(S-osr5)

Return values

Routines that return an integer return ERR on failure and an integer value other than ERR, typically OK, on successful completion, unless otherwise noted in the routine descriptions.

All macros return the value of the window version, except setscrreg( ), wsetscrreg( ), getyx( ), getbegyx( ), and getmaxyx( ). The return values of those exceptions ( setscrreg( ), wsetscrreg( ), getyx( ), getbegyx( ), and getmaxyx( )) are undefined, so they should not be used as the right-hand side of assignment statements.

Routines that return pointers return NULL on error.

Warning

The header file curses.h automatically includes the header files stdio.h and unctrl.h.

Files


/usr/lib/libcurses.a
the library

See also

terminfo(F), terminfo(M), and curs_*(S-osr5) for detailed routine descriptions

Standards conformance

curses(S-osr5) is not part of any currently supported standard; it was developed by UNIX System Laboratories, Inc. and is maintained by The SCO Group.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005