1curs_insstr(3CURSES) Curses Library Functions curs_insstr(3CURSES)
2
3
4
6 curs_insstr, insstr, insnstr, winsstr, winsnstr, mvinsstr, mvinsnstr,
7 mvwinsstr, mvwinsnstr - insert string before character under the cursor
8 in a curses window
9
11 cc [ flag ... ] file ... -lcurses [ library ... ]
12 #include <curses.h>
13
14 int insstr(char *str);
15
16
17 int insnstr(char *str, int n);
18
19
20 int winsstr(WINDOW *win, char *str);
21
22
23 int winsnstr(WINDOW *win, char *str, int n);
24
25
26 int mvinsstr(int y, int x, char *str);
27
28
29 int mvinsnstr(int y, int x, char *str, int n);
30
31
32 int mvwinsstr(WINDOW *win, int y, int x, char *str);
33
34
35 int mvwinsnstr(WINDOW *win, int y, int x, char *str, int n);
36
37
39 With these routines, a character string (as many characters as will fit
40 on the line) is inserted before the character under the cursor. All
41 characters to the right of the cursor are moved to the right, with the
42 possibility of the rightmost characters on the line being lost. The
43 cursor position does not change (after moving to y, x, if specified).
44 (This does not imply use of the hardware insert character feature.) The
45 four routines with n as the last argument insert at most n characters.
46 If n<=0, then the entire string is inserted.
47
48
49 If a character in str is a tab, newline, carriage return or backspace,
50 the cursor is moved appropriately within the window. A newline also
51 does a clrtoeol() before moving. Tabs are considered to be at every
52 eighth column. If a character in str is another control character, it
53 is drawn in the ^X notation. Calling winch() after adding a control
54 character (and moving to it, if necessary) does not return the control
55 character, but instead returns the representation of the control char‐
56 acter.
57
59 All routines return the integer ERR upon failure and an integer value
60 other than ERR upon successful completion.
61
63 See attributes(5) for descriptions of the following attributes:
64
65
66
67
68 ┌─────────────────────────────┬─────────────────────────────┐
69 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
70 ├─────────────────────────────┼─────────────────────────────┤
71 │MT-Level │Unsafe │
72 └─────────────────────────────┴─────────────────────────────┘
73
75 curs_clear(3CURSES), curs_inch(3CURSES), curses(3CURSES), attributes(5)
76
78 The header <curses.h> automatically includes the headers <stdio.h> and
79 <unctrl.h>.
80
81
82 Note that all but winsnstr() may be macros.
83
84
85
86SunOS 5.11 31 Dec 1996 curs_insstr(3CURSES)