Annotation of researchv10no/cmd/postscript/postio/postio.1, revision 1.1.1.1

1.1       root        1: .TH POSTIO 1 "DWB 3.2"
                      2: .SH NAME
                      3: .B postio
                      4: \- serial interface for PostScript printers
                      5: .SH SYNOPSIS
                      6: \*(mBpostio\f1
                      7: .OP \-l line
                      8: .OP "" options []
                      9: .OP "" files []
                     10: .SH DESCRIPTION
                     11: .B postio
                     12: sends
                     13: .I files
                     14: to the PostScript printer attached to
                     15: .IR line .
                     16: If no
                     17: .I files
                     18: are specified the standard input is sent.
                     19: The first group of
                     20: .I options
                     21: should be sufficient for most applications:
                     22: .TP 0.75i
                     23: .OP \-b speed
                     24: Transmit data over
                     25: .I line
                     26: at baud rate
                     27: .I speed.
                     28: Recognized baud rates are 1200, 2400, 4800, 9600, and 19200.
                     29: The default
                     30: .I speed
                     31: is 9600 baud.
                     32: .TP
                     33: .OP \-c
                     34: Do not send
                     35: .MR ^C s
                     36: (interrupts) to the printer,
                     37: which means
                     38: .B postio
                     39: does not force a busy printer into the idle state.
                     40: .TP
                     41: .OP \-l line
                     42: Connect to printer attached to
                     43: .IR line .
                     44: In most cases there is no default and
                     45: .B postio
                     46: must be able to read and write
                     47: .IR line .
                     48: If
                     49: .I line
                     50: does not begin with
                     51: .MW /
                     52: it is treated as a Datakit destination.
                     53: .TP
                     54: .OP \-q
                     55: Prevents status queries while
                     56: .I files
                     57: are being sent to the printer.
                     58: When status queries are disabled a dummy message is appended
                     59: to the log file before each block is transmitted.
                     60: .TP
                     61: .OP \-B num
                     62: Set internal buffer size for reading and writing
                     63: .I files
                     64: to
                     65: .I num
                     66: bytes
                     67: (default is 2048 bytes).
                     68: .TP
                     69: .OP \-D
                     70: Enable debug mode.
                     71: Guarantees that everything read on
                     72: .I line
                     73: will be added to the log file (standard error by default).
                     74: .TP
                     75: .OP \-L file
                     76: Data received on
                     77: .I line
                     78: gets put in
                     79: .IR file .
                     80: The default log
                     81: .I file
                     82: is standard error.
                     83: Printer or status messages that do not indicate a change in state
                     84: are not normally written to
                     85: .I file
                     86: but can be forced out using the
                     87: .OP \-D
                     88: option.
                     89: .TP
                     90: .OP \-P string
                     91: Send
                     92: .I string
                     93: to the printer before any of the input files.
                     94: The default
                     95: .I string
                     96: is simple PostScript code that disables timeouts.
                     97: .TP
                     98: .OP \-R num
                     99: Run
                    100: .B postio
                    101: as a single process if
                    102: .I num
                    103: is 1 or as separate read and write processes if
                    104: .I num
                    105: is 2.
                    106: By default
                    107: .B postio
                    108: runs as a single process.
                    109: .PP
                    110: The next two
                    111: .I options
                    112: are provided for users who expect to run
                    113: .B postio
                    114: on their own.
                    115: Neither is suitable for use in spooler interface
                    116: programs:
                    117: .TP 0.35i
                    118: .OP \-i
                    119: Run the program in interactive mode.
                    120: Any
                    121: .I files
                    122: are sent first and followed by the standard input.
                    123: Forces separate read and write processes
                    124: and overrides many other options.
                    125: To exit interactive mode use your interrupt or quit character.
                    126: To get a friendly interactive connection with the printer type
                    127: .MW executive
                    128: on a line by itself.
                    129: .TP
                    130: .OP \-t
                    131: Data received on
                    132: .I line
                    133: and not recognized as printer or status information is written to
                    134: the standard output.
                    135: Forces separate read and write processes.
                    136: Convenient if you have a PostScript program that
                    137: will be returning useful data to the host.
                    138: .PP
                    139: The last option is not generally recommended and should only
                    140: be used if all else fails to provide a reliable connection:
                    141: .TP 0.35i
                    142: .OP \-S
                    143: Slow the transmission of data to the printer.
                    144: Severely limits throughput, runs as a single process,
                    145: disables the
                    146: .OP \-q
                    147: option, limits the internal buffer size to 1024 bytes,
                    148: can use an excessive amount of
                    149: .SM CPU
                    150: time, and does nothing in interactive mode.
                    151: .PP
                    152: Best performance is usually obtained by using
                    153: a large internal buffer
                    154: .OP -B "" ) (
                    155: and by running the program as separate read and write processes
                    156: .OP \-R2 "" ). (
                    157: Inability to fork the additional process causes
                    158: .B postio
                    159: to continue as a single read/write process.
                    160: When one process is used, only data sent to the printer is flow-controlled.
                    161: .PP
                    162: The options are not all mutually exclusive.
                    163: The
                    164: .OP \-i
                    165: option always wins, selecting its own settings for whatever is
                    166: needed to run interactive mode, independent of anything else
                    167: found on the command line.
                    168: Interactive mode runs as separate read and write processes
                    169: and few of the other
                    170: .I options
                    171: accomplish anything in the presence of the
                    172: .OP \-i
                    173: option.
                    174: The
                    175: .OP \-t
                    176: option needs a reliable two way connection to the printer and
                    177: therefore tries to force separate read and write processes.
                    178: The
                    179: .OP \-S
                    180: option relies on the status query mechanism, so
                    181: .OP \-q
                    182: is disabled and the program runs as a single process.
                    183: .PP
                    184: In most cases
                    185: .B postio
                    186: starts by making a connection to
                    187: .I line
                    188: and then attempts to force the printer into the
                    189: .SM IDLE
                    190: state by sending an appropriate sequence of
                    191: .MW ^T
                    192: (status query), 
                    193: .MW ^C
                    194: (interrupt), and
                    195: .MW ^D
                    196: (end of job) characters.
                    197: When the printer goes
                    198: .SM IDLE
                    199: .I files
                    200: are transmitted along with an occasional
                    201: .MW ^T
                    202: (unless the
                    203: .OP \-q
                    204: option was used).
                    205: After all the
                    206: .I files
                    207: are sent the program waits until it is reasonably sure the
                    208: job is complete.
                    209: Printer generated error messages received at any time
                    210: except while establishing the initial connection
                    211: (or when running interactive mode) cause
                    212: .B postio
                    213: to exit with a non-zero status.
                    214: In addition to being added to the log file, printer error messages
                    215: are also echoed to standard error.
                    216: .SH EXAMPLES
                    217: Run as a single process at 9600 baud and send
                    218: .I file1
                    219: and
                    220: .I file2
                    221: to the printer attached to
                    222: .MR /dev/tty01 :
                    223: .EX
                    224: postio -l /dev/tty01  \f2file1  file2
                    225: .EE
                    226: Same as above except two processes are used,
                    227: the internal buffer is set to 4096 bytes,
                    228: and data returned by the printer gets put in file
                    229: .MR log :
                    230: .EX
                    231: postio -R2 -B4096 -l/dev/tty01 -Llog  \f2file1  file2
                    232: .EE
                    233: Establish an interactive connection with the printer at Datakit
                    234: destination
                    235: .MR my/printer :
                    236: .EX
                    237: postio -i -l my/printer
                    238: .EE
                    239: Send file
                    240: .MW program
                    241: to the printer connected to
                    242: .MR /dev/tty22 ,
                    243: recover any data in file
                    244: .MR results ,
                    245: and put log messages in file
                    246: .MR log :
                    247: .EX
                    248: postio -t -l /dev/tty22 -L log program >results
                    249: .EE
                    250: .SH DIAGNOSTICS
                    251: A 0 exit status is returned if the files ran successfully.
                    252: System errors (e.g., ``can't open the line'') set the low order
                    253: bit in the exit status, while PostScript errors set bit 1.
                    254: An exit status of 2 usually means the printer
                    255: detected a PostScript error in the input
                    256: .IR files .
                    257: .SH WARNINGS
                    258: .PP
                    259: The input
                    260: .I files
                    261: are handled as a single PostScript job.
                    262: Sending several different jobs, each with their own internal
                    263: end of job mark
                    264: .RM ( ^D )
                    265: is not guaranteed to work properly.
                    266: .B postio
                    267: may quit before all the jobs have completed and could be restarted
                    268: before the last one finishes.
                    269: .PP
                    270: All the capabilities described above may not be available on every
                    271: machine or even across the different versions of
                    272: .SM UNIX
                    273: that are currently supported by the program.
                    274: For example, the code needed to connect to a Datakit destination may only
                    275: work on System\ V and may require that the
                    276: .SM DKHOST
                    277: software package be available at compile time.
                    278: .PP
                    279: There may be no default
                    280: .I line
                    281: so using
                    282: .OP \-l
                    283: option is strongly recommended.
                    284: If omitted
                    285: .B postio
                    286: may attempt to connect to the printer using the standard output.
                    287: If Datakit is involved the
                    288: .OP \-b
                    289: may be ineffective and attempts by
                    290: .B postio
                    291: to flow control data in both directions may not work.
                    292: The
                    293: .OP \-q
                    294: option can help if the printer is connected to \s-1RADIAN\s+1.
                    295: The
                    296: .OP \-S
                    297: option is not generally recommended and should only be used if
                    298: all else fails to establish a reliable connection.
                    299: .SH SEE ALSO
                    300: .BR buildtables (1),
                    301: .BR dpost (1),
                    302: .BR postdaisy (1),
                    303: .BR postdmd (1),
                    304: .BR postmd (1),
                    305: .BR postprint (1),
                    306: .BR postreverse (1),
                    307: .BR posttek (1),
                    308: .BR printfont (1)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.