rsalz@uunet.uu.net (Rich Salz) (05/27/88)
Submitted-by: Axel Mahler <axel%coma.UUCP@TUB.BITNET> Posting-number: Volume 15, Issue 13 Archive-name: tpscript/part01 [ Issues 11 and 12 will be coming from Robert Elz. --r$ ] This is 'tpscript', a free ditroff to PostScript filter package. Tpscript was originally written by Stephen Frede who was with the University of New South Wales, Australia, when he wrote the programs. We've been using it most satisfactorily with an Apple LaserWriter Plus for about two years now. As requests for information about ANY troff to PostScript filter keep coming up in comp.text and comp.lang.postscript, I assume that about all potentially interested people missed the original posting of 'tpscript' in net.sources, two years ago. The operating environment we have is a MicroVAX II, running 4.3BSD with DWB 1.0 (or 1.2, I'm not certain) (di)troff, and an Apple LaserWriter Plus. However, there's nothing BSD specific that would keep 'tpscript' from running on any sensible Unix system. #! /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 5)." # Wrapped by rsalz@fig.bbn.com on Thu May 26 13:02:20 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f './MANIFEST' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./MANIFEST'\" else echo shar: Extracting \"'./MANIFEST'\" \(2412 characters\) sed "s/^X//" >'./MANIFEST' <<'END_OF_FILE' X File Name Archive # Description X----------------------------------------------------------- X ./MANIFEST 1 X ./Makefile 1 X ./READ_ME 3 X ./READ_ME.TOO 4 X ./man 1 X ./man/ipscript.1 3 X ./man/lpscript.1 3 X ./opscript 1 X ./opscript/Makefile 1 X ./opscript/bitmap.PS 1 X ./opscript/ipscript.c 4 X ./opscript/lpscript.c 4 X ./opscript/pcom.c 4 X ./opscript/pscript.h 1 X ./pscript 1 X ./pscript/READ_ME 1 X ./pscript/a4.ps 1 X ./pscript/big_greek.ps 1 X ./pscript/demo.ps 3 X ./pscript/floor.ps 3 X ./pscript/genftable.ps 5 X ./pscript/grid.ps 1 X ./pscript/inc.ps 1 X ./pscript/pages.ps 1 X ./pscript/papersize.ps 1 X ./pscript/pattern.ps 1 X ./pscript/setidle.sh 1 X ./pscript/setname.sh 1 X ./pscript/setpasswd.sh 1 X ./pscript/shadow.ps 1 X ./tpscript 1 X ./tpscript/Makefile 1 X ./tpscript/call.c 1 X ./tpscript/dev.h 1 X ./tpscript/devalw 1 X ./tpscript/devalw/B 2 X ./tpscript/devalw/BB 2 X ./tpscript/devalw/BI 2 X ./tpscript/devalw/BO 2 X ./tpscript/devalw/BR 2 X ./tpscript/devalw/BX 2 X ./tpscript/devalw/C 1 X ./tpscript/devalw/CB 1 X ./tpscript/devalw/CO 1 X ./tpscript/devalw/CX 2 X ./tpscript/devalw/DESC.alw 1 X ./tpscript/devalw/DESC.alwp 1 X ./tpscript/devalw/H 2 X ./tpscript/devalw/HB 2 X ./tpscript/devalw/HO 2 X ./tpscript/devalw/HX 2 X ./tpscript/devalw/I 2 X ./tpscript/devalw/Makefile 1 X ./tpscript/devalw/PA 2 X ./tpscript/devalw/PB 3 X ./tpscript/devalw/R 2 X ./tpscript/devalw/S 2 X ./tpscript/devalw/S2 1 X ./tpscript/gendefs.sed 1 X ./tpscript/hash.c 3 X ./tpscript/hash.h 1 X ./tpscript/pcom.c 4 X ./tpscript/pscript.h 1 X ./tpscript/sfont2.c 4 X ./tpscript/sfont2defs.H 3 X ./tpscript/sfont2defs.h 1 X ./tpscript/spline.c 3 X ./tpscript/stringdefs.H 2 X ./tpscript/stringdefs.c 1 X ./tpscript/stringdefs.h 1 X ./tpscript/tpscript.c 5 X ./tpscript/tpscript.h 3 X ./troff.sh 1 X MANIFEST 1 This shipping list END_OF_FILE if test 2412 -ne `wc -c <'./MANIFEST'`; then echo shar: \"'./MANIFEST'\" unpacked with wrong size! fi # end of './MANIFEST' fi if test -f './Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./Makefile'\" else echo shar: Extracting \"'./Makefile'\" \(517 characters\) sed "s/^X//" >'./Makefile' <<'END_OF_FILE' X X# SYS should be one of AUSAM, BSD, SYSV, V7 X# This is only really important if VERBOSE (below) is 1. SYS=BSD X# VERBOSE should be 1 to generate postscript code to echo stuff X# back down the communication line. Otherwise 0. VERBOSE=0 MAKEDEV=/usr/src/cmd/text/troff.d # pathname relative to devalw CD=cd MAKE=make all: tpscript.d others MFLAGS=SYS=$(SYS) VERBOSE=$(VERBOSE) X tpscript.d: X $(CD) tpscript; $(MAKE) $(MFLAGS) X $(CD) tpscript/devalw; $(MAKE) MAKEDEV=$(MAKEDEV) X others: X $(CD) opscript; $(MAKE) $(MFLAGS) X END_OF_FILE if test 517 -ne `wc -c <'./Makefile'`; then echo shar: \"'./Makefile'\" unpacked with wrong size! fi # end of './Makefile' fi if test ! -d './man' ; then echo shar: Creating directory \"'./man'\" mkdir './man' fi if test ! -d './opscript' ; then echo shar: Creating directory \"'./opscript'\" mkdir './opscript' fi if test -f './opscript/Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./opscript/Makefile'\" else echo shar: Extracting \"'./opscript/Makefile'\" \(933 characters\) sed "s/^X//" >'./opscript/Makefile' <<'END_OF_FILE' X# SYS should be one of AUSAM, BSD, SYSV, V7 X# This is only really important if VERBOSE (below) is 1. SYS=BSD X# VERBOSE should be 1 to generate postscript code to echo stuff X# back down the communication line. Otherwise 0. VERBOSE=1 CFLAGS = -O -DALW -DALWPLUS -D$(SYS) -DVERBOSE=$(VERBOSE) INSTALL = : BINDIR=/bin I=/usr/include X#I=/srce/include X all: lpscript ipscript X X lpscript: $(BINDIR)/lpscript X$(BINDIR)/lpscript: lpscript.c $I/stdio.h $I/strings.h pcom.c pscript.h X $(CC) $(CFLAGS) -o lpscript lpscript.c pcom.c X $(INSTALL) - lpscript bin 711 $(BINDIR)/lpscript X ipscript: $(BINDIR)/ipscript X$(BINDIR)/ipscript: ipscript.c $I/stdio.h pcom.c pscript.h X $(CC) $(CFLAGS) -o ipscript ipscript.c pcom.c X $(INSTALL) - ipscript bin 711 $(BINDIR)/ipscript X lint: lint.ipscript lint.lpscript X lint.ipscript: X lint -DALW -D$(SYS) ipscript.c pcom.c > ipscript.lint X lint.lpscript: X lint -DALW -D$(SYS) lpscript.c pcom.c > lpscript.lint END_OF_FILE if test 933 -ne `wc -c <'./opscript/Makefile'`; then echo shar: \"'./opscript/Makefile'\" unpacked with wrong size! fi # end of './opscript/Makefile' fi if test -f './opscript/bitmap.PS' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./opscript/bitmap.PS'\" else echo shar: Extracting \"'./opscript/bitmap.PS'\" \(0 characters\) sed "s/^X//" >'./opscript/bitmap.PS' <<'END_OF_FILE' END_OF_FILE if test 0 -ne `wc -c <'./opscript/bitmap.PS'`; then echo shar: \"'./opscript/bitmap.PS'\" unpacked with wrong size! fi # end of './opscript/bitmap.PS' fi if test -f './opscript/pscript.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./opscript/pscript.h'\" else echo shar: Extracting \"'./opscript/pscript.h'\" \(1661 characters\) sed "s/^X//" >'./opscript/pscript.h' <<'END_OF_FILE' X/* X * pscript.h X * Some common definitions for programs that produce postscript X */ X X#ifndef PSCRIPT_DEFINED X#define PSCRIPT_DEFINED 1 X X#ifndef VERBOSE X#if lint X#define VERBOSE 1 /* if linting, check all the code */ X#else lint X#define VERBOSE 0 X#endif lint X#endif VERBOSE X X#if UNSW X#undef AUSAM X#define AUSAM 1 X#endif UNSW X X#ifdef AUSAM X#undef AUSAM X#define AUSAM 1 X#else X#define AUSAM 0 X#endif AUSAM X X#ifdef BSD X#undef BSD X#define BSD 1 X#define index strchr X#define rindex strrchr X#include <strings.h> /* declarations for string functions */ X#else X#define BSD 0 X#include <string.h> /* declarations for string functions */ X#endif BSD X X#ifdef SYSV X#undef SYSV X#define SYSV 1 X#else X#define SYSV 0 X#endif SYSV X X#ifdef V7 X#undef V7 X#define V7 1 X#else X#define V7 0 X#endif V7 X X#if AUSAM + BSD + SYSV + V7 != 1 X#include "Must define 1 only of AUSAM, BSD, SYSV, V7" X#endif X X#include <stdio.h> X X/* LaserWriter page types */ X#define PT_DEFAULT 0 X#define PT_LETTER 1 X#define PT_LEGAL 2 X#define PT_NOTE 3 X#ifdef ALW X#define PT_A4 4 /* currently only on Apple LaserWriter */ X#endif ALW X X/* Postscript defaults */ X#define PD_PAGETYPE PT_LETTER /* page size is "letter" */ X#define PD_ROTATION 0 /* page is portrait mode */ X#define PD_PFREQUENCY 60 /* pixel frequency (pixels/inch) */ X#define PD_PROTATION 45 /* pixel grid rotation (degrees) */ X X#define ALW_RES 300 /* LaserWriter resolution is 300 dots/inch */ X X#define PU_INCH 72 /* postscript units / inch */ X#define PU_CM 28.3465 /* postscript units / cm */ X X#define TRUE (bool)1 X#define FALSE (bool)0 X typedef int bool; X extern FILE * postr; /* output stream */ X void perror(), X exit(); X X#endif PSCRIPT_DEFINED END_OF_FILE if test 1661 -ne `wc -c <'./opscript/pscript.h'`; then echo shar: \"'./opscript/pscript.h'\" unpacked with wrong size! fi # end of './opscript/pscript.h' fi if test ! -d './pscript' ; then echo shar: Creating directory \"'./pscript'\" mkdir './pscript' fi if test -f './pscript/READ_ME' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/READ_ME'\" else echo shar: Extracting \"'./pscript/READ_ME'\" \(52 characters\) sed "s/^X//" >'./pscript/READ_ME' <<'END_OF_FILE' This directory contains various PostScript scripts. END_OF_FILE if test 52 -ne `wc -c <'./pscript/READ_ME'`; then echo shar: \"'./pscript/READ_ME'\" unpacked with wrong size! fi # end of './pscript/READ_ME' fi if test -f './pscript/a4.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/a4.ps'\" else echo shar: Extracting \"'./pscript/a4.ps'\" \(417 characters\) sed "s/^X//" >'./pscript/a4.ps' <<'END_OF_FILE' X/a4 X [ X [ 300 72 div 0 0 -300 72 div -72 3436 ] X 292 3365 X {statusdict /jobstate (printing) put 0 setblink X margins exch 142 add exch 256 add 8 div round cvi frametoroket X statusdict /jobstate (busy) put X 1 setblink } X /framedevice load X 60 45 {dup mul exch dup mul add 1.0 exch sub } /setscreen load X {} /settransfer load X /initgraphics load X /erasepage load X ] cvx statusdict begin bind end readonly def END_OF_FILE if test 417 -ne `wc -c <'./pscript/a4.ps'`; then echo shar: \"'./pscript/a4.ps'\" unpacked with wrong size! fi # end of './pscript/a4.ps' fi if test -f './pscript/big_greek.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/big_greek.ps'\" else echo shar: Extracting \"'./pscript/big_greek.ps'\" \(820 characters\) sed "s/^X//" >'./pscript/big_greek.ps' <<'END_OF_FILE' X%! X% Print big greek characters X X/makeoutlinedict 5 dict def makeoutlinedict begin X/basefontdict /Symbol findfont def X/outfontdict basefontdict maxlength 1 add dict def basefontdict X{ X exch dup /FID ne X { exch outfontdict 3 1 roll put } X { pop pop } X ifelse X} forall outfontdict /FontName /Sym_Out put outfontdict /PaintType 2 put outfontdict /StrokeWidth 3 put X/Sym_Out outfontdict definefont pop end X X/Sym_Out findfont 650 scalefont setfont X/p { 10 200 moveto show showpage } def X X% now this is silly X(a) p X(b) p X(c) p X(d) p X(e) p X(f) p X(g) p X(h) p X(i) p X(j) p X(k) p X(l) p X(m) p X(n) p X(o) p X(p) p X(q) p X(r) p X(s) p X(t) p X(u) p X(v) p X(w) p X(x) p X(y) p X(z) p X() p X(A) p X(B) p X(C) p X(D) p X(E) p X(F) p X(G) p X(H) p X(I) p X(J) p X(K) p X(L) p X(M) p X(N) p X(O) p X(P) p X(Q) p X(R) p X(S) p X(T) p X(U) p X(V) p X(W) p X(X) p X(Y) p X(Z) p END_OF_FILE if test 820 -ne `wc -c <'./pscript/big_greek.ps'`; then echo shar: \"'./pscript/big_greek.ps'\" unpacked with wrong size! fi # end of './pscript/big_greek.ps' fi if test -f './pscript/grid.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/grid.ps'\" else echo shar: Extracting \"'./pscript/grid.ps'\" \(343 characters\) sed "s/^X//" >'./pscript/grid.ps' <<'END_OF_FILE' X%! X% print a grid to check linearity of LaserWriter X X72 dup scale X clippath pathbbox pop pop translate X X0.003 setlinewidth X2 setlinecap X gsave X90 X { newpath X 0 0 moveto X 0 11 lineto X stroke X 0.1 0 translate X } repeat X grestore X gsave X120 X { newpath X 0 0 moveto X 7 0 lineto X stroke X 0 0.1 translate X } repeat grestore X showpage END_OF_FILE if test 343 -ne `wc -c <'./pscript/grid.ps'`; then echo shar: \"'./pscript/grid.ps'\" unpacked with wrong size! fi # end of './pscript/grid.ps' fi if test -f './pscript/inc.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/inc.ps'\" else echo shar: Extracting \"'./pscript/inc.ps'\" \(48 characters\) sed "s/^X//" >'./pscript/inc.ps' <<'END_OF_FILE' X%! X/inch { 72 mul } def X/cm { 28.3465 mul } def END_OF_FILE if test 48 -ne `wc -c <'./pscript/inc.ps'`; then echo shar: \"'./pscript/inc.ps'\" unpacked with wrong size! fi # end of './pscript/inc.ps' fi if test -f './pscript/pages.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/pages.ps'\" else echo shar: Extracting \"'./pscript/pages.ps'\" \(34 characters\) sed "s/^X//" >'./pscript/pages.ps' <<'END_OF_FILE' statusdict begin pagecount end == END_OF_FILE if test 34 -ne `wc -c <'./pscript/pages.ps'`; then echo shar: \"'./pscript/pages.ps'\" unpacked with wrong size! fi # end of './pscript/pages.ps' fi if test -f './pscript/papersize.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/papersize.ps'\" else echo shar: Extracting \"'./pscript/papersize.ps'\" \(657 characters\) sed "s/^X//" >'./pscript/papersize.ps' <<'END_OF_FILE' X/a4 X [ X [ 300 72 div 0 0 -300 72 div -72 3436 ] X 292 3365 X {statusdict /jobstate (printing) put 0 setblink X margins exch 142 add exch 256 add 8 div round cvi frametoroket X statusdict /jobstate (busy) put X 1 setblink } X /framedevice load X 60 45 {dup mul exch dup mul add 1.0 exch sub } /setscreen load X {} /settransfer load X /initgraphics load X /erasepage load X ] cvx statusdict begin bind end readonly def newpath X/inch { 72 mul } def X/cm { 28.3465 mul } def X/Times-Roman findfont 4 cm scalefont setfont X/sp { 0.9 setgray clippath fill 0 setgray 8 cm 15 cm moveto show showpage } def letter (letter) sp note (note) sp legal (legal) sp a4 (a4) sp END_OF_FILE if test 657 -ne `wc -c <'./pscript/papersize.ps'`; then echo shar: \"'./pscript/papersize.ps'\" unpacked with wrong size! fi # end of './pscript/papersize.ps' fi if test -f './pscript/pattern.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/pattern.ps'\" else echo shar: Extracting \"'./pscript/pattern.ps'\" \(833 characters\) sed "s/^X//" >'./pscript/pattern.ps' <<'END_OF_FILE' X/bitison X{ X /ybit exch def /xbit exch def X bstring ybit bwidth mul X xbit 8 idiv add get X 1 7 xbit 8 mod sub bitshift X and 0 ne X} def X X/setpattern X{ X /freq exch def X /bwidth exch def X /bpside exch def X /bstring exch def X /onbits 0 def /offbits 0 def X freq 0 { X /y exch def /x exch def X /xindex x 1 add 2 div bpside mul cvi def X /yindex y 1 add 2 div bpside mul cvi def X xindex yindex bitison X { /onbits onbits 1 add def 1 } X { /offbits offbits 1 add def 0 } X ifelse X } setscreen X {} settransfer X offbits offbits onbits add div setgray X} def X X<d1e3c5885c3e1d88> 8 1 300 32 div setpattern X X100 100 moveto 300 0 rlineto 0 300 rlineto -300 0 rlineto closepath fill X newpath 300 300 moveto 300 300 100 X<3e418080e3140808> 8 1 300 32 div setpattern X X100 500 moveto 300 0 rlineto 0 300 rlineto -300 0 rlineto closepath fill showpage END_OF_FILE if test 833 -ne `wc -c <'./pscript/pattern.ps'`; then echo shar: \"'./pscript/pattern.ps'\" unpacked with wrong size! fi # end of './pscript/pattern.ps' fi if test -f './pscript/setidle.sh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/setidle.sh'\" else echo shar: Extracting \"'./pscript/setidle.sh'\" \(374 characters\) sed "s/^X//" >'./pscript/setidle.sh' <<'END_OF_FILE' X# Select the fonts to be idle time scanned if [ $# != 1 ] then X echo "Usage: setidle passwd-number" 1>&2 X exit 1 fi cat <<! X%! X$1 serverdict begin exitserver statusdict begin X mark X 4 100 100 0 94 % Times-Roman 10 point X 5 100 100 0 94 % Times-Bold 10 point X 6 100 100 0 94 % Times-Italic 10 point X setidlefonts end X(idle time font scan changed\n) print flush X! echo "\004" END_OF_FILE if test 374 -ne `wc -c <'./pscript/setidle.sh'`; then echo shar: \"'./pscript/setidle.sh'\" unpacked with wrong size! fi # end of './pscript/setidle.sh' fi if test -f './pscript/setname.sh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/setname.sh'\" else echo shar: Extracting \"'./pscript/setname.sh'\" \(201 characters\) sed "s/^X//" >'./pscript/setname.sh' <<'END_OF_FILE' X# Set a new printer name if [ $# != 2 ] then X echo "Usage: setname passwd-number name" 1>&2 X exit 1 fi cat <<! X%! X$1 serverdict begin exitserver statusdict begin X ($2) setprintername end X! echo "\004" END_OF_FILE if test 201 -ne `wc -c <'./pscript/setname.sh'`; then echo shar: \"'./pscript/setname.sh'\" unpacked with wrong size! fi # end of './pscript/setname.sh' fi if test -f './pscript/setpasswd.sh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/setpasswd.sh'\" else echo shar: Extracting \"'./pscript/setpasswd.sh'\" \(213 characters\) sed "s/^X//" >'./pscript/setpasswd.sh' <<'END_OF_FILE' X# Set a new passwd if [ $# != 2 ] then X echo "Usage: setpasswd oldpasswd-number newpasswd-number" 1>&2 X exit 1 fi cat <<! X%! X$1 serverdict begin exitserver statusdict begin X $1 $2 setpassword == end X! echo "\004" END_OF_FILE if test 213 -ne `wc -c <'./pscript/setpasswd.sh'`; then echo shar: \"'./pscript/setpasswd.sh'\" unpacked with wrong size! fi # end of './pscript/setpasswd.sh' fi if test -f './pscript/shadow.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./pscript/shadow.ps'\" else echo shar: Extracting \"'./pscript/shadow.ps'\" \(221 characters\) sed "s/^X//" >'./pscript/shadow.ps' <<'END_OF_FILE' X%! X/Times-Roman findfont 50 scalefont setfont X/cm { 28.3465 mul } def X8 cm 15 cm moveto X/shadow X{ X /text exch def X 1 -0.1 0 X { X setgray -1 1 rmoveto X currentpoint text show moveto X } for X} def X X(Shadow) shadow showpage END_OF_FILE if test 221 -ne `wc -c <'./pscript/shadow.ps'`; then echo shar: \"'./pscript/shadow.ps'\" unpacked with wrong size! fi # end of './pscript/shadow.ps' fi if test ! -d './tpscript' ; then echo shar: Creating directory \"'./tpscript'\" mkdir './tpscript' fi if test -f './tpscript/Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/Makefile'\" else echo shar: Extracting \"'./tpscript/Makefile'\" \(1869 characters\) sed "s/^X//" >'./tpscript/Makefile' <<'END_OF_FILE' X# INSTALL=cp INSTALL=: I=.. ROOT= INSDIR=/usr/bin X# -DUQMINMET for hashed character name lookup SYS=BSD VERBOSE=1 # 1 to turn on stuff; 0 to turn off LOCALSYS= # for various local mods CFLAGS= -O LDFLAGS= -n DFLAGS= -DUQMINMET -D$(SYS) -DALW -DALWPLUS -DVERBOSE=$(VERBOSE) -DVMSAVE \ X-DPSDEBUG GFLAGS= -DGERMAN -DGUMLAUT GEMFLAGS= -DGEMPRINT CFILES=tpscript.c pcom.c stringdefs.c spline.c sfont2.c hash.c call.c OFILES=tpscript.o pcom.o stringdefs.o spline.o sfont2.o hash.o GOFILES=pcom.o stringdefs.o spline.o sfont2.o hash.o X X.c.o: X $(CC) $(CFLAGS) $(DFLAGS) -c $< X all: tpscript tpsgem X tpscript: tp1 $(GOFILES) X $(CC) $(LDFLAGS) -o tpscript $(OFILES) X X# If you choose the target 'tpsgem' keep in mind, that X# documents that contain Pic-graphics cannot be processed X# with tpsgem X tpsgem: tp2 $(GOFILES) call.o X $(CC) $(LDFLAGS) -o tpsgem $(OFILES) call.o X tp1: tpscript.c X $(CC) $(CFLAGS) $(DFLAGS) -c tpscript.c X tp2: tpscript.c X $(CC) $(CFLAGS) $(DFLAGS) $(GFLAGS) $(GEMFLAGS) -c tpscript.c X install: tpscript tpsgem X $(INSTALL) tpscript $(ROOT)$(INSDIR)/dalw X $(INSTALL) tpsgem $(ROOT)$(INSDIR)/dalwgem X chown bin $(ROOT)$(INSDIR)/dalw $(ROOT)$(INSDIR)/dalwg\ X $(ROOT)$(INSDIR)/dalwgem X chgrp bin $(ROOT)$(INSDIR)/dalw $(ROOT)$(INSDIR)/dalwg\ X $(ROOT)$(INSDIR)/dalwgem X chmod 711 $(ROOT)$(INSDIR)/dalw $(ROOT)$(INSDIR)/dalwg\ X $(ROOT)$(INSDIR)/dalwgem X lint: tpscript.lint X tpscript.lint: $(CFILES) X lint -D$(SYS) $(CFILES) > tpscript.lint X clean: X rm -f *.o tpscript.lint X clobber: clean X rm tpscript tpsgem stringdefs.h sfont2defs.H X stringdefs.h: stringdefs.H X sed -f gendefs.sed stringdefs.H >stringdefs.h X sfont2defs.h: sfont2defs.H X sed -f gendefs.sed sfont2defs.H >sfont2defs.h X hash.o: hash.h tpscript.h pcom.o: pscript.h sfont2.o: sfont2defs.h tpscript.h spline.o: tpscript.h stringdefs.o: hash.h stringdefs.h tpscript.o: tpscript.h dev.h pscript.h END_OF_FILE if test 1869 -ne `wc -c <'./tpscript/Makefile'`; then echo shar: \"'./tpscript/Makefile'\" unpacked with wrong size! fi # end of './tpscript/Makefile' fi if test -f './tpscript/call.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/call.c'\" else echo shar: Extracting \"'./tpscript/call.c'\" \(743 characters\) sed "s/^X//" >'./tpscript/call.c' <<'END_OF_FILE' static char *RCSid = "$Header: call.c,v 1.1 86/10/15 17:53:07 andy stab $"; X X/* X * $Log: call.c,v $ X * Revision 1.1 86/10/15 17:53:07 andy X * Initial revision X * X */ X X#include <stdio.h> X extern int lineno; extern FILE *postr; X call (istr) X register FILE *istr; X{ X FILE *fromchild, *popen(); X int i=0, j; X char ch, cmd[512]; X X while ((ch=getc(istr)) != '\n' && ch != EOF) cmd[i++] = ch; X /* strcpy (&cmd[i], "\n\n"); */ X cmd[i] = '\n'; X cmd[i+1] = '\0'; X X if ((fromchild = popen (cmd, "r")) == (FILE *)-1) X fprintf (stderr, "call: cannot execute %s\n", cmd); X X putc ('\n', postr); X while ((ch = (char)getc (fromchild)) != EOF) X putc (ch, postr); X X pclose (fromchild); X X lineno++; X return (1); X} X END_OF_FILE if test 743 -ne `wc -c <'./tpscript/call.c'`; then echo shar: \"'./tpscript/call.c'\" unpacked with wrong size! fi # end of './tpscript/call.c' fi if test -f './tpscript/dev.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/dev.h'\" else echo shar: Extracting \"'./tpscript/dev.h'\" \(1242 characters\) sed "s/^X//" >'./tpscript/dev.h' <<'END_OF_FILE' X/* @(#)dev.h 1.1 */ X/* X dev.h: characteristics of a typesetter X*/ X struct dev { X short filesize; /* number of bytes in file, */ X /* excluding dev part */ X short res; /* basic resolution in goobies/inch */ X short hor; /* goobies horizontally */ X short vert; X short unitwidth; /* size at which widths are given, in effect */ X short nfonts; /* number of fonts physically available */ X short nsizes; /* number of sizes it has */ X short sizescale; /* scaling for fractional point sizes */ X short paperwidth; /* max line length in units */ X short paperlength; /* max paper length in units */ X short nchtab; /* number of funny names in chtab */ X short lchname; /* length of chname table */ X short spare1; /* in case of expansion */ X short spare2; X}; X struct font { /* characteristics of a font */ X char nwfont; /* number of width entries for this font */ X char specfont; /* 1 == special font */ X char ligfont; /* 1 == ligatures exist on this font */ X char spare1; /* unused for now */ X char namefont[10]; /* name of this font (e.g., "R" */ X char intname[10]; /* internal name (=number) on device, in ascii */ X}; X X/* ligatures, ORed into ligfont */ X X#define LFF 01 X#define LFI 02 X#define LFL 04 X#define LFFI 010 X#define LFFL 020 END_OF_FILE if test 1242 -ne `wc -c <'./tpscript/dev.h'`; then echo shar: \"'./tpscript/dev.h'\" unpacked with wrong size! fi # end of './tpscript/dev.h' fi if test ! -d './tpscript/devalw' ; then echo shar: Creating directory \"'./tpscript/devalw'\" mkdir './tpscript/devalw' fi if test -f './tpscript/devalw/C' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/devalw/C'\" else echo shar: Extracting \"'./tpscript/devalw/C'\" \(2660 characters\) sed "s/^X//" >'./tpscript/devalw/C' <<'END_OF_FILE' X# Courier name C internalname Courier X# fixed width spacewidth 60 charset X! 60 2 041 X" 60 2 042 X# 60 3 043 X$ 60 3 044 X% 60 2 045 X& 60 2 046 X' 60 2 047 X( 60 3 050 X) 60 3 051 X* 60 2 052 X+ 60 2 053 X, 60 1 054 X- 60 0 055 hy " X. 60 0 056 X/ 60 3 057 sl " X0 60 2 060 X1 60 2 061 X2 60 2 062 X3 60 2 063 X4 60 2 064 X5 60 2 065 X6 60 2 066 X7 60 2 067 X8 60 2 070 X9 60 2 071 X: 60 0 072 X; 60 1 073 X< 60 2 074 X= 60 0 075 X> 60 2 076 X? 60 2 077 X@ 60 3 0100 A 60 2 0101 B 60 2 0102 C 60 2 0103 D 60 2 0104 E 60 2 0105 XF 60 2 0106 G 60 2 0107 H 60 2 0110 I 60 2 0111 J 60 2 0112 K 60 2 0113 L 60 2 0114 M 60 2 0115 N 60 2 0116 O 60 2 0117 P 60 2 0120 Q 60 3 0121 R 60 2 0122 S 60 2 0123 T 60 2 0124 U 60 2 0125 V 60 2 0126 W 60 2 0127 XX 60 2 0130 Y 60 2 0131 Z 60 2 0132 X[ 60 3 0133 X\ 60 3 0134 X] 60 3 0135 a^ 60 2 0136 asciicircum X_ 60 1 0137 ru " X` 60 2 0140 a 60 0 0141 b 60 2 0142 c 60 0 0143 d 60 2 0144 e 60 0 0145 f 60 2 0146 g 60 1 0147 h 60 2 0150 i 60 2 0151 j 60 3 0152 k 60 2 0153 l 60 2 0154 m 60 0 0155 n 60 0 0156 o 60 0 0157 p 60 1 0160 q 60 1 0161 r 60 0 0162 s 60 0 0163 t 60 2 0164 u 60 0 0165 v 60 0 0166 w 60 0 0167 x 60 0 0170 y 60 1 0171 z 60 0 0172 X{ 60 3 0173 X| 60 3 0174 X} 60 3 0175 a~ 60 0 0176 asciitilde I! 60 1 0241 exclamdown ct 60 2 0242 cent po 60 2 0243 sterling X$J 60 2 0245 yen sc 60 3 0247 section fm 60 2 0251 quotesingle n' " lq 60 2 0252 quotedblleft d< 60 0 0253 guillemotleft l< 60 0 0254 guilsinglleft r> 60 0 0255 guilsinglright X\- 60 0 0261 endash dg 60 3 0262 dagger dd 60 3 0263 daggerdbl pp 60 3 0266 paragraph bu 60 0 0267 bullet bq 60 2 0271 quotedblbase rq 60 2 0272 quotedblright d> 60 0 0273 guillemotright I? 60 1 0277 questiondown ga 60 2 0301 grave X\` " aa 60 2 0302 acute X\' " X^ 60 2 0303 circumflex X~ 60 2 0304 tilde ma 60 2 0305 macron be 60 2 0306 breve dt 60 2 0307 dotaccent X.. 60 2 0310 dieresis um " ri 60 2 0312 ring cd 60 1 0313 cedilla X'' 60 2 0315 hungarumlaut og 60 1 0316 ogonek hc 60 2 0317 caron em 60 0 0320 emdash a: 60 2 0321 adieresis o: 60 2 0322 odieresis u: 60 2 0323 udieresis A: 60 2 0324 Adieresis O: 60 2 0325 Odieresis U: 60 2 0326 Udieresis PL 60 2 0350 Lslash O/ 60 2 0351 Oslash ui 60 0 0365 dotlessi Pl 60 2 0370 lslash o/ 60 2 0371 oslash ss 60 2 0373 germandbls X12 120 2 0100 1/2 faked - code is irrelevent X13 120 2 0100 1/3 faked - code is irrelevent X14 120 2 0100 1/4 faked - code is irrelevent X18 120 2 0100 1/8 faked - code is irrelevent X23 120 2 0100 2/3 faked - code is irrelevent X34 120 2 0100 3/4 faked - code is irrelevent X38 120 2 0100 3/8 faked - code is irrelevent X58 120 2 0100 5/8 faked - code is irrelevent X78 120 2 0100 7/8 faked - code is irrelevent sq 100 3 0100 square box END_OF_FILE if test 2660 -ne `wc -c <'./tpscript/devalw/C'`; then echo shar: \"'./tpscript/devalw/C'\" unpacked with wrong size! fi # end of './tpscript/devalw/C' fi if test -f './tpscript/devalw/CB' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/devalw/CB'\" else echo shar: Extracting \"'./tpscript/devalw/CB'\" \(2667 characters\) sed "s/^X//" >'./tpscript/devalw/CB' <<'END_OF_FILE' X# Courier-Bold name CB internalname CourierB X# fixed width spacewidth 60 charset X! 60 2 041 X" 60 2 042 X# 60 3 043 X$ 60 3 044 X% 60 2 045 X& 60 2 046 X' 60 2 047 X( 60 3 050 X) 60 3 051 X* 60 2 052 X+ 60 2 053 X, 60 1 054 X- 60 0 055 hy " X. 60 0 056 X/ 60 3 057 sl " X0 60 2 060 X1 60 2 061 X2 60 2 062 X3 60 2 063 X4 60 2 064 X5 60 2 065 X6 60 2 066 X7 60 2 067 X8 60 2 070 X9 60 2 071 X: 60 0 072 X; 60 1 073 X< 60 2 074 X= 60 0 075 X> 60 2 076 X? 60 2 077 X@ 60 3 0100 A 60 2 0101 B 60 2 0102 C 60 2 0103 D 60 2 0104 E 60 2 0105 XF 60 2 0106 G 60 2 0107 H 60 2 0110 I 60 2 0111 J 60 2 0112 K 60 2 0113 L 60 2 0114 M 60 2 0115 N 60 2 0116 O 60 2 0117 P 60 2 0120 Q 60 3 0121 R 60 2 0122 S 60 2 0123 T 60 2 0124 U 60 2 0125 V 60 2 0126 W 60 2 0127 XX 60 2 0130 Y 60 2 0131 Z 60 2 0132 X[ 60 3 0133 X\ 60 3 0134 X] 60 3 0135 a^ 60 2 0136 asciicircum X_ 60 1 0137 ru " X` 60 2 0140 a 60 0 0141 b 60 2 0142 c 60 0 0143 d 60 2 0144 e 60 0 0145 f 60 2 0146 g 60 1 0147 h 60 2 0150 i 60 2 0151 j 60 3 0152 k 60 2 0153 l 60 2 0154 m 60 0 0155 n 60 0 0156 o 60 0 0157 p 60 1 0160 q 60 1 0161 r 60 0 0162 s 60 0 0163 t 60 2 0164 u 60 0 0165 v 60 0 0166 w 60 0 0167 x 60 0 0170 y 60 1 0171 z 60 0 0172 X{ 60 3 0173 X| 60 3 0174 X} 60 3 0175 a~ 60 0 0176 asciitilde I! 60 1 0241 exclamdown ct 60 2 0242 cent po 60 2 0243 sterling X$J 60 2 0245 yen sc 60 3 0247 section fm 60 2 0251 quotesingle n' " lq 60 2 0252 quotedblleft d< 60 0 0253 guillemotleft l< 60 0 0254 guilsinglleft r> 60 0 0255 guilsinglright X\- 60 0 0261 endash dg 60 3 0262 dagger dd 60 3 0263 daggerdbl pp 60 3 0266 paragraph bu 60 0 0267 bullet bq 60 2 0271 quotedblbase rq 60 2 0272 quotedblright d> 60 0 0273 guillemotright I? 60 1 0277 questiondown ga 60 2 0301 grave X\` " aa 60 2 0302 acute X\' " X^ 60 2 0303 circumflex X~ 60 2 0304 tilde ma 60 2 0305 macron be 60 2 0306 breve dt 60 2 0307 dotaccent X.. 60 2 0310 dieresis um " ri 60 2 0312 ring cd 60 1 0313 cedilla X'' 60 2 0315 hungarumlaut og 60 1 0316 ogonek hc 60 2 0317 caron em 60 0 0320 emdash a: 60 2 0321 adieresis o: 60 2 0322 odieresis u: 60 2 0323 udieresis A: 60 2 0324 Adieresis O: 60 2 0325 Odieresis U: 60 2 0326 Udieresis PL 60 2 0350 Lslash O/ 60 3 0351 Oslash ui 60 0 0365 dotlessi Pl 60 2 0370 lslash o/ 60 3 0371 oslash ss 60 2 0373 germandbls X12 120 2 0100 1/2 faked - code is irrelevent X13 120 2 0100 1/3 faked - code is irrelevent X14 120 2 0100 1/4 faked - code is irrelevent X18 120 2 0100 1/8 faked - code is irrelevent X23 120 2 0100 2/3 faked - code is irrelevent X34 120 2 0100 3/4 faked - code is irrelevent X38 120 2 0100 3/8 faked - code is irrelevent X58 120 2 0100 5/8 faked - code is irrelevent X78 120 2 0100 7/8 faked - code is irrelevent sq 100 3 0100 square box END_OF_FILE if test 2667 -ne `wc -c <'./tpscript/devalw/CB'`; then echo shar: \"'./tpscript/devalw/CB'\" unpacked with wrong size! fi # end of './tpscript/devalw/CB' fi if test -f './tpscript/devalw/CO' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/devalw/CO'\" else echo shar: Extracting \"'./tpscript/devalw/CO'\" \(2670 characters\) sed "s/^X//" >'./tpscript/devalw/CO' <<'END_OF_FILE' X# Courier-Oblique name CO internalname CourierO X# fixed width spacewidth 60 charset X! 60 2 041 X" 60 2 042 X# 60 3 043 X$ 60 3 044 X% 60 2 045 X& 60 2 046 X' 60 2 047 X( 60 3 050 X) 60 3 051 X* 60 2 052 X+ 60 2 053 X, 60 1 054 X- 60 0 055 hy " X. 60 0 056 X/ 60 3 057 sl " X0 60 2 060 X1 60 2 061 X2 60 2 062 X3 60 2 063 X4 60 2 064 X5 60 2 065 X6 60 2 066 X7 60 2 067 X8 60 2 070 X9 60 2 071 X: 60 0 072 X; 60 1 073 X< 60 2 074 X= 60 0 075 X> 60 2 076 X? 60 2 077 X@ 60 3 0100 A 60 2 0101 B 60 2 0102 C 60 2 0103 D 60 2 0104 E 60 2 0105 XF 60 2 0106 G 60 2 0107 H 60 2 0110 I 60 2 0111 J 60 2 0112 K 60 2 0113 L 60 2 0114 M 60 2 0115 N 60 2 0116 O 60 2 0117 P 60 2 0120 Q 60 3 0121 R 60 2 0122 S 60 2 0123 T 60 2 0124 U 60 2 0125 V 60 2 0126 W 60 2 0127 XX 60 2 0130 Y 60 2 0131 Z 60 2 0132 X[ 60 3 0133 X\ 60 3 0134 X] 60 3 0135 a^ 60 2 0136 asciicircum X_ 60 1 0137 ru " X` 60 2 0140 a 60 0 0141 b 60 2 0142 c 60 0 0143 d 60 2 0144 e 60 0 0145 f 60 2 0146 g 60 1 0147 h 60 2 0150 i 60 2 0151 j 60 3 0152 k 60 2 0153 l 60 2 0154 m 60 0 0155 n 60 0 0156 o 60 0 0157 p 60 1 0160 q 60 1 0161 r 60 0 0162 s 60 0 0163 t 60 2 0164 u 60 0 0165 v 60 0 0166 w 60 0 0167 x 60 0 0170 y 60 1 0171 z 60 0 0172 X{ 60 3 0173 X| 60 3 0174 X} 60 3 0175 a~ 60 0 0176 asciitilde I! 60 1 0241 exclamdown ct 60 2 0242 cent po 60 2 0243 sterling X$J 60 2 0245 yen sc 60 3 0247 section fm 60 2 0251 quotesingle n' " lq 60 2 0252 quotedblleft d< 60 0 0253 guillemotleft l< 60 0 0254 guilsinglleft r> 60 0 0255 guilsinglright X\- 60 0 0261 endash dg 60 3 0262 dagger dd 60 3 0263 daggerdbl pp 60 3 0266 paragraph bu 60 0 0267 bullet bq 60 2 0271 quotedblbase rq 60 2 0272 quotedblright d> 60 0 0273 guillemotright I? 60 1 0277 questiondown ga 60 2 0301 grave X\` " aa 60 2 0302 acute X\' " X^ 60 2 0303 circumflex X~ 60 2 0304 tilde ma 60 2 0305 macron be 60 2 0306 breve dt 60 2 0307 dotaccent X.. 60 2 0310 dieresis um " ri 60 2 0312 ring cd 60 1 0313 cedilla X'' 60 2 0315 hungarumlaut og 60 1 0316 ogonek hc 60 2 0317 caron em 60 0 0320 emdash a: 60 2 0321 adieresis o: 60 2 0322 odieresis u: 60 2 0323 udieresis A: 60 2 0324 Adieresis O: 60 2 0325 Odieresis U: 60 2 0326 Udieresis PL 60 2 0350 Lslash O/ 60 2 0351 Oslash ui 60 0 0365 dotlessi Pl 60 2 0370 lslash o/ 60 2 0371 oslash ss 60 2 0373 germandbls X12 120 2 0100 1/2 faked - code is irrelevent X13 120 2 0100 1/3 faked - code is irrelevent X14 120 2 0100 1/4 faked - code is irrelevent X18 120 2 0100 1/8 faked - code is irrelevent X23 120 2 0100 2/3 faked - code is irrelevent X34 120 2 0100 3/4 faked - code is irrelevent X38 120 2 0100 3/8 faked - code is irrelevent X58 120 2 0100 5/8 faked - code is irrelevent X78 120 2 0100 7/8 faked - code is irrelevent sq 100 3 0100 square box END_OF_FILE if test 2670 -ne `wc -c <'./tpscript/devalw/CO'`; then echo shar: \"'./tpscript/devalw/CO'\" unpacked with wrong size! fi # end of './tpscript/devalw/CO' fi if test -f './tpscript/devalw/DESC.alw' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/devalw/DESC.alw'\" else echo shar: Extracting \"'./tpscript/devalw/DESC.alw'\" \(1119 characters\) sed "s/^X//" >'./tpscript/devalw/DESC.alw' <<'END_OF_FILE' X# X# special fonts have to go at the end or else troff X# won't know about their numbers unless you do .fp X# fonts 14 R I B BI H HB HO HX C CB CO CX S S2 sizes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 X 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 X 41 42 43 44 45 46 47 48 49 50 52 55 58 61 64 67 70 74 78 82 86 90 X 94 99 104 109 114 120 126 132 139 146 153 161 169 177 186 195 0 res 720 hor 1 vert 1 unitwidth 10 paperwidth 6120 paperlength 8010 charset X\| \^ \- \` \' em hy bu sq ru fi fl ff Fi Fl de dg fm ct rg co sc aa ga dd X*A *B *C *D *E *F *G *H *I *K *L *M *N *O *P *Q *R *S *T *U *W *X *Y *Z X*a *b *c *d *e *f *g *h *i *k *l *m *n *o *p *q *r *s *t *u *w *x *y *z pl mi eq ** ul sl sr rn >= <= == ~= ap != -> <- ua da mu di +- ts cu ca sb sp ib ip if pd gr no is pt es mo br or ci lt lb rt rb lk rk bv lf rf lc rc X12 13 14 18 23 34 38 58 78 rh lh X$J '' .. AE I! I? O/ PL Pl ae be bq cd d< d> dt hc l< lq ma n' o/ oe og pm po pp r> ri rq sd ss ui um a~ a^ OE A: O: U: a: o: u: X!m nm !s :> <: <> a+ ag al an ax bt cm cr dm fa im io la lo m. mt te tf tm =~ AL Cc Cd Ch Cs L< R> r1 r2 u= d= END_OF_FILE if test 1119 -ne `wc -c <'./tpscript/devalw/DESC.alw'`; then echo shar: \"'./tpscript/devalw/DESC.alw'\" unpacked with wrong size! fi # end of './tpscript/devalw/DESC.alw' fi if test -f './tpscript/devalw/DESC.alwp' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/devalw/DESC.alwp'\" else echo shar: Extracting \"'./tpscript/devalw/DESC.alwp'\" \(1131 characters\) sed "s/^X//" >'./tpscript/devalw/DESC.alwp' <<'END_OF_FILE' X# X# special fonts have to go at the end or else troff X# won't know about their numbers unless you do .fp X# fonts 18 R I B BI H HB HO HX C CB CO CX BR BO BB BX S S2 sizes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 X 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 X 41 42 43 44 45 46 47 48 49 50 52 55 58 61 64 67 70 74 78 82 86 90 X 94 99 104 109 114 120 126 132 139 146 153 161 169 177 186 195 0 res 720 hor 1 vert 1 unitwidth 10 paperwidth 6120 paperlength 8010 charset X\| \^ \- \` \' em hy bu sq ru fi fl ff Fi Fl de dg fm ct rg co sc aa ga dd X*A *B *C *D *E *F *G *H *I *K *L *M *N *O *P *Q *R *S *T *U *W *X *Y *Z X*a *b *c *d *e *f *g *h *i *k *l *m *n *o *p *q *r *s *t *u *w *x *y *z pl mi eq ** ul sl sr rn >= <= == ~= ap != -> <- ua da mu di +- ts cu ca sb sp ib ip if pd gr no is pt es mo br or ci lt lb rt rb lk rk bv lf rf lc rc X12 13 14 18 23 34 38 58 78 rh lh X$J '' .. AE I! I? O/ PL Pl ae be bq cd d< d> dt hc l< lq ma n' o/ oe og pm po pp r> ri rq sd ss ui um a~ a^ OE A: O: U: a: o: u: X!m nm !s :> <: <> a+ ag al an ax bt cm cr dm fa im io la lo m. mt te tf tm =~ AL Cc Cd Ch Cs L< R> r1 r2 u= d= END_OF_FILE if test 1131 -ne `wc -c <'./tpscript/devalw/DESC.alwp'`; then echo shar: \"'./tpscript/devalw/DESC.alwp'\" unpacked with wrong size! fi # end of './tpscript/devalw/DESC.alwp' fi if test -f './tpscript/devalw/Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/devalw/Makefile'\" else echo shar: Extracting \"'./tpscript/devalw/Makefile'\" \(2306 characters\) sed "s/^X//" >'./tpscript/devalw/Makefile' <<'END_OF_FILE' XFONTS=S R I B BI H HO HB HX C CO CB CX S2 XFONTSPLUS=S R I B BI H HO HB HX C CO CB CX BR BO BB BX S2 XF=/usr/lib/font/devalw XFPLUS=/usr/lib/font/devalwp MAKEDEV=/src/u/dwb/text/troff.d/makedev INSTALL=install LINK=ln RM=rm -f CP=cp X all: $F/DESC.out $(FPLUS)/DESC.out X alw: $F/DESC.out X alwp: $(FPLUS)/DESC.out X X$F/DESC.out: DESC.alw $(FONTS) X $(CP) DESC.alw DESC X $(MAKEDEV) DESC X $(RM) DESC X $(INSTALL) -g bin -o bin -m 644 DESC.out $F/DESC.out X $(INSTALL) -g bin -o bin -m 644 R.out $F/R.out X $(INSTALL) -g bin -o bin -m 644 I.out $F/I.out X $(INSTALL) -g bin -o bin -m 644 B.out $F/B.out X $(INSTALL) -g bin -o bin -m 644 S.out $F/S.out X $(INSTALL) -g bin -o bin -m 644 S2.out $F/S2.out X $(INSTALL) -g bin -o bin -m 644 H.out $F/H.out X $(INSTALL) -g bin -o bin -m 644 HO.out $F/HO.out X $(INSTALL) -g bin -o bin -m 644 HB.out $F/HB.out X $(INSTALL) -g bin -o bin -m 644 HX.out $F/HX.out X $(INSTALL) -g bin -o bin -m 644 C.out $F/C.out X $(RM) $F/CW.out X $(LINK) $F/C.out $F/CW.out X $(INSTALL) -g bin -o bin -m 644 CO.out $F/CO.out X $(INSTALL) -g bin -o bin -m 644 CB.out $F/CB.out X $(INSTALL) -g bin -o bin -m 644 CX.out $F/CX.out X rm *.out X X$(FPLUS)/DESC.out: DESC.alwp $(FONTSPLUS) X $(CP) DESC.alwp DESC X $(MAKEDEV) DESC X $(RM) DESC X $(INSTALL) -g bin -o bin -m 644 DESC.out $(FPLUS)/DESC.out X $(INSTALL) -g bin -o bin -m 644 R.out $(FPLUS)/R.out X $(INSTALL) -g bin -o bin -m 644 I.out $(FPLUS)/I.out X $(INSTALL) -g bin -o bin -m 644 B.out $(FPLUS)/B.out X $(INSTALL) -g bin -o bin -m 644 S.out $(FPLUS)/S.out X $(INSTALL) -g bin -o bin -m 644 S2.out $(FPLUS)/S2.out X $(INSTALL) -g bin -o bin -m 644 H.out $(FPLUS)/H.out X $(INSTALL) -g bin -o bin -m 644 HO.out $(FPLUS)/HO.out X $(INSTALL) -g bin -o bin -m 644 HB.out $(FPLUS)/HB.out X $(INSTALL) -g bin -o bin -m 644 HX.out $(FPLUS)/HX.out X $(INSTALL) -g bin -o bin -m 644 C.out $(FPLUS)/C.out X $(RM) $(FPLUS)/CW.out X $(LINK) $(FPLUS)/C.out $(FPLUS)/CW.out X $(INSTALL) -g bin -o bin -m 644 CO.out $(FPLUS)/CO.out X $(INSTALL) -g bin -o bin -m 644 CB.out $(FPLUS)/CB.out X $(INSTALL) -g bin -o bin -m 644 CX.out $(FPLUS)/CX.out X $(INSTALL) -g bin -o bin -m 644 BR.out $(FPLUS)/BR.out X $(INSTALL) -g bin -o bin -m 644 BO.out $(FPLUS)/BO.out X $(INSTALL) -g bin -o bin -m 644 BB.out $(FPLUS)/BB.out X $(INSTALL) -g bin -o bin -m 644 BX.out $(FPLUS)/BX.out X rm *.out X END_OF_FILE if test 2306 -ne `wc -c <'./tpscript/devalw/Makefile'`; then echo shar: \"'./tpscript/devalw/Makefile'\" unpacked with wrong size! fi # end of './tpscript/devalw/Makefile' fi if test -f './tpscript/devalw/S2' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/devalw/S2'\" else echo shar: Extracting \"'./tpscript/devalw/S2'\" \(856 characters\) sed "s/^X//" >'./tpscript/devalw/S2' <<'END_OF_FILE' X# "Symbol" name S2 internalname BracketFont special charset bv 50 2 0101 bold vertical lt 50 2 0102 left top of big curly bracket lk 50 2 0103 left centre of big curly bracket lb 50 2 0104 left bottom of big curly bracket rt 50 2 0105 right top of big curly bracket rk 50 2 0106 right centre of big curly bracket rb 50 2 0107 right bottom of big curly bracket lc 50 2 0110 left ceiling (left top of big square bracket) lf 50 2 0111 left floor (left bottom of big square bracket) rc 50 2 0112 right ceiling (right top of big square bracket) rf 50 2 0113 right floor (right bottom of big square bracket) br 0 2 0114 box vertical rule (matches ul) rn 50 2 0115 root en extender ci 100 3 0116 circle X\| 17 0 0117 1/6em narrow space X\^ 8 0 0120 1/12 em narrow space r1 80 0 0121 reversible reaction ( chemical ) r2 80 0 0122 reversible reaction - 2 full arrows END_OF_FILE if test 856 -ne `wc -c <'./tpscript/devalw/S2'`; then echo shar: \"'./tpscript/devalw/S2'\" unpacked with wrong size! fi # end of './tpscript/devalw/S2' fi if test -f './tpscript/gendefs.sed' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/gendefs.sed'\" else echo shar: Extracting \"'./tpscript/gendefs.sed'\" \(213 characters\) sed "s/^X//" >'./tpscript/gendefs.sed' <<'END_OF_FILE' X/^#/ d X/^$/ d X/^[ ]/ d X/^[^ ]/ { X s/{// X s/#.*// X t loop X :loop X N X s/\n}$/ / X t done X s/#.*// X t loop X b loop X :done X s/[ ][ ]*/ /g X s/\n/ /g X s/ / "/ X s/^/#define DEF_/ X s/ *$/"/ X } END_OF_FILE if test 213 -ne `wc -c <'./tpscript/gendefs.sed'`; then echo shar: \"'./tpscript/gendefs.sed'\" unpacked with wrong size! fi # end of './tpscript/gendefs.sed' fi if test -f './tpscript/hash.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/hash.h'\" else echo shar: Extracting \"'./tpscript/hash.h'\" \(1323 characters\) sed "s/^X//" >'./tpscript/hash.h' <<'END_OF_FILE' X struct hash_element { X struct hash_element *hash_next; /* pointer in linked list */ X struct special_name *hash_special; /* if needs special treatment */ X short hash_index; /* index into chartab */ X}; X X /* X * special names need a postscript subroutine to print them as X * troff expects - the first request to print \(xx will generate X * the definition of a subroutine named Cxx and the character X * will be printed by invoking Cxx. X */ struct special_name { X char *troff_name, /* the name by which troff knows the char */ X *definition, /* the definition string in postscript */ X sn_flags; /* flag for various values defined below */ X}; X X#define SN_DEFINED 01 X#define SN_FRACTION 02 /* use special set-up common to all fractions */ X#define SN_BRACKET 04 /* use special set-up common to brackets */ X#define SN_BRK_ROUNDING 010 /* correct for rounding errors in width tables */ X X /* X * if one of these is defined then there is some common X * procedure to define X * only one can be defined for any one name X */ X#define SN_ANY_MULTIPLE (SN_FRACTION | SN_BRACKET | SN_BRK_ROUNDING ) X X typedef struct hash_element HASH_ELEMENT; typedef struct special_name SPECIAL_NAME; X extern SPECIAL_NAME specnames[], X multdefs[]; X X#define HASH_SIZE 37 X X#define NOHASH (HASH_ELEMENT *)0 X#define NOSPECIAL (SPECIAL_NAME *)0 END_OF_FILE if test 1323 -ne `wc -c <'./tpscript/hash.h'`; then echo shar: \"'./tpscript/hash.h'\" unpacked with wrong size! fi # end of './tpscript/hash.h' fi if test -f './tpscript/pscript.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/pscript.h'\" else echo shar: Extracting \"'./tpscript/pscript.h'\" \(1661 characters\) sed "s/^X//" >'./tpscript/pscript.h' <<'END_OF_FILE' X/* X * pscript.h X * Some common definitions for programs that produce postscript X */ X X#ifndef PSCRIPT_DEFINED X#define PSCRIPT_DEFINED 1 X X#ifndef VERBOSE X#if lint X#define VERBOSE 1 /* if linting, check all the code */ X#else lint X#define VERBOSE 0 X#endif lint X#endif VERBOSE X X#if UNSW X#undef AUSAM X#define AUSAM 1 X#endif UNSW X X#ifdef AUSAM X#undef AUSAM X#define AUSAM 1 X#else X#define AUSAM 0 X#endif AUSAM X X#ifdef BSD X#undef BSD X#define BSD 1 X#define index strchr X#define rindex strrchr X#include <strings.h> /* declarations for string functions */ X#else X#define BSD 0 X#include <string.h> /* declarations for string functions */ X#endif BSD X X#ifdef SYSV X#undef SYSV X#define SYSV 1 X#else X#define SYSV 0 X#endif SYSV X X#ifdef V7 X#undef V7 X#define V7 1 X#else X#define V7 0 X#endif V7 X X#if AUSAM + BSD + SYSV + V7 != 1 X#include "Must define 1 only of AUSAM, BSD, SYSV, V7" X#endif X X#include <stdio.h> X X/* LaserWriter page types */ X#define PT_DEFAULT 0 X#define PT_LETTER 1 X#define PT_LEGAL 2 X#define PT_NOTE 3 X#ifdef ALW X#define PT_A4 4 /* currently only on Apple LaserWriter */ X#endif ALW X X/* Postscript defaults */ X#define PD_PAGETYPE PT_LETTER /* page size is "letter" */ X#define PD_ROTATION 0 /* page is portrait mode */ X#define PD_PFREQUENCY 60 /* pixel frequency (pixels/inch) */ X#define PD_PROTATION 45 /* pixel grid rotation (degrees) */ X X#define ALW_RES 300 /* LaserWriter resolution is 300 dots/inch */ X X#define PU_INCH 72 /* postscript units / inch */ X#define PU_CM 28.3465 /* postscript units / cm */ X X#define TRUE (bool)1 X#define FALSE (bool)0 X typedef int bool; X extern FILE * postr; /* output stream */ X void perror(), X exit(); X X#endif PSCRIPT_DEFINED END_OF_FILE if test 1661 -ne `wc -c <'./tpscript/pscript.h'`; then echo shar: \"'./tpscript/pscript.h'\" unpacked with wrong size! fi # end of './tpscript/pscript.h' fi if test -f './tpscript/sfont2defs.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/sfont2defs.h'\" else echo shar: Extracting \"'./tpscript/sfont2defs.h'\" \(1752 characters\) sed "s/^X//" >'./tpscript/sfont2defs.h' <<'END_OF_FILE' X#define DEF_lt " 0 150 50 210 140 250 0 730 0 150 50 250 200 250 0 750 220 -250 C.brk.end" X#define DEF_lb " 0 -150 50 -210 140 -250 0 -730 0 -150 50 -250 200 -250 0 -750 220 750 C.brk.end" X#define DEF_lk " 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 -50 100 -100 100 rcurveto 50 0 100 50 100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto 0 -50 -50 -100 -100 -100 rcurveto 50 0 100 -50 100 -100 rcurveto 0 -400 rlineto closepath fill" X#define DEF_rt " 0 150 -50 250 -200 250 0 750 0 150 -50 210 -140 250 0 730 220 -250 C.brk.end" X#define DEF_rb " 0 -150 -50 -250 -200 -250 0 -750 0 -150 -50 -210 -140 -250 0 -730 220 750 C.brk.end" X#define DEF_rk " 1 setlinewidth 220 -250 moveto 0 400 rlineto 0 50 50 100 100 100 rcurveto -50 0 -100 50 -100 100 rcurveto 0 400 rlineto 60 0 rlineto 0 -400 rlineto 0 -50 50 -100 100 -100 rcurveto -50 0 -100 -50 -100 -100 rcurveto 0 -400 rlineto fill" X#define DEF_lc " C.bv 280 C.barc" X#define DEF_lf " C.bv 280 C.barf" X#define DEF_rc " C.bv 40 C.barc" X#define DEF_rf " C.bv 40 C.barf" X#define DEF_br " 40 C.setl 0 -250 moveto 0 1000 rlineto stroke" X#define DEF_rn " 40 C.setl 0 895 moveto 500 0 rlineto stroke" X#define DEF_ci " 40 C.setl 500 250 400 0 360 arc stroke" X#define DEF_sp_6 "" X#define DEF_sp_12 "" X#define DEF_r1 " 40 C.setl 0 setlinejoin 700 180 moveto -650 currentlinewidth add 0 rlineto 200 -200 rlineto 50 360 moveto 650 currentlinewidth sub 0 rlineto -200 200 rlineto stroke" X#define DEF_r2 " 40 C.setl 2 setlinejoin 217 18 moveto -150 150 rlineto 150 150 rlineto -150 -150 rlineto 633 0 rlineto 50 360 moveto 633 0 rlineto -150 150 rlineto 150 -150 rlineto -150 -150 rlineto stroke" X X END_OF_FILE if test 1752 -ne `wc -c <'./tpscript/sfont2defs.h'`; then echo shar: \"'./tpscript/sfont2defs.h'\" unpacked with wrong size! fi # end of './tpscript/sfont2defs.h' fi if test -f './tpscript/stringdefs.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/stringdefs.c'\" else echo shar: Extracting \"'./tpscript/stringdefs.c'\" \(650 characters\) sed "s/^X//" >'./tpscript/stringdefs.c' <<'END_OF_FILE' X#include "hash.h" X X#include "stringdefs.h" X SPECIAL_NAME specnames[] = { X {"ru", DEF_ru, 0, }, X {"12", DEF_12, SN_FRACTION, }, X {"14", DEF_14, SN_FRACTION, }, X {"34", DEF_34, SN_FRACTION, }, X {"13", DEF_13, SN_FRACTION, }, X {"18", DEF_18, SN_FRACTION, }, X {"23", DEF_23, SN_FRACTION, }, X {"38", DEF_38, SN_FRACTION, }, X {"58", DEF_58, SN_FRACTION, }, X {"78", DEF_78, SN_FRACTION, }, X {"sr", DEF_sr, 0, }, X {"sq", DEF_sq, 0, }, X {"ff", DEF_ff, 0 }, X {"Fi", DEF_Fi, 0 }, X {"Fl", DEF_Fl, 0 }, X { (char *)0, (char *)0, 0} X}; X SPECIAL_NAME multdefs[] = X{ X {"fract", DEF_fract, SN_FRACTION }, X { (char *)0, (char *)0, 0} X}; END_OF_FILE if test 650 -ne `wc -c <'./tpscript/stringdefs.c'`; then echo shar: \"'./tpscript/stringdefs.c'\" unpacked with wrong size! fi # end of './tpscript/stringdefs.c' fi if test -f './tpscript/stringdefs.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./tpscript/stringdefs.h'\" else echo shar: Extracting \"'./tpscript/stringdefs.h'\" \(1519 characters\) sed "s/^X//" >'./tpscript/stringdefs.h' <<'END_OF_FILE' X#define DEF_12 " (1) (2) Cfract" X#define DEF_14 " (1) (4) Cfract" X#define DEF_34 " (3) (4) Cfract" X#define DEF_13 " (1) (3) Cfract" X#define DEF_18 " (1) (8) Cfract" X#define DEF_23 " (2) (3) Cfract" X#define DEF_38 " (3) (8) Cfract" X#define DEF_58 " (5) (8) Cfract" X#define DEF_78 " (7) (8) Cfract" X#define DEF_ru " 0 ysiz pt 5 div 2 copy rmoveto (_) show neg rmoveto" X#define DEF_sr " currentfont /dx xsiz pt 0.05 mul def dx 0 rmoveto f.S [ xsiz pt 0 0 ysiz pt 0 0 ]makefont setfont (\\326)s dx neg 0 rmoveto setfont" X#define DEF_sq " currentlinewidth currentpoint currentpoint ysiz pt 20.8 div dup dtransform round idtransform setlinewidth pop newpath moveto /dy ysiz pt 0.8 mul def /dx xsiz pt 0.8 mul def dx 8 div dy .1875 mul neg rmoveto 0 dy rlineto dx 0 rlineto 0 dy neg rlineto closepath mark currentfont /FontName get 40 string cvs (Bold) search {fill} {stroke} ifelse cleartomark moveto xsiz pt 0 rmoveto setlinewidth" X#define DEF_ff " (f) show xsiz pt 20 div neg 0 rmoveto (f) s" X#define DEF_Fi " (f) show xsiz pt 20 div neg 0 rmoveto (\\256) s" X#define DEF_Fl " (f) show xsiz pt 20 div neg 0 rmoveto (\\257) s" X#define DEF_fract " /fbot exch def /ftop exch def currentfont currentpoint /f0 ysiz pt 2 div def (0) stringwidth pop 2 div 0 rmoveto (\\244)show currentpoint 4 2 roll moveto 0 f0 0.75 mul rmoveto fonttype [ xsiz pt 2 div 0 0 f0 0 0 ]makefont setfont ftop show moveto fbot show setfont" X X X X X X X X X X X X X X X X X X X X X X X X X END_OF_FILE if test 1519 -ne `wc -c <'./tpscript/stringdefs.h'`; then echo shar: \"'./tpscript/stringdefs.h'\" unpacked with wrong size! fi # end of './tpscript/stringdefs.h' fi if test -f './troff.sh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'./troff.sh'\" else echo shar: Extracting \"'./troff.sh'\" \(1326 characters\) sed "s/^X//" >'./troff.sh' <<'END_OF_FILE' X# troff shell script - invoke ditroff with appropriate args X# - Stephen Frede X# The default device dev=-Talw X# default postprocessor post=tpscript X# ditroff arguments ditargs= X# postprocessor arguments postargs= for i do X case $i in X -Talw) dev=-Talw X post=tpscript X ;; X -Toldalw) X dev=-Toldalw X post=oldtpscript X ;; X -Ttek) dev=-Talw # use alw font tables X post=tc X ;; X -Tuqalw) X dev=-Talw X post=tpscript X echo "-Tuqalw has been re-named -Talw (new default) (warning)" 1>&2 X ;; X -Thpgl) dev=-Talw # use alw font tables for now X post=hpgl X echo "hpgl back end not finished yet" 1>&2 X exit 1 X ;; X -T*) echo invalid device $i; exit 1 ;; X -c*) # -cxxx doesn't work; translate to -mxxx X ditargs="$ditargs "-m`expr "$i" : "-.\(.*\)"` ;; X -a) # ascii representation - no postprocessor X ditargs="$ditargs -a" X post="" X ;; X -R*) # rotate X if [ "$dev" != "-Talw" ] X then X echo "-R option only applies to device 'alw'" 1>&2 X exit 1 X fi X postargs="$postargs "-r`expr "$i" : "-.\(.*\)"` X ;; X -[sS]) # single page at a time - manual feed on ALW X if [ "$dev" = "-Talw" ] X then X postargs="$postargs -S" X else X ditargs="$ditargs $i" X fi X ;; X *) ditargs="$ditargs "$i ;; X esac done X if [ "$post" = "" ] then X /bin/ditroff $dev $ditargs else X /bin/ditroff $dev $ditargs | /usr/lib/troff/$post $postargs fi END_OF_FILE if test 1326 -ne `wc -c <'./troff.sh'`; then echo shar: \"'./troff.sh'\" unpacked with wrong size! fi chmod +x './troff.sh' # end of './troff.sh' fi if test -f 'MANIFEST' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'MANIFEST'\" else echo shar: Extracting \"'MANIFEST'\" \(2412 characters\) sed "s/^X//" >'MANIFEST' <<'END_OF_FILE' X File Name Archive # Description X----------------------------------------------------------- X ./MANIFEST 1 X ./Makefile 1 X ./READ_ME 3 X ./READ_ME.TOO 4 X ./man 1 X ./man/ipscript.1 3 X ./man/lpscript.1 3 X ./opscript 1 X ./opscript/Makefile 1 X ./opscript/bitmap.PS 1 X ./opscript/ipscript.c 4 X ./opscript/lpscript.c 4 X ./opscript/pcom.c 4 X ./opscript/pscript.h 1 X ./pscript 1 X ./pscript/READ_ME 1 X ./pscript/a4.ps 1 X ./pscript/big_greek.ps 1 X ./pscript/demo.ps 3 X ./pscript/floor.ps 3 X ./pscript/genftable.ps 5 X ./pscript/grid.ps 1 X ./pscript/inc.ps 1 X ./pscript/pages.ps 1 X ./pscript/papersize.ps 1 X ./pscript/pattern.ps 1 X ./pscript/setidle.sh 1 X ./pscript/setname.sh 1 X ./pscript/setpasswd.sh 1 X ./pscript/shadow.ps 1 X ./tpscript 1 X ./tpscript/Makefile 1 X ./tpscript/call.c 1 X ./tpscript/dev.h 1 X ./tpscript/devalw 1 X ./tpscript/devalw/B 2 X ./tpscript/devalw/BB 2 X ./tpscript/devalw/BI 2 X ./tpscript/devalw/BO 2 X ./tpscript/devalw/BR 2 X ./tpscript/devalw/BX 2 X ./tpscript/devalw/C 1 X ./tpscript/devalw/CB 1 X ./tpscript/devalw/CO 1 X ./tpscript/devalw/CX 2 X ./tpscript/devalw/DESC.alw 1 X ./tpscript/devalw/DESC.alwp 1 X ./tpscript/devalw/H 2 X ./tpscript/devalw/HB 2 X ./tpscript/devalw/HO 2 X ./tpscript/devalw/HX 2 X ./tpscript/devalw/I 2 X ./tpscript/devalw/Makefile 1 X ./tpscript/devalw/PA 2 X ./tpscript/devalw/PB 3 X ./tpscript/devalw/R 2 X ./tpscript/devalw/S 2 X ./tpscript/devalw/S2 1 X ./tpscript/gendefs.sed 1 X ./tpscript/hash.c 3 X ./tpscript/hash.h 1 X ./tpscript/pcom.c 4 X ./tpscript/pscript.h 1 X ./tpscript/sfont2.c 4 X ./tpscript/sfont2defs.H 3 X ./tpscript/sfont2defs.h 1 X ./tpscript/spline.c 3 X ./tpscript/stringdefs.H 2 X ./tpscript/stringdefs.c 1 X ./tpscript/stringdefs.h 1 X ./tpscript/tpscript.c 5 X ./tpscript/tpscript.h 3 X ./troff.sh 1 X MANIFEST 1 This shipping list END_OF_FILE if test 2412 -ne `wc -c <'MANIFEST'`; then echo shar: \"'MANIFEST'\" unpacked with wrong size! fi # end of 'MANIFEST' fi echo shar: End of archive 1 \(of 5\). cp /dev/null ark1isdone MISSING="" for I in 1 2 3 4 5 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 5 archives. 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 -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.