.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getcchar.3x,v 1.35 2023/09/16 23:34:43 tom Exp $
-.TH curs_getcchar 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_getcchar.3x,v 1.42 2023/11/25 14:30:18 tom Exp $
+.TH curs_getcchar 3X 2023-11-25 "ncurses 6.4" "Library calls"
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
\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
The \fBgetcchar\fP function gets a wide-character string
\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
.IP
The string may contain a single control character instead.
In that case, no nonspacing characters are allowed.
+.SH RETURN VALUE
+When \fIwch\fP is a null pointer,
+\fBgetcchar\fP returns the number of wide characters referenced by
+\fIwcval\fP,
+including one for a trailing null.
+.PP
+When \fIwch\fP is not a null pointer,
+\fBgetcchar\fP returns \fBOK\fP upon successful completion,
+and \fBERR\fP otherwise.
+.PP
+Upon successful completion, \fBsetcchar\fP returns \fBOK\fP.
+Otherwise, it returns \fBERR\fP.
+.SH NOTES
+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 EXTENSIONS
X/Open Curses documents the \fIopts\fP argument as reserved for future use,
saying that it must be null.
if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
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
-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
-When \fIwch\fP is a null pointer,
-\fBgetcchar\fP returns the number of wide characters referenced by
-\fIwcval\fP,
-including one for a trailing null.
-.PP
-When \fIwch\fP is not a null pointer,
-\fBgetcchar\fP returns \fBOK\fP upon successful completion,
-and \fBERR\fP otherwise.
-.PP
-Upon successful completion, \fBsetcchar\fP returns \fBOK\fP.
-Otherwise, it returns \fBERR\fP.
.SH PORTABILITY
The \fBCCHARW_MAX\fP symbol is specific to ncurses.
X/Open Curses does not provide details for the layout of the \fBcchar_t\fP
Unicode does not limit the (analogous) number of combining characters,
so some applications may be affected.
.SH SEE ALSO
-Functions:
-\fBcurs_attr\fP(3X),
-\fBcurs_color\fP(3X),
-\fBcurses\fP(3X),
-\fBwcwidth\fP(3).
+\fB\%curses\fP(3X),
+\fB\%curs_attr\fP(3X),
+\fB\%curs_color\fP(3X),
+\fB\%wcwidth\fP(3)