]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/ncurses.3x
ncurses 6.4 - patch 20230812
[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.163 2023/08/12 17:14:08 tom Exp $
32 .hy 0
33 .TH ncurses 3X 2023-08-12 "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_cbreak/\fBcurs_inopts\fP(3X)*
462 is_cleared/\fBcurs_opaque\fP(3X)*
463 is_echo/\fBcurs_inopts\fP(3X)*
464 is_idcok/\fBcurs_opaque\fP(3X)*
465 is_idlok/\fBcurs_opaque\fP(3X)*
466 is_immedok/\fBcurs_opaque\fP(3X)*
467 is_keypad/\fBcurs_opaque\fP(3X)*
468 is_leaveok/\fBcurs_opaque\fP(3X)*
469 is_linetouched/\fBcurs_touch\fP(3X)
470 is_nl/\fBcurs_inopts\fP(3X)*
471 is_nodelay/\fBcurs_opaque\fP(3X)*
472 is_notimeout/\fBcurs_opaque\fP(3X)*
473 is_pad/\fBcurs_opaque\fP(3X)*
474 is_raw/\fBcurs_inopts\fP(3X)*
475 is_scrollok/\fBcurs_opaque\fP(3X)*
476 is_subwin/\fBcurs_opaque\fP(3X)*
477 is_syncok/\fBcurs_opaque\fP(3X)*
478 is_term_resized/\fBresizeterm\fP(3X)*
479 is_wintouched/\fBcurs_touch\fP(3X)
480 isendwin/\fBcurs_initscr\fP(3X)
481 key_defined/\fBkey_defined\fP(3X)*
482 key_name/\fBcurs_util\fP(3X)
483 keybound/\fBkeybound\fP(3X)*
484 keyname/\fBcurs_util\fP(3X)
485 keyok/\fBkeyok\fP(3X)*
486 keypad/\fBcurs_inopts\fP(3X)
487 killchar/\fBcurs_termattrs\fP(3X)
488 killwchar/\fBcurs_termattrs\fP(3X)
489 leaveok/\fBcurs_outopts\fP(3X)
490 longname/\fBcurs_termattrs\fP(3X)
491 mcprint/\fBcurs_print\fP(3X)*
492 meta/\fBcurs_inopts\fP(3X)
493 mouse_trafo/\fBcurs_mouse\fP(3X)*
494 mouseinterval/\fBcurs_mouse\fP(3X)*
495 mousemask/\fBcurs_mouse\fP(3X)*
496 move/\fBcurs_move\fP(3X)
497 mvadd_wch/\fBcurs_add_wch\fP(3X)
498 mvadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
499 mvadd_wchstr/\fBcurs_add_wchstr\fP(3X)
500 mvaddch/\fBcurs_addch\fP(3X)
501 mvaddchnstr/\fBcurs_addchstr\fP(3X)
502 mvaddchstr/\fBcurs_addchstr\fP(3X)
503 mvaddnstr/\fBcurs_addstr\fP(3X)
504 mvaddnwstr/\fBcurs_addwstr\fP(3X)
505 mvaddstr/\fBcurs_addstr\fP(3X)
506 mvaddwstr/\fBcurs_addwstr\fP(3X)
507 mvchgat/\fBcurs_attr\fP(3X)
508 mvcur/\fBcurs_terminfo\fP(3X)
509 mvdelch/\fBcurs_delch\fP(3X)
510 mvderwin/\fBcurs_window\fP(3X)
511 mvget_wch/\fBcurs_get_wch\fP(3X)
512 mvget_wstr/\fBcurs_get_wstr\fP(3X)
513 mvgetch/\fBcurs_getch\fP(3X)
514 mvgetn_wstr/\fBcurs_get_wstr\fP(3X)
515 mvgetnstr/\fBcurs_getstr\fP(3X)
516 mvgetstr/\fBcurs_getstr\fP(3X)
517 mvhline/\fBcurs_border\fP(3X)
518 mvhline_set/\fBcurs_border_set\fP(3X)
519 mvin_wch/\fBcurs_in_wch\fP(3X)
520 mvin_wchnstr/\fBcurs_in_wchstr\fP(3X)
521 mvin_wchstr/\fBcurs_in_wchstr\fP(3X)
522 mvinch/\fBcurs_inch\fP(3X)
523 mvinchnstr/\fBcurs_inchstr\fP(3X)
524 mvinchstr/\fBcurs_inchstr\fP(3X)
525 mvinnstr/\fBcurs_instr\fP(3X)
526 mvinnwstr/\fBcurs_inwstr\fP(3X)
527 mvins_nwstr/\fBcurs_ins_wstr\fP(3X)
528 mvins_wch/\fBcurs_ins_wch\fP(3X)
529 mvins_wstr/\fBcurs_ins_wstr\fP(3X)
530 mvinsch/\fBcurs_insch\fP(3X)
531 mvinsnstr/\fBcurs_insstr\fP(3X)
532 mvinsstr/\fBcurs_insstr\fP(3X)
533 mvinstr/\fBcurs_instr\fP(3X)
534 mvinwstr/\fBcurs_inwstr\fP(3X)
535 mvprintw/\fBcurs_printw\fP(3X)
536 mvscanw/\fBcurs_scanw\fP(3X)
537 mvvline/\fBcurs_border\fP(3X)
538 mvvline_set/\fBcurs_border_set\fP(3X)
539 mvwadd_wch/\fBcurs_add_wch\fP(3X)
540 mvwadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
541 mvwadd_wchstr/\fBcurs_add_wchstr\fP(3X)
542 mvwaddch/\fBcurs_addch\fP(3X)
543 mvwaddchnstr/\fBcurs_addchstr\fP(3X)
544 mvwaddchstr/\fBcurs_addchstr\fP(3X)
545 mvwaddnstr/\fBcurs_addstr\fP(3X)
546 mvwaddnwstr/\fBcurs_addwstr\fP(3X)
547 mvwaddstr/\fBcurs_addstr\fP(3X)
548 mvwaddwstr/\fBcurs_addwstr\fP(3X)
549 mvwchgat/\fBcurs_attr\fP(3X)
550 mvwdelch/\fBcurs_delch\fP(3X)
551 mvwget_wch/\fBcurs_get_wch\fP(3X)
552 mvwget_wstr/\fBcurs_get_wstr\fP(3X)
553 mvwgetch/\fBcurs_getch\fP(3X)
554 mvwgetn_wstr/\fBcurs_get_wstr\fP(3X)
555 mvwgetnstr/\fBcurs_getstr\fP(3X)
556 mvwgetstr/\fBcurs_getstr\fP(3X)
557 mvwhline/\fBcurs_border\fP(3X)
558 mvwhline_set/\fBcurs_border_set\fP(3X)
559 mvwin/\fBcurs_window\fP(3X)
560 mvwin_wch/\fBcurs_in_wch\fP(3X)
561 mvwin_wchnstr/\fBcurs_in_wchstr\fP(3X)
562 mvwin_wchstr/\fBcurs_in_wchstr\fP(3X)
563 mvwinch/\fBcurs_inch\fP(3X)
564 mvwinchnstr/\fBcurs_inchstr\fP(3X)
565 mvwinchstr/\fBcurs_inchstr\fP(3X)
566 mvwinnstr/\fBcurs_instr\fP(3X)
567 mvwinnwstr/\fBcurs_inwstr\fP(3X)
568 mvwins_nwstr/\fBcurs_ins_wstr\fP(3X)
569 mvwins_wch/\fBcurs_ins_wch\fP(3X)
570 mvwins_wstr/\fBcurs_ins_wstr\fP(3X)
571 mvwinsch/\fBcurs_insch\fP(3X)
572 mvwinsnstr/\fBcurs_insstr\fP(3X)
573 mvwinsstr/\fBcurs_insstr\fP(3X)
574 mvwinstr/\fBcurs_instr\fP(3X)
575 mvwinwstr/\fBcurs_inwstr\fP(3X)
576 mvwprintw/\fBcurs_printw\fP(3X)
577 mvwscanw/\fBcurs_scanw\fP(3X)
578 mvwvline/\fBcurs_border\fP(3X)
579 mvwvline_set/\fBcurs_border_set\fP(3X)
580 napms/\fBcurs_kernel\fP(3X)
581 newpad/\fBcurs_pad\fP(3X)
582 newterm/\fBcurs_initscr\fP(3X)
583 newwin/\fBcurs_window\fP(3X)
584 nl/\fBcurs_inopts\fP(3X)
585 nocbreak/\fBcurs_inopts\fP(3X)
586 nodelay/\fBcurs_inopts\fP(3X)
587 noecho/\fBcurs_inopts\fP(3X)
588 nofilter/\fBcurs_util\fP(3X)*
589 nonl/\fBcurs_inopts\fP(3X)
590 noqiflush/\fBcurs_inopts\fP(3X)
591 noraw/\fBcurs_inopts\fP(3X)
592 notimeout/\fBcurs_inopts\fP(3X)
593 overlay/\fBcurs_overlay\fP(3X)
594 overwrite/\fBcurs_overlay\fP(3X)
595 pair_content/\fBcurs_color\fP(3X)
596 pecho_wchar/\fBcurs_pad\fP(3X)*
597 pechochar/\fBcurs_pad\fP(3X)
598 pnoutrefresh/\fBcurs_pad\fP(3X)
599 prefresh/\fBcurs_pad\fP(3X)
600 printw/\fBcurs_printw\fP(3X)
601 putp/\fBcurs_terminfo\fP(3X)
602 putwin/\fBcurs_util\fP(3X)
603 qiflush/\fBcurs_inopts\fP(3X)
604 raw/\fBcurs_inopts\fP(3X)
605 redrawwin/\fBcurs_refresh\fP(3X)
606 refresh/\fBcurs_refresh\fP(3X)
607 reset_color_pairs/\fBcurs_color\fP(3X)*
608 reset_prog_mode/\fBcurs_kernel\fP(3X)
609 reset_shell_mode/\fBcurs_kernel\fP(3X)
610 resetty/\fBcurs_kernel\fP(3X)
611 resize_term/\fBresizeterm\fP(3X)*
612 resizeterm/\fBresizeterm\fP(3X)*
613 restartterm/\fBcurs_terminfo\fP(3X)
614 ripoffline/\fBcurs_kernel\fP(3X)
615 savetty/\fBcurs_kernel\fP(3X)
616 scanw/\fBcurs_scanw\fP(3X)
617 scr_dump/\fBcurs_scr_dump\fP(3X)
618 scr_init/\fBcurs_scr_dump\fP(3X)
619 scr_restore/\fBcurs_scr_dump\fP(3X)
620 scr_set/\fBcurs_scr_dump\fP(3X)
621 scrl/\fBcurs_scroll\fP(3X)
622 scroll/\fBcurs_scroll\fP(3X)
623 scrollok/\fBcurs_outopts\fP(3X)
624 set_curterm/\fBcurs_terminfo\fP(3X)
625 set_term/\fBcurs_initscr\fP(3X)
626 setcchar/\fBcurs_getcchar\fP(3X)
627 setscrreg/\fBcurs_outopts\fP(3X)
628 setsyx/\fBcurs_kernel\fP(3X)
629 setupterm/\fBcurs_terminfo\fP(3X)
630 slk_attr/\fBcurs_slk\fP(3X)*
631 slk_attr_off/\fBcurs_slk\fP(3X)
632 slk_attr_on/\fBcurs_slk\fP(3X)
633 slk_attr_set/\fBcurs_slk\fP(3X)
634 slk_attroff/\fBcurs_slk\fP(3X)
635 slk_attron/\fBcurs_slk\fP(3X)
636 slk_attrset/\fBcurs_slk\fP(3X)
637 slk_clear/\fBcurs_slk\fP(3X)
638 slk_color/\fBcurs_slk\fP(3X)
639 slk_init/\fBcurs_slk\fP(3X)
640 slk_label/\fBcurs_slk\fP(3X)
641 slk_noutrefresh/\fBcurs_slk\fP(3X)
642 slk_refresh/\fBcurs_slk\fP(3X)
643 slk_restore/\fBcurs_slk\fP(3X)
644 slk_set/\fBcurs_slk\fP(3X)
645 slk_touch/\fBcurs_slk\fP(3X)
646 slk_wset/\fBcurs_slk\fP(3X)*
647 standend/\fBcurs_attr\fP(3X)
648 standout/\fBcurs_attr\fP(3X)
649 start_color/\fBcurs_color\fP(3X)
650 subpad/\fBcurs_pad\fP(3X)
651 subwin/\fBcurs_window\fP(3X)
652 syncok/\fBcurs_window\fP(3X)
653 term_attrs/\fBcurs_termattrs\fP(3X)
654 termattrs/\fBcurs_termattrs\fP(3X)
655 termname/\fBcurs_termattrs\fP(3X)
656 tgetent/\fBcurs_termcap\fP(3X)
657 tgetflag/\fBcurs_termcap\fP(3X)
658 tgetnum/\fBcurs_termcap\fP(3X)
659 tgetstr/\fBcurs_termcap\fP(3X)
660 tgoto/\fBcurs_termcap\fP(3X)
661 tigetflag/\fBcurs_terminfo\fP(3X)
662 tigetnum/\fBcurs_terminfo\fP(3X)
663 tigetstr/\fBcurs_terminfo\fP(3X)
664 timeout/\fBcurs_inopts\fP(3X)
665 tiparm/\fBcurs_terminfo\fP(3X)*
666 tiparm_s/\fBcurs_terminfo\fP(3X)*
667 tiscan_s/\fBcurs_terminfo\fP(3X)*
668 touchline/\fBcurs_touch\fP(3X)
669 touchwin/\fBcurs_touch\fP(3X)
670 tparm/\fBcurs_terminfo\fP(3X)
671 tputs/\fBcurs_termcap\fP(3X)
672 tputs/\fBcurs_terminfo\fP(3X)
673 trace/\fBcurs_trace\fP(3X)*
674 typeahead/\fBcurs_inopts\fP(3X)
675 unctrl/\fBcurs_util\fP(3X)
676 unget_wch/\fBcurs_get_wch\fP(3X)
677 ungetch/\fBcurs_getch\fP(3X)
678 ungetmouse/\fBcurs_mouse\fP(3X)*
679 untouchwin/\fBcurs_touch\fP(3X)
680 use_default_colors/\fBdefault_colors\fP(3X)*
681 use_env/\fBcurs_util\fP(3X)
682 use_extended_names/\fBcurs_extend\fP(3X)*
683 use_legacy_coding/\fBlegacy_coding\fP(3X)*
684 use_tioctl/\fBcurs_util\fP(3X)*
685 vid_attr/\fBcurs_terminfo\fP(3X)
686 vid_puts/\fBcurs_terminfo\fP(3X)
687 vidattr/\fBcurs_terminfo\fP(3X)
688 vidputs/\fBcurs_terminfo\fP(3X)
689 vline/\fBcurs_border\fP(3X)
690 vline_set/\fBcurs_border_set\fP(3X)
691 vw_printw/\fBcurs_printw\fP(3X)
692 vw_scanw/\fBcurs_scanw\fP(3X)
693 vwprintw/\fBcurs_printw\fP(3X)
694 vwscanw/\fBcurs_scanw\fP(3X)
695 wadd_wch/\fBcurs_add_wch\fP(3X)
696 wadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
697 wadd_wchstr/\fBcurs_add_wchstr\fP(3X)
698 waddch/\fBcurs_addch\fP(3X)
699 waddchnstr/\fBcurs_addchstr\fP(3X)
700 waddchstr/\fBcurs_addchstr\fP(3X)
701 waddnstr/\fBcurs_addstr\fP(3X)
702 waddnwstr/\fBcurs_addwstr\fP(3X)
703 waddstr/\fBcurs_addstr\fP(3X)
704 waddwstr/\fBcurs_addwstr\fP(3X)
705 wattr_get/\fBcurs_attr\fP(3X)
706 wattr_off/\fBcurs_attr\fP(3X)
707 wattr_on/\fBcurs_attr\fP(3X)
708 wattr_set/\fBcurs_attr\fP(3X)
709 wattroff/\fBcurs_attr\fP(3X)
710 wattron/\fBcurs_attr\fP(3X)
711 wattrset/\fBcurs_attr\fP(3X)
712 wbkgd/\fBcurs_bkgd\fP(3X)
713 wbkgdset/\fBcurs_bkgd\fP(3X)
714 wbkgrnd/\fBcurs_bkgrnd\fP(3X)
715 wbkgrndset/\fBcurs_bkgrnd\fP(3X)
716 wborder/\fBcurs_border\fP(3X)
717 wborder_set/\fBcurs_border_set\fP(3X)
718 wchgat/\fBcurs_attr\fP(3X)
719 wclear/\fBcurs_clear\fP(3X)
720 wclrtobot/\fBcurs_clear\fP(3X)
721 wclrtoeol/\fBcurs_clear\fP(3X)
722 wcolor_set/\fBcurs_attr\fP(3X)
723 wcursyncup/\fBcurs_window\fP(3X)
724 wdelch/\fBcurs_delch\fP(3X)
725 wdeleteln/\fBcurs_deleteln\fP(3X)
726 wecho_wchar/\fBcurs_add_wch\fP(3X)
727 wechochar/\fBcurs_addch\fP(3X)
728 wenclose/\fBcurs_mouse\fP(3X)*
729 werase/\fBcurs_clear\fP(3X)
730 wget_wch/\fBcurs_get_wch\fP(3X)
731 wget_wstr/\fBcurs_get_wstr\fP(3X)
732 wgetbkgrnd/\fBcurs_bkgrnd\fP(3X)
733 wgetch/\fBcurs_getch\fP(3X)
734 wgetdelay/\fBcurs_opaque\fP(3X)*
735 wgetn_wstr/\fBcurs_get_wstr\fP(3X)
736 wgetnstr/\fBcurs_getstr\fP(3X)
737 wgetparent/\fBcurs_opaque\fP(3X)*
738 wgetscrreg/\fBcurs_opaque\fP(3X)*
739 wgetstr/\fBcurs_getstr\fP(3X)
740 whline/\fBcurs_border\fP(3X)
741 whline_set/\fBcurs_border_set\fP(3X)
742 win_wch/\fBcurs_in_wch\fP(3X)
743 win_wchnstr/\fBcurs_in_wchstr\fP(3X)
744 win_wchstr/\fBcurs_in_wchstr\fP(3X)
745 winch/\fBcurs_inch\fP(3X)
746 winchnstr/\fBcurs_inchstr\fP(3X)
747 winchstr/\fBcurs_inchstr\fP(3X)
748 winnstr/\fBcurs_instr\fP(3X)
749 winnwstr/\fBcurs_inwstr\fP(3X)
750 wins_nwstr/\fBcurs_ins_wstr\fP(3X)
751 wins_wch/\fBcurs_ins_wch\fP(3X)
752 wins_wstr/\fBcurs_ins_wstr\fP(3X)
753 winsch/\fBcurs_insch\fP(3X)
754 winsdelln/\fBcurs_deleteln\fP(3X)
755 winsertln/\fBcurs_deleteln\fP(3X)
756 winsnstr/\fBcurs_insstr\fP(3X)
757 winsstr/\fBcurs_insstr\fP(3X)
758 winstr/\fBcurs_instr\fP(3X)
759 winwstr/\fBcurs_inwstr\fP(3X)
760 wmouse_trafo/\fBcurs_mouse\fP(3X)*
761 wmove/\fBcurs_move\fP(3X)
762 wnoutrefresh/\fBcurs_refresh\fP(3X)
763 wprintw/\fBcurs_printw\fP(3X)
764 wredrawln/\fBcurs_refresh\fP(3X)
765 wrefresh/\fBcurs_refresh\fP(3X)
766 wresize/\fBwresize\fP(3X)*
767 wscanw/\fBcurs_scanw\fP(3X)
768 wscrl/\fBcurs_scroll\fP(3X)
769 wsetscrreg/\fBcurs_outopts\fP(3X)
770 wstandend/\fBcurs_attr\fP(3X)
771 wstandout/\fBcurs_attr\fP(3X)
772 wsyncdown/\fBcurs_window\fP(3X)
773 wsyncup/\fBcurs_window\fP(3X)
774 wtimeout/\fBcurs_inopts\fP(3X)
775 wtouchln/\fBcurs_touch\fP(3X)
776 wunctrl/\fBcurs_util\fP(3X)
777 wvline/\fBcurs_border\fP(3X)
778 wvline_set/\fBcurs_border_set\fP(3X)
779 .TE
780 .PP
781 Depending on the configuration,
782 additional sets of functions may be available:
783 .RS 3
784 .TP 5
785 \fBcurs_memleaks\fP(3X) - curses memory-leak checking
786 .TP 5
787 \fBcurs_sp_funcs\fP(3X) - curses screen-pointer extension
788 .TP 5
789 \fBcurs_threads\fP(3X) - curses thread support
790 .TP 5
791 \fBcurs_trace\fP(3X) - curses debugging routines
792 .RE
793 .SH RETURN VALUE
794 Routines that return an integer return \fBERR\fP upon failure and an
795 integer value other than \fBERR\fP upon successful completion, unless
796 otherwise noted in the routine descriptions.
797 .PP
798 As a general rule, routines check for null pointers passed as parameters,
799 and handle this as an error.
800 .PP
801 All macros return the value of the \fBw\fP version, except \fBsetscrreg\fP,
802 \fBwsetscrreg\fP, \fBgetyx\fP, \fBgetbegyx\fP, and \fBgetmaxyx\fP.
803 The return values of
804 \fBsetscrreg\fP,
805 \fBwsetscrreg\fP,
806 \fBgetyx\fP,
807 \fBgetbegyx\fP, and
808 \fBgetmaxyx\fP are undefined (i.e., these should not be used as the
809 right-hand side of assignment statements).
810 .PP
811 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
812 \fBwmove\fP, and return an error if the position is outside the window,
813 or if the window pointer is null.
814 Most \*(``mv\*(''-prefixed functions
815 (except variadic functions such as \fBmvprintw\fP)
816 are provided both as macros and functions.
817 .PP
818 Routines that return pointers return \fBNULL\fP on error.
819 .SH ENVIRONMENT
820 The following environment symbols are useful for customizing the
821 runtime behavior of the \fBncurses\fP library.
822 The most important ones have been already discussed in detail.
823 .SS CC command-character
824 When set, change occurrences of the command_character
825 (i.e., the \fBcmdch\fP capability)
826 of the loaded terminfo entries to the value of this variable.
827 Very few terminfo entries provide this feature.
828 .PP
829 Because this name is also used in development environments to represent
830 the C compiler's name, \fBncurses\fP ignores it if it does not happen to
831 be a single character.
832 .SS BAUDRATE
833 The debugging library checks this environment variable when the application
834 has redirected output to a file.
835 The variable's numeric value is used for the baudrate.
836 If no value is found, \fBncurses\fP uses 9600.
837 This allows testers to construct repeatable test-cases
838 that take into account costs that depend on baudrate.
839 .SS COLUMNS
840 Specify the width of the screen in characters.
841 Applications running in a windowing environment usually are able to
842 obtain the width of the window in which they are executing.
843 If neither the \fBCOLUMNS\fP value nor the terminal's screen size is available,
844 \fBncurses\fP uses the size which may be specified in the terminfo database
845 (i.e., the \fBcols\fP capability).
846 .PP
847 It is important that your application use a correct size for the screen.
848 This is not always possible because your application may be
849 running on a host which does not honor NAWS (Negotiations About Window
850 Size), or because you are temporarily running as another user.
851 However, setting \fBCOLUMNS\fP and/or \fBLINES\fP overrides the library's
852 use of the screen size obtained from the operating system.
853 .PP
854 Either \fBCOLUMNS\fP or \fBLINES\fP symbols may be specified independently.
855 This is mainly useful to circumvent legacy misfeatures of terminal descriptions,
856 e.g., xterm which commonly specifies a 65 line screen.
857 For best results, \fBlines\fP and \fBcols\fP should not be specified in
858 a terminal description for terminals which are run as emulations.
859 .PP
860 Use the \fBuse_env\fP function to disable all use of external environment
861 (but not including system calls) to determine the screen size.
862 Use the \fBuse_tioctl\fP function to update \fBCOLUMNS\fP or \fBLINES\fP
863 to match the screen size obtained from system calls or the terminal database.
864 .SS ESCDELAY
865 Specifies the total time, in milliseconds, for which ncurses will
866 await a character sequence, e.g., a function key.
867 The default value, 1000 milliseconds, is enough for most uses.
868 However, it is made a variable to accommodate unusual applications.
869 .PP
870 The most common instance where you may wish to change this value
871 is to work with slow hosts, e.g., running on a network.
872 If the host cannot read characters rapidly enough, it will have the same
873 effect as if the terminal did not send characters rapidly enough.
874 The library will still see a timeout.
875 .PP
876 Note that xterm mouse events are built up from character sequences
877 received from the xterm.
878 If your application makes heavy use of multiple-clicking, you may
879 wish to lengthen this default value because the timeout applies
880 to the composed multi-click event as well as the individual clicks.
881 .PP
882 In addition to the environment variable,
883 this implementation provides a global variable with the same name.
884 Portable applications should not rely upon the presence of ESCDELAY
885 in either form,
886 but setting the environment variable rather than the global variable
887 does not create problems when compiling an application.
888 .SS HOME
889 Tells \fBncurses\fP where your home directory is.
890 That is where it may read and write auxiliary terminal descriptions:
891 .NS
892 $HOME/.termcap
893 $HOME/.terminfo
894 .NE
895 .SS LINES
896 Like COLUMNS, specify the height of the screen in characters.
897 See COLUMNS for a detailed description.
898 .SS MOUSE_BUTTONS_123
899 This applies only to the OS/2 EMX port.
900 It specifies the order of buttons on the mouse.
901 OS/2 numbers a 3-button mouse inconsistently from other
902 platforms:
903 .NS
904 1 = left
905 .br
906 2 = right
907 .br
908 3 = middle.
909 .NE
910 .PP
911 This variable lets you customize the mouse.
912 The variable must be three numeric digits 1\-3 in any order, e.g., 123 or 321.
913 If it is not specified, \fBncurses\fP uses 132.
914 .SS NCURSES_ASSUMED_COLORS
915 Override the compiled-in assumption that the
916 terminal's default colors are white-on-black
917 (see \fBdefault_colors\fP(3X)).
918 You may set the foreground and background color values with this environment
919 variable by proving a 2-element list: foreground,background.
920 For example, to tell ncurses to not assume anything
921 about the colors, set this to "\-1,\-1".
922 To make it green-on-black, set it to "2,0".
923 Any positive value from zero to the terminfo \fBmax_colors\fP value is allowed.
924 .SS NCURSES_CONSOLE2
925 This applies only to the MinGW port of ncurses.
926 .PP
927 The \fBConsole2\fP program's handling of the Microsoft Console API call
928 \fBCreateConsoleScreenBuffer\fP is defective.
929 Applications which use this will hang.
930 However, it is possible to simulate the action of this call by
931 mapping coordinates,
932 explicitly saving and restoring the original screen contents.
933 Setting the environment variable \fBNCGDB\fP has the same effect.
934 .SS NCURSES_GPM_TERMS
935 This applies only to ncurses configured to use the GPM interface.
936 .PP
937 If present,
938 the environment variable is a list of one or more terminal names
939 against which the \fBTERM\fP environment variable is matched.
940 Setting it to an empty value disables the GPM interface;
941 using the built-in support for xterm, etc.
942 .PP
943 If the environment variable is absent,
944 ncurses will attempt to open GPM if \fBTERM\fP contains \*(``linux\*(''.
945 .SS NCURSES_NO_HARD_TABS
946 \fBNcurses\fP may use tabs as part of the cursor movement optimization.
947 In some cases,
948 your terminal driver may not handle these properly.
949 Set this environment variable to disable the feature.
950 You can also adjust your \fBstty\fP(1) settings to avoid the problem.
951 .SS NCURSES_NO_MAGIC_COOKIE
952 Some terminals use a magic-cookie feature which requires special handling
953 to make highlighting and other video attributes display properly.
954 You can suppress the highlighting entirely for these terminals by
955 setting this environment variable.
956 .SS NCURSES_NO_PADDING
957 Most of the terminal descriptions in the terminfo database are written
958 for real \*(``hardware\*('' terminals.
959 Many people use terminal emulators
960 which run in a windowing environment and use curses-based applications.
961 Terminal emulators can duplicate
962 all of the important aspects of a hardware terminal, but they do not
963 have the same limitations.
964 The chief limitation of a hardware terminal from the standpoint
965 of your application is the management of dataflow, i.e., timing.
966 Unless a hardware terminal is interfaced into a terminal concentrator
967 (which does flow control),
968 it (or your application) must manage dataflow, preventing overruns.
969 The cheapest solution (no hardware cost)
970 is for your program to do this by pausing after
971 operations that the terminal does slowly, such as clearing the display.
972 .PP
973 As a result, many terminal descriptions (including the vt100)
974 have delay times embedded.
975 You may wish to use these descriptions,
976 but not want to pay the performance penalty.
977 .PP
978 Set the NCURSES_NO_PADDING environment variable to disable all but mandatory
979 padding.
980 Mandatory padding is used as a part of special control
981 sequences such as \fBflash\fP.
982 .SS NCURSES_NO_SETBUF
983 This setting is obsolete.
984 Before changes
985 .RS 3
986 .bP
987 started with 5.9 patch 20120825
988 and
989 .bP
990 continued
991 though 5.9 patch 20130126
992 .RE
993 .PP
994 \fBncurses\fP enabled buffered output during terminal initialization.
995 This was done (as in SVr4 curses) for performance reasons.
996 For testing purposes, both of \fBncurses\fP and certain applications,
997 this feature was made optional.
998 Setting the NCURSES_NO_SETBUF variable
999 disabled output buffering, leaving the output in the original (usually
1000 line buffered) mode.
1001 .PP
1002 In the current implementation,
1003 ncurses performs its own buffering and does not require this workaround.
1004 It does not modify the buffering of the standard output.
1005 .PP
1006 The reason for the change was to make the behavior for interrupts and
1007 other signals more robust.
1008 One drawback is that certain nonconventional programs would mix
1009 ordinary stdio calls with ncurses calls and (usually) work.
1010 This is no longer possible since ncurses is not using
1011 the buffered standard output but its own output (to the same file descriptor).
1012 As a special case, the low-level calls such as \fBputp\fP still use the
1013 standard output.
1014 But high-level curses calls do not.
1015 .SS NCURSES_NO_UTF8_ACS
1016 During initialization, the \fBncurses\fP library
1017 checks for special cases where VT100 line-drawing (and the corresponding
1018 alternate character set capabilities) described in the terminfo are known
1019 to be missing.
1020 Specifically, when running in a UTF\-8 locale,
1021 the Linux console emulator and the GNU screen program ignore these.
1022 Ncurses checks the \fBTERM\fP environment variable for these.
1023 For other special cases, you should set this environment variable.
1024 Doing this tells ncurses to use Unicode values which correspond to
1025 the VT100 line-drawing glyphs.
1026 That works for the special cases cited,
1027 and is likely to work for terminal emulators.
1028 .PP
1029 When setting this variable, you should set it to a nonzero value.
1030 Setting it to zero (or to a nonnumber)
1031 disables the special check for \*(``linux\*('' and \*(``screen\*(''.
1032 .PP
1033 As an alternative to the environment variable,
1034 ncurses checks for an extended terminfo capability \fBU8\fP.
1035 This is a numeric capability which can be compiled using \fB@TIC@\ \-x\fP.
1036 For example
1037 .RS 3
1038 .ft CW
1039 .sp
1040 .nf
1041 # linux console, if patched to provide working
1042 # VT100 shift-in/shift-out, with corresponding font.
1043 linux-vt100|linux console with VT100 line-graphics,
1044         U8#0, use=linux,
1045 .sp
1046 # uxterm with vt100Graphics resource set to false
1047 xterm-utf8|xterm relying on UTF-8 line-graphics,
1048         U8#1, use=xterm,
1049 .fi
1050 .ft
1051 .RE
1052 .PP
1053 The name \*(``U8\*('' is chosen to be two characters,
1054 to permit it to be used by applications that use ncurses'
1055 termcap interface.
1056 .SS NCURSES_TRACE
1057 During initialization, the \fBncurses\fP debugging library
1058 checks the NCURSES_TRACE environment variable.
1059 If it is defined, to a numeric value, \fBncurses\fP calls the \fBtrace\fP
1060 function, using that value as the argument.
1061 .PP
1062 The argument values, which are defined in \fBcurses.h\fP, provide several
1063 types of information.
1064 When running with traces enabled, your application will write the
1065 file \fBtrace\fP to the current directory.
1066 .PP
1067 See \fBcurs_trace\fP(3X) for more information.
1068 .SS TERM
1069 Denotes your terminal type.
1070 Each terminal type is distinct, though many are similar.
1071 .PP
1072 \fBTERM\fP is commonly set by terminal emulators to help
1073 applications find a workable terminal description.
1074 Some of those choose a popular approximation, e.g.,
1075 \*(``ansi\*('', \*(``vt100\*('', \*(``xterm\*('' rather than an exact fit.
1076 Not infrequently, your application will have problems with that approach,
1077 e.g., incorrect function-key definitions.
1078 .PP
1079 If you set \fBTERM\fP in your environment,
1080 it has no effect on the operation of the terminal emulator.
1081 It only affects the way applications work within the terminal.
1082 Likewise, as a general rule (\fBxterm\fP(1) being a rare exception),
1083 terminal emulators which allow you to
1084 specify \fBTERM\fP as a parameter or configuration value do
1085 not change their behavior to match that setting.
1086 .SS TERMCAP
1087 If the \fBncurses\fP library has been configured with \fItermcap\fP
1088 support, \fBncurses\fP will check for a terminal's description in
1089 termcap form if it is not available in the terminfo database.
1090 .PP
1091 The \fBTERMCAP\fP environment variable contains
1092 either a terminal description (with newlines stripped out),
1093 or a file name telling where the information denoted by
1094 the \fBTERM\fP environment variable exists.
1095 In either case, setting it directs \fBncurses\fP to ignore
1096 the usual place for this information, e.g., /etc/termcap.
1097 .SS TERMINFO
1098 \fBncurses\fP can be configured to read from multiple terminal databases.
1099 The \fBTERMINFO\fP variable overrides the location for
1100 the default terminal database.
1101 Terminal descriptions (in terminal format) are stored in terminal databases:
1102 .bP
1103 Normally these are stored in a directory tree,
1104 using subdirectories named by the first letter of the terminal names therein.
1105 .IP
1106 This is the scheme used in System V, which legacy Unix systems use,
1107 and the \fBTERMINFO\fP variable is used by \fIcurses\fP applications on those
1108 systems to override the default location of the terminal database.
1109 .bP
1110 If \fBncurses\fP is built to use hashed databases,
1111 then each entry in this list may be the path of a hashed database file, e.g.,
1112 .NS
1113 /usr/share/terminfo.db
1114 .NE
1115 .IP
1116 rather than
1117 .NS
1118 /usr/share/terminfo/
1119 .NE
1120 .IP
1121 The hashed database uses less disk-space and is a little faster than the
1122 directory tree.
1123 However,
1124 some applications assume the existence of the directory tree,
1125 reading it directly
1126 rather than using the terminfo library calls.
1127 .bP
1128 If \fBncurses\fP is built with a support for reading termcap files
1129 directly, then an entry in this list may be the path of a termcap file.
1130 .bP
1131 If the \fBTERMINFO\fP variable begins with
1132 \*(``hex:\*('' or \*(``b64:\*('',
1133 \fBncurses\fP uses the remainder of that variable as a compiled terminal
1134 description.
1135 You might produce the base64 format using \fBinfocmp\fP(1M):
1136 .NS
1137 TERMINFO="$(infocmp -0 -Q2 -q)"
1138 export TERMINFO
1139 .NE
1140 .IP
1141 The compiled description is used if it corresponds to the terminal identified
1142 by the \fBTERM\fP variable.
1143 .PP
1144 Setting \fBTERMINFO\fP is the simplest,
1145 but not the only way to set location of the default terminal database.
1146 The complete list of database locations in order follows:
1147 .RS 3
1148 .bP
1149 the last terminal database to which \fBncurses\fP wrote,
1150 if any, is searched first
1151 .bP
1152 the location specified by the TERMINFO environment variable
1153 .bP
1154 $HOME/.terminfo
1155 .bP
1156 locations listed in the TERMINFO_DIRS environment variable
1157 .bP
1158 one or more locations whose names are configured and compiled into the
1159 ncurses library, i.e.,
1160 .RS 3
1161 .bP
1162 @TERMINFO_DIRS@ (corresponding to the TERMINFO_DIRS variable)
1163 .bP
1164 @TERMINFO@ (corresponding to the TERMINFO variable)
1165 .RE
1166 .RE
1167 .SS TERMINFO_DIRS
1168 Specifies a list of locations to search for terminal descriptions.
1169 Each location in the list is a terminal database as described in
1170 the section on the \fBTERMINFO\fP variable.
1171 The list is separated by colons (i.e., ":") on Unix, semicolons on OS/2 EMX.
1172 .PP
1173 There is no corresponding feature in System V terminfo;
1174 it is an extension developed for \fBncurses\fP.
1175 .SS TERMPATH
1176 If \fBTERMCAP\fP does not hold a file name then \fBncurses\fP checks
1177 the \fBTERMPATH\fP environment variable.
1178 This is a list of filenames separated by spaces or colons (i.e., ":") on Unix,
1179 semicolons on OS/2 EMX.
1180 .PP
1181 If the \fBTERMPATH\fP environment variable is not set,
1182 \fBncurses\fP looks in the files
1183 .NS
1184 /etc/termcap, /usr/share/misc/termcap and $HOME/.termcap,
1185 .NE
1186 .PP
1187 in that order.
1188 .PP
1189 The library may be configured to disregard the following variables when the
1190 current user is the superuser (root), or if the application uses setuid or
1191 setgid permissions:
1192 .NS
1193 $TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.
1194 .NE
1195 .SH ALTERNATE CONFIGURATIONS
1196 Several different configurations are possible,
1197 depending on the configure script options used when building \fBncurses\fP.
1198 There are a few main options whose effects are visible to the applications
1199 developer using \fBncurses\fP:
1200 .TP 5
1201 \-\-disable\-overwrite
1202 The standard include for \fBncurses\fP is as noted in \fBSYNOPSIS\fP:
1203 .NS
1204 \fB#include <curses.h>\fP
1205 .NE
1206 .IP
1207 This option is used to avoid filename conflicts when \fBncurses\fP
1208 is not the main implementation of curses of the computer.
1209 If \fBncurses\fP is installed disabling overwrite, it puts its headers in
1210 a subdirectory, e.g.,
1211 .NS
1212 \fB#include <ncurses/curses.h>\fP
1213 .NE
1214 .IP
1215 It also omits a symbolic link which would allow you to use \fB\-lcurses\fP
1216 to build executables.
1217 .TP 5
1218 \-\-enable\-widec
1219 The configure script renames the library and
1220 (if the \fB\-\-disable\-overwrite\fP option is used)
1221 puts the header files in a different subdirectory.
1222 All of the library names have a \*(``w\*('' appended to them,
1223 i.e., instead of
1224 .NS
1225 \fB\-lncurses\fP
1226 .NE
1227 .IP
1228 you link with
1229 .NS
1230 \fB\-lncursesw\fP
1231 .NE
1232 .IP
1233 You must also enable the wide-character features in the header file
1234 when compiling for the wide-character library
1235 to use the extended (wide-character) functions.
1236 The symbol which enables these features has changed since XSI Curses, Issue 4:
1237 .RS
1238 .bP
1239 Originally, the wide-character feature required the symbol
1240 \fB_XOPEN_SOURCE_EXTENDED\fP
1241 but that was only valid for XPG4 (1996).
1242 .bP
1243 Later, that was deemed conflicting with \fB_XOPEN_SOURCE\fP defined to 500.
1244 .bP
1245 As of mid-2018,
1246 none of the features in this implementation require a \fB_XOPEN_SOURCE\fP
1247 feature greater than 600.
1248 However, X/Open Curses, Issue 7 (2009) recommends defining it to 700.
1249 .bP
1250 Alternatively, you can enable the feature by defining \fBNCURSES_WIDECHAR\fP
1251 with the caveat that some other header file than \fBcurses.h\fP
1252 may require a specific value for \fB_XOPEN_SOURCE\fP
1253 (or a system-specific symbol).
1254 .RE
1255 .IP
1256 The \fBcurses.h\fP file which is installed for the wide-character
1257 library is designed to be compatible with the normal library's header.
1258 Only the size of the \fBWINDOW\fP structure differs, and very few
1259 applications require more than a pointer to \fBWINDOW\fPs.
1260 .IP
1261 If the headers are installed allowing overwrite,
1262 the wide-character library's headers should be installed last,
1263 to allow applications to be built using either library
1264 from the same set of headers.
1265 .TP 5
1266 \-\-with\-pthread
1267 The configure script renames the library.
1268 All of the library names have a \*(``t\*('' appended to them
1269 (before any \*(``w\*('' added by \fB\-\-enable\-widec\fP).
1270 .IP
1271 The global variables such as \fBLINES\fP are replaced by macros to
1272 allow read-only access.
1273 At the same time, setter-functions are provided to set these values.
1274 Some applications (very few) may require changes to work with this convention.
1275 .TP 5
1276 \-\-with\-shared
1277 .TP
1278 \-\-with\-normal
1279 .TP
1280 \-\-with\-debug
1281 .TP
1282 \-\-with\-profile
1283 The shared and normal (static) library names differ by their suffixes,
1284 e.g., \fBlibncurses.so\fP and \fBlibncurses.a\fP.
1285 The debug and profiling libraries add a \*(``_g\*(''
1286 and a \*(``_p\*('' to the root names respectively,
1287 e.g., \fBlibncurses_g.a\fP and \fBlibncurses_p.a\fP.
1288 .TP 5
1289 \-\-with\-termlib
1290 Low-level functions which do not depend upon whether the library
1291 supports wide-characters, are provided in the tinfo library.
1292 .IP
1293 By doing this, it is possible to share the tinfo library between
1294 wide/normal configurations as well as reduce the size of the library
1295 when only low-level functions are needed.
1296 .IP
1297 Those functions are described in these pages:
1298 .RS
1299 .bP
1300 \fBcurs_extend\fP(3X) \- miscellaneous curses extensions
1301 .bP
1302 \fBcurs_inopts\fP(3X) \- \fBcurses\fP input options
1303 .bP
1304 \fBcurs_kernel\fP(3X) \- low-level \fBcurses\fP routines
1305 .bP
1306 \fBcurs_termattrs\fP(3X) \- \fBcurses\fP environment query routines
1307 .bP
1308 \fBcurs_termcap\fP(3X) \- \fBcurses\fP emulation of termcap
1309 .bP
1310 \fBcurs_terminfo\fP(3X) \- \fBcurses\fP interfaces to terminfo database
1311 .bP
1312 \fBcurs_util\fP(3X) \- miscellaneous \fBcurses\fP utility routines
1313 .RE
1314 .TP 5
1315 \-\-with\-trace
1316 The \fBtrace\fP function normally resides in the debug library,
1317 but it is sometimes useful to configure this in the shared library.
1318 Configure scripts should check for the function's existence rather
1319 than assuming it is always in the debug library.
1320 .SH FILES
1321 .TP 5
1322 @DATADIR@/tabset
1323 directory containing initialization files for the terminal capability database
1324 @TERMINFO@
1325 terminal capability database
1326 .SH SEE ALSO
1327 \fBterminfo\fP(\*n) and related pages whose names begin
1328 \*(``curs_\*('' for detailed routine descriptions.
1329 .br
1330 \fBcurs_variables\fP(3X)
1331 .br
1332 \fBuser_caps\fP(5) for user-defined capabilities
1333 .SH EXTENSIONS
1334 The \fBncurses\fP library can be compiled with an option (\fB\-DUSE_GETCAP\fP)
1335 that falls back to the old-style /etc/termcap file if the terminal setup code
1336 cannot find a terminfo entry corresponding to \fBTERM\fP.
1337 Use of this feature
1338 is not recommended, as it essentially includes an entire termcap compiler in
1339 the \fBncurses\fP startup code, at significant cost in core and startup cycles.
1340 .PP
1341 The \fBncurses\fP library includes facilities for capturing mouse events on
1342 certain terminals (including xterm).
1343 See the \fBcurs_mouse\fP(3X)
1344 manual page for details.
1345 .PP
1346 The \fBncurses\fP library includes facilities for responding to window
1347 resizing events, e.g., when running in an xterm.
1348 See the \fBresizeterm\fP(3X)
1349 and \fBwresize\fP(3X) manual pages for details.
1350 In addition, the library may be configured with a \fBSIGWINCH\fP handler.
1351 .PP
1352 The \fBncurses\fP library extends the fixed set of function key capabilities
1353 of terminals by allowing the application designer to define additional
1354 key sequences at runtime.
1355 See the \fBdefine_key\fP(3X)
1356 \fBkey_defined\fP(3X),
1357 and \fBkeyok\fP(3X) manual pages for details.
1358 .PP
1359 The \fBncurses\fP library can exploit the capabilities of terminals which
1360 implement the ISO\-6429 SGR 39 and SGR 49 controls, which allow an application
1361 to reset the terminal to its original foreground and background colors.
1362 From the users' perspective, the application is able to draw colored
1363 text on a background whose color is set independently, providing better
1364 control over color contrasts.
1365 See the \fBdefault_colors\fP(3X) manual page for details.
1366 .PP
1367 The \fBncurses\fP library includes a function for directing application output
1368 to a printer attached to the terminal device.
1369 See the \fBcurs_print\fP(3X) manual page for details.
1370 .SH PORTABILITY
1371 The \fBncurses\fP library is intended to be BASE-level conformant with XSI
1372 Curses.
1373 The EXTENDED XSI Curses functionality
1374 (including color support) is supported.
1375 .PP
1376 A small number of local differences (that is, individual differences between
1377 the XSI Curses and \fBncurses\fP calls) are described in \fBPORTABILITY\fP
1378 sections of the library man pages.
1379 .SS Error checking
1380 In many cases, X/Open Curses is vague about error conditions,
1381 omitting some of the SVr4 documentation.
1382 .PP
1383 Unlike other implementations, this one checks parameters such as pointers
1384 to WINDOW structures to ensure they are not null.
1385 The main reason for providing this behavior is to guard against programmer
1386 error.
1387 The standard interface does not provide a way for the library
1388 to tell an application which of several possible errors were detected.
1389 Relying on this (or some other) extension will adversely affect the
1390 portability of curses applications.
1391 .SS Extensions versus portability
1392 Most of the extensions provided by ncurses have not been standardized.
1393 Some have been incorporated into other implementations, such as
1394 PDCurses or NetBSD curses.
1395 Here are a few to consider:
1396 .bP
1397 The routine \fBhas_key\fP is not part of XPG4, nor is it present in SVr4.
1398 See the \fBcurs_getch\fP(3X) manual page for details.
1399 .bP
1400 The routine \fBslk_attr\fP is not part of XPG4, nor is it present in SVr4.
1401 See the \fBcurs_slk\fP(3X) manual page for details.
1402 .bP
1403 The routines \fBgetmouse\fP, \fBmousemask\fP, \fBungetmouse\fP,
1404 \fBmouseinterval\fP, and \fBwenclose\fP relating to mouse interfacing are not
1405 part of XPG4, nor are they present in SVr4.
1406 See the \fBcurs_mouse\fP(3X) manual page for details.
1407 .bP
1408 The routine \fBmcprint\fP was not present in any previous curses implementation.
1409 See the \fBcurs_print\fP(3X) manual page for details.
1410 .bP
1411 The routine \fBwresize\fP is not part of XPG4, nor is it present in SVr4.
1412 See the \fBwresize\fP(3X) manual page for details.
1413 .bP
1414 The WINDOW structure's internal details can be hidden from application
1415 programs.
1416 See \fBcurs_opaque\fP(3X) for the discussion of \fBis_scrollok\fP, etc.
1417 .bP
1418 This implementation can be configured to provide rudimentary support
1419 for multi-threaded applications.
1420 See \fBcurs_threads\fP(3X) for details.
1421 .bP
1422 This implementation can also be configured to provide a set of functions which
1423 improve the ability to manage multiple screens.
1424 See \fBcurs_sp_funcs\fP(3X) for details.
1425 .SS Padding differences
1426 In historic curses versions, delays embedded in the capabilities \fBcr\fP,
1427 \fBind\fP, \fBcub1\fP, \fBff\fP and \fBtab\fP activated corresponding delay
1428 bits in the UNIX tty driver.
1429 In this implementation, all padding is done by sending NUL bytes.
1430 This method is slightly more expensive, but narrows the interface
1431 to the UNIX kernel significantly and increases the package's portability
1432 correspondingly.
1433 .SS Header files
1434 The header file \fB<curses.h>\fP automatically includes the header files
1435 \fB<stdio.h>\fP and \fB<unctrl.h>\fP.
1436 .PP
1437 X/Open Curses has more to say,
1438 but does not finish the story:
1439 .RS 4
1440 .PP
1441 The inclusion of <curses.h> may make visible all symbols
1442 from the headers <stdio.h>, <term.h>, <termios.h>, and <wchar.h>.
1443 .RE
1444 .PP
1445 Here is a more complete story:
1446 .bP
1447 Starting with BSD curses, all implementations have included <stdio.h>.
1448 .IP
1449 BSD curses included <curses.h> and <unctrl.h> from an internal header
1450 "curses.ext" ("ext" was a short name for \fIexterns\fP).
1451 .IP
1452 BSD curses used <stdio.h> internally (for \fBprintw\fP and \fBscanw\fP),
1453 but nothing in <curses.h> itself relied upon <stdio.h>.
1454 .bP
1455 SVr2 curses added \fBnewterm\fP(3X), which relies upon <stdio.h>.
1456 That is, the function prototype uses \fBFILE\fP.
1457 .IP
1458 SVr4 curses added \fBputwin\fP and \fBgetwin\fP, which also use <stdio.h>.
1459 .IP
1460 X/Open Curses documents all three of these functions.
1461 .IP
1462 SVr4 curses and X/Open Curses do not require the developer to
1463 include <stdio.h> before including <curses.h>.
1464 Both document curses showing <curses.h> as the only required header.
1465 .IP
1466 As a result, standard <curses.h> will always include <stdio.h>.
1467 .bP
1468 X/Open Curses is inconsistent with respect to SVr4 regarding <unctrl.h>.
1469 .IP
1470 As noted in \fBcurs_util\fP(3X), ncurses includes <unctrl.h> from
1471 <curses.h> (like SVr4).
1472 .bP
1473 X/Open's comments about <term.h> and <termios.h> may refer to HP-UX and AIX:
1474 .IP
1475 HP-UX curses includes <term.h> from <curses.h>
1476 to declare \fBsetupterm\fP in curses.h,
1477 but ncurses (and Solaris curses) do not.
1478 .IP
1479 AIX curses includes <term.h> and <termios.h>.
1480 Again, ncurses (and Solaris curses) do not.
1481 .bP
1482 X/Open says that <curses.h> \fImay\fP include <term.h>,
1483 but there is no requirement that it do that.
1484 .IP
1485 Some programs use functions declared in both <curses.h> and <term.h>,
1486 and must include both headers in the same module.
1487 Very old versions of AIX curses required including <curses.h>
1488 before including <term.h>.
1489 .IP
1490 Because ncurses header files include the headers needed to
1491 define datatypes used in the headers,
1492 ncurses header files can be included in any order.
1493 But for portability, you should include <curses.h> before <term.h>.
1494 .bP
1495 X/Open Curses says \fI"may make visible"\fP
1496 because including a header file does not necessarily make all symbols
1497 in it visible (there are ifdef's to consider).
1498 .IP
1499 For instance, in ncurses <wchar.h> \fImay\fP be included if
1500 the proper symbol is defined, and if ncurses is configured for
1501 wide-character support.
1502 If the header is included, its symbols may be made visible.
1503 That depends on the value used for \fB_XOPEN_SOURCE\fP
1504 feature test macro.
1505 .bP
1506 X/Open Curses documents one required header,
1507 in a special case: <stdarg.h> before <curses.h> to prototype
1508 the \fBvw_printw\fP and \fBvw_scanw\fP functions
1509 (as well as the obsolete
1510 the \fBvwprintw\fP and \fBvwscanw\fP functions).
1511 Each of those uses a \fBva_list\fP parameter.
1512 .IP
1513 The two obsolete functions were introduced in SVr3.
1514 The other functions were introduced in X/Open Curses.
1515 In between, SVr4 curses provided for the possibility that
1516 an application might include either <varargs.h> or <stdarg.h>.
1517 Initially, that was done by using \fBvoid*\fP for the \fBva_list\fP
1518 parameter.
1519 Later, a special type (defined in <stdio.h>) was introduced,
1520 to allow for compiler type-checking.
1521 That special type is always available,
1522 because <stdio.h> is always included by <curses.h>.
1523 .IP
1524 None of the X/Open Curses implementations require an application
1525 to include <stdarg.h> before <curses.h> because they either
1526 have allowed for a special type, or (like ncurses) include <stdarg.h>
1527 directly to provide a portable interface.
1528 .SH NOTES
1529 If standard output from a \fBncurses\fP program is re-directed to something
1530 which is not a tty, screen updates will be directed to standard error.
1531 This was an undocumented feature of AT&T System V Release 3 curses.
1532 .SH AUTHORS
1533 Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
1534 Based on \fIpcurses\fP by Pavel Curtis.