]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_insch.3x
ncurses 6.2 - patch 20201205
[ncurses.git] / man / curs_insch.3x
1 .\"***************************************************************************
2 .\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
3 .\" Copyright 1998-2010,2017 Free Software Foundation, Inc.                  *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: curs_insch.3x,v 1.19 2020/10/18 00:21:39 tom Exp $
31 .TH curs_insch 3X ""
32 .ie \n(.g .ds `` \(lq
33 .el       .ds `` ``
34 .ie \n(.g .ds '' \(rq
35 .el       .ds '' ''
36 .SH NAME
37 \fBinsch\fR,
38 \fBwinsch\fR,
39 \fBmvinsch\fR,
40 \fBmvwinsch\fR \- insert a character before cursor in a \fBcurses\fR window
41 .SH SYNOPSIS
42 \fB#include <curses.h>\fR
43 .sp
44 \fBint insch(chtype \fP\fIch\fP\fB);\fR
45 .br
46 \fBint winsch(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fR
47 .sp
48 \fBint mvinsch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB);\fR
49 .br
50 \fBint mvwinsch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB);\fR
51 .br
52 .SH DESCRIPTION
53 These routines insert the character \fIch\fR before the character under the
54 cursor.
55 All characters to the right of the cursor are moved one space to the
56 right, with the possibility of the rightmost character on the line being lost.
57 The insertion operation does not change the cursor position.
58 .SH RETURN VALUE
59 All routines that return an integer return \fBERR\fR upon failure and \fBOK\fP
60 (SVr4 specifies only "an integer value other than \fBERR\fR")
61 upon successful completion,
62 unless otherwise noted in the preceding routine descriptions.
63 .PP
64 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
65 \fBwmove\fP, and return an error if the position is outside the window,
66 or if the window pointer is null.
67 .SH NOTES
68 These routines do not necessarily imply use of a hardware insert character
69 feature.
70 .PP
71 Note that \fBinsch\fR, \fBmvinsch\fR, and \fBmvwinsch\fR may be macros.
72 .SH PORTABILITY
73 These functions are described in the XSI Curses standard, Issue 4.
74 .SH SEE ALSO
75 \fBcurses\fR(3X).
76 .PP
77 Comparable functions in the wide-character (ncursesw) library are
78 described in
79 \fBcurs_ins_wch\fR(3X).