1curs_print(3X)                                                  curs_print(3X)
2
3
4

NAME

6       mcprint - ship binary data to printer
7

SYNOPSIS

9       #include <curses.h>
10
11       int mcprint(char *data, int len);
12

DESCRIPTION

14       This  function  uses  the mc5p or mc4 and mc5 capabilities, if they are
15       present, to ship given data to a printer attached to the terminal.
16
17       Note that the mcprint code has no way  to  do  flow  control  with  the
18       printer  or to know how much buffering it has.  Your application is re‐
19       sponsible for keeping the rate of writes to the printer below its  con‐
20       tinuous  throughput  rate (typically about half of its nominal cps rat‐
21       ing).  Dot-matrix printers and 6-page-per-minute lasers  can  typically
22       handle  80cps,  so  a good conservative rule of thumb is to sleep for a
23       second after shipping each 80-character line.
24

RETURN VALUE

26       The mcprint function returns ERR if the  write  operation  aborted  for
27       some  reason.  In this case, errno will contain either an error associ‐
28       ated with write(2) or one of the following:
29
30       ENODEV
31            Capabilities for printer redirection do not exist.
32
33       ENOMEM
34            Couldn't allocate sufficient memory to buffer the printer write.
35
36       When mcprint succeeds, it returns the  number  of  characters  actually
37       sent to the printer.
38

PORTABILITY

40       The mcprint call was designed for ncurses(3X), and is not found in SVr4
41       curses, 4.4BSD curses, or any other previous version of curses.
42

BUGS

44       Padding in the mc5p, mc4 and mc5 capabilities will not be interpreted.
45

SEE ALSO

47       curses(3X)
48
49
50
51                                                                curs_print(3X)
Impressum