bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 31/42] Prefer "color pair(s)" to "color-pair(s)" in usage.


From: G. Branden Robinson
Subject: [PATCH 31/42] Prefer "color pair(s)" to "color-pair(s)" in usage.
Date: Sat, 16 Dec 2023 11:47:17 -0600

The former outnumbers the latter even in curs_color.3x itself.[1]

* man/curs_attr.3x:
* man/curs_color.3x:
* man/curs_getcchar.3x:
* man/curs_inch.3x:
* man/curs_scroll.3x:
* man/curs_slk.3x:
* man/curs_terminfo.3x:
* man/scr_dump.5:
* man/terminfo.tail: Do it.

[1]

$ git grep -c 'color-pair' man
man/curs_attr.3x:3
man/curs_color.3x:23
man/curs_getcchar.3x:2
man/curs_inch.3x:1
man/curs_scroll.3x:1
man/curs_slk.3x:2
man/curs_terminfo.3x:1
man/scr_dump.5:1
man/terminfo.tail:7
$ git grep -c 'color pair' man
man/curs_attr.3x:10
man/curs_bkgd.3x:2
man/curs_bkgrnd.3x:2
man/curs_color.3x:29
man/curs_getcchar.3x:5
man/curs_initscr.3x:1
man/curs_legacy.3x:2
man/curs_slk.3x:5
man/curs_util.3x:2
man/curs_variables.3x:2
man/default_colors.3x:4
man/new_pair.3x:20
man/scr_dump.5:1
man/terminfo.tail:3
---
 man/curs_attr.3x     |  6 +++---
 man/curs_color.3x    | 46 ++++++++++++++++++++++----------------------
 man/curs_getcchar.3x |  4 ++--
 man/curs_inch.3x     |  2 +-
 man/curs_scroll.3x   |  2 +-
 man/curs_slk.3x      |  4 ++--
 man/curs_terminfo.3x |  2 +-
 man/scr_dump.5       |  2 +-
 man/terminfo.tail    | 14 +++++++-------
 9 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/man/curs_attr.3x b/man/curs_attr.3x
index e17e7c4b6..d80336d2e 100644
--- a/man/curs_attr.3x
+++ b/man/curs_attr.3x
@@ -218,7 +218,7 @@ .SS Change character rendition
 the \fBmvwchgat\fP function does a cursor move before acting.
 .PP
 In these functions,
-the color \fIpair\fP argument is a color-pair index
+the color \fIpair\fP argument is a color pair index
 (as in the first argument of \fBinit_pair\fP, see \fBcurs_color\fP(3X)).
 .\" ---------------------------------------------------------------------------
 .SS Change window color
@@ -302,7 +302,7 @@ .SH RETURN VALUE
 for \fBwcolor_set\fP is outside the range 0..COLOR_PAIRS\-1.
 .bP
 does not return an error if either of the parameters of \fBwattr_get\fP
-used for retrieving attribute or color-pair values is \fBNULL\fP.
+used for retrieving attribute or color pair values is \fBNULL\fP.
 .PP
 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
 \fBwmove\fP, and return an error if the position is outside the window,
@@ -338,7 +338,7 @@ .SH EXTENSIONS
 which X/Open Curses still (after more than twenty years) documents
 as reserved for future use, saying that it should be \fBNULL\fP.
 This implementation uses that parameter in ABI 6 for the functions which
-have a color-pair parameter to support \fIextended color pairs\fP:
+have a color pair parameter to support \fIextended color pairs\fP:
 .bP
 For functions which modify the color, e.g.,
 \fBwattr_set\fP and \fBwattr_on\fP,
diff --git a/man/curs_color.3x b/man/curs_color.3x
index 0b3bded26..2e95505db 100644
--- a/man/curs_color.3x
+++ b/man/curs_color.3x
@@ -103,10 +103,10 @@ .SS Overview
 \fIcurses\fP supports color attributes on terminals with that capability.
 To use these routines \fB\%start_color\fP must be called, usually right after
 \fB\%initscr\fP.
-Colors are always used in pairs (referred to as color-pairs).
-A color-pair consists of a foreground color (for characters) and a background
+Colors are always used in pairs (referred to as color pairs).
+A color pair consists of a foreground color (for characters) and a background
 color (for the blank field on which the characters are displayed).
-A programmer initializes a color-pair with the routine \fB\%init_pair\fP.
+A programmer initializes a color pair with the routine \fB\%init_pair\fP.
 After it has been initialized, \fB\%COLOR_PAIR\fP(\fIn\fP)
 can be used to convert the pair to a video attribute.
 .PP
@@ -120,7 +120,7 @@ .SS Overview
 programmer to extract the amounts of red, green, and blue components in an
 initialized color.
 The routine \fB\%pair_content\fP allows a programmer to find
-out how a given color-pair is currently defined.
+out how a given color pair is currently defined.
 .SS Color Rendering
 The \fIcurses\fP library combines these inputs to produce the
 actual foreground and background colors shown on the screen:
@@ -201,7 +201,7 @@ .SS start_color
 .bP
 It initializes two global variables, \fB\%COLORS\fP and
 \fB\%COLOR_PAIRS\fP (respectively defining the maximum number of colors
-and color-pairs the terminal can support).
+and color pairs the terminal can support).
 .bP
 It initializes the special color pair \fB\%0\fP to the default foreground
 and background colors.
@@ -275,9 +275,9 @@ .SS can_change_color
 other, it returns \fBFALSE\fP.
 This routine facilitates writing terminal-independent programs.
 .SS init_pair
-The \fB\%init_pair\fP routine changes the definition of a color-pair.
+The \fB\%init_pair\fP routine changes the definition of a color pair.
 It takes three arguments:
-the number of the color-pair to be changed, the foreground
+the number of the color pair to be changed, the foreground
 color number, and the background color number.
 For portable applications:
 .bP
@@ -288,8 +288,8 @@ .SS init_pair
 .bP
 The second and third arguments must be valid color values.
 .PP
-If the color-pair was previously initialized,
-the screen is refreshed and all occurrences of that color-pair
+If the color pair was previously initialized,
+the screen is refreshed and all occurrences of that color pair
 are changed to the new definition.
 .PP
 As an extension,
@@ -299,10 +299,10 @@ .SS init_pair
 \fB\%use_default_colors\fP(3X) routine.
 .SS init_extended_pair
 Because \fB\%init_pair\fP uses signed \fBshort\fPs for its parameters,
-that limits color-pairs and color-values
+that limits color pairs and color-values
 to 32767 on modern hardware.
 The extension \fB\%init_extended_pair\fP uses \fBint\fPs
-for the color-pair and color-value,
+for the color pair and color-value,
 allowing a larger number of colors to be supported.
 .SS init_color
 The \fB\%init_color\fP routine changes the definition of a color.
@@ -353,8 +353,8 @@ .SS extended_color_content
 allowing a larger number of colors to be supported.
 .SS pair_content
 The \fB\%pair_content\fP routine allows programmers to find out what colors a
-given color-pair consists of.
-It requires three arguments: the color-pair
+given color pair consists of.
+It requires three arguments: the color pair
 number, and two addresses of \fBshort\fRs for storing the foreground and the
 background color numbers.
 .bP
@@ -366,14 +366,14 @@ .SS pair_content
 range \fB0\fP through \fB\%COLORS\fP, inclusive.
 .SS extended_pair_content
 Because \fB\%pair_content\fP uses signed \fBshort\fPs for its parameters,
-that limits color-pair and color-values to 32767 on modern hardware.
+that limits color pair and color-values to 32767 on modern hardware.
 The extension \fB\%extended_pair_content\fP uses \fBint\fPs
 for the color pair and
 for returning the foreground and background colors,
 allowing a larger number of colors to be supported.
 .SS reset_color_pairs
 The extension \fB\%reset_color_pairs\fP tells \fI\%ncurses\fP to discard
-all of the color-pair information which was set with \fB\%init_pair\fP.
+all of the color pair information which was set with \fB\%init_pair\fP.
 It also touches the current- and standard-screens, allowing an application to
 switch color palettes rapidly.
 .SS COLOR_PAIR
@@ -519,20 +519,20 @@ .SH HISTORY
 .bP
 X/Open Curses (1992-present)
 added a new structure \fB\%cchar_t\fP to store the character,
-attributes and color-pair values, allowing increased range of color-pairs.
-Both color-pairs and color-values used a signed \fBshort\fP,
+attributes and color pair values, allowing increased range of color pairs.
+Both color pairs and color-values used a signed \fBshort\fP,
 limiting values to 15 bits.
 .bP
 \fI\%ncurses\fP (1992-present) uses eight bits
 for \fB\%A_COLOR\fP in \fB\%chtype\fP values.
 .IP
 Version 5.3 provided a wide-character interface (2002),
-but left color-pairs as part of the attributes-field.
+but left color pairs as part of the attributes-field.
 .IP
 Since version 6 (2015),
-ncurses uses a separate \fBint\fP for color-pairs in the \fB\%cchar_t\fP 
values.
-When those color-pair values fit in 8 bits,
-ncurses allows color-pairs to be manipulated
+ncurses uses a separate \fBint\fP for color pairs in the \fB\%cchar_t\fP 
values.
+When those color pair values fit in 8 bits,
+ncurses allows color pairs to be manipulated
 via the functions using \fB\%chtype\fP values.
 .bP
 NetBSD curses used 6 bits from
@@ -540,8 +540,8 @@ .SH HISTORY
 At that point, NetBSD changed to use 10 bits.
 As of 2021, that size is unchanged.
 Like \fI\%ncurses\fP before version 6,
-the NetBSD color-pair information is stored in
-the attributes field of \fB\%cchar_t\fP, limiting the number of color-pairs
+the NetBSD color pair information is stored in
+the attributes field of \fB\%cchar_t\fP, limiting the number of color pairs
 by the size of the bitfield.
 .SH SEE ALSO
 \fB\%curses\fP(3X),
diff --git a/man/curs_getcchar.3x b/man/curs_getcchar.3x
index 0c19efb55..6b29d044f 100644
--- a/man/curs_getcchar.3x
+++ b/man/curs_getcchar.3x
@@ -66,7 +66,7 @@ .SS getcchar
 .bP
 Stores the character attributes in the location pointed to by \fIattrs\fP
 .bP
-Stores the color-pair in the location pointed to by \fIcolor_pair\fP
+Stores the color pair in the location pointed to by \fIcolor_pair\fP
 .bP
 Stores the wide-character string,
 characters referenced by \fIwcval\fP, into the array pointed to by \fIwch\fP.
@@ -123,7 +123,7 @@ .SH EXTENSIONS
 X/Open Curses documents the \fIopts\fP argument as reserved for future use,
 saying that it must be null.
 This implementation
-uses that parameter in ABI 6 for the functions which have a color-pair
+uses that parameter in ABI 6 for the functions which have a color pair
 parameter to support extended color pairs:
 .bP
 For  functions  which modify the color, e.g., \fBsetcchar\fP,
diff --git a/man/curs_inch.3x b/man/curs_inch.3x
index 4e5f14d8a..7bf685682 100644
--- a/man/curs_inch.3x
+++ b/man/curs_inch.3x
@@ -77,7 +77,7 @@ .SS Attributes
 l l .
 \fBA_CHARTEXT\fP       Bit-mask to extract character
 \fBA_ATTRIBUTES\fP     Bit-mask to extract attributes
-\fBA_COLOR\fP  Bit-mask to extract color-pair field information
+\fBA_COLOR\fP  Bit-mask to extract color pair field information
 .TE
 .SH RETURN VALUE
 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
diff --git a/man/curs_scroll.3x b/man/curs_scroll.3x
index 3f3ce7119..930dfdb89 100644
--- a/man/curs_scroll.3x
+++ b/man/curs_scroll.3x
@@ -90,7 +90,7 @@ .SH NOTES
 .PP
 Neither the SVr4 nor the XSI documentation specify whether the current
 attribute or
-current color-pair of blanks generated by the scroll function is zeroed.
+current color pair of blanks generated by the scroll function is zeroed.
 Under this implementation it is.
 .SH PORTABILITY
 The XSI Curses standard, Issue 4 describes these functions.
diff --git a/man/curs_slk.3x b/man/curs_slk.3x
index 3f8e0188a..a6add7f90 100644
--- a/man/curs_slk.3x
+++ b/man/curs_slk.3x
@@ -242,7 +242,7 @@ .SH EXTENSIONS
 as reserved for future use,
 saying that it must be null.
 This implementation
-uses that parameter in ABI 6 for the functions which have a color-pair
+uses that parameter in ABI 6 for the functions which have a color pair
 parameter to support extended color pairs.
 .PP
 For  functions  which modify the color, e.g., \fB\%slk_attr_set\fP,
@@ -261,7 +261,7 @@ .SH PORTABILITY
 Two of these new functions (unlike the SVr4 functions) have no provision
 for color: \fB\%slk_attr_on\fP and \fB\%slk_attr_off\fP.
 .IP
-The third function \%(\fBslk_attr_set\fP) has a color-pair parameter.
+The third function \%(\fBslk_attr_set\fP) has a color pair parameter.
 .bP
 It added \fBconst\fP qualifiers to parameters (unnecessarily), and
 .bP
diff --git a/man/curs_terminfo.3x b/man/curs_terminfo.3x
index 276ff1f4b..c1bab7a09 100644
--- a/man/curs_terminfo.3x
+++ b/man/curs_terminfo.3x
@@ -366,7 +366,7 @@ .SS "Output Functions"
 .bP
 \fIattrs\fP of type \fBattr_t\fP for the attributes and
 .bP
-\fIpair\fP of type \fBshort\fP for the color-pair number.
+\fIpair\fP of type \fBshort\fP for the color pair number.
 .PP
 The \fBvid_attr\fP and \fBvid_puts\fP routines
 are designed to use the attribute constants with the \fBWA_\fP prefix.
diff --git a/man/scr_dump.5 b/man/scr_dump.5
index ed929e8fe..39c31042c 100644
--- a/man/scr_dump.5
+++ b/man/scr_dump.5
@@ -351,7 +351,7 @@ .SH EXAMPLES
 ensure they are not overlooked.
 .bP
 Attributes are written in escaped curly braces, e.g., \*(``\e{BOLD}\*('',
-and may include a color-pair (C1 or C2 in this example).
+and may include a color pair (C1 or C2 in this example).
 .bP
 The parameters in the header are written out only if they are nonzero.
 When reading back, order does not matter.
diff --git a/man/terminfo.tail b/man/terminfo.tail
index 8b5e3c948..094c931e0 100644
--- a/man/terminfo.tail
+++ b/man/terminfo.tail
@@ -1630,21 +1630,21 @@ terminals have a predefined set of \fIN\fP colors
 (where \fIN\fP is usually 8),
 and can set
 character-cell foreground and background characters independently, mixing them
-into \fIN\fP\ *\ \fIN\fP color-pairs.
+into \fIN\fP\ *\ \fIN\fP color pairs.
 .bP
 On HP-like terminals, the user must set each color
 pair up separately (foreground and background are not independently settable).
-Up to \fIM\fP color-pairs may be set up from 2*\fIM\fP different colors.
+Up to \fIM\fP color pairs may be set up from 2*\fIM\fP different colors.
 ANSI-compatible terminals are Tektronix-like.
 .PP
 Some basic color capabilities are independent of the color method.
 The numeric
 capabilities \fBcolors\fP and \fBpairs\fP specify the maximum numbers of colors
-and color-pairs that can be displayed simultaneously.
+and color pairs that can be displayed simultaneously.
 The \fBop\fP (original
 pair) string resets foreground and background colors to their default values
 for the terminal.
-The \fBoc\fP string resets all colors or color-pairs to
+The \fBoc\fP string resets all colors or color pairs to
 their default values for the terminal.
 Some terminals (including many PC
 terminal emulators) erase screen areas with the current background color rather
@@ -1718,7 +1718,7 @@ white     COLOR_WHITE     7       max,    max,    max
 It is important to not confuse the two sets of color capabilities;
 otherwise red/blue will be interchanged on the display.
 .PP
-On an HP-like terminal, use \fBscp\fP with a color-pair number parameter to set
+On an HP-like terminal, use \fBscp\fP with a color pair number parameter to set
 which color pair is current.
 .PP
 Some terminals allow the \fIcolor values\fP to be modified:
@@ -1736,8 +1736,8 @@ The ranges are
 terminal-dependent.
 .bP
 On an HP-like terminal, \fBinitp\fP may give a capability for changing a
-color-pair value.
-It will take seven parameters; a color-pair number (0 to
+color pair value.
+It will take seven parameters; a color pair number (0 to
 \fBmax_pairs\fP \- 1), and two triples describing first background and then
 foreground colors.
 These parameters must be (Red, Green, Blue) or
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]