]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/ncurses.3x
ncurses 6.4 - patch 20230701
[ncurses.git] / man / ncurses.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2021,2023 Thomas E. Dickey                                *
4 .\" Copyright 1998-2015,2017 Free Software Foundation, Inc.                  *
5 .\"                                                                          *
6 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
7 .\" copy of this software and associated documentation files (the            *
8 .\" "Software"), to deal in the Software without restriction, including      *
9 .\" without limitation the rights to use, copy, modify, merge, publish,      *
10 .\" distribute, distribute with modifications, sublicense, and/or sell       *
11 .\" copies of the Software, and to permit persons to whom the Software is    *
12 .\" furnished to do so, subject to the following conditions:                 *
13 .\"                                                                          *
14 .\" The above copyright notice and this permission notice shall be included  *
15 .\" in all copies or substantial portions of the Software.                   *
16 .\"                                                                          *
17 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24 .\"                                                                          *
25 .\" Except as contained in this notice, the name(s) of the above copyright   *
26 .\" holders shall not be used in advertising or otherwise to promote the     *
27 .\" sale, use or other dealings in this Software without prior written       *
28 .\" authorization.                                                           *
29 .\"***************************************************************************
30 .\"
31 .\" $Id: ncurses.3x,v 1.162 2023/07/01 15:21:06 tom Exp $
32 .hy 0
33 .TH ncurses 3X 2023-07-01 "ncurses 6.4" "Library calls"
34 .ie \n(.g .ds `` \(lq
35 .el       .ds `` ``
36 .ie \n(.g .ds '' \(rq
37 .el       .ds '' ''
38 .de bP
39 .ie n  .IP \(bu 4
40 .el    .IP \(bu 2
41 ..
42 .de NS
43 .ie n  .sp
44 .el    .sp .5
45 .ie n  .in +4
46 .el    .in +2
47 .nf
48 .ft CR                  \" Courier
49 ..
50 .de NE
51 .fi
52 .ft R
53 .ie n  .in -4
54 .el    .in -2
55 ..
56 .ds n 5
57 .ds d @TERMINFO@
58 .SH NAME
59 \fBncurses\fP \- CRT screen handling and optimization package
60 .SH SYNOPSIS
61 \fB#include <curses.h>\fP
62 .SH DESCRIPTION
63 The \fBncurses\fP library routines give the user a terminal-independent method
64 of updating character screens with reasonable optimization.
65 This implementation is \*(``new curses\*('' (ncurses) and
66 is the approved replacement for
67 4.4BSD classic curses, which has been discontinued.
68 This describes \fBncurses\fP
69 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
70 .PP
71 The \fBncurses\fP library emulates the curses library of
72 System V Release 4 UNIX,
73 and XPG4 (X/Open Portability Guide) curses (also known as XSI curses).
74 XSI stands for X/Open System Interfaces Extension.
75 The \fBncurses\fP library is freely redistributable in source form.
76 Differences from the SVr4
77 curses are summarized under the
78 \fIEXTENSIONS\fP and \fIPORTABILITY\fP sections below and
79 described in detail in the respective
80 \fIEXTENSIONS\fP, \fIPORTABILITY\fP and \fIBUGS\fP sections
81 of individual man pages.
82 .PP
83 The \fBncurses\fP library also provides many useful extensions,
84 i.e., features which cannot be implemented by a simple add-on library
85 but which require access to the internals of the library.
86 .PP
87 A program using these routines must be linked with the \fB\-lncurses\fP option,
88 or (if it has been generated) with the debugging library \fB\-lncurses_g\fP.
89 (Your system integrator may also have installed these libraries under
90 the names \fB\-lcurses\fP and \fB\-lcurses_g\fP.)
91 The ncurses_g library generates trace logs (in a file called \*(``trace\*('' in the
92 current directory) that describe curses actions.
93 See also the section on \fBALTERNATE CONFIGURATIONS\fP.
94 .PP
95 The \fBncurses\fP package supports: overall screen, window and pad
96 manipulation; output to windows and pads; reading terminal input; control over
97 terminal and \fBcurses\fP input and output options; environment query
98 routines; color manipulation; use of soft label keys; terminfo capabilities;
99 and access to low-level terminal-manipulation routines.
100 .SS Initialization
101 The library uses the locale which the calling program has initialized.
102 That is normally done with \fBsetlocale\fP(3):
103 .NS
104 \fBsetlocale(LC_ALL, "");\fP
105 .NE
106 .PP
107 If the locale is not initialized,
108 the library assumes that characters are printable as in ISO\-8859\-1,
109 to work with certain legacy programs.
110 You should initialize the locale and not rely on specific details of
111 the library when the locale has not been setup.
112 .PP
113 The function \fBinitscr\fP or \fBnewterm\fP
114 must be called to initialize the library
115 before any of the other routines that deal with windows
116 and screens are used.
117 The routine \fBendwin\fP(3X) must be called before exiting.
118 .PP
119 To get character-at-a-time input without echoing (most
120 interactive, screen oriented programs want this), the following
121 sequence should be used:
122 .NS
123 \fBinitscr(); cbreak(); noecho();\fP
124 .NE
125 .PP
126 Most programs would additionally use the sequence:
127 .NS
128 \fBintrflush(stdscr, FALSE);\fP
129 \fBkeypad(stdscr, TRUE);\fP
130 .NE
131 .PP
132 Before a \fBcurses\fP program is run, the tab stops of the terminal
133 should be set and its initialization strings, if defined, must be output.
134 This can be done by executing the \fB@TPUT@ init\fP command
135 after the shell environment variable \fBTERM\fP has been exported.
136 \fB@TSET@(1)\fP is usually responsible for doing this.
137 [See \fBterminfo\fP(\*n) for further details.]
138 .SS Datatypes
139 The \fBncurses\fP library permits manipulation of data structures,
140 called \fIwindows\fP, which can be thought of as two-dimensional
141 arrays of characters representing all or part of a CRT screen.
142 A default window called \fBstdscr\fP, which is the size of the terminal
143 screen, is supplied.
144 Others may be created with \fBnewwin\fP.
145 .PP
146 Note that \fBcurses\fP does not handle overlapping windows, that's done by
147 the \fBpanel\fP(3X) library.
148 This means that you can either use
149 \fBstdscr\fP or divide the screen into tiled windows and not using
150 \fBstdscr\fP at all.
151 Mixing the two will result in unpredictable, and undesired, effects.
152 .PP
153 Windows are referred to by variables declared as \fBWINDOW *\fP.
154 These data structures are manipulated with routines described here and
155 elsewhere in the \fBncurses\fP manual pages.
156 Among those, the most basic
157 routines are \fBmove\fP and \fBaddch\fP.
158 More general versions of
159 these routines are included with names beginning with \fBw\fP,
160 allowing the user to specify a window.
161 The routines not beginning
162 with \fBw\fP affect \fBstdscr\fP.
163 .PP
164 After using routines to manipulate a window, \fBrefresh\fP(3X) is called,
165 telling \fBcurses\fP to make the user's CRT screen look like
166 \fBstdscr\fP.
167 The characters in a window are actually of type
168 \fBchtype\fP, (character and attribute data) so that other information
169 about the character may also be stored with each character.
170 .PP
171 Special windows called \fIpads\fP may also be manipulated.
172 These are windows
173 which are not constrained to the size of the screen and whose contents need not
174 be completely displayed.
175 See \fBcurs_pad\fP(3X) for more information.
176 .PP
177 In addition to drawing characters on the screen, video attributes and colors
178 may be supported, causing the characters to show up in such modes as
179 underlined, in reverse video, or in color on terminals that support such
180 display enhancements.
181 Line drawing characters may be specified to be output.
182 On input, \fBcurses\fP is also able to translate arrow and function keys that
183 transmit escape sequences into single values.
184 The video attributes, line
185 drawing characters, and input values use names, defined in \fB<curses.h>\fP,
186 such as \fBA_REVERSE\fP, \fBACS_HLINE\fP, and \fBKEY_LEFT\fP.
187 .SS Environment variables
188 If the environment variables \fBLINES\fP and \fBCOLUMNS\fP are set, or if the
189 program is executing in a window environment, line and column information in
190 the environment will override information read by \fIterminfo\fP.
191 This would affect a program running in an AT&T 630 layer,
192 for example, where the size of a
193 screen is changeable (see \fBENVIRONMENT\fP).
194 .PP
195 If the environment variable \fBTERMINFO\fP is defined, any program using
196 \fBcurses\fP checks for a local terminal definition before checking in the
197 standard place.
198 For example, if \fBTERM\fP is set to \fBatt4424\fP, then the
199 compiled terminal definition is found in
200 .NS
201 \fB\*d/a/att4424\fP.
202 .NE
203 .PP
204 (The \fBa\fP is copied from the first letter of \fBatt4424\fP to avoid
205 creation of huge directories.)  However, if \fBTERMINFO\fP is set to
206 \fB$HOME/myterms\fP, \fBcurses\fP first checks
207 .NS
208 \fB$HOME/myterms/a/att4424\fP,
209 .NE
210 .PP
211 and if that fails, it then checks
212 .NS
213 \fB\*d/a/att4424\fP.
214 .NE
215 .PP
216 This is useful for developing experimental definitions or when write
217 permission in \fB\*d\fP is not available.
218 .PP
219 The integer variables \fBLINES\fP and \fBCOLS\fP are defined in
220 \fB<curses.h>\fP and will be filled in by \fBinitscr\fP with the size of the
221 screen.
222 The constants \fBTRUE\fP and \fBFALSE\fP have the values \fB1\fP and
223 \fB0\fP, respectively.
224 .PP
225 The \fBcurses\fP routines also define the \fBWINDOW *\fP variable \fBcurscr\fP
226 which is used for certain low-level operations like clearing and redrawing a
227 screen containing garbage.
228 The \fBcurscr\fP can be used in only a few routines.
229 .\"
230 .SS Routine and Argument Names
231 Many \fBcurses\fP routines have two or more versions.
232 The routines prefixed with \fIw\fP require a window argument.
233 The routines prefixed with \fIp\fP require a pad argument.
234 Those without a prefix generally use \fBstdscr\fP.
235 .PP
236 The routines prefixed with \fBmv\fP require a \fIy\fP and \fIx\fP
237 coordinate to move to before performing the appropriate action.
238 The \fBmv\fP routines imply a call to \fBmove\fP before the call to the
239 other routine.
240 The coordinate \fIy\fP always refers to the row (of
241 the window), and \fIx\fP always refers to the column.
242 The upper left-hand corner is always (0,0), not (1,1).
243 .PP
244 The routines prefixed with \fBmvw\fP take both a window argument and
245 \fIx\fP and \fIy\fP coordinates.
246 The window argument is always specified before the coordinates.
247 .PP
248 In each case, \fIwin\fP is the window affected, and \fIpad\fP is the
249 pad affected; \fIwin\fP and \fIpad\fP are always pointers to type
250 \fBWINDOW\fP.
251 .PP
252 Option setting routines require a Boolean flag \fIbf\fP with the value
253 \fBTRUE\fP or \fBFALSE\fP; \fIbf\fP is always of type \fBbool\fP.
254 Most of the data types used in the library routines,
255 such as \fBWINDOW\fP, \fBSCREEN\fP, \fBbool\fP, and \fBchtype\fP
256 are defined in \fB<curses.h>\fP.
257 Types used for the terminfo routines such as
258 \fBTERMINAL\fP are defined in \fB<term.h>\fP.
259 .PP
260 This manual page describes functions which may appear in any configuration
261 of the library.
262 There are two common configurations of the library:
263 .RS 3
264 .TP 5
265 .I ncurses
266 the \*(``normal\*('' library, which handles 8-bit characters.
267 The normal (8-bit) library stores characters combined with attributes
268 in \fBchtype\fP data.
269 .IP
270 Attributes alone (no corresponding character) may be stored in \fBchtype\fP
271 or the equivalent \fBattr_t\fP data.
272 In either case, the data is stored in something like an integer.
273 .IP
274 Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBchtype\fP.
275 .TP 5
276 .I ncursesw
277 the so-called \*(``wide\*('' library, which handles multibyte characters
278 (see the section on \fBALTERNATE CONFIGURATIONS\fP).
279 The \*(``wide\*('' library includes all of the calls
280 from the \*(``normal\*('' library.
281 It adds about one third more calls using data types which store
282 multibyte characters:
283 .RS 5
284 .TP 5
285 .B cchar_t
286 corresponds to \fBchtype\fP.
287 However it is a structure, because more data is stored than can fit into
288 an integer.
289 The characters are large enough to require a full integer value \- and there
290 may be more than one character per cell.
291 The video attributes and color are stored in separate fields of the structure.
292 .IP
293 Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBcchar_t\fP.
294 .IP
295 The \fBsetcchar\fP(3X) and \fBgetcchar\fP(3X)
296 functions store and retrieve the data from
297 a \fBcchar_t\fP structure.
298 .TP 5
299 .B wchar_t
300 stores a \*(``wide\*('' character.
301 Like \fBchtype\fP, this may be an integer.
302 .TP 5
303 .B wint_t
304 stores a \fBwchar_t\fP or \fBWEOF\fP \- not the same, though both may have
305 the same size.
306 .RE
307 .IP
308 The \*(``wide\*('' library provides new functions which are analogous to
309 functions in the \*(``normal\*('' library.
310 There is a naming convention which relates many of the normal/wide variants:
311 a \*(``_w\*('' is inserted into the name.
312 For example, \fBwaddch\fP becomes \fBwadd_wch\fP.
313 .RE
314 .\"
315 .SS Routine Name Index
316 The following table lists the \fBcurses\fP routines provided in
317 the \*(``normal\*('' and \*(``wide\*('' libraries and the names of
318 the manual pages on which they are described.
319 Routines flagged with \*(``*\*(''
320 are ncurses-specific, not described by XPG4 or present in SVr4.
321 .PP
322 .TS
323 center tab(/);
324 l l
325 l l .
326 \fBcurses\fP Routine Name/Manual Page Name
327 =
328 COLOR_PAIR/\fBcurs_color\fP(3X)
329 PAIR_NUMBER/\fBcurs_attr\fP(3X)
330 add_wch/\fBcurs_add_wch\fP(3X)
331 add_wchnstr/\fBcurs_add_wchstr\fP(3X)
332 add_wchstr/\fBcurs_add_wchstr\fP(3X)
333 addch/\fBcurs_addch\fP(3X)
334 addchnstr/\fBcurs_addchstr\fP(3X)
335 addchstr/\fBcurs_addchstr\fP(3X)
336 addnstr/\fBcurs_addstr\fP(3X)
337 addnwstr/\fBcurs_addwstr\fP(3X)
338 addstr/\fBcurs_addstr\fP(3X)
339 addwstr/\fBcurs_addwstr\fP(3X)
340 alloc_pair/\fBnew_pair\fP(3X)*
341 assume_default_colors/\fBdefault_colors\fP(3X)*
342 attr_get/\fBcurs_attr\fP(3X)
343 attr_off/\fBcurs_attr\fP(3X)
344 attr_on/\fBcurs_attr\fP(3X)
345 attr_set/\fBcurs_attr\fP(3X)
346 attroff/\fBcurs_attr\fP(3X)
347 attron/\fBcurs_attr\fP(3X)
348 attrset/\fBcurs_attr\fP(3X)
349 baudrate/\fBcurs_termattrs\fP(3X)
350 beep/\fBcurs_beep\fP(3X)
351 bkgd/\fBcurs_bkgd\fP(3X)
352 bkgdset/\fBcurs_bkgd\fP(3X)
353 bkgrnd/\fBcurs_bkgrnd\fP(3X)
354 bkgrndset/\fBcurs_bkgrnd\fP(3X)
355 border/\fBcurs_border\fP(3X)
356 border_set/\fBcurs_border_set\fP(3X)
357 box/\fBcurs_border\fP(3X)
358 box_set/\fBcurs_border_set\fP(3X)
359 can_change_color/\fBcurs_color\fP(3X)
360 cbreak/\fBcurs_inopts\fP(3X)
361 chgat/\fBcurs_attr\fP(3X)
362 clear/\fBcurs_clear\fP(3X)
363 clearok/\fBcurs_outopts\fP(3X)
364 clrtobot/\fBcurs_clear\fP(3X)
365 clrtoeol/\fBcurs_clear\fP(3X)
366 color_content/\fBcurs_color\fP(3X)
367 color_set/\fBcurs_attr\fP(3X)
368 copywin/\fBcurs_overlay\fP(3X)
369 curs_set/\fBcurs_kernel\fP(3X)
370 curses_trace/\fBcurs_trace\fP(3X)*
371 curses_version/\fBcurs_extend\fP(3X)*
372 def_prog_mode/\fBcurs_kernel\fP(3X)
373 def_shell_mode/\fBcurs_kernel\fP(3X)
374 define_key/\fBdefine_key\fP(3X)*
375 del_curterm/\fBcurs_terminfo\fP(3X)
376 delay_output/\fBcurs_util\fP(3X)
377 delch/\fBcurs_delch\fP(3X)
378 deleteln/\fBcurs_deleteln\fP(3X)
379 delscreen/\fBcurs_initscr\fP(3X)
380 delwin/\fBcurs_window\fP(3X)
381 derwin/\fBcurs_window\fP(3X)
382 doupdate/\fBcurs_refresh\fP(3X)
383 dupwin/\fBcurs_window\fP(3X)
384 echo/\fBcurs_inopts\fP(3X)
385 echo_wchar/\fBcurs_add_wch\fP(3X)
386 echochar/\fBcurs_addch\fP(3X)
387 endwin/\fBcurs_initscr\fP(3X)
388 erase/\fBcurs_clear\fP(3X)
389 erasechar/\fBcurs_termattrs\fP(3X)
390 erasewchar/\fBcurs_termattrs\fP(3X)
391 exit_curses/\fBcurs_memleaks\fP(3X)*
392 exit_terminfo/\fBcurs_memleaks\fP(3X)*
393 extended_color_content/\fBcurs_color\fP(3X)*
394 extended_pair_content/\fBcurs_color\fP(3X)*
395 extended_slk_color/\fBcurs_slk\fP(3X)*
396 filter/\fBcurs_util\fP(3X)
397 find_pair/\fBnew_pair\fP(3X)*
398 flash/\fBcurs_beep\fP(3X)
399 flushinp/\fBcurs_util\fP(3X)
400 free_pair/\fBnew_pair\fP(3X)*
401 get_wch/\fBcurs_get_wch\fP(3X)
402 get_wstr/\fBcurs_get_wstr\fP(3X)
403 getattrs/\fBcurs_attr\fP(3X)
404 getbegx/\fBcurs_legacy\fP(3X)*
405 getbegy/\fBcurs_legacy\fP(3X)*
406 getbegyx/\fBcurs_getyx\fP(3X)
407 getbkgd/\fBcurs_bkgd\fP(3X)
408 getbkgrnd/\fBcurs_bkgrnd\fP(3X)
409 getcchar/\fBcurs_getcchar\fP(3X)
410 getch/\fBcurs_getch\fP(3X)
411 getcurx/\fBcurs_legacy\fP(3X)*
412 getcury/\fBcurs_legacy\fP(3X)*
413 getmaxx/\fBcurs_legacy\fP(3X)*
414 getmaxy/\fBcurs_legacy\fP(3X)*
415 getmaxyx/\fBcurs_getyx\fP(3X)
416 getmouse/\fBcurs_mouse\fP(3X)*
417 getn_wstr/\fBcurs_get_wstr\fP(3X)
418 getnstr/\fBcurs_getstr\fP(3X)
419 getparx/\fBcurs_legacy\fP(3X)*
420 getpary/\fBcurs_legacy\fP(3X)*
421 getparyx/\fBcurs_getyx\fP(3X)
422 getstr/\fBcurs_getstr\fP(3X)
423 getsyx/\fBcurs_kernel\fP(3X)
424 getwin/\fBcurs_util\fP(3X)
425 getyx/\fBcurs_getyx\fP(3X)
426 halfdelay/\fBcurs_inopts\fP(3X)
427 has_colors/\fBcurs_color\fP(3X)
428 has_ic/\fBcurs_termattrs\fP(3X)
429 has_il/\fBcurs_termattrs\fP(3X)
430 has_key/\fBcurs_getch\fP(3X)*
431 has_mouse/\fBcurs_mouse\fP(3X)*
432 hline/\fBcurs_border\fP(3X)
433 hline_set/\fBcurs_border_set\fP(3X)
434 idcok/\fBcurs_outopts\fP(3X)
435 idlok/\fBcurs_outopts\fP(3X)
436 immedok/\fBcurs_outopts\fP(3X)
437 in_wch/\fBcurs_in_wch\fP(3X)
438 in_wchnstr/\fBcurs_in_wchstr\fP(3X)
439 in_wchstr/\fBcurs_in_wchstr\fP(3X)
440 inch/\fBcurs_inch\fP(3X)
441 inchnstr/\fBcurs_inchstr\fP(3X)
442 inchstr/\fBcurs_inchstr\fP(3X)
443 init_color/\fBcurs_color\fP(3X)
444 init_extended_color/\fBcurs_color\fP(3X)*
445 init_extended_pair/\fBcurs_color\fP(3X)*
446 init_pair/\fBcurs_color\fP(3X)
447 initscr/\fBcurs_initscr\fP(3X)
448 innstr/\fBcurs_instr\fP(3X)
449 innwstr/\fBcurs_inwstr\fP(3X)
450 ins_nwstr/\fBcurs_ins_wstr\fP(3X)
451 ins_wch/\fBcurs_ins_wch\fP(3X)
452 ins_wstr/\fBcurs_ins_wstr\fP(3X)
453 insch/\fBcurs_insch\fP(3X)
454 insdelln/\fBcurs_deleteln\fP(3X)
455 insertln/\fBcurs_deleteln\fP(3X)
456 insnstr/\fBcurs_insstr\fP(3X)
457 insstr/\fBcurs_insstr\fP(3X)
458 instr/\fBcurs_instr\fP(3X)
459 intrflush/\fBcurs_inopts\fP(3X)
460 inwstr/\fBcurs_inwstr\fP(3X)
461 is_cleared/\fBcurs_opaque\fP(3X)*
462 is_idcok/\fBcurs_opaque\fP(3X)*
463 is_idlok/\fBcurs_opaque\fP(3X)*
464 is_immedok/\fBcurs_opaque\fP(3X)*
465 is_keypad/\fBcurs_opaque\fP(3X)*
466 is_leaveok/\fBcurs_opaque\fP(3X)*
467 is_linetouched/\fBcurs_touch\fP(3X)
468 is_nodelay/\fBcurs_opaque\fP(3X)*
469 is_notimeout/\fBcurs_opaque\fP(3X)*
470 is_pad/\fBcurs_opaque\fP(3X)*
471 is_scrollok/\fBcurs_opaque\fP(3X)*
472 is_subwin/\fBcurs_opaque\fP(3X)*
473 is_syncok/\fBcurs_opaque\fP(3X)*
474 is_term_resized/\fBresizeterm\fP(3X)*
475 is_wintouched/\fBcurs_touch\fP(3X)
476 isendwin/\fBcurs_initscr\fP(3X)
477 key_defined/\fBkey_defined\fP(3X)*
478 key_name/\fBcurs_util\fP(3X)
479 keybound/\fBkeybound\fP(3X)*
480 keyname/\fBcurs_util\fP(3X)
481 keyok/\fBkeyok\fP(3X)*
482 keypad/\fBcurs_inopts\fP(3X)
483 killchar/\fBcurs_termattrs\fP(3X)
484 killwchar/\fBcurs_termattrs\fP(3X)
485 leaveok/\fBcurs_outopts\fP(3X)
486 longname/\fBcurs_termattrs\fP(3X)
487 mcprint/\fBcurs_print\fP(3X)*
488 meta/\fBcurs_inopts\fP(3X)
489 mouse_trafo/\fBcurs_mouse\fP(3X)*
490 mouseinterval/\fBcurs_mouse\fP(3X)*
491 mousemask/\fBcurs_mouse\fP(3X)*
492 move/\fBcurs_move\fP(3X)
493 mvadd_wch/\fBcurs_add_wch\fP(3X)
494 mvadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
495 mvadd_wchstr/\fBcurs_add_wchstr\fP(3X)
496 mvaddch/\fBcurs_addch\fP(3X)
497 mvaddchnstr/\fBcurs_addchstr\fP(3X)
498 mvaddchstr/\fBcurs_addchstr\fP(3X)
499 mvaddnstr/\fBcurs_addstr\fP(3X)
500 mvaddnwstr/\fBcurs_addwstr\fP(3X)
501 mvaddstr/\fBcurs_addstr\fP(3X)
502 mvaddwstr/\fBcurs_addwstr\fP(3X)
503 mvchgat/\fBcurs_attr\fP(3X)
504 mvcur/\fBcurs_terminfo\fP(3X)
505 mvdelch/\fBcurs_delch\fP(3X)
506 mvderwin/\fBcurs_window\fP(3X)
507 mvget_wch/\fBcurs_get_wch\fP(3X)
508 mvget_wstr/\fBcurs_get_wstr\fP(3X)
509 mvgetch/\fBcurs_getch\fP(3X)
510 mvgetn_wstr/\fBcurs_get_wstr\fP(3X)
511 mvgetnstr/\fBcurs_getstr\fP(3X)
512 mvgetstr/\fBcurs_getstr\fP(3X)
513 mvhline/\fBcurs_border\fP(3X)
514 mvhline_set/\fBcurs_border_set\fP(3X)
515 mvin_wch/\fBcurs_in_wch\fP(3X)
516 mvin_wchnstr/\fBcurs_in_wchstr\fP(3X)
517 mvin_wchstr/\fBcurs_in_wchstr\fP(3X)
518 mvinch/\fBcurs_inch\fP(3X)
519 mvinchnstr/\fBcurs_inchstr\fP(3X)
520 mvinchstr/\fBcurs_inchstr\fP(3X)
521 mvinnstr/\fBcurs_instr\fP(3X)
522 mvinnwstr/\fBcurs_inwstr\fP(3X)
523 mvins_nwstr/\fBcurs_ins_wstr\fP(3X)
524 mvins_wch/\fBcurs_ins_wch\fP(3X)
525 mvins_wstr/\fBcurs_ins_wstr\fP(3X)
526 mvinsch/\fBcurs_insch\fP(3X)
527 mvinsnstr/\fBcurs_insstr\fP(3X)
528 mvinsstr/\fBcurs_insstr\fP(3X)
529 mvinstr/\fBcurs_instr\fP(3X)
530 mvinwstr/\fBcurs_inwstr\fP(3X)
531 mvprintw/\fBcurs_printw\fP(3X)
532 mvscanw/\fBcurs_scanw\fP(3X)
533 mvvline/\fBcurs_border\fP(3X)
534 mvvline_set/\fBcurs_border_set\fP(3X)
535 mvwadd_wch/\fBcurs_add_wch\fP(3X)
536 mvwadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
537 mvwadd_wchstr/\fBcurs_add_wchstr\fP(3X)
538 mvwaddch/\fBcurs_addch\fP(3X)
539 mvwaddchnstr/\fBcurs_addchstr\fP(3X)
540 mvwaddchstr/\fBcurs_addchstr\fP(3X)
541 mvwaddnstr/\fBcurs_addstr\fP(3X)
542 mvwaddnwstr/\fBcurs_addwstr\fP(3X)
543 mvwaddstr/\fBcurs_addstr\fP(3X)
544 mvwaddwstr/\fBcurs_addwstr\fP(3X)
545 mvwchgat/\fBcurs_attr\fP(3X)
546 mvwdelch/\fBcurs_delch\fP(3X)
547 mvwget_wch/\fBcurs_get_wch\fP(3X)
548 mvwget_wstr/\fBcurs_get_wstr\fP(3X)
549 mvwgetch/\fBcurs_getch\fP(3X)
550 mvwgetn_wstr/\fBcurs_get_wstr\fP(3X)
551 mvwgetnstr/\fBcurs_getstr\fP(3X)
552 mvwgetstr/\fBcurs_getstr\fP(3X)
553 mvwhline/\fBcurs_border\fP(3X)
554 mvwhline_set/\fBcurs_border_set\fP(3X)
555 mvwin/\fBcurs_window\fP(3X)
556 mvwin_wch/\fBcurs_in_wch\fP(3X)
557 mvwin_wchnstr/\fBcurs_in_wchstr\fP(3X)
558 mvwin_wchstr/\fBcurs_in_wchstr\fP(3X)
559 mvwinch/\fBcurs_inch\fP(3X)
560 mvwinchnstr/\fBcurs_inchstr\fP(3X)
561 mvwinchstr/\fBcurs_inchstr\fP(3X)
562 mvwinnstr/\fBcurs_instr\fP(3X)
563 mvwinnwstr/\fBcurs_inwstr\fP(3X)
564 mvwins_nwstr/\fBcurs_ins_wstr\fP(3X)
565 mvwins_wch/\fBcurs_ins_wch\fP(3X)
566 mvwins_wstr/\fBcurs_ins_wstr\fP(3X)
567 mvwinsch/\fBcurs_insch\fP(3X)
568 mvwinsnstr/\fBcurs_insstr\fP(3X)
569 mvwinsstr/\fBcurs_insstr\fP(3X)
570 mvwinstr/\fBcurs_instr\fP(3X)
571 mvwinwstr/\fBcurs_inwstr\fP(3X)
572 mvwprintw/\fBcurs_printw\fP(3X)
573 mvwscanw/\fBcurs_scanw\fP(3X)
574 mvwvline/\fBcurs_border\fP(3X)
575 mvwvline_set/\fBcurs_border_set\fP(3X)
576 napms/\fBcurs_kernel\fP(3X)
577 newpad/\fBcurs_pad\fP(3X)
578 newterm/\fBcurs_initscr\fP(3X)
579 newwin/\fBcurs_window\fP(3X)
580 nl/\fBcurs_inopts\fP(3X)
581 nocbreak/\fBcurs_inopts\fP(3X)
582 nodelay/\fBcurs_inopts\fP(3X)
583 noecho/\fBcurs_inopts\fP(3X)
584 nofilter/\fBcurs_util\fP(3X)*
585 nonl/\fBcurs_inopts\fP(3X)
586 noqiflush/\fBcurs_inopts\fP(3X)
587 noraw/\fBcurs_inopts\fP(3X)
588 notimeout/\fBcurs_inopts\fP(3X)
589 overlay/\fBcurs_overlay\fP(3X)
590 overwrite/\fBcurs_overlay\fP(3X)
591 pair_content/\fBcurs_color\fP(3X)
592 pecho_wchar/\fBcurs_pad\fP(3X)*
593 pechochar/\fBcurs_pad\fP(3X)
594 pnoutrefresh/\fBcurs_pad\fP(3X)
595 prefresh/\fBcurs_pad\fP(3X)
596 printw/\fBcurs_printw\fP(3X)
597 putp/\fBcurs_terminfo\fP(3X)
598 putwin/\fBcurs_util\fP(3X)
599 qiflush/\fBcurs_inopts\fP(3X)
600 raw/\fBcurs_inopts\fP(3X)
601 redrawwin/\fBcurs_refresh\fP(3X)
602 refresh/\fBcurs_refresh\fP(3X)
603 reset_color_pairs/\fBcurs_color\fP(3X)*
604 reset_prog_mode/\fBcurs_kernel\fP(3X)
605 reset_shell_mode/\fBcurs_kernel\fP(3X)
606 resetty/\fBcurs_kernel\fP(3X)
607 resize_term/\fBresizeterm\fP(3X)*
608 resizeterm/\fBresizeterm\fP(3X)*
609 restartterm/\fBcurs_terminfo\fP(3X)
610 ripoffline/\fBcurs_kernel\fP(3X)
611 savetty/\fBcurs_kernel\fP(3X)
612 scanw/\fBcurs_scanw\fP(3X)
613 scr_dump/\fBcurs_scr_dump\fP(3X)
614 scr_init/\fBcurs_scr_dump\fP(3X)
615 scr_restore/\fBcurs_scr_dump\fP(3X)
616 scr_set/\fBcurs_scr_dump\fP(3X)
617 scrl/\fBcurs_scroll\fP(3X)
618 scroll/\fBcurs_scroll\fP(3X)
619 scrollok/\fBcurs_outopts\fP(3X)
620 set_curterm/\fBcurs_terminfo\fP(3X)
621 set_term/\fBcurs_initscr\fP(3X)
622 setcchar/\fBcurs_getcchar\fP(3X)
623 setscrreg/\fBcurs_outopts\fP(3X)
624 setsyx/\fBcurs_kernel\fP(3X)
625 setupterm/\fBcurs_terminfo\fP(3X)
626 slk_attr/\fBcurs_slk\fP(3X)*
627 slk_attr_off/\fBcurs_slk\fP(3X)
628 slk_attr_on/\fBcurs_slk\fP(3X)
629 slk_attr_set/\fBcurs_slk\fP(3X)
630 slk_attroff/\fBcurs_slk\fP(3X)
631 slk_attron/\fBcurs_slk\fP(3X)
632 slk_attrset/\fBcurs_slk\fP(3X)
633 slk_clear/\fBcurs_slk\fP(3X)
634 slk_color/\fBcurs_slk\fP(3X)
635 slk_init/\fBcurs_slk\fP(3X)
636 slk_label/\fBcurs_slk\fP(3X)
637 slk_noutrefresh/\fBcurs_slk\fP(3X)
638 slk_refresh/\fBcurs_slk\fP(3X)
639 slk_restore/\fBcurs_slk\fP(3X)
640 slk_set/\fBcurs_slk\fP(3X)
641 slk_touch/\fBcurs_slk\fP(3X)
642 slk_wset/\fBcurs_slk\fP(3X)*
643 standend/\fBcurs_attr\fP(3X)
644 standout/\fBcurs_attr\fP(3X)
645 start_color/\fBcurs_color\fP(3X)
646 subpad/\fBcurs_pad\fP(3X)
647 subwin/\fBcurs_window\fP(3X)
648 syncok/\fBcurs_window\fP(3X)
649 term_attrs/\fBcurs_termattrs\fP(3X)
650 termattrs/\fBcurs_termattrs\fP(3X)
651 termname/\fBcurs_termattrs\fP(3X)
652 tgetent/\fBcurs_termcap\fP(3X)
653 tgetflag/\fBcurs_termcap\fP(3X)
654 tgetnum/\fBcurs_termcap\fP(3X)
655 tgetstr/\fBcurs_termcap\fP(3X)
656 tgoto/\fBcurs_termcap\fP(3X)
657 tigetflag/\fBcurs_terminfo\fP(3X)
658 tigetnum/\fBcurs_terminfo\fP(3X)
659 tigetstr/\fBcurs_terminfo\fP(3X)
660 timeout/\fBcurs_inopts\fP(3X)
661 tiparm/\fBcurs_terminfo\fP(3X)*
662 tiparm_s/\fBcurs_terminfo\fP(3X)*
663 tiscan_s/\fBcurs_terminfo\fP(3X)*
664 touchline/\fBcurs_touch\fP(3X)
665 touchwin/\fBcurs_touch\fP(3X)
666 tparm/\fBcurs_terminfo\fP(3X)
667 tputs/\fBcurs_termcap\fP(3X)
668 tputs/\fBcurs_terminfo\fP(3X)
669 trace/\fBcurs_trace\fP(3X)*
670 typeahead/\fBcurs_inopts\fP(3X)
671 unctrl/\fBcurs_util\fP(3X)
672 unget_wch/\fBcurs_get_wch\fP(3X)
673 ungetch/\fBcurs_getch\fP(3X)
674 ungetmouse/\fBcurs_mouse\fP(3X)*
675 untouchwin/\fBcurs_touch\fP(3X)
676 use_default_colors/\fBdefault_colors\fP(3X)*
677 use_env/\fBcurs_util\fP(3X)
678 use_extended_names/\fBcurs_extend\fP(3X)*
679 use_legacy_coding/\fBlegacy_coding\fP(3X)*
680 use_tioctl/\fBcurs_util\fP(3X)*
681 vid_attr/\fBcurs_terminfo\fP(3X)
682 vid_puts/\fBcurs_terminfo\fP(3X)
683 vidattr/\fBcurs_terminfo\fP(3X)
684 vidputs/\fBcurs_terminfo\fP(3X)
685 vline/\fBcurs_border\fP(3X)
686 vline_set/\fBcurs_border_set\fP(3X)
687 vw_printw/\fBcurs_printw\fP(3X)
688 vw_scanw/\fBcurs_scanw\fP(3X)
689 vwprintw/\fBcurs_printw\fP(3X)
690 vwscanw/\fBcurs_scanw\fP(3X)
691 wadd_wch/\fBcurs_add_wch\fP(3X)
692 wadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
693 wadd_wchstr/\fBcurs_add_wchstr\fP(3X)
694 waddch/\fBcurs_addch\fP(3X)
695 waddchnstr/\fBcurs_addchstr\fP(3X)
696 waddchstr/\fBcurs_addchstr\fP(3X)
697 waddnstr/\fBcurs_addstr\fP(3X)
698 waddnwstr/\fBcurs_addwstr\fP(3X)
699 waddstr/\fBcurs_addstr\fP(3X)
700 waddwstr/\fBcurs_addwstr\fP(3X)
701 wattr_get/\fBcurs_attr\fP(3X)
702 wattr_off/\fBcurs_attr\fP(3X)
703 wattr_on/\fBcurs_attr\fP(3X)
704 wattr_set/\fBcurs_attr\fP(3X)
705 wattroff/\fBcurs_attr\fP(3X)
706 wattron/\fBcurs_attr\fP(3X)
707 wattrset/\fBcurs_attr\fP(3X)
708 wbkgd/\fBcurs_bkgd\fP(3X)
709 wbkgdset/\fBcurs_bkgd\fP(3X)
710 wbkgrnd/\fBcurs_bkgrnd\fP(3X)
711 wbkgrndset/\fBcurs_bkgrnd\fP(3X)
712 wborder/\fBcurs_border\fP(3X)
713 wborder_set/\fBcurs_border_set\fP(3X)
714 wchgat/\fBcurs_attr\fP(3X)
715 wclear/\fBcurs_clear\fP(3X)
716 wclrtobot/\fBcurs_clear\fP(3X)
717 wclrtoeol/\fBcurs_clear\fP(3X)
718 wcolor_set/\fBcurs_attr\fP(3X)
719 wcursyncup/\fBcurs_window\fP(3X)
720 wdelch/\fBcurs_delch\fP(3X)
721 wdeleteln/\fBcurs_deleteln\fP(3X)
722 wecho_wchar/\fBcurs_add_wch\fP(3X)
723 wechochar/\fBcurs_addch\fP(3X)
724 wenclose/\fBcurs_mouse\fP(3X)*
725 werase/\fBcurs_clear\fP(3X)
726 wget_wch/\fBcurs_get_wch\fP(3X)
727 wget_wstr/\fBcurs_get_wstr\fP(3X)
728 wgetbkgrnd/\fBcurs_bkgrnd\fP(3X)
729 wgetch/\fBcurs_getch\fP(3X)
730 wgetdelay/\fBcurs_opaque\fP(3X)*
731 wgetn_wstr/\fBcurs_get_wstr\fP(3X)
732 wgetnstr/\fBcurs_getstr\fP(3X)
733 wgetparent/\fBcurs_opaque\fP(3X)*
734 wgetscrreg/\fBcurs_opaque\fP(3X)*
735 wgetstr/\fBcurs_getstr\fP(3X)
736 whline/\fBcurs_border\fP(3X)
737 whline_set/\fBcurs_border_set\fP(3X)
738 win_wch/\fBcurs_in_wch\fP(3X)
739 win_wchnstr/\fBcurs_in_wchstr\fP(3X)
740 win_wchstr/\fBcurs_in_wchstr\fP(3X)
741 winch/\fBcurs_inch\fP(3X)
742 winchnstr/\fBcurs_inchstr\fP(3X)
743 winchstr/\fBcurs_inchstr\fP(3X)
744 winnstr/\fBcurs_instr\fP(3X)
745 winnwstr/\fBcurs_inwstr\fP(3X)
746 wins_nwstr/\fBcurs_ins_wstr\fP(3X)
747 wins_wch/\fBcurs_ins_wch\fP(3X)
748 wins_wstr/\fBcurs_ins_wstr\fP(3X)
749 winsch/\fBcurs_insch\fP(3X)
750 winsdelln/\fBcurs_deleteln\fP(3X)
751 winsertln/\fBcurs_deleteln\fP(3X)
752 winsnstr/\fBcurs_insstr\fP(3X)
753 winsstr/\fBcurs_insstr\fP(3X)
754 winstr/\fBcurs_instr\fP(3X)
755 winwstr/\fBcurs_inwstr\fP(3X)
756 wmouse_trafo/\fBcurs_mouse\fP(3X)*
757 wmove/\fBcurs_move\fP(3X)
758 wnoutrefresh/\fBcurs_refresh\fP(3X)
759 wprintw/\fBcurs_printw\fP(3X)
760 wredrawln/\fBcurs_refresh\fP(3X)
761 wrefresh/\fBcurs_refresh\fP(3X)
762 wresize/\fBwresize\fP(3X)*
763 wscanw/\fBcurs_scanw\fP(3X)
764 wscrl/\fBcurs_scroll\fP(3X)
765 wsetscrreg/\fBcurs_outopts\fP(3X)
766 wstandend/\fBcurs_attr\fP(3X)
767 wstandout/\fBcurs_attr\fP(3X)
768 wsyncdown/\fBcurs_window\fP(3X)
769 wsyncup/\fBcurs_window\fP(3X)
770 wtimeout/\fBcurs_inopts\fP(3X)
771 wtouchln/\fBcurs_touch\fP(3X)
772 wunctrl/\fBcurs_util\fP(3X)
773 wvline/\fBcurs_border\fP(3X)
774 wvline_set/\fBcurs_border_set\fP(3X)
775 .TE
776 .PP
777 Depending on the configuration,
778 additional sets of functions may be available:
779 .RS 3
780 .TP 5
781 \fBcurs_memleaks\fP(3X) - curses memory-leak checking
782 .TP 5
783 \fBcurs_sp_funcs\fP(3X) - curses screen-pointer extension
784 .TP 5
785 \fBcurs_threads\fP(3X) - curses thread support
786 .TP 5
787 \fBcurs_trace\fP(3X) - curses debugging routines
788 .RE
789 .SH RETURN VALUE
790 Routines that return an integer return \fBERR\fP upon failure and an
791 integer value other than \fBERR\fP upon successful completion, unless
792 otherwise noted in the routine descriptions.
793 .PP
794 As a general rule, routines check for null pointers passed as parameters,
795 and handle this as an error.
796 .PP
797 All macros return the value of the \fBw\fP version, except \fBsetscrreg\fP,
798 \fBwsetscrreg\fP, \fBgetyx\fP, \fBgetbegyx\fP, and \fBgetmaxyx\fP.
799 The return values of
800 \fBsetscrreg\fP,
801 \fBwsetscrreg\fP,
802 \fBgetyx\fP,
803 \fBgetbegyx\fP, and
804 \fBgetmaxyx\fP are undefined (i.e., these should not be used as the
805 right-hand side of assignment statements).
806 .PP
807 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
808 \fBwmove\fP, and return an error if the position is outside the window,
809 or if the window pointer is null.
810 Most \*(``mv\*(''-prefixed functions
811 (except variadic functions such as \fBmvprintw\fP)
812 are provided both as macros and functions.
813 .PP
814 Routines that return pointers return \fBNULL\fP on error.
815 .SH ENVIRONMENT
816 The following environment symbols are useful for customizing the
817 runtime behavior of the \fBncurses\fP library.
818 The most important ones have been already discussed in detail.
819 .SS CC command-character
820 When set, change occurrences of the command_character
821 (i.e., the \fBcmdch\fP capability)
822 of the loaded terminfo entries to the value of this variable.
823 Very few terminfo entries provide this feature.
824 .PP
825 Because this name is also used in development environments to represent
826 the C compiler's name, \fBncurses\fP ignores it if it does not happen to
827 be a single character.
828 .SS BAUDRATE
829 The debugging library checks this environment variable when the application
830 has redirected output to a file.
831 The variable's numeric value is used for the baudrate.
832 If no value is found, \fBncurses\fP uses 9600.
833 This allows testers to construct repeatable test-cases
834 that take into account costs that depend on baudrate.
835 .SS COLUMNS
836 Specify the width of the screen in characters.
837 Applications running in a windowing environment usually are able to
838 obtain the width of the window in which they are executing.
839 If neither the \fBCOLUMNS\fP value nor the terminal's screen size is available,
840 \fBncurses\fP uses the size which may be specified in the terminfo database
841 (i.e., the \fBcols\fP capability).
842 .PP
843 It is important that your application use a correct size for the screen.
844 This is not always possible because your application may be
845 running on a host which does not honor NAWS (Negotiations About Window
846 Size), or because you are temporarily running as another user.
847 However, setting \fBCOLUMNS\fP and/or \fBLINES\fP overrides the library's
848 use of the screen size obtained from the operating system.
849 .PP
850 Either \fBCOLUMNS\fP or \fBLINES\fP symbols may be specified independently.
851 This is mainly useful to circumvent legacy misfeatures of terminal descriptions,
852 e.g., xterm which commonly specifies a 65 line screen.
853 For best results, \fBlines\fP and \fBcols\fP should not be specified in
854 a terminal description for terminals which are run as emulations.
855 .PP
856 Use the \fBuse_env\fP function to disable all use of external environment
857 (but not including system calls) to determine the screen size.
858 Use the \fBuse_tioctl\fP function to update \fBCOLUMNS\fP or \fBLINES\fP
859 to match the screen size obtained from system calls or the terminal database.
860 .SS ESCDELAY
861 Specifies the total time, in milliseconds, for which ncurses will
862 await a character sequence, e.g., a function key.
863 The default value, 1000 milliseconds, is enough for most uses.
864 However, it is made a variable to accommodate unusual applications.
865 .PP
866 The most common instance where you may wish to change this value
867 is to work with slow hosts, e.g., running on a network.
868 If the host cannot read characters rapidly enough, it will have the same
869 effect as if the terminal did not send characters rapidly enough.
870 The library will still see a timeout.
871 .PP
872 Note that xterm mouse events are built up from character sequences
873 received from the xterm.
874 If your application makes heavy use of multiple-clicking, you may
875 wish to lengthen this default value because the timeout applies
876 to the composed multi-click event as well as the individual clicks.
877 .PP
878 In addition to the environment variable,
879 this implementation provides a global variable with the same name.
880 Portable applications should not rely upon the presence of ESCDELAY
881 in either form,
882 but setting the environment variable rather than the global variable
883 does not create problems when compiling an application.
884 .SS HOME
885 Tells \fBncurses\fP where your home directory is.
886 That is where it may read and write auxiliary terminal descriptions:
887 .NS
888 $HOME/.termcap
889 $HOME/.terminfo
890 .NE
891 .SS LINES
892 Like COLUMNS, specify the height of the screen in characters.
893 See COLUMNS for a detailed description.
894 .SS MOUSE_BUTTONS_123
895 This applies only to the OS/2 EMX port.
896 It specifies the order of buttons on the mouse.
897 OS/2 numbers a 3-button mouse inconsistently from other
898 platforms:
899 .NS
900 1 = left
901 .br
902 2 = right
903 .br
904 3 = middle.
905 .NE
906 .PP
907 This variable lets you customize the mouse.
908 The variable must be three numeric digits 1\-3 in any order, e.g., 123 or 321.
909 If it is not specified, \fBncurses\fP uses 132.
910 .SS NCURSES_ASSUMED_COLORS
911 Override the compiled-in assumption that the
912 terminal's default colors are white-on-black
913 (see \fBdefault_colors\fP(3X)).
914 You may set the foreground and background color values with this environment
915 variable by proving a 2-element list: foreground,background.
916 For example, to tell ncurses to not assume anything
917 about the colors, set this to "\-1,\-1".
918 To make it green-on-black, set it to "2,0".
919 Any positive value from zero to the terminfo \fBmax_colors\fP value is allowed.
920 .SS NCURSES_CONSOLE2
921 This applies only to the MinGW port of ncurses.
922 .PP
923 The \fBConsole2\fP program's handling of the Microsoft Console API call
924 \fBCreateConsoleScreenBuffer\fP is defective.
925 Applications which use this will hang.
926 However, it is possible to simulate the action of this call by
927 mapping coordinates,
928 explicitly saving and restoring the original screen contents.
929 Setting the environment variable \fBNCGDB\fP has the same effect.
930 .SS NCURSES_GPM_TERMS
931 This applies only to ncurses configured to use the GPM interface.
932 .PP
933 If present,
934 the environment variable is a list of one or more terminal names
935 against which the \fBTERM\fP environment variable is matched.
936 Setting it to an empty value disables the GPM interface;
937 using the built-in support for xterm, etc.
938 .PP
939 If the environment variable is absent,
940 ncurses will attempt to open GPM if \fBTERM\fP contains \*(``linux\*(''.
941 .SS NCURSES_NO_HARD_TABS
942 \fBNcurses\fP may use tabs as part of the cursor movement optimization.
943 In some cases,
944 your terminal driver may not handle these properly.
945 Set this environment variable to disable the feature.
946 You can also adjust your \fBstty\fP(1) settings to avoid the problem.
947 .SS NCURSES_NO_MAGIC_COOKIE
948 Some terminals use a magic-cookie feature which requires special handling
949 to make highlighting and other video attributes display properly.
950 You can suppress the highlighting entirely for these terminals by
951 setting this environment variable.
952 .SS NCURSES_NO_PADDING
953 Most of the terminal descriptions in the terminfo database are written
954 for real \*(``hardware\*('' terminals.
955 Many people use terminal emulators
956 which run in a windowing environment and use curses-based applications.
957 Terminal emulators can duplicate
958 all of the important aspects of a hardware terminal, but they do not
959 have the same limitations.
960 The chief limitation of a hardware terminal from the standpoint
961 of your application is the management of dataflow, i.e., timing.
962 Unless a hardware terminal is interfaced into a terminal concentrator
963 (which does flow control),
964 it (or your application) must manage dataflow, preventing overruns.
965 The cheapest solution (no hardware cost)
966 is for your program to do this by pausing after
967 operations that the terminal does slowly, such as clearing the display.
968 .PP
969 As a result, many terminal descriptions (including the vt100)
970 have delay times embedded.
971 You may wish to use these descriptions,
972 but not want to pay the performance penalty.
973 .PP
974 Set the NCURSES_NO_PADDING environment variable to disable all but mandatory
975 padding.
976 Mandatory padding is used as a part of special control
977 sequences such as \fBflash\fP.
978 .SS NCURSES_NO_SETBUF
979 This setting is obsolete.
980 Before changes
981 .RS 3
982 .bP
983 started with 5.9 patch 20120825
984 and
985 .bP
986 continued
987 though 5.9 patch 20130126
988 .RE
989 .PP
990 \fBncurses\fP enabled buffered output during terminal initialization.
991 This was done (as in SVr4 curses) for performance reasons.
992 For testing purposes, both of \fBncurses\fP and certain applications,
993 this feature was made optional.
994 Setting the NCURSES_NO_SETBUF variable
995 disabled output buffering, leaving the output in the original (usually
996 line buffered) mode.
997 .PP
998 In the current implementation,
999 ncurses performs its own buffering and does not require this workaround.
1000 It does not modify the buffering of the standard output.
1001 .PP
1002 The reason for the change was to make the behavior for interrupts and
1003 other signals more robust.
1004 One drawback is that certain nonconventional programs would mix
1005 ordinary stdio calls with ncurses calls and (usually) work.
1006 This is no longer possible since ncurses is not using
1007 the buffered standard output but its own output (to the same file descriptor).
1008 As a special case, the low-level calls such as \fBputp\fP still use the
1009 standard output.
1010 But high-level curses calls do not.
1011 .SS NCURSES_NO_UTF8_ACS
1012 During initialization, the \fBncurses\fP library
1013 checks for special cases where VT100 line-drawing (and the corresponding
1014 alternate character set capabilities) described in the terminfo are known
1015 to be missing.
1016 Specifically, when running in a UTF\-8 locale,
1017 the Linux console emulator and the GNU screen program ignore these.
1018 Ncurses checks the \fBTERM\fP environment variable for these.
1019 For other special cases, you should set this environment variable.
1020 Doing this tells ncurses to use Unicode values which correspond to
1021 the VT100 line-drawing glyphs.
1022 That works for the special cases cited,
1023 and is likely to work for terminal emulators.
1024 .PP
1025 When setting this variable, you should set it to a nonzero value.
1026 Setting it to zero (or to a nonnumber)
1027 disables the special check for \*(``linux\*('' and \*(``screen\*(''.
1028 .PP
1029 As an alternative to the environment variable,
1030 ncurses checks for an extended terminfo capability \fBU8\fP.
1031 This is a numeric capability which can be compiled using \fB@TIC@\ \-x\fP.
1032 For example
1033 .RS 3
1034 .ft CW
1035 .sp
1036 .nf
1037 # linux console, if patched to provide working
1038 # VT100 shift-in/shift-out, with corresponding font.
1039 linux-vt100|linux console with VT100 line-graphics,
1040         U8#0, use=linux,
1041 .sp
1042 # uxterm with vt100Graphics resource set to false
1043 xterm-utf8|xterm relying on UTF-8 line-graphics,
1044         U8#1, use=xterm,
1045 .fi
1046 .ft
1047 .RE
1048 .PP
1049 The name \*(``U8\*('' is chosen to be two characters,
1050 to permit it to be used by applications that use ncurses'
1051 termcap interface.
1052 .SS NCURSES_TRACE
1053 During initialization, the \fBncurses\fP debugging library
1054 checks the NCURSES_TRACE environment variable.
1055 If it is defined, to a numeric value, \fBncurses\fP calls the \fBtrace\fP
1056 function, using that value as the argument.
1057 .PP
1058 The argument values, which are defined in \fBcurses.h\fP, provide several
1059 types of information.
1060 When running with traces enabled, your application will write the
1061 file \fBtrace\fP to the current directory.
1062 .PP
1063 See \fBcurs_trace\fP(3X) for more information.
1064 .SS TERM
1065 Denotes your terminal type.
1066 Each terminal type is distinct, though many are similar.
1067 .PP
1068 \fBTERM\fP is commonly set by terminal emulators to help
1069 applications find a workable terminal description.
1070 Some of those choose a popular approximation, e.g.,
1071 \*(``ansi\*('', \*(``vt100\*('', \*(``xterm\*('' rather than an exact fit.
1072 Not infrequently, your application will have problems with that approach,
1073 e.g., incorrect function-key definitions.
1074 .PP
1075 If you set \fBTERM\fP in your environment,
1076 it has no effect on the operation of the terminal emulator.
1077 It only affects the way applications work within the terminal.
1078 Likewise, as a general rule (\fBxterm\fP(1) being a rare exception),
1079 terminal emulators which allow you to
1080 specify \fBTERM\fP as a parameter or configuration value do
1081 not change their behavior to match that setting.
1082 .SS TERMCAP
1083 If the \fBncurses\fP library has been configured with \fItermcap\fP
1084 support, \fBncurses\fP will check for a terminal's description in
1085 termcap form if it is not available in the terminfo database.
1086 .PP
1087 The \fBTERMCAP\fP environment variable contains
1088 either a terminal description (with newlines stripped out),
1089 or a file name telling where the information denoted by
1090 the \fBTERM\fP environment variable exists.
1091 In either case, setting it directs \fBncurses\fP to ignore
1092 the usual place for this information, e.g., /etc/termcap.
1093 .SS TERMINFO
1094 \fBncurses\fP can be configured to read from multiple terminal databases.
1095 The \fBTERMINFO\fP variable overrides the location for
1096 the default terminal database.
1097 Terminal descriptions (in terminal format) are stored in terminal databases:
1098 .bP
1099 Normally these are stored in a directory tree,
1100 using subdirectories named by the first letter of the terminal names therein.
1101 .IP
1102 This is the scheme used in System V, which legacy Unix systems use,
1103 and the \fBTERMINFO\fP variable is used by \fIcurses\fP applications on those
1104 systems to override the default location of the terminal database.
1105 .bP
1106 If \fBncurses\fP is built to use hashed databases,
1107 then each entry in this list may be the path of a hashed database file, e.g.,
1108 .NS
1109 /usr/share/terminfo.db
1110 .NE
1111 .IP
1112 rather than
1113 .NS
1114 /usr/share/terminfo/
1115 .NE
1116 .IP
1117 The hashed database uses less disk-space and is a little faster than the
1118 directory tree.
1119 However,
1120 some applications assume the existence of the directory tree,
1121 reading it directly
1122 rather than using the terminfo library calls.
1123 .bP
1124 If \fBncurses\fP is built with a support for reading termcap files
1125 directly, then an entry in this list may be the path of a termcap file.
1126 .bP
1127 If the \fBTERMINFO\fP variable begins with
1128 \*(``hex:\*('' or \*(``b64:\*('',
1129 \fBncurses\fP uses the remainder of that variable as a compiled terminal
1130 description.
1131 You might produce the base64 format using \fBinfocmp\fP(1M):
1132 .NS
1133 TERMINFO="$(infocmp -0 -Q2 -q)"
1134 export TERMINFO
1135 .NE
1136 .IP
1137 The compiled description is used if it corresponds to the terminal identified
1138 by the \fBTERM\fP variable.
1139 .PP
1140 Setting \fBTERMINFO\fP is the simplest,
1141 but not the only way to set location of the default terminal database.
1142 The complete list of database locations in order follows:
1143 .RS 3
1144 .bP
1145 the last terminal database to which \fBncurses\fP wrote,
1146 if any, is searched first
1147 .bP
1148 the location specified by the TERMINFO environment variable
1149 .bP
1150 $HOME/.terminfo
1151 .bP
1152 locations listed in the TERMINFO_DIRS environment variable
1153 .bP
1154 one or more locations whose names are configured and compiled into the
1155 ncurses library, i.e.,
1156 .RS 3
1157 .bP
1158 @TERMINFO_DIRS@ (corresponding to the TERMINFO_DIRS variable)
1159 .bP
1160 @TERMINFO@ (corresponding to the TERMINFO variable)
1161 .RE
1162 .RE
1163 .SS TERMINFO_DIRS
1164 Specifies a list of locations to search for terminal descriptions.
1165 Each location in the list is a terminal database as described in
1166 the section on the \fBTERMINFO\fP variable.
1167 The list is separated by colons (i.e., ":") on Unix, semicolons on OS/2 EMX.
1168 .PP
1169 There is no corresponding feature in System V terminfo;
1170 it is an extension developed for \fBncurses\fP.
1171 .SS TERMPATH
1172 If \fBTERMCAP\fP does not hold a file name then \fBncurses\fP checks
1173 the \fBTERMPATH\fP environment variable.
1174 This is a list of filenames separated by spaces or colons (i.e., ":") on Unix,
1175 semicolons on OS/2 EMX.
1176 .PP
1177 If the \fBTERMPATH\fP environment variable is not set,
1178 \fBncurses\fP looks in the files
1179 .NS
1180 /etc/termcap, /usr/share/misc/termcap and $HOME/.termcap,
1181 .NE
1182 .PP
1183 in that order.
1184 .PP
1185 The library may be configured to disregard the following variables when the
1186 current user is the superuser (root), or if the application uses setuid or
1187 setgid permissions:
1188 .NS
1189 $TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.
1190 .NE
1191 .SH ALTERNATE CONFIGURATIONS
1192 Several different configurations are possible,
1193 depending on the configure script options used when building \fBncurses\fP.
1194 There are a few main options whose effects are visible to the applications
1195 developer using \fBncurses\fP:
1196 .TP 5
1197 \-\-disable\-overwrite
1198 The standard include for \fBncurses\fP is as noted in \fBSYNOPSIS\fP:
1199 .NS
1200 \fB#include <curses.h>\fP
1201 .NE
1202 .IP
1203 This option is used to avoid filename conflicts when \fBncurses\fP
1204 is not the main implementation of curses of the computer.
1205 If \fBncurses\fP is installed disabling overwrite, it puts its headers in
1206 a subdirectory, e.g.,
1207 .NS
1208 \fB#include <ncurses/curses.h>\fP
1209 .NE
1210 .IP
1211 It also omits a symbolic link which would allow you to use \fB\-lcurses\fP
1212 to build executables.
1213 .TP 5
1214 \-\-enable\-widec
1215 The configure script renames the library and
1216 (if the \fB\-\-disable\-overwrite\fP option is used)
1217 puts the header files in a different subdirectory.
1218 All of the library names have a \*(``w\*('' appended to them,
1219 i.e., instead of
1220 .NS
1221 \fB\-lncurses\fP
1222 .NE
1223 .IP
1224 you link with
1225 .NS
1226 \fB\-lncursesw\fP
1227 .NE
1228 .IP
1229 You must also enable the wide-character features in the header file
1230 when compiling for the wide-character library
1231 to use the extended (wide-character) functions.
1232 The symbol which enables these features has changed since XSI Curses, Issue 4:
1233 .RS
1234 .bP
1235 Originally, the wide-character feature required the symbol
1236 \fB_XOPEN_SOURCE_EXTENDED\fP
1237 but that was only valid for XPG4 (1996).
1238 .bP
1239 Later, that was deemed conflicting with \fB_XOPEN_SOURCE\fP defined to 500.
1240 .bP
1241 As of mid-2018,
1242 none of the features in this implementation require a \fB_XOPEN_SOURCE\fP
1243 feature greater than 600.
1244 However, X/Open Curses, Issue 7 (2009) recommends defining it to 700.
1245 .bP
1246 Alternatively, you can enable the feature by defining \fBNCURSES_WIDECHAR\fP
1247 with the caveat that some other header file than \fBcurses.h\fP
1248 may require a specific value for \fB_XOPEN_SOURCE\fP
1249 (or a system-specific symbol).
1250 .RE
1251 .IP
1252 The \fBcurses.h\fP file which is installed for the wide-character
1253 library is designed to be compatible with the normal library's header.
1254 Only the size of the \fBWINDOW\fP structure differs, and very few
1255 applications require more than a pointer to \fBWINDOW\fPs.
1256 .IP
1257 If the headers are installed allowing overwrite,
1258 the wide-character library's headers should be installed last,
1259 to allow applications to be built using either library
1260 from the same set of headers.
1261 .TP 5
1262 \-\-with\-pthread
1263 The configure script renames the library.
1264 All of the library names have a \*(``t\*('' appended to them
1265 (before any \*(``w\*('' added by \fB\-\-enable\-widec\fP).
1266 .IP
1267 The global variables such as \fBLINES\fP are replaced by macros to
1268 allow read-only access.
1269 At the same time, setter-functions are provided to set these values.
1270 Some applications (very few) may require changes to work with this convention.
1271 .TP 5
1272 \-\-with\-shared
1273 .TP
1274 \-\-with\-normal
1275 .TP
1276 \-\-with\-debug
1277 .TP
1278 \-\-with\-profile
1279 The shared and normal (static) library names differ by their suffixes,
1280 e.g., \fBlibncurses.so\fP and \fBlibncurses.a\fP.
1281 The debug and profiling libraries add a \*(``_g\*(''
1282 and a \*(``_p\*('' to the root names respectively,
1283 e.g., \fBlibncurses_g.a\fP and \fBlibncurses_p.a\fP.
1284 .TP 5
1285 \-\-with\-termlib
1286 Low-level functions which do not depend upon whether the library
1287 supports wide-characters, are provided in the tinfo library.
1288 .IP
1289 By doing this, it is possible to share the tinfo library between
1290 wide/normal configurations as well as reduce the size of the library
1291 when only low-level functions are needed.
1292 .IP
1293 Those functions are described in these pages:
1294 .RS
1295 .bP
1296 \fBcurs_extend\fP(3X) \- miscellaneous curses extensions
1297 .bP
1298 \fBcurs_inopts\fP(3X) \- \fBcurses\fP input options
1299 .bP
1300 \fBcurs_kernel\fP(3X) \- low-level \fBcurses\fP routines
1301 .bP
1302 \fBcurs_termattrs\fP(3X) \- \fBcurses\fP environment query routines
1303 .bP
1304 \fBcurs_termcap\fP(3X) \- \fBcurses\fP emulation of termcap
1305 .bP
1306 \fBcurs_terminfo\fP(3X) \- \fBcurses\fP interfaces to terminfo database
1307 .bP
1308 \fBcurs_util\fP(3X) \- miscellaneous \fBcurses\fP utility routines
1309 .RE
1310 .TP 5
1311 \-\-with\-trace
1312 The \fBtrace\fP function normally resides in the debug library,
1313 but it is sometimes useful to configure this in the shared library.
1314 Configure scripts should check for the function's existence rather
1315 than assuming it is always in the debug library.
1316 .SH FILES
1317 .TP 5
1318 @DATADIR@/tabset
1319 directory containing initialization files for the terminal capability database
1320 @TERMINFO@
1321 terminal capability database
1322 .SH SEE ALSO
1323 \fBterminfo\fP(\*n) and related pages whose names begin
1324 \*(``curs_\*('' for detailed routine descriptions.
1325 .br
1326 \fBcurs_variables\fP(3X)
1327 .br
1328 \fBuser_caps\fP(5) for user-defined capabilities
1329 .SH EXTENSIONS
1330 The \fBncurses\fP library can be compiled with an option (\fB\-DUSE_GETCAP\fP)
1331 that falls back to the old-style /etc/termcap file if the terminal setup code
1332 cannot find a terminfo entry corresponding to \fBTERM\fP.
1333 Use of this feature
1334 is not recommended, as it essentially includes an entire termcap compiler in
1335 the \fBncurses\fP startup code, at significant cost in core and startup cycles.
1336 .PP
1337 The \fBncurses\fP library includes facilities for capturing mouse events on
1338 certain terminals (including xterm).
1339 See the \fBcurs_mouse\fP(3X)
1340 manual page for details.
1341 .PP
1342 The \fBncurses\fP library includes facilities for responding to window
1343 resizing events, e.g., when running in an xterm.
1344 See the \fBresizeterm\fP(3X)
1345 and \fBwresize\fP(3X) manual pages for details.
1346 In addition, the library may be configured with a \fBSIGWINCH\fP handler.
1347 .PP
1348 The \fBncurses\fP library extends the fixed set of function key capabilities
1349 of terminals by allowing the application designer to define additional
1350 key sequences at runtime.
1351 See the \fBdefine_key\fP(3X)
1352 \fBkey_defined\fP(3X),
1353 and \fBkeyok\fP(3X) manual pages for details.
1354 .PP
1355 The \fBncurses\fP library can exploit the capabilities of terminals which
1356 implement the ISO\-6429 SGR 39 and SGR 49 controls, which allow an application
1357 to reset the terminal to its original foreground and background colors.
1358 From the users' perspective, the application is able to draw colored
1359 text on a background whose color is set independently, providing better
1360 control over color contrasts.
1361 See the \fBdefault_colors\fP(3X) manual page for details.
1362 .PP
1363 The \fBncurses\fP library includes a function for directing application output
1364 to a printer attached to the terminal device.
1365 See the \fBcurs_print\fP(3X) manual page for details.
1366 .SH PORTABILITY
1367 The \fBncurses\fP library is intended to be BASE-level conformant with XSI
1368 Curses.
1369 The EXTENDED XSI Curses functionality
1370 (including color support) is supported.
1371 .PP
1372 A small number of local differences (that is, individual differences between
1373 the XSI Curses and \fBncurses\fP calls) are described in \fBPORTABILITY\fP
1374 sections of the library man pages.
1375 .SS Error checking
1376 In many cases, X/Open Curses is vague about error conditions,
1377 omitting some of the SVr4 documentation.
1378 .PP
1379 Unlike other implementations, this one checks parameters such as pointers
1380 to WINDOW structures to ensure they are not null.
1381 The main reason for providing this behavior is to guard against programmer
1382 error.
1383 The standard interface does not provide a way for the library
1384 to tell an application which of several possible errors were detected.
1385 Relying on this (or some other) extension will adversely affect the
1386 portability of curses applications.
1387 .SS Extensions versus portability
1388 Most of the extensions provided by ncurses have not been standardized.
1389 Some have been incorporated into other implementations, such as
1390 PDCurses or NetBSD curses.
1391 Here are a few to consider:
1392 .bP
1393 The routine \fBhas_key\fP is not part of XPG4, nor is it present in SVr4.
1394 See the \fBcurs_getch\fP(3X) manual page for details.
1395 .bP
1396 The routine \fBslk_attr\fP is not part of XPG4, nor is it present in SVr4.
1397 See the \fBcurs_slk\fP(3X) manual page for details.
1398 .bP
1399 The routines \fBgetmouse\fP, \fBmousemask\fP, \fBungetmouse\fP,
1400 \fBmouseinterval\fP, and \fBwenclose\fP relating to mouse interfacing are not
1401 part of XPG4, nor are they present in SVr4.
1402 See the \fBcurs_mouse\fP(3X) manual page for details.
1403 .bP
1404 The routine \fBmcprint\fP was not present in any previous curses implementation.
1405 See the \fBcurs_print\fP(3X) manual page for details.
1406 .bP
1407 The routine \fBwresize\fP is not part of XPG4, nor is it present in SVr4.
1408 See the \fBwresize\fP(3X) manual page for details.
1409 .bP
1410 The WINDOW structure's internal details can be hidden from application
1411 programs.
1412 See \fBcurs_opaque\fP(3X) for the discussion of \fBis_scrollok\fP, etc.
1413 .bP
1414 This implementation can be configured to provide rudimentary support
1415 for multi-threaded applications.
1416 See \fBcurs_threads\fP(3X) for details.
1417 .bP
1418 This implementation can also be configured to provide a set of functions which
1419 improve the ability to manage multiple screens.
1420 See \fBcurs_sp_funcs\fP(3X) for details.
1421 .SS Padding differences
1422 In historic curses versions, delays embedded in the capabilities \fBcr\fP,
1423 \fBind\fP, \fBcub1\fP, \fBff\fP and \fBtab\fP activated corresponding delay
1424 bits in the UNIX tty driver.
1425 In this implementation, all padding is done by sending NUL bytes.
1426 This method is slightly more expensive, but narrows the interface
1427 to the UNIX kernel significantly and increases the package's portability
1428 correspondingly.
1429 .SS Header files
1430 The header file \fB<curses.h>\fP automatically includes the header files
1431 \fB<stdio.h>\fP and \fB<unctrl.h>\fP.
1432 .PP
1433 X/Open Curses has more to say,
1434 but does not finish the story:
1435 .RS 4
1436 .PP
1437 The inclusion of <curses.h> may make visible all symbols
1438 from the headers <stdio.h>, <term.h>, <termios.h>, and <wchar.h>.
1439 .RE
1440 .PP
1441 Here is a more complete story:
1442 .bP
1443 Starting with BSD curses, all implementations have included <stdio.h>.
1444 .IP
1445 BSD curses included <curses.h> and <unctrl.h> from an internal header
1446 "curses.ext" ("ext" was a short name for \fIexterns\fP).
1447 .IP
1448 BSD curses used <stdio.h> internally (for \fBprintw\fP and \fBscanw\fP),
1449 but nothing in <curses.h> itself relied upon <stdio.h>.
1450 .bP
1451 SVr2 curses added \fBnewterm\fP(3X), which relies upon <stdio.h>.
1452 That is, the function prototype uses \fBFILE\fP.
1453 .IP
1454 SVr4 curses added \fBputwin\fP and \fBgetwin\fP, which also use <stdio.h>.
1455 .IP
1456 X/Open Curses documents all three of these functions.
1457 .IP
1458 SVr4 curses and X/Open Curses do not require the developer to
1459 include <stdio.h> before including <curses.h>.
1460 Both document curses showing <curses.h> as the only required header.
1461 .IP
1462 As a result, standard <curses.h> will always include <stdio.h>.
1463 .bP
1464 X/Open Curses is inconsistent with respect to SVr4 regarding <unctrl.h>.
1465 .IP
1466 As noted in \fBcurs_util\fP(3X), ncurses includes <unctrl.h> from
1467 <curses.h> (like SVr4).
1468 .bP
1469 X/Open's comments about <term.h> and <termios.h> may refer to HP-UX and AIX:
1470 .IP
1471 HP-UX curses includes <term.h> from <curses.h>
1472 to declare \fBsetupterm\fP in curses.h,
1473 but ncurses (and Solaris curses) do not.
1474 .IP
1475 AIX curses includes <term.h> and <termios.h>.
1476 Again, ncurses (and Solaris curses) do not.
1477 .bP
1478 X/Open says that <curses.h> \fImay\fP include <term.h>,
1479 but there is no requirement that it do that.
1480 .IP
1481 Some programs use functions declared in both <curses.h> and <term.h>,
1482 and must include both headers in the same module.
1483 Very old versions of AIX curses required including <curses.h>
1484 before including <term.h>.
1485 .IP
1486 Because ncurses header files include the headers needed to
1487 define datatypes used in the headers,
1488 ncurses header files can be included in any order.
1489 But for portability, you should include <curses.h> before <term.h>.
1490 .bP
1491 X/Open Curses says \fI"may make visible"\fP
1492 because including a header file does not necessarily make all symbols
1493 in it visible (there are ifdef's to consider).
1494 .IP
1495 For instance, in ncurses <wchar.h> \fImay\fP be included if
1496 the proper symbol is defined, and if ncurses is configured for
1497 wide-character support.
1498 If the header is included, its symbols may be made visible.
1499 That depends on the value used for \fB_XOPEN_SOURCE\fP
1500 feature test macro.
1501 .bP
1502 X/Open Curses documents one required header,
1503 in a special case: <stdarg.h> before <curses.h> to prototype
1504 the \fBvw_printw\fP and \fBvw_scanw\fP functions
1505 (as well as the obsolete
1506 the \fBvwprintw\fP and \fBvwscanw\fP functions).
1507 Each of those uses a \fBva_list\fP parameter.
1508 .IP
1509 The two obsolete functions were introduced in SVr3.
1510 The other functions were introduced in X/Open Curses.
1511 In between, SVr4 curses provided for the possibility that
1512 an application might include either <varargs.h> or <stdarg.h>.
1513 Initially, that was done by using \fBvoid*\fP for the \fBva_list\fP
1514 parameter.
1515 Later, a special type (defined in <stdio.h>) was introduced,
1516 to allow for compiler type-checking.
1517 That special type is always available,
1518 because <stdio.h> is always included by <curses.h>.
1519 .IP
1520 None of the X/Open Curses implementations require an application
1521 to include <stdarg.h> before <curses.h> because they either
1522 have allowed for a special type, or (like ncurses) include <stdarg.h>
1523 directly to provide a portable interface.
1524 .SH NOTES
1525 If standard output from a \fBncurses\fP program is re-directed to something
1526 which is not a tty, screen updates will be directed to standard error.
1527 This was an undocumented feature of AT&T System V Release 3 curses.
1528 .SH AUTHORS
1529 Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
1530 Based on \fIpcurses\fP by Pavel Curtis.