1inchnstr(3XCURSES) X/Open Curses Library Functions inchnstr(3XCURSES)
2
3
4
6 inchnstr, inchstr, mvinchnstr, mvinchstr, mvwinchnstr, mvwinchstr,
7 winchnstr, winchstr - retrieve a single-byte character string (with
8 rendition)
9
11 cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib \
12 -R /usr/xpg4/lib -lcurses [ library... ]
13
14 c89 [ flag... ] file... -lcurses [ library... ]
15
16 #include <curses.h>
17
18 int inchnstr(chtype *chstr, int n);
19
20
21 int inchstr(chtype *chstr);
22
23
24 int mvinchnstr(int y, int x, chtype *chstr, int n);
25
26
27 int mvinchstr(int y, int x, chtype *chstr);
28
29
30 int mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);
31
32
33 int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);
34
35
36 int winchnstr(WINDOW *win, chtype *chstr, int n);
37
38
39 int winchstr(WINDOW *win, chtype *chstr);
40
41
43 The inchstr() and winchstr() functions retrieve the character string
44 (with rendition) starting at the current cursor position of the stdscr
45 window and window win, respectively, and ending at the right margin.
46 The mvinchstr() and mvwinchstr() functions retrieve the character
47 string located at the position indicated by the x (column) and y (row)
48 parameters (the former in the stdscr window; the latter in window
49 win).
50
51
52 The inchnstr(), winchnstr(), mvinchnstr(), and mvwinchnstr() functions
53 retrieve at most n characters from the window stdscr and win, respec‐
54 tively. The former two functions retrieve the string, starting at the
55 current cursor position; the latter two commands retrieve the string,
56 starting at the position specified by the x and y parameters.
57
58
59 All these functions store the retrieved character string in the object
60 pointed to by chstr.
61
62
63 The complete character/attribute pair is retrieved. The character or
64 attributes can be extracted by performing a bitwise AND on the
65 retrieved value, using the constants A_CHARTEXT, A_ATTRIBUTES, and
66 A_COLOR. The character string can also be retrieved without attributes
67 by using instr(3XCURSES) set of functions.
68
70 chstr Is a pointer to an object that can hold the retrieved charac‐
71 ter string.
72
73
74 n Is the number of characters not to exceed when retrieving
75 chstr.
76
77
78 y Is the y (row) coordinate of the starting position of the
79 string to be retrieved.
80
81
82 x Is the x (column) coordinate of the starting position of the
83 string to be retrieved.
84
85
86 win Is a pointer to the window in which the string is to be
87 retrieved.
88
89
91 On success, these functions return OK. Otherwise, they return ERR.
92
94 None.
95
97 See attributes(5) for descriptions of the following attributes:
98
99
100
101
102 ┌─────────────────────────────┬─────────────────────────────┐
103 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
104 ├─────────────────────────────┼─────────────────────────────┤
105 │Interface Stability │Standard │
106 ├─────────────────────────────┼─────────────────────────────┤
107 │MT-Level │Unsafe │
108 └─────────────────────────────┴─────────────────────────────┘
109
111 inch(3XCURSES), innstr(3XCURSES), libcurses(3XCURSES), attributes(5),
112 standards(5)
113
114
115
116SunOS 5.11 5 Jun 2002 inchnstr(3XCURSES)