ncursesw-morphos/doc/html/man/curs_print.3x.html

81 lines
2.2 KiB
HTML
Raw Normal View History

1997-05-15 12:00:00 +08:00
<HTML>
1999-10-24 12:32:42 +08:00
<BODY>
1997-05-15 12:00:00 +08:00
<PRE>
2000-07-09 10:46:08 +08:00
<!-- Manpage converted by man2html 3.0.1 -->
</PRE>
<H2>NAME</H2><PRE>
<B>mcprint</B> - ship binary data to printer
1997-05-15 12:00:00 +08:00
</PRE>
<H2>SYNOPSIS</H2><PRE>
2000-07-09 10:46:08 +08:00
<B>#include</B> <B>&lt;curses.h&gt;</B>
1997-05-15 12:00:00 +08:00
2000-07-09 10:46:08 +08:00
<B>int</B> <B>mcprint(char</B> <B>*data,</B> <B>int</B> <B>len);</B>
1997-05-15 12:00:00 +08:00
</PRE>
<H2>DESCRIPTION</H2><PRE>
2000-07-09 10:46:08 +08:00
This function uses the <B>mc5p</B> or <B>mc4</B> and <B>mc5</B> capabilities,
1997-05-15 12:00:00 +08:00
if they are present, to ship given data to a printer
attached to the terminal.
2000-07-09 10:46:08 +08:00
Note that the <B>mcprint</B> code has no way to do flow control
1997-05-15 12:00:00 +08:00
with the printer or to know how much buffering it has.
Your application is responsible for keeping the rate of
writes to the printer below its continuous throughput rate
(typically about half of its nominal cps rating). Dot-
matrix printers and 6-page-per-minute lasers can typically
handle 80cps, so a good conservative rule of thumb is to
sleep for a second after shipping each 80-character line.
</PRE>
<H2>RETURN VALUE</H2><PRE>
2000-07-09 10:46:08 +08:00
The <B>mcprint</B> function returns <B>ERR</B> if the write operation
1997-05-15 12:00:00 +08:00
aborted for some reason. In this case, errno will contain
2000-07-09 10:46:08 +08:00
either an error associated with <B>write(2)</B> or one of the
1997-05-15 12:00:00 +08:00
following:
ENODEV
Capabilities for printer redirection don't exist.
ENOMEM
Couldn't allocate sufficient memory to buffer the
printer write.
2000-07-09 10:46:08 +08:00
When <B>mcprint</B> succeeds, it returns the number of char-
1997-05-15 12:00:00 +08:00
acters actually sent to the printer.
</PRE>
<H2>PORTABILITY</H2><PRE>
2000-07-09 10:46:08 +08:00
The <B>mcprint</B> call was designed for <B><A HREF="ncurses.3x.html">ncurses(3x)</A></B>, and is not
1997-05-15 12:00:00 +08:00
found in SVr4 curses, 4.4BSD curses, or any other previous
version of curses.
</PRE>
<H2>BUGS</H2><PRE>
2000-07-09 10:46:08 +08:00
Padding in the <B>mc5p</B>, <B>mc4</B> and <B>mc5</B> capabilities will not be
1997-05-15 12:00:00 +08:00
interpreted.
</PRE>
<H2>SEE ALSO</H2><PRE>
2000-07-09 10:46:08 +08:00
<B><A HREF="ncurses.3x.html">curses(3x)</A></B>
1997-05-15 12:00:00 +08:00
</PRE>
2000-07-09 10:46:08 +08:00
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
1997-05-15 12:00:00 +08:00
</BODY>
</HTML>