Name Date Size

.. 2005-08-09 04:36:42 15

Makefile 2005-06-14 09:00:00 1.7 KiB

postprint.c 2005-08-09 04:36:42 23.5 KiB

postprint.h 2005-06-14 09:00:00 2 KiB

README 2005-06-14 09:00:00 2.4 KiB

README

#
# 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
#
Source code for a simple program that translates ASCII files into PostScript. The
only important change, besides the restructuring that's been applied to all the
translators, is the addition of the -r option that controls how carriage returns
are handled. As in previous versions the default behavior is to ignore carriage
returns. The two other choices are to return to column 1 (-r1 option) or treat
carriage returns as newlines (-r2 option). You can modify the default behavior by
changing the initialization of crmode (near line 98) in postprint.c.
Things have been tuned for PostScript printers running at 9600 baud, and may not
be optimal for fast printers running at higher baud rates. A few simple changes
here and in ../postscript/postprint.ps could help if throughput seems to be
lacking:
1) Near line 755 in postprint.c change
fprintf(fp_out, ")%d L\n", stringstart-1);
to
fprintf(fp_out, ")%d %d L\n", stringstart-1, stringcount);
Then change the definition of procedure L in ../postscript/postprint.ps
to,
/L {
{charwidth mul currentpoint exch pop show} repeat
linespace add dup 0 exch moveto
} bind def
2) Change the upper limit test near line 694 (procedure spaces()) in postprint.c
from 6 to something bigger. Output files will be larger, but will run faster
when they get to the printer. Should help if you're running at 19.2KB or
higher.
3) Adjust the scaling set in procedure setup in ../postscript/postprint.ps so
1 unit corresponds to the line spacing. Then replace 'linespace add' in
procedures l and L by '1 sub'. It's a little tricky, but I've tried it and
it does work.