1 03/31/83  remote_printer_
  2 
  3 
  4 Function: The remote_printer_ I/O module presents a stream I/O
  5 interface to the caller and performs record output to a printer, which
  6 is assumed to be part of a remote I/O device, such as a Honeywell
  7 Level 6 remote batch facility (G115 type), an IBM 2780, or an IBM
  8 3780.  Except for hardware restrictions, this module performs all the
  9 necessary code conversion and control in such a way that remote and
 10 local printing are the same.
 11 
 12 Entry points in this module are not called directly by users; rather,
 13 the module is accessed through the I/O system.
 14 
 15 This module in turn constructs an attach description for the module
 16 specified in the -terminal control argument, passing the attach
 17 information for horizontal tabbing, physical line length, and all other
 18 attach information specified by the caller.
 19 
 20 
 21 Syntax and Attach Description:
 22      remote_printer_ -control_args
 23 
 24 
 25 Control arguments:
 26    The following control arguments are optional, with the exception of
 27 -terminal:
 28 -horizontal_tab, -htab
 29    printer has a horizontal tab feature.  The default is no tab
 30    control.
 31 -physical_line_length N, -pll N
 32    printer has a maximum line width of N characters.  The default is
 33    132 characters.
 34 -physical_page_length N, -ppl N
 35    printer has a maximum line count per page of N.  The default is 66
 36    lines.
 37 -terminal STR
 38    uses the terminal I/O module specified by STR.  This control
 39    argument is required.
 40 
 41 
 42 Open Operation:
 43 The remote printer I/O module supports the stream_output opening mode.
 44 
 45 
 46 Put Chars Operation:
 47 The put_chars entry converts a character string delimited by a newline
 48 character to an image suitable for printing and transmits this image to
 49 the terminal I/O module.  This operation is repeated until all the
 50 characters specified by the caller have been transmitted.
 51 
 52 
 53 List of Control Operations:
 54    This I/O module supports all the control operations supported by
 55    the terminal I/O module specified in the attach description.  In
 56    addition, it supports the following control orders:
 57 channel_stops
 58    sets the channel stop data used for slew to channel control
 59    sequences during a put_chars operation.  The info pointer defines
 60    the channel_stops input array as found in the prt_order_info include
 61    file.  Array element N defines the stops for line number N.  Bit M
 62    of an array element defines a stop for channel M.  The initial value
 63    is no stops defined.  Once defined, the stops remain in effect until
 64    the next channel_stops control operation.
 65 end_of_page
 66    advances the paper to the bottom of the current page, one line below
 67    the point where page labels are printed.  If page labels are set the
 68    label is printed.  The info pointer is not used and may be null.
 69 
 70 
 71 get_count
 72    returns accounting information.  The info pointer defines the counts
 73    output structure as found in the prt_order_info include file.  The
 74    page and line counts are reset by the reset control operation.
 75 get_error_count
 76    returns the error count since the output module was attached.  The
 77    info pointer defines the output variable ret_error_count as found in
 78    the prt_order_info include file.
 79 get_position
 80    returns the position data defined by the position_data structure in
 81    the prt_order_info include file.  The data resembles that of the
 82    get_count control operation, but the structure adds the total
 83    characters printed since the last reset to allow the caller to start
 84    the next put_chars operation at the following character when the
 85    module returns due to 1pg or stopN mode.  The data structure is also
 86    used for the set_position operation (see below).
 87 
 88 
 89 inside_page
 90    advances the paper to the formfeed position of the next inside page.
 91    An inside page is a top page when the listing is folded correctly.
 92    Separator bars for the head sheet are printed over the perforations
 93    at the bottom of an inside page.  The info pointer is not used and
 94    may be null.
 95 outside_page
 96    advances the paper to the formfeed position of the next outside
 97    page.  An outside page is a bottom page when the listing is folded
 98    correctly.  The info pointer is not used and may be null.
 99 page_labels
100    sets the top and bottom page labels to be printed for each logical
101    page.  The info pointer may be null to reset page labels to blank.
102    Otherwise, the info pointer defines the page_labels input structure
103    as found in the prt_order_info include file.
104 
105 
106 paper_info
107    sets the physical characteristics of the paper in the printer.  The
108    info pointer defines the paper_info input structure as found in the
109    prt_order_info include file.  Once set, the paper_info remains in
110    effect until the next paper_info control operation.  If the printer
111    has a software loadable VFC image, a new image is loaded and the
112    printer placed out of synchronization for the operator to align the
113    paper.  Otherwise, the code error_table_$no_operation is returned so
114    the caller can request the operator to load the appropriate VFU tape
115    and set the required lines per inch switch to complete the
116    operation.  The defaults are:  page length, 66; line length, 136;
117    lines per inch, 6.
118 reset
119    resets the output module to its default state:  default modes, no
120    page labels, line count = 0, page count = 1, and total chars = 0.
121    The info pointer is not used and may be null.
122 
123 
124 resetwrite
125    cancels any data buffered for output.  It is used to clear the
126    output module after an error so the paper can be resynchronized.
127    The info pointer is not used and may be null.
128 runout
129    causes all buffered data to be output before returning to the
130    caller.  It is used to synchronize the program with the actual
131    device.  The info pointer is not used and may be null.
132 set_position
133    sets the internal counters in the output module.  The info pointer
134    defines the position_data input structure as found in the
135    prt_order_info include file.  This is the reverse of the
136    get_position control operation.  It is used to start the accounting
137    data at the correct point when restarting an I/O daemon request in
138    the middle.
139 
140 
141 List of Modes Operations:
142    This I/O module supports all the modes supported by the terminal
143    I/O module specified in the attach description.  In addition, it
144    supports the following modes:
145 1pg, ^1pg
146    causes the output module to return to the caller when the end of the
147    current page is reached (i.e., at the formfeed position for the next
148    logical page).  If there are unprocessed characters at this point,
149    the code error_table_$request_pending is returned.  The default is
150    ^1pg.
151 
152 
153 ctl_char, ^ctl_char
154    causes the output module to pass nonprinting characters to the
155    device as is.  Carriage movement characters (newline, formfeed,
156    carriage return, backspace, and horizontal and vertical tab) are
157    interpreted normally.  The ASCII escape character (octal 033) is
158    also transmitted directly, unless esc mode is enabled.  If ctl_char
159    mode is disabled, the treatment of nonprinting characters is
160    determined by the setting of non_edited mode.  The default is
161    ^ctl_char.
162 esc, ^esc
163    enables searching for escape sequences in the input string, which
164    enables slew to channel orders.  The default is ^esc.
165 
166 
167 non_edited, ^non_edited
168    causes the output module to print the applicable octal ASCII code
169    preceded by a backslash (\) for nonprinting characters, and to use
170    the nonedited output conversion table in the specified TTT for the
171    remote device.  The ^non_edited value causes any such characters to
172    be omitted from the output.  The setting of this mode is ignored
173    when ctl_char is in effect.  The default is ^non_edited.
174 noskip, ^noskip
175    suppresses the automatic insertion of blank lines at the end of a
176    logical page (i.e., it allows the printer to print over the
177    perforations).  It has the side effect of setting the logical page
178    length to its default value.  The default is ^noskip.
179 
180 
181 print, ^print
182    specifies that processed characters from the input string are to be
183    printed.  The ^print value allows a string to be processed for
184    output, sets page and line counts, and honors the 1pg and stopN
185    modes, but without actually printing the processed characters.  The
186    default is print.
187 single, ^single
188    specifies that any formfeed or vertical tab characters from the
189    input string are to be converted to newline characters (i.e., it
190    suppresses runaway paper feeding).  The default is ^single.
191 truncate, ^truncate
192    truncates the output if the line exceeds the line length.  The
193    ^truncate value allows the line to be wrapped onto the next line if
194    it is too long.  The default is ^truncate.
195 
196 
197 plN
198    sets the logical page length to N lines.  At the end of a logical
199    page, the printer skips to the next formfeed position (unless noskip
200    mode is set).  The value of N must be greater than one, and can be
201    greater than a physical page.  The default value is physical page
202    length minus lines per inch.
203 llN
204    sets the logical line length to N characters.  The value of N must
205    be greater than the indentation (see below) and must not be greater
206    than the physical line length of the device.  The default value is
207    the physical line length.
208 inN
209    sets the indentation to N characters.  The value of N must be 0 or a
210    positive integer which is less than the logical line length.  The
211    default value is 0.
212 
213 
214 stopN
215    sets the output module to return to the caller every N pages even
216    though the processing of the input string has not been completed.
217    If there is unprocessed input remaining, a code of
218    error_table_$request_pending is returned.  A value of 0 means do not
219    return until all input is processed.  The counter of how many pages
220    to process before returning is reset when a new value is given.  The
221    default value is 0.
222 default
223    causes all of the above modes to be reset to their default values.
224    This mode is also passed to the terminal I/O module for processing.
225 
226 
227 Position Operation:
228 This I/O module supports all the position operations supported by the
229 terminal I/O module specified in the attach description.