4 <STRONG>insstr</STRONG>, <STRONG>insnstr</STRONG>, <STRONG>winsstr</STRONG>, <STRONG>winsnstr</STRONG>, <STRONG>mvinsstr</STRONG>, <STRONG>mvinsnstr</STRONG>,
5 <STRONG>mvwinsstr</STRONG>, <STRONG>mvwinsnstr</STRONG> - insert string before cursor in a
6 <STRONG>curses</STRONG> window
10 <H2>SYNOPSIS</H2><PRE>
11 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
12 <STRONG>int</STRONG> <STRONG>insstr(const</STRONG> <STRONG>char</STRONG> <STRONG>*str);</STRONG>
13 <STRONG>int</STRONG> <STRONG>insnstr(const</STRONG> <STRONG>char</STRONG> <STRONG>*str,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
14 <STRONG>int</STRONG> <STRONG>winsstr(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*str);</STRONG>
15 <STRONG>int</STRONG> <STRONG>winsnstr(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*str,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
16 <STRONG>int</STRONG> <STRONG>mvinsstr(int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*str);</STRONG>
17 <STRONG>int</STRONG> <STRONG>mvinsnstr(int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*str,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
18 <STRONG>int</STRONG> <STRONG>mvwinsstr(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*str);</STRONG>
19 <STRONG>int</STRONG> <STRONG>mvwinsnstr(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*str,</STRONG>
20 <STRONG>int</STRONG> <STRONG>n);</STRONG>
24 <H2>DESCRIPTION</H2><PRE>
25 These routines insert a character string (as many charac-
26 ters as will fit on the line) before the character under
27 the cursor. All characters to the right of the cursor are
28 shifted right, with the possibility of the rightmost char-
29 acters on the line being lost. The cursor position does
30 not change (after moving to <EM>y</EM>, <EM>x</EM>, if specified). The four
31 routines with <EM>n</EM> as the last argument insert a leading sub-
32 string of at most <EM>n</EM> characters. If <EM>n</EM><=0, then the entire
35 If a character in <EM>str</EM> is a tab, newline, carriage return
36 or backspace, the cursor is moved appropriately within the
37 window. A newline also does a <STRONG>clrtoeol</STRONG> before moving.
38 Tabs are considered to be at every eighth column. If a
39 character in <EM>str</EM> is another control character, it is drawn
40 in the <STRONG>^</STRONG><EM>X</EM> notation. Calling <STRONG>winch</STRONG> after adding a control
41 character (and moving to it, if necessary) does not return
42 the control character, but instead returns a character in
43 the ^-representation of the control character.
47 <H2>RETURN VALUE</H2><PRE>
48 All routines that return an integer return <STRONG>ERR</STRONG> upon fail-
49 ure and OK (SVr4 specifies only "an integer value other
50 than <STRONG>ERR</STRONG>") upon successful completion, unless otherwise
51 noted in the preceding routine descriptions.
56 Note that all but <STRONG>winsnstr</STRONG> may be macros.
60 <H2>PORTABILITY</H2><PRE>
61 These functions are described in the XSI Curses standard,
62 Issue 4, which adds const qualifiers to the arguments.
63 The XSI Curses error conditions <STRONG>EILSEQ</STRONG> and <STRONG>EILOVERFLOW</STRONG>
64 associated with extended-level conformance are not yet
65 detected (this implementation does not yet support XPG4
66 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="curs_clear.3x.html">curs_clear(3X)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3X)</A></STRONG>.