# # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */ Source code in this directory is for the program that can be used to send files to printers that understand PostScript. I've added code that lets you split the program into separate read and write processes (the -R2 option), supports an interactive mode (-i option), suppresses status queries while the files are being transmitted to the printer (-q option), and runs in a mode that can help if flow control doesn't appear to be working properly (-S option). All the options are described in the man page. In addition The parsing of lines returned by the printer has been improved and should do a decent job with anything that comes its way. By default the program runs much like the original version - a single process with status queries sent every block or two. It's not how to get the best performance, but using a single read/write process may be important if you're running lots of printers under a single userid. Four things can help improve performance, and all can be set by command line options: 1: Use separate read and write processes. The -R2 option gets it or if you want it as the default initialize splitme (near line 132 in postio.c) to TRUE before compiling postio. 2: Use a large input buffer. The default size is 2048 bytes, but it can be set to whatever you want on the command line using the -B option. If you want a larger default buffer change the definition of BLOCKSIZE (near line 204 in postio.h) before you compile postio. 3: Quiet mode prevents the transmission of status requests (ie. ^Ts) while files are being sent to the printer. You can turn off the status query stuff with the -q option or if you want it as the default initialize quiet (near line 122 in postio.c) to TRUE before compiling the program. 4: Avoid using the -S option. It's real slow and I thought some about leaving it out, but it's needed at a few sites. Seems to help most with printers connected to UTS systems using DACUs and Datakit PVCs. One possible strategy would be to have the spooler run postio as a single process on all small printers (eg. LaserWriters or PS-800s) and use two processes on faster printers like the DataProducts 2665 or QMS PS-2400. A typical command line might look something like, postio -l /dev/tty?? -b 9600 -L log file1 file2 file3 where /dev/tty?? is the line that's connected to the printer, 9600 (or B9600) is the baud rate, and log is a file used to record printer status. You should always use the -l option to select the printer line, and if you don't choose a log file everything coming back from the printer goes to stderr. The following command line accomplishes the same thing, but runs postio as separate read and write processes, postio -R2 -l/dev/tty?? -b9600 -Llog file1 file2 file3 Check the man page for more examples.