cursgetcchar(3X) cursgetcchar(3X)
NAME
getcchar, setcchar - Get a wide character string and rendition from a
cchart or set a cchart from a wide-character string
SYNOPSIS
##include <>
int getcchar(
const cchart **wcval,,
wchart **wch,,
attrt **attrs,,
short **colorpair,,
void **opts );;
int setcchar(
cchart **wcval,,
const wchart **wch,,
const attrt attrs,,
short colorpair,,
void **opts );;
DESCRIPTION
The getcchar function gets a wide-character string and rendition from a
cchart argument. When wch is not a null pointer, the getcchar func-
tion does the following:
- Extracts information from a cchart value wcval
- Stores the character attributes in the location pointed to by
attrs
- Stores the color-pair in the location pointed to by colorpair
- Stores the wide-character string, characters referenced by wcval,
into the array pointed to by wch.
When wch is a null pointer, the getcchar function does the following:
- Obtains the number of wide characters pointed to by wcval
- Does not change the data referenced by attrs or colorpair
The setcchar function initializes the location pointed to by wcval by
using:
- The character attributes in attrs
- The color pair in colorpair
- The wide-character string pointed to by wch. The string must be
L'\0' terminated, contain at most one character with strictly pos-
itive width, which must be the first, and contain no characters of
negative width.
NOTES
The opts argument is reserved for future use. Currently, an applica-
tion must provide a null pointer as opts.
The wcval argument may be a value generated by a call to setcchar or by
a function that has a cchart output argument. If wcval is constructed
by any other means, the effect is unspecified.
RETURN VALUES
When wch is a null pointer, getcchar returns the number of wide charac-
ters referenced by wcval, including the null terminator.
When wch is not a null pointer, getcchar returns OK upon successful
completion, and ER otherwise.
Upon successful completion, setcchar returns OK. Otherwise, it returns
ER.
SEE ALSO
Functions: curses(3X), wcwidth(3X), cursattrget(3X),
canchangecolor(3X).
cursgetcchar(3X)
|