Deleted Added
sdiff udiff text old ( 166124 ) new ( 174993 )
full compact
1'\" t
2.\"***************************************************************************
3.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
4.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
30.\" $Id: ncurses.3x,v 1.89 2007/09/01 18:57:29 tom Exp $
31.hy 0
32.TH ncurses 3X ""
33.ds n 5
34.ds d @TERMINFO@
35.SH NAME
36\fBncurses\fR - CRT screen handling and optimization package
37.SH SYNOPSIS
38\fB#include <curses.h>\fR
39.br
40.SH DESCRIPTION
41The \fBncurses\fR library routines give the user a terminal-independent method
42of updating character screens with reasonable optimization.
43This implementation is ``new curses'' (ncurses) and
44is the approved replacement for
454.4BSD classic curses, which has been discontinued.
46This describes \fBncurses\fR
47version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
48.PP
49The \fBncurses\fR library emulates the \fBcurses\fR(3X) library of
50System V Release 4 UNIX,
51and XPG4 (X/Open Portability Guide) curses (also known as XSI curses).
52XSI stands for X/Open System Interfaces Extension.
53The \fBncurses\fR library is freely redistributable in source form.
54Differences from the SVr4
55curses are summarized under the \fBEXTENSIONS\fP and \fBPORTABILITY\fP sections below and
56described in detail in the respective \fBEXTENSIONS\fP, \fBPORTABILITY\fP and \fBBUGS\fP sections
57of individual man pages.
58.PP
59The \fBncurses\fR library also provides many useful extensions,
60i.e., features which cannot be implemented by a simple add-on library
61but which require access to the internals of the library.
62.PP
63A program using these routines must be linked with the \fB-lncurses\fR option,
64or (if it has been generated) with the debugging library \fB-lncurses_g\fR.
65(Your system integrator may also have installed these libraries under
66the names \fB-lcurses\fR and \fB-lcurses_g\fR.)
67The ncurses_g library generates trace logs (in a file called 'trace' in the
68current directory) that describe curses actions.
69See also the section on \fBALTERNATE CONFIGURATIONS\fP.
70.PP
71The \fBncurses\fR package supports: overall screen, window and pad
72manipulation; output to windows and pads; reading terminal input; control over
73terminal and \fBcurses\fR input and output options; environment query
74routines; color manipulation; use of soft label keys; terminfo capabilities;
75and access to low-level terminal-manipulation routines.
76.PP
77To initialize the routines, the routine \fBinitscr\fR or \fBnewterm\fR
78must be called before any of the other routines that deal with windows
79and screens are used.
80The routine \fBendwin\fR must be called before exiting.
81To get character-at-a-time input without echoing (most
82interactive, screen oriented programs want this), the following
83sequence should be used:
84.sp
85 \fBinitscr(); cbreak(); noecho();\fR
86.sp
87Most programs would additionally use the sequence:
88.sp
89 \fBnonl();\fR
90 \fBintrflush(stdscr, FALSE);\fR
91 \fBkeypad(stdscr, TRUE);\fR
92.sp
93Before a \fBcurses\fR program is run, the tab stops of the terminal
94should be set and its initialization strings, if defined, must be output.
95This can be done by executing the \fBtput init\fR command
96after the shell environment variable \fBTERM\fR has been exported.
97\fBtset(1)\fR is usually responsible for doing this.
98[See \fBterminfo\fR(\*n) for further details.]
99.PP
100The \fBncurses\fR library permits manipulation of data structures,
101called \fIwindows\fR, which can be thought of as two-dimensional
102arrays of characters representing all or part of a CRT screen.
103A default window called \fBstdscr\fR, which is the size of the terminal
104screen, is supplied.
105Others may be created with \fBnewwin\fR.
106.PP
107Note that \fBcurses\fR does not handle overlapping windows, that's done by
108the \fBpanel\fR(3X) library.
109This means that you can either use
110\fBstdscr\fR or divide the screen into tiled windows and not using
111\fBstdscr\fR at all.
112Mixing the two will result in unpredictable, and undesired, effects.
113.PP
114Windows are referred to by variables declared as \fBWINDOW *\fR.
115These data structures are manipulated with routines described here and
116elsewhere in the \fBncurses\fR manual pages.
117Among those, the most basic
118routines are \fBmove\fR and \fBaddch\fR.
119More general versions of
120these routines are included with names beginning with \fBw\fR,
121allowing the user to specify a window.
122The routines not beginning
123with \fBw\fR affect \fBstdscr\fR.
124.PP
125After using routines to manipulate a window, \fBrefresh\fR is called,
126telling \fBcurses\fR to make the user's CRT screen look like
127\fBstdscr\fR.
128The characters in a window are actually of type
129\fBchtype\fR, (character and attribute data) so that other information
130about the character may also be stored with each character.
131.PP
132Special windows called \fIpads\fR may also be manipulated.
133These are windows
134which are not constrained to the size of the screen and whose contents need not
135be completely displayed.
136See \fBcurs_pad\fR(3X) for more information.
137.PP
138In addition to drawing characters on the screen, video attributes and colors
139may be supported, causing the characters to show up in such modes as
140underlined, in reverse video, or in color on terminals that support such
141display enhancements.
142Line drawing characters may be specified to be output.
143On input, \fBcurses\fR is also able to translate arrow and function keys that
144transmit escape sequences into single values.
145The video attributes, line
146drawing characters, and input values use names, defined in \fB<curses.h>\fR,
147such as \fBA_REVERSE\fR, \fBACS_HLINE\fR, and \fBKEY_LEFT\fR.
148.PP
149If the environment variables \fBLINES\fR and \fBCOLUMNS\fR are set, or if the
150program is executing in a window environment, line and column information in
151the environment will override information read by \fIterminfo\fR.
152This would affect a program running in an AT&T 630 layer,
153for example, where the size of a
154screen is changeable (see \fBENVIRONMENT\fR).
155.PP
156If the environment variable \fBTERMINFO\fR is defined, any program using
157\fBcurses\fR checks for a local terminal definition before checking in the
158standard place.
159For example, if \fBTERM\fR is set to \fBatt4424\fR, then the
160compiled terminal definition is found in
161.sp
162 \fB\*d/a/att4424\fR.
163.sp
164(The \fBa\fR is copied from the first letter of \fBatt4424\fR to avoid
165creation of huge directories.) However, if \fBTERMINFO\fR is set to
166\fB$HOME/myterms\fR, \fBcurses\fR first checks
167.sp
168 \fB$HOME/myterms/a/att4424\fR,
169.sp
170and if that fails, it then checks
171.sp
172 \fB\*d/a/att4424\fR.
173.sp
174This is useful for developing experimental definitions or when write
175permission in \fB\*d\fR is not available.
176.PP
177The integer variables \fBLINES\fR and \fBCOLS\fR are defined in
178\fB<curses.h>\fR and will be filled in by \fBinitscr\fR with the size of the
179screen.
180The constants \fBTRUE\fR and \fBFALSE\fR have the values \fB1\fR and
181\fB0\fR, respectively.
182.PP
183The \fBcurses\fR routines also define the \fBWINDOW *\fR variable \fBcurscr\fR
184which is used for certain low-level operations like clearing and redrawing a
185screen containing garbage.
186The \fBcurscr\fR can be used in only a few routines.
187.\"
188.SS Routine and Argument Names
189Many \fBcurses\fR routines have two or more versions.
190The routines prefixed with \fBw\fR require a window argument.
191The routines prefixed with \fBp\fR require a pad argument.
192Those without a prefix generally use \fBstdscr\fR.
193.PP
194The routines prefixed with \fBmv\fR require a \fIy\fR and \fIx\fR
195coordinate to move to before performing the appropriate action.
196The \fBmv\fR routines imply a call to \fBmove\fR before the call to the
197other routine.
198The coordinate \fIy\fR always refers to the row (of
199the window), and \fIx\fR always refers to the column.
200The upper left-hand corner is always (0,0), not (1,1).
201.PP
202The routines prefixed with \fBmvw\fR take both a window argument and
203\fIx\fR and \fIy\fR coordinates.
204The window argument is always specified before the coordinates.
205.PP
206In each case, \fIwin\fR is the window affected, and \fIpad\fR is the
207pad affected; \fIwin\fR and \fIpad\fR are always pointers to type
208\fBWINDOW\fR.
209.PP
210Option setting routines require a Boolean flag \fIbf\fR with the value
211\fBTRUE\fR or \fBFALSE\fR; \fIbf\fR is always of type \fBbool\fR.
212Most of the data types used in the library routines,
213such as \fBWINDOW\fR, \fBSCREEN\fR, \fBbool\fR, and \fBchtype\fR
214are defined in \fB<curses.h>\fR.
215Types used for the terminfo routines such as
216\fBTERMINAL\fR are defined in \fB<term.h>\fR.
217.PP
218This manual page describes functions which may appear in any configuration
219of the library.
220There are two common configurations of the library:
221.RS
222.TP 5
223ncurses
224the "normal" library, which handles 8-bit characters.
225The normal (8-bit) library stores characters combined with attributes
226in \fBchtype\fP data.
227.IP
228Attributes alone (no corresponding character) may be stored in \fBchtype\fP
229or the equivalent \fBattr_t\fP data.
230In either case, the data is stored in something like an integer.
231.IP
232Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBchtype\fP.
233.TP 5
234ncursesw
235the so-called "wide" library, which handles multibyte characters
236(See the section on \fBALTERNATE CONFIGURATIONS\fP).
237The "wide" library includes all of the calls from the "normal" library.
238It adds about one third more calls using data types which store
239multibyte characters:
240.RS
241.TP 5
242.B cchar_t
243corresponds to \fBchtype\fP.
244However it is a structure, because more data is stored than can fit into
245an integer.
246The characters are large enough to require a full integer value - and there
247may be more than one character per cell.
248The video attributes and color are stored in separate fields of the structure.
249.IP
250Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBcchar_t\fP.
251.TP 5
252.B wchar_t
253stores a "wide" character.
254Like \fBchtype\fP, this may be an integer.
255.TP 5
256.B wint_t
257stores a \fBwchar_t\fP or \fBWEOF\fP - not the same, though both may have
258the same size.
259.RE
260.IP
261The "wide" library provides new functions which are analogous to
262functions in the "normal" library.
263There is a naming convention which relates many of the normal/wide variants:
264a "_w" is inserted into the name.
265For example, \fBwaddch\fP becomes \fBwadd_wch\fP.
266.RE
267.PP
268.\"
269.SS Routine Name Index
270The following table lists each \fBcurses\fR routine and the name of
271the manual page on which it is described.
272Routines flagged with `*'
273are ncurses-specific, not described by XPG4 or present in SVr4.
274.PP
275.TS
276center tab(/);
277l l
278l l .
279\fBcurses\fR Routine Name/Manual Page Name
280=
281COLOR_PAIR/\fBcurs_color\fR(3X)
282PAIR_NUMBER/\fBcurs_attr\fR(3X)
283_nc_tracebits/\fBcurs_trace\fR(3X)*
284_traceattr/\fBcurs_trace\fR(3X)*
285_traceattr2/\fBcurs_trace\fR(3X)*
286_tracechar/\fBcurs_trace\fR(3X)*
287_tracechtype/\fBcurs_trace\fR(3X)*
288_tracechtype2/\fBcurs_trace\fR(3X)*
289_tracedump/\fBcurs_trace\fR(3X)*
290_tracef/\fBcurs_trace\fR(3X)*
291_tracemouse/\fBcurs_trace\fR(3X)*
292add_wch/\fBcurs_add_wch\fR(3X)
293add_wchnstr/\fBcurs_add_wchstr\fR(3X)
294add_wchstr/\fBcurs_add_wchstr\fR(3X)
295addch/\fBcurs_addch\fR(3X)
296addchnstr/\fBcurs_addchstr\fR(3X)
297addchstr/\fBcurs_addchstr\fR(3X)
298addnstr/\fBcurs_addstr\fR(3X)
299addnwstr/\fBcurs_addwstr\fR(3X)
300addstr/\fBcurs_addstr\fR(3X)
301addwstr/\fBcurs_addwstr\fR(3X)
302assume_default_colors/\fBdefault_colors\fR(3X)*
303attr_get/\fBcurs_attr\fR(3X)
304attr_off/\fBcurs_attr\fR(3X)
305attr_on/\fBcurs_attr\fR(3X)
306attr_set/\fBcurs_attr\fR(3X)
307attroff/\fBcurs_attr\fR(3X)
308attron/\fBcurs_attr\fR(3X)
309attrset/\fBcurs_attr\fR(3X)
310baudrate/\fBcurs_termattrs\fR(3X)
311beep/\fBcurs_beep\fR(3X)
312bkgd/\fBcurs_bkgd\fR(3X)
313bkgdset/\fBcurs_bkgd\fR(3X)
314bkgrnd/\fBcurs_bkgrnd\fR(3X)
315bkgrndset/\fBcurs_bkgrnd\fR(3X)
316border/\fBcurs_border\fR(3X)
317border_set/\fBcurs_border_set\fR(3X)
318box/\fBcurs_border\fR(3X)
319box_set/\fBcurs_border_set\fR(3X)
320can_change_color/\fBcurs_color\fR(3X)
321cbreak/\fBcurs_inopts\fR(3X)
322chgat/\fBcurs_attr\fR(3X)
323clear/\fBcurs_clear\fR(3X)
324clearok/\fBcurs_outopts\fR(3X)
325clrtobot/\fBcurs_clear\fR(3X)
326clrtoeol/\fBcurs_clear\fR(3X)
327color_content/\fBcurs_color\fR(3X)
328color_set/\fBcurs_attr\fR(3X)
329copywin/\fBcurs_overlay\fR(3X)
330curs_set/\fBcurs_kernel\fR(3X)
331curses_version/\fBcurs_extend\fR(3X)*
332def_prog_mode/\fBcurs_kernel\fR(3X)
333def_shell_mode/\fBcurs_kernel\fR(3X)
334define_key/\fBdefine_key\fR(3X)*
335del_curterm/\fBcurs_terminfo\fR(3X)
336delay_output/\fBcurs_util\fR(3X)
337delch/\fBcurs_delch\fR(3X)
338deleteln/\fBcurs_deleteln\fR(3X)
339delscreen/\fBcurs_initscr\fR(3X)
340delwin/\fBcurs_window\fR(3X)
341derwin/\fBcurs_window\fR(3X)
342doupdate/\fBcurs_refresh\fR(3X)
343dupwin/\fBcurs_window\fR(3X)
344echo/\fBcurs_inopts\fR(3X)
345echo_wchar/\fBcurs_add_wch\fR(3X)
346echochar/\fBcurs_addch\fR(3X)
347endwin/\fBcurs_initscr\fR(3X)
348erase/\fBcurs_clear\fR(3X)
349erasechar/\fBcurs_termattrs\fR(3X)
350erasewchar/\fBcurs_termattrs\fR(3X)
351filter/\fBcurs_util\fR(3X)
352flash/\fBcurs_beep\fR(3X)
353flushinp/\fBcurs_util\fR(3X)
354get_wch/\fBcurs_get_wch\fR(3X)
355get_wstr/\fBcurs_get_wstr\fR(3X)
356getattrs/\fBcurs_attr\fR(3X)
357getbegx/\fBcurs_legacy\fR(3X)*
358getbegy/\fBcurs_legacy\fR(3X)*
359getbegyx/\fBcurs_getyx\fR(3X)
360getbkgd/\fBcurs_bkgd\fR(3X)
361getbkgrnd/\fBcurs_bkgrnd\fR(3X)
362getcchar/\fBcurs_getcchar\fR(3X)
363getch/\fBcurs_getch\fR(3X)
364getcurx/\fBcurs_legacy\fR(3X)*
365getcury/\fBcurs_legacy\fR(3X)*
366getmaxx/\fBcurs_legacy\fR(3X)*
367getmaxy/\fBcurs_legacy\fR(3X)*
368getmaxyx/\fBcurs_getyx\fR(3X)
369getmouse/\fBcurs_mouse\fR(3X)*
370getn_wstr/\fBcurs_get_wstr\fR(3X)
371getnstr/\fBcurs_getstr\fR(3X)
372getparx/\fBcurs_legacy\fR(3X)*
373getpary/\fBcurs_legacy\fR(3X)*
374getparyx/\fBcurs_getyx\fR(3X)
375getstr/\fBcurs_getstr\fR(3X)
376getsyx/\fBcurs_kernel\fR(3X)
377getwin/\fBcurs_util\fR(3X)
378getyx/\fBcurs_getyx\fR(3X)
379halfdelay/\fBcurs_inopts\fR(3X)
380has_colors/\fBcurs_color\fR(3X)
381has_ic/\fBcurs_termattrs\fR(3X)
382has_il/\fBcurs_termattrs\fR(3X)
383has_key/\fBcurs_getch\fR(3X)*
384hline/\fBcurs_border\fR(3X)
385hline_set/\fBcurs_border_set\fR(3X)
386idcok/\fBcurs_outopts\fR(3X)
387idlok/\fBcurs_outopts\fR(3X)
388immedok/\fBcurs_outopts\fR(3X)
389in_wch/\fBcurs_in_wch\fR(3X)
390in_wchnstr/\fBcurs_in_wchstr\fR(3X)
391in_wchstr/\fBcurs_in_wchstr\fR(3X)
392inch/\fBcurs_inch\fR(3X)
393inchnstr/\fBcurs_inchstr\fR(3X)
394inchstr/\fBcurs_inchstr\fR(3X)
395init_color/\fBcurs_color\fR(3X)
396init_pair/\fBcurs_color\fR(3X)
397initscr/\fBcurs_initscr\fR(3X)
398innstr/\fBcurs_instr\fR(3X)
399innwstr/\fBcurs_inwstr\fR(3X)
400ins_nwstr/\fBcurs_ins_wstr\fR(3X)
401ins_wch/\fBcurs_ins_wch\fR(3X)
402ins_wstr/\fBcurs_ins_wstr\fR(3X)
403insch/\fBcurs_insch\fR(3X)
404insdelln/\fBcurs_deleteln\fR(3X)
405insertln/\fBcurs_deleteln\fR(3X)
406insnstr/\fBcurs_insstr\fR(3X)
407insstr/\fBcurs_insstr\fR(3X)
408instr/\fBcurs_instr\fR(3X)
409intrflush/\fBcurs_inopts\fR(3X)
410inwstr/\fBcurs_inwstr\fR(3X)
411is_cleared/\fBcurs_opaque\fR(3X)*
412is_idcok/\fBcurs_opaque\fR(3X)*
413is_idlok/\fBcurs_opaque\fR(3X)*
414is_immedok/\fBcurs_opaque\fR(3X)*
415is_keypad/\fBcurs_opaque\fR(3X)*
416is_leaveok/\fBcurs_opaque\fR(3X)*
417is_linetouched/\fBcurs_touch\fR(3X)
418is_nodelay/\fBcurs_opaque\fR(3X)*
419is_notimeout/\fBcurs_opaque\fR(3X)*
420is_scrollok/\fBcurs_opaque\fR(3X)*
421is_syncok/\fBcurs_opaque\fR(3X)*
422is_term_resized/\fBresizeterm\fR(3X)*
423is_wintouched/\fBcurs_touch\fR(3X)
424isendwin/\fBcurs_initscr\fR(3X)
425key_defined/\fBkey_defined\fR(3X)*
426key_name/\fBcurs_util\fR(3X)
427keybound/\fBkeybound\fR(3X)*
428keyname/\fBcurs_util\fR(3X)
429keyok/\fBkeyok\fR(3X)*
430keypad/\fBcurs_inopts\fR(3X)
431killchar/\fBcurs_termattrs\fR(3X)
432killwchar/\fBcurs_termattrs\fR(3X)
433leaveok/\fBcurs_outopts\fR(3X)
434longname/\fBcurs_termattrs\fR(3X)
435mcprint/\fBcurs_print\fR(3X)*
436meta/\fBcurs_inopts\fR(3X)
437mouse_trafo/\fBcurs_mouse\fR(3X)*
438mouseinterval/\fBcurs_mouse\fR(3X)*
439mousemask/\fBcurs_mouse\fR(3X)*
440move/\fBcurs_move\fR(3X)
441mvadd_wch/\fBcurs_add_wch\fR(3X)
442mvadd_wchnstr/\fBcurs_add_wchstr\fR(3X)
443mvadd_wchstr/\fBcurs_add_wchstr\fR(3X)
444mvaddch/\fBcurs_addch\fR(3X)
445mvaddchnstr/\fBcurs_addchstr\fR(3X)
446mvaddchstr/\fBcurs_addchstr\fR(3X)
447mvaddnstr/\fBcurs_addstr\fR(3X)
448mvaddnwstr/\fBcurs_addwstr\fR(3X)
449mvaddstr/\fBcurs_addstr\fR(3X)
450mvaddwstr/\fBcurs_addwstr\fR(3X)
451mvchgat/\fBcurs_attr\fR(3X)
452mvcur/\fBcurs_terminfo\fR(3X)
453mvdelch/\fBcurs_delch\fR(3X)
454mvderwin/\fBcurs_window\fR(3X)
455mvget_wch/\fBcurs_get_wch\fR(3X)
456mvget_wstr/\fBcurs_get_wstr\fR(3X)
457mvgetch/\fBcurs_getch\fR(3X)
458mvgetn_wstr/\fBcurs_get_wstr\fR(3X)
459mvgetnstr/\fBcurs_getstr\fR(3X)
460mvgetstr/\fBcurs_getstr\fR(3X)
461mvhline/\fBcurs_border\fR(3X)
462mvhline_set/\fBcurs_border_set\fR(3X)
463mvin_wch/\fBcurs_in_wch\fR(3X)
464mvin_wchnstr/\fBcurs_in_wchstr\fR(3X)
465mvin_wchstr/\fBcurs_in_wchstr\fR(3X)
466mvinch/\fBcurs_inch\fR(3X)
467mvinchnstr/\fBcurs_inchstr\fR(3X)
468mvinchstr/\fBcurs_inchstr\fR(3X)
469mvinnstr/\fBcurs_instr\fR(3X)
470mvinnwstr/\fBcurs_inwstr\fR(3X)
471mvins_nwstr/\fBcurs_ins_wstr\fR(3X)
472mvins_wch/\fBcurs_ins_wch\fR(3X)
473mvins_wstr/\fBcurs_ins_wstr\fR(3X)
474mvinsch/\fBcurs_insch\fR(3X)
475mvinsnstr/\fBcurs_insstr\fR(3X)
476mvinsstr/\fBcurs_insstr\fR(3X)
477mvinstr/\fBcurs_instr\fR(3X)
478mvinwstr/\fBcurs_inwstr\fR(3X)
479mvprintw/\fBcurs_printw\fR(3X)
480mvscanw/\fBcurs_scanw\fR(3X)
481mvvline/\fBcurs_border\fR(3X)
482mvvline_set/\fBcurs_border_set\fR(3X)
483mvwadd_wch/\fBcurs_add_wch\fR(3X)
484mvwadd_wchnstr/\fBcurs_add_wchstr\fR(3X)
485mvwadd_wchstr/\fBcurs_add_wchstr\fR(3X)
486mvwaddch/\fBcurs_addch\fR(3X)
487mvwaddchnstr/\fBcurs_addchstr\fR(3X)
488mvwaddchstr/\fBcurs_addchstr\fR(3X)
489mvwaddnstr/\fBcurs_addstr\fR(3X)
490mvwaddnwstr/\fBcurs_addwstr\fR(3X)
491mvwaddstr/\fBcurs_addstr\fR(3X)
492mvwaddwstr/\fBcurs_addwstr\fR(3X)
493mvwchgat/\fBcurs_attr\fR(3X)
494mvwdelch/\fBcurs_delch\fR(3X)
495mvwget_wch/\fBcurs_get_wch\fR(3X)
496mvwget_wstr/\fBcurs_get_wstr\fR(3X)
497mvwgetch/\fBcurs_getch\fR(3X)
498mvwgetn_wstr/\fBcurs_get_wstr\fR(3X)
499mvwgetnstr/\fBcurs_getstr\fR(3X)
500mvwgetstr/\fBcurs_getstr\fR(3X)
501mvwhline/\fBcurs_border\fR(3X)
502mvwhline_set/\fBcurs_border_set\fR(3X)
503mvwin/\fBcurs_window\fR(3X)
504mvwin_wch/\fBcurs_in_wch\fR(3X)
505mvwin_wchnstr/\fBcurs_in_wchstr\fR(3X)
506mvwin_wchstr/\fBcurs_in_wchstr\fR(3X)
507mvwinch/\fBcurs_inch\fR(3X)
508mvwinchnstr/\fBcurs_inchstr\fR(3X)
509mvwinchstr/\fBcurs_inchstr\fR(3X)
510mvwinnstr/\fBcurs_instr\fR(3X)
511mvwinnwstr/\fBcurs_inwstr\fR(3X)
512mvwins_nwstr/\fBcurs_ins_wstr\fR(3X)
513mvwins_wch/\fBcurs_ins_wch\fR(3X)
514mvwins_wstr/\fBcurs_ins_wstr\fR(3X)
515mvwinsch/\fBcurs_insch\fR(3X)
516mvwinsnstr/\fBcurs_insstr\fR(3X)
517mvwinsstr/\fBcurs_insstr\fR(3X)
518mvwinstr/\fBcurs_instr\fR(3X)
519mvwinwstr/\fBcurs_inwstr\fR(3X)
520mvwprintw/\fBcurs_printw\fR(3X)
521mvwscanw/\fBcurs_scanw\fR(3X)
522mvwvline/\fBcurs_border\fR(3X)
523mvwvline_set/\fBcurs_border_set\fR(3X)
524napms/\fBcurs_kernel\fR(3X)
525newpad/\fBcurs_pad\fR(3X)
526newterm/\fBcurs_initscr\fR(3X)
527newwin/\fBcurs_window\fR(3X)
528nl/\fBcurs_outopts\fR(3X)
529nocbreak/\fBcurs_inopts\fR(3X)
530nodelay/\fBcurs_inopts\fR(3X)
531noecho/\fBcurs_inopts\fR(3X)
532nofilter/\fBcurs_util\fR(3X)*
533nonl/\fBcurs_outopts\fR(3X)
534noqiflush/\fBcurs_inopts\fR(3X)
535noraw/\fBcurs_inopts\fR(3X)
536notimeout/\fBcurs_inopts\fR(3X)
537overlay/\fBcurs_overlay\fR(3X)
538overwrite/\fBcurs_overlay\fR(3X)
539pair_content/\fBcurs_color\fR(3X)
540pechochar/\fBcurs_pad\fR(3X)
541pnoutrefresh/\fBcurs_pad\fR(3X)
542prefresh/\fBcurs_pad\fR(3X)
543printw/\fBcurs_printw\fR(3X)
544putp/\fBcurs_terminfo\fR(3X)
545putwin/\fBcurs_util\fR(3X)
546qiflush/\fBcurs_inopts\fR(3X)
547raw/\fBcurs_inopts\fR(3X)
548redrawwin/\fBcurs_refresh\fR(3X)
549refresh/\fBcurs_refresh\fR(3X)
550reset_prog_mode/\fBcurs_kernel\fR(3X)
551reset_shell_mode/\fBcurs_kernel\fR(3X)
552resetty/\fBcurs_kernel\fR(3X)
553resizeterm/\fBresizeterm\fR(3X)*
554restartterm/\fBcurs_terminfo\fR(3X)
555ripoffline/\fBcurs_kernel\fR(3X)
556savetty/\fBcurs_kernel\fR(3X)
557scanw/\fBcurs_scanw\fR(3X)
558scr_dump/\fBcurs_scr_dump\fR(3X)
559scr_init/\fBcurs_scr_dump\fR(3X)
560scr_restore/\fBcurs_scr_dump\fR(3X)
561scr_set/\fBcurs_scr_dump\fR(3X)
562scrl/\fBcurs_scroll\fR(3X)
563scroll/\fBcurs_scroll\fR(3X)
564scrollok/\fBcurs_outopts\fR(3X)
565set_curterm/\fBcurs_terminfo\fR(3X)
566set_term/\fBcurs_initscr\fR(3X)
567setcchar/\fBcurs_getcchar\fR(3X)
568setscrreg/\fBcurs_outopts\fR(3X)
569setsyx/\fBcurs_kernel\fR(3X)
570setterm/\fBcurs_terminfo\fR(3X)
571setupterm/\fBcurs_terminfo\fR(3X)
572slk_attr/\fBcurs_slk\fR(3X)*
573slk_attr_off/\fBcurs_slk\fR(3X)
574slk_attr_on/\fBcurs_slk\fR(3X)
575slk_attr_set/\fBcurs_slk\fR(3X)
576slk_attroff/\fBcurs_slk\fR(3X)
577slk_attron/\fBcurs_slk\fR(3X)
578slk_attrset/\fBcurs_slk\fR(3X)
579slk_clear/\fBcurs_slk\fR(3X)
580slk_color/\fBcurs_slk\fR(3X)
581slk_init/\fBcurs_slk\fR(3X)
582slk_label/\fBcurs_slk\fR(3X)
583slk_noutrefresh/\fBcurs_slk\fR(3X)
584slk_refresh/\fBcurs_slk\fR(3X)
585slk_restore/\fBcurs_slk\fR(3X)
586slk_set/\fBcurs_slk\fR(3X)
587slk_touch/\fBcurs_slk\fR(3X)
588standend/\fBcurs_attr\fR(3X)
589standout/\fBcurs_attr\fR(3X)
590start_color/\fBcurs_color\fR(3X)
591subpad/\fBcurs_pad\fR(3X)
592subwin/\fBcurs_window\fR(3X)
593syncok/\fBcurs_window\fR(3X)
594term_attrs/\fBcurs_termattrs\fR(3X)
595termattrs/\fBcurs_termattrs\fR(3X)
596termname/\fBcurs_termattrs\fR(3X)
597tgetent/\fBcurs_termcap\fR(3X)
598tgetflag/\fBcurs_termcap\fR(3X)
599tgetnum/\fBcurs_termcap\fR(3X)
600tgetstr/\fBcurs_termcap\fR(3X)
601tgoto/\fBcurs_termcap\fR(3X)
602tigetflag/\fBcurs_terminfo\fR(3X)
603tigetnum/\fBcurs_terminfo\fR(3X)
604tigetstr/\fBcurs_terminfo\fR(3X)
605timeout/\fBcurs_inopts\fR(3X)
606touchline/\fBcurs_touch\fR(3X)
607touchwin/\fBcurs_touch\fR(3X)
608tparm/\fBcurs_terminfo\fR(3X)
609tputs/\fBcurs_termcap\fR(3X)
610tputs/\fBcurs_terminfo\fR(3X)
611trace/\fBcurs_trace\fR(3X)*
612typeahead/\fBcurs_inopts\fR(3X)
613unctrl/\fBcurs_util\fR(3X)
614unget_wch/\fBcurs_get_wch\fR(3X)
615ungetch/\fBcurs_getch\fR(3X)
616ungetmouse/\fBcurs_mouse\fR(3X)*
617untouchwin/\fBcurs_touch\fR(3X)
618use_default_colors/\fBdefault_colors\fR(3X)*
619use_env/\fBcurs_util\fR(3X)
620use_extended_names/\fBcurs_extend\fR(3X)*
621use_legacy_coding/\fBlegacy_coding\fR(3X)*
622vid_attr/\fBcurs_terminfo\fR(3X)
623vid_puts/\fBcurs_terminfo\fR(3X)
624vidattr/\fBcurs_terminfo\fR(3X)
625vidputs/\fBcurs_terminfo\fR(3X)
626vline/\fBcurs_border\fR(3X)
627vline_set/\fBcurs_border_set\fR(3X)
628vw_printw/\fBcurs_printw\fR(3X)
629vw_scanw/\fBcurs_scanw\fR(3X)
630vwprintw/\fBcurs_printw\fR(3X)
631vwscanw/\fBcurs_scanw\fR(3X)
632wadd_wch/\fBcurs_add_wch\fR(3X)
633wadd_wchnstr/\fBcurs_add_wchstr\fR(3X)
634wadd_wchstr/\fBcurs_add_wchstr\fR(3X)
635waddch/\fBcurs_addch\fR(3X)
636waddchnstr/\fBcurs_addchstr\fR(3X)
637waddchstr/\fBcurs_addchstr\fR(3X)
638waddnstr/\fBcurs_addstr\fR(3X)
639waddnwstr/\fBcurs_addwstr\fR(3X)
640waddstr/\fBcurs_addstr\fR(3X)
641waddwstr/\fBcurs_addwstr\fR(3X)
642wattr_get/\fBcurs_attr\fR(3X)
643wattr_off/\fBcurs_attr\fR(3X)
644wattr_on/\fBcurs_attr\fR(3X)
645wattr_set/\fBcurs_attr\fR(3X)
646wattroff/\fBcurs_attr\fR(3X)
647wattron/\fBcurs_attr\fR(3X)
648wattrset/\fBcurs_attr\fR(3X)
649wbkgd/\fBcurs_bkgd\fR(3X)
650wbkgdset/\fBcurs_bkgd\fR(3X)
651wbkgrnd/\fBcurs_bkgrnd\fR(3X)
652wbkgrndset/\fBcurs_bkgrnd\fR(3X)
653wborder/\fBcurs_border\fR(3X)
654wborder_set/\fBcurs_border_set\fR(3X)
655wchgat/\fBcurs_attr\fR(3X)
656wclear/\fBcurs_clear\fR(3X)
657wclrtobot/\fBcurs_clear\fR(3X)
658wclrtoeol/\fBcurs_clear\fR(3X)
659wcolor_set/\fBcurs_attr\fR(3X)
660wcursyncup/\fBcurs_window\fR(3X)
661wdelch/\fBcurs_delch\fR(3X)
662wdeleteln/\fBcurs_deleteln\fR(3X)
663wecho_wchar/\fBcurs_add_wch\fR(3X)
664wechochar/\fBcurs_addch\fR(3X)
665wenclose/\fBcurs_mouse\fR(3X)*
666werase/\fBcurs_clear\fR(3X)
667wget_wch/\fBcurs_get_wch\fR(3X)
668wget_wstr/\fBcurs_get_wstr\fR(3X)
669wgetbkgrnd/\fBcurs_bkgrnd\fR(3X)
670wgetch/\fBcurs_getch\fR(3X)
671wgetn_wstr/\fBcurs_get_wstr\fR(3X)
672wgetnstr/\fBcurs_getstr\fR(3X)
673wgetstr/\fBcurs_getstr\fR(3X)
674whline/\fBcurs_border\fR(3X)
675whline_set/\fBcurs_border_set\fR(3X)
676win_wch/\fBcurs_in_wch\fR(3X)
677win_wchnstr/\fBcurs_in_wchstr\fR(3X)
678win_wchstr/\fBcurs_in_wchstr\fR(3X)
679winch/\fBcurs_inch\fR(3X)
680winchnstr/\fBcurs_inchstr\fR(3X)
681winchstr/\fBcurs_inchstr\fR(3X)
682winnstr/\fBcurs_instr\fR(3X)
683winnwstr/\fBcurs_inwstr\fR(3X)
684wins_nwstr/\fBcurs_ins_wstr\fR(3X)
685wins_wch/\fBcurs_ins_wch\fR(3X)
686wins_wstr/\fBcurs_ins_wstr\fR(3X)
687winsch/\fBcurs_insch\fR(3X)
688winsdelln/\fBcurs_deleteln\fR(3X)
689winsertln/\fBcurs_deleteln\fR(3X)
690winsnstr/\fBcurs_insstr\fR(3X)
691winsstr/\fBcurs_insstr\fR(3X)
692winstr/\fBcurs_instr\fR(3X)
693winwstr/\fBcurs_inwstr\fR(3X)
694wmouse_trafo/\fBcurs_mouse\fR(3X)*
695wmove/\fBcurs_move\fR(3X)
696wnoutrefresh/\fBcurs_refresh\fR(3X)
697wprintw/\fBcurs_printw\fR(3X)
698wredrawln/\fBcurs_refresh\fR(3X)
699wrefresh/\fBcurs_refresh\fR(3X)
700wresize/\fBwresize\fR(3X)*
701wscanw/\fBcurs_scanw\fR(3X)
702wscrl/\fBcurs_scroll\fR(3X)
703wsetscrreg/\fBcurs_outopts\fR(3X)
704wstandend/\fBcurs_attr\fR(3X)
705wstandout/\fBcurs_attr\fR(3X)
706wsyncdown/\fBcurs_window\fR(3X)
707wsyncup/\fBcurs_window\fR(3X)
708wtimeout/\fBcurs_inopts\fR(3X)
709wtouchln/\fBcurs_touch\fR(3X)
710wunctrl/\fBcurs_util\fR(3X)
711wvline/\fBcurs_border\fR(3X)
712wvline_set/\fBcurs_border_set\fR(3X)
713.TE
714.SH RETURN VALUE
715Routines that return an integer return \fBERR\fR upon failure and an
716integer value other than \fBERR\fR upon successful completion, unless
717otherwise noted in the routine descriptions.
718.PP
719All macros return the value of the \fBw\fR version, except \fBsetscrreg\fR,
720\fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, and \fBgetmaxyx\fR.
721The return values of \fBsetscrreg\fR, \fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, and
722\fBgetmaxyx\fR are undefined (i.e., these should not be used as the
723right-hand side of assignment statements).
724.PP
725Routines that return pointers return \fBNULL\fR on error.
726.SH ENVIRONMENT
727The following environment symbols are useful for customizing the
728runtime behavior of the \fBncurses\fR library.
729The most important ones have been already discussed in detail.
730.TP 5
731BAUDRATE
732The debugging library checks this environment symbol when the application
733has redirected output to a file.
734The symbol's numeric value is used for the baudrate.
735If no value is found, \fBncurses\fR uses 9600.
736This allows testers to construct repeatable test-cases
737that take into account costs that depend on baudrate.
738.TP 5
739CC
740When set, change occurrences of the command_character
741(i.e., the \fBcmdch\fP capability)
742of the loaded terminfo entries to the value of this symbol.
743Very few terminfo entries provide this feature.
744.TP 5
745COLUMNS
746Specify the width of the screen in characters.
747Applications running in a windowing environment usually are able to
748obtain the width of the window in which they are executing.
749If neither the \fBCOLUMNS\fP value nor the terminal's screen size is available,
750\fBncurses\fR uses the size which may be specified in the terminfo database
751(i.e., the \fBcols\fR capability).
752.IP
753It is important that your application use a correct size for the screen.
754This is not always possible because your application may be
755running on a host which does not honor NAWS (Negotiations About Window
756Size), or because you are temporarily running as another user.
757However, setting \fBCOLUMNS\fP and/or \fBLINES\fP overrides the library's
758use of the screen size obtained from the operating system.
759.IP
760Either \fBCOLUMNS\fP or \fBLINES\fP symbols may be specified independently.
761This is mainly useful to circumvent legacy misfeatures of terminal descriptions,
762e.g., xterm which commonly specifies a 65 line screen.
763For best results, \fBlines\fR and \fBcols\fR should not be specified in
764a terminal description for terminals which are run as emulations.
765.IP
766Use the \fBuse_env\fR function to disable all use of external environment
767(including system calls) to determine the screen size.
768.TP 5
769ESCDELAY
770Specifies the total time, in milliseconds, for which ncurses will
771await a character sequence, e.g., a function key.
772The default value, 1000 milliseconds, is enough for most uses.
773However, it is made a variable to accommodate unusual applications.
774.IP
775The most common instance where you may wish to change this value
776is to work with slow hosts, e.g., running on a network.
777If the host cannot read characters rapidly enough, it will have the same
778effect as if the terminal did not send characters rapidly enough.
779The library will still see a timeout.
780.IP
781Note that xterm mouse events are built up from character sequences
782received from the xterm.
783If your application makes heavy use of multiple-clicking, you may
784wish to lengthen this default value because the timeout applies
785to the composed multi-click event as well as the individual clicks.
786.IP
787In addition to the environment variable,
788this implementation provides a global variable with the same name.
789Portable applications should not rely upon the presence of ESCDELAY
790in either form,
791but setting the environment variable rather than the global variable
792does not create problems when compiling an application.
793.TP 5
794HOME
795Tells \fBncurses\fR where your home directory is.
796That is where it may read and write auxiliary terminal descriptions:
797.IP
798$HOME/.termcap
799.br
800$HOME/.terminfo
801.TP 5
802LINES
803Like COLUMNS, specify the height of the screen in characters.
804See COLUMNS for a detailed description.
805.TP 5
806MOUSE_BUTTONS_123
807This applies only to the OS/2 EMX port.
808It specifies the order of buttons on the mouse.
809OS/2 numbers a 3-button mouse inconsistently from other
810platforms:
811.sp
8121 = left
813.br
8142 = right
815.br
8163 = middle.
817.sp
818This symbol lets you customize the mouse.
819The symbol must be three numeric digits 1-3 in any order, e.g., 123 or 321.
820If it is not specified, \fBncurses\fR uses 132.
821.TP 5
822NCURSES_ASSUMED_COLORS
823Override the compiled-in assumption that the
824terminal's default colors are white-on-black
825(see \fBdefault_colors\fR(3X)).
826You may set the foreground and background color values with this environment
827variable by proving a 2-element list: foreground,background.
828For example, to tell ncurses to not assume anything
829about the colors, set this to "-1,-1".
830To make it green-on-black, set it to "2,0".
831Any positive value from zero to the terminfo \fBmax_colors\fR value is allowed.
832.TP 5
833NCURSES_NO_HARD_TABS
834\fBNcurses\fP may use tabs as part of the cursor movement optimization.
835In some cases,
836your terminal driver may not handle these properly.
837Set this environment variable to disable the feature.
838You can also adjust your \fBstty\fP settings to avoid the problem.
839.TP 5
840NCURSES_NO_MAGIC_COOKIES
841Some terminals use a magic-cookie feature which requires special handling
842to make highlighting and other video attributes display properly.
843You can suppress the highlighting entirely for these terminals by
844setting this environment variable.
845.TP 5
846NCURSES_NO_PADDING
847Most of the terminal descriptions in the terminfo database are written
848for real "hardware" terminals.
849Many people use terminal emulators
850which run in a windowing environment and use curses-based applications.
851Terminal emulators can duplicate
852all of the important aspects of a hardware terminal, but they do not
853have the same limitations.
854The chief limitation of a hardware terminal from the standpoint
855of your application is the management of dataflow, i.e., timing.
856Unless a hardware terminal is interfaced into a terminal concentrator
857(which does flow control),
858it (or your application) must manage dataflow, preventing overruns.
859The cheapest solution (no hardware cost)
860is for your program to do this by pausing after
861operations that the terminal does slowly, such as clearing the display.
862.IP
863As a result, many terminal descriptions (including the vt100)
864have delay times embedded.
865You may wish to use these descriptions,
866but not want to pay the performance penalty.
867.IP
868Set the NCURSES_NO_PADDING symbol to disable all but mandatory
869padding.
870Mandatory padding is used as a part of special control
871sequences such as \fIflash\fR.
872.TP 5
873NCURSES_NO_SETBUF
874Normally \fBncurses\fR enables buffered output during terminal initialization.
875This is done (as in SVr4 curses) for performance reasons.
876For testing purposes, both of \fBncurses\fR and certain applications,
877this feature is made optional.
878Setting the NCURSES_NO_SETBUF variable
879disables output buffering, leaving the output in the original (usually
880line buffered) mode.
881.TP 5
882NCURSES_NO_UTF8_ACS
883During initialization, the \fBncurses\fR library
884checks for special cases where VT100 line-drawing (and the corresponding
885alternate character set capabilities) described in the terminfo are known
886to be missing.
887Specifically, when running in a UTF-8 locale,
888the Linux console emulator and the GNU screen program ignore these.
889Ncurses checks the TERM environment variable for these.
890For other special cases, you should set this environment variable.
891Doing this tells ncurses to use Unicode values which correspond to
892the VT100 line-drawing glyphs.
893That works for the special cases cited,
894and is likely to work for terminal emulators.
895.IP
896When setting this variable, you should set it to a nonzero value.
897Setting it to zero (or to a nonnumber)
898disables the special check for Linux and screen.
899.TP 5
900NCURSES_TRACE
901During initialization, the \fBncurses\fR debugging library
902checks the NCURSES_TRACE symbol.
903If it is defined, to a numeric value, \fBncurses\fR calls the \fBtrace\fR
904function, using that value as the argument.
905.IP
906The argument values, which are defined in \fBcurses.h\fR, provide several
907types of information.
908When running with traces enabled, your application will write the
909file \fBtrace\fR to the current directory.
910.TP 5
911TERM
912Denotes your terminal type.
913Each terminal type is distinct, though many are similar.
914.TP 5
915TERMCAP
916If the \fBncurses\fR library has been configured with \fItermcap\fR
917support, \fBncurses\fR will check for a terminal's description in
918termcap form if it is not available in the terminfo database.
919.IP
920The TERMCAP symbol contains either a terminal description (with
921newlines stripped out),
922or a file name telling where the information denoted by the TERM symbol exists.
923In either case, setting it directs \fBncurses\fR to ignore
924the usual place for this information, e.g., /etc/termcap.
925.TP 5
926TERMINFO
927Overrides the directory in which \fBncurses\fR searches for your terminal
928description.
929This is the simplest, but not the only way to change the list of directories.
930The complete list of directories in order follows:
931.RS
932.TP 3
933-
934the last directory to which \fBncurses\fR wrote, if any, is searched first
935.TP 3
936-
937the directory specified by the TERMINFO symbol
938.TP 3
939-
940$HOME/.terminfo
941.TP 3
942-
943directories listed in the TERMINFO_DIRS symbol
944.TP 3
945-
946one or more directories whose names are configured and compiled into the
947ncurses library, e.g.,
948@TERMINFO@
949.RE
950.TP 5
951TERMINFO_DIRS
952Specifies a list of directories to search for terminal descriptions.
953The list is separated by colons (i.e., ":") on Unix, semicolons on OS/2 EMX.
954All of the terminal descriptions are in terminfo form, which makes
955a subdirectory named for the first letter of the terminal names therein.
956.TP 5
957TERMPATH
958If TERMCAP does not hold a file name then \fBncurses\fR checks
959the TERMPATH symbol.
960This is a list of filenames separated by spaces or colons (i.e., ":") on Unix, semicolons on OS/2 EMX.
961If the TERMPATH symbol is not set, \fBncurses\fR looks in the files
962/etc/termcap, /usr/share/misc/termcap and $HOME/.termcap, in that order.
963.PP
964The library may be configured to disregard the following variables when the
965current user is the superuser (root), or if the application uses setuid or
966setgid permissions:
967$TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.
968.SH ALTERNATE CONFIGURATIONS
969Several different configurations are possible,
970depending on the configure script options used when building \fBncurses\fP.
971There are a few main options whose effects are visible to the applications
972developer using \fBncurses\fP:
973.TP 5
974--disable-overwrite
975The standard include for \fBncurses\fP is as noted in \fBSYNOPSIS\fP:
976.RS
977.sp
978\fB#include <curses.h>\fR
979.RE
980.IP
981This option is used to avoid filename conflicts when \fBncurses\fP
982is not the main implementation of curses of the computer.
983If \fBncurses\fP is installed disabling overwrite, it puts its headers in
984a subdirectory, e.g.,
985.RS
986.sp
987\fB#include <ncurses/curses.h>\fR
988.RE
989.IP
990It also omits a symbolic link which would allow you to use \fB-lcurses\fP
991to build executables.
992.TP 5
993--enable-widec
994The configure script renames the library and (if the \fB--disable-overwrite\fP
995option is used) puts the header files in a different subdirectory.
996All of the library names have a "w" appended to them,
997i.e., instead of
998.RS
999.sp
1000\fB-lncurses\fR
1001.RE
1002.IP
1003you link with
1004.RS
1005.sp
1006\fB-lncursesw\fR
1007.RE
1008.IP
1009You must also define \fB_XOPEN_SOURCE_EXTENDED\fP when compiling for the
1010wide-character library to use the extended (wide-character) functions.
1011The \fBcurses.h\fP file which is installed for the wide-character
1012library is designed to be compatible with the normal library's header.
1013Only the size of the \fBWINDOW\fP structure differs, and very few
1014applications require more than a pointer to \fBWINDOW\fPs.
1015If the headers are installed allowing overwrite,
1016the wide-character library's headers should be installed last,
1017to allow applications to be built using either library
1018from the same set of headers.
1019.TP 5
1020--with-shared
1021.TP
1022--with-normal
1023.TP
1024--with-debug
1025.TP
1026--with-profile
1027The shared and normal (static) library names differ by their suffixes,
1028e.g., \fBlibncurses.so\fP and \fBlibncurses.a\fP.
1029The debug and profiling libraries add a "_g" and a "_p" to the root
1030names respectively,
1031e.g., \fBlibncurses_g.a\fP and \fBlibncurses_p.a\fP.
1032.TP 5
1033--with-trace
1034The \fBtrace\fP function normally resides in the debug library,
1035but it is sometimes useful to configure this in the shared library.
1036Configure scripts should check for the function's existence rather
1037than assuming it is always in the debug library.
1038.SH FILES
1039.TP 5
1040@DATADIR@/tabset
1041directory containing initialization files for the terminal capability database
1042@TERMINFO@
1043terminal capability database
1044.SH SEE ALSO
1045\fBterminfo\fR(\*n) and related pages whose names begin "curs_" for detailed routine
1046descriptions.
1047.SH EXTENSIONS
1048The \fBncurses\fR library can be compiled with an option (\fB-DUSE_GETCAP\fR)
1049that falls back to the old-style /etc/termcap file if the terminal setup code
1050cannot find a terminfo entry corresponding to \fBTERM\fR.
1051Use of this feature
1052is not recommended, as it essentially includes an entire termcap compiler in
1053the \fBncurses\fR startup code, at significant cost in core and startup cycles.
1054.PP
1055The \fBncurses\fR library includes facilities for capturing mouse events on
1056certain terminals (including xterm).
1057See the \fBcurs_mouse\fR(3X)
1058manual page for details.
1059.PP
1060The \fBncurses\fR library includes facilities for responding to window
1061resizing events, e.g., when running in an xterm.
1062See the \fBresizeterm\fR(3X)
1063and \fBwresize\fR(3X) manual pages for details.
1064In addition, the library may be configured with a SIGWINCH handler.
1065.PP
1066The \fBncurses\fR library extends the fixed set of function key capabilities
1067of terminals by allowing the application designer to define additional
1068key sequences at runtime.
1069See the \fBdefine_key\fR(3X)
1070\fBkey_defined\fR(3X),
1071and \fBkeyok\fR(3X) manual pages for details.
1072.PP
1073The \fBncurses\fR library can exploit the capabilities of terminals which
1074implement the ISO-6429 SGR 39 and SGR 49 controls, which allow an application
1075to reset the terminal to its original foreground and background colors.
1076From the users' perspective, the application is able to draw colored
1077text on a background whose color is set independently, providing better
1078control over color contrasts.
1079See the \fBdefault_colors\fR(3X) manual page for details.
1080.PP
1081The \fBncurses\fR library includes a function for directing application output
1082to a printer attached to the terminal device.
1083See the \fBcurs_print\fR(3X) manual page for details.
1084.SH PORTABILITY
1085The \fBncurses\fR library is intended to be BASE-level conformant with XSI
1086Curses.
1087The EXTENDED XSI Curses functionality
1088(including color support) is supported.
1089.PP
1090A small number of local differences (that is, individual differences between
1091the XSI Curses and \fBncurses\fR calls) are described in \fBPORTABILITY\fR
1092sections of the library man pages.
1093.PP
1094This implementation also contains several extensions:
1095.RS 5
1096.PP
1097The routine \fBhas_key\fR is not part of XPG4, nor is it present in SVr4.
1098See the \fBcurs_getch\fR(3X) manual page for details.
1099.PP
1100The routine \fBslk_attr\fR is not part of XPG4, nor is it present in SVr4.
1101See the \fBcurs_slk\fR(3X) manual page for details.
1102.PP
1103The routines \fBgetmouse\fR, \fBmousemask\fR, \fBungetmouse\fR,
1104\fBmouseinterval\fR, and \fBwenclose\fR relating to mouse interfacing are not
1105part of XPG4, nor are they present in SVr4.
1106See the \fBcurs_mouse\fR(3X) manual page for details.
1107.PP
1108The routine \fBmcprint\fR was not present in any previous curses implementation.
1109See the \fBcurs_print\fR(3X) manual page for details.
1110.PP
1111The routine \fBwresize\fR is not part of XPG4, nor is it present in SVr4.
1112See the \fBwresize\fR(3X) manual page for details.
1113.PP
1114The WINDOW structure's internal details can be hidden from application
1115programs.
1116See \fBcurs_opaque\fR(3X) for the discussion of \fBis_scrollok\fR, etc.
1117.RE
1118.PP
1119In historic curses versions, delays embedded in the capabilities \fBcr\fR,
1120\fBind\fR, \fBcub1\fR, \fBff\fR and \fBtab\fR activated corresponding delay
1121bits in the UNIX tty driver.
1122In this implementation, all padding is done by sending NUL bytes.
1123This method is slightly more expensive, but narrows the interface
1124to the UNIX kernel significantly and increases the package's portability
1125correspondingly.
1126.SH NOTES
1127The header file \fB<curses.h>\fR automatically includes the header files
1128\fB<stdio.h>\fR and \fB<unctrl.h>\fR.
1129.PP
1130If standard output from a \fBncurses\fR program is re-directed to something
1131which is not a tty, screen updates will be directed to standard error.
1132This was an undocumented feature of AT&T System V Release 3 curses.
1133.SH AUTHORS
1134Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
1135Based on pcurses by Pavel Curtis.
1136.\"#
1137.\"# The following sets edit modes for GNU EMACS
1138.\"# Local Variables:
1139.\"# mode:nroff
1140.\"# fill-column:79
1141.\"# End: