]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_insstr.3x
955ac8df639761e67da4b21b7821a64a46082161
[ncurses.git] / man / curs_insstr.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998 Free Software Foundation, Inc.                        *
3 .\"                                                                          *
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 .\"
29 .\" $Id: curs_insstr.3x,v 1.10 1998/07/25 20:32:57 Todd.Miller Exp $
30 .TH curs_insstr 3X ""
31 .SH NAME
32 \fBinsstr\fR, \fBinsnstr\fR, \fBwinsstr\fR, \fBwinsnstr\fR,
33 \fBmvinsstr\fR, \fBmvinsnstr\fR, \fBmvwinsstr\fR, \fBmvwinsnstr\fR - insert
34 string before cursor in a \fBcurses\fR window
35 .SH SYNOPSIS
36 \fB#include <curses.h>\fR
37 .br
38 \fBint insstr(const char *str);\fR
39 .br
40 \fBint insnstr(const char *str, int n);\fR
41 .br
42 \fBint winsstr(WINDOW *win, const char *str);\fR
43 .br
44 \fBint winsnstr(WINDOW *win, const char *str, int n);\fR
45 .br
46 \fBint mvinsstr(int y, int x, const char *str);\fR
47 .br
48 \fBint mvinsnstr(int y, int x, const char *str, int n);\fR
49 .br
50 \fBint mvwinsstr(WINDOW *win, int y, int x, const char *str);\fR
51 .br
52 \fBint mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);\fR
53 .br
54 .SH DESCRIPTION
55 These routines insert a character string (as many characters as will fit on the
56 line) before the character under the cursor.  All characters to the right of
57 the cursor are shifted right, with the possibility of the rightmost characters
58 on the line being lost.  The cursor position does not change (after moving to
59 \fIy\fR, \fIx\fR, if specified). The four routines with \fIn\fR as the last
60 argument insert a leading substring of at most \fIn\fR characters.  If
61 \fIn\fR<=0, then the entire string is inserted.
62
63 If a character in \fIstr\fR is a tab, newline, carriage return or
64 backspace, the cursor is moved appropriately within the window.  A
65 newline also does a \fBclrtoeol\fR before moving.  Tabs are considered
66 to be at every eighth column.  If a character in \fIstr\fR is another
67 control character, it is drawn in the \fB^\fR\fIX\fR notation.
68 Calling \fBwinch\fR after adding a control character (and moving to
69 it, if necessary) does not return the control character, but instead
70 returns a character in the ^-representation of the control character.
71 .SH RETURN VALUE
72 All routines that return an integer return \fBERR\fR upon failure and OK (SVr4
73 specifies only "an integer value other than \fBERR\fR") upon successful
74 completion, unless otherwise noted in the preceding routine descriptions.
75 .SH NOTES
76 Note that all but \fBwinsnstr\fR may be macros.
77 .SH PORTABILITY
78 These functions are described in the XSI Curses standard, Issue 4, which adds
79 const qualifiers to the arguments.  The XSI Curses error conditions
80 \fBEILSEQ\fR and \fBEILOVERFLOW\fR associated with extended-level conformance
81 are not yet detected (this implementation does not yet support XPG4 multi-byte
82 characters).
83 .SH SEE ALSO
84 \fBcurses\fR(3X), \fBcurs_clear\fR(3X), \fBcurs_inch\fR(3X).
85 .\"#
86 .\"# The following sets edit modes for GNU EMACS
87 .\"# Local Variables:
88 .\"# mode:nroff
89 .\"# fill-column:79
90 .\"# End: