1 .\" $NetBSD: curses_inch.3,v 1.10 2004/04/21 06:24:32 jdc Exp $
4 .\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
6 .\" This code is donated to the NetBSD Foundation by the Author.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. The name of the Author may not be used to endorse or promote
17 .\" products derived from this software without specific prior written
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56 .Nd curses read screen contents routines
64 .Fn winch "WINDOW *win"
66 .Fn inchnstr "chtype *chars" "int n"
68 .Fn mvinchnstr "int y" "int x" "chtype *chstr" "int n"
70 .Fn winchnstr "WINDOW *win" "chtype *chars" "int n"
72 .Fn mvwinchnstr "WINDOW *win" "int y" "int x" "chtype *chstr" "int n"
74 .Fn inchstr "chtype *chars"
76 .Fn mvinchstr "int y" "int x" "chtype *chstr"
78 .Fn winchstr "WINDOW *win" "chtype *chars"
80 .Ft mvwinchstr "WINDOW *win" "int y" "int x" "chtype *chstr"
82 .Fn innstr "char *str" "int n"
84 .Fn winnstr "WINDOW *win" "char *str" "int n"
86 .Fn mvinnstr "int y" "int x" "char *str" "int n"
88 .Fn mvwinnstr "WINDOW *win" "int y" "int x" "char *str" "int n"
92 .Fn winstr "WINDOW *win" "char *str"
94 .Fn mvinstr "int y" "int x" "char *str"
96 .Fn mvwinstr "WINDOW *win" "int y" "int x" "char *str"
98 These functions read the contents of
100 or of the specified window.
104 function returns the character that is displayed on
106 at the current cursor position.
110 function is the same as the
112 function, excepting that the character is read from window specified by
117 function fills an array of
119 with characters read from
121 the characters are read starting from the current cursor position and
122 continuing until either n \- 1 characters are read or the right hand
123 side of the screen is reached.
124 The resulting character array will be
130 function is the same as
132 excepting that the characters are read from the window specified by
139 functions are the same as the
143 functions, respectively, excepting that they do not limit the number
145 The characters returned are those from the current starting position to
146 the right hand side of the screen.
151 is not recommended as the character buffer can be overflowed.
158 function, excepting that the array of characters returned is stripped of all
159 the curses attributes making it a plain character string.
167 functions are the same as the
173 functions, respectively, except that
175 is called to move the cursor to the position specified by
178 before the output is printed on the window.
185 functions are the same as the
191 functions, respectively, except that
193 is called to move the cursor to the position specified by
196 before the output is printed on the window.
200 function is the same as the
202 function, excepting that characters are read from the window specified by
214 functions, respectively, excepting that there are no limits placed on the
215 size of the returned string, which may cause buffer overflows.
216 For this reason, the use of
222 Functions returning pointers will return
224 if an error is detected.
225 The functions that return an int will return one of the following
228 .Bl -tag -width ERR -compact
230 The function completed successfully.
232 An error occurred in the function.
236 .Xr curses_addstr 3 ,
237 .Xr curses_attributes 3 ,
238 .Xr curses_insertch 3
242 Curses library complies with the X/Open Curses specification, part
243 of the Single Unix Specification.
249 function read at most n \- 1 characters from the screen so as to leave
253 The X/Open specification is unclear as to whether or not this is the correct
256 The Curses package appeared in