]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_attr.3x
ncurses 6.4 - patch 20231202
[ncurses.git] / man / curs_attr.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2022,2023 Thomas E. Dickey                                *
4 .\" Copyright 1998-2016,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: curs_attr.3x,v 1.91 2023/12/02 21:05:24 tom Exp $
32 .TH curs_attr 3X 2023-12-02 "ncurses 6.4" "Library calls"
33 .ie \n(.g \{\
34 .ds `` \(lq
35 .ds '' \(rq
36 .\}
37 .el \{\
38 .ie t .ds `` ``
39 .el   .ds `` ""
40 .ie t .ds '' ''
41 .el   .ds '' ""
42 .\}
43 .
44 .de bP
45 .ie n  .IP \(bu 4
46 .el    .IP \(bu 2
47 ..
48 .\" ---------------------------------------------------------------------------
49 .SH NAME
50 \fB\%attr_get\fP,
51 \fB\%wattr_get\fP,
52 \fB\%attr_set\fP,
53 \fB\%wattr_set\fP,
54 \fB\%attr_off\fP,
55 \fB\%wattr_off\fP,
56 \fB\%attr_on\fP,
57 \fB\%wattr_on\fP,
58 \fB\%attroff\fP,
59 \fB\%wattroff\fP,
60 \fB\%attron\fP,
61 \fB\%wattron\fP,
62 \fB\%attrset\fP,
63 \fB\%wattrset\fP,
64 \fB\%chgat\fP,
65 \fB\%wchgat\fP,
66 \fB\%mvchgat\fP,
67 \fB\%mvwchgat\fP,
68 \fB\%color_set\fP,
69 \fB\%wcolor_set\fP,
70 \fB\%standend\fP,
71 \fB\%wstandend\fP,
72 \fB\%standout\fP,
73 \fB\%wstandout\fP \-
74 manipulate attributes of character cells in \fIcurses\fR windows
75 .\" ---------------------------------------------------------------------------
76 .SH SYNOPSIS
77 .nf
78 \fB#include <curses.h>
79 .PP
80 \fBint attr_get(attr_t *\fIattrs\fP, short *\fIpair\fP, void *\fIopts\fP);
81 \fBint wattr_get(WINDOW *\fIwin\fP, attr_t *\fIattrs\fP, short *\fIpair\fP,\fR \fPvoid *\fIopts\fP);
82 \fBint attr_set(attr_t \fIattrs\fP, short \fIpair\fP, void *\fIopts\fP);
83 \fBint wattr_set(WINDOW *\fIwin\fP, attr_t \fIattrs\fP, short \fIpair\fP, void *\fIopts\fP);
84 .PP
85 \fBint attr_off(attr_t \fIattrs\fP, void *\fIopts\fP);
86 \fBint wattr_off(WINDOW *\fIwin\fP, attr_t \fIattrs\fP, void *\fIopts\fP);
87 \fBint attr_on(attr_t \fIattrs\fP, void *\fIopts\fP);
88 \fBint wattr_on(WINDOW *\fIwin\fP, attr_t \fIattrs\fP, void *\fIopts\fP);
89 .PP
90 \fBint attroff(int \fIattrs\fP);
91 \fBint wattroff(WINDOW *\fIwin\fP, int \fIattrs\fP);
92 \fBint attron(int \fIattrs\fP);
93 \fBint wattron(WINDOW *\fIwin\fP, int \fIattrs\fP);
94 \fBint attrset(int \fIattrs\fP);
95 \fBint wattrset(WINDOW *\fIwin\fP, int \fIattrs\fP);
96 .PP
97 \fBint chgat(int \fIn\fP, attr_t \fIattr\fP, short \fIpair\fP,\fR \fPconst void *\fIopts\fP);
98 \fBint wchgat(WINDOW *\fIwin\fP,
99       \fBint \fIn\fB, attr_t \fIattr\fB,\fR \fBshort \fIpair\fB, const void *\fIopts\fB);\fR
100 \fBint mvchgat(int \fIy\fB, int \fIx\fB,\fR
101       \fBint \fIn\fB, attr_t \fIattr\fB, short \fIpair\fB, const void *\fIopts\fB);\fR
102 \fBint mvwchgat(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB,\fR
103       \fBint \fIn\fB, attr_t \fIattr\fB, short \fIpair\fB, const void *\fIopts\fB);\fR
104 .PP
105 \fBint color_set(short \fIpair\fB, void* \fIopts\fB);\fR
106 \fBint wcolor_set(WINDOW *\fIwin\fB, short \fIpair\fB,\fR \fBvoid* \fIopts\fP);\fR
107 .PP
108 \fBint standend(void);\fP
109 \fBint wstandend(WINDOW *\fIwin\fB);\fR
110 \fBint standout(void);\fP
111 \fBint wstandout(WINDOW *\fIwin\fB);\fR
112 .fi
113 .\" ---------------------------------------------------------------------------
114 .SH DESCRIPTION
115 These routines manipulate the current attributes of the named window,
116 which then apply to all characters that are written into
117 the window with \fBwaddch\fP, \fBwaddstr\fP and \fBwprintw\fP.
118 Attributes are
119 a property of the character, and move with the character through any scrolling
120 and insert/delete line/character operations.
121 To the extent possible, they are
122 displayed as appropriate modifications to the graphic rendition of characters
123 put on the screen.
124 .PP
125 These routines do not affect the attributes used
126 when erasing portions of the window.
127 See \fBcurs_bkgd\fP(3X) for functions which modify the attributes used for
128 erasing and clearing.
129 .\" ---------------------------------------------------------------------------
130 .SS Window attributes
131 There are two sets of functions:
132 .bP
133 functions for manipulating the window attributes and color:
134 \fBwattr_set\fP and \fBwattr_get\fP.
135 .bP
136 functions for manipulating only the window attributes (not color):
137 \fBwattr_on\fP and \fBwattr_off\fP.
138 .PP
139 The \fBwattr_set\fP function sets the current attributes
140 of the given window to \fIattrs\fP, with color specified by \fIpair\fP.
141 .PP
142 Use \fBwattr_get\fP to retrieve attributes for the given window.
143 .PP
144 Use \fBattr_on\fP and \fBwattr_on\fP to turn on window attributes, i.e.,
145 values OR'd together in \fIattr\fP,
146 without affecting other attributes.
147 Use \fBattr_off\fP and \fBwattr_off\fP to turn off window attributes,
148 again values OR'd together in \fIattr\fP,
149 without affecting other attributes.
150 .\" ---------------------------------------------------------------------------
151 .SS Legacy window attributes
152 The X/Open window attribute routines which \fIset\fP or \fIget\fP,
153 turn \fIon\fP or \fIoff\fP
154 are extensions of older routines
155 which assume that color pairs are OR'd into the attribute parameter.
156 These newer routines use similar names, because
157 X/Open simply added an underscore (\fB_\fP) for the newer names.
158 .PP
159 The \fBint\fP datatype used in the legacy routines is treated as if
160 it is the same size as \fBchtype\fP (used by \fBaddch\fP(3X)).
161 It holds the common video attributes (such as bold, reverse),
162 as well as a few bits for color.
163 Those bits correspond to the \fBA_COLOR\fP symbol.
164 The \fBCOLOR_PAIR\fP macro provides a value which can be OR'd into
165 the attribute parameter.
166 For example,
167 as long as that value fits into the \fBA_COLOR\fP mask,
168 then these calls produce similar results:
169 .PP
170 .RS 4
171 .EX
172 attrset(A_BOLD | COLOR_PAIR(\fIpair\fP));
173 attr_set(A_BOLD, \fIpair\fP, NULL);
174 .EE
175 .RE
176 .PP
177 However, if the value does not fit, then the \fBCOLOR_PAIR\fP macro
178 uses only the bits that fit.
179 For example, because in ncurses \fBA_COLOR\fP has eight (8) bits,
180 then \fBCOLOR_PAIR(\fI259\fB)\fR is 4
181 (i.e., 259 is 4 more than the limit 255).
182 .PP
183 The \fBPAIR_NUMBER\fP macro extracts a pair number from an \fBint\fP
184 (or \fBchtype\fP).
185 For example, the \fIinput\fP and \fIoutput\fP values in these statements
186 would be the same:
187 .PP
188 .RS 4
189 .EX
190 int value = A_BOLD | COLOR_PAIR(\fIinput\fP);
191 int \fIoutput\fP = PAIR_NUMBER(value);
192 .EE
193 .RE
194 .PP
195 The \fBattrset\fP routine is a legacy feature predating SVr4 curses
196 but kept in X/Open Curses for the same reason that SVr4 curses kept it:
197 compatibility.
198 .PP
199 The remaining \fBattr\fP* functions operate exactly like the corresponding
200 \fBattr_\fP* functions, except that they take arguments of type \fBint\fP
201 rather than \fBattr_t\fP.
202 .PP
203 There is no corresponding \fBattrget\fP function as such in X/Open Curses,
204 although ncurses provides \fBgetattrs\fP (see curs_legacy(3X)).
205 .\" ---------------------------------------------------------------------------
206 .SS Change character rendition
207 The routine \fBchgat\fP changes the attributes of a given number of characters
208 starting at the current cursor location of \fBstdscr\fP.
209 It does not update
210 the cursor and does not perform wrapping.
211 A character count of \-1 or greater
212 than the remaining window width means to change attributes all the way to the
213 end of the current line.
214 The \fBwchgat\fP function generalizes this to any window;
215 the \fBmvwchgat\fP function does a cursor move before acting.
216 .PP
217 In these functions,
218 the color \fIpair\fP argument is a color-pair index
219 (as in the first argument of \fBinit_pair\fP, see \fBcurs_color\fP(3X)).
220 .\" ---------------------------------------------------------------------------
221 .SS Change window color
222 The routine \fBcolor_set\fP sets the current color of the given window to the
223 foreground/background combination described by the color \fIpair\fP parameter.
224 .\" ---------------------------------------------------------------------------
225 .SS Standout
226 The routine \fBstandout\fP is
227 the same as \fBattron(A_STANDOUT)\fP.
228 The routine \fBstandend\fP is the same
229 as \fBattrset(A_NORMAL)\fP or \fBattrset(0)\fP, that is, it turns off all
230 attributes.
231 .PP
232 X/Open does not mark these \*(``restricted\*('', because
233 .bP
234 they have well established legacy use, and
235 .bP
236 there is no ambiguity about the way the attributes
237 might be combined with a color pair.
238 .\" ---------------------------------------------------------------------------
239 .SS "Video Attributes"
240 The following video attributes, defined in \fB<curses.h>\fP, can be passed to
241 the routines \fBattron\fP, \fBattroff\fP, and \fBattrset\fP, or OR'd with the
242 characters passed to \fBaddch\fP (see \fBcurs_addch\fP(3X)).
243 .PP
244 .ne 15
245 .RS
246 .TS
247 l l
248 _ _ _
249 l l .
250 \fBName\fP      \fBDescription\fP
251 \fBA_NORMAL\fP  Normal display (no highlight)
252 \fBA_STANDOUT\fP        Best highlighting mode of the terminal.
253 \fBA_UNDERLINE\fP       Underlining
254 \fBA_REVERSE\fP Reverse video
255 \fBA_BLINK\fP   Blinking
256 \fBA_DIM\fP     Half bright
257 \fBA_BOLD\fP    Extra bright or bold
258 \fBA_PROTECT\fP Protected mode
259 \fBA_INVIS\fP   Invisible or blank mode
260 \fBA_ALTCHARSET\fP      Alternate character set
261 \fBA_ITALIC\fP  Italics (non-X/Open extension)
262 \fBA_CHARTEXT\fP        Bit-mask to extract a character
263 \fBA_COLOR\fP   Bit-mask to extract a color (legacy routines)
264 .TE
265 .RE
266 .PP
267 These video attributes are supported by \fBattr_on\fP and related functions
268 (which also support the attributes recognized by \fBattron\fP, etc.):
269 .PP
270 .RS
271 .TS
272 l l
273 _ _ _
274 l l .
275 \fBName\fP      \fBDescription\fP
276 \fBWA_HORIZONTAL\fP     Horizontal highlight
277 \fBWA_LEFT\fP   Left highlight
278 \fBWA_LOW\fP    Low highlight
279 \fBWA_RIGHT\fP  Right highlight
280 \fBWA_TOP\fP    Top highlight
281 \fBWA_VERTICAL\fP       Vertical highlight
282 .TE
283 .RE
284 .PP
285 The return values of many of these routines are not meaningful (they are
286 implemented as macro-expanded assignments and simply return their argument).
287 The SVr4 manual page claims (falsely) that these routines always return \fB1\fP.
288 .\" ---------------------------------------------------------------------------
289 .SH RETURN VALUE
290 All routines return the integer \fBOK\fP on success, or \fBERR\fP on failure.
291 .PP
292 X/Open does not define any error conditions.
293 .PP
294 This implementation
295 .bP
296 returns an error if the window pointer is null.
297 .bP
298 returns an error if the color pair parameter
299 for \fBwcolor_set\fP is outside the range 0..COLOR_PAIRS\-1.
300 .bP
301 does not return an error if either of the parameters of \fBwattr_get\fP
302 used for retrieving attribute or color-pair values is \fBNULL\fP.
303 .PP
304 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
305 \fBwmove\fP, and return an error if the position is outside the window,
306 or if the window pointer is null.
307 .\" ---------------------------------------------------------------------------
308 .SH NOTES
309 These functions may be macros:
310 .sp
311 .RS
312 \fBattroff\fP, \fBwattroff\fP, \fBattron\fP, \fBwattron\fP,
313 \fBattrset\fP, \fBwattrset\fP, \fBstandend\fP and \fBstandout\fP.
314 .RE
315 .PP
316 Color pair values can only be OR'd with attributes if the pair
317 number is less than 256.
318 The alternate functions such as \fBcolor_set\fP can pass a color pair
319 value directly.
320 However, ncurses ABI 4 and 5 simply OR this value
321 within the alternate functions.
322 You must use ncurses ABI 6 to support more than 256 color pairs.
323 .\" ---------------------------------------------------------------------------
324 .SH EXTENSIONS
325 This implementation provides the \fBA_ITALIC\fP attribute for terminals
326 which have the \fBenter_italics_mode\fP (\fBsitm\fP)
327 and \fBexit_italics_mode\fP (\fBritm\fP) capabilities.
328 Italics are not mentioned in X/Open Curses.
329 Unlike the other video attributes, \fBA_ITALIC\fP is unrelated
330 to the \fBset_attributes\fP capabilities.
331 This implementation makes the assumption that
332 \fBexit_attribute_mode\fP may also reset italics.
333 .PP
334 Each of the functions added by XSI Curses has a parameter \fIopts\fP,
335 which X/Open Curses still (after more than twenty years) documents
336 as reserved for future use, saying that it should be \fBNULL\fP.
337 This implementation uses that parameter in ABI 6 for the functions which
338 have a color-pair parameter to support \fIextended color pairs\fP:
339 .bP
340 For functions which modify the color, e.g.,
341 \fBwattr_set\fP and \fBwattr_on\fP,
342 if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
343 and used to set the color pair instead of the \fBshort\fP \fIpair\fP parameter.
344 .bP
345 For functions which retrieve the color, e.g.,
346 \fBwattr_get\fP,
347 if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
348 and used to retrieve the color pair as an \fBint\fP value,
349 in addition to
350 retrieving it via the standard pointer to \fBshort\fP parameter.
351 .bP
352 For functions which turn attributes off, e.g.,
353 \fBwattr_off\fP,
354 the \fIopts\fP parameter is ignored except
355 except to check that it is \fBNULL\fP.
356 .\" ---------------------------------------------------------------------------
357 .SH PORTABILITY
358 These functions are described in the XSI Curses standard, Issue 4.
359 The standard defined the dedicated type for highlights,
360 \fBattr_t\fP, which was not defined in SVr4 curses.
361 The functions taking \fBattr_t\fP arguments were not supported under SVr4.
362 .PP
363 Very old versions of this library did not force an update of the screen
364 when changing the attributes.
365 Use \fBtouchwin\fP to force the screen to match the updated attributes.
366 .PP
367 The XSI Curses standard states that whether the traditional functions
368 \fBattron\fP/\fBattroff\fP/\fBattrset\fP can manipulate attributes other than
369 \fBA_BLINK\fP, \fBA_BOLD\fP, \fBA_DIM\fP, \fBA_REVERSE\fP, \fBA_STANDOUT\fP, or
370 \fBA_UNDERLINE\fP is \*(``unspecified\*(''.
371 Under this implementation as well as
372 SVr4 curses, these functions correctly manipulate all other highlights
373 (specifically, \fBA_ALTCHARSET\fP, \fBA_PROTECT\fP, and \fBA_INVIS\fP).
374 .PP
375 XSI Curses added these entry points:
376 .sp
377 .RS
378 \fBattr_get\fP, \fBattr_on\fP,
379 \fBattr_off\fP, \fBattr_set\fP, \fBwattr_on\fP, \fBwattr_off\fP,
380 \fBwattr_get\fP, \fBwattr_set\fP
381 .RE
382 .PP
383 The new functions are intended to work with
384 a new series of highlight macros prefixed with \fBWA_\fP.
385 The older macros have direct counterparts in the newer set of names:
386 .PP
387 .RS
388 .ne 9
389 .TS
390 l l
391 _ _ _
392 l l .
393 \fBName\fP      \fBDescription\fP
394 \fBWA_NORMAL\fP Normal display (no highlight)
395 \fBWA_STANDOUT\fP       Best highlighting mode of the terminal.
396 \fBWA_UNDERLINE\fP      Underlining
397 \fBWA_REVERSE\fP        Reverse video
398 \fBWA_BLINK\fP  Blinking
399 \fBWA_DIM\fP    Half bright
400 \fBWA_BOLD\fP   Extra bright or bold
401 \fBWA_ALTCHARSET\fP     Alternate character set
402 .TE
403 .RE
404 .PP
405 XSI curses does not assign values to these symbols,
406 nor does it state whether or not they are related to the
407 similarly-named A_NORMAL, etc.:
408 .bP
409 The XSI curses standard specifies that each pair of corresponding \fBA_\fP
410 and \fBWA_\fP-using functions operates on the same current-highlight
411 information.
412 .bP
413 However, in some implementations, those symbols have unrelated values.
414 .IP
415 For example, the Solaris \fIxpg4\fP (X/Open) curses declares
416 \fBattr_t\fP to be an unsigned short integer (16-bits),
417 while \fBchtype\fP is a unsigned integer (32-bits).
418 The \fBWA_\fP symbols in this case are different from the \fBA_\fP symbols
419 because they are used for a smaller datatype which does not
420 represent \fBA_CHARTEXT\fP or \fBA_COLOR\fP.
421 .IP
422 In this implementation (as in many others), the values happen to be
423 the same because it simplifies copying information between
424 \fBchtype\fP and \fBcchar_t\fP variables.
425 .bP
426 Because ncurses's \fBattr_t\fP can hold a color pair
427 (in the \fBA_COLOR\fP field),
428 a call to
429 \fBwattr_on\fP,
430 \fBwattr_off\fP, or
431 \fBwattr_set\fP
432 may alter the window's color.
433 If the color pair information in the attribute parameter is zero,
434 no change is made to the window's color.
435 .IP
436 This is consistent with SVr4 curses;
437 X/Open Curses does not specify this.
438 .PP
439 The XSI standard extended conformance level adds new highlights
440 \fBA_HORIZONTAL\fP, \fBA_LEFT\fP, \fBA_LOW\fP, \fBA_RIGHT\fP, \fBA_TOP\fP,
441 \fBA_VERTICAL\fP (and corresponding \fBWA_\fP macros for each).
442 As of August 2013,
443 no known terminal provides these highlights
444 (i.e., via the \fBsgr1\fP capability).
445 .\" ---------------------------------------------------------------------------
446 .SH HISTORY
447 X/Open Curses is largely based on SVr4 curses,
448 adding support for \*(``wide-characters\*('' (not specific to Unicode).
449 Some of the X/Open differences from SVr4 curses address the way
450 video attributes can be applied to wide-characters.
451 But aside from that, \fBattrset\fP and \fBattr_set\fP are similar.
452 SVr4 curses provided the basic features for manipulating video attributes.
453 However, earlier versions of curses provided a part of these features.
454 .PP
455 As seen in 2.8BSD, curses assumed 7-bit characters,
456 using the eighth bit of a byte to represent the \fIstandout\fP
457 feature (often implemented as bold and/or reverse video).
458 The BSD curses library provided functions \fBstandout\fP and \fBstandend\fP
459 which were carried along into X/Open Curses due to their pervasive use
460 in legacy applications.
461 .PP
462 Some terminals in the 1980s could support a variety of video attributes,
463 although the BSD curses library could do nothing with those.
464 System V (1983) provided an improved curses library.
465 It defined the \fBA_\fP symbols for use by applications to manipulate the
466 other attributes.
467 There are few useful references for the chronology.
468 .PP
469 Goodheart's book
470 \fIUNIX Curses Explained\fP (1991) describes SVr3 (1987),
471 commenting on several functions:
472 .bP
473 the \fBattron\fP, \fBattroff\fP, \fBattrset\fP functions
474 (and most of the functions found in SVr4 but not in BSD curses) were
475 introduced by System V,
476 .bP
477 the alternate character set feature with \fBA_ALTCHARSET\fP was
478 added in SVr2 and improved in SVr3 (by adding \fBacs_map[]\fP),
479 .bP
480 \fBstart_color\fP and related color-functions were introduced by System V.3.2,
481 .bP
482 pads, soft-keys were added in SVr3, and
483 .PP
484 Goodheart did not mention the background character or the \fBcchar_t\fP type.
485 Those are respectively SVr4 and X/Open features.
486 He did mention the \fBA_\fP constants, but did not indicate their values.
487 Those were not the same in different systems,
488 even for those marked as System V.
489 .PP
490 Different Unix systems used different sizes for the bit-fields in \fBchtype\fP
491 for \fIcharacters\fP and \fIcolors\fP, and took into account the different
492 integer sizes (32-bit versus 64-bit).
493 .PP
494 This table showing the number of bits for \fBA_COLOR\fP
495 and \fBA_CHARTEXT\fP
496 was gleaned from the curses header files for
497 various operating systems and architectures.
498 The inferred architecture and notes reflect
499 the format and size of the defined constants
500 as well as clues such as the alternate character set implementation.
501 A 32-bit library can be used on a 64-bit system,
502 but not necessarily the reverse.
503 .PP
504 .RS
505 .TS
506 l l l l l l
507 _ _ _ _ _ _
508 l l l l l l .
509 \fBYear\fP      \fBSystem\fP    \fBArch\fP      \fBColor\fP     \fBChar\fP      \fBNotes\fP
510 1992    Solaris 5.2     32      6       17      SVr4 curses
511 1992    HP-UX 9 32      no      8       SVr2 curses
512 1992    AIX 3.2 32      no      23      SVr2 curses
513 1994    OSF/1 r3        32      no      23      SVr2 curses
514 1995    HP-UX 10.00     32      6       16      SVr3 \*(``curses_colr\*(''
515 1995    HP-UX 10.00     32      6       8       SVr4, X/Open curses
516 1995    Solaris 5.4     32/64   7       16      X/Open curses
517 1996    AIX 4.2 32      7       16      X/Open curses
518 1996    OSF/1 r4        32      6       16      X/Open curses
519 1997    HP-UX 11.00     32      6       8       X/Open curses
520 2000    U/Win   32/64   7/31    16      uses \fBchtype\fP
521 .TE
522 .RE
523 .PP
524 Notes:
525 .RS 3
526 .PP
527 Regarding HP-UX,
528 .bP
529 HP-UX 10.20 (1996) added support for 64-bit PA-RISC processors in 1996.
530 .bP
531 HP-UX 10.30 (1997) marked \*(``curses_colr\*('' obsolete.
532 That version of curses was dropped with HP-UX 11.30 in 2006.
533 .PP
534 Regarding OSF/1 (and Tru64),
535 .bP
536 These used 64-bit hardware.
537 Like ncurses, the OSF/1 curses interface is not customized for 32-bit
538 and 64-bit versions.
539 .bP
540 Unlike other systems which evolved from AT&T code,
541 OSF/1 provided a new implementation for X/Open curses.
542 .PP
543 Regarding Solaris,
544 .bP
545 The initial release of Solaris was in 1992.
546 .bP
547 The \fIxpg4\fP (X/Open) curses was developed by MKS from 1990 to 1995.
548 Sun's copyright began in 1996.
549 .bP
550 Sun updated the X/Open curses interface
551 after 64-bit support was introduced in 1997,
552 but did not modify the SVr4 curses interface.
553 .PP
554 Regarding U/Win,
555 .bP
556 Development of the curses library began in 1991, stopped in 2000.
557 .bP
558 Color support was added in 1998.
559 .bP
560 The library uses only \fBchtype\fP (no \fBcchar_t\fP).
561 .RE
562 .PP
563 Once X/Open curses was adopted in the mid-1990s, the constraint of
564 a 32-bit interface with many colors and wide-characters for \fBchtype\fP
565 became a moot point.
566 The \fBcchar_t\fP structure (whose size and
567 members are not specified in X/Open Curses) could be extended as needed.
568 .PP
569 Other interfaces are rarely used now:
570 .bP
571 BSD curses was improved slightly in 1993/1994 using Keith Bostic's
572 modification to make the library 8-bit clean for \fBnvi\fP(1).
573 He moved \fIstandout\fP attribute to a structure member.
574 .IP
575 The resulting 4.4BSD curses was replaced by ncurses over the next ten years.
576 .bP
577 U/Win is rarely used now.
578 .\" ---------------------------------------------------------------------------
579 .SH SEE ALSO
580 \fB\%curses\fP(3X),
581 \fB\%curs_addch\fP(3X),
582 \fB\%curs_addstr\fP(3X),
583 \fB\%curs_bkgd\fP(3X),
584 \fB\%curs_printw\fP(3X),
585 \fB\%curs_variables\fP(3X)