]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_instr.3x
ncurses 5.0
[ncurses.git] / man / curs_instr.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998 Free Software Foundation, Inc.                        *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_instr.3x,v 1.8 1998/03/11 21:12:53 juergen Exp $
30 .TH curs_instr 3X ""
31 .SH NAME
32 \fBinstr\fR, \fBinnstr\fR, \fBwinstr\fR, \fBwinnstr\fR,
33 \fBmvinstr\fR, \fBmvinnstr\fR, \fBmvwinstr\fR, \fBmvwinnstr\fR - get a string
34 of characters from a \fBcurses\fR window
35 .SH SYNOPSIS
36 \fB#include <curses.h>\fR
37
38 \fBint instr(char *str);\fR
39 .br
40 \fBint innstr(char *str, int n);\fR
41 .br
42 \fBint winstr(WINDOW *win, char *str);\fR
43 .br
44 \fBint winnstr(WINDOW *win, char *str, int n);\fR
45 .br
46 \fBint mvinstr(int y, int x, char *str);\fR
47 .br
48 \fBint mvinnstr(int y, int x, char *str, int n);\fR
49 .br
50 \fBint mvwinstr(WINDOW *win, int y, int x, char *str);\fR
51 .br
52 \fBint mvwinnstr(WINDOW *win, int y, int x, char *str, int n);\fR
53 .br
54 .SH DESCRIPTION
55 These routines return a string of characters in \fIstr\fR, extracted starting
56 at the current cursor position in the named window.
57 Attributes are stripped from the characters.  The four
58 functions with \fIn\fR as the last argument return a leading substring at most
59 \fIn\fR characters long (exclusive of the trailing NUL).
60 .SH RETURN VALUE
61 All of the functions return \fBERR\fR upon failure,
62 or the number of characters actually read into the string.
63 .SH NOTES
64 Note that all routines except \fBwinnstr\fR may be macros.
65 .SH PORTABILITY
66 The XSI Curses
67 error conditions \fBEILSEQ\fR and \fBEILOVERFLOW\fR associated with
68 extended-level conformance are not yet detected (this implementation does not
69 yet support XPG4 multi-byte characters).
70 SVr4 does not
71 document whether a length limit includes or excludes the trailing NUL.
72 .PP
73 The ncurses library extends the XSI description by allowing a negative
74 value for \fIn\fR.
75 In this case, the functions return the string ending at the right margin.
76 .SH SEE ALSO
77 \fBcurses\fR(3X).
78 .\"#
79 .\"# The following sets edit modes for GNU EMACS
80 .\"# Local Variables:
81 .\"# mode:nroff
82 .\"# fill-column:79
83 .\"# End:
84