


      LP(7)                      (Bull-SPS9)                      LP(7)



      NAME
           lp - line printer

      DESCRIPTION
           When using a CIO board, /dev/lp is used to refer to either a
           Data Products/Data Printer, Centronics, or Versatec (print
           mode) printer connected to J9 on the CIO junction plate.
           The type of cable used automatically configures the printer
           port.

           When using an FDLP board, /dev/lp refers exclusively to a
           Data Products or Data Printer printer on the DP/Centronics
           connector on the back panel of the Bull-SPS9 system (J6).

           The /dev/lp special device is write-only.  Bytes written are
           printed.  A close causes the driver to send a form feed to
           the device.

           The driver normally interprets the tab (09H) and the line
           feed (0AH) characters.  A tab character is expanded into
           sufficient blanks, and a line feed character is converted to
           a return (0DH) and a line feed.  The printer device normally
           interprets a return as a command to start printing in column
           0, a line feed as a command to advance to the next line, and
           a form-feed as a command to advance to the next page.

           Two ioctl(2) system calls are available with the line
           printer driver.  Both use the lprio structure which includes
           the following fields:

                  int lp_version;        /* line printer driver version */
                  int lp_flags;          /* flag bits, see below */
                  #  define LCRCRNL 001  /* expand CR to CR-NL */
                  #  define LNLCRNL 002  /* expand NL to CR-NL */
                  #  define LEXPTAB 004  /* expand TAB to multiple spaces */
                  #  define LCENT   010  /* interface is Centronics */
                  #  define LDPROD  020  /* interface is Data Products */
                  #  define LVERS   040  /* interface is Versatec */
                  int lp_indent;         /* # of leading blanks on each line */
                  int lp_col;            /* number of columns per line */
                  int lp_line;           /* number of lines per page */
                  int lp_tabs;           /* spaces per tab stop */













      Page 1                                         (73 A2 02MTA REV1)






      LP(7)                      (Bull-SPS9)                      LP(7)



           The default values for these fields are:

                  lp_flags:
                     LCRCRNL  - off
                     LNLCRNL  - on
                     LEXPTAB  - on  FDLP      CIO
                     LCENT    -      off       on (with Centronics cable)
                     LDPROD   -      off       on (with Data Products cable)
                     LVERS    -      off       on (with Versatec cable)
                  lp_indent:    0
                  lp_col:     132
                  lp_line:     66
                  lp_tabs:      8

           With an FDLP board, LCENT configures printer port J6 for
           either a Centronics interface (LCENT=1) or a Data Products
           interface (LCENT=0).  LVERS, LDPROD are not used.  With a
           CIO board, either LCENT, LDPROD, or LVERS will be set by the
           driver to indicate which type of printer is connected.
           These bits are read-only by the user.

           All of the values in the structure may be set via an LPRSET
           ioctl, except for the lp_version field which is read-only.
           The current setting of all of the values can be gotten by an
           LPRGET ioctl.

           NOTE: Changing lp_indent, lp_col, or lp_line currently has
           no effect.

           #include <sys/lprio.h>
           ioctl(fildes, command, arg);
           struct lprio *arg;

           If the lp_flags word has the mappings bits turned off (i.e.,
           all zero) the line printer driver will not interpret any
           characters on output.

      DEVICE CODE
                                         block-type or       standard
           device type         major     minor     character-typefile name

           DataProducts lp (on FDLP)      4        0         char/dev/lp
           DataProducts (on CIO)    13   0         char      /dev/lp
           Centronics (on CIO) 13   0    char      /dev/lp
           Versatec (on CIO)   13   0    char      /dev/lp

      FILES
           /dev/lp
           /drivers/fdlp
           /drivers/ciolp





      Page 2                                         (73 A2 02MTA REV1)



