Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PRF_$GET_PRINTERS                 Domain/OS                  PRF_$GET_PRINTERS


NAME
     prf_$get_printers - get a list of printers at the current site

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/prf.h>

     void prf_$get_printers(
          prf_$name_t *site,
          long *entry,
          long &max_printers,
          long *ret_printers,
          prf_$printer_t *printer_list,
          status_$t *status)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/prf.ins.pas';

     procedure prf_$get_printers(
          in site: univ prf_$name_t;
          var entry: integer32;
          in max_printers: integer32;
          out ret_printers: integer32;
          out printer_list: univ prf_$printer_array_t;
          out status: status_$t);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'

           integer*2 n_printers, example
           parameter (n_printers = 32, example = 3)

           integer*4 entry, max_printers, ret_printers
           character printer_list(n_printers)*102

           equivalence (printer_name, printer_list(example))
           equivalence (printer_name_length, printer_list(example)(33:34))
           equivalence (printer_status, printer_list(example)(35:66))
           equivalence (printer_status_length, printer_list(example)(67:68))
           equivalence (printer_description, printer_list(example)(69:100))
           equivalence (printer_description_length, printer_list(example)(101:102))

           call prf_$get_printers(site, entry, max_printers,
          &                       ret_printers, printer_list, status)

DESCRIPTION
     This call supplies up to max_printers printer names from the current site
     in the printer_list argument.  The entry argument passed to
     prf_$get_printers controls which portion of the current site's printer
     list is supplied in printer_list.

     site The print site to list printers for.  If site is null, then all
          sites on the network are polled.

     entry
          An index into the printer list at the current site.  Index specifies
          the position in the printer list of the first printer requested when
          prf_$get_printers is called; it contains the position in the list of
          the next printer to request when prf_$get_printers returns.

          When calling prf_$get_printers, an entry of 1 will cause
          prf_$get_printers to supply the first max_printers printer names
          from the site's printer list in printer_list.  Then when
          prf_$get_printers returns, entry will be the position of the next
          unread printer name in the list.

          If the difference between the call and return values of entry is
          less than max_printers, then printer_list contains the name of the
          last printer in the site list.  If the difference is equal to
          max_printers, there may be more printers at the site; that is,
          printer_list may not contain the name of the last printer in the
          printer list.  If the printer list is exhausted when
          prf_$get_printers returns, entry contains the position of the last
          printer, or, more simply, just the number of printers at the current
          site.

     max_printers
          The maximum number of printers that prf_$get_printers should supply.
          The value of max_printers depends on the size of the buffer allo-
          cated to receive the printer_list argument.

     ret_printers
          The number of printer descriptions supplied in printer_list.

     printer_list
          An array of type prf_$name_t containing a list of printer descrip-
          tions.  Each element of the array contains a printer's name, its
          description, and its status.

     status
          The completion status.

SEE ALSO
     prf_$get_sites, prf_$read_queue.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026