summaryrefslogtreecommitdiff
path: root/man/curs_insch.3x
diff options
context:
space:
mode:
Diffstat (limited to 'man/curs_insch.3x')
-rw-r--r--man/curs_insch.3x71
1 files changed, 45 insertions, 26 deletions
diff --git a/man/curs_insch.3x b/man/curs_insch.3x
index baf2f6cc1bbb..5a760415071f 100644
--- a/man/curs_insch.3x
+++ b/man/curs_insch.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright 2018-2023,2024 Thomas E. Dickey *
+.\" Copyright 2018-2024,2025 Thomas E. Dickey *
.\" Copyright 1998-2010,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
@@ -27,8 +27,8 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_insch.3x,v 1.40 2024/04/20 19:03:47 tom Exp $
-.TH curs_insch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
+.\" $Id: curs_insch.3x,v 1.56 2025/03/08 23:10:02 tom Exp $
+.TH curs_insch 3X 2025-03-08 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
@@ -39,6 +39,11 @@
.ie t .ds '' ''
.el .ds '' ""
.\}
+.
+.de bP
+.ie n .IP \(bu 4
+.el .IP \(bu 2
+..
.SH NAME
\fB\%insch\fP,
\fB\%winsch\fP,
@@ -50,23 +55,25 @@ insert a \fIcurses\fP character in a window
\fB#include <curses.h>\fP
.PP
\fBint insch(chtype \fIch\fP);
-\fBint winsch(WINDOW *\fIwin\fP, chtype \fIch\fP);
+\fBint winsch(WINDOW * \fIwin\fP, chtype \fIch\fP);
\fBint mvinsch(int \fIy\fP, int \fIx\fP, chtype \fIch\fP);
-\fBint mvwinsch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, chtype \fIch\fP);
+\fBint mvwinsch(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, chtype \fIch\fP);
.fi
.SH DESCRIPTION
-These functions insert the
+.B \%winsch
+inserts the
.I curses
character
.I ch
-at the cursor in the specified window
-.I win
-(or
-.BR \%stdscr ).
+at the cursor position in the window
+.IR win "."
The character previously at the cursor and any to its right move one
cell to the right;
-the rightmost character on the line is discarded.
-The cursor does not advance.
+the formerly rightmost character on the line is discarded.
+Unlike \fB\%addch\fP(3X),
+.B \%winsch
+does not advance the cursor.
+\fB\%ncurses\fP(3X) describes the variants of this function.
.SH "RETURN VALUE"
These functions return
.B OK
@@ -74,10 +81,22 @@ on success and
.B ERR
on failure.
.PP
-Functions taking a
+In
+.IR \%ncurses ,
+they return
+.B ERR
+if
+.bP
+the
+.I curses
+screen has not been initialized,
+or
+.bP
+(for functions taking a
.I \%WINDOW
-pointer argument fail if the pointer is
-.BR NULL .
+pointer argument)
+.I win
+is a null pointer.
.PP
Functions prefixed with \*(``mv\*('' first perform cursor movement and
fail if the position
@@ -85,26 +104,26 @@ fail if the position
.IR x )
is outside the window boundaries.
.SH NOTES
-.BR \%insch ,
-.BR \%mvinsch ,
+.BR \%insch ","
+.BR \%mvinsch ","
and
.B \%mvwinsch
may be implemented as macros.
.PP
-A terminal's
+.I curses
+does not necessarily employ the terminal's
.B \%insert_character
.RB ( ich1 )
-capability
-is not necessarily employed.
+capability to achieve insertion.
.SH PORTABILITY
-X/Open Curses,
-Issue 4 describes these functions.
+X/Open Curses Issue\ 4 describes these functions.
+It specifies no error conditions for them.
.PP
-SVr4
-.I curses
-describes a successful return value only as
+SVr4 describes a successful return value only as
\*(``an integer value other than
-.BR ERR \*(''.
+.IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 509
+.SH HISTORY
+SVr2 (1984) introduced these functions.
.SH "SEE ALSO"
\fB\%curs_ins_wch\fP(3X) describes comparable functions in the
wide-character