Official Patch 6 for psroff.
Chris Lewis
clewis at eci386.uucp
Wed Jan 10 07:36:00 AEST 1990
Patch 06 for psroff, please install it.
To install the patch, please:
cd to your psroff source directory
restore the original defs.h and Makefile
unshar this patch
execute the file 'prepatch', by executing 'sh ./prepatch'
patch -p < Patch06
Please read README for patch 06 and see if any of the
the changes affect your installation.
Reconfigure the new defs.h and Makefile to match your system
make
su root
make install
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 1 (of 1)."
# Contents: ./Intro.06 ./Patch06 ./macros ./macros/common.post
# ./macros/common.pre ./macros/tmac.an ./macros/tmac.m
# ./macros/tmac.s ./prepatch ./tmac.t2.sh
# Wrapped by clewis at eci386 on Mon Jan 8 16:40:21 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f './Intro.06' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./Intro.06'\"
else
echo shar: Extracting \"'./Intro.06'\" \(435 characters\)
sed "s/^X//" >'./Intro.06' <<'END_OF_FILE'
X Patch 06 for psroff, please install it.
X
X To install the patch, please:
X
X cd to your psroff source directory
X restore the original defs.h and Makefile
X unshar this patch
X execute the file 'prepatch', by executing 'sh ./prepatch'
X patch -p < Patch06
X Please read README for patch 06 and see if any of the
X the changes affect your installation.
X Reconfigure the new defs.h and Makefile to match your system
X make
X su root
X make install
END_OF_FILE
if test 435 -ne `wc -c <'./Intro.06'`; then
echo shar: \"'./Intro.06'\" unpacked with wrong size!
fi
# end of './Intro.06'
fi
if test -f './Patch06' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./Patch06'\"
else
echo shar: Extracting \"'./Patch06'\" \(27263 characters\)
sed "s/^X//" >'./Patch06' <<'END_OF_FILE'
X*** /usr4/public/src/t2current/./lj.c Mon Jan 8 16:37:54 1990
X--- ./lj.c Mon Jan 8 16:38:58 1990
X***************
X*** 52,61 ****
X
X #ifndef SVR3
X #ifndef lint
X! static char SCCSid[] = "@(#)lj.c: 1.10 Copyright 89/12/05 14:03:51 Chris Lewis";
X #endif
X #else
X! #ident "@(#)lj.c: 1.10 Copyright 89/12/05 14:03:51 Chris Lewis" /*(SVR3)*/
X #endif
X
X #define USED 1
X--- 52,61 ----
X
X #ifndef SVR3
X #ifndef lint
X! static char SCCSid[] = "@(#)lj.c: 1.11 Copyright 89/12/22 11:02:10 Chris Lewis";
X #endif
X #else
X! #ident "@(#)lj.c: 1.11 Copyright 89/12/22 11:02:10 Chris Lewis" /*(SVR3)*/
X #endif
X
X #define USED 1
X***************
X*** 190,195 ****
X--- 190,196 ----
X xad = points * rp->t2b_xc;
X yad = points * rp->t2b_yc;
X ljSetFont(font, points);
X+ DEBUGPRINTF("sequence: %s, x, y = %f,%f\n", sequence, nx+xad, ny+yad);
X
X /* We won't output fractions */
X #define XYS "\033&a%.0fh%.0fV%s"
X*** /usr4/public/src/t2current/./dt.h Mon Jan 8 16:38:29 1990
X--- ./dt.h Mon Jan 8 16:39:00 1990
X***************
X*** 14,23 ****
X
X #ifndef SVR3
X #ifndef lint
X! static char dtID[] = "@(#)dt.h: 1.2 Copyright 89/12/08 15:35:07 Chris Lewis";
X #endif
X #else
X! #ident "@(#)dt.h: 1.2 Copyright 89/12/08 15:35:07 Chris Lewis"
X #endif
X
X /* This is actually done in the back-end */
X--- 14,23 ----
X
X #ifndef SVR3
X #ifndef lint
X! static char dtID[] = "@(#)dt.h: 1.3 Copyright 90/01/08 16:31:05 Chris Lewis";
X #endif
X #else
X! #ident "@(#)dt.h: 1.3 Copyright 90/01/08 16:31:05 Chris Lewis"
X #endif
X
X /* This is actually done in the back-end */
X***************
X*** 24,33 ****
X #define DTRESOLUTION 300
X /* Length scaling factor */
X #define DTSCALEFACTOR ((double) dtresolution / TROFFRESOLUTION)
X! /* Troff assumes 7.5" paper width, most macro packages print in
X! 6.5" area within that. Sooo, we'll center the paperwidth on the
X! physical page - implying .5" inch physical margins.*/
X! #define TROFF2DTX(x) ((x) * DTSCALEFACTOR + dtresolution / 2)
X /* 11" paper length */
X #define TROFF2DTY(y) ((y) * DTSCALEFACTOR)
X
X--- 24,30 ----
X #define DTRESOLUTION 300
X /* Length scaling factor */
X #define DTSCALEFACTOR ((double) dtresolution / TROFFRESOLUTION)
X! #define TROFF2DTX(x) ((x) * DTSCALEFACTOR)
X /* 11" paper length */
X #define TROFF2DTY(y) ((y) * DTSCALEFACTOR)
X
X*** /usr4/public/src/t2current/./psroff.sh Mon Jan 8 16:38:30 1990
X--- ./psroff.sh Mon Jan 8 16:39:00 1990
X***************
X*** 11,25 ****
X # Author: Chris Lewis
X # Specs: troff driver
X #
X! #ident "@(#)psroff.sh: 1.22 Copyright 89/12/12 15:55:55 Chris Lewis"
X troff=troff
X! #troff=/usr2/clewis/src/spxroff/tnroff/troff
X term=false
X type=`basename $0 | sed -e 's/^\(..\).*/\1/'`
X copies=1
X for i in $*
X do
X case $i in
X -X)
X set -x
X ;;
X--- 11,29 ----
X # Author: Chris Lewis
X # Specs: troff driver
X #
X! #ident "@(#)psroff.sh: 1.24 Copyright 90/01/03 11:48:55 Chris Lewis"
X troff=troff
X! #troff=/usr2/clewis/src/spx/tnroff/troff
X term=false
X+ fail=false
X type=`basename $0 | sed -e 's/^\(..\).*/\1/'`
X copies=1
X for i in $*
X do
X case $i in
X+ -F)
X+ fail=true
X+ ;;
X -X)
X set -x
X ;;
X***************
X*** 43,48 ****
X--- 47,56 ----
X file="%%TMACDIR%%/mac.$type/tmac.$mac"
X if [ ! -r $file ]
X then
X+ file="%%TMACDIR%%/tmac.$mac"
X+ fi
X+ if [ ! -r $file ]
X+ then
X file="%%RTMACDIR%%/tmac.$mac"
X fi
X if [ ! -r $file ]
X***************
X*** 106,112 ****
X exit 1
X ;;
X esac
X! if $term
X then
X ( $troff -t -T$type $args $files 2>&1 ) | $t2 $length -T$type $debug
X exit $?
X--- 114,123 ----
X exit 1
X ;;
X esac
X! if $fail
X! then
X! $troff -t -T$type $args $files > /dev/null
X! elif $term
X then
X ( $troff -t -T$type $args $files 2>&1 ) | $t2 $length -T$type $debug
X exit $?
X*** /usr4/public/src/t2current/./ps.h Mon Jan 8 16:37:56 1990
X--- ./ps.h Mon Jan 8 16:39:01 1990
X***************
X*** 13,22 ****
X
X #ifndef SVR3
X #ifndef lint
X! static char psID[] = "@(#)ps.h: 1.16 Copyright 89/12/06 15:28:45 Chris Lewis";
X #endif
X #else
X! #ident "@(#)ps.h: 1.16 Copyright 89/12/06 15:28:45 Chris Lewis"
X #endif
X
X /* Points per inch (default PostScript resolution) */
X--- 13,22 ----
X
X #ifndef SVR3
X #ifndef lint
X! static char psID[] = "@(#)ps.h: 1.17 Copyright 90/01/08 16:31:08 Chris Lewis";
X #endif
X #else
X! #ident "@(#)ps.h: 1.17 Copyright 90/01/08 16:31:08 Chris Lewis"
X #endif
X
X /* Points per inch (default PostScript resolution) */
X***************
X*** 23,32 ****
X #define PSRESOLUTION 72
X /* Length scaling factor */
X #define PSSCALEFACTOR ((double) PSRESOLUTION / TROFFRESOLUTION)
X! /* Troff assumes 7.5" paper width, most macro packages print in
X! 6.5" area within that. Sooo, we'll center the paperwidth on the
X! physical page - implying .5" inch physical margins.*/
X! #define TROFF2PSX(x) ((x) * PSSCALEFACTOR + PSRESOLUTION / 2)
X /* 11" paper length (note the reversed sign!) */
X #define TROFF2PSY(y) ((pagelength - (y)) * PSSCALEFACTOR)
X
X--- 23,29 ----
X #define PSRESOLUTION 72
X /* Length scaling factor */
X #define PSSCALEFACTOR ((double) PSRESOLUTION / TROFFRESOLUTION)
X! #define TROFF2PSX(x) ((x) * PSSCALEFACTOR)
X /* 11" paper length (note the reversed sign!) */
X #define TROFF2PSY(y) ((pagelength - (y)) * PSSCALEFACTOR)
X
X*** /usr4/public/src/t2current/./dt.c Mon Jan 8 16:38:31 1990
X--- ./dt.c Mon Jan 8 16:39:03 1990
X***************
X*** 19,28 ****
X
X #ifndef SVR3
X #ifndef lint
X! static char SCCSid[] = "@(#)dt.c: 1.9 Copyright 89/12/13 11:28:39 Chris Lewis";
X #endif
X #else
X! #ident "@(#)dt.c: 1.9 Copyright 89/12/13 11:28:39 Chris Lewis" /*(SVR3)*/
X #endif
X
X #define MAXFONT 50
X--- 19,28 ----
X
X #ifndef SVR3
X #ifndef lint
X! static char SCCSid[] = "@(#)dt.c: 1.10 Copyright 89/12/21 17:26:07 Chris Lewis";
X #endif
X #else
X! #ident "@(#)dt.c: 1.10 Copyright 89/12/21 17:26:07 Chris Lewis" /*(SVR3)*/
X #endif
X
X #define MAXFONT 50
X***************
X*** 334,344 ****
X long x, y;
X int font, points, troffChar; {
X static double lasty = (-1);
X register double nx = TROFF2DTX(x), ny = TROFF2DTY(y);
X register struct troff2befont *rp;
X register char *sequence = "a";
X if (pagePending) {
X! lasty = lastFont = lastPoints = (-1);
X doPageStart();
X }
X
X--- 334,345 ----
X long x, y;
X int font, points, troffChar; {
X static double lasty = (-1);
X+ static double lastx = (-1);
X register double nx = TROFF2DTX(x), ny = TROFF2DTY(y);
X register struct troff2befont *rp;
X register char *sequence = "a";
X if (pagePending) {
X! lastx = lasty = lastFont = lastPoints = (-1);
X doPageStart();
X }
X
X***************
X*** 394,408 ****
X printf("H%d\nV%d\nc%s\n", (int) nx, (int) ny, sequence);
X else {
X #endif
X! printf("H%d\n", (int) nx);
X! if (lasty != ny) {
X! printf("V%d\n", (int) ny);
X! lasty = ny;
X }
X- if (sequence[1])
X- printf("C%s\n", sequence);
X- else
X- printf("c%s\n", sequence);
X #ifdef NOTYET
X }
X #endif
X--- 395,423 ----
X printf("H%d\nV%d\nc%s\n", (int) nx, (int) ny, sequence);
X else {
X #endif
X! /* print an nnc sequence if we can...may even be able to avoid
X! the newline. */
X!
X! if (lasty == ny &&
X! sequence[1] == 0 &&
X! lastx != -1 &&
X! (nx - lastx) > 0 && (nx - lastx) < 100) {
X!
X! printf("%02d%c\n",(int)(nx - lastx), sequence[0]);
X!
X! } else {
X!
X! printf("H%d\n", (int) nx);
X!
X! if (lasty != ny) {
X! printf("V%d\n", (int) ny);
X! lasty = ny;
X! }
X! if (sequence[1])
X! printf("C%s\n", sequence);
X! else
X! printf("c%s\n", sequence);
X }
X #ifdef NOTYET
X }
X #endif
X*** /usr4/public/src/t2current/./lj.h Mon Jan 8 16:38:34 1990
X--- ./lj.h Mon Jan 8 16:39:05 1990
X***************
X*** 16,25 ****
X
X #ifndef SVR3
X #ifndef lint
X! static char ljID[] = "@(#)lj.h: 1.7 Copyright 89/12/14 11:29:36 Chris Lewis";
X #endif
X #else
X! #ident "@(#)lj.h: 1.7 Copyright 89/12/14 11:29:36 Chris Lewis"
X #endif
X
X /* We're using decipoints */
X--- 16,25 ----
X
X #ifndef SVR3
X #ifndef lint
X! static char ljID[] = "@(#)lj.h: 1.8 Copyright 90/01/08 16:31:10 Chris Lewis";
X #endif
X #else
X! #ident "@(#)lj.h: 1.8 Copyright 90/01/08 16:31:10 Chris Lewis"
X #endif
X
X /* We're using decipoints */
X***************
X*** 27,50 ****
X /* Length scaling factor */
X #define LJSCALEFACTOR ((double) LJRESOLUTION / TROFFRESOLUTION)
X
X! /* Troff assumes 7.5" paper width, most macro packages print in
X! 6.5" area within that. Sooo, we'll center the paperwidth on the
X! physical page - implying .5" inch physical margins.*/
X! #define TROFF2LJX(x) ((x) * LJSCALEFACTOR + LJRESOLUTION / 2)
X
X /* 11" paper length */
X #define TROFF2LJY(y) ((y) * LJSCALEFACTOR)
X
X- /* These won't work (ron at mlfarm, */
X- /* 10.22.89) -- the offset of 1/2 inch */
X- /* spoils it, and the length scaling */
X- /* won't fit on a page. I'll only */
X /* change the DJ */
X- #ifdef BROKEN_XENIX
X- #define TROFF2DJX(x) ((x) * LJSCALEFACTOR)
X- #else
X #define TROFF2DJX(x) TROFF2LJX(x)
X- #endif
X /* for length, we want .25 inch */
X /* margins top and bottom, so we'll */
X /* scale the requests and add .25 inch */
X--- 27,39 ----
X /* Length scaling factor */
X #define LJSCALEFACTOR ((double) LJRESOLUTION / TROFFRESOLUTION)
X
X! #define TROFF2LJX(x) ((x) * LJSCALEFACTOR)
X
X /* 11" paper length */
X #define TROFF2LJY(y) ((y) * LJSCALEFACTOR)
X
X /* change the DJ */
X #define TROFF2DJX(x) TROFF2LJX(x)
X /* for length, we want .25 inch */
X /* margins top and bottom, so we'll */
X /* scale the requests and add .25 inch */
X*** /usr4/public/src/t2current/./defs.h Mon Jan 8 16:38:36 1990
X--- ./defs.h Mon Jan 8 16:39:09 1990
X***************
X*** 17,23 ****
X #define LIBDIR "/usr/lib/troff2"
X #endif
X
X! #define T2VERSION "Release 1 Patchlevel 5 89/12/14"
X
X /* Configuration parameters:
X */
X--- 17,23 ----
X #define LIBDIR "/usr/lib/troff2"
X #endif
X
X! #define T2VERSION "Release 1 Patchlevel 6 89/12/29"
X
X /* Configuration parameters:
X */
X***************
X*** 118,127 ****
X
X #ifndef SVR3
X #ifndef lint
X! static char defid[] = "@(#)defs.h: 1.23 Copyright 89/12/14 11:29:44 Chris Lewis";
X #endif
X #else
X! #ident "@(#)defs.h: 1.23 Copyright 89/12/14 11:29:44 Chris Lewis"
X #endif
X
X #include <stdio.h>
X--- 118,127 ----
X
X #ifndef SVR3
X #ifndef lint
X! static char defid[] = "@(#)defs.h: 1.24 Copyright 89/12/29 15:24:49 Chris Lewis";
X #endif
X #else
X! #ident "@(#)defs.h: 1.24 Copyright 89/12/29 15:24:49 Chris Lewis"
X #endif
X
X #include <stdio.h>
X*** /usr4/public/src/t2current/./ps.c Mon Jan 8 16:38:37 1990
X--- ./ps.c Mon Jan 8 16:39:12 1990
X***************
X*** 18,27 ****
X
X #ifndef SVR3
X #ifndef lint
X! static char SCCSid[] = "@(#)ps.c: 1.32 Copyright 89/12/14 11:29:57 Chris Lewis";
X #endif
X #else
X! #ident "@(#)ps.c: 1.32 Copyright 89/12/14 11:29:57 Chris Lewis" /*(SVR3)*/
X #endif
X
X /* ps.c will generate some additional "print" commands to cause
X--- 18,27 ----
X
X #ifndef SVR3
X #ifndef lint
X! static char SCCSid[] = "@(#)ps.c: 1.33 Copyright 90/01/05 20:16:44 Chris Lewis";
X #endif
X #else
X! #ident "@(#)ps.c: 1.33 Copyright 90/01/05 20:16:44 Chris Lewis" /*(SVR3)*/
X #endif
X
X /* ps.c will generate some additional "print" commands to cause
X***************
X*** 318,328 ****
X };
X
X psPage() {
X! EMITPS("hits misses\n");
X! EMITPS("PageSave restore\n");
X! EMITPS("/misses exch def /hits exch def\n");
X! EMITPS("ShowPage\n");
X! pagePending = 1;
X }
X
X static
X--- 318,330 ----
X };
X
X psPage() {
X! if (!currentPage)
X! return;
X! EMITPS("hits misses\n");
X! EMITPS("PageSave restore\n");
X! EMITPS("/misses exch def /hits exch def\n");
X! EMITPS("ShowPage\n");
X! pagePending = 1;
X }
X
X static
X*** /usr4/public/src/t2current/./psroff.1 Mon Jan 8 16:38:38 1990
X--- ./psroff.1 Mon Jan 8 16:39:15 1990
X***************
X*** 1,14 ****
X! .\"Copyright 1988 by Chris Lewis 1.7 89/12/12
X .TH PSROFF 1 local
X .SH NAME
X psroff,ljroff,xxroff \- troff replacement for PostScript or other printers
X .SH SYNOPSIS
X .IB xx roff
X! [-D] [-X] [-M]
X! [-Rnn]
X .RI "[-T" xx "]"
X .RI "[-rL" length "]"
X! .RI [ troffopts ] files ...
X .SH DESCRIPTION
X .I Psroff
X is functionally equivalent for
X--- 1,15 ----
X! .\"Copyright 1988 by Chris Lewis 1.8 89/12/29
X .TH PSROFF 1 local
X .SH NAME
X psroff,ljroff,xxroff \- troff replacement for PostScript or other printers
X .SH SYNOPSIS
X .IB xx roff
X! [-D] [-X] [-M] [-F]
X! .RI "[-R" nn "]"
X .RI "[-T" xx "]"
X .RI "[-rL" length "]"
X! .RI [ troffopts ]
X! files ...
X .SH DESCRIPTION
X .I Psroff
X is functionally equivalent for
X***************
X*** 20,30 ****
X arguments, in particular -m directives for specifying macro package.
X Note that the semantics of "-t" are changed - it means send the Postscript
X (or HP Laserjet) output to stdout.
X! The "-X" option does a "set -x" for debugging.
X! The "-D" option passes the "-D" option through to troff2ps.
X! The "-M" option turns on printer metrics (if supported by the driver).
X! The "-Rnn" option is passed to troff2ps and will set the resolution of
X the generated output (ditroff output only).
X .P
X Note that -m directives are parsed by psroff itself, not troff, and
X must be invoked *after* -T if -T is used.
X--- 21,34 ----
X arguments, in particular -m directives for specifying macro package.
X Note that the semantics of "-t" are changed - it means send the Postscript
X (or HP Laserjet) output to stdout.
X! The ``-X'' option does a ``set -x'' for debugging.
X! The ``D'' option passes the ``-D'' option through to troff2ps.
X! The ``-M'' option turns on printer metrics (if supported by the driver).
X! The ``-Rnn'' option is passed to troff2ps and will set the resolution of
X the generated output (ditroff output only).
X+ The ``-F'' option runs troff without
X+ .RI troff2 xx
X+ so that you can see troff's error messages.
X .P
X Note that -m directives are parsed by psroff itself, not troff, and
X must be invoked *after* -T if -T is used.
X***************
X*** 58,63 ****
X--- 62,136 ----
X used (see the documentation for MM and
X .I troff2ps
X for more details).
X+ .SH MACROS
X+ Included with the
X+ .I psroff
X+ package is a set of macros called
X+ .IR tmac.t2 .
X+ This is a set of extensions to and definitions for MM that we find useful.
X+ .P
X+ .I psroff
X+ comes with a series of macro adapters designed to make it work
X+ with the least amount of grief with various macro packages.
X+ In order for this to work, whenever you specify the
X+ .RI -m macro
X+ option,
X+ .I psroff
X+ attempts to find a set of adapters for the specified macro package.
X+ The search path is as follows:
X+ .BI /usr/lib/troff2/macros/mac. type /tmac. macro ,
X+ .BI /usr/lib/troff2/macros/tmac. macro ,
X+ and finally
X+ .BI /usr/lib/tmac/tmac. macro .
X+ Where
X+ .I type
X+ is the printer type (eg: ``ps'') and
X+ .I macro
X+ is the macros you requested (eg: ``m'' for a request of ``-mm'').
X+ Only the first
X+ .BR tmac. macro
X+ file found is used.
X+ .P
X+ The first two directories can contain files with something of the following
X+ form:
X+ .nf
X+ \&.so /usr/lib/troff2/macros/common.pre
X+ macro specific prolog customization if necessary
X+ \&.so <real macro package>
X+ macro specific epilog customization if necessary
X+ \&.so /usr/lib/troff2/macros/common.post
X+ .fi
X+ .P
X+ The intent is for
X+ .BI macros/mac. type /tmac. macro
X+ files to be adapters where the modifications have to be based on
X+ printer type,
X+ and
X+ .BI macros/tmac. macro
X+ where the modifications are independent of the printer type.
X+ .P
X+ .IR Psroff,
X+ as shipped comes with only printer independent adapters which have
X+ the following customizations in
X+ .BR common.pre :
X+ turn off ligatures,
X+ reload R, I, B, S font width tables,
X+ define ``.sR'' macro,
X+ and redefine ``.fp" directive to call both the built-in troff function ``.fp''
X+ and ``.sR''.
X+ .B common.post
X+ merely contains a disabling of ligatures (again).
X+ The macro-specific customization (as present) is simply the removal of
X+ cut marks.
X+ .SH FILES
X+ .if t .ta 2.5i
X+ .if n .ta 3.5i
X+ /usr/lib/troff2 Troff2ps library directory
X+ .br
X+ /usr/lib/troff2/macros/mac.* printer specific macro adapter directories
X+ .br
X+ /usr/lib/troff2/macros/tmac.* non-specific macro adapters
X+ etc.
X .SH BUGS
X Old-fashioned CAT troff doesn't have a mechanism for passing arbitrary
X commands to the CAT - eg: overlays, and physical font mounting etc.
X***************
X*** 75,82 ****
X errors except possibly as "illegal flash" errors from troff2ps, or varying
X degrees of extreme garbage on the printer.
X If you encounter mangled output, try running
X! troff instead of psroff, with the ``-t'' option, and direct stdout
X! to /dev/null.
X Then you will see troff's stderr.
X .SH "SEE ALSO"
X troff(1), troff2ps(1L), mm(5?)
X--- 148,154 ----
X errors except possibly as "illegal flash" errors from troff2ps, or varying
X degrees of extreme garbage on the printer.
X If you encounter mangled output, try running
X! psroff, with the ``-F'' option.
X Then you will see troff's stderr.
X .SH "SEE ALSO"
X troff(1), troff2ps(1L), mm(5?)
X*** /usr4/public/src/t2current/./Makefile Mon Jan 8 16:38:39 1990
X--- ./Makefile Mon Jan 8 16:39:16 1990
X***************
X*** 12,18 ****
X # Note: This is a System V Makefile, so you may
X # have some problems making a few of the items.
X #
X! #ident "@(#)Makefile: 1.42 Copyright 89/12/13 14:19:41 Chris Lewis"
X
X # Set to where you want the user-interfaces to go
X BINDIR = /usr/lbin
X--- 12,18 ----
X # Note: This is a System V Makefile, so you may
X # have some problems making a few of the items.
X #
X! #ident "@(#)Makefile: 1.44 Copyright 90/01/08 16:31:17 Chris Lewis"
X
X # Set to where you want the user-interfaces to go
X BINDIR = /usr/lbin
X***************
X*** 33,39 ****
X DTOUTPUT = | /usr/lib/troff/tpscript | rlp -dgate!AppleLaser -n$$copies
X # Testing type:
X TTYPE = ps
X! TFLAGS = -mt2
X
X # Libraries for Troff2 internals, created if it doesn't exist.
X # This *must* be a directory all by itself with no other stuff
X--- 33,39 ----
X DTOUTPUT = | /usr/lib/troff/tpscript | rlp -dgate!AppleLaser -n$$copies
X # Testing type:
X TTYPE = ps
X! TFLAGS = -mm
X
X # Libraries for Troff2 internals, created if it doesn't exist.
X # This *must* be a directory all by itself with no other stuff
X***************
X*** 57,62 ****
X--- 57,66 ----
X MAIN = troff2.o utils.o t2conf.o
X BACKENDS = lj.o ps.o lj.o ljtables.o dt.o
X PLIBDIR = $(LIBDIR)/lib
X+
X+ MACROS = $(TMACDIR)/common.post $(TMACDIR)/common.pre \
X+ $(TMACDIR)/tmac.an $(TMACDIR)/tmac.m $(TMACDIR)/tmac.s
X+
X INSTALL = $(LIBDIR)/troff2ps $(BINDIR)/psroff $(LIBDIR)/psxlate \
X $(T2DIR)/tmac.t2 \
X $(MANDIR)/psroff.1 \
X***************
X*** 67,72 ****
X--- 71,85 ----
X $(PLIBDIR)/lib.ps $(PLIBDIR)/fonts.ps \
X $(PLIBDIR)/confid.ps $(PLIBDIR)/lethead.ps
X
X+ SEDSCRIPT = sed -e 's;%%LJOUTPUT%%;$(LJOUTPUT);g' \
X+ -e 's;%%LKOUTPUT%%;$(LKOUTPUT);g' \
X+ -e 's;%%DJOUTPUT%%;$(DJOUTPUT);g' \
X+ -e 's;%%PSOUTPUT%%;$(PSOUTPUT);g' \
X+ -e 's;%%DTOUTPUT%%;$(DTOUTPUT);g' \
X+ -e 's;%%LIBDIR%%;$(LIBDIR);g' \
X+ -e 's;%%TMACDIR%%;$(TMACDIR);g' \
X+ -e 's;%%RTMACDIR%%;$(RTMACDIR);g'
X+
X DEFINES = '-DLIBDIR="$(PLIBDIR)"'
X CFLAGS = $(DEFINES)
X
X***************
X*** 105,110 ****
X--- 118,125 ----
X
X all: $(UTILLIST) fonts
X
X+ macros: $(MACROS)
X+
X chartab.tst ltest.tst: troff2ps
X chartab.prt ltest.prt: troff2ps
X
X***************
X*** 120,125 ****
X--- 135,142 ----
X dit2catwid: dit2catwid.o
X $(CC) $(CFLAGS) -o dit2catwid dit2catwid.o $(LIBFLAGS)
X
X+ dit2catwid.o:: defs.h
X+
X # The following is commented out because make has a bug in that
X # even if you don't want to make lint, it insists on making
X # the .c's from the SCCS files.
X***************
X*** 132,138 ****
X ps.o: defs.h ps.h
X lj.o ljtables.o: defs.h lj.h
X dt.o: defs.h dt.h
X- dit2catwid.o: defs.h
X
X # Testing software:
X testps.o: defs.h ps.h
X--- 149,154 ----
X***************
X*** 140,146 ****
X troff2.o utils.o: defs.h
X
X install: $(LIBDIR) $(T2DIR) $(TMACDIR) $(RTMACDIR) $(PLIBDIR) \
X! $(INSTALL) installfonts
X
X fonts: dit2catwid gfnttab
X for i in font?? ; \
X--- 156,162 ----
X troff2.o utils.o: defs.h
X
X install: $(LIBDIR) $(T2DIR) $(TMACDIR) $(RTMACDIR) $(PLIBDIR) \
X! $(INSTALL) $(MACROS) installfonts
X
X fonts: dit2catwid gfnttab
X for i in font?? ; \
X***************
X*** 164,181 ****
X $(LIBDIR) $(T2DIR) $(TMACDIR) $(PLIBDIR):
X su root -c "mkdir $@"
X
X! psroff: psroff.sh Makefile
X! sed -e 's;%%LJOUTPUT%%;$(LJOUTPUT);g' \
X! -e 's;%%LKOUTPUT%%;$(LKOUTPUT);g' \
X! -e 's;%%DJOUTPUT%%;$(DJOUTPUT);g' \
X! -e 's;%%PSOUTPUT%%;$(PSOUTPUT);g' \
X! -e 's;%%DTOUTPUT%%;$(DTOUTPUT);g' \
X! -e 's;%%LIBDIR%%;$(LIBDIR);g' \
X! -e 's;%%TMACDIR%%;$(TMACDIR);g' \
X! -e 's;%%RTMACDIR%%;$(RTMACDIR);g' \
X! psroff.sh > T
X chmod 755 T
X! mv T psroff
X
X deinstall:
X su root -c "rm -f $(INSTALL); rmdir $(LIBDIR)"
X--- 180,193 ----
X $(LIBDIR) $(T2DIR) $(TMACDIR) $(PLIBDIR):
X su root -c "mkdir $@"
X
X! psroff upload showfont tmac.t2: $$(@).sh Makefile
X! $(SEDSCRIPT) $@.sh > T
X chmod 755 T
X! mv T $@
X!
X! $(MACROS): macros/$$(@F)
X! $(SEDSCRIPT) macros/$(@F) > T
X! su root -c "mv T $@"
X
X deinstall:
X su root -c "rm -f $(INSTALL); rmdir $(LIBDIR)"
X*** /usr4/public/src/t2current/./showfont.sh Mon Jan 8 16:36:27 1990
X--- ./showfont.sh Mon Jan 8 16:39:18 1990
X***************
X*** 1,7 ****
X :
X! #@(#)showfont 1.3 89/08/25
X # Shell script to dump postscript fonts with widths into a pretty table
X
X (
X cat << !END!
X %! PS-Adobe 1.0
X--- 1,8 ----
X :
X! #@(#)showfont 1.4 90/01/08
X # Shell script to dump postscript fonts with widths into a pretty table
X
X+ copies=1
X (
X cat << !END!
X %! PS-Adobe 1.0
X***************
X*** 173,176 ****
X %%Pages: 1
X !END!
X echo '\004'
X! ) | rlp -dgate!AppleLaser
X--- 174,177 ----
X %%Pages: 1
X !END!
X echo '\004'
X! ) %%PSOUTPUT%%
X*** /usr4/public/src/t2current/./upload.sh Mon Jan 8 16:35:51 1990
X--- ./upload.sh Mon Jan 8 16:39:19 1990
X***************
X*** 1,6 ****
X :
X! #@(#)upload 1.1 89/05/18
X! rlp -dgate!AppleLaser << 'END'
X
X /savearea save def
X
X--- 1,7 ----
X :
X! #@(#)upload 1.2 90/01/08
X! copies=1
X! (cat %%PSOUTPUT%%) << 'END'
X
X /savearea save def
X
X*** /usr4/public/src/t2current/./README Mon Jan 8 16:38:42 1990
X--- ./README Mon Jan 8 16:39:26 1990
X***************
X*** 1,4 ****
X! README 1.20 89/12/14
X See defs.h for the patchlevel
X
X Please read this document, especially any new patches near the end before
X--- 1,4 ----
X! README 1.23 90/01/08
X See defs.h for the patchlevel
X
X Please read this document, especially any new patches near the end before
X***************
X*** 28,35 ****
X Or, generate ditroff and use tpscript. Output is
X indistinguishable unless you know what you're looking for
X (and I forgot ;-)
X! - If you have ditroff backends, then use ditroff and throw
X! psroff in the trash bucket.
X
X This is an formal release. There are rough edges however. I encourage
X people to fiddle with it (particularly the mapping tables) and PLEASE
X--- 28,35 ----
X Or, generate ditroff and use tpscript. Output is
X indistinguishable unless you know what you're looking for
X (and I forgot ;-)
X! - If you have ditroff, then use ditroff and throw psroff
X! in the trash bucket.
X
X This is an formal release. There are rough edges however. I encourage
X people to fiddle with it (particularly the mapping tables) and PLEASE
X***************
X*** 106,114 ****
X tpscript by the way - great minds think alike)
X
X - The ditroff driver is fully complete, but not extremely
X! well tested with backends other than tpscript. I've heard rumors
X! of problems with jettroff, but haven't had them fully tracked down
X! yet.
X
X - Regarding font width tables, there are several ways to go with
X Postscript:
X--- 106,114 ----
X tpscript by the way - great minds think alike)
X
X - The ditroff driver is fully complete, but not extremely
X! well tested with backends other than tpscript. Nor have I
X! personal experience with using it with jetroff, but I understand
X! it works okay.
X
X - Regarding font width tables, there are several ways to go with
X Postscript:
X***************
X*** 175,180 ****
X--- 175,182 ----
X .fp 2 I
X .fp 3 B
X .fp 4 S
X+
X+ This is now done automatically by the macro adapter libraries.
X
X - There is some code to allow the sending of arbitrary commands to
X the driver - see the .sR macro in tmac.t2, and troff2's
X***************
X*** 405,416 ****
X page offsets.
X - NOCONTROLD for postscript printers that don't like ^D.
X
X Coming features (watch this space!)
X - automatic macro/pre/post-processor determination (ala Doug
X Gwyn's doctype function)
X - More complete listings of Postscript font widths.
X - Automatic generation of the fonts.?? file by gfnttab.
X! (it already does, but not completely)
X
X PLEASE PLEASE PLEASE! If you have any problems with it, or would like
X to make some suggestions for changing it, or have implemented a new driver
X--- 407,444 ----
X page offsets.
X - NOCONTROLD for postscript printers that don't like ^D.
X
X+ Patch 6: Dec 29 1989: macros/installability
X+ 1) dt.c optimization from Dan Mick (uunet!charyb!dan)
X+ 2) finished off adapter library stuff and documented it in psroff.1.
X+ If you've made psroff-specific changes to your macro packages,
X+ *please* take a look at what's going on in macros/common.*
X+ and macros/tmac.*. Please note that this now automatically
X+ reloads the width tables (for versions of troff that
X+ have compiled-in default widths for R, I, B and S) and has
X+ redefined ".fp" to call both troff's built-in ".fp" and
X+ ".sR", so that font changes should now be psroff-independent.
X+ Further, MM default width and offset has been changed to
X+ 6.5 and .963 inches respectively. MAN and MS is .963inch offset.
X+ MAN should centre properly, but MS may not.
X+ 3) I removed the 1/2" rightshift in all versions of psroff,
X+ and move the calculations to the macro packages. If you (or
X+ your macro package) doesn't emit any ".po"'s, it will start
X+ at the extreme left edge of the page (eg: in the unprintable
X+ region of laser engines!)
X+ 4) Added -F option to psroff.
X+ 5) Added the SED script stuff to fix some things in other files
X+ (eg: upload, showfont, tmac.t2).
X+ 6) tmac.t2 is no longer a source file - it's now tmac.t2.sh.
X+
X Coming features (watch this space!)
X+ - Patch 7 will contain Ron Florence's SFP download improvements.
X+ (but this will be superceded by SFP/PK downloading whenever
X+ I get around to it).
X - automatic macro/pre/post-processor determination (ala Doug
X Gwyn's doctype function)
X - More complete listings of Postscript font widths.
X - Automatic generation of the fonts.?? file by gfnttab.
X! (it already does, but not yet completely)
X
X PLEASE PLEASE PLEASE! If you have any problems with it, or would like
X to make some suggestions for changing it, or have implemented a new driver
END_OF_FILE
if test 27263 -ne `wc -c <'./Patch06'`; then
echo shar: \"'./Patch06'\" unpacked with wrong size!
fi
# end of './Patch06'
fi
if test ! -d './macros' ; then
echo shar: Creating directory \"'./macros'\"
mkdir './macros'
fi
if test -f './macros/common.post' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./macros/common.post'\"
else
echo shar: Extracting \"'./macros/common.post'\" \(69 characters\)
sed "s/^X//" >'./macros/common.post' <<'END_OF_FILE'
X.\"@(#)ident common.post %I% %E%
X.\"Turn ligatures off (again)
X'lg 0
END_OF_FILE
if test 69 -ne `wc -c <'./macros/common.post'`; then
echo shar: \"'./macros/common.post'\" unpacked with wrong size!
fi
# end of './macros/common.post'
fi
if test -f './macros/common.pre' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./macros/common.pre'\"
else
echo shar: Extracting \"'./macros/common.pre'\" \(588 characters\)
sed "s/^X//" >'./macros/common.pre' <<'END_OF_FILE'
X.\"@(#)ident common.pre %I% %E%
X.\"Turn ligatures off
X'lg 0
X.desR
X.\"Output request sequence - thru .tm - caught by backend
X.if t \{\
X.\"M is illegal C/A/T opcode - triggers troff2 to start collecting.
X.\"newline is terminator
X'tm M\\$1
X\}
X..
X.\" Some troffs have built-in width tables for the base fonts.
X.\" This forces troff to reload them from /usr/lib/font...
X.fp 1 R
X.fp 2 I
X.fp 3 B
X.fp 4 S
X.\" Fix CAT Troff's ".fp" request to both load the font width
X.\" table, plus issue the special request to the back end to switch
X.\" fonts.
X.rn fp fP
X.de fp
X.fP \\$1 \\$2
X.sR "F\\$1\\$2"
X..
END_OF_FILE
if test 588 -ne `wc -c <'./macros/common.pre'`; then
echo shar: \"'./macros/common.pre'\" unpacked with wrong size!
fi
# end of './macros/common.pre'
fi
if test -f './macros/tmac.an' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./macros/tmac.an'\"
else
echo shar: Extracting \"'./macros/tmac.an'\" \(290 characters\)
sed "s/^X//" >'./macros/tmac.an' <<'END_OF_FILE'
X.\"@(#)ident tmac.an %I% %E%
X.so %%TMACDIR%%/common.pre
X.so %%RTMACDIR%%/tmac.an
X.\"Default offset (my version of the man macros uses it).
X.nr )O .963i
X.\"See if someone's using the -rO option (ala MM)
X.if \nO .nr )O \nOu
X.po \n()Ou
X.\"Clobber cut marks.
X.rm }C
X.so %%TMACDIR%%/common.post
END_OF_FILE
if test 290 -ne `wc -c <'./macros/tmac.an'`; then
echo shar: \"'./macros/tmac.an'\" unpacked with wrong size!
fi
# end of './macros/tmac.an'
fi
if test -f './macros/tmac.m' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./macros/tmac.m'\"
else
echo shar: Extracting \"'./macros/tmac.m'\" \(239 characters\)
sed "s/^X//" >'./macros/tmac.m' <<'END_OF_FILE'
X.\"@(#)ident tmac.m %I% %E%
X.so %%TMACDIR%%/common.pre
X.\"Default linewidth 6.5 inches & page offset .963 inches.
X.if !\nW .nr W 6.5i
X.if !\nO .nr O .963i
X.so %%RTMACDIR%%/tmac.m
X.\"Clobber MM cut marks.
X.rm )k
X.so %%TMACDIR%%/common.post
END_OF_FILE
if test 239 -ne `wc -c <'./macros/tmac.m'`; then
echo shar: \"'./macros/tmac.m'\" unpacked with wrong size!
fi
# end of './macros/tmac.m'
fi
if test -f './macros/tmac.s' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./macros/tmac.s'\"
else
echo shar: Extracting \"'./macros/tmac.s'\" \(136 characters\)
sed "s/^X//" >'./macros/tmac.s' <<'END_OF_FILE'
X.\"@(#)ident tmac.s %I% %E%
X.so %%TMACDIR%%/common.pre
X.so %%RTMACDIR%%/tmac.s
X.\"Clobber cut marks.
X.rm CM
X.so %%TMACDIR%%/common.post
END_OF_FILE
if test 136 -ne `wc -c <'./macros/tmac.s'`; then
echo shar: \"'./macros/tmac.s'\" unpacked with wrong size!
fi
# end of './macros/tmac.s'
fi
if test -f './prepatch' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./prepatch'\"
else
echo shar: Extracting \"'./prepatch'\" \(136 characters\)
sed "s/^X//" >'./prepatch' <<'END_OF_FILE'
Xif [ -r tmac.t2 -a ! -r tmac.t2.old ]
Xthen
X mv tmac.t2 tmac.t2.old
X echo "Saving your old tmac.t2 just in case"
Xfi
Xrm -f prepatch
END_OF_FILE
if test 136 -ne `wc -c <'./prepatch'`; then
echo shar: \"'./prepatch'\" unpacked with wrong size!
fi
# end of './prepatch'
fi
if test -f './tmac.t2.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'./tmac.t2.sh'\"
else
echo shar: Extracting \"'./tmac.t2.sh'\" \(1838 characters\)
sed "s/^X//" >'./tmac.t2.sh' <<'END_OF_FILE'
X.\" Copyright 1985, 1986, 1987, 1988 Chris Lewis
X.\" All Rights Reserved
X.\"
X.\" Permission to copy and further distribute is freely given provided
X.\" this copyright notice remains intact and that this software is not
X.\" sold for profit.
X.\"
X.\" Project: Generic Troff drivers
X.\" Module: tmac.eci.sh
X.\" Author: Chris Lewis
X.\" Specs: MM Prolog
X.\"ident "@(#)tmac.eci.sh: 1.28 Copyright 90/01/08 16:31:03 Chris Lewis"
X.\"endif
X.so %%TMACDIR%%/tmac.m
X.tr \(bs
X.ds}2 Elegant Communications Inc.
X.dsIn \*(}2
X.dsBU \s+2\(bu\s0
X.de eX
X.ie \\w'\\$1'=0 .ds ee
X.el .ds ee "\\$1
X.DS \\$2 \\$3
X\!.fp 1 C
X.\"\!.lg 0
X\!.cs 1 24
X.ss 24
X\!.br
X..
X.de eE
X\!.fp 1 R
X\!.cs 1
X.ss 12
X\!.br
X\.if \\w'\\*(ee'>0 .FG "\\*(ee"
X.DE
X..
X.ds HP +4 +2
X.ds HF 3 3 2 2
X.OH "'''Elegant Communications Inc.'"
X.EH "'''Elegant Communications Inc.'"
X.PH "''''"
X.if t .PF "''\s8481 University Avenue, Suite 602, Toronto, Canada, M5G 2E9 (416)-595-5425, FAX (416) 595-5439\s0''"
X.if n .PF "''481 University Avenue, Suite 602, Toronto, Canada''"
X.\".OF "'Page \\\\nP''\\\\*(DT'"
X.OF "'\\\\*(DT''Page \\\\nP'"
X.EF "'\\\\*(DT''Page \\\\nP'"
X.de nH
X.OF "''''"
X.EF "''''"
X.PF "''''"
X.OH "''''"
X.EH "''''"
X.PH "''''"
X..
X.de aD
X.SP 3
X.DS
XElegant Communications Inc.
X481 University Avenue,
XSuite 602
XToronto, Ontario
XM5G 2E9
X
XPhone: (416) 595-5425
XFax: (416) 595-5439
X.DE
X..
X.\" Appendix Macros
X.de AH
X.if \\n(aH=0\{
X.nr aH 1
X.nr h1 0\}
X.nr;1 0\\$1
X.if!\\n(;1 .)D "aH:bad arg:\\$1"
X.if2-\\n(;1 .nr h2 0 1
X.if3-\\n(;1 .nr h3 0 1
X.if4-\\n(;1 .nr h4 0 1
X.if5-\\n(;1 .nr h5 0 1
X.if6-\\n(;1 .nr h6 0 1
X.if7-\\n(;1 .nr h7 0 1
X.nr h\\n(;1 +1
X.afh1 A
X.ds}0 \\n(h1.
X.if0\\$1-1 .as }0 \\n(h2
X.if0\\$1-2 .as }0 .\\n(h3
X.if0\\$1-3 .as }0 .\\n(h4
X.if0\\$1-4 .as }0 .\\n(h5
X.if0\\$1-5 .as }0 .\\n(h6
X.if0\\$1-6 .as }0 .\\n(h7
X.nr Hu \\n(;1
X.HU "Appendix \\*(}0\\ \\ \\$2"
X..
END_OF_FILE
if test 1838 -ne `wc -c <'./tmac.t2.sh'`; then
echo shar: \"'./tmac.t2.sh'\" unpacked with wrong size!
fi
# end of './tmac.t2.sh'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have the archive.
rm -f ark[1-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
--
Chris Lewis, Elegant Communications Inc, {uunet!attcan,utzoo}!lsuc!eci386!clewis
Ferret mailing list: eci386!ferret-list, psroff mailing list: eci386!psroff-list
More information about the Alt.sources
mailing list