| 1 | .\"***************************************************************************
|
|---|
| 2 | .\" Copyright (c) 1998,2001,2005 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.12 2005/05/15 17:48:23 tom Exp $
|
|---|
| 30 | .TH curs_instr 3X ""
|
|---|
| 31 | .SH NAME
|
|---|
| 32 | \fBinstr\fR,
|
|---|
| 33 | \fBinnstr\fR,
|
|---|
| 34 | \fBwinstr\fR,
|
|---|
| 35 | \fBwinnstr\fR,
|
|---|
| 36 | \fBmvinstr\fR,
|
|---|
| 37 | \fBmvinnstr\fR,
|
|---|
| 38 | \fBmvwinstr\fR,
|
|---|
| 39 | \fBmvwinnstr\fR - get a string of characters from a \fBcurses\fR window
|
|---|
| 40 | .SH SYNOPSIS
|
|---|
| 41 | \fB#include <curses.h>\fR
|
|---|
| 42 |
|
|---|
| 43 | \fBint instr(char *str);\fR
|
|---|
| 44 | .br
|
|---|
| 45 | \fBint innstr(char *str, int n);\fR
|
|---|
| 46 | .br
|
|---|
| 47 | \fBint winstr(WINDOW *win, char *str);\fR
|
|---|
| 48 | .br
|
|---|
| 49 | \fBint winnstr(WINDOW *win, char *str, int n);\fR
|
|---|
| 50 | .br
|
|---|
| 51 | \fBint mvinstr(int y, int x, char *str);\fR
|
|---|
| 52 | .br
|
|---|
| 53 | \fBint mvinnstr(int y, int x, char *str, int n);\fR
|
|---|
| 54 | .br
|
|---|
| 55 | \fBint mvwinstr(WINDOW *win, int y, int x, char *str);\fR
|
|---|
| 56 | .br
|
|---|
| 57 | \fBint mvwinnstr(WINDOW *win, int y, int x, char *str, int n);\fR
|
|---|
| 58 | .br
|
|---|
| 59 | .SH DESCRIPTION
|
|---|
| 60 | These routines return a string of characters in \fIstr\fR, extracted starting
|
|---|
| 61 | at the current cursor position in the named window.
|
|---|
| 62 | Attributes are stripped from the characters. The four
|
|---|
| 63 | functions with \fIn\fR as the last argument return a leading substring at most
|
|---|
| 64 | \fIn\fR characters long (exclusive of the trailing NUL).
|
|---|
| 65 | .SH RETURN VALUE
|
|---|
| 66 | All of the functions return \fBERR\fR upon failure,
|
|---|
| 67 | or the number of characters actually read into the string.
|
|---|
| 68 | .PP
|
|---|
| 69 | X/Open defines no error conditions.
|
|---|
| 70 | In this implementation,
|
|---|
| 71 | if the window parameter is null or the str parameter is null,
|
|---|
| 72 | a zero is returned.
|
|---|
| 73 | .SH NOTES
|
|---|
| 74 | Note that all routines except \fBwinnstr\fR may be macros.
|
|---|
| 75 | .SH PORTABILITY
|
|---|
| 76 | SVr4 does not
|
|---|
| 77 | document whether a length limit includes or excludes the trailing NUL.
|
|---|
| 78 | .PP
|
|---|
| 79 | The ncurses library extends the XSI description by allowing a negative
|
|---|
| 80 | value for \fIn\fR.
|
|---|
| 81 | In this case, the functions return the string ending at the right margin.
|
|---|
| 82 | .SH SEE ALSO
|
|---|
| 83 | \fBcurses\fR(3X).
|
|---|
| 84 | .\"#
|
|---|
| 85 | .\"# The following sets edit modes for GNU EMACS
|
|---|
| 86 | .\"# Local Variables:
|
|---|
| 87 | .\"# mode:nroff
|
|---|
| 88 | .\"# fill-column:79
|
|---|
| 89 | .\"# End:
|
|---|
| 90 |
|
|---|