bug-ncurses
[Top][All Lists]
Advanced

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

[PATCH 091/177] man/curs_color.3x: Revise "PORTABILITY" section.


From: G. Branden Robinson
Subject: [PATCH 091/177] man/curs_color.3x: Revise "PORTABILITY" section.
Date: Mon, 13 Jan 2025 11:29:17 -0600

Content:
* Discuss X/Open Curses and SVr4 constraints, resurrecting material
  dropped from "RETURN VALUE" section.

Style:
* Favor "ncurses" over "this implementation".

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_color.3x | 56 +++++++++++++++++++++++++++++------------------
 1 file changed, 35 insertions(+), 21 deletions(-)

diff --git a/man/curs_color.3x b/man/curs_color.3x
index 6ca57f3b1..a2844579f 100644
--- a/man/curs_color.3x
+++ b/man/curs_color.3x
@@ -604,33 +604,47 @@ .SH PORTABILITY
 .B \%NCURSES_VERSION
 preprocessor macro.
 .PP
-This implementation satisfies X/Open Curses's minimum maximums
-for \fB\%COLORS\fP and \fB\%COLOR_PAIRS\fP.
+X/Open Curses Issue\ 4 describes these functions.
+It specifies no error conditions for them.
 .PP
-The \fB\%init_pair\fP routine accepts negative values of foreground
-and background color to support the \fB\%use_default_colors\fP(3X) extension,
-but only if that routine has been first invoked.
-.PP
-The assumption that \fB\%COLOR_BLACK\fP is the default
-background color for all terminals can be modified using the
-\fB\%assume_default_colors\fP(3X) extension.
-.PP
-This implementation checks the pointers,
-e.g., for the values returned by
-\fB\%color_content\fP and \fB\%pair_content\fP,
-and will treat those as optional parameters when null.
+.I \%ncurses
+satisfies X/Open Curses's minimum maximums for
+.I \%COLORS
+and
+.IR \%COLOR_PAIRS "."
 .PP
 X/Open Curses does not specify a limit for the number of colors and
 color pairs which a terminal can support.
-However, in its use of \fBshort\fP for the parameters,
+However,
+in its use of
+.I short
+for the parameters,
 it carries over SVr4's implementation detail for the compiled
-terminfo database, which uses signed 16-bit numbers.
-This implementation provides extended versions of those functions
-which use \fBshort\fP parameters,
-allowing applications to use larger color- and pair-numbers.
+.I \%term\%info
+database,
+which uses signed 16-bit numbers.
+.I \%ncurses
+provides extended versions of the functions using
+.I short
+parameters,
+allowing applications to use larger color and pair identifiers.
 .PP
-The \fB\%reset_color_pairs\fP function is an extension of
-\fI\%ncurses\fP.
+SVr4
+.I curses
+returns
+.I ERR
+from
+.I \%pair_content
+if its
+.I pair
+argument
+was not initialized using
+.I \%init_pairs,
+and from
+.I \%color_content
+if the terminal does not support changing colors.
+.I \%ncurses
+does neither.
 .SH HISTORY
 SVr3.2 introduced color support to curses in 1987.
 .PP
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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