2 .\" Copyright (c) 1990, 1995 by Mortice Kern Systems Inc. All Rights Reserved Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GETNSTR 3XCURSES "Jun 5, 2002"
8 getnstr, getstr, mvgetnstr, mvgetstr, mvwgetnstr, mvwgetstr, wgetnstr, wgetstr
9 \- get a multibyte character string from terminal
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e
14 \fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ]
16 \fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ]
20 \fBint\fR \fBgetnstr\fR(\fBchar *\fR\fIstr\fR, \fBint\fR \fIn\fR);
25 \fBint\fR \fBgetstr\fR(\fBchar *\fR\fIstr\fR);
30 \fBint\fR \fBmvgetnstr\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBchar *\fR\fIstr\fR, \fBint\fR \fIn\fR);
35 \fBint\fR \fBmvgetstr\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBchar *\fR\fIstr\fR);
40 \fBint\fR \fBmvwgetnstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBchar *\fR\fIstr\fR, \fBint\fR \fIn\fR);
45 \fBint\fR \fBmvwgetstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBchar *\fR\fIstr\fR);
50 \fBint\fR \fBwgetnstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBchar *\fR\fIstr\fR, \fBint\fR \fIn\fR);
55 \fBint\fR \fBwgetstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBchar *\fR\fIstr\fR);
61 The \fBgetstr()\fR and \fBwgetstr()\fR functions get a character string from
62 the terminal associated with the window \fBstdscr\fR or window \fIwin\fR,
63 respectively. The \fBmvgetstr()\fR and \fBmvwgetstr()\fR functions move the
64 cursor to the position specified in \fBstdscr\fR or \fIwin\fR, respectively,
65 then get a character string.
68 These functions call \fBwgetch\fR(3XCURSES) and place each received character
69 in \fIstr\fR until a newline is received, which is also placed in \fIstr\fR.
70 The erase and kill characters set by the user are processed.
73 The \fBgetnstr()\fR, \fBmvgetnstr()\fR, \fBmvwgetnstr()\fR and
74 \fBwgetnstr()\fR functions read at most \fIn\fR characters. These functions
75 are used to prevent overflowing the input buffer.
78 The \fBgetnstr()\fR, \fBwgetnstr()\fR, \fBmvgetnstr()\fR, and
79 \fBmvwgetnstr()\fR functions only return complete multibyte characters. If the
80 area pointed to by \fIstr\fR is not large enough to hold at least one
81 character, these functions fail.
89 Is a pointer to the area where the character string is to be placed.
98 Is the maximum number of characters to read from input.
107 Is the y (row) coordinate of starting position of character string to be read.
116 Is the x (column) coordinate of starting position of character string to be
126 Points to the window associated with the terminal from which the character is
133 On success, these functions return \fBOK\fR. Otherwise, they return \fBERR\fR.
141 See \fBattributes\fR(5) for descriptions of the following attributes:
149 ATTRIBUTE TYPE ATTRIBUTE VALUE
151 Interface Stability Standard
159 \fBgetch\fR(3XCURSES), \fBlibcurses\fR(3XCURSES), \fBattributes\fR(5),