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  defines  no  error  conditions.  In this implementation, if the
33       window parameter is null or the  str  parameter  is  null,  a  zero  is
34       returned.
35
36       Functions  with  a  "mv"  prefix  first perform a cursor movement using
37       wmove, and return an error if the position is outside the window, or if
38       the window pointer is null.
39

NOTES

41       Note that all routines except winnstr may be macros.
42

PORTABILITY

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

SEE ALSO

52       curses(3X).
53
54
55
56                                                                curs_instr(3X)
Impressum