[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 17/32] man/curs_add_wchstr.3x: Align wording with curs_addchstr.3
From: |
G. Branden Robinson |
Subject: |
[PATCH 17/32] man/curs_add_wchstr.3x: Align wording with curs_addchstr.3x. |
Date: |
Sat, 11 May 2024 08:30:19 -0500 |
Also add cross reference to bkgrnd.3x to aid reader with the "window
background" concept, unneeded by curs_addchstr.3x.
man/man_db.renames.in: Add `waddstr()`, `waddnstr()`, and `wunctrl()`.
---
man/curs_add_wchstr.3x | 83 ++++++++++++++++++++++++++----------------
man/man_db.renames.in | 3 ++
2 files changed, 55 insertions(+), 31 deletions(-)
diff --git a/man/curs_add_wchstr.3x b/man/curs_add_wchstr.3x
index 5dd3e8f4e..5e83aa15e 100644
--- a/man/curs_add_wchstr.3x
+++ b/man/curs_add_wchstr.3x
@@ -69,45 +69,63 @@ .SH SYNOPSIS
\fBint mvwadd_wchnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const
cchar_t *\fIwchstr\fP, int \fIn\fP);
.fi
.SH DESCRIPTION
-These functions copy the (null-terminated)
-array of complex characters \fIwchstr\fP
-into the window image structure
-starting at the current cursor position.
+.B \%wadd_wchstr
+copies the string of complex characters
+.I \%wchstr
+to the window
+.IR win "."
+A null complex character terminates the string.
+If a complex character does completely fit at the end of the line,
+.I curses
+fills the remaining columns with the window background;
+see \fB\%bkgrnd\fP(3X).
+.B \%wadd_wchnstr
+does the same,
+but copies at most
+.I n
+characters,
+or as many as possible if
+.I n
+is
+.BR \-1 "."
+\fB\%ncurses\fP(3X) describes the variants of these functions.
.PP
-The four functions with \fIn\fP as the last
-argument copy at most \fIn\fP elements,
-but no more than will fit on the line.
-If \fBn\fP=\fB\-1\fP then the whole array is copied,
-to the maximum number of characters that will fit on the line.
-.PP
-The window cursor is \fInot\fP advanced.
-These functions are faster than \fBwaddnstr\fP.
-On the other hand:
+Because these functions do not call \fB\%wadd_wch\fP(3X) internally,
+they are faster than \fB\%waddwstr\fP(3X) and \fB\%waddnwstr\fP(3X).
+On the other hand,
+they
.bP
-they do not perform checking
-(such as for the newline, backspace, or carriage return characters),
+do not treat the backspace,
+carriage return,
+or line feed characters specially;
.bP
-they do not advance the current cursor position,
+do not represent unprintable characters with \fB\%wunctrl\fP(3X);
.bP
-they do not expand other control characters to ^-escapes, and
+do not update the cursor position to follow the last character written;
.bP
-they truncate the string if it crosses the right margin,
-rather than wrapping it around to the new line.
-.PP
-These functions end successfully
-on encountering a null \fBcchar_t\fP, or
-when they have filled the current line.
-If a complex character cannot completely fit at the end of the current line,
-the remaining columns are filled with the background character and rendition.
+truncate the string at the window's right margin,
+rather than wrapping it to the next line and potentially scrolling.
.SH RETURN VALUE
-All functions return the integer \fBERR\fP upon failure and \fBOK\fP on
success.
+These functions return
+.B OK
+on success and
+.B ERR
+on failure.
.PP
X/Open Curses does not specify any error conditions.
-This implementation returns an error
+.I \%ncurses
+returns
+.B ERR
+if
.bP
-if the \fIwin\fP parameter is null or
+.I win
+is
+.B NULL
+or
.bP
-if the \fIwchstr\fP parameter is null.
+.I wchstr
+is
+.BR NULL "."
.PP
Functions prefixed with \*(``mv\*('' first perform cursor movement and
fail if the position
@@ -115,9 +133,12 @@ .SH RETURN VALUE
.IR x )
is outside the window boundaries.
.SH NOTES
-All functions except \fBwadd_wchnstr\fP may be macros.
+All of these functions except
+.B \%wadd_wchnstr
+may be implemented as macros.
.SH PORTABILITY
-These functions are described in X/Open Curses, Issue 4.
+X/Open Curses,
+Issue 4 describes these functions.
.SH SEE ALSO
\fB\%curs_addchstr\fP(3X) describes comparable functions of the
.I \%ncurses
diff --git a/man/man_db.renames.in b/man/man_db.renames.in
index 2b18a016e..4c50eff1e 100644
--- a/man/man_db.renames.in
+++ b/man/man_db.renames.in
@@ -266,6 +266,8 @@ use_tioctl.3x use_tioctl.3ncurses
vidputs.3x vidputs.3ncurses
wadd_wch.3x wadd_wch.3ncurses
waddch.3x waddch.3ncurses
+waddnstr.3x waddnstr.3ncurses
+waddnwstr.3x waddnwstr.3ncurses
waddstr.3x waddstr.3ncurses
waddwstr.3x waddwstr.3ncurses
wattr_set.3x wattr_set.3ncurses
@@ -286,6 +288,7 @@ wnoutrefresh.3x wnoutrefresh.3ncurses
wrefresh.3x wrefresh.3ncurses
wsetscrreg.3x wsetscrreg.3ncurses
wtimeout.3x wtimeout.3ncurses
+wunctrl.3x wunctrl.3ncurses
#
# Other:
getty.8 getty.8
--
2.30.2
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 17/32] man/curs_add_wchstr.3x: Align wording with curs_addchstr.3x.,
G. Branden Robinson <=