1getnstr(3XCURSES)       X/Open Curses Library Functions      getnstr(3XCURSES)
2
3
4

NAME

6       getnstr,  getstr, mvgetnstr, mvgetstr, mvwgetnstr, mvwgetstr, wgetnstr,
7       wgetstr - get a multibyte character string from terminal
8

SYNOPSIS

10       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
11        -R  /usr/xpg4/lib  -lcurses  [ library... ]
12
13       c89 [ flag... ] file... -lcurses [ library... ]
14
15       #include <curses.h>
16
17       int getnstr(char *str, int n);
18
19
20       int getstr(char *str);
21
22
23       int mvgetnstr(int y, int x, char *str, int n);
24
25
26       int mvgetstr(int y, int x, char *str);
27
28
29       int mvwgetnstr(WINDOW *win, int y, int x, char *str, int n);
30
31
32       int mvwgetstr(WINDOW *win, int y, int x, char *str);
33
34
35       int wgetnstr(WINDOW *win, char *str, int n);
36
37
38       int wgetstr(WINDOW *win, char *str);
39
40

DESCRIPTION

42       The getstr() and wgetstr() functions get a character string   from  the
43       terminal  associated  with  the  window  stdscr or window  win, respec‐
44       tively. The mvgetstr() and mvwgetstr() functions move the cursor to the
45       position  specified in stdscr or win, respectively, then get a  charac‐
46       ter string.
47
48
49       These functions call wgetch(3XCURSES) and place each received character
50       in  str  until  a newline is received, which is also placed in str. The
51       erase and kill characters set by the user are processed.
52
53
54       The getnstr(), mvgetnstr(), mvwgetnstr() and  wgetnstr() functions read
55       at  most n characters.  These functions are used to prevent overflowing
56       the input buffer.
57
58
59       The getnstr(), wgetnstr(), mvgetnstr(), and mvwgetnstr() functions only
60       return  complete multibyte characters. If the area pointed to by str is
61       not large enough to hold at least one character, these functions fail.
62

PARAMETERS

64       str    Is a pointer to the area where the character  string  is  to  be
65              placed.
66
67
68       n      Is the maximum number of characters to read from input.
69
70
71       y      Is  the  y  (row)  coordinate  of starting position of character
72              string to be read.
73
74
75       x      Is the x (column) coordinate of starting position of   character
76              string to be read.
77
78
79       win    Points to the window associated with the terminal from which the
80              character  is to be read.
81
82

RETURN VALUES

84       On success, these functions return OK. Otherwise, they return ERR.
85

ERRORS

87       None.
88

ATTRIBUTES

90       See attributes(5) for descriptions of the following attributes:
91
92
93
94
95       ┌─────────────────────────────┬─────────────────────────────┐
96       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
97       ├─────────────────────────────┼─────────────────────────────┤
98       │Interface Stability          │Standard                     │
99       ├─────────────────────────────┼─────────────────────────────┤
100       │MT-Level                     │Unsafe                       │
101       └─────────────────────────────┴─────────────────────────────┘
102

SEE ALSO

104       getch(3XCURSES), libcurses(3XCURSES), attributes(5), standards(5)
105
106
107
108SunOS 5.11                        5 Jun 2002                 getnstr(3XCURSES)
Impressum