1curs_inchstr(3X) curs_inchstr(3X)
2
3
4
6 inchstr, inchnstr, winchstr, winchnstr, mvinchstr, mvinchnstr,
7 mvwinchstr, mvwinchnstr - get a string of characters (and attributes)
8 from a curses window
9
11 #include <curses.h>
12
13 int inchstr(chtype *chstr);
14 int inchnstr(chtype *chstr, int n);
15 int winchstr(WINDOW *win, chtype *chstr);
16 int winchnstr(WINDOW *win, chtype *chstr, int n);
17
18 int mvinchstr(int y, int x, chtype *chstr);
19 int mvinchnstr(int y, int x, chtype *chstr, int n);
20 int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);
21 int mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);
22
24 These routines return a NULL-terminated array of chtype quantities,
25 starting at the current cursor position in the named window and ending
26 at the right margin of the window. The four functions with n as the
27 last argument, return a leading substring at most n characters long
28 (exclusive of the trailing (chtype)0). Constants defined in <curses.h>
29 can be used with the & (logical AND) operator to extract the character
30 or the attribute alone from any position in the chstr [see
31 curs_inch(3X)].
32
34 All routines return the integer ERR upon failure and an integer value
35 other than ERR upon successful completion (the number of characters re‐
36 trieved, exclusive of the trailing 0).
37
38 X/Open Curses defines no error conditions. In this implementation:
39
40 • If the win parameter is null, an error is returned,
41
42 • If the chstr parameter is null, an error is returned,
43
44 Functions with a “mv” prefix first perform a cursor movement using
45 wmove, and return an error if the position is outside the window, or if
46 the window pointer is null.
47
49 Note that all routines except winchnstr may be macros. SVr4 does not
50 document whether the result string is zero-terminated; it does not doc‐
51 ument whether a length limit argument includes any trailing 0; and it
52 does not document the meaning of the return value.
53
55 These functions are described in the XSI Curses standard, Issue 4. It
56 is no more specific than the SVr4 documentation on the trailing 0. It
57 does specify that the successful return of the functions is OK.
58
60 curses(3X), curs_inch(3X).
61
62 Comparable functions in the wide-character (ncursesw) library are de‐
63 scribed in curs_in_wchstr(3X).
64
65
66
67 curs_inchstr(3X)