[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 026/177] man/curs_attr.3x: Heavily revise "HISTORY" section.
From: |
G. Branden Robinson |
Subject: |
[PATCH 026/177] man/curs_attr.3x: Heavily revise "HISTORY" section. |
Date: |
Mon, 13 Jan 2025 11:18:02 -0600 |
Content:
* Begin at the beginning, with 4BSD curses, instead of with X/Open
Curses. Discuss the width of the type it used for character cells,
aiding the reader to understand the library's consequent non-handling
of colors and multiple attributes.
* Present innovations of SVr2 curses.
* Replace discussion of Goodheart's book and a somewhat scattershot
presentation of post-SVr3(.0) developments in System V with a more
linear and detailed narrative (thanks to "liberated" source code
publicly available on GitHub). Drop mentions of `acs_map[]`, pads,
the window background character, and soft label keys, not (completely)
relevant here.
* Cross reference curs_color(3X) page when mentioning `A_COLOR`.
* Describe X/Open Curses's further innovations, which heavily impacted
color and attribute management.
* Document ncurses 6.0's `A_ITALIC` innovation.
* More clearly state U/Win's deadness (its AT&T webpage was shut down in
2012; in 2014, a snapshot of its 2012 appeared on GitHub, whereupon it
immediately went utterly dormant).
* In general, identify when the various API symbols became available.
Style:
* Set function and macro names in italics, not bold, when referring to
them generically (as in the "PORTABILITY" and "HISTORY" sections), as
opposed to the ncurses topic/implementation.
* Set non-ncurses man page cross reference in italics, not bold.
Markup:
* Favor man(7) font style macros over *roff font selection escape
sequences, except for man page cross references (because
man/make_sed.sh recognizes only certain patterns when rewriting such
cross references) and terms in the "NAME" section (because the
generated edit_man.sh script expects font selection escape sequences
when scraping terms thence to gather names for man page aliases).
---
man/curs_attr.3x | 199 ++++++++++++++++++++++++++++++-----------------
1 file changed, 126 insertions(+), 73 deletions(-)
diff --git a/man/curs_attr.3x b/man/curs_attr.3x
index fea12b710..7530a3925 100644
--- a/man/curs_attr.3x
+++ b/man/curs_attr.3x
@@ -544,84 +544,125 @@ .SH PORTABILITY
(i.e., via the \fBsgr1\fP capability).
.\" ---------------------------------------------------------------------------
.SH HISTORY
-X/Open Curses is largely based on SVr4
-.IR curses ","
-adding support for \*(``wide-characters\*('' (not specific to Unicode).
-Some of the X/Open differences from SVr4
+4BSD (1980)
.I curses
-address the way
-video attributes can be applied to wide-characters.
-But aside from that, \fBattrset\fP and \fBattr_set\fP are similar.
-SVr4
+used a
+.I char
+to represent each cell of the terminal screen.
+It assumed 7-bit character codes,
+employing the eighth bit of a byte to represent a
+.I \%standout
+attribute
+(often implemented as bold and/or reverse video).
+It introduced
+.IR \%standout ","
+.IR \%standend ","
+.IR \%wstandout ","
+and
+.I \%wstandend
+functions to manipulate this bit.
+Despite their inflexibility,
+they carried over into System\ V
.I curses
-provided the basic features for manipulating video attributes.
-However, earlier versions of
+and ultimately X/Open Curses
+due to their pervasive use in legacy applications.
+While some 1980s terminals supported a variety of video attributes,
+BSD
.I curses
-provided a part of these features.
+could do nothing with them.
.PP
-As seen in 2.8BSD,
+SVr2 (1984) provided an improved
.I curses
-assumed 7-bit characters,
-using the eighth bit of a byte to represent the \fIstandout\fP
-feature (often implemented as bold and/or reverse video).
-The BSD
+library,
+introducing
+.I \%chtype
+to create the abstract notion of a
.I curses
-library provided functions \fBstandout\fP and \fBstandend\fP
-which were carried along into X/Open Curses due to their pervasive use
-in legacy applications.
+character;
+this was by default an
+.IR "unsigned short" ","
+with a provision for compile-time redefinition to other integral types
+(a freedom not necessarily available to users of shared libraries,
+and in any event a source license was necessary to exercise it).
+It added the functions
+.IR \%attron ","
+.IR \%attroff ","
+.IR \%attrset ","
+.IR \%wattron ","
+.IR \%wattroff ","
+and
+.IR \%wattrset ","
+and defined the
+.I A_
+macros listed above
+(except for
+.I \%A_ITALIC
+and
+.IR \%A_COLOR ")"
+for use by applications to manipulate other attributes.
+The values of these macros
+were not necessarily the same in different systems,
+even among those certified as System\ V.
+.PP
+SVr3.2 (1988)
+added the
+.I \%A_COLOR
+macro along with a color system;
+see \fBcurs_color\fP(3X).
.PP
-Some terminals in the 1980s could support a variety of video attributes,
-although the BSD
-.I curses
-library could do nothing with those.
-System V (1983) provided an improved
+X/Open Curses is largely based on SVr4
+.IR curses ","
+but recognized that the
+.I \%wchar_t
+type of ISO C95 was intended to house only a single character code,
+not a sequence of codes combining with a base character,
+let alone could it reliably offer room for a color pair identifier
+and a set of attribute bits with a potential for further growth \(em
+thus the standard invented the
.I curses
-library.
-It defined the \fBA_\fP symbols for use by applications to manipulate the
-other attributes.
-There are few useful references for the chronology.
-.PP
-Goodheart's book
-\fIUNIX Curses Explained\fP (1991) describes SVr3 (1987),
-commenting on several functions:
-.bP
-the \fBattron\fP, \fBattroff\fP, \fBattrset\fP functions
-(and most of the functions found in SVr4 but not in BSD
-.IR curses ")"
-were
-introduced by System V,
-.bP
-the alternate character set feature with \fBA_ALTCHARSET\fP was
-added in SVr2 and improved in SVr3 (by adding \fBacs_map[]\fP),
-.bP
-\fBstart_color\fP and related color-functions were introduced by System V.3.2,
-.bP
-pads, soft-keys were added in SVr3, and
-.PP
-Goodheart did not mention the background character or the
+complex character type
.I \%cchar_t
-type.
-Those are respectively SVr3.1 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.
+and a separate type
+.I \%attr_t
+for storage of attribute bits.
+The new types brought along several new functions to manipulate them,
+some corresponding to existing
+.IR chtype -based
+functions
+.RI \%( attr_on ,
+.IR \%attr_off ","
+.IR \%attr_set ","
+.IR \%wattr_on ","
+.IR \%wattr_off ","
+and
+.IR \%wattr_set "),"
+and some new
+.RI \%( color_set ,
+.IR \%wcolor_set ","
+.IR \%chgat ","
+.IR \%wchgat ","
+.IR \%mvchgat ","
+and
+.IR \%mvwchgat ")."
.PP
-Different Unix systems used different sizes for the bit-fields in
+Different Unix systems used differently sized bit fields in
.I \%chtype
-for \fIcharacters\fP and \fIcolors\fP, and took into account the different
-integer sizes (32-bit versus 64-bit).
+for the character code and the color pair identifier,
+and took into account platforms' different integer sizes
+(32- versus 64-bit).
.PP
-This table showing the number of bits for \fBA_COLOR\fP
-and \fBA_CHARTEXT\fP
+The following table showing the number of bits for
+.I \%A_COLOR
+and
+.I \%A_CHARTEXT
was gleaned from the
.I curses
-header files for
-various operating systems and architectures.
-The inferred architecture and notes reflect
-the format and size of the defined constants
+header files for various operating systems and architectures.
+The inferred architecture and notes
+reflect the format and size of the defined constants
as well as clues such as the alternate character set implementation.
A 32-bit library can be used on a 64-bit system,
-but not necessarily the reverse.
+but not necessarily the converse.
.PP
.TS
Lb Lb Lb Cb S Lb
@@ -672,7 +713,10 @@ .SH HISTORY
.bP
The initial release of Solaris was in 1992.
.bP
-The \fIxpg4\fP (X/Open) Curses was developed by MKS from 1990 to 1995.
+Its XPG4
+(X/Open Curses-conforming)
+.I xcurses
+library was developed by Mortice Kern Systems from 1990 to 1995.
Sun's copyright began in 1996.
.bP
Sun updated the X/Open Curses interface
@@ -691,7 +735,7 @@ .SH HISTORY
.bP
The library uses only
.I \%chtype
-(no
+(not
.IR \%cchar_t ")."
.RE
.PP
@@ -701,23 +745,32 @@ .SH HISTORY
became a moot point.
The
.I \%cchar_t
-structure (whose size and
-members are not specified in X/Open Curses) could be extended as needed.
+structure
+(whose size and members are not specified in X/Open Curses)
+could be extended as needed.
.PP
-Other interfaces are rarely used now:
+Other interfaces are rarely used now.
.bP
BSD
.I curses
was improved slightly in 1993/1994 using Keith Bostic's
-modification to make the library 8-bit clean for \fBnvi\fP(1).
-He moved \fIstandout\fP attribute to a structure member.
-.IP
+modification to make the library 8-bit clean for \fInvi\fP(1).
+He moved the
+.I \%standout
+attribute to a structure member.
The resulting 4.4BSD
.I curses
-was replaced by \fI\%ncurses\fP over the
-next ten years.
+was replaced by
+.I \%ncurses
+over the next ten years.
.bP
-U/Win is rarely used now.
+U/Win has been defunct since 2012.
+.PP
+.I \%ncurses
+6.0 (2015)
+added the
+.I A_ITALIC
+macro.
.\" ---------------------------------------------------------------------------
.SH SEE ALSO
\fB\%curses\fP(3X),
--
2.30.2
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 026/177] man/curs_attr.3x: Heavily revise "HISTORY" section.,
G. Branden Robinson <=