2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>inchstr</STRONG>, <STRONG>inchnstr</STRONG>, <STRONG>winchstr</STRONG>, <STRONG>winchnstr</STRONG>, <STRONG>mvinchstr</STRONG>,
5 <STRONG>mvinchnstr</STRONG>, <STRONG>mvwinchstr</STRONG>, <STRONG>mvwinchnstr</STRONG> - get a string of
6 characters (and attributes) from a <STRONG>curses</STRONG> window
10 <H2>SYNOPSIS</H2><PRE>
11 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
13 <STRONG>int</STRONG> <STRONG>inchstr(chtype</STRONG> <STRONG>*chstr);</STRONG>
14 <STRONG>int</STRONG> <STRONG>inchnstr(chtype</STRONG> <STRONG>*chstr,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
15 <STRONG>int</STRONG> <STRONG>winchstr(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>*chstr);</STRONG>
16 <STRONG>int</STRONG> <STRONG>winchnstr(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>*chstr,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
17 <STRONG>int</STRONG> <STRONG>mvinchstr(int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>*chstr);</STRONG>
18 <STRONG>int</STRONG> <STRONG>mvinchnstr(int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>*chstr,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
19 <STRONG>int</STRONG> <STRONG>mvwinchstr(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>*chstr);</STRONG>
20 <STRONG>int</STRONG> <STRONG>mvwinchnstr(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>*chstr,</STRONG>
21 <STRONG>int</STRONG> <STRONG>n);</STRONG>
25 <H2>DESCRIPTION</H2><PRE>
26 These routines return a NULL-terminated array of <STRONG>chtype</STRONG>
27 quantities, starting at the current cursor position in the
28 named window and ending at the right margin of the window.
29 The four functions with <EM>n</EM> as the last argument, return a
30 leading substring at most <EM>n</EM> characters long (exclusive of
31 the trailing (chtype)0). Constants defined in <STRONG><curses.h></STRONG>
32 can be used with the <STRONG>&</STRONG> (logical AND) operator to extract
33 the character or the attribute alone from any position in
34 the <EM>chstr</EM> [see <STRONG><A HREF="curs_inch.3x.html">curs_inch(3X)</A></STRONG>].
38 <H2>RETURN VALUE</H2><PRE>
39 All routines return the integer <STRONG>ERR</STRONG> upon failure and an
40 integer value other than <STRONG>ERR</STRONG> upon successful completion
41 (the number of characters retrieved, exclusive of the
47 Note that all routines except <STRONG>winchnstr</STRONG> may be macros.
48 SVr4 does not document whether the result string is 0-ter-
49 minated; it does not document whether a length limit argu-
50 ment includes any trailing 0; and it does not document the
51 meaning of the return value.
55 <H2>PORTABILITY</H2><PRE>
56 These functions are described in the XSI Curses standard,
57 Issue 4. It is no more specific than the SVr4 documenta-
58 tion on the trailing 0. It does specify that the success-
59 ful return of the functions is <STRONG>OK</STRONG>.
63 <H2>SEE ALSO</H2><PRE>
64 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3X)</A></STRONG>.