]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_inchstr.3x
75c02b2fdb5c7d36854258085c713731a629155b
[ncurses.git] / man / curs_inchstr.3x
1 .TH curs_inchstr 3X ""
2 .SH NAME
3 \fBinchstr\fR, \fBinchnstr\fR, \fBwinchstr\fR,
4 \fBwinchnstr\fR, \fBmvinchstr\fR, \fBmvinchnstr\fR, \fBmvwinchstr\fR,
5 \fBmvwinchnstr\fR - get a string of characters (and attributes) from a
6 \fBcurses\fR window
7 .SH SYNOPSIS
8 \fB#include <curses.h>\fR
9
10 \fBint inchstr(chtype *chstr);\fR
11 .br
12 \fBint inchnstr(chtype *chstr, int n);\fR
13 .br
14 \fBint winchstr(WINDOW *win, chtype *chstr);\fR
15 .br
16 \fBint winchnstr(WINDOW *win, chtype *chstr, int n);\fR
17 .br
18 \fBint mvinchstr(int y, int x, chtype *chstr);\fR
19 .br
20 \fBint mvinchnstr(int y, int x, chtype *chstr, int n);\fR
21 .br
22 \fBint mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);\fR
23 .br
24 \fBint mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);\fR
25 .br
26 .SH DESCRIPTION
27 These routines return a NULL-terminated array of \fBchtype\fR quantities,
28 starting at the current cursor position in the named window and ending at the
29 right margin of the window.  The four functions with \fIn\fR as
30 the last argument, return a leading substring at most \fIn\fR characters long
31 (exclusive of the trailing (chtype)0).
32 Constants defined in \fB<curses.h>\fR can be used with the \fB&\fR (logical
33 AND) operator to extract the character or the attribute alone from any position
34 in the \fIchstr\fR [see curs_inch(3X)].
35 .SH RETURN VALUE
36 All routines return the integer \fBERR\fR upon failure and an integer value
37 other than \fBERR\fR upon successful completion (the number of characters
38 retrieved, exclusive of the trailing 0).
39 .SH NOTES
40 Note that all routines except \fBwinchnstr\fR may be macros.  SVr4 does not
41 document whether the result string is 0-terminated; it does not document
42 whether a length limit argument includes any trailing 0; and it does not
43 document the meaning of the return value.
44 .SH PORTABILITY
45 These functions are described in the XSI Curses standard, Issue 4.  It is no
46 more specific than the SVr4 documentation on the trailing 0.  It does specify
47 that the successful return of the functions is \fBOK\fR.
48 .SH SEE ALSO
49 \fBcurses\fR(3X), \fBcurs_inch\fR(3X).
50 .\"#
51 .\"# The following sets edit modes for GNU EMACS
52 .\"# Local Variables:
53 .\"# mode:nroff
54 .\"# fill-column:79
55 .\"# End: