bug-ncurses
[Top][All Lists]
Advanced

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

[PATCH 078/100] man/curs_delch.3x: Revise.


From: G. Branden Robinson
Subject: [PATCH 078/100] man/curs_delch.3x: Revise.
Date: Sat, 30 Mar 2024 17:00:49 -0500

Content:
* Refer reader to bkgd(3X) (or bkgrnd(3X)) immediately upon mentioning
  the "blank character", so that they don't assume they know what is
  meant.
* Speak of SVr4 curses in "PORTABILITY" section, not "RETURN VALUE".

Style:
* Speak primarily in terms of `wdelch()` for convenience and because
  that is the core of the implementation.  Refer reader to ncurses(3x)
  regarding the usual set of variants.
* Favor active voice over passive.
* Align failure boilerplates with curs_insch.3x.
* Align macro availability boilerplate with curs_insch.3x.
* Align capability exercise boilerplate with curs_insch.3x.
* Prefer "X/Open Curses" to "XSI Curses standard".
---
 man/curs_delch.3x | 72 ++++++++++++++++++++++++++++++++++-------------
 1 file changed, 52 insertions(+), 20 deletions(-)

diff --git a/man/curs_delch.3x b/man/curs_delch.3x
index 7a3cb2027..fdbcf0cfd 100644
--- a/man/curs_delch.3x
+++ b/man/curs_delch.3x
@@ -44,7 +44,9 @@ .SH NAME
 \fB\%wdelch\fP,
 \fB\%mvdelch\fP,
 \fB\%mvwdelch\fP \-
-delete the character at the cursor in a \fIcurses\fR window
+delete a character from a
+.I curses
+window
 .SH SYNOPSIS
 .nf
 \fB#include <curses.h>
@@ -55,28 +57,58 @@ .SH SYNOPSIS
 \fBint mvwdelch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP);
 .fi
 .SH DESCRIPTION
-These routines delete the character under the cursor; all characters to the
-right of the cursor on the same line are moved to the left one position and the
-last character on the line is filled with a blank.
-The cursor position does
-not change (after moving to \fIy\fP, \fIx\fP, if specified).
-(This does not
-imply use of the hardware delete character feature.)
+.B \%wdelch
+deletes the character at the cursor position in
+.IR win .
+\fB\%ncurses\fP(3X) describes the variants of this function.
+.PP
+.B \%wdelch
+moves all characters to the right of the cursor on the same line to the
+left one position and replaces the contents of the rightmost position on
+the line with the window's blank character;
+see \fB\%bkgd\fP(3X)
+(wide-character API users may consult \fB\%bkgrnd\fP(3X) instead).
+The cursor position does not change
+(after moving to
+.RI ( y ,
+.IR x ),
+if specified).
 .SH RETURN VALUE
-All routines return the integer \fBERR\fP upon failure and an \fBOK\fP
-(SVr4 specifies only
-\*(``an integer value other than \fBERR\fP\*('')
-upon successful completion.
+These functions return
+.B OK
+on success and
+.B ERR
+on failure.
+.PP
+Functions taking a
+.I \%WINDOW
+pointer argument fail if the pointer is
+.BR NULL .
 .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,
-or if the window pointer is null.
+Functions prefixed with \*(``mv\*('' first perform cursor movement and
+fail if the position
+.RI ( y ,
+.IR x )
+is outside the window.
 .SH NOTES
-Note that \fBdelch\fP, \fBmvdelch\fP, and \fBmvwdelch\fP may be macros.
+.BR \%delch ,
+.BR \%mvdelch ,
+and
+.B \%mvwdelch
+may be implemented as macros.
+.PP
+A terminal's
+.B \%delete_character
+.RB ( dch1 )
+capability
+is not necessarily employed.
 .SH PORTABILITY
-These functions are described in the XSI Curses standard, Issue 4.
-The
-standard specifies that they return \fBERR\fP on failure, but specifies no
-error conditions.
+X/Open Curses, Issue 4, describes these functions.
+.PP
+SVr4
+.I curses
+describes a successful return value only as
+\*(``an integer value other than
+.BR ERR \*(''.
 .SH SEE ALSO
 \fB\%curses\fP(3X)
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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