.\"***************************************************************************
-.\" Copyright (c) 2001-2017,2019 Free Software Foundation, Inc. *
+.\" Copyright 2019-2021,2023 Thomas E. Dickey *
+.\" Copyright 2001-2015,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getcchar.3x,v 1.23 2019/11/30 22:22:32 tom Exp $
-.TH curs_getcchar 3X ""
+.\" $Id: curs_getcchar.3x,v 1.40 2023/11/11 11:39:43 tom Exp $
+.TH curs_getcchar 3X 2023-11-11 "ncurses 6.4" "Library calls"
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.SH NAME
-\fBgetcchar\fP,
-\fBsetcchar\fP \- Get a wide character string and rendition from a \fBcchar_t\fP or set a \fBcchar_t\fP from a wide-character string
+\fB\%getcchar\fP,
+\fB\%setcchar\fP \-
+convert between a wide-character string and a \fIcurses\fR complex character string
.SH SYNOPSIS
-\fB#include <curses.h>\fP
-.sp
-\fBint getcchar(\fP
-.br
+.nf
+\fB#include <curses.h>
+.PP
+\fBint getcchar(
.B " const cchar_t *\fIwcval\fP,"
-.br
.B " wchar_t *\fIwch\fP,"
-.br
.B " attr_t *\fIattrs\fP,"
-.br
.B " short *\fIcolor_pair\fP,"
-.br
.B " void *\fIopts\fP );"
-.sp
+.PP
.B "int setcchar("
-.br
.B " cchar_t *\fIwcval\fP,"
-.br
.B " const wchar_t *\fIwch\fP,"
-.br
.B " const attr_t \fIattrs\fP,"
-.br
.B " short \fIcolor_pair\fP,"
-.br
.B " const void *\fIopts\fP );"
+.fi
.SH DESCRIPTION
.SS getcchar
-.PP
The \fBgetcchar\fP function gets a wide-character string
and rendition from a \fBcchar_t\fP argument.
When \fIwch\fP is not a null pointer,
or
\fIcolor_pair\fP
.SS setcchar
-.PP
The \fBsetcchar\fP function initializes the location pointed to by \fIwcval\fP
by using:
.bP
\fIcolor_pair\fP
.bP
The wide-character string pointed to by \fIwch\fP.
-The string must be L'\\0' terminated,
+The string must be L'\e0' terminated,
contain at most one spacing character,
which must be the first.
.IP
The string may contain a single control character instead.
In that case, no nonspacing characters are allowed.
.SH EXTENSIONS
-.PP
X/Open Curses documents the \fIopts\fP argument as reserved for future use,
saying that it must be null.
-This implementation
+This implementation
uses that parameter in ABI 6 for the functions which have a color-pair
parameter to support extended color pairs:
.bP
and used to retrieve the color pair as an \fBint\fP value,
in addition retrieving it via the standard pointer to \fBshort\fP parameter.
.SH NOTES
-.PP
The \fIwcval\fP argument may be a value generated by a call to
\fBsetcchar\fP or by a function that has a \fBcchar_t\fP output argument.
If \fIwcval\fP is constructed by any other means, the effect is unspecified.
.SH RETURN VALUE
-.PP
When \fIwch\fP is a null pointer,
\fBgetcchar\fP returns the number of wide characters referenced by
\fIwcval\fP,
HP-UX\ 10 uses an opaque structure with 28 bytes,
which is large enough for the 6 \fBwchar_t\fP values.
.bP
-Solaris xpg4 curses uses a single array of 6 \fBwchar_t\fP values.
+Solaris \fIxpg4\fP curses uses a single array of 6 \fBwchar_t\fP values.
.PP
This implementation's \fBcchar_t\fP was defined in 1995
using \fB5\fP for the total of spacing and non-spacing characters
Unicode does not limit the (analogous) number of combining characters,
so some applications may be affected.
.SH SEE ALSO
-.PP
-Functions:
-\fBcurs_attr\fR(3X),
-\fBcurs_color\fR(3X),
-\fBcurses\fR(3X),
-\fBwcwidth\fR(3).
+\fB\%curses\fP(3X),
+\fB\%curs_attr\fP(3X),
+\fB\%curs_color\fP(3X),
+\fB\%wcwidth\fP(3)