[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 31/51] man/curs_attr.3x: Set data type names in italics.
From: |
G. Branden Robinson |
Subject: |
[PATCH 31/51] man/curs_attr.3x: Set data type names in italics. |
Date: |
Fri, 26 Jul 2024 12:51:46 -0500 |
...and protect them from hyphenation.
---
man/curs_attr.3x | 81 +++++++++++++++++++++++++++++++++++-------------
1 file changed, 59 insertions(+), 22 deletions(-)
diff --git a/man/curs_attr.3x b/man/curs_attr.3x
index afabf6f96..e813e0899 100644
--- a/man/curs_attr.3x
+++ b/man/curs_attr.3x
@@ -156,8 +156,12 @@ .SS "Legacy Window Attributes"
These newer routines use similar names, because
X/Open simply added an underscore (\fB_\fP) for the newer names.
.PP
-The \fBint\fP datatype used in the legacy routines is treated as if
-it is the same size as \fBchtype\fP (used by \fBaddch\fP(3X)).
+The
+.I int
+datatype used in the legacy routines is treated as if
+it is the same size as
+.I \%chtype
+(used by \fBaddch\fP(3X)).
It holds the common video attributes (such as bold, reverse),
as well as a few bits for color.
Those bits correspond to the \fBA_COLOR\fP symbol.
@@ -181,8 +185,10 @@ .SS "Legacy Window Attributes"
then \fBCOLOR_PAIR(\fI259\fB)\fR is 4
(i.e., 259 is 4 more than the limit 255).
.PP
-The \fBPAIR_NUMBER\fP macro extracts a pair number from an \fBint\fP
-(or \fBchtype\fP).
+The \fBPAIR_NUMBER\fP macro extracts a pair number from an
+.I int
+(or
+.IR \%chtype ")."
For example, the \fIinput\fP and \fIoutput\fP values in these statements
would be the same:
.PP
@@ -198,8 +204,10 @@ .SS "Legacy Window Attributes"
compatibility.
.PP
The remaining \fBattr\fP* functions operate exactly like the corresponding
-\fBattr_\fP* functions, except that they take arguments of type \fBint\fP
-rather than \fBattr_t\fP.
+\fBattr_\fP* functions, except that they take arguments of type
+.I int
+rather than
+.IR \%attr_t "."
.PP
There is no corresponding \fB\%attrget\fP function as such
in X/Open Curses,
@@ -377,15 +385,24 @@ .SH EXTENSIONS
.bP
For functions which modify the color, e.g.,
\fBwattr_set\fP and \fBwattr_on\fP,
-if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
-and used to set the color pair instead of the \fBshort\fP \fIpair\fP parameter.
+if \fIopts\fP is set it is treated as a pointer to
+.IR int ","
+and used to set the color pair instead of the
+.I short
+.I pair
+parameter.
.bP
For functions which retrieve the color, e.g.,
\fBwattr_get\fP,
-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,
+if \fIopts\fP is set it is treated as a pointer to
+.IR int ","
+and used to retrieve the color pair as an
+.I int
+value,
in addition to
-retrieving it via the standard pointer to \fBshort\fP parameter.
+retrieving it via the standard pointer to
+.I short
+parameter.
.bP
For functions which turn attributes off, e.g.,
\fBwattr_off\fP,
@@ -397,8 +414,11 @@ .SH PORTABILITY
It specifies no error conditions for them.
.PP
The standard defined the dedicated type for highlights,
-\fBattr_t\fP, which was not defined in SVr4 curses.
-The functions taking \fBattr_t\fP arguments were not supported under SVr4.
+.IR \%attr_t ","
+which was not defined in SVr4 curses.
+The functions taking
+.I \%attr_t
+arguments were not supported under SVr4.
.PP
Very old versions of this library did not force an update of the screen
when changing the attributes.
@@ -455,17 +475,25 @@ .SH PORTABILITY
However, in some implementations, those symbols have unrelated values.
.IP
For example, the Solaris \fIxpg4\fP (X/Open) curses declares
-\fBattr_t\fP to be an unsigned short integer (16-bits),
-while \fBchtype\fP is a unsigned integer (32-bits).
+.I \%attr_t
+to be an unsigned short integer (16-bits),
+while
+.I \%chtype
+is a unsigned integer (32-bits).
The \fBWA_\fP symbols in this case are different from the \fBA_\fP symbols
because they are used for a smaller datatype which does not
represent \fBA_CHARTEXT\fP or \fBA_COLOR\fP.
.IP
In this implementation (as in many others), the values happen to be
the same because it simplifies copying information between
-\fBchtype\fP and \fBcchar_t\fP variables.
+.I \%chtype
+and
+.I \%cchar_t
+variables.
.bP
-Because \fI\%ncurses\fP's \fBattr_t\fP can hold a color pair
+Because \fI\%ncurses\fP's
+.I \%attr_t
+can hold a color pair
(in the \fBA_COLOR\fP field),
a call to
\fBwattr_on\fP,
@@ -523,13 +551,16 @@ .SH HISTORY
.bP
pads, soft-keys were added in SVr3, and
.PP
-Goodheart did not mention the background character or the \fBcchar_t\fP type.
+Goodheart did not mention the background character or the
+.I \%cchar_t
+type.
Those are respectively SVr4 and X/Open features.
He did mention the \fBA_\fP constants, but did not indicate their values.
Those were not the same in different systems,
even for those marked as System V.
.PP
-Different Unix systems used different sizes for the bit-fields in \fBchtype\fP
+Different Unix systems used different sizes for the bit-fields in
+.I \%chtype
for \fIcharacters\fP and \fIcolors\fP, and took into account the different
integer sizes (32-bit versus 64-bit).
.PP
@@ -600,13 +631,19 @@ .SH HISTORY
.bP
Color support was added in 1998.
.bP
-The library uses only \fBchtype\fP (no \fBcchar_t\fP).
+The library uses only
+.I \%chtype
+(no
+.IR \%cchar_t ")."
.RE
.PP
Once X/Open curses was adopted in the mid-1990s, the constraint of
-a 32-bit interface with many colors and wide-characters for \fBchtype\fP
+a 32-bit interface with many colors and wide-characters for
+.I \%chtype
became a moot point.
-The \fBcchar_t\fP structure (whose size and
+The
+.I \%cchar_t
+structure (whose size and
members are not specified in X/Open Curses) could be extended as needed.
.PP
Other interfaces are rarely used now:
--
2.30.2
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 31/51] man/curs_attr.3x: Set data type names in italics.,
G. Branden Robinson <=