Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PRF_$READ_QUEUE                   Domain/OS                    PRF_$READ_QUEUE


NAME
     prf_$read_queue - get a list of print jobs in the queue

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

     void prf_$read_queue(
          prf_$read_opt_t &printer_flag,
          long *index,
          long &max_jobs,
          long *ret_jobs,
          prf_$job_entry_t *job_list,
          status_$t *status)

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

     procedure prf_$read_queue(
          in printer_flag: prf_$read_opt_t;
          var index: integer32;
          in max_jobs: integer32;
          out ret_jobs: integer32;
          out job_list: univ prf_$job_array_t;
          out status: status_$t);

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

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

           integer*4 printer_flag, index, status
           integer*4 max_jobs, ret_jobs
           integer*2 job_list(39, n_jobs)

           integer*4 job_id, job_priority
           integer*2 print_user_length, job_name_length, job_status
           character print_user*32, job_name*32

           equivalence (job_id, job_list(1, example))
           equivalence (print_user, job_list(3, example))
           equivalence (print_user_length, job_list(19, example))
           equivalence (job_name, job_list(20, example))
           equivalence (job_name_length, job_list(36, example))
           equivalence (job_priority, job_list(37, example))
           equivalence (job_status, job_list(39, example))

           call prf_$read_queue(printer_flag, index, max_jobs,
          &                     ret_jobs, job_list, status)

DESCRIPTION
     This call supplies a list of queued jobs at the current site.

     printer_flag
          An enumerated value that specifies how jobs will be listed in
          job_list.  Currently, the only legal value for printer_flag is
          prf_$read_by_printer, which causes prf_$read_queue to return only
          those jobs queued for the printer specified in the current print
          data structure.

     index
          An index into the jobs in the current queue.  Index specifies the
          position in the queue of the first job requested when
          prf_$read_queue is called; it contains the position in the queue of
          the next job to request when prf_$read_queue returns.

          When calling prf_$read_queue, an index of 1 will cause
          prf_$read_queue to supply the first max_jobs jobs from the queue in
          job_list.  Then when prf_$read_queue returns, index will be the
          position of the next unread job in the queue.

          If the difference between the call and return values of index is
          less than max_jobs, then job_list contains the last job in the
          queue.  If the difference is equal to max_jobs, there may be more
          jobs in the queue; that is, job_list may not contain the last job in
          the queue.  If the job list is exhausted when prf_$read_queue
          returns, index contains the position of the last job, or, more sim-
          ply, just the number of jobs queued at the current site.

     max_jobs
          The maximum number of jobs that prf_$read_queue should supply.  The
          value of max_jobs depends on the size of the buffer allocated to
          receive the job_list argument.

     ret_jobs
          The number of jobs supplied in job_list.

     job_list
          An array of type prf_$job_entry_t containing a list of jobs from the
          current queue.

     status
          The completion status.

SEE ALSO
     prf_$edit_job, prf_$get_printers, prf_$get_sites.

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