'\"macro stdmacro
.if n .pH g3x.curs_insstr @(#)curs_insstr	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/curs_insstr	1.6"
.nr X
.if \nX=0 .ds x} curs_insstr 3X "" "\&"
.if \nX=1 .ds x} curs_insstr 3X ""
.if \nX=2 .ds x} curs_insstr 3X "" "\&"
.if \nX=3 .ds x} curs_insstr "" "" "\&"
.TH \*(x}
.SH NAME
\f4curs_instr\f2: \f4 insstr\f1, \f4insnstr\f1, \f4winsstr\f1, \f4winsnstr\f1, \f4mvinsstr\f1, \f4mvinsnstr\f1, \f4mvwinsstr\f1, \f4mvwinsnstr\f1 \- insert string before character under the cursor in a \f4curses\fP window
.SH SYNOPSIS
.nf
.ft 4
#include <curses.h>
.sp .5
int insstr(char *str);
.sp 0.25
int insnstr(char *str, int n);
.sp 0.25
int winsstr(WINDOW *win, char *str);
.sp 0.25
int winsnstr(WINDOW *win, char *str, int n);
.sp 0.25
int mvinsstr(int y, int x, char *str);
.sp 0.25
int mvinsnstr(int y, int x, char *str, int n);
.sp 0.25
int mvwinsstr(WINDOW *win, int y, int x, char *str);
.sp 0.25
int mvwinsnstr(WINDOW *win, int y, int x, char *str, int n);
.ft 1
.fi
.SH DESCRIPTION
With these routines, a character string
(as many characters as will fit on the line)
is inserted before the character under the cursor.
All characters to the right of the cursor
are moved to the right, with the possibility of
the rightmost characters on the line being lost.
The cursor position does not change
(after moving to \f2y\f1, \f2x\f1, if specified).
(This does not imply use of the hardware insert character feature.)
The four routines with \f2n\f1 as the last argument insert at most 
\f2n\f1 characters.
If \f2n\f1<=0, then the entire string is inserted.
.P
If a character in \f2str\fP is a tab, newline, carriage return
or backspace, the cursor
is moved appropriately within the window.
A newline also does a \f4clrtoeol\f1 before moving.
Tabs are considered to be at every eighth column.
If a character in \f2str\fP
is another control character, it is drawn in the \f4^\f2X\f1 notation.
Calling \f4winch\f1 after adding a control character (and moving to
it, if necessary) does not return the control character, but
instead returns the representation of the control character.
.SH RETURN VALUE
All routines return the integer \f4ERR\f1 upon
failure and an integer value other than \f4ERR\f1
upon successful completion.
.SH NOTES
.P
The header file \f4<curses.h>\f1 automatically includes the header files
\f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
.PP
Note that all but \f4winsnstr\f1 may be macros.
.SH SEE ALSO
.na
\f4curses\fP(3X),
\f4curs_clear\fP(3X),
\f4curs_inch\fP(3X).
.ad
