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       X/Open Curses defines no error conditions.  In this implementation:
38
39       ·   If the win parameter is null, an error is returned,
40
41       ·   If the chstr parameter is null, an error is returned,
42
43       Functions with a “mv” prefix first  perform  a  cursor  movement  using
44       wmove, and return an error if the position is outside the window, or if
45       the window pointer is null.
46

NOTES

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

PORTABILITY

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

SEE ALSO

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