]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/man/curs_print.3x.html
ncurses 5.0
[ncurses.git] / Ada95 / html / man / curs_print.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4        <STRONG>mcprint</STRONG> - ship binary data to printer
5
6
7 </PRE>
8 <H2>SYNOPSIS</H2><PRE>
9        <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
10
11        <STRONG>int</STRONG> <STRONG>mcprint(char</STRONG> <STRONG>*data,</STRONG> <STRONG>int</STRONG> <STRONG>len);</STRONG>
12
13
14 </PRE>
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.
19
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.
28
29
30
31 </PRE>
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
36        following:
37
38        ENODEV
39             Capabilities for printer redirection don't exist.
40
41        ENOMEM
42             Couldn't allocate sufficient  memory  to  buffer  the
43             printer write.
44
45             When <STRONG>mcprint</STRONG> succeeds, it returns the number of char-
46             acters actually sent to the printer.
47
48
49 </PRE>
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
53        version of curses.
54
55
56 </PRE>
57 <H2>BUGS</H2><PRE>
58        Padding in the <STRONG>mc5p</STRONG>, <STRONG>mc4</STRONG> and <STRONG>mc5</STRONG> capabilities will not  be
59        interpreted.
60
61
62 </PRE>
63 <H2>SEE ALSO</H2><PRE>
64        <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>
65
66
67
68 </PRE>
69 </BODY>
70 </HTML>