]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/curs_insstr.3x.html
ncurses 4.1
[ncurses.git] / Ada95 / html / curs_insstr.3x.html
1 <HTML>
2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
3 <PRE>
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
7
8
9 </PRE>
10 <H2>SYNOPSIS</H2><PRE>
11        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</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>
21
22
23 </PRE>
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>&lt;=0, then the  entire
33        string is inserted.
34
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 the ^-representation of the control character.
44
45
46 </PRE>
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.
52
53
54 </PRE>
55 <H2>NOTES</H2><PRE>
56        Note that all but <STRONG>winsnstr</STRONG> may be macros.
57
58
59 </PRE>
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>.
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118 </PRE>
119 </BODY>
120 </HTML>