1curs_inchstr(3X)                                              curs_inchstr(3X)
2
3
4

NAME

6       inchstr, inchnstr, winchstr, winchnstr, mvinchstr, mvinchnstr,
7       mvwinchstr, mvwinchnstr - get a string of characters (and attributes)
8       from a curses window
9

SYNOPSIS

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       int mvinchstr(int y, int x, chtype *chstr);
18       int mvinchnstr(int y, int x, chtype *chstr, int n);
19       int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);
20       int mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);
21

DESCRIPTION

23       These  routines  return  a  NULL-terminated array of chtype quantities,
24       starting at the current cursor position in the named window and  ending
25       at  the  right  margin of the window.  The four functions with n as the
26       last argument, return a leading substring at  most  n  characters  long
27       (exclusive of the trailing (chtype)0).  Constants defined in <curses.h>
28       can be used with the & (logical AND) operator to extract the  character
29       or   the   attribute   alone  from  any  position  in  the  chstr  [see
30       curs_inch(3X)].
31

RETURN VALUE

33       All routines return the integer ERR upon failure and an  integer  value
34       other than ERR upon successful completion (the number of characters re‐
35       trieved, exclusive of the trailing 0).
36
37       No error conditions are defined.  If the chstr parameter  is  null,  no
38       data is returned, and the return value is zero.
39
40       Functions  with  a  "mv"  prefix  first perform a cursor movement using
41       wmove, and return an error if the position is outside the window, or if
42       the window pointer is null.
43

NOTES

45       Note  that  all routines except winchnstr may be macros.  SVr4 does not
46       document whether the result string is zero-terminated; it does not doc‐
47       ument  whether  a length limit argument includes any trailing 0; and it
48       does not document the meaning of the return value.
49

PORTABILITY

51       These functions are described in the XSI Curses standard, Issue 4.   It
52       is  no more specific than the SVr4 documentation on the trailing 0.  It
53       does specify that the successful return of the functions is OK.
54

SEE ALSO

56       curses(3X), curs_inch(3X).
57
58       Comparable functions in the wide-character (ncursesw) library  are  de‐
59       scribed in curs_in_wchstr(3X).
60
61
62
63                                                              curs_inchstr(3X)
Impressum