2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>mcprint</STRONG> - ship binary data to printer
9 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
11 <STRONG>int</STRONG> <STRONG>mcprint(char</STRONG> <STRONG>*data,</STRONG> <STRONG>int</STRONG> <STRONG>len);</STRONG>
15 <H2>DESCRIPTION</H2><PRE>
16 This function uses the <STRONG>mc5p</STRONG> or <STRONG>mc4</STRONG> and <STRONG>mc5</STRONG> capabilities,
17 if they are present, to ship given data to a printer
18 attached to the terminal.
20 Note that the <STRONG>mcprint</STRONG> code has no way to do flow control
21 with the printer or to know how much buffering it has.
22 Your application is responsible for keeping the rate of
23 writes to the printer below its continuous throughput rate
24 (typically about half of its nominal cps rating). Dot-
25 matrix printers and 6-page-per-minute lasers can typically
26 handle 80cps, so a good conservative rule of thumb is to
27 sleep for a second after shipping each 80-character line.
32 <H2>RETURN VALUE</H2><PRE>
33 The <STRONG>mcprint</STRONG> function returns <STRONG>ERR</STRONG> if the write operation
34 aborted for some reason. In this case, errno will contain
35 either an error associated with <STRONG>write(2)</STRONG> or one of the
39 Capabilities for printer redirection don't exist.
42 Couldn't allocate sufficient memory to buffer the
45 When <STRONG>mcprint</STRONG> succeeds, it returns the number of char-
46 acters actually sent to the printer.
50 <H2>PORTABILITY</H2><PRE>
51 The <STRONG>mcprint</STRONG> call was designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and is not
52 found in SVr4 curses, 4.4BSD curses, or any other previous
58 Padding in the <STRONG>mc5p</STRONG>, <STRONG>mc4</STRONG> and <STRONG>mc5</STRONG> capabilities will not be
63 <H2>SEE ALSO</H2><PRE>
64 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>