curs_print(3x) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | EXTENSIONS | PORTABILITY | HISTORY | BUGS | SEE ALSO | COLOPHON

curs_print(3X)                Library calls                curs_print(3X)

NAME         top

       mcprint - write binary data to printer using terminfo capabilities

SYNOPSIS         top

       #include <curses.h>

       int mcprint(char * data, int len);

DESCRIPTION         top

       mcprint, an ncurses extension to the curses library, uses the
       terminal's prtr_non (mc5p) or prtr_on (mc5) and prtr_off (mc4)
       media copy capabilities, if defined, to send len bytes of the
       given string data to a printer attached to the terminal.

       mcprint has no means of flow control to the printer nor of knowing
       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 characters-
       per-second (cps) rating.  Dot-matrix printers and 6-page-per-
       minute laser printers can typically handle 80 cps, so a
       conservative rule of thumb is to sleep for one second after
       sending an 80-character line.

RETURN VALUE         top

       On success, mcprint returns the number of characters sent to the
       printer.

       mcprint returns ERR if the write operation fails for any reason.
       In that event, errno contains either a value set by write(2), or
       one of the following.

       ENODEV
            The terminal lacks relevant media copy capabilities.

       ENOMEM
            ncurses could not allocate sufficient memory to buffer the
            write operation.

EXTENSIONS         top

       mcprint is an ncurses(3X) extension, and is not found in SVr4
       curses, 4.4BSD curses, or any other previous curses
       implementation.

PORTABILITY         top

       Applications employing this ncurses extension should condition its
       use on the visibility of the NCURSES_VERSION preprocessor macro.

HISTORY         top

       ncurses introduced mcprint prior to version 1.9.9g (1996).

BUGS         top

       Padding in the prtr_non (mc5p), prtr_on (mc5), and prtr_off (mc4)
       capabilities is not interpreted.

SEE ALSO         top

       curses(3X)

COLOPHON         top

       This page is part of the ncurses (new curses) project.
       Information about the project can be found at 
       ⟨https://invisible-island.net/ncurses/ncurses.html⟩.  If you have a
       bug report for this manual page, send it to bug-ncurses@gnu.org.
       This page was obtained from the tarball ncurses-6.6.tar.gz fetched
       from ⟨https://ftp.gnu.org/gnu/ncurses/⟩ on 2026-01-16.  If you
       discover any rendering problems in this HTML version of the page,
       or you believe there is a better or more up-to-date source for the
       page, or you have corrections or improvements to the information
       in this COLOPHON (which is not part of the original manual page),
       send a mail to man-pages@man7.org

ncurses @NCURSES_MAJOR@.@NCU... 2025-02-15                 curs_print(3X)