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

NOTES

37       Note that all routines except winnstr may be macros.
38

PORTABILITY

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

SEE ALSO

48       curses(3X).
49
50
51
52                                                                curs_instr(3X)
Impressum