HP-UX Reference (11i v1 05/09) - 3 Library Functions A-M (vol 6)
c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
No other identifiers are reserved.
Applications must not declare or define identifiers with the same name as an identifier reserved in the
same context. Since macro names are replaced whenever found, independent of scope and name space,
macro names matching any of the reserved identifier names must not be defined if any associated header is
included.
Headers may be included in any order, and each may be included more than once in a given scope, with no
difference in effect from that of being included only once.
If used, a header must be included outside of any external declaration or definition, and it must be first
included before the first reference to any type or macro it defines, or to any function or object it declares.
However, if an identifier is declared or defined in more than one header, the second and subsequent associ-
ated headers may be included after the initial reference to the identifier. Prior to the inclusion of a header,
the program must not define any macros with names lexically identical to symbols defined by that header.
Interfaces Implemented as Macros (ENHANCED CURSES)
The requirements in this section are in effect only for implementations that claim Enhanced Curses compli-
ance.
The following interfaces with arguments must be implemented as macros. The relevance to the application
programmer is that the ‘&’ character cannot be used before the arguments.
Macros Man Page
COLOR_PAIR( ), PAIR_NUMBER( ) can_change_color()
getbegyx(),getmaxyx(), getparyx(),getyx() getbegyx()
The descriptions in <curses.h>, <term.h>, <unctrl.h> list other macros, like COLOR_BLACK,
that do not take arguments.
Relationship to the X/Open System Interfaces and Headers, Issue 4, Version 2 specification
Error Numbers
Most functions provide an error number in errno , which is either a variable or macro defined in
<errno.h>; the macro expands to a modifiable lvalue of type int.
A list of valid values for errno and advice to application writers on the use of errno appears in the X/Open
System Interfaces and Headers, Issue 4, Version 2 specification .
Data Types
All of the data types used by Curses functions are defined by the implementation. The following list
describes these types:
attr_t An integral type that can contain at least an unsigned short. The type attr_t is used to
hold an OR-ed set of attributes defined in
<curses.h> that begin with the prefix WA_.
bool Boolean data type
chtype An integral type that can contain at least an unsigned char and attributes. Values of
type chtype are formed by OR-ing together an unsigned char value and zero or more of
the base attribute flags defined in <curses.h> that have the A_ prefix. The applica-
tion can extract these components of a chtype value using the base masks defined in
<curses.h> for this purpose.
The chtype data type also contains a colour-pair. Values of type chtype are formed by OR-ing
together an unsigned char value, a colour pair, and zero or more of the attributes defined in
<curses.h> that begin with the prefix A_. The application can extract these components of a
chtype value using the masks defined in <curses.h> for this purpose.
SCREEN An opaque terminal representation.
wchar_t As described in <stddef.h> .
cchar_t A type that can reference a string of wide characters of up to an implementation-
dependent length, a colour-pair, and zero or more attributes from the set of all attributes
defined in this document. A null cchar_t object is an object that references a empty
wide-character string. Arrays of cchar_t objects are terminated by a null cchar_t
object.
Section 3−−116 Hewlett-Packard Company − 3 − HP-UX 11i Version 1: September 2005