]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_insstr.3x
ncurses 4.1
[ncurses.git] / man / curs_insstr.3x
1 .TH curs_insstr 3X ""
2 .SH NAME
3 \fBinsstr\fR, \fBinsnstr\fR, \fBwinsstr\fR, \fBwinsnstr\fR,
4 \fBmvinsstr\fR, \fBmvinsnstr\fR, \fBmvwinsstr\fR, \fBmvwinsnstr\fR - insert
5 string before cursor in a \fBcurses\fR window
6 .SH SYNOPSIS
7 \fB#include <curses.h>\fR
8 .br
9 \fBint insstr(const char *str);\fR
10 .br
11 \fBint insnstr(const char *str, int n);\fR
12 .br
13 \fBint winsstr(WINDOW *win, const char *str);\fR
14 .br
15 \fBint winsnstr(WINDOW *win, const char *str, int n);\fR
16 .br
17 \fBint mvinsstr(int y, int x, const char *str);\fR
18 .br
19 \fBint mvinsnstr(int y, int x, const char *str, int n);\fR
20 .br
21 \fBint mvwinsstr(WINDOW *win, int y, int x, const char *str);\fR
22 .br
23 \fBint mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);\fR
24 .br
25 .SH DESCRIPTION
26 These routines insert a character string (as many characters as will fit on the
27 line) before the character under the cursor.  All characters to the right of
28 the cursor are shifted right, with the possibility of the rightmost characters
29 on the line being lost.  The cursor position does not change (after moving to
30 \fIy\fR, \fIx\fR, if specified). The four routines with \fIn\fR as the last
31 argument insert a leading substring of at most \fIn\fR characters.  If
32 \fIn\fR<=0, then the entire string is inserted.
33
34 If a character in \fIstr\fR is a tab, newline, carriage return or
35 backspace, the cursor is moved appropriately within the window.  A
36 newline also does a \fBclrtoeol\fR before moving.  Tabs are considered
37 to be at every eighth column.  If a character in \fIstr\fR is another
38 control character, it is drawn in the \fB^\fR\fIX\fR notation.
39 Calling \fBwinch\fR after adding a control character (and moving to
40 it, if necessary) does not return the control character, but instead
41 returns a character in the the ^-representation of the control character.
42 .SH RETURN VALUE
43 All routines that return an integer return \fBERR\fR upon failure and OK (SVr4
44 specifies only "an integer value other than \fBERR\fR") upon successful
45 completion, unless otherwise noted in the preceding routine descriptions.
46 .SH NOTES
47 Note that all but \fBwinsnstr\fR may be macros.
48 .SH PORTABILITY
49 These functions are described in the XSI Curses standard, Issue 4, which adds
50 const qualifiers to the arguments.  The XSI Curses error conditions
51 \fBEILSEQ\fR and \fBEILOVERFLOW\fR associated with extended-level conformance
52 are not yet detected (this implementation does not yet support XPG4 multi-byte
53 characters).
54 .SH SEE ALSO
55 \fBcurses\fR(3X), \fBcurs_clear\fR(3X), \fBcurs_inch\fR(3X).
56 .\"#
57 .\"# The following sets edit modes for GNU EMACS
58 .\"# Local Variables:
59 .\"# mode:nroff
60 .\"# fill-column:79
61 .\"# End: