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