1innstr(3XCURSES) X/Open Curses Library Functions innstr(3XCURSES)
2
3
4
6 innstr, instr, mvinnstr, mvinstr, mvwinnstr, mvwinstr, winnstr, winstr
7 - retrieve a multibyte character string (without rendition)
8
10 cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib \
11 -R /usr/xpg4/lib -lcurses [ library... ]
12
13 c89 [ flag... ] file... -lcurses [ library... ]
14
15 :#include <curses.h>
16
17 int innstr(char *str, int n);
18
19
20 int instr(char *str);
21
22
23 int mvinnstr(int y, int x, char *str, int n);
24
25
26 int mvinstr(int y, int x, char *str);
27
28
29 int mvwinnstr(WINDOW *win, int y, int x, char *str, int n);
30
31
32 int mvwinstr(WINDOW *win, int y, int x, char *str);
33
34
35 int winstr(WINDOW *win, char *str);
36
37
38 int winnstr(WINDOW *win, char *str, int n);
39
40
42 str Is a pointer to an object that can hold the retrieved multibyte
43 character string.
44
45
46 n Is the number of characters not to exceed when retrieving str.
47
48
49 y Is the y (row) coordinate of the starting position of the string
50 to be retrieved.
51
52
53 x Is the x (column) coordinate of the starting position of the
54 string to be retrieved.
55
56
57 win Is a pointer to the window in which the string is to be
58 retrieved.
59
60
62 The instr() and winstr() functions retrieve a multibyte character
63 string (without attributes) starting at the current cursor position of
64 the stdscr window and window win, respectively, and ending at the right
65 margin. The mvinstr() and mvwinstr() functions retrieve a multibyte
66 character string located at the position indicated by the x (column)
67 and y (row) parameters (the former in the stdscr window; the latter
68 in window win).
69
70
71 The innstr(), winnstr(), mvinnstr(), and mvwinnstr() functions
72 retrieve at most n characters from the window stdscr and win, respec‐
73 tively. The former two functions retrieve the string starting at the
74 current cursor position; the latter two commands return the string,
75 starting at the position specified by the x and y parameters.
76
77
78 All these functions store the retrieved string in the object pointed to
79 by str. They only store complete multibyte characters. If the area
80 pointed to by str is not large enough to hold at least one character,
81 these functions fail.
82
83
84 Only the character portion of the character/rendition pair is returned.
85 To return the complete character/rendition pair, use winchstr().
86
88 OK Successful completion.
89
90
91 ERR An error occurred.
92
93
95 All functions except winnstr() may be macros.
96
98 See attributes(5) for descriptions of the following attributes:
99
100
101
102
103 ┌─────────────────────────────┬─────────────────────────────┐
104 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
105 ├─────────────────────────────┼─────────────────────────────┤
106 │Interface Stability │Standard │
107 ├─────────────────────────────┼─────────────────────────────┤
108 │MT-Level │Unsafe │
109 └─────────────────────────────┴─────────────────────────────┘
110
112 inch(3XCURSES), inchstr(3XCURSES), libcurses(3XCURSES), attributes(5),
113 standards(5)
114
115
116
117SunOS 5.11 5 Jun 2002 innstr(3XCURSES)