]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_print.3x.html
ncurses 5.1
[ncurses.git] / doc / html / man / curs_print.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>mcprint</B> - ship binary data to printer
9
10
11 </PRE>
12 <H2>SYNOPSIS</H2><PRE>
13        <B>#include</B> <B>&lt;curses.h&gt;</B>
14
15        <B>int</B> <B>mcprint(char</B> <B>*data,</B> <B>int</B> <B>len);</B>
16
17
18 </PRE>
19 <H2>DESCRIPTION</H2><PRE>
20        This  function  uses the <B>mc5p</B> or <B>mc4</B> and <B>mc5</B> capabilities,
21        if they are present, to  ship  given  data  to  a  printer
22        attached to the terminal.
23
24        Note  that  the <B>mcprint</B> code has no way to do flow control
25        with the printer or to know how  much  buffering  it  has.
26        Your  application  is  responsible for keeping the rate of
27        writes to the printer below its continuous throughput rate
28        (typically  about  half  of its nominal cps rating).  Dot-
29        matrix printers and 6-page-per-minute lasers can typically
30        handle  80cps,  so a good conservative rule of thumb is to
31        sleep for a second after shipping each 80-character  line.
32
33
34
35 </PRE>
36 <H2>RETURN VALUE</H2><PRE>
37        The  <B>mcprint</B>  function  returns <B>ERR</B> if the write operation
38        aborted for some reason.  In this case, errno will contain
39        either  an  error  associated  with <B>write(2)</B> or one of the
40        following:
41
42        ENODEV
43             Capabilities for printer redirection don't exist.
44
45        ENOMEM
46             Couldn't allocate sufficient  memory  to  buffer  the
47             printer write.
48
49             When <B>mcprint</B> succeeds, it returns the number of char-
50             acters actually sent to the printer.
51
52
53 </PRE>
54 <H2>PORTABILITY</H2><PRE>
55        The <B>mcprint</B> call was designed for <B><A HREF="ncurses.3x.html">ncurses(3x)</A></B>, and is  not
56        found in SVr4 curses, 4.4BSD curses, or any other previous
57        version of curses.
58
59
60 </PRE>
61 <H2>BUGS</H2><PRE>
62        Padding in the <B>mc5p</B>, <B>mc4</B> and <B>mc5</B> capabilities will not  be
63        interpreted.
64
65
66 </PRE>
67 <H2>SEE ALSO</H2><PRE>
68        <B><A HREF="ncurses.3x.html">curses(3x)</A></B>
69
70
71
72
73 </PRE>
74 <HR>
75 <ADDRESS>
76 Man(1) output converted with
77 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
78 </ADDRESS>
79 </BODY>
80 </HTML>