1curs_instr(3X)                                                  curs_instr(3X)
2
3
4

NAME

6       instr,  innstr, winstr, winnstr, mvinstr, mvinnstr, mvwinstr, mvwinnstr
7       - get a string of characters from a curses window
8

SYNOPSIS

10       #include <curses.h>
11
12       int instr(char *str);
13       int innstr(char *str, int n);
14       int winstr(WINDOW *win, char *str);
15       int winnstr(WINDOW *win, char *str, int n);
16       int mvinstr(int y, int x, char *str);
17       int mvinnstr(int y, int x, char *str, int n);
18       int mvwinstr(WINDOW *win, int y, int x, char *str);
19       int mvwinnstr(WINDOW *win, int y, int x, char *str, int n);
20

DESCRIPTION

22       These routines return a string of characters in str, extracted starting
23       at  the  current  cursor  position in the named window.  Attributes are
24       stripped from the characters.  The four functions with n  as  the  last
25       argument  return  a leading substring at most n characters long (exclu‐
26       sive of the trailing NUL).
27

RETURN VALUE

29       All of the functions return ERR upon failure, or the number of  charac‐
30       ters actually read into the string.
31
32       X/Open Curses defines no error conditions.  In this implementation:
33
34       ·   If the win parameter is null, an error is returned,
35
36       ·   If the chstr parameter is null, an error is returned,
37
38       Functions  with  a  “mv”  prefix  first perform a cursor movement using
39       wmove, and return an error if the position is outside the window, or if
40       the window pointer is null.
41

NOTES

43       Note that all routines except winnstr may be macros.
44

PORTABILITY

46       SVr4  does not document whether a length limit includes or excludes the
47       trailing NUL.
48
49       The ncurses library extends the XSI description by allowing a  negative
50       value  for  n.  In this case, the functions return the string ending at
51       the right margin.
52

SEE ALSO

54       curses(3X).
55
56
57
58                                                                curs_instr(3X)
Impressum