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
17       int mvinstr(int y, int x, char *str);
18       int mvinnstr(int y, int x, char *str, int n);
19       int mvwinstr(WINDOW *win, int y, int x, char *str);
20       int mvwinnstr(WINDOW *win, int y, int x, char *str, int n);
21

DESCRIPTION

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

RETURN VALUE

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

NOTES

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

PORTABILITY

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

SEE ALSO

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