summaryrefslogtreecommitdiff
path: root/systems/unix
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /systems/unix
Initial commit
Diffstat (limited to 'systems/unix')
l---------systems/unix/TeXmacs1
-rw-r--r--systems/unix/tex-fpc/MFT/iby/README98
-rw-r--r--systems/unix/tex-fpc/MFT/iby/agr.tex2
-rw-r--r--systems/unix/tex-fpc/MFT/iby/getiby17
-rwxr-xr-xsystems/unix/tex-fpc/MFT/iby/getlevy8
-rwxr-xr-xsystems/unix/tex-fpc/MFT/iby/ibyfonts13
-rwxr-xr-xsystems/unix/tex-fpc/MFT/iby/ibymacros6
-rw-r--r--systems/unix/tex-fpc/MFT/iby/sappho.tex27
-rw-r--r--systems/unix/tex-fpc/MFT/iby/test.tex91
-rw-r--r--systems/unix/tex-fpc/MFT/local.mf33
-rwxr-xr-xsystems/unix/tex-fpc/MFT/manfonts7
-rwxr-xr-xsystems/unix/tex-fpc/MFT/mfwebfonts4
-rwxr-xr-xsystems/unix/tex-fpc/MFT/plainfonts52
-rwxr-xr-xsystems/unix/tex-fpc/MFT/texwebfonts2
-rwxr-xr-xsystems/unix/tex-fpc/MFT/tripmanfonts2
-rw-r--r--systems/unix/tex-fpc/MFT/webfonts2
-rw-r--r--systems/unix/tex-fpc/README316
-rwxr-xr-xsystems/unix/tex-fpc/dvipsnk/MakeTeXPK17
-rw-r--r--systems/unix/tex-fpc/dvipsnk/Makefile233
-rw-r--r--systems/unix/tex-fpc/dvipsnk/README33
-rw-r--r--systems/unix/tex-fpc/dvipsnk/afm2tfm.c1966
-rw-r--r--systems/unix/tex-fpc/dvipsnk/dvipsmanfonts61
-rw-r--r--systems/unix/tex-fpc/lib/webmac-fpc.tex16
-rw-r--r--systems/unix/tex-fpc/license21
-rw-r--r--systems/unix/tex-fpc/mf/mf.ch631
-rw-r--r--systems/unix/tex-fpc/mfware/gftopk.ch119
-rwxr-xr-xsystems/unix/tex-fpc/shell/itgl6
-rwxr-xr-xsystems/unix/tex-fpc/shell/mk_MF_dir3
-rwxr-xr-xsystems/unix/tex-fpc/shell/mk_TeX_dir6
-rwxr-xr-xsystems/unix/tex-fpc/shell/mkfont15
-rwxr-xr-xsystems/unix/tex-fpc/shell/mkpkfont19
-rwxr-xr-xsystems/unix/tex-fpc/shell/tgl6
-rwxr-xr-xsystems/unix/tex-fpc/shell/wve6
-rw-r--r--systems/unix/tex-fpc/tech/german.ed5
-rwxr-xr-xsystems/unix/tex-fpc/tech/mktech17
-rw-r--r--systems/unix/tex-fpc/tech/readme30
-rw-r--r--systems/unix/tex-fpc/tech/schlicht.tex14
-rw-r--r--systems/unix/tex-fpc/tech/test.tex95
-rw-r--r--systems/unix/tex-fpc/tex-fpc.pdfbin0 -> 571938 bytes
-rw-r--r--systems/unix/tex-fpc/tex/otex.ch1070
-rw-r--r--systems/unix/tex-fpc/tex/tex.ch1059
-rw-r--r--systems/unix/tex-fpc/web/tangle.ch179
-rw-r--r--systems/unix/tex-fpc/web/tangle.p793
-rw-r--r--systems/unix/tex-fpc/web/weave.ch185
-rw-r--r--systems/unix/tex-fpc/xdvi/README32
-rwxr-xr-xsystems/unix/tex-fpc/xdvi/config15
-rwxr-xr-xsystems/unix/tex-fpc/xdvi/macconfigure4640
-rw-r--r--systems/unix/tex-fpc/xdvi/macxdvi.h1299
-rw-r--r--systems/unix/tex-gpc/MFT/dvipsmanfonts61
-rw-r--r--systems/unix/tex-gpc/MFT/iby/README98
-rw-r--r--systems/unix/tex-gpc/MFT/iby/agr.tex2
-rw-r--r--systems/unix/tex-gpc/MFT/iby/getiby17
-rwxr-xr-xsystems/unix/tex-gpc/MFT/iby/getlevy8
-rwxr-xr-xsystems/unix/tex-gpc/MFT/iby/ibyfonts13
-rwxr-xr-xsystems/unix/tex-gpc/MFT/iby/ibymacros6
-rw-r--r--systems/unix/tex-gpc/MFT/iby/sappho.tex27
-rw-r--r--systems/unix/tex-gpc/MFT/iby/test.tex91
-rwxr-xr-xsystems/unix/tex-gpc/MFT/ibyfonts13
-rw-r--r--systems/unix/tex-gpc/MFT/local.mf33
-rwxr-xr-xsystems/unix/tex-gpc/MFT/manfonts7
-rwxr-xr-xsystems/unix/tex-gpc/MFT/mfwebfonts4
-rwxr-xr-xsystems/unix/tex-gpc/MFT/plainfonts52
-rwxr-xr-xsystems/unix/tex-gpc/MFT/texwebfonts2
-rwxr-xr-xsystems/unix/tex-gpc/MFT/tripfonts2
-rwxr-xr-xsystems/unix/tex-gpc/MFT/tripmanfonts2
-rw-r--r--systems/unix/tex-gpc/MFT/webfonts2
-rw-r--r--systems/unix/tex-gpc/README352
-rw-r--r--systems/unix/tex-gpc/dvipsnk/MakeTeXPK17
-rw-r--r--systems/unix/tex-gpc/dvipsnk/Makefile233
-rw-r--r--systems/unix/tex-gpc/dvipsnk/README36
-rw-r--r--systems/unix/tex-gpc/dvipsnk/dvipsmanfonts61
-rw-r--r--systems/unix/tex-gpc/dvitomp.ch208
-rw-r--r--systems/unix/tex-gpc/dvitype.ch252
-rw-r--r--systems/unix/tex-gpc/gftodvi.ch242
-rw-r--r--systems/unix/tex-gpc/gftopk.ch132
-rw-r--r--systems/unix/tex-gpc/gftype.ch248
-rw-r--r--systems/unix/tex-gpc/mf.ch702
-rw-r--r--systems/unix/tex-gpc/mp.ch651
-rw-r--r--systems/unix/tex-gpc/mp/README186
-rw-r--r--systems/unix/tex-gpc/mp/dvitomp.ch208
-rw-r--r--systems/unix/tex-gpc/mp/mk_MP_dir2
-rw-r--r--systems/unix/tex-gpc/mp/mp.ch651
-rw-r--r--systems/unix/tex-gpc/mp/mptotex.c224
-rw-r--r--systems/unix/tex-gpc/mp/mpx8
-rw-r--r--systems/unix/tex-gpc/pktype.ch151
-rw-r--r--systems/unix/tex-gpc/pltotf.ch63
-rw-r--r--systems/unix/tex-gpc/pooltype.ch83
-rwxr-xr-xsystems/unix/tex-gpc/shell/itgl6
-rw-r--r--systems/unix/tex-gpc/shell/mk_MF_dir3
-rw-r--r--systems/unix/tex-gpc/shell/mk_TeX_dir6
-rw-r--r--systems/unix/tex-gpc/shell/mkfont15
-rw-r--r--systems/unix/tex-gpc/shell/mkpkfont19
-rw-r--r--systems/unix/tex-gpc/shell/tgl6
-rw-r--r--systems/unix/tex-gpc/shell/wve6
-rw-r--r--systems/unix/tex-gpc/tangle.ch167
-rw-r--r--systems/unix/tex-gpc/tangle.p792
-rw-r--r--systems/unix/tex-gpc/tech/german.ed5
-rwxr-xr-xsystems/unix/tex-gpc/tech/mktech17
-rw-r--r--systems/unix/tex-gpc/tech/readme31
-rw-r--r--systems/unix/tex-gpc/tech/schlicht.tex14
-rw-r--r--systems/unix/tex-gpc/tech/test.tex95
-rw-r--r--systems/unix/tex-gpc/tex.ch1338
-rw-r--r--systems/unix/tex-gpc/tex.pdfbin0 -> 599098 bytes
-rw-r--r--systems/unix/tex-gpc/tftopl.ch98
-rw-r--r--systems/unix/tex-gpc/traplog/READMe6
-rw-r--r--systems/unix/tex-gpc/traplog/trap.fot59
-rw-r--r--systems/unix/tex-gpc/traplog/trap.fot.diff8
-rw-r--r--systems/unix/tex-gpc/traplog/trap.log4266
-rw-r--r--systems/unix/tex-gpc/traplog/trap.log.diff24
-rw-r--r--systems/unix/tex-gpc/traplog/trap.pl490
-rw-r--r--systems/unix/tex-gpc/traplog/trap.pl.diff0
-rw-r--r--systems/unix/tex-gpc/traplog/trap.typ210
-rw-r--r--systems/unix/tex-gpc/traplog/trap.typ.diff8
-rw-r--r--systems/unix/tex-gpc/traplog/trapin.log179
-rw-r--r--systems/unix/tex-gpc/traplog/trapin.log.diff14
-rw-r--r--systems/unix/tex-gpc/triplog/8terminal.tex0
-rw-r--r--systems/unix/tex-gpc/triplog/READMe15
-rw-r--r--systems/unix/tex-gpc/triplog/trip.fot83
-rw-r--r--systems/unix/tex-gpc/triplog/trip.fot.diff4
-rw-r--r--systems/unix/tex-gpc/triplog/trip.log7304
-rw-r--r--systems/unix/tex-gpc/triplog/trip.log.diff16
-rw-r--r--systems/unix/tex-gpc/triplog/trip.pl833
-rw-r--r--systems/unix/tex-gpc/triplog/trip.pl.diff0
-rw-r--r--systems/unix/tex-gpc/triplog/trip.typ1214
-rw-r--r--systems/unix/tex-gpc/triplog/trip.typ.diff8
-rw-r--r--systems/unix/tex-gpc/triplog/tripin.log.diff10
-rw-r--r--systems/unix/tex-gpc/triplog/tripos.tex3
-rw-r--r--systems/unix/tex-gpc/triplog/tripos.tex.diff0
-rw-r--r--systems/unix/tex-gpc/weave.ch162
-rw-r--r--systems/unix/tex-gpc/webmac-gpc.tex18
-rw-r--r--systems/unix/tex-gpc/xdvi/README32
-rw-r--r--systems/unix/tex-gpc/xdvi/XDvi14
-rw-r--r--systems/unix/tex-gpc/xdvi/config15
-rw-r--r--systems/unix/tex-gpc/xdvi/load5
-rwxr-xr-xsystems/unix/tex-gpc/xdvi/macconfigure4640
-rw-r--r--systems/unix/tex-gpc/xdvi/macxdvi.h1299
136 files changed, 41979 insertions, 0 deletions
diff --git a/systems/unix/TeXmacs b/systems/unix/TeXmacs
new file mode 120000
index 0000000000..b3cf8df109
--- /dev/null
+++ b/systems/unix/TeXmacs
@@ -0,0 +1 @@
+../../support/TeXmacs \ No newline at end of file
diff --git a/systems/unix/tex-fpc/MFT/iby/README b/systems/unix/tex-fpc/MFT/iby/README
new file mode 100644
index 0000000000..802aae4137
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/iby/README
@@ -0,0 +1,98 @@
+This directory contains files that help installing an ancient Greek
+font in TeX-GPC. The font includes a full set of diacritical marks,
+the preclassic letters digamma, quoppa and sampi, and the lunatic
+variant of sigma.
+
+The font was originally cut by Firmin Didot(*1764, +1836), put into
+METAFONT files by Silvio Levy in 1987 and improved by Pierre A. MacKay,
+the author of Ibycus4. Here I used version 4.5 as of
+2004-10-27.
+
+Preparation:
+------------
+Get the packages ibygrk and levy from CTAN:fonts/greek and copy
+files from levy and ibygrk directories into this directory, with
+the shellscripts getlevy and getiby.
+
+Link METAFONT's and TeX's master directories to this directory, so
+you can run mf and tex from here. Make sure MFinputs contains
+Knuth's computer modern fonts.
+
+Installation:
+-------------
+Run ibyfonts to build and install the .tfm and .pk fonts.
+Run ibymacros to install macro files into TeXinputs.
+
+Usage:
+------
+From your .tex file \input agr and enclose Greek between \GK and
+\RM.
+
+
+Typing Greek characters
+-----------------------
+You don't need a monster keyboard or even the ALT-key to enter
+Greek text into your TeX---ASCII suffices. The ASCII representation
+used here follows the Beta Code from the Thesaurus Linguae Graecae.
+(http://www.tlg.uci.edu/BetaCode.html)
+
+Greek Letters:
+Since the Latin alphabet emerged from the Greek one, you enter most
+Greek letters as their corresponding ASCII character.
+But there are some exceptions:
+Greek ASCII
+eta h
+theta q
+ksi c
+ypsilon u
+phi f
+chi x
+psi y
+omega w
+digamma v
+koppa k+
+sampi s+ (lowercase only)
+lunatic
+sigma c
+
+Diacritics:
+rough breathing: (
+smooth breathing: )
+diaeresis: +
+acute: '
+grave: `
+circumflex: =
+iota subscript: |
+dubious(dot under): !
+
+Order of diacritics with lowercase letters:
+letter, diaeresis, breathing, accent, iota subscript. E.g. u"(=|
+A diaeresis (+) won't work together with a circumflex.
+
+Order of diacritics with uppercase letters:
+breathing, accent, letter, iota subscript (=W|
+A breathing is mandatory before an accent.
+
+Punctuation
+Period .
+Apostroph ' (if after a vowel, use a{}', not a')
+Colon :
+Question Mark ;
+guillemets << >>
+
+Look at test.tex and sappho.tex for examples.
+
+Installing the Type 1 fonts in teTeX3.0:
+----------------------------------------
+List the search directory with `kpsewhich -show-path=.pfb'
+I selected ~/texmf from that list.
+From the ibygrk/fonts directory do:
+ mkdir ~/texmf/fonts
+ cp -rp * ~/texmf/fonts
+ texhash
+
+Finally I added the command line option `-u +iby' to dvips
+in the dvipdf script.
+
+Aug. 2008
+Wolfgang Helbig
diff --git a/systems/unix/tex-fpc/MFT/iby/agr.tex b/systems/unix/tex-fpc/MFT/iby/agr.tex
new file mode 100644
index 0000000000..038f6a94bd
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/iby/agr.tex
@@ -0,0 +1,2 @@
+\input ibycusps
+\setgreek10/12
diff --git a/systems/unix/tex-fpc/MFT/iby/getiby b/systems/unix/tex-fpc/MFT/iby/getiby
new file mode 100644
index 0000000000..23f2b7724a
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/iby/getiby
@@ -0,0 +1,17 @@
+# copy .tex and .mf files from the ibygrk package
+IBY=../ibygrk
+
+for f in \
+abary4.mf version4.mf ubary4.mf sampi4.mf obary4.mf koppa4.mf \
+ibyupr4.mf ibypnct4.mf ibylwr4.mf ibylig4.mf ibycus4.mf ibyacc4.mf \
+ibary4.mf hbary4.mf fibr849.mf fibr848.mf fibr84.mf fibo849.mf \
+fibo848.mf fibo84.mf fibb849.mf fibb848.mf fibb84.mf ebary4.mf \
+digamma4.mf cigma4.mf wbary4.mf gen_acc.mf graccent.mf grbase.mf
+do cp -p $IBY/fonts/source/public/ibycus4/$f .
+done
+
+for f in \
+pssetiby.tex tlgsqq.tex setiby4.tex version4.tex ibycusps.tex \
+ibycus4.tex iby4extr.tex psibycus.tex iby4text.tex
+do cp -p $IBY/tex/generic/ibycus4/$f .
+done
diff --git a/systems/unix/tex-fpc/MFT/iby/getlevy b/systems/unix/tex-fpc/MFT/iby/getlevy
new file mode 100755
index 0000000000..899e201492
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/iby/getlevy
@@ -0,0 +1,8 @@
+# copy fonts from the levy directory
+LEVY=../levy
+for f in \
+a.mf b.mf d.mf e.mf f.mf g.mf h.mf i.mf j.mf k.mf \
+l.mf m.mf n.mf o.mf p.mf q.mf r.mf s.mf t.mf u.mf \
+w.mf x.mf y.mf z.mf gen_sigma.mf grpunct.mf grbase.mf graccent.mf
+do cp -p $LEVY/$f .
+done
diff --git a/systems/unix/tex-fpc/MFT/iby/ibyfonts b/systems/unix/tex-fpc/MFT/iby/ibyfonts
new file mode 100755
index 0000000000..ceb04b49e4
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/iby/ibyfonts
@@ -0,0 +1,13 @@
+# build and install ibyfonts
+rm -f trouble
+mkfont fibo84
+mkfont fibr84
+mkfont fibr849
+mkfont fibo849
+mkfont fibr848
+mkfont fibo848
+mkpkfont fibr84 magstep0.5
+mkpkfont fibo84 magstep0.5
+mkpkfont fibr84 magstep1
+mkpkfont fibo84 magstep1
+mkpkfont cmr10 magstep0.5
diff --git a/systems/unix/tex-fpc/MFT/iby/ibymacros b/systems/unix/tex-fpc/MFT/iby/ibymacros
new file mode 100755
index 0000000000..fc64ea0f6e
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/iby/ibymacros
@@ -0,0 +1,6 @@
+# install tex macros for ibycus4 TeX-GPC
+for f in \
+pssetiby.tex tlgsqq.tex setiby4.tex version4.tex ibycusps.tex \
+ibycus4.tex iby4extr.tex psibycus.tex iby4text.tex agr.tex ibycus4.map
+do cp -p $f TeXinputs
+done
diff --git a/systems/unix/tex-fpc/MFT/iby/sappho.tex b/systems/unix/tex-fpc/MFT/iby/sappho.tex
new file mode 100644
index 0000000000..861f5d682f
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/iby/sappho.tex
@@ -0,0 +1,27 @@
+% Ein Beispiel fuer die Benutzung des altgriechischen Fonts:
+\hsize 4in
+\input ibycusps
+\setgreek10/12
+\GK
+\obeylines
+De'duke me`n a) sela'nna
+kai` Plhi'ades, me'sai de`
+nu'ktes, pa'ra d' e)'rxet' w)'ra,
+e)gw` de` mo'na kate'udw.
+
+\medskip
+
+)Aste'res me`n a)mfi` kala`n sela'nnan
+a)'y' a)pokru'ptoisi fae'nnon ei)=dos,
+o)'ppotan plh'qoisa ma'lista la'mph|
+ga=n e)pi` pai=san.
+
+\medskip
+
+)'Espere, pa'nta fe'reis, o)'sa fai'nolis e)ske'das' Au)'ws;
+fe'reis o)'in,
+fe'reis ai)=ga,
+fe'reis a)'pu ma'teri pai=da.
+\hfill Sapfw'
+\RM
+\bye
diff --git a/systems/unix/tex-fpc/MFT/iby/test.tex b/systems/unix/tex-fpc/MFT/iby/test.tex
new file mode 100644
index 0000000000..8acf09d185
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/iby/test.tex
@@ -0,0 +1,91 @@
+% Pruefdatei fuer ibycus4
+\input agr
+\obeylines
+\noindent {\bf Vokale}
+\GK a e h i o u w A E H I O U W\RM
+Kurze Vokale: \GK e o\RM
+Lange Vokale: \GK h w\RM
+
+\medskip \noindent{\bf Hauchzeichen}
+Spiritus asper: \GK a( e( h( i( o( u( w( (A (E (H (I (O (U (W \RM
+Spiritus lenis: \GK a) e) h) i) o) u) w) )A )E )H )I )O )U )W \RM
+
+\medskip \noindent{\bf Akzente}
+Akut: \GK a' e' h' i' o' u' w'\RM
+Gravis: \GK a` e` h` i` o` u` w` \RM
+Zirkumflex: \GK a= h= i= u= w= \RM
+
+\medskip \noindent{\bf Hauchzeichen und Akzente}
+Spiritus asper und Akut: \GK a(' e(' h(' i(' o(' u(' w(' %
+ ('A ('E ('H ('I ('O ('U ('W\RM
+Spiritus lenis und Akut: \GK a)' e)' h)' i)' o)' u)' w)' %
+ )'A )'E )'H )'I )'O )'U )'W\RM
+Spiritus asper und Gravis: \GK a(` e(` h(` i(` o(` u(` w(` %
+ (`A (`E (`H (`I (`O (`U (`W\RM
+Spiritus lenis und Gravis: \GK a)` e)` h)` i)` o)` u)` w)` %
+ )`A )`E )`H )`I )`O )`U )`W\RM
+Spiritus asper und Zirkumflex: \GK a(= h(= i(= u(= w(= %
+ (=A (=E (=H (=I (=O (=U (=W\RM
+Spiritus lenis und Zirkumflex: \GK a)= h)= i)= u)= w)= %
+ )=A )=E )=H )=I )=O )=U )=W\RM
+
+\medskip \noindent{\bf Trema}
+\GK i+ u+\RM
+\medskip \noindent{\bf $\ldots$ und Akzente}
+Akut: \GK i+' u+'\RM
+Gravis: \GK i+` u+`\RM
+% Zirkumflex: \GK i+= u+=\RM gibt's nicht XXX
+
+\medskip \noindent{\bf Iota subscriptum}
+\GK a| h| w|\RM
+
+\medskip \noindent{\bf $\ldots$ mit Hauchzeichen}
+Spiritus asper: \GK a(| h(| w(|\RM
+Spiritus lenis: \GK a)| h)| w)|\RM
+
+\medskip \noindent{\bf $\ldots$ mit Akzenten}
+Akut: \GK a'| h'| w'|\RM
+Gravis: \GK a`| h`| w`|\RM
+Zirkumflex: \GK a=| h=| w=|\RM
+
+\medskip \noindent{\bf $\ldots$ mit Hauchzeichen und Akzenten}
+Spiritus asper und Akut: \GK a('| h('| w('|\RM
+Spiritus asper und Gravis: \GK a(`| h(`| w(`|\RM
+Spiritus asper und Zirkumflex: \GK a(=| h(=| w(=|\RM
+Spiritus lenis und Akut: \GK a)'| h)'| w)'|\RM
+Spiritus lenis und Gravis: \GK a)`| h)`| w)`|\RM
+Spiritus lenis und Zirkumflex: \GK a)=| h)=| w)=|\RM
+
+\medskip\noindent {\bf Dauerlaute}
+Nasale: \GK m n M N\RM
+Liquidae: \GK l r L R\RM, Rho mit Spiritus asper: \GK r(\RM
+Spirant: \GK s\noboundary\ S\RM, Sigma am Wortende: \GK s s. s, s; s?\RM
+
+\filbreak\noindent {\bf Verschlu\ss laute}
+Labiale: \GK p b f P B F \RM
+Dentale: \GK t d q T D Q\RM
+Gutturale: \GK k g x K G X\RM
+Aspiratae: \GK f q x F Q X\RM
+
+\medskip\noindent {\bf Konsonantenverbindungen mit dem Laut ``s''}
+\GK y z c Y Z C\RM
+
+\medskip \noindent {\bf Satzzeichen}
+Punkt: \GK.\RM
+Komma: \GK,\RM
+Hochpunkt: \GK;\RM
+Fragezeichen: \GK?\RM
+Guillemet: \GK<<$\ldots$>>\RM
+
+\medskip \noindent {\bf Vorklassische Zeichen, Zahlzeichen}
+Digamma (6): \GK v V \RM
+Qoppa (90): \GK k+ K+ \RM
+Sampi (900): \GK s+\RM
+
+\medskip \noindent {\bf andere Zeichen}
+Sigma Lunate: \GK c+ C+\RM
+
+Punkt unter Buchstaben: \GK kosm!os\RM
+
+
+\bye
diff --git a/systems/unix/tex-fpc/MFT/local.mf b/systems/unix/tex-fpc/MFT/local.mf
new file mode 100644
index 0000000000..491430d781
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/local.mf
@@ -0,0 +1,33 @@
+% This is local.mf for my HP LaserJet 1320.
+% It works with two resolutions.
+% The values are from modes.mf (ftp://tug.org/tex/modes.mf) Version 3.8.
+% as supplied by Niko Sauer <nikos@friedrichs.up.ac.za>. Niko writes:
+% Here are modes developed for and tested on the HP LaserJet 2100T/TN.
+% Mode ljtozz is for a resolution of 1200dpi, and ljtozzfr for 600dpi
+% Tradeoffs between |fillin| and |blacker| resulted in very clear,
+% sharp renderings of Computer Modern fonts which appears to be
+% preferable to what the modes ljfzzz ljfzzzfr for HP LaserJet 4000
+% yield on this printer. Preferences were tested by scrutiny of the
+% results by sample of people in the vicinity.
+%
+%
+mode_def lj = % HP LaserJet 1320 ProRes (1200 dpi)
+ proofing :=0;
+ fontmaking := 1;
+ tracingtitels := 1;
+ pixels_per_inch := 1200;
+ blacker := .7;
+ fillin := .15;
+ o_correction := 1;
+enddef;
+%
+mode_def ljfr = % HP LaserJet 1320 FastRes (600dpi)
+ proofing :=0;
+ fontmaking := 1;
+ tracingtitels := 1;
+ pixels_per_inch := 600;
+ blacker := .25;
+ fillin := .3;
+ o_correction := 1;
+enddef;
+localfont := ljfr;
diff --git a/systems/unix/tex-fpc/MFT/manfonts b/systems/unix/tex-fpc/MFT/manfonts
new file mode 100755
index 0000000000..e98538738b
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/manfonts
@@ -0,0 +1,7 @@
+mkfont cmtex10
+mkfont cminch
+mkfont cmssdc10 4
+mkpkfont cmr5 2
+mkfont cmman # font used for miscellaneous Computer Modern variations
+ # from ctan:/systems/knuth/local/mf/cmman.mf
+mkfont random # from ctan:/systems/knuth/local/lib/random.mf
diff --git a/systems/unix/tex-fpc/MFT/mfwebfonts b/systems/unix/tex-fpc/MFT/mfwebfonts
new file mode 100755
index 0000000000..a66d9a6be8
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/mfwebfonts
@@ -0,0 +1,4 @@
+# fonts used by mf.web
+mkfont logo10 # font used for the METAFONT logo
+mkfont logosl10
+mkfont logo8
diff --git a/systems/unix/tex-fpc/MFT/plainfonts b/systems/unix/tex-fpc/MFT/plainfonts
new file mode 100755
index 0000000000..d2d18bd490
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/plainfonts
@@ -0,0 +1,52 @@
+# This script builds and installs .tfm and .pk fonts for plain.tex.
+rm -f trouble # clean list of trouble makeing fonts
+mkfont cmr10 # roman text
+mkfont cmr9
+mkfont cmr8
+mkfont cmr7
+mkfont cmr6
+mkfont cmr5
+mkfont cmmi10 # math italic
+mkfont cmmi9
+mkfont cmmi8
+mkfont cmmi7
+mkfont cmmi6
+mkfont cmmi5
+mkfont cmsy10 # math symbols
+mkfont cmsy9
+mkfont cmsy8
+mkfont cmsy7
+mkfont cmsy6
+mkfont cmsy5
+mkfont cmex10 # math extension
+mkfont cmss10 # sans serif
+mkfont cmssq8
+mkfont cmssi10 # sans serif italic
+mkfont cmssqi8
+mkfont cmbx10 # boldface extended
+mkfont cmbx9
+mkfont cmbx8
+mkfont cmbx7
+mkfont cmbx6
+mkfont cmbx5
+mkfont cmtt10 # typewriter
+mkfont cmtt9
+mkfont cmtt8
+mkfont cmsltt10 # slanted typewriter
+mkfont cmsl10 # slanted roman
+mkfont cmsl9
+mkfont cmsl8
+mkfont cmti10 # text italic
+mkfont cmti9
+mkfont cmti8
+mkfont cmti7
+mkfont cmu10 # unslanted text italic
+mkfont cmmib10 # bold math italic
+mkfont cmbsy10 # bold math symbols
+mkfont cmcsc10 # caps and small caps
+mkfont cmssbx10 # sans serif bold extended
+mkfont cmdunh10 # Dunhill style
+mkpkfont cmr7 magstep4 # for titles
+mkpkfont cmtt10 magstep2
+mkpkfont cmssbx10 magstep2
+mkfont manfnt # METAFONT logo and dragon curve and special symbols
diff --git a/systems/unix/tex-fpc/MFT/texwebfonts b/systems/unix/tex-fpc/MFT/texwebfonts
new file mode 100755
index 0000000000..883b186bb1
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/texwebfonts
@@ -0,0 +1,2 @@
+# font used tex.tex
+mkfont logo10 # font used for the METAFONT logo
diff --git a/systems/unix/tex-fpc/MFT/tripmanfonts b/systems/unix/tex-fpc/MFT/tripmanfonts
new file mode 100755
index 0000000000..1d4e4356c4
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/tripmanfonts
@@ -0,0 +1,2 @@
+# font for tripman
+mkpkfont cmr7 magstep5 # for titles
diff --git a/systems/unix/tex-fpc/MFT/webfonts b/systems/unix/tex-fpc/MFT/webfonts
new file mode 100644
index 0000000000..86676e2c70
--- /dev/null
+++ b/systems/unix/tex-fpc/MFT/webfonts
@@ -0,0 +1,2 @@
+# fonts for the web macros
+mkfont cmtex10
diff --git a/systems/unix/tex-fpc/README b/systems/unix/tex-fpc/README
new file mode 100644
index 0000000000..4d62296690
--- /dev/null
+++ b/systems/unix/tex-fpc/README
@@ -0,0 +1,316 @@
+2019-03-04
+
+This directory contains change files for Donald E. Knuth's suite
+of TeX related programs. The change files (.ch) and Don Knuth's
+WEB files (.web) from January 2014 are the key components of a
+construction kit for "TeX-FPC"---a TeX system which is based on
+the Free Pascal Compiler (FPC) and runs in a Unix environment. It's
+by magnitudes smaller than other TeX distributions.
+
+These building bricks are glued together by shell scripts in
+the---guess where---shell subdirectory.
+
+The MFT directory contains shell scripts for installing fonts
+(xxxfonts), and the directory iby shows how to install fonts
+with TeX-FPC. In this case a polytonic Greek font, suited for ancient
+Greek texts.
+
+The directories dvipsnk and xdvi show how to install Tom Rokicki's
+dvips and Paul Vojta's xdvi.
+If your printer does not accept postscript, you might want to install
+ghostscript, which converts postscript to the language of you printer or
+to pdf. Use ghostscripts dvipdf to convert ps to pdf.
+
+TeX-FPC replaces the famous and beautiful TeX-GPC. The GNU Pascal Compiler
+is not supported on Linux, the BSDs and OS X. Free Pascal is chosen
+not because it is the best alternative but because it is the only
+alternative.
+In FPC 3.0.4 I spotted to errors: See
+0035136: The function EOF does not comply to ISO Pascal
+0035066: fpc says "cannot determine which overloaded function to call"
+at bugs.freepascal.org
+
+
+Overview:
+=========
+
+File formats and their documentation:
+-------------------------------------
+WEB files:
+.web WEB programs, "The WEB System of Structured Documentation" (webman.tex)
+.ch Change files for WEB programs (patches to be applied to .web files)
+.p Free Pascal source
+.pool String pool, contains the string constants of a WEB program.
+
+
+METAFONT files:
+.mf METAFONT source, "The METAFONTbook" (mfbook.tex)
+.base Base file, a compact representation of METAFONT's memory.
+.tfm TeX font metric, "TeX: The Program" (tex.web) part 30
+.nnngf generic font file, "METAFONT: The Program" (mf.web), part 46
+.nnnpk packed font file, gftopk.web, modules 21-36
+ The last two are bitmap font formats, where nnn is a number that
+ stands for "dots per inch". The number equals resolution of the
+ output device as specified in your mode times the magnification.
+.log a log file
+
+TeX files:
+.tex TeX source, "The TeXbook" (texbook.tex)
+.fmt Format file, a compact representation of TeX's memory.
+ contains the string pool (tex.pool) and preloaded .tfm files.
+.dvi device independent file, "TeX: The Program" (tex.web), part 31
+.log a log file
+
+
+
+Files and their processors:
+--------------------------
+WEB:
+ tangle
+ .web, .ch --------> .p, .pool
+
+ fpc
+ x.p --------> x
+
+ tgl
+ x.web, x.ch --------> x (linking the last two steps)
+
+ itgl
+ x.web, x.ch --------> x, inix.p, .pool (links the first two steps
+ and keeps the pascal sources)
+
+ weave
+ .web, .ch --------> .tex (Description of the program)
+
+ wve
+ .web, .ch --------> .dvi (linking the above step and tex)
+
+
+METAFONT:
+ inimf
+ plain.mf --------> plain.base
+
+ mf
+ .mf --------> .nnngf, tfm
+
+ gftopk
+ .nnngf --------> .nnnpk
+
+ mkfont
+ .mf --------> TeXfonts/.tfm, PKfonts/.nnnpk
+
+ mkpkfont
+ .mf --------> PKfonts/.nnnpk
+
+
+TeX:
+ initex
+ .tfm, plain.tex --------> plain.fmt
+
+ tex
+ [ .tfm ], .tex --------> .dvi
+
+
+DVI drivers:
+ dvips
+ .dvi, .nnnpk --------> .ps, PostScript printer
+
+ xdvi
+ .dvi, .nnnpk --------> X-Window
+
+
+File names:
+-----------
+TeX-FPC searches files in directories which are local to the working
+directory:
+ TeXinputs .tex
+ TeXfonts .tfm
+ TeXformats .pool, .fmt
+ MFinputs .mf
+ MFbases .pool, .base
+ PKfonts .nnnpk
+ DVIPSconf .pro, .ps, .map (Header and configuration files for dvips)
+
+I created one set of "master directories" and used symbolic links
+to my working directory like:
+
+ ln -s ~/TeXformats .
+
+The scripts mk_TeX_dir and mk_MF_dir help to prepare a directory
+for running TeX resp. METAFONT. Adapt these scripts to the locations
+of your master directories.
+
+TeX-FPC's path searching applies to file names without directory
+components, i.e. without a /:
+ .tex local directory and then TeXinputs
+ .mf local directory and then MFinputs
+ .tfm TeXfonts
+
+Depending on the context, TeX-FPC programs append ".mf", ".tex",
+or ".tfm" to file names without extensions.
+
+builtin file names:
+------------------
+TeXformats/tex.pool string pool for tex, (in initex)
+MFbases/mf.pool string pool for mf, (in inimf)
+TeXformats/plain.fmt format file for Plain TeX, (in tex)
+MFbases/plain.base base file for Plain METAFONT, (in mf)
+
+Fonts in TeX-FPC:
+----------------
+For each font TeX needs one .tfm file. For each font and
+resolution/magnification the DVI drivers need one .nnnpk file.
+The script mkfont will install both a .tfm and an .nnnpk file, the
+script mkpkfont will install an .nnnpk file only. You specify the
+resolution in your METAFONT mode and the magnification as an optional
+second argument to mkpkfont or mkfont. The DVI drivers will invoke
+mkpkfont automatically to create missing .nnnpk files.
+
+Running TeX-FPC
+===============
+Missing files
+-------------
+Search missing macro files like (webmac.tex) in Knuth's lib
+directory and copy them to the working directory or to TeXinputs.
+My change files import webmac-fpc.tex; move it to TeXinputs.
+
+Search the sources of missing fonts in the lib directory (.mf),
+copy them to MFinputs and use the scripts mkfont or mkpkfont to
+create and install .tfm files respective .pk files. The shell scripts
+assume the METAFONT mode localfont which is defined in MFT/local.mf.
+Remember, you've loaded local.mf into the file plain.base. Or you
+might want to grep for font assignments in your .tex files. The
+command line
+ grep '\\font.*=' plain.tex > plainfonts
+creates a list of the font names used by plain.tex. I edited
+plainfonts to convert it to a shell script that creates all fonts
+of the plain format. In the MFT directory you'll find other examples.
+
+Installing new fonts from CTAN
+------------------------------
+The directory MFT/iby contains instructions on how to install a font
+from CTAN, in this case ibygrk to typeset polytonic ancient Greek.
+
+Printing the documentation
+--------------------------
+The weave program generates an xxx.tex file from an xxx.web file
+and a possibly empty change file. Use tex to generate an xxx.dvi
+file. This is done by the script wve. For example, to view the
+description of TeX-FPC, use
+ wve tex.web tex.ch && xdvi tex
+The web-macros need another font. Use webfonts to install it.
+The scripts texwebfonts installs additional fonts for tex.tex,
+and mfwebfonts for mf.tex.
+
+TRIP TRAP
+---------
+Both tests might not be passed by TeX-FPC: TeX and METAFONT trim
+trailing spaces from input lines for compatibility with IBM's
+punched cards. TeX-FPC's programs don't.
+
+
+Installing TeX-FPC:
+===================
+
+Get Knuth's source files:
+------------------------
+Make a stage directory, say tex-fpc, which mirrors Knuth's distribution
+from
+
+ ftp://ftp.dante.de/pub/tex/systems/knuth/dist.zip
+
+This gives you the WEB files, manuals, macros and some .mf files.
+At least you need the directories lib, tex, mfware, mf and web.
+
+You need another set of source files, namely the METAFONT source
+files (.mf) for Knuth's font Computer Modern.
+
+Copy the .mf files from
+ ftp://ftp.dante.de/pub/tex/fonts/cm/mf/
+to MFinputs.
+
+And Copy the .mf files from the lib directory to MFinputs.
+ cp -p lib/*.mf MFinputs
+
+I prefer the DANTE server, because that server preserves modification
+times. This is not true with other CTAN mirrors.
+
+Building from WEB sources, (xxx.web and xxx.ch --> xxx, xxx.pool)
+----------------------------------------------------------------
+The general procedure to build a binary xxx from its WEB files is:
+Move xxx.ch to the directory that contains xxx.web, apply tangle
+to xxx.web and xxx.ch to generate xxx.p and xxx.pool, and compile the
+Pascal source with gpc. The command line
+ tgl xxx.web xxx.ch
+will do all that. It produces xxx that you need to move to your binary
+directory.
+
+Step by step procedure to bootstrap TeX-FPC
+-------------------------------------------
+Install Free Pascal Compiler from www.freepascal.org.
+
+Create the master directories (see above)
+
+copy the shell scripts from the tex-fpc/shell to your binary direcory.
+
+
+0. Make tangle tangle.p --> tangle
+------------------------------------------------------------------------
+Compile tangle.p (fpc tangle.p) and move tangle to your
+binary directory.
+
+1. Make inimf and initex mf.web, mf.ch --> inimf, inimf.p, MFbases/mf.pool
+ tex.web, tex.ch --> initex,initex.p TeXformats/tex.pool
+Make sure, mf.ch and tex.ch are prepared to produce ini versions of
+tex and mf.
+------------------------------------------------------------------------
+Build the ini-programs and save them as initex, resp. inimf.
+Move tex.pool to TeXformats and mf.pool to MFbases, use itgl instead
+of tgl to keep inimf.p and initex.p.
+
+2. Make plain.base lib/plain.mf --> MFbases/plain.base
+------------------------------------------------------------------------
+Go to the directory tex-fpc/mf and use inimf to create plain.base.
+The file local.mf contains mode definitions for my HP LaserJet 1320
+printer. Adapt local.mf to your printer and then type
+ inimf ../lib/plain input ../MFT/local dump
+
+Move plain.base to MFbases.
+
+3. Make mf mf.web, mf.ch --> mf
+------------------------------------------------------------------------
+Edit mf.ch and look for the string @x inimf that introduces a change
+block. This change block is commented out, since it is shifted
+right. Shift left this block to uncomment it. This way mf.ch is
+changed to build a production version.
+
+4. Make gftopk gftopk.web, gftopk.ch --> gftopk
+------------------------------------------------------------------------
+Build gftopk in the mfware directory. You need gftopk to install
+packed font files (.nnnpk) in the next step.
+
+5. Install fonts: MFinputs/*.mf --> TeXfonts/*.tfm, PKfonts/*.pk
+------------------------------------------------------------------------
+Prepare tex-fpc to run both METAFONT (mk_MF_dir) and TeX (mk_TeX_dir)
+and run the shell script MFT/plainfonts from there.
+Check the file trouble that might contain commands that failed.
+
+6. Make plain.fmt lib/plain.tex --> TeXformats/plain.fmt
+------------------------------------------------------------------------
+Copy lib/hyphen.tex to TeXinputs and go to the directory tex-fpc/tex
+to build plain.fmt.
+This command line will do
+ initex ../lib/plain \\dump # one backslash is consumend by sh!
+Move plain.fmt to TeXformats.
+
+7. Finally build tex tex.web, tex.ch --> tex
+------------------------------------------------------------------------
+Change tex.ch for production, and build it with tgl.
+
+Enjoy,
+Wolfgang Helbig, Programmierer
+
+Comments welcome: helbig@mailbox.org
+
+TeX is a trademark of the American Mathematical Society.
+METAFONT is a trademark of Addison Wesley Publishing Company.
diff --git a/systems/unix/tex-fpc/dvipsnk/MakeTeXPK b/systems/unix/tex-fpc/dvipsnk/MakeTeXPK
new file mode 100755
index 0000000000..5145b09bfa
--- /dev/null
+++ b/systems/unix/tex-fpc/dvipsnk/MakeTeXPK
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Do not run this script, or dvips, as setuid programs! This will
+# result in a major security hole!
+#
+# This script file makes a new TeX PK font, because one wasn't
+# found. Parameters are:
+#
+# name dpi bdpi magnification [mode [subdir]]
+#
+# `name' is the name of the font, such as `cmr10'. `dpi' is
+# the resolution the font is needed at. `bdpi' is the base
+# resolution, useful for figuring out the mode to make the font
+# in. `magnification' is a string to pass to MF as the
+# magnification. `mode', if supplied, is the mode to use.
+#
+mkpkfont $1 $4
diff --git a/systems/unix/tex-fpc/dvipsnk/Makefile b/systems/unix/tex-fpc/dvipsnk/Makefile
new file mode 100644
index 0000000000..cbdf300d17
--- /dev/null
+++ b/systems/unix/tex-fpc/dvipsnk/Makefile
@@ -0,0 +1,233 @@
+#
+# Makefile for dvips. Edit this first part of the file.
+# Adapted to TeX-GPC in Aug. 2008.
+#
+# First, the things that absolutely must be edited for your system.
+# Please, don't forget to edit MakeTeXPK in the same way!
+
+# Change to your binary directory.
+BINDIR = $(HOME)/bin
+# the place man pages are located.
+MANDIR = $(HOME)/man/man1
+
+# Change the default resolution to reflect your printer's.
+DEFS= -DDEBUG -DDEFRES=600 -DCREATIONDATE
+
+# where TeX is `rooted'. Sometimes /usr/local/lib/tex.
+# TEXDIR = /usr/lib/tex
+TEXDIR = .
+
+# another place pk, tfm, and vf files might be found.
+# LOCALDIR = /LocalLibrary/Fonts/TeXFonts
+LOCALDIR = TeXFonts
+
+# the default path to search for TFM files
+# (this usually is identical to TeX's defaultfontpath, which omits `.')
+# (private fonts are given an explicit directory, which overrides the path)
+# overridden by the environment variable TEXFONTS
+# TFMPATH = $(LOCALDIR)/tfm:$(TEXDIR)/fonts/tfm
+TFMPATH = TeXFonts
+
+# the default path to search for PK files (usually omits `.')
+# Don't forget to add the directory that
+# MakeTeXPK puts the files! (In this case, /LocalLibrary/Fonts...)
+# overridden by the environment variable TEXPKS or TEXPACKED or PKFONTS
+# PKPATH = $(LOCALDIR)/pk:$(TEXDIR)/fonts/pk
+PKPATH = PKfonts
+
+# the default path to search for VF files (usually omits `.')
+# overridden by the environment variable VFFONTS
+# VFPATH = $(LOCALDIR)/vf:$(TEXDIR)/fonts/vf
+VFPATH = VFfonts
+
+# additional directories in which to search for subdirectories to find
+# both tfm and pk files
+FONTSUBDIRPATH =
+
+# where the config files go
+# CONFIGDIR = $(TEXDIR)/ps
+CONFIGDIR = DVIPSconf
+
+# the default path to search for config files
+# overridden by the environment variable TEXCONFIG
+# CONFIGPATH = .:$(CONFIGDIR)
+CONFIGPATH = DVIPSconf
+
+# the name of your config file
+# CONFIGFILE = config.ps
+CONFIGFILE = config.ps
+
+# where the header PS files go
+# HEADERDIR = $(TEXDIR)/ps
+HEADERDIR = DVIPSconf
+
+# the default path to search for header files
+# HEADERPATH = .:$(HEADERDIR)
+HEADERPATH = DVIPSconf
+
+# where epsf.tex and rotate.tex go (usually the TeX macros directory)
+# TEXMACRODIR = $(TEXDIR)/inputs
+TEXMACRODIR = TeXinputs
+
+# the default path to search for epsf and psfiles
+# (usually the same as TeX's defaultinputpath)
+# FIGPATH = .:..:$(TEXDIR)/inputs
+FIGPATH = .:TeXinputs
+
+# change -DDEFRES=300 or whatever is required
+# if the default resolution is not 300 dpi,
+# add -DDEBUG to turn on debugging capability
+# add -DTPIC for tpic support
+# add -DFONTLIB to search font libraries
+# add -DSEARCH_SUBDIRECTORIES to search the FONTSUBDIRPATH.
+# add -DHAVE_GETCWD if you have getcwd (relevant only for subdir searching)
+# add -DIBM6000 for compiling on IBM 6000 systems
+# add -DCREATIONDATE if your system has a working time() and you want dated files
+# (for VM/CMS, see the MKDVIPS.EXEC file in the vmcms subdirectory).
+#
+# If you define FONTLIB, make sure to also give definitions to
+# FLIPATH and FLINAME.
+#
+# If your compiler doesn't like void*, then add
+# -DVOID=char
+#
+
+# either use
+# OPT = -O -funsigned-char
+# or
+OPT = -g -Wall -funsigned-char
+
+# libraries to include (-lm -lc on most systems)
+#FLIBS= -lNeXT_s -lsys_s
+FLIBS= -lm -lc
+
+# If you are compiling dvips for suid or other privileges, you will
+# definitely want to define the following symbol; else don't.
+# SECURE = -DSECURE
+
+# If you want EMTEX specials, define the following.
+# EMTEX = -DEMTEX
+
+# for SYSV (and friends which use <string.h> instead of <strings.h>)
+# define the c-compiler flag
+# add -D_POSIX_SOURCE if you are POSIX (also define SYSV) (only relevant
+# for subdir searching)
+# SYS = -DSYSV
+
+# Define this to be whatever you use for installation. If you don't have
+# install, use a script that invokes copy and chmod's the files
+# appropriately.
+# INSTALL = install
+INSTALL = install
+
+PATHS = -DTFMPATH=\"$(TFMPATH)\" \
+ -DPKPATH=\"$(PKPATH)\" \
+ -DVFPATH=\"$(VFPATH)\" \
+ -DHEADERPATH=\"$(HEADERPATH)\" \
+ -DCONFIGPATH=\"$(CONFIGPATH)\" \
+ -DCONFIGFILE=\"$(CONFIGFILE)\" \
+ -DFONTSUBDIRPATH=\"$(FONTSUBDIRPATH)\" \
+ -DFIGPATH=\"$(FIGPATH)\"
+
+CFLAGS = $(DEFS) $(OPT) $(SYS) $(SECURE) $(EMTEX) $(DEFPFMT)
+
+SRC = dospecial.c dviinput.c fontdef.c loadfont.c dvips.c tfmload.c \
+ download.c prescan.c scanpage.c skippage.c output.c scalewidth.c \
+ dosection.c dopage.c resident.c search.c unpack.c drawPS.c \
+ header.c makefont.c repack.c virtualfont.c dpicheck.c finclude.c \
+ pprescan.c papersiz.c flib.c color.c bbox.c emspecial.c t1part.c \
+ hps.c
+
+OBJ = dospecial.o dviinput.o fontdef.o loadfont.o dvips.o tfmload.o \
+ download.o prescan.o scanpage.o skippage.o output.o scalewidth.o \
+ dosection.o dopage.o resident.o search.o unpack.o drawPS.o \
+ header.o makefont.o repack.o virtualfont.o dpicheck.o finclude.o \
+ pprescan.o papersiz.o flib.o color.o bbox.o emspecial.o t1part.o \
+ hps.o
+
+all : afm2tfm dvips tex.pro texps.pro texc.pro special.pro finclude.pro \
+ color.pro crop.pro hps.pro
+
+dvips : $(OBJ)
+ $(CC) $(CFLAGS) $(OBJ) $(LIBS) $(FLIBS) -o dvips
+
+dvips.o: dvips.c
+ $(CC) $(CFLAGS) $(PATHS) -c dvips.c
+
+afm2tfm: afm2tfm.c
+ $(CC) $(CFLAGS) -o afm2tfm afm2tfm.c $(LIBS) $(FLIBS)
+
+$(OBJ) : dvips.h debug.h
+flib.o resident.o dvips.o loadfont.o tfmload.o : paths.h
+
+squeeze : squeeze.o
+ $(CC) $(CFLAGS) squeeze.o -o squeeze $(LIBS) $(FLIBS)
+
+tex.pro : tex.lpro squeeze
+ ./squeeze <tex.lpro > tex.pro
+
+texc.pro: texc.lpro squeeze
+ ./squeeze <texc.lpro >texc.pro
+
+texc.lpro: texc.script tex.lpro
+ sh texc.script tex.lpro texc.lpro
+
+texps.pro : texps.lpro squeeze
+ ./squeeze <texps.lpro >texps.pro
+
+special.pro : special.lpro squeeze
+ ./squeeze <special.lpro >special.pro
+
+finclude.pro : finclude.lpro squeeze
+ ./squeeze <finclude.lpro >finclude.pro
+
+color.pro : color.lpro squeeze
+ ./squeeze <color.lpro >color.pro
+
+crop.pro : crop.lpro squeeze
+ ./squeeze <crop.lpro >crop.pro
+
+hps.pro : hps.lpro squeeze
+ ./squeeze <hps.lpro >hps.pro
+
+install : afm2tfm dvips MakeTeXPK \
+ tex.pro texc.pro texps.pro special.pro finclude.pro color.pro \
+ crop.pro hps.pro config.ps psfonts.map epsf.tex rotate.tex \
+ colordvi.tex blackdvi.tex \
+ dvips.tex dvipsmac.tex
+ - mkdir $(BINDIR)
+ - mkdir $(CONFIGDIR)
+ - mkdir $(HEADERDIR)
+ - mkdir $(TEXMACRODIR)
+ $(INSTALL) -c -m 755 afm2tfm $(BINDIR)/afm2tfm
+ $(INSTALL) -c -m 755 dvips $(BINDIR)/dvips
+ $(INSTALL) -c -m 755 MakeTeXPK $(BINDIR)/MakeTeXPK
+ $(INSTALL) -c -m 644 tex.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 texc.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 texps.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 special.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 finclude.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 color.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 crop.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 hps.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 config.ps $(CONFIGDIR)/$(CONFIGFILE)
+ $(INSTALL) -c -m 644 psfonts.map $(CONFIGDIR)
+ $(INSTALL) -c -m 644 epsf.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 rotate.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 colordvi.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 blackdvi.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 dvips.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 dvipsmac.tex $(TEXMACRODIR)
+ - $(INSTALL) -c -m 644 dvips.1 $(MANDIR)
+ - $(INSTALL) -c -m 644 afm2tfm.1 $(MANDIR)
+
+veryclean :
+ rm -f *.o dvips squeeze afm2tfm texc.lpro *.pro *~ *.log *.dvi
+
+clean :
+ rm -f *.o squeeze afm2tfm *~ *.log *.dvi
+
+lint :
+ lint $(DEFS) $(PATHS) $(SRC)
+ lint $(DEFS) squeeze.c
+ lint $(DEFS) afm2tfm.c
diff --git a/systems/unix/tex-fpc/dvipsnk/README b/systems/unix/tex-fpc/dvipsnk/README
new file mode 100644
index 0000000000..06119ad5e1
--- /dev/null
+++ b/systems/unix/tex-fpc/dvipsnk/README
@@ -0,0 +1,33 @@
+Feb 2019
+The files in this directory help to build Tom Rockiki's dvips for TeX-FPC.
+
+Since KPSE does not blend with TeX-FPC, and CTAN only offers KPSE based
+versions of DVIPS, I downloaded the latest release from Stanford:
+ ftp ftp://ftp.cs.stanford.edu/pub/dvips/dvips576.tar.gz
+
+It unpacks in a directory dvips576. Edit Makefile from this directory
+to reflect the default resolution of your printer, the location
+of your binary and "man" directory.
+
+Copy the files afm2tfm.c, Makefile and MakeTeXPK to divps576/dvips/.
+
+See xdvi/README for hints on the man directory.
+
+Create a master directory DVIPSconf if you haven't done so already, goto
+dvips576/dvips, run mk_TeX_dir, mk_MF_dir, and make install.
+
+Edit DVIPSconf/config.ps to reflect paper size and resolution of
+your printer. To make dvips generate missing .pk fonts automatically,
+the resolutions in config.ps and in the mf mode "localfont" must
+agree.
+
+Hint: With an A4 papersize you might want to adjust the origin
+to 1in-3mm,1in+8.8m. This line in config.ps does that:
+O -3mm,8.8mm
+
+This will give you equal left and right margins with Plain TeX's
+predefined \hsize of 6.5in, and therefore the pagenumbers will line up
+nicely on two sided output.
+
+Enjoy,
+Wolfgang
diff --git a/systems/unix/tex-fpc/dvipsnk/afm2tfm.c b/systems/unix/tex-fpc/dvipsnk/afm2tfm.c
new file mode 100644
index 0000000000..7be24734a3
--- /dev/null
+++ b/systems/unix/tex-fpc/dvipsnk/afm2tfm.c
@@ -0,0 +1,1966 @@
+/*
+ * This program converts AFM files to TeX TFM files, and optionally
+ * to TeX VPL files that retain all kerning and ligature information.
+ * Both files make the characters not normally encoded by TeX available
+ * by character codes greater than 127.
+ */
+
+/* (Modified by Don Knuth from Tom Rokicki's pre-VPL version.) */
+/* VM/CMS port by J. Hafner (hafner@almaden.ibm.com), based on
+ * the port by Alessio Guglielmi (guglielmi@ipisnsib.bitnet)
+ * and Marco Prevedelli (prevedelli@ipisnsva.bitnet).
+ * This port is still in test state. No guarantees.
+ * 11/3/92: more corrections to VM/CMS port. Now it looks correct
+ * and will be supported by J. Hafner.
+ *
+ */
+/*
+ * More changes, primarily from Karl Berry, enough for a new version
+ * number to 8.0; 1 December 1996. Note that this version computes
+ * checksums differently (more intelligently).
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#if defined(SYSV) || defined(VMS) || defined(__THINK__) || defined(MSDOS) || defined(OS2) || defined(ATARIST)
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+#include <math.h>
+#ifdef ATARIST
+#include <float.h>
+#endif
+
+/* JLH: added these to make the code easier to read and remove some
+ ascii<->ebcdic dependencies */
+#define ASCII_A 65
+#define ASCII_Z 90
+#define ASCII_a 97
+#define ASCII_z 122
+#define ASCII_0 48
+#define ASCII_9 57
+
+#ifdef VMCMS
+#define interesting lookstr /* for 8 character truncation conflicts */
+#include "dvipscms.h"
+extern FILE *cmsfopen() ;
+extern char ebcdic2ascii[] ;
+extern char ascii2ebcdic[] ;
+#ifdef fopen
+#undef fopen
+#endif
+#define fopen cmsfopen
+#endif
+
+#if defined MSDOS || defined OS2
+#define WRITEBIN "wb"
+#else
+#ifdef VMCMS
+#define WRITEBIN "wb, lrecl=1024, recfm=f"
+#else
+#define WRITEBIN "w"
+#endif
+#endif
+
+#if (defined(MSDOS) && defined(__TURBOC__)) || (defined(OS2) && defined(_MSC_VER))
+#define SMALLMALLOC
+#endif
+
+struct encoding {
+ char *name ;
+ char *vec[256] ;
+} ;
+struct encoding staticencoding = {
+ "TeX text",
+ {"Gamma", "Delta", "Theta", "Lambda", "Xi", "Pi", "Sigma",
+ "Upsilon", "Phi", "Psi", "Omega", "arrowup", "arrowdown", "quotesingle",
+ "exclamdown", "questiondown", "dotlessi", "dotlessj", "grave", "acute",
+ "caron", "breve", "macron", "ring", "cedilla", "germandbls", "ae", "oe",
+ "oslash", "AE", "OE", "Oslash", "space", "exclam", "quotedbl", "numbersign",
+ "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright",
+ "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one",
+ "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon",
+ "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C",
+ "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
+ "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash",
+ "bracketright", "circumflex", "underscore", "quoteleft", "a", "b", "c", "d",
+ "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",
+ "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright",
+ "tilde", "dieresis", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "" } } ;
+/*
+ * It's easier to put this in static storage and parse it as we go
+ * than to build the structures ourselves.
+ */
+char *staticligkern[] = {
+ "% LIGKERN space l =: lslash ; space L =: Lslash ;",
+ "% LIGKERN question quoteleft =: questiondown ;",
+ "% LIGKERN exclam quoteleft =: exclamdown ;",
+ "% LIGKERN hyphen hyphen =: endash ; endash hyphen =: emdash ;",
+ "% LIGKERN quoteleft quoteleft =: quotedblleft ;",
+ "% LIGKERN quoteright quoteright =: quotedblright ;",
+ "% LIGKERN space {} * ; * {} space ; zero {} * ; * {} zero ;",
+ "% LIGKERN one {} * ; * {} one ; two {} * ; * {} two ;",
+ "% LIGKERN three {} * ; * {} three ; four {} * ; * {} four ;",
+ "% LIGKERN five {} * ; * {} five ; six {} * ; * {} six ;",
+ "% LIGKERN seven {} * ; * {} seven ; eight {} * ; * {} eight ;",
+ "% LIGKERN nine {} * ; * {} nine ;",
+/* Kern accented characters the same way as their base. */
+ "% LIGKERN Aacute <> A ; aacute <> a ;",
+ "% LIGKERN Acircumflex <> A ; acircumflex <> a ;",
+ "% LIGKERN Adieresis <> A ; adieresis <> a ;",
+ "% LIGKERN Agrave <> A ; agrave <> a ;",
+ "% LIGKERN Aring <> A ; aring <> a ;",
+ "% LIGKERN Atilde <> A ; atilde <> a ;",
+ "% LIGKERN Ccedilla <> C ; ccedilla <> c ;",
+ "% LIGKERN Eacute <> E ; eacute <> e ;",
+ "% LIGKERN Ecircumflex <> E ; ecircumflex <> e ;",
+ "% LIGKERN Edieresis <> E ; edieresis <> e ;",
+ "% LIGKERN Egrave <> E ; egrave <> e ;",
+ "% LIGKERN Iacute <> I ; iacute <> i ;",
+ "% LIGKERN Icircumflex <> I ; icircumflex <> i ;",
+ "% LIGKERN Idieresis <> I ; idieresis <> i ;",
+ "% LIGKERN Igrave <> I ; igrave <> i ;",
+ "% LIGKERN Ntilde <> N ; ntilde <> n ;",
+ "% LIGKERN Oacute <> O ; oacute <> o ;",
+ "% LIGKERN Ocircumflex <> O ; ocircumflex <> o ;",
+ "% LIGKERN Odieresis <> O ; odieresis <> o ;",
+ "% LIGKERN Ograve <> O ; ograve <> o ;",
+ "% LIGKERN Oslash <> O ; oslash <> o ;",
+ "% LIGKERN Otilde <> O ; otilde <> o ;",
+ "% LIGKERN Scaron <> S ; scaron <> s ;",
+ "% LIGKERN Uacute <> U ; uacute <> u ;",
+ "% LIGKERN Ucircumflex <> U ; ucircumflex <> u ;",
+ "% LIGKERN Udieresis <> U ; udieresis <> u ;",
+ "% LIGKERN Ugrave <> U ; ugrave <> u ;",
+ "% LIGKERN Yacute <> Y ; yacute <> y ;",
+ "% LIGKERN Ydieresis <> Y ; ydieresis <> y ;",
+ "% LIGKERN Zcaron <> Z ; zcaron <> z ;",
+/*
+ * These next are only included for deficient afm files that
+ * have the lig characters but not the lig commands.
+ */
+ "% LIGKERN f i =: fi ; f l =: fl ; f f =: ff ; ff i =: ffi ;",
+ "% LIGKERN ff l =: ffl ;",
+ 0 } ;
+/*
+ * The above layout corresponds to TeX Typewriter Type and is compatible
+ * with TeX Text because the position of ligatures is immaterial.
+ */
+struct encoding *outencoding = 0 ;
+struct encoding *inencoding = 0 ;
+char *outenname, *inenname ;/* the file names for input and output encodings */
+int boundarychar = -1 ; /* the boundary character */
+int ignoreligkern ; /* do we look at ligkern info in the encoding? */
+/*
+ * This is what we store Adobe data in.
+ */
+struct adobeinfo {
+ struct adobeinfo *next ;
+ int adobenum, texnum, width ;
+ char *adobename ;
+ int llx, lly, urx, ury ;
+ struct lig *ligs ;
+ struct kern *kerns ;
+ struct adobeptr *kern_equivs ;
+ struct pcc *pccs ;
+ int wptr, hptr, dptr, iptr ;
+} *adobechars, *adobeptrs[256], *texptrs[256],
+ *uppercase[256], *lowercase[256] ;
+int nexttex[256] ; /* for characters encoded multiple times in output */
+/*
+ * These are the eight ligature ops, in VPL terms and in METAFONT terms.
+ */
+char *vplligops[] = {
+ "LIG", "/LIG", "/LIG>", "LIG/", "LIG/>", "/LIG/", "/LIG/>", "/LIG/>>", 0
+} ;
+char *encligops[] = {
+ "=:", "|=:", "|=:>", "=:|", "=:|>", "|=:|", "|=:|>", "|=:|>>", 0
+} ;
+struct lig {
+ struct lig *next ;
+ char *succ, *sub ;
+ short op, boundleft ;
+} ;
+struct kern {
+ struct kern *next ;
+ char *succ ;
+ int delta ;
+} ;
+struct adobeptr {
+ struct adobeptr *next;
+ struct adobeinfo *ch;
+};
+struct pcc {
+ struct pcc *next ;
+ char * partname ;
+ int xoffset, yoffset ;
+} ;
+
+FILE *afmin, *vplout, *tfmout ;
+char inname[200], outname[200] ; /* names of input and output files */
+char buffer[255]; /* input buffer (modified while parsing) */
+char obuffer[255] ; /* unmodified copy of input buffer */
+char *param ; /* current position in input buffer */
+char *fontname = "Unknown" ;
+char *codingscheme = "Unspecified" ;
+#ifdef VMCMS
+char *ebfontname ;
+char *ebcodingscheme ;
+#endif
+float italicangle = 0.0 ;
+char fixedpitch ;
+char makevpl ;
+char pedantic ;
+int xheight = 400 ;
+int fontspace ;
+int bc, ec ;
+long cksum ;
+float efactor = 1.0, slant = 0.0 ;
+float capheight = 0.8 ;
+char *efactorparam, *slantparam ;
+double newslant ;
+char titlebuf[500] ;
+
+void
+error(s)
+register char *s ;
+{
+ (void)fprintf(stderr, "%s\n", s) ;
+ if (obuffer[0]) {
+ (void)fprintf(stderr, "%s\n", obuffer) ;
+ while (param > buffer) {
+ (void)fprintf(stderr, " ") ;
+ param-- ;
+ }
+ (void)fprintf(stderr, "^\n") ;
+ }
+ if (*s == '!')
+ exit(1) ;
+}
+
+int
+transform(x,y)
+ register int x,y ;
+{
+ register double acc ;
+ acc = efactor * x + slant *y ;
+ return (int)(acc>=0? floor(acc+0.5) : ceil(acc-0.5) ) ;
+}
+
+int
+gaetline() {
+ register char *p ;
+ register int c ;
+
+ param = buffer ;
+ for (p=buffer; (c=getc(afmin)) != EOF && c != '\n';)/* changed 10 to '\n' */
+ *p++ = c ;
+ *p = 0 ;
+ (void)strcpy(obuffer, buffer) ;
+ if (p == buffer && c == EOF)
+ return(0) ;
+ else
+ return(1) ;
+}
+
+char *interesting[] = { "FontName", "ItalicAngle", "IsFixedPitch",
+ "XHeight", "C", "KPX", "CC", "EncodingScheme", NULL} ;
+#define FontName (0)
+#define ItalicAngle (1)
+#define IsFixedPitch (2)
+#define XHeight (3)
+#define C (4)
+#define KPX (5)
+#define CC (6)
+#define EncodingScheme (7)
+#define NONE (-1)
+int
+interest(s)
+char *s ;
+{
+ register char **p ;
+ register int n ;
+
+ for (p=interesting, n=0; *p; p++, n++)
+ if (strcmp(s, *p)==0)
+ return(n) ;
+ return(NONE) ;
+}
+
+char *
+mymalloc(len)
+unsigned long len ;
+{
+ register char *p ;
+ int i ;
+
+#ifdef SMALLMALLOC
+ if (len > 65500L)
+ error("! can't allocate more than 64K!") ;
+#endif
+ p = malloc((unsigned)len) ;
+ if (p==NULL)
+ error("! out of memory") ;
+ for (i=0; i<len; i++)
+ p[i] = 0 ;
+ return(p) ;
+}
+
+char *
+newstring(s)
+char *s ;
+{
+ char *q = mymalloc((unsigned long)(strlen(s) + 1)) ;
+ (void)strcpy(q, s) ;
+ return q ;
+}
+
+char *
+paramnewstring() {
+ register char *p, *q ;
+
+ p = param ;
+ while (*p > ' ')
+ p++ ;
+ if (*p != 0)
+ *p++ = 0 ;
+ q = newstring(param) ;
+ while (*p && *p <= ' ')
+ p++ ;
+ param = p ;
+ return(q) ;
+}
+
+char *
+paramstring() {
+ register char *p, *q ;
+
+ p = param ;
+ while (*p > ' ')
+ p++ ;
+ q = param ;
+ if (*p != 0)
+ *p++ = 0 ;
+ while (*p && *p <= ' ')
+ p++ ;
+ param = p ;
+ return(q) ;
+}
+
+int
+paramnum() {
+ register char *p ;
+ int i ;
+
+ p = paramstring() ;
+ if (sscanf(p, "%d", &i) != 1)
+ error("! integer expected") ;
+ return(i) ;
+}
+
+float
+paramfloat() {
+ register char *p ;
+ float i ;
+
+ p = paramstring() ;
+ if (sscanf(p, "%f", &i) != 1)
+ error("! number expected") ;
+ return(i) ;
+}
+
+struct adobeinfo *
+newchar() {
+ register struct adobeinfo *ai ;
+
+ ai = (struct adobeinfo *)mymalloc((unsigned long)sizeof(struct adobeinfo)) ;
+ ai->adobenum = -1 ;
+ ai->texnum = -1 ;
+ ai->width = -1 ;
+ ai->adobename = NULL ;
+ ai->llx = -1 ;
+ ai->lly = -1 ;
+ ai->urx = -1 ;
+ ai->ury = -1 ;
+ ai->ligs = NULL ;
+ ai->kerns = NULL ;
+ ai->kern_equivs = NULL ;
+ ai->pccs = NULL ;
+ ai->next = adobechars ;
+ adobechars = ai ;
+ return(ai) ;
+}
+
+struct kern *
+newkern() {
+ register struct kern *nk ;
+
+ nk = (struct kern *)mymalloc((unsigned long)sizeof(struct kern)) ;
+ nk->next = NULL ;
+ nk->succ = NULL ;
+ nk->delta = 0 ;
+ return(nk) ;
+}
+
+struct pcc *
+newpcc() {
+ register struct pcc *np ;
+
+ np = (struct pcc *)mymalloc((unsigned long)sizeof(struct pcc)) ;
+ np->next = NULL ;
+ np->partname = NULL ;
+ np->xoffset = 0 ;
+ np->yoffset = 0 ;
+ return(np) ;
+}
+
+struct lig *
+newlig() {
+ register struct lig *nl ;
+
+ nl = (struct lig *)mymalloc((unsigned long)sizeof(struct lig)) ;
+ nl->next = NULL ;
+ nl->succ = NULL ;
+ nl->sub = NULL ;
+ nl->op = 0 ; /* the default =: op */
+ nl->boundleft = 0 ;
+ return(nl) ;
+}
+
+void
+expect(s)
+char *s ;
+{
+ if (strcmp(paramstring(), s) != 0) {
+ (void)fprintf(stderr, "%s expected: ", s) ;
+ error("! syntax error") ;
+ }
+}
+
+void
+handlechar() { /* an input line beginning with C */
+ register struct adobeinfo *ai ;
+ register struct lig *nl ;
+
+ ai = newchar() ;
+ ai->adobenum = paramnum() ;
+ expect(";") ;
+ expect("WX") ;
+ ai->width = transform(paramnum(),0) ;
+ if (ai->adobenum >= 0 && ai->adobenum < 256) {
+ adobeptrs[ai->adobenum] = ai ;
+ }
+ expect(";") ;
+ expect("N") ;
+ ai->adobename = paramnewstring() ;
+ expect(";") ;
+ expect("B") ;
+ ai->llx = paramnum() ;
+ ai->lly = paramnum() ;
+ ai->llx = transform(ai->llx, ai->lly) ;
+ ai->urx = paramnum() ;
+ ai->ury = paramnum() ;
+ ai->urx = transform(ai->urx, ai->ury) ;
+/* We need to avoid negative heights or depths. They break accents in
+ math mode, among other things. */
+ if (ai->lly > 0)
+ ai->lly = 0 ;
+ if (ai->ury < 0)
+ ai->ury = 0 ;
+ expect(";") ;
+/* Now look for ligatures (which aren't present in fixedpitch fonts) */
+ while (*param == 'L' && !fixedpitch) {
+ expect("L") ;
+ nl = newlig() ;
+ nl->succ = paramnewstring() ;
+ nl->sub = paramnewstring() ;
+ nl->next = ai->ligs ;
+ ai->ligs = nl ;
+ expect(";") ;
+ }
+}
+
+struct adobeinfo *
+findadobe(p)
+char *p ;
+{
+ register struct adobeinfo *ai ;
+
+ for (ai=adobechars; ai; ai = ai->next)
+ if (strcmp(p, ai->adobename)==0)
+ return(ai) ;
+ return(NULL) ;
+}
+
+
+/*
+ * The following comment no longer applies; we rely on the LIGKERN
+ * entries to kill space kerns. Also, the same applies to numbers.
+ *
+ * We ignore kerns before and after space characters, because (1) TeX
+ * is using the space only for Polish ligatures, and (2) TeX's
+ * boundarychar mechanisms are not oriented to kerns (they apply
+ * to both spaces and punctuation) so we don't want to use them.
+ */
+void
+handlekern() { /* an input line beginning with KPX */
+ register struct adobeinfo *ai ;
+ register char *p ;
+ register struct kern *nk ;
+
+ p = paramstring() ;
+ ai = findadobe(p) ;
+ if (ai == NULL)
+ error("kern char not found") ;
+ else {
+ nk = newkern() ;
+ nk->succ = paramnewstring() ;
+ nk->delta = transform(paramnum(),0) ;
+ nk->next = ai->kerns ;
+ ai->kerns = nk ;
+ }
+}
+
+void
+handleconstruct() { /* an input line beginning with CC */
+ register struct adobeinfo *ai ;
+ register char *p ;
+ register struct pcc *np ;
+ register int n ;
+ struct pcc *npp = NULL;
+
+ p = paramstring() ;
+ ai = findadobe(p) ;
+ if (ai == NULL)
+ error("! composite character name not found") ;
+ n = paramnum() ;
+ expect(";") ;
+ while (n--) {
+ if (strcmp(paramstring(),"PCC") != 0) return ;
+ /* maybe I should expect("PCC") instead, but I'm playing it safe */
+ np = newpcc() ;
+ np->partname = paramnewstring() ;
+ if (findadobe(np->partname)==NULL) return ;
+ np->xoffset = paramnum() ;
+ np->yoffset = paramnum() ;
+ np->xoffset = transform(np->xoffset, np->yoffset) ;
+ if (npp) npp->next = np ;
+ else ai->pccs = np ;
+ npp = np ;
+ expect(";") ;
+ }
+}
+
+struct encoding *readencoding() ;
+
+void
+makeaccentligs() {
+ register struct adobeinfo *ai, *aci ;
+ register char *p ;
+ register struct lig *nl ;
+ for (ai=adobechars; ai; ai=ai->next) {
+ p = ai->adobename ;
+ if (strlen(p)>2)
+ if ((aci=findadobe(p+1)) && (aci->adobenum > 127)) {
+ nl = newlig() ;
+ nl->succ = mymalloc((unsigned long)2) ;
+ *(nl->succ + 1) = 0 ;
+ *(nl->succ) = *p ;
+ nl->sub = ai->adobename ;
+ nl->next = aci->ligs ;
+ aci->ligs = nl ;
+ }
+ }
+}
+
+void
+readadobe() {
+ struct adobeinfo *ai ;
+#ifdef VMCMS
+ int i;
+#endif
+
+/*
+ * We allocate a placeholder boundary char.
+ */
+ ai = newchar() ;
+ ai->adobenum = -1 ;
+ ai->adobename = "||" ; /* boundary character name */
+ while (gaetline()) {
+ switch(interest(paramstring())) {
+case FontName:
+ fontname = paramnewstring() ;
+#ifdef VMCMS
+/* fontname comes in as ebcdic but we need it asciified for tfm file
+ so we save it in ebfontname and change it in fontname */
+ ebfontname = newstring(fontname) ;
+ i=0;
+ while(fontname[i] != '\0') {
+ fontname[i]=ebcdic2ascii[fontname[i]];
+ i++;
+ };
+#endif
+ break ;
+case EncodingScheme:
+ codingscheme = paramnewstring() ;
+#ifdef VMCMS
+/* for codingscheme, we do the same as we did for fontname */
+ ebcodingscheme = newstring(codingscheme) ;
+ i=0;
+ while(codingscheme[i] != '\0') {
+ codingscheme[i]=ebcdic2ascii[codingscheme[i]];
+ i++;
+ }
+#endif
+ break ;
+case ItalicAngle:
+ italicangle = paramfloat() ;
+ break ;
+case IsFixedPitch:
+ if (*param == 't' || *param == 'T')
+ fixedpitch = 1 ;
+ else
+ fixedpitch = 0 ;
+ break ;
+case XHeight:
+ xheight = paramnum() ;
+ break ;
+case C:
+ handlechar() ;
+ break ;
+case KPX:
+ handlekern() ;
+ break ;
+case CC:
+ handleconstruct() ;
+ break ;
+default:
+ break ;
+ }
+ }
+ fclose(afmin) ;
+ afmin = 0 ;
+}
+/*
+ * Re-encode the adobe font. Assumes that the header file will
+ * also contain the appropriate instructions!
+ */
+void
+handlereencoding() {
+ if (inenname) {
+ int i ;
+ struct adobeinfo *ai ;
+ char *p ;
+
+ ignoreligkern = 1 ;
+ inencoding = readencoding(inenname) ;
+ for (i=0; i<256; i++)
+ if (0 != (ai=adobeptrs[i])) {
+ ai->adobenum = -1 ;
+ adobeptrs[i] = NULL ;
+ }
+ for (i=0; i<256; i++) {
+ p = inencoding->vec[i] ;
+ if (p && *p && 0 != (ai = findadobe(p))) {
+ ai->adobenum = i ;
+ adobeptrs[i] = ai ;
+ }
+ }
+ codingscheme = inencoding->name ;
+ }
+ ignoreligkern = 0 ;
+ if (outenname) {
+ outencoding = readencoding(outenname) ;
+ } else {
+ outencoding = readencoding((char *)0) ;
+ }
+}
+
+/*
+ * This routine reverses a list. We use it because we accumulate the
+ * adobeinfo list in reverse order, but when we go to map the
+ * characters, we would prefer to use the original ordering. It just
+ * makes more sense.
+ */
+struct adobeinfo *revlist(p)
+struct adobeinfo *p ;
+{
+ struct adobeinfo *q = 0, *t ;
+
+ while (p) {
+ t = p->next ;
+ p->next = q ;
+ q = p ;
+ p = t ;
+ }
+ return q ;
+}
+
+void
+assignchars() {
+ register char **p ;
+ register int i, j ;
+ register struct adobeinfo *ai, *pai ;
+ int nextfree = 128 ;
+ struct pcc *pcp ;
+
+/*
+ * First, we assign all those that match perfectly.
+ */
+ for (i=0, p=outencoding->vec; i<256; i++, p++)
+ if ((ai=findadobe(*p)) && (ai->adobenum >= 0 || ai->pccs != NULL)) {
+ if (ai->texnum >= 0)
+ nexttex[i] = ai->texnum ; /* linked list */
+ ai->texnum = i ;
+ texptrs[i] = ai ;
+ }
+ if (pedantic)
+ return ;
+/*
+ * Next, we assign all the others, retaining the adobe positions, possibly
+ * multiply assigning characters. Unless the output encoding was
+ * precisely specified.
+ */
+ for (ai=adobechars; ai; ai=ai->next)
+ if (ai->adobenum >= 0 && ai->texnum < 0 && texptrs[ai->adobenum]==0) {
+ ai->texnum = ai->adobenum ;
+ texptrs[ai->adobenum] = ai ;
+ }
+/*
+ * Finally, we map all remaining characters into free locations beginning
+ * with 128, if we know how to construct those characters. We need to
+ * make sure the component pieces are mapped.
+ */
+ adobechars = revlist(adobechars) ;
+ for (ai=adobechars; ai; ai=ai->next)
+ if (ai->texnum<0 && (ai->adobenum>=0 || ai->pccs != NULL)) {
+ while (texptrs[nextfree]) {
+ nextfree=(nextfree+1)&255 ;
+ if (nextfree==128) goto finishup ; /* all slots full */
+ }
+ ai->texnum = nextfree ;
+ texptrs[nextfree] = ai ;
+ }
+finishup:
+/*
+ * We now check all of the composite characters. If any of the
+ * components are not mapped, we unmap the composite character.
+ */
+ for (i=0; i<256; i++) {
+ ai = texptrs[i] ;
+ if (ai && ai->pccs != NULL && ai->texnum >= 0) {
+ for (pcp = ai->pccs; pcp; pcp = pcp->next) {
+ pai = findadobe(pcp->partname) ;
+ if (pai == NULL || pai->texnum < 0) {
+ texptrs[ai->texnum] = 0 ;
+ ai->texnum = -1 ;
+ break ;
+ }
+ }
+ }
+ }
+/*
+ * Now, if any of the characters are encoded multiple times, we want
+ * ai->texnum to be the first one assigned, since that is most likely
+ * to be the most important one. So we reverse the above lists.
+ */
+ for (ai=adobechars; ai; ai=ai->next)
+ if (ai->texnum >= 0 && ai->texnum < 256) {
+ j = -1 ;
+ while (nexttex[ai->texnum] >= 0) {
+ i = nexttex[ai->texnum] ;
+ nexttex[ai->texnum] = j ;
+ j = ai->texnum ;
+ ai->texnum = i ;
+ }
+ nexttex[ai->texnum] = j ;
+ }
+}
+
+void
+upmap() { /* Compute uppercase mapping, when making a small caps font */
+ register struct adobeinfo *ai, *Ai ;
+ register char *p, *q ;
+ register struct pcc *np, *nq ;
+ int i ;
+ char lwr[50] ;
+
+/* JLH: changed some lines below to be ascii<->ebcdic independent
+ any reason we don't use 'isupper'?.
+ Looks like we should use isupper to me --karl. */
+ for (Ai=adobechars; Ai; Ai=Ai->next) {
+ p = Ai->adobename ;
+ if (isupper (*p)) {
+ q = lwr ;
+ for (; *p; p++)
+ *q++ = tolower (*p);
+ *q = '\0'; /* changed this too! */
+
+ if (0 != (ai=findadobe(lwr))) {
+ for (i = ai->texnum; i >= 0; i = nexttex[i])
+ uppercase[i] = Ai ;
+ for (i = Ai->texnum; i >= 0; i = nexttex[i])
+ lowercase[i] = ai ;
+ }
+ }
+ }
+/* Note that, contrary to the normal true/false conventions,
+ * uppercase[i] is NULL and lowercase[i] is non-NULL when i is the
+ * ASCII code of an uppercase letter; and vice versa for lowercase letters */
+
+ if (0 != (ai=findadobe("germandbls")))
+ if (0 != (Ai=findadobe("S"))) { /* we also construct SS */
+ for (i=ai->texnum; i >= 0; i = nexttex[i])
+ uppercase[i] = ai ;
+ ai->adobenum = -1 ;
+ ai->width = Ai->width << 1 ;
+ ai->llx = Ai->llx ;
+ ai->lly = Ai->lly ;
+ ai->urx = Ai->width + Ai->urx ;
+ ai->ury = Ai->ury ;
+ ai->kerns = Ai->kerns ;
+ np = newpcc() ;
+ np->partname = "S" ;
+ nq = newpcc() ;
+ nq->partname = "S" ;
+ nq->xoffset = Ai->width ;
+ np->next = nq ;
+ ai->pccs = np ;
+ }
+ if ((ai=findadobe("dotlessi")))
+ for (i=ai->texnum; i >= 0; i = nexttex[i])
+ uppercase[i] = findadobe("I") ;
+ if ((ai=findadobe("dotlessj")))
+ for (i=ai->texnum; i >= 0; i = nexttex[i])
+ uppercase[i] = findadobe("J") ;
+}
+/* The logic above seems to work well enough, but it leaves useless characters
+ * like `fi' and `fl' in the font if they were present initially,
+ * and it omits characters like `dotlessj' if they are absent initially */
+
+/* Now we turn to computing the TFM file */
+
+int lf, lh, nw, nh, nd, ni, nl, nk, ne, np ;
+
+void
+write16(what)
+register short what ;
+{
+ (void)fputc(what >> 8, tfmout) ;
+ (void)fputc(what & 255, tfmout) ;
+}
+
+void
+writearr(p, n)
+register long *p ;
+register int n ;
+{
+ while (n) {
+ write16((short)(*p >> 16)) ;
+ write16((short)(*p & 65535)) ;
+ p++ ;
+ n-- ;
+ }
+}
+
+void
+makebcpl(p, s, n)
+register long *p ;
+register char *s ;
+register int n ;
+{
+ register long t ;
+ register long sc ;
+
+ if (strlen(s) < n)
+ n = strlen(s) ;
+ t = ((long)n) << 24 ;
+ sc = 16 ;
+ while (n > 0) {
+ t |= ((long)(*(unsigned char *)s++)) << sc ;
+ sc -= 8 ;
+ if (sc < 0) {
+ *p++ = t ;
+ t = 0 ;
+ sc = 24 ;
+ }
+ n-- ;
+ }
+ *p++ = t ;
+}
+
+int source[257] ;
+int unsort[257] ;
+
+/*
+ * Next we need a routine to reduce the number of distinct dimensions
+ * in a TFM file. Given an array what[0]...what[oldn-1], we want to
+ * group its elements into newn clusters, in such a way that the maximum
+ * difference between elements of a cluster is as small as possible.
+ * Furthermore, what[0]=0, and this value must remain in a cluster by
+ * itself. Data such as `0 4 6 7 9' with newn=3 shows that an iterative
+ * scheme in which 6 is first clustered with 7 will not work. So we
+ * borrow a neat algorithm from METAFONT to find the true optimum.
+ * Memory location what[oldn] is set to 0x7fffffffL for convenience.
+ */
+long nextd ; /* smallest value that will give a different mincover */
+int
+mincover(what,d) /* tells how many clusters result, given max difference d */
+register long d ;
+long *what ;
+{
+ register int m ;
+ register long l ;
+ register long *p ;
+
+ nextd = 0x7fffffffL ;
+ p = what+1 ;
+ m = 1 ;
+ while (*p<0x7fffffffL) {
+ m++ ;
+ l = *p ;
+ while (*++p <= l+d) ;
+ if (*p-l < nextd) nextd = *p-l ;
+ }
+ return (m) ;
+}
+
+void
+remap(what, oldn, newn)
+long *what ;
+int oldn, newn ;
+{
+ register int i, j ;
+ register long d, l ;
+
+ what[oldn] = 0x7fffffffL ;
+ for (i=oldn-1; i>0; i--) {
+ d = what[i] ;
+ for (j=i; what[j+1]<d; j++) {
+ what[j] = what[j+1] ;
+ source[j] = source[j+1] ;
+ }
+ what[j] = d ;
+ source[j] = i ;
+ } /* Tom, don't let me ever catch you using bubblesort again! -- Don */
+
+ i = mincover(what, 0L) ;
+ d = nextd ;
+ while (mincover(what,d+d)>newn) d += d ;
+ while (mincover(what,d)>newn) d = nextd ;
+
+ i = 1 ;
+ j = 0 ;
+ while (i<oldn) {
+ j++ ;
+ l = what[i] ;
+ unsort[source[i]] = j ;
+ while (what[++i] <= l+d) {
+ unsort[source[i]] = j ;
+ if (i-j == oldn-newn) d = 0 ;
+ }
+ what[j] = (l+what[i-1])/2 ;
+ }
+}
+
+long checksum() {
+ int i ;
+ unsigned long s1 = 0, s2 = 0 ;
+ char *p ;
+ struct adobeinfo *ai ;
+
+ for (i=0; i<256; i++)
+ if (0 != (ai=adobeptrs[i])) {
+ s1 = ((s1 << 1) ^ (s1>>31)) ^ ai->width ; /* cyclic left shift */
+ s1 &= 0xffffffff; /* in case we're on a 64-bit machine */
+ for (p=ai->adobename; *p; p++)
+#ifndef VMCMS
+ s2 = (s2 * 3) + *p ;
+#else
+ s2 = (s2 * 3) + ebcdic2ascii[*p] ;
+#endif
+ }
+ s1 = (s1 << 1) ^ s2 ;
+ return s1 ;
+}
+
+/*
+ * The next routine simply scales something.
+ * Input is in 1000ths of an em. Output is in FIXFACTORths of 1000.
+ */
+#define FIXFACTOR (0x100000L) /* 2^{20}, the unit fixnum */
+long
+scale(what)
+long what ;
+{
+ return(((what / 1000) << 20) +
+ (((what % 1000) << 20) + 500) / 1000) ;
+}
+
+long *header, *charinfo, *width, *height, *depth, *ligkern, *kern, *tparam,
+ *italic ;
+long *tfmdata ;
+
+void
+buildtfm() {
+ register int i, j ;
+ register struct adobeinfo *ai ;
+
+ header = tfmdata ;
+ cksum = checksum() ;
+ header[0] = cksum ;
+ header[1] = 0xa00000 ; /* 10pt design size */
+ makebcpl(header+2, codingscheme, 39) ;
+ makebcpl(header+12, fontname, 19) ;
+ lh = 17 ;
+ charinfo = header + lh ;
+
+ for (i=0; i<256 && adobeptrs[i]==NULL; i++) ;
+ bc = i ;
+ for (i=255; i>=0 && adobeptrs[i]==NULL; i--) ;
+ ec = i;
+ if (ec < bc)
+ error("! no Adobe characters") ;
+
+ width = charinfo + (ec - bc + 1) ;
+ width[0] = 0 ;
+ nw++ ;
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=adobeptrs[i])) {
+ width[nw]=ai->width ;
+ for (j=1; width[j]!=ai->width; j++) ;
+ ai->wptr = j ;
+ if (j==nw)
+ nw++ ;
+ }
+ if (nw>256)
+ error("! 256 chars with different widths") ;
+ depth = width + nw ;
+ depth[0] = 0 ;
+ nd = 1 ;
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=adobeptrs[i])) {
+ depth[nd] = -ai->lly ;
+ for (j=0; depth[j]!=-ai->lly; j++) ;
+ ai->dptr = j ;
+ if (j==nd)
+ nd++ ;
+ }
+ if (nd > 16) {
+ remap(depth, nd, 16) ;
+ nd = 16 ;
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=adobeptrs[i]))
+ ai->dptr = unsort[ai->dptr] ;
+ }
+ height = depth + nd ;
+ height[0] = 0 ;
+ nh = 1 ;
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=adobeptrs[i])) {
+ height[nh]=ai->ury ;
+ for (j=0; height[j]!=ai->ury; j++) ;
+ ai->hptr = j ;
+ if (j==nh)
+ nh++ ;
+ }
+ if (nh > 16) {
+ remap(height, nh, 16) ;
+ nh = 16 ;
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=adobeptrs[i]))
+ ai->hptr = unsort[ai->hptr] ;
+ }
+ italic = height + nh ;
+ italic[0] = 0 ;
+ ni = 1 ;
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=adobeptrs[i])) {
+ italic[ni] = ai->urx - ai->width ;
+ if (italic[ni]<0)
+ italic[ni] = 0 ;
+ for (j=0; italic[j]!=italic[ni]; j++) ;
+ ai->iptr = j ;
+ if (j==ni)
+ ni++ ;
+ }
+ if (ni > 64) {
+ remap(italic, ni, 64) ;
+ ni = 64 ;
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=adobeptrs[i]))
+ ai->iptr = unsort[ai->iptr] ;
+ }
+
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=adobeptrs[i]))
+ charinfo[i-bc] = ((long)(ai->wptr)<<24) +
+ ((long)(ai->hptr)<<20) +
+ ((long)(ai->dptr)<<16) +
+ ((long)(ai->iptr)<<10) ;
+
+ ligkern = italic + ni ;
+ nl = 0 ; /* ligatures and kerns omitted from raw Adobe font */
+ kern = ligkern + nl ;
+ nk = 0 ;
+
+ newslant = (double)slant - efactor * tan(italicangle*(3.1415926535/180.0)) ;
+ tparam = kern + nk ;
+ tparam[0] = (long)(FIXFACTOR * newslant + 0.5) ;
+ tparam[1] = scale((long)fontspace) ;
+ tparam[2] = (fixedpitch ? 0 : scale((long)(300*efactor+0.5))) ;
+ tparam[3] = (fixedpitch ? 0 : scale((long)(100*efactor+0.5))) ;
+ tparam[4] = scale((long)xheight) ;
+ tparam[5] = scale((long)(1000*efactor+0.5)) ;
+ np = 6 ;
+}
+
+void
+writesarr(what, len)
+long *what ;
+int len ;
+{
+ register long *p ;
+ int i ;
+
+ p = what ;
+ i = len ;
+ while (i) {
+ *p = scale(*p) ;
+ (void)scale(*p) ; /* need this kludge for some compilers */
+ p++ ;
+ i-- ;
+ }
+ writearr(what, len) ;
+}
+
+void
+writetfm() {
+ lf = 6 + lh + (ec - bc + 1) + nw + nh + nd + ni + nl + nk + ne + np ;
+ write16(lf) ;
+ write16(lh) ;
+ write16(bc) ;
+ write16(ec) ;
+ write16(nw) ;
+ write16(nh) ;
+ write16(nd) ;
+ write16(ni) ;
+ write16(nl) ;
+ write16(nk) ;
+ write16(ne) ;
+ write16(np) ;
+ writearr(header, lh) ;
+ writearr(charinfo, ec-bc+1) ;
+ writesarr(width, nw) ;
+ writesarr(height, nh) ;
+ writesarr(depth, nd) ;
+ writesarr(italic, ni) ;
+ writearr(ligkern, nl) ;
+ writesarr(kern, nk) ;
+ writearr(tparam, np) ;
+}
+
+/* OK, the TFM file is done! Now for our next trick, the VPL file. */
+
+/* For TeX we want to compute a character height that works properly
+ * with accents. The following list of accents doesn't need to be complete. */
+/*
+ * We only do this if the xheight has a reasonable value.
+ * (>50)
+ */
+char *accents[] = { "acute", "tilde", "caron", "dieresis", NULL} ;
+int
+texheight(ai)
+register struct adobeinfo *ai ;
+{
+ register char **p;
+ register struct adobeinfo *aci, *acci ;
+ if (xheight <= 50 || *(ai->adobename + 1)) return (ai->ury) ;
+ /* that was the simple case */
+ for (p=accents; *p; p++) /* otherwise we look for accented letters */
+ if (0 != (aci=findadobe(*p))) {
+ strcpy(buffer,ai->adobename) ;
+ strcat(buffer,*p) ;
+ if (0 != (acci=findadobe(buffer)))
+ return (acci->ury - aci->ury + xheight) ;
+ }
+ return (ai->ury) ;
+}
+
+/* modified tgr to eliminate varargs problems */
+
+#define vout(s) fprintf(vplout, s)
+int level ; /* the depth of parenthesis nesting in VPL file being written */
+void vlevout() {
+ register int l = level ;
+ while (l--) vout(" ") ;
+}
+void vlevnlout() {
+ vout("\n") ;
+ vlevout() ;
+}
+#define voutln(str) {fprintf(vplout,"%s\n",str);vlevout();}
+#define voutln2(f,s) {fprintf(vplout,f,s);vlevnlout();}
+#define voutln3(f,a,b) {fprintf(vplout,f,a,b);vlevnlout();}
+#define voutln4(f,a,b,c) {fprintf(vplout,f,a,b,c);vlevnlout();}
+void
+vleft()
+{
+ level++ ;
+ vout("(") ;
+}
+
+void
+vright()
+{
+ level-- ;
+ voutln(")") ;
+}
+
+int forceoctal = 0 ;
+
+char vcharbuf[6] ;
+char *vchar(c)
+int c ;
+{
+ if (forceoctal == 0 && isalnum (c))
+ (void) sprintf(vcharbuf,"C %c",
+#ifndef VMCMS
+ c) ;
+#else
+ ascii2ebcdic[c]) ;
+#endif
+ else (void) sprintf(vcharbuf,"O %o", (unsigned)c) ;
+ return (vcharbuf) ;
+}
+
+char vnamebuf[100];
+char *vname (c)
+int c;
+{
+ if (!forceoctal && isalnum (c)) {
+ vnamebuf[0] = 0;
+ } else {
+ sprintf (vnamebuf, " (comment %s)", texptrs[c]->adobename);
+ }
+ return vnamebuf;
+}
+
+void
+writevpl()
+{
+ register int i, j, k ;
+ register struct adobeinfo *ai ;
+ register struct lig *nlig ;
+ register struct kern *nkern ;
+ register struct pcc *npcc ;
+ struct adobeinfo *asucc, *asub, *api ;
+ struct adobeptr *kern_eq;
+ int xoff, yoff, ht ;
+ char unlabeled ;
+
+ voutln2("(VTITLE Created by %s)", titlebuf) ;
+ voutln("(COMMENT Please edit that VTITLE if you edit this file)") ;
+ (void)sprintf(obuffer, "TeX-%s%s%s%s", outname,
+ (efactor==1.0? "" : "-E"), (slant==0.0? "" : "-S"),
+ (makevpl==1? "" : "-CSC")) ;
+ if (strlen(obuffer)>19) { /* too long, will retain first 9 and last 10 */
+ register char *p, *q ;
+ for (p = &obuffer[9], q = &obuffer[strlen(obuffer)-10] ; p<&obuffer[19];
+ p++, q++) *p = *q ;
+ obuffer[19] = '\0' ;
+ }
+ voutln2("(FAMILY %s)" , obuffer) ;
+ {
+ char tbuf[300] ;
+ char *base_encoding =
+#ifndef VMCMS
+ codingscheme ;
+#else
+ ebcodingscheme ;
+#endif
+
+ if (strcmp (outencoding->name, base_encoding) == 0) {
+ sprintf(tbuf, "%s", outencoding->name);
+ } else {
+ sprintf(tbuf, "%s + %s", base_encoding, outencoding->name);
+ }
+
+ if (strlen(tbuf) > 39) {
+ error("Coding scheme too long; shortening to 39 characters.") ;
+ tbuf[39] = 0 ;
+ }
+ voutln2("(CODINGSCHEME %s)", tbuf) ;
+ }
+ voutln("(DESIGNSIZE R 10.0)") ;
+ voutln("(DESIGNUNITS R 1000)") ;
+ voutln("(COMMENT DESIGNSIZE (1 em) IS IN POINTS)") ;
+ voutln("(COMMENT OTHER DIMENSIONS ARE MULTIPLES OF DESIGNSIZE/1000)") ;
+ /* Let vptovf compute the checksum. */
+ /* voutln2("(CHECKSUM O %lo)",cksum ^ 0xffffffff) ; */
+ if (boundarychar >= 0)
+ voutln2("(BOUNDARYCHAR O %lo)", (unsigned long)boundarychar) ;
+ vleft() ; voutln("FONTDIMEN") ;
+ if (newslant)
+ voutln2("(SLANT R %f)", newslant) ;
+ voutln2("(SPACE D %d)", fontspace) ;
+ if (! fixedpitch) {
+ voutln2("(STRETCH D %d)", transform(200,0)) ;
+ voutln2("(SHRINK D %d)", transform(100,0)) ;
+ }
+ voutln2("(XHEIGHT D %d)", xheight) ;
+ voutln2("(QUAD D %d)", transform(1000,0)) ;
+ voutln2("(EXTRASPACE D %d)", fixedpitch ? fontspace : transform(111, 0)) ;
+ vright() ;
+ vleft() ; voutln("MAPFONT D 0");
+ voutln2("(FONTNAME %s)", outname) ;
+ /* voutln2("(FONTCHECKSUM O %lo)", (unsigned long)cksum) ; */
+ vright() ;
+ if (makevpl>1) {
+ vleft() ; voutln("MAPFONT D 1");
+ voutln2("(FONTNAME %s)", outname) ;
+ voutln2("(FONTAT D %d)", (int)(1000.0*capheight+0.5)) ;
+ /* voutln2("(FONTCHECKSUM O %lo)", (unsigned long)cksum) ; */
+ vright() ;
+ }
+
+ for (i=0; i<256 && texptrs[i]==NULL; i++) ;
+ bc = i ;
+ for (i=255; i>=0 && texptrs[i]==NULL; i--) ;
+ ec = i;
+
+ vleft() ; voutln("LIGTABLE") ;
+ ai = findadobe("||") ;
+ unlabeled = 1 ;
+ for (nlig=ai->ligs; nlig; nlig=nlig->next)
+ if (0 != (asucc=findadobe(nlig->succ))) {
+ if (0 != (asub=findadobe(nlig->sub)))
+ if (asucc->texnum>=0)
+ if (asub->texnum>=0) {
+ if (unlabeled) {
+ voutln("(LABEL BOUNDARYCHAR)") ;
+ unlabeled = 0 ;
+ }
+ for (j = asucc->texnum; j >= 0; j = nexttex[j]) {
+ voutln4("(%s %s O %o)", vplligops[nlig->op],
+ vchar(j), (unsigned)asub->texnum) ;
+ }
+ }
+ }
+ if (! unlabeled) voutln("(STOP)") ;
+ for (i=bc; i<=ec; i++)
+ if ((ai=texptrs[i]) && ai->texnum == i) {
+ unlabeled = 1 ;
+ if (uppercase[i]==NULL) /* omit ligatures from smallcap lowercase */
+ for (nlig=ai->ligs; nlig; nlig=nlig->next)
+ if (0 != (asucc=findadobe(nlig->succ)))
+ if (0 != (asub=findadobe(nlig->sub)))
+ if (asucc->texnum>=0)
+ if (asub->texnum>=0) {
+ if (unlabeled) {
+ for (j = ai->texnum; j >= 0; j = nexttex[j])
+ voutln3("(LABEL %s)%s", vchar(j), vname(j)) ;
+ unlabeled = 0 ;
+ }
+ for (j = asucc->texnum; j >= 0; j = nexttex[j]) {
+ voutln4("(%s %s O %o)", vplligops[nlig->op],
+ vchar(j), (unsigned)asub->texnum) ;
+ if (nlig->boundleft)
+ break ;
+ }
+ }
+ for (nkern = (uppercase[i] ? uppercase[i]->kerns : ai->kerns);
+ nkern; nkern=nkern->next)
+ if (0 != (asucc=findadobe(nkern->succ)))
+ for (j = asucc->texnum; j >= 0; j = nexttex[j]) {
+ if (uppercase[j]==NULL) {
+ if (unlabeled) {
+ for (k = ai->texnum; k >= 0; k = nexttex[k])
+ voutln3("(LABEL %s)%s", vchar(k), vname(k)) ;
+ unlabeled = 0 ;
+ }
+ /* If other characters have the same kerns as this
+ one, output the label here. This makes the TFM
+ file much smaller than if we output all the
+ kerns again under a different label. */
+ for (kern_eq = ai->kern_equivs; kern_eq;
+ kern_eq = kern_eq->next) {
+ k = kern_eq->ch->texnum;
+ if (k >= 0 && k < 256)
+ voutln3("(LABEL %s)%s", vchar(k), vname(k)) ;
+ }
+ ai->kern_equivs = 0; /* Only output those labels once. */
+ if (uppercase[i]) {
+ if (lowercase[j]) {
+ for (k=lowercase[j]->texnum; k >= 0; k = nexttex[k])
+ voutln4("(KRN %s R %.1f)%s", vchar(k),
+ capheight*nkern->delta, vname(k)) ;
+ } else voutln4("(KRN %s R %.1f)%s",
+ vchar(j), capheight*nkern->delta, vname(j)) ;
+ } else {
+ voutln4("(KRN %s R %d)%s", vchar(j),
+ nkern->delta, vname(j)) ;
+ if (lowercase[j])
+ for (k=lowercase[j]->texnum; k >= 0; k = nexttex[k])
+ voutln4("(KRN %s R %.1f)%s", vchar(k),
+ capheight*nkern->delta, vname(k)) ;
+ }
+ }
+ }
+ if (! unlabeled) voutln("(STOP)") ;
+ }
+ vright() ;
+
+ for (i=bc; i<=ec; i++)
+ if (0 != (ai=texptrs[i])) {
+ vleft() ; fprintf(vplout, "CHARACTER %s", vchar(i)) ;
+ if (*vcharbuf=='C') {
+ voutln("") ;
+ } else
+ voutln2(" (comment %s)", ai->adobename) ;
+ if (uppercase[i]) {
+ ai=uppercase[i] ;
+ voutln2("(CHARWD R %.1f)", capheight * (ai->width)) ;
+ if (0 != (ht=texheight(ai)))
+ voutln2("(CHARHT R %.1f)", capheight * ht) ;
+ if (ai->lly)
+ voutln2("(CHARDP R %.1f)", -capheight * ai->lly) ;
+ if (ai->urx > ai->width)
+ voutln2("(CHARIC R %.1f)", capheight * (ai->urx - ai->width)) ;
+ } else {
+ voutln2("(CHARWD R %d)", ai->width) ;
+ if (0 != (ht=texheight(ai)))
+ voutln2("(CHARHT R %d)", ht) ;
+ if (ai->lly)
+ voutln2("(CHARDP R %d)", -ai->lly) ;
+ if (ai->urx > ai->width)
+ voutln2("(CHARIC R %d)", ai->urx - ai->width) ;
+ }
+ if (ai->adobenum != i || uppercase[i]) {
+ vleft() ; voutln("MAP") ;
+ if (uppercase[i]) voutln("(SELECTFONT D 1)") ;
+ if (ai->pccs && ai->adobenum < 0) {
+ xoff = 0 ; yoff = 0 ;
+ for (npcc = ai->pccs; npcc; npcc=npcc->next)
+ if (0 != (api=findadobe(npcc->partname)))
+ if (api->texnum>=0) {
+ if (npcc->xoffset != xoff) {
+ if (uppercase[i]) {
+ voutln2("(MOVERIGHT R %.1f)",
+ capheight * (npcc->xoffset - xoff)) ;
+ } else voutln2("(MOVERIGHT R %d)",
+ npcc->xoffset - xoff) ;
+ xoff = npcc->xoffset ;
+ }
+ if (npcc->yoffset != yoff) {
+ if (uppercase[i]) {
+ voutln2("(MOVEUP R %.1f)",
+ capheight * (npcc->yoffset - yoff)) ;
+ } else voutln2("(MOVEUP R %d)",
+ npcc->yoffset - yoff) ;
+ yoff = npcc->yoffset ;
+ }
+ voutln2("(SETCHAR O %o)", (unsigned)api->adobenum) ;
+ xoff += texptrs[api->texnum]->width ;
+ }
+ } else voutln2("(SETCHAR O %o)", (unsigned)ai->adobenum) ;
+ vright() ;
+ }
+ vright() ;
+ }
+ if (level) error("! I forgot to match the parentheses") ;
+}
+
+void usage(f)
+FILE *f ;
+{
+ (void)fprintf(f,
+ "afm2tfm 8.1, Copyright 1990-97 by Radical Eye Software\n") ;
+ (void)fprintf(f,
+ "Usage: afm2tfm foo[.afm] [-O] [-u] [-v|-V bar[.vpl]]\n") ;
+ (void)fprintf(f,
+ " [-e expansion] [-s slant] [-c capheight]\n") ;
+ (void)fprintf(f,
+ " [-p|-t|-T encodingfile] [foo[.tfm]]\n") ;
+}
+
+void
+openfiles(argc, argv)
+int argc ;
+char *argv[] ;
+{
+ register int lastext ;
+ register int i ;
+ int arginc ;
+
+ tfmout = (FILE *)NULL ;
+ if (argc == 1) {
+ usage(stdout) ;
+ exit(0) ;
+ }
+
+#if defined(MSDOS) || defined(OS2) || defined(ATARIST)
+ /* Make VPL file identical to that created under Unix */
+ (void)sprintf(titlebuf, "afm2tfm %s", argv[1]) ;
+#else
+#ifdef VMCMS
+ /* Make VPL file identical to that created under Unix */
+ (void)sprintf(titlebuf, "afm2tfm %s", argv[1]) ;
+#else
+ (void)sprintf(titlebuf, "%s %s", argv[0], argv[1]) ;
+#endif
+#endif
+ (void)strcpy(inname, argv[1]) ;
+ lastext = -1 ;
+ for (i=0; inname[i]; i++)
+ if (inname[i] == '.')
+ lastext = i ;
+ else if (inname[i] == '/' || inname[i] == ':')
+ lastext = -1 ;
+ if (lastext == -1) (void)strcat(inname, ".afm") ;
+
+ while (argc>2 && *argv[2]=='-') {
+ arginc = 2 ;
+ i = argv[2][1] ;
+ if (i == '/')
+ i = argv[2][2] - 32 ; /* /a ==> A for VMS */
+ switch (i) {
+case 'V': makevpl++ ;
+case 'v': makevpl++ ;
+ (void)strcpy(outname, argv[3]) ;
+ lastext = -1 ;
+ for (i=0; outname[i]; i++)
+ if (outname[i] == '.')
+ lastext = i ;
+ else if (outname[i] == '/' || outname[i] == ':')
+ lastext = -1 ;
+ if (lastext == -1) (void)strcat(outname, ".vpl") ;
+#ifndef VMCMS
+#ifndef ATARIST
+ if ((vplout=fopen(outname, WRITEBIN))==NULL)
+#else
+ if ((vplout=fopen(outname, "w"))==NULL)
+#endif
+#else
+ if ((vplout=fopen(outname, "w"))==NULL)
+#endif
+ error("! can't open vpl output file") ;
+ break ;
+case 'e': if (sscanf(argv[3], "%f", &efactor)==0 || efactor<0.01)
+ error("! Bad extension factor") ;
+ efactorparam = argv[3] ;
+ break ;
+case 'c':
+ if (sscanf(argv[3], "%f", &capheight)==0 || capheight<0.01)
+ error("! Bad small caps height") ;
+ break ;
+case 's': if (sscanf(argv[3], "%f", &slant)==0)
+ error("! Bad slant parameter") ;
+ slantparam = argv[3] ;
+ break ;
+case 'P':
+case 'p':
+ inenname = argv[3] ;
+ break ;
+case 'T':
+ inenname = outenname = argv[3] ;
+ break ;
+case 't':
+ outenname = argv[3] ;
+ break ;
+case 'O':
+ forceoctal = 1 ;
+ arginc = 1 ;
+ break ;
+case 'u':
+ pedantic = 1 ;
+ arginc = 1 ;
+ break ;
+default: (void)fprintf(stderr, "Unknown option %s %s will be ignored.\n",
+ argv[2], argv[3]) ;
+ }
+ for (i=0; i<arginc; i++) {
+ (void)sprintf(titlebuf + strlen(titlebuf), " %s", argv[2]) ;
+ argv++ ;
+ argc-- ;
+ }
+ }
+
+ if ((afmin=fopen(inname, "r"))==NULL)
+ error("! can't open afm input file") ;
+
+ if (argc>3 || (argc==3 && *argv[2]=='-')) {
+ usage(stderr) ;
+ error("! incorrect usage") ;
+ }
+
+ if (argc == 2) (void)strcpy(outname, inname) ;
+ else (void)strcpy(outname, argv[2]) ;
+
+ lastext = -1 ;
+ for (i=0; outname[i]; i++)
+ if (outname[i] == '.')
+ lastext = i ;
+ else if (outname[i] == '/' || outname[i] == ':' || outname[i] == '\\')
+ lastext = -1 ;
+ if (argc == 2) {
+ outname[lastext] = 0 ;
+ lastext = -1 ;
+ }
+ if (lastext == -1) {
+ lastext = strlen(outname) ;
+ (void)strcat(outname, ".tfm") ;
+ }
+ if (tfmout == NULL && (tfmout=fopen(outname, WRITEBIN))==NULL)
+ error("! can't open tfm output file") ;
+ outname[lastext] = 0 ;
+/*
+ * Now we strip off any directory information, so we only use the
+ * base name in the vf file. We accept any of /, :, or \ as directory
+ * delimiters, so none of these are available for use inside the
+ * base name; this shouldn't be a problem.
+ */
+ for (i=0, lastext=0; outname[i]; i++)
+ if (outname[i] == '/' || outname[i] == ':' || outname[i] == '\\')
+ lastext = i + 1 ;
+ if (lastext)
+ strcpy(outname, outname + lastext) ;
+}
+/*
+ * Some routines to remove kerns that match certain patterns.
+ */
+struct kern *rmkernmatch(k, s)
+struct kern *k ;
+char *s ;
+{
+ struct kern *nkern ;
+
+ while (k && strcmp(k->succ, s)==0)
+ k = k->next ;
+ if (k) {
+ for (nkern = k; nkern; nkern = nkern->next)
+ while (nkern->next && strcmp(nkern->next->succ, s)==0)
+ nkern->next = nkern->next->next ;
+ }
+ return k ;
+}
+/*
+ * Recursive to one level.
+ */
+void rmkern(s1, s2, ai)
+char *s1, *s2 ;
+struct adobeinfo *ai ;
+{
+ if (ai == 0) {
+ if (strcmp(s1, "*") == 0) {
+ for (ai=adobechars; ai; ai = ai->next)
+ rmkern(s1, s2, ai) ;
+ return ;
+ } else {
+ ai = findadobe(s1) ;
+ if (ai == 0)
+ return ;
+ }
+ }
+ if (strcmp(s2, "*")==0)
+ ai->kerns = 0 ; /* drop them on the floor */
+ else
+ ai->kerns = rmkernmatch(ai->kerns, s2) ;
+}
+/* Make the kerning for character S1 equivalent to that for S2.
+ If either S1 or S2 do not exist, do nothing.
+ If S1 already has kerning, do nothing. */
+void
+addkern (s1, s2)
+ char *s1, *s2;
+{
+ struct adobeinfo *ai1 = findadobe (s1);
+ struct adobeinfo *ai2 = findadobe (s2);
+ if (ai1 && ai2 && !ai1->kerns) {
+ /* Put the new one at the head of the list, since order is immaterial. */
+ struct adobeptr *ap
+ = (struct adobeptr *) mymalloc((unsigned long)sizeof(struct adobeptr));
+ ap->next = ai2->kern_equivs;
+ ap->ch = ai1;
+ ai2->kern_equivs = ap;
+ }
+}
+int sawligkern ;
+/*
+ * Reads a ligkern line, if this is one. Assumes the first character
+ * passed is `%'.
+ */
+void checkligkern(s)
+char *s ;
+{
+ char *oparam = param ;
+ char *mlist[5] ;
+ int n ;
+
+ s++ ;
+ while (*s && *s <= ' ')
+ s++ ;
+ if (strncmp(s, "LIGKERN", 7)==0) {
+ sawligkern = 1 ;
+ s += 7 ;
+ while (*s && *s <= ' ')
+ s++ ;
+ param = s ;
+ while (*param) {
+ for (n=0; n<5;) {
+ if (*param == 0)
+ break ;
+ mlist[n] = paramstring() ;
+ if (strcmp(mlist[n], ";") == 0)
+ break ;
+ n++ ;
+ }
+ if (n > 4)
+ error("! too many parameters in lig kern data") ;
+ if (n < 3)
+ error("! too few parameters in lig kern data") ;
+ if (n == 3 && strcmp(mlist[1], "{}") == 0) { /* rmkern command */
+ rmkern(mlist[0], mlist[2], (struct adobeinfo *)0) ;
+ } else if (n == 3 && strcmp(mlist[1], "<>") == 0) { /* addkern */
+ addkern(mlist[0], mlist[2]) ;
+ } else if (n == 3 && strcmp(mlist[0], "||") == 0 &&
+ strcmp(mlist[1], "=") == 0) { /* bc command */
+ struct adobeinfo *ai = findadobe("||") ;
+
+ if (boundarychar != -1)
+ error("! multiple boundary character commands?") ;
+ if (sscanf(mlist[2], "%d", &n) != 1)
+ error("! expected number assignment for boundary char") ;
+ if (n < 0 || n > 255)
+ error("! boundary character number must be 0..255") ;
+ boundarychar = n ;
+ if (ai == 0)
+ error("! internal error: boundary char") ;
+ ai->texnum = n ; /* prime the pump, so to speak, for lig/kerns */
+ } else if (n == 4) {
+ int op = -1 ;
+ struct adobeinfo *ai ;
+
+ for (n=0; encligops[n]; n++)
+ if (strcmp(mlist[2], encligops[n])==0) {
+ op = n ;
+ break ;
+ }
+ if (op < 0)
+ error("! bad ligature op specified") ;
+ if (0 != (ai = findadobe(mlist[0]))) {
+ struct lig *lig ;
+
+ if (findadobe(mlist[2])) /* remove coincident kerns */
+ rmkern(mlist[0], mlist[1], ai) ;
+ if (strcmp(mlist[3], "||") == 0)
+ error("! you can't lig to the boundary character!") ;
+ if (! fixedpitch) { /* fixed pitch fonts get *0* ligs */
+ for (lig=ai->ligs; lig; lig = lig->next)
+ if (strcmp(lig->succ, mlist[1]) == 0)
+ break ; /* we'll re-use this structure */
+ if (lig == 0) {
+ lig = newlig() ;
+ lig->succ = newstring(mlist[1]) ;
+ lig->next = ai->ligs ;
+ ai->ligs = lig ;
+ }
+ lig->sub = newstring(mlist[3]) ;
+ lig->op = op ;
+ if (strcmp(mlist[1], "||")==0) {
+ lig->boundleft = 1 ;
+ if (strcmp(mlist[0], "||")==0)
+ error("! you can't lig boundarychar boundarychar!") ;
+ } else
+ lig->boundleft = 0 ;
+ }
+ }
+ } else
+ error("! bad form in LIGKERN command") ;
+ }
+ }
+ param = oparam ;
+}
+/*
+ * Here we get a token from the AFM file. We parse just as much PostScript
+ * as we expect to find in an encoding file. We allow commented lines and
+ * names like 0, .notdef, _foo_. We do not allow //abc.
+ */
+char smbuffer[100] ; /* for tokens */
+char *gettoken() {
+ char *p, *q ;
+
+ while (1) {
+ while (param == 0 || *param == 0) {
+ if (gaetline() == 0)
+ error("! premature end in encoding file") ;
+ for (p=buffer; *p; p++)
+ if (*p == '%') {
+ if (ignoreligkern == 0)
+ checkligkern(p) ;
+ *p = 0 ;
+ break ;
+ }
+ }
+ while (*param && *param <= ' ')
+ param++ ;
+ if (*param) {
+ if (*param == '[' || *param == ']' ||
+ *param == '{' || *param == '}') {
+ smbuffer[0] = *param++ ;
+ smbuffer[1] = 0 ;
+ return smbuffer ;
+ } else if (*param == '/' || *param == '-' || *param == '_' ||
+ *param == '.' ||
+ ('0' <= *param && *param <= '9') ||
+ ('a' <= *param && *param <= 'z') ||
+ ('A' <= *param && *param <= 'Z')) {
+ smbuffer[0] = *param ;
+ for (p=param+1, q=smbuffer+1;
+ *p == '-' || *p == '_' || *p == '.' ||
+ ('0' <= *p && *p <= '9') ||
+ ('a' <= *p && *p <= 'z') ||
+ ('A' <= *p && *p <= 'Z'); p++, q++)
+ *q = *p ;
+ *q = 0 ;
+ param = p ;
+ return smbuffer ;
+ }
+ }
+ }
+}
+void getligkerndefaults() {
+ int i ;
+
+ for (i=0; staticligkern[i]; i++) {
+ strcpy(buffer, staticligkern[i]) ;
+ strcpy(obuffer, staticligkern[i]) ;
+ param = buffer ;
+ checkligkern(buffer) ;
+ }
+}
+/*
+ * This routine reads in an encoding file, given the name. It returns
+ * the final total structure. It performs a number of consistency checks.
+ */
+struct encoding *readencoding(enc)
+char *enc ;
+{
+ char *p ;
+ int i ;
+ struct encoding *e =
+ (struct encoding *)mymalloc((unsigned long)sizeof(struct encoding)) ;
+
+ sawligkern = 0 ;
+ if (afmin)
+ error("! oops; internal afmin error") ;
+ if (enc) {
+ afmin = fopen(enc, "r") ;
+ param = 0 ;
+ if (afmin == 0)
+ error("! couldn't open that encoding file") ;
+ p = gettoken() ;
+ if (*p != '/' || p[1] == 0)
+ error("! first token in encoding must be literal encoding name") ;
+ e->name = newstring(p+1) ;
+ p = gettoken() ;
+ if (strcmp(p, "["))
+ error("! second token in encoding must be mark ([) token") ;
+ for (i=0; i<256; i++) {
+ p = gettoken() ;
+ if (*p != '/' || p[1] == 0)
+ error("! tokens 3 to 257 in encoding must be literal names") ;
+ e->vec[i] = newstring(p+1) ;
+ }
+ p = gettoken() ;
+ if (strcmp(p, "]"))
+ error("! token 258 in encoding must be make-array (])") ;
+ while (gaetline()) {
+ for (p=buffer; *p; p++)
+ if (*p == '%') {
+ if (ignoreligkern == 0)
+ checkligkern(p) ;
+ *p = 0 ;
+ break ;
+ }
+ }
+ fclose(afmin) ;
+ afmin = 0 ;
+ if (ignoreligkern == 0 && sawligkern == 0)
+ getligkerndefaults() ;
+ } else {
+ e = &staticencoding ;
+ getligkerndefaults() ;
+ }
+ param = 0 ;
+ return e ;
+}
+/*
+ * This routine prints out the line that needs to be added to psfonts.map.
+ */
+void conspsfonts() {
+ (void)printf("%s %s", outname,
+#ifndef VMCMS
+ fontname) ;
+#else /* VM/CMS: fontname is ascii, so we use ebfontname */
+ ebfontname) ;
+#endif
+ if (slantparam || efactorparam || inenname) {
+ (void)printf(" \"") ;
+ if (slantparam)
+ (void)printf(" %s SlantFont", slantparam) ;
+ if (efactorparam)
+ (void)printf(" %s ExtendFont", efactorparam) ;
+ if (inenname)
+ (void)printf(" %s ReEncodeFont", inencoding->name) ;
+ (void)printf(" \"") ;
+ if (inenname)
+ (void)printf(" <%s", inenname) ;
+ }
+ (void)printf("\n") ;
+}
+#ifndef VMS
+int
+#endif
+main(argc, argv)
+int argc ;
+char *argv[] ;
+{
+ int i ;
+
+ for (i=0; i<256; i++)
+ nexttex[i] = -1 ; /* encoding chains have length 0 */
+ tfmdata = (long *)mymalloc((unsigned long)40000L) ;
+ openfiles(argc, argv) ;
+ readadobe() ;
+ if (fontspace == 0) {
+ struct adobeinfo *ai ;
+
+ if (0 != (ai = findadobe("space")))
+ fontspace = ai->width ;
+ else if (adobeptrs[32])
+ fontspace = adobeptrs[32]->width ;
+ else
+ fontspace = transform(500, 0) ;
+ }
+ handlereencoding() ;
+ buildtfm() ;
+ writetfm() ;
+ conspsfonts() ;
+ if (makevpl) {
+ assignchars() ;
+ if (makevpl>1) upmap() ;
+ writevpl() ;
+ }
+ exit(0) ;
+ /*NOTREACHED*/
+}
diff --git a/systems/unix/tex-fpc/dvipsnk/dvipsmanfonts b/systems/unix/tex-fpc/dvipsnk/dvipsmanfonts
new file mode 100644
index 0000000000..aa55b0d360
--- /dev/null
+++ b/systems/unix/tex-fpc/dvipsnk/dvipsmanfonts
@@ -0,0 +1,61 @@
+# This script builds and installs .pk fonts for dvips.tex
+rm -f trouble # clean list of trouble makeing fonts
+mkpkfont logo10 magstep0.5
+mkpkfont cminch magstep0.5
+mkpkfont cmbx10 '2.272*magstep0.5'
+mkpkfont cmbx10 '1.577*magstep0.5'
+mkpkfont cmbx10 '1.315*magstep0.5'
+mkpkfont cmr7 magstep4.5 # for titles
+mkpkfont cmtt10 magstep2.5
+mkpkfont cmssbx10 magstep2.5
+mkpkfont ../lib/manfnt magstep 0.5
+mkpkfont cmr10 magstep0.5 # roman text
+mkpkfont cmr9 magstep0.5
+mkpkfont cmr8 magstep0.5
+mkpkfont cmr7 magstep0.5
+mkpkfont cmr6 magstep0.5
+mkpkfont cmr5 magstep0.5
+mkpkfont cmmi10 magstep0.5 # math italic
+mkpkfont cmmi9 magstep0.5
+mkpkfont cmmi8 magstep0.5
+mkpkfont cmmi7 magstep0.5
+mkpkfont cmmi6 magstep0.5
+mkpkfont cmmi5 magstep0.5
+mkpkfont cmsy10 magstep0.5 # math symbols
+mkpkfont cmsy9 magstep0.5
+mkpkfont cmsy8 magstep0.5
+mkpkfont cmsy7 magstep0.5
+mkpkfont cmsy6 magstep0.5
+mkpkfont cmsy5 magstep0.5
+mkpkfont cmex10 magstep0.5 # math extension
+mkpkfont cmss10 magstep0.5 # sans serif
+mkpkfont cmssq8 magstep0.5
+mkpkfont cmssi10 magstep0.5 # sans serif italic
+mkpkfont cmssqi8 magstep0.5
+mkpkfont cmbx10 magstep0.5 # boldface extended
+mkpkfont cmbx9 magstep0.5
+mkpkfont cmbx8 magstep0.5
+mkpkfont cmbx7 magstep0.5
+mkpkfont cmbx6 magstep0.5
+mkpkfont cmbx5 magstep0.5
+mkpkfont cmtt10 magstep0.5 # typewriter
+mkpkfont cmtt9 magstep0.5
+mkpkfont cmtt8 magstep0.5
+mkpkfont cmsltt10 magstep0.5 # slanted typewriter
+mkpkfont cmsl10 magstep0.5 # slanted roman
+mkpkfont cmsl9 magstep0.5
+mkpkfont cmsl8 magstep0.5
+mkpkfont cmti10 magstep0.5 # text italic
+mkpkfont cmti9 magstep0.5
+mkpkfont cmti8 magstep0.5
+mkpkfont cmti7 magstep0.5
+mkpkfont cmu10 magstep0.5 # unslanted text italic
+mkpkfont cmmib10 magstep0.5 # bold math italic
+mkpkfont cmbsy10 magstep0.5 # bold math symbols
+mkpkfont cmcsc10 magstep0.5 # caps and small caps
+mkpkfont cmssbx10 magstep0.5 # sans serif bold extended
+mkpkfont cmdunh10 magstep0.5 # Dunhill style
+mkfont cmtex10
+mkfont cminch
+mkfont cmssdc10 4
+mkpkfont cmr5 2
diff --git a/systems/unix/tex-fpc/lib/webmac-fpc.tex b/systems/unix/tex-fpc/lib/webmac-fpc.tex
new file mode 100644
index 0000000000..92ee9c8aef
--- /dev/null
+++ b/systems/unix/tex-fpc/lib/webmac-fpc.tex
@@ -0,0 +1,16 @@
+% TeX-FPC extensions to WEB macros
+\def\namefpc{$\hbox{\name}{}_{\fam0 FPC}$}
+\def\TeXfpc{\TeX$_{\fam0 FPC}$}
+\def\address{{\parindent0pt\sl
+ March 2019
+
+ Wolfgang Helbig, Programmierer\hfill
+
+ Waiblingen, Baden-\kern-1.4pt W\"urttemberg\hfill
+ \.{helbig@mailbox.org}
+}}
+\def\title{\namefpc}
+
+\def\hint{For hints on how to install and use this program, see
+the readme file in the \TeXfpc\ distribution and the \.{WEB} manual
+in Knuth's distribution (\.{webman.tex}).}
diff --git a/systems/unix/tex-fpc/license b/systems/unix/tex-fpc/license
new file mode 100644
index 0000000000..1783216cf9
--- /dev/null
+++ b/systems/unix/tex-fpc/license
@@ -0,0 +1,21 @@
+Copyright (c) Wolfgang Helbig, All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/systems/unix/tex-fpc/mf/mf.ch b/systems/unix/tex-fpc/mf/mf.ch
new file mode 100644
index 0000000000..33f19ab49b
--- /dev/null
+++ b/systems/unix/tex-fpc/mf/mf.ch
@@ -0,0 +1,631 @@
+% This is a change file of Metafont for FPC, Wolfgang Helbig, Nov. 2007
+[0] to print changed sections only
+@x
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+@y
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+\input webmac-fpc
+\emergencystretch 0.5in % avoid overfull boxes
+
+\let\maybe=\iffalse % print changed modules only.
+
+\def\name{\MF}
+
+\N0\*. \[0] About \namefpc.
+
+This is an adaption of Donald~E. Knuth's \MF, version 2.7182815
+from January 2014, to Unix. It is based on GNU~Pascal, version 2.1.
+
+The features added include treating the command line as the first
+input line and invoking a system editor, in this case \.{vi}, to
+let the user correct the input file.
+On exit, \namefpc\ passes its `history' to the operating system.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+\fi
+@z
+
+[2] Change the banner line
+@x
+@d banner=='This is METAFONT, Version 2.7182818' {printed when \MF\ starts}
+@y
+@d banner=='This is METAFONT-FPC' {printed when \MF\ starts}
+@z
+
+[4] terminal output and input
+@x
+@^system dependencies@>
+
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@y
+@^system dependencies@>
+
+@d term_in==i@&n@&p@&u@&t
+@d term_out==o@&u@&t@&p@&u@&t
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@z
+
+[4] terminal output and input
+@x
+program MF; {all file names are defined dynamically}
+@y
+program MF(@!term_in,@!term_out);
+{all other file names are defined dynamically}
+@z
+
+Since @x, @y, and @z only define a change block when they begin a
+line, you deactivate a block by indenting it (shift right) and
+activate it by unindenting it (shift left). With vi set the
+cursor to the @x line and enter >} or <} to (un)indent a paragraph.
+
+[7] shift left to turn debugging on, right to turn it off
+@x
+@d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+@d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+@y
+@d debug== {change this to `$\\{debug}\equiv\.{@@\{}$' when not debugging}
+@d gubed== {change this to `$\\{gubed}\equiv\.{@@\}}$' when not debugging}
+@z
+
+[7] shift left to turn on statistics, shift rigth to turn off statistics
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
+
+ [8] shift left to build MF and right it to build INIMF.
+ @x inimf
+ @d init== {change this to `$\\{init}\equiv\.{@@\{}$' in the production version}
+ @d tini== {change this to `$\\{tini}\equiv\.{@@\}}$' in the production version}
+ @y
+ @d init==@{
+ @d tini==@}
+ @z
+
+[9] compiler directives, turn off I/O checking.
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$I-@} {no I/O checking}
+@{@&$M@&O@&D@&E I@&S@&O@}
+@z
+
+[10] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+ else {default for cases not listed explicitly}
+@z
+
+Shift left all `trap' blocks to prepare for TRAP.
+Shift right all `part' blocks to prepare for TRAP.
+[11]
+@x part
+@!mem_max=30000; {greatest index in \MF's internal |mem| array;
+@y
+@!mem_max=35000; {increased for ibycus4,
+ greatest index in \MF's internal |mem| array;
+@z
+
+[11]
+@x part
+@!max_strings=2000; {maximum number of strings; must not exceed |max_halfword|}
+@y
+@!max_strings=6000; {maximum number of strings; increased for ibycus4}
+@z
+
+@x part
+@!pool_size=32000; {maximum number of characters in strings, including all
+@y
+@!pool_size=60000; {increased for ibycus4,
+ maximum number of characters in strings, including all
+@z
+
+[11]
+ @x trap
+ @!mem_max=30000; {greatest index in \MF's internal |mem| array;
+ @y
+ @!mem_max=3000; {greatest index in \MF's internal |mem| array;
+ @z
+
+[11]
+ @x trap
+ @!error_line=72; {width of context lines on terminal error messages}
+ @!half_error_line=42; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=79; {width of longest text lines output; should be at least 60}
+ @!screen_width=768; {number of pixels in each row of screen display}
+ @!screen_depth=1024; {number of pixels in each column of screen display}
+ @y
+ @!error_line=64; {width of context lines on terminal error messages}
+ @!half_error_line=32; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=72; {width of longest text lines output; should be at least 60}
+ @!screen_width=100; {number of pixels in each row of screen display}
+ @!screen_depth=200; {number of pixels in each column of screen display}
+ @z
+
+[11]
+ @x trap
+ @!gf_buf_size=800; {size of the output buffer, must be a multiple of 8}
+ @y
+ @!gf_buf_size=8; {size of the output buffer, must be a multiple of 8}
+ @z
+
+[11] location of pool file
+@x
+@!pool_name='MFbases:MF.POOL ';
+@y
+@!pool_name='MFbases/mf.pool';
+@z
+
+
+[12]
+@x part
+@d mem_top==30000 {largest index in the |mem| array dumped by \.{INIMF};
+@y
+@d mem_top==35000 {largest index in the |mem| array dumped by \.{INIMF};
+@z
+
+ [12]
+ @x trap
+ @d mem_top==30000 {largest index in the |mem| array dumped by \.{INIMF};
+ @y
+ @d mem_top==3000 {largest index in the |mem| array dumped by \.{INIMF};
+ @z
+
+[12] Silvio levy' greek fonts need more opened input files.
+@x
+@d max_in_open=6 {maximum number of input files and error insertions that
+@y
+@d max_in_open=10 {maximum number of input files and error insertions that
+@z
+
+[22] accept tab and formfeed
+@x
+for i:=0 to @'37 do xchr[i]:=' ';
+@y
+for i:=0 to @'37 do xchr[i]:=' ';
+xchr[@'11] := chr(@'11); {accept horizontal tab}
+xchr[@'14] := chr(@'14); {accept form feed}
+@z
+
+[24] the type of text_files is text in ISO Pascal
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@!alpha_file=packed file of text_char; {files that contain textual data}
+@y
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@!alpha_file=t@&e@&x@&t; {coding trick is needed since |text| is a macro}
+@z
+
+[26] dynamic io
+@x
+@d reset_OK(#)==erstat(#)=0
+@d rewrite_OK(#)==erstat(#)=0
+@y
+@d fpc_io_result==i@&o@&r@&e@&s@&u@&l@&t
+@d fpc_assign==a@&s@&s@&i@&g@&n
+@d reset_OK(#)==fpc_io_result=0
+@d rewrite_OK(#)==fpc_io_result=0
+@d clear_io_result==@+if fpc_io_result=0 then do_nothing
+@z
+
+[26] opening for in- and output for all three file types
+alpha in
+@x
+begin reset(f,name_of_file,'/O'); a_open_in:=reset_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file);reset(f);
+a_open_in:=reset_OK(f);
+@z
+
+[26]
+alpha out
+@x
+begin rewrite(f,name_of_file,'/O'); a_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+a_open_out:=rewrite_OK(f);
+@z
+
+[26] byte out
+@x
+begin rewrite(f,name_of_file,'/O'); b_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+b_open_out:=rewrite_OK(f);
+@z
+
+[26] word in
+@x
+begin reset(f,name_of_file,'/O'); w_open_in:=reset_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); reset(f);
+w_open_in:=reset_OK(f);
+@z
+
+[26] word out
+@x
+begin rewrite(f,name_of_file,'/O'); w_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+w_open_out:=rewrite_OK(f);
+@z
+
+[30] eoln handling
+@x
+@p function input_ln(var @!f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var @!last_nonblank:0..buf_size; {|last| with trailing blanks removed}
+begin if bypass_eoln then if not eof(f) then get(f);
+ {input the first character of the line into |f^|}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin last_nonblank:=first;
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ if buffer[last-1]<>" " then last_nonblank:=last;
+ end;
+ last:=last_nonblank; input_ln:=true;
+ end;
+end;
+@y
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+begin
+ {ignore |bypass_eoln|. Assuming |f| being positioned at the first character}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then begin
+ read_ln(f); {complete the current line}
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ end;
+ get(f); {Advance |f| to the first character of the next line}
+ input_ln:=true;
+ end;
+end;
+@z
+
+[31] term_in and term_out are the standard pascal files
+@x
+is considered an output file the file variable is |term_out|.
+@^system dependencies@>
+
+@<Glob...@>=
+@!term_in:alpha_file; {the terminal as an input file}
+@!term_out:alpha_file; {the terminal as an output file}
+@y
+is considered an output file the file variable is |term_out|.
+The file |term_in| is declared as \\{input} and |term_out| as
+\\{output} in the program header.
+@^system dependencies@>
+@z
+
+[32]
+@x
+@d t_open_in==reset(term_in,'TTY:','/O/I') {open the terminal for text input}
+@d t_open_out==rewrite(term_out,'TTY:','/O')
+ {open the terminal for text output}
+@y
+@d t_open_in==do_nothing {open the terminal for text input}
+@d t_open_out==do_nothing {open the terminal for text output}
+@z
+
+[33]
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@d clear_terminal == break_in(term_in,true) {clear the terminal input buffer}
+@y
+@d update_terminal == do_nothing {empty the terminal output buffer}
+@d clear_terminal == do_nothing {clear the terminal input buffer}
+@z
+
+@x
+ begin write_ln(term_out,'Buffer size exceeded!'); goto final_end;
+@y
+ begin write_ln(term_out,'Buffer size exceeded!'); fpc_halt(3);
+@z
+
+[35] command line
+@x
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@y
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@d fpc_string == r@&a@&w@&b@&y@&t@&e@&s@&t@&r@&i@&n@&g
+@d fpc_length==l @& e @& n @& g @& t @& h
+@d fpc_param_count==p @& a @& r @& a @& m @& c @& o @& u @& n @& t
+@d fpc_param_str==p @& a @& r @& a @& m @&s @& t @& r
+ {FPC function returning the length of a |fpc_string|}
+
+@p procedure input_command_ln; {get the command line in |buffer|}
+var argc: integer; {argument counter}
+ arg: fpc_string; {argument}
+ cc: integer; {character counter in argument}
+begin last := first; argc := 1;
+while argc <= fpc_param_count do
+ begin cc := 1; arg := fpc_param_str(argc); incr(argc);
+ while cc <= fpc_length(arg) do
+ begin
+ if last+1>=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ buffer[last] := xord[arg[cc]]; incr(last); incr(cc);
+ end;
+ if (argc <= fpc_param_count) then begin
+ buffer[last] := " "; incr(last);
+ end;
+ end;
+end;
+@z
+
+[36] command line
+@x
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in;
+loop@+begin wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in,true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ loc:=first;
+ while (loc<last)and(buffer[loc]=" ") do incr(loc);
+ if loc<last then
+ begin init_terminal:=true;
+ return; {return unless the line was all blank}
+ end;
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+exit:end;
+@y
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in; input_command_ln;
+while first=last do begin
+ wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in, true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write_ln(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ if first=last then
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+loc := first; {trim leading spaces}
+while buffer[loc]=" " do incr(loc);
+init_terminal:=true;
+exit: end;
+@z
+
+[199] character class for tab and lf
+@x
+for k:=127 to 255 do char_class[k]:=invalid_class;
+@y
+for k:=127 to 255 do char_class[k]:=invalid_class;
+char_class[@'11] := space_class;
+char_class[@'14] := space_class;
+@z
+
+[326]
+@x
+@d valid_range(#)==(abs(#-4096)<4096) {is |#| strictly between 0 and 8192?}
+@y
+@d valid_range(#)==(abs(int(#-4096))<4096) {is |#| strictly between 0 and 8192?}
+@z
+[564]
+ @x trap
+ begin init_screen:=false;
+ @y
+ begin init_screen:=true;
+ @z
+
+[679] spurious empty line on terminal
+@x
+ print_ln; first:=start;
+ prompt_input("*"); {input on-line into |buffer|}
+@y
+@.Please type...@>
+ print_nl("");
+ first:=start; {avoid empty lines on terminal and log file}
+ prompt_input("*"); {input on-line into |buffer|}
+@z
+
+[769] Path separator in Unix
+@x
+@d MF_area=="MFinputs:"
+@y
+@d MF_area=="MFinputs/"
+@z
+
+[771]
+@x
+else begin if (c=">")or(c=":") then
+@y
+else begin if c="/" then
+@z
+
+[774]
+@x
+@d append_to_name(#)==begin c:=#; incr(k);
+@y
+@d fpc_set_length==s@&e@&t@&l@&e@&n@&g@&t@&h
+@d append_to_name(#)==begin c:=#; incr(k);
+@z
+
+[774]
+@x
+@!j:pool_pointer; {index into |str_pool|}
+@y
+@!j:pool_pointer; {index into |str_pool|}
+rbs: fpc_string;
+@z
+
+[774]
+@x
+for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
+@y
+rbs := name_of_file;
+fpc_set_length(rbs, name_length);
+name_of_file := rbs;
+@z
+
+[776]
+@x
+MF_base_default:='MFbases:plain.base';
+@y
+MF_base_default:='MFbases/plain.base';
+@z
+
+[778]
+@x
+@!j:integer; {index into |buffer| or |MF_base_default|}
+@y
+@!j:integer; {index into |buffer| or |MF_base_default|}
+rbs: fpc_string;
+@z
+
+[778]
+@x
+for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
+@y
+rbs := name_of_file;
+fpc_set_length(rbs, name_length);
+name_of_file := rbs;
+@z
+
+[1199]
+@x
+undump_int(x);@+if (x<>69069)or eof(base_file) then goto off_base
+@y
+undump_int(x);@+if (x<>69069) then goto off_base
+@z
+
+[1204]
+@x
+@p begin @!{|start_here|}
+@y
+@d fpc_halt == h@&a@&l@&t
+
+@p begin @!{|start_here|}
+@z
+
+[1204] load the base file before printing the banner line
+@x
+start_of_MF: @<Initialize the output routines@>;
+@y
+start_of_MF: @<Preload the default base file@>;
+@<Initialize the output routines@>;
+@z
+
+[1205] print last end-of-line marker if needed
+@x
+if log_opened then
+ begin wlog_cr;
+ a_close(log_file); selector:=selector-2;
+ if selector=term_only then
+ begin print_nl("Transcript written on ");
+@.Transcript written...@>
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+end;
+@y
+if log_opened then
+ begin if file_offset > 0 then wlog_cr;
+ a_close(log_file); selector:=selector-2;
+ if selector=term_only then
+ begin print_nl("Transcript written on ");
+@.Transcript written...@>
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+ if term_offset > 0 then wterm_cr;
+end;
+@z
+
+[1212] return if eof
+@x
+ read(term_in,m);
+@y
+ if eof(term_in) then return;
+ {don't try to read past end of file}
+ read(term_in,m);
+@z
+
+[1212] return if eof
+@x
+ else begin read(term_in,n);
+@y
+ else begin if eof(term_in) then return;
+ {don't try to read past end of file}
+ read(term_in,n);
+@z
+
+[1213] return eof
+@x
+13: begin read(term_in,l); print_cmd_mod(n,l);
+@y
+13: begin if eof(term_in) then return;
+ {don't try to read past end of file}
+read(term_in,l); print_cmd_mod(n,l);
+@z
+
+[1214 and modules added for METAFONT-FPC]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@ Try to preload the default base file. This is called even before
+the first line is read from the terminal, and thus turns \.{VIRMF}
+into \.{MF}, at least as seen by the user.
+
+\indent\.{INIMF} sets |base_ident| to `\.{INIMF}' and won't load a base
+file here.
+
+@<Preload the default base file@> =
+if base_ident = 0 then
+ begin pack_buffered_name(base_default_length - base_ext_length, 1, 0);
+ if not w_open_in(base_file) then
+ begin
+ wterm_ln('I can''t find the base file ', name_of_file);
+ goto final_end
+ end;
+ if not load_base_file then
+ begin w_close(base_file); goto final_end
+ end;
+ w_close(base_file);
+ end
+
+@
+@z
diff --git a/systems/unix/tex-fpc/mfware/gftopk.ch b/systems/unix/tex-fpc/mfware/gftopk.ch
new file mode 100644
index 0000000000..ed7f0feaa2
--- /dev/null
+++ b/systems/unix/tex-fpc/mfware/gftopk.ch
@@ -0,0 +1,119 @@
+This is a change file of GFtoPK for FPC, Wolfgang Helbig, Apr. 2008
+To be used with the GNU Pascal Compiler Version 2.1
+
+[0] About GFtoPK-FPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-fpc
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\tt GFtoPK}
+
+\N0\*. About \namefpc.\fi
+This is an adaption of Donald~E. Knuth's \.{GFtoPK}, version 2.4
+from January 2014, to Unix. \namefpc\ is based on Free~Pascal,
+version 3.0.0
+
+\namefpc\ expects the input file (\.{.gf}) and the output file
+(\.{.pk}) on the command line.
+To support shell scripting, it sets the exit code to one
+when something was wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+
+[1] Change the banner line
+@x
+@d banner=='This is GFtoPK, Version 2.4' {printed when the program starts}
+@y
+@d banner=='This is GFtoPK-FPC'
+ {printed when the program starts}
+@z
+
+[3] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[4] filenames from commandline
+@x
+@p program GFtoPK(@!gf_file,@!pk_file,@!output);
+@y
+@p@{@&$M@&O@&D@&E D@&E@&L@&P@&H@&I@}
+
+ program GFtoPK(@!output);
+@z
+
+[8] pint end of line at end of line
+@x
+@d abort(#)==begin print(' ',#); jump_out;
+@y
+@d abort(#)==begin print_ln(' ',#); history := 1; jump_out;
+@z
+
+[8] cannot use nonlocal goto in DELPHI-Mode
+@x
+begin goto final_end;
+@y
+begin halt(history);
+@z
+
+[39] get gf file name from command line
+@x
+begin reset(gf_file);
+@y
+begin assign(gf_file, param_str(1)); reset(gf_file);
+@z
+
+[40] get pk file name from command line
+@x
+begin rewrite(pk_file);
+@y
+begin assign(pk_file, param_str(2)); rewrite(pk_file);
+@z
+
+[46] Random access
+@x
+ set_pos(gf_file, -1) ; gf_len := cur_pos(gf_file) ;
+@y
+ gf_len := file_size(gf_file); seek(gf_file, gf_len);
+@z
+
+@x
+ set_pos(gf_file, n); gf_loc := n ;
+@y
+ seek(gf_file, n); gf_loc := n ;
+@z
+
+[51] check command line arguments
+@x
+ open_gf_file ;
+@y
+ if param_count <> 2 then abort('Usage: gftopk gf-file pk-file');
+ open_gf_file ;
+@z
+
+[88 ff] system dependent changes
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@<Glob...@>=
+@! history : integer;
+
+@ @<Set init...@>=
+history := 0;
+@z
diff --git a/systems/unix/tex-fpc/shell/itgl b/systems/unix/tex-fpc/shell/itgl
new file mode 100755
index 0000000000..2fca45acc6
--- /dev/null
+++ b/systems/unix/tex-fpc/shell/itgl
@@ -0,0 +1,6 @@
+case $# in
+1) b=`basename $1 .web`; tangle $1 /dev/null ini$b.p $b.pool;;
+2) b=`basename $2 .ch`; tangle $1 $2 ini$b.p $b.pool;;
+*) echo Usage: `basename $0` web-file [ ch-file ] ; exit 1
+esac && \
+fpc ini$b.p
diff --git a/systems/unix/tex-fpc/shell/mk_MF_dir b/systems/unix/tex-fpc/shell/mk_MF_dir
new file mode 100755
index 0000000000..f91e0156c8
--- /dev/null
+++ b/systems/unix/tex-fpc/shell/mk_MF_dir
@@ -0,0 +1,3 @@
+# Prepare the current directory to run METAFONT, mkfont and mkpkfont
+ln -s ~/MFbases .
+ln -s ~/MFinputs .
diff --git a/systems/unix/tex-fpc/shell/mk_TeX_dir b/systems/unix/tex-fpc/shell/mk_TeX_dir
new file mode 100755
index 0000000000..bf6dcaa8c1
--- /dev/null
+++ b/systems/unix/tex-fpc/shell/mk_TeX_dir
@@ -0,0 +1,6 @@
+# Prepare the current directory to run TeX, dvips and xdvi
+ln -s ~/TeXinputs .
+ln -s ~/TeXformats .
+ln -s ~/TeXfonts .
+ln -s ~/PKfonts .
+ln -s ~/DVIPSconf .
diff --git a/systems/unix/tex-fpc/shell/mkfont b/systems/unix/tex-fpc/shell/mkfont
new file mode 100755
index 0000000000..06d8dd3506
--- /dev/null
+++ b/systems/unix/tex-fpc/shell/mkfont
@@ -0,0 +1,15 @@
+# Install .tfm and . pk files from .mf files for TeX-GPC
+f=`basename $1 .mf`
+case $# in
+1) mag=1;;
+2) mag=$2;;
+*) echo Usage: $0 mf-file [ magnification ]; exit 1
+esac
+echo $0: $f magnification=$mag
+rm -f $f.*gf
+mf "\\mode=localfont; mag=$mag; batchmode; input $1"\
+&& gftopk $f.*gf `echo $f.*gf | sed 's/gf$/pk/'` \
+&& mv $f.*pk PKfonts/ \
+&& mv $f.tfm TeXfonts/ \
+&& rm $f.log && rm $f.*gf \
+|| echo $0 $1 $mag >>trouble
diff --git a/systems/unix/tex-fpc/shell/mkpkfont b/systems/unix/tex-fpc/shell/mkpkfont
new file mode 100755
index 0000000000..4eb23f8ac3
--- /dev/null
+++ b/systems/unix/tex-fpc/shell/mkpkfont
@@ -0,0 +1,19 @@
+# install pk-file from mf-file for TeX-GPC
+#
+# xdvi expects the path name of the generated .pk file in the first
+# line of stdout, so redirect mf's stdout to stderr.
+f=`basename $1 .mf`
+case $# in
+1) mag=1;;
+2) mag=$2;;
+*) echo Usage: $0 mf-file [ magnification ]; exit 1
+esac
+rm -f $f.*gf
+rm -f $f.*pk
+mf '\mode=localfont; mag='$mag'; batchmode; input' $1 </dev/null >&2 \
+&& pkname=`echo $f.*gf | sed 's/gf$/pk/'` \
+&& gftopk $f.*gf $pkname >&2 \
+&& mv $f.*pk PKfonts/ \
+&& echo PKfonts/$pkname \
+&& rm $f.tfm && rm $f.log && rm $f.*gf \
+|| (echo $0 $1 $mag >>trouble; exit 1)
diff --git a/systems/unix/tex-fpc/shell/tgl b/systems/unix/tex-fpc/shell/tgl
new file mode 100755
index 0000000000..cb390d3150
--- /dev/null
+++ b/systems/unix/tex-fpc/shell/tgl
@@ -0,0 +1,6 @@
+case $# in
+1) b=`basename $1 .web`; tangle $1 /dev/null $b.p /dev/null;;
+2) b=`basename $2 .ch`; tangle $1 $2 $b.p /dev/null;;
+*) echo Usage: `basename $0` web-file [ ch-file ] ; exit 1
+esac && \
+fpc $b.p
diff --git a/systems/unix/tex-fpc/shell/wve b/systems/unix/tex-fpc/shell/wve
new file mode 100755
index 0000000000..a445975cb6
--- /dev/null
+++ b/systems/unix/tex-fpc/shell/wve
@@ -0,0 +1,6 @@
+case $# in
+1) b=`basename $1 .web`; weave $1 /dev/null $b.tex;;
+2) b=`basename $1 .web`; weave $1 $2 $b.tex;;
+*) echo Usage: `basename $0` web-file [ ch-file ]; exit 1
+esac && \
+tex $b
diff --git a/systems/unix/tex-fpc/tech/german.ed b/systems/unix/tex-fpc/tech/german.ed
new file mode 100644
index 0000000000..89ba82cf2f
--- /dev/null
+++ b/systems/unix/tex-fpc/tech/german.ed
@@ -0,0 +1,5 @@
+219c
+\expandafter\def\csname grq \endcsname{%
+.
+w
+q
diff --git a/systems/unix/tex-fpc/tech/mktech b/systems/unix/tex-fpc/tech/mktech
new file mode 100755
index 0000000000..e81c623455
--- /dev/null
+++ b/systems/unix/tex-fpc/tech/mktech
@@ -0,0 +1,17 @@
+# Schritt 1: Formatdatei bauen.
+# Hierzu muss die Konstante TRIESIZE vergroessert werden.
+# 16844 ist schon zu klein, obwohl TeX behauptet, er braucht weniger
+# als 14000 (im log-file).
+sed /TRIESIZE=8000/s//TRIESIZE=16845/ ../tex/initex.p >initech.p
+fpc initech.p
+initech 'schlicht \dump'
+# Schritt 2: Den Namen der Formatdatei und die TRIESIZE anpassen.
+# Wenn die TRIESIZE hier nicht angepasst wird, kann er die Formatdatei
+# nicht laden.
+# Die Laenge des Namens muss mit der Laenge von 'plain' uebereinstimmen,
+# daher die haessliche Abkuerzung.
+mv schlicht.fmt TeXformats/schli.fmt
+sed -e /plain.fmt/s//schli.fmt/\
+ -e /TRIESIZE=8000/s//TRIESIZE=16845/\
+ ../tex/tex.p >tech.p
+fpc tech.p
diff --git a/systems/unix/tex-fpc/tech/readme b/systems/unix/tex-fpc/tech/readme
new file mode 100644
index 0000000000..98ed483e67
--- /dev/null
+++ b/systems/unix/tex-fpc/tech/readme
@@ -0,0 +1,30 @@
+$\pi$-Tag 2010
+TeCH: TeX mit deutschen Trennmustern
+Die hier vorgeschlagene Konfiguration der Trennmuster ist kompatibel
+zu anderen Distributionen. Sie enth"alt US-Englisch und Deutsch
+(nach der bew"ahrten Rechtschreibung). Voreingestellt ist US-Englisch.
+
+Installation:
+Die deutschen Trennmuster holen:
+ftp ftp://ftp.dante.de/pub/tex/macros/ec-plain/ghyph31.tex
+Und tech bauen:
+$ mktech
+Dies erzeugt das Programm tech. Am besten ins bin-Verzeichnis damit.
+
+Das Macropaket german.sty holen:
+ftp ftp://ftp.dante.de/pub/tex/language/german/german.sty
+
+Diese Datei mit dem Datum vom 13.04.199 enth"alt einen Fehler,
+das \grq verschwindet. Mit
+ed <german.ed german.sty
+kann man diesen Fehler korrigieren.
+
+Um die Installation zu testen, tech test aufrufen.
+Die Datei test.tex fa"st die Hinweise aus gerdoc, dem Handbuch f"ur
+german.sty, zusammen.
+Die Datei german.sty ins Verzeichnis TeXinputs stellen.
+
+Nach dem Laden des Pakets german.sty ist deutsch voreingestellt.
+
+\originalTeX zum Zur"uckschalten auf plain.tex
+"FF als Zahl sollte "0FF geschrieben werden.
diff --git a/systems/unix/tex-fpc/tech/schlicht.tex b/systems/unix/tex-fpc/tech/schlicht.tex
new file mode 100644
index 0000000000..ce5a1eeb85
--- /dev/null
+++ b/systems/unix/tex-fpc/tech/schlicht.tex
@@ -0,0 +1,14 @@
+%% hier kommen die deutschen Trenntabellen rein.
+\input ../lib/plain.tex
+\catcode`@=11 % at signs are letters again
+\chardef\l@USenglish=\language
+\chardef\l@english=\language
+\newlanguage\l@german \language=\l@german
+\chardef\l@austrian=\language
+\chardef\l@french=\language
+\input ghyph31
+\message{erledigt.}
+%% auf USEnglisch voreinstellen
+\language=\l@USenglish
+\catcode`@=12 % at signs are no longer letters again
+\def\fmtname{schlicht}\def\fmtversion{3.141592653} %
diff --git a/systems/unix/tex-fpc/tech/test.tex b/systems/unix/tex-fpc/tech/test.tex
new file mode 100644
index 0000000000..d25c721da0
--- /dev/null
+++ b/systems/unix/tex-fpc/tech/test.tex
@@ -0,0 +1,95 @@
+\parindent=0pt
+\overfullrule=0pt
+Hier wird gepr\"uft, ob die Einstellungen von plain \TeX erhalten bleiben.
+\ifnum\language=0\else\errmessage{language nicht 0}\fi
+\ifnum\lefthyphenmin=2\else\errmessage{lefthyphenmin nicht 2}\fi
+\ifnum\righthyphenmin=3\else\errmessage{righthyphenmin nicht 3\fi
+\par und jetzt geht's los:
+\input german.sty
+
+% Das Anf"uhrungszeichen wird schon bei der Definition eines Makros
+% als aktives Zeichen behandelt, nicht erst bei der Expansion.
+\def\qq#1{"`{\tt\char`\" #1}"'}
+
+% Wird hier zwar nicht gebraucht, aber gut zu wissen!
+\def\qq#1{{\tt\char`\" #1}}
+\def\bs#1{{\tt\char`\\ #1}}
+
+\par Die deutschen Trennparameter
+\par Nummer der deutschen Trennmuster: \the\language
+\par Minimall"ange vor dem Trennstrich: \the\lefthyphenmin
+\par Minimall"ange nach dem Trennstrich: \the\righthyphenmin
+\originalTeX
+\par und die originalen Trennparameter:
+\par Nummer der US-Trennmuster: \the\language
+\par Minimall\"ange vor dem Trennstrich: \the\lefthyphenmin
+\par Minimall\"ange nach dem Trennstrich: \the\righthyphenmin
+\germanTeX
+\par Die Trema \qq o und \bs {\char`\"} sind gleich hoch: sch"on und sch\"on
+\originalTeX
+\par In plain \TeX\ sind die Trema h\"oher.
+\germanTeX
+\par Hier gibt es Unterschiede, bei \bs {\char`\"} sind die Trema tiefer:
+Citro"en und Citro\"en
+\originalTeX
+\par und so siehts in plain \TeX\ aus: Citro\"en.
+\germanTeX
+\par Stra"se Ma"ze,
+STRA"SE MA"ZE
+\par "`Anf"uhrungszeichen"' und \glq halbe Anf"uhrungszeichen\grq
+\vskip 1cm
+Warum wird Stra"se nicht getrennt, Ma"se aber sehr wohl?
+
+\centerline{\vbox {\hsize 1pt Stra"se, Ma"se}}
+
+Weil \TeX\ nicht das erste Wort im Paragraphen trennt!
+
+\centerline{\vbox {\hsize 1pt Ma"se, Stra"se}}
+\vskip 1cm
+\par\qq{ck}, \qq{ll}, \qq{tt}, \qq{ff}: Dru"cker, Ro"lladen, Be"ttuch,
+Schi"ffahrt (\TeX\ denkt hier, "`Dru"' sei ein Wort,
+denn \qq{ck} ist, wie alle Befehle, ein Worttrenner.):
+
+\centerline {\vbox {\hsize 1pt Dru"cker, Ro"lladen, Be"ttuch, Schi"ffahrt}}
+\vskip 1cm
+Auflage ({\tt fl}) und Auf"|lage ({\tt f\qq |l}) werden gleich getrennt:
+
+\centerline{\vbox {\hsize 1pt Auf"|lage, Auflage}}
+\eject
+\bs - deaktiviert alle anderen Trennstellen, aber nicht so \qq-:
+
+\centerline{\vbox {\hsize 1pt \relax A "ubertragen, "uber\-tragen, "uber"-tragen }}
+\vskip 1cm
+{\tt -} ist eine Trennstelle, aber nicht \qq {\char`~}:
+
+\centerline{\vbox {\hsize 1pt A bergauf und -ab, bergauf und "~ab}}
+\vskip 0,5cm
+\centerline{\vbox {\hsize 1pt I-Punkt, I"~Punkt}}
+\vskip 1cm
+{\tt -} deaktiviert alle anderen Trennstellen, aber nicht so \qq=:
+
+\centerline{\vbox {\hsize 1pt A Arbeiter-Unfallgesetz, Arbeiter"=Unfallgesetz}}
+\eject
+\bs- verhindert falsche Trennungen, die \qq- erm"oglicht:
+
+\centerline{\vbox {\hsize 1pt A Bedienoberfl"ache, Bedien"-oberfl"ache,
+ Be\-dien"-oberfl"ache}}
+\vskip 1cm
+\qq{\char`\"} unterdr"uckt den Trennstrich: (Wer braucht das?)
+
+\centerline{\vbox {\hsize 1pt Wolf""gang}}
+\vskip 1cm
+Was ist sch"oner: "`Wolfgang"' oder "`\negthinspace Wolfgang"',
+{ \it"`Hof"'\/} oder {\it "`Hof\/"'\/}, "`Hof"' oder "`Hof\/"'?
+\eject
+Die originalen Trennmuster:
+\selectlanguage{USenglish}
+
+\centerline{\vbox {\hsize 1pt A Arbeiterunfallversicherung awsome astonished}}
+\vskip 1cm
+
+Und die deutschen nach bew"ahrter Rechtschreibung:
+\selectlanguage{german}
+
+\centerline{\vbox {\hsize 1pt A Arbeiterunfallversicherung awsome astonished}}
+\end
diff --git a/systems/unix/tex-fpc/tex-fpc.pdf b/systems/unix/tex-fpc/tex-fpc.pdf
new file mode 100644
index 0000000000..6222dd48d6
--- /dev/null
+++ b/systems/unix/tex-fpc/tex-fpc.pdf
Binary files differ
diff --git a/systems/unix/tex-fpc/tex/otex.ch b/systems/unix/tex-fpc/tex/otex.ch
new file mode 100644
index 0000000000..d84408e65d
--- /dev/null
+++ b/systems/unix/tex-fpc/tex/otex.ch
@@ -0,0 +1,1070 @@
+% This is a change file of TeX for GNU Pascal, Wolfgang Helbig, Nov. 2007
+% Handle command line as the first line, Apr. 2008
+% Open vi at the offending line in error dialog Apr. 2008
+% Avoid an underful last line, use buffered output for dvi file, Jul. 2008
+% That "finished" the program. But I kept on improving:
+% July 2008:
+% Don't print empty lines on terminal and log file.
+% Don't trim ninput lines.
+% November 2009:
+% The last improvement caused an error: On reading a blank only
+% first line might go into a loop. This error cannot be noticed by the user.
+% It was noticed by Joachim Kuebart
+% Some changes were necessary run TeX_GPC to Mac OS X
+% with the current version of GPC. (pointed out by Martin Monperrus and
+% Luis Rivera)
+% July 2016: Switch from GNU Pascal to Free Pascal
+% There is no GPC on Mac OS X, Debian 8, OpenBSD.
+%
+
+[0] About TeX-FPC
+@x
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+@y
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+\input webmac-fpc
+
+\emergencystretch 0.6in % avoid overfull boxes
+
+\let\maybe=\iffalse % print changed modules only.
+
+% put a mark in the left margin. (see Exercise 14.28 in The TeXbook)
+\def\marke#1{\strut\vadjust{\kern-\dp\strutbox\vbox to 0pt{\vss
+ \llap{\bf #1\/\quad\strut}}}\ignorespaces }
+
+\def\name{\TeX}
+
+\N0\*. \[0] About \namefpc.
+\namefpc\ is a Unix implementation of Donald~E. Knuth's \TeX82 in
+the version 3.14159265 from January 2014. It is based on Free~Pascal.
+The accompaning \.{README} file tells you how to build and run
+\namefpc. To help you identify the differences of \TeX82 and
+\namefpc, the numbers of modified modules carry an asterisk. Letters
+in the left margin indicate the reason for a change. They mean:
+\medskip
+\item{\bf E} fixes an error in \TeX82
+\item{\bf e} fixes a small error in \TeX82
+\item{\bf F} adds a feature as suggested by Knuth
+\item{\bf P} removes a violation of Pascal (Jensen, Wirth: {\sl Pascal
+User Manual and Report\/}, 3rd edition, 1985)
+\item{\bf X} an FPC extension
+\item{\bf U} make Unix happy
+\item{\bf u} make Unix user happy
+\item{\bf h} make Helbig happy
+\item{\bf N} a note that helped me to understand this program.
+\item{\bf B} a bug I couldn't fix.
+\medskip
+
+Identifiers that come with FPC~Pascal are coded as \.{WEB} macros and prefixed
+by `\\{fpc\_}'. That helps to resolve name clashes.
+\filbreak
+\namefpc\ is slightly slower than web2c based programs. To compile
+the device independend file for this document, the web2c version from \TeX~Life 2008
+ran 1.1 seconds and \namefpc\ 1.2 seconds.
+\filbreak
+Going with Dijkstra, see
+\.{http://www.cs.utexas.edu/users/EWD/videos/noorderlicht.mpg}, I
+don't believe in version numbers, since I don't believe in maintaining
+software---I consider \namefpc\ finished---and it must go without
+a number. This does not mean that I don't care any more about
+\namefpc; comments or questions are quite welcome. In fact, I
+tried to explain why I changed what and how in order to encourage
+you to undertake further modifications or bugfixes yourself and
+I'll be glad to help.
+\filbreak
+The 2008 edition of \namegpc\ was tested on NetBSD 3.1 and GPC~20020510,
+which happens to be the version of GNU~Pascal offered in the NetBSD
+package collection. The final edition of \namegpc was built in July
+2014 on Mac~OS~X 10.6.2 and GPC~20070904. This is the first edition
+of \namefpc which was built on Mac~OS~X 10.11.5 and FPC~3.0.0.
+The switch to FPC was necessary because Mac-OS-X broke GPC~20070904.
+And the switch was possible, because finally FPC accepts ISO-Pascal.
+\filbreak
+Joachim Kuebart spotted an error in the 2008 edition. When the
+first line consists of blanks only, a loop is not terminated properly.
+Joachim found this by reading this document, not by running \namegpc.
+This in turn motivated me to improve the comments resulting in a
+lot of changes.
+\filbreak
+\namefpc\ slightly differs from \TeX: On input, trailing blanks are
+not removed, on input of the first line, leading blanks are not
+removed either. This lets you interactively enter `\.{I \\showbox0\
+}' to make \namefpc\ show box 0. This doesn't work if the trailing
+blank were removed.
+
+\TeX\ writes an additional empty line whenever it prompts you on
+the terminal. \namefpc\ doesn't. Finally \TeX\ emits an `\.{Underfull
+\\hbox}' warning whenever the last line of a paragraph happens to include
+glue only, because then \TeX\ would erroneously remove the
+\.{parfillskip}. \namefpc\ will keep it.
+
+% \TeX82 will emit an underfull box warning here, \namefpc\ won't.
+\setbox0=\hbox to \hsize {\hfil\ \strut}
+\noindent\box0\ \ \par
+\bigskip
+\address
+\fi
+@z
+
+[2] Change the banner line
+@x
+known as `\TeX' [cf.~Stanford Computer Science report CS1027,
+November 1984].
+
+@d banner=='This is TeX, Version 3.14159265' {printed when \TeX\ starts}
+@y
+known as `\TeX' [cf.~Stanford Computer Science report CS1027,
+November 1984].
+
+\marke h Since \namefpc\ differs from \TeX\ to make me happy, I have to
+change the banner line.
+
+@d banner=='This is TeX-FPC'
+@z
+
+[4] program header
+@x
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@y
+
+\marke P Pascal wants the identifiers of the standard text files
+\\{input} and \\{output} in the parameterlist of the program header.
+
+\marke N One of the \.{WEB} macros is named \\{input}
+as well. To make \.{TANGLE} write \.{INPUT} into the Pascal source
+file instead of the expansion of the macro, you code the name as
+a concatenation of one letter identifiers since one letter identifiers
+cannot be macro names. The same
+applies to \\{type}.
+
+@d term_in==i @& n @& p @& u @& t
+@d term_out==o @& u @& t @& p @& u @& t
+@d mtype==t @& y @& p @& e
+@f mtype==type
+@z
+
+[4] program header
+@x
+program TEX; {all file names are defined dynamically}
+@y
+program TEX(@!term_in,@!term_out);
+@z
+
+Since @x, @y, and @z only define a change block when they begin a
+line, you deactivate a block by indenting it (shift right) and
+activate it by unindenting it (shift left). With vi set the cursor
+to the @x line and type >} or <} to (un)indent a paragraph.
+
+[7] shift left to turn debugging on, right to turn it off
+@x
+@d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+@d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+@y
+@d debug== {change this to `$\\{debug}\equiv\.{@@\{}$' when not debugging}
+@d gubed== {change this to `$\\{gubed}\equiv\.{@@\}}$' when not debugging}
+@z
+
+[7] shift left to turn stats on, right to turn them off.
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
+
+
+[8] shift left to build TEX and right to build INITEX.
+@x initex
+@d init== {change this to `$\\{init}\equiv\.{@@\{}$' in the production version}
+@d tini== {change this to `$\\{tini}\equiv\.{@@\}}$' in the production version}
+@y
+@d init==@{ {change this to `$\\{init}\equiv $' for \.{INITEX}}
+@d tini==@t@>@} {change this to `$\\{tini}\equiv $' for \.{INITEX}}
+@z
+
+[9] compiler directives, turn off I/O checking.
+@x
+@^overflow in arithmetic@>
+@y
+@^overflow in arithmetic@>
+
+\marke X If the first character of a \PASCAL\ comment is a dollar
+sign, Free~Pascal treats the comment as a ``compiler directive''.
+FPC aborts when it detects an I/O error. To let \namefpc\ handle
+an I/O error while opening an input file, you have to turn off I/O
+checking altogether by the \.{I-} directive.
+
+\marke X $GOTO is not harmful. So turn it on!
+
+\marke X $MODE ISO sets integer size to 32 bit, defines file procedures
+get, put and allows nonlocal gotos.
+
+\marke b In contrast to \ph\ Free~Pascal offers no directive to
+check for arithmetic overflow.
+
+\marke e Knuth suggests to turn on range checking while debugging.
+FPC aborts when it spots range violation. Those violations might
+happen when the debugger shows a memery cell assumed to contain a
+|glue_ratio|. Even though turning of range checking doubles the
+speed of \TeX\ I suggest to turn it on when not debugging, just to
+get another check from Knuth for discovering an error.
+
+@^system dependencies@>
+@^GNU Pascal@>
+@z
+
+[9] compiler directives, turn off I/O checking, continued
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$I-@} {no I/O checking}
+@{@&$M@&O@&D@&E I@&S@&O@}
+@!debug @{@&$R-@}@+ gubed {no range check while debugging}
+@z
+
+[10] default case branch
+@x
+\PASCAL s have, in fact, done this, successfully but not happily!)
+@:PASCAL H}{\ph@>
+
+@d othercases == others: {default for cases not listed explicitly}
+@y
+\PASCAL s have, in fact, done this, successfully but not happily!)
+@:PASCAL H}{\ph@>
+
+\marke G This is the only place I voluntarily use an FPC extension
+to Pascal.
+@^FPC Pascal@>
+
+@d othercases == @+ else {default for cases not listed explicitly}
+@z
+
+[11]
+@x
+in production versions of \TeX.
+@y
+in production versions of \TeX.
+
+\marke N I didn't change the constants, leaving it up to you to
+adopt them to your task. Just keep the Pascal source for \.{tex}
+around. So you can change them without going all the way through
+modifying \.{tex.ch} and tangeling it. Note that for \.{initex}
+|mem_top| and |mem_max| must agree.
+
+\marke U One of the constants is the filename of the string pool
+file which needs an adoption to Unix.
+@z
+
+The changes headed by trip need to be made for the trip test suite.
+
+[11]
+ @x trip
+ @!mem_max=30000; {greatest index in \TeX's internal |mem| array;
+ @y
+ @!mem_max=3000; {greatest index in \TeX's internal |mem| array;
+ @z
+
+[11]
+ @x trip
+ @!mem_min=0; {smallest index in \TeX's internal |mem| array;
+ @y
+ @!mem_min=1; {smallest index in \TeX's internal |mem| array;
+ @z
+
+[11]
+ @x trip
+ @!error_line=72; {width of context lines on terminal error messages}
+ @!half_error_line=42; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=79; {width of longest text lines output; should be at least 60}
+ @y
+ @!error_line=64; {width of context lines on terminal error messages}
+ @!half_error_line=32; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=72; {width of longest text lines output; should be at least 60}
+ @z
+
+[11] location of pool file
+@x
+@!pool_name='TeXformats:TEX.POOL ';
+@y
+@!pool_name='TeXformats/tex.pool'; { \marke X arrays of different length are
+assignment compatible. }
+@z
+
+
+[12]
+ @x trip
+ @d mem_bot=0 {smallest index in the |mem| array dumped by \.{INITEX};
+ must not be less than |mem_min|}
+ @d mem_top==30000 {largest index in the |mem| array dumped by \.{INITEX};
+ must be substantially larger than |mem_bot|
+ and not greater than |mem_max|}
+ @y
+ @d mem_bot=1 {smallest index in the |mem| array dumped by \.{INITEX};
+ must not be less than |mem_min|}
+ @d mem_top==3000 {largest index in the |mem| array dumped by \.{INITEX};
+ must be substantially larger than |mem_bot|
+ and not greater than |mem_max|}
+ @z
+
+
+[25]
+@x
+for us to specify simple operations on word files before they are defined.
+@y
+for us to specify simple operations on word files before they are
+defined.
+
+\marke X
+@d fpc_byte==b @& y @& t @& e
+@d fpc_string == r@&a@&w@&b@&y@&t@&e@&s@&t@&r@&i@&n@&g
+
+@^FPC Pascal@>
+@z
+
+[25] the type of text_files is text
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@!alpha_file=packed file of text_char; {files that contain textual data}
+@y
+@!eight_bits=fpc_byte; {unsigned one-byte quantity}
+@!alpha_file=t @& e @& x @& t; {\marke P Pascal requires |text|}
+@z
+
+[27]
+@x
+\TeX's file-opening procedures return |false| if no file identified by
+|name_of_file| could be opened.
+
+@d reset_OK(#)==erstat(#)=0
+@d rewrite_OK(#)==erstat(#)=0
+@y
+\marke X In Pascal, external files must occur in the program heading
+and FPC~Pascal asks the user whenever an external file is
+opened. But \.{initex} wants to reset \.{tex.pool} and rewrite
+\.{plain.fmt} without asking
+the user for the file name.
+FPC~Pascal lets you assign the file name to an external file.
+The function |fpc_io_result| returns a nonzero value if any
+error occurred since the last invocation of |fpc_io_result|.
+
+@^GNU Pascal@>
+@^system dependencies@>
+
+@d fpc_io_result==i@&o@&r@&e@&s@&u@&l@&t
+@d fpc_assign==a@&s@&s@&i@&g@&n
+@d reset_OK(#)==fpc_io_result=0
+@d rewrite_OK(#)==fpc_io_result=0
+@d clear_io_result==@+if fpc_io_result=0 then do_nothing
+@z
+
+[27] reset and rewrite for each of three file types
+@x alpha_file
+begin reset(f,name_of_file,'/O'); a_open_in:=reset_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); reset(f);
+a_open_in:=reset_OK(f);
+@z
+@x
+begin rewrite(f,name_of_file,'/O'); a_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+a_open_out:=rewrite_OK(f);
+@z
+
+byte_file
+@x
+begin reset(f,name_of_file,'/O'); b_open_in:=reset_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); reset(f);
+b_open_in:=reset_OK(f);
+@z
+@x
+function b_open_out(var f:byte_file):boolean;
+ {open a binary file for output}
+begin rewrite(f,name_of_file,'/O'); b_open_out:=rewrite_OK(f);
+@y
+function b_open_out(var f:byte_file):boolean;
+ {open a binary file for output}
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+b_open_out:=rewrite_OK(f);
+@z
+
+@x word_file
+begin reset(f,name_of_file,'/O'); w_open_in:=reset_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); reset(f); w_open_in:=reset_OK(f);
+@z
+@x
+begin rewrite(f,name_of_file,'/O'); w_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+w_open_out:=rewrite_OK(f);
+@z
+
+[31]
+@x
+finer tuning is often possible at well-developed \PASCAL\ sites.
+@^inner loop@>
+
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var last_nonblank:0..buf_size; {|last| with trailing blanks removed}
+begin if bypass_eoln then if not eof(f) then get(f);
+ {input the first character of the line into |f^|}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin last_nonblank:=first;
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ if buffer[last-1]<>" " then last_nonblank:=last;
+ end;
+ last:=last_nonblank; input_ln:=true;
+ end;
+end;
+@y
+finer tuning is often possible at well-developed \PASCAL\ sites.
+@^inner loop@>
+
+\marke h Since \namefpc\ does not remove trailing spaces, |buffer[last-1]|
+might hold a space.
+
+\marke P
+\ph\ lets you |reset| the terminal input file with the first |get|
+`surpressed'. For several reasons, this feature is not exploited by
+\namefpc. First, it is not provided by GPC. Second rightly so, since
+it violates the specification of Pascal. Third, it makes the program
+quite ugly by destroying the beautiful equivalence of terminal and
+disk files. Fourth, since \namefpc\ uses Pascal's standard text
+file |input|, it should not reset that file at all. Fifth, surpressing
+the first |get| is offered by \ph\ to address a problem, namely
+that the program stays in the reset function waiting for user input
+and this problem is solved much more beautiful by ``lazy I/O'',
+whereby the program only waits for user input if it is needed. This
+is suggested in the {\sl Pascal User Manual}, implemented by
+GNU~Pascal and exploited by \namefpc. This leads to a much cleaner
+implementaion of |input_ln|, which can always savely assume that
+|f^| holds the first character of the next line. This condition is
+established by Pascal's |reset| and maintained by |input_ln|.
+
+\marke h
+Unlike \TeX82 \namefpc\ leaves trailing spaces in the input line.
+
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var ch: char;
+begin
+ {ignore |bypass_eoln|. Assuming |f| being positioned at the first character}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then begin
+ read_ln(f); {complete the current line}
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ end;
+ read(f, ch); buffer[last]:=xord[ch]; incr(last);
+ end;
+ read_ln(f); {Advance |f| to the first character of the next line}
+ input_ln:=true;
+ end;
+end;
+@z
+
+[32] term_in and term_out are the standard pascal files
+@x
+is considered an output file the file variable is |term_out|.
+@^system dependencies@>
+
+@<Glob...@>=
+@!term_in:alpha_file; {the terminal as an input file}
+@!term_out:alpha_file; {the terminal as an output file}
+@y
+is considered an output file the file variable is |term_out|.
+\marke P Pascal's standard text files are declared implicitly.
+@z
+
+[33]
+@x
+@ Here is how to open the terminal files
+in \ph. The `\.{/I}' switch suppresses the first |get|.
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+
+@d t_open_in==reset(term_in,'TTY:','/O/I') {open the terminal for text input}
+@d t_open_out==rewrite(term_out,'TTY:','/O') {open the terminal for text output}
+@y
+@ Here is how to open the terminal files
+in \ph. The `\.{/I}' switch suppresses the first |get|.
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+
+\marke P In Pascal, the standard text files are openend implicitly.
+
+@d t_open_in==do_nothing {open the terminal for text input}
+@d t_open_out==do_nothing {open the terminal for text output}
+@z
+
+[34]
+@x
+some instruction to the operating system. The following macros show how
+these operations can be specified in \ph:
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+@y
+some instruction to the operating system.
+
+\marke X
+Unix holds terminal output, when it receives \.{\^S} and
+continues writing to the terminal, when it receives \.{\^Q}. These
+`flow control' characters only work when sent from the terminal but
+not when sent to the terminal. \marke B Here I give up, since I
+don't know how to restart the output from the writing side so
+\namefpc\ does nothing. Mac OS X does not stop terminal output when
+it receives \.{\^S}.
+
+@^Free Pascal@>
+@^system dependencies@>
+@z
+
+[34]
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@d clear_terminal == break_in(term_in,true) {clear the terminal input buffer}
+@d wake_up_terminal == do_nothing {cancel the user's cancellation of output}
+@y
+@d fpc_flush == f@&l@&u@&s@&h
+@d update_terminal == fpc_flush(term_out) {empty the terminal output buffer}
+@d clear_terminal == do_nothing {clear the terminal input buffer}
+@d wake_up_terminal == do_nothing {cancel the user's cancellation of output}
+@z
+
+[35]
+@x
+ begin write_ln(term_out,'Buffer size exceeded!'); goto final_end;
+@y
+ begin write_ln(term_out,'Buffer size exceeded!'); fpc_halt(3);
+@z
+
+[36] command line
+@x
+not be typed immediately after~`\.{**}'.)
+
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+
+@y
+not be typed immediately after~`\.{**}'.)
+
+\marke F This procedure puts the command line arguments separated
+by spaces into |buffer|. Like |input_ln| it updates |last| so that
+|buffer[first..last)| will contain the command line.
+
+\marke X FPC~Pascal's function~|@!fpc_param_count| gives the number of
+command line arguments. The function~|@!fpc_param_str(n)| returns the
+n-th argument for |0 <= n <= gpc_param_count| in a |@!fpc_string|,
+whose length is returned by the function~|@!gpc_length|.
+A |fpc_string| is like a |packed array[1..fpc_length] of char| with
+varying length.
+
+@^FPC Pascal@>
+@^system dependencies@>
+
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@d fpc_length==l @& e @& n @& g @& t @& h
+@d fpc_param_count==p @& a @& r @& a @& m @& c @& o @& u @& n @& t
+@d fpc_param_str==p @& a @& r @& a @& m @&s @& t @& r
+ {FPC function returning the length of a |fpc_string|}
+
+@p procedure input_command_ln; {get the command line in |buffer|}
+var argc: integer; {argument counter}
+ arg: fpc_string; {argument}
+ cc: integer; {character counter in argument}
+begin last := first; argc := 1;
+while argc <= fpc_param_count do
+ begin cc := 1; arg := fpc_param_str(argc); incr(argc);
+ while cc <= fpc_length(arg) do
+ begin
+ if last+1>=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ buffer[last] := xord[arg[cc]]; incr(last); incr(cc);
+ end;
+ if (argc <= fpc_param_count) then begin
+ buffer[last] := " "; incr(last); {insert a space between arguments}
+ end;
+ end;
+end;
+@z
+
+[37] command line.
+@x
+@ The following program does the required initialization
+without retrieving a possible command line.
+It should be clear how to modify this routine to deal with command lines,
+if the system permits them.
+@^system dependencies@>
+
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in;
+loop@+begin wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in,true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ loc:=first;
+ while (loc<last)and(buffer[loc]=" ") do incr(loc);
+ if loc<last then
+ begin init_terminal:=true;
+ return; {return unless the line was all blank}
+ end;
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+exit:end;
+@y
+@ \marke F The following program treats a non empty command line as
+the first line.
+
+The 2008 edition of \namegpc\ erranously assumed |buffer[last-1] <> " "|
+which does not hold if your first line is all blank as Joachim Kuebart noted.
+@^Kuebart, Joachim@>
+
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in; input_command_ln;
+while first=last do begin
+ wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in, true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write_ln(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ if first=last then
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+loc := first;
+init_terminal:=true;
+exit: end;
+@z
+[109]
+@x
+routines cited there must be modified to allow negative glue ratios.)
+@y
+routines cited there must be modified to allow negative glue ratios.)
+
+\marke X In FPC~Pascal the type |fpc_single| is appropiate.
+@d fpc_single== s@&i@&n@&g@&l@&e
+@z
+
+@x
+@!glue_ratio=real; {one-word representation of a glue expansion factor}
+@y
+@!glue_ratio=fpc_single; {one-word representation of a glue expansion
+ factor in GNU~Pascal}
+@^FPC Pascal@>
+@z
+
+[112]
+@x
+macros are simplified in the obvious way when |min_quarterword=0|.
+@^inner loop@>@^system dependencies@>
+
+@d qi(#)==#+min_quarterword
+ {to put an |eight_bits| item into a quarterword}
+@d qo(#)==#-min_quarterword
+ {to take an |eight_bits| item out of a quarterword}
+@d hi(#)==#+min_halfword
+ {to put a sixteen-bit item into a halfword}
+@d ho(#)==#-min_halfword
+ {to take a sixteen-bit item from a halfword}
+@y
+macros are simplified in the obvious way when |min_quarterword=0|.
+\marke X Which is the case with FPC.
+@^inner loop@>@^system dependencies@>
+
+@d qi(#)==#
+ {to put an |eight_bits| item into a quarterword}
+@d qo(#)==#
+ {to take an |eight_bits| item out of a quarterword}
+@d hi(#)==#
+ {to put a sixteen-bit item into a halfword}
+@d ho(#)==#
+ {to take a sixteen-bit item from a halfword}
+@z
+
+[360] Don't print empty lines
+@x
+@ All of the easy branches of |get_next| have now been taken care of.
+There is one more branch.
+@y
+@ All of the easy branches of |get_next| have now been taken care of.
+There is one more branch.
+
+\marke h \TeX82 ends the current line by calling |print_ln| even
+if the line is empty. This causes an additional empty line, which
+is ugly. Calling |print_nl("")| is smarter. It ends the current
+line only if it is not empty.
+@z
+
+@x
+ print_ln; first:=start;
+@y
+ print_nl(""); first:=start;
+@z
+
+@x [514]
+|TEX_font_area|. These system area names will, of course, vary from place
+to place.
+@y
+|TEX_font_area|. These system area names will, of course, vary from place
+to place.
+
+\marke U Use the Unix file separator.
+@z
+
+[514]
+@x
+@d TEX_area=="TeXinputs:"
+@.TeXinputs@>
+@d TEX_font_area=="TeXfonts:"
+@.TeXfonts@>
+@y
+@d TEX_area=="TeXinputs/" {i.e., a subdirectory of the working directory}
+@.TeXinputs@>
+@d TEX_font_area=="TeXfonts/" {dito}
+@.TeXfonts@>
+@z
+
+[516]
+@x
+ if (c=">")or(c=":") then
+@y
+ if c="/" then {use ``/'' as a file name separator\marke U}
+@z
+
+[519]
+@x
+@d append_to_name(#)==begin c:=#; incr(k);
+@y
+@d fpc_set_length==s@&e@&t@&l@&e@&n@&g@&t@&h
+
+@d append_to_name(#)==begin c:=#; incr(k);
+@z
+
+[519]
+@x
+@!j:pool_pointer; {index into |str_pool|}
+@y
+@!j:pool_pointer; {index into |str_pool|}
+@!rbs: fpc_string;
+@z
+
+[519]
+@x
+if k<=file_name_size then name_length:=k@+else name_length:=file_name_size;
+for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
+end;
+@y
+if k<=file_name_size then name_length:=k@+else name_length:=file_name_size;
+rbs := name_of_file;
+fpc_set_length(rbs, name_length);
+name_of_file := rbs;
+end;
+@z
+
+[521]
+@x
+TEX_format_default:='TeXformats:plain.fmt';
+@y
+TEX_format_default:='TeXformats/plain.fmt';
+ {``/'' is the Unix file name separator\marke U}
+@z
+
+[523]
+@x
+@!j:integer; {index into |buffer| or |TEX_format_default|}
+@y
+@!j:integer; {index into |buffer| or |TEX_format_default|}
+rbs: fpc_string;
+@z
+
+[523]
+@x
+for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
+@y
+rbs := name_of_file;
+fpc_set_length(rbs, name_length);
+name_of_file := rbs;
+@z
+
+[575] Don't check eof
+@x
+if eof(tfm_file) then abort;
+@y
+@z
+
+[816] save pointer to penalty_node
+@x
+same number of |mem|~words.
+@^data structure assumptions@>
+@y
+same number of |mem|~words.
+@^data structure assumptions@>
+
+\marke E
+\TeX82 prunes discardable nodes from the beginning of a new line until
+it reaches a nondiscardable node. Now, if the last line of a paragraph
+contains discardables only, the \.{\\parfillskip} glue at the end of the
+paragraph will also be removed, since it is a discardable. This will
+give you an empty \.{\\hbox}. Finally \TeX\ appends \.{\\rightskip} glue.
+This gives you a nonempty \.{\\hbox}, raising a \.{Underfull \\hbox}
+warning.
+
+To avoid this happening, \namefpc\ saves a pointer to the node
+immediately preceding the \.{\\parfillskip} node and quits pruning
+when it encounters this node several procedures later.
+@^Underfull \\hbox...@>
+@z
+
+@x
+link(tail):=new_param_glue(par_fill_skip_code);
+@y
+non_prunable_p := tail; {points to the node immediately before
+\.{\\parfillskip}}
+link(tail):=new_param_glue(par_fill_skip_code);
+@z
+
+[862] declare non_prunable_p
+@x
+The following declarations provide for a few other local variables that are
+used in special calculations.
+
+@y
+The following declarations provide for a few other local variables that are
+used in special calculations.
+
+\marke E Declare the |non_prunable_p| pointer.
+@z
+
+@x
+@!auto_breaking:boolean; {is node |cur_p| outside a formula?}
+@y
+@!auto_breaking:boolean; {is node |cur_p| outside a formula?}
+non_prunable_p:pointer; {pointer to the node before \.{\\parfillskip}}
+@z
+
+[876] pass non_prunable_p
+@x
+(By introducing this subprocedure, we are able to keep |line_break|
+from getting extremely long.)
+@y
+(By introducing this subprocedure, we are able to keep |line_break|
+from getting extremely long.)
+
+\marke E Pass |non_prunable_p| to the |post_line_break|~procedure.
+@z
+
+@x
+post_line_break(final_widow_penalty)
+@y
+post_line_break(final_widow_penalty, non_prunable_p)
+@z
+
+[877] declare non_prunable_p
+@x
+of their new significance.) Then the lines are justified, one by one.
+
+@y
+of their new significance.) Then the lines are justified, one by one.
+
+\marke E Declare another parameter. It holds the pointer to the node
+immediately preceding \.{\\parfillskip}.
+@z
+
+@x
+procedure post_line_break(@!final_widow_penalty:integer);
+@y
+procedure post_line_break(@!final_widow_penalty:integer;
+ non_prunable_p:pointer);
+@z
+
+[879]
+@x
+are computed for non-discretionary breakpoints.
+@y
+are computed for non-discretionary breakpoints.
+
+\marke E The pointer |non_prunable_p| references the node immediately
+preceding the \.{\\parfillskip} node at the end of the paragraph.
+Stop pruning at this node.
+@z
+
+[879]
+@x
+ if non_discardable(q) then goto done1;
+@y
+ if non_discardable(q) then goto done1;
+ if q = non_prunable_p then goto done1; {retain \.{\\parfillskip} glue}
+@z
+
+[1327]
+@x
+if (x<>69069)or eof(fmt_file) then goto bad_fmt
+@y
+if (x<>69069) then goto bad_fmt
+@z
+
+[1332]
+@x
+The initial test involving |ready_already| should be deleted if the
+\PASCAL\ runtime system is smart enough to detect such a ``mistake.''
+@^system dependencies@>
+@y
+The initial test involving |ready_already| should be deleted if the
+\PASCAL\ runtime system is smart enough to detect such a ``mistake.''
+@^system dependencies@>
+
+\marke h \namefpc\ tries to load the format file even before it
+initializes the output routines. That way, it will print the name of
+the format file on the terminal.
+
+\marke X
+|@!fpc_halt|
+passes the |history| as an exit code to the shell.
+
+@^system dependencies@>
+@^GNU Pascal@>
+@^Unix@>
+
+@d fpc_halt == h@&a@&l@&t
+@z
+
+[1332]
+@x
+start_of_TEX: @<Initialize the output routines@>;
+@y
+start_of_TEX: @<Preload the default format file@>;
+@<Initialize the output routines@>;
+@z
+
+[1332]
+@x
+final_end: ready_already:=0;
+@y
+final_end:
+fpc_halt(history);
+ {pass |history| as the exit value to the system\marke u}
+@z
+
+[1333] print last end-of-line marker if needed
+@x
+This program doesn't bother to close the input files that may still be open.
+@y
+This program doesn't bother to close the input files that may still be open.
+
+\marke h
+Special care is taken to terminate the last line on the terminal.
+
+@z
+
+[1333] print last end-of-line marker if needed
+@x
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+end;
+@y
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+ if term_offset > 0 then wterm_cr;
+end;
+@z
+
+[1338] return if eof.
+@x
+program below. (If |m=13|, there is an additional argument, |l|.)
+@.debug \#@>
+
+@y
+program below. (If |m=13|, there is an additional argument, |l|.)
+@.debug \#@>
+
+\marke P A Pascal program must not read from the standard text file
+if the end of file is reached. Even in this respect, Unix and Pascal
+treat terminals and disk files alike.
+
+@z
+@x
+begin loop begin wake_up_terminal;
+@y
+begin loop begin; wake_up_terminal;
+@z
+
+@x
+ read(term_in,m);
+@y
+ if eof(term_in) then return;
+ read(term_in,m);
+@z
+
+[1338] return if eof
+@x
+ else begin read(term_in,n);
+@y
+ else begin if eof(term_in) then return;
+ read(term_in,n);
+@z
+
+[1339] return if eof
+@x
+13: begin read(term_in,l); print_cmd_chr(n,l);
+@y
+13: begin if eof(term_in) then return;
+read(term_in,l); print_cmd_chr(n,l);
+@z
+
+[1379 and modules added for TeX-FPC]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+
+\marke h Try to preload the default format file. This is called
+even before the first line is read from the terminal, and thus
+turns \.{VIRTEX} into \.{TEX}, at least as experienced by the user.
+\.{INITEX} sets |format_ident| to `\.{INITEX}' and won't load a
+format file here.
+
+@<Preload the default format file@>=
+if format_ident = 0 then
+ begin pack_buffered_name(format_default_length - format_ext_length, 1, 0);
+ if not w_open_in(fmt_file) then
+ begin
+ wterm_ln('I can''t find the format file ', name_of_file);
+ goto final_end
+ end;
+ if not load_fmt_file then
+ begin w_close(fmt_file); goto final_end
+ end;
+ w_close(fmt_file);
+ end
+@z
diff --git a/systems/unix/tex-fpc/tex/tex.ch b/systems/unix/tex-fpc/tex/tex.ch
new file mode 100644
index 0000000000..18cec3b8ea
--- /dev/null
+++ b/systems/unix/tex-fpc/tex/tex.ch
@@ -0,0 +1,1059 @@
+% This is a change file of TeX for GNU Pascal, Wolfgang Helbig, Nov. 2007
+% Handle command line as the first line, Apr. 2008
+% Open vi at the offending line in error dialog Apr. 2008
+% Avoid an underful last line, use buffered output for dvi file, Jul. 2008
+% That "finished" the program. But I kept on improving:
+% July 2008:
+% Don't print empty lines on terminal and log file.
+% Don't trim ninput lines.
+% November 2009:
+% The last improvement caused an error: On reading a blank only
+% first line might go into a loop. This error cannot be noticed by the user.
+% It was noticed by Joachim Kuebart
+% Some changes were necessary run TeX_GPC to Mac OS X
+% with the current version of GPC. (pointed out by Martin Monperrus and
+% Luis Rivera)
+% July 2016: Switch from GNU Pascal to Free Pascal
+% There is no GPC on Mac OS X, Debian 8, OpenBSD.
+%
+
+[0] About TeX-FPC
+@x
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+@y
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+\input webmac-fpc
+
+\emergencystretch 0.6in % avoid overfull boxes
+
+\let\maybe=\iffalse % print changed modules only.
+
+% put a mark in the left margin. (see Exercise 14.28 in The TeXbook)
+\def\marke#1{\strut\vadjust{\kern-\dp\strutbox\vbox to 0pt{\vss
+ \llap{\bf #1\/\quad\strut}}}\ignorespaces }
+
+\def\name{\TeX}
+
+\N0\*. \[0] About \namefpc.
+\namefpc\ is a Unix implementation of Donald~E. Knuth's \TeX82 in
+the version 3.14159265 from January 2014. It is based on Free~Pascal.
+The accompaning \.{README} file tells you how to build and run
+\namefpc. To help you identify the differences of \TeX82 and
+\namefpc, the numbers of modified modules carry an asterisk. Letters
+in the left margin indicate the reason for a change. They mean:
+\medskip
+\item{\bf E} fixes an error in \TeX82
+\item{\bf e} fixes a small error in \TeX82
+\item{\bf F} adds a feature as suggested by Knuth
+\item{\bf P} removes a violation of Pascal (Jensen, Wirth: {\sl Pascal
+User Manual and Report\/}, 3rd edition, 1985)
+\item{\bf X} an FPC extension
+\item{\bf U} make Unix happy
+\item{\bf u} make Unix user happy
+\item{\bf h} make Helbig happy
+\item{\bf N} a note that helped me to understand this program.
+\item{\bf B} a bug I couldn't fix.
+\medskip
+
+Identifiers that come with FPC~Pascal are coded as \.{WEB} macros and prefixed
+by `\\{fpc\_}'. That helps to resolve name clashes.
+\filbreak
+Going with Dijkstra, see
+\.{http://www.cs.utexas.edu/users/EWD/videos/noorderlicht.mpg}, I
+don't believe in version numbers, since I don't believe in maintaining
+software---I consider \namefpc\ finished---and it must go without
+a number.
+\filbreak
+\namefpc\ slightly differs from \TeX: On input, trailing blanks are
+not removed, on input of the first line, leading blanks are not
+removed either. This lets you interactively enter `\.{I \\showbox0\
+}' to make \namefpc\ show box 0. This doesn't work if the trailing
+blank were removed.
+
+\TeX\ writes an additional empty line whenever it prompts you on
+the terminal. \namefpc\ doesn't. Finally \TeX\ emits an `\.{Underfull
+\\hbox}' warning whenever the last line of a paragraph happens to include
+glue only, because then \TeX\ would erroneously remove the
+\.{parfillskip}. \namefpc\ will keep it.
+
+% \TeX82 will emit an underfull box warning here, \namefpc\ won't.
+\setbox0=\hbox to \hsize {\hfil\ \strut}
+\noindent\box0\ \ \par
+\bigskip
+\address
+\fi
+@z
+
+[2] Change the banner line
+@x
+known as `\TeX' [cf.~Stanford Computer Science report CS1027,
+November 1984].
+
+@d banner=='This is TeX, Version 3.14159265' {printed when \TeX\ starts}
+@y
+known as `\TeX' [cf.~Stanford Computer Science report CS1027,
+November 1984].
+
+\marke h Since \namefpc\ differs from \TeX\ to make me happy, I have to
+change the banner line.
+
+@d banner=='This is TeX-FPC'
+@z
+
+[4] program header
+@x
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@y
+
+\marke P Pascal wants the identifiers of the standard text files
+\\{input} and \\{output} in the parameterlist of the program header.
+
+\marke N One of the \.{WEB} macros is named \\{input}
+as well. To make \.{TANGLE} write \.{INPUT} into the Pascal source
+file instead of the expansion of the macro, you code the name as
+a concatenation of one letter identifiers since one letter identifiers
+cannot be macro names. The same
+applies to \\{type}.
+
+@d term_in==i @& n @& p @& u @& t
+@d term_out==o @& u @& t @& p @& u @& t
+@d mtype==t @& y @& p @& e
+@f mtype==type
+@z
+
+[4] program header
+@x
+program TEX; {all file names are defined dynamically}
+@y
+program TEX(@!term_in,@!term_out);
+@z
+
+Since @x, @y, and @z only define a change block when they begin a
+line, you deactivate a block by indenting it (shift right) and
+activate it by unindenting it (shift left). With vi set the cursor
+to the @x line and type >} or <} to (un)indent a paragraph.
+
+[7] shift left to turn debugging on, right to turn it off
+@x
+@d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+@d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+@y
+@d debug== {change this to `$\\{debug}\equiv\.{@@\{}$' when not debugging}
+@d gubed== {change this to `$\\{gubed}\equiv\.{@@\}}$' when not debugging}
+@z
+
+[7] shift left to turn stats on, right to turn them off.
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
+
+
+ [8] shift left to build TEX and right to build INITEX.
+ @x initex
+ @d init== {change this to `$\\{init}\equiv\.{@@\{}$' in the production version}
+ @d tini== {change this to `$\\{tini}\equiv\.{@@\}}$' in the production version}
+ @y
+ @d init==@{ {change this to `$\\{init}\equiv $' for \.{INITEX}}
+ @d tini==@t@>@} {change this to `$\\{tini}\equiv $' for \.{INITEX}}
+ @z
+
+[9] compiler directives, turn off I/O checking.
+@x
+@^overflow in arithmetic@>
+@y
+@^overflow in arithmetic@>
+
+\marke X If the first character of a \PASCAL\ comment is a dollar
+sign, Free~Pascal treats the comment as a ``compiler directive''.
+FPC aborts when it detects an I/O error. To let \namefpc\ handle
+an I/O error while opening an input file, you have to turn off I/O
+checking altogether by the \.{I-} directive.
+
+
+\marke X \$MODE ISO sets integer size to 32 bit, defines file procedures
+get, put and allows nonlocal gotos.
+
+\marke b In contrast to \ph\ Free~Pascal offers no directive to
+check for arithmetic overflow.
+
+\marke e Knuth suggests to turn on range checking while debugging.
+FPC aborts when it spots range violation. Those violations might
+happen when the debugger shows a memery cell assumed to contain a
+|glue_ratio|. Even though turning of range checking doubles the
+speed of \TeX\ I suggest to turn it on when not debugging, just to
+get another check from Knuth for discovering an error.
+
+@^system dependencies@>
+@^GNU Pascal@>
+@z
+
+[9] compiler directives, turn off I/O checking, continued
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$I-@} {no I/O checking}
+@{@&$M@&O@&D@&E I@&S@&O@}
+@!debug @{@&$R-@}@+ gubed {no range check while debugging}
+@z
+
+[10] default case branch
+@x
+\PASCAL s have, in fact, done this, successfully but not happily!)
+@:PASCAL H}{\ph@>
+
+@d othercases == others: {default for cases not listed explicitly}
+@y
+\PASCAL s have, in fact, done this, successfully but not happily!)
+@:PASCAL H}{\ph@>
+
+\marke X This is the only place I voluntarily use an FPC extension
+to Pascal.
+@^FPC Pascal@>
+
+@d othercases == @+ else {default for cases not listed explicitly}
+@z
+
+[11]
+@x
+in production versions of \TeX.
+@y
+in production versions of \TeX.
+
+\marke N I didn't change the constants, leaving it up to you to
+adopt them to your task. Just keep the Pascal source for \.{tex}
+around. So you can change them without going all the way through
+modifying \.{tex.ch} and tangeling it. Note that for \.{initex}
+|mem_top| and |mem_max| must agree.
+
+\marke U One of the constants is the filename of the string pool
+file which needs an adoption to Unix.
+@z
+
+The changes headed by trip need to be made for the trip test suite.
+
+[11]
+ @x trip
+ @!mem_max=30000; {greatest index in \TeX's internal |mem| array;
+ @y
+ @!mem_max=3000; {greatest index in \TeX's internal |mem| array;
+ @z
+
+[11]
+ @x trip
+ @!mem_min=0; {smallest index in \TeX's internal |mem| array;
+ @y
+ @!mem_min=1; {smallest index in \TeX's internal |mem| array;
+ @z
+
+[11]
+ @x trip
+ @!error_line=72; {width of context lines on terminal error messages}
+ @!half_error_line=42; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=79; {width of longest text lines output; should be at least 60}
+ @y
+ @!error_line=64; {width of context lines on terminal error messages}
+ @!half_error_line=32; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=72; {width of longest text lines output; should be at least 60}
+ @z
+
+[11] location of pool file
+@x
+@!pool_name='TeXformats:TEX.POOL ';
+@y
+@!pool_name='TeXformats/tex.pool'; { \marke X arrays of different length are
+assignment compatible. }
+@z
+
+
+[12]
+ @x trip
+ @d mem_bot=0 {smallest index in the |mem| array dumped by \.{INITEX};
+ must not be less than |mem_min|}
+ @d mem_top==30000 {largest index in the |mem| array dumped by \.{INITEX};
+ must be substantially larger than |mem_bot|
+ and not greater than |mem_max|}
+ @y
+ @d mem_bot=1 {smallest index in the |mem| array dumped by \.{INITEX};
+ must not be less than |mem_min|}
+ @d mem_top==3000 {largest index in the |mem| array dumped by \.{INITEX};
+ must be substantially larger than |mem_bot|
+ and not greater than |mem_max|}
+ @z
+
+
+[25]
+@x
+for us to specify simple operations on word files before they are defined.
+@y
+for us to specify simple operations on word files before they are
+defined.
+
+\marke X
+@d fpc_byte==b @& y @& t @& e
+@d fpc_string == r@&a@&w@&b@&y@&t@&e@&s@&t@&r@&i@&n@&g
+
+@^FPC Pascal@>
+@z
+
+[25] the type of text_files is text
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@!alpha_file=packed file of text_char; {files that contain textual data}
+@y
+@!eight_bits=fpc_byte; {unsigned one-byte quantity}
+@!alpha_file=t @& e @& x @& t; {\marke P Pascal requires |text|}
+@z
+
+[27]
+@x
+\TeX's file-opening procedures return |false| if no file identified by
+|name_of_file| could be opened.
+
+@d reset_OK(#)==erstat(#)=0
+@d rewrite_OK(#)==erstat(#)=0
+@y
+\marke X In Pascal, external files must occur in the program heading
+and FPC~Pascal asks the user whenever an external file is
+opened. But \.{initex} wants to reset \.{tex.pool} and rewrite
+\.{plain.fmt} without asking
+the user for the file name.
+FPC~Pascal lets you assign the file name to an external file.
+The function |fpc_io_result| returns a nonzero value if any
+error occurred since the last invocation of |fpc_io_result|.
+
+@^GNU Pascal@>
+@^system dependencies@>
+
+@d fpc_io_result==i@&o@&r@&e@&s@&u@&l@&t
+@d fpc_assign==a@&s@&s@&i@&g@&n
+@d reset_OK(#)==fpc_io_result=0
+@d rewrite_OK(#)==fpc_io_result=0
+@d clear_io_result==@+if fpc_io_result=0 then do_nothing
+@z
+
+[27] reset and rewrite for each of three file types
+@x alpha_file
+begin reset(f,name_of_file,'/O'); a_open_in:=reset_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); reset(f);
+a_open_in:=reset_OK(f);
+@z
+@x
+begin rewrite(f,name_of_file,'/O'); a_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+a_open_out:=rewrite_OK(f);
+@z
+
+byte_file
+@x
+begin reset(f,name_of_file,'/O'); b_open_in:=reset_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); reset(f);
+b_open_in:=reset_OK(f);
+@z
+@x
+function b_open_out(var f:byte_file):boolean;
+ {open a binary file for output}
+begin rewrite(f,name_of_file,'/O'); b_open_out:=rewrite_OK(f);
+@y
+function b_open_out(var f:byte_file):boolean;
+ {open a binary file for output}
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+b_open_out:=rewrite_OK(f);
+@z
+
+@x word_file
+begin reset(f,name_of_file,'/O'); w_open_in:=reset_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); reset(f); w_open_in:=reset_OK(f);
+@z
+@x
+begin rewrite(f,name_of_file,'/O'); w_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; fpc_assign(f,name_of_file); rewrite(f);
+w_open_out:=rewrite_OK(f);
+@z
+
+[31]
+@x
+finer tuning is often possible at well-developed \PASCAL\ sites.
+@^inner loop@>
+
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var last_nonblank:0..buf_size; {|last| with trailing blanks removed}
+begin if bypass_eoln then if not eof(f) then get(f);
+ {input the first character of the line into |f^|}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin last_nonblank:=first;
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ if buffer[last-1]<>" " then last_nonblank:=last;
+ end;
+ last:=last_nonblank; input_ln:=true;
+ end;
+end;
+@y
+finer tuning is often possible at well-developed \PASCAL\ sites.
+@^inner loop@>
+
+\marke h Since \namefpc\ does not remove trailing spaces, |buffer[last-1]|
+might hold a space.
+
+\marke P
+\ph\ lets you |reset| the terminal input file with the first |get|
+`surpressed'. For several reasons, this feature is not exploited by
+\namefpc. First, it is not provided by FPC. Second rightly so, since
+it violates the specification of Pascal. Third, it makes the program
+quite ugly by destroying the beautiful equivalence of terminal and
+disk files. Fourth, since \namefpc\ uses Pascal's standard text
+file |input|, it should not reset that file at all. Fifth, surpressing
+the first |get| is offered by \ph\ to address a problem, namely
+that the program stays in the reset function waiting for user input
+and this problem is solved much more beautiful by ``lazy I/O'',
+whereby the program only waits for user input if it is needed. This
+is suggested in the {\sl Pascal User Manual}, implemented by
+Free~Pascal and exploited by \namefpc. This leads to a much cleaner
+implementaion of |input_ln|, which can always savely assume that
+|f^| holds the first character of the next line. This condition is
+established by Pascal's |reset| and maintained by |input_ln|.
+
+\marke h
+Unlike \TeX82 \namefpc\ leaves trailing spaces in the input line.
+
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var ch: char;
+begin
+ {ignore |bypass_eoln|. Assuming |f| being positioned at the first character}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then begin
+ read_ln(f); {complete the current line}
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ end;
+ read(f, ch); buffer[last]:=xord[ch]; incr(last);
+ end;
+ read_ln(f); {Advance |f| to the first character of the next line}
+ input_ln:=true;
+ end;
+end;
+@z
+
+[32] term_in and term_out are the standard pascal files
+@x
+is considered an output file the file variable is |term_out|.
+@^system dependencies@>
+
+@<Glob...@>=
+@!term_in:alpha_file; {the terminal as an input file}
+@!term_out:alpha_file; {the terminal as an output file}
+@y
+is considered an output file the file variable is |term_out|.
+\marke P Pascal's standard text files are declared implicitly.
+@z
+
+[33]
+@x
+@ Here is how to open the terminal files
+in \ph. The `\.{/I}' switch suppresses the first |get|.
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+
+@d t_open_in==reset(term_in,'TTY:','/O/I') {open the terminal for text input}
+@d t_open_out==rewrite(term_out,'TTY:','/O') {open the terminal for text output}
+@y
+@ Here is how to open the terminal files
+in \ph. The `\.{/I}' switch suppresses the first |get|.
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+
+\marke P In Pascal, the standard text files are openend implicitly.
+
+@d t_open_in==do_nothing {open the terminal for text input}
+@d t_open_out==do_nothing {open the terminal for text output}
+@z
+
+[34]
+@x
+some instruction to the operating system. The following macros show how
+these operations can be specified in \ph:
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+@y
+some instruction to the operating system.
+
+\marke X
+Unix holds terminal output, when it receives \.{\^S} and
+continues writing to the terminal, when it receives \.{\^Q}. These
+`flow control' characters only work when sent from the terminal but
+not when sent to the terminal. \marke B Here I give up, since I
+don't know how to restart the output from the writing side so
+\namefpc\ does nothing. Mac OS X does not stop terminal output when
+it receives \.{\^S}.
+
+@^Free Pascal@>
+@^system dependencies@>
+@z
+
+[34]
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@d clear_terminal == break_in(term_in,true) {clear the terminal input buffer}
+@d wake_up_terminal == do_nothing {cancel the user's cancellation of output}
+@y
+@d fpc_flush == f@&l@&u@&s@&h
+@d update_terminal == fpc_flush(term_out) {empty the terminal output buffer}
+@d clear_terminal == do_nothing {clear the terminal input buffer}
+@d wake_up_terminal == do_nothing {cancel the user's cancellation of output}
+@z
+
+[35]
+@x
+ begin write_ln(term_out,'Buffer size exceeded!'); goto final_end;
+@y
+ begin write_ln(term_out,'Buffer size exceeded!'); fpc_halt(3);
+@z
+
+[36] command line
+@x
+not be typed immediately after~`\.{**}'.)
+
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+
+@y
+not be typed immediately after~`\.{**}'.)
+
+\marke F This procedure puts the command line arguments separated
+by spaces into |buffer|. Like |input_ln| it updates |last| so that
+|buffer[first..last)| will contain the command line.
+
+\marke X FPC~Pascal's function~|@!fpc_param_count| gives the number of
+command line arguments. The function~|@!fpc_param_str(n)| returns the
+n-th argument for |0 <= n <= gpc_param_count| in a |@!fpc_string|,
+whose length is returned by the function~|@!gpc_length|.
+A |fpc_string| is like a |packed array[1..fpc_length] of char| with
+varying length.
+
+@^FPC Pascal@>
+@^system dependencies@>
+
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@d fpc_length==l @& e @& n @& g @& t @& h
+@d fpc_param_count==p @& a @& r @& a @& m @& c @& o @& u @& n @& t
+@d fpc_param_str==p @& a @& r @& a @& m @&s @& t @& r
+ {FPC function returning the length of a |fpc_string|}
+
+@p procedure input_command_ln; {get the command line in |buffer|}
+var argc: integer; {argument counter}
+ arg: fpc_string; {argument}
+ cc: integer; {character counter in argument}
+begin last := first; argc := 1;
+while argc <= fpc_param_count do
+ begin cc := 1; arg := fpc_param_str(argc); incr(argc);
+ while cc <= fpc_length(arg) do
+ begin
+ if last+1>=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ buffer[last] := xord[arg[cc]]; incr(last); incr(cc);
+ end;
+ if (argc <= fpc_param_count) then begin
+ buffer[last] := " "; incr(last); {insert a space between arguments}
+ end;
+ end;
+end;
+@z
+
+[37] command line.
+@x
+@ The following program does the required initialization
+without retrieving a possible command line.
+It should be clear how to modify this routine to deal with command lines,
+if the system permits them.
+@^system dependencies@>
+
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in;
+loop@+begin wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in,true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ loc:=first;
+ while (loc<last)and(buffer[loc]=" ") do incr(loc);
+ if loc<last then
+ begin init_terminal:=true;
+ return; {return unless the line was all blank}
+ end;
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+exit:end;
+@y
+@ \marke F The following program treats a non empty command line as
+the first line.
+
+
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in; input_command_ln;
+while first=last do begin
+ wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in, true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write_ln(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ if first=last then
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+loc := first;
+init_terminal:=true;
+exit: end;
+@z
+[109]
+@x
+routines cited there must be modified to allow negative glue ratios.)
+@y
+routines cited there must be modified to allow negative glue ratios.)
+
+\marke X In FPC~Pascal the type |fpc_single| is appropiate.
+@d fpc_single== s@&i@&n@&g@&l@&e
+@z
+
+@x
+@!glue_ratio=real; {one-word representation of a glue expansion factor}
+@y
+@!glue_ratio=fpc_single; {one-word representation of a glue expansion
+ factor in GNU~Pascal}
+@^FPC Pascal@>
+@z
+
+[112]
+@x
+macros are simplified in the obvious way when |min_quarterword=0|.
+@^inner loop@>@^system dependencies@>
+
+@d qi(#)==#+min_quarterword
+ {to put an |eight_bits| item into a quarterword}
+@d qo(#)==#-min_quarterword
+ {to take an |eight_bits| item out of a quarterword}
+@d hi(#)==#+min_halfword
+ {to put a sixteen-bit item into a halfword}
+@d ho(#)==#-min_halfword
+ {to take a sixteen-bit item from a halfword}
+@y
+macros are simplified in the obvious way when |min_quarterword=0|.
+\marke X Which is the case with FPC.
+@^inner loop@>@^system dependencies@>
+
+@d qi(#)==#
+ {to put an |eight_bits| item into a quarterword}
+@d qo(#)==#
+ {to take an |eight_bits| item out of a quarterword}
+@d hi(#)==#
+ {to put a sixteen-bit item into a halfword}
+@d ho(#)==#
+ {to take a sixteen-bit item from a halfword}
+@z
+
+[360] Don't print empty lines
+@x
+@ All of the easy branches of |get_next| have now been taken care of.
+There is one more branch.
+@y
+@ All of the easy branches of |get_next| have now been taken care of.
+There is one more branch.
+
+\marke h \TeX82 ends the current line by calling |print_ln| even
+if the line is empty. This causes an additional empty line, which
+is ugly. Calling |print_nl("")| is smarter. It ends the current
+line only if it is not empty.
+@z
+
+@x
+ print_ln; first:=start;
+@y
+ print_nl(""); first:=start;
+@z
+
+@x [514]
+|TEX_font_area|. These system area names will, of course, vary from place
+to place.
+@y
+|TEX_font_area|. These system area names will, of course, vary from place
+to place.
+
+\marke U Use the Unix file separator.
+@z
+
+[514]
+@x
+@d TEX_area=="TeXinputs:"
+@.TeXinputs@>
+@d TEX_font_area=="TeXfonts:"
+@.TeXfonts@>
+@y
+@d TEX_area=="TeXinputs/" {i.e., a subdirectory of the working directory}
+@.TeXinputs@>
+@d TEX_font_area=="TeXfonts/" {dito}
+@.TeXfonts@>
+@z
+
+[516]
+@x
+ if (c=">")or(c=":") then
+@y
+ if c="/" then {use ``/'' as a file name separator\marke U}
+@z
+
+[519]
+@x
+@d append_to_name(#)==begin c:=#; incr(k);
+@y
+@d fpc_set_length==s@&e@&t@&l@&e@&n@&g@&t@&h
+
+@d append_to_name(#)==begin c:=#; incr(k);
+@z
+
+[519]
+@x
+@!j:pool_pointer; {index into |str_pool|}
+@y
+@!j:pool_pointer; {index into |str_pool|}
+@!rbs: fpc_string;
+@z
+
+[519]
+@x
+if k<=file_name_size then name_length:=k@+else name_length:=file_name_size;
+for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
+end;
+@y
+if k<=file_name_size then name_length:=k@+else name_length:=file_name_size;
+rbs := name_of_file;
+fpc_set_length(rbs, name_length);
+name_of_file := rbs;
+end;
+@z
+
+[521]
+@x
+TEX_format_default:='TeXformats:plain.fmt';
+@y
+TEX_format_default:='TeXformats/plain.fmt';
+ {``/'' is the Unix file name separator\marke U}
+@z
+
+[523]
+@x
+isn't found.
+@y
+isn't found.
+\marke X With Free~Pascal you cannot set the length of a |packed array|.
+But assigning the |name_of_file| to a |fpc_string|, setting the length to the
+|fpc_string| and then assigning it to the |name_of_file| saves the day.
+@z
+[523]
+@x
+@!j:integer; {index into |buffer| or |TEX_format_default|}
+@y
+@!j:integer; {index into |buffer| or |TEX_format_default|}
+rbs: fpc_string;
+@z
+
+@x
+for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
+@y
+rbs := name_of_file;
+fpc_set_length(rbs, name_length);
+name_of_file := rbs;
+@z
+
+[575] Don't check eof
+@x
+no error message is given for files having more than |lf| words.
+@y
+no error message is given for files having more than |lf| words.
+\marke X EOF is true, even before the end of file is passed. This is
+an error of the free pascal runtime library.
+@z
+@x
+if eof(tfm_file) then abort;
+@y
+@z
+
+[816] save pointer to penalty_node
+@x
+same number of |mem|~words.
+@^data structure assumptions@>
+@y
+same number of |mem|~words.
+@^data structure assumptions@>
+
+\marke E
+\TeX82 prunes discardable nodes from the beginning of a new line until
+it reaches a nondiscardable node. Now, if the last line of a paragraph
+contains discardables only, the \.{\\parfillskip} glue at the end of the
+paragraph will also be removed, since it is a discardable. This will
+give you an empty \.{\\hbox}. Finally \TeX\ appends \.{\\rightskip} glue.
+This gives you a nonempty \.{\\hbox}, raising a \.{Underfull \\hbox}
+warning.
+
+To avoid this happening, \namefpc\ saves a pointer to the node
+immediately preceding the \.{\\parfillskip} node and quits pruning
+when it encounters this node several procedures later.
+@^Underfull \\hbox...@>
+@z
+
+@x
+link(tail):=new_param_glue(par_fill_skip_code);
+@y
+non_prunable_p := tail; {points to the node immediately before
+\.{\\parfillskip}}
+link(tail):=new_param_glue(par_fill_skip_code);
+@z
+
+[862] declare non_prunable_p
+@x
+The following declarations provide for a few other local variables that are
+used in special calculations.
+
+@y
+The following declarations provide for a few other local variables that are
+used in special calculations.
+
+\marke E Declare the |non_prunable_p| pointer.
+@z
+
+@x
+@!auto_breaking:boolean; {is node |cur_p| outside a formula?}
+@y
+@!auto_breaking:boolean; {is node |cur_p| outside a formula?}
+non_prunable_p:pointer; {pointer to the node before \.{\\parfillskip}}
+@z
+
+[876] pass non_prunable_p
+@x
+(By introducing this subprocedure, we are able to keep |line_break|
+from getting extremely long.)
+@y
+(By introducing this subprocedure, we are able to keep |line_break|
+from getting extremely long.)
+
+\marke E Pass |non_prunable_p| to the |post_line_break|~procedure.
+@z
+
+@x
+post_line_break(final_widow_penalty)
+@y
+post_line_break(final_widow_penalty, non_prunable_p)
+@z
+
+[877] declare non_prunable_p
+@x
+of their new significance.) Then the lines are justified, one by one.
+
+@y
+of their new significance.) Then the lines are justified, one by one.
+
+\marke E Declare another parameter. It holds the pointer to the node
+immediately preceding \.{\\parfillskip}.
+@z
+
+@x
+procedure post_line_break(@!final_widow_penalty:integer);
+@y
+procedure post_line_break(@!final_widow_penalty:integer;
+ non_prunable_p:pointer);
+@z
+
+[879]
+@x
+are computed for non-discretionary breakpoints.
+@y
+are computed for non-discretionary breakpoints.
+
+\marke E The pointer |non_prunable_p| references the node immediately
+preceding the \.{\\parfillskip} node at the end of the paragraph.
+Stop pruning at this node.
+@z
+
+[879]
+@x
+ if non_discardable(q) then goto done1;
+@y
+ if non_discardable(q) then goto done1;
+ if q = non_prunable_p then goto done1; {retain \.{\\parfillskip} glue}
+@z
+
+[1327]
+@x
+if (x<>69069)or eof(fmt_file) then goto bad_fmt
+@y
+if (x<>69069) then goto bad_fmt
+@z
+
+[1332]
+@x
+The initial test involving |ready_already| should be deleted if the
+\PASCAL\ runtime system is smart enough to detect such a ``mistake.''
+@^system dependencies@>
+@y
+The initial test involving |ready_already| should be deleted if the
+\PASCAL\ runtime system is smart enough to detect such a ``mistake.''
+@^system dependencies@>
+
+\marke h \namefpc\ tries to load the format file even before it
+initializes the output routines. That way, it will print the name of
+the format file on the terminal.
+
+\marke X
+|@!fpc_halt|
+passes the |history| as an exit code to the shell.
+
+@^system dependencies@>
+@^GNU Pascal@>
+@^Unix@>
+
+@d fpc_halt == h@&a@&l@&t
+@z
+
+[1332]
+@x
+start_of_TEX: @<Initialize the output routines@>;
+@y
+start_of_TEX: @<Preload the default format file@>;
+@<Initialize the output routines@>;
+@z
+
+[1332]
+@x
+final_end: ready_already:=0;
+@y
+final_end:
+fpc_halt(history);
+ {pass |history| as the exit value to the system\marke u}
+@z
+
+[1333] print last end-of-line marker if needed
+@x
+This program doesn't bother to close the input files that may still be open.
+@y
+This program doesn't bother to close the input files that may still be open.
+
+\marke h
+Special care is taken to terminate the last line on the terminal.
+
+@z
+
+[1333] print last end-of-line marker if needed
+@x
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+end;
+@y
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+ if term_offset > 0 then wterm_cr;
+end;
+@z
+
+[1338] return if eof.
+@x
+program below. (If |m=13|, there is an additional argument, |l|.)
+@.debug \#@>
+
+@y
+program below. (If |m=13|, there is an additional argument, |l|.)
+@.debug \#@>
+
+\marke P A Pascal program must not read from the standard text file
+if the end of file is reached. Even in this respect, Unix and Pascal
+treat terminals and disk files alike.
+
+@z
+@x
+begin loop begin wake_up_terminal;
+@y
+begin loop begin; wake_up_terminal;
+@z
+
+@x
+ read(term_in,m);
+@y
+ if eof(term_in) then return;
+ read(term_in,m);
+@z
+
+[1338] return if eof
+@x
+ else begin read(term_in,n);
+@y
+ else begin if eof(term_in) then return;
+ read(term_in,n);
+@z
+
+[1339] return if eof
+@x
+13: begin read(term_in,l); print_cmd_chr(n,l);
+@y
+13: begin if eof(term_in) then return;
+read(term_in,l); print_cmd_chr(n,l);
+@z
+
+[1379 and modules added for TeX-FPC]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+
+\marke h Try to preload the default format file. This is called
+even before the first line is read from the terminal, and thus
+turns \.{VIRTEX} into \.{TEX}, at least as experienced by the user.
+\.{INITEX} sets |format_ident| to `\.{INITEX}' and won't load a
+format file here.
+
+@<Preload the default format file@>=
+if format_ident = 0 then
+ begin pack_buffered_name(format_default_length - format_ext_length, 1, 0);
+ if not w_open_in(fmt_file) then
+ begin
+ wterm_ln('I can''t find the format file ', name_of_file);
+ goto final_end
+ end;
+ if not load_fmt_file then
+ begin w_close(fmt_file); goto final_end
+ end;
+ w_close(fmt_file);
+ end
+@z
diff --git a/systems/unix/tex-fpc/web/tangle.ch b/systems/unix/tex-fpc/web/tangle.ch
new file mode 100644
index 0000000000..97c7232edf
--- /dev/null
+++ b/systems/unix/tex-fpc/web/tangle.ch
@@ -0,0 +1,179 @@
+% This is a change file for TANGLE-FPC, Wolfgang Helbig, Nov. 2007
+% Apr. 2008 take file names from command line
+% Jul. 2008 pass the exit code
+% Jul. 2016 change from gpc to fpc
+
+[0] About TANGLE-FPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-fpc
+\def\name{{\tt TANGLE}}
+
+\let\maybe=\iffalse % print changed modules only.
+
+\N0\*. About \namefpc.\fi
+This is an adaption of Donald~E. Knuth's \.{TANGLE}, version 4.5
+from December 2002, to Unix. \namefpc\ is based on Free Pascal, version
+3.0
+
+This program expects four file names on the command line: Two input
+files, the web and change file, followed by two output files, the
+Pascal and string pool file. If you call \namefpc\ with the wrong number
+of command line arguments, it will tell you and exit.
+
+To support shell scripting, tangle sets the exit code to its
+`\\{history}'---zero means ok, one means a warning was issued, two
+an error occurred and three means \.{TANGLE} ended prematurely.
+
+\hint
+
+Comments and questions are welcome!
+\bigskip
+\address
+@z
+
+[1] Change the banner line
+@x
+@d banner=='This is TANGLE, Version 4.5'
+@y
+@d banner=='This is TANGLE-FPC'
+@z
+
+[2] terminal output and input
+@x
+program TANGLE(@!web_file,@!change_file,@!Pascal_file,@!pool);
+@y
+program TANGLE(@!input,@!output);
+@z
+
+ [3] turn debugging on
+ @x
+ @d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+ @d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+ @y
+ @d debug==
+ @d gubed==
+ @z
+
+[3] turn stats on
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$'
+ when gathering usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$'
+ when gathering usage statistics}
+@y
+@d stat==
+@d tats==
+@z
+
+[4] compiler directives
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$M@&O@&D@&E I@&S@&O@}
+@z
+
+[7] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[12] the type of text_files is text in ISO Pascal
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[20] terminal output
+@x
+@d print(#)==write(term_out,#) {`|print|' means write on the terminal}
+@y
+@d term_out == output
+@d term_in == input
+@d print(#)==write(term_out,#) {`|print|' means write on the terminal}
+@z
+
+[20] terminal output, implicitely defined in ISO Pasal
+@x
+@<Globals...@>=
+@!term_out:text_file; {the terminal as an output file}
+@y
+@z
+
+[21] terminal output, output is rewritten implicitely in ISO Pascal
+@x
+@<Set init...@>=
+rewrite(term_out,'TTY:'); {send |term_out| output to the terminal}
+@y
+@z
+
+[22] terminal output, don't need update in ISO Pascal
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@y
+@d update_terminal == do_nothing
+@z
+
+[24] get file names from command line arguments
+@x
+begin reset(web_file); reset(change_file);
+@y
+begin
+assign(web_file, paramstr(1));
+assign(change_file, paramstr(2));
+reset(web_file); reset(change_file);
+@z
+
+[26] get file names from command line arguments
+@x
+rewrite(Pascal_file); rewrite(pool);
+@y
+if paramcount <> 4 then begin
+ fatal_error('Usage: ntangle web_file change_file pascal_file pool_file');
+ end;
+assign(Pascal_file, paramstr(3)); assign(pool, paramstr(4));
+rewrite(Pascal_file); rewrite(pool);
+@z
+
+[38] increase token capacity to tangle mf.
+@x
+@d zz=3 {we multiply the token capacity by approximately this amount}
+@y
+@d zz=4 {we need 4 not 3 to tangle mf}
+@z
+
+[179]
+@x
+@!term_in:text_file; {the user's terminal as an input file}
+@y
+@z
+
+[180] terminal input, implicitely done by Pascal
+@x
+reset(term_in,'TTY:','/I'); {open |term_in| as the terminal, don't do a |get|}
+@y
+@z
+
+[183] close output files
+@x
+@t\4\4@>{here files should be closed if the operating system requires it}
+@y
+close(Pascal_file); close(pool);
+@z
+
+[187] put eol after last terminal out line
+@x
+fatal_message: print_nl('(That was a fatal error, my friend.)');
+end {there are no other cases}
+@y
+fatal_message: print_nl('(That was a fatal error, my friend.)');
+end; {there are no other cases}
+new_line;
+halt(history) {pass the history as exit code to the operating system}
+@z
diff --git a/systems/unix/tex-fpc/web/tangle.p b/systems/unix/tex-fpc/web/tangle.p
new file mode 100644
index 0000000000..fcb3927326
--- /dev/null
+++ b/systems/unix/tex-fpc/web/tangle.p
@@ -0,0 +1,793 @@
+{2:}{4:}{$MODE ISO}{:4}PROGRAM TANGLE(INPUT,OUTPUT);LABEL 9999;
+CONST{8:}BUFSIZE=100;MAXBYTES=45000;MAXTOKS=50000;MAXNAMES=4000;
+MAXTEXTS=2000;HASHSIZE=353;LONGESTNAME=400;LINELENGTH=72;OUTBUFSIZE=144;
+STACKSIZE=50;MAXIDLENGTH=12;UNAMBIGLENGT=7;
+{:8}TYPE{11:}ASCIICODE=0..255;{:11}{12:}TEXTFILE=TEXT;
+{:12}{37:}EIGHTBITS=0..255;SIXTEENBITS=0..65535;
+{:37}{39:}NAMEPOINTER=0..MAXNAMES;{:39}{43:}TEXTPOINTER=0..MAXTEXTS;
+{:43}{78:}OUTPUTSTATE=RECORD ENDFIELD:SIXTEENBITS;BYTEFIELD:SIXTEENBITS;
+NAMEFIELD:NAMEPOINTER;REPLFIELD:TEXTPOINTER;MODFIELD:0..12287;END;
+{:78}VAR{9:}HISTORY:0..3;{:9}{13:}XORD:ARRAY[CHAR]OF ASCIICODE;
+XCHR:ARRAY[ASCIICODE]OF CHAR;{:13}{23:}WEBFILE:TEXTFILE;
+CHANGEFILE:TEXTFILE;{:23}{25:}PASCALFILE:TEXTFILE;POOL:TEXTFILE;
+{:25}{27:}BUFFER:ARRAY[0..BUFSIZE]OF ASCIICODE;
+{:27}{29:}PHASEONE:BOOLEAN;
+{:29}{38:}BYTEMEM:PACKED ARRAY[0..1,0..MAXBYTES]OF ASCIICODE;
+TOKMEM:PACKED ARRAY[0..3,0..MAXTOKS]OF EIGHTBITS;
+BYTESTART:ARRAY[0..MAXNAMES]OF SIXTEENBITS;
+TOKSTART:ARRAY[0..MAXTEXTS]OF SIXTEENBITS;
+LINK:ARRAY[0..MAXNAMES]OF SIXTEENBITS;
+ILK:ARRAY[0..MAXNAMES]OF SIXTEENBITS;
+EQUIV:ARRAY[0..MAXNAMES]OF SIXTEENBITS;
+TEXTLINK:ARRAY[0..MAXTEXTS]OF SIXTEENBITS;{:38}{40:}NAMEPTR:NAMEPOINTER;
+STRINGPTR:NAMEPOINTER;BYTEPTR:ARRAY[0..1]OF 0..MAXBYTES;
+POOLCHECKSUM:INTEGER;{:40}{44:}TEXTPTR:TEXTPOINTER;
+TOKPTR:ARRAY[0..3]OF 0..MAXTOKS;Z:0..3;
+MAXTOKPTR:ARRAY[0..3]OF 0..MAXTOKS;{:44}{50:}IDFIRST:0..BUFSIZE;
+IDLOC:0..BUFSIZE;DOUBLECHARS:0..BUFSIZE;
+HASH,CHOPHASH:ARRAY[0..HASHSIZE]OF SIXTEENBITS;
+CHOPPEDID:ARRAY[0..UNAMBIGLENGT]OF ASCIICODE;
+{:50}{65:}MODTEXT:ARRAY[0..LONGESTNAME]OF ASCIICODE;
+{:65}{70:}LASTUNNAMED:TEXTPOINTER;{:70}{79:}CURSTATE:OUTPUTSTATE;
+STACK:ARRAY[1..STACKSIZE]OF OUTPUTSTATE;STACKPTR:0..STACKSIZE;
+{:79}{80:}ZO:0..3;{:80}{82:}BRACELEVEL:EIGHTBITS;
+{:82}{86:}CURVAL:INTEGER;
+{:86}{94:}OUTBUF:ARRAY[0..OUTBUFSIZE]OF ASCIICODE;OUTPTR:0..OUTBUFSIZE;
+BREAKPTR:0..OUTBUFSIZE;SEMIPTR:0..OUTBUFSIZE;
+{:94}{95:}OUTSTATE:EIGHTBITS;OUTVAL,OUTAPP:INTEGER;OUTSIGN:ASCIICODE;
+LASTSIGN:-1..+1;{:95}{100:}OUTCONTRIB:ARRAY[1..LINELENGTH]OF ASCIICODE;
+{:100}{124:}II:INTEGER;LINE:INTEGER;OTHERLINE:INTEGER;TEMPLINE:INTEGER;
+LIMIT:0..BUFSIZE;LOC:0..BUFSIZE;INPUTHASENDE:BOOLEAN;CHANGING:BOOLEAN;
+{:124}{126:}CHANGEBUFFER:ARRAY[0..BUFSIZE]OF ASCIICODE;
+CHANGELIMIT:0..BUFSIZE;{:126}{143:}CURMODULE:NAMEPOINTER;
+SCANNINGHEX:BOOLEAN;{:143}{156:}NEXTCONTROL:EIGHTBITS;
+{:156}{164:}CURREPLTEXT:TEXTPOINTER;{:164}{171:}MODULECOUNT:0..12287;
+{:171}{179:}{TROUBLESHOOT:BOOLEAN;DDT:INTEGER;DD:INTEGER;
+DEBUGCYCLE:INTEGER;DEBUGSKIPPED:INTEGER;}{:179}{185:}WO:0..1;
+{:185}{30:}{PROCEDURE DEBUGHELP;FORWARD;}{:30}{31:}PROCEDURE ERROR;
+VAR J:0..OUTBUFSIZE;K,L:0..BUFSIZE;
+BEGIN IF PHASEONE THEN{32:}BEGIN IF CHANGING THEN WRITE(OUTPUT,
+'. (change file ')ELSE WRITE(OUTPUT,'. (');
+WRITELN(OUTPUT,'l.',LINE:1,')');IF LOC>=LIMIT THEN L:=LIMIT ELSE L:=LOC;
+FOR K:=1 TO L DO IF BUFFER[K-1]=9 THEN WRITE(OUTPUT,' ')ELSE WRITE(
+OUTPUT,XCHR[BUFFER[K-1]]);WRITELN(OUTPUT);
+FOR K:=1 TO L DO WRITE(OUTPUT,' ');
+FOR K:=L+1 TO LIMIT DO WRITE(OUTPUT,XCHR[BUFFER[K-1]]);
+WRITE(OUTPUT,' ');
+END{:32}ELSE{33:}BEGIN WRITELN(OUTPUT,'. (l.',LINE:1,')');
+FOR J:=1 TO OUTPTR DO WRITE(OUTPUT,XCHR[OUTBUF[J-1]]);
+WRITE(OUTPUT,'... ');END{:33};;HISTORY:=2;{DEBUGSKIPPED:=DEBUGCYCLE;
+DEBUGHELP;}END;{:31}{34:}PROCEDURE JUMPOUT;BEGIN GOTO 9999;END;
+{:34}PROCEDURE INITIALIZE;VAR{16:}I:0..255;{:16}{41:}WI:0..1;
+{:41}{45:}ZI:0..3;{:45}{51:}H:0..HASHSIZE;{:51}BEGIN{10:}HISTORY:=0;
+{:10}{14:}XCHR[32]:=' ';XCHR[33]:='!';XCHR[34]:='"';XCHR[35]:='#';
+XCHR[36]:='$';XCHR[37]:='%';XCHR[38]:='&';XCHR[39]:='''';XCHR[40]:='(';
+XCHR[41]:=')';XCHR[42]:='*';XCHR[43]:='+';XCHR[44]:=',';XCHR[45]:='-';
+XCHR[46]:='.';XCHR[47]:='/';XCHR[48]:='0';XCHR[49]:='1';XCHR[50]:='2';
+XCHR[51]:='3';XCHR[52]:='4';XCHR[53]:='5';XCHR[54]:='6';XCHR[55]:='7';
+XCHR[56]:='8';XCHR[57]:='9';XCHR[58]:=':';XCHR[59]:=';';XCHR[60]:='<';
+XCHR[61]:='=';XCHR[62]:='>';XCHR[63]:='?';XCHR[64]:='@';XCHR[65]:='A';
+XCHR[66]:='B';XCHR[67]:='C';XCHR[68]:='D';XCHR[69]:='E';XCHR[70]:='F';
+XCHR[71]:='G';XCHR[72]:='H';XCHR[73]:='I';XCHR[74]:='J';XCHR[75]:='K';
+XCHR[76]:='L';XCHR[77]:='M';XCHR[78]:='N';XCHR[79]:='O';XCHR[80]:='P';
+XCHR[81]:='Q';XCHR[82]:='R';XCHR[83]:='S';XCHR[84]:='T';XCHR[85]:='U';
+XCHR[86]:='V';XCHR[87]:='W';XCHR[88]:='X';XCHR[89]:='Y';XCHR[90]:='Z';
+XCHR[91]:='[';XCHR[92]:='\';XCHR[93]:=']';XCHR[94]:='^';XCHR[95]:='_';
+XCHR[96]:='`';XCHR[97]:='a';XCHR[98]:='b';XCHR[99]:='c';XCHR[100]:='d';
+XCHR[101]:='e';XCHR[102]:='f';XCHR[103]:='g';XCHR[104]:='h';
+XCHR[105]:='i';XCHR[106]:='j';XCHR[107]:='k';XCHR[108]:='l';
+XCHR[109]:='m';XCHR[110]:='n';XCHR[111]:='o';XCHR[112]:='p';
+XCHR[113]:='q';XCHR[114]:='r';XCHR[115]:='s';XCHR[116]:='t';
+XCHR[117]:='u';XCHR[118]:='v';XCHR[119]:='w';XCHR[120]:='x';
+XCHR[121]:='y';XCHR[122]:='z';XCHR[123]:='{';XCHR[124]:='|';
+XCHR[125]:='}';XCHR[126]:='~';XCHR[0]:=' ';XCHR[127]:=' ';
+{:14}{17:}FOR I:=1 TO 31 DO XCHR[I]:=' ';
+FOR I:=128 TO 255 DO XCHR[I]:=' ';
+{:17}{18:}FOR I:=0 TO 255 DO XORD[CHR(I)]:=32;
+FOR I:=1 TO 255 DO XORD[XCHR[I]]:=I;XORD[' ']:=32;
+{:18}{26:}IF PARAMCOUNT<>4 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'Usage: ntangle web_file change_file pascal_file pool_file'
+);ERROR;HISTORY:=3;JUMPOUT;END;END;ASSIGN(PASCALFILE,PARAMSTR(3));
+ASSIGN(POOL,PARAMSTR(4));REWRITE(PASCALFILE);REWRITE(POOL);
+{:26}{42:}FOR WI:=0 TO 1 DO BEGIN BYTESTART[WI]:=0;BYTEPTR[WI]:=0;END;
+BYTESTART[2]:=0;NAMEPTR:=1;STRINGPTR:=256;POOLCHECKSUM:=271828;
+{:42}{46:}FOR ZI:=0 TO 3 DO BEGIN TOKSTART[ZI]:=0;TOKPTR[ZI]:=0;END;
+TOKSTART[4]:=0;TEXTPTR:=1;Z:=1 MOD 4;{:46}{48:}ILK[0]:=0;EQUIV[0]:=0;
+{:48}{52:}FOR H:=0 TO HASHSIZE-1 DO BEGIN HASH[H]:=0;CHOPHASH[H]:=0;END;
+{:52}{71:}LASTUNNAMED:=0;TEXTLINK[0]:=0;{:71}{144:}SCANNINGHEX:=FALSE;
+{:144}{152:}MODTEXT[0]:=32;{:152}{180:}{TROUBLESHOOT:=TRUE;
+DEBUGCYCLE:=1;DEBUGSKIPPED:=0;TROUBLESHOOT:=FALSE;DEBUGCYCLE:=99999;}
+{:180}END;{:2}{24:}PROCEDURE OPENINPUT;
+BEGIN ASSIGN(WEBFILE,PARAMSTR(1));ASSIGN(CHANGEFILE,PARAMSTR(2));
+RESET(WEBFILE);RESET(CHANGEFILE);END;
+{:24}{28:}FUNCTION INPUTLN(VAR F:TEXTFILE):BOOLEAN;
+VAR FINALLIMIT:0..BUFSIZE;BEGIN LIMIT:=0;FINALLIMIT:=0;
+IF EOF(F)THEN INPUTLN:=FALSE ELSE BEGIN WHILE NOT EOLN(F)DO BEGIN BUFFER
+[LIMIT]:=XORD[F^];GET(F);LIMIT:=LIMIT+1;
+IF BUFFER[LIMIT-1]<>32 THEN FINALLIMIT:=LIMIT;
+IF LIMIT=BUFSIZE THEN BEGIN WHILE NOT EOLN(F)DO GET(F);LIMIT:=LIMIT-1;
+IF FINALLIMIT>LIMIT THEN FINALLIMIT:=LIMIT;BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Input line too long');END;LOC:=0;ERROR;END;END;
+READLN(F);LIMIT:=FINALLIMIT;INPUTLN:=TRUE;END;END;
+{:28}{49:}PROCEDURE PRINTID(P:NAMEPOINTER);VAR K:0..MAXBYTES;W:0..1;
+BEGIN IF P>=NAMEPTR THEN WRITE(OUTPUT,'IMPOSSIBLE')ELSE BEGIN W:=P MOD 2
+;
+FOR K:=BYTESTART[P]TO BYTESTART[P+2]-1 DO WRITE(OUTPUT,XCHR[BYTEMEM[W,K]
+]);END;END;{:49}{53:}FUNCTION IDLOOKUP(T:EIGHTBITS):NAMEPOINTER;
+LABEL 31,32;VAR C:EIGHTBITS;I:0..BUFSIZE;H:0..HASHSIZE;K:0..MAXBYTES;
+W:0..1;L:0..BUFSIZE;P,Q:NAMEPOINTER;S:0..UNAMBIGLENGT;
+BEGIN L:=IDLOC-IDFIRST;{54:}H:=BUFFER[IDFIRST];I:=IDFIRST+1;
+WHILE I<IDLOC DO BEGIN H:=(H+H+BUFFER[I])MOD HASHSIZE;I:=I+1;END{:54};
+{55:}P:=HASH[H];
+WHILE P<>0 DO BEGIN IF BYTESTART[P+2]-BYTESTART[P]=L THEN{56:}BEGIN I:=
+IDFIRST;K:=BYTESTART[P];W:=P MOD 2;
+WHILE(I<IDLOC)AND(BUFFER[I]=BYTEMEM[W,K])DO BEGIN I:=I+1;K:=K+1;END;
+IF I=IDLOC THEN GOTO 31;END{:56};P:=LINK[P];END;P:=NAMEPTR;
+LINK[P]:=HASH[H];HASH[H]:=P;31:{:55};
+IF(P=NAMEPTR)OR(T<>0)THEN{57:}BEGIN IF((P<>NAMEPTR)AND(T<>0)AND(ILK[P]=0
+))OR((P=NAMEPTR)AND(T=0)AND(BUFFER[IDFIRST]<>34))THEN{58:}BEGIN I:=
+IDFIRST;S:=0;H:=0;
+WHILE(I<IDLOC)AND(S<UNAMBIGLENGT)DO BEGIN IF BUFFER[I]<>95 THEN BEGIN IF
+BUFFER[I]>=97 THEN CHOPPEDID[S]:=BUFFER[I]-32 ELSE CHOPPEDID[S]:=BUFFER[
+I];H:=(H+H+CHOPPEDID[S])MOD HASHSIZE;S:=S+1;END;I:=I+1;END;
+CHOPPEDID[S]:=0;END{:58};
+IF P<>NAMEPTR THEN{59:}BEGIN IF ILK[P]=0 THEN BEGIN IF T=1 THEN BEGIN
+WRITELN(OUTPUT);WRITE(OUTPUT,'! This identifier has already appeared');
+ERROR;END;{60:}Q:=CHOPHASH[H];
+IF Q=P THEN CHOPHASH[H]:=EQUIV[P]ELSE BEGIN WHILE EQUIV[Q]<>P DO Q:=
+EQUIV[Q];EQUIV[Q]:=EQUIV[P];END{:60};END ELSE BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! This identifier was defined before');ERROR;END;
+ILK[P]:=T;
+END{:59}ELSE{61:}BEGIN IF(T=0)AND(BUFFER[IDFIRST]<>34)THEN{62:}BEGIN Q:=
+CHOPHASH[H];WHILE Q<>0 DO BEGIN{63:}BEGIN K:=BYTESTART[Q];S:=0;
+W:=Q MOD 2;
+WHILE(K<BYTESTART[Q+2])AND(S<UNAMBIGLENGT)DO BEGIN C:=BYTEMEM[W,K];
+IF C<>95 THEN BEGIN IF C>=97 THEN C:=C-32;
+IF CHOPPEDID[S]<>C THEN GOTO 32;S:=S+1;END;K:=K+1;END;
+IF(K=BYTESTART[Q+2])AND(CHOPPEDID[S]<>0)THEN GOTO 32;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Identifier conflict with ');END;
+FOR K:=BYTESTART[Q]TO BYTESTART[Q+2]-1 DO WRITE(OUTPUT,XCHR[BYTEMEM[W,K]
+]);ERROR;Q:=0;32:END{:63};Q:=EQUIV[Q];END;EQUIV[P]:=CHOPHASH[H];
+CHOPHASH[H]:=P;END{:62};W:=NAMEPTR MOD 2;K:=BYTEPTR[W];
+IF K+L>MAXBYTES THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','byte memory',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;IF NAMEPTR>MAXNAMES-2 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','name',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;I:=IDFIRST;WHILE I<IDLOC DO BEGIN BYTEMEM[W,K]:=BUFFER[I];
+K:=K+1;I:=I+1;END;BYTEPTR[W]:=K;BYTESTART[NAMEPTR+2]:=K;
+NAMEPTR:=NAMEPTR+1;
+IF BUFFER[IDFIRST]<>34 THEN ILK[P]:=T ELSE{64:}BEGIN ILK[P]:=1;
+IF L-DOUBLECHARS=2 THEN EQUIV[P]:=BUFFER[IDFIRST+1]+32768 ELSE BEGIN
+EQUIV[P]:=STRINGPTR+32768;L:=L-DOUBLECHARS-1;
+IF L>99 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Preprocessed string is too long');ERROR;END;
+STRINGPTR:=STRINGPTR+1;WRITE(POOL,XCHR[48+L DIV 10],XCHR[48+L MOD 10]);
+POOLCHECKSUM:=POOLCHECKSUM+POOLCHECKSUM+L;
+WHILE POOLCHECKSUM>536870839 DO POOLCHECKSUM:=POOLCHECKSUM-536870839;
+I:=IDFIRST+1;WHILE I<IDLOC DO BEGIN WRITE(POOL,XCHR[BUFFER[I]]);
+POOLCHECKSUM:=POOLCHECKSUM+POOLCHECKSUM+BUFFER[I];
+WHILE POOLCHECKSUM>536870839 DO POOLCHECKSUM:=POOLCHECKSUM-536870839;
+IF(BUFFER[I]=34)OR(BUFFER[I]=64)THEN I:=I+2 ELSE I:=I+1;END;
+WRITELN(POOL);END;END{:64};END{:61};END{:57};IDLOOKUP:=P;END;
+{:53}{66:}FUNCTION MODLOOKUP(L:SIXTEENBITS):NAMEPOINTER;LABEL 31;
+VAR C:0..4;J:0..LONGESTNAME;K:0..MAXBYTES;W:0..1;P:NAMEPOINTER;
+Q:NAMEPOINTER;BEGIN C:=2;Q:=0;P:=ILK[0];
+WHILE P<>0 DO BEGIN{68:}BEGIN K:=BYTESTART[P];W:=P MOD 2;C:=1;J:=1;
+WHILE(K<BYTESTART[P+2])AND(J<=L)AND(MODTEXT[J]=BYTEMEM[W,K])DO BEGIN K:=
+K+1;J:=J+1;END;
+IF K=BYTESTART[P+2]THEN IF J>L THEN C:=1 ELSE C:=4 ELSE IF J>L THEN C:=3
+ELSE IF MODTEXT[J]<BYTEMEM[W,K]THEN C:=0 ELSE C:=2;END{:68};Q:=P;
+IF C=0 THEN P:=LINK[Q]ELSE IF C=2 THEN P:=ILK[Q]ELSE GOTO 31;END;
+{67:}W:=NAMEPTR MOD 2;K:=BYTEPTR[W];
+IF K+L>MAXBYTES THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','byte memory',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;IF NAMEPTR>MAXNAMES-2 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','name',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;P:=NAMEPTR;IF C=0 THEN LINK[Q]:=P ELSE ILK[Q]:=P;LINK[P]:=0;
+ILK[P]:=0;C:=1;EQUIV[P]:=0;
+FOR J:=1 TO L DO BYTEMEM[W,K+J-1]:=MODTEXT[J];BYTEPTR[W]:=K+L;
+BYTESTART[NAMEPTR+2]:=K+L;NAMEPTR:=NAMEPTR+1;{:67};
+31:IF C<>1 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Incompatible section names');ERROR;END;P:=0;END;
+MODLOOKUP:=P;END;
+{:66}{69:}FUNCTION PREFIXLOOKUP(L:SIXTEENBITS):NAMEPOINTER;VAR C:0..4;
+COUNT:0..MAXNAMES;J:0..LONGESTNAME;K:0..MAXBYTES;W:0..1;P:NAMEPOINTER;
+Q:NAMEPOINTER;R:NAMEPOINTER;BEGIN Q:=0;P:=ILK[0];COUNT:=0;R:=0;
+WHILE P<>0 DO BEGIN{68:}BEGIN K:=BYTESTART[P];W:=P MOD 2;C:=1;J:=1;
+WHILE(K<BYTESTART[P+2])AND(J<=L)AND(MODTEXT[J]=BYTEMEM[W,K])DO BEGIN K:=
+K+1;J:=J+1;END;
+IF K=BYTESTART[P+2]THEN IF J>L THEN C:=1 ELSE C:=4 ELSE IF J>L THEN C:=3
+ELSE IF MODTEXT[J]<BYTEMEM[W,K]THEN C:=0 ELSE C:=2;END{:68};
+IF C=0 THEN P:=LINK[P]ELSE IF C=2 THEN P:=ILK[P]ELSE BEGIN R:=P;
+COUNT:=COUNT+1;Q:=ILK[P];P:=LINK[P];END;IF P=0 THEN BEGIN P:=Q;Q:=0;END;
+END;IF COUNT<>1 THEN IF COUNT=0 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Name does not match');ERROR;
+END ELSE BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Ambiguous prefix');ERROR;
+END;PREFIXLOOKUP:=R;END;{:69}{73:}PROCEDURE STORETWOBYTE(X:SIXTEENBITS);
+BEGIN IF TOKPTR[Z]+2>MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=X DIV 256;
+TOKMEM[Z,TOKPTR[Z]+1]:=X MOD 256;TOKPTR[Z]:=TOKPTR[Z]+2;END;
+{:73}{74:}{PROCEDURE PRINTREPL(P:TEXTPOINTER);VAR K:0..MAXTOKS;
+A:SIXTEENBITS;ZP:0..3;
+BEGIN IF P>=TEXTPTR THEN WRITE(OUTPUT,'BAD')ELSE BEGIN K:=TOKSTART[P];
+ZP:=P MOD 4;WHILE K<TOKSTART[P+4]DO BEGIN A:=TOKMEM[ZP,K];
+IF A>=128 THEN[75:]BEGIN K:=K+1;
+IF A<168 THEN BEGIN A:=(A-128)*256+TOKMEM[ZP,K];PRINTID(A);
+IF BYTEMEM[A MOD 2,BYTESTART[A]]=34 THEN WRITE(OUTPUT,'"')ELSE WRITE(
+OUTPUT,' ');END ELSE IF A<208 THEN BEGIN WRITE(OUTPUT,'@<');
+PRINTID((A-168)*256+TOKMEM[ZP,K]);WRITE(OUTPUT,'@>');
+END ELSE BEGIN A:=(A-208)*256+TOKMEM[ZP,K];
+WRITE(OUTPUT,'@',XCHR[123],A:1,'@',XCHR[125]);END;
+END[:75]ELSE[76:]CASE A OF 9:WRITE(OUTPUT,'@',XCHR[123]);
+10:WRITE(OUTPUT,'@',XCHR[125]);12:WRITE(OUTPUT,'@''');
+13:WRITE(OUTPUT,'@"');125:WRITE(OUTPUT,'@$');0:WRITE(OUTPUT,'#');
+64:WRITE(OUTPUT,'@@');2:WRITE(OUTPUT,'@=');3:WRITE(OUTPUT,'@\');
+ELSE WRITE(OUTPUT,XCHR[A])END[:76];K:=K+1;END;END;END;}
+{:74}{84:}PROCEDURE PUSHLEVEL(P:NAMEPOINTER);
+BEGIN IF STACKPTR=STACKSIZE THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','stack',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END ELSE BEGIN STACK[STACKPTR]:=CURSTATE;STACKPTR:=STACKPTR+1;
+CURSTATE.NAMEFIELD:=P;CURSTATE.REPLFIELD:=EQUIV[P];
+ZO:=CURSTATE.REPLFIELD MOD 4;
+CURSTATE.BYTEFIELD:=TOKSTART[CURSTATE.REPLFIELD];
+CURSTATE.ENDFIELD:=TOKSTART[CURSTATE.REPLFIELD+4];CURSTATE.MODFIELD:=0;
+END;END;{:84}{85:}PROCEDURE POPLEVEL;LABEL 10;
+BEGIN IF TEXTLINK[CURSTATE.REPLFIELD]=0 THEN BEGIN IF ILK[CURSTATE.
+NAMEFIELD]=3 THEN{91:}BEGIN NAMEPTR:=NAMEPTR-1;TEXTPTR:=TEXTPTR-1;
+Z:=TEXTPTR MOD 4;IF TOKPTR[Z]>MAXTOKPTR[Z]THEN MAXTOKPTR[Z]:=TOKPTR[Z];
+TOKPTR[Z]:=TOKSTART[TEXTPTR];
+{BYTEPTR[NAMEPTR MOD 2]:=BYTEPTR[NAMEPTR MOD 2]-1;}END{:91};
+END ELSE IF TEXTLINK[CURSTATE.REPLFIELD]<MAXTEXTS THEN BEGIN CURSTATE.
+REPLFIELD:=TEXTLINK[CURSTATE.REPLFIELD];ZO:=CURSTATE.REPLFIELD MOD 4;
+CURSTATE.BYTEFIELD:=TOKSTART[CURSTATE.REPLFIELD];
+CURSTATE.ENDFIELD:=TOKSTART[CURSTATE.REPLFIELD+4];GOTO 10;END;
+STACKPTR:=STACKPTR-1;IF STACKPTR>0 THEN BEGIN CURSTATE:=STACK[STACKPTR];
+ZO:=CURSTATE.REPLFIELD MOD 4;END;10:END;
+{:85}{87:}FUNCTION GETOUTPUT:SIXTEENBITS;LABEL 20,30,31;
+VAR A:SIXTEENBITS;B:EIGHTBITS;BAL:SIXTEENBITS;K:0..MAXBYTES;W:0..1;
+BEGIN 20:IF STACKPTR=0 THEN BEGIN A:=0;GOTO 31;END;
+IF CURSTATE.BYTEFIELD=CURSTATE.ENDFIELD THEN BEGIN CURVAL:=-CURSTATE.
+MODFIELD;POPLEVEL;IF CURVAL=0 THEN GOTO 20;A:=129;GOTO 31;END;
+A:=TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+IF A<128 THEN IF A=0 THEN{92:}BEGIN PUSHLEVEL(NAMEPTR-1);GOTO 20;
+END{:92}ELSE GOTO 31;A:=(A-128)*256+TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+IF A<10240 THEN{89:}BEGIN CASE ILK[A]OF 0:BEGIN CURVAL:=A;A:=130;END;
+1:BEGIN CURVAL:=EQUIV[A]-32768;A:=128;END;2:BEGIN PUSHLEVEL(A);GOTO 20;
+END;
+3:BEGIN{90:}WHILE(CURSTATE.BYTEFIELD=CURSTATE.ENDFIELD)AND(STACKPTR>0)DO
+POPLEVEL;
+IF(STACKPTR=0)OR(TOKMEM[ZO,CURSTATE.BYTEFIELD]<>40)THEN BEGIN BEGIN
+WRITELN(OUTPUT);WRITE(OUTPUT,'! No parameter given for ');END;
+PRINTID(A);ERROR;GOTO 20;END;{93:}BAL:=1;
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+WHILE TRUE DO BEGIN B:=TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+IF B=0 THEN STORETWOBYTE(NAMEPTR+32767)ELSE BEGIN IF B>=128 THEN BEGIN
+BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=B;TOKPTR[Z]:=TOKPTR[Z]+1;END;
+B:=TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+END ELSE CASE B OF 40:BAL:=BAL+1;41:BEGIN BAL:=BAL-1;
+IF BAL=0 THEN GOTO 30;END;
+39:REPEAT BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=B;TOKPTR[Z]:=TOKPTR[Z]+1;END;
+B:=TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;UNTIL B=39;ELSE END;
+BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=B;TOKPTR[Z]:=TOKPTR[Z]+1;END;END;END;
+30:{:93};EQUIV[NAMEPTR]:=TEXTPTR;ILK[NAMEPTR]:=2;W:=NAMEPTR MOD 2;
+K:=BYTEPTR[W];{IF K=MAXBYTES THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','byte memory',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;BYTEMEM[W,K]:=35;K:=K+1;BYTEPTR[W]:=K;}
+IF NAMEPTR>MAXNAMES-2 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','name',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;BYTESTART[NAMEPTR+2]:=K;NAMEPTR:=NAMEPTR+1;
+IF TEXTPTR>MAXTEXTS-4 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','text',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TEXTLINK[TEXTPTR]:=0;TOKSTART[TEXTPTR+4]:=TOKPTR[Z];
+TEXTPTR:=TEXTPTR+1;Z:=TEXTPTR MOD 4{:90};PUSHLEVEL(A);GOTO 20;END;
+ELSE BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! This can''t happen (','output',')');ERROR;HISTORY:=3;
+JUMPOUT;END END;GOTO 31;END{:89};IF A<20480 THEN{88:}BEGIN A:=A-10240;
+IF EQUIV[A]<>0 THEN PUSHLEVEL(A)ELSE IF A<>0 THEN BEGIN BEGIN WRITELN(
+OUTPUT);WRITE(OUTPUT,'! Not present: <');END;PRINTID(A);
+WRITE(OUTPUT,'>');ERROR;END;GOTO 20;END{:88};CURVAL:=A-20480;A:=129;
+CURSTATE.MODFIELD:=CURVAL;31:{IF TROUBLESHOOT THEN DEBUGHELP;}
+GETOUTPUT:=A;END;{:87}{97:}PROCEDURE FLUSHBUFFER;VAR K:0..OUTBUFSIZE;
+B:0..OUTBUFSIZE;BEGIN B:=BREAKPTR;
+IF(SEMIPTR<>0)AND(OUTPTR-SEMIPTR<=LINELENGTH)THEN BREAKPTR:=SEMIPTR;
+FOR K:=1 TO BREAKPTR DO WRITE(PASCALFILE,XCHR[OUTBUF[K-1]]);
+WRITELN(PASCALFILE);LINE:=LINE+1;
+IF LINE MOD 100=0 THEN BEGIN WRITE(OUTPUT,'.');
+IF LINE MOD 500=0 THEN WRITE(OUTPUT,LINE:1);;END;
+IF BREAKPTR<OUTPTR THEN BEGIN IF OUTBUF[BREAKPTR]=32 THEN BEGIN BREAKPTR
+:=BREAKPTR+1;IF BREAKPTR>B THEN B:=BREAKPTR;END;
+FOR K:=BREAKPTR TO OUTPTR-1 DO OUTBUF[K-BREAKPTR]:=OUTBUF[K];END;
+OUTPTR:=OUTPTR-BREAKPTR;BREAKPTR:=B-BREAKPTR;SEMIPTR:=0;
+IF OUTPTR>LINELENGTH THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Long line must be truncated');ERROR;END;
+OUTPTR:=LINELENGTH;END;END;{:97}{99:}PROCEDURE APPVAL(V:INTEGER);
+VAR K:0..OUTBUFSIZE;BEGIN K:=OUTBUFSIZE;REPEAT OUTBUF[K]:=V MOD 10;
+V:=V DIV 10;K:=K-1;UNTIL V=0;REPEAT K:=K+1;
+BEGIN OUTBUF[OUTPTR]:=OUTBUF[K]+48;OUTPTR:=OUTPTR+1;END;
+UNTIL K=OUTBUFSIZE;END;{:99}{101:}PROCEDURE SENDOUT(T:EIGHTBITS;
+V:SIXTEENBITS);LABEL 20;VAR K:0..LINELENGTH;
+BEGIN{102:}20:CASE OUTSTATE OF 1:IF T<>3 THEN BEGIN BREAKPTR:=OUTPTR;
+IF T=2 THEN BEGIN OUTBUF[OUTPTR]:=32;OUTPTR:=OUTPTR+1;END;END;
+2:BEGIN BEGIN OUTBUF[OUTPTR]:=44-OUTAPP;OUTPTR:=OUTPTR+1;END;
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;BREAKPTR:=OUTPTR;END;
+3,4:BEGIN{103:}IF(OUTVAL<0)OR((OUTVAL=0)AND(LASTSIGN<0))THEN BEGIN
+OUTBUF[OUTPTR]:=45;OUTPTR:=OUTPTR+1;
+END ELSE IF OUTSIGN>0 THEN BEGIN OUTBUF[OUTPTR]:=OUTSIGN;
+OUTPTR:=OUTPTR+1;END;APPVAL(ABS(OUTVAL));
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;{:103};OUTSTATE:=OUTSTATE-2;
+GOTO 20;END;
+5:{104:}BEGIN IF(T=3)OR({105:}((T=2)AND(V=3)AND(((OUTCONTRIB[1]=68)AND(
+OUTCONTRIB[2]=73)AND(OUTCONTRIB[3]=86))OR((OUTCONTRIB[1]=77)AND(
+OUTCONTRIB[2]=79)AND(OUTCONTRIB[3]=68))))OR((T=0)AND((V=42)OR(V=47)))
+{:105})THEN BEGIN{103:}IF(OUTVAL<0)OR((OUTVAL=0)AND(LASTSIGN<0))THEN
+BEGIN OUTBUF[OUTPTR]:=45;OUTPTR:=OUTPTR+1;
+END ELSE IF OUTSIGN>0 THEN BEGIN OUTBUF[OUTPTR]:=OUTSIGN;
+OUTPTR:=OUTPTR+1;END;APPVAL(ABS(OUTVAL));
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;{:103};OUTSIGN:=43;OUTVAL:=OUTAPP;
+END ELSE OUTVAL:=OUTVAL+OUTAPP;OUTSTATE:=3;GOTO 20;END{:104};
+0:IF T<>3 THEN BREAKPTR:=OUTPTR;ELSE END{:102};
+IF T<>0 THEN FOR K:=1 TO V DO BEGIN OUTBUF[OUTPTR]:=OUTCONTRIB[K];
+OUTPTR:=OUTPTR+1;END ELSE BEGIN OUTBUF[OUTPTR]:=V;OUTPTR:=OUTPTR+1;END;
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;
+IF(T=0)AND((V=59)OR(V=125))THEN BEGIN SEMIPTR:=OUTPTR;BREAKPTR:=OUTPTR;
+END;IF T>=2 THEN OUTSTATE:=1 ELSE OUTSTATE:=0 END;
+{:101}{106:}PROCEDURE SENDSIGN(V:INTEGER);
+BEGIN CASE OUTSTATE OF 2,4:OUTAPP:=OUTAPP*V;3:BEGIN OUTAPP:=V;
+OUTSTATE:=4;END;5:BEGIN OUTVAL:=OUTVAL+OUTAPP;OUTAPP:=V;OUTSTATE:=4;END;
+ELSE BEGIN BREAKPTR:=OUTPTR;OUTAPP:=V;OUTSTATE:=2;END END;
+LASTSIGN:=OUTAPP;END;{:106}{107:}PROCEDURE SENDVAL(V:INTEGER);
+LABEL 666,10;
+BEGIN CASE OUTSTATE OF 1:BEGIN{110:}IF(OUTPTR=BREAKPTR+3)OR((OUTPTR=
+BREAKPTR+4)AND(OUTBUF[BREAKPTR]=32))THEN IF((OUTBUF[OUTPTR-3]=68)AND(
+OUTBUF[OUTPTR-2]=73)AND(OUTBUF[OUTPTR-1]=86))OR((OUTBUF[OUTPTR-3]=77)AND
+(OUTBUF[OUTPTR-2]=79)AND(OUTBUF[OUTPTR-1]=68))THEN GOTO 666{:110};
+OUTSIGN:=32;OUTSTATE:=3;OUTVAL:=V;BREAKPTR:=OUTPTR;LASTSIGN:=+1;END;
+0:BEGIN{109:}IF(OUTPTR=BREAKPTR+1)AND((OUTBUF[BREAKPTR]=42)OR(OUTBUF[
+BREAKPTR]=47))THEN GOTO 666{:109};OUTSIGN:=0;OUTSTATE:=3;OUTVAL:=V;
+BREAKPTR:=OUTPTR;LASTSIGN:=+1;END;{108:}2:BEGIN OUTSIGN:=43;OUTSTATE:=3;
+OUTVAL:=OUTAPP*V;END;3:BEGIN OUTSTATE:=5;OUTAPP:=V;
+BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Two numbers occurred without a sign between them');
+ERROR;END;END;4:BEGIN OUTSTATE:=5;OUTAPP:=OUTAPP*V;END;
+5:BEGIN OUTVAL:=OUTVAL+OUTAPP;OUTAPP:=V;BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Two numbers occurred without a sign between them');
+ERROR;END;END;{:108}ELSE GOTO 666 END;GOTO 10;
+666:{111:}IF V>=0 THEN BEGIN IF OUTSTATE=1 THEN BEGIN BREAKPTR:=OUTPTR;
+BEGIN OUTBUF[OUTPTR]:=32;OUTPTR:=OUTPTR+1;END;END;APPVAL(V);
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;OUTSTATE:=1;
+END ELSE BEGIN BEGIN OUTBUF[OUTPTR]:=40;OUTPTR:=OUTPTR+1;END;
+BEGIN OUTBUF[OUTPTR]:=45;OUTPTR:=OUTPTR+1;END;APPVAL(-V);
+BEGIN OUTBUF[OUTPTR]:=41;OUTPTR:=OUTPTR+1;END;
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;OUTSTATE:=0;END{:111};10:END;
+{:107}{113:}PROCEDURE SENDTHEOUTPU;LABEL 2,21,22;VAR CURCHAR:EIGHTBITS;
+K:0..LINELENGTH;J:0..MAXBYTES;W:0..1;N:INTEGER;
+BEGIN WHILE STACKPTR>0 DO BEGIN CURCHAR:=GETOUTPUT;
+21:CASE CURCHAR OF 0:;
+{116:}65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,
+87,88,89,90:BEGIN OUTCONTRIB[1]:=CURCHAR;SENDOUT(2,1);END;
+97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115
+,116,117,118,119,120,121,122:BEGIN OUTCONTRIB[1]:=CURCHAR-32;
+SENDOUT(2,1);END;130:BEGIN K:=0;J:=BYTESTART[CURVAL];W:=CURVAL MOD 2;
+WHILE(K<MAXIDLENGTH)AND(J<BYTESTART[CURVAL+2])DO BEGIN K:=K+1;
+OUTCONTRIB[K]:=BYTEMEM[W,J];J:=J+1;
+IF OUTCONTRIB[K]>=97 THEN OUTCONTRIB[K]:=OUTCONTRIB[K]-32 ELSE IF
+OUTCONTRIB[K]=95 THEN K:=K-1;END;SENDOUT(2,K);END;
+{:116}{119:}48,49,50,51,52,53,54,55,56,57:BEGIN N:=0;
+REPEAT CURCHAR:=CURCHAR-48;IF N>=214748364 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Constant too big');ERROR;END ELSE N:=10*N+CURCHAR;
+CURCHAR:=GETOUTPUT;UNTIL(CURCHAR>57)OR(CURCHAR<48);SENDVAL(N);K:=0;
+IF CURCHAR=101 THEN CURCHAR:=69;IF CURCHAR=69 THEN GOTO 2 ELSE GOTO 21;
+END;125:SENDVAL(POOLCHECKSUM);12:BEGIN N:=0;CURCHAR:=48;
+REPEAT CURCHAR:=CURCHAR-48;IF N>=268435456 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Constant too big');ERROR;END ELSE N:=8*N+CURCHAR;
+CURCHAR:=GETOUTPUT;UNTIL(CURCHAR>55)OR(CURCHAR<48);SENDVAL(N);GOTO 21;
+END;13:BEGIN N:=0;CURCHAR:=48;
+REPEAT IF CURCHAR>=65 THEN CURCHAR:=CURCHAR-55 ELSE CURCHAR:=CURCHAR-48;
+IF N>=134217728 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Constant too big');ERROR;END ELSE N:=16*N+CURCHAR;
+CURCHAR:=GETOUTPUT;
+UNTIL(CURCHAR>70)OR(CURCHAR<48)OR((CURCHAR>57)AND(CURCHAR<65));
+SENDVAL(N);GOTO 21;END;128:SENDVAL(CURVAL);46:BEGIN K:=1;
+OUTCONTRIB[1]:=46;CURCHAR:=GETOUTPUT;
+IF CURCHAR=46 THEN BEGIN OUTCONTRIB[2]:=46;SENDOUT(1,2);
+END ELSE IF(CURCHAR>=48)AND(CURCHAR<=57)THEN GOTO 2 ELSE BEGIN SENDOUT(0
+,46);GOTO 21;END;END;{:119}43,45:SENDSIGN(44-CURCHAR);
+{114:}4:BEGIN OUTCONTRIB[1]:=65;OUTCONTRIB[2]:=78;OUTCONTRIB[3]:=68;
+SENDOUT(2,3);END;5:BEGIN OUTCONTRIB[1]:=78;OUTCONTRIB[2]:=79;
+OUTCONTRIB[3]:=84;SENDOUT(2,3);END;6:BEGIN OUTCONTRIB[1]:=73;
+OUTCONTRIB[2]:=78;SENDOUT(2,2);END;31:BEGIN OUTCONTRIB[1]:=79;
+OUTCONTRIB[2]:=82;SENDOUT(2,2);END;24:BEGIN OUTCONTRIB[1]:=58;
+OUTCONTRIB[2]:=61;SENDOUT(1,2);END;26:BEGIN OUTCONTRIB[1]:=60;
+OUTCONTRIB[2]:=62;SENDOUT(1,2);END;28:BEGIN OUTCONTRIB[1]:=60;
+OUTCONTRIB[2]:=61;SENDOUT(1,2);END;29:BEGIN OUTCONTRIB[1]:=62;
+OUTCONTRIB[2]:=61;SENDOUT(1,2);END;30:BEGIN OUTCONTRIB[1]:=61;
+OUTCONTRIB[2]:=61;SENDOUT(1,2);END;32:BEGIN OUTCONTRIB[1]:=46;
+OUTCONTRIB[2]:=46;SENDOUT(1,2);END;{:114}39:{117:}BEGIN K:=1;
+OUTCONTRIB[1]:=39;REPEAT IF K<LINELENGTH THEN K:=K+1;
+OUTCONTRIB[K]:=GETOUTPUT;UNTIL(OUTCONTRIB[K]=39)OR(STACKPTR=0);
+IF K=LINELENGTH THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! String too long');ERROR;END;SENDOUT(1,K);
+CURCHAR:=GETOUTPUT;IF CURCHAR=39 THEN OUTSTATE:=6;GOTO 21;END{:117};
+{115:}33,34,35,36,37,38,40,41,42,44,47,58,59,60,61,62,63,64,91,92,93,94,
+95,96,123,124{:115}:SENDOUT(0,CURCHAR);
+{121:}9:BEGIN IF BRACELEVEL=0 THEN SENDOUT(0,123)ELSE SENDOUT(0,91);
+BRACELEVEL:=BRACELEVEL+1;END;
+10:IF BRACELEVEL>0 THEN BEGIN BRACELEVEL:=BRACELEVEL-1;
+IF BRACELEVEL=0 THEN SENDOUT(0,125)ELSE SENDOUT(0,93);
+END ELSE BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Extra @}');ERROR;END;
+129:BEGIN K:=2;
+IF BRACELEVEL=0 THEN OUTCONTRIB[1]:=123 ELSE OUTCONTRIB[1]:=91;
+IF CURVAL<0 THEN BEGIN OUTCONTRIB[K]:=58;CURVAL:=-CURVAL;K:=K+1;END;
+N:=10;WHILE CURVAL>=N DO N:=10*N;REPEAT N:=N DIV 10;
+OUTCONTRIB[K]:=48+(CURVAL DIV N);CURVAL:=CURVAL MOD N;K:=K+1;UNTIL N=1;
+IF OUTCONTRIB[2]<>58 THEN BEGIN OUTCONTRIB[K]:=58;K:=K+1;END;
+IF BRACELEVEL=0 THEN OUTCONTRIB[K]:=125 ELSE OUTCONTRIB[K]:=93;
+SENDOUT(1,K);END;{:121}127:BEGIN SENDOUT(3,0);OUTSTATE:=6;END;
+2:{118:}BEGIN K:=0;REPEAT IF K<LINELENGTH THEN K:=K+1;
+OUTCONTRIB[K]:=GETOUTPUT;UNTIL(OUTCONTRIB[K]=2)OR(STACKPTR=0);
+IF K=LINELENGTH THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Verbatim string too long');ERROR;END;SENDOUT(1,K-1);
+END{:118};3:{122:}BEGIN SENDOUT(1,0);
+WHILE OUTPTR>0 DO BEGIN IF OUTPTR<=LINELENGTH THEN BREAKPTR:=OUTPTR;
+FLUSHBUFFER;END;OUTSTATE:=0;END{:122};ELSE BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Can''t output ASCII code ',CURCHAR:1);ERROR;END END;
+GOTO 22;2:{120:}REPEAT IF K<LINELENGTH THEN K:=K+1;
+OUTCONTRIB[K]:=CURCHAR;CURCHAR:=GETOUTPUT;
+IF(OUTCONTRIB[K]=69)AND((CURCHAR=43)OR(CURCHAR=45))THEN BEGIN IF K<
+LINELENGTH THEN K:=K+1;OUTCONTRIB[K]:=CURCHAR;CURCHAR:=GETOUTPUT;
+END ELSE IF CURCHAR=101 THEN CURCHAR:=69;
+UNTIL(CURCHAR<>69)AND((CURCHAR<48)OR(CURCHAR>57));
+IF K=LINELENGTH THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Fraction too long');ERROR;END;SENDOUT(3,K);
+GOTO 21{:120};22:END;END;{:113}{127:}FUNCTION LINESDONTMAT:BOOLEAN;
+LABEL 10;VAR K:0..BUFSIZE;BEGIN LINESDONTMAT:=TRUE;
+IF CHANGELIMIT<>LIMIT THEN GOTO 10;
+IF LIMIT>0 THEN FOR K:=0 TO LIMIT-1 DO IF CHANGEBUFFER[K]<>BUFFER[K]THEN
+GOTO 10;LINESDONTMAT:=FALSE;10:END;{:127}{128:}PROCEDURE PRIMETHECHAN;
+LABEL 22,30,10;VAR K:0..BUFSIZE;BEGIN CHANGELIMIT:=0;
+{129:}WHILE TRUE DO BEGIN LINE:=LINE+1;
+IF NOT INPUTLN(CHANGEFILE)THEN GOTO 10;IF LIMIT<2 THEN GOTO 22;
+IF BUFFER[0]<>64 THEN GOTO 22;
+IF(BUFFER[1]>=88)AND(BUFFER[1]<=90)THEN BUFFER[1]:=BUFFER[1]+32;
+IF BUFFER[1]=120 THEN GOTO 30;
+IF(BUFFER[1]=121)OR(BUFFER[1]=122)THEN BEGIN LOC:=2;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Where is the matching @x?');ERROR;
+END;END;22:END;30:{:129};{130:}REPEAT LINE:=LINE+1;
+IF NOT INPUTLN(CHANGEFILE)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Change file ended after @x');ERROR;END;GOTO 10;END;
+UNTIL LIMIT>0;{:130};{131:}BEGIN CHANGELIMIT:=LIMIT;
+IF LIMIT>0 THEN FOR K:=0 TO LIMIT-1 DO CHANGEBUFFER[K]:=BUFFER[K];
+END{:131};10:END;{:128}{132:}PROCEDURE CHECKCHANGE;LABEL 10;
+VAR N:INTEGER;K:0..BUFSIZE;BEGIN IF LINESDONTMAT THEN GOTO 10;N:=0;
+WHILE TRUE DO BEGIN CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;
+OTHERLINE:=LINE;LINE:=TEMPLINE;LINE:=LINE+1;
+IF NOT INPUTLN(CHANGEFILE)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Change file ended before @y');ERROR;END;CHANGELIMIT:=0;
+CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
+LINE:=TEMPLINE;GOTO 10;END;
+{133:}IF LIMIT>1 THEN IF BUFFER[0]=64 THEN BEGIN IF(BUFFER[1]>=88)AND(
+BUFFER[1]<=90)THEN BUFFER[1]:=BUFFER[1]+32;
+IF(BUFFER[1]=120)OR(BUFFER[1]=122)THEN BEGIN LOC:=2;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Where is the matching @y?');ERROR;
+END;END ELSE IF BUFFER[1]=121 THEN BEGIN IF N>0 THEN BEGIN LOC:=2;
+BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Hmm... ',N:1,' of the preceding lines failed to match');
+ERROR;END;END;GOTO 10;END;END{:133};{131:}BEGIN CHANGELIMIT:=LIMIT;
+IF LIMIT>0 THEN FOR K:=0 TO LIMIT-1 DO CHANGEBUFFER[K]:=BUFFER[K];
+END{:131};CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
+LINE:=TEMPLINE;LINE:=LINE+1;
+IF NOT INPUTLN(WEBFILE)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! WEB file ended during a change');ERROR;END;
+INPUTHASENDE:=TRUE;GOTO 10;END;IF LINESDONTMAT THEN N:=N+1;END;10:END;
+{:132}{135:}PROCEDURE GETLINE;LABEL 20;
+BEGIN 20:IF CHANGING THEN{137:}BEGIN LINE:=LINE+1;
+IF NOT INPUTLN(CHANGEFILE)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Change file ended without @z');ERROR;END;BUFFER[0]:=64;
+BUFFER[1]:=122;LIMIT:=2;END;
+IF LIMIT>1 THEN IF BUFFER[0]=64 THEN BEGIN IF(BUFFER[1]>=88)AND(BUFFER[1
+]<=90)THEN BUFFER[1]:=BUFFER[1]+32;
+IF(BUFFER[1]=120)OR(BUFFER[1]=121)THEN BEGIN LOC:=2;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Where is the matching @z?');ERROR;
+END;END ELSE IF BUFFER[1]=122 THEN BEGIN PRIMETHECHAN;
+CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
+LINE:=TEMPLINE;END;END;END{:137};
+IF NOT CHANGING THEN BEGIN{136:}BEGIN LINE:=LINE+1;
+IF NOT INPUTLN(WEBFILE)THEN INPUTHASENDE:=TRUE ELSE IF LIMIT=CHANGELIMIT
+THEN IF BUFFER[0]=CHANGEBUFFER[0]THEN IF CHANGELIMIT>0 THEN CHECKCHANGE;
+END{:136};IF CHANGING THEN GOTO 20;END;LOC:=0;BUFFER[LIMIT]:=32;END;
+{:135}{139:}FUNCTION CONTROLCODE(C:ASCIICODE):EIGHTBITS;
+BEGIN CASE C OF 64:CONTROLCODE:=64;39:CONTROLCODE:=12;
+34:CONTROLCODE:=13;36:CONTROLCODE:=125;32,9:CONTROLCODE:=136;
+42:BEGIN WRITE(OUTPUT,'*',MODULECOUNT+1:1);;CONTROLCODE:=136;END;
+68,100:CONTROLCODE:=133;70,102:CONTROLCODE:=132;123:CONTROLCODE:=9;
+125:CONTROLCODE:=10;80,112:CONTROLCODE:=134;
+84,116,94,46,58:CONTROLCODE:=131;38:CONTROLCODE:=127;
+60:CONTROLCODE:=135;61:CONTROLCODE:=2;92:CONTROLCODE:=3;
+ELSE CONTROLCODE:=0 END;END;{:139}{140:}FUNCTION SKIPAHEAD:EIGHTBITS;
+LABEL 30;VAR C:EIGHTBITS;
+BEGIN WHILE TRUE DO BEGIN IF LOC>LIMIT THEN BEGIN GETLINE;
+IF INPUTHASENDE THEN BEGIN C:=136;GOTO 30;END;END;BUFFER[LIMIT+1]:=64;
+WHILE BUFFER[LOC]<>64 DO LOC:=LOC+1;IF LOC<=LIMIT THEN BEGIN LOC:=LOC+2;
+C:=CONTROLCODE(BUFFER[LOC-1]);IF(C<>0)OR(BUFFER[LOC-1]=62)THEN GOTO 30;
+END;END;30:SKIPAHEAD:=C;END;{:140}{141:}PROCEDURE SKIPCOMMENT;LABEL 10;
+VAR BAL:EIGHTBITS;C:ASCIICODE;BEGIN BAL:=0;
+WHILE TRUE DO BEGIN IF LOC>LIMIT THEN BEGIN GETLINE;
+IF INPUTHASENDE THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Input ended in mid-comment');ERROR;END;GOTO 10;END;END;
+C:=BUFFER[LOC];LOC:=LOC+1;{142:}IF C=64 THEN BEGIN C:=BUFFER[LOC];
+IF(C<>32)AND(C<>9)AND(C<>42)AND(C<>122)AND(C<>90)THEN LOC:=LOC+1 ELSE
+BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Section ended in mid-comment');ERROR;END;LOC:=LOC-1;
+GOTO 10;
+END END ELSE IF(C=92)AND(BUFFER[LOC]<>64)THEN LOC:=LOC+1 ELSE IF C=123
+THEN BAL:=BAL+1 ELSE IF C=125 THEN BEGIN IF BAL=0 THEN GOTO 10;
+BAL:=BAL-1;END{:142};END;10:END;{:141}{145:}FUNCTION GETNEXT:EIGHTBITS;
+LABEL 20,30,31;VAR C:EIGHTBITS;D:EIGHTBITS;J,K:0..LONGESTNAME;
+BEGIN 20:IF LOC>LIMIT THEN BEGIN GETLINE;
+IF INPUTHASENDE THEN BEGIN C:=136;GOTO 31;END;END;C:=BUFFER[LOC];
+LOC:=LOC+1;
+IF SCANNINGHEX THEN{146:}IF((C>=48)AND(C<=57))OR((C>=65)AND(C<=70))THEN
+GOTO 31 ELSE SCANNINGHEX:=FALSE{:146};
+CASE C OF 65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85
+,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111
+,112,113,114,115,116,117,118,119,120,121,122:{148:}BEGIN IF((C=101)OR(C=
+69))AND(LOC>1)THEN IF(BUFFER[LOC-2]<=57)AND(BUFFER[LOC-2]>=48)THEN C:=0;
+IF C<>0 THEN BEGIN LOC:=LOC-1;IDFIRST:=LOC;REPEAT LOC:=LOC+1;
+D:=BUFFER[LOC];
+UNTIL((D<48)OR((D>57)AND(D<65))OR((D>90)AND(D<97))OR(D>122))AND(D<>95);
+IF LOC>IDFIRST+1 THEN BEGIN C:=130;IDLOC:=LOC;END;END ELSE C:=69;
+END{:148};34:{149:}BEGIN DOUBLECHARS:=0;IDFIRST:=LOC-1;
+REPEAT D:=BUFFER[LOC];LOC:=LOC+1;
+IF(D=34)OR(D=64)THEN IF BUFFER[LOC]=D THEN BEGIN LOC:=LOC+1;D:=0;
+DOUBLECHARS:=DOUBLECHARS+1;
+END ELSE BEGIN IF D=64 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Double @ sign missing');ERROR;
+END END ELSE IF LOC>LIMIT THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! String constant didn''t end');ERROR;END;D:=34;END;
+UNTIL D=34;IDLOC:=LOC-1;C:=130;END{:149};
+64:{150:}BEGIN C:=CONTROLCODE(BUFFER[LOC]);LOC:=LOC+1;
+IF C=0 THEN GOTO 20 ELSE IF C=13 THEN SCANNINGHEX:=TRUE ELSE IF C=135
+THEN{151:}BEGIN{153:}K:=0;
+WHILE TRUE DO BEGIN IF LOC>LIMIT THEN BEGIN GETLINE;
+IF INPUTHASENDE THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Input ended in section name');ERROR;END;GOTO 30;END;END;
+D:=BUFFER[LOC];{154:}IF D=64 THEN BEGIN D:=BUFFER[LOC+1];
+IF D=62 THEN BEGIN LOC:=LOC+2;GOTO 30;END;
+IF(D=32)OR(D=9)OR(D=42)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Section name didn''t end');ERROR;END;GOTO 30;END;K:=K+1;
+MODTEXT[K]:=64;LOC:=LOC+1;END{:154};LOC:=LOC+1;
+IF K<LONGESTNAME-1 THEN K:=K+1;IF(D=32)OR(D=9)THEN BEGIN D:=32;
+IF MODTEXT[K-1]=32 THEN K:=K-1;END;MODTEXT[K]:=D;END;
+30:{155:}IF K>=LONGESTNAME-2 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Section name too long: ');END;
+FOR J:=1 TO 25 DO WRITE(OUTPUT,XCHR[MODTEXT[J]]);WRITE(OUTPUT,'...');
+IF HISTORY=0 THEN HISTORY:=1;END{:155};
+IF(MODTEXT[K]=32)AND(K>0)THEN K:=K-1;{:153};
+IF K>3 THEN BEGIN IF(MODTEXT[K]=46)AND(MODTEXT[K-1]=46)AND(MODTEXT[K-2]=
+46)THEN CURMODULE:=PREFIXLOOKUP(K-3)ELSE CURMODULE:=MODLOOKUP(K);
+END ELSE CURMODULE:=MODLOOKUP(K);
+END{:151}ELSE IF C=131 THEN BEGIN REPEAT C:=SKIPAHEAD;UNTIL C<>64;
+IF BUFFER[LOC-1]<>62 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Improper @ within control text');ERROR;END;GOTO 20;END;
+END{:150};
+{147:}46:IF BUFFER[LOC]=46 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=32;
+LOC:=LOC+1;END;
+END ELSE IF BUFFER[LOC]=41 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=93;
+LOC:=LOC+1;END;END;
+58:IF BUFFER[LOC]=61 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=24;
+LOC:=LOC+1;END;END;
+61:IF BUFFER[LOC]=61 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=30;
+LOC:=LOC+1;END;END;
+62:IF BUFFER[LOC]=61 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=29;
+LOC:=LOC+1;END;END;
+60:IF BUFFER[LOC]=61 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=28;
+LOC:=LOC+1;END;
+END ELSE IF BUFFER[LOC]=62 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=26;
+LOC:=LOC+1;END;END;
+40:IF BUFFER[LOC]=42 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=9;
+LOC:=LOC+1;END;
+END ELSE IF BUFFER[LOC]=46 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=91;
+LOC:=LOC+1;END;END;
+42:IF BUFFER[LOC]=41 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=10;
+LOC:=LOC+1;END;END;{:147}32,9:GOTO 20;123:BEGIN SKIPCOMMENT;GOTO 20;END;
+125:BEGIN BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Extra }');ERROR;END;
+GOTO 20;END;ELSE IF C>=128 THEN GOTO 20 ELSE END;
+31:{IF TROUBLESHOOT THEN DEBUGHELP;}GETNEXT:=C;END;
+{:145}{157:}PROCEDURE SCANNUMERIC(P:NAMEPOINTER);LABEL 21,30;
+VAR ACCUMULATOR:INTEGER;NEXTSIGN:-1..+1;Q:NAMEPOINTER;VAL:INTEGER;
+BEGIN{158:}ACCUMULATOR:=0;NEXTSIGN:=+1;
+WHILE TRUE DO BEGIN NEXTCONTROL:=GETNEXT;
+21:CASE NEXTCONTROL OF 48,49,50,51,52,53,54,55,56,57:BEGIN{160:}VAL:=0;
+REPEAT VAL:=10*VAL+NEXTCONTROL-48;NEXTCONTROL:=GETNEXT;
+UNTIL(NEXTCONTROL>57)OR(NEXTCONTROL<48){:160};
+BEGIN ACCUMULATOR:=ACCUMULATOR+NEXTSIGN*(VAL);NEXTSIGN:=+1;END;GOTO 21;
+END;12:BEGIN{161:}VAL:=0;NEXTCONTROL:=48;
+REPEAT VAL:=8*VAL+NEXTCONTROL-48;NEXTCONTROL:=GETNEXT;
+UNTIL(NEXTCONTROL>55)OR(NEXTCONTROL<48){:161};
+BEGIN ACCUMULATOR:=ACCUMULATOR+NEXTSIGN*(VAL);NEXTSIGN:=+1;END;GOTO 21;
+END;13:BEGIN{162:}VAL:=0;NEXTCONTROL:=48;
+REPEAT IF NEXTCONTROL>=65 THEN NEXTCONTROL:=NEXTCONTROL-7;
+VAL:=16*VAL+NEXTCONTROL-48;NEXTCONTROL:=GETNEXT;
+UNTIL(NEXTCONTROL>70)OR(NEXTCONTROL<48)OR((NEXTCONTROL>57)AND(
+NEXTCONTROL<65)){:162};BEGIN ACCUMULATOR:=ACCUMULATOR+NEXTSIGN*(VAL);
+NEXTSIGN:=+1;END;GOTO 21;END;130:BEGIN Q:=IDLOOKUP(0);
+IF ILK[Q]<>1 THEN BEGIN NEXTCONTROL:=42;GOTO 21;END;
+BEGIN ACCUMULATOR:=ACCUMULATOR+NEXTSIGN*(EQUIV[Q]-32768);NEXTSIGN:=+1;
+END;END;43:;45:NEXTSIGN:=-NEXTSIGN;132,133,135,134,136:GOTO 30;
+59:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Omit semicolon in numeric definition');ERROR;END;
+ELSE{159:}BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Improper numeric definition will be flushed');ERROR;END;
+REPEAT NEXTCONTROL:=SKIPAHEAD UNTIL(NEXTCONTROL>=132);
+IF NEXTCONTROL=135 THEN BEGIN LOC:=LOC-2;NEXTCONTROL:=GETNEXT;END;
+ACCUMULATOR:=0;GOTO 30;END{:159}END;END;30:{:158};
+IF ABS(ACCUMULATOR)>=32768 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Value too big: ',ACCUMULATOR:1);ERROR;END;
+ACCUMULATOR:=0;END;EQUIV[P]:=ACCUMULATOR+32768;END;
+{:157}{165:}PROCEDURE SCANREPL(T:EIGHTBITS);LABEL 22,30,31,21;
+VAR A:SIXTEENBITS;B:ASCIICODE;BAL:EIGHTBITS;BEGIN BAL:=0;
+WHILE TRUE DO BEGIN 22:A:=GETNEXT;CASE A OF 40:BAL:=BAL+1;
+41:IF BAL=0 THEN BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Extra )');ERROR;
+END ELSE BAL:=BAL-1;39:{168:}BEGIN B:=39;
+WHILE TRUE DO BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT
+);WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=B;TOKPTR[Z]:=TOKPTR[Z]+1;
+END;
+IF B=64 THEN IF BUFFER[LOC]=64 THEN LOC:=LOC+1 ELSE BEGIN WRITELN(OUTPUT
+);WRITE(OUTPUT,'! You should double @ signs in strings');ERROR;END;
+IF LOC=LIMIT THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! String didn''t end');ERROR;END;BUFFER[LOC]:=39;
+BUFFER[LOC+1]:=0;END;B:=BUFFER[LOC];LOC:=LOC+1;
+IF B=39 THEN BEGIN IF BUFFER[LOC]<>39 THEN GOTO 31 ELSE BEGIN LOC:=LOC+1
+;BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=39;TOKPTR[Z]:=TOKPTR[Z]+1;END;END;END;
+END;31:END{:168};35:IF T=3 THEN A:=0;{167:}130:BEGIN A:=IDLOOKUP(0);
+BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=(A DIV 256)+128;TOKPTR[Z]:=TOKPTR[Z]+1;
+END;A:=A MOD 256;END;
+135:IF T<>135 THEN GOTO 30 ELSE BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN
+BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=(CURMODULE DIV 256)+168;
+TOKPTR[Z]:=TOKPTR[Z]+1;END;A:=CURMODULE MOD 256;END;
+2:{169:}BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=2;TOKPTR[Z]:=TOKPTR[Z]+1;END;
+BUFFER[LIMIT+1]:=64;
+21:IF BUFFER[LOC]=64 THEN BEGIN IF LOC<LIMIT THEN IF BUFFER[LOC+1]=64
+THEN BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=64;TOKPTR[Z]:=TOKPTR[Z]+1;END;
+LOC:=LOC+2;GOTO 21;END;
+END ELSE BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=BUFFER[LOC];TOKPTR[Z]:=TOKPTR[Z]+1;END;
+LOC:=LOC+1;GOTO 21;END;IF LOC>=LIMIT THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Verbatim string didn''t end');ERROR;
+END ELSE IF BUFFER[LOC+1]<>62 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! You should double @ signs in verbatim strings');ERROR;
+END;LOC:=LOC+2;END{:169};
+133,132,134:IF T<>135 THEN GOTO 30 ELSE BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! @',XCHR[BUFFER[LOC-1]],' is ignored in Pascal text');
+ERROR;END;GOTO 22;END;136:GOTO 30;{:167}ELSE END;
+BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=A;TOKPTR[Z]:=TOKPTR[Z]+1;END;END;
+30:NEXTCONTROL:=A;
+{166:}IF BAL>0 THEN BEGIN IF BAL=1 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Missing )');ERROR;END ELSE BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Missing ',BAL:1,' )''s');ERROR;END;
+WHILE BAL>0 DO BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(
+OUTPUT);WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=41;TOKPTR[Z]:=TOKPTR[Z]+1;
+END;BAL:=BAL-1;END;END{:166};
+IF TEXTPTR>MAXTEXTS-4 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','text',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;CURREPLTEXT:=TEXTPTR;TOKSTART[TEXTPTR+4]:=TOKPTR[Z];
+TEXTPTR:=TEXTPTR+1;IF Z=3 THEN Z:=0 ELSE Z:=Z+1;END;
+{:165}{170:}PROCEDURE DEFINEMACRO(T:EIGHTBITS);VAR P:NAMEPOINTER;
+BEGIN P:=IDLOOKUP(T);SCANREPL(T);EQUIV[P]:=CURREPLTEXT;
+TEXTLINK[CURREPLTEXT]:=0;END;{:170}{172:}PROCEDURE SCANMODULE;
+LABEL 22,30,10;VAR P:NAMEPOINTER;BEGIN MODULECOUNT:=MODULECOUNT+1;
+{173:}NEXTCONTROL:=0;
+WHILE TRUE DO BEGIN 22:WHILE NEXTCONTROL<=132 DO BEGIN NEXTCONTROL:=
+SKIPAHEAD;IF NEXTCONTROL=135 THEN BEGIN LOC:=LOC-2;NEXTCONTROL:=GETNEXT;
+END;END;IF NEXTCONTROL<>133 THEN GOTO 30;NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL<>130 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Definition flushed, must start with ',
+'identifier of length > 1');ERROR;END;GOTO 22;END;NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL=61 THEN BEGIN SCANNUMERIC(IDLOOKUP(1));GOTO 22;
+END ELSE IF NEXTCONTROL=30 THEN BEGIN DEFINEMACRO(2);GOTO 22;
+END ELSE{174:}IF NEXTCONTROL=40 THEN BEGIN NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL=35 THEN BEGIN NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL=41 THEN BEGIN NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL=61 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Use == for macros');ERROR;END;NEXTCONTROL:=30;END;
+IF NEXTCONTROL=30 THEN BEGIN DEFINEMACRO(3);GOTO 22;END;END;END;END;
+{:174};BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Definition flushed since it starts badly');ERROR;END;
+END;30:{:173};{175:}CASE NEXTCONTROL OF 134:P:=0;135:BEGIN P:=CURMODULE;
+{176:}REPEAT NEXTCONTROL:=GETNEXT;UNTIL NEXTCONTROL<>43;
+IF(NEXTCONTROL<>61)AND(NEXTCONTROL<>30)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Pascal text flushed, = sign is missing');ERROR;END;
+REPEAT NEXTCONTROL:=SKIPAHEAD;UNTIL NEXTCONTROL=136;GOTO 10;END{:176};
+END;ELSE GOTO 10 END;{177:}STORETWOBYTE(53248+MODULECOUNT);{:177};
+SCANREPL(135);
+{178:}IF P=0 THEN BEGIN TEXTLINK[LASTUNNAMED]:=CURREPLTEXT;
+LASTUNNAMED:=CURREPLTEXT;
+END ELSE IF EQUIV[P]=0 THEN EQUIV[P]:=CURREPLTEXT ELSE BEGIN P:=EQUIV[P]
+;WHILE TEXTLINK[P]<MAXTEXTS DO P:=TEXTLINK[P];TEXTLINK[P]:=CURREPLTEXT;
+END;TEXTLINK[CURREPLTEXT]:=MAXTEXTS;{:178};{:175};10:END;
+{:172}{181:}{PROCEDURE DEBUGHELP;LABEL 888,10;VAR K:INTEGER;
+BEGIN DEBUGSKIPPED:=DEBUGSKIPPED+1;
+IF DEBUGSKIPPED<DEBUGCYCLE THEN GOTO 10;DEBUGSKIPPED:=0;
+WHILE TRUE DO BEGIN BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'#');END;;
+READ(INPUT,DDT);IF DDT<0 THEN GOTO 10 ELSE IF DDT=0 THEN BEGIN GOTO 888;
+888:DDT:=0;
+END ELSE BEGIN READ(INPUT,DD);CASE DDT OF 1:PRINTID(DD);2:PRINTREPL(DD);
+3:FOR K:=1 TO DD DO WRITE(OUTPUT,XCHR[BUFFER[K]]);
+4:FOR K:=1 TO DD DO WRITE(OUTPUT,XCHR[MODTEXT[K]]);
+5:FOR K:=1 TO OUTPTR DO WRITE(OUTPUT,XCHR[OUTBUF[K]]);
+6:FOR K:=1 TO DD DO WRITE(OUTPUT,XCHR[OUTCONTRIB[K]]);
+ELSE WRITE(OUTPUT,'?')END;END;END;10:END;}{:181}{182:}BEGIN INITIALIZE;
+{134:}OPENINPUT;LINE:=0;OTHERLINE:=0;CHANGING:=TRUE;PRIMETHECHAN;
+CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
+LINE:=TEMPLINE;LIMIT:=0;LOC:=1;BUFFER[0]:=32;INPUTHASENDE:=FALSE;{:134};
+WRITELN(OUTPUT,'This is TANGLE-FPC');{183:}PHASEONE:=TRUE;
+MODULECOUNT:=0;REPEAT NEXTCONTROL:=SKIPAHEAD;UNTIL NEXTCONTROL=136;
+WHILE NOT INPUTHASENDE DO SCANMODULE;
+{138:}IF CHANGELIMIT<>0 THEN BEGIN FOR II:=0 TO CHANGELIMIT DO BUFFER[II
+]:=CHANGEBUFFER[II];LIMIT:=CHANGELIMIT;CHANGING:=TRUE;LINE:=OTHERLINE;
+LOC:=CHANGELIMIT;BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Change file entry did not match');ERROR;END;END{:138};
+PHASEONE:=FALSE;{:183};FOR II:=0 TO 3 DO MAXTOKPTR[II]:=TOKPTR[II];
+{112:}IF TEXTLINK[0]=0 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! No output was specified.');END;
+IF HISTORY=0 THEN HISTORY:=1;END ELSE BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'Writing the output file');END;;{83:}STACKPTR:=1;
+BRACELEVEL:=0;CURSTATE.NAMEFIELD:=0;CURSTATE.REPLFIELD:=TEXTLINK[0];
+ZO:=CURSTATE.REPLFIELD MOD 4;
+CURSTATE.BYTEFIELD:=TOKSTART[CURSTATE.REPLFIELD];
+CURSTATE.ENDFIELD:=TOKSTART[CURSTATE.REPLFIELD+4];CURSTATE.MODFIELD:=0;
+{:83};{96:}OUTSTATE:=0;OUTPTR:=0;BREAKPTR:=0;SEMIPTR:=0;OUTBUF[0]:=0;
+LINE:=1;{:96};SENDTHEOUTPU;{98:}BREAKPTR:=OUTPTR;SEMIPTR:=0;FLUSHBUFFER;
+IF BRACELEVEL<>0 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Program ended at brace level ',BRACELEVEL:1);ERROR;END;
+{:98};BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'Done.');END;END{:112};
+9999:IF STRINGPTR>256 THEN{184:}BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,STRINGPTR-256:1,' strings written to string pool file.');
+END;WRITE(POOL,'*');
+FOR II:=1 TO 9 DO BEGIN OUTBUF[II]:=POOLCHECKSUM MOD 10;
+POOLCHECKSUM:=POOLCHECKSUM DIV 10;END;
+FOR II:=9 DOWNTO 1 DO WRITE(POOL,XCHR[48+OUTBUF[II]]);WRITELN(POOL);
+END{:184};{186:}BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'Memory usage statistics:');END;BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,NAMEPTR:1,' names, ',TEXTPTR:1,' replacement texts;');END;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,BYTEPTR[0]:1);END;
+FOR WO:=1 TO 1 DO WRITE(OUTPUT,'+',BYTEPTR[WO]:1);
+IF PHASEONE THEN FOR II:=0 TO 3 DO MAXTOKPTR[II]:=TOKPTR[II];
+WRITE(OUTPUT,' bytes, ',MAXTOKPTR[0]:1);
+FOR II:=1 TO 3 DO WRITE(OUTPUT,'+',MAXTOKPTR[II]:1);
+WRITE(OUTPUT,' tokens.');{:186};CLOSE(PASCALFILE);CLOSE(POOL);
+{187:}CASE HISTORY OF 0:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'(No errors were found.)');END;1:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'(Did you see the warning message above?)');END;
+2:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'(Pardon me, but I think I spotted something wrong.)');END;
+3:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'(That was a fatal error, my friend.)');END;END;
+WRITELN(OUTPUT);HALT(HISTORY){:187};END.{:182}
diff --git a/systems/unix/tex-fpc/web/weave.ch b/systems/unix/tex-fpc/web/weave.ch
new file mode 100644
index 0000000000..bcb0a7e7d5
--- /dev/null
+++ b/systems/unix/tex-fpc/web/weave.ch
@@ -0,0 +1,185 @@
+% This is a change file for WEAVE-FPC, Wolfgang Helbig, Nov. 2007
+% Apr. 2008 get file names from command line
+% Jul. 2008 pass the exit code
+% Jul. 2016 change from gpc to fpc
+[0] About WEAVE-FPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-fpc
+\def\name{\tt WEAVE}
+
+\let\maybe=\iffalse % print changed modules only.
+
+\N0\*. About \namefpc.\fi
+This is an adaption of Donald~E. Knuth's \.{WEAVE}, version 4.4
+from December 2002, to Unix. \namefpc\ is based on GNU~Pascal,
+version 2.1.
+
+This program expects three file names on the command line: A
+web~file (\.{.web}), a change~file (\.{.ch}), and a \TeX~file
+(\.{.tex}). If you call \namefpc\ with the wrong number of command
+line arguments, it will tell you and exit.
+To support shell scripting, \namefpc\ sets the exit code to its
+`\\{history}'---zero means ok, one means a warning was issued, two
+an error occurred and three means \.{WEAVE} ended prematurely.
+
+\hint
+
+The input file \.{weave.tex} will exceed \TeX's memory. To fix,
+change the constant value \.{MEMMAX} to 32000 in \.{tex.p},
+recompile and run it on \.{weave.tex}. Put \.{\\tracingstats1}
+in \.{weave.tex}. The log file then shows the memory \TeX\ needed
+to compile its input.
+\medskip
+Comments and questions are welcome!
+\bigskip
+\address
+@z
+
+[1] Change the banner line
+@x
+@d banner=='This is WEAVE, Version 4.4'
+@y
+@d banner=='This is WEAVE-FPC'
+@z
+
+[2] terminal output and input
+@x
+program WEAVE(@!web_file,@!change_file,@!tex_file);
+@y
+program WEAVE(@!input,@!output);
+@z
+
+[3] shift left to turn debugging on, shift right to turn it off
+ @x
+ @d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+ @d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+ @y
+ @d debug==
+ @d gubed==
+ @z
+
+[3] turn stats on
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$'
+ when gathering usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$'
+ when gathering usage statistics}
+@y
+@d stat==
+@d tats==
+@z
+
+[4] compiler directives
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$M@&O@&D@&E I@&S@&O@}
+@z
+
+[7] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[12] the type of text_files is text in ISO Pascal
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[20] terminal input/output
+@x
+@d print(#)==write(term_out,#) {`|print|' means write on the terminal}
+@y
+@d term_in == input
+@d term_out == output
+@d print(#)==write(term_out,#) {`|print|' means write on the terminal}
+@z
+
+[20] terminal output, implicitely defined in ISO Pasal
+@x
+@<Globals...@>=
+@!term_out:text_file; {the terminal as an output file}
+@y
+@z
+
+[21] terminal output, output is rewritten implicitely in ISO Pascal
+@x
+@<Set init...@>=
+rewrite(term_out,'TTY:'); {send |term_out| output to the terminal}
+@y
+@z
+
+[22] terminal output, don't need update in ISO Pascal
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@y
+@d update_terminal == do_nothing
+@z
+
+[24] get file names from command line arguments
+@x
+begin reset(web_file); reset(change_file);
+@y
+begin
+assign(web_file, param_str(1));
+assign(change_file, param_str(2));
+reset(web_file); reset(change_file);
+@z
+
+[26] get file names from command line
+@x
+rewrite(tex_file);
+@y
+if param_count <> 3 then begin
+ fatal_error('Usage: weave web-file change-file TeX-file');
+ end;
+assign(tex_file, param_str(3));
+rewrite(tex_file);
+@z
+
+[258] Don't define Pascal's standard text files
+@x
+@!term_in:text_file; {the user's terminal as an input file}
+@y
+@z
+
+[259] terminal input, implicitely done in ISO Pascal
+@x
+reset(term_in,'TTY:','/I'); {open |term_in| as the terminal, don't do a |get|}
+@y
+@z
+
+[261] define fpc_close
+@x
+@^split procedures@>
+@y
+@^split procedures@>
+
+@d fpc_close == c@&l@&o@&s@&e
+@z
+
+[261] close tex_file
+@x
+@t\4\4@>{here files should be closed if the operating system requires it}
+@y
+fpc_close(tex_file);
+@z
+
+[263] put eol after last terminal out line
+@x
+fatal_message: print_nl('(That was a fatal error, my friend.)');
+end {there are no other cases}
+@y
+fatal_message: print_nl('(That was a fatal error, my friend.)');
+end; {there are no other cases}
+new_line;
+halt(history) {pass the history as exit code to the operating system}
+@z
diff --git a/systems/unix/tex-fpc/xdvi/README b/systems/unix/tex-fpc/xdvi/README
new file mode 100644
index 0000000000..42961d2288
--- /dev/null
+++ b/systems/unix/tex-fpc/xdvi/README
@@ -0,0 +1,32 @@
+How to install xdvi for TeX-GPC:
+
+Get the source from
+ https://math.berkeley.edu/~vojta/xdvi/xdvi-22.85.tar.gz
+It unpacks into xdvi-22.85.
+
+Edit config reflecting your binary directory, your man directory
+(i. e. a directory you have write permissions and has a subdirectory
+man1) and the resolution of your printer and then switch to xdvi-22.84
+and run
+../config && make clean && make && make install
+
+Unfortunately this neither works for NetBSD nor for Mac OS X.
+For NetBSD use this:
+../config && make clean && make && ../load && make install
+
+For Mac OS X use this:
+Instead replace the configure script in xdvi-22.84 with macconfigure,
+and replace xdvi.h with macxdvi.h.
+
+The xdvi is configured soley by DVIPSconf/XDvi, move XDvi to DVIPSconf.
+
+You might want to change /etc/man.conf to include your private man pages.
+I boldly replaced the line
+_default /usr/{share,X11R6,pkg,local}/man/
+to
+_default /usr/{helbig,share,X11R6,pkg,local}/man/
+
+For whatever reason, I couldn't make configure work on Mac OS X. Please help!
+
+enjoy
+Wolfgang
diff --git a/systems/unix/tex-fpc/xdvi/config b/systems/unix/tex-fpc/xdvi/config
new file mode 100755
index 0000000000..dd8c2f9707
--- /dev/null
+++ b/systems/unix/tex-fpc/xdvi/config
@@ -0,0 +1,15 @@
+# configure script for xdvi for TeX-FPC and Mac OS X
+# change the prefix and the base resolution in BDPI.
+# The resolution must agree with the one in the METAFONT mode localfont!
+# Do not specify a mfmode here! It will break automatic font generation.
+CPPFLAGS='-DBDPI=600 -DMAKEPK=4' ./configure \
+--mandir=/users/helbig/man \
+--bindir=/users/helbig/bin \
+--with-default-texmf-path=DVIPSconf \
+--enable-ps-gs \
+--enable-old-make-pk \
+--enable-extra-app-defaults=DVIPSconf \
+--with-default-font-path=PKfonts \
+--with-default-header-path=DVIPSconf \
+--with-default-fig-path=.:TeXinputs \
+--without-mfmode
diff --git a/systems/unix/tex-fpc/xdvi/macconfigure b/systems/unix/tex-fpc/xdvi/macconfigure
new file mode 100755
index 0000000000..71a46d4953
--- /dev/null
+++ b/systems/unix/tex-fpc/xdvi/macconfigure
@@ -0,0 +1,4640 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --with-x-toolkit=PKG use X toolkit PKG (xaw, xaw3d, motif, or no) [xaw]"
+ac_help="$ac_help
+ --with-tetex compile for use with teTeX"
+ac_help="$ac_help
+ --disable-grey disable greyscale anti-aliasing for shrunken bitmaps"
+ac_help="$ac_help
+ --disable-color disable support for color specials"
+ac_help="$ac_help
+ --disable-buttons disable buttons on the side of the window"
+ac_help="$ac_help
+ --disable-make-pk disable automatic generation of pk files via mktexpk
+ --enable-make-pk=PATH specify path for mktexpk"
+ac_help="$ac_help
+ --enable-old-make-pk[=PATH]
+ use old-style MakeTeXPK script instead of mktexpk"
+ac_help="$ac_help
+ --enable-gf enable gf format pixel files (in addition to pk)"
+ac_help="$ac_help
+ --enable-ps-gs[=PATH] enable PostScript support via ghostscript
+ (PATH, if given, points to the gs interpreter)"
+ac_help="$ac_help
+ --enable-ps-dps enable PostScript support via Display PostScript"
+ac_help="$ac_help
+ --enable-ps-news enable PostScript support via NeWS (Sun OpenWin)"
+ac_help="$ac_help
+ --enable-config-file=PATHLIST
+ look for configuration file in PATHLIST"
+ac_help="$ac_help
+ --enable-self-auto[=PATHLIST]
+ same as above; also determine xdvi binary path"
+ac_help="$ac_help
+ --enable-extra-app-defaults[=PATHLIST]
+ same as above; also enable extra app-defaults file"
+ac_help="$ac_help
+ --enable-dosnames use DOS-style names for fonts (e.g., dpi300/cmr10.pk)"
+ac_help="$ac_help
+ --enable-a4 set default paper size to A4 and default unit to cm"
+ac_help="$ac_help
+ --enable-texxet enable typesetting for right-to-left languages"
+ac_help="$ac_help
+ --with-mfmode=MODE:DPI set default Metafont mode to MODE at DPI dots/inch
+ --without-mfmode set default Metafont mode to none"
+ac_help="$ac_help
+ --with-default-texmf-path=PATH
+ set default texmf list to PATH"
+ac_help="$ac_help
+ --with-default-font-path=PATH
+ set default font path to PATH"
+ac_help="$ac_help
+ --with-default-vf-path=PATH
+ set default virtual font path to PATH"
+ac_help="$ac_help
+ --with-default-header-path=PATH
+ set default path path for PS figures to PATH"
+ac_help="$ac_help
+ --with-default-fig-path=PATH
+ set default figure path to PATH"
+ac_help="$ac_help
+ --with-default-source-path=PATH
+ set default path for source specials to PATH"
+ac_help="$ac_help
+ --with-default-dvips-path=CMD
+ set default print command to CMD"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+aux_top=NONE
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+imake=
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+x_top=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -aux-top | --aux-top | --aux-to | --aux-t | --aux- | --aux | --au | --a)
+ ac_prev=aux_top ;;
+ -aux-top=* | --aux-top=* | --aux-to=* | --aux-t=* | --aux-=* | --aux=* \
+ | --au=* | --a=*)
+ aux_top="$ac_optarg" ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --imake set flag for running from within imake
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --x-top=XTOP installation directory for X
+ --aux-top=AUXTOP secondary X top directory (e.g., for toolkit)
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [XTOP or $ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR [XTOP/include or guessed]
+ --x-libraries=DIR X library files are in DIR [XTOP/lib or guessed]
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ --imake | --imak | --ima | --im | -imake | -imak | -ima | -im)
+ imake=yes ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -x-top | --x-top | --x-to | --x-t)
+ ac_prev=x_top ;;
+ -x-top=* | --x-top=* | --x-to=* | --x-t=*)
+ x_top="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# Set prefix to x-top if appropriate.
+test "x$prefix" = xNONE && prefix="$x_top"
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=xdvi.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:613: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:643: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:694: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+ac_exeext=
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 737 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:773: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:863: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:916: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 921 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_cygwin=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:949: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 954 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+# helbig: gcc -g will create a directory conftest.dSYM, and configure thinks
+# that dSYM is the suffix. Furthermore, rm -rf is needed to remove the directory.
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:980: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
+else
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.dSYM) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -rf conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+
+
+cat <<EOF >>confdefs.h
+#undef _XOPEN_SOURCE /* needed because of imake */
+#define _XOPEN_SOURCE 1
+#define _XOPEN_SOURCE_EXTENDED 1
+#define __EXTENSIONS__ 1
+#ifdef _AIX
+#define _ALL_SOURCE 1
+#endif
+EOF
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1024: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1039 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1056 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1073 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+# If we find X, set shell vars x_includes and x_libraries to the
+# paths, otherwise set no_x=yes.
+# Uses ac_ vars as temps to allow command line to override cache and checks.
+# --without-x overrides everything else, but does not touch the cache.
+echo $ac_n "checking for X""... $ac_c" 1>&6
+echo "configure:1108: checking for X" >&5
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+ # Both variables are already set.
+ have_x=yes
+ else
+if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+if test "x$x_top" != xNONE; then
+ ac_x_includes="$x_top/include" ac_x_libraries="$x_top/lib"
+ if test ! -f "$ac_x_includes/X11/Xos.h" || test ! -d "$ac_x_libraries"; then
+ { echo "configure: error: $x_top does not point to a valid X install tree" 1>&2; exit 1; }
+ fi
+else
+ ac_x_includes=NO ac_x_libraries=NO
+ rm -fr conftestdir
+if mkdir conftestdir; then
+ cd conftestdir
+ # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+ cat > Imakefile <<'EOF'
+acfindx:
+ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+EOF
+# helbig: The suffix for libraries in Mac OS X is dylib.
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in dylib; do
+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+ test -f $ac_im_libdir/libX11.$ac_extension; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case "$ac_im_incroot" in
+ /usr/include) ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
+ esac
+ case "$ac_im_usrlibdir" in
+ /usr/lib | /lib) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
+ esac
+ fi
+ cd ..
+ rm -fr conftestdir
+fi
+
+fi
+if test "$ac_x_includes" = NO; then
+ # Guess where to find include files, by looking for this one X11 .h file.
+ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+ # First, try using that file with no special directory specified.
+cat > conftest.$ac_ext <<EOF
+#line 1171 "configure"
+#include "confdefs.h"
+#include <$x_direct_test_include>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ # Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ for ac_dir in \
+ /usr/X11/include \
+ /usr/X11R6/include \
+ /usr/X11R5/include \
+ /usr/X11R4/include \
+ \
+ /usr/include/X11 \
+ /usr/include/X11R6 \
+ /usr/include/X11R5 \
+ /usr/include/X11R4 \
+ \
+ /usr/local/X11/include \
+ /usr/local/X11R6/include \
+ /usr/local/X11R5/include \
+ /usr/local/X11R4/include \
+ \
+ /usr/local/include/X11 \
+ /usr/local/include/X11R6 \
+ /usr/local/include/X11R5 \
+ /usr/local/include/X11R4 \
+ \
+ /usr/X386/include \
+ /usr/x386/include \
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
+ /usr/local/include \
+ /usr/unsupported/include \
+ /usr/athena/include \
+ /usr/local/x11r5/include \
+ /usr/lpp/Xamples/include \
+ \
+ /usr/openwin/include \
+ /usr/openwin/share/include \
+ ; \
+ do
+ if test -r "$ac_dir/$x_direct_test_include"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+ done
+fi
+rm -f conftest*
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+ # Check for the libraries.
+
+ test -z "$x_direct_test_library" && x_direct_test_library=Xt
+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS="$LIBS"
+ LIBS="-l$x_direct_test_library $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1245 "configure"
+#include "confdefs.h"
+
+int main() {
+${x_direct_test_function}()
+; return 0; }
+EOF
+if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
+ /usr/X11/lib \
+ /usr/X11R6/lib \
+ /usr/X11R5/lib \
+ /usr/X11R4/lib \
+ \
+ /usr/lib/X11 \
+ /usr/lib/X11R6 \
+ /usr/lib/X11R5 \
+ /usr/lib/X11R4 \
+ \
+ /usr/local/X11/lib \
+ /usr/local/X11R6/lib \
+ /usr/local/X11R5/lib \
+ /usr/local/X11R4/lib \
+ \
+ /usr/local/lib/X11 \
+ /usr/local/lib/X11R6 \
+ /usr/local/lib/X11R5 \
+ /usr/local/lib/X11R4 \
+ \
+ /usr/X386/lib \
+ /usr/x386/lib \
+ /usr/XFree86/lib/X11 \
+ \
+ /usr/lib \
+ /usr/local/lib \
+ /usr/unsupported/lib \
+ /usr/athena/lib \
+ /usr/local/x11r5/lib \
+ /usr/lpp/Xamples/lib \
+ /lib/usr/lib/X11 \
+ \
+ /usr/openwin/lib \
+ /usr/openwin/share/lib \
+ ; \
+do
+ for ac_extension in dylib; do
+ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f conftest*
+fi # $ac_x_libraries = NO
+
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+ # Didn't find X anywhere. Cache the known absence of X.
+ ac_cv_have_x="have_x=no"
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+ fi
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ echo "$ac_t""$have_x" 1>&6
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+fi
+
+if test "$no_x" = yes || test -n "$imake"; then
+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+ if test "x$aux_top" != xNONE; then
+ X_CFLAGS="$X_CFLAGS -I$aux_top/include"
+ X_LIBS="$X_LIBS -L$aux_top/lib"
+ fi
+
+ if test -n "$x_includes"; then
+ X_CFLAGS="$X_CFLAGS -I$x_includes"
+ fi
+
+ # It would also be nice to do this for all -L options, not just this one.
+ if test -n "$x_libraries"; then
+ X_LIBS="$X_LIBS -L$x_libraries"
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space. Words are not sufficient . . . .
+ case "`(uname -sr) 2>/dev/null`" in
+ "SunOS 5"*)
+ echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
+echo "configure:1358: checking whether -R must be followed by a space" >&5
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
+ cat > conftest.$ac_ext <<EOF
+#line 1361 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_R_nospace=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_R_nospace=no
+fi
+rm -f conftest*
+ if test $ac_R_nospace = yes; then
+ echo "$ac_t""no" 1>&6
+ if test "x$aux_top" != xNONE; then
+ X_LIBS="$X_LIBS -R$aux_top/lib"
+ fi
+ X_LIBS="$X_LIBS -R$x_libraries"
+ else
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat > conftest.$ac_ext <<EOF
+#line 1387 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_R_space=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_R_space=no
+fi
+rm -f conftest*
+ if test $ac_R_space = yes; then
+ echo "$ac_t""yes" 1>&6
+ if test "x$aux_top" != xNONE; then
+ X_LIBS="$X_LIBS -R $aux_top/lib"
+ fi
+ X_LIBS="$X_LIBS -R $x_libraries"
+ else
+ echo "$ac_t""neither works" 1>&6
+ fi
+ fi
+ LIBS="$ac_xsave_LIBS"
+ esac
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And karl@cs.umb.edu says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
+echo "configure:1429: checking for dnet_ntoa in -ldnet" >&5
+ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldnet $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1437 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
+echo "configure:1470: checking for dnet_ntoa in -ldnet_stub" >&5
+ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldnet_stub $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1478 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # on Irix 5.2, according to dickey@clark.net.
+ echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:1518: checking for gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1523 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+gethostbyname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_gethostbyname=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_gethostbyname=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:1567: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lnsl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1575 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:1586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # lieder@skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says simon@lia.di.epfl.ch: it contains
+ # gethostby* variants that don't use the nameserver (or something).
+ # -lsocket must be given before -lnsl if both are needed.
+ # We assume that if connect needs -lnsl, so does gethostbyname.
+ echo $ac_n "checking for connect""... $ac_c" 1>&6
+echo "configure:1616: checking for connect" >&5
+if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1621 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+connect();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_connect=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_connect=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_connect = no; then
+ echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
+echo "configure:1665: checking for connect in -lsocket" >&5
+ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1673 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect();
+
+int main() {
+connect()
+; return 0; }
+EOF
+if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
+ echo $ac_n "checking for remove""... $ac_c" 1>&6
+echo "configure:1708: checking for remove" >&5
+if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1713 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char remove(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char remove();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_remove) || defined (__stub___remove)
+choke me
+#else
+remove();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_remove=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_remove=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_remove = no; then
+ echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
+echo "configure:1757: checking for remove in -lposix" >&5
+ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1765 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char remove();
+
+int main() {
+remove()
+; return 0; }
+EOF
+if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ echo $ac_n "checking for shmat""... $ac_c" 1>&6
+echo "configure:1800: checking for shmat" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1805 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shmat(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shmat();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_shmat) || defined (__stub___shmat)
+choke me
+#else
+shmat();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_shmat = no; then
+ echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+echo "configure:1849: checking for shmat in -lipc" >&5
+ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lipc $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1857 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shmat();
+
+int main() {
+shmat()
+; return 0; }
+EOF
+if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS="$LDFLAGS"
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+ echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
+echo "configure:1901: checking for IceConnectionNumber in -lICE" >&5
+ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1909 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char IceConnectionNumber();
+
+int main() {
+IceConnectionNumber()
+; return 0; }
+EOF
+if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ LDFLAGS="$ac_save_LDFLAGS"
+
+fi
+
+if test "x$have_x" != xyes; then
+ { echo "configure: error: this program cannot be compiled without X" 1>&2; exit 1; }
+fi
+
+ac_save_cpp=$ac_cpp
+ac_cpp="$ac_cpp $X_CFLAGS"
+for ac_hdr in X11/IntrinsicI.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1954: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1959 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ac_cpp=$ac_save_cpp
+
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1994: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1999 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2024 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2042 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2063 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+ echo $ac_n "checking for X11/Xosdefs.h""... $ac_c" 1>&6
+echo "configure:2096: checking for X11/Xosdefs.h" >&5
+if eval "test \"`echo '$''{'ac_cv_x11_xosdefs_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_x11_xosdefs_h=no
+ if test -n "$x_includes"; then
+ if test -r "$x_includes/X11/Xosdefs.h"; then
+ ac_cv_x11_xosdefs_h=yes
+ fi
+ else
+ cat > conftest.$ac_ext <<EOF
+#line 2107 "configure"
+#include "confdefs.h"
+#include <X11/Xosdefs.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_x11_xosdefs_h=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ fi
+fi
+
+echo "$ac_t""$ac_cv_x11_xosdefs_h" 1>&6
+ if test $ac_cv_x11_xosdefs_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_X11_XOSDEFS_H 1
+EOF
+
+ fi
+fi
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2139: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2144 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
+echo "configure:2180: checking for $ac_hdr that defines DIR" >&5
+if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2185 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_hdr>
+int main() {
+DIR *dirp = 0;
+; return 0; }
+EOF
+if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ eval "ac_cv_header_dirent_$ac_safe=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_dirent_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_header_dirent=$ac_hdr; break
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
+echo "configure:2218: checking for opendir in -ldir" >&5
+ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldir $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2226 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="$LIBS -ldir"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+echo "configure:2259: checking for opendir in -lx" >&5
+ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lx $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2267 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:2278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="$LIBS -lx"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
+echo "configure:2301: checking for sys/wait.h that is POSIX.1 compatible" >&5
+if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2306 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+int main() {
+int s;
+wait (&s);
+s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+; return 0; }
+EOF
+if { (eval echo configure:2322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_header_sys_wait_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+if test $ac_cv_header_sys_wait_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_WAIT_H 1
+EOF
+
+fi
+
+
+
+echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+echo "configure:2345: checking whether byte ordering is bigendian" >&5
+if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+cat > conftest.$ac_ext <<EOF
+#line 2352 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat > conftest.$ac_ext <<EOF
+#line 2367 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_bigendian=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_bigendian=no
+fi
+rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+if test $ac_cv_c_bigendian = unknown; then
+if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2398 "configure"
+#include "confdefs.h"
+main () {
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+EOF
+if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_bigendian=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_bigendian=yes
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+if test $ac_cv_c_bigendian = yes; then
+ cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+EOF
+
+fi
+
+ac_exeext=
+echo $ac_n "checking for integer type to use in bitmaps""... $ac_c" 1>&6
+echo "configure:2435: checking for integer type to use in bitmaps" >&5
+if eval "test \"`echo '$''{'xdvi_cv_bitmap_type'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2443 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ if ((sizeof(unsigned long) == 4 || sizeof(unsigned long) == 2)
+ && sizeof(unsigned long) != sizeof(unsigned int))
+ fprintf(f, "BMTYPE=long BMBYTES=%d\n", sizeof(unsigned long));
+ if (sizeof(unsigned int) == 4 || sizeof(unsigned int) == 2)
+ fprintf(f, "BMTYPE=int BMBYTES=%d\n", sizeof(unsigned int));
+ else if (sizeof(unsigned short) == 4 || sizeof(unsigned short) == 2)
+ fprintf(f, "BMTYPE=short BMBYTES=%d\n", sizeof(unsigned short));
+ else fprintf(f, "BMTYPE=char BMBYTES=%d\n", sizeof(unsigned char));
+ exit(0);
+}
+EOF
+if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ xdvi_cv_bitmap_type="`cat conftestval`"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ { echo "configure: error: could not determine integer type for bitmap" 1>&2; exit 1; }
+fi
+rm -fr conftest*
+fi
+
+fi
+
+eval "$xdvi_cv_bitmap_type"
+cat >> confdefs.h <<EOF
+#define BMTYPE $BMTYPE
+EOF
+
+cat >> confdefs.h <<EOF
+#define BMBYTES $BMBYTES
+EOF
+
+echo "$ac_t""unsigned $BMTYPE, size = $BMBYTES" 1>&6
+echo $ac_n "checking for whether the C compiler supports string concatenation""... $ac_c" 1>&6
+echo "configure:2486: checking for whether the C compiler supports string concatenation" >&5
+if eval "test \"`echo '$''{'xdvi_cc_concat'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2491 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+
+int main() {
+puts("Testing" " string" " concatenation");
+
+; return 0; }
+EOF
+if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ xdvi_cc_concat=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_cc_concat=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$xdvi_cc_concat" 1>&6
+KRHEADER_H=
+if test $xdvi_cc_concat = no; then
+ cat >> confdefs.h <<\EOF
+#define CC_K_AND_R 1
+EOF
+
+ KRHEADER_H=krheader.h
+fi
+
+echo $ac_n "checking for stropts.h and isastream()""... $ac_c" 1>&6
+echo "configure:2523: checking for stropts.h and isastream()" >&5
+if eval "test \"`echo '$''{'xdvi_cv_sys_streams'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2528 "configure"
+#include "confdefs.h"
+#include <stropts.h>
+
+int main() {
+#ifndef I_SETSIG
+choke me
+#else
+isastream(0);
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_cv_sys_streams=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_cv_sys_streams=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$xdvi_cv_sys_streams" 1>&6
+if test $xdvi_cv_sys_streams = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STREAMS 1
+EOF
+
+fi
+echo $ac_n "checking for SunOS 4""... $ac_c" 1>&6
+echo "configure:2560: checking for SunOS 4" >&5
+if eval "test \"`echo '$''{'xdvi_cv_sys_sunos_4'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "`(uname -sr) 2>/dev/null`" in
+"SunOS 4."*)
+ xdvi_cv_sys_sunos_4=yes ;;
+*) xdvi_cv_sys_sunos_4=no ;;
+esac
+fi
+
+echo "$ac_t""$xdvi_cv_sys_sunos_4" 1>&6
+if test $xdvi_cv_sys_sunos_4 = yes; then
+ cat >> confdefs.h <<\EOF
+#define SUNOS4 1
+EOF
+
+fi
+echo $ac_n "checking for certain old versions of Linux""... $ac_c" 1>&6
+echo "configure:2579: checking for certain old versions of Linux" >&5
+if eval "test \"`echo '$''{'xdvi_cv_sys_old_linux'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "`(uname -sr) 2>/dev/null`" in
+"Linux 2."[01].* | "Linux 2.2."[0-8] | "Linux 2.2."[0-8]-*)
+ xdvi_cv_sys_old_linux=yes ;;
+*) xdvi_cv_sys_old_linux=no ;;
+esac
+fi
+
+echo "$ac_t""$xdvi_cv_sys_old_linux" 1>&6
+if test $xdvi_cv_sys_old_linux = yes; then
+ cat >> confdefs.h <<\EOF
+#define FLAKY_SIGPOLL 1
+EOF
+
+fi
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2598: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2603 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:2631: checking for pid_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2636 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_pid_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_pid_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
+ cat >> confdefs.h <<\EOF
+#define pid_t int
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2664: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2669 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
+echo "configure:2697: checking for ptrdiff_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2702 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_ptrdiff_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_ptrdiff_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
+if test $ac_cv_type_ptrdiff_t = no; then
+ cat >> confdefs.h <<\EOF
+#define ptrdiff_t long
+EOF
+
+fi
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:2730: checking return type of signal handlers" >&5
+if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2735 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_type_signal=void
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_type_signal=int
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+
+echo $ac_n "checking for poll.h and poll()""... $ac_c" 1>&6
+echo "configure:2771: checking for poll.h and poll()" >&5
+if eval "test \"`echo '$''{'xdvi_cv_func_poll'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2776 "configure"
+#include "confdefs.h"
+#include <poll.h>
+
+int main() {
+poll((struct pollfd *) 0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_cv_func_poll=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_cv_func_poll=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$xdvi_cv_func_poll" 1>&6
+if test $xdvi_cv_func_poll = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_POLL 1
+EOF
+
+else
+ for ac_hdr in sys/select.h select.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2807: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2812 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
+echo "configure:2846: checking for vfork.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2851 "configure"
+#include "confdefs.h"
+#include <vfork.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_VFORK_H 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for working vfork""... $ac_c" 1>&6
+echo "configure:2881: checking for working vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "checking for vfork""... $ac_c" 1>&6
+echo "configure:2887: checking for vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2892 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char vfork(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char vfork();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_vfork) || defined (__stub___vfork)
+choke me
+#else
+vfork();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_vfork=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_vfork=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2937 "configure"
+#include "confdefs.h"
+/* Thanks to Paul Eggert for this test. */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent.
+ The compiler is told about this with #include <vfork.h>,
+ but some compilers (e.g. gcc -O) don't grok <vfork.h>.
+ Test for this by using a static variable whose address
+ is put into a register that is clobbered by the vfork. */
+static
+#ifdef __cplusplus
+sparc_address_test (int arg)
+#else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+main() {
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test ();
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems.
+ This test uses lots of local variables, at least
+ as many local variables as main has allocated so far
+ including compiler temporaries. 4 locals are enough for
+ gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
+ A buggy compiler should reuse the register of parent
+ for one of the local variables, since it will think that
+ parent can't possibly be used any more in this routine.
+ Assigning to the local variable will thus munge parent
+ in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3),
+ vfork doesn't separate parent from child file descriptors.
+ If the child closes a descriptor before it execs or exits,
+ this munges the parent's descriptor as well.
+ Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ exit(
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
+EOF
+if { (eval echo configure:3032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_vfork_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_vfork_works=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
+if test $ac_cv_func_vfork_works = no; then
+ cat >> confdefs.h <<\EOF
+#define vfork fork
+EOF
+
+fi
+
+if test $ac_cv_func_vfork_works = yes; then
+echo $ac_n "checking for whether setsid() is allowed within vfork()""... $ac_c" 1>&6
+echo "configure:3056: checking for whether setsid() is allowed within vfork()" >&5
+if eval "test \"`echo '$''{'xdvi_cv_setsid_in_vfork'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3064 "configure"
+#include "confdefs.h"
+/* Test adapted from Gnu autoconf */
+/* Thanks to Paul Eggert for this test. */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+int
+main() {
+ pid_t parent = getpid ();
+ pid_t child;
+
+ child = vfork ();
+
+ if (child == 0) {
+ if (setsid () == -1)
+ _exit(1);
+ _exit(0);
+ } else {
+ int status;
+
+ while (wait(&status) != child)
+ ;
+ exit(
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+ );
+ }
+}
+EOF
+if { (eval echo configure:3103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ xdvi_cv_setsid_in_vfork=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ xdvi_cv_setsid_in_vfork=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$xdvi_cv_setsid_in_vfork" 1>&6
+if test $xdvi_cv_setsid_in_vfork = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GOOD_SETSID_VFORK 1
+EOF
+
+fi
+fi
+echo $ac_n "checking for waitpid""... $ac_c" 1>&6
+echo "configure:3126: checking for waitpid" >&5
+if eval "test \"`echo '$''{'ac_cv_func_waitpid'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3131 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char waitpid(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char waitpid();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_waitpid) || defined (__stub___waitpid)
+choke me
+#else
+waitpid();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_waitpid=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_waitpid=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'waitpid`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_WAITPID 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+for ac_func in wait4
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3177: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3182 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+echo $ac_n "checking for putenv""... $ac_c" 1>&6
+echo "configure:3232: checking for putenv" >&5
+if eval "test \"`echo '$''{'ac_cv_func_putenv'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3237 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char putenv(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char putenv();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_putenv) || defined (__stub___putenv)
+choke me
+#else
+putenv();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_putenv=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_putenv=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'putenv`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_PUTENV 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+for ac_func in setenv
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3283: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3288 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+for ac_func in mkstemp sigaction strerror vsnprintf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3340: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3345 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for the function ulltostr() and the long long type""... $ac_c" 1>&6
+echo "configure:3393: checking for the function ulltostr() and the long long type" >&5
+if eval "test \"`echo '$''{'xdvi_cv_func_ulltostr'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3398 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+int main() {
+ char s[3 * sizeof(unsigned long long)];
+ unsigned long long value = 12345;
+ puts(ulltostr(value, s))
+; return 0; }
+EOF
+if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_cv_func_ulltostr=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_cv_func_ulltostr=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$xdvi_cv_func_ulltostr" 1>&6
+if test $xdvi_cv_func_ulltostr = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ULLTOSTR 1
+EOF
+
+fi
+
+if test $ac_cv_func_vsnprintf = yes; then
+ echo $ac_n "checking for a c99-compatible implementation of (v)snprintf()""... $ac_c" 1>&6
+echo "configure:3432: checking for a c99-compatible implementation of (v)snprintf()" >&5
+if eval "test \"`echo '$''{'xdvi_cv_func_good_vsnprintf'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3440 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int main()
+{
+ char s[2];
+ return (snprintf(s, 0, "test") != 4);
+}
+EOF
+if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ xdvi_cv_func_good_vsnprintf=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ xdvi_cv_func_good_vsnprintf=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$xdvi_cv_func_good_vsnprintf" 1>&6
+if test $xdvi_cv_func_good_vsnprintf = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GOOD_VSNPRINTF 1
+EOF
+
+fi
+fi
+
+MATH_LIB=
+echo $ac_n "checking for sin""... $ac_c" 1>&6
+echo "configure:3474: checking for sin" >&5
+if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3479 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sin(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_sin) || defined (__stub___sin)
+choke me
+#else
+sin();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_sin=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_sin=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
+echo "configure:3520: checking for sin in -lm" >&5
+ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3528 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin();
+
+int main() {
+sin()
+; return 0; }
+EOF
+if { (eval echo configure:3539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ MATH_LIB="-lm"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
+
+echo $ac_n "checking whether linker supports the --allow-multiple-definition flag""... $ac_c" 1>&6
+echo "configure:3564: checking whether linker supports the --allow-multiple-definition flag" >&5
+if eval "test \"`echo '$''{'xdvi_linker_multiple_defns'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ xdvi_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="-Xlinker --allow-multiple-definition"
+x_linker_options=""
+cat > conftest.$ac_ext <<EOF
+#line 3572 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+
+int main() {
+void foo(void);
+
+; return 0; }
+EOF
+if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_linker_multiple_defns=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_linker_multiple_defns=no
+
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$xdvi_linker_multiple_defns" 1>&6
+if test $xdvi_linker_multiple_defns = yes; then
+x_linker_options="-Xlinker --allow-multiple-definition"
+fi
+LDFLAGS="$xdvi_save_LDFLAGS"
+
+
+
+
+OPT_SRCS= OPT_OBJS=
+
+# Check whether --with-x-toolkit or --without-x-toolkit was given.
+if test "${with_x_toolkit+set}" = set; then
+ withval="$with_x_toolkit"
+ case "$withval" in
+yes | xaw)
+ X_PRE_LIBS="$X_PRE_LIBS $MATH_LIB"
+ MATH_LIB=
+ if test -z "$imake"; then
+# Cygwin needs -lXpm to be linked in explicitly; yet on older (<4.2)
+# versions of XFree86, -lXpm exists, but is not needed. So we do two checks.
+echo $ac_n "checking for whether -lXpm needs to be explicitly given""... $ac_c" 1>&6
+echo "configure:3617: checking for whether -lXpm needs to be explicitly given" >&5
+if eval "test \"`echo '$''{'xdvi_needs_explicit_xpm'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ xdvi_save_LIBS=$LIBS
+LIBS="-lXaw -lXmu -lXt$X_PRE_LIBS -lXext $LIBS $X_LIBS -lX11"
+cat > conftest.$ac_ext <<EOF
+#line 3624 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$LIBS -lXpm"
+cat > conftest.$ac_ext <<EOF
+#line 3644 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=unknown
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+LIBS=$xdvi_save_LIBS
+fi
+
+echo "$ac_t""$xdvi_needs_explicit_xpm" 1>&6
+if test "$xdvi_needs_explicit_xpm" = yes; then
+ X_PRE_LIBS=" -lXpm$X_PRE_LIBS"
+fi
+fi
+ X_PRE_LIBS=" -lXaw -lXmu -lXt$X_PRE_LIBS -lXext"
+ cat >> confdefs.h <<\EOF
+#define XAW 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS popups.c"
+ OPT_OBJS="$OPT_OBJS popups.o" ;;
+xaw3d)
+ X_PRE_LIBS="$X_PRE_LIBS $MATH_LIB"
+ MATH_LIB=
+ if test -z "$imake"; then
+# Cygwin needs -lXpm to be linked in explicitly; yet on older (<4.2)
+# versions of XFree86, -lXpm exists, but is not needed. So we do two checks.
+echo $ac_n "checking for whether -lXpm needs to be explicitly given""... $ac_c" 1>&6
+echo "configure:3689: checking for whether -lXpm needs to be explicitly given" >&5
+if eval "test \"`echo '$''{'xdvi_needs_explicit_xpm'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ xdvi_save_LIBS=$LIBS
+LIBS="-lXaw3d -lXmu -lXt$X_PRE_LIBS -lXext $LIBS $X_LIBS -lX11"
+cat > conftest.$ac_ext <<EOF
+#line 3696 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$LIBS -lXpm"
+cat > conftest.$ac_ext <<EOF
+#line 3716 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=unknown
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+LIBS=$xdvi_save_LIBS
+fi
+
+echo "$ac_t""$xdvi_needs_explicit_xpm" 1>&6
+if test "$xdvi_needs_explicit_xpm" = yes; then
+ X_PRE_LIBS=" -lXpm$X_PRE_LIBS"
+fi
+fi
+ X_PRE_LIBS=" -lXaw3d -lXmu -lXt$X_PRE_LIBS -lXext"
+ cat >> confdefs.h <<\EOF
+#define XAW 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define XAW3D 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS popups.c"
+ OPT_OBJS="$OPT_OBJS popups.o" ;;
+motif)
+ X_PRE_LIBS=" -lXm -lXmu -lXt$X_PRE_LIBS -lXext"
+ cat >> confdefs.h <<\EOF
+#define MOTIF 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS popups.c"
+ OPT_OBJS="$OPT_OBJS popups.o" ;;
+no)
+ X_PRE_LIBS= ;;
+*)
+ { echo "configure: error: invalid toolkit $withval given" 1>&2; exit 1; } ;;
+esac
+
+else
+ X_PRE_LIBS="$X_PRE_LIBS $MATH_LIB"
+ MATH_LIB=
+ if test -z "$imake"; then
+# Cygwin needs -lXpm to be linked in explicitly; yet on older (<4.2)
+# versions of XFree86, -lXpm exists, but is not needed. So we do two checks.
+echo $ac_n "checking for whether -lXpm needs to be explicitly given""... $ac_c" 1>&6
+echo "configure:3779: checking for whether -lXpm needs to be explicitly given" >&5
+if eval "test \"`echo '$''{'xdvi_needs_explicit_xpm'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ xdvi_save_LIBS=$LIBS
+LIBS="-lXaw -lXmu -lXt$X_PRE_LIBS -lXext $LIBS $X_LIBS -lX11"
+cat > conftest.$ac_ext <<EOF
+#line 3786 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$LIBS -lXpm"
+cat > conftest.$ac_ext <<EOF
+#line 3806 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=unknown
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+LIBS=$xdvi_save_LIBS
+fi
+
+echo "$ac_t""$xdvi_needs_explicit_xpm" 1>&6
+if test "$xdvi_needs_explicit_xpm" = yes; then
+ X_PRE_LIBS=" -lXpm$X_PRE_LIBS"
+fi
+fi
+ X_PRE_LIBS=" -lXaw -lXmu -lXt$X_PRE_LIBS -lXext"
+ cat >> confdefs.h <<\EOF
+#define XAW 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS popups.c"
+ OPT_OBJS="$OPT_OBJS popups.o"
+fi
+
+
+# Check whether --with-tetex or --without-tetex was given.
+if test "${with_tetex+set}" = set; then
+ withval="$with_tetex"
+ if test "$withval" != "no"; then
+ if test "${enable_ps_gs+set}" != set; then
+ enable_ps_gs=yes
+ fi
+ if test "${enable_extra_app_defaults+set}" != set; then
+ enable_extra_app_defaults="$withval"
+ fi
+ if test "${enable_dosnames+set}" != set; then
+ enable_dosnames=yes
+ fi
+fi
+
+fi
+
+
+# Check whether --enable-grey or --disable-grey was given.
+if test "${enable_grey+set}" = set; then
+ enableval="$enable_grey"
+ if test "$enableval" = yes; then
+ cat >> confdefs.h <<\EOF
+#define GREY 1
+EOF
+
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define GREY 1
+EOF
+
+fi
+
+
+# Check whether --enable-color or --disable-color was given.
+if test "${enable_color+set}" = set; then
+ enableval="$enable_color"
+ if test "$enableval" = yes; then
+ cat >> confdefs.h <<\EOF
+#define COLOR 1
+EOF
+
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define COLOR 1
+EOF
+
+fi
+
+
+# Check whether --enable-buttons or --disable-buttons was given.
+if test "${enable_buttons+set}" = set; then
+ enableval="$enable_buttons"
+ if test "$enableval" = yes; then
+ cat >> confdefs.h <<\EOF
+#define BUTTONS 1
+EOF
+
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define BUTTONS 1
+EOF
+
+fi
+
+
+# Check whether --enable-make-pk or --disable-make-pk was given.
+if test "${enable_make_pk+set}" = set; then
+ enableval="$enable_make_pk"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define MKTEXPK 1
+EOF
+
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define MKTEXPK_PATH "$enableval"
+EOF
+
+ fi
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define MKTEXPK 1
+EOF
+
+fi
+
+
+# Check whether --enable-old-make-pk or --disable-old-make-pk was given.
+if test "${enable_old_make_pk+set}" = set; then
+ enableval="$enable_old_make_pk"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define MKTEXPK 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define MAKETEXPK 1
+EOF
+
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define MKTEXPK_PATH "$enableval"
+EOF
+
+ fi
+fi
+fi
+
+
+# Check whether --enable-gf or --disable-gf was given.
+if test "${enable_gf+set}" = set; then
+ enableval="$enable_gf"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define USE_GF 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS gf.c"
+ OPT_OBJS="$OPT_OBJS gf.o"
+fi
+fi
+
+
+xdvi_ps_c= xdvi_ps_o=
+# Check whether --enable-ps-gs or --disable-ps-gs was given.
+if test "${enable_ps_gs+set}" = set; then
+ enableval="$enable_ps_gs"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define PS_GS 1
+EOF
+
+ xdvi_ps_c=" psgs.c"
+ xdvi_ps_o=" psgs.o"
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define GS_PATH "$enableval"
+EOF
+
+ fi
+fi
+fi
+
+
+# Check whether --enable-ps-dps or --disable-ps-dps was given.
+if test "${enable_ps_dps+set}" = set; then
+ enableval="$enable_ps_dps"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define PS_DPS 1
+EOF
+
+ xdvi_ps_c="$xdvi_ps_c psdps.c"
+ xdvi_ps_o="$xdvi_ps_o psdps.o"
+ X_PRE_LIBS=" -ldps$X_PRE_LIBS"
+ # Work around a bug in Solaris 2. This doesn't work with imake.
+ if test "x$x_includes" = x/usr/openwin/include && test ! -d $x_includes/DPS \
+ && test -d $x_includes/X11/DPS; then
+ CFLAGS="$CFLAGS -I$x_includes/X11"
+ fi
+fi
+fi
+
+
+# Check whether --enable-ps-news or --disable-ps-news was given.
+if test "${enable_ps_news+set}" = set; then
+ enableval="$enable_ps_news"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define PS_NEWS 1
+EOF
+
+ xdvi_ps_c="$xdvi_ps_c psnews.c"
+ xdvi_ps_o="$xdvi_ps_o psnews.o"
+ X_PRE_LIBS=" -u _xv_psview_pkg -lxvps -lxview -lcps -lolgx$X_PRE_LIBS"
+fi
+fi
+
+
+if test -n "$xdvi_ps_c"; then
+ OPT_SRCS="$OPT_SRCS psheader.c$xdvi_ps_c"
+ OPT_OBJS="$OPT_OBJS psheader.o$xdvi_ps_o"
+fi
+
+# Check whether --enable-config-file or --disable-config-file was given.
+if test "${enable_config_file+set}" = set; then
+ enableval="$enable_config_file"
+ if test "$enableval" != no; then
+ if test "$enableval" = yes; then
+ { echo "configure: error: Option \`--enable-config-file' requires an argument" 1>&2; exit 1; }
+ fi
+ cat >> confdefs.h <<EOF
+#define DEFAULT_CONFIG_PATH "$enableval"
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-self-auto or --disable-self-auto was given.
+if test "${enable_self_auto+set}" = set; then
+ enableval="$enable_self_auto"
+ if test "$enableval" != no; then
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_CONFIG_PATH "$enableval"
+EOF
+
+ fi
+ cat >> confdefs.h <<\EOF
+#define SELFAUTO 1
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-extra-app-defaults or --disable-extra-app-defaults was given.
+if test "${enable_extra_app_defaults+set}" = set; then
+ enableval="$enable_extra_app_defaults"
+ if test "$enableval" != no; then
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_CONFIG_PATH "$enableval"
+EOF
+
+ fi
+ cat >> confdefs.h <<\EOF
+#define EXTRA_APP_DEFAULTS 1
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-dosnames or --disable-dosnames was given.
+if test "${enable_dosnames+set}" = set; then
+ enableval="$enable_dosnames"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define DOSNAMES 1
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-a4 or --disable-a4 was given.
+if test "${enable_a4+set}" = set; then
+ enableval="$enable_a4"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define A4 1
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-texxet or --disable-texxet was given.
+if test "${enable_texxet+set}" = set; then
+ enableval="$enable_texxet"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define TEXXET 1
+EOF
+
+fi
+fi
+
+
+# Check whether --with-mfmode or --without-mfmode was given.
+if test "${with_mfmode+set}" = set; then
+ withval="$with_mfmode"
+ if test "x$withval" != xno; then
+ echo "$withval" | grep ':[0-9][0-9]*$' >/dev/null 2>&1 \
+ || echo "configure: warning: the mfmode should end with a dots-per-inch value" 1>&2
+ cat >> confdefs.h <<EOF
+#define MFMODE "$withval"
+EOF
+
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define MFMODE "cx:300"
+EOF
+
+fi
+
+
+# Check whether --with-default-texmf-path or --without-default-texmf-path was given.
+if test "${with_default_texmf_path+set}" = set; then
+ withval="$with_default_texmf_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_TEXMF_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_TEXMF_PATH "/usr/local/tex/texmf"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-font-path or --without-default-font-path was given.
+if test "${with_default_font_path+set}" = set; then
+ withval="$with_default_font_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_FONT_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_FONT_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-vf-path or --without-default-vf-path was given.
+if test "${with_default_vf_path+set}" = set; then
+ withval="$with_default_vf_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_VF_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_VF_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-header-path or --without-default-header-path was given.
+if test "${with_default_header_path+set}" = set; then
+ withval="$with_default_header_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_HEADER_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_HEADER_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-fig-path or --without-default-fig-path was given.
+if test "${with_default_fig_path+set}" = set; then
+ withval="$with_default_fig_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_FIG_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_FIG_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-source-path or --without-default-source-path was given.
+if test "${with_default_source_path+set}" = set; then
+ withval="$with_default_source_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_SOURCE_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_SOURCE_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-dvips-path or --without-default-dvips-path was given.
+if test "${with_default_dvips_path+set}" = set; then
+ withval="$with_default_dvips_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_DVIPS_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_DVIPS_PATH "dvips"
+EOF
+
+
+fi
+
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# A kludge necessary for CPPFLAGS to allow quoted args
+CPPFLAGS="`echo "$CPPFLAGS" | sed 's/\\\"/\\\\\\\"/g'`"
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo " config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@x_top@%$x_top%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@EXEEXT@%$EXEEXT%g
+s%@CPP@%$CPP%g
+s%@X_CFLAGS@%$X_CFLAGS%g
+s%@X_PRE_LIBS@%$X_PRE_LIBS%g
+s%@X_LIBS@%$X_LIBS%g
+s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@KRHEADER_H@%$KRHEADER_H%g
+s%@MATH_LIB@%$MATH_LIB%g
+s%@x_linker_options@%$x_linker_options%g
+s%@OPT_SRCS@%$OPT_SRCS%g
+s%@OPT_OBJS@%$OPT_OBJS%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+if test -n "$imake"; then
+ ac_noimake_makefile=
+else
+ ac_noimake_makefile='Makefile '
+fi
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"$ac_noimake_makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h:config.hin"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/systems/unix/tex-fpc/xdvi/macxdvi.h b/systems/unix/tex-fpc/xdvi/macxdvi.h
new file mode 100644
index 0000000000..c72024fa51
--- /dev/null
+++ b/systems/unix/tex-fpc/xdvi/macxdvi.h
@@ -0,0 +1,1299 @@
+/*========================================================================*\
+
+Copyright (c) 1990-2004 Paul Vojta
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+PAUL VOJTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+NOTE:
+ xdvi is based on prior work, as noted in the modification history
+ in xdvi.c.
+
+\*========================================================================*/
+ /* helbig changed this file to make it work on Mac OS X */
+ /* it defined XOPEN_SOURCE, which causes NSIG to be not defined,
+ which breaks signal.h included by event.c */
+
+/*
+ * Written by Eric C. Cooper, CMU
+ */
+
+#ifndef XDVI_H
+#define XDVI_H
+
+/********************************
+ * The C environment *
+ *******************************/
+
+#ifdef __hpux
+/* On HP-UX 10.10 B and 20.10, compiling with _XOPEN_SOURCE + ..._EXTENDED
+ * leads to poll() not realizing that a file descriptor is writable in psgs.c.
+ */
+#define _HPUX_SOURCE 1
+#else
+#undef _XOPEN_SOURCE /* needed because of imake */
+#define _XOPEN_SOURCE_EXTENDED 1
+#define __EXTENSIONS__ 1 /* needed to get struct timeval on SunOS 5.5 */
+#define _SVID_SOURCE 1 /* needed to get S_IFLNK in glibc */
+#define _BSD_SOURCE 1 /* needed to get F_SETOWN in glibc-2.1.3 */
+#endif
+
+#include "config.h"
+
+/* Some O/S dependent kludges. */
+#ifdef _AIX
+#define _ALL_SOURCE 1
+#endif
+
+/* If xmkmf is broken and there's a symlink from /usr/include/X11 to the right
+ * place, then there will be no -I... argument on the cc command line for the
+ * X include files. Since gcc version 3 and higher sets __STDC__ to 0 when
+ * including system header files on some platforms, we may end up with
+ * NeedFunctionPrototypes set to 0 when it should be 1. So, let's force the
+ * issue.
+ */
+
+#if __STDC__ && !defined(FUNCPROTO)
+# define FUNCPROTO (-1)
+#endif
+
+#if STDC_HEADERS
+# include <stddef.h>
+# include <stdlib.h>
+ /* the following works around the wchar_t problem */
+# include <X11/X.h>
+# if HAVE_X11_XOSDEFS_H
+# include <X11/Xosdefs.h>
+# endif
+# ifdef X_NOT_STDC_ENV
+# undef X_NOT_STDC_ENV
+# undef X_WCHAR
+# include <X11/Xlib.h>
+# define X_NOT_STDC_ENV
+# endif
+#endif
+
+#include <X11/Xlib.h> /* include Xfuncs.h, if available */
+#include <X11/Xutil.h> /* needed for XDestroyImage */
+#include <X11/Xos.h>
+
+#if XlibSpecificationRelease >= 5
+#include <X11/Xfuncs.h>
+#endif
+
+#undef TOOLKIT
+
+#if XAW || MOTIF
+
+#define TOOLKIT 1
+#include <X11/Intrinsic.h>
+#if (defined(VMS) && (XtSpecificationRelease <= 4)) || defined(lint)
+# include <X11/IntrinsicP.h>
+#endif
+#if MOTIF
+# include <Xm/Xm.h>
+# ifndef MOTIF_TIMERS /* see comment in events.c */
+# define MOTIF_TIMERS (XmVERSION >= 2)
+# endif
+#endif
+
+#else /* not TOOLKIT */
+
+#define XtNumber(arr) (sizeof(arr)/sizeof(arr[0]))
+#define XtWindow(win) (win)
+typedef unsigned long Pixel;
+typedef char Boolean;
+typedef unsigned int Dimension;
+#undef BUTTONS
+#undef EXTRA_APP_DEFAULTS
+
+#endif /* not TOOLKIT */
+
+#if EXTRA_APP_DEFAULTS && !SELFAUTO
+#define SELFAUTO 1
+#endif
+
+#if SELFAUTO && !defined(DEFAULT_CONFIG_PATH)
+#define DEFAULT_CONFIG_PATH \
+ ".:$SELFAUTOLOC:$SELFAUTODIR:$SELFAUTOPARENT:$SELFAUTODIR/share/texmf/web2c:$SELFAUTOPARENT/share/texmf/web2c:$SELFAUTODIR/texmf/web2c:$SELFAUTOPARENT/texmf/web2c:$TETEXDIR:$TEXMF/web2c"
+#endif
+
+#undef CFGFILE /* no cheating */
+
+#if defined(DEFAULT_CONFIG_PATH)
+#define CFGFILE 1
+#endif
+
+typedef char Bool3; /* Yes/No/Maybe */
+
+#define True 1
+#define False 0
+#define Maybe 2
+
+#ifdef VMS
+#include <string.h>
+#define index strchr
+#define rindex strrchr
+#define bzero(a, b) (void) memset ((void *) (a), 0, (size_t) (b))
+#define bcopy(a, b, c) (void) memmove ((void *) (b), (void *) (a), (size_t) (c))
+#endif
+
+#include <stdio.h>
+#include <setjmp.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+
+#ifndef NeedFunctionPrototypes
+#if __STDC__
+#define NeedFunctionPrototypes 1
+#else /* STDC */
+#define NeedFunctionPrototypes 0
+#endif /* STDC */
+#endif /* NeedFunctionPrototypes */
+
+#if NeedFunctionPrototypes
+#define ARGS(x) x
+#else
+#define ARGS(x) ()
+#endif
+
+#ifndef KPATHSEA
+
+/* These macros munge function declarations to make them work in both
+ cases. The P?H macros are used for declarations, the P?C for
+ definitions. See <ansidecl.h> from the GNU C library. P1H(void)
+ also works for definitions of routines which take no args. */
+
+#if NeedFunctionPrototypes /* Don't use __STDC__ here (gcc + SunOS 4) */
+
+#define P1H(p1) (p1)
+#define P2H(p1, p2) (p1, p2)
+
+#define P1C(t1,n1)(t1 n1)
+#define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
+#define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
+#define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
+
+#else /* not NeedFunctionPrototypes */
+
+#define P1H(p1) ()
+#define P2H(p1, p2) ()
+
+#define P1C(t1,n1) (n1) t1 n1;
+#define P2C(t1,n1, t2,n2) (n1,n2) t1 n1; t2 n2;
+#define P3C(t1,n1, t2,n2, t3,n3) (n1,n2,n3) t1 n1; t2 n2; t3 n3;
+#define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1,n2,n3,n4) \
+ t1 n1; t2 n2; t3 n3; t4 n4;
+
+#endif /* not NeedFunctionPrototypes */
+
+#endif /* not KPATHSEA */
+
+#ifndef NeedWidePrototypes
+#define NeedWidePrototypes NeedFunctionPrototypes
+#endif
+
+#ifndef NeedVarargsPrototypes
+#define NeedVarargsPrototypes NeedFunctionPrototypes
+#endif
+
+#if NeedVarargsPrototypes
+#define VARGS(x) x
+#else
+#define VARGS(x) ()
+#endif
+
+#ifndef _XFUNCPROTOBEGIN
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#endif
+
+#ifndef _Xconst
+#if __STDC__
+#define _Xconst const
+#else /* STDC */
+#define _Xconst
+#endif /* STDC */
+#endif /* _Xconst */
+
+#ifndef VOLATILE
+#if __STDC__ || (defined(__stdc__) && defined(__convex__))
+#define VOLATILE volatile
+#else
+#define VOLATILE /* nothing */
+#endif
+#endif
+
+#ifndef NORETURN
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)
+# define NORETURN __attribute__((__noreturn__))
+# else
+# define NORETURN /* nothing */
+# endif
+#endif
+
+#ifndef UNUSED
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define UNUSED __attribute__((__unused__))
+# else
+# define UNUSED /* nothing */
+# endif
+#endif
+
+#ifndef OPEN_MODE
+#ifndef VMS
+#define OPEN_MODE "r"
+#else /* VMS */
+#define OPEN_MODE "r", "ctx=stm"
+#endif /* VMS */
+#endif /* OPEN_MODE */
+
+#ifndef VMS
+#define OPEN_MODE_ARGS _Xconst char *
+#else
+#define OPEN_MODE_ARGS _Xconst char *, _Xconst char *
+#endif
+
+#define Printf (void) printf
+#define Puts (void) puts
+#define Fprintf (void) fprintf
+#define Sprintf (void) sprintf
+#define Fseek (void) fseek
+#define Fread (void) fread
+#define Fputs (void) fputs
+#define Putc (void) putc
+#define Putchar (void) putchar
+#define Fclose (void) fclose
+#define Fflush (void) fflush
+#define Strcat (void) strcat
+#define Strcpy (void) strcpy
+
+/********************************
+ * Types and data *
+ *******************************/
+
+#ifndef EXTERN
+#define EXTERN extern
+#define INIT(x)
+#endif
+
+#define MAXDIM 32767
+
+typedef unsigned char ubyte;
+
+#if NeedWidePrototypes
+typedef unsigned int wide_ubyte;
+typedef int wide_bool;
+#define WIDENINT (int)
+#else
+typedef ubyte wide_ubyte;
+typedef Boolean wide_bool;
+#define WIDENINT
+#endif
+
+#if defined(MAKETEXPK) && !defined(MKTEXPK)
+#define MKTEXPK 1
+#endif
+
+/*
+ * pixel_conv is currently used only for converting absolute positions
+ * to pixel values; although normally it should be
+ * ((int) ((x) / shrink_factor + (1 << 15) >> 16)),
+ * the rounding is achieved instead by moving the constant 1 << 15 to
+ * PAGE_OFFSET in dvi-draw.c.
+ */
+#define pixel_conv(x) ((int) ((x) / shrink_factor >> 16))
+#define pixel_round(x) ((int) ROUNDUP(x, shrink_factor << 16))
+#define spell_conv0(n, f) ((long) (n * f))
+#define spell_conv(n) spell_conv0(n, dimconv)
+
+#define BMUNIT unsigned BMTYPE
+#define BMBITS (8 * BMBYTES)
+
+#define ADD(a, b) ((BMUNIT *) (((char *) a) + b))
+#define SUB(a, b) ((BMUNIT *) (((char *) a) - b))
+
+extern BMUNIT bit_masks[BMBITS + 1];
+
+struct frame {
+ struct framedata {
+ long dvi_h, dvi_v, w, x, y, z;
+ int pxl_v;
+ } data;
+ struct frame *next, *prev;
+};
+
+#ifndef TEXXET
+typedef long (*set_char_proc) ARGS((wide_ubyte));
+#else
+typedef void (*set_char_proc) ARGS((wide_ubyte, wide_ubyte));
+#endif
+
+typedef void (*home_proc) ARGS((wide_bool));
+
+struct drawinf { /* this information is saved when using virtual fonts */
+ struct framedata data;
+ struct font *fontp;
+ set_char_proc set_char_p;
+ int tn_table_len;
+ struct font **tn_table;
+ struct tn *tn_head;
+ ubyte *pos, *end;
+ struct font *virtual;
+#ifdef TEXXET
+ int dir;
+#endif
+};
+
+EXTERN struct drawinf currinf;
+
+/* entries below with the characters 'dvi' in them are actually stored in
+ scaled pixel units */
+
+#define DVI_H currinf.data.dvi_h
+#define PXL_H pixel_conv(currinf.data.dvi_h)
+#define DVI_V currinf.data.dvi_v
+#define PXL_V currinf.data.pxl_v
+#define WW currinf.data.w
+#define XX currinf.data.x
+#define YY currinf.data.y
+#define ZZ currinf.data.z
+#define ROUNDUP(x,y) (((x)+(y)-1)/(y))
+
+EXTERN int current_page;
+EXTERN int total_pages;
+EXTERN int pageno_correct INIT(1);
+EXTERN long magnification;
+EXTERN double dimconv;
+EXTERN double tpic_conv;
+EXTERN int n_files_left INIT(32767); /* for LRU closing of fonts */
+EXTERN unsigned int page_w, page_h;
+
+#if defined(GS_PATH) && !defined(PS_GS)
+#define PS_GS 1
+#endif
+
+#if defined(PS_DPS) || defined(PS_NEWS) || defined(PS_GS)
+#define PS 1
+#else
+#define PS 0
+#endif
+
+EXTERN int scanned_page; /* last page prescanned */
+
+#if PS
+EXTERN int scanned_page_ps; /* last page scanned for PS specials */
+EXTERN int scanned_page_ps_bak; /* save the above if PS is turned off */
+#endif
+
+#if COLOR
+EXTERN int scanned_page_color; /* last page scanned for color spcls */
+#endif
+
+EXTERN int scanned_page_reset; /* number to reset the above to */
+
+/*
+ * The following is set when we're prescanning before opening up the windows,
+ * and we hit a PostScript header file. We can't start up gs until we get
+ * a window to associate the process to, so we have to prescan twice.
+ */
+#if PS_GS
+EXTERN Boolean gs_postpone_prescan INIT(False);
+#endif
+
+/*
+ * Per-page data in DVI file, indexed by page number - 1.
+ * Offset is initialized in prepare_pages().
+ * Page size is initialized while prescanning.
+ */
+struct per_page {
+ long offset;
+ unsigned int pw, ph; /* page size */
+ unsigned int ww, wh; /* window size */
+};
+
+EXTERN struct per_page *page_info;
+
+/*
+ * Set if the -paper option overrides papersize specials.
+ */
+EXTERN Boolean ignore_papersize_specials INIT(False);
+
+/*
+ * Mechanism for reducing repeated warning about specials, lost characters, etc.
+ */
+EXTERN Boolean warn_spec_now;
+
+/*
+ * If we're in the middle of a PSFIG special.
+ */
+EXTERN Boolean psfig_begun INIT(False);
+
+/*
+ * Page on which to draw box from forward source special searching.
+ */
+EXTERN int source_fwd_box_page INIT(-1); /* -1 means no box */
+
+/*
+ * Information on deferred source operation. See do_pages() for meaning.
+ */
+EXTERN _Xconst char *source_forward_string INIT(NULL);
+EXTERN int source_reverse_x, source_reverse_y;
+EXTERN int source_show_all;
+
+
+/*
+ * Bitmap structure for raster ops.
+ */
+struct bitmap {
+ unsigned short w, h; /* width and height in pixels */
+ short bytes_wide; /* scan-line width in bytes */
+ char *bits; /* pointer to the bits */
+};
+
+/*
+ * Per-character information.
+ * There is one of these for each character in a font (raster fonts only).
+ * All fields are filled in at font definition time,
+ * except for the bitmap, which is "faulted in"
+ * when the character is first referenced.
+ */
+struct glyph {
+ long addr; /* address of bitmap in font file */
+ long dvi_adv; /* DVI units to move reference point */
+ short x, y; /* x and y offset in pixels */
+ struct bitmap bitmap; /* bitmap for character */
+ short x2, y2; /* x and y offset in pixels (shrunken bitmap) */
+#if GREY
+# if COLOR
+ struct fgrec *fg; /* fgrec for which these pixmaps are valid */
+# endif
+ XImage *image2;
+ char *pixmap2;
+ char *pixmap2_t;
+#endif /* GREY */
+ struct bitmap bitmap2; /* shrunken bitmap for character */
+};
+
+/*
+ * Per-character information for virtual fonts
+ */
+struct macro {
+ ubyte *pos; /* address of first byte of macro */
+ ubyte *end; /* address of last+1 byte */
+ long dvi_adv; /* DVI units to move reference point */
+ Boolean free_me; /* if free(pos) should be called when */
+ /* freeing space */
+};
+
+/*
+ * The layout of a font information block.
+ * There is one of these for every loaded font or magnification thereof.
+ * Duplicates are eliminated: this is necessary because of possible recursion
+ * in virtual fonts.
+ *
+ * Also note the strange units. The design size is in 1/2^20 point
+ * units (also called micro-points), and the individual character widths
+ * are in the TFM file in 1/2^20 ems units, i.e., relative to the design size.
+ *
+ * We then change the sizes to SPELL units (unshrunk pixel / 2^16).
+ */
+
+#define NOMAGSTP (-29999)
+
+typedef void (*read_char_proc) ARGS((struct font *, wide_ubyte));
+
+struct font {
+ struct font *next; /* link to next font info block */
+ char *fontname; /* name of font */
+ float fsize; /* size information (dots per inch) */
+ int magstepval; /* magstep number * two, or NOMAGSTP */
+ FILE *file; /* open font file or NULL */
+ char *filename; /* name of font file */
+ long checksum; /* checksum */
+ unsigned short timestamp; /* for LRU management of fonts */
+ ubyte flags; /* flags byte (see values below) */
+ ubyte maxchar; /* largest character code */
+ double dimconv; /* size conversion factor */
+ set_char_proc set_char_p; /* proc used to set char */
+ /* these fields are used by (loaded) raster fonts */
+ read_char_proc read_char; /* function to read bitmap */
+ struct glyph *glyph;
+ /* these fields are used by (loaded) virtual fonts */
+ struct font **vf_table; /* list of fonts used by this vf */
+ struct tn *vf_chain; /* ditto, if TeXnumber >= VFTABLELEN */
+ struct font *first_font; /* first font defined */
+ struct macro *macro;
+ /* I suppose the above could be put into a union, but we */
+ /* wouldn't save all that much space. */
+};
+
+#define FONT_IN_USE 1 /* used for housekeeping */
+#define FONT_LOADED 2 /* if font file has been read */
+#define FONT_VIRTUAL 4 /* if font is virtual */
+
+#define TNTABLELEN 30 /* length of TeXnumber array (dvi file) */
+#define VFTABLELEN 5 /* length of TeXnumber array (virtual fonts) */
+
+struct tn {
+ struct tn *next; /* link to next TeXnumber info block */
+ int TeXnumber; /* font number (in DVI file) */
+ struct font *fontp; /* pointer to the rest of the info */
+};
+
+EXTERN struct font *tn_table[TNTABLELEN];
+EXTERN struct font *font_head INIT(NULL);
+EXTERN struct tn *tn_head INIT(NULL);
+EXTERN ubyte maxchar;
+EXTERN unsigned short current_timestamp INIT(0);
+
+/*
+ * Command line flags.
+ */
+
+extern struct _resource {
+#if TOOLKIT && CFGFILE
+ _Xconst char *progname;
+#endif
+#if TOOLKIT
+ int shrinkfactor;
+ _Xconst char *main_translations;
+ _Xconst char *wheel_translations;
+ int dvips_hang;
+ int dvips_fail_hang;
+#endif
+ int wheel_unit;
+ int _density;
+#ifdef GREY
+ float _gamma;
+#endif
+ int _pixels_per_inch;
+ _Xconst char *sidemargin;
+ _Xconst char *topmargin;
+ _Xconst char *xoffset;
+ _Xconst char *yoffset;
+ _Xconst char *paper;
+ _Xconst char *_alt_font;
+#ifdef MKTEXPK
+ Boolean makepk;
+#endif
+ _Xconst char *mfmode;
+ _Xconst char *editor;
+ _Xconst char *src_pos;
+ Boolean src_fork;
+ Boolean _list_fonts;
+ Boolean reverse;
+ Boolean _warn_spec;
+ Boolean _hush_chars;
+ Boolean _hush_chk;
+ Boolean safer;
+#if defined(VMS) || !defined(TOOLKIT)
+ _Xconst char *fore_color;
+ _Xconst char *back_color;
+#endif
+ Pixel _fore_Pixel;
+ Pixel _back_Pixel;
+#ifdef TOOLKIT
+ Pixel _brdr_Pixel;
+ Pixel _hl_Pixel;
+ Pixel _cr_Pixel;
+#endif
+ _Xconst char *icon_geometry;
+ Boolean keep_flag;
+ Boolean copy;
+ Boolean thorough;
+#if PS
+ /* default is to use DPS, then NEWS, then GhostScript;
+ * we will figure out later on which one we will use */
+ Boolean _postscript;
+ Boolean allow_shell;
+#ifdef PS_DPS
+ Boolean useDPS;
+#endif
+#ifdef PS_NEWS
+ Boolean useNeWS;
+#endif
+#ifdef PS_GS
+ Boolean useGS;
+ Boolean gs_safer;
+ Boolean gs_alpha;
+ _Xconst char *gs_path;
+ _Xconst char *gs_palette;
+#endif
+#endif /* PS */
+ Boolean prescan;
+ _Xconst char *debug_arg;
+ Boolean version_flag;
+#if BUTTONS
+ Boolean expert;
+ _Xconst char *button_translations;
+ int shrinkbutton[9];
+ Dimension btn_side_spacing;
+ Dimension btn_top_spacing;
+ Dimension btn_between_spacing;
+ Dimension btn_between_extra;
+ Dimension btn_border_width;
+#endif
+ _Xconst char *mg_arg[5];
+#if COLOR
+ Boolean _use_color;
+#endif
+#ifdef GREY
+ Boolean _use_grey;
+ Bool3 install;
+#endif
+#if TOOLKIT
+ _Xconst char *dvips_path;
+#endif
+} resource;
+
+/* As a convenience, we define the field names without leading underscores
+ * to point to the field of the above record. Here are the global ones;
+ * the local ones are defined in each module. */
+
+#define density resource._density
+#define pixels_per_inch resource._pixels_per_inch
+#define alt_font resource._alt_font
+#define list_fonts resource._list_fonts
+#define warn_spec resource._warn_spec
+#define hush_chars resource._hush_chars
+#define hush_chk resource._hush_chk
+#if COLOR
+#define use_color resource._use_color
+#endif
+#ifdef GREY
+#define use_grey resource._use_grey
+#endif
+
+#ifndef TOOLKIT
+EXTERN Pixel brdr_Pixel;
+#endif
+
+#if GREY
+EXTERN Pixel plane_masks[4];
+#endif
+
+#if GREY || COLOR
+EXTERN XColor color_data[2];
+#define fore_color_data color_data[0]
+#define back_color_data color_data[1]
+#endif
+
+#if COLOR
+
+struct rgb {
+ unsigned short r, g, b;
+};
+
+struct pagecolor {
+ struct rgb bg;
+ unsigned int stacksize;
+ _Xconst struct rgb *colorstack;
+};
+
+/* Information on background color and initial color stack for each page. */
+EXTERN struct pagecolor *page_colors INIT(NULL);
+
+/* The initial color stack is gotten from the pagecolor record for a page. */
+EXTERN _Xconst struct rgb *color_bottom;
+EXTERN unsigned int color_bot_size; /* number of entries */
+
+/* Additions to the runtime color stack on a given page are stored in a linked
+ list. "struct colorframe" is defined in special.c. */
+EXTERN struct colorframe *rcs_top;
+
+/* Color states. */
+EXTERN struct rgb fg_initial; /* Initial fg (from command line) */
+EXTERN struct rgb bg_initial; /* Initial bg */
+
+/*
+ * For each (foreground, background) color pair, we keep information (depending
+ * on the color model). It is organized as a linked list of linked lists,
+ * with background color more significant.
+ */
+
+struct bgrec {
+ struct bgrec *next;
+ struct rgb color;
+ struct fgrec *fg_head;
+ Boolean pixel_good; /* if the pixel entry is valid */
+ Pixel pixel;
+};
+
+struct fgrec {
+ struct fgrec *next;
+ struct rgb color;
+ Boolean pixel_good; /* if the pixel entry is valid */
+ Pixel pixel;
+#if GREY
+ Boolean palette_good; /* if the palette entry is valid */
+ Pixel palette[16]; /* non-TrueColor only */
+#endif
+};
+
+EXTERN struct bgrec *bg_head INIT(NULL); /* head of list */
+EXTERN struct bgrec *bg_current INIT(NULL); /* current bg value */
+EXTERN struct fgrec *fg_current; /* current fg value */
+EXTERN struct fgrec *fg_active INIT(NULL); /* where the GCs are */
+
+/* List of allocated colors (to be deallocated upon document change) */
+EXTERN Pixel *color_list; /* list of colors */
+EXTERN unsigned int color_list_len INIT(0); /* current len of list*/
+EXTERN unsigned int color_list_max INIT(0); /* allocated size */
+
+/* Whether the color situation has been warned about. */
+EXTERN Boolean color_warned INIT(False);
+
+/* Cursor color (for XRecolorCursor). */
+extern XColor cr_Color;
+
+#endif /* COLOR */
+
+extern struct mg_size_rec {
+ int w;
+ int h;
+}
+ mg_size[5];
+
+EXTERN int debug INIT(0);
+
+#define DBG_BITMAP 1
+#define DBG_DVI 2
+#define DBG_PK 4
+#define DBG_BATCH 8
+#define DBG_EVENT 16
+#define DBG_OPEN 32
+#define DBG_PS 64
+#define DBG_CLIENT 128
+#define DBG_ALL (~DBG_BATCH)
+
+EXTERN int offset_x, offset_y;
+EXTERN unsigned int unshrunk_paper_w, unshrunk_paper_h;
+EXTERN unsigned int unshrunk_page_w, unshrunk_page_h;
+
+EXTERN char *dvi_name INIT(NULL); /* dvi file name */
+EXTERN FILE *dvi_file; /* user's file */
+EXTERN time_t dvi_time; /* last modification time */
+EXTERN ino_t dvi_inode; /* used for source specials */
+EXTERN unsigned char *dvi_property; /* for setting in window */
+EXTERN size_t dvi_property_length;
+#if TOOLKIT
+EXTERN Boolean titles_are_stale INIT(True);
+ /* replace icon/window titles */
+#endif
+EXTERN _Xconst char *prog;
+EXTERN int bak_shrink; /* last shrink factor != 1 */
+EXTERN Dimension window_w, window_h;
+EXTERN XImage *image;
+EXTERN int backing_store;
+EXTERN int home_x, home_y;
+
+EXTERN Display *DISP;
+EXTERN Screen *SCRN;
+#if TOOLKIT
+extern XtActionsRec Actions[];
+extern Cardinal num_actions;
+#endif
+#if XAW
+EXTERN XtAccelerators accels_cr, accels_cr_click;
+#endif
+#ifdef GREY
+EXTERN Visual *our_visual;
+EXTERN unsigned int our_depth;
+EXTERN Colormap our_colormap;
+#else
+#define our_depth (unsigned int) DefaultDepthOfScreen(SCRN)
+#define our_visual DefaultVisualOfScreen(SCRN)
+#define our_colormap DefaultColormapOfScreen(SCRN)
+#endif
+EXTERN GC ruleGC;
+EXTERN GC foreGC, highGC;
+EXTERN GC foreGC2;
+EXTERN GC copyGC;
+EXTERN Boolean copy;
+
+EXTERN Cursor redraw_cursor, ready_cursor, drag_cursor[3];
+
+#if TOOLKIT
+struct xdvi_action {
+ struct xdvi_action *next;
+ XtActionProc proc;
+ Cardinal num_params;
+ String param;
+};
+
+struct wheel_acts {
+ struct wheel_acts *next;
+ Modifiers mask;
+ Modifiers value;
+ struct _LateBindings *late_bindings;
+ unsigned int button;
+ struct xdvi_action *action;
+};
+
+EXTERN struct wheel_acts *wheel_actions;
+#endif
+
+#if MOTIF && BUTTONS
+EXTERN XtTranslations wheel_trans_table INIT(NULL);
+#endif
+
+#ifdef GREY
+EXTERN Pixel *pixeltbl;
+EXTERN Pixel *pixeltbl_t;
+#endif /* GREY */
+
+/*
+ * Flag values and masks for event_flags
+ */
+
+#define EV_IDLE (1<<0) /* non-event */
+#define EV_CURSOR (1<<1) /* cursor needs to revert back to ready */
+#define EV_EXPOSE (1<<2) /* expose occurred somewhere */
+#define EV_MAG_MOVE (1<<3) /* magnifier moved */
+#define EV_MAG_GONE (1<<4) /* magnifier gone while being drawn */
+#define EV_ACK (1<<5) /* used internally */
+#define EV_SRC (1<<6) /* source special operation is pending */
+#define EV_NEWPAGE (1<<7) /* new page requested */
+#define EV_PS_TOGGLE (1<<8) /* PostScript toggled on or off */
+#define EV_NEWDOC (1<<9) /* new dvi file requested */
+#define EV_TERM (1<<10) /* quit */
+#define EV_MAXPLUS1 (1<<11)
+
+#define EV_GE_IDLE (EV_MAXPLUS1 - EV_IDLE)
+#define EV_GT_IDLE (EV_MAXPLUS1 - EV_CURSOR)
+#define EV_GE_CURSOR (EV_MAXPLUS1 - EV_CURSOR)
+#define EV_GE_EXPOSE (EV_MAXPLUS1 - EV_EXPOSE)
+#define EV_GE_MAG_MOVE (EV_MAXPLUS1 - EV_MAG_MOVE)
+#define EV_GE_MAG_GONE (EV_MAXPLUS1 - EV_MAG_GONE)
+#define EV_GE_ACK (EV_MAXPLUS1 - EV_ACK)
+#define EV_GE_NEWPAGE (EV_MAXPLUS1 - EV_NEWPAGE)
+#define EV_GE_PS_TOGGLE (EV_MAXPLUS1 - EV_PS_TOGGLE)
+#define EV_GE_NEWDOC (EV_MAXPLUS1 - EV_NEWDOC)
+#define EV_GE_TERM (EV_MAXPLUS1 - EV_TERM)
+
+#define EV_NOWAIT EV_GE_IDLE
+
+EXTERN unsigned int ev_flags INIT(EV_IDLE);
+EXTERN VOLATILE int event_counter INIT(0);
+EXTERN jmp_buf canit_env;
+
+struct xchild {
+ struct xchild *next; /* link to next in list */
+ pid_t pid; /* pid of process, or 0 */
+ Boolean killable; /* if can be killed with SIGKILL */
+ void (*proc) ARGS((int)); /* procedure to call */
+};
+
+struct xio {
+ struct xio *next; /* link to next in list */
+ int fd; /* file descriptor */
+ int xio_events; /* same as in struct pollfd (can't call
+ it events because poll.h on AIX
+ defines events to something else) */
+#if HAVE_POLL
+ struct pollfd *pfd;
+#endif
+ void (*read_proc) ARGS((void)); /* call to read */
+ void (*write_proc) ARGS((void)); /* call to write */
+};
+
+struct xtimer {
+ struct xtimer *next; /* link to next in chain */
+ struct timeval when; /* when to call the routine */
+ void (*proc) ARGS((struct xtimer *)); /* procedure to call */
+#if MOTIF_TIMERS
+ XtTimerCallbackProc xt_proc; /* additional data for Xm */
+ XtPointer closure;
+#endif
+};
+
+#if MOTIF_TIMERS
+# define TIMER_INIT(proc) {NULL, {0, 0}, proc, NULL, NULL}
+#else
+# define TIMER_INIT(proc) {NULL, {0, 0}, proc}
+#endif
+
+struct WindowRec {
+ Window win;
+ int shrinkfactor;
+ int base_x, base_y;
+ unsigned int width, height;
+ int min_x, max_x, min_y, max_y; /* for pending expose events */
+};
+
+extern struct WindowRec mane, alt, currwin;
+EXTERN int min_x, max_x, min_y, max_y;
+EXTERN Boolean drawing_mag INIT(False);
+
+#define shrink_factor currwin.shrinkfactor
+
+#if TOOLKIT
+EXTERN Widget top_level INIT(0);
+EXTERN Widget vport_widget, draw_widget, clip_widget;
+# if MOTIF
+EXTERN Widget shrink_button[4];
+EXTERN Widget x_bar, y_bar; /* horizontal and vert. scroll bars */
+# endif
+# if BUTTONS
+EXTERN Widget form_widget;
+EXTERN int xtra_wid INIT(0);
+extern _Xconst char default_button_config[]; /* defined in events.c */
+# if XAW
+EXTERN Widget panel_widget;
+EXTERN Cursor panel_cursor INIT(0);
+# endif
+# endif
+#else /* not TOOLKIT */
+EXTERN Window top_level INIT(0);
+
+#define BAR_WID 12 /* width of darkened area */
+#define BAR_THICK 15 /* gross amount removed */
+#endif /* not TOOLKIT */
+
+#if XAW
+#define WARN(t, s) (void) warning_popup(s, "OK", NULL)
+#define WARN1(t, s, s1) (void) warning_popup_long(s, "OK", NULL, s1)
+#define WARN2(t, s, s1, s2) (void) warning_popup_long(s, "OK", NULL, s1, s2)
+#elif MOTIF
+#define WARN(t, s) (void) warning_popup(s, t, NULL, NULL)
+#define WARN1(t, s, s1) (void) warning_popup_long(s, t, NULL, NULL, s1)
+#define WARN2(t, s, s1, s2) (void) warning_popup_long(s, t, NULL, NULL, s1, s2)
+#elif CC_K_AND_R
+#define WARN(t, s) (void) fputs(s "\n", stderr)
+#define WARN1(t, s, s1) (void) fprintf(stderr, s "\n", s1)
+#else
+#define WARN(t, s) (void) (fputs(s, stderr), putc('\n', stderr))
+#define WARN1(t, s, s1) (void) (fprintf(stderr, s, s1), putc('\n', stderr))
+#endif
+
+/*
+ * If a popup is popped up before the main window, then the main window is
+ * likely to cover it. So we have to postpone popping them up until after
+ * realizing the main window. It is not workable to pop them up immediately
+ * and then raise them later, due to unpredictable window manager behavior.
+ */
+
+#if TOOLKIT
+EXTERN Boolean postpone_popups INIT(True);
+EXTERN size_t n_init_popups INIT(0);
+EXTERN Widget *init_popups;
+EXTERN size_t alloc_init_popups INIT(0);
+#endif
+
+/*
+ * Structure to use for status popups.
+ */
+
+#if TOOLKIT
+struct status_popup {
+ Widget shell;
+ Widget label;
+ int expected_type;
+ Boolean popped;
+ Boolean spurious;
+};
+#endif
+
+EXTERN char *ffline INIT(NULL); /* an array used by filefind to store */
+ /* the file name being formed. */
+ /* It expands as needed. */
+ /* Also used elsewhere. */
+EXTERN size_t ffline_len INIT(0); /* current length of ffline[] */
+
+/*
+ * Used by the geometry-scanning routines.
+ * It passes pointers to routines to be called at certain
+ * points in the dvi file, and other information.
+ */
+
+struct geom_info {
+ void (*geom_box) ARGS((struct geom_info *,
+ long, long, long, long));
+ void (*geom_special) ARGS((struct geom_info *, _Xconst char *));
+ jmp_buf done_env;
+ void *geom_data;
+};
+
+typedef void (*mouse_proc) ARGS((XEvent *));
+extern void null_mouse ARGS((XEvent *));
+
+EXTERN mouse_proc mouse_motion INIT(null_mouse);
+EXTERN mouse_proc mouse_release INIT(null_mouse);
+
+/* Used for source special lookup (forward search) and for window manager
+ delete protocol (toolkit only). */
+
+#if XAW
+EXTERN Atom atoms[5];
+#elif MOTIF
+EXTERN Atom atoms[4];
+#else
+EXTERN Atom atoms[3];
+#endif
+
+#define ATOM_XDVI_WINDOWS (atoms[0])
+#define ATOM_DVI_FILE (atoms[1])
+#define ATOM_SRC_GOTO (atoms[2])
+#if TOOLKIT
+#define XA_WM_DELETE_WINDOW (atoms[3])
+#endif
+#if XAW
+#define XA_WM_PROTOCOLS (atoms[4])
+#endif
+
+#ifdef SELFAUTO
+EXTERN _Xconst char *argv0; /* argv[0] */
+#endif
+
+#if PS
+
+extern struct psprocs {
+ void (*toggle) ARGS((void));
+ void (*destroy) ARGS((void));
+ void (*interrupt) ARGS((void));
+ void (*endpage) ARGS((void));
+ void (*drawbegin) ARGS((int, int, _Xconst char *));
+ void (*drawraw) ARGS((_Xconst char *));
+ void (*drawfile) ARGS((_Xconst char *, FILE *));
+ void (*drawend) ARGS((_Xconst char *));
+ void (*beginheader) ARGS((void));
+ void (*endheader) ARGS((void));
+ void (*newdoc) ARGS((void));
+} psp, no_ps_procs;
+
+#endif /* PS */
+
+/********************************
+ * Procedures *
+ *******************************/
+
+_XFUNCPROTOBEGIN
+
+extern int atopix ARGS((_Xconst char *, wide_bool));
+#if TOOLKIT
+extern Bool compile_action ARGS((_Xconst char *, struct xdvi_action **));
+#endif
+#if BUTTONS
+extern void create_buttons ARGS((void));
+#if XAW
+extern void set_button_panel_height ARGS((XtArgVal));
+#endif
+#endif /* BUTTONS */
+#if GREY
+extern void init_plane_masks ARGS((void));
+#endif
+#if COLOR
+extern Pixel alloc_color ARGS((_Xconst struct rgb *, Pixel));
+extern void do_color_change ARGS((void));
+#elif GREY
+extern void init_pix ARGS((void));
+#endif
+extern void expose ARGS((struct WindowRec *, int, int,
+ unsigned int, unsigned int));
+extern void home ARGS((wide_bool));
+extern void reconfig ARGS((void));
+#if TOOLKIT
+extern void handle_resize ARGS((Widget, XtPointer, XEvent *, Boolean *));
+extern void handle_expose ARGS((Widget, XtPointer, XEvent *, Boolean *));
+extern void handle_property_change ARGS((Widget, XtPointer, XEvent *,
+ Boolean *));
+#endif
+#if XAW
+extern void handle_messages ARGS((Widget, XtPointer, XEvent *, Boolean *));
+#elif MOTIF
+extern void handle_wm_delete ARGS((Widget, XtPointer, XtPointer));
+#endif
+extern void goto_page ARGS((int, home_proc));
+#if MOTIF
+extern void file_pulldown_callback ARGS((Widget, XtPointer, XtPointer));
+extern void navigate_pulldown_callback ARGS((Widget, XtPointer, XtPointer));
+extern void scale_pulldown_callback ARGS((Widget, XtPointer, XtPointer));
+extern void set_shrink_factor ARGS((int));
+extern void popdown_callback ARGS((Widget, XtPointer, XtPointer));
+#endif
+#if !TOOLKIT
+extern void showmessage ARGS((_Xconst char *));
+#endif
+extern void set_chld ARGS((struct xchild *));
+extern void clear_chld ARGS((struct xchild *));
+extern void set_io ARGS((struct xio *));
+extern void clear_io ARGS((struct xio *));
+extern void set_timer ARGS((struct xtimer *, int));
+extern void cancel_timer ARGS((struct xtimer *));
+extern unsigned int read_events ARGS((unsigned int));
+extern void enable_intr ARGS((void));
+extern void do_pages ARGS((void)) NORETURN;
+#if XAW
+extern void simple_popup ARGS((struct status_popup *, _Xconst char *,
+ XtCallbackProc));
+extern void simple_popdown ARGS((struct status_popup *));
+extern void do_popup ARGS((Widget));
+extern Widget warning_popup ARGS((_Xconst char *, _Xconst char *,
+ XtCallbackProc));
+extern Widget warning_popup_long VARGS((_Xconst char *, _Xconst char *,
+ XtCallbackProc, ...));
+extern void Act_print ARGS((Widget, XEvent *, String *, Cardinal *));
+extern void Act_open_dvi_file ARGS((Widget, XEvent *, String *,
+ Cardinal *));
+#elif MOTIF
+extern void simple_popup ARGS((struct status_popup *, _Xconst char *,
+ XtCallbackProc));
+extern void simple_popdown ARGS((struct status_popup *));
+extern void do_popup ARGS((Widget));
+extern Widget warning_popup ARGS((_Xconst char *, int, _Xconst char *,
+ XtCallbackProc));
+extern Widget warning_popup_long ARGS((_Xconst char *, int, _Xconst char *,
+ XtCallbackProc, ...));
+extern void Act_print ARGS((Widget, XEvent *, String *, Cardinal *));
+extern void Act_open_dvi_file ARGS((Widget, XEvent *, String *,
+ Cardinal *));
+#endif
+extern void reset_fonts ARGS((void));
+#if COLOR
+extern void reset_colors ARGS((void));
+extern void full_reset_colors ARGS((void));
+#endif
+extern void realloc_font ARGS((struct font *, wide_ubyte));
+extern void realloc_virtual_font ARGS((struct font *, wide_ubyte));
+extern Boolean load_font ARGS((struct font *));
+extern struct font *define_font ARGS((FILE *, wide_ubyte,
+ struct font *, struct font **, unsigned int,
+ struct tn **));
+extern void init_page ARGS((void));
+extern Boolean open_dvi_file ARGS((_Xconst char *));
+extern void form_dvi_property ARGS((ino_t));
+extern void init_dvi_file ARGS((void));
+extern void set_dvi_property ARGS((void));
+extern Boolean check_dvi_file ARGS((void));
+extern void reload_dvi_file ARGS((void));
+#ifndef TEXXET
+extern long set_char ARGS((wide_ubyte));
+extern long load_n_set_char ARGS((wide_ubyte));
+extern long set_vf_char ARGS((wide_ubyte));
+#else
+extern void set_char ARGS((wide_ubyte, wide_ubyte));
+extern void load_n_set_char ARGS((wide_ubyte, wide_ubyte));
+extern void set_vf_char ARGS((wide_ubyte, wide_ubyte));
+#endif
+extern void prescan ARGS((void));
+extern void draw_page ARGS((void));
+extern void source_reverse_search ARGS((int, int));
+extern void source_special_show ARGS((wide_bool));
+extern void source_forward_search ARGS((_Xconst char *));
+#if CFGFILE
+extern void readconfig ARGS((void));
+#endif
+extern void init_font_open ARGS((void));
+extern FILE *font_open ARGS((_Xconst char *, char **, double, int *, int,
+ char **));
+#if PS
+extern void ps_clear_cache ARGS((void));
+extern void ps_destroy ARGS((void));
+#endif
+extern void init_prescan ARGS((void));
+#if COLOR
+extern void scan_color_eop ARGS((void));
+extern void set_fg_color ARGS((_Xconst struct rgb *));
+#endif
+extern void applicationDoSpecial ARGS((char *));
+extern void scan_special ARGS((char *));
+extern void geom_do_special ARGS((struct geom_info *, char *, double));
+extern void xdvi_exit ARGS((int)) NORETURN;
+extern void oops VARGS((_Xconst char *, ...)) NORETURN;
+#ifndef KPATHSEA
+extern void *xmalloc ARGS((unsigned));
+extern void *xrealloc ARGS((void *, unsigned));
+extern char *xstrdup ARGS((_Xconst char *));
+extern char *xmemdup ARGS((_Xconst char *, size_t));
+#endif
+#if TOOLKIT && !HAVE_STRERROR && !defined strerror
+extern char *strerror ARGS((int));
+#endif
+extern void expandline ARGS((size_t));
+extern void alloc_bitmap ARGS((struct bitmap *));
+#ifndef KPATHSEA
+extern void xputenv ARGS((_Xconst char *, _Xconst char *));
+#endif
+extern int memicmp ARGS((_Xconst char *, _Xconst char *, size_t));
+extern FILE *xfopen ARGS((_Xconst char *, OPEN_MODE_ARGS));
+#if XAW
+extern int xopen ARGS((_Xconst char *, int));
+#endif
+extern int xpipe ARGS((int *));
+extern DIR *xopendir ARGS((_Xconst char *));
+extern _Xconst struct passwd *ff_getpw ARGS((_Xconst char **, _Xconst char *));
+extern unsigned long num ARGS((FILE *, int));
+extern long snum ARGS((FILE *, int));
+extern size_t property_get_data ARGS((Window, Atom, unsigned char **,
+ int (*x_get_property) (Display *, Window, Atom, long,
+ long, Bool, Atom, Atom *, int *, unsigned long *,
+ unsigned long *, unsigned char **)));
+#if PS
+extern int xdvi_temp_fd ARGS((char **));
+#endif
+extern void prep_fd ARGS((int, wide_bool));
+extern void read_PK_index ARGS((struct font *, wide_bool));
+extern void read_GF_index ARGS((struct font *, wide_bool));
+extern void read_VF_index ARGS((struct font *, wide_bool));
+
+#if PS
+extern void ps_init_paths ARGS((void));
+extern void drawbegin_none ARGS((int, int, _Xconst char *));
+extern void draw_bbox ARGS((void));
+extern void NullProc ARGS((void));
+#ifdef PS_DPS
+extern Boolean initDPS ARGS((void));
+#endif
+#ifdef PS_NEWS
+extern Boolean initNeWS ARGS((void));
+#endif
+#ifdef PS_GS
+extern Boolean initGS ARGS((void));
+extern void gs_resume_prescan ARGS((void));
+#endif
+#endif /* PS */
+
+_XFUNCPROTOEND
+
+#define one(fp) ((unsigned char) getc(fp))
+#define sone(fp) ((long) one(fp))
+#define two(fp) num (fp, 2)
+#define stwo(fp) snum(fp, 2)
+#define four(fp) num (fp, 4)
+#define sfour(fp) snum(fp, 4)
+
+#endif /* XDVI_H */
diff --git a/systems/unix/tex-gpc/MFT/dvipsmanfonts b/systems/unix/tex-gpc/MFT/dvipsmanfonts
new file mode 100644
index 0000000000..aa55b0d360
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/dvipsmanfonts
@@ -0,0 +1,61 @@
+# This script builds and installs .pk fonts for dvips.tex
+rm -f trouble # clean list of trouble makeing fonts
+mkpkfont logo10 magstep0.5
+mkpkfont cminch magstep0.5
+mkpkfont cmbx10 '2.272*magstep0.5'
+mkpkfont cmbx10 '1.577*magstep0.5'
+mkpkfont cmbx10 '1.315*magstep0.5'
+mkpkfont cmr7 magstep4.5 # for titles
+mkpkfont cmtt10 magstep2.5
+mkpkfont cmssbx10 magstep2.5
+mkpkfont ../lib/manfnt magstep 0.5
+mkpkfont cmr10 magstep0.5 # roman text
+mkpkfont cmr9 magstep0.5
+mkpkfont cmr8 magstep0.5
+mkpkfont cmr7 magstep0.5
+mkpkfont cmr6 magstep0.5
+mkpkfont cmr5 magstep0.5
+mkpkfont cmmi10 magstep0.5 # math italic
+mkpkfont cmmi9 magstep0.5
+mkpkfont cmmi8 magstep0.5
+mkpkfont cmmi7 magstep0.5
+mkpkfont cmmi6 magstep0.5
+mkpkfont cmmi5 magstep0.5
+mkpkfont cmsy10 magstep0.5 # math symbols
+mkpkfont cmsy9 magstep0.5
+mkpkfont cmsy8 magstep0.5
+mkpkfont cmsy7 magstep0.5
+mkpkfont cmsy6 magstep0.5
+mkpkfont cmsy5 magstep0.5
+mkpkfont cmex10 magstep0.5 # math extension
+mkpkfont cmss10 magstep0.5 # sans serif
+mkpkfont cmssq8 magstep0.5
+mkpkfont cmssi10 magstep0.5 # sans serif italic
+mkpkfont cmssqi8 magstep0.5
+mkpkfont cmbx10 magstep0.5 # boldface extended
+mkpkfont cmbx9 magstep0.5
+mkpkfont cmbx8 magstep0.5
+mkpkfont cmbx7 magstep0.5
+mkpkfont cmbx6 magstep0.5
+mkpkfont cmbx5 magstep0.5
+mkpkfont cmtt10 magstep0.5 # typewriter
+mkpkfont cmtt9 magstep0.5
+mkpkfont cmtt8 magstep0.5
+mkpkfont cmsltt10 magstep0.5 # slanted typewriter
+mkpkfont cmsl10 magstep0.5 # slanted roman
+mkpkfont cmsl9 magstep0.5
+mkpkfont cmsl8 magstep0.5
+mkpkfont cmti10 magstep0.5 # text italic
+mkpkfont cmti9 magstep0.5
+mkpkfont cmti8 magstep0.5
+mkpkfont cmti7 magstep0.5
+mkpkfont cmu10 magstep0.5 # unslanted text italic
+mkpkfont cmmib10 magstep0.5 # bold math italic
+mkpkfont cmbsy10 magstep0.5 # bold math symbols
+mkpkfont cmcsc10 magstep0.5 # caps and small caps
+mkpkfont cmssbx10 magstep0.5 # sans serif bold extended
+mkpkfont cmdunh10 magstep0.5 # Dunhill style
+mkfont cmtex10
+mkfont cminch
+mkfont cmssdc10 4
+mkpkfont cmr5 2
diff --git a/systems/unix/tex-gpc/MFT/iby/README b/systems/unix/tex-gpc/MFT/iby/README
new file mode 100644
index 0000000000..802aae4137
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/iby/README
@@ -0,0 +1,98 @@
+This directory contains files that help installing an ancient Greek
+font in TeX-GPC. The font includes a full set of diacritical marks,
+the preclassic letters digamma, quoppa and sampi, and the lunatic
+variant of sigma.
+
+The font was originally cut by Firmin Didot(*1764, +1836), put into
+METAFONT files by Silvio Levy in 1987 and improved by Pierre A. MacKay,
+the author of Ibycus4. Here I used version 4.5 as of
+2004-10-27.
+
+Preparation:
+------------
+Get the packages ibygrk and levy from CTAN:fonts/greek and copy
+files from levy and ibygrk directories into this directory, with
+the shellscripts getlevy and getiby.
+
+Link METAFONT's and TeX's master directories to this directory, so
+you can run mf and tex from here. Make sure MFinputs contains
+Knuth's computer modern fonts.
+
+Installation:
+-------------
+Run ibyfonts to build and install the .tfm and .pk fonts.
+Run ibymacros to install macro files into TeXinputs.
+
+Usage:
+------
+From your .tex file \input agr and enclose Greek between \GK and
+\RM.
+
+
+Typing Greek characters
+-----------------------
+You don't need a monster keyboard or even the ALT-key to enter
+Greek text into your TeX---ASCII suffices. The ASCII representation
+used here follows the Beta Code from the Thesaurus Linguae Graecae.
+(http://www.tlg.uci.edu/BetaCode.html)
+
+Greek Letters:
+Since the Latin alphabet emerged from the Greek one, you enter most
+Greek letters as their corresponding ASCII character.
+But there are some exceptions:
+Greek ASCII
+eta h
+theta q
+ksi c
+ypsilon u
+phi f
+chi x
+psi y
+omega w
+digamma v
+koppa k+
+sampi s+ (lowercase only)
+lunatic
+sigma c
+
+Diacritics:
+rough breathing: (
+smooth breathing: )
+diaeresis: +
+acute: '
+grave: `
+circumflex: =
+iota subscript: |
+dubious(dot under): !
+
+Order of diacritics with lowercase letters:
+letter, diaeresis, breathing, accent, iota subscript. E.g. u"(=|
+A diaeresis (+) won't work together with a circumflex.
+
+Order of diacritics with uppercase letters:
+breathing, accent, letter, iota subscript (=W|
+A breathing is mandatory before an accent.
+
+Punctuation
+Period .
+Apostroph ' (if after a vowel, use a{}', not a')
+Colon :
+Question Mark ;
+guillemets << >>
+
+Look at test.tex and sappho.tex for examples.
+
+Installing the Type 1 fonts in teTeX3.0:
+----------------------------------------
+List the search directory with `kpsewhich -show-path=.pfb'
+I selected ~/texmf from that list.
+From the ibygrk/fonts directory do:
+ mkdir ~/texmf/fonts
+ cp -rp * ~/texmf/fonts
+ texhash
+
+Finally I added the command line option `-u +iby' to dvips
+in the dvipdf script.
+
+Aug. 2008
+Wolfgang Helbig
diff --git a/systems/unix/tex-gpc/MFT/iby/agr.tex b/systems/unix/tex-gpc/MFT/iby/agr.tex
new file mode 100644
index 0000000000..038f6a94bd
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/iby/agr.tex
@@ -0,0 +1,2 @@
+\input ibycusps
+\setgreek10/12
diff --git a/systems/unix/tex-gpc/MFT/iby/getiby b/systems/unix/tex-gpc/MFT/iby/getiby
new file mode 100644
index 0000000000..23f2b7724a
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/iby/getiby
@@ -0,0 +1,17 @@
+# copy .tex and .mf files from the ibygrk package
+IBY=../ibygrk
+
+for f in \
+abary4.mf version4.mf ubary4.mf sampi4.mf obary4.mf koppa4.mf \
+ibyupr4.mf ibypnct4.mf ibylwr4.mf ibylig4.mf ibycus4.mf ibyacc4.mf \
+ibary4.mf hbary4.mf fibr849.mf fibr848.mf fibr84.mf fibo849.mf \
+fibo848.mf fibo84.mf fibb849.mf fibb848.mf fibb84.mf ebary4.mf \
+digamma4.mf cigma4.mf wbary4.mf gen_acc.mf graccent.mf grbase.mf
+do cp -p $IBY/fonts/source/public/ibycus4/$f .
+done
+
+for f in \
+pssetiby.tex tlgsqq.tex setiby4.tex version4.tex ibycusps.tex \
+ibycus4.tex iby4extr.tex psibycus.tex iby4text.tex
+do cp -p $IBY/tex/generic/ibycus4/$f .
+done
diff --git a/systems/unix/tex-gpc/MFT/iby/getlevy b/systems/unix/tex-gpc/MFT/iby/getlevy
new file mode 100755
index 0000000000..899e201492
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/iby/getlevy
@@ -0,0 +1,8 @@
+# copy fonts from the levy directory
+LEVY=../levy
+for f in \
+a.mf b.mf d.mf e.mf f.mf g.mf h.mf i.mf j.mf k.mf \
+l.mf m.mf n.mf o.mf p.mf q.mf r.mf s.mf t.mf u.mf \
+w.mf x.mf y.mf z.mf gen_sigma.mf grpunct.mf grbase.mf graccent.mf
+do cp -p $LEVY/$f .
+done
diff --git a/systems/unix/tex-gpc/MFT/iby/ibyfonts b/systems/unix/tex-gpc/MFT/iby/ibyfonts
new file mode 100755
index 0000000000..ceb04b49e4
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/iby/ibyfonts
@@ -0,0 +1,13 @@
+# build and install ibyfonts
+rm -f trouble
+mkfont fibo84
+mkfont fibr84
+mkfont fibr849
+mkfont fibo849
+mkfont fibr848
+mkfont fibo848
+mkpkfont fibr84 magstep0.5
+mkpkfont fibo84 magstep0.5
+mkpkfont fibr84 magstep1
+mkpkfont fibo84 magstep1
+mkpkfont cmr10 magstep0.5
diff --git a/systems/unix/tex-gpc/MFT/iby/ibymacros b/systems/unix/tex-gpc/MFT/iby/ibymacros
new file mode 100755
index 0000000000..fc64ea0f6e
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/iby/ibymacros
@@ -0,0 +1,6 @@
+# install tex macros for ibycus4 TeX-GPC
+for f in \
+pssetiby.tex tlgsqq.tex setiby4.tex version4.tex ibycusps.tex \
+ibycus4.tex iby4extr.tex psibycus.tex iby4text.tex agr.tex ibycus4.map
+do cp -p $f TeXinputs
+done
diff --git a/systems/unix/tex-gpc/MFT/iby/sappho.tex b/systems/unix/tex-gpc/MFT/iby/sappho.tex
new file mode 100644
index 0000000000..861f5d682f
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/iby/sappho.tex
@@ -0,0 +1,27 @@
+% Ein Beispiel fuer die Benutzung des altgriechischen Fonts:
+\hsize 4in
+\input ibycusps
+\setgreek10/12
+\GK
+\obeylines
+De'duke me`n a) sela'nna
+kai` Plhi'ades, me'sai de`
+nu'ktes, pa'ra d' e)'rxet' w)'ra,
+e)gw` de` mo'na kate'udw.
+
+\medskip
+
+)Aste'res me`n a)mfi` kala`n sela'nnan
+a)'y' a)pokru'ptoisi fae'nnon ei)=dos,
+o)'ppotan plh'qoisa ma'lista la'mph|
+ga=n e)pi` pai=san.
+
+\medskip
+
+)'Espere, pa'nta fe'reis, o)'sa fai'nolis e)ske'das' Au)'ws;
+fe'reis o)'in,
+fe'reis ai)=ga,
+fe'reis a)'pu ma'teri pai=da.
+\hfill Sapfw'
+\RM
+\bye
diff --git a/systems/unix/tex-gpc/MFT/iby/test.tex b/systems/unix/tex-gpc/MFT/iby/test.tex
new file mode 100644
index 0000000000..8acf09d185
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/iby/test.tex
@@ -0,0 +1,91 @@
+% Pruefdatei fuer ibycus4
+\input agr
+\obeylines
+\noindent {\bf Vokale}
+\GK a e h i o u w A E H I O U W\RM
+Kurze Vokale: \GK e o\RM
+Lange Vokale: \GK h w\RM
+
+\medskip \noindent{\bf Hauchzeichen}
+Spiritus asper: \GK a( e( h( i( o( u( w( (A (E (H (I (O (U (W \RM
+Spiritus lenis: \GK a) e) h) i) o) u) w) )A )E )H )I )O )U )W \RM
+
+\medskip \noindent{\bf Akzente}
+Akut: \GK a' e' h' i' o' u' w'\RM
+Gravis: \GK a` e` h` i` o` u` w` \RM
+Zirkumflex: \GK a= h= i= u= w= \RM
+
+\medskip \noindent{\bf Hauchzeichen und Akzente}
+Spiritus asper und Akut: \GK a(' e(' h(' i(' o(' u(' w(' %
+ ('A ('E ('H ('I ('O ('U ('W\RM
+Spiritus lenis und Akut: \GK a)' e)' h)' i)' o)' u)' w)' %
+ )'A )'E )'H )'I )'O )'U )'W\RM
+Spiritus asper und Gravis: \GK a(` e(` h(` i(` o(` u(` w(` %
+ (`A (`E (`H (`I (`O (`U (`W\RM
+Spiritus lenis und Gravis: \GK a)` e)` h)` i)` o)` u)` w)` %
+ )`A )`E )`H )`I )`O )`U )`W\RM
+Spiritus asper und Zirkumflex: \GK a(= h(= i(= u(= w(= %
+ (=A (=E (=H (=I (=O (=U (=W\RM
+Spiritus lenis und Zirkumflex: \GK a)= h)= i)= u)= w)= %
+ )=A )=E )=H )=I )=O )=U )=W\RM
+
+\medskip \noindent{\bf Trema}
+\GK i+ u+\RM
+\medskip \noindent{\bf $\ldots$ und Akzente}
+Akut: \GK i+' u+'\RM
+Gravis: \GK i+` u+`\RM
+% Zirkumflex: \GK i+= u+=\RM gibt's nicht XXX
+
+\medskip \noindent{\bf Iota subscriptum}
+\GK a| h| w|\RM
+
+\medskip \noindent{\bf $\ldots$ mit Hauchzeichen}
+Spiritus asper: \GK a(| h(| w(|\RM
+Spiritus lenis: \GK a)| h)| w)|\RM
+
+\medskip \noindent{\bf $\ldots$ mit Akzenten}
+Akut: \GK a'| h'| w'|\RM
+Gravis: \GK a`| h`| w`|\RM
+Zirkumflex: \GK a=| h=| w=|\RM
+
+\medskip \noindent{\bf $\ldots$ mit Hauchzeichen und Akzenten}
+Spiritus asper und Akut: \GK a('| h('| w('|\RM
+Spiritus asper und Gravis: \GK a(`| h(`| w(`|\RM
+Spiritus asper und Zirkumflex: \GK a(=| h(=| w(=|\RM
+Spiritus lenis und Akut: \GK a)'| h)'| w)'|\RM
+Spiritus lenis und Gravis: \GK a)`| h)`| w)`|\RM
+Spiritus lenis und Zirkumflex: \GK a)=| h)=| w)=|\RM
+
+\medskip\noindent {\bf Dauerlaute}
+Nasale: \GK m n M N\RM
+Liquidae: \GK l r L R\RM, Rho mit Spiritus asper: \GK r(\RM
+Spirant: \GK s\noboundary\ S\RM, Sigma am Wortende: \GK s s. s, s; s?\RM
+
+\filbreak\noindent {\bf Verschlu\ss laute}
+Labiale: \GK p b f P B F \RM
+Dentale: \GK t d q T D Q\RM
+Gutturale: \GK k g x K G X\RM
+Aspiratae: \GK f q x F Q X\RM
+
+\medskip\noindent {\bf Konsonantenverbindungen mit dem Laut ``s''}
+\GK y z c Y Z C\RM
+
+\medskip \noindent {\bf Satzzeichen}
+Punkt: \GK.\RM
+Komma: \GK,\RM
+Hochpunkt: \GK;\RM
+Fragezeichen: \GK?\RM
+Guillemet: \GK<<$\ldots$>>\RM
+
+\medskip \noindent {\bf Vorklassische Zeichen, Zahlzeichen}
+Digamma (6): \GK v V \RM
+Qoppa (90): \GK k+ K+ \RM
+Sampi (900): \GK s+\RM
+
+\medskip \noindent {\bf andere Zeichen}
+Sigma Lunate: \GK c+ C+\RM
+
+Punkt unter Buchstaben: \GK kosm!os\RM
+
+
+\bye
diff --git a/systems/unix/tex-gpc/MFT/ibyfonts b/systems/unix/tex-gpc/MFT/ibyfonts
new file mode 100755
index 0000000000..ceb04b49e4
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/ibyfonts
@@ -0,0 +1,13 @@
+# build and install ibyfonts
+rm -f trouble
+mkfont fibo84
+mkfont fibr84
+mkfont fibr849
+mkfont fibo849
+mkfont fibr848
+mkfont fibo848
+mkpkfont fibr84 magstep0.5
+mkpkfont fibo84 magstep0.5
+mkpkfont fibr84 magstep1
+mkpkfont fibo84 magstep1
+mkpkfont cmr10 magstep0.5
diff --git a/systems/unix/tex-gpc/MFT/local.mf b/systems/unix/tex-gpc/MFT/local.mf
new file mode 100644
index 0000000000..491430d781
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/local.mf
@@ -0,0 +1,33 @@
+% This is local.mf for my HP LaserJet 1320.
+% It works with two resolutions.
+% The values are from modes.mf (ftp://tug.org/tex/modes.mf) Version 3.8.
+% as supplied by Niko Sauer <nikos@friedrichs.up.ac.za>. Niko writes:
+% Here are modes developed for and tested on the HP LaserJet 2100T/TN.
+% Mode ljtozz is for a resolution of 1200dpi, and ljtozzfr for 600dpi
+% Tradeoffs between |fillin| and |blacker| resulted in very clear,
+% sharp renderings of Computer Modern fonts which appears to be
+% preferable to what the modes ljfzzz ljfzzzfr for HP LaserJet 4000
+% yield on this printer. Preferences were tested by scrutiny of the
+% results by sample of people in the vicinity.
+%
+%
+mode_def lj = % HP LaserJet 1320 ProRes (1200 dpi)
+ proofing :=0;
+ fontmaking := 1;
+ tracingtitels := 1;
+ pixels_per_inch := 1200;
+ blacker := .7;
+ fillin := .15;
+ o_correction := 1;
+enddef;
+%
+mode_def ljfr = % HP LaserJet 1320 FastRes (600dpi)
+ proofing :=0;
+ fontmaking := 1;
+ tracingtitels := 1;
+ pixels_per_inch := 600;
+ blacker := .25;
+ fillin := .3;
+ o_correction := 1;
+enddef;
+localfont := ljfr;
diff --git a/systems/unix/tex-gpc/MFT/manfonts b/systems/unix/tex-gpc/MFT/manfonts
new file mode 100755
index 0000000000..e98538738b
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/manfonts
@@ -0,0 +1,7 @@
+mkfont cmtex10
+mkfont cminch
+mkfont cmssdc10 4
+mkpkfont cmr5 2
+mkfont cmman # font used for miscellaneous Computer Modern variations
+ # from ctan:/systems/knuth/local/mf/cmman.mf
+mkfont random # from ctan:/systems/knuth/local/lib/random.mf
diff --git a/systems/unix/tex-gpc/MFT/mfwebfonts b/systems/unix/tex-gpc/MFT/mfwebfonts
new file mode 100755
index 0000000000..a66d9a6be8
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/mfwebfonts
@@ -0,0 +1,4 @@
+# fonts used by mf.web
+mkfont logo10 # font used for the METAFONT logo
+mkfont logosl10
+mkfont logo8
diff --git a/systems/unix/tex-gpc/MFT/plainfonts b/systems/unix/tex-gpc/MFT/plainfonts
new file mode 100755
index 0000000000..d2d18bd490
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/plainfonts
@@ -0,0 +1,52 @@
+# This script builds and installs .tfm and .pk fonts for plain.tex.
+rm -f trouble # clean list of trouble makeing fonts
+mkfont cmr10 # roman text
+mkfont cmr9
+mkfont cmr8
+mkfont cmr7
+mkfont cmr6
+mkfont cmr5
+mkfont cmmi10 # math italic
+mkfont cmmi9
+mkfont cmmi8
+mkfont cmmi7
+mkfont cmmi6
+mkfont cmmi5
+mkfont cmsy10 # math symbols
+mkfont cmsy9
+mkfont cmsy8
+mkfont cmsy7
+mkfont cmsy6
+mkfont cmsy5
+mkfont cmex10 # math extension
+mkfont cmss10 # sans serif
+mkfont cmssq8
+mkfont cmssi10 # sans serif italic
+mkfont cmssqi8
+mkfont cmbx10 # boldface extended
+mkfont cmbx9
+mkfont cmbx8
+mkfont cmbx7
+mkfont cmbx6
+mkfont cmbx5
+mkfont cmtt10 # typewriter
+mkfont cmtt9
+mkfont cmtt8
+mkfont cmsltt10 # slanted typewriter
+mkfont cmsl10 # slanted roman
+mkfont cmsl9
+mkfont cmsl8
+mkfont cmti10 # text italic
+mkfont cmti9
+mkfont cmti8
+mkfont cmti7
+mkfont cmu10 # unslanted text italic
+mkfont cmmib10 # bold math italic
+mkfont cmbsy10 # bold math symbols
+mkfont cmcsc10 # caps and small caps
+mkfont cmssbx10 # sans serif bold extended
+mkfont cmdunh10 # Dunhill style
+mkpkfont cmr7 magstep4 # for titles
+mkpkfont cmtt10 magstep2
+mkpkfont cmssbx10 magstep2
+mkfont manfnt # METAFONT logo and dragon curve and special symbols
diff --git a/systems/unix/tex-gpc/MFT/texwebfonts b/systems/unix/tex-gpc/MFT/texwebfonts
new file mode 100755
index 0000000000..883b186bb1
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/texwebfonts
@@ -0,0 +1,2 @@
+# font used tex.tex
+mkfont logo10 # font used for the METAFONT logo
diff --git a/systems/unix/tex-gpc/MFT/tripfonts b/systems/unix/tex-gpc/MFT/tripfonts
new file mode 100755
index 0000000000..1d4e4356c4
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/tripfonts
@@ -0,0 +1,2 @@
+# font for tripman
+mkpkfont cmr7 magstep5 # for titles
diff --git a/systems/unix/tex-gpc/MFT/tripmanfonts b/systems/unix/tex-gpc/MFT/tripmanfonts
new file mode 100755
index 0000000000..1d4e4356c4
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/tripmanfonts
@@ -0,0 +1,2 @@
+# font for tripman
+mkpkfont cmr7 magstep5 # for titles
diff --git a/systems/unix/tex-gpc/MFT/webfonts b/systems/unix/tex-gpc/MFT/webfonts
new file mode 100644
index 0000000000..86676e2c70
--- /dev/null
+++ b/systems/unix/tex-gpc/MFT/webfonts
@@ -0,0 +1,2 @@
+# fonts for the web macros
+mkfont cmtex10
diff --git a/systems/unix/tex-gpc/README b/systems/unix/tex-gpc/README
new file mode 100644
index 0000000000..94e7632f11
--- /dev/null
+++ b/systems/unix/tex-gpc/README
@@ -0,0 +1,352 @@
+July 2014
+This directory contains change files for Donald E. Knuth's suite
+of TeX related programs. The change files (.ch) and Don Knuth's
+WEB files (.web) from January 2014 are the key components of a
+construction kit for "TeX-GPC"---a TeX system which is based on
+the GNU Pascal compiler and runs in a Unix environment. It's
+smaller, less configurable and therefore easier to master than
+other TeX distributions and should compile and run on Unix alikes.
+
+These building bricks are glued together by shell scripts in
+the---guess where---shell subdirectory.
+
+The MFT directory contains shell scripts for installing fonts
+(xxxfonts), and the directory iby that shows how to install fonts
+with TeX-GPC. In this case a polytonic Greek font, suited for ancient
+Greek texts.
+
+The mp directory helps to include John Hobby's MetaPost in TeX-GPC.
+MetaPost lets you define pictures to be included in your TeX
+document.
+
+The directories dvipsnk and xdvi show how to install Tom Rokicki's
+dvips and Paul Vojta's xdvi.
+
+I was somewhat intrigued while building TeX from its sources, since
+some of these depend on others to be built and installed. Knuth
+wrote these programs in the WEB language (WEB is only remotely
+related to the last W from CERN's WWW). WEB programs are converted
+to Pascal sources by tangle and to a TeX input file by weave. Of
+course, tangle and weave are WEB programs as well. So one needs
+tangle to build tangle---and weave and TeX to read a beautifully
+typeset WEB program. But don't despair, I cut this indefinite
+recursion and provided tangle.p, the Pascal source of tangle, and
+tex.pdf. It shows what, why and how I changed Knuth's program.
+see
+ http://wwwlehre.dhbw-stuttgart.de/~helbig/tex-gpc/tex.pdf
+
+Preparation:
+===========
+Martin Monperrus suggested to create a second edition of TeX-GPC, just to
+make it compile with current releases of GPC. And here it is.
+
+The previous edition of TeX-GPC was born in a NetBSD 3.0 system,
+compiled by the latest stable version of GNU Pascal, which is 2.1,
+from the NetBSD package gpc-2.1nb3.
+
+Luis Rivera successfully built TeX-GPC under CYGWIN with GPC 3.4.4
+and found out that newer versions of GPC expect the parameter type
+"cinteger" instead of "integer" in a certain function. Change the
+WEB macro "gpc_integer" in tex.ch and mf.ch accordingly.
+
+This release of TeX-GPC was tested on Mac OS X 10.8.
+and GPC 20070904, based on gcc-3.4.6.
+
+The changes are:
+Now works out of the box with contemporary GPC's. But not with NetBSD-3.0
+
+The directory MF was renamed to MFT, because OS X yet has to learn
+how uppercase and lowercase differ.
+
+The old GPC let you mistreat a function as a procedure. And, of
+course, I did. This is fixed now.
+
+Another bug pointed out by Joachim Kuebart is fixed: If the first
+input line (or the command line) contains spaces only, a loop might
+not terminate properly. (Well it worked anyhow, you'll have to read
+the source to find this bug, testing wouldn't help!)
+
+A new directory, ,,tech'', that supports german style and hyphenation
+was added.
+
+The pascal sources initex.p and inimf.p are to be kept around now,
+to let you easily change constants, automated by the shell script itgl.
+
+The documentation in tex.pdf is largely improved.
+
+Overview:
+=========
+
+File formats and their documentation:
+-------------------------------------
+WEB files:
+.web WEB programs, "The WEB System of Structured Documentation" (webman.tex)
+.ch Change files for WEB programs (patches to be applied to .web files)
+.p GNU Pascal source
+.pool String pool, contains the string constants of a WEB program.
+
+
+METAFONT files:
+.mf METAFONT source, "The METAFONTbook" (mfbook.tex)
+.base Base file, a compact representation of METAFONT's memory.
+.tfm TeX font metric, "TeX: The Program" (tex.web) part 30
+.nnngf generic font file, "METAFONT: The Program" (mf.web), part 46
+.nnnpk packed font file, gftopk.web, modules 21-36
+ The last two are bitmap font formats, where nnn is a number that
+ stands for "dots per inch". The number equals resolution of the
+ output device as specified in your mode times the magnification.
+.log a log file
+
+TeX files:
+.tex TeX source, "The TeXbook" (texbook.tex)
+.fmt Format file, a compact representation of TeX's memory.
+ contains the string pool (tex.pool) and preloaded .tfm files.
+.dvi device independent file, "TeX: The Program" (tex.web), part 31
+.log a log file
+
+
+
+Files and their processors:
+--------------------------
+WEB:
+ tangle
+ .web, .ch --------> .p, .pool
+
+ gpc
+ .p --------> a.out
+
+ tgl
+ .web, .ch --------> a.out (linking the last two steps)
+
+ itgl
+ x.web, x.ch --------> a.out, inix.p, .pool (links the first two steps
+ and keeps the pascal sources)
+
+ weave
+ .web, .ch --------> .tex (Description of the program)
+
+ wve
+ .web, .ch --------> .dvi (linking the above step and tex)
+
+
+METAFONT:
+ inimf
+ plain.mf --------> plain.base
+
+ mf
+ .mf --------> .nnngf, tfm
+
+ gftopk
+ .nnngf --------> .nnnpk
+
+ mkfont
+ .mf --------> TeXfonts/.tfm, PKfonts/.nnnpk
+
+ mkpkfont
+ .mf --------> PKfonts/.nnnpk
+
+
+TeX:
+ initex
+ .tfm, plain.tex --------> plain.fmt
+
+ tex
+ [ .tfm ], .tex --------> .dvi
+
+
+DVI drivers:
+ dvips
+ .dvi, .nnnpk --------> .ps, PostScript printer
+
+ xdvi
+ .dvi, .nnnpk --------> X-Window
+
+
+File names:
+-----------
+TeX-GPC searches files in directories which are local to the working
+directory:
+ TeXinputs .tex
+ TeXfonts .tfm
+ TeXformats .pool, .fmt
+ MFinputs .mf
+ MFbases .pool, .base
+ PKfonts .nnnpk
+ DVIPSconf .pro, .ps, .map (Header and configuration files for dvips)
+
+I created one set of "master directories" and used symbolic links
+to my working directory like:
+
+ ln -s ~/TeXformats .
+
+The scripts mk_TeX_dir and mk_MF_dir help to prepare a directory
+for running TeX resp. METAFONT. Adapt these scripts to the locations
+of your master directories.
+
+TeX-GPC's path searching applies to file names without directory
+components, i.e. without a /:
+ .tex local directory and then TeXinputs
+ .mf local directory and then MFinputs
+ .tfm TeXfonts
+
+Depending on the context, TeX-GPC programs append ".mf", ".tex",
+or ".tfm" to file names without extensions.
+
+builtin file names:
+------------------
+TeXformats/tex.pool string pool for tex, (in initex)
+MFbases/mf.pool string pool for mf, (in inimf)
+TeXformats/plain.fmt format file for Plain TeX, (in tex)
+MFbases/plain.base base file for Plain METAFONT, (in mf)
+
+Fonts in TeX-GPC:
+----------------
+For each font TeX needs one .tfm file. For each font and
+resolution/magnification the DVI drivers need one .nnnpk file.
+The script mkfont will install both a .tfm and an .nnnpk file, the
+script mkpkfont will install an .nnnpk file only. You specify the
+resolution in your METAFONT mode and the magnification as an optional
+second argument to mkpkfont or mkfont. The DVI drivers will invoke
+mkpkfont automatically to create missing .nnnpk files.
+
+Running TeX-GPC
+===============
+Missing files
+-------------
+Search missing macro files like (webmac.tex) in Knuth's lib
+directory and copy them to the working directory or to TeXinputs.
+My change files import webmac-gpc.tex; move it to TeXinputs.
+
+Search the sources of missing fonts in the lib directory (.mf),
+copy them to MFinputs and use the scripts mkfont or mkpkfont to
+create and install .tfm files respective .pk files. The shell scripts
+assume the METAFONT mode localfont which is defined in MFT/local.mf.
+Remember, you've loaded local.mf into the file plain.base. Or you
+might want to grep for font assignments in your .tex files. The
+command line
+ grep '\\font.*=' plain.tex > plainfonts
+creates a list of the font names used by plain.tex. I edited
+plainfonts to convert it to a shell script that creates all fonts
+of the plain format. In the MFT directory you'll find other examples.
+
+Installing new fonts from CTAN
+------------------------------
+The directory MFT/iby contains instructions on how to install a font
+from CTAN, in this case ibygrk to typeset polytonic ancient Greek.
+
+Printing the documentation
+--------------------------
+The weave program generates an xxx.tex file from an xxx.web file
+and a possibly empty change file. Use tex to generate an xxx.dvi
+file. This is done by the script wve. For example, to view the
+description of TeX-GPC, use
+ wve tex.web tex.ch && xdvi tex
+The web-macros need another font. Use webfonts to install it.
+The scripts texwebfonts installs additional fonts for tex.tex,
+and mfwebfonts for mf.tex.
+
+TRIP TRAP
+---------
+Both tests might not be passed by TeX-GPC: TeX and METAFONT trim
+trailing spaces from input lines for compatibility with IBM's
+punched cards. TeX-GPC's programs don't.
+
+
+Installing TeX-GPC:
+===================
+
+Get Knuth's source files:
+------------------------
+Make a stage directory, say tex-gpc, which mirrors Knuth's distribution
+from
+
+ ftp://ftp.dante.de/pub/tex/systems/knuth/dist
+
+This gives you the WEB files, manuals, macros and some .mf files.
+At least you need the directories lib, tex, mfware, mf and web.
+
+You need another set of source files, namely the METAFONT source
+files (.mf) for Knuth's font Computer Modern.
+
+Copy the .mf files from
+ ftp://ftp.dante.de/pub/tex/fonts/cm/mf/
+to MFinputs.
+
+And Copy the .mf files from the lib directory to MFinputs.
+ cp -p lib/*.mf MFinputs
+
+I prefer the DANTE server, because that server preserves modification
+times. This is not true with other CTAN mirrors.
+
+Building from WEB sources, (xxx.web and xxx.ch --> xxx, xxx.pool)
+----------------------------------------------------------------
+The general procedure to build a binary xxx from its WEB files is:
+Move xxx.ch to the directory that contains xxx.web, apply tangle
+to xxx.web and xxx.ch to generate xxx.p and xxx.pool, and compile the
+Pascal source with gpc. The command line
+ tgl xxx.web xxx.ch
+will do all that. It produces an a.out file that should be moved
+to your binary directory as xxx. ("binary directory" means a
+directory in your PATH.)
+
+Step by step procedure to bootstrap TeX-GPC
+-------------------------------------------
+
+0. Make tangle tangle.p --> tangle
+------------------------------------------------------------------------
+Compile tangle.p (gpc tangle.p) and move a.out as tangle to your
+binary directory.
+
+1. Make inimf and initex mf.web, mf.ch --> inimf, inimf.p, MFbases/mf.pool
+ tex.web, tex.ch --> initex,initex.p TeXformats/tex.pool
+------------------------------------------------------------------------
+Build the ini-programs and save them as initex, resp. inimf.
+Move tex.pool to TeXformats and mf.pool to MFbases, use itgl instead
+of tgl to keep inimf.p and initex.p.
+
+2. Make plain.base lib/plain.mf --> MFbases/plain.base
+------------------------------------------------------------------------
+Go to the directory tex-gpc/mf and use inimf to create plain.base.
+The file local.mf contains mode definitions for my HP LaserJet 1320
+printer. Adapt local.mf to your printer and then type
+ inimf ../lib/plain input ../MFT/local dump
+
+Move plain.base to MFbases.
+
+3. Make mf mf.web, mf.ch --> mf
+------------------------------------------------------------------------
+Edit mf.ch and look for the string @x inimf that introduces a change
+block. This change block is commented out, since it is shifted
+right. Shift left this block to uncomment it. This way mf.ch is
+changed to build a production version.
+
+4. Make gftopk gftopk.web, gftopk.ch --> gftopk
+------------------------------------------------------------------------
+Build gftopk in the mfware directory. You need gftopk to install
+packed font files (.nnnpk) in the next step.
+
+5. Install fonts: MFinputs/*.mf --> TeXfonts/*.tfm, PKfonts/*.pk
+------------------------------------------------------------------------
+Prepare tex-gpc to run both METAFONT (mk_MF_dir) and TeX (mk_TeX_dir)
+and run the shell script plainfonts from there.
+Check the file trouble that might contain commands that failed.
+
+6. Make plain.fmt lib/plain.tex --> TeXformats/plain.fmt
+------------------------------------------------------------------------
+Copy lib/hyphen.tex to TeXinputs and go to the directory tex-gpc/tex
+to build plain.fmt.
+This command line will do
+ initex ../lib/plain \\dump # one backslash is consumend by sh!
+Move plain.fmt to TeXformats.
+
+7. Finally build tex tex.web, tex.ch --> tex
+------------------------------------------------------------------------
+Change tex.ch for production, and build it with tgl.
+
+Enjoy,
+Wolfgang Helbig, Programmierer
+
+Comments welcome: helbig aet lehre dot ba-stuttgart dot de
+
+TeX is a trademark of the American Mathematical Society.
+METAFONT is a trademark of Addison Wesley Publishing Company.
diff --git a/systems/unix/tex-gpc/dvipsnk/MakeTeXPK b/systems/unix/tex-gpc/dvipsnk/MakeTeXPK
new file mode 100644
index 0000000000..5145b09bfa
--- /dev/null
+++ b/systems/unix/tex-gpc/dvipsnk/MakeTeXPK
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Do not run this script, or dvips, as setuid programs! This will
+# result in a major security hole!
+#
+# This script file makes a new TeX PK font, because one wasn't
+# found. Parameters are:
+#
+# name dpi bdpi magnification [mode [subdir]]
+#
+# `name' is the name of the font, such as `cmr10'. `dpi' is
+# the resolution the font is needed at. `bdpi' is the base
+# resolution, useful for figuring out the mode to make the font
+# in. `magnification' is a string to pass to MF as the
+# magnification. `mode', if supplied, is the mode to use.
+#
+mkpkfont $1 $4
diff --git a/systems/unix/tex-gpc/dvipsnk/Makefile b/systems/unix/tex-gpc/dvipsnk/Makefile
new file mode 100644
index 0000000000..cbdf300d17
--- /dev/null
+++ b/systems/unix/tex-gpc/dvipsnk/Makefile
@@ -0,0 +1,233 @@
+#
+# Makefile for dvips. Edit this first part of the file.
+# Adapted to TeX-GPC in Aug. 2008.
+#
+# First, the things that absolutely must be edited for your system.
+# Please, don't forget to edit MakeTeXPK in the same way!
+
+# Change to your binary directory.
+BINDIR = $(HOME)/bin
+# the place man pages are located.
+MANDIR = $(HOME)/man/man1
+
+# Change the default resolution to reflect your printer's.
+DEFS= -DDEBUG -DDEFRES=600 -DCREATIONDATE
+
+# where TeX is `rooted'. Sometimes /usr/local/lib/tex.
+# TEXDIR = /usr/lib/tex
+TEXDIR = .
+
+# another place pk, tfm, and vf files might be found.
+# LOCALDIR = /LocalLibrary/Fonts/TeXFonts
+LOCALDIR = TeXFonts
+
+# the default path to search for TFM files
+# (this usually is identical to TeX's defaultfontpath, which omits `.')
+# (private fonts are given an explicit directory, which overrides the path)
+# overridden by the environment variable TEXFONTS
+# TFMPATH = $(LOCALDIR)/tfm:$(TEXDIR)/fonts/tfm
+TFMPATH = TeXFonts
+
+# the default path to search for PK files (usually omits `.')
+# Don't forget to add the directory that
+# MakeTeXPK puts the files! (In this case, /LocalLibrary/Fonts...)
+# overridden by the environment variable TEXPKS or TEXPACKED or PKFONTS
+# PKPATH = $(LOCALDIR)/pk:$(TEXDIR)/fonts/pk
+PKPATH = PKfonts
+
+# the default path to search for VF files (usually omits `.')
+# overridden by the environment variable VFFONTS
+# VFPATH = $(LOCALDIR)/vf:$(TEXDIR)/fonts/vf
+VFPATH = VFfonts
+
+# additional directories in which to search for subdirectories to find
+# both tfm and pk files
+FONTSUBDIRPATH =
+
+# where the config files go
+# CONFIGDIR = $(TEXDIR)/ps
+CONFIGDIR = DVIPSconf
+
+# the default path to search for config files
+# overridden by the environment variable TEXCONFIG
+# CONFIGPATH = .:$(CONFIGDIR)
+CONFIGPATH = DVIPSconf
+
+# the name of your config file
+# CONFIGFILE = config.ps
+CONFIGFILE = config.ps
+
+# where the header PS files go
+# HEADERDIR = $(TEXDIR)/ps
+HEADERDIR = DVIPSconf
+
+# the default path to search for header files
+# HEADERPATH = .:$(HEADERDIR)
+HEADERPATH = DVIPSconf
+
+# where epsf.tex and rotate.tex go (usually the TeX macros directory)
+# TEXMACRODIR = $(TEXDIR)/inputs
+TEXMACRODIR = TeXinputs
+
+# the default path to search for epsf and psfiles
+# (usually the same as TeX's defaultinputpath)
+# FIGPATH = .:..:$(TEXDIR)/inputs
+FIGPATH = .:TeXinputs
+
+# change -DDEFRES=300 or whatever is required
+# if the default resolution is not 300 dpi,
+# add -DDEBUG to turn on debugging capability
+# add -DTPIC for tpic support
+# add -DFONTLIB to search font libraries
+# add -DSEARCH_SUBDIRECTORIES to search the FONTSUBDIRPATH.
+# add -DHAVE_GETCWD if you have getcwd (relevant only for subdir searching)
+# add -DIBM6000 for compiling on IBM 6000 systems
+# add -DCREATIONDATE if your system has a working time() and you want dated files
+# (for VM/CMS, see the MKDVIPS.EXEC file in the vmcms subdirectory).
+#
+# If you define FONTLIB, make sure to also give definitions to
+# FLIPATH and FLINAME.
+#
+# If your compiler doesn't like void*, then add
+# -DVOID=char
+#
+
+# either use
+# OPT = -O -funsigned-char
+# or
+OPT = -g -Wall -funsigned-char
+
+# libraries to include (-lm -lc on most systems)
+#FLIBS= -lNeXT_s -lsys_s
+FLIBS= -lm -lc
+
+# If you are compiling dvips for suid or other privileges, you will
+# definitely want to define the following symbol; else don't.
+# SECURE = -DSECURE
+
+# If you want EMTEX specials, define the following.
+# EMTEX = -DEMTEX
+
+# for SYSV (and friends which use <string.h> instead of <strings.h>)
+# define the c-compiler flag
+# add -D_POSIX_SOURCE if you are POSIX (also define SYSV) (only relevant
+# for subdir searching)
+# SYS = -DSYSV
+
+# Define this to be whatever you use for installation. If you don't have
+# install, use a script that invokes copy and chmod's the files
+# appropriately.
+# INSTALL = install
+INSTALL = install
+
+PATHS = -DTFMPATH=\"$(TFMPATH)\" \
+ -DPKPATH=\"$(PKPATH)\" \
+ -DVFPATH=\"$(VFPATH)\" \
+ -DHEADERPATH=\"$(HEADERPATH)\" \
+ -DCONFIGPATH=\"$(CONFIGPATH)\" \
+ -DCONFIGFILE=\"$(CONFIGFILE)\" \
+ -DFONTSUBDIRPATH=\"$(FONTSUBDIRPATH)\" \
+ -DFIGPATH=\"$(FIGPATH)\"
+
+CFLAGS = $(DEFS) $(OPT) $(SYS) $(SECURE) $(EMTEX) $(DEFPFMT)
+
+SRC = dospecial.c dviinput.c fontdef.c loadfont.c dvips.c tfmload.c \
+ download.c prescan.c scanpage.c skippage.c output.c scalewidth.c \
+ dosection.c dopage.c resident.c search.c unpack.c drawPS.c \
+ header.c makefont.c repack.c virtualfont.c dpicheck.c finclude.c \
+ pprescan.c papersiz.c flib.c color.c bbox.c emspecial.c t1part.c \
+ hps.c
+
+OBJ = dospecial.o dviinput.o fontdef.o loadfont.o dvips.o tfmload.o \
+ download.o prescan.o scanpage.o skippage.o output.o scalewidth.o \
+ dosection.o dopage.o resident.o search.o unpack.o drawPS.o \
+ header.o makefont.o repack.o virtualfont.o dpicheck.o finclude.o \
+ pprescan.o papersiz.o flib.o color.o bbox.o emspecial.o t1part.o \
+ hps.o
+
+all : afm2tfm dvips tex.pro texps.pro texc.pro special.pro finclude.pro \
+ color.pro crop.pro hps.pro
+
+dvips : $(OBJ)
+ $(CC) $(CFLAGS) $(OBJ) $(LIBS) $(FLIBS) -o dvips
+
+dvips.o: dvips.c
+ $(CC) $(CFLAGS) $(PATHS) -c dvips.c
+
+afm2tfm: afm2tfm.c
+ $(CC) $(CFLAGS) -o afm2tfm afm2tfm.c $(LIBS) $(FLIBS)
+
+$(OBJ) : dvips.h debug.h
+flib.o resident.o dvips.o loadfont.o tfmload.o : paths.h
+
+squeeze : squeeze.o
+ $(CC) $(CFLAGS) squeeze.o -o squeeze $(LIBS) $(FLIBS)
+
+tex.pro : tex.lpro squeeze
+ ./squeeze <tex.lpro > tex.pro
+
+texc.pro: texc.lpro squeeze
+ ./squeeze <texc.lpro >texc.pro
+
+texc.lpro: texc.script tex.lpro
+ sh texc.script tex.lpro texc.lpro
+
+texps.pro : texps.lpro squeeze
+ ./squeeze <texps.lpro >texps.pro
+
+special.pro : special.lpro squeeze
+ ./squeeze <special.lpro >special.pro
+
+finclude.pro : finclude.lpro squeeze
+ ./squeeze <finclude.lpro >finclude.pro
+
+color.pro : color.lpro squeeze
+ ./squeeze <color.lpro >color.pro
+
+crop.pro : crop.lpro squeeze
+ ./squeeze <crop.lpro >crop.pro
+
+hps.pro : hps.lpro squeeze
+ ./squeeze <hps.lpro >hps.pro
+
+install : afm2tfm dvips MakeTeXPK \
+ tex.pro texc.pro texps.pro special.pro finclude.pro color.pro \
+ crop.pro hps.pro config.ps psfonts.map epsf.tex rotate.tex \
+ colordvi.tex blackdvi.tex \
+ dvips.tex dvipsmac.tex
+ - mkdir $(BINDIR)
+ - mkdir $(CONFIGDIR)
+ - mkdir $(HEADERDIR)
+ - mkdir $(TEXMACRODIR)
+ $(INSTALL) -c -m 755 afm2tfm $(BINDIR)/afm2tfm
+ $(INSTALL) -c -m 755 dvips $(BINDIR)/dvips
+ $(INSTALL) -c -m 755 MakeTeXPK $(BINDIR)/MakeTeXPK
+ $(INSTALL) -c -m 644 tex.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 texc.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 texps.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 special.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 finclude.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 color.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 crop.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 hps.pro $(HEADERDIR)
+ $(INSTALL) -c -m 644 config.ps $(CONFIGDIR)/$(CONFIGFILE)
+ $(INSTALL) -c -m 644 psfonts.map $(CONFIGDIR)
+ $(INSTALL) -c -m 644 epsf.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 rotate.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 colordvi.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 blackdvi.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 dvips.tex $(TEXMACRODIR)
+ $(INSTALL) -c -m 644 dvipsmac.tex $(TEXMACRODIR)
+ - $(INSTALL) -c -m 644 dvips.1 $(MANDIR)
+ - $(INSTALL) -c -m 644 afm2tfm.1 $(MANDIR)
+
+veryclean :
+ rm -f *.o dvips squeeze afm2tfm texc.lpro *.pro *~ *.log *.dvi
+
+clean :
+ rm -f *.o squeeze afm2tfm *~ *.log *.dvi
+
+lint :
+ lint $(DEFS) $(PATHS) $(SRC)
+ lint $(DEFS) squeeze.c
+ lint $(DEFS) afm2tfm.c
diff --git a/systems/unix/tex-gpc/dvipsnk/README b/systems/unix/tex-gpc/dvipsnk/README
new file mode 100644
index 0000000000..2e91b9ac16
--- /dev/null
+++ b/systems/unix/tex-gpc/dvipsnk/README
@@ -0,0 +1,36 @@
+Aug 2008
+The files in this directory help to build Tom Rockiki's dvips for TeX-GPC.
+
+Since KPSE does not blend with TeX-GPC, and CTAN only offers KPSE based
+versions of DVIPS, I downloaded the latest release from Stanford:
+ ftp ftp://ftp.cs.stanford.edu/pub/dvips/dvips576.tar.gz
+
+It unpacks in a directory dvips576. Edit Makefile from this directory
+to reflect the default resolution of your printer, the location
+of your binary and "man" directory.
+
+Replace Makefile and MakeTeXPK in dvips576/dvips by the files from
+this directory. See xdvi/README for hints on the man directory.
+
+Create a master directory DVIPSconf if you haven't done so already, goto
+dvips576/dvips, run mk_TeX_dir, mk_MF_dir, and make install.
+
+Edit DVIPSconf/config.ps to reflect paper size and resolution of
+your printer. To make dvips generate missing .pk fonts automatically,
+the resolutions in config.ps and in the mf mode "localfont" must
+agree.
+
+Tip: With an A4 papersize you might want to adjust the origin
+to 1in-3mm,1in+8.8m. This line in config.ps does that:
+O -3mm,8.8mm
+
+This will give you equal left and right margins with Plain TeX's
+predefined \hsize of 6.5in, and therefore the pagenumbers will line up
+nicely on two sided output.
+
+Enjoy,
+Wolfgang
+
+Bug: dvips does not compile on Mac OS X 10.7 because the getline() is
+defined in stdio.h. Workaround: change the spelling of getline to ngetline
+in each occurence in file afm2tfm.c.
diff --git a/systems/unix/tex-gpc/dvipsnk/dvipsmanfonts b/systems/unix/tex-gpc/dvipsnk/dvipsmanfonts
new file mode 100644
index 0000000000..aa55b0d360
--- /dev/null
+++ b/systems/unix/tex-gpc/dvipsnk/dvipsmanfonts
@@ -0,0 +1,61 @@
+# This script builds and installs .pk fonts for dvips.tex
+rm -f trouble # clean list of trouble makeing fonts
+mkpkfont logo10 magstep0.5
+mkpkfont cminch magstep0.5
+mkpkfont cmbx10 '2.272*magstep0.5'
+mkpkfont cmbx10 '1.577*magstep0.5'
+mkpkfont cmbx10 '1.315*magstep0.5'
+mkpkfont cmr7 magstep4.5 # for titles
+mkpkfont cmtt10 magstep2.5
+mkpkfont cmssbx10 magstep2.5
+mkpkfont ../lib/manfnt magstep 0.5
+mkpkfont cmr10 magstep0.5 # roman text
+mkpkfont cmr9 magstep0.5
+mkpkfont cmr8 magstep0.5
+mkpkfont cmr7 magstep0.5
+mkpkfont cmr6 magstep0.5
+mkpkfont cmr5 magstep0.5
+mkpkfont cmmi10 magstep0.5 # math italic
+mkpkfont cmmi9 magstep0.5
+mkpkfont cmmi8 magstep0.5
+mkpkfont cmmi7 magstep0.5
+mkpkfont cmmi6 magstep0.5
+mkpkfont cmmi5 magstep0.5
+mkpkfont cmsy10 magstep0.5 # math symbols
+mkpkfont cmsy9 magstep0.5
+mkpkfont cmsy8 magstep0.5
+mkpkfont cmsy7 magstep0.5
+mkpkfont cmsy6 magstep0.5
+mkpkfont cmsy5 magstep0.5
+mkpkfont cmex10 magstep0.5 # math extension
+mkpkfont cmss10 magstep0.5 # sans serif
+mkpkfont cmssq8 magstep0.5
+mkpkfont cmssi10 magstep0.5 # sans serif italic
+mkpkfont cmssqi8 magstep0.5
+mkpkfont cmbx10 magstep0.5 # boldface extended
+mkpkfont cmbx9 magstep0.5
+mkpkfont cmbx8 magstep0.5
+mkpkfont cmbx7 magstep0.5
+mkpkfont cmbx6 magstep0.5
+mkpkfont cmbx5 magstep0.5
+mkpkfont cmtt10 magstep0.5 # typewriter
+mkpkfont cmtt9 magstep0.5
+mkpkfont cmtt8 magstep0.5
+mkpkfont cmsltt10 magstep0.5 # slanted typewriter
+mkpkfont cmsl10 magstep0.5 # slanted roman
+mkpkfont cmsl9 magstep0.5
+mkpkfont cmsl8 magstep0.5
+mkpkfont cmti10 magstep0.5 # text italic
+mkpkfont cmti9 magstep0.5
+mkpkfont cmti8 magstep0.5
+mkpkfont cmti7 magstep0.5
+mkpkfont cmu10 magstep0.5 # unslanted text italic
+mkpkfont cmmib10 magstep0.5 # bold math italic
+mkpkfont cmbsy10 magstep0.5 # bold math symbols
+mkpkfont cmcsc10 magstep0.5 # caps and small caps
+mkpkfont cmssbx10 magstep0.5 # sans serif bold extended
+mkpkfont cmdunh10 magstep0.5 # Dunhill style
+mkfont cmtex10
+mkfont cminch
+mkfont cmssdc10 4
+mkpkfont cmr5 2
diff --git a/systems/unix/tex-gpc/dvitomp.ch b/systems/unix/tex-gpc/dvitomp.ch
new file mode 100644
index 0000000000..1d8f7db09d
--- /dev/null
+++ b/systems/unix/tex-gpc/dvitomp.ch
@@ -0,0 +1,208 @@
+% This is a change file of DVItoMP-GPC, Wolfgang Helbig, Aug. 2008
+To be used with the GNU Pascal Compiler Version 2.1
+
+[0] About DVItoMP-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\tt DVItoMP}
+
+\N0\*. About \namegpc.\fi
+
+This is an adaption of John Hobby's \name, version 0.64, to Unix
+and GNU~Pascal, version 2.1.
+
+This program expects the input file (\.{.dvi}) and the output file,
+(\.{mpx}) which is a text file, on the command line. To support shell
+scripting, \namegpc\ sets the exit code to one when something was
+wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+[1] Change the banner line
+@x
+@d banner=='% Written by DVItoMP, Version 0.64'
+@y
+@d banner=='% Written by DVItoMP-GPC'
+@z
+
+[3] only stdio files in program header.
+@x
+@p program DVI_to_MP(@!dvi_file,@!mpx_file,@!output);
+@y
+@p
+@{@&$I-@} {no I/O checking}
+program DVI_to_MP(input, output);
+@z
+
+[9] check command line arguments
+@x
+history:=spotless;
+@y
+history:=spotless;
+if param_count <> 2 then
+ begin write_ln('Usage: dvitomp dvi_file mpx_file'); halt(1);
+ end;
+@z
+
+[12] Pascal's type of text_files is text
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[14] get file name from command line
+@x
+begin rewrite(mpx_file);
+@y
+begin
+rewrite(mpx_file, param_str(2));
+@z
+
+[17] use GPC extension for packing subranges.
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@z
+
+[22] declare out_file
+@x
+@!tfm_file:byte_file; {a font metric file}
+@y
+@!tfm_file:byte_file; {a font metric file}
+@!out_file:text; {the outfile}
+@z
+
+[19] open file whose name is not known at compile time
+@x
+has acted, these routines assume that no file named |s| is accessible.
+@y
+has acted, these routines assume that no file named |s| is accessible.
+@d io_ok==io_result=0
+@d clear_io_result==@+if io_result=0 then
+@z
+
+@x
+begin reset(dvi_file);
+@y
+begin reset(dvi_file, param_str(1));
+@z
+
+@x
+begin reset(tfm_file,cur_name);
+@y
+begin reset(tfm_file,trim(cur_name)); {ignore leading and trailing blanks}
+@z
+
+@x
+begin reset(vf_file,cur_name);
+open_vf_file:=(not eof(vf_file));
+@y
+begin clear_io_result; reset(vf_file,trim(cur_name));
+ open_vf_file:=io_ok;
+@z
+
+ [28] no random access
+ @x;
+ begin set_pos(dvi_file,-1); dvi_length:=cur_pos(dvi_file);
+ end;
+ @#
+ procedure move_to_byte(n:integer);
+ begin set_pos(dvi_file,n); cur_loc:=n;
+ end;
+ @y;
+ begin do_nothing;
+ end;
+ @#
+ procedure move_to_byte(n:integer);
+ begin do_nothing;
+ end;
+ @z
+
+[47]
+ @x
+ is always at least one blank space in |buffer|.
+ @^system dependencies@>
+
+ @p procedure input_ln; {inputs a line from the terminal}
+ var k:0..terminal_line_length;
+ begin update_terminal; reset(term_in);
+ if eoln(term_in) then read_ln(term_in);
+ k:=0;
+ while (k<terminal_line_length)and not eoln(term_in) do
+ begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
+ end;
+ buffer[k]:=" ";
+ end;
+ @y
+ is always at least one blank space in |buffer|.
+ This is changed here: |term_in| is standard input and is not supposed
+ to be opened. There is never an end-of-line marker at the beginning of
+ a line but always at the end of a line.
+ @^system dependencies@>
+
+ @p procedure input_ln; {inputs a line from the terminal}
+ var k:0..terminal_line_length;
+ begin update_terminal;
+ k:=0;
+ while (k<terminal_line_length)and not eoln(term_in) do
+ begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
+ end;
+ read_ln(term_in);
+ buffer[k]:=" ";
+ end;
+ @z
+
+ [50] don't rewrite output file, write the banner while initializing
+ @x
+ begin rewrite(term_out); {prepare the terminal for output}
+ write_ln(term_out,banner);
+ @y
+ begin
+ @z
+
+[61]
+@x
+@d default_directory_name=='TeXfonts:' {change this to the correct name}
+@y
+@d default_directory_name=='TeXfonts/' {change this to the correct name}
+@z
+
+[63] lowercase filename
+@x
+ if (names[k]>="a")and(names[k]<="z") then
+ cur_name[l]:=xchr[names[k]-@'40]
+ else cur_name[l]:=xchr[names[k]];
+ end;
+cur_name[l+1]:='.'; cur_name[l+2]:='V'; cur_name[l+3]:='F'
+@y
+ cur_name[l]:=xchr[names[k]]
+ end;
+cur_name[l+1]:='.'; cur_name[l+2]:='v'; cur_name[l+3]:='f'
+@z
+
+[64] lowercase filename
+@x
+cur_name[l+2]:='T'; cur_name[l+3]:='F'; cur_name[l+4]:='M'
+@y
+cur_name[l+2]:='t'; cur_name[l+3]:='f'; cur_name[l+4]:='m'
+@z
+
+[107] set exit code
+@x
+final_end:end.
+@y
+final_end:halt(history) end.
+@z
diff --git a/systems/unix/tex-gpc/dvitype.ch b/systems/unix/tex-gpc/dvitype.ch
new file mode 100644
index 0000000000..38997eb736
--- /dev/null
+++ b/systems/unix/tex-gpc/dvitype.ch
@@ -0,0 +1,252 @@
+% This is a change file of DVIType for GPC, Wolfgang Helbig, Nov. 2007
+To be used with the GNU Pascal Compiler
+
+[0] About DVItype-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+\let\maybe=\iffalse % print changed modules only.
+
+\def\name{\tt DVItype}
+
+\N0\*. About \namegpc.\fi
+
+This is an adaption of Donald~E. Knuth's \.{DVItype}, version 3.6
+from December 1995, to Unix. It is based on GNU~Pascal, version 2.1.
+
+This program expects the input file (\.{.dvi}) and the output file,
+which is a text file, on the command line. To support shell
+scripting, \namegpc\ sets the exit code to one when something was
+wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+[1] Change the banner line
+@x
+@d banner=='This is DVItype, Version 3.6' {printed when the program starts}
+@y
+@d banner=='This is DVItype-GPC'
+ {printed when the program starts}
+@z
+
+[2] default case branch / no random_reading
+@x
+@d random_reading==true {should we skip around in the file?}
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d random_reading==false {should we skip around in the file?}
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[3] don't use output for output, but out_file
+@x
+@d print(#)==write(#)
+@d print_ln(#)==write_ln(#)
+@y
+@d print(#)==write(out_file, #)
+@d print_ln(#)==write_ln(out_file, #)
+@z
+
+[3] suppress io error messages
+@x
+@p program DVI_type(@!dvi_file,@!output);
+@y
+@p program DVI_type(term_in,term_out);
+@z
+
+[3] write banner on terminal and on outfile only when opened!
+@x
+ begin print_ln(banner);@/
+@y
+ begin write_ln(banner);@/
+@z
+
+[7] end output line
+@x
+@d abort(#)==begin print(' ',#); jump_out;
+@y
+@d abort(#)==begin write_ln(' ', #); print_ln(' ', #);
+history := 1; goto final_end;
+@z
+
+[9] the type of text_files is text in ISO Pascal
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[21] use GPC extension for packing subranges.
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@z
+
+[22] declare out_file
+@x
+@!tfm_file:byte_file; {a font metric file}
+@y
+@!tfm_file:byte_file; {a font metric file}
+@!out_file:text; {the outfile}
+@z
+
+[23] open file whose name is not known at compile time
+@x
+begin reset(dvi_file);
+@y
+begin reset(dvi_file, param_str(1));
+@z
+
+@x
+begin reset(tfm_file,cur_name);
+@y
+begin reset(tfm_file,trim(cur_name)); {ignore leading and trailing blanks}
+@z
+
+[28] no random access
+@x;
+begin set_pos(dvi_file,-1); dvi_length:=cur_pos(dvi_file);
+end;
+@#
+procedure move_to_byte(n:integer);
+begin set_pos(dvi_file,n); cur_loc:=n;
+end;
+@y;
+begin dvi_length := 0
+end;
+@#
+procedure move_to_byte(n:integer);
+begin do_nothing;
+end;
+@z
+
+[43] out_file muss geoeffnet werden!
+@x
+out_mode:=the_works; max_pages:=1000000; start_vals:=0; start_there[0]:=false;
+@y
+out_mode:=the_works; max_pages:=1000000; start_vals:=0; start_there[0]:=false;
+if param_count <> 2 then
+begin write_ln('Usage: dvitype dvi_file text_file'); halt(1);
+end;
+rewrite(out_file, param_str(2)); print_ln(banner);
+@z
+
+[45] term_in und term_out sind input und output
+@x
+and |term_out| for terminal output.
+@^system dependencies@>
+
+@y
+and |term_out| for terminal output.
+@^system dependencies@>
+
+@d term_in == input
+@d term_out == output
+@z
+
+@x
+@!term_in:text_file; {the terminal, considered as an input file}
+@!term_out:text_file; {the terminal, considered as an output file}
+@y
+@z
+
+[46]
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@y
+@d update_terminal == do_nothing {empty the terminal output buffer}
+@z
+
+[47]
+@x
+is always at least one blank space in |buffer|.
+@^system dependencies@>
+
+@p procedure input_ln; {inputs a line from the terminal}
+var k:0..terminal_line_length;
+begin update_terminal; reset(term_in);
+if eoln(term_in) then read_ln(term_in);
+k:=0;
+while (k<terminal_line_length)and not eoln(term_in) do
+ begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
+ end;
+buffer[k]:=" ";
+end;
+@y
+is always at least one blank space in |buffer|.
+This is changed here: |term_in| is standard input and is not supposed
+to be opened. There is never an end-of-line marker at the beginning of
+a line but always at the end of a line.
+@^system dependencies@>
+
+@p procedure input_ln; {inputs a line from the terminal}
+var k:0..terminal_line_length;
+begin update_terminal;
+k:=0;
+while (k<terminal_line_length)and not eoln(term_in) do
+ begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
+ end;
+read_ln(term_in);
+buffer[k]:=" ";
+end;
+@z
+
+[50] don't rewrite output file, write the banner while initializing
+@x
+begin rewrite(term_out); {prepare the terminal for output}
+write_ln(term_out,banner);
+@y
+begin
+@z
+
+[64]
+@x
+@d default_directory_name=='TeXfonts:' {change this to the correct name}
+@y
+@d default_directory_name=='TeXfonts/' {change this to the correct name}
+@z
+
+[66] lowercase filename
+@x
+ if (names[k]>="a")and(names[k]<="z") then
+ cur_name[r]:=xchr[names[k]-@'40]
+ else cur_name[r]:=xchr[names[k]];
+ end;
+cur_name[r+1]:='.'; cur_name[r+2]:='T'; cur_name[r+3]:='F'; cur_name[r+4]:='M'
+@y
+ cur_name[r]:=xchr[names[k]]
+ end;
+cur_name[r+1]:='.'; cur_name[r+2]:='t'; cur_name[r+3]:='f'; cur_name[r+4]:='m'
+@z
+
+[107] set exit code
+@x
+final_end:end.
+@y
+final_end:halt(history) end.
+@z
+
+[112] declare and initialize history
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@<Globals...@>=
+history : integer;
+
+@
+@<Set init...@>=
+history := 0;
+@z
diff --git a/systems/unix/tex-gpc/gftodvi.ch b/systems/unix/tex-gpc/gftodvi.ch
new file mode 100644
index 0000000000..7ba4556478
--- /dev/null
+++ b/systems/unix/tex-gpc/gftodvi.ch
@@ -0,0 +1,242 @@
+This is a change file of GFtoDVI for GPC, Wolfgang Helbig, Apr. 2008
+To be used with the GNU Pascal Compiler Version 2.1
+Juli 2008: Added command line support and exit code.
+
+[0] About GFtoDVI-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\tt GFtoDVI}
+
+\N0\*. About \namegpc.\fi
+This is an adaption of Donald~E. Knuth's \.{GFtoDVI}, version 3.0
+from March 1991, to Unix. \namegpc\ is based on GNU~Pascal, version 2.1.
+
+\namegpc\ expects the input file name (\.{.gf}) on the command
+line. To support shell scripting, it sets the exit code to one
+when something was wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+\bigskip
+\address
+@z
+
+[1] Change the banner line
+@x
+@d banner=='This is GFtoDVI, Version 3.0' {printed when the program starts}
+@y
+@d banner=='This is GFtoDVI-GPC' {printed when the program starts}
+@z
+
+[2] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[3] we'll use input and output for term_in and term_out
+@x
+@d print(#)==write(#)
+@d print_ln(#)==write_ln(#)
+@d print_nl(#)==@+begin write_ln; write(#);@+end
+@y
+@d term_in==i@&n@&p@&u@&t
+@d term_out==o@&u@&t@&p@&u@&t
+@d print(#)==write(term_out, #)
+@d print_ln(#)==write_ln(term_out, #)
+@d print_nl(#)==@+begin write_ln(term_out); write(term_out, #);@+end
+@z
+
+[3] program header:
+@x
+@p program GF_to_DVI(@!output);
+@y
+@p program GF_to_DVI(@!term_in, @!term_out);
+@z
+
+[8] print end of line
+@x
+@d abort(#)==@+begin print(' ',#); jump_out;@+end
+@y
+@d abort(#)==@+begin print_ln(' ',#); history := 1; jump_out;@+end
+@z
+
+[11] Don't need text_file
+@x
+@!text_file=packed file of text_char;
+@y
+@z
+
+[16] Don't update a terminal
+@x
+@d update_terminal == break(output) {empty the terminal output buffer}
+@y
+@d update_terminal == do_nothing {empty the terminal output buffer}
+@z
+
+[16] Must not define the type of term_in.
+@x
+@!term_in:text_file; {the terminal, considered as an input file}
+@y
+@z
+
+[17] Don't reopen term_in.
+Assume that a line is always terminated by end of line.
+@x
+@p procedure input_ln; {inputs a line from the terminal}
+begin update_terminal; reset(term_in);
+if eoln(term_in) then read_ln(term_in);
+line_length:=0;
+while (line_length<terminal_line_length)and not eoln(term_in) do
+ begin buffer[line_length]:=xord[term_in^]; incr(line_length); get(term_in);
+ end;
+end;
+@y
+@p procedure input_ln; {inputs a line from the terminal}
+begin update_terminal;
+line_length:=0;
+while (line_length<terminal_line_length)and not eoln(term_in) do
+ begin buffer[line_length]:=xord[term_in^]; incr(line_length); get(term_in);
+ end;
+read_ln(term_in); {read eoln}
+end;
+@z
+
+[45] GPC wants you to pack the range instead of the structure.
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@z
+
+[47] dynamic opening files
+@x
+begin reset(gf_file,name_of_file);
+@y
+begin reset(gf_file,trim(name_of_file));
+@z
+@x
+begin reset(tfm_file,name_of_file);
+@y
+begin reset(tfm_file,trim(name_of_file));
+@z
+@x
+begin rewrite(dvi_file,name_of_file);
+@y
+begin rewrite(dvi_file,trim(name_of_file));
+@z
+
+[52] GPC wants you to pack the range instead of the structure.
+@x
+@!font_index = 0..font_mem_size;
+@!quarterword = min_quarterword..max_quarterword; {1/4 of a word}
+@y
+@!font_index = packed 0..font_mem_size;
+@!quarterword = packed min_quarterword..max_quarterword; {1/4 of a word}
+@z
+
+[88] File names: area delimeter is '/'.
+@x
+l:=9; init_str9("T")("e")("X")("f")("o")("n")("t")("s")(":")(home_font_area);@/
+@y
+l:=9; init_str9("T")("e")("X")("f")("o")("n")("t")("s")("/")(home_font_area);@/
+@z
+
+[90] File names: area delimeter is '/'.
+@x
+else begin if (c=">")or(c=":") then
+@y
+else begin if c="/" then
+@z
+
+[94] Get gf file from command line
+@x
+@ The |start_gf| procedure prompts the user for the name of the generic
+font file to be input. It opens the file, making sure that some input is
+present; then it opens the output file.
+
+Although this routine is system-independent, it should probably be
+modified to take the file name from the command line (without an initial
+prompt), on systems that permit such things.
+
+@p procedure start_gf;
+label found,done;
+begin loop@+begin print_nl('GF file name: '); input_ln;
+@.GF file name@>
+ buf_ptr:=0; buffer[line_length]:="?";
+ while buffer[buf_ptr]=" " do incr(buf_ptr);
+ if buf_ptr<line_length then
+ begin @<Scan the file name in the buffer@>;
+ if cur_ext=null_string then cur_ext:=gf_ext;
+ pack_file_name(cur_name,cur_area,cur_ext); open_gf_file;
+ if not eof(gf_file) then goto found;
+ print_nl('Oops... I can''t find file '); print(name_of_file);
+@.Oops...@>
+@.I can't find...@>
+ end;
+ end;
+found:job_name:=cur_name; pack_file_name(job_name,null_string,dvi_ext);
+open_dvi_file;
+end;
+@y
+@ The |start_gf| procedure gets the name of the generic font file
+from the command line. It opens the file, making sure that some
+input is present; then it opens the output file.
+
+@d gpc_param_str == p@&a@&r@&a@&m@&s@&t@&r
+@d gpc_param_count == p@&a@&r@&a@&m@&c@&o@&u@&n@&t
+@d gpc_length == l@&e@&n@&g@&t@&h
+
+@p procedure start_gf;
+label done;
+var i : integer;
+ arg : string(255);
+begin if gpc_param_count <> 1 then abort('! missing gf-file');
+arg := gpc_param_str(1);
+line_length := 0; i := 1;
+while (line_length < terminal_line_length) and (i <= gpc_length(arg)) do
+ begin buffer[line_length] := xord[arg[i]]; incr(line_length); incr(i);
+ end;
+@.GF file name@>
+buf_ptr:=0; buffer[line_length]:="?";
+while buffer[buf_ptr]=" " do incr(buf_ptr);
+if buf_ptr<line_length then
+ begin @<Scan the file name in the buffer@>;
+ if cur_ext=null_string then cur_ext:=gf_ext;
+ pack_file_name(cur_name,cur_area,cur_ext); open_gf_file;
+ if eof(gf_file) then abort(name_of_file, 'is empty');
+ end;
+job_name:=cur_name; pack_file_name(job_name,null_string,dvi_ext);
+open_dvi_file;
+end;
+@z
+
+[219] exit code
+@x
+final_end:end.
+@y
+final_end: halt(history); end.
+@z
+
+[222 ff] system dependent changes
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@<Glob...@>=
+@! history : integer;
+
+@ @<Set init...@>=
+history := 0;
+@z
diff --git a/systems/unix/tex-gpc/gftopk.ch b/systems/unix/tex-gpc/gftopk.ch
new file mode 100644
index 0000000000..3f3d125df4
--- /dev/null
+++ b/systems/unix/tex-gpc/gftopk.ch
@@ -0,0 +1,132 @@
+This is a change file of GFtoPK for GPC, Wolfgang Helbig, Apr. 2008
+To be used with the GNU Pascal Compiler Version 2.1
+
+[0] About GFtoPK-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\tt GFtoPK}
+
+\N0\*. About \namegpc.\fi
+This is an adaption of Donald~E. Knuth's \.{GFtoPK}, version 2.4
+from January 2014, to Unix. \namegpc\ is based on GNU~Pascal,
+version 2.1.
+
+\namegpc\ expects the input file (\.{.gf}) and the output file
+(\.{.pk}) on the command line.
+To support shell scripting, it sets the exit code to one
+when something was wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+
+[1] Change the banner line
+@x
+@d banner=='This is GFtoPK, Version 2.4' {printed when the program starts}
+@y
+@d banner=='This is GFtoPK-GPC'
+ {printed when the program starts}
+@z
+
+[3] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[4] filenames from commandline
+@x
+@p program GFtoPK(@!gf_file,@!pk_file,@!output);
+@y
+@p program GFtoPK(@!output);
+@z
+
+[8] pint end of line at end of line
+@x
+@d abort(#)==begin print(' ',#); jump_out;
+@y
+@d abort(#)==begin print_ln(' ',#); history := 1; jump_out;
+@z
+
+[10] the type of textfile is text in standard PASCAL.
+@x
+@!text_file=packed file of text_char;
+@y
+@z
+
+[37] GPC wants you to pack the range instead of the structure.
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@z
+
+[39] get gf file name from command line
+@x
+begin reset(gf_file);
+@y
+begin reset(gf_file, param_str(1));
+@z
+
+[40] get pk file name from command line
+@x
+begin rewrite(pk_file);
+@y
+begin rewrite(pk_file, param_str(2));
+@z
+
+[46] Random access
+@x
+ set_pos(gf_file, -1) ; gf_len := cur_pos(gf_file) ;
+@y
+ gf_len := lastposition(gf_file) ;
+@z
+
+@x
+ set_pos(gf_file, n); gf_loc := n ;
+@y
+ seek(gf_file, n); gf_loc := n ;
+@z
+
+[51] check command line arguments
+@x
+ open_gf_file ;
+@y
+ if param_count <> 2 then abort('Usage: gftopk gf-file pk-file');
+ open_gf_file ;
+@z
+
+[86] set exit code.
+@x
+final_end : end .
+@y
+final_end :
+halt(history); {pass the history as exit code to the operating system}
+end.
+@z
+
+[88 ff] system dependent changes
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@<Glob...@>=
+@! history : integer;
+
+@ @<Set init...@>=
+history := 0;
+@z
diff --git a/systems/unix/tex-gpc/gftype.ch b/systems/unix/tex-gpc/gftype.ch
new file mode 100644
index 0000000000..c44b953954
--- /dev/null
+++ b/systems/unix/tex-gpc/gftype.ch
@@ -0,0 +1,248 @@
+% This is a change file of GFType for GPC, Wolfgang Helbig, Nov. 2007
+To be used with the GNU Pascal Compiler Version 2.1
+Sep 2008: command line and exit code.
+
+[0] About GF-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\tt GFtype}
+
+\N0\*. About \namegpc.\fi
+
+This is an adaption of Donald~E. Knuth's \.{GFtype}, version 3.1
+from March 1991, to Unix. It is based on GNU~Pascal, version 2.1.
+
+This program expects the input file (\.{.gf}) and the output file,
+which is a text file, on the command line. To support shell
+scripting, \namegpc\ sets the exit code to one when something was
+wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+
+
+[1] Change the banner line
+@x
+@d banner=='This is GFtype, Version 3.1' {printed when the program starts}
+@y
+@d banner=='This is GFtype-GPC' {printed when the program starts}
+@z
+
+[2] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly, like Modula 2}
+@z
+
+[3] don't use output for output, but typ_file
+@x
+@d print(#)==write(#)
+@d print_ln(#)==write_ln(#)
+@d print_nl==write_ln
+@y
+@d print(#)==write(typ_file, #)
+@d print_ln(#)==write_ln(typ_file, #)
+@d print_nl==write_ln(typ_file)
+@z
+
+[3] file names from command line.
+@x
+@p program GF_type(@!gf_file,@!output);
+@y
+@p program GF_type(term_in,term_out);
+@z
+
+[3] print banner to typ_file after opening typ_file
+@x
+ begin print_ln(banner);@/
+ @<Set initial values@>@/
+@y
+ begin @<Set initial values@>@/
+ print_ln(banner);@/
+@z
+
+[6]
+@x
+@d negate(#) == #:=-# {change the sign of a variable}
+@y
+@d negate(#) == #:=-# {change the sign of a variable}
+@d do_nothing ==
+@z
+
+[7] set history
+@x
+@d abort(#)==begin print(' ',#); jump_out;
+ end
+@y
+@d abort(#)==begin print_ln(' ',#); history := 1; jump_out;
+ end
+@z
+
+[9] the type of text_files is text in ISO Pascal
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[11] command line
+@x
+|xchr| array properly, without needing any system-dependent changes.
+
+@<Set init...@>=
+@y
+|xchr| array properly, without needing any system-dependent changes.
+
+@d gpc_length == length
+@d gpc_param_str == paramstr
+@d gpc_param_count == param_count
+
+@<Set init...@>=
+
+if gpc_param_count <> 2 then begin
+ write_ln('! Usage: gftype gf_file text_file'); history := 1; goto final_end;
+ end;
+@z
+
+[20] use GPC extension for packing subranges.
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@z
+
+[21] declare typ_file
+@x
+@!gf_file:byte_file; {the stuff we are \.{GF}typing}
+@y
+@!gf_file:byte_file; {the stuff we are \.{GF}typing}
+@!typ_file:text; {the outfile}
+@z
+
+[22] open GF file with name from command line
+@x
+begin reset(gf_file);
+@y
+begin reset(gf_file, gpc_param_str(1));
+@z
+
+[26] rewrite out file
+@x
+wants_mnemonics:=true; wants_pixels:=true;
+@y
+wants_mnemonics:=true; wants_pixels:=true;
+rewrite(typ_file, gpc_param_str(2));
+@z
+
+
+[27] term_in und term_out are input and output
+@x
+and |term_out| for terminal output.
+@^system dependencies@>
+
+@y
+and |term_out| for terminal output.
+@^system dependencies@>
+
+@d term_in == input
+@d term_out == output
+@z
+
+@x
+@!term_in:text_file; {the terminal, considered as an input file}
+@!term_out:text_file; {the terminal, considered as an output file}
+@y
+@z
+
+[28] break...
+@x;
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@y;
+@d update_terminal == do_nothing {empty the terminal output buffer}
+@z
+
+[29]
+@x
+@p procedure input_ln; {inputs a line from the terminal}
+var k:0..terminal_line_length;
+begin update_terminal; reset(term_in);
+if eoln(term_in) then read_ln(term_in);
+k:=0;
+while (k<terminal_line_length)and not eoln(term_in) do
+ begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
+ end;
+buffer[k]:=" ";
+end;
+@y
+This is changed here: |term_in| is standard input and is not supposed
+to be opened. There is never a end of line mark at the beginning of
+a line but always at the end of a line.
+@^system dependencies@>
+
+@p procedure input_ln; {inputs a line from the terminal}
+var k:0..terminal_line_length;
+begin update_terminal;
+k:=0;
+while (k<terminal_line_length)and not eoln(term_in) do
+ begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
+ end;
+read_ln(term_in);
+buffer[k]:=" ";
+end;
+@z
+
+[31] don't rewrite term_out, don't write banner here.
+@x
+begin rewrite(term_out); {prepare the terminal for output}
+write_ln(term_out,banner);@/
+@y
+begin
+@z
+
+[66] write banner to term_out before opening the other files
+@x
+@p begin initialize; {get all variables initialized}
+@y
+@p begin write_ln(term_out, banner);
+initialize; {get all variables initialized}
+@z
+
+[66] print end of line at end of line
+@x
+print(' altogether.');
+@.The file had n characters...@>
+final_end:end.
+@y
+print_ln(' altogether.');
+@.The file had n characters...@>
+final_end: halt(history) end.
+@z
+
+[73] declare and initialize history
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+
+@<Globals...@>=
+history : integer;
+
+@
+@<Set init...@>=
+history := 0;
+@z
diff --git a/systems/unix/tex-gpc/mf.ch b/systems/unix/tex-gpc/mf.ch
new file mode 100644
index 0000000000..89ab6dce48
--- /dev/null
+++ b/systems/unix/tex-gpc/mf.ch
@@ -0,0 +1,702 @@
+% This is a change file of Metafont for GPC, Wolfgang Helbig, Nov. 2007
+[0] to print changed sections only
+@x
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+@y
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+\input webmac-gpc
+\emergencystretch 0.5in % avoid overfull boxes
+
+\let\maybe=\iffalse % print changed modules only.
+
+\def\name{\MF}
+
+\N0\*. \[0] About \namegpc.
+
+This is an adaption of Donald~E. Knuth's \MF, version 2.7182815
+from January 2014, to Unix. It is based on GNU~Pascal, version 2.1.
+
+The features added include treating the command line as the first
+input line and invoking a system editor, in this case \.{vi}, to
+let the user correct the input file.
+On exit, \namegpc\ passes its `history' to the operating system.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+\fi
+@z
+
+[2] Change the banner line
+@x
+@d banner=='This is METAFONT, Version 2.7182818' {printed when \MF\ starts}
+@y
+@d banner=='This is METAFONT-GPC' {printed when \MF\ starts}
+@z
+
+[4] terminal output and input
+@x
+@^system dependencies@>
+
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@y
+@^system dependencies@>
+
+@d term_in==i@&n@&p@&u@&t
+@d term_out==o@&u@&t@&p@&u@&t
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@z
+
+[4] terminal output and input
+@x
+program MF; {all file names are defined dynamically}
+@y
+program MF(@!term_in,@!term_out);
+{all other file names are defined dynamically}
+import gpc only (gpc_execute,gpc_install_signal_handler,
+ gpc_t_signal_handler, gpc_sig_int);
+@z
+
+[4] forward reference for signal handler
+@x
+procedure initialize; {this procedure gets things started properly}
+@y
+procedure set_interrupt(signal: gpc_integer); forward; @t\2@>
+{|initialize| installs |set_interrupt| as a Unix signal handler}
+@#
+procedure initialize; {this procedure gets things started properly}
+@z
+
+Since @x, @y, and @z only define a change block when they begin a
+line, you deactivate a block by indenting it (shift right) and
+activate it by unindenting it (shift left). With vi set the
+cursor to the @x line and enter >} or <} to (un)indent a paragraph.
+
+[7] shift left to turn debugging on, right to turn it off
+@x
+@d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+@d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+@y
+@d debug== {change this to `$\\{debug}\equiv\.{@@\{}$' when not debugging}
+@d gubed== {change this to `$\\{gubed}\equiv\.{@@\}}$' when not debugging}
+@z
+
+[7] shift left to turn on statistics, shift rigth to turn off statistics
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
+
+[8] shift left to build MF and right it to build INIMF.
+ @x inimf
+ @d init== {change this to `$\\{init}\equiv\.{@@\{}$' in the production version}
+ @d tini== {change this to `$\\{tini}\equiv\.{@@\}}$' in the production version}
+ @y
+ @d init==@{
+ @d tini==@}
+ @z
+
+[9] compiler directives, turn off I/O checking.
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$I-@} {no I/O checking}
+@z
+
+[10] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+ else {default for cases not listed explicitly}
+@z
+
+Shift left all `trap' blocks to prepare for TRAP.
+Shift right all `part' blocks to prepare for TRAP.
+[11]
+@x part
+@!mem_max=30000; {greatest index in \MF's internal |mem| array;
+@y
+@!mem_max=35000; {increased for ibycus4,
+ greatest index in \MF's internal |mem| array;
+@z
+
+[11]
+@x part
+@!max_strings=2000; {maximum number of strings; must not exceed |max_halfword|}
+@y
+@!max_strings=6000; {maximum number of strings; increased for ibycus4}
+@z
+
+@x part
+@!pool_size=32000; {maximum number of characters in strings, including all
+@y
+@!pool_size=60000; {increased for ibycus4,
+ maximum number of characters in strings, including all
+@z
+
+[11]
+ @x trap
+ @!mem_max=30000; {greatest index in \MF's internal |mem| array;
+ @y
+ @!mem_max=3000; {greatest index in \MF's internal |mem| array;
+ @z
+
+[11]
+ @x trap
+ @!error_line=72; {width of context lines on terminal error messages}
+ @!half_error_line=42; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=79; {width of longest text lines output; should be at least 60}
+ @!screen_width=768; {number of pixels in each row of screen display}
+ @!screen_depth=1024; {number of pixels in each column of screen display}
+ @y
+ @!error_line=64; {width of context lines on terminal error messages}
+ @!half_error_line=32; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=72; {width of longest text lines output; should be at least 60}
+ @!screen_width=100; {number of pixels in each row of screen display}
+ @!screen_depth=200; {number of pixels in each column of screen display}
+ @z
+
+[11]
+ @x trap
+ @!gf_buf_size=800; {size of the output buffer, must be a multiple of 8}
+ @y
+ @!gf_buf_size=8; {size of the output buffer, must be a multiple of 8}
+ @z
+
+[11] location of pool file
+@x
+@!pool_name='MFbases:MF.POOL ';
+@y
+@!pool_name='MFbases/mf.pool ';
+@z
+
+
+[12]
+@x part
+@d mem_top==30000 {largest index in the |mem| array dumped by \.{INIMF};
+@y
+@d mem_top==35000 {largest index in the |mem| array dumped by \.{INIMF};
+@z
+
+ [12]
+ @x trap
+ @d mem_top==30000 {largest index in the |mem| array dumped by \.{INIMF};
+ @y
+ @d mem_top==3000 {largest index in the |mem| array dumped by \.{INIMF};
+ @z
+
+[12] Silvio levy' greek fonts need more opened input files.
+@x
+@d max_in_open=6 {maximum number of input files and error insertions that
+@y
+@d max_in_open=10 {maximum number of input files and error insertions that
+@z
+
+[22] accept tab and formfeed
+@x
+for i:=0 to @'37 do xchr[i]:=' ';
+@y
+for i:=0 to @'37 do xchr[i]:=' ';
+xchr[@'11] := chr(@'11); {accept horizontal tab}
+xchr[@'14] := chr(@'14); {accept form feed}
+@z
+
+[24] the type of text_files is text in ISO Pascal
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@!alpha_file=packed file of text_char; {files that contain textual data}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@!alpha_file=t@&e@&x@&t; {coding trick is needed since |text| is a macro}
+@z
+
+[26] dynamic io
+@x
+@d reset_OK(#)==erstat(#)=0
+@d rewrite_OK(#)==erstat(#)=0
+@y
+@d gpc_trim==t@&r@&i@&m
+@d gpc_io_result==i@&o@&r@&e@&s@&u@&l@&t
+@d reset_OK(#)==gpc_io_result=0
+@d rewrite_OK(#)==gpc_io_result=0
+@d clear_io_result==@+if gpc_io_result=0 then do_nothing
+@z
+
+[26] (reset and rewrite for each of three file types) alpha
+@x
+begin reset(f,name_of_file,'/O'); a_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); a_open_in:=reset_OK(f);
+@z
+
+[26]
+@x
+begin rewrite(f,name_of_file,'/O'); a_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+a_open_out:=rewrite_OK(f);
+@z
+
+[26] byte file output only
+@x
+begin rewrite(f,name_of_file,'/O'); b_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+b_open_out:=reset_OK(f);
+@z
+
+[26] word_file
+@x
+begin reset(f,name_of_file,'/O'); w_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); w_open_in:=reset_OK(f);
+@z
+
+[26]
+@x
+begin rewrite(f,name_of_file,'/O'); w_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+w_open_out:=rewrite_OK(f);
+@z
+
+[30] eoln handling
+@x
+@p function input_ln(var @!f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var @!last_nonblank:0..buf_size; {|last| with trailing blanks removed}
+begin if bypass_eoln then if not eof(f) then get(f);
+ {input the first character of the line into |f^|}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin last_nonblank:=first;
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ if buffer[last-1]<>" " then last_nonblank:=last;
+ end;
+ last:=last_nonblank; input_ln:=true;
+ end;
+end;
+@y
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+begin
+ {ignore |bypass_eoln|. Assuming |f| being positioned at the first character}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then begin
+ read_ln(f); {complete the current line}
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ end;
+ get(f); {Advance |f| to the first character of the next line}
+ input_ln:=true;
+ end;
+end;
+@z
+
+[31] term_in and term_out are the standard pascal files
+@x
+is considered an output file the file variable is |term_out|.
+@^system dependencies@>
+
+@<Glob...@>=
+@!term_in:alpha_file; {the terminal as an input file}
+@!term_out:alpha_file; {the terminal as an output file}
+@y
+is considered an output file the file variable is |term_out|.
+The file |term_in| is declared as \\{input} and |term_out| as
+\\{output} in the program header.
+@^system dependencies@>
+@z
+
+[32]
+@x
+@d t_open_in==reset(term_in,'TTY:','/O/I') {open the terminal for text input}
+@d t_open_out==rewrite(term_out,'TTY:','/O')
+ {open the terminal for text output}
+@y
+@d t_open_in==do_nothing {open the terminal for text input}
+@d t_open_out==do_nothing {open the terminal for text output}
+@z
+
+[33]
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@d clear_terminal == break_in(term_in,true) {clear the terminal input buffer}
+@y
+@d update_terminal == do_nothing {empty the terminal output buffer}
+@d clear_terminal == do_nothing {clear the terminal input buffer}
+@z
+
+[35] command line
+@x
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@y
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@d gpc_string==s@&t@&r@&i@&n@&g {a string with varying length}
+@d gpc_length==l@&e@&n@&g@&t@&h
+@d gpc_param_count==p@&a@&r@&a@&m@&c@&o@&u@&n@&t
+@d gpc_param_str==p@&a@&r@&a@&m@&s@&t@&r
+
+{GPC function returning the length of a |gpc_string|}
+
+@p procedure input_command_ln; {get the command line in |buffer|}
+var argc: integer; {argument counter}
+ arg: gpc_string; {argument}
+ cc: integer; {character counter in argument}
+begin last := first; argc := 1;
+while argc <= gpc_param_count do
+ begin cc := 1; arg := gpc_param_str(argc); incr(argc);
+ while cc <= gpc_length(arg) do
+ begin
+ if last+1>=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ buffer[last] := xord[arg[cc]]; incr(last); incr(cc);
+ end;
+ if (argc <= gpc_param_count) then begin
+ buffer[last] := " "; incr(last);
+ end;
+ end;
+end;
+@z
+
+[36] command line
+@x
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in;
+loop@+begin wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in,true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ loc:=first;
+ while (loc<last)and(buffer[loc]=" ") do incr(loc);
+ if loc<last then
+ begin init_terminal:=true;
+ return; {return unless the line was all blank}
+ end;
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+exit:end;
+@y
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in; input_command_ln;
+while first=last do begin
+ wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in, true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write_ln(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ if first=last then
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+loc := first; {trim leading spaces}
+while buffer[loc]=" " do incr(loc);
+init_terminal:=true;
+exit: end;
+@z
+
+[74] start editor
+@x
+@!use_err_help:boolean; {should the |err_help| string be shown?}
+@y
+@!use_err_help:boolean; {should the |err_help| string be shown?}
+@!edit_line: integer; {line number to be passed to the system editor}
+@!edit_file_name: str_number; {file name to be passed to the system editor}
+@z
+
+[75] initial value for edit argument
+@x
+help_ptr:=0; use_err_help:=false; err_help:=0;
+@y
+help_ptr:=0; use_err_help:=false; err_help:=0;
+edit_line:=0; edit_file_name:=0;
+@z
+
+[79] set edit_cmd
+@x
+ begin print_nl("You want to edit file ");
+@.You want to edit file x@>
+ slow_print(input_stack[file_ptr].name_field);
+ print(" at line "); print_int(line);@/
+ interaction:=scroll_mode; jump_out;
+ end;
+@y
+ begin {save values to be passed to the system editor}
+ edit_file_name := input_stack[file_ptr].name_field;
+ edit_line := line; add_str_ref(edit_file_name);
+ interaction:=scroll_mode; jump_out;
+ end;
+@z
+
+[91] interrupt is predefined and not implemented in GNU~Pascal
+@x
+@d check_interrupt==begin if interrupt<>0 then pause_for_instructions;
+@y
+@d interrupt==buginterrupt
+@f interrupt==true
+@d check_interrupt==begin if interrupt<>0 then pause_for_instructions;
+@z
+
+[156] pack subranges
+@x
+@!quarterword = min_quarterword..max_quarterword; {1/4 of a word}
+@!halfword=min_halfword..max_halfword; {1/2 of a word}
+@y
+@!quarterword = packed min_quarterword..max_quarterword; {1/4 of a word}
+@!halfword=packed min_halfword..max_halfword; {1/2 of a word}
+@z
+
+[194] time and date
+@x
+begin internal[time]:=12*60*unity; {minutes since midnight}
+internal[day]:=4*unity; {fourth day of the month}
+internal[month]:=7*unity; {seventh month of the year}
+internal[year]:=1776*unity; {Anno Domini}
+@y
+var t: time_stamp;
+begin
+get_time_stamp(t);
+internal[time]:=(t.minute + t.hour*60)*unity; {minutes since midnight}
+internal[day]:=t.d@&a@&y*unity;
+internal[month]:=t.m@&o@&n@&t@&h*unity;
+internal[year]:=t.y@&e@&a@&r*unity; {Anno Domini}
+@z
+
+[199] character class for tab and lf
+@x
+for k:=127 to 255 do char_class[k]:=invalid_class;
+@y
+for k:=127 to 255 do char_class[k]:=invalid_class;
+char_class[@'11] := space_class;
+char_class[@'14] := space_class;
+@z
+
+[564]
+ @x trap
+ begin init_screen:=false;
+ @y
+ begin init_screen:=true;
+ @z
+
+[679] spurious empty line on terminal
+@x
+ print_ln; first:=start;
+ prompt_input("*"); {input on-line into |buffer|}
+@y
+@.Please type...@>
+ print_nl("");
+ first:=start; {avoid empty lines on terminal and log file}
+ prompt_input("*"); {input on-line into |buffer|}
+@z
+
+[769] Path separator in Unix
+@x
+@d MF_area=="MFinputs:"
+@y
+@d MF_area=="MFinputs/"
+@z
+
+[771]
+@x
+else begin if (c=">")or(c=":") then
+@y
+else begin if c="/" then
+@z
+
+[776]
+@x
+MF_base_default:='MFbases:plain.base';
+@y
+MF_base_default:='MFbases/plain.base';
+@z
+
+[793] don't forget the input file name
+@x
+if name=str_ptr-1 then {we can conserve string pool space now}
+ begin flush_string(name); name:=cur_name;
+ end;
+@y
+@z
+
+[1204]
+@x
+@p begin @!{|start_here|}
+@y
+@d gpc_halt == h@&a@&l@&t
+
+@p begin @!{|start_here|}
+@z
+
+[1204] load the base file before printing the banner line
+@x
+start_of_MF: @<Initialize the output routines@>;
+@y
+start_of_MF: @<Preload the default base file@>;
+@<Initialize the output routines@>;
+@z
+
+[1204] start editor and pass history
+@x
+final_end: ready_already:=0;
+@y
+final_end:
+if edit_file_name > 0 then start_editor; {user typed `\.{E}'}
+gpc_halt(history);
+ {pass |history| as the exit value to the system}
+@z
+
+[1205] print last end-of-line marker if needed
+@x
+if log_opened then
+ begin wlog_cr;
+ a_close(log_file); selector:=selector-2;
+ if selector=term_only then
+ begin print_nl("Transcript written on ");
+@.Transcript written...@>
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+end;
+@y
+if log_opened then
+ begin if file_offset > 0 then wlog_cr;
+ a_close(log_file); selector:=selector-2;
+ if selector=term_only then
+ begin print_nl("Transcript written on ");
+@.Transcript written...@>
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+ if term_offset > 0 then wterm_cr;
+end;
+@z
+
+[1212] return if eof
+@x
+ read(term_in,m);
+@y
+ if eof(term_in) then return;
+ {don't try to read past end of file}
+ read(term_in,m);
+@z
+
+[1212] return if eof
+@x
+ else begin read(term_in,n);
+@y
+ else begin if eof(term_in) then return;
+ {don't try to read past end of file}
+ read(term_in,n);
+@z
+
+[1213] return eof
+@x
+13: begin read(term_in,l); print_cmd_mod(n,l);
+@y
+13: begin if eof(term_in) then return;
+ {don't try to read past end of file}
+read(term_in,l); print_cmd_mod(n,l);
+@z
+
+[1214 and modules added for METAFONT-GPC]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@ Try to preload the default base file. This is called even before
+the first line is read from the terminal, and thus turns \.{VIRMF}
+into \.{MF}, at least as seen by the user.
+
+\indent\.{INIMF} sets |base_ident| to `\.{INIMF}' and won't load a base
+file here.
+
+@<Preload the default base file@> =
+if base_ident = 0 then
+ begin pack_buffered_name(base_default_length - base_ext_length, 1, 0);
+ if not w_open_in(base_file) then
+ begin
+ wterm_ln('I can''t find the base file ', name_of_file);
+ goto final_end
+ end;
+ if not load_base_file then
+ begin w_close(base_file); goto final_end
+ end;
+ w_close(base_file);
+ end
+
+@
+@d gpc_execute == e@&x@&e@&c@&u@&t@&e
+@d gpc_write_str == w@&r@&i@&t@&e@&s@&t@&r
+
+@<Error hand...@>=
+procedure start_editor;
+var i: integer; {index into |name_of_file|}
+ j: pool_pointer; {index into |str_pool|}
+ cmd_line: gpc_string(200); {area to build the command line}
+begin i := 1; j := str_start[edit_file_name];
+while j<str_start[edit_file_name + 1] do
+ begin name_of_file[i] := xchr[str_pool[j]]; incr(i); incr(j)
+ end;
+while i<=file_name_size do begin name_of_file[i] := ' '; incr(i) end;
+gpc_write_str(cmd_line, 'vi +', edit_line, ' ', gpc_trim(name_of_file));
+if 0 <> gpc_execute(cmd_line) then
+ write_ln(gpc_param_str(0), ': could not start editor with: "',
+ cmd_line, '"');
+end;
+
+@
+@d gpc_t_signal_handler == t@&s@&i@&g@&n@&a@&l@&h@&a@&n@&d@&l@&e@&r
+@d gpc_install_signal_handler ==
+ i@&n@&s@&t@&a@&l@&l@&s@&i@&g@&n@&a@&l@&h@&a@&n@&d@&l@&e@&r
+@d gpc_sig_int == s@&i@&g@&i@&n@&t
+@d gpc_integer == cinteger {for later versions of GPC (3.4+) replace
+ \\{integer} by \\{cinteger}}
+
+@<Error hand...@>=
+procedure set_interrupt(signal: gpc_integer);
+begin interrupt := 1 @+end;
+
+@
+@<Set initial values ... @>=
+dummy_boolean := gpc_install_signal_handler(gpc_sig_int,set_interrupt,
+ true,true,n@&u@&l@&l,n@&u@&l@&l);
+
+@ Here are two variables that are needed to install |set_interrupt|.
+@<Local variables for initialization@> =
+dummy_boolean: boolean;
+@z
diff --git a/systems/unix/tex-gpc/mp.ch b/systems/unix/tex-gpc/mp.ch
new file mode 100644
index 0000000000..60dec6ee13
--- /dev/null
+++ b/systems/unix/tex-gpc/mp.ch
@@ -0,0 +1,651 @@
+% This is a change file of METAPOST for GPC, Wolfgang Helbig, Aug. 2008
+% See tex.ch and mf.ch from tex-gpc
+[0] to print changed sections only
+@x
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+@y
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+\input webmac-gpc
+\emergencystretch 0.5in % avoid overfull boxes
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\MP}
+
+\N0\*. \[0] About \namegpc.
+
+This is an adaption of John Hobby's \MP, version 0.641, to Unix,
+and GNU~Pascal, version 2.1.
+
+The features added include treating the command line as the first
+input line and invoking a system editor, in this case \.{vi}, to
+let the user correct the input file.
+On exit, \namegpc\ passes its `history' to the operating system.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+\fi
+@z
+
+[2] Change the banner line
+@x
+@d banner=='This is MetaPost, Version 0.641' {printed when \MP\ starts}
+@y
+@d banner=='This is MetaPost-GPC' {printed when \MP\ starts}
+@z
+
+[4] terminal output and input
+@x
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@y
+@d term_in==i@&n@&p@&u@&t
+@d term_out==o@&u@&t@&p@&u@&t
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@z
+
+[4] terminal output and input
+@x
+program MP; {all file names are defined dynamically}
+@y
+program MP(@!term_in,@!term_out);
+{all other file names are defined dynamically}
+import gpc only (gpc_execute,gpc_install_signal_handler,
+ gpc_t_signal_handler, gpc_sig_int);
+@z
+
+[4] forward reference for signal handler
+@x
+procedure initialize; {this procedure gets things started properly}
+@y
+procedure set_interrupt(signal: gpc_integer); forward; @t\2@>
+{|initialize| installs |set_interrupt| as a Unix signal handler}
+@#
+procedure initialize; {this procedure gets things started properly}
+@z
+
+Since @x, @y, and @z only define a change block when they begin a
+line, you deactivate a block by indenting it (shift right) and
+activate it by unindenting it (shift left). With vi set the
+cursor to the @x line and enter >} or <} to (un)indent a paragraph.
+
+[7] shift left to turn debugging on, right to turn it off
+@x
+@d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+@d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+@y
+@d debug== {change this to `$\\{debug}\equiv\.{@@\{}$' when not debugging}
+@d gubed== {change this to `$\\{gubed}\equiv\.{@@\}}$' when not debugging}
+@z
+
+[7] shift left to turn on statistics, shift rigth to turn off statistics
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
+
+[8] shift left to build MP and right it to build INIMP.
+ @x inimp
+ @d init== {change this to `$\\{init}\equiv\.{@@\{}$' in the production version}
+ @d tini== {change this to `$\\{tini}\equiv\.{@@\}}$' in the production version}
+ @y
+ @d init==@{
+ @d tini==@}
+ @z
+
+[9] compiler directives, turn off I/O checking.
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$I-@} {no I/O checking}
+@z
+
+[10] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+ else {default for cases not listed explicitly}
+@z
+
+[11] location of pool file
+@x
+@!pool_name='MPlib:MP.POOL ';
+ {string of length |file_name_size|; tells where the string pool appears}
+@.MPlib@>
+@!ps_tab_name='MPlib:PSFONTS.MAP ';
+ {string of length |file_name_size|; locates font name translation table}
+@y
+@!pool_name='MPlib/mp.pool ';
+ {string of length |file_name_size|; tells where the string pool appears}
+@.MPlib@>
+@!ps_tab_name='MPlib/psfonts.map ';
+ {string of length |file_name_size|; locates font name translation table}
+@z
+
+
+[22] accept tab and formfeed
+@x
+for i:=0 to @'37 do xchr[i]:=' ';
+@y
+for i:=0 to @'37 do xchr[i]:=' ';
+xchr[@'11] := chr(@'11); {accept horizontal tab}
+xchr[@'14] := chr(@'14); {accept form feed}
+@z
+
+[24] the type of text_files is text in ISO Pascal
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@!alpha_file=packed file of text_char; {files that contain textual data}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@!alpha_file=t@&e@&x@&t; {coding trick is needed since |text| is a macro}
+@z
+
+[26] dynamic io
+@x
+@d reset_OK(#)==erstat(#)=0
+@d rewrite_OK(#)==erstat(#)=0
+@y
+@d gpc_trim==t@&r@&i@&m
+@d gpc_io_result==i@&o@&r@&e@&s@&u@&l@&t
+@d reset_OK(#)==gpc_io_result=0
+@d rewrite_OK(#)==gpc_io_result=0
+@d clear_io_result==@+if gpc_io_result=0 then do_nothing
+@z
+
+[26] (reset and rewrite for each of three file types) alpha
+@x
+begin reset(f,name_of_file,'/O'); a_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); a_open_in:=reset_OK(f);
+@z
+
+[26]
+@x
+begin rewrite(f,name_of_file,'/O'); a_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+a_open_out:=rewrite_OK(f);
+@z
+
+[26] byte file
+@x
+begin reset(f,name_of_file,'/O'); b_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); b_open_in:=reset_OK(f);
+@z
+
+@x
+begin rewrite(f,name_of_file,'/O'); b_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+b_open_out:=reset_OK(f);
+@z
+
+[26] word_file
+@x
+begin reset(f,name_of_file,'/O'); w_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); w_open_in:=reset_OK(f);
+@z
+
+[26]
+@x
+begin rewrite(f,name_of_file,'/O'); w_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+w_open_out:=rewrite_OK(f);
+@z
+
+[30] eoln handling
+@x
+@p function input_ln(var @!f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var @!last_nonblank:0..buf_size; {|last| with trailing blanks removed}
+begin if bypass_eoln then if not eof(f) then get(f);
+ {input the first character of the line into |f^|}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin last_nonblank:=first;
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ if buffer[last-1]<>" " then last_nonblank:=last;
+ end;
+ last:=last_nonblank; input_ln:=true;
+ end;
+end;
+@y
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+begin
+ {ignore |bypass_eoln|. Assuming |f| being positioned at the first character}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then begin
+ read_ln(f); {complete the current line}
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ end;
+ get(f); {Advance |f| to the first character of the next line}
+ input_ln:=true;
+ end;
+end;
+@z
+
+[31] term_in and term_out are the standard pascal files
+@x
+is considered an output file the file variable is |term_out|.
+@^system dependencies@>
+
+@<Glob...@>=
+@!term_in:alpha_file; {the terminal as an input file}
+@!term_out:alpha_file; {the terminal as an output file}
+@y
+is considered an output file the file variable is |term_out|.
+The file |term_in| is declared as \\{input} and |term_out| as
+\\{output} in the program header.
+@z
+
+[32]
+@x
+@d t_open_in==reset(term_in,'TTY:','/O/I') {open the terminal for text input}
+@d t_open_out==rewrite(term_out,'TTY:','/O') {open the terminal for text output}
+@y
+@d t_open_in==do_nothing {open the terminal for text input}
+@d t_open_out==do_nothing {open the terminal for text output}
+@z
+
+[33]
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@d clear_terminal == break_in(term_in,true) {clear the terminal input buffer}
+@y
+@d update_terminal == do_nothing {empty the terminal output buffer}
+@d clear_terminal == do_nothing {clear the terminal input buffer}
+@z
+
+[35] command line
+@x
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@y
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@d gpc_string==s@&t@&r@&i@&n@&g {a string with varying length}
+@d gpc_length==l@&e@&n@&g@&t@&h
+@d gpc_param_count==p@&a@&r@&a@&m@&c@&o@&u@&n@&t
+@d gpc_param_str==p@&a@&r@&a@&m@&s@&t@&r
+
+{GPC function returning the length of a |gpc_string|}
+
+@p procedure input_command_ln; {get the command line in |buffer|}
+var argc: integer; {argument counter}
+ arg: gpc_string; {argument}
+ cc: integer; {character counter in argument}
+begin last := first; argc := 1;
+while argc <= gpc_param_count do
+ begin cc := 1; arg := gpc_param_str(argc); incr(argc);
+ while cc <= gpc_length(arg) do
+ begin
+ if last+1>=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ buffer[last] := xord[arg[cc]]; incr(last); incr(cc);
+ end;
+ if (argc <= gpc_param_count) then begin
+ buffer[last] := " "; incr(last);
+ end;
+ end;
+end;
+@z
+
+[36] command line
+@x
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in;
+loop@+begin wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in,true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ loc:=first;
+ while (loc<last)and(buffer[loc]=" ") do incr(loc);
+ if loc<last then
+ begin init_terminal:=true;
+ return; {return unless the line was all blank}
+ end;
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+exit:end;
+@y
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in; input_command_ln;
+while first=last do begin
+ wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in, true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write_ln(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ if first=last then
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+loc := first; {trim leading spaces}
+while buffer[loc]=" " do incr(loc);
+init_terminal:=true;
+exit: end;
+@z
+
+[76] print banner line on terminal
+@x
+@<Initialize the output...@>=
+update_terminal;
+@y
+@<Initialize the output...@>=
+wterm(banner);
+if mem_ident=0 then wterm_ln(' (no mem preloaded)')
+else begin print(mem_ident); print_ln;
+ end;
+update_terminal;
+@z
+
+[89] start editor
+@x
+@!use_err_help:boolean; {should the |err_help| string be shown?}
+@y
+@!use_err_help:boolean; {should the |err_help| string be shown?}
+@!edit_line: integer; {line number to be passed to the system editor}
+@!edit_file_name: str_number; {file name to be passed to the system editor}
+@z
+
+[90] initial value for edit argument
+@x
+help_ptr:=0; use_err_help:=false; err_help:=0;
+@y
+help_ptr:=0; use_err_help:=false; err_help:=0;
+edit_line:=0; edit_file_name:=0;
+@z
+
+[94] set edit_cmd
+@x
+ begin print_nl("You want to edit file ");
+@.You want to edit file x@>
+ print(input_stack[file_ptr].name_field);
+ print(" at line "); print_int(true_line);@/
+ interaction:=scroll_mode; jump_out;
+ end;
+@y
+ begin {save values to be passed to the system editor}
+ edit_file_name := input_stack[file_ptr].name_field;
+ add_str_ref(edit_file_name);
+ edit_line := true_line;
+ interaction:=scroll_mode; jump_out;
+ end;
+@z
+
+[106] interrupt is predefined and not implemented in GNU~Pascal
+@x
+@d check_interrupt==begin if interrupt<>0 then pause_for_instructions;
+@y
+@d interrupt==buginterrupt
+@f interrupt==true
+@d check_interrupt==begin if interrupt<>0 then pause_for_instructions;
+@z
+
+[171] pack subranges
+@x
+@!quarterword = min_quarterword..max_quarterword; {1/4 of a word}
+@!halfword=min_halfword..max_halfword; {1/2 of a word}
+@y
+@!quarterword = packed min_quarterword..max_quarterword; {1/4 of a word}
+@!halfword=packed min_halfword..max_halfword; {1/2 of a word}
+@z
+
+[212] time and date
+@x
+begin internal[time]:=12*60*unity; {minutes since midnight}
+internal[day]:=4*unity; {fourth day of the month}
+internal[month]:=7*unity; {seventh month of the year}
+internal[year]:=1776*unity; {Anno Domini}
+@y
+var t: time_stamp;
+begin
+get_time_stamp(t);
+internal[time]:=(t.minute + t.hour*60)*unity; {minutes since midnight}
+internal[day]:=t.d@&a@&y*unity;
+internal[month]:=t.m@&o@&n@&t@&h*unity;
+internal[year]:=t.y@&e@&a@&r*unity; {Anno Domini}
+@z
+
+[217] character class for tab and lf
+@x
+for k:=127 to 255 do char_class[k]:=invalid_class;
+@y
+for k:=127 to 255 do char_class[k]:=invalid_class;
+char_class[@'11] := space_class;
+char_class[@'14] := space_class;
+@z
+
+[640] spurious empty line on terminal
+@x
+ print_ln; first:=start;
+ prompt_input("*"); {input on-line into |buffer|}
+@y
+ print_nl("");
+ first:=start; {avoid empty lines on terminal and log file}
+ prompt_input("*"); {input on-line into |buffer|}
+@z
+
+[746] Path separator in Unix
+@x
+@d MP_area=="MPinputs:"
+@.MPinputs@>
+@d MF_area=="MFinputs:"
+@.MFinputs@>
+@d MP_font_area=="TeXfonts:"
+@.TeXfonts@>
+@y
+@d MP_area=="MPinputs/"
+@.MPinputs@>
+@d MF_area=="MFinputs/"
+@.MFinputs@>
+@d MP_font_area=="TeXfonts/"
+@.TeXfonts@>
+@z
+
+[748]
+@x
+else begin if (c=">")or(c=":") then
+@y
+else begin if c="/" then
+@z
+
+[752]
+@x
+MP_mem_default:='MPlib:plain.mem';
+@y
+MP_mem_default:='MPlib/plain.mem';
+@z
+
+[771] filename is needed for system editor
+@x
+flush_string(name); name:=cur_name; cur_name:=0
+@y
+do_nothing
+@z
+
+[1298]
+@x
+@p begin @!{|start_here|}
+@y
+@d gpc_halt == h@&a@&l@&t
+
+@p begin @!{|start_here|}
+@z
+
+[1298] load the mem file before printing the banner line
+@x
+start_of_MP: @<Initialize the output routines@>;
+@y
+start_of_MP: @<Preload the default mem file@>;
+@<Initialize the output routines@>;
+@z
+
+[1298] start editor and pass history
+@x
+final_end: ready_already:=0;
+@y
+final_end:
+if edit_file_name > 0 then start_editor; {user typed `\.{E}'}
+gpc_halt(history);
+ {pass |history| as the exit value to the system}
+@z
+
+[1299] print last end-of-line marker if needed
+@x
+if log_opened then
+ begin wlog_cr;
+ a_close(log_file); selector:=selector-2;
+ if selector=term_only then
+ begin print_nl("Transcript written on ");
+@.Transcript written...@>
+ print(log_name); print_char(".");
+ end;
+ end;
+end;
+@y
+if log_opened then
+ begin if file_offset > 0 then wlog_cr;
+ a_close(log_file); selector:=selector-2;
+ if selector=term_only then
+ begin print_nl("Transcript written on ");
+@.Transcript written...@>
+ print(log_name); print_char(".");
+ end;
+ end;
+ if term_offset > 0 then wterm_cr;
+end;
+@z
+
+[1307] return if eof
+@x
+ read(term_in,m);
+@y
+ if eof(term_in) then return;
+ {don't try to read past end of file}
+ read(term_in,m);
+@z
+
+[1307] return if eof
+@x
+ else begin read(term_in,n);
+@y
+ else begin if eof(term_in) then return;
+ {don't try to read past end of file}
+ read(term_in,n);
+@z
+
+[1308] return eof
+@x
+13: begin read(term_in,l); print_cmd_mod(n,l);
+@y
+13: begin if eof(term_in) then return;
+ {don't try to read past end of file}
+read(term_in,l); print_cmd_mod(n,l);
+@z
+
+[1309 and modules added for METAPOST-GPC]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@ Try to preload the default mem file. This is called even before
+the first line is read from the terminal, and thus turns \.{VIRMP}
+into \.{MP}, at least as seen by the user.
+
+\indent\.{INIMP} sets |mem_ident| to `\.{INIMP}' and won't load a mem
+file here.
+
+@<Preload the default mem file@> =
+if mem_ident = 0 then
+ begin pack_buffered_name(mem_default_length - mem_ext_length, 1, 0);
+ if not w_open_in(mem_file) then
+ begin
+ wterm_ln('I can''t find the mem file');
+ goto final_end
+ end;
+ if not load_mem_file then
+ begin w_close(mem_file); goto final_end
+ end;
+ w_close(mem_file);
+ end
+
+@
+@d gpc_execute == e@&x@&e@&c@&u@&t@&e
+@d gpc_write_str == w@&r@&i@&t@&e@&s@&t@&r
+
+@<Error hand...@>=
+procedure start_editor;
+var i: integer; {index into |name_of_file|}
+ j: pool_pointer; {index into |str_pool|}
+ cmd_line: gpc_string(200); {area to build the command line}
+begin i := 1; j := str_start[edit_file_name];
+while j<str_stop(edit_file_name) do
+ begin name_of_file[i] := xchr[str_pool[j]]; incr(i); incr(j)
+ end;
+while i<=file_name_size do begin name_of_file[i] := ' '; incr(i) end;
+gpc_write_str(cmd_line, 'vi +', edit_line, ' ', gpc_trim(name_of_file));
+if 0 <> gpc_execute(cmd_line) then
+ write_ln(gpc_param_str(0), ': could not start editor with: "',
+ cmd_line, '"');
+end;
+
+@
+@d gpc_t_signal_handler == t@&s@&i@&g@&n@&a@&l@&h@&a@&n@&d@&l@&e@&r
+@d gpc_install_signal_handler ==
+ i@&n@&s@&t@&a@&l@&l@&s@&i@&g@&n@&a@&l@&h@&a@&n@&d@&l@&e@&r
+@d gpc_sig_int == s@&i@&g@&i@&n@&t
+@d gpc_integer == integer {for later versions of GPC (3.4+) replace
+ \\{integer} by \\{cinteger}}
+
+@<Error hand...@>=
+procedure set_interrupt(signal: gpc_integer);
+begin interrupt := 1 @+end;
+
+@
+@<Set initial values ... @>=
+gpc_install_signal_handler(gpc_sig_int,set_interrupt,true,true,dummy_handler,
+ dummy_boolean);
+
+@ Here are two variables that are needed to install |set_interrupt|.
+@<Local variables for initialization@> =
+dummy_handler: gpc_t_signal_handler;
+dummy_boolean: boolean;
+@z
diff --git a/systems/unix/tex-gpc/mp/README b/systems/unix/tex-gpc/mp/README
new file mode 100644
index 0000000000..eab901fca6
--- /dev/null
+++ b/systems/unix/tex-gpc/mp/README
@@ -0,0 +1,186 @@
+Aug. 2008
+This is the stage directory to build and install John Hobby's
+METAPOST for GPC. METAPOST produces pictures as PostScript files
+that are to be included by dvips in its output.
+
+METAPOST's file formats and their documentation:
+------------------------------------------------
+.mp METAPOST source,
+ see "A User's manual for MetaPost", AT&T Bell Laboratories
+ Computing Science Technical Report 162, 1992
+.mpx METAPOST source, auxiliary file, needed if a .mp file contains text.
+.mem METAPOST format file (plain.mp)
+.c C source (Kernighan/Ritchie The C Programming Language)
+.ps Adobe PostScript
+.<n> Where n an integer, a PostScript file for picture n, to be included
+ by dvips.
+
+
+builtin file names:
+------------------
+MPlib/mp.pool string pool for mp, (in inimp)
+MPlib/plain.mem base file for Plain METAFONT, (in mf)
+
+METAPOST's processors:
+----------------------
+ inimp
+ plain.mp -------> MPlib/plain.mem
+
+ mp
+.mp, .mpx -------> .n
+
+ mptotex
+.mp -------> .tex
+
+ tex
+.tex -------> .dvi
+
+ dvitomp
+.dvi --------> .mpx
+
+ mpx
+.mp --------> .n (combines the last four steps)
+
+Use the shell script mpx instead of mp if your .mp file contains
+TeX programs. These extra steps are necessary to include TeX's output
+in the picture.
+
+And finally:
+ dvips
+.<n>, .dvi, .pk, .tfm ----> PostScript file/printer
+
+
+Get John Hobby's distribution
+-----------------------------
+The sources from CTAN only work with web2c but not with WEB programs,
+so I downloaded the originals from netlib:
+ ftp ftp://ftp.netlib.org/research/metapost.tar.Z
+unpack it with uncompress and tar xf:
+ uncompress metapost.tar.Z
+ tar xf metapost.tar
+This will give you a directory metapost, from which you copy at least
+mp.web, plain.mp, mptotex.c and dvitomp.web into this directory.
+
+Masterdirectories:
+------------------
+Create the master directories MPlib and MPinputs. Prepare a directory from
+where you want to run mp with the shell script mk_MP_dir.
+(Additionally to mk_TeX_dir)
+
+Building and installing:
+-----------------------
+Move a.out into your binary directory under the name at the
+right end of --->.
+
+1. mp.web, mp.ch ---> inimp
+Change mp.ch for initialization (see building inimf, initex) and tgl.
+Move mp.pool to MPlib.
+
+2. plain.mp ---> MPlib/plain.mem
+ inimp plain.mp dump
+mv plain.mem to MPlib
+
+3. mp.web, mp.ch ---> mp
+Change mp.ch for production (see building inimf, initex) and tgl.
+
+4. dvitomp.web, dvitomp.ch ---> dvitomp
+Just tgl and move a.out as dvitomp to your binary directory
+
+5. mptotex.c ---> mptotex
+cc mptotex.c, ignore the warning and move a.out to ....
+
+6. mpx ---> mpx (just move the shell script to your binary dir)
+
+Using MetaPost:
+--------------
+To include a MetaPost picture xxx.mp in your output, \input
+the TeX macro epsf.tex. At the place where you want to include your
+picture, write
+ \epsfbox{xxx.n}
+where xxx is the name of the picture and n is the argument given
+in the beginfig() command.
+
+Here are those files:
+fig.mp
+
+beginfig(1);
+a=.7in; b=0.5in;
+z0=(0,); z1=(a,0); z2=(0,b);
+z0=.5[z1,z3]=.5[z2,z4];
+draw z1..z2..z3..z4..cycle;
+drawarrow z0..z1;
+drawarrow z0..z2;
+label.top(btex $a$ etex, .5[z0, z1]);
+label.lft(btex $b$ etex, .5[z0, z2]);
+endfig;
+end
+
+fig.mp contains two Tex programs, $a$ and $b$. So you need to call mpx instead
+of mp. This creates fig.mpx:
+
+% Written by DVItoMP-GPC
+begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture;
+string _n[];
+vardef _s(expr _t,_f,_m,_x,_y)=
+ addto _p also _t infont _f scaled _m shifted (_x,_y); enddef;
+_n0="cmmi10";
+_s("a",_n0,1.00000,0.0000,0.0000);
+setbounds _p to (0,0.0000)--(5.2661,0.0000)--
+ (5.2661,4.2895)--(0,4.2895)--cycle;
+_p endgroup
+mpxbreak
+begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture;
+string _n[];
+vardef _s(expr _t,_f,_m,_x,_y)=
+ addto _p also _t infont _f scaled _m shifted (_x,_y); enddef;
+_n0="cmmi10";
+_s("b",_n0,1.00000,0.0000,0.0000);
+setbounds _p to (0,0.0000)--(4.2756,0.0000)--
+ (4.2756,6.9185)--(0,6.9185)--cycle;
+_p endgroup
+mpxbreak
+
+From fig.mp and fig.mpx METAPOST creates fig.1
+
+%!PS
+%%BoundingBox: -51 -37 51 37
+%%Creator: MetaPost
+%%CreationDate: 2008.08.25:1829
+%%Pages: 1
+%*Font: cmmi10 9.96265 9.96265 61:c
+%%EndProlog
+%%Page: 1 1
+ 0 0.5 dtransform truncate idtransform setlinewidth pop [] 0 setdash
+ 1 setlinejoin 10 setmiterlimit
+newpath 50.39978 0 moveto
+50.39978 23.04858 25.56044 36 0 36 curveto
+-25.56044 36 -50.39978 23.04858 -50.39978 0 curveto
+-50.39978 -23.04858 -25.56044 -36 0 -36 curveto
+25.56044 -36 50.39978 -23.04858 50.39978 0 curveto closepath stroke
+ 1 setlinecap
+newpath 0 0 moveto
+50.39978 0 lineto stroke
+newpath 46.70451 -1.53067 moveto
+50.39978 0 lineto
+46.70451 1.53067 lineto
+ closepath
+gsave fill grestore stroke
+ 0.5 0 dtransform exch truncate exch idtransform pop setlinewidth
+newpath 0 0 moveto
+0 36 lineto stroke
+ 0 0.5 dtransform truncate idtransform setlinewidth pop
+newpath 1.5308 32.3044 moveto
+0 36 lineto
+-1.5308 32.3044 lineto
+ closepath
+gsave fill grestore stroke
+22.56683 3 moveto
+(a) cmmi10 9.96265 fshow
+-7.2756 14.54074 moveto
+(b) cmmi10 9.96265 fshow
+showpage
+%%EOF
+
+Finally, include the figure in your TeX document by
+\input epsf
+\epsfbox{fig.1}
diff --git a/systems/unix/tex-gpc/mp/dvitomp.ch b/systems/unix/tex-gpc/mp/dvitomp.ch
new file mode 100644
index 0000000000..1d8f7db09d
--- /dev/null
+++ b/systems/unix/tex-gpc/mp/dvitomp.ch
@@ -0,0 +1,208 @@
+% This is a change file of DVItoMP-GPC, Wolfgang Helbig, Aug. 2008
+To be used with the GNU Pascal Compiler Version 2.1
+
+[0] About DVItoMP-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\tt DVItoMP}
+
+\N0\*. About \namegpc.\fi
+
+This is an adaption of John Hobby's \name, version 0.64, to Unix
+and GNU~Pascal, version 2.1.
+
+This program expects the input file (\.{.dvi}) and the output file,
+(\.{mpx}) which is a text file, on the command line. To support shell
+scripting, \namegpc\ sets the exit code to one when something was
+wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+[1] Change the banner line
+@x
+@d banner=='% Written by DVItoMP, Version 0.64'
+@y
+@d banner=='% Written by DVItoMP-GPC'
+@z
+
+[3] only stdio files in program header.
+@x
+@p program DVI_to_MP(@!dvi_file,@!mpx_file,@!output);
+@y
+@p
+@{@&$I-@} {no I/O checking}
+program DVI_to_MP(input, output);
+@z
+
+[9] check command line arguments
+@x
+history:=spotless;
+@y
+history:=spotless;
+if param_count <> 2 then
+ begin write_ln('Usage: dvitomp dvi_file mpx_file'); halt(1);
+ end;
+@z
+
+[12] Pascal's type of text_files is text
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[14] get file name from command line
+@x
+begin rewrite(mpx_file);
+@y
+begin
+rewrite(mpx_file, param_str(2));
+@z
+
+[17] use GPC extension for packing subranges.
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@z
+
+[22] declare out_file
+@x
+@!tfm_file:byte_file; {a font metric file}
+@y
+@!tfm_file:byte_file; {a font metric file}
+@!out_file:text; {the outfile}
+@z
+
+[19] open file whose name is not known at compile time
+@x
+has acted, these routines assume that no file named |s| is accessible.
+@y
+has acted, these routines assume that no file named |s| is accessible.
+@d io_ok==io_result=0
+@d clear_io_result==@+if io_result=0 then
+@z
+
+@x
+begin reset(dvi_file);
+@y
+begin reset(dvi_file, param_str(1));
+@z
+
+@x
+begin reset(tfm_file,cur_name);
+@y
+begin reset(tfm_file,trim(cur_name)); {ignore leading and trailing blanks}
+@z
+
+@x
+begin reset(vf_file,cur_name);
+open_vf_file:=(not eof(vf_file));
+@y
+begin clear_io_result; reset(vf_file,trim(cur_name));
+ open_vf_file:=io_ok;
+@z
+
+ [28] no random access
+ @x;
+ begin set_pos(dvi_file,-1); dvi_length:=cur_pos(dvi_file);
+ end;
+ @#
+ procedure move_to_byte(n:integer);
+ begin set_pos(dvi_file,n); cur_loc:=n;
+ end;
+ @y;
+ begin do_nothing;
+ end;
+ @#
+ procedure move_to_byte(n:integer);
+ begin do_nothing;
+ end;
+ @z
+
+[47]
+ @x
+ is always at least one blank space in |buffer|.
+ @^system dependencies@>
+
+ @p procedure input_ln; {inputs a line from the terminal}
+ var k:0..terminal_line_length;
+ begin update_terminal; reset(term_in);
+ if eoln(term_in) then read_ln(term_in);
+ k:=0;
+ while (k<terminal_line_length)and not eoln(term_in) do
+ begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
+ end;
+ buffer[k]:=" ";
+ end;
+ @y
+ is always at least one blank space in |buffer|.
+ This is changed here: |term_in| is standard input and is not supposed
+ to be opened. There is never an end-of-line marker at the beginning of
+ a line but always at the end of a line.
+ @^system dependencies@>
+
+ @p procedure input_ln; {inputs a line from the terminal}
+ var k:0..terminal_line_length;
+ begin update_terminal;
+ k:=0;
+ while (k<terminal_line_length)and not eoln(term_in) do
+ begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
+ end;
+ read_ln(term_in);
+ buffer[k]:=" ";
+ end;
+ @z
+
+ [50] don't rewrite output file, write the banner while initializing
+ @x
+ begin rewrite(term_out); {prepare the terminal for output}
+ write_ln(term_out,banner);
+ @y
+ begin
+ @z
+
+[61]
+@x
+@d default_directory_name=='TeXfonts:' {change this to the correct name}
+@y
+@d default_directory_name=='TeXfonts/' {change this to the correct name}
+@z
+
+[63] lowercase filename
+@x
+ if (names[k]>="a")and(names[k]<="z") then
+ cur_name[l]:=xchr[names[k]-@'40]
+ else cur_name[l]:=xchr[names[k]];
+ end;
+cur_name[l+1]:='.'; cur_name[l+2]:='V'; cur_name[l+3]:='F'
+@y
+ cur_name[l]:=xchr[names[k]]
+ end;
+cur_name[l+1]:='.'; cur_name[l+2]:='v'; cur_name[l+3]:='f'
+@z
+
+[64] lowercase filename
+@x
+cur_name[l+2]:='T'; cur_name[l+3]:='F'; cur_name[l+4]:='M'
+@y
+cur_name[l+2]:='t'; cur_name[l+3]:='f'; cur_name[l+4]:='m'
+@z
+
+[107] set exit code
+@x
+final_end:end.
+@y
+final_end:halt(history) end.
+@z
diff --git a/systems/unix/tex-gpc/mp/mk_MP_dir b/systems/unix/tex-gpc/mp/mk_MP_dir
new file mode 100644
index 0000000000..7e755a9d40
--- /dev/null
+++ b/systems/unix/tex-gpc/mp/mk_MP_dir
@@ -0,0 +1,2 @@
+ln -s ~/MPlib .
+ln -s ~/MPinputs .
diff --git a/systems/unix/tex-gpc/mp/mp.ch b/systems/unix/tex-gpc/mp/mp.ch
new file mode 100644
index 0000000000..60dec6ee13
--- /dev/null
+++ b/systems/unix/tex-gpc/mp/mp.ch
@@ -0,0 +1,651 @@
+% This is a change file of METAPOST for GPC, Wolfgang Helbig, Aug. 2008
+% See tex.ch and mf.ch from tex-gpc
+[0] to print changed sections only
+@x
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+@y
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+\input webmac-gpc
+\emergencystretch 0.5in % avoid overfull boxes
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\MP}
+
+\N0\*. \[0] About \namegpc.
+
+This is an adaption of John Hobby's \MP, version 0.641, to Unix,
+and GNU~Pascal, version 2.1.
+
+The features added include treating the command line as the first
+input line and invoking a system editor, in this case \.{vi}, to
+let the user correct the input file.
+On exit, \namegpc\ passes its `history' to the operating system.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+\fi
+@z
+
+[2] Change the banner line
+@x
+@d banner=='This is MetaPost, Version 0.641' {printed when \MP\ starts}
+@y
+@d banner=='This is MetaPost-GPC' {printed when \MP\ starts}
+@z
+
+[4] terminal output and input
+@x
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@y
+@d term_in==i@&n@&p@&u@&t
+@d term_out==o@&u@&t@&p@&u@&t
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@z
+
+[4] terminal output and input
+@x
+program MP; {all file names are defined dynamically}
+@y
+program MP(@!term_in,@!term_out);
+{all other file names are defined dynamically}
+import gpc only (gpc_execute,gpc_install_signal_handler,
+ gpc_t_signal_handler, gpc_sig_int);
+@z
+
+[4] forward reference for signal handler
+@x
+procedure initialize; {this procedure gets things started properly}
+@y
+procedure set_interrupt(signal: gpc_integer); forward; @t\2@>
+{|initialize| installs |set_interrupt| as a Unix signal handler}
+@#
+procedure initialize; {this procedure gets things started properly}
+@z
+
+Since @x, @y, and @z only define a change block when they begin a
+line, you deactivate a block by indenting it (shift right) and
+activate it by unindenting it (shift left). With vi set the
+cursor to the @x line and enter >} or <} to (un)indent a paragraph.
+
+[7] shift left to turn debugging on, right to turn it off
+@x
+@d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+@d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+@y
+@d debug== {change this to `$\\{debug}\equiv\.{@@\{}$' when not debugging}
+@d gubed== {change this to `$\\{gubed}\equiv\.{@@\}}$' when not debugging}
+@z
+
+[7] shift left to turn on statistics, shift rigth to turn off statistics
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
+
+[8] shift left to build MP and right it to build INIMP.
+ @x inimp
+ @d init== {change this to `$\\{init}\equiv\.{@@\{}$' in the production version}
+ @d tini== {change this to `$\\{tini}\equiv\.{@@\}}$' in the production version}
+ @y
+ @d init==@{
+ @d tini==@}
+ @z
+
+[9] compiler directives, turn off I/O checking.
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$I-@} {no I/O checking}
+@z
+
+[10] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+ else {default for cases not listed explicitly}
+@z
+
+[11] location of pool file
+@x
+@!pool_name='MPlib:MP.POOL ';
+ {string of length |file_name_size|; tells where the string pool appears}
+@.MPlib@>
+@!ps_tab_name='MPlib:PSFONTS.MAP ';
+ {string of length |file_name_size|; locates font name translation table}
+@y
+@!pool_name='MPlib/mp.pool ';
+ {string of length |file_name_size|; tells where the string pool appears}
+@.MPlib@>
+@!ps_tab_name='MPlib/psfonts.map ';
+ {string of length |file_name_size|; locates font name translation table}
+@z
+
+
+[22] accept tab and formfeed
+@x
+for i:=0 to @'37 do xchr[i]:=' ';
+@y
+for i:=0 to @'37 do xchr[i]:=' ';
+xchr[@'11] := chr(@'11); {accept horizontal tab}
+xchr[@'14] := chr(@'14); {accept form feed}
+@z
+
+[24] the type of text_files is text in ISO Pascal
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@!alpha_file=packed file of text_char; {files that contain textual data}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@!alpha_file=t@&e@&x@&t; {coding trick is needed since |text| is a macro}
+@z
+
+[26] dynamic io
+@x
+@d reset_OK(#)==erstat(#)=0
+@d rewrite_OK(#)==erstat(#)=0
+@y
+@d gpc_trim==t@&r@&i@&m
+@d gpc_io_result==i@&o@&r@&e@&s@&u@&l@&t
+@d reset_OK(#)==gpc_io_result=0
+@d rewrite_OK(#)==gpc_io_result=0
+@d clear_io_result==@+if gpc_io_result=0 then do_nothing
+@z
+
+[26] (reset and rewrite for each of three file types) alpha
+@x
+begin reset(f,name_of_file,'/O'); a_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); a_open_in:=reset_OK(f);
+@z
+
+[26]
+@x
+begin rewrite(f,name_of_file,'/O'); a_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+a_open_out:=rewrite_OK(f);
+@z
+
+[26] byte file
+@x
+begin reset(f,name_of_file,'/O'); b_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); b_open_in:=reset_OK(f);
+@z
+
+@x
+begin rewrite(f,name_of_file,'/O'); b_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+b_open_out:=reset_OK(f);
+@z
+
+[26] word_file
+@x
+begin reset(f,name_of_file,'/O'); w_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); w_open_in:=reset_OK(f);
+@z
+
+[26]
+@x
+begin rewrite(f,name_of_file,'/O'); w_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+w_open_out:=rewrite_OK(f);
+@z
+
+[30] eoln handling
+@x
+@p function input_ln(var @!f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var @!last_nonblank:0..buf_size; {|last| with trailing blanks removed}
+begin if bypass_eoln then if not eof(f) then get(f);
+ {input the first character of the line into |f^|}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin last_nonblank:=first;
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ if buffer[last-1]<>" " then last_nonblank:=last;
+ end;
+ last:=last_nonblank; input_ln:=true;
+ end;
+end;
+@y
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+begin
+ {ignore |bypass_eoln|. Assuming |f| being positioned at the first character}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then begin
+ read_ln(f); {complete the current line}
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ end;
+ get(f); {Advance |f| to the first character of the next line}
+ input_ln:=true;
+ end;
+end;
+@z
+
+[31] term_in and term_out are the standard pascal files
+@x
+is considered an output file the file variable is |term_out|.
+@^system dependencies@>
+
+@<Glob...@>=
+@!term_in:alpha_file; {the terminal as an input file}
+@!term_out:alpha_file; {the terminal as an output file}
+@y
+is considered an output file the file variable is |term_out|.
+The file |term_in| is declared as \\{input} and |term_out| as
+\\{output} in the program header.
+@z
+
+[32]
+@x
+@d t_open_in==reset(term_in,'TTY:','/O/I') {open the terminal for text input}
+@d t_open_out==rewrite(term_out,'TTY:','/O') {open the terminal for text output}
+@y
+@d t_open_in==do_nothing {open the terminal for text input}
+@d t_open_out==do_nothing {open the terminal for text output}
+@z
+
+[33]
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@d clear_terminal == break_in(term_in,true) {clear the terminal input buffer}
+@y
+@d update_terminal == do_nothing {empty the terminal output buffer}
+@d clear_terminal == do_nothing {clear the terminal input buffer}
+@z
+
+[35] command line
+@x
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@y
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@d gpc_string==s@&t@&r@&i@&n@&g {a string with varying length}
+@d gpc_length==l@&e@&n@&g@&t@&h
+@d gpc_param_count==p@&a@&r@&a@&m@&c@&o@&u@&n@&t
+@d gpc_param_str==p@&a@&r@&a@&m@&s@&t@&r
+
+{GPC function returning the length of a |gpc_string|}
+
+@p procedure input_command_ln; {get the command line in |buffer|}
+var argc: integer; {argument counter}
+ arg: gpc_string; {argument}
+ cc: integer; {character counter in argument}
+begin last := first; argc := 1;
+while argc <= gpc_param_count do
+ begin cc := 1; arg := gpc_param_str(argc); incr(argc);
+ while cc <= gpc_length(arg) do
+ begin
+ if last+1>=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ buffer[last] := xord[arg[cc]]; incr(last); incr(cc);
+ end;
+ if (argc <= gpc_param_count) then begin
+ buffer[last] := " "; incr(last);
+ end;
+ end;
+end;
+@z
+
+[36] command line
+@x
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in;
+loop@+begin wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in,true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ loc:=first;
+ while (loc<last)and(buffer[loc]=" ") do incr(loc);
+ if loc<last then
+ begin init_terminal:=true;
+ return; {return unless the line was all blank}
+ end;
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+exit:end;
+@y
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in; input_command_ln;
+while first=last do begin
+ wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in, true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write_ln(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ if first=last then
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+loc := first; {trim leading spaces}
+while buffer[loc]=" " do incr(loc);
+init_terminal:=true;
+exit: end;
+@z
+
+[76] print banner line on terminal
+@x
+@<Initialize the output...@>=
+update_terminal;
+@y
+@<Initialize the output...@>=
+wterm(banner);
+if mem_ident=0 then wterm_ln(' (no mem preloaded)')
+else begin print(mem_ident); print_ln;
+ end;
+update_terminal;
+@z
+
+[89] start editor
+@x
+@!use_err_help:boolean; {should the |err_help| string be shown?}
+@y
+@!use_err_help:boolean; {should the |err_help| string be shown?}
+@!edit_line: integer; {line number to be passed to the system editor}
+@!edit_file_name: str_number; {file name to be passed to the system editor}
+@z
+
+[90] initial value for edit argument
+@x
+help_ptr:=0; use_err_help:=false; err_help:=0;
+@y
+help_ptr:=0; use_err_help:=false; err_help:=0;
+edit_line:=0; edit_file_name:=0;
+@z
+
+[94] set edit_cmd
+@x
+ begin print_nl("You want to edit file ");
+@.You want to edit file x@>
+ print(input_stack[file_ptr].name_field);
+ print(" at line "); print_int(true_line);@/
+ interaction:=scroll_mode; jump_out;
+ end;
+@y
+ begin {save values to be passed to the system editor}
+ edit_file_name := input_stack[file_ptr].name_field;
+ add_str_ref(edit_file_name);
+ edit_line := true_line;
+ interaction:=scroll_mode; jump_out;
+ end;
+@z
+
+[106] interrupt is predefined and not implemented in GNU~Pascal
+@x
+@d check_interrupt==begin if interrupt<>0 then pause_for_instructions;
+@y
+@d interrupt==buginterrupt
+@f interrupt==true
+@d check_interrupt==begin if interrupt<>0 then pause_for_instructions;
+@z
+
+[171] pack subranges
+@x
+@!quarterword = min_quarterword..max_quarterword; {1/4 of a word}
+@!halfword=min_halfword..max_halfword; {1/2 of a word}
+@y
+@!quarterword = packed min_quarterword..max_quarterword; {1/4 of a word}
+@!halfword=packed min_halfword..max_halfword; {1/2 of a word}
+@z
+
+[212] time and date
+@x
+begin internal[time]:=12*60*unity; {minutes since midnight}
+internal[day]:=4*unity; {fourth day of the month}
+internal[month]:=7*unity; {seventh month of the year}
+internal[year]:=1776*unity; {Anno Domini}
+@y
+var t: time_stamp;
+begin
+get_time_stamp(t);
+internal[time]:=(t.minute + t.hour*60)*unity; {minutes since midnight}
+internal[day]:=t.d@&a@&y*unity;
+internal[month]:=t.m@&o@&n@&t@&h*unity;
+internal[year]:=t.y@&e@&a@&r*unity; {Anno Domini}
+@z
+
+[217] character class for tab and lf
+@x
+for k:=127 to 255 do char_class[k]:=invalid_class;
+@y
+for k:=127 to 255 do char_class[k]:=invalid_class;
+char_class[@'11] := space_class;
+char_class[@'14] := space_class;
+@z
+
+[640] spurious empty line on terminal
+@x
+ print_ln; first:=start;
+ prompt_input("*"); {input on-line into |buffer|}
+@y
+ print_nl("");
+ first:=start; {avoid empty lines on terminal and log file}
+ prompt_input("*"); {input on-line into |buffer|}
+@z
+
+[746] Path separator in Unix
+@x
+@d MP_area=="MPinputs:"
+@.MPinputs@>
+@d MF_area=="MFinputs:"
+@.MFinputs@>
+@d MP_font_area=="TeXfonts:"
+@.TeXfonts@>
+@y
+@d MP_area=="MPinputs/"
+@.MPinputs@>
+@d MF_area=="MFinputs/"
+@.MFinputs@>
+@d MP_font_area=="TeXfonts/"
+@.TeXfonts@>
+@z
+
+[748]
+@x
+else begin if (c=">")or(c=":") then
+@y
+else begin if c="/" then
+@z
+
+[752]
+@x
+MP_mem_default:='MPlib:plain.mem';
+@y
+MP_mem_default:='MPlib/plain.mem';
+@z
+
+[771] filename is needed for system editor
+@x
+flush_string(name); name:=cur_name; cur_name:=0
+@y
+do_nothing
+@z
+
+[1298]
+@x
+@p begin @!{|start_here|}
+@y
+@d gpc_halt == h@&a@&l@&t
+
+@p begin @!{|start_here|}
+@z
+
+[1298] load the mem file before printing the banner line
+@x
+start_of_MP: @<Initialize the output routines@>;
+@y
+start_of_MP: @<Preload the default mem file@>;
+@<Initialize the output routines@>;
+@z
+
+[1298] start editor and pass history
+@x
+final_end: ready_already:=0;
+@y
+final_end:
+if edit_file_name > 0 then start_editor; {user typed `\.{E}'}
+gpc_halt(history);
+ {pass |history| as the exit value to the system}
+@z
+
+[1299] print last end-of-line marker if needed
+@x
+if log_opened then
+ begin wlog_cr;
+ a_close(log_file); selector:=selector-2;
+ if selector=term_only then
+ begin print_nl("Transcript written on ");
+@.Transcript written...@>
+ print(log_name); print_char(".");
+ end;
+ end;
+end;
+@y
+if log_opened then
+ begin if file_offset > 0 then wlog_cr;
+ a_close(log_file); selector:=selector-2;
+ if selector=term_only then
+ begin print_nl("Transcript written on ");
+@.Transcript written...@>
+ print(log_name); print_char(".");
+ end;
+ end;
+ if term_offset > 0 then wterm_cr;
+end;
+@z
+
+[1307] return if eof
+@x
+ read(term_in,m);
+@y
+ if eof(term_in) then return;
+ {don't try to read past end of file}
+ read(term_in,m);
+@z
+
+[1307] return if eof
+@x
+ else begin read(term_in,n);
+@y
+ else begin if eof(term_in) then return;
+ {don't try to read past end of file}
+ read(term_in,n);
+@z
+
+[1308] return eof
+@x
+13: begin read(term_in,l); print_cmd_mod(n,l);
+@y
+13: begin if eof(term_in) then return;
+ {don't try to read past end of file}
+read(term_in,l); print_cmd_mod(n,l);
+@z
+
+[1309 and modules added for METAPOST-GPC]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@ Try to preload the default mem file. This is called even before
+the first line is read from the terminal, and thus turns \.{VIRMP}
+into \.{MP}, at least as seen by the user.
+
+\indent\.{INIMP} sets |mem_ident| to `\.{INIMP}' and won't load a mem
+file here.
+
+@<Preload the default mem file@> =
+if mem_ident = 0 then
+ begin pack_buffered_name(mem_default_length - mem_ext_length, 1, 0);
+ if not w_open_in(mem_file) then
+ begin
+ wterm_ln('I can''t find the mem file');
+ goto final_end
+ end;
+ if not load_mem_file then
+ begin w_close(mem_file); goto final_end
+ end;
+ w_close(mem_file);
+ end
+
+@
+@d gpc_execute == e@&x@&e@&c@&u@&t@&e
+@d gpc_write_str == w@&r@&i@&t@&e@&s@&t@&r
+
+@<Error hand...@>=
+procedure start_editor;
+var i: integer; {index into |name_of_file|}
+ j: pool_pointer; {index into |str_pool|}
+ cmd_line: gpc_string(200); {area to build the command line}
+begin i := 1; j := str_start[edit_file_name];
+while j<str_stop(edit_file_name) do
+ begin name_of_file[i] := xchr[str_pool[j]]; incr(i); incr(j)
+ end;
+while i<=file_name_size do begin name_of_file[i] := ' '; incr(i) end;
+gpc_write_str(cmd_line, 'vi +', edit_line, ' ', gpc_trim(name_of_file));
+if 0 <> gpc_execute(cmd_line) then
+ write_ln(gpc_param_str(0), ': could not start editor with: "',
+ cmd_line, '"');
+end;
+
+@
+@d gpc_t_signal_handler == t@&s@&i@&g@&n@&a@&l@&h@&a@&n@&d@&l@&e@&r
+@d gpc_install_signal_handler ==
+ i@&n@&s@&t@&a@&l@&l@&s@&i@&g@&n@&a@&l@&h@&a@&n@&d@&l@&e@&r
+@d gpc_sig_int == s@&i@&g@&i@&n@&t
+@d gpc_integer == integer {for later versions of GPC (3.4+) replace
+ \\{integer} by \\{cinteger}}
+
+@<Error hand...@>=
+procedure set_interrupt(signal: gpc_integer);
+begin interrupt := 1 @+end;
+
+@
+@<Set initial values ... @>=
+gpc_install_signal_handler(gpc_sig_int,set_interrupt,true,true,dummy_handler,
+ dummy_boolean);
+
+@ Here are two variables that are needed to install |set_interrupt|.
+@<Local variables for initialization@> =
+dummy_handler: gpc_t_signal_handler;
+dummy_boolean: boolean;
+@z
diff --git a/systems/unix/tex-gpc/mp/mptotex.c b/systems/unix/tex-gpc/mp/mptotex.c
new file mode 100644
index 0000000000..9defdf2f9e
--- /dev/null
+++ b/systems/unix/tex-gpc/mp/mptotex.c
@@ -0,0 +1,224 @@
+/****************************************************************
+Copyright 1990 - 1995 by AT&T Bell Laboratories.
+
+Permission to use, copy, modify, and distribute this software
+and its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the names of AT&T Bell Laboratories or
+any of its entities not be used in advertising or publicity
+pertaining to distribution of the software without specific,
+written prior permission.
+
+AT&T disclaims all warranties with regard to this software,
+including all implied warranties of merchantability and fitness.
+In no event shall AT&T be liable for any special, indirect or
+consequential damages or any damages whatsoever resulting from
+loss of use, data or profits, whether in an action of contract,
+negligence or other tortious action, arising out of or in
+connection with the use or performance of this software.
+****************************************************************/
+
+/* This program transforms a MetaPost input file into a TeX or LaTeX input
+ * file by stripping out btex...etex and verbatimtex...etex sections.
+ * Leading and trailing spaces and tabs are removed from the extracted
+ * material and it is surrounded by the preceeding and following strings
+ * defined immediately below. The input file should be given as argument 1
+ * and the resulting TeX file is written on standard output.
+ */
+
+#include <stdio.h>
+#define bufsize 1000
+
+char* predoc = "";
+char* postdoc = "\\end{document}\n";
+char* pretex1 = "\\shipout\\hbox{\\smash{\\hbox{\\hbox{%% line %d %s\n";
+char* pretex = "\\shipout\\hbox{\\smash{\\hbox{\\hbox{%% line %d %s\n";
+char* posttex = "}\\vrule width1sp}}}\n";
+char* preverb = "%% line %d %s\n";
+char* postverb = "%\n";
+
+char *mpname;
+FILE *mpfile;
+int lnno = 0; /* current line number */
+int texcnt = 0; /* btex..etex blocks so far */
+char buf[bufsize]; /* the input line */
+char *bb, *tt, *aa; /* start of before, token, and after strings */
+
+void usage(nam)
+ char *nam;
+{
+ fprintf(stderr, "Usage: %s <mp-file>\n", nam);
+ exit(1);
+}
+
+void err(msg)
+ char *msg;
+{
+ fprintf(stderr, "! Error in %s at line %d: %s\n", mpname, lnno, msg);
+ exit(1);
+}
+
+char *getline() /* returns NULL on EOF or error, otherwise buf */
+{
+ char *s;
+
+ if (fgets(buf, bufsize, mpfile)==NULL)
+ return NULL;
+ lnno++;
+ for (s= &buf[1]; *s!='\0'; s++) /* do nothing */;
+ if (s==&buf[bufsize-1] && s[-1]!='\n') err("Line is too long");
+ s[-1] = '\0';
+ return buf;
+}
+
+
+/* Return nonzero if a prefix of string s matches the null-terminated string t
+ * and the next character is not a letter of an underscore.
+ */
+int match_str(s, t)
+ char *s, *t;
+{
+ while (*t!=0) {
+ if (*s!=*t) return 0;
+ s++; t++;
+ }
+ switch (*s) {
+ case 'a': case 'c': case 'd': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
+ case 'o': case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'w': case 'x': case 'y': case 'z': case '_':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z': case 'b': case 'e': case 'v':
+ return 0;
+ default:
+ return 1;
+ }
+}
+
+
+/* This function tries to express s as the concatination of three strings
+ * b, t, a, with the global pointers bb, tt, and aa set to the start of the
+ * corresponding strings. String t is either a quote mark, a percent sign,
+ * or an alphabetic token "btex", "etex", or "verbatimtex". (An alphabetic
+ * token is a maximal sequence of letters and underscores.) If there are
+ * several possible substrings t, we choose the leftmost one. If there is
+ * no such t, we set b=s and return 0.
+ */
+int getbta(s)
+ char *s;
+{
+ int ok=1; /* zero if last character was a-z, A-Z, or _ */
+
+ bb = s;
+ for (tt=bb; *tt!=0; tt++)
+ switch (*tt) {
+ case '"': case '%':
+ aa = tt+1;
+ return 1;
+ case 'b':
+ if (ok && match_str(tt,"btex")) {
+ aa = tt+4;
+ return 1;
+ } else ok=0;
+ break;
+ case 'e':
+ if (ok && match_str(tt,"etex")) {
+ aa = tt+4;
+ return 1;
+ } else ok=0;
+ break;
+ case 'v':
+ if (ok && match_str(tt,"verbatimtex")) {
+ aa = tt+11;
+ return 1;
+ } else ok=0;
+ break;
+ case 'a': case 'c': case 'd': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
+ case 'o': case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'w': case 'x': case 'y': case 'z': case '_':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ ok = 0;
+ break;
+ default:
+ ok = 1;
+ }
+ aa = tt;
+ return 0;
+}
+
+
+void copytex()
+{
+ char *s; /* where a string to print stops */
+ char c;
+ int ignore = 1;
+
+ do { if (*aa==0)
+ if ((aa=getline())==NULL)
+ err("btex section does not end");
+ else if (--ignore<0) printf("\n");
+ if (getbta(aa) && *tt=='e') {
+ s = tt-1;
+ while (s>=bb && (*s==' ' || *s=='\t'))
+ s--;
+ s++;
+ } else {
+ if (*tt=='b') err("btex in TeX mode");
+ if (*tt=='v') err("verbatimtex in TeX mode");
+ s = aa;
+ }
+ c = *s;
+ *s = 0;
+ printf("%s", bb);
+ *s = c;
+ } while (*tt!='e');
+}
+
+
+void do_line()
+{
+ aa = buf;
+ while (getbta(aa))
+ if (*tt=='%') break;
+ else if (*tt=='"') {
+ do if (!getbta(aa)) err("string does not end");
+ while (*tt!='"');
+ } else if (*tt=='b') {
+ if (texcnt++ ==0) printf(pretex1,lnno,mpname);
+ else printf(pretex,lnno,mpname);
+ while (*aa==' ' || *aa=='\t') aa++;
+ copytex();
+ printf("%s",posttex);
+ } else if (*tt=='v') {
+ printf(preverb,lnno,mpname);
+ while (*aa==' ' || *aa=='\t') aa++;
+ copytex();
+ printf("%s",postverb);
+ } else err("unmatched etex");
+}
+
+
+
+void main(argc, argv)
+ char *argv[];
+{
+ if (argc!=2) usage(argv[0]);
+ mpname = argv[1];
+ mpfile = fopen(mpname, "r");
+ if (mpname==NULL) usage(argv[0]);
+ printf("%s",predoc);
+ while (getline()!=NULL)
+ do_line();
+ printf("%s",postdoc);
+ exit(0);
+}
diff --git a/systems/unix/tex-gpc/mp/mpx b/systems/unix/tex-gpc/mp/mpx
new file mode 100644
index 0000000000..866bad0600
--- /dev/null
+++ b/systems/unix/tex-gpc/mp/mpx
@@ -0,0 +1,8 @@
+# process .mp files that include TeX programs.
+case $# in
+1) f=`basename $1 .mp`;;
+*) echo Usage: $0 mp-file; exit 1;;
+esac
+mptotex $f.mp \
+| tex && dvitomp texput.dvi $f.mpx && mp $f.mp \
+|| echo $0 failed!; exit 1
diff --git a/systems/unix/tex-gpc/pktype.ch b/systems/unix/tex-gpc/pktype.ch
new file mode 100644
index 0000000000..52638e93aa
--- /dev/null
+++ b/systems/unix/tex-gpc/pktype.ch
@@ -0,0 +1,151 @@
+% This is a change file of PKType for GPC, Wolfgang Helbig, Apr. 2008
+To be used with the GNU Pascal Compiler Version 2.1
+
+[0] About PKtype-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+% \let\maybe=\iffalse % uncomment to print changed modules only.
+
+\def\name{\tt PKtype}
+
+\N0\*. About \namegpc.\fi
+
+This is an adaption of Donald~E. Knuth's \.{PKtype}, version 2.3
+from April 2000, to Unix. It is based on GNU~Pascal, version 2.1.
+
+This program expects the input file (\.{.pk}) and the output file,
+which is a text file, on the command line. To support shell
+scripting, \namegpc\ sets the exit code to one when something was
+wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+
+[1] Change the banner line
+@x
+@d banner=='This is PKtype, Version 2.3' {printed when the program starts}
+@y
+@d banner=='This is PKtype-GPC'
+ {printed when the program starts}
+@z
+
+[2] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[8] set history
+@x
+@d abort(#)==begin print_ln(' ',#); t_print_ln(' ',#); jump_out; end
+@y
+@d abort(#)==begin print_ln(' ',#); t_print_ln(' ',#); history := 1; jump_out;
+ end
+@z
+
+[9] the type of text_files is text in ISO Pascal
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[30] use GPC extension for packing subranges.
+@x
+@!eight_bits=0..255; {packed file byte}
+@y
+@!eight_bits=packed 0..255; {unsigned one-byte quantity}
+@z
+
+[32]
+@x
+begin reset(pk_file,pk_name);
+@y
+begin reset(pk_file,trim(pk_name));
+@z
+
+@x
+begin rewrite(typ_file,typ_name);
+@y
+begin rewrite(typ_file,trim(typ_name));
+@z
+
+[54] command line
+@x
+@ @p procedure dialog ;
+var i : integer ; {index variable}
+buffer : packed array [1..name_length] of char; {input buffer}
+begin
+ for i := 1 to name_length do begin
+ typ_name[i] := ' ' ;
+ pk_name[i] := ' ' ;
+ end;
+ print('Input file name: ') ;
+ flush_buffer ;
+ get_line(pk_name) ;
+ print('Output file name: ') ;
+ flush_buffer ;
+ get_line(typ_name) ;
+end ;
+@y
+@ Here we get the file names from the command line
+
+@d gpc_length == length
+@d gpc_param_str == paramstr
+@d gpc_param_count == param_count
+
+@p procedure dialog ;
+var i : integer ; {index variable}
+buffer : packed array [1..name_length] of char; {\2 input buffer}
+begin
+ if gpc_param_count <> 2 then
+ abort('! Usage: pktype pk_file text_file');
+ i := 1;
+ while (i <= name_length) and (i <= gpc_length(gpc_param_str(1))) do
+ begin pk_name[i] := gpc_param_str(1)[i]; incr(i);
+ end;
+ while i <= name_length do
+ begin pk_name[i] := ' '; incr(i);
+ end;
+ i := 1;
+ while (i <= name_length) and (i <= gpc_length(gpc_param_str(2))) do
+ begin typ_name[i] := gpc_param_str(2)[i]; incr(i);
+ end;
+ while i <= name_length do
+ begin typ_name[i] := ' '; incr(i);
+ end;
+end ;
+@z
+
+[55] set exit code
+@x
+final_end :
+@y
+final_end : halt(history);
+@z
+
+[56 ff]
+@x
+Any additional routines should be inserted here.
+@^system dependencies@>
+@y
+Any additional routines should be inserted here.
+@^system dependencies@>
+
+@<Globals...@>=
+history : integer;
+
+@
+@<Set init...@>=
+history := 0;
+@z
diff --git a/systems/unix/tex-gpc/pltotf.ch b/systems/unix/tex-gpc/pltotf.ch
new file mode 100644
index 0000000000..f85f6dac81
--- /dev/null
+++ b/systems/unix/tex-gpc/pltotf.ch
@@ -0,0 +1,63 @@
+% This is a change file of PLtoTF for GPC, Wolfgang Helbig, Nov. 2007
+
+[0] About PLtoTF-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+\let\maybe=\iffalse % print changed modules only.
+
+\def\name{\tt PLtoTF}
+
+\N0\*. About \namegpc.\fi
+
+This is an adaption of Donald~E. Knuth's \.{PLtoTF}, version 3.6
+from March 1995, to Unix. It is based on GNU~Pascal, version 2.1.
+
+This program expects an input file (\.{.tfm}) and an output file
+(\.{.pl}), which is a text file, on the command line. \namegpc.
+stops with a nonzero exit code, if the number of command line
+arguments is not two or if the files cannot be opened.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+
+[1]
+@x
+@d banner=='This is PLtoTF, Version 3.6' {printed when the program starts}
+@y
+@d banner=='This is PLtoTF-GPC'
+{printed when the program starts}
+@z
+
+[6] use command line
+@x
+reset(pl_file);
+@y
+if param_count <> 2 then begin
+ write_ln('Usage: pltotf pl-file tfm-file');
+ halt(1);
+ end;
+reset(pl_file, param_str(1));
+@z
+
+[15]
+@x
+@!tfm_file:packed file of 0..255;
+@y
+@!tfm_file:packed file of packed 0..255;
+@z
+
+[16] use command line
+@x
+rewrite(tfm_file);
+@y
+rewrite(tfm_file, param_str(2));
+@z
diff --git a/systems/unix/tex-gpc/pooltype.ch b/systems/unix/tex-gpc/pooltype.ch
new file mode 100644
index 0000000000..9c3ff1412b
--- /dev/null
+++ b/systems/unix/tex-gpc/pooltype.ch
@@ -0,0 +1,83 @@
+@x
+% Here is TeX material that gets inserted after \input webmac
+@y
+% Here is TeX material that gets inserted after \input webmac
+\input webmac-gpc
+
+\let\maybe=\iffalse % print changed modules only.
+
+\def\name{\tt POOLtype}
+
+\N0\*. About \namegpc.\fi
+
+This is an adaption of Donald~E. Knuth's \.{POOLtype}, version 3
+from September 1989, to Unix. It is based on GNU~Pascal, version 2.1.
+
+This program expects the input file (\.{.pool}) file,
+which is a pool file, on the command line. To support shell
+scripting, \namegpc\ sets the exit code to one when something was
+wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+
+@x
+ \centerline{(Version 3, September 1989)}
+@y
+ \centerline{(GPC-Version, October 2009)}
+@z
+
+[2]
+@x
+@p program POOLtype(@!pool_file,@!output);
+@y
+@p program POOLtype(@!output);
+@z
+
+[18]
+@x
+@!pool_file:packed file of text_char;
+ {the string-pool file output by \.{TANGLE}}
+@y
+@z
+
+[19]
+@x
+reset(pool_file); xsum:=false;
+@y
+xsum:=false;
+@z
+
+[20]
+@x
+ write_ln('"'); incr(s);
+ end
+@y
+ write_ln('"'); incr(s);
+ if not eoln(pool_file) then
+ abort('! That POOL line was too long');
+ end
+@z
+
+[21]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@<Glob...@>=
+@!pool_file: text;
+
+@ @<Set init...@>=
+if param_count <> 1 then
+ begin abort('Usage: pooltype pool_file')
+ end;
+reset(pool_file, param_str(1));
+@z
diff --git a/systems/unix/tex-gpc/shell/itgl b/systems/unix/tex-gpc/shell/itgl
new file mode 100755
index 0000000000..d603b5dca3
--- /dev/null
+++ b/systems/unix/tex-gpc/shell/itgl
@@ -0,0 +1,6 @@
+case $# in
+1) b=`basename $1 .web`; tangle $1 /dev/null ini$b.p $b.pool;;
+2) b=`basename $2 .ch`; tangle $1 $2 ini$b.p $b.pool;;
+*) echo Usage: `basename $0` web-file [ ch-file ] ; exit 1
+esac && \
+gpc --automake -Wno-warnings ini$b.p
diff --git a/systems/unix/tex-gpc/shell/mk_MF_dir b/systems/unix/tex-gpc/shell/mk_MF_dir
new file mode 100644
index 0000000000..f91e0156c8
--- /dev/null
+++ b/systems/unix/tex-gpc/shell/mk_MF_dir
@@ -0,0 +1,3 @@
+# Prepare the current directory to run METAFONT, mkfont and mkpkfont
+ln -s ~/MFbases .
+ln -s ~/MFinputs .
diff --git a/systems/unix/tex-gpc/shell/mk_TeX_dir b/systems/unix/tex-gpc/shell/mk_TeX_dir
new file mode 100644
index 0000000000..bf6dcaa8c1
--- /dev/null
+++ b/systems/unix/tex-gpc/shell/mk_TeX_dir
@@ -0,0 +1,6 @@
+# Prepare the current directory to run TeX, dvips and xdvi
+ln -s ~/TeXinputs .
+ln -s ~/TeXformats .
+ln -s ~/TeXfonts .
+ln -s ~/PKfonts .
+ln -s ~/DVIPSconf .
diff --git a/systems/unix/tex-gpc/shell/mkfont b/systems/unix/tex-gpc/shell/mkfont
new file mode 100644
index 0000000000..06d8dd3506
--- /dev/null
+++ b/systems/unix/tex-gpc/shell/mkfont
@@ -0,0 +1,15 @@
+# Install .tfm and . pk files from .mf files for TeX-GPC
+f=`basename $1 .mf`
+case $# in
+1) mag=1;;
+2) mag=$2;;
+*) echo Usage: $0 mf-file [ magnification ]; exit 1
+esac
+echo $0: $f magnification=$mag
+rm -f $f.*gf
+mf "\\mode=localfont; mag=$mag; batchmode; input $1"\
+&& gftopk $f.*gf `echo $f.*gf | sed 's/gf$/pk/'` \
+&& mv $f.*pk PKfonts/ \
+&& mv $f.tfm TeXfonts/ \
+&& rm $f.log && rm $f.*gf \
+|| echo $0 $1 $mag >>trouble
diff --git a/systems/unix/tex-gpc/shell/mkpkfont b/systems/unix/tex-gpc/shell/mkpkfont
new file mode 100644
index 0000000000..4eb23f8ac3
--- /dev/null
+++ b/systems/unix/tex-gpc/shell/mkpkfont
@@ -0,0 +1,19 @@
+# install pk-file from mf-file for TeX-GPC
+#
+# xdvi expects the path name of the generated .pk file in the first
+# line of stdout, so redirect mf's stdout to stderr.
+f=`basename $1 .mf`
+case $# in
+1) mag=1;;
+2) mag=$2;;
+*) echo Usage: $0 mf-file [ magnification ]; exit 1
+esac
+rm -f $f.*gf
+rm -f $f.*pk
+mf '\mode=localfont; mag='$mag'; batchmode; input' $1 </dev/null >&2 \
+&& pkname=`echo $f.*gf | sed 's/gf$/pk/'` \
+&& gftopk $f.*gf $pkname >&2 \
+&& mv $f.*pk PKfonts/ \
+&& echo PKfonts/$pkname \
+&& rm $f.tfm && rm $f.log && rm $f.*gf \
+|| (echo $0 $1 $mag >>trouble; exit 1)
diff --git a/systems/unix/tex-gpc/shell/tgl b/systems/unix/tex-gpc/shell/tgl
new file mode 100644
index 0000000000..9e21a23fd6
--- /dev/null
+++ b/systems/unix/tex-gpc/shell/tgl
@@ -0,0 +1,6 @@
+case $# in
+1) b=`basename $1 .web`; tangle $1 /dev/null $b.p /dev/null;;
+2) b=`basename $2 .ch`; tangle $1 $2 $b.p /dev/null;;
+*) echo Usage: `basename $0` web-file [ ch-file ] ; exit 1
+esac && \
+gpc -Wno-warnings $b.p
diff --git a/systems/unix/tex-gpc/shell/wve b/systems/unix/tex-gpc/shell/wve
new file mode 100644
index 0000000000..a445975cb6
--- /dev/null
+++ b/systems/unix/tex-gpc/shell/wve
@@ -0,0 +1,6 @@
+case $# in
+1) b=`basename $1 .web`; weave $1 /dev/null $b.tex;;
+2) b=`basename $1 .web`; weave $1 $2 $b.tex;;
+*) echo Usage: `basename $0` web-file [ ch-file ]; exit 1
+esac && \
+tex $b
diff --git a/systems/unix/tex-gpc/tangle.ch b/systems/unix/tex-gpc/tangle.ch
new file mode 100644
index 0000000000..0a459f9157
--- /dev/null
+++ b/systems/unix/tex-gpc/tangle.ch
@@ -0,0 +1,167 @@
+% This is a change file for TANGLE-GPC, Wolfgang Helbig, Nov. 2007
+% Apr. 2008 take file names from command line
+% Jul. 2008 pass the exit code
+
+[0] About TANGLE-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+\def\name{{\tt TANGLE}}
+
+\let\maybe=\iffalse % print changed modules only.
+
+\N0\*. About \namegpc.\fi
+This is an adaption of Donald~E. Knuth's \.{TANGLE}, version 4.5
+from December 2002, to Unix. \namegpc\ is based on GNU~Pascal, version
+2.1.
+
+This program expects four file names on the command line: Two input
+files, the web and change file, followed by two output files, the
+Pascal and string pool file. If you call \namegpc\ with the wrong number
+of command line arguments, it will tell you and exit.
+
+To support shell scripting, this version sets the exit code to its
+`\\{history}'---zero means ok, one means a warning was issued, two
+an error occurred and three means \.{TANGLE} ended prematurely.
+
+\hint
+
+Comments and questions are welcome!
+\bigskip
+\address
+@z
+
+[1] Change the banner line
+@x
+@d banner=='This is TANGLE, Version 4.5'
+@y
+@d banner=='This is TANGLE-GPC'
+@z
+
+[2] terminal output and input
+@x
+program TANGLE(@!web_file,@!change_file,@!Pascal_file,@!pool);
+@y
+program TANGLE(@!input,@!output);
+@z
+
+ [3] turn debugging on
+ @x
+ @d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+ @d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+ @y
+ @d debug==
+ @d gubed==
+ @z
+
+[3] turn stats on
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$'
+ when gathering usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$'
+ when gathering usage statistics}
+@y
+@d stat==
+@d tats==
+@z
+
+[4] compiler directives
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@z
+
+[7] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[12] the type of text_files is text in ISO Pascal
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[20] terminal output
+@x
+@d print(#)==write(term_out,#) {`|print|' means write on the terminal}
+@y
+@d term_out == output
+@d term_in == input
+@d print(#)==write(term_out,#) {`|print|' means write on the terminal}
+@z
+
+[20] terminal output, implicitely defined in ISO Pasal
+@x
+@<Globals...@>=
+@!term_out:text_file; {the terminal as an output file}
+@y
+@z
+
+[21] terminal output, output is rewritten implicitely in ISO Pascal
+@x
+@<Set init...@>=
+rewrite(term_out,'TTY:'); {send |term_out| output to the terminal}
+@y
+@z
+
+[22] terminal output, don't need update in ISO Pascal
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@y
+@d update_terminal == do_nothing
+@z
+
+[24] get file names from command line arguments
+@x
+begin reset(web_file); reset(change_file);
+@y
+begin
+reset(web_file, param_str(1)); reset(change_file, param_str(2));
+@z
+
+[26] get file names from command line arguments
+@x
+rewrite(Pascal_file); rewrite(pool);
+@y
+if param_count <> 4 then begin
+ fatal_error('Usage: tangle web_file change_file pascal_file pool_file');
+ end;
+rewrite(Pascal_file, param_str(3)); rewrite(pool, param_str(4));
+@z
+
+[38] increase token capacity to tangle mf.
+@x
+@d zz=3 {we multiply the token capacity by approximately this amount}
+@y
+@d zz=4 {we need 4 not 3 to tangle mf}
+@z
+
+[179]
+@x
+@!term_in:text_file; {the user's terminal as an input file}
+@y
+@z
+
+[180] terminal input, implicitely done by Pascal
+@x
+reset(term_in,'TTY:','/I'); {open |term_in| as the terminal, don't do a |get|}
+@y
+@z
+
+[187] put eol after last terminal out line
+@x
+fatal_message: print_nl('(That was a fatal error, my friend.)');
+end {there are no other cases}
+@y
+fatal_message: print_nl('(That was a fatal error, my friend.)');
+end; {there are no other cases}
+new_line;
+halt(history) {pass the history as exit code to the operating system}
+@z
diff --git a/systems/unix/tex-gpc/tangle.p b/systems/unix/tex-gpc/tangle.p
new file mode 100644
index 0000000000..7baeffe940
--- /dev/null
+++ b/systems/unix/tex-gpc/tangle.p
@@ -0,0 +1,792 @@
+{2:}{4:}{:4}PROGRAM TANGLE(INPUT,OUTPUT);LABEL 9999;
+CONST{8:}BUFSIZE=100;MAXBYTES=45000;MAXTOKS=50000;MAXNAMES=4000;
+MAXTEXTS=2000;HASHSIZE=353;LONGESTNAME=400;LINELENGTH=72;OUTBUFSIZE=144;
+STACKSIZE=50;MAXIDLENGTH=12;UNAMBIGLENGT=7;
+{:8}TYPE{11:}ASCIICODE=0..255;{:11}{12:}TEXTFILE=TEXT;
+{:12}{37:}EIGHTBITS=0..255;SIXTEENBITS=0..65535;
+{:37}{39:}NAMEPOINTER=0..MAXNAMES;{:39}{43:}TEXTPOINTER=0..MAXTEXTS;
+{:43}{78:}OUTPUTSTATE=RECORD ENDFIELD:SIXTEENBITS;BYTEFIELD:SIXTEENBITS;
+NAMEFIELD:NAMEPOINTER;REPLFIELD:TEXTPOINTER;MODFIELD:0..12287;END;
+{:78}VAR{9:}HISTORY:0..3;{:9}{13:}XORD:ARRAY[CHAR]OF ASCIICODE;
+XCHR:ARRAY[ASCIICODE]OF CHAR;{:13}{23:}WEBFILE:TEXTFILE;
+CHANGEFILE:TEXTFILE;{:23}{25:}PASCALFILE:TEXTFILE;POOL:TEXTFILE;
+{:25}{27:}BUFFER:ARRAY[0..BUFSIZE]OF ASCIICODE;
+{:27}{29:}PHASEONE:BOOLEAN;
+{:29}{38:}BYTEMEM:PACKED ARRAY[0..1,0..MAXBYTES]OF ASCIICODE;
+TOKMEM:PACKED ARRAY[0..3,0..MAXTOKS]OF EIGHTBITS;
+BYTESTART:ARRAY[0..MAXNAMES]OF SIXTEENBITS;
+TOKSTART:ARRAY[0..MAXTEXTS]OF SIXTEENBITS;
+LINK:ARRAY[0..MAXNAMES]OF SIXTEENBITS;
+ILK:ARRAY[0..MAXNAMES]OF SIXTEENBITS;
+EQUIV:ARRAY[0..MAXNAMES]OF SIXTEENBITS;
+TEXTLINK:ARRAY[0..MAXTEXTS]OF SIXTEENBITS;{:38}{40:}NAMEPTR:NAMEPOINTER;
+STRINGPTR:NAMEPOINTER;BYTEPTR:ARRAY[0..1]OF 0..MAXBYTES;
+POOLCHECKSUM:INTEGER;{:40}{44:}TEXTPTR:TEXTPOINTER;
+TOKPTR:ARRAY[0..3]OF 0..MAXTOKS;Z:0..3;
+MAXTOKPTR:ARRAY[0..3]OF 0..MAXTOKS;{:44}{50:}IDFIRST:0..BUFSIZE;
+IDLOC:0..BUFSIZE;DOUBLECHARS:0..BUFSIZE;
+HASH,CHOPHASH:ARRAY[0..HASHSIZE]OF SIXTEENBITS;
+CHOPPEDID:ARRAY[0..UNAMBIGLENGT]OF ASCIICODE;
+{:50}{65:}MODTEXT:ARRAY[0..LONGESTNAME]OF ASCIICODE;
+{:65}{70:}LASTUNNAMED:TEXTPOINTER;{:70}{79:}CURSTATE:OUTPUTSTATE;
+STACK:ARRAY[1..STACKSIZE]OF OUTPUTSTATE;STACKPTR:0..STACKSIZE;
+{:79}{80:}ZO:0..3;{:80}{82:}BRACELEVEL:EIGHTBITS;
+{:82}{86:}CURVAL:INTEGER;
+{:86}{94:}OUTBUF:ARRAY[0..OUTBUFSIZE]OF ASCIICODE;OUTPTR:0..OUTBUFSIZE;
+BREAKPTR:0..OUTBUFSIZE;SEMIPTR:0..OUTBUFSIZE;
+{:94}{95:}OUTSTATE:EIGHTBITS;OUTVAL,OUTAPP:INTEGER;OUTSIGN:ASCIICODE;
+LASTSIGN:-1..+1;{:95}{100:}OUTCONTRIB:ARRAY[1..LINELENGTH]OF ASCIICODE;
+{:100}{124:}II:INTEGER;LINE:INTEGER;OTHERLINE:INTEGER;TEMPLINE:INTEGER;
+LIMIT:0..BUFSIZE;LOC:0..BUFSIZE;INPUTHASENDE:BOOLEAN;CHANGING:BOOLEAN;
+{:124}{126:}CHANGEBUFFER:ARRAY[0..BUFSIZE]OF ASCIICODE;
+CHANGELIMIT:0..BUFSIZE;{:126}{143:}CURMODULE:NAMEPOINTER;
+SCANNINGHEX:BOOLEAN;{:143}{156:}NEXTCONTROL:EIGHTBITS;
+{:156}{164:}CURREPLTEXT:TEXTPOINTER;{:164}{171:}MODULECOUNT:0..12287;
+{:171}{179:}{TROUBLESHOOT:BOOLEAN;DDT:INTEGER;DD:INTEGER;
+DEBUGCYCLE:INTEGER;DEBUGSKIPPED:INTEGER;}{:179}{185:}WO:0..1;
+{:185}{30:}{PROCEDURE DEBUGHELP;FORWARD;}{:30}{31:}PROCEDURE ERROR;
+VAR J:0..OUTBUFSIZE;K,L:0..BUFSIZE;
+BEGIN IF PHASEONE THEN{32:}BEGIN IF CHANGING THEN WRITE(OUTPUT,
+'. (change file ')ELSE WRITE(OUTPUT,'. (');
+WRITELN(OUTPUT,'l.',LINE:1,')');IF LOC>=LIMIT THEN L:=LIMIT ELSE L:=LOC;
+FOR K:=1 TO L DO IF BUFFER[K-1]=9 THEN WRITE(OUTPUT,' ')ELSE WRITE(
+OUTPUT,XCHR[BUFFER[K-1]]);WRITELN(OUTPUT);
+FOR K:=1 TO L DO WRITE(OUTPUT,' ');
+FOR K:=L+1 TO LIMIT DO WRITE(OUTPUT,XCHR[BUFFER[K-1]]);
+WRITE(OUTPUT,' ');
+END{:32}ELSE{33:}BEGIN WRITELN(OUTPUT,'. (l.',LINE:1,')');
+FOR J:=1 TO OUTPTR DO WRITE(OUTPUT,XCHR[OUTBUF[J-1]]);
+WRITE(OUTPUT,'... ');END{:33};;HISTORY:=2;{DEBUGSKIPPED:=DEBUGCYCLE;
+DEBUGHELP;}END;{:31}{34:}PROCEDURE JUMPOUT;BEGIN GOTO 9999;END;
+{:34}PROCEDURE INITIALIZE;VAR{16:}I:0..255;{:16}{41:}WI:0..1;
+{:41}{45:}ZI:0..3;{:45}{51:}H:0..HASHSIZE;{:51}BEGIN{10:}HISTORY:=0;
+{:10}{14:}XCHR[32]:=' ';XCHR[33]:='!';XCHR[34]:='"';XCHR[35]:='#';
+XCHR[36]:='$';XCHR[37]:='%';XCHR[38]:='&';XCHR[39]:='''';XCHR[40]:='(';
+XCHR[41]:=')';XCHR[42]:='*';XCHR[43]:='+';XCHR[44]:=',';XCHR[45]:='-';
+XCHR[46]:='.';XCHR[47]:='/';XCHR[48]:='0';XCHR[49]:='1';XCHR[50]:='2';
+XCHR[51]:='3';XCHR[52]:='4';XCHR[53]:='5';XCHR[54]:='6';XCHR[55]:='7';
+XCHR[56]:='8';XCHR[57]:='9';XCHR[58]:=':';XCHR[59]:=';';XCHR[60]:='<';
+XCHR[61]:='=';XCHR[62]:='>';XCHR[63]:='?';XCHR[64]:='@';XCHR[65]:='A';
+XCHR[66]:='B';XCHR[67]:='C';XCHR[68]:='D';XCHR[69]:='E';XCHR[70]:='F';
+XCHR[71]:='G';XCHR[72]:='H';XCHR[73]:='I';XCHR[74]:='J';XCHR[75]:='K';
+XCHR[76]:='L';XCHR[77]:='M';XCHR[78]:='N';XCHR[79]:='O';XCHR[80]:='P';
+XCHR[81]:='Q';XCHR[82]:='R';XCHR[83]:='S';XCHR[84]:='T';XCHR[85]:='U';
+XCHR[86]:='V';XCHR[87]:='W';XCHR[88]:='X';XCHR[89]:='Y';XCHR[90]:='Z';
+XCHR[91]:='[';XCHR[92]:='\';XCHR[93]:=']';XCHR[94]:='^';XCHR[95]:='_';
+XCHR[96]:='`';XCHR[97]:='a';XCHR[98]:='b';XCHR[99]:='c';XCHR[100]:='d';
+XCHR[101]:='e';XCHR[102]:='f';XCHR[103]:='g';XCHR[104]:='h';
+XCHR[105]:='i';XCHR[106]:='j';XCHR[107]:='k';XCHR[108]:='l';
+XCHR[109]:='m';XCHR[110]:='n';XCHR[111]:='o';XCHR[112]:='p';
+XCHR[113]:='q';XCHR[114]:='r';XCHR[115]:='s';XCHR[116]:='t';
+XCHR[117]:='u';XCHR[118]:='v';XCHR[119]:='w';XCHR[120]:='x';
+XCHR[121]:='y';XCHR[122]:='z';XCHR[123]:='{';XCHR[124]:='|';
+XCHR[125]:='}';XCHR[126]:='~';XCHR[0]:=' ';XCHR[127]:=' ';
+{:14}{17:}FOR I:=1 TO 31 DO XCHR[I]:=' ';
+FOR I:=128 TO 255 DO XCHR[I]:=' ';
+{:17}{18:}FOR I:=0 TO 255 DO XORD[CHR(I)]:=32;
+FOR I:=1 TO 255 DO XORD[XCHR[I]]:=I;XORD[' ']:=32;
+{:18}{26:}IF PARAMCOUNT<>4 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'Usage: tangle web_file change_file pascal_file pool_file')
+;ERROR;HISTORY:=3;JUMPOUT;END;END;REWRITE(PASCALFILE,PARAMSTR(3));
+REWRITE(POOL,PARAMSTR(4));
+{:26}{42:}FOR WI:=0 TO 1 DO BEGIN BYTESTART[WI]:=0;BYTEPTR[WI]:=0;END;
+BYTESTART[2]:=0;NAMEPTR:=1;STRINGPTR:=256;POOLCHECKSUM:=271828;
+{:42}{46:}FOR ZI:=0 TO 3 DO BEGIN TOKSTART[ZI]:=0;TOKPTR[ZI]:=0;END;
+TOKSTART[4]:=0;TEXTPTR:=1;Z:=1 MOD 4;{:46}{48:}ILK[0]:=0;EQUIV[0]:=0;
+{:48}{52:}FOR H:=0 TO HASHSIZE-1 DO BEGIN HASH[H]:=0;CHOPHASH[H]:=0;END;
+{:52}{71:}LASTUNNAMED:=0;TEXTLINK[0]:=0;{:71}{144:}SCANNINGHEX:=FALSE;
+{:144}{152:}MODTEXT[0]:=32;{:152}{180:}{TROUBLESHOOT:=TRUE;
+DEBUGCYCLE:=1;DEBUGSKIPPED:=0;TROUBLESHOOT:=FALSE;DEBUGCYCLE:=99999;}
+{:180}END;{:2}{24:}PROCEDURE OPENINPUT;BEGIN RESET(WEBFILE,PARAMSTR(1));
+RESET(CHANGEFILE,PARAMSTR(2));END;
+{:24}{28:}FUNCTION INPUTLN(VAR F:TEXTFILE):BOOLEAN;
+VAR FINALLIMIT:0..BUFSIZE;BEGIN LIMIT:=0;FINALLIMIT:=0;
+IF EOF(F)THEN INPUTLN:=FALSE ELSE BEGIN WHILE NOT EOLN(F)DO BEGIN BUFFER
+[LIMIT]:=XORD[F^];GET(F);LIMIT:=LIMIT+1;
+IF BUFFER[LIMIT-1]<>32 THEN FINALLIMIT:=LIMIT;
+IF LIMIT=BUFSIZE THEN BEGIN WHILE NOT EOLN(F)DO GET(F);LIMIT:=LIMIT-1;
+IF FINALLIMIT>LIMIT THEN FINALLIMIT:=LIMIT;BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Input line too long');END;LOC:=0;ERROR;END;END;
+READLN(F);LIMIT:=FINALLIMIT;INPUTLN:=TRUE;END;END;
+{:28}{49:}PROCEDURE PRINTID(P:NAMEPOINTER);VAR K:0..MAXBYTES;W:0..1;
+BEGIN IF P>=NAMEPTR THEN WRITE(OUTPUT,'IMPOSSIBLE')ELSE BEGIN W:=P MOD 2
+;
+FOR K:=BYTESTART[P]TO BYTESTART[P+2]-1 DO WRITE(OUTPUT,XCHR[BYTEMEM[W,K]
+]);END;END;{:49}{53:}FUNCTION IDLOOKUP(T:EIGHTBITS):NAMEPOINTER;
+LABEL 31,32;VAR C:EIGHTBITS;I:0..BUFSIZE;H:0..HASHSIZE;K:0..MAXBYTES;
+W:0..1;L:0..BUFSIZE;P,Q:NAMEPOINTER;S:0..UNAMBIGLENGT;
+BEGIN L:=IDLOC-IDFIRST;{54:}H:=BUFFER[IDFIRST];I:=IDFIRST+1;
+WHILE I<IDLOC DO BEGIN H:=(H+H+BUFFER[I])MOD HASHSIZE;I:=I+1;END{:54};
+{55:}P:=HASH[H];
+WHILE P<>0 DO BEGIN IF BYTESTART[P+2]-BYTESTART[P]=L THEN{56:}BEGIN I:=
+IDFIRST;K:=BYTESTART[P];W:=P MOD 2;
+WHILE(I<IDLOC)AND(BUFFER[I]=BYTEMEM[W,K])DO BEGIN I:=I+1;K:=K+1;END;
+IF I=IDLOC THEN GOTO 31;END{:56};P:=LINK[P];END;P:=NAMEPTR;
+LINK[P]:=HASH[H];HASH[H]:=P;31:{:55};
+IF(P=NAMEPTR)OR(T<>0)THEN{57:}BEGIN IF((P<>NAMEPTR)AND(T<>0)AND(ILK[P]=0
+))OR((P=NAMEPTR)AND(T=0)AND(BUFFER[IDFIRST]<>34))THEN{58:}BEGIN I:=
+IDFIRST;S:=0;H:=0;
+WHILE(I<IDLOC)AND(S<UNAMBIGLENGT)DO BEGIN IF BUFFER[I]<>95 THEN BEGIN IF
+BUFFER[I]>=97 THEN CHOPPEDID[S]:=BUFFER[I]-32 ELSE CHOPPEDID[S]:=BUFFER[
+I];H:=(H+H+CHOPPEDID[S])MOD HASHSIZE;S:=S+1;END;I:=I+1;END;
+CHOPPEDID[S]:=0;END{:58};
+IF P<>NAMEPTR THEN{59:}BEGIN IF ILK[P]=0 THEN BEGIN IF T=1 THEN BEGIN
+WRITELN(OUTPUT);WRITE(OUTPUT,'! This identifier has already appeared');
+ERROR;END;{60:}Q:=CHOPHASH[H];
+IF Q=P THEN CHOPHASH[H]:=EQUIV[P]ELSE BEGIN WHILE EQUIV[Q]<>P DO Q:=
+EQUIV[Q];EQUIV[Q]:=EQUIV[P];END{:60};END ELSE BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! This identifier was defined before');ERROR;END;
+ILK[P]:=T;
+END{:59}ELSE{61:}BEGIN IF(T=0)AND(BUFFER[IDFIRST]<>34)THEN{62:}BEGIN Q:=
+CHOPHASH[H];WHILE Q<>0 DO BEGIN{63:}BEGIN K:=BYTESTART[Q];S:=0;
+W:=Q MOD 2;
+WHILE(K<BYTESTART[Q+2])AND(S<UNAMBIGLENGT)DO BEGIN C:=BYTEMEM[W,K];
+IF C<>95 THEN BEGIN IF C>=97 THEN C:=C-32;
+IF CHOPPEDID[S]<>C THEN GOTO 32;S:=S+1;END;K:=K+1;END;
+IF(K=BYTESTART[Q+2])AND(CHOPPEDID[S]<>0)THEN GOTO 32;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Identifier conflict with ');END;
+FOR K:=BYTESTART[Q]TO BYTESTART[Q+2]-1 DO WRITE(OUTPUT,XCHR[BYTEMEM[W,K]
+]);ERROR;Q:=0;32:END{:63};Q:=EQUIV[Q];END;EQUIV[P]:=CHOPHASH[H];
+CHOPHASH[H]:=P;END{:62};W:=NAMEPTR MOD 2;K:=BYTEPTR[W];
+IF K+L>MAXBYTES THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','byte memory',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;IF NAMEPTR>MAXNAMES-2 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','name',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;I:=IDFIRST;WHILE I<IDLOC DO BEGIN BYTEMEM[W,K]:=BUFFER[I];
+K:=K+1;I:=I+1;END;BYTEPTR[W]:=K;BYTESTART[NAMEPTR+2]:=K;
+NAMEPTR:=NAMEPTR+1;
+IF BUFFER[IDFIRST]<>34 THEN ILK[P]:=T ELSE{64:}BEGIN ILK[P]:=1;
+IF L-DOUBLECHARS=2 THEN EQUIV[P]:=BUFFER[IDFIRST+1]+32768 ELSE BEGIN
+EQUIV[P]:=STRINGPTR+32768;L:=L-DOUBLECHARS-1;
+IF L>99 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Preprocessed string is too long');ERROR;END;
+STRINGPTR:=STRINGPTR+1;WRITE(POOL,XCHR[48+L DIV 10],XCHR[48+L MOD 10]);
+POOLCHECKSUM:=POOLCHECKSUM+POOLCHECKSUM+L;
+WHILE POOLCHECKSUM>536870839 DO POOLCHECKSUM:=POOLCHECKSUM-536870839;
+I:=IDFIRST+1;WHILE I<IDLOC DO BEGIN WRITE(POOL,XCHR[BUFFER[I]]);
+POOLCHECKSUM:=POOLCHECKSUM+POOLCHECKSUM+BUFFER[I];
+WHILE POOLCHECKSUM>536870839 DO POOLCHECKSUM:=POOLCHECKSUM-536870839;
+IF(BUFFER[I]=34)OR(BUFFER[I]=64)THEN I:=I+2 ELSE I:=I+1;END;
+WRITELN(POOL);END;END{:64};END{:61};END{:57};IDLOOKUP:=P;END;
+{:53}{66:}FUNCTION MODLOOKUP(L:SIXTEENBITS):NAMEPOINTER;LABEL 31;
+VAR C:0..4;J:0..LONGESTNAME;K:0..MAXBYTES;W:0..1;P:NAMEPOINTER;
+Q:NAMEPOINTER;BEGIN C:=2;Q:=0;P:=ILK[0];
+WHILE P<>0 DO BEGIN{68:}BEGIN K:=BYTESTART[P];W:=P MOD 2;C:=1;J:=1;
+WHILE(K<BYTESTART[P+2])AND(J<=L)AND(MODTEXT[J]=BYTEMEM[W,K])DO BEGIN K:=
+K+1;J:=J+1;END;
+IF K=BYTESTART[P+2]THEN IF J>L THEN C:=1 ELSE C:=4 ELSE IF J>L THEN C:=3
+ELSE IF MODTEXT[J]<BYTEMEM[W,K]THEN C:=0 ELSE C:=2;END{:68};Q:=P;
+IF C=0 THEN P:=LINK[Q]ELSE IF C=2 THEN P:=ILK[Q]ELSE GOTO 31;END;
+{67:}W:=NAMEPTR MOD 2;K:=BYTEPTR[W];
+IF K+L>MAXBYTES THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','byte memory',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;IF NAMEPTR>MAXNAMES-2 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','name',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;P:=NAMEPTR;IF C=0 THEN LINK[Q]:=P ELSE ILK[Q]:=P;LINK[P]:=0;
+ILK[P]:=0;C:=1;EQUIV[P]:=0;
+FOR J:=1 TO L DO BYTEMEM[W,K+J-1]:=MODTEXT[J];BYTEPTR[W]:=K+L;
+BYTESTART[NAMEPTR+2]:=K+L;NAMEPTR:=NAMEPTR+1;{:67};
+31:IF C<>1 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Incompatible section names');ERROR;END;P:=0;END;
+MODLOOKUP:=P;END;
+{:66}{69:}FUNCTION PREFIXLOOKUP(L:SIXTEENBITS):NAMEPOINTER;VAR C:0..4;
+COUNT:0..MAXNAMES;J:0..LONGESTNAME;K:0..MAXBYTES;W:0..1;P:NAMEPOINTER;
+Q:NAMEPOINTER;R:NAMEPOINTER;BEGIN Q:=0;P:=ILK[0];COUNT:=0;R:=0;
+WHILE P<>0 DO BEGIN{68:}BEGIN K:=BYTESTART[P];W:=P MOD 2;C:=1;J:=1;
+WHILE(K<BYTESTART[P+2])AND(J<=L)AND(MODTEXT[J]=BYTEMEM[W,K])DO BEGIN K:=
+K+1;J:=J+1;END;
+IF K=BYTESTART[P+2]THEN IF J>L THEN C:=1 ELSE C:=4 ELSE IF J>L THEN C:=3
+ELSE IF MODTEXT[J]<BYTEMEM[W,K]THEN C:=0 ELSE C:=2;END{:68};
+IF C=0 THEN P:=LINK[P]ELSE IF C=2 THEN P:=ILK[P]ELSE BEGIN R:=P;
+COUNT:=COUNT+1;Q:=ILK[P];P:=LINK[P];END;IF P=0 THEN BEGIN P:=Q;Q:=0;END;
+END;IF COUNT<>1 THEN IF COUNT=0 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Name does not match');ERROR;
+END ELSE BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Ambiguous prefix');ERROR;
+END;PREFIXLOOKUP:=R;END;{:69}{73:}PROCEDURE STORETWOBYTE(X:SIXTEENBITS);
+BEGIN IF TOKPTR[Z]+2>MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=X DIV 256;
+TOKMEM[Z,TOKPTR[Z]+1]:=X MOD 256;TOKPTR[Z]:=TOKPTR[Z]+2;END;
+{:73}{74:}{PROCEDURE PRINTREPL(P:TEXTPOINTER);VAR K:0..MAXTOKS;
+A:SIXTEENBITS;ZP:0..3;
+BEGIN IF P>=TEXTPTR THEN WRITE(OUTPUT,'BAD')ELSE BEGIN K:=TOKSTART[P];
+ZP:=P MOD 4;WHILE K<TOKSTART[P+4]DO BEGIN A:=TOKMEM[ZP,K];
+IF A>=128 THEN[75:]BEGIN K:=K+1;
+IF A<168 THEN BEGIN A:=(A-128)*256+TOKMEM[ZP,K];PRINTID(A);
+IF BYTEMEM[A MOD 2,BYTESTART[A]]=34 THEN WRITE(OUTPUT,'"')ELSE WRITE(
+OUTPUT,' ');END ELSE IF A<208 THEN BEGIN WRITE(OUTPUT,'@<');
+PRINTID((A-168)*256+TOKMEM[ZP,K]);WRITE(OUTPUT,'@>');
+END ELSE BEGIN A:=(A-208)*256+TOKMEM[ZP,K];
+WRITE(OUTPUT,'@',XCHR[123],A:1,'@',XCHR[125]);END;
+END[:75]ELSE[76:]CASE A OF 9:WRITE(OUTPUT,'@',XCHR[123]);
+10:WRITE(OUTPUT,'@',XCHR[125]);12:WRITE(OUTPUT,'@''');
+13:WRITE(OUTPUT,'@"');125:WRITE(OUTPUT,'@$');0:WRITE(OUTPUT,'#');
+64:WRITE(OUTPUT,'@@');2:WRITE(OUTPUT,'@=');3:WRITE(OUTPUT,'@\');
+ELSE WRITE(OUTPUT,XCHR[A])END[:76];K:=K+1;END;END;END;}
+{:74}{84:}PROCEDURE PUSHLEVEL(P:NAMEPOINTER);
+BEGIN IF STACKPTR=STACKSIZE THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','stack',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END ELSE BEGIN STACK[STACKPTR]:=CURSTATE;STACKPTR:=STACKPTR+1;
+CURSTATE.NAMEFIELD:=P;CURSTATE.REPLFIELD:=EQUIV[P];
+ZO:=CURSTATE.REPLFIELD MOD 4;
+CURSTATE.BYTEFIELD:=TOKSTART[CURSTATE.REPLFIELD];
+CURSTATE.ENDFIELD:=TOKSTART[CURSTATE.REPLFIELD+4];CURSTATE.MODFIELD:=0;
+END;END;{:84}{85:}PROCEDURE POPLEVEL;LABEL 10;
+BEGIN IF TEXTLINK[CURSTATE.REPLFIELD]=0 THEN BEGIN IF ILK[CURSTATE.
+NAMEFIELD]=3 THEN{91:}BEGIN NAMEPTR:=NAMEPTR-1;TEXTPTR:=TEXTPTR-1;
+Z:=TEXTPTR MOD 4;IF TOKPTR[Z]>MAXTOKPTR[Z]THEN MAXTOKPTR[Z]:=TOKPTR[Z];
+TOKPTR[Z]:=TOKSTART[TEXTPTR];
+{BYTEPTR[NAMEPTR MOD 2]:=BYTEPTR[NAMEPTR MOD 2]-1;}END{:91};
+END ELSE IF TEXTLINK[CURSTATE.REPLFIELD]<MAXTEXTS THEN BEGIN CURSTATE.
+REPLFIELD:=TEXTLINK[CURSTATE.REPLFIELD];ZO:=CURSTATE.REPLFIELD MOD 4;
+CURSTATE.BYTEFIELD:=TOKSTART[CURSTATE.REPLFIELD];
+CURSTATE.ENDFIELD:=TOKSTART[CURSTATE.REPLFIELD+4];GOTO 10;END;
+STACKPTR:=STACKPTR-1;IF STACKPTR>0 THEN BEGIN CURSTATE:=STACK[STACKPTR];
+ZO:=CURSTATE.REPLFIELD MOD 4;END;10:END;
+{:85}{87:}FUNCTION GETOUTPUT:SIXTEENBITS;LABEL 20,30,31;
+VAR A:SIXTEENBITS;B:EIGHTBITS;BAL:SIXTEENBITS;K:0..MAXBYTES;W:0..1;
+BEGIN 20:IF STACKPTR=0 THEN BEGIN A:=0;GOTO 31;END;
+IF CURSTATE.BYTEFIELD=CURSTATE.ENDFIELD THEN BEGIN CURVAL:=-CURSTATE.
+MODFIELD;POPLEVEL;IF CURVAL=0 THEN GOTO 20;A:=129;GOTO 31;END;
+A:=TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+IF A<128 THEN IF A=0 THEN{92:}BEGIN PUSHLEVEL(NAMEPTR-1);GOTO 20;
+END{:92}ELSE GOTO 31;A:=(A-128)*256+TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+IF A<10240 THEN{89:}BEGIN CASE ILK[A]OF 0:BEGIN CURVAL:=A;A:=130;END;
+1:BEGIN CURVAL:=EQUIV[A]-32768;A:=128;END;2:BEGIN PUSHLEVEL(A);GOTO 20;
+END;
+3:BEGIN{90:}WHILE(CURSTATE.BYTEFIELD=CURSTATE.ENDFIELD)AND(STACKPTR>0)DO
+POPLEVEL;
+IF(STACKPTR=0)OR(TOKMEM[ZO,CURSTATE.BYTEFIELD]<>40)THEN BEGIN BEGIN
+WRITELN(OUTPUT);WRITE(OUTPUT,'! No parameter given for ');END;
+PRINTID(A);ERROR;GOTO 20;END;{93:}BAL:=1;
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+WHILE TRUE DO BEGIN B:=TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+IF B=0 THEN STORETWOBYTE(NAMEPTR+32767)ELSE BEGIN IF B>=128 THEN BEGIN
+BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=B;TOKPTR[Z]:=TOKPTR[Z]+1;END;
+B:=TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;
+END ELSE CASE B OF 40:BAL:=BAL+1;41:BEGIN BAL:=BAL-1;
+IF BAL=0 THEN GOTO 30;END;
+39:REPEAT BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=B;TOKPTR[Z]:=TOKPTR[Z]+1;END;
+B:=TOKMEM[ZO,CURSTATE.BYTEFIELD];
+CURSTATE.BYTEFIELD:=CURSTATE.BYTEFIELD+1;UNTIL B=39;ELSE END;
+BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=B;TOKPTR[Z]:=TOKPTR[Z]+1;END;END;END;
+30:{:93};EQUIV[NAMEPTR]:=TEXTPTR;ILK[NAMEPTR]:=2;W:=NAMEPTR MOD 2;
+K:=BYTEPTR[W];{IF K=MAXBYTES THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','byte memory',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;BYTEMEM[W,K]:=35;K:=K+1;BYTEPTR[W]:=K;}
+IF NAMEPTR>MAXNAMES-2 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','name',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;BYTESTART[NAMEPTR+2]:=K;NAMEPTR:=NAMEPTR+1;
+IF TEXTPTR>MAXTEXTS-4 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','text',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TEXTLINK[TEXTPTR]:=0;TOKSTART[TEXTPTR+4]:=TOKPTR[Z];
+TEXTPTR:=TEXTPTR+1;Z:=TEXTPTR MOD 4{:90};PUSHLEVEL(A);GOTO 20;END;
+ELSE BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! This can''t happen (','output',')');ERROR;HISTORY:=3;
+JUMPOUT;END END;GOTO 31;END{:89};IF A<20480 THEN{88:}BEGIN A:=A-10240;
+IF EQUIV[A]<>0 THEN PUSHLEVEL(A)ELSE IF A<>0 THEN BEGIN BEGIN WRITELN(
+OUTPUT);WRITE(OUTPUT,'! Not present: <');END;PRINTID(A);
+WRITE(OUTPUT,'>');ERROR;END;GOTO 20;END{:88};CURVAL:=A-20480;A:=129;
+CURSTATE.MODFIELD:=CURVAL;31:{IF TROUBLESHOOT THEN DEBUGHELP;}
+GETOUTPUT:=A;END;{:87}{97:}PROCEDURE FLUSHBUFFER;VAR K:0..OUTBUFSIZE;
+B:0..OUTBUFSIZE;BEGIN B:=BREAKPTR;
+IF(SEMIPTR<>0)AND(OUTPTR-SEMIPTR<=LINELENGTH)THEN BREAKPTR:=SEMIPTR;
+FOR K:=1 TO BREAKPTR DO WRITE(PASCALFILE,XCHR[OUTBUF[K-1]]);
+WRITELN(PASCALFILE);LINE:=LINE+1;
+IF LINE MOD 100=0 THEN BEGIN WRITE(OUTPUT,'.');
+IF LINE MOD 500=0 THEN WRITE(OUTPUT,LINE:1);;END;
+IF BREAKPTR<OUTPTR THEN BEGIN IF OUTBUF[BREAKPTR]=32 THEN BEGIN BREAKPTR
+:=BREAKPTR+1;IF BREAKPTR>B THEN B:=BREAKPTR;END;
+FOR K:=BREAKPTR TO OUTPTR-1 DO OUTBUF[K-BREAKPTR]:=OUTBUF[K];END;
+OUTPTR:=OUTPTR-BREAKPTR;BREAKPTR:=B-BREAKPTR;SEMIPTR:=0;
+IF OUTPTR>LINELENGTH THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Long line must be truncated');ERROR;END;
+OUTPTR:=LINELENGTH;END;END;{:97}{99:}PROCEDURE APPVAL(V:INTEGER);
+VAR K:0..OUTBUFSIZE;BEGIN K:=OUTBUFSIZE;REPEAT OUTBUF[K]:=V MOD 10;
+V:=V DIV 10;K:=K-1;UNTIL V=0;REPEAT K:=K+1;
+BEGIN OUTBUF[OUTPTR]:=OUTBUF[K]+48;OUTPTR:=OUTPTR+1;END;
+UNTIL K=OUTBUFSIZE;END;{:99}{101:}PROCEDURE SENDOUT(T:EIGHTBITS;
+V:SIXTEENBITS);LABEL 20;VAR K:0..LINELENGTH;
+BEGIN{102:}20:CASE OUTSTATE OF 1:IF T<>3 THEN BEGIN BREAKPTR:=OUTPTR;
+IF T=2 THEN BEGIN OUTBUF[OUTPTR]:=32;OUTPTR:=OUTPTR+1;END;END;
+2:BEGIN BEGIN OUTBUF[OUTPTR]:=44-OUTAPP;OUTPTR:=OUTPTR+1;END;
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;BREAKPTR:=OUTPTR;END;
+3,4:BEGIN{103:}IF(OUTVAL<0)OR((OUTVAL=0)AND(LASTSIGN<0))THEN BEGIN
+OUTBUF[OUTPTR]:=45;OUTPTR:=OUTPTR+1;
+END ELSE IF OUTSIGN>0 THEN BEGIN OUTBUF[OUTPTR]:=OUTSIGN;
+OUTPTR:=OUTPTR+1;END;APPVAL(ABS(OUTVAL));
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;{:103};OUTSTATE:=OUTSTATE-2;
+GOTO 20;END;
+5:{104:}BEGIN IF(T=3)OR({105:}((T=2)AND(V=3)AND(((OUTCONTRIB[1]=68)AND(
+OUTCONTRIB[2]=73)AND(OUTCONTRIB[3]=86))OR((OUTCONTRIB[1]=77)AND(
+OUTCONTRIB[2]=79)AND(OUTCONTRIB[3]=68))))OR((T=0)AND((V=42)OR(V=47)))
+{:105})THEN BEGIN{103:}IF(OUTVAL<0)OR((OUTVAL=0)AND(LASTSIGN<0))THEN
+BEGIN OUTBUF[OUTPTR]:=45;OUTPTR:=OUTPTR+1;
+END ELSE IF OUTSIGN>0 THEN BEGIN OUTBUF[OUTPTR]:=OUTSIGN;
+OUTPTR:=OUTPTR+1;END;APPVAL(ABS(OUTVAL));
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;{:103};OUTSIGN:=43;OUTVAL:=OUTAPP;
+END ELSE OUTVAL:=OUTVAL+OUTAPP;OUTSTATE:=3;GOTO 20;END{:104};
+0:IF T<>3 THEN BREAKPTR:=OUTPTR;ELSE END{:102};
+IF T<>0 THEN FOR K:=1 TO V DO BEGIN OUTBUF[OUTPTR]:=OUTCONTRIB[K];
+OUTPTR:=OUTPTR+1;END ELSE BEGIN OUTBUF[OUTPTR]:=V;OUTPTR:=OUTPTR+1;END;
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;
+IF(T=0)AND((V=59)OR(V=125))THEN BEGIN SEMIPTR:=OUTPTR;BREAKPTR:=OUTPTR;
+END;IF T>=2 THEN OUTSTATE:=1 ELSE OUTSTATE:=0 END;
+{:101}{106:}PROCEDURE SENDSIGN(V:INTEGER);
+BEGIN CASE OUTSTATE OF 2,4:OUTAPP:=OUTAPP*V;3:BEGIN OUTAPP:=V;
+OUTSTATE:=4;END;5:BEGIN OUTVAL:=OUTVAL+OUTAPP;OUTAPP:=V;OUTSTATE:=4;END;
+ELSE BEGIN BREAKPTR:=OUTPTR;OUTAPP:=V;OUTSTATE:=2;END END;
+LASTSIGN:=OUTAPP;END;{:106}{107:}PROCEDURE SENDVAL(V:INTEGER);
+LABEL 666,10;
+BEGIN CASE OUTSTATE OF 1:BEGIN{110:}IF(OUTPTR=BREAKPTR+3)OR((OUTPTR=
+BREAKPTR+4)AND(OUTBUF[BREAKPTR]=32))THEN IF((OUTBUF[OUTPTR-3]=68)AND(
+OUTBUF[OUTPTR-2]=73)AND(OUTBUF[OUTPTR-1]=86))OR((OUTBUF[OUTPTR-3]=77)AND
+(OUTBUF[OUTPTR-2]=79)AND(OUTBUF[OUTPTR-1]=68))THEN GOTO 666{:110};
+OUTSIGN:=32;OUTSTATE:=3;OUTVAL:=V;BREAKPTR:=OUTPTR;LASTSIGN:=+1;END;
+0:BEGIN{109:}IF(OUTPTR=BREAKPTR+1)AND((OUTBUF[BREAKPTR]=42)OR(OUTBUF[
+BREAKPTR]=47))THEN GOTO 666{:109};OUTSIGN:=0;OUTSTATE:=3;OUTVAL:=V;
+BREAKPTR:=OUTPTR;LASTSIGN:=+1;END;{108:}2:BEGIN OUTSIGN:=43;OUTSTATE:=3;
+OUTVAL:=OUTAPP*V;END;3:BEGIN OUTSTATE:=5;OUTAPP:=V;
+BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Two numbers occurred without a sign between them');
+ERROR;END;END;4:BEGIN OUTSTATE:=5;OUTAPP:=OUTAPP*V;END;
+5:BEGIN OUTVAL:=OUTVAL+OUTAPP;OUTAPP:=V;BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Two numbers occurred without a sign between them');
+ERROR;END;END;{:108}ELSE GOTO 666 END;GOTO 10;
+666:{111:}IF V>=0 THEN BEGIN IF OUTSTATE=1 THEN BEGIN BREAKPTR:=OUTPTR;
+BEGIN OUTBUF[OUTPTR]:=32;OUTPTR:=OUTPTR+1;END;END;APPVAL(V);
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;OUTSTATE:=1;
+END ELSE BEGIN BEGIN OUTBUF[OUTPTR]:=40;OUTPTR:=OUTPTR+1;END;
+BEGIN OUTBUF[OUTPTR]:=45;OUTPTR:=OUTPTR+1;END;APPVAL(-V);
+BEGIN OUTBUF[OUTPTR]:=41;OUTPTR:=OUTPTR+1;END;
+IF OUTPTR>LINELENGTH THEN FLUSHBUFFER;OUTSTATE:=0;END{:111};10:END;
+{:107}{113:}PROCEDURE SENDTHEOUTPU;LABEL 2,21,22;VAR CURCHAR:EIGHTBITS;
+K:0..LINELENGTH;J:0..MAXBYTES;W:0..1;N:INTEGER;
+BEGIN WHILE STACKPTR>0 DO BEGIN CURCHAR:=GETOUTPUT;
+21:CASE CURCHAR OF 0:;
+{116:}65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,
+87,88,89,90:BEGIN OUTCONTRIB[1]:=CURCHAR;SENDOUT(2,1);END;
+97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115
+,116,117,118,119,120,121,122:BEGIN OUTCONTRIB[1]:=CURCHAR-32;
+SENDOUT(2,1);END;130:BEGIN K:=0;J:=BYTESTART[CURVAL];W:=CURVAL MOD 2;
+WHILE(K<MAXIDLENGTH)AND(J<BYTESTART[CURVAL+2])DO BEGIN K:=K+1;
+OUTCONTRIB[K]:=BYTEMEM[W,J];J:=J+1;
+IF OUTCONTRIB[K]>=97 THEN OUTCONTRIB[K]:=OUTCONTRIB[K]-32 ELSE IF
+OUTCONTRIB[K]=95 THEN K:=K-1;END;SENDOUT(2,K);END;
+{:116}{119:}48,49,50,51,52,53,54,55,56,57:BEGIN N:=0;
+REPEAT CURCHAR:=CURCHAR-48;IF N>=214748364 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Constant too big');ERROR;END ELSE N:=10*N+CURCHAR;
+CURCHAR:=GETOUTPUT;UNTIL(CURCHAR>57)OR(CURCHAR<48);SENDVAL(N);K:=0;
+IF CURCHAR=101 THEN CURCHAR:=69;IF CURCHAR=69 THEN GOTO 2 ELSE GOTO 21;
+END;125:SENDVAL(POOLCHECKSUM);12:BEGIN N:=0;CURCHAR:=48;
+REPEAT CURCHAR:=CURCHAR-48;IF N>=268435456 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Constant too big');ERROR;END ELSE N:=8*N+CURCHAR;
+CURCHAR:=GETOUTPUT;UNTIL(CURCHAR>55)OR(CURCHAR<48);SENDVAL(N);GOTO 21;
+END;13:BEGIN N:=0;CURCHAR:=48;
+REPEAT IF CURCHAR>=65 THEN CURCHAR:=CURCHAR-55 ELSE CURCHAR:=CURCHAR-48;
+IF N>=134217728 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Constant too big');ERROR;END ELSE N:=16*N+CURCHAR;
+CURCHAR:=GETOUTPUT;
+UNTIL(CURCHAR>70)OR(CURCHAR<48)OR((CURCHAR>57)AND(CURCHAR<65));
+SENDVAL(N);GOTO 21;END;128:SENDVAL(CURVAL);46:BEGIN K:=1;
+OUTCONTRIB[1]:=46;CURCHAR:=GETOUTPUT;
+IF CURCHAR=46 THEN BEGIN OUTCONTRIB[2]:=46;SENDOUT(1,2);
+END ELSE IF(CURCHAR>=48)AND(CURCHAR<=57)THEN GOTO 2 ELSE BEGIN SENDOUT(0
+,46);GOTO 21;END;END;{:119}43,45:SENDSIGN(44-CURCHAR);
+{114:}4:BEGIN OUTCONTRIB[1]:=65;OUTCONTRIB[2]:=78;OUTCONTRIB[3]:=68;
+SENDOUT(2,3);END;5:BEGIN OUTCONTRIB[1]:=78;OUTCONTRIB[2]:=79;
+OUTCONTRIB[3]:=84;SENDOUT(2,3);END;6:BEGIN OUTCONTRIB[1]:=73;
+OUTCONTRIB[2]:=78;SENDOUT(2,2);END;31:BEGIN OUTCONTRIB[1]:=79;
+OUTCONTRIB[2]:=82;SENDOUT(2,2);END;24:BEGIN OUTCONTRIB[1]:=58;
+OUTCONTRIB[2]:=61;SENDOUT(1,2);END;26:BEGIN OUTCONTRIB[1]:=60;
+OUTCONTRIB[2]:=62;SENDOUT(1,2);END;28:BEGIN OUTCONTRIB[1]:=60;
+OUTCONTRIB[2]:=61;SENDOUT(1,2);END;29:BEGIN OUTCONTRIB[1]:=62;
+OUTCONTRIB[2]:=61;SENDOUT(1,2);END;30:BEGIN OUTCONTRIB[1]:=61;
+OUTCONTRIB[2]:=61;SENDOUT(1,2);END;32:BEGIN OUTCONTRIB[1]:=46;
+OUTCONTRIB[2]:=46;SENDOUT(1,2);END;{:114}39:{117:}BEGIN K:=1;
+OUTCONTRIB[1]:=39;REPEAT IF K<LINELENGTH THEN K:=K+1;
+OUTCONTRIB[K]:=GETOUTPUT;UNTIL(OUTCONTRIB[K]=39)OR(STACKPTR=0);
+IF K=LINELENGTH THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! String too long');ERROR;END;SENDOUT(1,K);
+CURCHAR:=GETOUTPUT;IF CURCHAR=39 THEN OUTSTATE:=6;GOTO 21;END{:117};
+{115:}33,34,35,36,37,38,40,41,42,44,47,58,59,60,61,62,63,64,91,92,93,94,
+95,96,123,124{:115}:SENDOUT(0,CURCHAR);
+{121:}9:BEGIN IF BRACELEVEL=0 THEN SENDOUT(0,123)ELSE SENDOUT(0,91);
+BRACELEVEL:=BRACELEVEL+1;END;
+10:IF BRACELEVEL>0 THEN BEGIN BRACELEVEL:=BRACELEVEL-1;
+IF BRACELEVEL=0 THEN SENDOUT(0,125)ELSE SENDOUT(0,93);
+END ELSE BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Extra @}');ERROR;END;
+129:BEGIN K:=2;
+IF BRACELEVEL=0 THEN OUTCONTRIB[1]:=123 ELSE OUTCONTRIB[1]:=91;
+IF CURVAL<0 THEN BEGIN OUTCONTRIB[K]:=58;CURVAL:=-CURVAL;K:=K+1;END;
+N:=10;WHILE CURVAL>=N DO N:=10*N;REPEAT N:=N DIV 10;
+OUTCONTRIB[K]:=48+(CURVAL DIV N);CURVAL:=CURVAL MOD N;K:=K+1;UNTIL N=1;
+IF OUTCONTRIB[2]<>58 THEN BEGIN OUTCONTRIB[K]:=58;K:=K+1;END;
+IF BRACELEVEL=0 THEN OUTCONTRIB[K]:=125 ELSE OUTCONTRIB[K]:=93;
+SENDOUT(1,K);END;{:121}127:BEGIN SENDOUT(3,0);OUTSTATE:=6;END;
+2:{118:}BEGIN K:=0;REPEAT IF K<LINELENGTH THEN K:=K+1;
+OUTCONTRIB[K]:=GETOUTPUT;UNTIL(OUTCONTRIB[K]=2)OR(STACKPTR=0);
+IF K=LINELENGTH THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Verbatim string too long');ERROR;END;SENDOUT(1,K-1);
+END{:118};3:{122:}BEGIN SENDOUT(1,0);
+WHILE OUTPTR>0 DO BEGIN IF OUTPTR<=LINELENGTH THEN BREAKPTR:=OUTPTR;
+FLUSHBUFFER;END;OUTSTATE:=0;END{:122};ELSE BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Can''t output ASCII code ',CURCHAR:1);ERROR;END END;
+GOTO 22;2:{120:}REPEAT IF K<LINELENGTH THEN K:=K+1;
+OUTCONTRIB[K]:=CURCHAR;CURCHAR:=GETOUTPUT;
+IF(OUTCONTRIB[K]=69)AND((CURCHAR=43)OR(CURCHAR=45))THEN BEGIN IF K<
+LINELENGTH THEN K:=K+1;OUTCONTRIB[K]:=CURCHAR;CURCHAR:=GETOUTPUT;
+END ELSE IF CURCHAR=101 THEN CURCHAR:=69;
+UNTIL(CURCHAR<>69)AND((CURCHAR<48)OR(CURCHAR>57));
+IF K=LINELENGTH THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Fraction too long');ERROR;END;SENDOUT(3,K);
+GOTO 21{:120};22:END;END;{:113}{127:}FUNCTION LINESDONTMAT:BOOLEAN;
+LABEL 10;VAR K:0..BUFSIZE;BEGIN LINESDONTMAT:=TRUE;
+IF CHANGELIMIT<>LIMIT THEN GOTO 10;
+IF LIMIT>0 THEN FOR K:=0 TO LIMIT-1 DO IF CHANGEBUFFER[K]<>BUFFER[K]THEN
+GOTO 10;LINESDONTMAT:=FALSE;10:END;{:127}{128:}PROCEDURE PRIMETHECHAN;
+LABEL 22,30,10;VAR K:0..BUFSIZE;BEGIN CHANGELIMIT:=0;
+{129:}WHILE TRUE DO BEGIN LINE:=LINE+1;
+IF NOT INPUTLN(CHANGEFILE)THEN GOTO 10;IF LIMIT<2 THEN GOTO 22;
+IF BUFFER[0]<>64 THEN GOTO 22;
+IF(BUFFER[1]>=88)AND(BUFFER[1]<=90)THEN BUFFER[1]:=BUFFER[1]+32;
+IF BUFFER[1]=120 THEN GOTO 30;
+IF(BUFFER[1]=121)OR(BUFFER[1]=122)THEN BEGIN LOC:=2;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Where is the matching @x?');ERROR;
+END;END;22:END;30:{:129};{130:}REPEAT LINE:=LINE+1;
+IF NOT INPUTLN(CHANGEFILE)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Change file ended after @x');ERROR;END;GOTO 10;END;
+UNTIL LIMIT>0;{:130};{131:}BEGIN CHANGELIMIT:=LIMIT;
+IF LIMIT>0 THEN FOR K:=0 TO LIMIT-1 DO CHANGEBUFFER[K]:=BUFFER[K];
+END{:131};10:END;{:128}{132:}PROCEDURE CHECKCHANGE;LABEL 10;
+VAR N:INTEGER;K:0..BUFSIZE;BEGIN IF LINESDONTMAT THEN GOTO 10;N:=0;
+WHILE TRUE DO BEGIN CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;
+OTHERLINE:=LINE;LINE:=TEMPLINE;LINE:=LINE+1;
+IF NOT INPUTLN(CHANGEFILE)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Change file ended before @y');ERROR;END;CHANGELIMIT:=0;
+CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
+LINE:=TEMPLINE;GOTO 10;END;
+{133:}IF LIMIT>1 THEN IF BUFFER[0]=64 THEN BEGIN IF(BUFFER[1]>=88)AND(
+BUFFER[1]<=90)THEN BUFFER[1]:=BUFFER[1]+32;
+IF(BUFFER[1]=120)OR(BUFFER[1]=122)THEN BEGIN LOC:=2;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Where is the matching @y?');ERROR;
+END;END ELSE IF BUFFER[1]=121 THEN BEGIN IF N>0 THEN BEGIN LOC:=2;
+BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Hmm... ',N:1,' of the preceding lines failed to match');
+ERROR;END;END;GOTO 10;END;END{:133};{131:}BEGIN CHANGELIMIT:=LIMIT;
+IF LIMIT>0 THEN FOR K:=0 TO LIMIT-1 DO CHANGEBUFFER[K]:=BUFFER[K];
+END{:131};CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
+LINE:=TEMPLINE;LINE:=LINE+1;
+IF NOT INPUTLN(WEBFILE)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! WEB file ended during a change');ERROR;END;
+INPUTHASENDE:=TRUE;GOTO 10;END;IF LINESDONTMAT THEN N:=N+1;END;10:END;
+{:132}{135:}PROCEDURE GETLINE;LABEL 20;
+BEGIN 20:IF CHANGING THEN{137:}BEGIN LINE:=LINE+1;
+IF NOT INPUTLN(CHANGEFILE)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Change file ended without @z');ERROR;END;BUFFER[0]:=64;
+BUFFER[1]:=122;LIMIT:=2;END;
+IF LIMIT>1 THEN IF BUFFER[0]=64 THEN BEGIN IF(BUFFER[1]>=88)AND(BUFFER[1
+]<=90)THEN BUFFER[1]:=BUFFER[1]+32;
+IF(BUFFER[1]=120)OR(BUFFER[1]=121)THEN BEGIN LOC:=2;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Where is the matching @z?');ERROR;
+END;END ELSE IF BUFFER[1]=122 THEN BEGIN PRIMETHECHAN;
+CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
+LINE:=TEMPLINE;END;END;END{:137};
+IF NOT CHANGING THEN BEGIN{136:}BEGIN LINE:=LINE+1;
+IF NOT INPUTLN(WEBFILE)THEN INPUTHASENDE:=TRUE ELSE IF LIMIT=CHANGELIMIT
+THEN IF BUFFER[0]=CHANGEBUFFER[0]THEN IF CHANGELIMIT>0 THEN CHECKCHANGE;
+END{:136};IF CHANGING THEN GOTO 20;END;LOC:=0;BUFFER[LIMIT]:=32;END;
+{:135}{139:}FUNCTION CONTROLCODE(C:ASCIICODE):EIGHTBITS;
+BEGIN CASE C OF 64:CONTROLCODE:=64;39:CONTROLCODE:=12;
+34:CONTROLCODE:=13;36:CONTROLCODE:=125;32,9:CONTROLCODE:=136;
+42:BEGIN WRITE(OUTPUT,'*',MODULECOUNT+1:1);;CONTROLCODE:=136;END;
+68,100:CONTROLCODE:=133;70,102:CONTROLCODE:=132;123:CONTROLCODE:=9;
+125:CONTROLCODE:=10;80,112:CONTROLCODE:=134;
+84,116,94,46,58:CONTROLCODE:=131;38:CONTROLCODE:=127;
+60:CONTROLCODE:=135;61:CONTROLCODE:=2;92:CONTROLCODE:=3;
+ELSE CONTROLCODE:=0 END;END;{:139}{140:}FUNCTION SKIPAHEAD:EIGHTBITS;
+LABEL 30;VAR C:EIGHTBITS;
+BEGIN WHILE TRUE DO BEGIN IF LOC>LIMIT THEN BEGIN GETLINE;
+IF INPUTHASENDE THEN BEGIN C:=136;GOTO 30;END;END;BUFFER[LIMIT+1]:=64;
+WHILE BUFFER[LOC]<>64 DO LOC:=LOC+1;IF LOC<=LIMIT THEN BEGIN LOC:=LOC+2;
+C:=CONTROLCODE(BUFFER[LOC-1]);IF(C<>0)OR(BUFFER[LOC-1]=62)THEN GOTO 30;
+END;END;30:SKIPAHEAD:=C;END;{:140}{141:}PROCEDURE SKIPCOMMENT;LABEL 10;
+VAR BAL:EIGHTBITS;C:ASCIICODE;BEGIN BAL:=0;
+WHILE TRUE DO BEGIN IF LOC>LIMIT THEN BEGIN GETLINE;
+IF INPUTHASENDE THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Input ended in mid-comment');ERROR;END;GOTO 10;END;END;
+C:=BUFFER[LOC];LOC:=LOC+1;{142:}IF C=64 THEN BEGIN C:=BUFFER[LOC];
+IF(C<>32)AND(C<>9)AND(C<>42)AND(C<>122)AND(C<>90)THEN LOC:=LOC+1 ELSE
+BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Section ended in mid-comment');ERROR;END;LOC:=LOC-1;
+GOTO 10;
+END END ELSE IF(C=92)AND(BUFFER[LOC]<>64)THEN LOC:=LOC+1 ELSE IF C=123
+THEN BAL:=BAL+1 ELSE IF C=125 THEN BEGIN IF BAL=0 THEN GOTO 10;
+BAL:=BAL-1;END{:142};END;10:END;{:141}{145:}FUNCTION GETNEXT:EIGHTBITS;
+LABEL 20,30,31;VAR C:EIGHTBITS;D:EIGHTBITS;J,K:0..LONGESTNAME;
+BEGIN 20:IF LOC>LIMIT THEN BEGIN GETLINE;
+IF INPUTHASENDE THEN BEGIN C:=136;GOTO 31;END;END;C:=BUFFER[LOC];
+LOC:=LOC+1;
+IF SCANNINGHEX THEN{146:}IF((C>=48)AND(C<=57))OR((C>=65)AND(C<=70))THEN
+GOTO 31 ELSE SCANNINGHEX:=FALSE{:146};
+CASE C OF 65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85
+,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111
+,112,113,114,115,116,117,118,119,120,121,122:{148:}BEGIN IF((C=101)OR(C=
+69))AND(LOC>1)THEN IF(BUFFER[LOC-2]<=57)AND(BUFFER[LOC-2]>=48)THEN C:=0;
+IF C<>0 THEN BEGIN LOC:=LOC-1;IDFIRST:=LOC;REPEAT LOC:=LOC+1;
+D:=BUFFER[LOC];
+UNTIL((D<48)OR((D>57)AND(D<65))OR((D>90)AND(D<97))OR(D>122))AND(D<>95);
+IF LOC>IDFIRST+1 THEN BEGIN C:=130;IDLOC:=LOC;END;END ELSE C:=69;
+END{:148};34:{149:}BEGIN DOUBLECHARS:=0;IDFIRST:=LOC-1;
+REPEAT D:=BUFFER[LOC];LOC:=LOC+1;
+IF(D=34)OR(D=64)THEN IF BUFFER[LOC]=D THEN BEGIN LOC:=LOC+1;D:=0;
+DOUBLECHARS:=DOUBLECHARS+1;
+END ELSE BEGIN IF D=64 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Double @ sign missing');ERROR;
+END END ELSE IF LOC>LIMIT THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! String constant didn''t end');ERROR;END;D:=34;END;
+UNTIL D=34;IDLOC:=LOC-1;C:=130;END{:149};
+64:{150:}BEGIN C:=CONTROLCODE(BUFFER[LOC]);LOC:=LOC+1;
+IF C=0 THEN GOTO 20 ELSE IF C=13 THEN SCANNINGHEX:=TRUE ELSE IF C=135
+THEN{151:}BEGIN{153:}K:=0;
+WHILE TRUE DO BEGIN IF LOC>LIMIT THEN BEGIN GETLINE;
+IF INPUTHASENDE THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Input ended in section name');ERROR;END;GOTO 30;END;END;
+D:=BUFFER[LOC];{154:}IF D=64 THEN BEGIN D:=BUFFER[LOC+1];
+IF D=62 THEN BEGIN LOC:=LOC+2;GOTO 30;END;
+IF(D=32)OR(D=9)OR(D=42)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Section name didn''t end');ERROR;END;GOTO 30;END;K:=K+1;
+MODTEXT[K]:=64;LOC:=LOC+1;END{:154};LOC:=LOC+1;
+IF K<LONGESTNAME-1 THEN K:=K+1;IF(D=32)OR(D=9)THEN BEGIN D:=32;
+IF MODTEXT[K-1]=32 THEN K:=K-1;END;MODTEXT[K]:=D;END;
+30:{155:}IF K>=LONGESTNAME-2 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Section name too long: ');END;
+FOR J:=1 TO 25 DO WRITE(OUTPUT,XCHR[MODTEXT[J]]);WRITE(OUTPUT,'...');
+IF HISTORY=0 THEN HISTORY:=1;END{:155};
+IF(MODTEXT[K]=32)AND(K>0)THEN K:=K-1;{:153};
+IF K>3 THEN BEGIN IF(MODTEXT[K]=46)AND(MODTEXT[K-1]=46)AND(MODTEXT[K-2]=
+46)THEN CURMODULE:=PREFIXLOOKUP(K-3)ELSE CURMODULE:=MODLOOKUP(K);
+END ELSE CURMODULE:=MODLOOKUP(K);
+END{:151}ELSE IF C=131 THEN BEGIN REPEAT C:=SKIPAHEAD;UNTIL C<>64;
+IF BUFFER[LOC-1]<>62 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Improper @ within control text');ERROR;END;GOTO 20;END;
+END{:150};
+{147:}46:IF BUFFER[LOC]=46 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=32;
+LOC:=LOC+1;END;
+END ELSE IF BUFFER[LOC]=41 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=93;
+LOC:=LOC+1;END;END;
+58:IF BUFFER[LOC]=61 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=24;
+LOC:=LOC+1;END;END;
+61:IF BUFFER[LOC]=61 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=30;
+LOC:=LOC+1;END;END;
+62:IF BUFFER[LOC]=61 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=29;
+LOC:=LOC+1;END;END;
+60:IF BUFFER[LOC]=61 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=28;
+LOC:=LOC+1;END;
+END ELSE IF BUFFER[LOC]=62 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=26;
+LOC:=LOC+1;END;END;
+40:IF BUFFER[LOC]=42 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=9;
+LOC:=LOC+1;END;
+END ELSE IF BUFFER[LOC]=46 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=91;
+LOC:=LOC+1;END;END;
+42:IF BUFFER[LOC]=41 THEN BEGIN IF LOC<=LIMIT THEN BEGIN C:=10;
+LOC:=LOC+1;END;END;{:147}32,9:GOTO 20;123:BEGIN SKIPCOMMENT;GOTO 20;END;
+125:BEGIN BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Extra }');ERROR;END;
+GOTO 20;END;ELSE IF C>=128 THEN GOTO 20 ELSE END;
+31:{IF TROUBLESHOOT THEN DEBUGHELP;}GETNEXT:=C;END;
+{:145}{157:}PROCEDURE SCANNUMERIC(P:NAMEPOINTER);LABEL 21,30;
+VAR ACCUMULATOR:INTEGER;NEXTSIGN:-1..+1;Q:NAMEPOINTER;VAL:INTEGER;
+BEGIN{158:}ACCUMULATOR:=0;NEXTSIGN:=+1;
+WHILE TRUE DO BEGIN NEXTCONTROL:=GETNEXT;
+21:CASE NEXTCONTROL OF 48,49,50,51,52,53,54,55,56,57:BEGIN{160:}VAL:=0;
+REPEAT VAL:=10*VAL+NEXTCONTROL-48;NEXTCONTROL:=GETNEXT;
+UNTIL(NEXTCONTROL>57)OR(NEXTCONTROL<48){:160};
+BEGIN ACCUMULATOR:=ACCUMULATOR+NEXTSIGN*(VAL);NEXTSIGN:=+1;END;GOTO 21;
+END;12:BEGIN{161:}VAL:=0;NEXTCONTROL:=48;
+REPEAT VAL:=8*VAL+NEXTCONTROL-48;NEXTCONTROL:=GETNEXT;
+UNTIL(NEXTCONTROL>55)OR(NEXTCONTROL<48){:161};
+BEGIN ACCUMULATOR:=ACCUMULATOR+NEXTSIGN*(VAL);NEXTSIGN:=+1;END;GOTO 21;
+END;13:BEGIN{162:}VAL:=0;NEXTCONTROL:=48;
+REPEAT IF NEXTCONTROL>=65 THEN NEXTCONTROL:=NEXTCONTROL-7;
+VAL:=16*VAL+NEXTCONTROL-48;NEXTCONTROL:=GETNEXT;
+UNTIL(NEXTCONTROL>70)OR(NEXTCONTROL<48)OR((NEXTCONTROL>57)AND(
+NEXTCONTROL<65)){:162};BEGIN ACCUMULATOR:=ACCUMULATOR+NEXTSIGN*(VAL);
+NEXTSIGN:=+1;END;GOTO 21;END;130:BEGIN Q:=IDLOOKUP(0);
+IF ILK[Q]<>1 THEN BEGIN NEXTCONTROL:=42;GOTO 21;END;
+BEGIN ACCUMULATOR:=ACCUMULATOR+NEXTSIGN*(EQUIV[Q]-32768);NEXTSIGN:=+1;
+END;END;43:;45:NEXTSIGN:=-NEXTSIGN;132,133,135,134,136:GOTO 30;
+59:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Omit semicolon in numeric definition');ERROR;END;
+ELSE{159:}BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Improper numeric definition will be flushed');ERROR;END;
+REPEAT NEXTCONTROL:=SKIPAHEAD UNTIL(NEXTCONTROL>=132);
+IF NEXTCONTROL=135 THEN BEGIN LOC:=LOC-2;NEXTCONTROL:=GETNEXT;END;
+ACCUMULATOR:=0;GOTO 30;END{:159}END;END;30:{:158};
+IF ABS(ACCUMULATOR)>=32768 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Value too big: ',ACCUMULATOR:1);ERROR;END;
+ACCUMULATOR:=0;END;EQUIV[P]:=ACCUMULATOR+32768;END;
+{:157}{165:}PROCEDURE SCANREPL(T:EIGHTBITS);LABEL 22,30,31,21;
+VAR A:SIXTEENBITS;B:ASCIICODE;BAL:EIGHTBITS;BEGIN BAL:=0;
+WHILE TRUE DO BEGIN 22:A:=GETNEXT;CASE A OF 40:BAL:=BAL+1;
+41:IF BAL=0 THEN BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'! Extra )');ERROR;
+END ELSE BAL:=BAL-1;39:{168:}BEGIN B:=39;
+WHILE TRUE DO BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT
+);WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=B;TOKPTR[Z]:=TOKPTR[Z]+1;
+END;
+IF B=64 THEN IF BUFFER[LOC]=64 THEN LOC:=LOC+1 ELSE BEGIN WRITELN(OUTPUT
+);WRITE(OUTPUT,'! You should double @ signs in strings');ERROR;END;
+IF LOC=LIMIT THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! String didn''t end');ERROR;END;BUFFER[LOC]:=39;
+BUFFER[LOC+1]:=0;END;B:=BUFFER[LOC];LOC:=LOC+1;
+IF B=39 THEN BEGIN IF BUFFER[LOC]<>39 THEN GOTO 31 ELSE BEGIN LOC:=LOC+1
+;BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=39;TOKPTR[Z]:=TOKPTR[Z]+1;END;END;END;
+END;31:END{:168};35:IF T=3 THEN A:=0;{167:}130:BEGIN A:=IDLOOKUP(0);
+BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=(A DIV 256)+128;TOKPTR[Z]:=TOKPTR[Z]+1;
+END;A:=A MOD 256;END;
+135:IF T<>135 THEN GOTO 30 ELSE BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN
+BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=(CURMODULE DIV 256)+168;
+TOKPTR[Z]:=TOKPTR[Z]+1;END;A:=CURMODULE MOD 256;END;
+2:{169:}BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=2;TOKPTR[Z]:=TOKPTR[Z]+1;END;
+BUFFER[LIMIT+1]:=64;
+21:IF BUFFER[LOC]=64 THEN BEGIN IF LOC<LIMIT THEN IF BUFFER[LOC+1]=64
+THEN BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=64;TOKPTR[Z]:=TOKPTR[Z]+1;END;
+LOC:=LOC+2;GOTO 21;END;
+END ELSE BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=BUFFER[LOC];TOKPTR[Z]:=TOKPTR[Z]+1;END;
+LOC:=LOC+1;GOTO 21;END;IF LOC>=LIMIT THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Verbatim string didn''t end');ERROR;
+END ELSE IF BUFFER[LOC+1]<>62 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! You should double @ signs in verbatim strings');ERROR;
+END;LOC:=LOC+2;END{:169};
+133,132,134:IF T<>135 THEN GOTO 30 ELSE BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! @',XCHR[BUFFER[LOC-1]],' is ignored in Pascal text');
+ERROR;END;GOTO 22;END;136:GOTO 30;{:167}ELSE END;
+BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=A;TOKPTR[Z]:=TOKPTR[Z]+1;END;END;
+30:NEXTCONTROL:=A;
+{166:}IF BAL>0 THEN BEGIN IF BAL=1 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Missing )');ERROR;END ELSE BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Missing ',BAL:1,' )''s');ERROR;END;
+WHILE BAL>0 DO BEGIN BEGIN IF TOKPTR[Z]=MAXTOKS THEN BEGIN WRITELN(
+OUTPUT);WRITE(OUTPUT,'! Sorry, ','token',' capacity exceeded');ERROR;
+HISTORY:=3;JUMPOUT;END;TOKMEM[Z,TOKPTR[Z]]:=41;TOKPTR[Z]:=TOKPTR[Z]+1;
+END;BAL:=BAL-1;END;END{:166};
+IF TEXTPTR>MAXTEXTS-4 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Sorry, ','text',' capacity exceeded');ERROR;HISTORY:=3;
+JUMPOUT;END;CURREPLTEXT:=TEXTPTR;TOKSTART[TEXTPTR+4]:=TOKPTR[Z];
+TEXTPTR:=TEXTPTR+1;IF Z=3 THEN Z:=0 ELSE Z:=Z+1;END;
+{:165}{170:}PROCEDURE DEFINEMACRO(T:EIGHTBITS);VAR P:NAMEPOINTER;
+BEGIN P:=IDLOOKUP(T);SCANREPL(T);EQUIV[P]:=CURREPLTEXT;
+TEXTLINK[CURREPLTEXT]:=0;END;{:170}{172:}PROCEDURE SCANMODULE;
+LABEL 22,30,10;VAR P:NAMEPOINTER;BEGIN MODULECOUNT:=MODULECOUNT+1;
+{173:}NEXTCONTROL:=0;
+WHILE TRUE DO BEGIN 22:WHILE NEXTCONTROL<=132 DO BEGIN NEXTCONTROL:=
+SKIPAHEAD;IF NEXTCONTROL=135 THEN BEGIN LOC:=LOC-2;NEXTCONTROL:=GETNEXT;
+END;END;IF NEXTCONTROL<>133 THEN GOTO 30;NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL<>130 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Definition flushed, must start with ',
+'identifier of length > 1');ERROR;END;GOTO 22;END;NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL=61 THEN BEGIN SCANNUMERIC(IDLOOKUP(1));GOTO 22;
+END ELSE IF NEXTCONTROL=30 THEN BEGIN DEFINEMACRO(2);GOTO 22;
+END ELSE{174:}IF NEXTCONTROL=40 THEN BEGIN NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL=35 THEN BEGIN NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL=41 THEN BEGIN NEXTCONTROL:=GETNEXT;
+IF NEXTCONTROL=61 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Use == for macros');ERROR;END;NEXTCONTROL:=30;END;
+IF NEXTCONTROL=30 THEN BEGIN DEFINEMACRO(3);GOTO 22;END;END;END;END;
+{:174};BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Definition flushed since it starts badly');ERROR;END;
+END;30:{:173};{175:}CASE NEXTCONTROL OF 134:P:=0;135:BEGIN P:=CURMODULE;
+{176:}REPEAT NEXTCONTROL:=GETNEXT;UNTIL NEXTCONTROL<>43;
+IF(NEXTCONTROL<>61)AND(NEXTCONTROL<>30)THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Pascal text flushed, = sign is missing');ERROR;END;
+REPEAT NEXTCONTROL:=SKIPAHEAD;UNTIL NEXTCONTROL=136;GOTO 10;END{:176};
+END;ELSE GOTO 10 END;{177:}STORETWOBYTE(53248+MODULECOUNT);{:177};
+SCANREPL(135);
+{178:}IF P=0 THEN BEGIN TEXTLINK[LASTUNNAMED]:=CURREPLTEXT;
+LASTUNNAMED:=CURREPLTEXT;
+END ELSE IF EQUIV[P]=0 THEN EQUIV[P]:=CURREPLTEXT ELSE BEGIN P:=EQUIV[P]
+;WHILE TEXTLINK[P]<MAXTEXTS DO P:=TEXTLINK[P];TEXTLINK[P]:=CURREPLTEXT;
+END;TEXTLINK[CURREPLTEXT]:=MAXTEXTS;{:178};{:175};10:END;
+{:172}{181:}{PROCEDURE DEBUGHELP;LABEL 888,10;VAR K:INTEGER;
+BEGIN DEBUGSKIPPED:=DEBUGSKIPPED+1;
+IF DEBUGSKIPPED<DEBUGCYCLE THEN GOTO 10;DEBUGSKIPPED:=0;
+WHILE TRUE DO BEGIN BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'#');END;;
+READ(INPUT,DDT);IF DDT<0 THEN GOTO 10 ELSE IF DDT=0 THEN BEGIN GOTO 888;
+888:DDT:=0;
+END ELSE BEGIN READ(INPUT,DD);CASE DDT OF 1:PRINTID(DD);2:PRINTREPL(DD);
+3:FOR K:=1 TO DD DO WRITE(OUTPUT,XCHR[BUFFER[K]]);
+4:FOR K:=1 TO DD DO WRITE(OUTPUT,XCHR[MODTEXT[K]]);
+5:FOR K:=1 TO OUTPTR DO WRITE(OUTPUT,XCHR[OUTBUF[K]]);
+6:FOR K:=1 TO DD DO WRITE(OUTPUT,XCHR[OUTCONTRIB[K]]);
+ELSE WRITE(OUTPUT,'?')END;END;END;10:END;}{:181}{182:}BEGIN INITIALIZE;
+{134:}OPENINPUT;LINE:=0;OTHERLINE:=0;CHANGING:=TRUE;PRIMETHECHAN;
+CHANGING:=NOT CHANGING;TEMPLINE:=OTHERLINE;OTHERLINE:=LINE;
+LINE:=TEMPLINE;LIMIT:=0;LOC:=1;BUFFER[0]:=32;INPUTHASENDE:=FALSE;{:134};
+WRITELN(OUTPUT,'This is TANGLE-GPC');{183:}PHASEONE:=TRUE;
+MODULECOUNT:=0;REPEAT NEXTCONTROL:=SKIPAHEAD;UNTIL NEXTCONTROL=136;
+WHILE NOT INPUTHASENDE DO SCANMODULE;
+{138:}IF CHANGELIMIT<>0 THEN BEGIN FOR II:=0 TO CHANGELIMIT DO BUFFER[II
+]:=CHANGEBUFFER[II];LIMIT:=CHANGELIMIT;CHANGING:=TRUE;LINE:=OTHERLINE;
+LOC:=CHANGELIMIT;BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Change file entry did not match');ERROR;END;END{:138};
+PHASEONE:=FALSE;{:183};FOR II:=0 TO 3 DO MAXTOKPTR[II]:=TOKPTR[II];
+{112:}IF TEXTLINK[0]=0 THEN BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! No output was specified.');END;
+IF HISTORY=0 THEN HISTORY:=1;END ELSE BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'Writing the output file');END;;{83:}STACKPTR:=1;
+BRACELEVEL:=0;CURSTATE.NAMEFIELD:=0;CURSTATE.REPLFIELD:=TEXTLINK[0];
+ZO:=CURSTATE.REPLFIELD MOD 4;
+CURSTATE.BYTEFIELD:=TOKSTART[CURSTATE.REPLFIELD];
+CURSTATE.ENDFIELD:=TOKSTART[CURSTATE.REPLFIELD+4];CURSTATE.MODFIELD:=0;
+{:83};{96:}OUTSTATE:=0;OUTPTR:=0;BREAKPTR:=0;SEMIPTR:=0;OUTBUF[0]:=0;
+LINE:=1;{:96};SENDTHEOUTPU;{98:}BREAKPTR:=OUTPTR;SEMIPTR:=0;FLUSHBUFFER;
+IF BRACELEVEL<>0 THEN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'! Program ended at brace level ',BRACELEVEL:1);ERROR;END;
+{:98};BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,'Done.');END;END{:112};
+9999:IF STRINGPTR>256 THEN{184:}BEGIN BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,STRINGPTR-256:1,' strings written to string pool file.');
+END;WRITE(POOL,'*');
+FOR II:=1 TO 9 DO BEGIN OUTBUF[II]:=POOLCHECKSUM MOD 10;
+POOLCHECKSUM:=POOLCHECKSUM DIV 10;END;
+FOR II:=9 DOWNTO 1 DO WRITE(POOL,XCHR[48+OUTBUF[II]]);WRITELN(POOL);
+END{:184};{186:}BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'Memory usage statistics:');END;BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,NAMEPTR:1,' names, ',TEXTPTR:1,' replacement texts;');END;
+BEGIN WRITELN(OUTPUT);WRITE(OUTPUT,BYTEPTR[0]:1);END;
+FOR WO:=1 TO 1 DO WRITE(OUTPUT,'+',BYTEPTR[WO]:1);
+IF PHASEONE THEN FOR II:=0 TO 3 DO MAXTOKPTR[II]:=TOKPTR[II];
+WRITE(OUTPUT,' bytes, ',MAXTOKPTR[0]:1);
+FOR II:=1 TO 3 DO WRITE(OUTPUT,'+',MAXTOKPTR[II]:1);
+WRITE(OUTPUT,' tokens.');{:186};
+{187:}CASE HISTORY OF 0:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'(No errors were found.)');END;1:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'(Did you see the warning message above?)');END;
+2:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'(Pardon me, but I think I spotted something wrong.)');END;
+3:BEGIN WRITELN(OUTPUT);
+WRITE(OUTPUT,'(That was a fatal error, my friend.)');END;END;
+WRITELN(OUTPUT);HALT(HISTORY){:187};END.{:182}
diff --git a/systems/unix/tex-gpc/tech/german.ed b/systems/unix/tex-gpc/tech/german.ed
new file mode 100644
index 0000000000..89ba82cf2f
--- /dev/null
+++ b/systems/unix/tex-gpc/tech/german.ed
@@ -0,0 +1,5 @@
+219c
+\expandafter\def\csname grq \endcsname{%
+.
+w
+q
diff --git a/systems/unix/tex-gpc/tech/mktech b/systems/unix/tex-gpc/tech/mktech
new file mode 100755
index 0000000000..11b489b2d7
--- /dev/null
+++ b/systems/unix/tex-gpc/tech/mktech
@@ -0,0 +1,17 @@
+# Schritt 1: Formatdatei bauen.
+# Hierzu muss die Konstante TRIESIZE vergroessert werden.
+# 16844 ist schon zu klein, obwohl TeX behauptet, er braucht weniger
+# als 14000 (im log-file).
+sed /TRIESIZE=8000/s//TRIESIZE=16845/ ../tex/initex.p >initech.p
+gpc -Wno-warnings --autobuild initech.p
+a.out 'schlicht \dump'
+# Schritt 2: Den Namen der Formatdatei und die TRIESIZE anpassen.
+# Wenn die TRIESIZE hier nicht angepasst wird, kann er die Formatdatei
+# nicht laden.
+# Die Laenge des Namens muss mit der Laenge von 'plain' uebereinstimmen,
+# daher die haessliche Abkuerzung.
+mv schlicht.fmt TeXformats/schli.fmt
+sed -e /plain.fmt/s//schli.fmt/\
+ -e /TRIESIZE=8000/s//TRIESIZE=16845/\
+ ../tex/tex.p >tech.p
+gpc -Wno-warnings --autobuild tech.p
diff --git a/systems/unix/tex-gpc/tech/readme b/systems/unix/tex-gpc/tech/readme
new file mode 100644
index 0000000000..f607a3b5b8
--- /dev/null
+++ b/systems/unix/tex-gpc/tech/readme
@@ -0,0 +1,31 @@
+$\pi$-Tag 2010
+TeCH: TeX mit deutschen Trennmustern
+Die hier vorgeschlagene Konfiguration der Trennmuster ist kompatibel
+zu anderen Distributionen. Sie enth"alt US-Englisch und Deutsch
+(nach der bew"ahrten Rechtschreibung). Voreingestellt ist US-Englisch.
+
+Installation:
+Die deutschen Trennmuster holen:
+ftp ftp://ftp.dante.de/pub/tex/macros/ec-plain/ghyph31.tex
+Und tech bauen:
+$ mktech
+Die Ausgabe ist a.out, die am besten mit dem Namen ,,tech'' ins
+Bin"arverzeichnis kommt.
+
+Das Macropaket german.sty holen:
+ftp ftp://ftp.dante.de/pub/tex/language/german/german.sty
+
+Diese Datei mit dem Datum vom 13.04.199 enth"alt einen Fehler,
+das \grq verschwindet. Mit
+ed <german.ed german.sty
+kann man diesen Fehler korrigieren.
+
+Um die Installation zu testen, tech test aufrufen.
+Die Datei test.tex fa"st die Hinweise aus gerdoc, dem Handbuch f"ur
+german.sty, zusammen.
+Die Datei german.sty ins Verzeichnis TeXinputs stellen.
+
+Nach dem Laden des Pakets german.sty ist deutsch voreingestellt.
+
+\originalTeX zum Zur"uckschalten auf plain.tex
+"FF als Zahl sollte "0FF geschrieben werden.
diff --git a/systems/unix/tex-gpc/tech/schlicht.tex b/systems/unix/tex-gpc/tech/schlicht.tex
new file mode 100644
index 0000000000..ce5a1eeb85
--- /dev/null
+++ b/systems/unix/tex-gpc/tech/schlicht.tex
@@ -0,0 +1,14 @@
+%% hier kommen die deutschen Trenntabellen rein.
+\input ../lib/plain.tex
+\catcode`@=11 % at signs are letters again
+\chardef\l@USenglish=\language
+\chardef\l@english=\language
+\newlanguage\l@german \language=\l@german
+\chardef\l@austrian=\language
+\chardef\l@french=\language
+\input ghyph31
+\message{erledigt.}
+%% auf USEnglisch voreinstellen
+\language=\l@USenglish
+\catcode`@=12 % at signs are no longer letters again
+\def\fmtname{schlicht}\def\fmtversion{3.141592653} %
diff --git a/systems/unix/tex-gpc/tech/test.tex b/systems/unix/tex-gpc/tech/test.tex
new file mode 100644
index 0000000000..d25c721da0
--- /dev/null
+++ b/systems/unix/tex-gpc/tech/test.tex
@@ -0,0 +1,95 @@
+\parindent=0pt
+\overfullrule=0pt
+Hier wird gepr\"uft, ob die Einstellungen von plain \TeX erhalten bleiben.
+\ifnum\language=0\else\errmessage{language nicht 0}\fi
+\ifnum\lefthyphenmin=2\else\errmessage{lefthyphenmin nicht 2}\fi
+\ifnum\righthyphenmin=3\else\errmessage{righthyphenmin nicht 3\fi
+\par und jetzt geht's los:
+\input german.sty
+
+% Das Anf"uhrungszeichen wird schon bei der Definition eines Makros
+% als aktives Zeichen behandelt, nicht erst bei der Expansion.
+\def\qq#1{"`{\tt\char`\" #1}"'}
+
+% Wird hier zwar nicht gebraucht, aber gut zu wissen!
+\def\qq#1{{\tt\char`\" #1}}
+\def\bs#1{{\tt\char`\\ #1}}
+
+\par Die deutschen Trennparameter
+\par Nummer der deutschen Trennmuster: \the\language
+\par Minimall"ange vor dem Trennstrich: \the\lefthyphenmin
+\par Minimall"ange nach dem Trennstrich: \the\righthyphenmin
+\originalTeX
+\par und die originalen Trennparameter:
+\par Nummer der US-Trennmuster: \the\language
+\par Minimall\"ange vor dem Trennstrich: \the\lefthyphenmin
+\par Minimall\"ange nach dem Trennstrich: \the\righthyphenmin
+\germanTeX
+\par Die Trema \qq o und \bs {\char`\"} sind gleich hoch: sch"on und sch\"on
+\originalTeX
+\par In plain \TeX\ sind die Trema h\"oher.
+\germanTeX
+\par Hier gibt es Unterschiede, bei \bs {\char`\"} sind die Trema tiefer:
+Citro"en und Citro\"en
+\originalTeX
+\par und so siehts in plain \TeX\ aus: Citro\"en.
+\germanTeX
+\par Stra"se Ma"ze,
+STRA"SE MA"ZE
+\par "`Anf"uhrungszeichen"' und \glq halbe Anf"uhrungszeichen\grq
+\vskip 1cm
+Warum wird Stra"se nicht getrennt, Ma"se aber sehr wohl?
+
+\centerline{\vbox {\hsize 1pt Stra"se, Ma"se}}
+
+Weil \TeX\ nicht das erste Wort im Paragraphen trennt!
+
+\centerline{\vbox {\hsize 1pt Ma"se, Stra"se}}
+\vskip 1cm
+\par\qq{ck}, \qq{ll}, \qq{tt}, \qq{ff}: Dru"cker, Ro"lladen, Be"ttuch,
+Schi"ffahrt (\TeX\ denkt hier, "`Dru"' sei ein Wort,
+denn \qq{ck} ist, wie alle Befehle, ein Worttrenner.):
+
+\centerline {\vbox {\hsize 1pt Dru"cker, Ro"lladen, Be"ttuch, Schi"ffahrt}}
+\vskip 1cm
+Auflage ({\tt fl}) und Auf"|lage ({\tt f\qq |l}) werden gleich getrennt:
+
+\centerline{\vbox {\hsize 1pt Auf"|lage, Auflage}}
+\eject
+\bs - deaktiviert alle anderen Trennstellen, aber nicht so \qq-:
+
+\centerline{\vbox {\hsize 1pt \relax A "ubertragen, "uber\-tragen, "uber"-tragen }}
+\vskip 1cm
+{\tt -} ist eine Trennstelle, aber nicht \qq {\char`~}:
+
+\centerline{\vbox {\hsize 1pt A bergauf und -ab, bergauf und "~ab}}
+\vskip 0,5cm
+\centerline{\vbox {\hsize 1pt I-Punkt, I"~Punkt}}
+\vskip 1cm
+{\tt -} deaktiviert alle anderen Trennstellen, aber nicht so \qq=:
+
+\centerline{\vbox {\hsize 1pt A Arbeiter-Unfallgesetz, Arbeiter"=Unfallgesetz}}
+\eject
+\bs- verhindert falsche Trennungen, die \qq- erm"oglicht:
+
+\centerline{\vbox {\hsize 1pt A Bedienoberfl"ache, Bedien"-oberfl"ache,
+ Be\-dien"-oberfl"ache}}
+\vskip 1cm
+\qq{\char`\"} unterdr"uckt den Trennstrich: (Wer braucht das?)
+
+\centerline{\vbox {\hsize 1pt Wolf""gang}}
+\vskip 1cm
+Was ist sch"oner: "`Wolfgang"' oder "`\negthinspace Wolfgang"',
+{ \it"`Hof"'\/} oder {\it "`Hof\/"'\/}, "`Hof"' oder "`Hof\/"'?
+\eject
+Die originalen Trennmuster:
+\selectlanguage{USenglish}
+
+\centerline{\vbox {\hsize 1pt A Arbeiterunfallversicherung awsome astonished}}
+\vskip 1cm
+
+Und die deutschen nach bew"ahrter Rechtschreibung:
+\selectlanguage{german}
+
+\centerline{\vbox {\hsize 1pt A Arbeiterunfallversicherung awsome astonished}}
+\end
diff --git a/systems/unix/tex-gpc/tex.ch b/systems/unix/tex-gpc/tex.ch
new file mode 100644
index 0000000000..47c47727af
--- /dev/null
+++ b/systems/unix/tex-gpc/tex.ch
@@ -0,0 +1,1338 @@
+% This is a change file of TeX for GNU Pascal, Wolfgang Helbig, Nov. 2007
+% Handle command line as the first line, Apr. 2008
+% Open vi at the offending line in error dialog Apr. 2008
+% Avoid an underful last line, use buffered output for dvi file, Jul. 2008
+% That "finished" the program. But I kept on improving:
+% July 2008:
+% Don't print empty lines on terminal and log file.
+% Don't trim input lines.
+% November 2009:
+% The last improvement caused an error: On reading a blank only
+% first line might go into a loop. This error cannot be noticed by the user.
+% It was noticed by Joachim Kuebart
+% Some changes were necessary run TeX_GPC to Mac OS X
+% with the current version of GPC. (pointed out by Martin Monperrus and
+% Luis Rivera)
+%
+
+[0] About TeX-GPC
+@x
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+@y
+\def\gglob{20, 26} % this should be the next two sections of "<Global...>"
+\input webmac-gpc
+
+\emergencystretch 0.6in % avoid overfull boxes
+
+\let\maybe=\iffalse % print changed modules only.
+
+% put a mark in the left margin. (see Exercise 14.28 in The TeXbook)
+\def\marke#1{\strut\vadjust{\kern-\dp\strutbox\vbox to 0pt{\vss
+ \llap{\bf #1\/\quad\strut}}}\ignorespaces }
+
+\def\name{\TeX}
+
+\N0\*. \[0] About \namegpc.
+\namegpc\ is a Unix implementation of Donald~E. Knuth's \TeX82 in
+the version 3.14159265 from January 2014. It is based on GNU Pascal.
+The accompaning \.{README} file tells you how to build and run
+\namegpc. To help you identify the differences of \TeX82 and
+\namegpc, the numbers of modified modules carry an asterisk. Letters
+in the left margin indicate the reason for a change. They mean:
+\medskip
+\item{\bf E} fixes an error in \TeX82
+\item{\bf e} fixes a small error in \TeX82
+\item{\bf F} adds a feature as suggested by Knuth
+\item{\bf P} removes a violation of Pascal (Jensen, Wirth: {\sl Pascal
+User Manual and Report\/}, 3rd edition, 1985)
+\item{\bf G} a GNU Pascal extension (Version 20070904)
+\item{\bf U} make Unix happy
+\item{\bf u} make Unix user happy
+\item{\bf h} make Helbig happy
+\item{\bf N} a note that helped me to understand this program.
+\item{\bf B} a bug I couldn't fix.
+\medskip
+
+Identifiers that come with GNU~Pascal are coded as \.{WEB} macros and prefixed
+by `\\{gpc\_}'. That helps to resolve name clashes.
+\filbreak
+\namegpc\ is slightly slower than web2c based programs. To compile
+the device independend file for this document, the web2c version from \TeX~Life 2008
+ran 1.1 seconds and \namegpc\ 1.2 seconds.
+\filbreak
+Going with Dijkstra, see
+\.{http://www.cs.utexas.edu/users/EWD/videos/noorderlicht.mpg}, I
+don't believe in version numbers, since I don't believe in maintaining
+software---I consider \namegpc\ finished---and it must go without
+a number. This does not mean that I don't care any more about
+\namegpc; comments or questions are quite welcome. In fact, I
+tried to explain why I changed what and how in order to encourage
+you to undertake further modifications or bugfixes yourself and
+I'll be glad to help.
+\filbreak
+I wish to thank Frank Heckenbach and Emil Jerabek from the GNU
+Pascal mailing list for clarifying GPC's I/O buffering strategies,
+and David Kastrup from the \.{de.comp.text.tex} news group for
+enlightening articles on some of \TeX's more obscure features and for
+discussing the `empty last line error'.
+\filbreak
+The 2008 edition of \namegpc\ was tested on NetBSD 3.1 and GPC~20020510,
+which happens to be the version of GNU~Pascal offered in the NetBSD
+package collection. This edition was run on Mac~OS~X 10.6.2 and
+GPC~20070904. Most people seem to run \namegpc\ with the current GPC
+version, which caused trouble in two cases:
+(1) The integer parameter to be passed to \\{gpc\_install\_signal\_handler}
+is now of type \\{cinteger} instead of \\{integer}. (2) The function
+\\{gpc\_install\_signal\_handler} was mistreated as a procedure by
+\namegpc, and the current version of GPC won't let you go away with
+that anymore. Luis Rivera and Martin Monperrus detected this error,
+and Martin suggested to publish an edition that runs with the current
+version of GPC which is this one.
+
+Joachim Kuebart spotted another error in the 2008 edition. When the
+first line consists of blanks only, a loop is not terminated properly.
+Joachim found this by reading this document, not by running \namegpc.
+This in turn motivated me to improve the comments resulting in a
+lot of changes.
+
+\namegpc\ slightly differs from \TeX: On input, trailing blanks are
+not removed, on input of the first line, leading blanks are not
+removed either. This lets you interactively enter `\.{I \\showbox0\
+}' to make \namegpc\ show box 0. This doesn't work if the trailing
+blank were removed.
+
+\TeX\ writes an additional empty line whenever it prompts you on
+the terminal. \namegpc\ doesn't. Finally \TeX\ emits an `\.{Underfull
+\\hbox}' warning whenever the last line of a paragraph happens to include
+glue only, because then \TeX\ would erroneously remove the
+\.{parfillskip}. \namegpc\ will keep it.
+
+% \TeX82 will emit an underfull box warning here, \namegpc\ won't.
+\setbox0=\hbox to \hsize {\hfil\ \strut}
+\noindent\box0\ \ \par
+\bigskip
+\address
+\fi
+@z
+
+[2] Change the banner line
+@x
+known as `\TeX' [cf.~Stanford Computer Science report CS1027,
+November 1984].
+
+@d banner=='This is TeX, Version 3.14159265' {printed when \TeX\ starts}
+@y
+known as `\TeX' [cf.~Stanford Computer Science report CS1027,
+November 1984].
+
+\marke h Since \namegpc\ differs from \TeX\ to make me happy, I have to
+change the banner line.
+
+@d banner=='This is TeX-GPC'
+@z
+
+[4] program header
+@x
+@d mtype==t@&y@&p@&e {this is a \.{WEB} coding trick:}
+@y
+
+\marke P Pascal wants the identifiers of the standard text files
+\\{input} and \\{output} in the parameterlist of the program header.
+
+\marke N One of the \.{WEB} macros is named \\{input}
+as well. To make \.{TANGLE} write \.{INPUT} into the Pascal source
+file instead of the expansion of the macro, you code the name as
+a concatenation of one letter identifiers since one letter identifiers
+cannot be macro names. The same
+applies to \\{type}.
+
+\marke G To access declarations from GPC's runtime system you need
+to |gpc_import| @!|gpc_gpc|. |gpc_only| avoids further name clashes.
+
+\marke N The procedure |initialize| passes |set_interrupt| to
+|gpc_install_signal_handler|. Since |set_interrupt| is declared
+further down, you need a |forward| declaration.
+
+@d term_in==i @& n @& p @& u @& t
+@d term_out==o @& u @& t @& p @& u @& t
+@d mtype==t @& y @& p @& e
+@f mtype==type
+@d gpc_import==i @& m @& p @& o @& r @& t
+@f gpc_import==label
+@d gpc_only==o @& n @& l @& y
+@f gpc_only==then
+@d gpc_gpc==g @& p @& c
+@z
+
+[4] program header
+@x
+program TEX; {all file names are defined dynamically}
+@y
+program TEX(@!term_in,@!term_out);
+gpc_import gpc_gpc gpc_only
+(gpc_execute,gpc_install_signal_handler, gpc_sig_int);
+@z
+
+[4] forward reference for signal handler
+@x
+procedure initialize; {this procedure gets things started properly}
+@y
+procedure set_interrupt(signal: gpc_integer); forward; @t\2@>
+@#
+procedure initialize; {this procedure gets things started properly}
+@z
+
+Since @x, @y, and @z only define a change block when they begin a
+line, you deactivate a block by indenting it (shift right) and
+activate it by unindenting it (shift left). With vi set the cursor
+to the @x line and type >} or <} to (un)indent a paragraph.
+
+[7] shift left to turn debugging on, right to turn it off
+@x
+@d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+@d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+@y
+@d debug== {change this to `$\\{debug}\equiv\.{@@\{}$' when not debugging}
+@d gubed== {change this to `$\\{gubed}\equiv\.{@@\}}$' when not debugging}
+@z
+
+[7] shift left to turn stats on, right to turn them off.
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$' when gathering
+ usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$' when gathering
+ usage statistics}
+@y
+@d stat== {change this to `$\\{stat}\equiv\.{@@\{}$' to turn off statistics}
+@d tats== {change this to `$\\{tats}\equiv\.{@@\}}$' to turn off statistics}
+@z
+
+
+[8] shift left to build TEX and right to build INITEX.
+ @x initex
+ @d init== {change this to `$\\{init}\equiv\.{@@\{}$' in the production version}
+ @d tini== {change this to `$\\{tini}\equiv\.{@@\}}$' in the production version}
+ @y
+ @d init==@{ {change this to `$\\{init}\equiv $' for \.{INITEX}}
+ @d tini==@t@>@} {change this to `$\\{tini}\equiv $' for \.{INITEX}}
+ @z
+
+[9] compiler directives, turn off I/O checking.
+@x
+@^overflow in arithmetic@>
+@y
+@^overflow in arithmetic@>
+
+\marke G If the first character of a \PASCAL\ comment is a dollar
+sign, GNU~Pascal treats the comment as a ``compiler directive''.
+GPC aborts when it detects an I/O error. To let \namegpc\ handle
+an I/O error while opening an input file, you have to turn off I/O
+checking altogether by the \.{I-} directive.
+
+\marke b In contrast to \ph\ GNU~Pascal offers no directive to
+check for arithmetic overflow.
+
+\marke e Knuth suggests to turn on range checking while debugging.
+GPC aborts when it spots range violation. Those violations might
+happen when the debugger shows a memeroy cell assumed to contain a
+|glue_ratio|. Even though turning of range checking doubles the
+speed of \TeX\ I suggest to turn it on when not debugging, just to
+get another check from Knuth for discovering an error.
+
+@^system dependencies@>
+@^GNU Pascal@>
+@z
+
+[9] compiler directives, turn off I/O checking, continued
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@{@&$I-@} {no I/O checking}
+@!debug @{@&$R-@}@+ gubed {no range check while debugging}
+@z
+
+[10] default case branch
+@x
+\PASCAL s have, in fact, done this, successfully but not happily!)
+@:PASCAL H}{\ph@>
+
+@d othercases == others: {default for cases not listed explicitly}
+@y
+\PASCAL s have, in fact, done this, successfully but not happily!)
+@:PASCAL H}{\ph@>
+
+\marke G This is the only place I voluntarily use a GPC extension
+to Pascal. GPC offers |otherwise| and |else|. I decided for |else|
+because I do not want to add
+another gpc-keyword. Furthermore, Wirth uses |else| in Modula~2.
+@^GNU Pascal@>
+
+@d othercases == @+ else {default for cases not listed explicitly}
+@z
+
+[11]
+@x
+in production versions of \TeX.
+@y
+in production versions of \TeX.
+
+\marke N I didn't change the constants, leaving it up to you to
+adopt them to your task. Just keep the Pascal source for \.{tex}
+around. So you can change them without going all the way through
+modifying \.{tex.ch} and tangeling it. Note that for \.{initex}
+|mem_top| and |mem_max| must agree.
+
+\marke U One of the constants is the filename of the string pool
+file which needs an adoption to Unix.
+@z
+
+The changes headed by trip need to be made for the trip test suite.
+
+[11]
+ @x trip
+ @!mem_max=30000; {greatest index in \TeX's internal |mem| array;
+ @y
+ @!mem_max=3000; {greatest index in \TeX's internal |mem| array;
+ @z
+
+[11]
+ @x trip
+ @!mem_min=0; {smallest index in \TeX's internal |mem| array;
+ @y
+ @!mem_min=1; {smallest index in \TeX's internal |mem| array;
+ @z
+
+[11]
+ @x trip
+ @!error_line=72; {width of context lines on terminal error messages}
+ @!half_error_line=42; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=79; {width of longest text lines output; should be at least 60}
+ @y
+ @!error_line=64; {width of context lines on terminal error messages}
+ @!half_error_line=32; {width of first lines of contexts in terminal
+ error messages; should be between 30 and |error_line-15|}
+ @!max_print_line=72; {width of longest text lines output; should be at least 60}
+ @z
+
+[11] location of pool file
+@x
+@!pool_name='TeXformats:TEX.POOL ';
+@y
+@!pool_name='TeXformats/tex.pool ';
+@z
+
+
+[12]
+ @x trip
+ @d mem_bot=0 {smallest index in the |mem| array dumped by \.{INITEX};
+ must not be less than |mem_min|}
+ @d mem_top==30000 {largest index in the |mem| array dumped by \.{INITEX};
+ must be substantially larger than |mem_bot|
+ and not greater than |mem_max|}
+ @y
+ @d mem_bot=1 {smallest index in the |mem| array dumped by \.{INITEX};
+ must not be less than |mem_min|}
+ @d mem_top==3000 {largest index in the |mem| array dumped by \.{INITEX};
+ must be substantially larger than |mem_bot|
+ and not greater than |mem_max|}
+ @z
+
+
+[25]
+@x
+for us to specify simple operations on word files before they are defined.
+@y
+for us to specify simple operations on word files before they are
+defined.
+
+\marke G
+GNU~Pascal ignores |packed| for file types. Integer subranges occupy
+32 bits, so it writes 4 byte for every |eight_bits| element.
+GNU~Pascal offers two extensions to get at 8 bit bytes: Use the
+predefined type |byte| for |eight_bits| or pack the subrange type.
+Since packing subrange types is rather strange extension to Pascal, I decided
+for the byte.
+@d gpc_byte==b @& y @& t @& e
+
+@^GNU Pascal@>
+@z
+
+[25] the type of text_files is text
+@x
+@!eight_bits=0..255; {unsigned one-byte quantity}
+@!alpha_file=packed file of text_char; {files that contain textual data}
+@y
+@!eight_bits=gpc_byte; {unsigned one-byte quantity}
+@!alpha_file=t @& e @& x @& t; {\marke P Pascal requires |text|}
+@z
+
+[27]
+@x
+\TeX's file-opening procedures return |false| if no file identified by
+|name_of_file| could be opened.
+
+@d reset_OK(#)==erstat(#)=0
+@d rewrite_OK(#)==erstat(#)=0
+@y
+\marke G In Pascal, external files must occur in the program heading
+and GNU~Pascal asks the user whenever an external file is
+opened. But \.{initex} wants to reset \.{tex.pool} and rewrite
+\.{plain.fmt} without asking
+the user for the file name.
+We are lucky: GNU~Pascal lets you open external files by passing its name as
+a second argument to |reset| resp. |rewrite|. The function |gpc_trim|
+removes trailing spaces that would otherwise be part of the file
+name. The function |gpc_io_result| returns a nonzero value if any
+error occurred since the last invocation of |gpc_io_result|.
+
+\marke G Buffering output of the DVI file accelerates \namegpc\
+dramatically. To get at output buffering, the file needs to be a
+|gpc_untyped_file|;
+
+@^GNU Pascal@>
+@^system dependencies@>
+
+@d gpc_trim==t@&r@&i@&m
+@d gpc_io_result==i@&o@&r@&e@&s@&u@&l@&t
+@d reset_OK(#)==gpc_io_result=0
+@d rewrite_OK(#)==gpc_io_result=0
+@d clear_io_result==@+if gpc_io_result=0 then do_nothing
+@z
+
+[27] reset and rewrite for each of three file types
+@x alpha_file
+begin reset(f,name_of_file,'/O'); a_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); a_open_in:=reset_OK(f);
+@z
+@x
+begin rewrite(f,name_of_file,'/O'); a_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+a_open_out:=rewrite_OK(f);
+@z
+
+byte_file
+@x
+begin reset(f,name_of_file,'/O'); b_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); b_open_in:=reset_OK(f);
+@z
+@x
+function b_open_out(var f:byte_file):boolean;
+ {open a binary file for output}
+begin rewrite(f,name_of_file,'/O'); b_open_out:=rewrite_OK(f);
+@y
+function b_open_out(var f:gpc_untyped_file):boolean;
+ {open a binary file for output}
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file),1);
+b_open_out:=rewrite_OK(f);
+@z
+
+@x word_file
+begin reset(f,name_of_file,'/O'); w_open_in:=reset_OK(f);
+@y
+begin clear_io_result; reset(f,gpc_trim(name_of_file)); w_open_in:=reset_OK(f);
+@z
+@x
+begin rewrite(f,name_of_file,'/O'); w_open_out:=rewrite_OK(f);
+@y
+begin clear_io_result; rewrite(f,gpc_trim(name_of_file));
+w_open_out:=rewrite_OK(f);
+@z
+
+[28] reference to GNU~Pascal:
+@x
+These procedures should not generate error messages if a file is
+being closed before it has been successfully opened.
+@y
+These procedures should not generate error messages if a file is
+being closed before it has been successfully opened.
+
+\marke G GNU~Pascal has accidently a very similar procedure |gpc_close|.
+But we need another routine to close a |gpc_untyped_file|, which is
+necessary for buffering the output.
+@^GNU Pascal@>
+
+@d gpc_close==c@&l@&o@&s@&e
+@z
+
+@x
+procedure w_close(var f:word_file); {close a word file}
+begin close(f);
+end;
+@y
+procedure w_close(var f:word_file); {close a word file}
+begin close(f);
+end;
+@#
+procedure u_close(var f:gpc_untyped_file); {close an untyped file}
+begin close(f);
+end;
+@z
+
+[31]
+@x
+finer tuning is often possible at well-developed \PASCAL\ sites.
+@^inner loop@>
+
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+var last_nonblank:0..buf_size; {|last| with trailing blanks removed}
+begin if bypass_eoln then if not eof(f) then get(f);
+ {input the first character of the line into |f^|}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin last_nonblank:=first;
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ if buffer[last-1]<>" " then last_nonblank:=last;
+ end;
+ last:=last_nonblank; input_ln:=true;
+ end;
+end;
+@y
+finer tuning is often possible at well-developed \PASCAL\ sites.
+@^inner loop@>
+
+\marke h Since \namegpc\ does not remove trailing spaces, |buffer[last-1]|
+might hold a space.
+
+\marke P
+\ph\ lets you |reset| the terminal input file with the first |get|
+`surpressed'. For several reasons, this feature is not exploited by
+\namegpc. First, it is not provided by GPC. Second rightly so, since it violates the
+specification of Pascal. Third, it makes the program quite ugly by
+destroying the beautiful equivalence of terminal and disk files.
+Fourth, since \namegpc\ uses Pascal's standard text file |input|,
+it should not reset that file at all. Fifth, surpressing the first
+|get| is offered by \ph\ to address a problem, namely that the
+program stays in the reset function waiting for user input and this
+problem is solved much more beautiful by ``lazy I/O'', whereby the
+program only waits for user input if it is needed. This is suggested
+in the {\sl Pascal User Manual}, implemented by GNU~Pascal and
+exploited by \namegpc. This leads to a much cleaner implementaion
+of |input_ln|, which can always savely assume that |f^| holds the
+first character of the next line. This condition is established by
+Pascal's |reset| and maintained by |input_ln|.
+
+\marke h
+Unlike \TeX82 \namegpc\ leaves trailing spaces in the input line.
+
+\marke G Frank Heckenbach pointed out that GNU~Pascal employes
+buffered I/O on input files---no need to avoid high system overhead
+here.
+@^Heckenbach, Frank@>
+
+@p function input_ln(var f:alpha_file;@!bypass_eoln:boolean):boolean;
+ {inputs the next line or returns |false|}
+begin
+ {ignore |bypass_eoln|. Assuming |f| being positioned at the first character}
+last:=first; {cf.\ Matthew 19\thinspace:\thinspace30}
+if eof(f) then input_ln:=false
+else begin
+ while not eoln(f) do
+ begin if last>=max_buf_stack then
+ begin max_buf_stack:=last+1;
+ if max_buf_stack=buf_size then begin
+ read_ln(f); {complete the current line}
+ @<Report overflow of the input buffer, and abort@>;
+ end;
+ end;
+ buffer[last]:=xord[f^]; get(f); incr(last);
+ end;
+ get(f); {Advance |f| to the first character of the next line}
+ input_ln:=true;
+ end;
+end;
+@z
+
+[32] term_in and term_out are the standard pascal files
+@x
+is considered an output file the file variable is |term_out|.
+@^system dependencies@>
+
+@<Glob...@>=
+@!term_in:alpha_file; {the terminal as an input file}
+@!term_out:alpha_file; {the terminal as an output file}
+@y
+is considered an output file the file variable is |term_out|.
+\marke P Pascal's standard text files are declared implicitly.
+@z
+
+[33]
+@x
+@ Here is how to open the terminal files
+in \ph. The `\.{/I}' switch suppresses the first |get|.
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+
+@d t_open_in==reset(term_in,'TTY:','/O/I') {open the terminal for text input}
+@d t_open_out==rewrite(term_out,'TTY:','/O') {open the terminal for text output}
+@y
+@ Here is how to open the terminal files
+in \ph. The `\.{/I}' switch suppresses the first |get|.
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+
+\marke P In Pascal, the standard text files are openend implicitly.
+
+@d t_open_in==do_nothing {open the terminal for text input}
+@d t_open_out==do_nothing {open the terminal for text output}
+@z
+
+[34]
+@x
+some instruction to the operating system. The following macros show how
+these operations can be specified in \ph:
+@:PASCAL H}{\ph@>
+@^system dependencies@>
+@y
+some instruction to the operating system.
+
+\marke G Nothing needs to be done to update the terminal, since
+GNU~Pascal does not employ buffered output on typed files. I do not
+know how to clear the type ahead buffer, so \namegpc\ does nothing
+here. Unix holds terminal output, when it receives \.{\^S} and
+continues writing to the terminal, when it receives \.{\^Q}. These
+`flow control' characters only work when sent from the terminal but
+not when sent to the terminal. \marke B Here I give up, since I
+don't know how to restart the output from the writing side so
+\namegpc\ does nothing. Mac OS X does not stop terminal output when
+it receives \.{\^S}.
+
+@^GNU Pascal@>
+@^system dependencies@>
+@z
+
+[34]
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@d clear_terminal == break_in(term_in,true) {clear the terminal input buffer}
+@d wake_up_terminal == do_nothing {cancel the user's cancellation of output}
+@y
+@d update_terminal == do_nothing {empty the terminal output buffer}
+@d clear_terminal == do_nothing {clear the terminal input buffer}
+@d wake_up_terminal == do_nothing {cancel the user's cancellation of output}
+@z
+
+[36] command line
+@x
+not be typed immediately after~`\.{**}'.)
+
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+
+@y
+not be typed immediately after~`\.{**}'.)
+
+\marke F This procedure puts the command line arguments separated
+by spaces into |buffer|. Like |input_ln| it updates |last| so that
+|buffer[first..last)| will contain the command line.
+
+\marke G GNU~Pascal's function~|@!gpc_param_count| gives the number of
+command line arguments. The function~|@!gpc_param_str(n)| returns the
+n-th argument for |0 <= n <= gpc_param_count| in a |@!gpc_string|,
+whose length is returned by the function~|@!gpc_length|.
+A |gpc_string| is like a |packed array[1..gpc_length] of char| with
+varying length.
+
+@^GNU Pascal@>
+@^system dependencies@>
+
+@d loc==cur_input.loc_field {location of first unread character in |buffer|}
+@d gpc_string==s @& t @& r @& i @& n @& g {a string with varying length}
+@d gpc_length==l @& e @& n @& g @& t @& h
+@d gpc_param_count==p @& a @& r @& a @& m @& c @& o @& u @& n @& t
+@d gpc_param_str==p @& a @& r @& a @& m @&s @& t @& r
+ {GPC function returning the length of a |gpc_string|}
+
+@p procedure input_command_ln; {get the command line in |buffer|}
+var argc: integer; {argument counter}
+ arg: gpc_string; {argument}
+ cc: integer; {character counter in argument}
+begin last := first; argc := 1;
+while argc <= gpc_param_count do
+ begin cc := 1; arg := gpc_param_str(argc); incr(argc);
+ while cc <= gpc_length(arg) do
+ begin
+ if last+1>=buf_size then
+ @<Report overflow of the input buffer, and abort@>;
+ buffer[last] := xord[arg[cc]]; incr(last); incr(cc);
+ end;
+ if (argc <= gpc_param_count) then begin
+ buffer[last] := " "; incr(last); {insert a space between arguments}
+ end;
+ end;
+end;
+@z
+
+[37] command line.
+@x
+@ The following program does the required initialization
+without retrieving a possible command line.
+It should be clear how to modify this routine to deal with command lines,
+if the system permits them.
+@^system dependencies@>
+
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in;
+loop@+begin wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in,true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ loc:=first;
+ while (loc<last)and(buffer[loc]=" ") do incr(loc);
+ if loc<last then
+ begin init_terminal:=true;
+ return; {return unless the line was all blank}
+ end;
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+exit:end;
+@y
+@ \marke F The following program treats a non empty command line as
+the first line.
+
+The 2008 edition of \namegpc\ erranously assumed |buffer[last-1] <> " "|
+which does not hold if your first line is all blank as Joachim Kuebart noted.
+@^Kuebart, Joachim@>
+
+@p function init_terminal:boolean; {gets the terminal input started}
+label exit;
+begin t_open_in; input_command_ln;
+while first=last do begin
+ wake_up_terminal; write(term_out,'**'); update_terminal;
+@.**@>
+ if not input_ln(term_in, true) then {this shouldn't happen}
+ begin write_ln(term_out);
+ write_ln(term_out,'! End of file on the terminal... why?');
+@.End of file on the terminal@>
+ init_terminal:=false; return;
+ end;
+ if first=last then
+ write_ln(term_out,'Please type the name of your input file.');
+ end;
+loc := first;
+init_terminal:=true;
+exit: end;
+@z
+
+[79] start editor
+@x
+contains entries in positions |0..(help_ptr-1)|. They should be printed
+in reverse order, i.e., with |help_line[0]| appearing last.
+@y
+contains entries in positions |0..(help_ptr-1)|. They should be printed
+in reverse order, i.e., with |help_line[0]| appearing last.
+
+\marke F \namegpc\ lets the user jump into \.{vi} to edit the current input
+file at the current line. After saveing line number and file name
+\namegpc\ jumps out and then launches \.{vi} passing the saved values.
+
+@z
+
+@x
+@!use_err_help:boolean; {should the |err_help| list be shown?}
+@y
+@!use_err_help:boolean; {should the |err_help| list be shown?}
+@!edit_line: integer; {line number to be passed to the system editor}
+@!edit_file_name: str_number; {file name to be passed to the system editor}
+@z
+
+[80] initial value for edit arguments
+@x
+help_ptr:=0; use_err_help:=false;
+@y
+help_ptr:=0; use_err_help:=false; edit_line:=0; edit_file_name:=0;
+@z
+
+[84] set edit_cmd
+@x
+ begin print_nl("You want to edit file ");
+@.You want to edit file x@>
+ slow_print(input_stack[base_ptr].name_field);
+ print(" at line "); print_int(line);
+ interaction:=scroll_mode; jump_out;
+ end;
+@y
+ begin {save values to be passed to the system editor\marke F}
+ edit_file_name := input_stack[base_ptr].name_field;
+ edit_line := line;
+ interaction:=scroll_mode; jump_out;
+ end;
+@z
+
+[96] interrupt is predefined and not implemented in GNU~Pascal
+@x
+a way to make |interrupt| nonzero using the \PASCAL\ debugger.
+@y
+a way to make |interrupt| nonzero using the \PASCAL\ debugger.
+
+\marke G GNU~Pascal reserves the identifier \\{interrupt},
+which seems a bug. \.{WEB} provides a simple workaround.
+@^GNU Pascal@>
+@d interrupt==tex_interrupt
+@f interrupt==true
+@z
+
+[109]
+@x
+routines cited there must be modified to allow negative glue ratios.)
+@y
+routines cited there must be modified to allow negative glue ratios.)
+
+\marke G In GNU~Pascal a |gpc_short_real| has the desired size.
+@d gpc_short_real==s @& h @& o @& r @& t @& r @& e @& a @& l
+@z
+
+@x
+@!glue_ratio=real; {one-word representation of a glue expansion factor}
+@y
+@!glue_ratio=gpc_short_real; {one-word representation of a glue expansion
+ factor in GNU~Pascal}
+@^GNU Pascal@>
+@z
+
+[112]
+@x
+macros are simplified in the obvious way when |min_quarterword=0|.
+@^inner loop@>@^system dependencies@>
+
+@d qi(#)==#+min_quarterword
+ {to put an |eight_bits| item into a quarterword}
+@d qo(#)==#-min_quarterword
+ {to take an |eight_bits| item out of a quarterword}
+@d hi(#)==#+min_halfword
+ {to put a sixteen-bit item into a halfword}
+@d ho(#)==#-min_halfword
+ {to take a sixteen-bit item from a halfword}
+@y
+macros are simplified in the obvious way when |min_quarterword=0|.
+\marke G And this can be done here!
+@^inner loop@>@^system dependencies@>
+
+@d qi(#)==#
+ {to put an |eight_bits| item into a quarterword}
+@d qo(#)==#
+ {to take an |eight_bits| item out of a quarterword}
+@d hi(#)==#
+ {to put a sixteen-bit item into a halfword}
+@d ho(#)==#
+ {to take a sixteen-bit item from a halfword}
+@z
+
+[241]
+@x
+users probably want a better approximation to the truth.
+@y
+users probably want a better approximation to the truth.
+
+\marke G GNU~Pascal provides the |gpc_get_time_stamp|~function,
+which stores the system time in its argument.
+
+@^GNU Pascal@>
+@d gpc_time_stamp == t@&i@&m@&e@&s@&t@&a@&m@&p
+@d gpc_get_time_stamp == g@&e@&t@&t@&i@&m@&e@&s@&t@&a@&m@&p
+@d gpc_minute == m@&i@&n@&u@&t@&e
+@d gpc_hour == h@&o@&u@&r
+@d gpc_day==d@&a@&y
+@d gpc_month==m@&o@&n@&t@&h
+@d gpc_year==y@&e@&a@&r
+@z
+
+[241]
+@x
+begin time:=12*60; {minutes since midnight}
+day:=4; {fourth day of the month}
+month:=7; {seventh month of the year}
+year:=1776; {Anno Domini}
+end;
+@y
+var t: gpc_time_stamp;
+begin
+gpc_get_time_stamp(t);
+time:=t.gpc_minute + t.gpc_hour*60; {minutes since midnight}
+day:=t.gpc_day;
+month:=t.gpc_month;
+year:=t.gpc_year; {Anno Domini}
+end;
+@z
+
+[360] Don't print empty lines
+@x
+@ All of the easy branches of |get_next| have now been taken care of.
+There is one more branch.
+@y
+@ All of the easy branches of |get_next| have now been taken care of.
+There is one more branch.
+
+\marke h \TeX82 ends the current line by calling |print_ln| even
+if the line is empty. This causes an additional empty line that I
+want to avoid. Calling |print_nl("")| is smarter. It ends
+the current line only if it is not empty.
+@z
+
+@x
+ print_ln; first:=start;
+@y
+ print_nl(""); first:=start;
+@z
+
+@x [514]
+|TEX_font_area|. These system area names will, of course, vary from place
+to place.
+@y
+|TEX_font_area|. These system area names will, of course, vary from place
+to place.
+
+\marke U Use the Unix file separator.
+@z
+
+[514]
+@x
+@d TEX_area=="TeXinputs:"
+@.TeXinputs@>
+@d TEX_font_area=="TeXfonts:"
+@.TeXfonts@>
+@y
+@d TEX_area=="TeXinputs/" {i.e., a subdirectory of the working directory}
+@.TeXinputs@>
+@d TEX_font_area=="TeXfonts/" {dito}
+@.TeXfonts@>
+@z
+
+[516]
+@x
+ if (c=">")or(c=":") then
+@y
+ if c="/" then {use ``/'' as a file name separator\marke U}
+@z
+
+[521]
+@x
+TEX_format_default:='TeXformats:plain.fmt';
+@y
+TEX_format_default:='TeXformats/plain.fmt';
+ {``/'' is the Unix file name separator\marke U}
+@z
+
+[532] untyped file inclusion
+@x
+ship out a box of stuff, we shall use the macro |ensure_dvi_open|.
+@y
+ship out a box of stuff, we shall use the macro |ensure_dvi_open|.
+
+\marke G To get buffered output, the file needs to be a |gpc_untyped_file|.
+
+@d gpc_untyped_file == f@&i@&l@&e
+@z
+
+@x
+ output_file_name:=b_make_name_string(dvi_file);
+@y
+ output_file_name:=make_name_string;
+@z
+
+@x
+@!dvi_file: byte_file; {the device-independent output goes here}
+@y
+@!dvi_file: gpc_untyped_file; {the device-independent output goes here}
+@z
+
+[537]
+@x
+@ Let's turn now to the procedure that is used to initiate file reading
+when an `\.{\\input}' command is being processed.
+
+@y
+@ Let's turn now to the procedure that is used to initiate file reading
+when an `\.{\\input}' command is being processed.
+
+\marke e Keep the complete file name since it might be needed to
+be passed to the system editor.
+(\TeX82 strips off area and extension to conserve string
+pool space.)
+@z
+
+[537]
+@x
+if name=str_ptr-1 then {we can conserve string pool space now}
+ begin flush_string; name:=cur_name;
+ end;
+@y
+@z
+
+[597] use buffered output for dvi file
+@x
+output an array of words with one system call.
+@y
+output an array of words with one system call.
+
+\marke G In fact, buffering dramatically cuts down system overhead. To
+compile this document, a program without buffering spent $48.45\rm\,s$
+in the kernel but with buffering only $0.57\rm\,s$. The total
+times were $64.45\rm\,s$ vs. $11.40\rm\,s$.
+
+GNU~Pascal's |@!gpc_block_write| procedure takes an untyped |file|, an
+|array| and the number of bytes to be written.
+The |array| here is given as
+a `slice', another extension of GNU~Pascal. It should be clear,
+what |buffer[a..b]| means. This simple change was suggested by
+Emil Jerabek.
+@^Jerabek, Emil@>
+
+@d gpc_block_write == b @& l @& o @& c @& k @& w @& r @& i @& t @& e
+@z
+
+[597] use buffered output for dvi file
+@x
+@p procedure write_dvi(@!a,@!b:dvi_index);
+var k:dvi_index;
+begin for k:=a to b do write(dvi_file,dvi_buf[k]);
+end;
+@y
+@p procedure write_dvi(@!a,@!b:dvi_index);
+begin gpc_block_write(dvi_file,dvi_buf[a..b], b-a+1);
+end;
+@z
+
+[642]
+@x
+ b_close(dvi_file);
+@y
+ u_close(dvi_file); {\marke G |dvi_file| is an untyped file}
+@z
+
+[816] save pointer to penalty_node
+@x
+same number of |mem|~words.
+@^data structure assumptions@>
+@y
+same number of |mem|~words.
+@^data structure assumptions@>
+
+\marke E
+\TeX82 prunes discardable nodes from the beginning of a new line until
+it reaches a nondiscardable node. Now, if the last line of a paragraph
+contains discardables only, the \.{\\parfillskip} glue at the end of the
+paragraph will also be removed, since it is a discardable. This will
+give you an empty \.{\\hbox}. Finally \TeX\ appends \.{\\rightskip} glue.
+This gives you a nonempty \.{\\hbox}, raising a \.{Underfull \\hbox}
+warning.
+
+To avoid this happening, \namegpc\ saves a pointer to the node
+immediately preceding the \.{\\parfillskip} node and quits pruning
+when it encounters this node several procedures later.
+@^Underfull \\hbox...@>
+@z
+
+@x
+link(tail):=new_param_glue(par_fill_skip_code);
+@y
+non_prunable_p := tail; {points to the node immediately before
+\.{\\parfillskip}}
+link(tail):=new_param_glue(par_fill_skip_code);
+@z
+
+[862] declare non_prunable_p
+@x
+The following declarations provide for a few other local variables that are
+used in special calculations.
+
+@y
+The following declarations provide for a few other local variables that are
+used in special calculations.
+
+\marke E Declare the |non_prunable_p| pointer.
+@z
+
+@x
+@!auto_breaking:boolean; {is node |cur_p| outside a formula?}
+@y
+@!auto_breaking:boolean; {is node |cur_p| outside a formula?}
+non_prunable_p:pointer; {pointer to the node before \.{\\parfillskip}}
+@z
+
+[876] pass non_prunable_p
+@x
+(By introducing this subprocedure, we are able to keep |line_break|
+from getting extremely long.)
+@y
+(By introducing this subprocedure, we are able to keep |line_break|
+from getting extremely long.)
+
+\marke E Pass |non_prunable_p| to the |post_line_break|~procedure.
+@z
+
+@x
+post_line_break(final_widow_penalty)
+@y
+post_line_break(final_widow_penalty, non_prunable_p)
+@z
+
+[877] declare non_prunable_p
+@x
+of their new significance.) Then the lines are justified, one by one.
+
+@y
+of their new significance.) Then the lines are justified, one by one.
+
+\marke E Declare another parameter. It holds the pointer to the node
+immediately preceding \.{\\parfillskip}.
+@z
+
+@x
+procedure post_line_break(@!final_widow_penalty:integer);
+@y
+procedure post_line_break(@!final_widow_penalty:integer;
+ non_prunable_p:pointer);
+@z
+
+[879]
+@x
+are computed for non-discretionary breakpoints.
+@y
+are computed for non-discretionary breakpoints.
+
+\marke E The pointer |non_prunable_p| references the node immediately
+preceding the \.{\\parfillskip} node at the end of the paragraph.
+Stop pruning at this node.
+@z
+
+[879]
+@x
+ if non_discardable(q) then goto done1;
+@y
+ if non_discardable(q) then goto done1;
+ if q = non_prunable_p then goto done1; {retain \.{\\parfillskip} glue}
+@z
+
+[1332]
+@x
+The initial test involving |ready_already| should be deleted if the
+\PASCAL\ runtime system is smart enough to detect such a ``mistake.''
+@^system dependencies@>
+@y
+The initial test involving |ready_already| should be deleted if the
+\PASCAL\ runtime system is smart enough to detect such a ``mistake.''
+@^system dependencies@>
+
+\marke h \namegpc\ tries to load the format file even before it
+initializes the output routines. That way, it will print the name of
+the format file on the terminal.
+
+\marke G
+|@!gpc_execute| starts the system editor (vi) and |@!gpc_halt|
+passes the |history| as an exit code to the shell.
+
+@^system dependencies@>
+@^GNU Pascal@>
+@^Unix@>
+
+@d gpc_halt == h@&a@&l@&t
+@z
+
+[1332]
+@x
+start_of_TEX: @<Initialize the output routines@>;
+@y
+start_of_TEX: @<Preload the default format file@>;
+@<Initialize the output routines@>;
+@z
+
+[1332]
+@x
+final_end: ready_already:=0;
+@y
+final_end:
+if edit_file_name > 0 then start_editor; {user typed `\.{E}' \marke F}
+gpc_halt(history);
+ {pass |history| as the exit value to the system\marke u}
+@z
+
+[1333] print last end-of-line marker if needed
+@x
+This program doesn't bother to close the input files that may still be open.
+@y
+This program doesn't bother to close the input files that may still be open.
+
+\marke h
+Special care is taken to terminate the last line on the terminal.
+
+@z
+
+[1333] print last end-of-line marker if needed
+@x
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+end;
+@y
+ slow_print(log_name); print_char(".");
+ end;
+ end;
+ if term_offset > 0 then wterm_cr;
+end;
+@z
+
+[1338] return if eof.
+@x
+program below. (If |m=13|, there is an additional argument, |l|.)
+@.debug \#@>
+
+@y
+program below. (If |m=13|, there is an additional argument, |l|.)
+@.debug \#@>
+
+\marke P A Pascal program must not read from the standard text file
+if the end of file is reached. Even in this respect, Unix and Pascal
+treat terminals and disk files alike.
+
+@z
+@x
+begin loop begin wake_up_terminal;
+@y
+begin loop begin; wake_up_terminal;
+@z
+
+@x
+ read(term_in,m);
+@y
+ if eof(term_in) then return;
+ read(term_in,m);
+@z
+
+[1338] return if eof
+@x
+ else begin read(term_in,n);
+@y
+ else begin if eof(term_in) then return;
+ read(term_in,n);
+@z
+
+[1339] return if eof
+@x
+13: begin read(term_in,l); print_cmd_chr(n,l);
+@y
+13: begin if eof(term_in) then return;
+read(term_in,l); print_cmd_chr(n,l);
+@z
+
+[1379 and modules added for TeX-GPC]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+
+\marke h Try to preload the default format file. This is called
+even before the first line is read from the terminal, and thus
+turns \.{VIRTEX} into \.{TEX}, at least as experienced by the user.
+\.{INITEX} sets |format_ident| to `\.{INITEX}' and won't load a
+format file here.
+
+@<Preload the default format file@>=
+if format_ident = 0 then
+ begin pack_buffered_name(format_default_length - format_ext_length, 1, 0);
+ if not w_open_in(fmt_file) then
+ begin
+ wterm_ln('I can''t find the format file ', name_of_file);
+ goto final_end
+ end;
+ if not load_fmt_file then
+ begin w_close(fmt_file); goto final_end
+ end;
+ w_close(fmt_file);
+ end
+
+@ \marke F If the user typed |'E'| to edit a file after confronted
+with an error message, \TeX\ will clean up and then call |start_editor|
+as its last feat. The file name and line number to be
+passed to the system editor are saved in |edit_file_name| and
+|edit_line|.
+
+This procedure must not print error messages, since all files are already
+closed.
+
+Beware of using any \.{WEB} strings like \.{"vi +"} since that
+would change the string pool file and you'll need to rebuild all
+format files with the new string pool in case you disagree which
+editor is the system editor.
+
+An overflow of |name_of_file| cannot happen, since |name_of_file|
+kept the file name while the file was being opened. \marke G The
+@!|gpc_write_str| function writes its arguments into a |gpc_string| to
+build the command line. The function~|@!gpc_execute|
+takes a |gpc_string| which holds the command line to be executed.
+
+@^GNU Pascal@>
+
+@d gpc_execute == e@&x@&e@&c@&u@&t@&e
+@d gpc_write_str == w@&r@&i@&t@&e@&s@&t@&r
+
+@<Error hand...@>=
+procedure start_editor;
+var i: integer; {index into |name_of_file|}
+ j: pool_pointer; {index into |str_pool|}
+ cmd_line: gpc_string(200); {area to build the command line}
+begin i := 1; j := str_start[edit_file_name];
+while j<str_start[edit_file_name + 1] do
+ begin name_of_file[i] := xchr[str_pool[j]]; incr(i); incr(j)
+ end;
+while i<=file_name_size do begin name_of_file[i] := ' '; incr(i) end;
+gpc_write_str(cmd_line, 'vi +', line, ' ', gpc_trim(name_of_file));
+if 0 <> gpc_execute(cmd_line) then
+ write_ln(gpc_param_str(0), ': could not start editor with: "',
+ cmd_line, '"');
+end;
+
+@ \marke F The next modules declare and install the interrupt procedure
+|set_interrupt|.
+
+The identifiers are truncated by \.{TANGLE} to twelve characters.
+We use this trick to persuade \.{TANGLE} to transfer the complete
+name to the Pascal source.
+
+@d gpc_install_signal_handler ==
+ i@&n@&s@&t@&a@&l@&l@&s@&i@&g@&n@&a@&l@&h@&a@&n@&d@&l@&e@&r
+@d gpc_sig_int == s@&i@&g@&i@&n@&t
+@d gpc_null == n@&u@&l@&l
+@d gpc_integer == cinteger {for earlier versions of GPC (3.2) replace
+ \\{cinteger} by \\{integer}}
+
+@<Error hand...@>=
+procedure set_interrupt(signal: gpc_integer);
+begin interrupt := 1 @+end;
+
+@ To install |set_interrupt| as our `signal handler', I use the
+procedure @!|gpc_install_signal_handler|. It works with these
+arguments, but don't ask why. GNU~Pascal's @!|gpc_sig_int| constant
+denotes the Unix interrupt signal, which is sent when the user types
+\.{\^C}. Then |set_interrupt| is called, which sets the global
+variable |interrupt| to one, thus causing \TeX\ to invoke |error|
+to engage the user in an error dialog.
+
+The 2008 edition had a bug: It treated the function
+|gpc_install_signal_handler| as a procedure. The old GPC version
+didn't care, but the current one does. This was discovered by Luis
+Rivera and Martin Monperrus.
+
+@^Rivera, Luis@>
+@^Monperrus, Martin@>
+
+@<Initialize whatever ... @>=
+if gpc_install_signal_handler(gpc_sig_int,set_interrupt,
+ true,true,gpc_null,gpc_null) then do_nothing;
+@z
diff --git a/systems/unix/tex-gpc/tex.pdf b/systems/unix/tex-gpc/tex.pdf
new file mode 100644
index 0000000000..0f30df2243
--- /dev/null
+++ b/systems/unix/tex-gpc/tex.pdf
Binary files differ
diff --git a/systems/unix/tex-gpc/tftopl.ch b/systems/unix/tex-gpc/tftopl.ch
new file mode 100644
index 0000000000..8162ed0f0f
--- /dev/null
+++ b/systems/unix/tex-gpc/tftopl.ch
@@ -0,0 +1,98 @@
+% This is a change file of TFtoPL for GPC, Wolfgang Helbig, Apr. 2008
+[0] About TFtoPL-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+
+\let\maybe=\iffalse % print changed modules only.
+
+\def\name{\tt TFtoPL}
+
+\N0\*. About \namegpc.\fi
+
+This is an adaption of Donald~E. Knuth's \.{TFtoPL}, version 3.3
+from March 2008, to Unix. It is based on GNU~Pascal, version 2.1.
+
+This program expects an input file (\.{.tfm}) and an output file
+(\.{.pl}), which is a text file, on the command line. To support
+shell scripting, \namegpc\ sets the exit code to one when something
+was wrong with the input file.
+
+\hint
+
+Comments and questions are welcome!
+
+\bigskip
+\address
+@z
+[1]
+@x
+@d banner=='This is TFtoPL, Version 3.3' {printed when the program starts}
+@y
+@d banner=='This is TFtoPL-GPC' {printed when the program starts}
+@z
+
+[2] files from command line
+@x
+@p program TFtoPL(@!tfm_file,@!pl_file,@!output);
+@y
+@p program TFtoPL(@!output);
+@z
+
+[6]
+@x
+@!tfm_file:packed file of 0..255;
+@y
+@!tfm_file:packed file of packed 0..255;
+@z
+
+[7]
+@x
+reset(tfm_file);
+@y
+if param_count <> 2 then begin
+ print_ln('Usage: tftopl tfm-file pl-file');
+ goto final_end;
+ end;
+reset(tfm_file, param_str(1));
+@z
+
+[17]
+@x
+rewrite(pl_file);
+@y
+if param_count <> 2 then abort('Usage: tftopl tfm-file pl-file');
+rewrite(pl_file, param_str(2));
+@z
+
+[20] set history in abort
+@x
+ goto final_end;
+@y
+ history := 1; goto final_end;
+@z
+
+[99]
+@x
+final_end:end.
+@y
+final_end:halt(history);end.
+@z
+
+[100]
+@x
+itself will get a new section number.
+@^system dependencies@>
+@y
+itself will get a new section number.
+@^system dependencies@>
+
+@<Globals...@>=
+history : integer;
+
+@
+@<Set init...@>=
+history := 0;
+@z
diff --git a/systems/unix/tex-gpc/traplog/READMe b/systems/unix/tex-gpc/traplog/READMe
new file mode 100644
index 0000000000..87a8dadcfc
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/READMe
@@ -0,0 +1,6 @@
+METAFONT-GPC does not pass the TRAP test. It doesn't trim trailing spaces
+from input lines. That explains the differences in trap.log. Everything
+else seems ok.
+
+September 2008
+Wolfgang Helbig
diff --git a/systems/unix/tex-gpc/traplog/trap.fot b/systems/unix/tex-gpc/traplog/trap.fot
new file mode 100644
index 0000000000..5beba7628f
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trap.fot
@@ -0,0 +1,59 @@
+This is METAFONT-GPC (INIMF)
+** &trap trap
+(trap.mf
+\*//*\trap\pass2!
+! Missing symbolic token inserted.
+<inserted text>
+ INACCESSIBLE
+l.21 ...t next=\; delimiters ^~7
+ ! fi
+! Extra tokens will be flushed.
+<to be read again>
+ !
+l.21 ... next=\; delimiters ^~7!
+ fi
+! Forbidden token found while scanning to the end of the statement.
+<inserted text>
+ ;
+<to be read again>
+ \
+l.22 next\
+ ; % the second pass will now compute silently; the ...
+
+hello again^^_
+>> pen (see the transcript file)
+>> path (see the transcript file)
+>> path (see the transcript file)
+>> path (see the transcript file)
+f<expr>->let)=];let[=(;show._
+(EXPR0)<-xx
+{let}
+{let}
+{show}
+>> _1
+{showdependencies}
+xpart '=-ypart '-0.66667
+{qq:=pen}
+{showstats}
+Memory usage 1476&588 (104 still untouched)
+String usage 42&168 (816&7694 still untouched)
+{[repeat the loop]}
+! A group begun on line 163 never ended.
+<to be read again>
+ endtext
+l.163 ... showstats; bye endtext
+
+{endgroup}
+ )
+(end occurred when else on line 93 was incomplete)
+(end occurred when if on line 36 was incomplete)
+(end occurred when elseif on line 21 was incomplete)
+(see the transcript file for additional information)
+(illegal design size has been changed to 128pt)
+(some chardp values had to be adjusted by as much as 0.5pt)
+(local label 0:: was missing)
+(local label 5:: was missing)
+(4 font metric dimensions had to be decreased)
+Font metrics written on trap.tfm.
+Output written on trap.72270gf (5 characters, 1028 bytes).
+Transcript written on trap.log.
diff --git a/systems/unix/tex-gpc/traplog/trap.fot.diff b/systems/unix/tex-gpc/traplog/trap.fot.diff
new file mode 100644
index 0000000000..95d47ed6e6
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trap.fot.diff
@@ -0,0 +1,8 @@
+1c1
+< This is METAFONT-GPC (INIMF)
+---
+> This is METAFONT, Version 2.718281 (INIMF)
+39c39
+< String usage 42&168 (816&7694 still untouched)
+---
+> String usage 41&161 (815&7634 still untouched)
diff --git a/systems/unix/tex-gpc/traplog/trap.log b/systems/unix/tex-gpc/traplog/trap.log
new file mode 100644
index 0000000000..320353c7a5
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trap.log
@@ -0,0 +1,4266 @@
+This is METAFONT-GPC (preloaded base=trap 2008.9.7) 7 SEP 2008 12:47
+** &trap trap
+(trap.mf
+{if}
+{known(0)}
+{not(true)}
+{false}
+{known("")}
+{true}
+
+/*\`'@#->begingroup.message(SUFFIX1)&str(SUFFIX0)&jobname&char.ASCII'`&s
+tr(SUFFIX2)!endgroup
+(SUFFIX0)<-/*\
+(SUFFIX1)<-`'
+(SUFFIX2)<-pass2
+{begingroup}
+{message}
+
+`'->begingroup'`endgroup
+(SUFFIX0)<-
+(SUFFIX1)<-`'
+{begingroup}
+
+'`->"\*/"
+{endgroup}
+{("\*/")&("/*\")}
+{jobname}
+{("\*//*\")&("trap")}
+
+'`->"\*/"
+{ASCII("\*/")}
+{char(92)}
+{("\*//*\trap")&("\")}
+{("\*//*\trap\")&("pass2!")}
+
+\*//*\trap\pass2!
+{endgroup}
+{outer}
+{let}
+{delimiters}
+
+! Missing symbolic token inserted.
+<inserted text>
+ INACCESSIBLE
+l.21 ...t next=\; delimiters ^~7
+ ! fi
+Sorry: You can't redefine a number, string, or expr.
+I've inserted an inaccessible symbol so that your
+definition will be completed without mixing me up too badly.
+
+! Extra tokens will be flushed.
+<to be read again>
+ !
+l.21 ... next=\; delimiters ^~7!
+ fi
+I've just read as much of that statement as I could fathom,
+so a semicolon should have been next. It's very puzzling...
+but I'll try to get myself back together, by ignoring
+everything up to the next `;'. Please insert a semicolon
+now in front of anything that you don't want me to delete.
+(See Chapter 27 of The METAFONTbook for an example.)
+
+! Forbidden token found while scanning to the end of the statement.
+<inserted text>
+ ;
+<to be read again>
+ \
+l.22 next\
+ ; % the second pass will now compute silently; the ...
+A previous error seems to have propagated,
+causing me to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+{\}
+{batchmode}
+
+! An expression can't begin with `endgroup'.
+<inserted text>
+ 0
+<to be read again>
+ endgroup
+l.23 batchmode; ^~7,endgroup
+ pausing:=1; exitif p exitif bool...
+I'm afraid I need some sort of value in order to continue,
+so I've tentatively inserted `0'. You may want to
+delete this zero and insert something else;
+see Chapter 27 of The METAFONTbook for an example.
+
+! Missing ` INACCESSIBLE' has been inserted.
+<to be read again>
+ endgroup
+l.23 batchmode; ^~7,endgroup
+ pausing:=1; exitif p exitif bool...
+I found no right delimiter to match a left one. So I've
+put one in, behind the scenes; this may fix the problem.
+
+! Extra `endgroup'.
+<recently read> endgroup
+
+l.23 batchmode; ^~7,endgroup
+ pausing:=1; exitif p exitif bool...
+I'm not currently working on a `begingroup',
+so I had better not try to end anything.
+
+{pausing:=1}
+{exitif}
+{exitif}
+{pencircle}
+{endfor}
+! Extra `endfor'.
+l.23 ...ean pen pencircle endfor
+
+I'm not currently working on a for loop,
+so I had better not try to end anything.
+
+{scantokens}
+{begingroup}
+{message}
+{char(0)}
+{("^^@")&("watch this")}
+^^@watch this
+{-(1)}
+{char(-1)}
+{("pair p[],';")&("^^ff")}
+{endgroup}
+{pen(future pen)}
+{boolean(true)}
+{true}
+! No loop is in progress.
+<to be read again>
+ pair
+<scantokens> pair
+ p[],';^^ff
+<to be read again>
+ path
+l.25 path
+ p[][]p,w,qw; qw=(1,-2)..(2,-1)..(2.5,0.5)..(1,2)..(...
+Why say `exitif' when there's nothing to exit from?
+
+>> p
+! Undefined condition will be treated as `false'.
+<to be read again>
+ pair
+<scantokens> pair
+ p[],';^^ff
+<to be read again>
+ path
+l.25 path
+ p[][]p,w,qw; qw=(1,-2)..(2,-1)..(2.5,0.5)..(1,2)..(...
+The expression shown above should have had a definite
+true-or-false value. I'm changing it to `false'.
+
+{false}
+! Missing `;' has been inserted.
+<to be read again>
+ pair
+<scantokens> pair
+ p[],';^^ff
+<to be read again>
+ path
+l.25 path
+ p[][]p,w,qw; qw=(1,-2)..(2,-1)..(2.5,0.5)..(1,2)..(...
+After `exitif <boolean exp>' I expect to see a semicolon.
+I shall pretend that one was there.
+
+{pair}
+! Text line contains an invalid character.
+<scantokens> pair p[],';^^ff
+
+<to be read again>
+ path
+l.25 path
+ p[][]p,w,qw; qw=(1,-2)..(2,-1)..(2.5,0.5)..(1,2)..(...
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+
+{path}
+{-(2)}
+{-(1)}
+{turningnumber((xpart ',ypart '))}
+Path at line 25, before choices:
+(1,-2){curl 1}
+ ..(2,-1)
+ ..(2.5,0.5)
+ ..(1,2)
+ ..{curl 1}(0,2.5)
+
+Path at line 25, after choices:
+(1,-2)..controls (1.37755,-1.71404) and (1.71404,-1.37755)
+ ..(2,-1)..controls (2.33353,-0.55965) and (2.59729,-0.04124)
+ ..(2.5,0.5)..controls (2.36812,1.23369) and (1.6712,1.65662)
+ ..(1,2)..controls (0.66821,2.16974) and (0.33485,2.33641)
+ ..(0,2.5)
+
+{(unknown path qw)=(path)}
+{numeric}
+! Enormous number has been reduced.
+l.26 ...[$] ]]=10000000000000000
+ ; "this string constant is in...
+I can't handle numbers bigger than about 4095.99998;
+so I've changed your constant to that maximum amount.
+
+{(p[[ [-1] ]])=(4095.99998)}
+## p[[ [-1] ]]=4095.99998
+! Incomplete string token has been flushed.
+l.26 ...g constant is incomplete
+
+Strings should finish on the same line as they began.
+I've deleted the partial string; you might want to
+insert another by typing, e.g., `I"new string"'.
+
+{string}
+! Declared variable conflicts with previous vardef.
+<to be read again>
+ ,
+l.27 string foo[]p,
+ p~if true:[]; p~000=char34&char200&char34;
+You can't use, e.g., `numeric foo[]' after `vardef foo'.
+Proceed, and I'll ignore the illegal redeclaration.
+
+{if}
+{true}
+{true}
+{char(34)}
+{char(200)}
+{(""")&("^^c8")}
+{char(34)}
+{(""^^c8")&(""")}
+{(unknown string p~0)=(""^^c8"")}
+{boolean}
+{fi}
+{showvariable}
+boolean.boolean=unknown boolean
+! OK.
+l.28 ...n; showvariable boolean;
+ def\\= =end enddef;
+
+{def}
+{picture}
+{show}
+{scantokens}
+{length("^^c8")}
+>> 1
+! OK.
+<recently read> ;
+
+l.29 ...w length scantokens p~0;
+
+
+{pen}
+! Illegal suffix of declared variable will be flushed.
+<to be read again>
+ [
+<to be read again>
+ "a"
+l.30 pen p~[]~,q["a"
+ ,qq; p~1~=q=pencircle scaled mexp(-3016.5...
+Variables in declarations must consist entirely of
+names and collective subscripts, e.g., `x[]a'.
+Are you trying to use a reserved word in a variable name?
+I'm going to discard the junk I found here,
+up to the next comma or the end of the declaration.
+
+{pencircle}
+{-(3016.57654)}
+{mexp(-3016.57654)}
+{(future pen)scaled(0)}
+Pen polygon at line 30 (newly created):
+(0.5,0)
+ .. (0,0.5)
+ .. (-0.5,0)
+ .. (0,-0.5)
+ .. cycle
+
+{(unknown pen q)=(pen)}
+{(unknown pen p~1~)=(pen)}
+{transform}
+! Illegal suffix of declared variable will be flushed.
+<to be read again>
+ 0
+l.31 transform p,pp0
+ ; if p=p:qq=makepen((1,0)..cycle) xscaled...
+Variables in declarations must consist entirely of
+names and collective subscripts, e.g., `x[]a'.
+Explicit subscripts like `x15a' aren't permitted.
+I'm going to discard the junk I found here,
+up to the next comma or the end of the declaration.
+
+{if}
+{((xpart p,ypart p,xxpart p,xypart p,yxpart p,yypart p))=((xpart p,ypart
+ p,xxpart p,xypart p,yxpart p,yypart p))}
+{true}
+Path at line 31, before choices:
+(1,0)
+ ..cycle
+
+Path at line 31, after choices:
+(1,0)..controls (1,0) and (1,0)
+ ..cycle
+
+{makepen(path)}
+{hex("1000")}
+! Number too large (4096).
+<to be read again>
+ ;
+l.31 ...cle) xscaled hex "1000";
+ fi
+I have trouble with numbers greater than 4095; watch out.
+
+{(future pen)xscaled(4096)}
+! Pen too large.
+<to be read again>
+ ;
+l.31 ...cle) xscaled hex "1000";
+ fi
+The cycle you specified has a coordinate of 4095.5 or more.
+So I've replaced it by the trivial path `(0,0)..cycle'.
+
+Pen polygon at line 31 (newly created):
+(0,0)
+ .. cycle
+
+{(unknown pen qq)=(pen)}
+{fi}
+Path at line 32, before choices:
+(0,0)
+ ..(1,0)
+ ..(0,1)
+ ..(0,0)
+ ..(1,0)
+ ..(0,1)
+ ..cycle
+
+Path at line 32, after choices:
+(0,0)..controls (0.29056,-0.29056) and (0.75859,-0.30772)
+ ..(1,0)..controls (1.51964,0.66237) and (0.66237,1.51964)
+ ..(0,1)..controls (-0.30772,0.75859) and (-0.29056,0.29056)
+ ..(0,0)..controls (0.29056,-0.29056) and (0.75859,-0.30772)
+ ..(1,0)..controls (1.51964,0.66237) and (0.66237,1.51964)
+ ..(0,1)..controls (-0.30772,0.75859) and (-0.29056,0.29056)
+ ..cycle
+
+{makepen(path)}
+! Pen cycle must be convex.
+<to be read again>
+ ;
+l.32 ...)..(1,0)..(0,1)..cycle);
+
+The cycle you specified either has consecutive equal points
+or turns right or turns through more than 360 degrees.
+So I've replaced it by the trivial path `(0,0)..cycle'.
+
+Pen polygon at line 32 (newly created):
+(0,0)
+ .. cycle
+
+{qq:=pen}
+{vardef}
+! Missing parameter type; `expr' will be assumed.
+<to be read again>
+ )
+l.33 ...ext suffix a,b endtext()
+ )suffix@=show #@; p.a.b() end...
+You should've had `expr' or `suffix' or `text' here.
+
+{expandafter}
+{\}
+{let}
+
+\\->=end
+{outer}
+{pencircle}
+{(future pen)scaled(4.5)}
+{(future pen)yscaled(2)}
+Pen polygon at line 34 (newly created):
+(0.5,-4.5)
+ .. (1,-4)
+ .. (2,-2.5)
+ .. (2.5,0)
+ .. (2,2.5)
+ .. (1,4)
+ .. (0.5,4.5)
+ .. (-0.5,4.5)
+ .. (-1,4)
+ .. (-2,2.5)
+ .. (-2.5,0)
+ .. (-2,-2.5)
+ .. (-1,-4)
+ .. (-0.5,-4.5)
+ .. cycle
+
+{qq:=pen}
+{((6,12))-((xpart p7,ypart p7))}
+{((0,1))transformed((xpart p,ypart p,xxpart p,xypart p,yxpart p,yypart p
+))}
+{(x)-(x)}
+{(2)/(0)}
+>> 2
+! Division by zero.
+<to be read again>
+ ,
+l.35 ...)transformed p=(2/(x-x),
+ 3/0)transformed p;
+You're trying to divide the quantity shown above the error
+message by zero. I'm going to divide it by one instead.
+
+! Division by zero.
+l.35 ...ansformed p=(2/(x-x),3/0
+ )transformed p;
+I'll pretend that you meant to divide by 1.
+
+{((2,3))transformed((xpart p,ypart p,xxpart p,xypart p,yxpart p,yypart p
+))}
+{((linearform,linearform))=((linearform,linearform))}
+## yxpart p=-yypart p
+## xxpart p=-xypart p
+{((-xpart p7+6,-ypart p7+12))=((linearform,linearform))}
+## ypart p7=-ypart p-yypart p+12
+## xpart p7=-xpart p-xypart p+6
+{\}
+{if}
+{string(unknown string p~[-1])}
+{true}
+{(p0.1 0.2)-(p0.1 0.2)}
+! The token `endtext' is no longer a right delimiter.
+l.36 ...1.2-p.1.199999,1 endtext
+ transformed p;
+Strange: This token has lost its former meaning!
+I'll read it as a right delimiter this time;
+but watch out, I'll probably miss it later.
+
+{((0,1))transformed((xpart p,ypart p,-xypart p,xypart p,-yypart p,yypart
+ p))}
+{((linearform,linearform))=((linearform,linearform))}
+## ypart p=-yypart p+6
+#### ypart p7=6
+## xpart p=-xypart p+3
+#### xpart p7=3
+{(unknown path p1 2p)=((3,6))}
+{showstopping:=0}
+{showvariable}
+p=(-xypart p+3,-yypart p+6,-xypart p,xypart p,-yypart p,yypart p)
+p[]=pair
+p[][]=numeric
+p[][]p=unknown path
+p[][]p~=macro:(SUFFIX2)(SUFFIX3)(EXPR4)<suffix>->begingroup ETC.
+p[]~=unknown boolean
+p~=path
+p~[]=unknown string
+p~[]~=unknown pen
+p~[]~[][]=unknown picture
+p~[-1]=unknown string p~[-1]
+p~0=""^^c8""
+p~1~=pen
+p[[ [] ]]=numeric
+p[[ [-1] ]]=4095.99998
+p0.1 0.2=p0.1 0.2
+p1 2p=path
+p7=(3,6)
+{((-xypart p+3,-yypart p+6,-xypart p,xypart p,-yypart p,yypart p))=((-xy
+part p+3,-yypart p+6,-xypart p,xypart p,-yypart p,yypart p))}
+{let}
+{let}
+{xxpart((-xypart p+3,-yypart p+6,-xypart p,xypart p,-yypart p,yypart p))
+}
+{(-xypart p)+(0.002)}
+{yxpart((-xypart p+3,-yypart p+6,-xypart p,xypart p,-yypart p,yypart p))
+}
+{((xpart p2,ypart p2))-((xpart p1,ypart p1))}
+{(1)*((linearform,linearform))}
+{((xpart p1,ypart p1))+((linearform,linearform))}
+{(y)+(0.00002)}
+{yypart((-xypart p+3,-yypart p+6,-xypart p,xypart p,-yypart p,yypart p))
+}
+{xypart((-xypart p+3,-yypart p+6,-xypart p,xypart p,-yypart p,yypart p))
+}
+{((5,y))=((yypart p,xypart p))}
+## y=xypart p
+## yypart p=5
+#### ypart p=1
+#### yxpart p=-5
+{((5,xypart p+0.00002))=((5,xypart p))}
+{((xpart p2,ypart p2))=((5,xypart p))}
+## ypart p2=xypart p
+## xpart p2=5
+{((-xypart p+0.002,-5))=((5,xypart p))}
+## xypart p=-5
+#### ypart p2=-5
+#### y=-5
+#### xpart p=8
+#### xxpart p=5
+! Inconsistent equation (off by -0.002).
+<to be read again>
+ ;
+l.38 ...,y)=(yypart p,xypart p);
+
+The equation I just read contradicts what was said before.
+But don't worry; continue and I'll just ignore it.
+
+Path at line 39, before choices:
+(0,0)..controls (15,4) and (-15,-12)
+ ..(4,0)
+ ..cycle
+
+Path at line 39, after choices:
+(0,0)..controls (15,4) and (-15,-12)
+ ..(4,0)..controls (17.52783,8.54388) and (-15.45978,-4.12262)
+ ..cycle
+
+{reverse(path)}
+{(path)transformed((8,1,5,-5,-5,5))}
+{(path)=(unknown path p2 3p)}
+
+p1 2p~(SUFFIX2)(SUFFIX3)(EXPR4)<suffix>->begingroup.show(SUFFIX0);p(SUFF
+IX2)(SUFFIX3)((EXPR4)endgroup
+(SUFFIX0)<-p1 2p
+(SUFFIX1)<-~
+(SUFFIX2)<-
+(SUFFIX3)<-2 3p~
+! A primary expression can't begin with `right delimiter that matches ('
+.
+<inserted text>
+ 0
+<to be read again>
+ )
+l.40 ...000000001]2p~(,[2]3p~,-)
+ =p~1~2[pausing];
+I'm afraid I need some sort of value in order to continue,
+so I've tentatively inserted `0'. You may want to
+delete this zero and insert something else;
+see Chapter 27 of The METAFONTbook for an example.
+
+{-(0)}
+(EXPR4)<-0
+(SUFFIX5)<-
+{begingroup}
+{show}
+>> Path at line 40:
+(3,6)
+
+
+p2 3p~(SUFFIX2)(SUFFIX3)(EXPR4)<suffix>->begingroup.show(SUFFIX0);p(SUFF
+IX2)(SUFFIX3)((EXPR4)endgroup
+(SUFFIX0)<-p2 3p
+(SUFFIX1)<-~
+! Missing `,' has been inserted.
+<to be read again>
+ (0)
+p1 2p~->...IX2)(SUFFIX3)((EXPR4)
+ endgroup
+<to be read again>
+ =
+l.40 ...00000001]2p~(,[2]3p~,-)=
+ p~1~2[pausing];
+I've finished reading a macro argument and am about to
+read another; the arguments weren't delimited correctly.
+You might want to delete some tokens before continuing.
+
+(SUFFIX2)<-
+! Missing `,' has been inserted.
+<to be read again>
+ (0)
+p1 2p~->...IX2)(SUFFIX3)((EXPR4)
+ endgroup
+<to be read again>
+ =
+l.40 ...00000001]2p~(,[2]3p~,-)=
+ p~1~2[pausing];
+I've finished reading a macro argument and am about to
+read another; the arguments weren't delimited correctly.
+You might want to delete some tokens before continuing.
+
+(SUFFIX3)<-
+! Missing `)' has been inserted.
+<to be read again>
+ endgroup
+<to be read again>
+ =
+l.40 ...00000001]2p~(,[2]3p~,-)=
+ p~1~2[pausing];
+I've gotten to the end of the macro parameter list.
+You might want to delete some tokens before continuing.
+
+(EXPR4)<-0
+(SUFFIX5)<-
+{begingroup}
+{show}
+>> Path at line 40:
+(8,1)..controls (-48.68579,57.68579) and (52.91974,-43.91974)
+ ..(28,-19)..controls (-7,16) and (63,-54)
+ ..cycle
+
+>> (8,1,5,-5,-5,5)
+! Isolated expression.
+<to be read again>
+ (
+p2 3p~->...;p(SUFFIX2)(SUFFIX3)(
+ (EXPR4)endgroup
+<to be read again>
+ endgroup
+<to be read again>
+ =
+l.40 ...00000001]2p~(,[2]3p~,-)=
+ p~1~2[pausing];
+I couldn't find an `=' or `:=' after the
+expression that is shown above this error message,
+so I guess I'll just ignore it and carry on.
+
+! Extra tokens will be flushed.
+<to be read again>
+ (
+p2 3p~->...;p(SUFFIX2)(SUFFIX3)(
+ (EXPR4)endgroup
+<to be read again>
+ endgroup
+<to be read again>
+ =
+l.40 ...00000001]2p~(,[2]3p~,-)=
+ p~1~2[pausing];
+I've just read as much of that statement as I could fathom,
+so a semicolon should have been next. It's very puzzling...
+but I'll try to get myself back together, by ignoring
+everything up to the next `;'. Please insert a semicolon
+now in front of anything that you don't want me to delete.
+(See Chapter 27 of The METAFONTbook for an example.)
+
+{endgroup}
+{endgroup}
+{(vacuous)=(unknown picture p~1~2 1)}
+>> vacuous
+>> unknown picture p~1~2 1
+! Equation cannot be performed (vacuous=unknown picture).
+<to be read again>
+ ;
+l.40 ...2]3p~,-)=p~1~2[pausing];
+
+I'm sorry, but I don't know how to make such things equal.
+(See the two expressions just above the error message.)
+
+{vardef}
+Runaway definition?
+if.p(SUFFIX1)(SUFFIX1)=(SUFFIX1)(SUFFIX1)p.fi
+! Forbidden token found while scanning the definition of p~[].
+<inserted text>
+ enddef
+<to be read again>
+ ;
+l.41 ...iary t:=if p@ @=@ @p fi;
+ vardef p[][]p~[]=BAD; inner ;;
+I suspect you have forgotten an `enddef',
+causing me to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+{vardef}
+! This variable already starts with a macro.
+l.41 ...@p fi; vardef p[][]p~[]=
+ BAD; inner ;;
+After `vardef a' you can't say `vardef a.b'.
+So I'll have to discard this definition.
+
+Runaway definition?
+BAD
+! Forbidden token found while scanning the definition of a bad variable.
+<inserted text>
+ enddef
+<to be read again>
+ ;
+l.41 ...i; vardef p[][]p~[]=BAD;
+ inner ;;
+I suspect you have forgotten an `enddef',
+causing me to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+{inner}
+{show}
+{-(2)}
+
+p~[-2]@#<tertiary>->begingroup.if.p(SUFFIX1)(SUFFIX1)=(SUFFIX1)(SUFFIX1)
+p.fi.endgroup
+(SUFFIX0)<-p~
+(SUFFIX1)<-[-2]
+(SUFFIX2)<-~
+! A tertiary expression can't begin with `['.
+<inserted text>
+ 0
+<to be read again>
+ [
+<to be read again>
+ (3000)
+<to be read again>
+ ,
+l.42 show p~[-2]~[3000,
+ x]++4000>path p3; showvariable p,P;
+I'm afraid I need some sort of value in order to continue,
+so I've tentatively inserted `0'. You may want to
+delete this zero and insert something else;
+see Chapter 27 of The METAFONTbook for an example.
+
+{(x)-(3000)}
+{(0)*(x-3000)}
+{(3000)+(0)}
+{(3000)++(4000)}
+(EXPR3)<-4999.99998
+{begingroup}
+{if}
+{(p[-2][-2])=(-2)}
+>> p[-2][-2]+2
+! Unknown relation will be considered false.
+<to be read again>
+ [-2]
+p~[-2]->...1)=(SUFFIX1)(SUFFIX1)
+ p.fi.endgroup
+<to be read again>
+ >
+l.42 show p~[-2]~[3000,x]++4000>
+ path p3; showvariable p,P;
+Oh dear. I can't decide if the expression above is positive,
+negative, or zero. So this comparison test won't be `true'.
+
+{false}
+! Missing `:' has been inserted.
+<to be read again>
+ [-2]
+p~[-2]->...1)=(SUFFIX1)(SUFFIX1)
+ p.fi.endgroup
+<to be read again>
+ >
+l.42 show p~[-2]~[3000,x]++4000>
+ path p3; showvariable p,P;
+There should've been a colon after the condition.
+I shall pretend that one was there.
+
+{endgroup}
+{path((xpart p3,ypart p3))}
+{(vacuous)>(false)}
+>> vacuous
+>> false
+! Not implemented: (vacuous)>(boolean).
+<to be read again>
+ ;
+l.42 ...~[3000,x]++4000>path p3;
+ showvariable p,P;
+I'm afraid I don't know how to apply that operation to that
+combination of types. Continue, and I'll return the second
+argument (see above) as the result of the operation.
+
+>> false
+{showvariable}
+p=(8,1,5,-5,-5,5)
+p[]=pair
+p[][]=numeric
+p[][]p=unknown path
+p[][]p~=macro:(SUFFIX2)(SUFFIX3)(EXPR4)<suffix>->begingroup ETC.
+p[]~=unknown boolean
+p~=path
+p~[]@#=macro:<tertiary>->begingroup.if.p(SUFFIX1)(SUFFIX1) ETC.
+p[[ [] ]]=numeric
+p[[ [-1] ]]=4095.99998
+p[-2][-2]=p[-2][-2]
+p0.1 0.2=p0.1 0.2
+p1=(xpart p1,ypart p1)
+p1 2p=path
+p2=(5,-5)
+p2 3p=path
+p3=(xpart p3,ypart p3)
+p7=(3,6)
+> P=tag
+{numeric}
+{(2)*(alpha)}
+{(p3~)=(2alpha)}
+## alpha=0.5p3~
+{(1)/(-1)}
+{(3)*(beta)}
+{(p[-1]~)=(3beta)}
+## beta=0.33333p[-1]~
+{begingroup}
+{save}
+{showvariable}
+> p=tag
+{(3)*(0.33333(SAVED)p[-1]~)}
+{((SAVED)p[-1]~)=(1)}
+## (SAVED)p[-1]~=1
+#### beta=0.33333
+{restoring p}
+{endgroup}
+{showvariable}
+p=(8,1,5,-5,-5,5)
+p[]=pair
+p[][]=numeric
+p[][]p=unknown path
+p[][]p~=macro:(SUFFIX2)(SUFFIX3)(EXPR4)<suffix>->begingroup ETC.
+p[]~=numeric
+p~=path
+p~[]@#=macro:<tertiary>->begingroup.if.p(SUFFIX1)(SUFFIX1) ETC.
+p[[ [] ]]=numeric
+p[[ [-1] ]]=4095.99998
+p[-2][-2]=p[-2][-2]
+p[-1]~=1
+p0.1 0.2=p0.1 0.2
+p1=(xpart p1,ypart p1)
+p1 2p=path
+p2=(5,-5)
+p2 3p=path
+p3=(xpart p3,ypart p3)
+p3~=p3~
+p7=(3,6)
+{def}
+{def}
+! Missing `=' has been inserted.
+<to be read again>
+ false
+l.45 ...enddef;def!primary!false
+ ):!fi enddef;
+The next thing in this `def' should have been `=',
+because I've already looked at the definition heading.
+But don't worry; I'll pretend that an equals sign
+was present. Everything from here to `enddef'
+will be the replacement text of this macro.
+
+{def}
+{(path)scaled(-1)}
+Path at line 46, before choices:
+(1,-2)..controls (1.37755,-1.71404) and (1.71404,-1.37755)
+ ..(2,-1)..controls (2.33353,-0.55965) and (2.59729,-0.04124)
+ ..(2.5,0.5)..controls (2.36812,1.23369) and (1.6712,1.65662)
+ ..(1,2)..controls (0.66821,2.16974) and (0.33485,2.33641)
+ ..(0,2.5)
+ ..(-1,2)..controls (-1.37755,1.71404) and (-1.71404,1.37755)
+ ..(-2,1)..controls (-2.33353,0.55965) and (-2.59729,0.04124)
+ ..(-2.5,-0.5)..controls (-2.36812,-1.23369) and (-1.6712,-1.65662)
+ ..(-1,-2)..controls (-0.66821,-2.16974) and (-0.33485,-2.33641)
+ ..(0,-2.5)
+ ..cycle
+
+Path at line 46, after choices:
+(1,-2)..controls (1.37755,-1.71404) and (1.71404,-1.37755)
+ ..(2,-1)..controls (2.33353,-0.55965) and (2.59729,-0.04124)
+ ..(2.5,0.5)..controls (2.36812,1.23369) and (1.6712,1.65662)
+ ..(1,2)..controls (0.66821,2.16974) and (0.33485,2.33641)
+ ..(0,2.5)..controls (-0.37186,2.68167) and (-0.668,2.25146)
+ ..(-1,2)..controls (-1.37755,1.71404) and (-1.71404,1.37755)
+ ..(-2,1)..controls (-2.33353,0.55965) and (-2.59729,0.04124)
+ ..(-2.5,-0.5)..controls (-2.36812,-1.23369) and (-1.6712,-1.65662)
+ ..(-1,-2)..controls (-0.66821,-2.16974) and (-0.33485,-2.33641)
+ ..(0,-2.5)..controls (0.37186,-2.68167) and (0.668,-2.25146)
+ ..cycle
+
+{makepen(path)}
+Pen polygon at line 46 (newly created):
+(1,-2)
+ .. (2,-1)
+ .. (2.5,0.5)
+ .. (1,2)
+ .. (0,2.5)
+ .. (-1,2)
+ .. (-2,1)
+ .. (-2.5,-0.5)
+ .. (-1,-2)
+ .. (0,-2.5)
+ .. cycle
+
+{qq:=pen}
+{primarydef}
+{secondarydef}
+
+//<expr>->
+
+//<expr>->
+{pencircle}
+{length(path)}
+{(future pen)slanted(1)}
+{((3,6))-((5,-5))}
+
+_aa__<secondary>->if(true
+{(0.1)*(15)}
+{odd(1.50009)}
+{not(false)}
+{known((8,1,5,-5,-5,5))}
+{(true)and(true)}
+(EXPR0)<-true
+{if}
+{true}
+
+!<primary>->false):(EXPR0)fi
+(EXPR0)<-(5,-5)
+{false}
+{(true)or(false)}
+{true}
+{fi}
+{-((5,-5))}
+{-((5,-5))}
+{+(1)}
+{-(1)}
+>> -1
+! Improper curl has been replaced by 1.
+<to be read again>
+ )
+l.51 {curl- +1)
+ ..tension atleast1..cycle sqrt2++sqrt2***[[]];
+A curl must be a known, nonnegative number.
+
+! Missing `}' has been inserted.
+<to be read again>
+ )
+l.51 {curl- +1)
+ ..tension atleast1..cycle sqrt2++sqrt2***[[]];
+I've scanned a direction spec for part of a path,
+so a right brace should have come next.
+I shall pretend that one was there.
+
+Path at line 51, before choices:
+(-5,5)
+
+Path at line 51, after choices:
+(-5,5)
+
+Path at line 51, before choices:
+(3,6)..controls (5,-5) and (-5,5)
+ ..(-5,5)..tension atleast1
+ ..{2896.30943,-2896.30934}cycle
+
+Path at line 51, after choices:
+(3,6)..controls (5,-5) and (-5,5)
+ ..(-5,5)..controls (-3.29726,7.86205) and (0.64516,8.35484)
+ ..cycle
+
+! Missing `)' has been inserted.
+<to be read again>
+ sqrt
+l.51 ...ion atleast1..cycle sqrt
+ 2++sqrt2***[[]];
+I found no right delimiter to match a left one. So I've
+put one in, behind the scenes; this may fix the problem.
+
+{((-2,11))subpath(path)}
+{reverse(path)}
+{makepen(path)}
+
+**->[[show(EXPR0)*(EXPR1)]]
+(EXPR0)<-future pen
+(EXPR1)<-future pen
+{begingroup}
+{show}
+{(future pen)*(future pen)}
+>> future pen
+>> future pen
+! Not implemented: (future pen)*(future pen).
+<to be read again>
+ ]]
+<to be read again>
+ sqrt
+l.51 ...ion atleast1..cycle sqrt
+ 2++sqrt2***[[]];
+I'm afraid I don't know how to apply that operation to that
+combination of types. Continue, and I'll return the second
+argument (see above) as the result of the operation.
+
+! Pen path must be a cycle.
+<to be read again>
+ ]]
+<to be read again>
+ sqrt
+l.51 ...ion atleast1..cycle sqrt
+ 2++sqrt2***[[]];
+I can't make a pen from the given path.
+So I've replaced it by the trivial path `(0,0)..cycle'.
+
+>> Pen polygon at line 51:
+(0,0)
+ .. cycle
+
+{endgroup}
+(EXPR0)<-vacuous
+{sqrt(2)}
+{sqrt(2)}
+{(1.41422)++(1.41422)}
+{begingroup}
+{endgroup}
+
+***->expandafter(EXPR1)scantokens"**oct"(EXPR0)
+(EXPR0)<-2
+(EXPR1)<-vacuous
+{expandafter}
+{scantokens}
+{oct(2)}
+>> 2
+! Not implemented: oct(known numeric).
+<to be read again>
+ ;
+l.51 ...cle sqrt2++sqrt2***[[]];
+
+I'm afraid I don't know how to apply that operation to that
+particular type. Continue, and I'll simply return the
+argument (shown above) as the result of the operation.
+
+
+**->[[show(EXPR0)*(EXPR1)]]
+(EXPR0)<-vacuous
+(EXPR1)<-2
+{begingroup}
+{show}
+{(vacuous)*(2)}
+>> vacuous
+>> 2
+! Not implemented: (vacuous)*(known numeric).
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.51 ...cle sqrt2++sqrt2***[[]];
+
+I'm afraid I don't know how to apply that operation to that
+combination of types. Continue, and I'll return the second
+argument (see above) as the result of the operation.
+
+>> 2
+{endgroup}
+(EXPR0)<-vacuous
+{begingroup}
+{interim}
+{-(20.5)}
+{charcode:=-20.5}
+{proofing:=-20.5}
+{-(2048)}
+{chardp:=-2048}
+{shipout}
+{nullpicture}
+! Enormous chardp has been reduced.
+<to be read again>
+ ]]
+l.52 ...48;shipout nullpicture]]
+ ;
+Font metric dimensions must be less than 2048pt.
+
+{restoring proofing=0}
+{endgroup}
+{if}
+{-(275.50002)}
+{charexists(-275.50002)}
+{known(unknown path p0 0p)}
+{(true)>(false)}
+{known(path)}
+{(true)=(true)}
+{true}
+{randomseed}
+! Missing `:=' has been inserted.
+<to be read again>
+ charcode
+l.53 ... p~: randomseed charcode
+ ; fi
+Always say `randomseed:=<numeric expression>'.
+
+{randomseed:=-20.5}
+{fi}
+{randomseed}
+>> "goof"
+! Unknown value will be ignored.
+<to be read again>
+ ;
+l.54 randomseed:="goof";
+ a[($,18++1+-+18),(2,3)]=b[(3,2),(1,$);
+Your expression was too random for me to handle,
+so I won't change the random seed just now.
+
+{(18)++(1)}
+{(18.02776)+-+(18)}
+{((2,3))-((-1,1))}
+{(a)*((3,2))}
+{((-1,1))+((3a,2a))}
+! Missing `]' has been inserted.
+<to be read again>
+ ;
+l.54 ...8),(2,3)]=b[(3,2),(1,$);
+
+I've scanned an expression of the form `a[b,c',
+so a right bracket should have come next.
+I shall pretend that one was there.
+
+{((1,-1))-((3,2))}
+{(b)*((-2,-3))}
+{((3,2))+((-2b,-3b))}
+{((3a-1,2a+1))=((-2b+3,-3b+2))}
+## b=-0.66667a+0.33333
+## a=2
+#### b=-1
+{show}
+{(^)+(1)}
+{(~)+(2)}
+{-(1)}
+{((^+1,~+2))slanted(-1)}
+{-(2)}
+{((linearform,~+2))yscaled(-2)}
+{-((3,4))}
+{((linearform,-2~-4))zscaled((-3,-4))}
+>> (-5~-3^-13,10~-4^+16)
+{((xpart pp,ypart pp,xxpart pp,xypart pp,yxpart pp,yypart pp))xscaled(9)
+}
+{((8,1,5,-5,-5,5))transformed((9xpart pp,ypart pp,9xxpart pp,9xypart pp,
+yxpart pp,yypart pp))}
+>> (9xpart pp+72xxpart pp+9xypart pp,ypart pp+8yxpart pp+yypart pp,45xxp
+art pp-45xypart pp,-45xxpart pp+45xypart pp,5yxpart pp-5yypart pp,-5yxpa
+rt pp+5yypart pp)
+{((xpart pp,ypart pp,xxpart pp,xypart pp,yxpart pp,yypart pp))shifted((1
+,2))}
+{((8,1,5,-5,-5,5))transformed((8,1,5,-5,-5,5))}
+{((xpart pp+1,ypart pp+2,xxpart pp,xypart pp,yxpart pp,yypart pp))transf
+ormed((43,-34,50,-50,-50,50))}
+>> (50xpart pp-50ypart pp-7,-50xpart pp+50ypart pp+16,50xxpart pp-50yxpa
+rt pp,50xypart pp-50yypart pp,-50xxpart pp+50yxpart pp,-50xypart pp+50yy
+part pp)
+{(2)-(1)}
+{(_0)*(1)}
+{(1)+(_0)}
+{-(_0+1)}
+>> -_0-1
+{show}
+{normaldeviate}
+{-(-2048)}
+{uniformdeviate(2048)}
+{angle((-0.41438,761.67789))}
+{cosd(90.03117)}
+{(200)*(-0.00055)}
+{mexp(-0.10986)}
+{sqrt(0.99957)}
+{mlog(0.99979)}
+{sind(-0.05469)}
+{floor(-0.00096)}
+>> -1
+{string}
+{(unknown string s2)=(unknown string s4)}
+{(unknown string s1)=(unknown string s2)}
+{(unknown string s3)=(unknown string s5)}
+{(unknown string s2)=(unknown string s4)}
+! Redundant equation.
+<to be read again>
+ ;
+l.58 ... s1=s2=s4; s3=s5; s1=s2;
+ if s1<=s4<>(s1<>s3):show[[ch...
+I already knew that this equation was true.
+But perhaps no harm has been done; let's continue.
+
+{if}
+{(unknown string s2)<=(unknown string s1)}
+{(unknown string s2)<>(unknown string s5)}
+>> unknown string s2
+>> unknown string s5
+! Unknown relation will be considered false.
+<to be read again>
+ )
+l.58 ...=s2; if s1<=s4<>(s1<>s3)
+ :show[[char34=s2:=s3]]fi;
+The quantities shown above have not been equated.
+
+{(true)<>(false)}
+{true}
+{show}
+{begingroup}
+{char(34)}
+{s2:=unknown string s5}
+{(""")=(unknown string s2)}
+{endgroup}
+{fi}
+>> vacuous
+{(0.1)point(path)}
+{begingroup}
+{pencircle}
+Pen polygon at line 59 (newly created):
+(0.5,0)
+ .. (0,0.5)
+ .. (-0.5,0)
+ .. (0,-0.5)
+ .. cycle
+
+{endgroup}
+{((3.24413,0.64801))penoffset(pen)}
+{((0,-0.5))rotated(540)}
+{((0,0.5))/(0.33333)}
+{-(1.5)}
+! Paths don't touch; `&' will be changed to `..'.
+<to be read again>
+ )
+l.60 ...tcontrol-1.5of(p~&cycle)
+ -precontrol1/2of p~(p~)=s1:=s...
+When you join paths `p&q', the ending point of p
+must be exactly equal to the starting point of q.
+So I'm going to pretend that you said `p..q' instead.
+
+Path at line 60, before choices:
+(0,0)..controls (15,4) and (-15,-12)
+ ..(4,0)
+ ..cycle
+
+Path at line 60, after choices:
+(0,0)..controls (15,4) and (-15,-12)
+ ..(4,0)..controls (17.52783,8.54388) and (-15.45978,-4.12262)
+ ..cycle
+
+{(-1.5)postcontrol(path)}
+{(0.5)precontrol(path)}
+{((-2.75,-5))-((3.75,-1))}
+! Missing `of' has been inserted for directiontime.
+<to be read again>
+ (
+l.60 ...cle)-precontrol1/2of p~(
+ p~)=s1:=s4:=s4;
+I've got the first argument; will look now for the other.
+
+{((-6.5,-4))directiontime(path)}
+{decimal(0.5)}
+{((0,1.50003))substring("0.5")}
+{s4:=unknown string s1}
+{s1:=unknown string s4}
+{("0.")=(unknown string s1)}
+{path}
+{length(" ")}
+! Missing `,' has been inserted.
+<to be read again>
+ }
+l.61 ...p~[]; p~1=p2{length" "}
+ &cycle; p~1=p2=p~0; p2..contr...
+I've got the x coordinate of a path direction;
+will look for the y coordinate next.
+
+! An expression can't begin with `}'.
+<inserted text>
+ 0
+<to be read again>
+ }
+l.61 ...p~[]; p~1=p2{length" "}
+ &cycle; p~1=p2=p~0; p2..contr...
+I'm afraid I need some sort of value in order to continue,
+so I've tentatively inserted `0'. You may want to
+delete this zero and insert something else;
+see Chapter 27 of The METAFONTbook for an example.
+
+Path at line 61, before choices:
+(5,-5){4096,0}
+ ..{4096,0}cycle
+
+Path at line 61, after choices:
+(5,-5)..controls (5,-5) and (5,-5)
+ ..cycle
+
+{(unknown path p~1)=(path)}
+{((5,-5))=(unknown path p~0)}
+{(path)=(path)}
+! Redundant or inconsistent equation.
+<to be read again>
+ ;
+l.61 ..." "}&cycle; p~1=p2=p~0;
+ p2..controls-p2..cycle=p~2;(p7
+An equation between already-known quantities can't help.
+But don't worry; continue and I'll just ignore it.
+
+{-((5,-5))}
+Path at line 61, before choices:
+(5,-5)..controls (-5,5) and (-5,5)
+ ..cycle
+
+Path at line 61, after choices:
+(5,-5)..controls (-5,5) and (-5,5)
+ ..cycle
+
+{(path)=(unknown path p~2)}
+{length(path)}
+Path at line 62, before choices:
+(3,6)..tension 1.2
+ ..(5,-5)..controls (5,-5) and (5,-5)
+ ..(5,-5)
+ ..(5,-5)..controls (-5,5) and (-5,5)
+ ..(5,-5){0,4096}..tension 1 and atleast1
+ ..cycle
+
+Path at line 62, after choices:
+(3,6)..controls (-3.01212,4.82085) and (-1.0424,-6.01257)
+ ..(5,-5)..controls (5,-5) and (5,-5)
+ ..(5,-5)..controls (5,-5) and (5,-5)
+ ..(5,-5)..controls (-5,5) and (-5,5)
+ ..(5,-5)..controls (5,0.02791) and (4.99951,6.39217)
+ ..cycle
+
+>> x
+! Improper tension has been set to 1.
+<to be read again>
+ ..
+l.63 x..
+ {curl1}-p7{curl hex "IsBad"}..tension.75and.74999..p...
+The expression above should have been a number >=3/4.
+
+{-((3,6))}
+{hex("IsBad")}
+>> "IsBad"
+! String contains illegal digits.
+<to be read again>
+ }
+l.63 ...l1}-p7{curl hex "IsBad"}
+ ..tension.75and.74999..p2{0,1...
+I zeroed out characters that weren't hex digits.
+
+>> 0.74998
+! Improper tension has been set to 1.
+<to be read again>
+ ..
+l.63 ...}..tension.75and.74999..
+ p2{0,1}&p2{_,'}..cycle:=p
+The expression above should have been a number >=3/4.
+
+>> _
+! Undefined x coordinate has been replaced by 0.
+<to be read again>
+ ,
+l.63 ...and.74999..p2{0,1}&p2{_,
+ '}..cycle:=p
+I need a `known' x value for this part of the path.
+The value I found (see above) was no good;
+so I'll try to keep going by using zero instead.
+(Chapter 27 of The METAFONTbook explains that
+you might want to type `I ???' now.)
+
+>> (xpart ',ypart ')
+! Undefined y coordinate has been replaced by 0.
+<to be read again>
+ }
+l.63 ...d.74999..p2{0,1}&p2{_,'}
+ ..cycle:=p
+I need a `known' y value for this part of the path.
+The value I found (see above) was no good;
+so I'll try to keep going by using zero instead.
+(Chapter 27 of The METAFONTbook explains that
+you might want to type `I ???' now.)
+
+Path at line 63, before choices:
+(3,6)..controls (-3.01212,4.82085) and (-1.0424,-6.01257)
+ ..(5,-5)..controls (5,-5) and (5,-5)
+ ..(5,-5)..controls (5,-5) and (5,-5)
+ ..(5,-5)..controls (-5,5) and (-5,5)
+ ..(5,-5)..controls (5,0.02791) and (4.99951,6.39217)
+ ..(3,6)
+ ..{curl 1}(-3,-6){curl 2989}..tension 0.75 and 1
+ ..{0,4096}(5,-5){curl 1}
+ ..cycle
+
+Path at line 63, after choices:
+(3,6)..controls (-3.01212,4.82085) and (-1.0424,-6.01257)
+ ..(5,-5)..controls (5,-5) and (5,-5)
+ ..(5,-5)..controls (5,-5) and (5,-5)
+ ..(5,-5)..controls (-5,5) and (-5,5)
+ ..(5,-5)..controls (5,0.02791) and (4.99951,6.39217)
+ ..(3,6)..controls (-2.44821,4.93144) and (-5.41408,-1.00029)
+ ..(-3,-6)..controls (-3.70045,-12.19485) and (5,-11.61679)
+ ..(5,-5)..controls (12.45406,-3.75087) and (10.41669,7.45464)
+ ..cycle
+
+>> path
+! Improper `:=' will be changed to `='.
+l.63 ...p2{0,1}&p2{_,'}..cycle:=
+ p
+I didn't find a variable name at the left of the `:=',
+so I'm going to pretend that you said `=' instead.
+
+{(path)=(unknown path p~4)}
+{-(9)}
+{((3.5001,7.00002))subpath(path)}
+{((-9,9))subpath(path)}
+{(path)=(unknown path p~6)}
+{show}
+>> Path at line 65:
+(-2.5,2.5)..controls (-2.49893,2.49893) and (0.00107,-0.00107)
+ ..(5,-5)..controls (5,0.02791) and (4.99951,6.39217)
+ ..(3,6)..controls (-2.44821,4.93144) and (-5.41408,-1.00029)
+ ..(-3,-6)..controls (-3.70045,-12.19485) and (5,-11.61679)
+ ..(5,-5)..controls (5.0001,-4.99998) and (5.00021,-4.99997)
+ ..(5.00032,-4.99995)
+
+{((1,2))directiontime(path)}
+>> 1
+{-(1.00002)}
+{((1,-1.00002))directiontime(path)}
+>> 3.24937
+Path at line 66, before choices:
+(0,0)..controls (1,1) and (0,1)
+ ..(1,0)
+
+Path at line 66, after choices:
+(0,0)..controls (1,1) and (0,1)
+ ..(1,0)
+
+{(unknown path p~3)=(path)}
+{show}
+Path at line 66, before choices:
+(5,-5){-2896.30943,-2896.30934}
+ ..{1831.78674,3663.57385}cycle
+
+Path at line 66, after choices:
+(5,-5)..controls (5,-5) and (5,-5)
+ ..cycle
+
+>> Path at line 66:
+(5,-5)..controls (5,-5) and (5,-5)
+ ..cycle
+
+{((0.31416,1))subpath(path)}
+{((1,1))directiontime(path)}
+{(1)-(0.31416)}
+{(0.27097)*(0.68584)}
+{(0.31416)+(0.18584)}
+>> 0.5
+{((0,0.25))subpath(path)}
+{((0.25,1))subpath(path)}
+Path at line 68, before choices:
+(0,0)..controls (0.25,0.25) and (0.375,0.4375)
+ ..(0.4375,0.5625)..controls (0.625,0.9375) and (0.25,0.75)
+ ..(1,0)
+
+Path at line 68, after choices:
+(0,0)..controls (0.25,0.25) and (0.375,0.4375)
+ ..(0.4375,0.5625)..controls (0.625,0.9375) and (0.25,0.75)
+ ..(1,0)
+
+! Missing `endtext' has been inserted.
+<to be read again>
+ ;
+l.68 ...~3)shifted begintext1,0;
+
+I found no right delimiter to match a left one. So I've
+put one in, behind the scenes; this may fix the problem.
+
+{(path)shifted((1,0))}
+{(unknown path p~5)=(path)}
+{(2/3)*((xpart ',ypart '))}
+{((0.66667xpart ',0.66667ypart '))zscaled((xpart ',ypart '))}
+>> (0,0,xpart ',-ypart ',ypart ',xpart ')
+! Transform components aren't all known.
+<to be read again>
+ {
+l.69 p~3:=2/3'zscaled'{
+ p~3}..controls(2,2/3(3))and penoffset(...
+I'm unable to apply a partially specified transformation
+except to a fully known pair or transform.
+Proceed, and I'll omit the transformation.
+
+>> 0.66667xpart '
+! Undefined x coordinate has been replaced by 0.
+<to be read again>
+ {
+l.69 p~3:=2/3'zscaled'{
+ p~3}..controls(2,2/3(3))and penoffset(...
+I need a `known' x value for this part of the path.
+The value I found (see above) was no good;
+so I'll try to keep going by using zero instead.
+(Chapter 27 of The METAFONTbook explains that
+you might want to type `I ???' now.)
+
+>> 0.66667ypart '
+! Undefined y coordinate has been replaced by 0.
+<to be read again>
+ {
+l.69 p~3:=2/3'zscaled'{
+ p~3}..controls(2,2/3(3))and penoffset(...
+I need a `known' y value for this part of the path.
+The value I found (see above) was no good;
+so I'll try to keep going by using zero instead.
+(Chapter 27 of The METAFONTbook explains that
+you might want to type `I ???' now.)
+
+>> path
+! Undefined coordinates have been replaced by (0,0).
+<to be read again>
+ }
+l.69 p~3:=2/3'zscaled'{p~3}
+ ..controls(2,2/3(3))and penoffset(...
+I need x and y numbers for this part of the path.
+The value I found (see above) was no good;
+so I'll try to keep going by using zero instead.
+(Chapter 27 of The METAFONTbook explains that
+you might want to type `I ???' now.)
+
+{(2/3)*(3)}
+{(1/2)*(x)}
+{((0.5x,-5))penoffset((0,1))}
+>> (0.5x,-5)
+>> (0,1)
+! Not implemented: penoffset(unknown pair)of(pair).
+<to be read again>
+ (
+l.69 ...enoffset(1/2x,y)of(0,1)(
+ 1,0);
+I'm afraid I don't know how to apply that operation to that
+combination of types. Continue, and I'll return the second
+argument (see above) as the result of the operation.
+
+! Missing `..' has been inserted.
+<to be read again>
+ (
+l.69 ...enoffset(1/2x,y)of(0,1)(
+ 1,0);
+A path join command should end with two dots.
+
+Path at line 69, before choices:
+(0,0)..controls (2,2) and (0,1)
+ ..(1,0)
+
+Path at line 69, after choices:
+(0,0)..controls (2,2) and (0,1)
+ ..(1,0)
+
+{p~3:=path}
+{show}
+{reverse(path)}
+{(path)intersectiontimes(path)}
+>> (0.17227,0.28339)
+{(0.17227)point(path)}
+>> (0.71329,0.78188)
+{(1)-(0.28339)}
+{(0.71661)point(path)}
+>> (0.7133,0.78189)
+{show}
+{(path)shifted((0.01,0))}
+{(path)intersectiontimes(path)}
+{xpart((1.47693,1.18973))}
+{(1.47693)point(path)}
+{(path)shifted((0.01,0))}
+{(path)intersectiontimes(path)}
+{ypart((1.47693,1.18973))}
+{(1.18973)point(path)}
+{((1.50499,0.71521))-((1.495,0.71521))}
+>> (0.01,0)
+{begingroup}
+{interim}
+{tracingedges:=1}
+{-(1)}
+{-(1.00002)}
+{(-1)+-+(-1.00002)}
+! Pythagorean subtraction 1+-+1.00002 has been replaced by 0.
+l.73 ...es:=1; e[-1+-+ -1.00001]
+ =nullpicture; addto e1 also[[
+Since I don't take square roots of negative numbers,
+I'm zeroing this one. Proceed, with fingers crossed.
+
+{nullpicture}
+{(unknown picture e0)=(picture)}
+{addto}
+{begingroup}
+{addto}
+{(path)scaled(3)}
+Path at line 74, before subdivision into octants:
+(3,0)..controls (3.75,0.75) and (4.125,1.3125)
+ ..(4.3125,1.6875)..controls (4.875,2.8125) and (3.75,2.25)
+ ..(6,0)..controls (3.75,2.25) and (4.875,2.8125)
+ ..(4.3125,1.6875)..controls (4.125,1.3125) and (3.75,0.75)
+ ..cycle
+
+Cycle spec at line 74, after subdivision:
+(3,0) % beginning in octant `NNE'
+ ..controls (3.75,0.75) and (4.125,1.3125)
+ ..(4.3125,1.6875) % segment 0
+ ..controls (4.5,2.0625) and (4.5,2.25)
+ ..(4.5,2.25) % segment 1
+% entering octant `NNW'
+% entering octant `WNW'
+% entering octant `WSW'
+% entering octant `SSW'
+% entering octant `SSE'
+ ..controls (4.5,2.25) and (4.5,1.5)
+ ..(6,0) % segment 1
+% entering octant `ESE'
+% entering octant `ENE'
+% entering octant `NNE'
+% entering octant `NNW'
+ ..controls (4.5,1.5) and (4.5,2.25)
+ ..(4.5,2.25) % segment 2
+% entering octant `WNW'
+% entering octant `WSW'
+% entering octant `SSW'
+ ..controls (4.5,2.25) and (4.5,2.0625)
+ ..(4.3125,1.6875) % segment 2
+ ..controls (4.125,1.3125) and (3.75,0.75)
+ ..(3,0) % segment 3
+% entering octant `SSE'
+% entering octant `ESE'
+% entering octant `ENE'
+ & cycle
+
+Tracing edges at line 74: (weight 1)
+(4,0)(4,1)(5,1)(5,3)(4,3)(4,1)(5,1)(5,0)(6,0)(6,1)(5,1)(5,3)
+(4,3)(4,1)(3,1)(3,0).
+
+{(unknown picture e1)=(unknown picture e2)}
+{(picture)=(unknown picture e1)}
+{cull}
+{nullpicture}
+{endgroup}
+{show}
+{-(4095)}
+{(picture)shifted((4089,-4095))}
+>> Edge structure at line 75:
+row -4093: | 4093+ 4094-
+row -4094: | 4093+ 4094-
+row -4095: | 4092+ 4093- 4094+ 4095-
+
+{-(4095)}
+{(picture)shifted((-4095,4092))}
+{-(3)}
+{(picture)shifted((-3,0))}
+>> Edge structure at line 75:
+row 4094: -4094+ -4093- -4094+ -4093- |
+row 4093: -4094+ -4093- -4094+ -4093- |
+row 4092: -4095+ -4092- -4093+ -4094- |
+
+{-(4095)}
+{(picture)shifted((4089,-4095))}
+! Too far to shift.
+<to be read again>
+ ]]
+l.76 e2 shifted(4089,-4095)]]
+ ;addto e1 also e2 shifted(-2,$)...
+I can't shift the picture as requested---it would
+make some coordinates too large or too small.
+Proceed, and I'll omit the transformation.
+
+>> Edge structure at line 76:
+row 2: 4+ 5- 4+ 5- |
+row 1: 4+ 5- 4+ 5- |
+row 0: 3+ 6- 5+ 4- |
+
+{restoring tracingedges=32767.99998}
+{endgroup}
+{addto}
+{-(2)}
+{(picture)shifted((-2,-1))}
+{-(4)}
+{(picture)shifted((-4,-1))}
+{e1:=picture}
+{addto}
+{(picture)rotated(89.999)}
+! That transformation is too hard.
+<to be read again>
+ +
+l.77 ...e0 also e1rotated89.999+
+ e1scaled$; show e0 xscaled-10...
+I can apply complicated transformations to paths,
+but I can only do integer operations on pictures.
+Proceed, and I'll omit the transformation.
+
+{(picture)scaled(-1)}
+{(picture)+(picture)}
+{show}
+{-(10)}
+{(picture)xscaled(-10)}
+{(picture)yscaled(2)}
+{(picture)xscaled(82)}
+! Scaled picture would be too big.
+<to be read again>
+ yscaled
+l.78 yscaled
+ 683;addto e1 doublepath (0,9) withweight-3 withwe...
+I can't xscale the picture as requested---it would
+make some coordinates too large or too small.
+Proceed, and I'll omit the transformation.
+
+{(picture)yscaled(683)}
+! Scaled picture would be too big.
+<to be read again>
+ ;
+l.78 yscaled683;
+ addto e1 doublepath (0,9) withweight-3 withwe...
+I can't yscale the picture as requested---it would
+make some coordinates too large or too small.
+Proceed, and I'll omit the transformation.
+
+>> Edge structure at line 78:
+row 5: -40- -50+ -40- -50+ |
+row 4: -40- -50+ -40- -50+ |
+row 3: -30+ 0- -10+ -20- -40- -50+ -40- -50+ | -10+ 0-
+row 2: -30+ 0- -10+ -20- -40- -50+ -40- -50+ | -10+ 0-
+row 1: 20- 10+ 20- 10+ -20+ -10- -20+ -10- -30- -60+ -50- -40+ |
+ -10+ -10+ 0- 0- 10+ 20-
+row 0: 20- 10+ 20- 10+ -20+ -10- -20+ -10- -30- -60+ -50- -40+ |
+ -10+ -10+ 0- 0- 10+ 20-
+row -1: 20- 10+ 20- 10+ -20+ -10- -20+ -10- | -20+ -10- 0+ 0+ 10-
+ 10-
+row -2: 20- 10+ 20- 10+ -20+ -10- -20+ -10- | -20+ -10- 0+ 0+ 10-
+ 10-
+row -3: 30- 0+ 10- 20+ | 0+ 10-
+row -4: 30- 0+ 10- 20+ | 0+ 10-
+
+{addto}
+{-(3)}
+{turningnumber(path)}
+! Weight must be -3, -2, -1, +1, +2, or +3.
+<to be read again>
+ withpen
+l.79 withpen
+ pencircle xscaled(oct"180"++1) rotated-angle(64...
+I'll ignore the bad `with' clause and look for another.
+
+{pencircle}
+{oct("180")}
+>> "180"
+! String contains illegal digits.
+<to be read again>
+ ++
+l.79 ...ircle xscaled(oct"180"++
+ 1) rotated-angle(64,$) shifte...
+I zeroed out characters that weren't in the range 0..7.
+
+{(64)++(1)}
+{(future pen)xscaled(64.00781)}
+{angle((64,-1))}
+{-(-0.89517)}
+{(future pen)rotated(0.89517)}
+{(future pen)shifted((9,8))}
+Pen polygon at line 80 (newly created):
+(9,7.5)
+ .. (37.5,8)
+ .. (41,8.5)
+ .. (9,8.5)
+ .. (-19.5,8)
+ .. (-23,7.5)
+ .. cycle
+
+Path at line 80, before choices:
+(-1,-1){curl 1}
+ ..(1,0)
+ ..(1,1)
+ ..(-1,0)
+ ..{curl 1}cycle
+
+Path at line 80, after choices:
+(-1,-1)..controls (-0.18568,-1.14464) and (0.62712,-0.73824)
+ ..(1,0)..controls (1.16457,0.32584) and (1.21637,0.71506)
+ ..(1,1)..controls (0.46898,1.69931) and (-0.7587,1.2167)
+ ..(-1,0)..controls (-1.06546,-0.33012) and (-1.06546,-0.66988)
+ ..cycle
+
+{makepen(path)}
+{(future pen)xscaled(4095.49998)}
+Pen polygon at line 80 (newly created):
+(4095.49998,0)
+ .. (4095.49998,1)
+ .. (-4095.49998,0)
+ .. (-4095.49998,-1)
+ .. cycle
+
+Path at line 80, before subdivision into octants:
+(0,9)..controls (0,9) and (0,9)
+ ..cycle
+
+! Curve out of range.
+<to be read again>
+ ;
+l.80 ...cycle)xscaled4095.49999;
+
+At least one of the coordinates in the path I'm about to
+digitize was really huge (potentially bigger than 4095).
+So I've cut it back to the maximum size.
+The results will probably be pretty wild.
+
+Cycle spec at line 80, after subdivision:
+(0,0) % beginning in octant `ENE'
+% entering octant `NNE'
+% entering octant `NNW'
+% entering octant `WNW'
+% entering octant `WSW'
+% entering octant `SSW'
+% entering octant `SSE'
+% entering octant `ESE'
+ & cycle
+
+Tracing edges at line 80: (weight -3)
+@ Octant ENE (2 offsets), from (-4095.49998,-1) to (4095.49998,0)
+@ transition line 0, from (-4095.49998,-1) to (-4095.49998,-1)
+@ transition line 1, from (-4095.49998,-1) to (4095.49998,0)
+@ transition line 2, from (4095.49998,0) to (4095.49998,0)
+(0,-1)
+@ Octant NNE (1 offset), from (4095.49998,0) to (4095.49998,1)
+@ transition line 2, from (4095.49998,0) to (4095.49998,0)
+@ transition line 1, from (4095.49998,0) to (4095.49998,1)
+(0,0)(4095,0)
+@ Octant NNW (0 offsets), from (4095.49998,1) to (4095.49998,1)
+@ transition line 0, from (4095.49998,1) to (4095.49998,1)
+@ Octant WNW (0 offsets), from (4095.49998,1) to (4095.49998,1)
+@ transition line 1, from (4095.49998,1) to (4095.49998,1)
+@ Octant WSW (2 offsets), from (4095.49998,1) to (-4095.49998,0)
+@ transition line 0, from (4095.49998,1) to (4095.49998,1)
+@ transition line 1, from (4095.49998,1) to (-4095.49998,0)
+@ transition line 2, from (-4095.49998,0) to (-4095.49998,0)
+(4095,1)(0,1)
+@ Octant SSW (1 offset), from (-4095.49998,0) to (-4095.49998,-1)
+@ transition line 2, from (-4095.49998,0) to (-4095.49998,0)
+@ transition line 1, from (-4095.49998,0) to (-4095.49998,-1)
+(0,0)(-4095,0)
+@ Octant SSE (0 offsets), from (-4095.49998,-1) to (-4095.49998,-1)
+@ transition line 0, from (-4095.49998,-1) to (-4095.49998,-1)
+@ Octant ESE (0 offsets), from (-4095.49998,-1) to (-4095.49998,-1)
+@ transition line 1, from (-4095.49998,-1) to (-4095.49998,-1)
+(-4095,-1).
+
+{show}
+>> Edge structure at line 81:
+row 1: | 0+ 1-
+row 0: 0--- 4095+++ -2+ -1- -2+ -1- | 0+ 1-
+row -1: -4095--- 0+++ -2+ -1- -2+ -1- | -1+ 0- 1+ 2-
+row -2: -3+ 0- -1+ -2- |
+
+{totalweight(picture)}
+>> -0.37476
+{charcode:=5}
+{chardp:=5}
+{-(1.5)}
+{xoffset:=-1.5}
+{shipout}
+[5]
+Edge structure at line 81 (just shipped out):
+row 1: | -1+ 0-
+row 0: | -3+ -3+ -2- -2- -1--- -1+ 0- 4094+++
+row -1: | -4096--- -3+ -3+ -2- -2- -2+ -1- -1+++ 0+ 1-
+row -2: | -4+ -3- -2+ -1-
+
+{showstats}
+Memory usage 1084&202 (749 still untouched)
+String usage 24&92 (860&11376 still untouched)
+{addto}
+{(path)yscaled(0.01666)}
+Path at line 82, before subdivision into octants:
+(0,0)..controls (15,0.06665) and (-15,-0.19995)
+ ..(4,0)..controls (-15,-0.19995) and (15,0.06665)
+ ..cycle
+
+Cycle spec at line 82, after subdivision:
+(0,0) % beginning in octant `ENE'
+ ..controls (1.74272,0.00775) and (2.87802,0.01099)
+ ..(3.55333,0.01099) % segment 0
+% entering octant `ESE'
+ ..controls (4.12251,0.01099) and (4.36491,0.00868)
+ ..(4.36877,0.00482) % segment 0
+% entering octant `SSE'
+ ..controls (4.3688,0.00479) and (4.36882,0.00476)
+ ..(4.36882,0.00473) % segment 0
+% entering octant `SSW'
+ ..controls (4.36882,0.0047) and (4.3688,0.00467)
+ ..(4.36877,0.00464) % segment 0
+% entering octant `WSW'
+ ..controls (4.34875,-0.01538) and (-1.88759,-0.07579)
+ ..(-2.48894,-0.07579) % segment 0
+% entering octant `WNW'
+ ..controls (-2.5191,-0.07579) and (-2.5351,-0.07564)
+ ..(-2.53542,-0.07532) % segment 0
+% entering octant `NNW'
+% entering octant `NNE'
+% entering octant `ENE'
+ ..controls (-2.53209,-0.07199) and (-0.88672,-0.05144)
+ ..(4,0) % segment 0
+% entering octant `NNE'
+% entering octant `NNW'
+% entering octant `WNW'
+% entering octant `WSW'
+ ..controls (-0.88672,-0.05144) and (-2.5321,-0.072)
+ ..(-2.53542,-0.07532) % segment 1
+% entering octant `SSW'
+% entering octant `SSE'
+% entering octant `ESE'
+ ..controls (-2.53511,-0.07562) and (-2.5191,-0.07579)
+ ..(-2.48894,-0.07579) % segment 1
+% entering octant `ENE'
+ ..controls (-1.88759,-0.07579) and (4.34877,-0.01537)
+ ..(4.36877,0.00464) % segment 1
+% entering octant `NNE'
+ ..controls (4.3688,0.00467) and (4.36882,0.0047)
+ ..(4.36882,0.00473) % segment 1
+% entering octant `NNW'
+ ..controls (4.36882,0.00476) and (4.3688,0.00479)
+ ..(4.36877,0.00482) % segment 1
+% entering octant `WNW'
+ ..controls (4.36491,0.00868) and (4.12251,0.01099)
+ ..(3.55333,0.01099) % segment 1
+% entering octant `WSW'
+ ..controls (2.87802,0.01099) and (1.74272,0.00775)
+ ..(0,0) % segment 1
+% entering octant `SSW'
+% entering octant `SSE'
+% entering octant `ESE'
+ & cycle
+
+Tracing edges at line 82: (weight 1)
+(No new edges added.)
+
+{(picture)yscaled(0)}
+{e3:=picture}
+{autorounding:=2}
+{addto}
+Path at line 83, before choices:
+(0.5,0){curl 1}
+ ..{curl 1}(3.5,1.5)
+
+Path at line 83, after choices:
+(0.5,0)..controls (1.5,0.5) and (2.5,1)
+ ..(3.5,1.5)
+
+Path at line 83, before subdivision into octants:
+(0.5,0)..controls (1.5,0.5) and (2.5,1)
+ ..(3.5,1.5)..controls (2.5,1) and (1.5,0.5)
+ ..cycle
+
+Cycle spec at line 83, after subdivision and double autorounding:
+(0.5,0) % beginning in octant `ENE'
+ ..controls (1.5,0.5) and (2.5,1)
+ ..(3.5,1.5) % segment 0
+% entering octant `NNE'
+% entering octant `NNW'
+% entering octant `WNW'
+% entering octant `WSW'
+ ..controls (2.5,1) and (1.5,0.5)
+ ..(0.5,0) % segment 1
+% entering octant `SSW'
+% entering octant `SSE'
+% entering octant `ESE'
+ & cycle
+
+Tracing edges at line 83: (weight 2)
+(2,0)(2,1)(4,1)(4,2)(4,1)(2,1)(2,0).
+
+{tracingspecs:=0}
+Path at line 84, before choices:
+(1,1)
+ ..cycle
+
+Path at line 84, after choices:
+(1,1)..controls (1,1) and (1,1)
+ ..cycle
+
+{makepen(path)}
+{(future pen)yscaled(1.5)}
+Pen polygon at line 84 (newly created):
+(1,1.5)
+ .. cycle
+
+{q:=pen}
+{((-1,yy))rotated((8,1,5,-5,-5,5))}
+>> (8,1,5,-5,-5,5)
+! Improper transformation argument.
+<to be read again>
+ {
+l.85 p~8=(($,yy)rotated p{
+ 0,1}..{0,$}(1,0){0,$}..cycle)scaled...
+The expression shown above has the wrong type,
+so I can't transform anything using it.
+Proceed, and I'll omit the transformation.
+
+>> yy
+! Undefined y coordinate has been replaced by 0.
+<to be read again>
+ {
+l.85 p~8=(($,yy)rotated p{
+ 0,1}..{0,$}(1,0){0,$}..cycle)scaled...
+I need a `known' y value for this part of the path.
+The value I found (see above) was no good;
+so I'll try to keep going by using zero instead.
+(Chapter 27 of The METAFONTbook explains that
+you might want to type `I ???' now.)
+
+Path at line 85, before choices:
+(-1,0){0,4096}
+ ..{0,-4096}(1,0){0,-4096}
+ ..{0,4096}cycle
+
+Path at line 85, after choices:
+(-1,0)..controls (-1,1.33333) and (1,1.33333)
+ ..(1,0)..controls (1,-1.33333) and (-1,-1.33333)
+ ..cycle
+
+{(path)scaled(2)}
+{(path)shifted((1000.49,9))}
+{(unknown path p~8)=(path)}
+{turningcheck:=1}
+{addto}
+>> (8,1,5,-5,-5,5)
+! Improper type.
+<to be read again>
+ withpen
+l.86 ...n q withweight p withpen
+ cycle p;
+Next time say `withweight <known numeric expression>';
+I'll ignore the bad `with' clause and look for another.
+
+{cycle((8,1,5,-5,-5,5))}
+>> false
+! Improper type.
+<to be read again>
+ ;
+l.86 ...eight p withpen cycle p;
+
+Next time say `withpen <known pen expression>';
+I'll ignore the bad `with' clause and look for another.
+
+Tracing edges at line 86: (weight 1)
+@ Octant NNE (0 offsets), from (999,10.5) to (999.15451,11.65451)
+@ transition line 1, from (999.15451,11.65451) to (999.15451,11.65451)
+(999,11)
+@ Octant ENE (0 offsets), from (999.15451,11.65451) to (1001,12)
+@ transition line 0, from (999.15451,11.65451) to (999.15451,11.65451)
+@ Octant ESE (0 offsets), from (1001,12) to (1002.8455,11.6545)
+@ transition line 1, from (1002.8455,11.6545) to (1002.8455,11.6545)
+@ Octant SSE (0 offsets), from (1002.8455,11.6545) to (1003,10.5)
+@ transition line 0, from (1002.8455,11.6545) to (1002.8455,11.6545)
+(999,12)(1003,12)
+@ Octant SSW (0 offsets), from (1003,10.5) to (1002.84549,9.34549)
+@ transition line 1, from (1002.84549,9.34549) to (1002.84549,9.34549)
+@ Octant WSW (0 offsets), from (1002.84549,9.34549) to (1001,9)
+@ transition line 0, from (1002.84549,9.34549) to (1002.84549,9.34549)
+@ Octant WNW (0 offsets), from (1001,9) to (999.1545,9.3455)
+@ transition line 1, from (999.1545,9.3455) to (999.1545,9.3455)
+@ Octant NNW (0 offsets), from (999.1545,9.3455) to (999,10.5)
+@ transition line 0, from (999.1545,9.3455) to (999.1545,9.3455)
+(1003,9)(999,9)(999,11).
+
+Tracing edges at line 86: (weight 1)
+@ Octant SSE (0 offsets), from (999,10.5) to (999.15451,9.34549)
+@ transition line 0, from (999,10.5) to (999,10.5)
+(999,11)
+@ Octant ESE (0 offsets), from (999.15451,9.34549) to (1001,9)
+@ transition line 1, from (1001,9) to (1001,9)
+@ Octant ENE (0 offsets), from (1001,9) to (1002.8455,9.3455)
+@ transition line 0, from (1001,9) to (1001,9)
+@ Octant NNE (0 offsets), from (1002.8455,9.3455) to (1003,10.5)
+@ transition line 1, from (1003,10.5) to (1003,10.5)
+(999,9)(1003,9)
+@ Octant NNW (0 offsets), from (1003,10.5) to (1002.84549,11.65451)
+@ transition line 0, from (1003,10.5) to (1003,10.5)
+@ Octant WNW (0 offsets), from (1002.84549,11.65451) to (1001,12)
+@ transition line 1, from (1001,12) to (1001,12)
+@ Octant WSW (0 offsets), from (1001,12) to (999.1545,11.6545)
+@ transition line 0, from (1001,12) to (1001,12)
+@ Octant SSW (0 offsets), from (999.1545,11.6545) to (999,10.5)
+@ transition line 1, from (999,10.5) to (999,10.5)
+(1003,12)(999,12)(999,11).
+
+{begingroup}
+{interim}
+{(xx)=(0.1)}
+## xx=0.1
+{autorounding:=0.1}
+{addto}
+Tracing edges at line 87: (weight -2)
+@ Octant NNE (0 offsets), from (999,10.5) to (999.38197,11.42706)
+@ transition line 1, from (999.38197,11.42706) to (999.38197,11.42706)
+@ Octant ENE (0 offsets), from (999.38197,11.42706) to (1001,12)
+@ transition line 0, from (999.38197,11.42706) to (999.38197,11.42706)
+(999,11)
+@ Octant ESE (0 offsets), from (1001,12) to (1002.61804,11.42705)
+@ transition line 1, from (1002.61804,11.42705) to (1002.61804,11.42705)
+(999,12)(1003,12)
+@ Octant SSE (0 offsets), from (1002.61804,11.42705) to (1003,10.5)
+@ transition line 0, from (1002.61804,11.42705) to (1002.61804,11.42705)
+@ Octant SSW (0 offsets), from (1003,10.5) to (1002.61803,9.57294)
+@ transition line 1, from (1002.61803,9.57294) to (1002.61803,9.57294)
+@ Octant WSW (0 offsets), from (1002.61803,9.57294) to (1001,9)
+@ transition line 0, from (1002.61803,9.57294) to (1002.61803,9.57294)
+@ Octant WNW (0 offsets), from (1001,9) to (999.38196,9.57295)
+@ transition line 1, from (999.38196,9.57295) to (999.38196,9.57295)
+(1003,9)(999,9)
+@ Octant NNW (0 offsets), from (999.38196,9.57295) to (999,10.5)
+@ transition line 0, from (999.38196,9.57295) to (999.38196,9.57295)
+(999,11).
+
+{restoring autorounding=2}
+{endgroup}
+{-(14.5)}
+{charext:=-14.5}
+{chardp:=-14.5}
+{chardx:=-14.5}
+{shipout}
+{-(picture)}
+{(picture)-(picture)}
+{-(picture)}
+{turningnumber(path)}
+{(6)*(-1)}
+{(picture)shifted((0,-6))}
+{(picture)+(picture)}
+[5.-14]
+Edge structure at line 88 (just shipped out):
+row 11: | 998- 998+ 998++ 1002-- 1002- 1002+
+row 10: | 998- 998+ 998++ 1002-- 1002- 1002+
+row 9: | 998- 998+ 998++ 1002-- 1002- 1002+
+row 5: | 998- 998+ 998++ 1002-- 1002- 1002+
+row 4: | 998- 998+ 998++ 1002-- 1002- 1002+
+row 3: | 998- 998+ 998++ 1002-- 1002- 1002+
+row 2: | 3+ 3+ 3+ 3+ 4- 4- 4- 4-
+row 1: | -1+ -1+ 0- 0- 1+ 2- 3+ 3+ 3+ 3+ 4- 4- 4- 4-
+row 0: | -3+ -3+ -3+ -2- -2- -2- -1+ -1+ 0- 0- 0+ 0+ 1- 1- 2+ 2+
+ 3- 3- 4+ 4+ 5- 5-
+row -1: | -3+ -3+ -2- -2- -2+ -2+ -1- -1- 0+ 0+ 0+ 1- 1- 1-
+row -2: | -4+ -3- -2+ -2+ -1- -1-
+row -4: | 3+ 3+ 4- 4-
+row -5: | 3+ 3+ 4- 4-
+row -6: | 2+ 3- 4+ 5-
+
+Path at line 89, before choices:
+(0,0){curl 1}
+ ..(1,0.5)
+ ..(5,1.5)
+ ..(7,2.5)
+ ..(12,3.5)
+ ..{curl 1}(13,4)
+
+Path at line 89, after choices:
+(0,0)..controls (0.3153,0.20053) and (0.6504,0.36807)
+ ..(1,0.5)..controls (2.29114,0.98723) and (3.72412,0.97192)
+ ..(5,1.5)..controls (5.68967,1.78545) and (6.30771,2.22081)
+ ..(7,2.5)..controls (8.58867,3.1407) and (10.3946,2.90645)
+ ..(12,3.5)..controls (12.3506,3.62962) and (12.68594,3.7973)
+ ..(13,4)
+
+{(unknown path p~9)=(path)}
+{addto}
+Tracing edges at line 89: (weight 1)
+(1,0)(1,1)(5,1)(5,2)(7,2)(7,3)(12,3)(12,4)(12,3)(7,3)(7,2)(5,2)
+(5,1)(1,1)(1,0).
+
+{smoothing:=1}
+{addto}
+Tracing edges at line 90: (weight 1)
+(1,0)(1,1)(4,1)(4,2)(8,2)(8,3)(12,3)(12,4)(12,3)(8,3)(8,2)(4,2)
+(4,1)(1,1)(1,0).
+
+{addto}
+{-(4095)}
+Path at line 91, before choices:
+(-4095,0){curl 1}..tension 0.75 and 999
+ ..{curl 1}(0,2)
+
+Path at line 91, after choices:
+(-4095,0)..controls (-2275,0.88889) and (-1.36636,1.99933)
+ ..(0,2)
+
+Tracing edges at line 91: (weight 1)
+(-3071,0)(-3071,1)(-1024,1)(-1024,2)(-1024,1)(-3071,1)(-3071,0).
+
+{show}
+{-(90)}
+{(picture)rotated(-90)}
+>> Edge structure at line 91:
+
+{(picture)+(picture)}
+{(90)*(-1)}
+{(picture)rotated(-90)}
+{(picture)rotated(90)}
+>> Edge structure at line 91:
+row 2: | 4+++ 4+ 5--- 5-
+row 1: | 0+++ 0+ 1--- 1- 2++ 3-- 4+++ 4+ 5--- 5-
+row 0: | -2+++ -2+++ -1--- -1--- 0+++ 0+ 2--- 2- 3++ 4-- 5++ 6--
+row -1: | -2+++ -2+ 0--- 0- 1+++ 1+++ 2--- 2---
+row -2: | -3++ -2-- -1+++ -1+ 0--- 0-
+
+{if}
+{if}
+{elseif}
+! Missing `:' has been inserted.
+<inserted text>
+ :
+<to be read again>
+ elseif
+l.92 if "a" if "ab">"b" elseif
+ path reverse (3,4): >="aa":foo...
+
+{("ab")>("b")}
+{false}
+{reverse((3,4))}
+{path(path)}
+{true}
+{("a")>=("aa")}
+{false}
+{if}
+{((xpart ',ypart '))-((1,yy))}
+{((xpart '-1,linearform))<((xpart ',ypart '))}
+{true}
+{fi}
+{else}
+! Extra else.
+l.93 ... if '-(1,yy)<': :fi else
+ def dup text t=[[t;save endd...
+I'm ignoring this; it doesn't match any if.
+
+{def}
+{def}
+{def}
+
+||<tertiary>->show.substring(EXPR0)of("a"
+(EXPR0)<-(2,-1)
+{show}
+{("a")&("bc")}
+{((2,-1))substring("abc")}
+>> "ba"
+{tertiarydef}
+{def}
+{show}
+{((23.3,4.5))subpath(path)}
+Path at line 100, before choices:
+(0,0){curl 2}
+ ..(13,4)..controls (12.84297,3.89865) and (12.68063,3.80606)
+ ..(12.51372,3.72261){curl 3}
+ ..{curl 4}(-1,-1){curl 4}
+ ..{curl 2}cycle
+
+Path at line 100, after choices:
+(0,0)..controls (-40.15552,-36.7088) and (58.71173,33.50317)
+ ..(13,4)..controls (12.84297,3.89865) and (12.68063,3.80606)
+ ..(12.51372,3.72261)..controls (8.00914,2.1484) and (3.50458,0.5742)
+ ..(-1,-1)..controls (-0.66667,-0.66667) and (-0.33333,-0.33333)
+ ..cycle
+
+>> Path at line 100:
+(0,0)..controls (-40.15552,-36.7088) and (58.71173,33.50317)
+ ..(13,4)..controls (12.84297,3.89865) and (12.68063,3.80606)
+ ..(12.51372,3.72261)..controls (8.00914,2.1484) and (3.50458,0.5742)
+ ..(-1,-1)..controls (-0.66667,-0.66667) and (-0.33333,-0.33333)
+ ..cycle
+
+{numspecial}
+{(2)+(3)}
+
+++->[[dup.showtoken(EXPR0);]];def.x.expr.z.of(EXPR1)=z.enddef;texts(x=((
+EXPR1)+0)(EXPR1)+(EXPR1))("xx",foo((EXPR0)))=0]]
+(EXPR0)<-path
+(EXPR1)<-5
+{begingroup}
+
+dup<text>->[[(TEXT0);save
+(TEXT0)<-showtoken(path)
+{begingroup}
+{showtoken}
+> (path)
+{save}
+{restoring ;}
+{endgroup}
+{def}
+! Missing symbolic token inserted.
+<inserted text>
+ INACCESSIBLE
+++->...]];def.x.expr.z.of(EXPR1)
+ =z.enddef;texts(x=((EXPR1)+0)...
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+Sorry: You can't redefine a number, string, or expr.
+I've inserted an inaccessible symbol so that your
+definition will be completed without mixing me up too badly.
+
+
+texts(TEXT0)(TEXT1)<expr>->for.n:=,for.n"yy":n,length.if.false:endfor(TE
+XT1),(TEXT0),:if.string.n:forsuffixes.n=foo1,[foo(n)],':show(TEXT0),(TEX
+T1)|(n;exitif.not('<='+((EXPR2),yy))endfor.for.m= :+endfor.for.m=alpha.s
+tep-1.1 3$:+m.endfor.fi.endfor
+(TEXT0)<-x=((5)+0)(5)+(5)
+(TEXT1)<-"xx",foo((path))
+(EXPR2)<-0
+{for}
+{for}
+! Missing `=' has been inserted.
+<to be read again>
+ "yy"
+texts->for.n:=,for.n"yy"
+ :n,length.if.false:endfor(TEXT1),(TEX...
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+The next thing in this loop should have been `=' or `:='.
+But don't worry; I'll pretend that an equals sign
+was present, and I'll look for the values next.
+
+{loop value="yy"}
+{if}
+{false}
+{false}
+! Incomplete if; all text was ignored after line 100.
+<inserted text>
+ fi
+<to be read again>
+ ENDFOR
+<for("yy")> ....if.false: ENDFOR
+
+texts->...length.if.false:endfor
+ (TEXT1),(TEXT0),:if.string.n:...
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+A forbidden `outer' token occurred in skipped text.
+This kind of error happens when you say `if...' and forget
+the matching `fi'. I've inserted a `fi'; this might work.
+
+{[repeat the loop]}
+{length("xx")}
+
+foo(TEXT2)->begingroup(TEXT2)endgroup
+(SUFFIX0)<-
+(SUFFIX1)<-foo
+(TEXT2)<-(path)
+{begingroup}
+{endgroup}
+
+x<expr>of<primary>->(EXPR0)
+{(5)+(0)}
+(EXPR0)<-5
+! Missing `of' has been inserted for x.
+<to be read again>
+ (5)
+<argument> x=((5)+0)(5)
+ +(5)
+texts->...:endfor(TEXT1),(TEXT0)
+ ,:if.string.n:forsuffixes.n=f...
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+I've got the first argument; will look now for the other.
+
+(EXPR1)<-5
+{(5)+(5)}
+{loop value="yy"}
+{if}
+{string("yy")}
+{true}
+{forsuffixes}
+! Missing symbolic token inserted.
+<inserted text>
+ INACCESSIBLE
+<for("yy")> ...orsuffixes(EXPR0)
+ =foo1,[foo((EXPR0))],':show.x...
+texts->...3$:+m.endfor.fi.endfor
+
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+Sorry: You can't redefine a number, string, or expr.
+I've inserted an inaccessible symbol so that your
+definition will be completed without mixing me up too badly.
+
+
+foo(TEXT2)->begingroup(TEXT2)endgroup
+(SUFFIX0)<-
+(SUFFIX1)<-foo
+(TEXT2)<-("yy")
+{begingroup}
+{endgroup}
+>> "yy"
+! Improper subscript has been replaced by zero.
+<for("yy")> ...o1,[foo((EXPR0))]
+ ,':show.x=((5)+0)(5)+(5),"xx"...
+texts->...3$:+m.endfor.fi.endfor
+
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+A bracketed subscript must have a known numeric value;
+unfortunately, what I found was the value that appears just
+above this error message. So I'll try a zero subscript.
+
+{loop value=foo1}
+{show}
+
+x<expr>of<primary>->(EXPR0)
+{(5)+(0)}
+(EXPR0)<-5
+! Missing `of' has been inserted for x.
+<to be read again>
+ (5)
+<for(foo1)> show.x=((5)+0)(5)
+ +(5),"xx",foo((path))|(("yy");ex...
+<for("yy")> ...'+((0),yy))endfor
+ .for.m= :+endfor.for.m=alpha....
+texts->...3$:+m.endfor.fi.endfor
+
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+I've got the first argument; will look now for the other.
+
+(EXPR1)<-5
+{(5)+(5)}
+>> 10
+>> "xx"
+foo(TEXT2)->begingroup(TEXT2)endgroup
+(SUFFIX0)<-
+(SUFFIX1)<-foo
+(TEXT2)<-(path)
+{begingroup}
+{endgroup}
+
+|<suffix>->,(SUFFIX0)
+! Missing `)' has been inserted.
+<to be read again>
+ ("yy")
+<for(foo1)> ...o((path))|(("yy")
+ ;exitif.not('<='+((0),yy)) EN...
+<for("yy")> ...'+((0),yy))endfor
+ .for.m= :+endfor.for.m=alpha....
+texts->...3$:+m.endfor.fi.endfor
+
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+I've gotten to the end of the macro parameter list.
+You might want to delete some tokens before continuing.
+
+(SUFFIX0)<-
+>> Path at line 100:
+(0,0)..controls (15,4) and (-15,-12)
+ ..(4,0)
+
+>> "yy"
+{exitif}
+{((xpart ',ypart '))+((0,yy))}
+{((xpart ',ypart '))<=((xpart ',linearform))}
+>> -yy
+! Unknown relation will be considered false.
+<to be read again>
+ )
+<for(foo1)> ...ot('<='+((0),yy))
+ ENDFOR
+<for("yy")> ...'+((0),yy))endfor
+ .for.m= :+endfor.for.m=alpha....
+texts->...3$:+m.endfor.fi.endfor
+
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+Oh dear. I can't decide if the expression above is positive,
+negative, or zero. So this comparison test won't be `true'.
+
+{[repeat the loop]}
+{loop value=0}
+{not(false)}
+{true}
+{for}
+{for}
+>> 0.5p3~
+! Improper initial value has been replaced by 0.
+<to be read again>
+ step
+<for("yy")> ....for.m=alpha.step
+ -1.1 3$:+m.endfor.fi ENDFOR
+texts->...3$:+m.endfor.fi.endfor
+
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+When you say `for x=a step b until c',
+the initial value `a' and the step size `b'
+and the final value `c' must have known numeric values.
+I'm zeroing this one. Proceed, with fingers crossed.
+
+{-(1.1)}
+! Missing `until' has been inserted.
+<to be read again>
+ 3
+<for("yy")> ...=alpha.step-1.1 3
+ $:+m.endfor.fi ENDFOR
+texts->...3$:+m.endfor.fi.endfor
+
+<to be read again>
+ ]]
+<to be read again>
+ ;
+l.100 ...cle;numspecial p~++2+3;
+ [[
+I assume you meant to say `until' after `step'.
+So I'll look for the final value and colon next.
+
+{(3)*(-1)}
+{loop value=0}
+{[repeat the loop]}
+{loop value=-1.1}
+{+(0)}
+{[repeat the loop]}
+{loop value=-2.20001}
+{(0)+(-1.1)}
+{[repeat the loop]}
+{fi}
+{[repeat the loop]}
+{loop value=2}
+{if}
+{string(2)}
+{false}
+{[repeat the loop]}
+{loop value=path}
+{if}
+{string(path)}
+{false}
+{[repeat the loop]}
+{loop value=10}
+{if}
+{string(10)}
+{false}
+{[repeat the loop]}
+{(-1.1)+(-2.20001)}
+{endgroup}
+{begingroup}
+{let}
+{save}
+{def}
+{def}
+
+texts->input
+{input}
+(trap.mf
+if->endinput?
+{endinput}
+{if}
+{known(0)}
+{not(true)}
+{false}
+)
+! Incomplete if; all text was ignored after line 2.
+<inserted text>
+ fi
+l.101 ...input enddef;texts trap
+ ]];
+The file ended while I was skipping conditional text.
+This kind of error happens when you say `if...' and forget
+the matching `fi'. I've inserted a `fi'; this might work.
+
+{restoring \}
+{restoring if}
+{endgroup}
+
+dup<text>->[[(TEXT0);save
+Runaway text?
+[[def.texts.secondary.x=primarydef.y++y=x@y.enddef;showtoken ETC.
+! Forbidden token found while scanning a text argument.
+<inserted text>
+ endgroup
+<to be read again>
+ \
+l.102 ...showtoken++;x enddef]]\
+ ;
+It seems that a right delimiter was left out,
+causing me to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+(TEXT0)<-[[def.texts.secondary.x=primarydef.y++y=x@y.enddef;showtoken++;
+x.enddef]]
+{begingroup}
+{begingroup}
+{def}
+{endgroup}
+{save}
+! Missing symbolic token inserted.
+<inserted text>
+ INACCESSIBLE
+<to be read again>
+ \
+l.102 ...showtoken++;x enddef]]\
+ ;
+Sorry: You can't redefine my error-recovery tokens.
+I've inserted an inaccessible symbol so that your
+definition will be completed without mixing me up too badly.
+
+{\}
+{proofing:=1}
+
+texts<secondary>->primarydef.y++y=(EXPR0)@y.enddef;showtoken++;(EXPR0)
+(EXPR0)<-"a"
+{primarydef}
+{showtoken}
+> ++=primarydef'd macro:
+("a")@(EXPR1)
+{("a")&("b")}
+ab
+texts<secondary>->primarydef.y++y=(EXPR0)@y.enddef;showtoken++;(EXPR0)
+{(1.00002)*(a1)}
+{-(1.00002a1)}
+(EXPR0)<--1.00002a1
+{primarydef}
+{showtoken}
+> ++=primarydef'd macro:
+(-1.00002a1)@(EXPR1)
+{(a2)+(a3)}
+{(linearform)+(a4)}
+{(linearform)+(a5)}
+{(linearform)+(a6)}
+{-(linearform)}
+{(-1.00002a1)=(linearform)}
+## a1=0.99998a6+0.99998a5+0.99998a4+0.99998a3+0.99998a2
+{-((a3,a2))}
+{((-a3,-a2))/(0.99998)}
+{(a4)+(a5)}
+{begingroup}
+{showdependencies}
+a1=0.99998a6+0.99998a5+0.99998a4+0.99998a3+0.99998a2
+alpha=0.5p3~
+{endgroup}
+{(linearform)+(a6)}
+{(a3)+(a4)}
+{(linearform)+(a5)}
+{(linearform)+(a6)}
+{-((linearform,linearform))}
+{((-1.00002a3,-1.00002a2))=((linearform,linearform))}
+## a2=0.99998a6+0.99998a5+0.99998a4+0.99998a3
+## a3=0.99998a6+0.99998a5+0.99998a4
+{restoring INACCESSIBLE}
+{endgroup}
+{(1.00002)*(0.25a4*4)}
+{(0.25a4*4)+(1)}
+{(0.25a5*4)+(0.25a6*4)}
+{(0.25a4*4+1)=(linearform)}
+## a4*4=0.99998a6*4+0.99998a5*4-3.99994
+{(0.9)*(0.5p3~)}
+{(0.45p3~)+(7)}
+{alpha:=0.45p3~+7}
+## alpha=0.45p3~+7
+{showdependencies}
+alpha=0.45p3~+7
+a4=0.25a6*4+0.25a5*4-0.99998
+a3=0.49998a6*4+0.49998a5*4-0.99997
+a2=0.99997a6*4+0.99997a5*4-1.99992
+a1=1.99992a6*4+1.99992a5*4-3.99982
+{(0.66667)-(0.25a6*4)}
+{(0.25a6*4)=(-0.25a6*4+0.66667)}
+## a6*4=1.33334
+{(0.25a5*4)=(0.33333)}
+## a5*4=1.33331
+#### a4=-0.33333
+#### a3=0.33333
+#### a2=0.66664
+#### a1=1.33328
+{cull}
+{(4)*(0.33333)}
+{chardp:=27}
+{charcode:=27}
+{openwindow}
+! Improper `openwindow'.
+<to be read again>
+ ;
+l.107 ...) to (0,0) at "whoops";
+ addto p; shipout p; cull p;
+Say `openwindow k from (r0,c0) to (r1,c1) at (x,y)',
+where all quantities are known and k is between 0 and 15.
+
+{addto}
+>> (8,1,5,-5,-5,5)
+! Not a suitable variable.
+<to be read again>
+ ;
+l.107 ...) at "whoops"; addto p;
+ shipout p; cull p;
+At this point I needed to see the name of a picture variable.
+(Or perhaps you have indeed presented me with one; I might
+have missed it, if it wasn't followed by the proper token.)
+So I'll not change anything just now.
+
+{shipout}
+! Variable p is the wrong type (transform).
+<to be read again>
+ ;
+l.107 ...s"; addto p; shipout p;
+ cull p;
+I was looking for a "known" picture variable.
+So I'll not change anything just now.
+
+{cull}
+>> (8,1,5,-5,-5,5)
+! Not a suitable variable.
+<to be read again>
+ ;
+l.107 ...o p; shipout p; cull p;
+
+At this point I needed to see the name of a picture variable.
+(Or perhaps you have indeed presented me with one; I might
+have missed it, if it wasn't followed by the proper token.)
+So I'll not change anything just now.
+
+{openwindow}
+{-(0.5)}
+
+Calling BLANKRECTANGLE(0,0,0,0)
+Calling UPDATESCREEN
+{special}
+>> (8,1,5,-5,-5,5)
+! Unsuitable expression.
+<to be read again>
+ ;
+l.108 ...$) at (0,0); special p;
+ numspecial "p";
+The expression shown above has the wrong type to be output.
+
+{numspecial}
+>> "p"
+! Unsuitable expression.
+<to be read again>
+ ;
+l.108 ...cial p; numspecial "p";
+
+The expression shown above has the wrong type to be output.
+
+{openwindow}
+{(32)*(1024)}
+! Arithmetic overflow.
+l.109 ....49999 from (0,32*1024)
+ to (1,31*1057) at (0,0); shi...
+Uh, oh. A little while ago one of the quantities that I was
+computing got too large, so I'm afraid your answers will be
+somewhat askew. You'll probably have to adopt different
+tactics next time. But I shall try to carry on anyway.
+
+{(31)*(1057)}
+
+Calling BLANKRECTANGLE(100,100,0,1)
+Calling UPDATESCREEN
+{shipout}
+[27.-14]
+Edge structure at line 109 (just shipped out):
+row 0: | -3++ -2-- -1++ 4094--
+row -1: | -4096++ -3-- -2++ -1--
+
+{openwindow}
+Path at line 110, before choices:
+(0,0)
+
+Path at line 110, after choices:
+(0,0)
+
+{length(path)}
+
+Calling BLANKRECTANGLE(0,2,0,4)
+Calling UPDATESCREEN
+{openwindow}
+{length((-1,0))}
+{-(5)}
+
+Calling BLANKRECTANGLE(1,10,1,3)
+Calling UPDATESCREEN
+{display}
+{nullpicture}
+>> picture
+! Not a suitable variable.
+<to be read again>
+ ;
+l.112 display nullpicture;
+ display p inwindow 3; display p in...
+At this point I needed to see the name of a picture variable.
+(Or perhaps you have indeed presented me with one; I might
+have missed it, if it wasn't followed by the proper token.)
+So I'll not change anything just now.
+
+{display}
+>> 3
+! Bad window number.
+<to be read again>
+ ;
+l.112 ...; display p inwindow 3;
+ display p inwindow 6;
+It should be the number of an open window.
+
+{display}
+! Variable p is the wrong type (transform).
+<to be read again>
+ ;
+l.112 ...; display p inwindow 6;
+
+I was looking for a "known" picture variable.
+So I'll not change anything just now.
+
+{display}
+
+Calling BLANKRECTANGLE(1,10,1,3)
+Calling PAINTROW(2,1;4,5,6,10)
+Calling UPDATESCREEN
+{cull}
+! Enormous number has been reduced.
+l.113 ...opping (0.1,4095.999999
+ ) withweight 3.5
+I can't handle numbers bigger than about 4095.99998;
+so I've changed your constant to that maximum amount.
+
+! Weight must be -3, -2, -1, +1, +2, or +3.
+<to be read again>
+ withweight
+l.114 withweight
+ -3.5; display e0 inwindow 5.5; addto e0 also ...
+I'll ignore the bad `with' clause and look for another.
+
+{-(3.5)}
+! Bad culling amounts.
+<to be read again>
+ ;
+l.114 withweight-3.5;
+ display e0 inwindow 5.5; addto e0 also ...
+Always cull by known amounts that exclude 0.
+
+{display}
+
+Calling BLANKRECTANGLE(1,10,1,3)
+Calling PAINTROW(2,1;4,5,6,8,9,10)
+Calling PAINTROW(1,1;6,7,8,9)
+Calling UPDATESCREEN
+{addto}
+>> (8,1,5,-5,-5,5)
+! Improper `addto'.
+<to be read again>
+ ;
+l.114 ...w 5.5; addto e0 also p;
+ addto e0 contour 0;
+This expression should have specified a known picture.
+So I'll not change anything just now.
+
+{addto}
+>> 0
+! Improper `addto'.
+<to be read again>
+ ;
+l.114 ... p; addto e0 contour 0;
+
+This expression should have been a known path.
+So I'll not change anything just now.
+
+{display}
+
+Calling BLANKRECTANGLE(0,2,0,4)
+Calling PAINTROW(2,1;0,1)
+Calling PAINTROW(1,1;0,1)
+Calling PAINTROW(0,1;1,2)
+Calling UPDATESCREEN
+{addto}
+! Not a cycle.
+<to be read again>
+ ;
+l.115 ...; addto e0 contour p~9;
+
+That contour should have ended with `..cycle' or `&cycle'.
+So I'll not change anything just now.
+
+{display}
+{(3)+(3)}
+
+Calling BLANKRECTANGLE(1,10,1,3)
+Calling PAINTROW(2,1;4,5,6,10)
+Calling UPDATESCREEN
+{display}
+{begingroup}
+{vardef}
+{endgroup}
+! Variable e0e0 has been obliterated.
+<to be read again>
+ ;
+l.116 ...vardef e[]e=enddef;6]];
+
+It seems you did a nasty thing---probably by accident,
+but nevertheless you nearly hornswoggled me...
+While I was evaluating the right-hand side of this
+command, something happened, and the left-hand side
+is no longer a variable! So I won't change anything.
+
+{addto}
+{display}
+Calling PAINTROW(1,1;0,1,2)
+Calling PAINTROW(0,0;0,1,2)
+Calling UPDATESCREEN
+{ligtable}
+{display}
+{display}
+Calling UPDATESCREEN
+{show}
+{begingroup}
+{interim}
+{tracingcommands:=0}
+
+lig(TEXT0)(TEXT1)->ligtable0::for*=1step1until60:0kern.boundarychar+*,en
+dfor.skipto0;ligtable(TEXT0):(TEXT0)(TEXT1)0,skipto255;boundarychar:=bou
+ndarychar+51.29999
+(TEXT0)<-"g"
+(TEXT1)<-=:|
+
+lig(TEXT0)(TEXT1)->ligtable0::for*=1step1until60:0kern.boundarychar+*,en
+dfor.skipto0;ligtable(TEXT0):(TEXT0)(TEXT1)0,skipto255;boundarychar:=bou
+ndarychar+51.29999
+(TEXT0)<-"h":"i"
+(TEXT1)<-|=:
+! Character h is already in a ligtable.
+<to be read again>
+ :
+<argument> "h":
+ "i"
+lig->...;ligtable(TEXT0):(TEXT0)
+ (TEXT1)0,skipto255;boundarych...
+l.119 ...=:|); lig("h":"i")(|=:)
+ ;
+It's not legal to label a character more than once.
+So I'll not change anything just now.
+
+
+lig(TEXT0)(TEXT1)->ligtable0::for*=1step1until60:0kern.boundarychar+*,en
+dfor.skipto0;ligtable(TEXT0):(TEXT0)(TEXT1)0,skipto255;boundarychar:=bou
+ndarychar+51.29999
+(TEXT0)<-"j"
+(TEXT1)<-|=:>
+
+lig(TEXT0)(TEXT1)->ligtable0::for*=1step1until60:0kern.boundarychar+*,en
+dfor.skipto0;ligtable(TEXT0):(TEXT0)(TEXT1)0,skipto255;boundarychar:=bou
+ndarychar+51.29999
+(TEXT0)<-"k"
+(TEXT1)<-=:|>
+
+lig(TEXT0)(TEXT1)->ligtable0::for*=1step1until60:0kern.boundarychar+*,en
+dfor.skipto0;ligtable(TEXT0):(TEXT0)(TEXT1)0,skipto255;boundarychar:=bou
+ndarychar+51.29999
+(TEXT0)<-"l"
+(TEXT1)<-|=:|>
+{restoring tracingcommands=2.1}
+{endgroup}
+>> vacuous
+{begingroup}
+{let}
+{vardef}
+{endgroup}
+! Variable c.a1 has been obliterated.
+<to be read again>
+ ;
+l.121 ...;vardef b=enddef;1]] ];
+ ligtable"m":0=:0,skipto5;
+It seems you did a nasty thing---probably by accident,
+but nevertheless you nearly hornswoggled me...
+While I was evaluating the suffix of this variable,
+something was redefined, and it's no longer a variable!
+In order to get back on my feet, I've inserted `0' instead.
+
+{b1:=0}
+! Variable b1 has been obliterated.
+<to be read again>
+ ;
+l.121 ...;vardef b=enddef;1]] ];
+ ligtable"m":0=:0,skipto5;
+It seems you did a nasty thing---probably by accident,
+but nevertheless you nearly hornswoggled me...
+While I was evaluating the right-hand side of this
+command, something happened, and the left-hand side
+is no longer a variable! So I won't change anything.
+
+{ligtable}
+! A statement can't begin with `skipto'.
+<to be read again>
+ !!
+l.122 !!
+ ; errhelp 0; errmessage "Be like Jane";
+I was looking for the beginning of a new statement.
+If you just proceed without changing anything, I'll ignore
+everything up to the next `;'. Please insert a semicolon
+now in front of anything that you don't want me to delete.
+(See Chapter 27 of The METAFONTbook for an example.)
+
+! Extra tokens will be flushed.
+<to be read again>
+ !!
+l.122 !!
+ ; errhelp 0; errmessage "Be like Jane";
+I've just read as much of that statement as I could fathom,
+so a semicolon should have been next. It's very puzzling...
+but I'll try to get myself back together, by ignoring
+everything up to the next `;'. Please insert a semicolon
+now in front of anything that you don't want me to delete.
+(See Chapter 27 of The METAFONTbook for an example.)
+
+{errhelp}
+>> 0
+! Not a string.
+<to be read again>
+ ;
+l.122 !!; errhelp 0;
+ errmessage "Be like Jane";
+A message should be a known string expression.
+
+{errmessage}
+! Be like Jane.
+<to be read again>
+ ;
+l.122 ...message "Be like Jane";
+
+This error message was generated by an `errmessage'
+command, so I can't give any explicit help.
+Pretend that you're Miss Marple: Examine all clues,
+and deduce the truth by inspired guesses.
+
+{errhelp}
+{errmessage}
+! .
+<to be read again>
+ ;
+l.123 ...e%%%lp%"; errmessage"";
+ errhelp ""; errmessage "Anot...
+He%
+lp
+
+
+{errhelp}
+{errmessage}
+! Another.
+<to be read again>
+ ;
+l.123 ...; errmessage "Another";
+
+(That was another `errmessage'.)
+
+{headerbyte}
+>> 0
+! Improper location.
+<to be read again>
+ ;
+l.124 headerbyte 0;
+ headerbyte(48.5)substring(-9,9)of"long"; ...
+I was looking for a known, positive number.
+For safety's sake I'll ignore the present command.
+
+{headerbyte}
+! Missing `:' has been inserted.
+<to be read again>
+ substring
+l.124 ...aderbyte(48.5)substring
+ (-9,9)of"long"; for\=0:\
+A colon should follow a headerbyte or fontinfo location.
+
+{-(9)}
+{((-9,9))substring("long")}
+>> "long"
+! Invalid code has been replaced by 0.
+<to be read again>
+ ;
+l.124 ...ubstring(-9,9)of"long";
+ for\=0:\
+I was looking for a number between 0 and 255, or for a
+string of length 1. Didn't find it; will use 0 instead.
+
+{for}
+Runaway loop?
+! Forbidden token found while scanning the text of a for loop.
+<inserted text>
+ endfor
+<to be read again>
+ \
+l.124 ...-9,9)of"long"; for\=0:\
+
+I suspect you have forgotten an `endfor',
+causing me to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+{loop value=0}
+{[repeat the loop]}
+{\}
+{headerbyte}
+{(2)*(0.33333)}
+{fontdimen}
+{(2)*(0.33333)}
+>> "q"
+! Improper font parameter.
+<to be read again>
+ ;
+l.125 ..."; fontdimen 9:2a6,"q";
+ fontdimen 1:2048;
+I'm zeroing this one. Proceed, with fingers crossed.
+
+{fontdimen}
+{fontmaking:=1}
+{extensible}
+! Missing `:' has been inserted.
+<to be read again>
+ 5
+l.126 ...king:=1; extensible 5 5
+ ,"c"255.5,"d"; charlist 0:5:"...
+I'm processing `extensible c: t,m,b,r'.
+
+! Missing `,' has been inserted.
+<to be read again>
+ 255.5
+l.126 ...extensible 5 5,"c"255.5
+ ,"d"; charlist 0:5:"a":"d";
+I'm processing `extensible c: t,m,b,r'.
+
+>> 255.5
+! Invalid code has been replaced by 0.
+<to be read again>
+ ,
+l.126 ...xtensible 5 5,"c"255.5,
+ "d"; charlist 0:5:"a":"d";
+I was looking for a number between 0 and 255, or for a
+string of length 1. Didn't find it; will use 0 instead.
+
+{charlist}
+! Character code 5 is already extensible.
+<to be read again>
+ :
+l.126 ...,"d"; charlist 0:5:"a":
+ "d";
+It's not legal to label a character more than once.
+So I'll not change anything just now.
+
+{ligtable}
+! Too far to skip.
+l.127 ligtable255:255::
+ "a"=:"b","d" kern -2048,"c":0:99.5:"e"...
+At most 127 lig/kern steps can separate skipto1 from 1::.
+
+{-(2048)}
+! Character code 0 is already in a charlist.
+<to be read again>
+ :
+l.127 ...","d" kern -2048,"c":0:
+ 99.5:"e"|=:|"f",0kern';
+It's not legal to label a character more than once.
+So I'll not change anything just now.
+
+>> (xpart ',ypart ')
+! Improper kern.
+<to be read again>
+ ;
+l.127 ...99.5:"e"|=:|"f",0kern';
+
+The amount of kern should be a known numeric value.
+I'm zeroing this one. Proceed, with fingers crossed.
+
+{ligtable}
+! Character code 5 is already extensible.
+<to be read again>
+ :
+l.128 ligtable 5:
+ 0; def clear(text x)=interim x:=$ enddef; cl...
+It's not legal to label a character more than once.
+So I'll not change anything just now.
+
+! Illegal ligtable step.
+<to be read again>
+ ;
+l.128 ligtable 5:0;
+ def clear(text x)=interim x:=$ enddef; cl...
+I was looking for `=:' or `kern' here.
+
+{def}
+
+clear(TEXT0)->interim(TEXT0):=$
+(TEXT0)<-hppp
+{interim}
+{hppp:=-1}
+{(0)=(0)}
+! Redundant equation.
+<to be read again>
+ ;
+l.128 ...f; clear(hppp); vppp=0;
+
+I already knew that this equation was true.
+But perhaps no harm has been done; let's continue.
+
+{begingroup}
+
+clear(TEXT0)->interim(TEXT0):=$
+(TEXT0)<-tracingmacros
+{interim}
+{tracingmacros:=-1}
+{interim}
+{tracingcommands:=-1}
+Runaway text?
+tracingoutput
+! Forbidden token found while scanning a text argument.
+<inserted text>
+ )
+<to be read again>
+ \
+l.129 ...); clear(tracingoutput\
+ ;
+It seems that a right delimiter was left out,
+causing me to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+{restoring proofing=1}
+{restoring tracingoutput=1}
+{restoring tracingcommands=2.1}
+{restoring tracingmacros=1}
+{endgroup}
+{def}
+{def}
+{addto}
+Path at line 139, before choices:
+(0,0){4096,0}
+ ..{4096,0}(1,0){0,-4096}
+ ..{0,4096}cycle
+
+Path at line 139, after choices:
+(0,0)..controls (0.33333,0) and (0.66667,0)
+ ..(1,0)..controls (1,-0.66667) and (0,-0.66667)
+ ..cycle
+
+> 0 ENE 1 (ESE SSE) SSW WSW WNW NNW 0 (NNE)
+! Backwards path (turning number is negative).
+<to be read again>
+ ;
+l.139 ....{0,1}cycle withpen qq;
+
+The path doesn't have a counterclockwise orientation,
+so I'll probably have trouble drawing it.
+(See Chapter 27 of The METAFONTbook for more help.)
+
+Tracing edges at line 139: (weight 1)
+@ Octant ENE (2 offsets), from (2.5,-0.5) to (1.5,-2)
+@ retrograde line from (2.5,-0.5) to (0.5,-2)
+(3,0)(3,-1)(1,-1)
+@ transition line 0, from (0.5,-2) to (0.5,-2)
+@ transition line 1, from (1.5,-2) to (2.5,-1.5)
+@ transition line 2, from (2.5,-1.5) to (3.5,-0.5)
+(1,-2)(3,-2)(3,-1)(4,-1)
+@ retrograde line from (3.5,-0.5) to (1.5,-2)
+(4,0)(4,-1)(2,-1)
+@ Octant ESE (2 offsets), from (1.5,-2) to (-1,0)
+@ retrograde line from (1.5,-2) to (-1,0)
+(2,-2)(1,-2)(1,-1)(0,-1)
+@ transition line 3, from (-1,0) to (0.5,-1.5)
+@ transition line 2, from (0.5,-1.5) to (1.5,-2)
+@ transition line 1, from (1.5,-2) to (1.5,-2)
+(0,0)(0,-1)(1,-1)
+@ retrograde line from (1.5,-2) to (-1,0)
+(1,-2)(1,-1)(0,-1)
+@ Octant SSE (0 offsets), from (-1,0) to (-1,0)
+@ transition line 0, from (-1,0) to (-1,0)
+@ Octant SSW (2 offsets), from (-1,0) to (-0.82407,0.67593)
+@ retrograde line from (-1,0) to (-0.5,1.5)
+(0,0)(-1,0)(-1,1)(0,1)
+@ transition line 3, from (-0.5,1.5) to (-0.5,1.5)
+@ transition line 2, from (-0.5,1.5) to (-1,0)
+@ transition line 1, from (-1.06265,-0.39499) to (-0.56265,1.10501)
+@ transition line 2, from (-0.82407,0.67593) to (-1.32407,-0.82407)
+@ transition line 1, from (-1.32407,-0.82407) to (-1.32407,-0.82407)
+(0,2)(0,1)(-1,1)
+@ retrograde line from (-1.32407,-0.82407) to (-0.82407,0.67593)
+(-1,-1)
+@ Octant WSW (2 offsets), from (-0.82407,0.67593) to (1,2)
+@ retrograde line from (-0.82407,0.67593) to (1.17593,2.17593)
+(-1,1)(0,1)
+@ transition line 0, from (1.17593,2.17593) to (1.17593,2.17593)
+@ transition line 1, from (1.17593,2.17593) to (0.17593,1.67593)
+@ transition line 2, from (0,1.5) to (-1,0.5)
+(0,2)
+@ retrograde line from (-1,0.5) to (1,2)
+(0,1)
+@ Octant WNW (2 offsets), from (1,2) to (3.32407,0.17593)
+@ retrograde line from (1,2) to (3.5,0)
+(0,2)(2,2)(2,1)(3,1)
+@ transition line 3, from (3.5,0) to (2,1.5)
+@ transition line 2, from (1.82407,1.67593) to (0.82407,2.17593)
+@ transition line 1, from (0.82407,2.17593) to (0.82407,2.17593)
+(3,0)(3,1)(2,1)
+@ retrograde line from (0.82407,2.17593) to (3.32407,0.17593)
+(2,2)(2,1)(3,1)
+@ Octant NNW (0 offsets), from (3.32407,0.17593) to (3,1)
+@ transition line 0, from (3.32407,0.17593) to (3.32407,0.17593)
+(3,0)
+@ Octant NNE (2 offsets), from (3,1) to (2.5,-0.5)
+@ retrograde line from (3,1) to (2.5,-0.5)
+(3,1)
+@ transition line 3, from (2.5,-0.5) to (2.5,-0.5)
+@ transition line 2, from (2.5,-0.5) to (3,1)
+@ transition line 1, from (3,1) to (3,1)
+(3,0)
+@ retrograde line from (3,1) to (2.5,-0.5)
+(3,1)(3,0).
+
+
+f(SUFFIX0)(EXPR1)(EXPR2)(TEXT3)->numeric.w;show(EXPR1);addto(SUFFIX0)con
+tour(0,0)..(2,0)..(1,$)..(1,1)..cycle.withpen.qq;addto(SUFFIX0)doublepat
+h(0,0){1,1}..{2,1}(2,1)withpen.qq;addto(SUFFIX0)doublepath(($,$){1,0}..(
+1,1){1,0})scaled0.5withpen.nullpen;cull(SUFFIX0)keeping(4,4)withweight1.
+5;
+! Missing `]' has been inserted.
+<to be read again>
+ ,
+l.140 f(e[3,
+ w); g(e3,transformed p,penoffset-(1,1.3)of(pencir...
+I've seen a `[' and a subscript value, in a suffix,
+so a right bracket should have come next.
+I shall pretend that one was there.
+
+(SUFFIX0)<-e3
+(EXPR1)<-unknown path w
+! Missing argument to f.
+<to be read again>
+ ;
+l.140 f(e[3,w);
+ g(e3,transformed p,penoffset-(1,1.3)of(pencir...
+That macro has more parameters than you thought.
+I'll continue by pretending that each missing argument
+is either zero or null.
+
+(EXPR2)<-0
+! Missing argument to f.
+<to be read again>
+ ;
+l.140 f(e[3,w);
+ g(e3,transformed p,penoffset-(1,1.3)of(pencir...
+That macro has more parameters than you thought.
+I'll continue by pretending that each missing argument
+is either zero or null.
+
+(TEXT3)<-
+{numeric}
+{show}
+>> unknown path %CAPSULE1615
+{addto}
+Path at line 140, before choices:
+(0,0)
+ ..(2,0)
+ ..(1,-1)
+ ..(1,1)
+ ..cycle
+
+Path at line 140, after choices:
+(0,0)..controls (0.56189,-0.5286) and (1.43811,0.5286)
+ ..(2,0)..controls (2.70831,-0.66634) and (1.66634,-1.70831)
+ ..(1,-1)..controls (0.4714,-0.43811) and (1.5286,0.43811)
+ ..(1,1)..controls (0.33366,1.70831) and (-0.70831,0.66634)
+ ..cycle
+
+> 0 ESE ENE ESE 1 SSE SSW WSW WNW NNW 2 NNE NNW 3 WNW WSW SSW SSE ESE 0
+! Strange path (turning number is zero).
+<to be read again>
+ ;
+f->.....(1,1)..cycle.withpen.qq;
+ addto(SUFFIX0)doublepath(0,0)...
+<to be read again>
+ ;
+l.140 f(e[3,w);
+ g(e3,transformed p,penoffset-(1,1.3)of(pencir...
+The path doesn't have a counterclockwise orientation,
+so I'll probably have trouble drawing it.
+(See Chapter 27 of The METAFONTbook for more help.)
+
+Tracing edges at line 140: (weight 1)
+@ Octant ENE (2 offsets), from (0.26321,-2.6526) to (1.73679,-2.34741)
+@ transition line 0, from (0.26321,-2.6526) to (0.26321,-2.6526)
+@ transition line 1, from (1.73679,-2.34741) to (2.73679,-1.84741)
+@ transition line 2, from (2.73679,-1.84741) to (3.73679,-0.84741)
+(1,-3)(1,-2)(3,-2)
+@ retrograde line from (3.73679,-0.84741) to (1.73679,-2.34741)
+(3,-1)
+@ Octant ESE (2 offsets), from (1.73679,-2.34741) to (-0.25465,-0.56029)
+@ retrograde line from (1.73679,-2.34741) to (-0.76321,-0.34741)
+(3,-2)(1,-2)(1,-1)(-1,-1)
+@ transition line 3, from (-0.76321,-0.34741) to (0.73679,-1.84741)
+@ transition line 2, from (0.73679,-1.84741) to (1.73679,-2.34741)
+@ transition line 1, from (2.05333,-2.41772) to (1.05333,-1.91772)
+@ transition line 2, from (1.24535,-2.06029) to (2.24535,-2.56029)
+@ transition line 1, from (2.24535,-2.56029) to (2.24535,-2.56029)
+(-1,0)(-1,-1)(0,-1)(0,-2)(2,-2)
+@ retrograde line from (2.24535,-2.56029) to (-0.25465,-0.56029)
+(2,-3)(2,-2)(1,-2)
+@ Octant SSE (0 offsets), from (-0.25465,-0.56029) to (0,-1.13196)
+@ transition line 0, from (-0.25465,-0.56029) to (-0.25465,-0.56029)
+@ Octant SSW (2 offsets), from (0,-1.13196) to (0.25,-0.25)
+@ retrograde line from (0,-1.13196) to (0.5,0.36804)
+(1,-1)(0,-1)
+@ transition line 3, from (0.5,0.36804) to (0.5,0.36804)
+@ transition line 2, from (0.5,0.36804) to (0,-1.13196)
+@ transition line 1, from (-0.04594,-1.41693) to (0.45406,0.08307)
+@ transition line 2, from (0.25,-0.25) to (-0.25,-1.75)
+@ transition line 1, from (-0.25,-1.75) to (-0.25,-1.75)
+(0,0)
+@ retrograde line from (-0.25,-1.75) to (0.25,-0.25)
+(0,-2)
+@ Octant WSW (2 offsets), from (0.25,-0.25) to (1.63197,1)
+@ retrograde line from (0.25,-0.25) to (2.25,1.25)
+(0,0)(1,0)
+@ transition line 0, from (2.25,1.25) to (2.25,1.25)
+@ transition line 1, from (2.25,1.25) to (1.25,0.75)
+@ transition line 2, from (1.03186,0.59352) to (2.03186,1.09352)
+@ transition line 1, from (1.63197,1) to (0.63197,0.5)
+@ transition line 2, from (0.63197,0.5) to (-0.36803,-0.5)
+(1,1)
+@ retrograde line from (-0.36803,-0.5) to (1.63197,1)
+(1,0)
+@ Octant WNW (2 offsets), from (1.63197,1) to (3.56024,-0.74529)
+@ retrograde line from (1.63197,1) to (4.13197,-1)
+(1,1)(2,1)(2,0)(4,0)
+@ transition line 3, from (4.13197,-1) to (2.63197,0.5)
+@ transition line 2, from (2.63197,0.5) to (1.63197,1)
+@ transition line 1, from (1.29863,1.07983) to (2.29863,0.57983)
+@ transition line 2, from (2.06024,0.75471) to (1.06024,1.25471)
+@ transition line 1, from (1.06024,1.25471) to (1.06024,1.25471)
+(4,-1)(4,0)(3,0)
+@ retrograde line from (1.06024,1.25471) to (3.56024,-0.74529)
+(3,1)(2,1)(2,0)(3,0)
+@ Octant NNW (0 offsets), from (3.56024,-0.74529) to (3.3474,-0.23679)
+@ transition line 0, from (3.56024,-0.74529) to (3.56024,-0.74529)
+(3,-1)
+@ Octant NNE (2 offsets), from (3.3474,-0.23679) to (3.65259,1.23679)
+@ retrograde line from (3.3474,-0.23679) to (2.8474,-1.73679)
+(3,0)
+@ transition line 3, from (2.8474,-1.73679) to (2.8474,-1.73679)
+@ transition line 2, from (2.8474,-1.73679) to (3.3474,-0.23679)
+@ transition line 1, from (3.65259,1.23679) to (3.65259,1.23679)
+(3,-2)
+@ Octant NNW (0 offsets), from (3.65259,1.23679) to (3.43976,1.74529)
+@ transition line 0, from (3.65259,1.23679) to (3.65259,1.23679)
+(3,1)(4,1)
+@ Octant WNW (2 offsets), from (3.43976,1.74529) to (0.36803,4)
+@ transition line 3, from (3.43976,1.74529) to (1.93976,3.24529)
+@ transition line 2, from (1.70137,3.42017) to (0.70137,3.92017)
+@ transition line 1, from (0.36803,4) to (0.36803,4)
+(4,2)(3,2)(3,3)(2,3)
+@ Octant WSW (2 offsets), from (0.36803,4) to (-2.25,2.25)
+@ transition line 0, from (0.36803,4) to (0.36803,4)
+@ transition line 1, from (-0.03186,3.90648) to (-1.03186,3.40648)
+@ transition line 2, from (-1.25,3.25) to (-2.25,2.25)
+(2,4)(-1,4)(-1,3)(-2,3)
+@ Octant SSW (2 offsets), from (-2.25,2.25) to (-3,0.13196)
+@ transition line 3, from (-2.25,2.25) to (-2.25,2.25)
+@ transition line 2, from (-2.45406,1.91695) to (-2.95406,0.41695)
+@ transition line 1, from (-3,0.13196) to (-3,0.13196)
+(-2,2)(-3,2)
+@ Octant SSE (0 offsets), from (-3,0.13196) to (-2.74533,-0.43973)
+@ transition line 0, from (-3,0.13196) to (-3,0.13196)
+@ Octant ESE (2 offsets), from (-2.74533,-0.43973) to (0.26321,-2.6526)
+@ transition line 3, from (-2.74533,-0.43973) to (-1.24533,-1.93973)
+@ transition line 2, from (-1.05331,-2.08229) to (-0.05331,-2.58229)
+@ transition line 1, from (0.26321,-2.6526) to (0.26321,-2.6526)
+(-3,-1)(-2,-1)(-2,-2)(0,-2)(0,-3).
+
+{addto}
+Path at line 140, before choices:
+(0,0){2896.30943,2896.30934}
+ ..{3663.57385,1831.78674}(2,1)
+
+Path at line 140, after choices:
+(0,0)..controls (0.53566,0.53566) and (1.32689,0.66344)
+ ..(2,1)
+
+Tracing edges at line 140: (weight 1)
+@ Octant ENE (2 offsets), from (0,-2.5) to (4,0)
+@ transition line 0, from (0,-2.5) to (0,-2.5)
+@ transition line 1, from (0,-2.5) to (1,-2)
+@ transition line 2, from (1.607,-1.57747) to (0.607,-2.07747)
+@ transition line 1, from (2,-1.5) to (3,-1)
+@ transition line 2, from (3,-1) to (4,0)
+(2,-2)(2,-1)(4,-1)
+@ Octant NNE (2 offsets), from (4,0) to (4.5,1.5)
+@ transition line 3, from (4,0) to (4,0)
+@ transition line 2, from (4,0) to (4.5,1.5)
+@ transition line 1, from (4.5,1.5) to (4.5,1.5)
+(4,1)(5,1)
+@ Octant NNW (0 offsets), from (4.5,1.5) to (4.5,1.5)
+@ transition line 0, from (4.5,1.5) to (4.5,1.5)
+@ Octant WNW (2 offsets), from (4.5,1.5) to (2,3.5)
+@ transition line 3, from (4.5,1.5) to (3,3)
+@ transition line 2, from (3,3) to (2,3.5)
+@ transition line 1, from (2,3.5) to (2,3.5)
+(5,2)(4,2)(4,3)(2,3)
+@ Octant WSW (2 offsets), from (2,3.5) to (-2,1)
+@ transition line 0, from (2,3.5) to (2,3.5)
+@ transition line 1, from (0.607,2.92253) to (-0.393,2.42253)
+@ transition line 2, from (-1,2) to (-2,1)
+(2,4)(2,3)(0,3)(0,2)(-1,2)
+@ Octant SSW (2 offsets), from (-2,1) to (-2.5,-0.5)
+@ transition line 3, from (-2,1) to (-2,1)
+@ transition line 2, from (-2,1) to (-2.5,-0.5)
+@ transition line 1, from (-2.5,-0.5) to (-2.5,-0.5)
+(-1,1)(-2,1)
+@ Octant SSE (0 offsets), from (-2.5,-0.5) to (-2.5,-0.5)
+@ transition line 0, from (-2.5,-0.5) to (-2.5,-0.5)
+@ Octant ESE (2 offsets), from (-2.5,-0.5) to (0,-2.5)
+@ transition line 3, from (-2.5,-0.5) to (-1,-2)
+@ transition line 2, from (-1,-2) to (0,-2.5)
+@ transition line 1, from (0,-2.5) to (0,-2.5)
+(-2,-1)(-1,-1)(-1,-2).
+
+{addto}
+Path at line 140, before choices:
+(-1,-1){4096,0}
+ ..{4096,0}(1,1)
+
+Path at line 140, after choices:
+(-1,-1)..controls (0.10457,-1) and (-0.10457,1)
+ ..(1,1)
+
+{(path)scaled(0.5)}
+{nullpen}
+Tracing edges at line 140: (weight 1)
+(0,0)(0,1)(0,0).
+
+{cull}
+
+g(SUFFIX0)->show(SUFFIX0)
+(SUFFIX0)<-e3
+! Too many arguments to g;
+ Missing `)' has been inserted.
+l.140 f(e[3,w); g(e3,
+ transformed p,penoffset-(1,1.3)of(pencir...
+I'm going to assume that the comma I just read was a
+right delimiter, and then I'll begin expanding the macro.
+You might want to delete some tokens before continuing.
+
+{show}
+{(picture)transformed((8,1,5,-5,-5,5))}
+>> Edge structure at line 140:
+
+{-((1,1.3))}
+{pencircle}
+{(future pen)scaled(20)}
+{-(0.5)}
+{(future pen)yscaled(-0.5)}
+Pen polygon at line 140 (newly created):
+(1.5,-5)
+ .. (4.5,-4.5)
+ .. (6,-4)
+ .. (8,-3)
+ .. (9.5,-1.5)
+ .. (10,-0.5)
+ .. (10,0.5)
+ .. (9.5,1.5)
+ .. (8,3)
+ .. (6,4)
+ .. (4.5,4.5)
+ .. (1.5,5)
+ .. (-1.5,5)
+ .. (-4.5,4.5)
+ .. (-6,4)
+ .. (-8,3)
+ .. (-9.5,1.5)
+ .. (-10,0.5)
+ .. (-10,-0.5)
+ .. (-9.5,-1.5)
+ .. (-8,-3)
+ .. (-6,-4)
+ .. (-4.5,-4.5)
+ .. (-1.5,-5)
+ .. cycle
+
+{((-1,-1.3))penoffset(pen)}
+>> (-9.5,1.5)
+Path at line 141, before choices:
+(0,0)..controls (1,1) and (-1,1)
+ ..(3,0)
+
+Path at line 141, after choices:
+(0,0)..controls (1,1) and (-1,1)
+ ..(3,0)
+
+{((0,1))directiontime(path)}
+>> 0.33333
+{(3.14159)point(path)}
+{((3.14159,4))subpath(path)}
+{((7.68668,2.72437))intersectiontimes(path)}
+>> (0,0)
+Path at line 143, before choices:
+(-1,1.1){curl 1}
+ ..{curl 1}(1,-1)
+
+Path at line 143, after choices:
+(-1,1.1)..controls (-0.33333,0.40001) and (0.33333,-0.3)
+ ..(1,-1)
+
+{(-1)precontrol((0,0))}
+{(path)intersectiontimes((0,0))}
+>> (-1,-1)
+{addto}
+{-(4094.99998)}
+{-(0.00002)}
+Path at line 144, before choices:
+(-4094.99998,0){curl 1}
+ ..{curl 1}(4094.99998,-0.00002)
+
+Path at line 144, after choices:
+(-4094.99998,0)..controls (-1365,0) and (1365,-0.00002)
+ ..(4094.99998,-0.00002)
+
+{pencircle}
+{(0)penoffset(future pen)}
+Pen polygon at line 145 (newly created):
+(0.5,0)
+ .. (0,0.5)
+ .. (-0.5,0)
+ .. (0,-0.5)
+ .. cycle
+
+>> 0
+>> pen
+! Not implemented: penoffset(known numeric)of(pen).
+<to be read again>
+ ;
+l.145 pencircle;
+ addto e3 also e3 shifted (0,257); ,"flushed ...
+I'm afraid I don't know how to apply that operation to that
+combination of types. Continue, and I'll return the second
+argument (see above) as the result of the operation.
+
+Tracing edges at line 145: (weight 1)
+@ Octant ESE (1 offset), from (-4095.49998,0) to (4094.99998,-0.50002)
+@ transition line 2, from (-4095.49998,0) to (-4094.99998,-0.5)
+@ transition line 1, from (4094.99998,-0.50002) to (4094.99998,-0.50002)
+(-4095,0)
+@ Octant ENE (1 offset), from (4094.99998,-0.50002) to (4095.49998,-0.00
+002)
+@ transition line 0, from (4094.99998,-0.50002) to (4094.99998,-0.50002)
+@ transition line 1, from (4094.99998,-0.50002) to (4095.49998,-0.00002)
+(-4095,-1)(4095,-1)
+@ Octant NNE (0 offsets), from (4095.49998,-0.00002) to (4095.49998,-0.0
+0002)
+@ transition line 1, from (4095.49998,-0.00002) to (4095.49998,-0.00002)
+@ Octant NNW (0 offsets), from (4095.49998,-0.00002) to (4095.49998,-0.0
+0002)
+@ transition line 0, from (4095.49998,-0.00002) to (4095.49998,-0.00002)
+@ Octant WNW (1 offset), from (4095.49998,-0.00002) to (-4094.99998,0.5)
+@ transition line 2, from (4095.49998,-0.00002) to (4094.99998,0.49998)
+@ transition line 1, from (-4094.99998,0.5) to (-4094.99998,0.5)
+(4095,0)(-4095,0)
+@ Octant WSW (1 offset), from (-4094.99998,0.5) to (-4095.49998,0)
+@ transition line 0, from (-4094.99998,0.5) to (-4094.99998,0.5)
+@ transition line 1, from (-4094.99998,0.5) to (-4095.49998,0)
+(-4095,1)
+@ Octant SSW (0 offsets), from (-4095.49998,0) to (-4095.49998,0)
+@ transition line 1, from (-4095.49998,0) to (-4095.49998,0)
+@ Octant SSE (0 offsets), from (-4095.49998,0) to (-4095.49998,0)
+@ transition line 0, from (-4095.49998,0) to (-4095.49998,0)
+(-4095,0).
+
+{addto}
+{(picture)shifted((0,257))}
+! A statement can't begin with `,'.
+<to be read again>
+ ,
+l.145 ...o e3 shifted (0,257); ,
+ "flushed with pride"; numeric...
+I was looking for the beginning of a new statement.
+If you just proceed without changing anything, I'll ignore
+everything up to the next `;'. Please insert a semicolon
+now in front of anything that you don't want me to delete.
+(See Chapter 27 of The METAFONTbook for an example.)
+
+! Extra tokens will be flushed.
+<to be read again>
+ ,
+l.145 ...o e3 shifted (0,257); ,
+ "flushed with pride"; numeric...
+I've just read as much of that statement as I could fathom,
+so a semicolon should have been next. It's very puzzling...
+but I'll try to get myself back together, by ignoring
+everything up to the next `;'. Please insert a semicolon
+now in front of anything that you don't want me to delete.
+(See Chapter 27 of The METAFONTbook for an example.)
+
+{numeric}
+{def}
+
+f(EXPR0)(EXPR1)(EXPR2)->showdependencies;tracingcapsules:=1;showdependen
+cies;show1/3(3,6)*(((EXPR0)+(EXPR1))+((EXPR1)-(EXPR0))),(1,1)/sqrt2zscal
+ed((EXPR0)+1,(EXPR0)+2)-((EXPR0)+1,(EXPR0)+2)rotated45,(0,1)zscaled(1,(E
+XPR1)+2)-(1,(EXPR1)+2)rotated90
+{(xx)+(1)}
+{(xx+1)/(0.3)}
+(EXPR0)<-3.3333xx+3.3333
+{(yy)-(1)}
+{(yy-1)/(0.5)}
+(EXPR1)<-2yy-2
+(EXPR2)<-(xx,0)
+{showdependencies}
+alpha=0.45p3~+7
+{tracingcapsules:=1}
+{showdependencies}
+xpart %CAPSULE1359=xx
+%CAPSULE1367=2yy-2
+%CAPSULE1375 = 3.3333xx+3.3333
+alpha=0.45p3~+7
+{show}
+{(1/3)*((3,6))}
+{(3.3333xx+3.3333)+(2yy-2)}
+{(2yy-2)-(3.3333xx+3.3333)}
+{(linearform)+(linearform)}
+{((1,2))*(4yy-4)}
+>> (4yy-4,8yy-8)
+{sqrt(2)}
+{((1,1))/(1.41422)}
+{(3.3333xx+3.3333)+(1)}
+{(3.3333xx+3.3333)+(2)}
+{((0.7071,0.7071))zscaled((3.3333xx+4.3333,3.3333xx+5.3333))}
+{(3.3333xx+3.3333)+(1)}
+{(3.3333xx+3.3333)+(2)}
+{((3.3333xx+4.3333,3.3333xx+5.3333))rotated(45)}
+{((-0.7071,4.71399xx+6.83531))-((-0.7071,4.71399xx+6.83531))}
+>> (0,0)
+{(2yy-2)+(2)}
+{((0,1))zscaled((1,2yy))}
+{(2yy-2)+(2)}
+{((1,2yy))rotated(90)}
+{((-2yy,1))-((-2yy,1))}
+>> (0,0)
+{(1000)*(o3)}
+{(o1)-(o2)}
+{(4000)*(linearform)}
+{(1000o3)-(linearform)}
+{(4000)*(o2)}
+{(linearform)+(4000o2)}
+{(linearform)+(9)}
+{(0.01)*(o3)}
+{-(0.01o3)}
+{(3)*(ooo)}
+{(-0.01o3)+(3ooo)}
+{begingroup}
+{(o2)+(o4)}
+{(linearform)+(o5)}
+{(linearform)-(20)}
+{(9/10)*(linearform)}
+{(oo)=(linearform)}
+## oo=0.9o5+0.9o4+0.9o2-18
+{(0.5)*(o2)}
+{(o1)+(0.5o2)}
+{(8/9)*(linearform)}
+{(o5)=(linearform)}
+## o5=0.44444o2+0.88889o1
+{(o4)=(linearform)}
+## o4=0.44444o2+0.88889o1
+{(0.0001)*(o2)}
+{-(0.0001o2)}
+{(o6)=(-0.0001o2)}
+## o6=-0.0001o2
+{showdependencies}
+o6=-0.0001o2
+o4=0.44444o2+0.88889o1
+o5=0.44444o2+0.88889o1
+oo=1.7o2+1.6o1-18
+%CAPSULE382 = 3ooo-0.01o3
+xpart %CAPSULE1049 = 8000o2-4000o1+1000o3+9
+xpart %CAPSULE1383=xpart '
+ypart %CAPSULE1383=ypart '
+alpha=0.45p3~+7
+{numeric}
+### 4000o1 = -xpart %CAPSULE1049+8000o2+1000o3+9
+### -4.87383o2 = -oo-0.0004xpart %CAPSULE1049+0.39673o3-17.99643
+#### o6=-0.00027
+### -0.04366o3 = -o4+0.46689oo+8.40439
+### -o4 = -o5
+### 0.22894o5 = -%CAPSULE382+0.10689oo+3ooo+1.92412
+{begingroup}
+{pair}
+### -alfa=-xpart %CAPSULE1494
+{endgroup}
+{xpart((xpart %CAPSULE1494,0))}
+### -xpart %CAPSULE17=-%CAPSULE1176
+{endgroup}
+{(%CAPSULE382)+(%CAPSULE1176)}
+### -%CAPSULE382=-%CAPSULE1893+%CAPSULE1176
+### -%CAPSULE1893=-ypart %CAPSULE1049
+{begingroup}
+{save}
+{(1)-(p$)}
+{restoring p}
+### p$=-ypart %CAPSULE604+1
+{endgroup}
+{(2/3)*((-ypart %CAPSULE604+1,ypart %CAPSULE604))}
+### ypart %CAPSULE604=-xpart %CAPSULE604+1
+### -0.66667xpart %CAPSULE604=-xpart %CAPSULE1889
+{-((xpart %CAPSULE1889,-xpart %CAPSULE1889+0.66667))}
+### xpart %CAPSULE1889=-xpart %CAPSULE1172
+{((xpart %CAPSULE1049,ypart %CAPSULE1049))=((xpart %CAPSULE1172,-xpart %
+CAPSULE1172-0.66667))}
+## xpart %CAPSULE1172=-ypart %CAPSULE1049-0.66667
+## ypart %CAPSULE1049=-xpart %CAPSULE1049-0.66667
+### -xpart %CAPSULE1049=-xpart %CAPSULE1172
+{((xpart ',ypart '))=((xpart %CAPSULE1172,-xpart %CAPSULE1172-0.66667))}
+## xpart %CAPSULE1172=-ypart '-0.66667
+## xpart '=-ypart '-0.66667
+{begingroup}
+{(0.5)*(ooo)}
+{begingroup}
+{numeric}
+### -ooo=-%CAPSULE1494
+{endgroup}
+{(%CAPSULE1494)+(1)}
+### -%CAPSULE1494=-%CAPSULE1350+1
+{(1/2)*(%CAPSULE1350)}
+### -0.5%CAPSULE1350=-%CAPSULE1367
+{-(%CAPSULE1367)}
+### %CAPSULE1367=-%CAPSULE1893
+{(2)*(%CAPSULE1893)}
+### -2%CAPSULE1893=-%CAPSULE1885
+{(-0.5%CAPSULE1885-0.5)=(%CAPSULE1885)}
+## %CAPSULE1885=-0.33333
+{(oo)=(-0.33333)}
+## oo=-0.33333
+{endgroup}
+{(4000)*(-0.33333)}
+{yoffset:=-1333.31299}
+{xoffset:=-1333.31299}
+{for}
+{sqrt(-1)}
+! Square root of -1 has been replaced by 0.
+l.153 for @=angle(sqrt$,
+ mlog$):charext:=uniformdeviate$;charh...
+Since I don't take square roots of negative numbers,
+I'm zeroing this one. Proceed, with fingers crossed.
+
+{mlog(-1)}
+! Logarithm of -1 has been replaced by 0.
+l.153 for @=angle(sqrt$,mlog$)
+ :charext:=uniformdeviate$;charh...
+Since I don't take logs of non-positive numbers,
+I'm zeroing this one. Proceed, with fingers crossed.
+
+{angle((0,0))}
+! angle(0,0) is taken as zero.
+l.153 for @=angle(sqrt$,mlog$):
+ charext:=uniformdeviate$;charh...
+The `angle' between two identical points is undefined.
+I'm zeroing this one. Proceed, with fingers crossed.
+
+Runaway loop?
+charext:=uniformdeviate$;charht:=2048;granularity:=-8; ETC.
+! Forbidden token found while scanning the text of a for loop.
+<inserted text>
+ endfor
+<to be read again>
+ endtext
+l.163 ... showstats; bye endtext
+
+I suspect you have forgotten an `endfor',
+causing me to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+{loop value=0}
+{uniformdeviate(-1)}
+{charext:=-0.00507}
+{charht:=2048}
+{-(8)}
+{granularity:=-8}
+{addto}
+{-(100)}
+{-(99)}
+Path at line 163, before choices:
+(0,-100)..tension 500
+ ..(100,-99)..tension 3000
+ ..cycle
+
+Path at line 163, after choices:
+(0,-100)..controls (-36.92659,-103.51175) and (136.98943,-101.7726)
+ ..(100,-99)..controls (99.9889,-98.99916) and (0.01108,-99.99895)
+ ..cycle
+
+Tracing edges at line 163: (weight 1)
+(-3,-101)(-3,-102)(71,-102)(71,-101)(99,-101)(99,-100)(103,-100)
+(103,-99)(48,-99)(48,-100)(-7,-100)(-7,-101).
+
+{tracingoutput:=0}
+{shipout}
+! Enormous charht has been reduced.
+<to be read again>
+ ;
+<for(0)> ...=(EXPR0);shipout.e3;
+ special"bye";interim.char99="...
+<inserted text> endfor
+
+<to be read again>
+ endtext
+l.163 ... showstats; bye endtext
+
+Font metric dimensions must be less than 2048pt.
+
+[109]
+{special}
+{interim}
+! The token `char' isn't an internal quantity.
+<to be read again>
+ char
+<for(0)> ...al"bye";interim.char
+ 99="c";true=false;[[clear(tra...
+<inserted text> endfor
+
+<to be read again>
+ endtext
+l.163 ... showstats; bye endtext
+
+Something like `tracingonline' should follow `interim'.
+
+{char(99)}
+{("c")=("c")}
+! Redundant equation.
+<to be read again>
+ ;
+<for(0)> ...;interim.char99="c";
+ true=false;[[clear(tracingcom...
+<inserted text> endfor
+
+<to be read again>
+ endtext
+l.163 ... showstats; bye endtext
+
+I already knew that this equation was true.
+But perhaps no harm has been done; let's continue.
+
+{true}
+{false}
+{(true)=(false)}
+! Inconsistent equation.
+<to be read again>
+ ;
+<for(0)> ...ar99="c";true=false;
+ [[clear(tracingcommands);char...
+<inserted text> endfor
+
+<to be read again>
+ endtext
+l.163 ... showstats; bye endtext
+
+The equation I just read contradicts what was said before.
+But don't worry; continue and I'll just ignore it.
+
+{begingroup}
+
+clear(TEXT0)->interim(TEXT0):=$
+(TEXT0)<-tracingcommands
+{interim}
+{tracingcommands:=-1}
+! Enormous charht has been reduced.
+<to be read again>
+ ;
+<for(0)> ...shipout+nullpicture;
+ "careful"for.for=(EXPR0)step2...
+<inserted text> endfor
+
+<to be read again>
+ endtext
+l.163 ... showstats; bye endtext
+
+Font metric dimensions must be less than 2048pt.
+
+[0]
+careful METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT M
+ETAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT M
+ETAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT M
+ETAFONT METAFONT METAFONT METAFONT
+{restoring tracingcommands=2.1}
+{endgroup}
+{scrollmode}
+
+{char(31)}
+{("hello again")&("^^_")}
+hello again^^_
+{save}
+### -0.45p3~=-alpha+7
+{-(0.043)}
+{fillin:=-0.043}
+{def}
+{begingroup}
+{tracingspecs:=1}
+{show}
+{nullpen}
+
+>> Pen polygon at line 163:
+(0,0)
+ .. cycle
+
+{makepath(pen)}
+
+>> Path at line 163:
+(1,-2)..controls (1,-2) and (2,-1)
+ ..(2,-1)..controls (2,-1) and (2.5,0.5)
+ ..(2.5,0.5)..controls (2.5,0.5) and (1,2)
+ ..(1,2)..controls (1,2) and (0,2.5)
+ ..(0,2.5)..controls (0,2.5) and (-1,2)
+ ..(-1,2)..controls (-1,2) and (-2,1)
+ ..(-2,1)..controls (-2,1) and (-2.5,-0.5)
+ ..(-2.5,-0.5)..controls (-2.5,-0.5) and (-1,-2)
+ ..(-1,-2)..controls (-1,-2) and (0,-2.5)
+ ..(0,-2.5)..controls (0,-2.5) and (1,-2)
+ ..cycle
+
+{(pen)rotated(1)}
+Pen polygon at line 163 (newly created):
+(0.97366,1.51723)
+ .. cycle
+
+{makepath(pen)}
+
+>> Path at line 163:
+(0.97366,1.51723)..controls (0.97366,1.51723) and (0.97366,1.51723)
+ ..cycle
+
+{pencircle}
+{makepath(future pen)}
+Pen polygon at line 163 (newly created):
+(0.5,-0.5)
+ .. (0.5,0.5)
+ .. (-0.5,0.5)
+ .. (-0.5,-0.5)
+ .. cycle
+
+{(path)rotated(-1)}
+
+>> Path at line 163:
+(0.4912,-0.50865)..controls (0.4912,-0.50865) and (0.50865,0.4912)
+ ..(0.50865,0.4912)..controls (0.50865,0.4912) and (-0.4912,0.50865)
+ ..(-0.4912,0.50865)..controls (-0.4912,0.50865) and (-0.50865,-0.4912)
+ ..(-0.50865,-0.4912)..controls (-0.50865,-0.4912) and (0.4912,-0.50865)
+ ..cycle
+
+{addto}
+Path at line 163, before choices:
+(0,2){0,-4096}
+ ..{0,-4096}(0,1){0,-4096}
+ ..{4096,0}(3,0){4096,0}
+ ..{4096,0}(4,0){4096,0}
+ ..{0,-4096}cycle
+
+Path at line 163, after choices:
+(0,2)..controls (0,1.66667) and (0,1.33333)
+ ..(0,1)..controls (0,-0.20886) and (1.63324,0)
+ ..(3,0)..controls (3.33333,0) and (3.66667,0)
+ ..(4,0)..controls (13.63031,0) and (0,10.64238)
+ ..cycle
+
+Path at line 163, before choices:
+(0,0)
+ ..(5,2.9)
+ ..(4,3)
+ ..cycle
+
+Path at line 163, after choices:
+(0,0)..controls (0.9363,-8.0181) and (11.81119,0.07109)
+ ..(5,2.9)..controls (4.68596,3.03043) and (4.33879,3.02028)
+ ..(4,3)..controls (1.86353,2.87216) and (-0.21431,1.83528)
+ ..cycle
+
+{makepen(path)}
+Pen polygon at line 163 (newly created):
+(5,2.9)
+ .. (4,3)
+ .. (0,0)
+ .. cycle
+
+Path at line 163, before subdivision into octants:
+(0,2)..controls (0,1.66667) and (0,1.33333)
+ ..(0,1)..controls (0,-0.20886) and (1.63324,0)
+ ..(3,0)..controls (3.33333,0) and (3.66667,0)
+ ..(4,0)..controls (13.63031,0) and (0,10.64238)
+ ..cycle
+
+Cycle spec at line 163, after subdivision and double autorounding:
+(1.5,0.00272) % beginning in octant `SSE'
+ ..controls (1.5,-0.49254) and (1.63411,-0.82727)
+ ..(1.8592,-1.05237) % segment 1
+% entering octant `ESE'
+ ..controls (2.23936,-1.43253) and (2.87909,-1.5)
+ ..(3.57066,-1.5) % segment 1
+% entering octant `ENE'
+ ..controls (3.95114,-1.5) and (4.3473,-1.47957)
+ ..(4.72458,-1.47957) % segment 1
+ ..controls (5.08287,-1.47957) and (5.44116,-1.47957)
+ ..(5.79944,-1.47957) % segment 2
+ ..controls (7.35368,-1.47957) and (8.34424,-1.12393)
+ ..(8.90538,-0.56279) % segment 3
+% entering octant `NNE'
+ ..controls (9.31982,-0.14835) and (9.5,0.37819)
+ ..(9.5,0.95631) % segment 3
+% entering octant `NNW'
+ ..controls (9.5,2.00116) and (8.61821,3.4318)
+ ..(7.41951,4.6305) % segment 3
+% entering octant `WNW'
+ ..controls (6.32909,5.72092) and (5.11603,6.5)
+ ..(4.2104,6.5) % segment 3
+% entering octant `WSW'
+ ..controls (3.64668,6.5) and (3.12122,6.31134)
+ ..(2.68588,5.876) % segment 3
+% entering octant `SSW'
+ ..controls (1.97163,5.16176) and (1.5,3.78351)
+ ..(1.5,1.485) % segment 3
+ ..controls (1.5,0.99092) and (1.5,0.49681)
+ ..(1.5,0.00272) % segment 0
+ & cycle
+
+Tracing edges at line 163: (weight 1)
+@ Octant SSE (0 offsets), from (1.5,0.00272) to (1.8592,-1.05237)
+@ transition line 0, from (1.5,0.00272) to (1.5,0.00272)
+(2,0)
+@ Octant ESE (0 offsets), from (1.8592,-1.05237) to (3.57066,-1.5)
+@ transition line 1, from (3.57066,-1.5) to (3.57066,-1.5)
+@ Octant ENE (2 offsets), from (3.57066,-1.5) to (13.90538,2.3372)
+@ transition line 0, from (3.57066,-1.5) to (3.57066,-1.5)
+@ transition line 1, from (8.41534,-0.93503) to (13.41534,1.96497)
+@ transition line 2, from (13.90538,2.3372) to (13.90538,2.3372)
+(2,-1)(9,-1)(9,0)(11,0)(11,1)(13,1)
+@ Octant NNE (0 offsets), from (13.90538,2.3372) to (14.5,3.85631)
+@ transition line 1, from (14.5,3.85631) to (14.5,3.85631)
+(13,2)(14,2)
+@ Octant NNW (0 offsets), from (14.5,3.85631) to (12.41951,7.53049)
+@ transition line 0, from (14.5,3.85631) to (14.5,3.85631)
+(14,6)(13,6)(13,7)(12,7)
+@ Octant WNW (2 offsets), from (12.41951,7.53049) to (8.2104,9.5)
+@ transition line 3, from (12.41951,7.53049) to (12.41951,7.53049)
+@ transition line 2, from (9.38113,9.39124) to (8.38113,9.49124)
+@ transition line 1, from (8.2104,9.5) to (8.2104,9.5)
+(12,8)(11,8)(11,9)(8,9)
+@ Octant WSW (2 offsets), from (8.2104,9.5) to (2.68588,5.876)
+@ transition line 0, from (8.2104,9.5) to (8.2104,9.5)
+@ transition line 1, from (6.92668,9.08539) to (2.92668,6.08539)
+@ transition line 2, from (2.68588,5.876) to (2.68588,5.876)
+(8,10)(8,9)(6,9)(6,8)(5,8)(5,7)(3,7)
+@ Octant SSW (0 offsets), from (2.68588,5.876) to (1.5,0.00272)
+@ transition line 1, from (1.5,0.00272) to (1.5,0.00272)
+(3,6)(2,6)(2,0).
+
+Path at line 163, before subdivision into octants:
+(0,2)..controls (0,10.64238) and (13.63031,0)
+ ..(4,0)..controls (3.66667,0) and (3.33333,0)
+ ..(3,0)..controls (1.63324,0) and (0,-0.20886)
+ ..(0,1)..controls (0,1.33333) and (0,1.66667)
+ ..cycle
+
+Cycle spec at line 163, after subdivision and double autorounding:
+(2.68588,5.876) % beginning in octant `ENE'
+ ..controls (3.12122,6.31134) and (3.64668,6.5)
+ ..(4.2104,6.5) % segment 0
+% entering octant `ESE'
+ ..controls (5.11603,6.5) and (6.32909,5.72092)
+ ..(7.41953,4.63048) % segment 0
+% entering octant `SSE'
+ ..controls (8.61824,3.43176) and (9.5,2.00116)
+ ..(9.5,0.95631) % segment 0
+% entering octant `SSW'
+ ..controls (9.5,0.37819) and (9.31982,-0.14835)
+ ..(8.90538,-0.56279) % segment 0
+% entering octant `WSW'
+ ..controls (8.34425,-1.12392) and (7.35368,-1.47957)
+ ..(5.79944,-1.47957) % segment 0
+ ..controls (5.44116,-1.47957) and (5.08287,-1.47957)
+ ..(4.72458,-1.47957) % segment 1
+ ..controls (4.3473,-1.47957) and (3.95114,-1.5)
+ ..(3.57066,-1.5) % segment 2
+% entering octant `WNW'
+ ..controls (2.87909,-1.5) and (2.23936,-1.43253)
+ ..(1.85919,-1.05235) % segment 2
+% entering octant `NNW'
+ ..controls (1.6341,-0.82726) and (1.5,-0.49254)
+ ..(1.5,0.00272) % segment 2
+% entering octant `NNE'
+ ..controls (1.5,0.49681) and (1.5,0.99092)
+ ..(1.5,1.485) % segment 3
+ ..controls (1.5,3.78351) and (1.97165,5.16177)
+ ..(2.68588,5.876) % segment 0
+ & cycle
+
+Tracing edges at line 163: (weight 1)
+@ Octant ENE (2 offsets), from (7.68588,8.776) to (4.2104,6.5)
+@ retrograde line from (7.68588,8.776) to (2.68588,5.876)
+(7,9)(7,8)(5,8)(5,7)(4,7)
+@ transition line 0, from (2.68588,5.876) to (2.68588,5.876)
+@ transition line 1, from (2.68588,5.876) to (7.68588,8.776)
+@ transition line 2, from (8.13123,9.12088) to (3.13123,6.22089)
+@ transition line 1, from (4.2104,6.5) to (9.2104,9.4)
+@ transition line 2, from (9.2104,9.4) to (9.2104,9.4)
+(4,6)(4,7)(6,7)(6,8)(8,8)
+@ retrograde line from (9.2104,9.4) to (4.2104,6.5)
+(8,9)(8,8)(6,8)
+@ Octant ESE (0 offsets), from (4.2104,6.5) to (7.41953,4.63048)
+@ transition line 1, from (7.41953,4.63048) to (7.41953,4.63048)
+(6,7)(4,7)(4,6)(6,6)
+@ Octant SSE (0 offsets), from (7.41953,4.63048) to (9.5,0.95631)
+@ transition line 0, from (7.41953,4.63048) to (7.41953,4.63048)
+(6,5)(8,5)(8,3)(9,3)
+@ Octant SSW (0 offsets), from (9.5,0.95631) to (8.90538,-0.56279)
+@ transition line 1, from (8.90538,-0.56279) to (8.90538,-0.56279)
+@ Octant WSW (2 offsets), from (8.90538,-0.56279) to (7.57066,1.5)
+@ retrograde line from (8.90538,-0.56279) to (12.90538,2.43721)
+(9,-1)(9,0)(10,0)(10,1)(12,1)
+@ transition line 0, from (12.90538,2.43721) to (12.90538,2.43721)
+@ transition line 1, from (12.90538,2.43721) to (8.90538,-0.56279)
+@ transition line 2, from (8.6665,-0.76936) to (12.6665,2.23064)
+@ transition line 1, from (7.57066,1.5) to (3.57066,-1.5)
+@ transition line 2, from (3.57066,-1.5) to (3.57066,-1.5)
+(12,2)(8,2)(8,1)(6,1)(6,0)(5,0)
+@ retrograde line from (3.57066,-1.5) to (7.57066,1.5)
+(5,-1)(5,0)(6,0)(6,1)(8,1)
+@ Octant WNW (2 offsets), from (7.57066,1.5) to (6.85919,1.84764)
+@ retrograde line from (7.57066,1.5) to (8.57066,1.4)
+(8,2)
+@ transition line 3, from (8.57066,1.4) to (8.57066,1.4)
+@ transition line 2, from (8.57066,1.4) to (7.57066,1.5)
+@ transition line 1, from (6.95764,1.52585) to (7.95764,1.42584)
+@ transition line 2, from (6.85919,1.84764) to (5.85919,1.94765)
+@ transition line 1, from (5.85919,1.94765) to (5.85919,1.94765)
+(8,1)
+@ retrograde line from (5.85919,1.94765) to (6.85919,1.84764)
+@ Octant NNW (0 offsets), from (6.85919,1.84764) to (6.5,2.90271)
+@ transition line 0, from (6.85919,1.84764) to (6.85919,1.84764)
+(8,2)(7,2)
+@ Octant NNE (0 offsets), from (6.5,2.90271) to (7.68588,8.776)
+@ transition line 1, from (7.68588,8.776) to (7.68588,8.776)
+(7,9).
+
+{tracingonline:=1}
+
+f<expr>->let)=];let[=(;show._
+(EXPR0)<-xx
+{let}
+{let}
+{show}
+>> _1
+{showdependencies}
+xpart '=-ypart '-0.66667
+{qq:=pen}
+{showstats}
+Memory usage 1476&588 (104 still untouched)
+String usage 42&168 (816&7694 still untouched)
+{[repeat the loop]}
+! A group begun on line 163 never ended.
+<to be read again>
+ endtext
+l.163 ... showstats; bye endtext
+
+I saw a `begingroup' back there that hasn't been matched
+by `endgroup'. So I've inserted `endgroup' now.
+
+{endgroup}
+ )
+(end occurred when else on line 93 was incomplete)
+(end occurred when if on line 36 was incomplete)
+(end occurred when elseif on line 21 was incomplete)
+Here is how much of METAFONT's memory you used:
+ 69 strings out of 885
+ 3759 string characters out of 11453
+ 2897 words of memory out of 3001
+ 289 symbolic tokens out of 2100
+ 8i,43n,14r,8p,168b stack positions out of 30i,100n,300r,150p,500b
+
+(illegal design size has been changed to 128pt)
+(some chardp values had to be adjusted by as much as 0.5pt)
+(local label 0:: was missing)
+(local label 5:: was missing)
+(4 font metric dimensions had to be decreased)
+(You used 3w,2h,16d,2i,312l,301k,1e,10p metric file positions
+ out of 256w,16h,16d,64i,5000l,500k,256e,50p)
+
+Font metrics written on trap.tfm.
+Output written on trap.72270gf (5 characters, 1028 bytes).
diff --git a/systems/unix/tex-gpc/traplog/trap.log.diff b/systems/unix/tex-gpc/traplog/trap.log.diff
new file mode 100644
index 0000000000..b2541e03dd
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trap.log.diff
@@ -0,0 +1,24 @@
+1,2c1,2
+< This is METAFONT-GPC (preloaded base=trap 2008.9.7) 7 SEP 2008 12:47
+< ** &trap trap
+---
+> This is METAFONT, Version 2.718281 (preloaded base=trap 2008.3.15) 15 MAR 2008 02:23
+> ** &trap trap
+1825c1825
+< String usage 24&92 (860&11376 still untouched)
+---
+> String usage 24&92 (858&11309 still untouched)
+4235c4235
+< String usage 42&168 (816&7694 still untouched)
+---
+> String usage 41&161 (815&7634 still untouched)
+4251,4252c4251,4252
+< 69 strings out of 885
+< 3759 string characters out of 11453
+---
+> 68 strings out of 883
+> 3752 string characters out of 11386
+4255c4255
+< 8i,43n,14r,8p,168b stack positions out of 30i,100n,300r,150p,500b
+---
+> 8i,43n,14r,8p,167b stack positions out of 30i,100n,300r,150p,500b
diff --git a/systems/unix/tex-gpc/traplog/trap.pl b/systems/unix/tex-gpc/traplog/trap.pl
new file mode 100644
index 0000000000..bae32a41fb
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trap.pl
@@ -0,0 +1,490 @@
+(CODINGSCHEME Q)
+(DESIGNSIZE R 128.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM O 5546464252)
+(FONTDIMEN
+ (SLANT R 2047.999999)
+ (SPACE R 0.0)
+ (STRETCH R 0.0)
+ (SHRINK R 0.0)
+ (XHEIGHT R 0.0)
+ (QUAD R 0.0)
+ (EXTRASPACE R 0.0)
+ (PARAMETER D 8 R 0.0)
+ (PARAMETER D 9 R 0.005208)
+ (PARAMETER D 10 R 0.0)
+ )
+(BOUNDARYCHAR O 377)
+(LIGTABLE
+ (COMMENT THIS PART OF THE PROGRAM IS NEVER USED!
+ )
+ (LABEL BOUNDARYCHAR)
+ (/LIG/>> O 377 O 0)
+ (KRN O 0 R 0.0)
+ (KRN O 0 R 0.0078125)
+ (KRN O 0 R 0.015625)
+ (KRN O 0 R 0.0234375)
+ (KRN O 0 R 0.03125)
+ (KRN O 0 R 0.0390625)
+ (KRN O 0 R 0.046875)
+ (KRN O 0 R 0.0546875)
+ (KRN O 0 R 0.0625)
+ (KRN O 0 R 0.0703125)
+ (KRN O 0 R 0.078125)
+ (KRN O 0 R 0.0859375)
+ (KRN O 0 R 0.09375)
+ (KRN O 0 R 0.1015625)
+ (KRN O 0 R 0.109375)
+ (KRN O 0 R 0.1171875)
+ (KRN O 0 R 0.125)
+ (KRN O 0 R 0.1328125)
+ (KRN O 0 R 0.140625)
+ (KRN O 0 R 0.1484375)
+ (KRN O 0 R 0.15625)
+ (KRN O 0 R 0.1640625)
+ (KRN O 0 R 0.171875)
+ (KRN O 0 R 0.1796875)
+ (KRN O 0 R 0.1875)
+ (KRN O 0 R 0.1953125)
+ (KRN O 0 R 0.203125)
+ (KRN O 0 R 0.2109375)
+ (KRN O 0 R 0.21875)
+ (KRN O 0 R 0.2265625)
+ (KRN O 0 R 0.234375)
+ (KRN O 0 R 0.2421875)
+ (KRN O 0 R 0.25)
+ (KRN O 0 R 0.2578125)
+ (KRN O 0 R 0.265625)
+ (KRN O 0 R 0.2734375)
+ (KRN O 0 R 0.28125)
+ (KRN O 0 R 0.2890625)
+ (KRN O 0 R 0.296875)
+ (KRN O 0 R 0.3046875)
+ (KRN O 0 R 0.3125)
+ (KRN O 0 R 0.3203125)
+ (KRN O 0 R 0.328125)
+ (KRN O 0 R 0.3359375)
+ (KRN O 0 R 0.34375)
+ (KRN O 0 R 0.3515625)
+ (KRN O 0 R 0.359375)
+ (KRN O 0 R 0.3671875)
+ (KRN O 0 R 0.375)
+ (KRN O 0 R 0.3828125)
+ (KRN O 0 R 0.390625)
+ (KRN O 0 R 0.3984375)
+ (KRN O 0 R 0.40625)
+ (KRN O 0 R 0.4140625)
+ (KRN O 0 R 0.421875)
+ (KRN O 0 R 0.4296875)
+ (KRN O 0 R 0.4375)
+ (KRN O 0 R 0.4453125)
+ (KRN O 0 R 0.453125)
+ (KRN O 0 R 0.4609375)
+ (SKIP D 1)
+ (LABEL C g)
+ (LIG/ C g O 0)
+ (STOP)
+ (KRN O 0 R 0.400782)
+ (KRN O 0 R 0.408594)
+ (KRN O 0 R 0.416407)
+ (KRN O 0 R 0.424219)
+ (KRN O 0 R 0.432032)
+ (KRN O 0 R 0.439844)
+ (KRN O 0 R 0.447657)
+ (KRN O 0 R 0.455469)
+ (KRN O 0 R 0.463282)
+ (KRN O 0 R 0.471094)
+ (KRN O 0 R 0.478907)
+ (KRN O 0 R 0.486719)
+ (KRN O 0 R 0.494532)
+ (KRN O 0 R 0.502344)
+ (KRN O 0 R 0.510157)
+ (KRN O 0 R 0.517969)
+ (KRN O 0 R 0.525782)
+ (KRN O 0 R 0.533594)
+ (KRN O 0 R 0.541407)
+ (KRN O 0 R 0.549219)
+ (KRN O 0 R 0.557032)
+ (KRN O 0 R 0.564844)
+ (KRN O 0 R 0.572657)
+ (KRN O 0 R 0.580469)
+ (KRN O 0 R 0.588282)
+ (KRN O 0 R 0.596094)
+ (KRN O 0 R 0.603907)
+ (KRN O 0 R 0.611719)
+ (KRN O 0 R 0.619532)
+ (KRN O 0 R 0.627344)
+ (KRN O 0 R 0.635157)
+ (KRN O 0 R 0.642969)
+ (KRN O 0 R 0.650782)
+ (KRN O 0 R 0.658594)
+ (KRN O 0 R 0.666407)
+ (KRN O 0 R 0.674219)
+ (KRN O 0 R 0.682032)
+ (KRN O 0 R 0.689844)
+ (KRN O 0 R 0.697657)
+ (KRN O 0 R 0.705469)
+ (KRN O 0 R 0.713282)
+ (KRN O 0 R 0.721094)
+ (KRN O 0 R 0.728907)
+ (KRN O 0 R 0.736719)
+ (KRN O 0 R 0.744532)
+ (KRN O 0 R 0.752344)
+ (KRN O 0 R 0.760157)
+ (KRN O 0 R 0.767969)
+ (KRN O 0 R 0.775782)
+ (KRN O 0 R 0.783594)
+ (KRN O 0 R 0.791407)
+ (KRN O 0 R 0.799219)
+ (KRN O 0 R 0.807032)
+ (KRN O 0 R 0.814844)
+ (KRN O 0 R 0.822657)
+ (KRN O 0 R 0.830469)
+ (KRN O 0 R 0.838282)
+ (KRN O 0 R 0.846094)
+ (KRN O 0 R 0.853907)
+ (KRN O 0 R 0.861719)
+ (SKIP D 1)
+ (LABEL C h)
+ (LABEL C i)
+ (/LIG C i O 0)
+ (STOP)
+ (KRN O 0 R 0.801562)
+ (KRN O 0 R 0.809375)
+ (KRN O 0 R 0.817187)
+ (KRN O 0 R 0.825)
+ (KRN O 0 R 0.832812)
+ (KRN O 0 R 0.840625)
+ (KRN O 0 R 0.848437)
+ (KRN O 0 R 0.85625)
+ (KRN O 0 R 0.864062)
+ (KRN O 0 R 0.871875)
+ (KRN O 0 R 0.879687)
+ (KRN O 0 R 0.8875)
+ (KRN O 0 R 0.895312)
+ (KRN O 0 R 0.903125)
+ (KRN O 0 R 0.910937)
+ (KRN O 0 R 0.91875)
+ (KRN O 0 R 0.926562)
+ (KRN O 0 R 0.934375)
+ (KRN O 0 R 0.942187)
+ (KRN O 0 R 0.95)
+ (KRN O 0 R 0.957812)
+ (KRN O 0 R 0.965625)
+ (KRN O 0 R 0.973437)
+ (KRN O 0 R 0.98125)
+ (KRN O 0 R 0.989062)
+ (KRN O 0 R 0.996875)
+ (KRN O 0 R 1.004687)
+ (KRN O 0 R 1.0125)
+ (KRN O 0 R 1.020312)
+ (KRN O 0 R 1.028125)
+ (KRN O 0 R 1.035937)
+ (KRN O 0 R 1.04375)
+ (KRN O 0 R 1.051562)
+ (KRN O 0 R 1.059375)
+ (KRN O 0 R 1.067187)
+ (KRN O 0 R 1.075)
+ (KRN O 0 R 1.082812)
+ (KRN O 0 R 1.090625)
+ (KRN O 0 R 1.098437)
+ (KRN O 0 R 1.10625)
+ (KRN O 0 R 1.114062)
+ (KRN O 0 R 1.121875)
+ (KRN O 0 R 1.129687)
+ (KRN O 0 R 1.1375)
+ (KRN O 0 R 1.145312)
+ (KRN O 0 R 1.153125)
+ (KRN O 0 R 1.160937)
+ (KRN O 0 R 1.16875)
+ (KRN O 0 R 1.176562)
+ (KRN O 0 R 1.184375)
+ (KRN O 0 R 1.192187)
+ (KRN O 0 R 1.2)
+ (KRN O 0 R 1.207812)
+ (KRN O 0 R 1.215625)
+ (KRN O 0 R 1.223437)
+ (KRN O 0 R 1.23125)
+ (KRN O 0 R 1.239062)
+ (KRN O 0 R 1.246875)
+ (KRN O 0 R 1.254687)
+ (KRN O 0 R 1.2625)
+ (SKIP D 1)
+ (LABEL C j)
+ (/LIG> C j O 0)
+ (SKIP D 123)
+ (KRN O 0 R 1.202344)
+ (KRN O 0 R 1.210156)
+ (KRN O 0 R 1.217969)
+ (KRN O 0 R 1.225781)
+ (KRN O 0 R 1.233594)
+ (KRN O 0 R 1.241406)
+ (KRN O 0 R 1.249219)
+ (KRN O 0 R 1.257031)
+ (KRN O 0 R 1.264844)
+ (KRN O 0 R 1.272656)
+ (KRN O 0 R 1.280469)
+ (KRN O 0 R 1.288281)
+ (KRN O 0 R 1.296094)
+ (KRN O 0 R 1.303906)
+ (KRN O 0 R 1.311719)
+ (KRN O 0 R 1.319531)
+ (KRN O 0 R 1.327344)
+ (KRN O 0 R 1.335156)
+ (KRN O 0 R 1.342969)
+ (KRN O 0 R 1.350781)
+ (KRN O 0 R 1.358594)
+ (KRN O 0 R 1.366406)
+ (KRN O 0 R 1.374219)
+ (KRN O 0 R 1.382031)
+ (KRN O 0 R 1.389844)
+ (KRN O 0 R 1.397656)
+ (KRN O 0 R 1.405469)
+ (KRN O 0 R 1.413281)
+ (KRN O 0 R 1.421094)
+ (KRN O 0 R 1.428906)
+ (KRN O 0 R 1.436719)
+ (KRN O 0 R 1.444531)
+ (KRN O 0 R 1.452344)
+ (KRN O 0 R 1.460156)
+ (KRN O 0 R 1.467969)
+ (KRN O 0 R 1.475781)
+ (KRN O 0 R 1.483594)
+ (KRN O 0 R 1.491406)
+ (KRN O 0 R 1.499219)
+ (KRN O 0 R 1.507031)
+ (KRN O 0 R 1.514844)
+ (KRN O 0 R 1.522656)
+ (KRN O 0 R 1.530469)
+ (KRN O 0 R 1.538281)
+ (KRN O 0 R 1.546094)
+ (KRN O 0 R 1.553906)
+ (KRN O 0 R 1.561719)
+ (KRN O 0 R 1.569531)
+ (KRN O 0 R 1.577344)
+ (KRN O 0 R 1.585156)
+ (KRN O 0 R 1.592969)
+ (KRN O 0 R 1.600781)
+ (KRN O 0 R 1.608594)
+ (KRN O 0 R 1.616406)
+ (KRN O 0 R 1.624219)
+ (KRN O 0 R 1.632031)
+ (KRN O 0 R 1.639844)
+ (KRN O 0 R 1.647656)
+ (KRN O 0 R 1.655469)
+ (KRN O 0 R 1.663281)
+ (SKIP D 1)
+ (LABEL C k)
+ (LIG/> C k O 0)
+ (SKIP D 62)
+ (KRN O 0 R 1.603125)
+ (KRN O 0 R 1.610937)
+ (KRN O 0 R 1.61875)
+ (KRN O 0 R 1.626562)
+ (KRN O 0 R 1.634375)
+ (KRN O 0 R 1.642187)
+ (KRN O 0 R 1.65)
+ (KRN O 0 R 1.657812)
+ (KRN O 0 R 1.665625)
+ (KRN O 0 R 1.673437)
+ (KRN O 0 R 1.68125)
+ (KRN O 0 R 1.689062)
+ (KRN O 0 R 1.696875)
+ (KRN O 0 R 1.704687)
+ (KRN O 0 R 1.7125)
+ (KRN O 0 R 1.720312)
+ (KRN O 0 R 1.728125)
+ (KRN O 0 R 1.735937)
+ (KRN O 0 R 1.74375)
+ (KRN O 0 R 1.751562)
+ (KRN O 0 R 1.759375)
+ (KRN O 0 R 1.767187)
+ (KRN O 0 R 1.775)
+ (KRN O 0 R 1.782812)
+ (KRN O 0 R 1.790625)
+ (KRN O 0 R 1.798437)
+ (KRN O 0 R 1.80625)
+ (KRN O 0 R 1.814062)
+ (KRN O 0 R 1.821875)
+ (KRN O 0 R 1.829687)
+ (KRN O 0 R 1.8375)
+ (KRN O 0 R 1.845312)
+ (KRN O 0 R 1.853125)
+ (KRN O 0 R 1.860937)
+ (KRN O 0 R 1.86875)
+ (KRN O 0 R 1.876562)
+ (KRN O 0 R 1.884375)
+ (KRN O 0 R 1.892187)
+ (KRN O 0 R 1.9)
+ (KRN O 0 R 1.907812)
+ (KRN O 0 R 1.915625)
+ (KRN O 0 R 1.923437)
+ (KRN O 0 R 1.93125)
+ (KRN O 0 R 1.939062)
+ (KRN O 0 R 1.946875)
+ (KRN O 0 R 1.954687)
+ (KRN O 0 R 1.9625)
+ (KRN O 0 R 1.970312)
+ (KRN O 0 R 1.978125)
+ (KRN O 0 R 1.985937)
+ (KRN O 0 R 1.99375)
+ (KRN O 0 R 2.001562)
+ (KRN O 0 R 2.009375)
+ (KRN O 0 R 2.017187)
+ (KRN O 0 R 2.025)
+ (KRN O 0 R 2.032812)
+ (KRN O 0 R 2.040625)
+ (KRN O 0 R 2.048437)
+ (KRN O 0 R 2.05625)
+ (KRN O 0 R 2.064062)
+ (STOP)
+ (LABEL C l)
+ (/LIG/> C l O 0)
+ (SKIP D 1)
+ (LABEL C m)
+ (LIG O 0 O 0)
+ (STOP)
+ (LIG C a C b)
+ (KRN C d R -15.999999)
+ (LABEL C c)
+ (LABEL C d)
+ (/LIG/ C e C f)
+ (KRN O 0 R 0.0)
+ (STOP)
+ (COMMENT THIS PART OF THE PROGRAM IS NEVER USED!
+ )
+ )
+(CHARACTER O 0
+ (CHARWD R 2.0)
+ (CHARHT R 15.999999)
+ (CHARDP R 0.234375)
+ (CHARIC R -7.8125)
+ (NEXTLARGER O 5)
+ )
+(CHARACTER O 5
+ (CHARWD R 0.0)
+ (CHARDP R -0.113281)
+ (VARCHAR
+ (TOP O 5)
+ (MID C c)
+ (REP C d)
+ )
+ )
+(CHARACTER O 33
+ (CHARWD R 0.0)
+ (CHARDP R 0.2109375)
+ )
+(CHARACTER O 137
+ (CHARWD R 0.0)
+ (CHARDP R 0.1015625)
+ )
+(CHARACTER O 140
+ (CHARWD R 0.0)
+ (CHARDP R 0.089844)
+ )
+(CHARACTER C a
+ (CHARWD R 0.0)
+ (NEXTLARGER C d)
+ )
+(CHARACTER C b
+ (CHARWD R 0.0)
+ (CHARDP R 0.1640625)
+ )
+(CHARACTER C c
+ (CHARWD R 0.0)
+ (CHARDP R -0.011719)
+ (COMMENT
+ (/LIG/ C e C f)
+ (KRN O 0 R 0.0)
+ )
+ )
+(CHARACTER C d
+ (CHARWD R 0.0)
+ (CHARDP R 0.1328125)
+ (COMMENT
+ (/LIG/ C e C f)
+ (KRN O 0 R 0.0)
+ )
+ )
+(CHARACTER C e
+ (CHARWD R 0.0)
+ (CHARDP R 0.089844)
+ )
+(CHARACTER C f
+ (CHARWD R 0.0)
+ (CHARDP R 0.0234375)
+ )
+(CHARACTER C g
+ (CHARWD R 0.0)
+ (CHARDP R -0.011719)
+ (CHARIC R -7.8125)
+ (COMMENT
+ (LIG/ C g O 0)
+ )
+ )
+(CHARACTER C h
+ (CHARWD R 0.0)
+ (CHARDP R 0.1953125)
+ (CHARIC R -7.8125)
+ (COMMENT
+ (/LIG C i O 0)
+ )
+ )
+(CHARACTER C i
+ (CHARWD R 0.0)
+ (CHARDP R 0.2421875)
+ (CHARIC R -7.8125)
+ (COMMENT
+ (/LIG C i O 0)
+ )
+ )
+(CHARACTER C j
+ (CHARWD R 0.0)
+ (CHARDP R 0.1484375)
+ (CHARIC R -7.8125)
+ (COMMENT
+ (/LIG> C j O 0)
+ (LIG C a C b)
+ (KRN C d R -15.999999)
+ (/LIG/ C e C f)
+ (KRN O 0 R 0.0)
+ )
+ )
+(CHARACTER C k
+ (CHARWD R 0.0)
+ (CHARDP R 0.0546875)
+ (CHARIC R -7.8125)
+ (COMMENT
+ (LIG/> C k O 0)
+ (LIG C a C b)
+ (KRN C d R -15.999999)
+ (/LIG/ C e C f)
+ (KRN O 0 R 0.0)
+ )
+ )
+(CHARACTER C l
+ (CHARWD R 2.0)
+ (CHARDP R 0.1796875)
+ (CHARIC R -7.8125)
+ (COMMENT
+ (/LIG/> C l O 0)
+ (LIG C a C b)
+ (KRN C d R -15.999999)
+ (/LIG/ C e C f)
+ (KRN O 0 R 0.0)
+ )
+ )
+(CHARACTER C m
+ (CHARWD R 2.0)
+ (CHARHT R 15.999999)
+ (CHARDP R 0.234375)
+ (CHARIC R -7.8125)
+ (COMMENT
+ (LIG O 0 O 0)
+ )
+ )
+(CHARACTER O 354
+ (CHARWD R 0.0)
+ (CHARDP R -15.999999)
+ )
diff --git a/systems/unix/tex-gpc/traplog/trap.pl.diff b/systems/unix/tex-gpc/traplog/trap.pl.diff
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trap.pl.diff
diff --git a/systems/unix/tex-gpc/traplog/trap.typ b/systems/unix/tex-gpc/traplog/trap.typ
new file mode 100644
index 0000000000..0339dc806a
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trap.typ
@@ -0,0 +1,210 @@
+This is GFtype-GPC
+Options selected: Mnemonic output = true; pixel output = true.
+' METAFONT output 2008.09.07:1247'
+
+35: beginning of char 5: -4096<=m<=4094 -2<=n<=1
+(initially n=1) paint (4095)1
+64: skip0 0 (n=0) paint (4093)1
+69: skip0 0 (n=-1) paint (4096)1
+74: skip0 0 (n=-2) paint (4092)1(1)1
+81: eoc
+(The character is too large to be displayed in full.)
+.<--This pixel's lower left corner is at (-4096,2) in METAFONT coordinates
+
+
+
+
+.<--This pixel's upper left corner is at (-4096,-2) in METAFONT coordinates
+
+82: beginning of char 5 with extension -14: -4<=m<=1002 -6<=n<=11
+(previous character with the same code started at byte 35)
+(initially n=11) paint (1002)4
+111: skip0 0 (n=10) paint (1002)4
+116: skip0 0 (n=9) paint (1002)4
+121: skip1 3 (n=5) paint (1002)4
+127: skip0 0 (n=4) paint (1002)4
+132: skip0 0 (n=3) paint (1002)4
+137: newrow 7 (n=2) paint 1
+139: newrow 3 (n=1) paint 1(1)1(1)1
+145: newrow 1 (n=0) paint 1(1)2(1)1(1)1
+153: newrow 1 (n=-1) paint 2(1)1
+157: newrow 0 (n=-2) paint 1(1)1
+161: skip1 1 (n=-4) paint (7)1
+165: newrow 7 (n=-5) paint 1
+167: newrow 6 (n=-6) paint 1(1)1
+171: eoc
+(The character is too large to be displayed in full.)
+.<--This pixel's lower left corner is at (-4,12) in METAFONT coordinates
+
+
+
+
+
+
+
+
+
+ *
+ * * *
+ * ** * *
+ ** *
+* *
+
+ *
+ *
+ * *
+.<--This pixel's upper left corner is at (-4,-6) in METAFONT coordinates
+
+172: yyy -216270 (-3.30002)
+177: xxx 'title ab'
+187: xxx 'xoffset'
+196: yyy -65536 (-1)
+201: beginning of char 27 with extension -14: -4096<=m<=4094 -1<=n<=0
+(initially n=0) paint (4093)1(1)4095
+234: newrow 0 (n=-1) paint 4093(1)1
+240: eoc
+(The character is too large to be displayed in full.)
+.<--This pixel's lower left corner is at (-4096,1) in METAFONT coordinates
+
+********************************************************************************
+.<--This pixel's upper left corner is at (-4096,-1) in METAFONT coordinates
+
+241: xxx 'xoffset'
+250: yyy -87359488 (-1333)
+255: xxx 'yoffset'
+264: yyy -87359488 (-1333)
+269: beginning of char 109: -5428<=m<=2762 -1435<=n<=-1077
+(initially n=-1077) paint (0)8190
+298: skip2 256 (n=-1334) paint (0)8190
+305: skip1 98 (n=-1433) paint (4143)55
+311: skip0 0 (n=-1434) paint (4088)106
+317: skip0 0 (n=-1435) paint (4092)74
+323: eoc
+(The character is too large to be displayed in full.)
+.<--This pixel's lower left corner is at (-5428,-1076) in METAFONT coordinates
+********************************************************************************
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.<--This pixel's upper left corner is at (-5428,-1156) in METAFONT coordinates
+
+324: xxx 'bye'
+329: xxx 'xoffset'
+338: yyy -87359488 (-1333)
+343: xxx 'yoffset'
+352: yyy -87359488 (-1333)
+357: beginning of char 0: 0<=m<=0 0<=n<=0
+(initially n=0)
+363: eoc
+(The character is entirely blank.)
+
+364: xxx 'title careful METAFONT METAFONT METAFONT METAFONT METAFONT METAF
+ONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT ME
+TAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT METAFONT
+ METAFONT METAFONT METAFONT METAFONT'
+624: xxx 'title hello again?'
+624: ! non-ASCII character in xxx command!
+
+Postamble starts at byte 644, after special info at byte 364.
+design size = 134217728 (128pt)
+check sum = 765094058
+hppp = -65536 (-1)
+vppp = 65535 (0.99998)
+min m = -5428, max m = 4094
+min n = -1435, max n = 11
+Character 0: dx -950272 (-14.5), dy 393216 (6), width 2097152 (-256), loc 324
+Character 5: dx -950272 (-14.5), width 0 (0), loc 82
+Character 27: dx -950272 (-14.5), width 0 (0), loc 172
+Character 95: dx -950272 (-14.5), width 0 (0), loc -1
+Character 96: dx -950272 (-14.5), width 0 (0), loc -1
+Character 97: dx -950272 (-14.5), width 0 (0), loc -1
+Character 98: dx -950272 (-14.5), width 0 (0), loc -1
+Character 99: dx -950272 (-14.5), width 0 (0), loc -1
+Character 100: dx -950272 (-14.5), width 0 (0), loc -1
+Character 101: dx -950272 (-14.5), width 0 (0), loc -1
+Character 102: dx -950272 (-14.5), width 0 (0), loc -1
+Character 103: dx -950272 (-14.5), width 0 (0), loc -1
+Character 104: dx -950272 (-14.5), width 0 (0), loc -1
+Character 105: dx -950272 (-14.5), width 0 (0), loc -1
+Character 106: dx -950272 (-14.5), width 0 (0), loc -1
+Character 107: dx -950272 (-14.5), width 0 (0), loc -1
+Character 108: dx -950272 (-14.5), dy 393216 (6), width 2097152 (-256), loc -1
+Character 109: dx -950272 (-14.5), dy 393216 (6), width 2097152 (-256), loc 241
+Character 236: dx 0 (0), width 0 (0), loc -1
+The file had 5 characters altogether.
diff --git a/systems/unix/tex-gpc/traplog/trap.typ.diff b/systems/unix/tex-gpc/traplog/trap.typ.diff
new file mode 100644
index 0000000000..c10a014699
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trap.typ.diff
@@ -0,0 +1,8 @@
+1c1
+< This is GFtype-GPC
+---
+> This is GFtype, Version 3.1
+3c3
+< ' METAFONT output 2008.09.07:1247'
+---
+> ' METAFONT output 2008.03.15:0223'
diff --git a/systems/unix/tex-gpc/traplog/trapin.log b/systems/unix/tex-gpc/traplog/trapin.log
new file mode 100644
index 0000000000..4ff3a656aa
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trapin.log
@@ -0,0 +1,179 @@
+This is METAFONT-GPC (INIMF) 7 SEP 2008 12:45
+**\input trap
+(trap.mf
+>> << == >> ::: ||`` ''--!! ??## && @@ $$[[]]{{ }}((5.5 0.5))
+>> ".."
+! Not implemented: (unknown numeric)++(string).
+<to be read again>
+ ;
+l.4 ...}} . (( 5.5.5 )) ++ "..";
+
+I'm afraid I don't know how to apply that operation to that
+combination of types. Continue, and I'll return the second
+argument (see above) as the result of the operation.
+
+..
+! Missing `=' has been inserted.
+<to be read again>
+ ,
+l.5 begingroup save =; let=,
+ ; save,; newinternal $=,; let )...
+You should have said `let symbol = something'.
+But don't worry; I'll pretend that an equals sign
+was present. The next token I read will be `something'.
+
+> errorstopmode=errorstopmode
+> readstring=readstring
+> 2
+> "2"
+> ,=,
+> (=tag
+> )=,
+<< == >> ::: ||`` ''--!! ??## && @@ $$[[]]{{ }}(([][]))=numeric
+<< == >> ::: ||`` ''--!! ??## && @@ $$[[]]{{ }}((5.5 0.5))=<< == >> :::
+||`` ''--!! ??## && @@ $$[[]]{{ }}((5.5 0.5))
+> year=month
+! OK.
+l.6 ...ring,2,"2",,,(,),<<,year;
+
+
+! Missing `:' has been inserted.
+<to be read again>
+ ;
+l.8 ...not cycle "":1.1 forever;
+ fi;
+The next thing in this loop should have been a `:'.
+So I'll pretend that a colon was present;
+everything from here to `endfor' will be iterated.
+
+{fi}
+{exitif}
+{[repeat the loop]}
+{false}
+{fi}
+{exitif}
+{[repeat the loop]}
+{(2.1)>(2)}
+{true}
+{tracingcommands:=2.1}
+{showtoken}
+> |=:|>=|=:|>
+! OK.
+l.9 ... endfor; showtoken |=:|>;
+
+
+! Arithmetic overflow.
+l.10 tracingedges:=1/.00001
+ ; tracingequations:=$+1; p~=trac...
+Uh, oh. A little while ago one of the quantities that I was
+computing got too large, so I'm afraid your answers will be
+somewhat askew. You'll probably have to adopt different
+tactics next time. But I shall try to carry on anyway.
+
+{tracingedges:=32767.99998}
+{(0)+(1)}
+{tracingequations:=1}
+{(32767.99998)+(0.00002)}
+! Arithmetic overflow.
+l.10 ... p~=tracingedges+.00001;
+
+Uh, oh. A little while ago one of the quantities that I was
+computing got too large, so I'm afraid your answers will be
+somewhat askew. You'll probably have to adopt different
+tactics next time. But I shall try to carry on anyway.
+
+{(p~)=(32767.99998)}
+## p~=32767.99998
+{interim}
+{tracingmacros:=1}
+{tracingoutput:=1}
+{warningcheck:=1}
+{tracingstats:=1}
+{tracingchoices:=1}
+{tracingpens:=1}
+{tracingspecs:=1}
+{ASCII("")}
+{$:=-1}
+{$:=x}
+>> x
+! Internal quantity `$' must receive a known value.
+<to be read again>
+ ;
+l.12 ...os:=1; $:=ASCII""; $:=x;
+ p~:=p~;
+I can't set an internal quantity to anything but a known
+numeric value, so I'll have to ignore this assignment.
+
+{p~:=32767.99998}
+## p~=32767.99998
+! Value is too large (32767.99998).
+l.12 ...:=ASCII""; $:=x; p~:=p~;
+
+The equation I just processed has given some variable
+a value of 4096 or more. Continue and I'll try to cope
+with that big value; but it might be dangerous.
+(Set warningcheck:=0 to suppress this message.)
+
+{delimiters}
+{delimiters}
+{vardef}
+{def}
+
+foo(TEXT2)->begingroup(TEXT2)endgroup
+(SUFFIX0)<-
+(SUFFIX1)<-foo
+(TEXT2)<-interim.proofing:=(-0.5;shipout.nullpicture;special"3"
+{begingroup}
+{interim}
+{-(0.5)}
+! Missing `)' has been inserted.
+<to be read again>
+ ;
+<argument> ...m.proofing:=(-0.5;
+ shipout.nullpicture;special"3"
+foo->begingroup(TEXT2)
+ endgroup
+l.16 ...ture; special"3" endtext
+ ;
+I found no right delimiter to match a left one. So I've
+put one in, behind the scenes; this may fix the problem.
+
+{proofing:=-0.5}
+{shipout}
+{nullpicture}
+{special}
+{restoring proofing=0}
+{endgroup}
+{for}
+{showstats}
+Memory usage 291&41 (1922 still untouched)
+String usage 26&83 (893&11504 still untouched)
+! OK.
+l.17 ...ing:fi endfor showstats;
+ let!!=skipto;
+
+{let}
+{path}
+{-(15)}
+{-(12)}
+Path at line 18, before choices:
+(0,0)..controls (15,4) and (-15,-12)
+ ..(4,0)
+
+Path at line 18, after choices:
+(0,0)..controls (15,4) and (-15,-12)
+ ..(4,0)
+
+{(unknown path p~)=(path)}
+{everyjob}
+{vardef}
+{let}
+{vardef}
+{def}
+{elseif}
+ )
+Beginning to dump on file trap.base
+ (preloaded base=trap 2008.9.7)
+1115 strings of total length 20547
+395 memory locations dumped; current usage is 317&67
+265 symbolic tokens
diff --git a/systems/unix/tex-gpc/traplog/trapin.log.diff b/systems/unix/tex-gpc/traplog/trapin.log.diff
new file mode 100644
index 0000000000..30e6759c13
--- /dev/null
+++ b/systems/unix/tex-gpc/traplog/trapin.log.diff
@@ -0,0 +1,14 @@
+1c1
+< This is METAFONT-GPC (INIMF) 7 SEP 2008 12:45
+---
+> This is METAFONT, Version 2.718281 (INIMF) 15 MAR 2008 02:23
+150c150
+< String usage 26&83 (893&11504 still untouched)
+---
+> String usage 26&83 (891&11438 still untouched)
+176,177c176,177
+< (preloaded base=trap 2008.9.7)
+< 1115 strings of total length 20547
+---
+> (preloaded base=trap 2008.3.15)
+> 1117 strings of total length 20614
diff --git a/systems/unix/tex-gpc/triplog/8terminal.tex b/systems/unix/tex-gpc/triplog/8terminal.tex
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/8terminal.tex
diff --git a/systems/unix/tex-gpc/triplog/READMe b/systems/unix/tex-gpc/triplog/READMe
new file mode 100644
index 0000000000..219f142dbc
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/READMe
@@ -0,0 +1,15 @@
+The TRIP test nicely shows the sin of TeX-GPC: It does not trim trailing
+spaces of input lines.
+This is shown in trip.log.diff, the "**" line of TeX-GPC's log file
+contains a space, whereas the original log file doesn't. Furthermore
+the statistics the high water marks of the buffer stack differ by
+one (113b not 114b) which is the trailing space.
+
+TeX-GPC needs more strings and string characters than TeX because it
+does not conserve string space.
+
+These are all differences shown by the TRIP test, so TeX-GPC is
+still pretty close to TeX.
+
+September 2008
+Wolfgang Helbig
diff --git a/systems/unix/tex-gpc/triplog/trip.fot b/systems/unix/tex-gpc/triplog/trip.fot
new file mode 100644
index 0000000000..13a9d2ef3e
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/trip.fot
@@ -0,0 +1,83 @@
+This is TeX-GPC (INITEX)
+** &trip trip
+(trip.tex ##
+! Bad number (-7).
+<to be read again>
+ 8
+l.94 \openout-'78
+ terminal \openout10=tr\romannumeral1 \gobble...
+
+Completed box being shipped out [0.0.0.0.11]
+! Missing number, treated as zero.
+<to be read again>
+ {
+...
+l.106 \penalty-10000
+ % now we'll compute silently for awhile,...
+Memory usage before: 159&313; after: 102&278; still untouched: 1613
+
+! OK (see the transcript file).
+l.441 ...se unbal}\fi}\showlists
+ \tracingonline1%
+{|escapechar}
+{^^?global}
+{^^?global}
+{end}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+{end-group character }}
+{retaining escapechar=256}
+> 3.
+<output> {showthe deadcycles
+ global advance countz by1global ...
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+! You can't use `end' in internal vertical mode.
+<recently read> end
+
+<output> ...cal {}unvbox 255end
+ rb }
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+! Unbalanced output routine.
+<output> ... {}unvbox 255end rb
+ }
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+! Output loop---3 consecutive dead cycles.
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+
+Completed box being shipped out [-1.2.-1118806.0.11.196608.327680.157286
+4.1073741823]
+! Unbalanced write command.
+<write> if 01{else unbal}fi
+
+<inserted text>
+ }endwrite
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+Memory usage before: 334&431; after: 292&418; still untouched: 175
+ )
+(end occurred inside a group at level 1)
+(end occurred when if on line 442 was incomplete)
+(end occurred when ifcase on line 419 was incomplete)
+(end occurred when iftrue on line 413 was incomplete)
+(see the transcript file for additional information)
+Output written on trip.dvi (16 pages, 2920 bytes).
+Transcript written on trip.log.
diff --git a/systems/unix/tex-gpc/triplog/trip.fot.diff b/systems/unix/tex-gpc/triplog/trip.fot.diff
new file mode 100644
index 0000000000..80ac15dc70
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/trip.fot.diff
@@ -0,0 +1,4 @@
+1c1
+< This is TeX-GPC (INITEX)
+---
+> This is TeX, Version 3.1415926 (INITEX)
diff --git a/systems/unix/tex-gpc/triplog/trip.log b/systems/unix/tex-gpc/triplog/trip.log
new file mode 100644
index 0000000000..785d5b4300
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/trip.log
@@ -0,0 +1,7304 @@
+This is TeX-GPC (preloaded format=trip 2008.9.7) 7 SEP 2008 00:41
+** &trip trip
+(trip.tex ##
+{vertical mode: \tracingrestores}
+{\write}
+{blank space }
+{\openout}
+
+! Bad number (-7).
+<to be read again>
+ 8
+l.94 \openout-'78
+ terminal \openout10=tr\romannumeral1 \gobble...
+Since I expected to read a number between 0 and 15,
+I changed this one to zero.
+
+{\openout}
+{\romannumeral}
+{\write}
+{blank space }
+{\write}
+{blank space }
+{\write}
+{blank space }
+{\vsize}
+{\vbadness}
+{\topskip}
+{\penalty}
+{\maxdepth}
+{\tracingoutput}
+{\moveleft}
+%% goal height=2000.0, max depth=2.0
+% t=0.0 g=2000.0 b=10000 p=0 c=100000#
+{\moveright}
+{restricted horizontal mode: \vrule}
+{end-group character }}
+% t=20.0 plus 1.0fil g=2000.0 b=0 p=0 c=0#
+{vertical mode: blank space }
+{\penalty}
+% t=48.0 plus 41.0 plus 1.0fil g=2000.0 b=0 p=-10000 c=-10000#
+
+Completed box being shipped out [0.0.0.0.11]
+\vbox(2000.0+2.0)x21.0, glue set 1952.0fil
+.\write-{log file only\the \prevgraf }
+.\openout0=8terminal
+.\openout10=tripos
+.\write10{}
+.\write10{\uppercase {\number {\outputpenalty }}}
+.\write10{[\uppercase {\romannumeral -\the \outputpenalty }[}
+.\glue(\topskip) 9.6 plus 1.0fil
+.\vbox(10.4+0.0)x-2.0, shifted -20.0
+..\rule(0.4+0.0)x*
+..\glue 10.0 plus 5.0filll
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+20.0)x1.0, shifted 20.0
+..\rule(-19.0+20.0)x1.0
+
+log file only0
+{no mode: \number}
+
+! Missing number, treated as zero.
+<to be read again>
+ {
+...
+l.106 \penalty-10000
+ % now we'll compute silently for awhile,...
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+{\romannumeral}
+{\the}
+Memory usage before: 159&313; after: 102&278; still untouched: 1613
+{vertical mode: \batchmode}
+
+{\output}
+{blank space }
+{\setbox}
+{internal vertical mode: end-group character }}
+{vertical mode: blank space }
+{\dimen}
+{begin-group character {}
+{\output}
+{blank space }
+{\insert}
+{internal vertical mode: \def}
+{blank space }
+{\vskip}
+{\baselineskip}
+{\lineskip}
+{\vbox}
+{end-group character }}
+{\penalty}
+{\vbox}
+{end-group character }}
+{\penalty}
+{\vbox}
+{end-group character }}
+{\penalty}
+{end-group character }}
+{restoring \lineskip=0.0pt plus 40.0pt}
+{restoring \baselineskip=10.0pt plus 41.0pt}
+{restoring \box=\box}
+%% goal height=2000.0, max depth=2.0
+! Insertions can only be added to a vbox.
+l.125 }
+ % since \dimen100=803pt<3*267.7pt, the insertion ...
+Tut tut: You're trying to \insert into a
+\box register that now contains an \hbox.
+Proceed, and I'll discard its present contents.
+
+The following box has been deleted:
+\hbox(7.0+1.0)x2.0
+.\rip A
+
+! Infinite glue shrinkage inserted from \skip100.
+l.125 }
+ % since \dimen100=803pt<3*267.7pt, the insertion ...
+The correction glue for page breaking with insertions
+must have finite shrinkability. But you may proceed,
+since the offensive shrinkability has been made finite.
+
+% split100 to 803.0,267.7 p=-101
+{vertical mode: blank space }
+{\topskip}
+{\vbox}
+{internal vertical mode: end-group character }}
+% t=0.0 plus 3.0filll minus 9.0 g=1470.63013 b=0 p=0 c=-101#
+{vertical mode: blank space }
+{\insertpenalties}
+{\penalty}
+{\cleaders}
+{restricted horizontal mode: \lower}
+{internal vertical mode: end-group character }}
+{restricted horizontal mode: blank space }
+{\leaders}
+{\cleaders}
+{the letter A}
+{end-group character }}
+{\leaders}
+{the letter A}
+{end-group character }}
+{\xleaders}
+{the letter A}
+{end-group character }}
+{\write}
+{blank space }
+{end-group character }}
+{vertical mode: \mark}
+{blank space }
+{the letter A}
+% t=1050.0 plus 44.0 plus 3.0filll minus 19.0 g=1470.63013 b=0 p=0 c=-50
+{horizontal mode: the letter A}
+{\insert}
+{internal vertical mode: \baselineskip}
+{\splittopskip}
+{\hbox}
+{restricted horizontal mode: \vadjust}
+{internal vertical mode: \penalty}
+{end-group character }}
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: \hbox}
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: end-group character }}
+{restoring \splittopskip=1.0pt plus 43.0pt}
+{restoring \baselineskip=10.0pt plus 41.0pt}
+{horizontal mode: \showthe}
+> 1050.0pt.
+<everypar> ...howthe \pagetotal
+ \showthe \pagegoal \advance \...
+...
+l.140 A
+ AA\everypar=\errhelp % because of previous \everypar...
+
+{\showthe}
+> 1470.63013pt.
+<everypar> ...showthe \pagegoal
+ \advance \count 15by1\mark {\...
+...
+l.140 A
+ AA\everypar=\errhelp % because of previous \everypar...
+
+{\advance}
+{\mark}
+{\splitmaxdepth}
+{\par}
+@firstpass
+@secondpass
+[]\rip A[][]
+@\par via @@0 b=* p=-10000 d=*
+@@1: line 1.3- t=0 -> @@0
+
+
+Overfull \hbox (2.0pt too wide) in paragraph at lines 140--140
+[]\rip A|
+
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+
+{vertical mode: the letter A}
+% t=1060.0 plus 127.0 plus 8.0filll minus 27.0 g=1255.43756 b=0 p=0 c=-5
+0
+{horizontal mode: the letter A}
+{\insert}
+{internal vertical mode: \baselineskip}
+{\splittopskip}
+{\hbox}
+{restricted horizontal mode: \vadjust}
+{internal vertical mode: \penalty}
+{end-group character }}
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: \hbox}
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: end-group character }}
+{restoring \splittopskip=1.0pt plus 43.0pt}
+{restoring \baselineskip=10.0pt plus 41.0pt}
+{horizontal mode: \showthe}
+> 1061.0pt.
+<everypar> ...howthe \pagetotal
+ \showthe \pagegoal \advance \...
+...
+l.140 AA
+ A\everypar=\errhelp % because of previous \everypar...
+
+{\showthe}
+> 1255.43756pt.
+<everypar> ...showthe \pagegoal
+ \advance \count 15by1\mark {\...
+...
+l.140 AA
+ A\everypar=\errhelp % because of previous \everypar...
+
+{\advance}
+{\mark}
+{\splitmaxdepth}
+{\par}
+@firstpass
+@secondpass
+[]\rip A[][]
+@\par via @@0 b=* p=-10000 d=*
+@@1: line 1.3- t=0 -> @@0
+
+
+Overfull \hbox (2.0pt too wide) in paragraph at lines 140--140
+[]\rip A|
+
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+
+{vertical mode: the letter A}
+% t=1070.0 plus 210.0 plus 8.0filll minus 35.0 g=1055.44061 b=7 p=0 c=-4
+3
+{horizontal mode: the letter A}
+{\insert}
+{internal vertical mode: \baselineskip}
+{\splittopskip}
+{\hbox}
+{restricted horizontal mode: \vadjust}
+{internal vertical mode: \penalty}
+{end-group character }}
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: \hbox}
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: end-group character }}
+{restoring \splittopskip=1.0pt plus 43.0pt}
+{restoring \baselineskip=10.0pt plus 41.0pt}
+{horizontal mode: \showthe}
+> 1071.0pt.
+<everypar> ...howthe \pagetotal
+ \showthe \pagegoal \advance \...
+...
+l.140 AAA
+ \everypar=\errhelp % because of previous \everypar...
+
+{\showthe}
+> 1055.44061pt.
+<everypar> ...showthe \pagegoal
+ \advance \count 15by1\mark {\...
+...
+l.140 AAA
+ \everypar=\errhelp % because of previous \everypar...
+
+{\advance}
+{\mark}
+{\splitmaxdepth}
+{\par}
+@firstpass
+@secondpass
+[]\rip A[][]
+@\par via @@0 b=* p=-10000 d=*
+@@1: line 1.3- t=0 -> @@0
+
+
+Overfull \hbox (2.0pt too wide) in paragraph at lines 140--140
+[]\rip A|
+
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+
+% split200 to -51.11694,0.0 p=999
+{vertical mode: \everypar}
+{\kern}
+{the letter A}
+% t=1080.0 plus 293.0 plus 8.0filll minus 43.0 g=1055.44061 b=18 p=0 c=9
+67
+{horizontal mode: the letter A}
+{\hfill}
+{\vadjust}
+{internal vertical mode: \newlinechar}
+{\special}
+{\penalty}
+{end-group character }}
+{restoring \newlinechar=0}
+{horizontal mode: \penalty}
+{the letter A}
+{\par}
+@firstpass
+@secondpass
+[]\rip A
+@ via @@0 b=* p=0 d=*
+@@1: line 1.3 t=0 -> @@0
+[]
+@\penalty via @@1 b=0 p=-10000 d=*
+@@2: line 2.2 t=0 -> @@1
+A
+@\par via @@2 b=* p=-10000 d=*
+@@3: line 3.3- t=0 -> @@2
+
+
+Overfull \hbox (2.0pt too wide) in paragraph at lines 145--148
+[]\rip A|
+
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+
+
+Overfull \hbox (2.0pt too wide) in paragraph at lines 145--148
+\rip A|
+
+\hbox(7.0+1.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+
+% t=1040.0 plus 376.0 plus 8.0filll minus 51.0 g=1055.44061 b=0 p=0 c=94
+9
+% t=1050.0 plus 417.0 plus 8.0filll minus 51.0 g=1055.44061 b=0 p=-5000
+c=-4051#
+{vertical mode: \insert}
+{internal vertical mode: \vskip}
+{\floatingpenalty}
+{end-group character }}
+{restoring \floatingpenalty=100}
+{vertical mode: \pagefilstretch}
+{\showthe}
+> 952.
+l.149 ...showthe\insertpenalties
+ \penalty99999999\showlists
+
+{\penalty}
+{\showlists}
+
+### vertical mode entered at line 0
+### current page:
+\insert100, natural size 803.09999; split(1.0 plus 43.0,-2.0); float cos
+t 100
+.\glue 0.0 plus 1.0fil
+.\vbox(267.7+0.0)x0.0
+.\penalty -101
+.\glue(\lineskip) 0.0 minus 0.4
+.\vbox(267.7+0.0)x0.0
+.\penalty -100
+.\glue(\lineskip) 0.0 minus 0.4
+.\vbox(267.7+0.0)x0.0
+.\penalty -1000
+\glue(\topskip) 0.0 plus 44.0
+\vbox(1000.0+0.0)x0.0
+\penalty 12345
+\cleaders 50.0 minus 10.0
+.\hbox(15.0+2.0)x45.0
+..\vbox(17.0+0.0)x0.0, shifted 2.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\leaders 10.0
+...\rule(0.4+0.0)x*
+..\cleaders 9.0
+...\hbox(7.0+1.0)x2.0
+....\rip A
+..\leaders 9.0
+...\hbox(7.0+1.0)x2.0
+....\rip A
+..\xleaders 9.0
+...\hbox(7.0+1.0)x2.0
+....\rip A
+..\write*{\help }
+..\glue 4.0 plus 2.0 minus 1.0
+\mark{alpha}
+\glue(\parskip) 0.0 plus 42.0 minus 8.0
+\glue(\baselineskip) 3.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\insert200, natural size 400.0; split(0.0,-2.0); float cost 100
+.\hbox(0.0+0.0)x0.0
+.\penalty 999
+.\glue(\baselineskip) 400.0
+.\hbox(0.0+0.0)x-10.0
+\mark{1}
+\glue(\parskip) 0.0 plus 42.0 minus 8.0
+\glue(\baselineskip) 2.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\insert200, natural size 400.0; split(1.0,-1.0); float cost 100
+.\hbox(0.0+0.0)x0.0
+.\penalty 999
+.\glue(\baselineskip) 400.0
+.\hbox(0.0+0.0)x-10.0
+\mark{2}
+\glue(\parskip) 0.0 plus 42.0 minus 8.0
+\glue(\baselineskip) 2.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\insert200, natural size 400.0; split(2.0,-1.0); float cost 100
+.\hbox(0.0+0.0)x0.0
+.\penalty 999
+.\glue(\baselineskip) 400.0
+.\hbox(0.0+0.0)x-10.0
+\mark{3}
+\kern -50.0
+\glue(\parskip) 0.0 plus 42.0 minus 8.0
+\glue(\baselineskip) 2.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\glue(\baselineskip) 9.0 plus 41.0
+\hbox(0.0+0.0)x0.0
+.\penalty -1000000000
+.\glue(\rightskip) 0.0
+\special{^^80-1000.0pt}
+\penalty -5000
+\glue(\baselineskip) 3.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\insert200, natural size 10000.0; split(1.0 plus 43.0,-1.0); float cost
+3
+.\glue 10000.0
+\penalty 99999999
+total height 1060.0 plus 458.0 plus -1.0fil plus 8.0filll minus 51.0
+ goal height 1055.44061
+\insert100 adds 535.36987, #1 might split
+\insert200 adds 405.19714, #3 might split
+prevdepth 1.0, prevgraf 3 lines
+
+! OK.
+<recently read> \showlists
+
+l.149 ...nalty99999999\showlists
+
+
+{\showthe}
+> 8.0pt.
+l.150 ...howthe\pagefilllstretch
+ \vskip 1000pt\penalty-333\hbo...
+
+{\vskip}
+{\penalty}
+% t=2061.0 plus 458.0 plus -1.0fil plus 8.0filll minus 51.0 g=1055.44061
+ b=* p=-333 c=*
+! \box255 is not void.
+<to be read again>
+ \hbox
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+You shouldn't use \box255 except in \output routines.
+Proceed, and I'll discard its present contents.
+
+The following box has been deleted:
+\vbox(0.0+0.0)x0.0
+
+{internal vertical mode: \dimen}
+{\count}
+{\global}
+{\ifnum}
+{true}
+{\global}
+{\unvbox}
+{\penalty}
+{\else}
+{\message}
+{\topmark}
+{\firstmark}
+{\botmark}
+{\splitfirstmark}
+{\splitbotmark}
+:alpha:3::
+{end-group character }}
+{restoring \count5=0}
+{restoring \dimen9=0.0pt}
+%% goal height=2000.0, max depth=2.0
+! Infinite glue shrinkage inserted from \skip100.
+<to be read again>
+ \hbox
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+The correction glue for page breaking with insertions
+must have finite shrinkability. But you may proceed,
+since the offensive shrinkability has been made finite.
+
+% split100 to 803.0,267.7 p=-101
+% t=0.0 plus 3.0filll minus 9.0 g=1470.63013 b=0 p=0 c=-101#
+% t=1050.0 plus 44.0 plus 3.0filll minus 19.0 g=1470.63013 b=0 p=0 c=-10
+1#
+% t=1060.0 plus 127.0 plus 8.0filll minus 27.0 g=1255.43756 b=0 p=0 c=-1
+01#
+% t=1070.0 plus 210.0 plus 8.0filll minus 35.0 g=1055.44061 b=7 p=0 c=-9
+4
+% split200 to -51.11694,0.0 p=999
+% t=1080.0 plus 293.0 plus 8.0filll minus 43.0 g=1055.44061 b=18 p=0 c=9
+16
+% t=1040.0 plus 376.0 plus 8.0filll minus 51.0 g=1055.44061 b=0 p=0 c=89
+8
+% t=1050.0 plus 417.0 plus 8.0filll minus 51.0 g=1055.44061 b=0 p=-5000
+c=-4102#
+% t=2061.0 plus 458.0 plus 8.0filll minus 51.0 g=1055.44061 b=* p=-333 c
+=*
+{\dimen}
+{\count}
+{\global}
+{\ifnum}
+{false}
+{\setbox}
+{\shipout}
+{restricted horizontal mode: \box}
+{\box}
+{\vsplit}
+
+Overfull \vbox (986.0pt too high) has occurred while \output is active
+\vbox(55.0+-1.0)x45.0, glue set - 1.0
+.\glue(\topskip) 0.0 plus 44.0
+.\vbox(1000.0+0.0)x0.0
+.\penalty 12345
+.\cleaders 50.0 minus 10.0
+..\hbox(15.0+2.0)x45.0
+...\vbox(17.0+0.0)x0.0, shifted 2.0
+...\glue 4.0 plus 2.0 minus 1.0
+...\leaders 10.0
+....\rule(0.4+0.0)x*
+...\cleaders 9.0
+....\hbox(7.0+1.0)x2.0
+.....\rip A
+...\leaders 9.0
+....\hbox(7.0+1.0)x2.0
+.....\rip A
+...\xleaders 9.0
+....\hbox(7.0+1.0)x2.0
+.....\rip A
+...\write*{\help }
+...\glue 4.0 plus 2.0 minus 1.0
+.\mark{alpha}
+
+{end-group character }}
+
+Completed box being shipped out [-5000.0.0.0.11.53110374]
+\hbox(810.4+0.0)x45.0
+.\vbox(267.7+0.0)x0.0
+..\glue 0.0 plus 1.0fil
+..\vbox(267.7+0.0)x0.0
+.\vbox(810.4+0.0)x0.0
+..\rule(0.4+0.0)x*
+..\glue 10.0 plus 5.0filll
+..\hbox(0.0+0.0)x0.0
+..\penalty 999
+..\glue(\baselineskip) 400.0
+..\hbox(0.0+0.0)x-10.0
+..\hbox(0.0+0.0)x0.0
+..\penalty 999
+..\glue(\baselineskip) 400.0
+..\hbox(0.0+0.0)x-10.0
+..\hbox(0.0+0.0)x0.0
+.\vbox(55.0+-1.0)x45.0, glue set - 1.0
+..\glue(\topskip) 0.0 plus 44.0
+..\vbox(1000.0+0.0)x0.0
+..\penalty 12345
+..\cleaders 50.0 minus 10.0
+...\hbox(15.0+2.0)x45.0
+....\vbox(17.0+0.0)x0.0, shifted 2.0
+....\glue 4.0 plus 2.0 minus 1.0
+....\leaders 10.0
+.....\rule(0.4+0.0)x*
+....\cleaders 9.0
+.....\hbox(7.0+1.0)x2.0
+......\rip A
+....\leaders 9.0
+.....\hbox(7.0+1.0)x2.0
+......\rip A
+....\xleaders 9.0
+.....\hbox(7.0+1.0)x2.0
+......\rip A
+....\write*{\help }
+....\glue 4.0 plus 2.0 minus 1.0
+..\mark{alpha}
+
+Memory usage before: 747&484; after: 581&481; still untouched: 1492
+{internal vertical mode: blank space }
+{\unvcopy}
+{\showlists}
+
+### internal vertical mode entered at line 150 (\output routine)
+\glue(\splittopskip) 0.0 plus 43.0
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\mark{1}
+\glue(\parskip) 0.0 plus 42.0 minus 8.0
+\glue(\baselineskip) 2.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\mark{2}
+\glue(\parskip) 0.0 plus 42.0 minus 8.0
+\glue(\baselineskip) 2.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\mark{3}
+\kern -50.0
+\glue(\parskip) 0.0 plus 42.0 minus 8.0
+\glue(\baselineskip) 2.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\hbox(0.0+0.0)x0.0
+.\rip A
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\glue(\baselineskip) 9.0 plus 41.0
+\hbox(0.0+0.0)x0.0
+.\penalty -1000000000
+.\glue(\rightskip) 0.0
+\special{^^80-1000.0pt}
+prevdepth ignored
+### vertical mode entered at line 0
+### current page: (held over for next output)
+\insert100, natural size 535.4; split(1.0 plus 43.0,-2.0); float cost 10
+0
+.\glue(\splittopskip) 0.0 plus 43.0
+.\vbox(267.7+0.0)x0.0
+.\penalty -100
+.\glue(\lineskip) 0.0 minus 0.4
+.\vbox(267.7+0.0)x0.0
+.\penalty -1000
+\insert200, natural size 2.0; split(2.0,-1.0); float cost 100
+.\glue(\splittopskip) 2.0
+.\hbox(0.0+0.0)x-10.0
+### recent contributions:
+\penalty 10000
+\penalty 10000
+\glue(\baselineskip) 3.0 plus 41.0
+\hbox(7.0+1.0)x0.0
+.\rip A
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0
+.\rule(*+*)x5.0
+\insert200, natural size 10000.0; split(1.0 plus 43.0,-1.0); float cost
+3
+.\glue 10000.0
+\penalty 99999999
+\glue 1000.0
+\penalty -333
+prevdepth 1.0, prevgraf 3 lines
+
+! OK.
+<recently read> \showlists
+
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\showthe}
+> 2.
+<output> ...he \insertpenalties
+ \showthe \pageshrink \globald...
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\showthe}
+> 51.0pt.
+<output> ...showthe \pageshrink
+ \globaldefs 1\halign {##\tabs...
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\globaldefs}
+{\halign}
+{blank space }
+{\showboxdepth}
+{\showboxbreadth}
+{\fi}
+{\message}
+{\topmark}
+{\firstmark}
+{\botmark}
+{\splitfirstmark}
+{\splitbotmark}
+3:alpha:3:alpha:alpha
+{end-group character }}
+{restoring \globaldefs=0}
+{restoring \box255=
+\vbox(1055.44061+0.0)x45.0, glue set 0.01305 []}
+{restoring \count5=0}
+{restoring \dimen9=0.0pt}
+! Output routine didn't use all of \box255.
+<to be read again>
+ \hbox
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+Your \output commands should empty \box255,
+e.g., by saying `\shipout\box255'.
+Proceed; I'll discard its present contents.
+
+The following box has been deleted:
+\vbox(1055.44061+0.0)x45.0, glue set 0.01305
+.\glue(\topskip) 0.0 plus 44.0
+.\vbox(1000.0+0.0)x0.0
+.etc.
+
+%% goal height=2000.0, max depth=2.0
+! Infinite glue shrinkage inserted from \skip100.
+<to be read again>
+ \hbox
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+The correction glue for page breaking with insertions
+must have finite shrinkability. But you may proceed,
+since the offensive shrinkability has been made finite.
+
+% t=0.0 plus 8.0filll minus 9.0 g=924.23029 b=0 p=0 c=0#
+% t=7.0 plus 44.0 plus 8.0filll minus 9.0 g=924.23029 b=0 p=0 c=0#
+% t=17.0 plus 127.0 plus 8.0filll minus 17.0 g=924.23029 b=0 p=0 c=0#
+% t=27.0 plus 210.0 plus 8.0filll minus 25.0 g=924.23029 b=0 p=0 c=0#
+% t=-13.0 plus 293.0 plus 8.0filll minus 33.0 g=924.23029 b=0 p=0 c=0#
+% split200 to 1832.4585,10000.0 p=-10000
+% t=1008.0 plus 375.0 plus 8.0filll minus 33.0 g=-4075.76971 b=* p=-333
+c=*
+{\dimen}
+{\count}
+{\global}
+{\ifnum}
+{false}
+{\setbox}
+{\shipout}
+{restricted horizontal mode: \box}
+{\box}
+{\vsplit}
+{end-group character }}
+
+Completed box being shipped out [10000.0.0.0.11.131072]
+\hbox(535.4+0.0)x0.0
+.\vbox(535.4+0.0)x0.0 []
+.\vbox(2.0+0.0)x0.0 []
+.etc.
+
+Memory usage before: 475&470; after: 290&466; still untouched: 1473
+{internal vertical mode: blank space }
+{\unvcopy}
+{\showlists}
+
+### internal vertical mode entered at line 150 (\output routine)
+prevdepth ignored
+### vertical mode entered at line 0
+### recent contributions:
+\glue(\baselineskip) 9.0 plus 41.0
+\hbox(0.0+0.0)x0.0
+.\penalty -1000000000
+.\glue(\rightskip) 0.0
+etc.
+prevdepth 1.0, prevgraf 3 lines
+
+! OK.
+<recently read> \showlists
+
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\showthe}
+> 0.
+<output> ...he \insertpenalties
+ \showthe \pageshrink \globald...
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\showthe}
+> 33.0pt.
+<output> ...showthe \pageshrink
+ \globaldefs 1\halign {##\tabs...
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\globaldefs}
+{\halign}
+{blank space }
+{\showboxdepth}
+{\showboxbreadth}
+{\fi}
+{\message}
+{\topmark}
+{\firstmark}
+{\botmark}
+{\splitfirstmark}
+{\splitbotmark}
+3:1:3:1:3
+{end-group character }}
+{restoring \globaldefs=0}
+{restoring \box255=
+\vbox(924.23029+1.0)x0.0, glue set 3.19875 []}
+{restoring \count5=0}
+{restoring \dimen9=0.0pt}
+! Output routine didn't use all of \box255.
+<to be read again>
+ \hbox
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+Your \output commands should empty \box255,
+e.g., by saying `\shipout\box255'.
+Proceed; I'll discard its present contents.
+
+The following box has been deleted:
+\vbox(924.23029+1.0)x0.0, glue set 3.19875
+.\glue(\topskip) 0.0 plus 44.0
+.\hbox(7.0+1.0)x0.0 []
+.etc.
+
+%% goal height=2000.0, max depth=2.0
+% split200 to 3955.99365,10000.0 p=-10000
+% t=1012.0 plus 85.0 plus 5.0filll g=-3010.0 b=* p=-333 c=*#
+{\dimen}
+{\count}
+{\global}
+{\ifnum}
+{false}
+{\setbox}
+{\shipout}
+{restricted horizontal mode: \box}
+{\box}
+{\vsplit}
+
+Overfull \vbox (958.0pt too high) has occurred while \output is active
+\vbox(55.0+-1.0)x0.0
+.\glue(\topskip) 1.0 plus 44.0
+.\hbox(0.0+0.0)x0.0 []
+.etc.
+
+{end-group character }}
+
+Completed box being shipped out [-333.0.0.0.11.655360000]
+\hbox(10000.0+0.0)x0.0
+.\vbox(10000.0+0.0)x0.0 []
+.\vbox(55.0+-1.0)x0.0 []
+
+Memory usage before: 218&459; after: 149&458; still untouched: 1473
+{internal vertical mode: blank space }
+{\unvcopy}
+{\showlists}
+
+### internal vertical mode entered at line 150 (\output routine)
+prevdepth ignored
+### vertical mode entered at line 0
+### recent contributions:
+\penalty 10000
+prevdepth 1.0, prevgraf 3 lines
+
+! OK.
+<recently read> \showlists
+
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\showthe}
+> 0.
+<output> ...he \insertpenalties
+ \showthe \pageshrink \globald...
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\showthe}
+> 0.0pt.
+<output> ...showthe \pageshrink
+ \globaldefs 1\halign {##\tabs...
+...
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+
+{\globaldefs}
+{\halign}
+{blank space }
+{\showboxdepth}
+{\showboxbreadth}
+{\fi}
+{\message}
+{\topmark}
+{\firstmark}
+{\botmark}
+{\splitfirstmark}
+{\splitbotmark}
+3:3:3::
+{end-group character }}
+{restoring \globaldefs=0}
+{restoring \box255=
+\vbox(-3010.0+0.0)x0.0 []}
+{restoring \count5=0}
+{restoring \dimen9=0.0pt}
+! Output routine didn't use all of \box255.
+<to be read again>
+ \hbox
+l.150 ...1000pt\penalty-333\hbox
+ to 23pt{} % output now
+Your \output commands should empty \box255,
+e.g., by saying `\shipout\box255'.
+Proceed; I'll discard its present contents.
+
+The following box has been deleted:
+\vbox(-3010.0+0.0)x0.0
+.\glue(\topskip) 1.0 plus 44.0
+.\hbox(0.0+0.0)x0.0 []
+.etc.
+
+{vertical mode: \hbox}
+{restricted horizontal mode: end-group character }}
+%% goal height=2000.0, max depth=2.0
+{vertical mode: blank space }
+{\vsize}
+{\global}
+! Dimension too large.
+l.151 ...83.99999237060546875pt
+ % page size \approx infinity
+I can't work with sizes bigger than about 19 feet.
+Continue and I'll use the largest value I can.
+
+{end-group character }}
+{retaining \vsize=16383.99998pt}
+{restoring \everypar=A\insert 200{\baselineskip 400pt\ETC.}
+{restoring \splitmaxdepth=-2.0pt}
+{restoring \count15=0}
+{restoring \topskip=20.0pt plus 1.0fil}
+{restoring \output={\tracingcommands 0\showthe \outputpenalty \ETC.}
+{blank space }
+{begin-group character {}
+{\tracingoutput}
+{\tracingstats}
+{\shipout}
+{restricted horizontal mode: \closeout}
+{\closeout}
+{end-group character }}
+[-333.0.0.0.11]
+{vertical mode: end-group character }}
+{restoring \tracingstats=4}
+{restoring \tracingoutput=1}
+{blank space }
+{\showthe}
+> A\insert 200{\baselineskip 400pt\splittopskip \count 15pt\hbox {\vadju
+st {\penalty 999}}\hbox to -10pt{}}\showthe \pagetotal \showthe \pagegoa
+l \advance \count 15by1\mark {\the \count 15}\splitmaxdepth -1pt \paR \g
+obble .
+l.154 \showthe\everypar
+
+
+{\everypar}
+{\showthe}
+> .
+l.155 ...ypar{}\showthe\everypar
+
+
+{\def}
+{blank space }
+{\tracingmacros}
+{\def}
+{blank space }
+{\let}
+{\dimendef}
+{\dimen222}
+{\ifdim}
+{true}
+{\fi}
+{\ifdim}
+
+\t 12#101001{->-.#1pt{
+#1<-01001010
+{true}
+{begin-group character {}
+{\relax}
+{end-group character }}
+{\else}
+{\count0}
+{\ifodd}
+{true}
+{\advance}
+{\fi}
+{\penalty}
+% t=1.0 plus 44.0 g=2000.0 b=10000 p=-12345 c=-12345#
+{internal vertical mode: \tracingcommands}
+> -12345.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+l.164 \penalty -12345
+ % output the remaining stuff
+
+
+Completed box being shipped out [-2.0.0.0.11]
+\vbox(2000.0+0.0)x23.0, glue set 45.43182
+.\glue(\topskip) 1.0 plus 44.0
+.\hbox(0.0+0.0)x23.0
+
+Memory usage before: 118&328; after: 102&328; still untouched: 1473
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{vertical mode: \tracingmacros}
+{\adjdemerits}
+{\linepenalty}
+{\def}
+{blank space }
+{\valign}
+{horizontal mode: \valign}
+{restricted horizontal mode: \spacefactor}
+{\global}
+{end-group character }}
+{blank space }
+{\vrule}
+{begin-group character {}
+{blank space }
+{end-group character }}
+{end-group character }}
+{internal vertical mode: \baselineskip}
+{\global}
+{\global}
+{\rightskip}
+{\global}
+{\setbox}
+
+\1#1->\hbox to#1pt{}
+#1<-2
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: blank space }
+{\noindent}
+{horizontal mode: \copy}
+{\hskip}
+{\copy}
+{\hskip}
+{\lower}
+
+\1#1->\hbox to#1pt{}
+#1<-1
+{restricted horizontal mode: end-group character }}
+{horizontal mode: \hskip}
+{\copy}
+{\hskip}
+{\box}
+{end of alignment template}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+[]
+@ via @@0 b=51 p=0 d=2704
+@ via @@1 b=10000 p=0 d=100000000
+@@2: line 1.1 t=2704 -> @@0
+[]
+@ via @@0 b=30 p=0 d=961
+@ via @@1 b=10000 p=0 d=100000000
+@ via @@2 b=10000 p=0 d=100000000
+@@3: line 1.3 t=961 -> @@0
+[]
+@ via @@2 b=10000 p=0 d=100000000
+@ via @@3 b=10000 p=0 d=100000782
+@@4: line 2.0 t=100001743 -> @@3
+[]
+@\par via @@2 b=0 p=-10000 d=1
+@\par via @@3 b=30 p=-10000 d=1743
+@\par via @@4 b=10000 p=-10000 d=100000000
+@@5: line 2.1- t=2704 -> @@3
+@@6: line 2.2- t=2705 -> @@2
+
+
+Tight \hbox (badness 30) in paragraph at lines 183--183
+ [] [] []
+
+\hbox(0.0+2.0)x13.0, glue set - 0.66667
+.\glue(\leftskip) 4.0
+.\hbox(0.0+0.0)x2.0
+.etc.
+
+
+Loose \hbox (badness 30) in paragraph at lines 183--183
+ [] []
+
+\hbox(0.0+0.0)x13.0, glue set 0.66667
+.\glue(\leftskip) 4.0
+.\hbox(0.0+0.0)x2.0
+.etc.
+
+{restoring \box2=void}
+{restoring \rightskip=0.0pt}
+{restoring \baselineskip=10.0pt plus 41.0pt}
+{internal vertical mode: \baselineskip}
+{\global}
+{\global}
+{\rightskip}
+{\global}
+{\setbox}
+
+\1#1->\hbox to#1pt{}
+#1<-2
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: blank space }
+{\noindent}
+{horizontal mode: \copy}
+{\hskip}
+{\copy}
+{\hskip}
+{\lower}
+
+\1#1->\hbox to#1pt{}
+#1<-1
+{restricted horizontal mode: end-group character }}
+{horizontal mode: \hskip}
+{\copy}
+{\hskip}
+{\box}
+{\adjdemerits}
+{end of alignment template}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000784
+@@1: line 1.0 t=100000784 -> @@0
+[]
+@ via @@0 b=51 p=0 d=2704
+@ via @@1 b=10000 p=0 d=100000000
+@@2: line 1.1 t=2704 -> @@0
+[]
+@ via @@0 b=30 p=0 d=961
+@ via @@1 b=10000 p=0 d=100000000
+@ via @@2 b=10000 p=0 d=100000000
+@@3: line 1.3 t=961 -> @@0
+[]
+@ via @@2 b=10000 p=0 d=100000000
+@ via @@3 b=10000 p=0 d=100000784
+@@4: line 2.0 t=100001745 -> @@3
+[]
+@\par via @@2 b=0 p=-10000 d=1
+@\par via @@3 b=30 p=-10000 d=1745
+@\par via @@4 b=10000 p=-10000 d=100000000
+@@5: line 2.1- t=2706 -> @@3
+@@6: line 2.2- t=2705 -> @@2
+
+
+Loose \hbox (badness 51) in paragraph at lines 184--184
+ [] []
+
+\hbox(0.0+0.0)x13.0, glue set 0.8
+.\glue(\leftskip) 4.0
+.\hbox(0.0+0.0)x2.0
+.etc.
+
+{restoring \adjdemerits=782}
+{restoring \box2=void}
+{restoring \rightskip=0.0pt}
+{restoring \baselineskip=10.0pt plus 41.0pt}
+{internal vertical mode: \baselineskip}
+{\global}
+{\global}
+{\rightskip}
+{\global}
+{\setbox}
+
+\1#1->\hbox to#1pt{}
+#1<-2
+{restricted horizontal mode: end-group character }}
+{internal vertical mode: blank space }
+{\noindent}
+{horizontal mode: \copy}
+{\hskip}
+{\copy}
+{\hskip}
+{\lower}
+
+\1#1->\hbox to#1pt{}
+#1<-1
+{restricted horizontal mode: end-group character }}
+{horizontal mode: \hskip}
+{\copy}
+{\hskip}
+{\box}
+{\linepenalty}
+{\hbadness}
+{end of alignment template}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+[]
+@ via @@0 b=51 p=0 d=2809
+@ via @@1 b=10000 p=0 d=100000000
+@@2: line 1.1 t=2809 -> @@0
+[]
+@ via @@0 b=30 p=0 d=1024
+@ via @@1 b=10000 p=0 d=100000000
+@ via @@2 b=10000 p=0 d=100000000
+@@3: line 1.3 t=1024 -> @@0
+[]
+@ via @@2 b=10000 p=0 d=100000000
+@ via @@3 b=10000 p=0 d=100000782
+@@4: line 2.0 t=100001806 -> @@3
+[]
+@\par via @@2 b=0 p=-10000 d=4
+@\par via @@3 b=30 p=-10000 d=1806
+@\par via @@4 b=10000 p=-10000 d=100000000
+@@5: line 2.1- t=2830 -> @@3
+@@6: line 2.2- t=2813 -> @@2
+
+{restoring \hbadness=0}
+{restoring \linepenalty=1}
+{restoring \box2=void}
+{restoring \rightskip=0.0pt}
+{restoring \baselineskip=10.0pt plus 41.0pt}
+{restricted horizontal mode: blank space }
+{\spacefactor}
+{end-group character }}
+{horizontal mode: \message}
+1
+{blank space }
+{begin-group character {}
+{\hsize}
+{\par}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+|
+@ via @@0 b=10000 p=0 d=100000782
+@ via @@1 b=10000 p=0 d=100000000
+@@2: line 1.0 t=100000782 -> @@0
+[][][]
+@ via @@0 b=10000 p=0 d=100000782
+@ via @@1 b=10000 p=0 d=100000000
+@ via @@2 b=10000 p=0 d=100000000
+@@3: line 1.0 t=100000782 -> @@0
+@\par via @@0 b=10000 p=-10000 d=100000782
+@\par via @@1 b=10000 p=-10000 d=100000000
+@\par via @@2 b=10000 p=-10000 d=100000000
+@\par via @@3 b=10000 p=-10000 d=100000000
+@@4: line 1.0- t=100000782 -> @@0
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 171--187
+ [] | [][][]
+
+\hbox(22.0+0.0)x1000.0, glue set 237.5
+.\glue(\leftskip) 4.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+%% goal height=16383.99998, max depth=2.0
+{vertical mode: \parindent}
+{\indent}
+% t=22.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{horizontal mode: end-group character }}
+{restoring \parindent=0.0pt}
+{restoring \hsize=13.0pt}
+{\leftskip}
+{\def}
+{\noindent}
+{\indent}
+{\hbox}
+{restricted horizontal mode: \hskip}
+{end-group character }}
+
+Underfull \hbox (badness 10000) detected at line 188
+
+
+\hbox(0.0+0.0)x2.0, glue set -1.99255
+.\glue 0.0 plus -1.00374
+
+{horizontal mode: \discretionary}
+
+\?->\vrule width-2pt \hbox spread2pt{}
+{restricted horizontal mode: \vrule}
+{\hbox}
+{end-group character }}
+{the letter A}
+{end-group character }}
+
+\?->\vrule width-2pt \hbox spread2pt{}
+{\vrule}
+{\hbox}
+{end-group character }}
+{the letter B}
+{end-group character }}
+
+\?->\vrule width-2pt \hbox spread2pt{}
+{\vrule}
+{\hbox}
+{end-group character }}
+{the character /}
+{\kern}
+{end-group character }}
+{horizontal mode: \unkern}
+{\showthe}
+> 2.0pt.
+l.190 \showthe\lastkern
+ \vbox{\hrule width 6pt} \par % should ...
+
+{\vbox}
+{internal vertical mode: \hrule}
+{end-group character }}
+{horizontal mode: blank space }
+{\par}
+@firstpass
+[][][]|[]\rip AAAB|[]B-
+@\discretionary via @@0 b=0 p=88 d=7745
+@@1: line 1.2- t=7745 -> @@0
+[]
+@\par via @@1 b=0 p=-10000 d=100001
+@@2: line 2.2- t=107746 -> @@1
+
+% t=32.0 plus 83.0 plus 1.0fil minus 8.0 g=16383.99998 b=0 p=162 c=162
+{vertical mode: \penalty}
+% t=42.0 plus 124.0 plus 1.0fil minus 8.0 g=16383.99998 b=0 p=-22222 c=-
+22222#
+\output->{\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999
+ \showboxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2
+\ifhbox 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \
+fi }
+{internal vertical mode: \tracingcommands}
+> -22222.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+l.191 \penalty-22222
+ % end of demerits test, hyphenation is next
+
+
+Completed box being shipped out [-2.0.0.0.11]
+\vbox(16383.99998+0.0)x1000.0, glue set 16342.0fil
+.\glue(\topskip) 0.0 plus 1.0fil
+.\hbox(22.0+0.0)x1000.0, glue set 237.5
+..\glue(\leftskip) 4.0
+..\hbox(0.0+0.0)x0.0
+..\glue(\xspaceskip) -1.0
+..\rule(22.0+0.0)x0.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\vbox(22.0+0.0)x13.0
+...\glue(\tabskip) 0.0 plus 40.0
+...\vbox(22.0+0.0)x13.0, glue set 2.0
+....\hbox(0.0+2.0)x13.0, glue set - 0.66667
+.....\glue(\leftskip) 4.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue 2.0 plus 5.0 minus 1.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue 5.0 minus 2.0
+.....\hbox(0.0+0.0)x1.0, shifted 2.0
+.....\glue(\rightskip) -1.0
+....\penalty 125
+....\glue(\baselineskip) 18.0 plus 1.0
+....\hbox(0.0+0.0)x13.0, glue set 0.66667
+.....\glue(\leftskip) 4.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue 2.0 plus 6.0
+.....\hbox(0.0+0.0)x2.0
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0
+.....\glue(\rightskip) -1.0
+...\glue(\tabskip) 0.0 plus 40.0
+..\vbox(22.0+0.0)x13.0
+...\glue(\tabskip) 0.0 plus 40.0
+...\vbox(22.0+0.0)x13.0
+....\hbox(0.0+0.0)x13.0, glue set 0.8
+.....\glue(\leftskip) 4.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue 2.0 plus 5.0 minus 1.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue(\rightskip) -1.0
+....\penalty 125
+....\glue(\baselineskip) 20.0 plus 1.0
+....\hbox(0.0+2.0)x13.0
+.....\glue(\leftskip) 4.0
+.....\hbox(0.0+0.0)x1.0, shifted 2.0
+.....\glue 3.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue 2.0 plus 6.0
+.....\hbox(0.0+0.0)x2.0
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0
+.....\glue(\rightskip) -1.0
+...\glue(\tabskip) 0.0 plus 40.0
+..\vbox(22.0+0.0)x13.0
+...\glue(\tabskip) 0.0 plus 40.0
+...\vbox(22.0+0.0)x13.0
+....\hbox(0.0+0.0)x13.0, glue set 0.8
+.....\glue(\leftskip) 4.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue 2.0 plus 5.0 minus 1.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue(\rightskip) -1.0
+....\penalty 125
+....\glue(\baselineskip) 20.0 plus 1.0
+....\hbox(0.0+2.0)x13.0
+.....\glue(\leftskip) 4.0
+.....\hbox(0.0+0.0)x1.0, shifted 2.0
+.....\glue 3.0
+.....\hbox(0.0+0.0)x2.0
+.....\glue 2.0 plus 6.0
+.....\hbox(0.0+0.0)x2.0
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0
+.....\glue(\rightskip) -1.0
+...\glue(\tabskip) 0.0 plus 40.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+.\glue(\parskip) 0.0 plus 42.0 minus 8.0
+.\glue(\baselineskip) 2.0 plus 41.0
+.\hbox(8.0+2.0)x13.0
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x1.0
+..\hbox(0.0+0.0)x0.0
+..\hbox(0.0+0.0)x2.0, glue set -1.99255
+...\glue 0.0 plus -1.00374
+..\discretionary
+..\rule(*+*)x-2.0
+..\hbox(0.0+0.0)x2.0
+..\rip A (ligature AAA)
+..\kern2.0
+..\rip B
+..\glue(\rightskip) 0.0
+.\penalty 162
+.\glue(\baselineskip) 7.6 plus 41.0
+.\hbox(0.4+0.0)x13.0
+..\glue(\leftskip) 3.0
+..\rule(*+*)x-2.0
+..\hbox(0.0+0.0)x2.0
+..\rip C (ligature B-)
+..\vbox(0.4+0.0)x6.0
+...\rule(0.4+0.0)x6.0
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+
+Memory usage before: 990&376; after: 584&370; still untouched: 735
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{vertical mode: \looseness}
+{\uchyph}
+{\hsize}
+{the letter A}
+{horizontal mode: the letter A}
+{blank space }
+{the character /}
+{\vadjust}
+{internal vertical mode: \uchyph}
+{\ }
+{horizontal mode: \ }
+{the letter B}
+{end-group character }}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+\rip BBBBBB
+@\par via @@0 b=10000 p=-10000 d=100000782
+@\par via @@1 b=10000 p=-10000 d=100000000
+@@2: line 1.0- t=100000782 -> @@0
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 200--200
+ [] \rip BBBBBB
+
+\hbox(7.0+1.0)x100.0, glue set 41.5
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{restoring \uchyph=1}
+{restoring \looseness=-10}
+{\vadjust}
+{internal vertical mode: \ }
+{horizontal mode: \ }
+{\closeout}
+{the letter B}
+{end-group character }}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+[]\rip BB-
+@\discretionary via @@0 b=10000 p=88 d=100008526
+@\discretionary via @@1 b=10000 p=88 d=100007744
+@@2: line 1.0- t=100008526 -> @@0
+B-BBB
+@\discretionary via @@0 b=10000 p=88 d=100008526
+@\discretionary via @@1 b=10000 p=88 d=100007744
+@\discretionary via @@2 b=10000 p=88 d=100008744
+@@3: line 1.0- t=100008526 -> @@0
+@\par via @@0 b=10000 p=-10000 d=100000782
+@\par via @@1 b=10000 p=-10000 d=100000000
+@\par via @@2 b=10000 p=-10000 d=100100000
+@\par via @@3 b=10000 p=-10000 d=100100000
+@@4: line 1.0- t=100000782 -> @@0
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 201--201
+ [] []\rip BB-B-BBB
+
+\hbox(7.0+1.0)x100.0, glue set 41.5
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{restoring \looseness=-10}
+{begin-group character {}
+{\hyphenchar}
+{end-group character }}
+{\hyphenation}
+{\vadjust}
+{internal vertical mode: \ }
+{horizontal mode: \ }
+{the letter B}
+{\kern}
+{the letter B}
+{end-group character }}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+\rip BBBCBBB
+@\discretionary via @@0 b=10000 p=88 d=100008526
+@\discretionary via @@1 b=10000 p=88 d=100007744
+@@2: line 1.0- t=100008526 -> @@0
+B
+@\par via @@0 b=10000 p=-10000 d=100000782
+@\par via @@1 b=10000 p=-10000 d=100000000
+@\par via @@2 b=10000 p=-10000 d=100100000
+@@3: line 1.0- t=100000782 -> @@0
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 202--202
+ [] \rip BBBCBBBB
+
+\hbox(8.0+2.0)x100.0, glue set 40.0
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{restoring \looseness=-10}
+{\hyphenchar}
+{\vadjust}
+{internal vertical mode: \def}
+{\ }
+{horizontal mode: \ }
+{\pretolerance}
+{the letter B}
+
+\B ->B
+{end-group character }}
+@firstpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+\rip BBBBBB
+@\par via @@0 b=10000 p=-10000 d=100000782
+@\par via @@1 b=10000 p=-10000 d=100000000
+@@2: line 1.0- t=100000782 -> @@0
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 203--203
+ [] \rip BBBBBB
+
+\hbox(7.0+1.0)x100.0, glue set 41.5
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{restoring \pretolerance=0}
+{restoring \B=undefined}
+{restoring \looseness=-10}
+{blank space }
+{\par}
+@firstpass
+@secondpass
+[]\rip A
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+/AA-
+@\discretionary via @@0 b=10000 p=88 d=100008526
+@@2: line 1.0- t=100008526 -> @@0
+@\discretionary via @@1 b=10000 p=88 d=100007744
+@@3: line 2.0- t=200008526 -> @@1
+B-BBB
+@\discretionary via @@0 b=10000 p=88 d=100008526
+@@4: line 1.0- t=100008526 -> @@0
+@\discretionary via @@2 b=10000 p=88 d=100008744
+@\discretionary via @@1 b=10000 p=88 d=100007744
+@@5: line 2.0- t=200008526 -> @@1
+@\discretionary via @@3 b=10000 p=88 d=100008744
+@@6: line 3.0- t=300017270 -> @@3
+-
+@\discretionary via @@0 b=10000 p=88 d=100008526
+@@7: line 1.0- t=100008526 -> @@0
+@\discretionary via @@4 b=10000 p=88 d=100008744
+@\discretionary via @@2 b=10000 p=88 d=100008744
+@\discretionary via @@1 b=10000 p=88 d=100007744
+@@8: line 2.0- t=200008526 -> @@1
+@\discretionary via @@5 b=10000 p=88 d=100008744
+@\discretionary via @@3 b=10000 p=88 d=100008744
+@@9: line 3.0- t=300017270 -> @@3
+@\discretionary via @@6 b=10000 p=88 d=100008744
+@@10: line 4.0- t=400026014 -> @@6
+C-A
+@\discretionary via @@0 b=10000 p=88 d=100008526
+@@11: line 1.0- t=100008526 -> @@0
+@\discretionary via @@7 b=10000 p=88 d=100008744
+@\discretionary via @@4 b=10000 p=88 d=100008744
+@\discretionary via @@2 b=10000 p=88 d=100008744
+@\discretionary via @@1 b=10000 p=88 d=100007744
+@@12: line 2.0- t=200008526 -> @@1
+@\discretionary via @@8 b=10000 p=88 d=100008744
+@\discretionary via @@5 b=10000 p=88 d=100008744
+@\discretionary via @@3 b=10000 p=88 d=100008744
+@@13: line 3.0- t=300017270 -> @@3
+@\discretionary via @@9 b=10000 p=88 d=100008744
+@\discretionary via @@6 b=10000 p=88 d=100008744
+@@14: line 4.0- t=400026014 -> @@6
+@\discretionary via @@10 b=10000 p=88 d=100008744
+@@15: line 5.0- t=500034758 -> @@10
+CAC//[][][][]
+@\par via @@0 b=10000 p=-10000 d=100000782
+@@16: line 1.0- t=100000782 -> @@0
+@\par via @@11 b=10000 p=-10000 d=100100000
+@\par via @@7 b=10000 p=-10000 d=100100000
+@\par via @@4 b=10000 p=-10000 d=100100000
+@\par via @@2 b=10000 p=-10000 d=100100000
+@\par via @@1 b=10000 p=-10000 d=100000000
+@@17: line 2.0- t=200000782 -> @@1
+@\par via @@12 b=10000 p=-10000 d=100100000
+@\par via @@8 b=10000 p=-10000 d=100100000
+@\par via @@5 b=10000 p=-10000 d=100100000
+@\par via @@3 b=10000 p=-10000 d=100100000
+@@18: line 3.0- t=300108526 -> @@3
+@\par via @@13 b=10000 p=-10000 d=100100000
+@\par via @@9 b=10000 p=-10000 d=100100000
+@\par via @@6 b=10000 p=-10000 d=100100000
+@@19: line 4.0- t=400117270 -> @@6
+@\par via @@14 b=10000 p=-10000 d=100100000
+@\par via @@10 b=10000 p=-10000 d=100100000
+@@20: line 5.0- t=500126014 -> @@10
+@\par via @@15 b=10000 p=-10000 d=100100000
+@@21: line 6.0- t=600134758 -> @@15
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 195--204
+ []\rip A /AA-B-BBB-C-ACAC//
+
+\hbox(8.0+2.0)x100.0, glue set 33.53377
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+%% goal height=16383.99998, max depth=2.0
+{vertical mode: \hbox}
+{restricted horizontal mode: \sfcode}
+{the letter A}
+{blank space }
+{the letter a}
+{blank space }
+{end-group character }}
+{restoring \sfcode66=999}
+% t=55.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{vertical mode: \noindent}
+% t=64.0 plus 41.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{horizontal mode: \scriptscriptfont}
+{math shift character $}
+{display math mode: \eqno}
+{math mode: superscript character ^}
+{end-group character }}
+{math shift character $}
+! Math formula deleted: Insufficient extension fonts.
+l.206 $$\eqno^{}$
+ \scriptfont3=\rip\fontdimen2\smalltrip=0pt
+Sorry, but I can't typeset math unless \textfont 3
+and \scriptfont 3 and \scriptscriptfont 3 have all
+the \fontdimen values needed in math extension fonts.
+
+! Display math should end with $$.
+<to be read again>
+ \scriptfont
+l.206 $$\eqno^{}$\scriptfont
+ 3=\rip\fontdimen2\smalltrip=0pt
+The `$' that I just saw supposedly matches a previous `$$'.
+So I shall assume that you typed `$$' both times.
+
+{restoring \fam=-1}
+! Math formula deleted: Insufficient extension fonts.
+<to be read again>
+ \scriptfont
+l.206 $$\eqno^{}$\scriptfont
+ 3=\rip\fontdimen2\smalltrip=0pt
+Sorry, but I can't typeset math unless \textfont 3
+and \scriptfont 3 and \scriptscriptfont 3 have all
+the \fontdimen values needed in math extension fonts.
+
+{restoring \displayindent=0.0pt}
+{restoring \displaywidth=0.0pt}
+{restoring \predisplaysize=0.0pt}
+{restoring \fam=0}
+% t=66.0 plus 83.0 plus 1.0fil minus 8.0 g=16383.99998 b=0 p=0 c=0#
+% t=85.0 plus 210.0 plus 1.0fil minus 811.0 g=16383.99998 b=0 p=0 c=0#
+{horizontal mode: \scriptfont}
+{\fontdimen}
+{begin-group character {}
+{\rightskip}
+{\looseness}
+{\spaceskip}
+{the letter A}
+{\spacefactor}
+{\discretionary}
+{restricted horizontal mode: end-group character }}
+{\kern}
+{the character -}
+{end-group character }}
+{the letter B}
+{\kern}
+{end-group character }}
+{horizontal mode: blank space }
+{the letter C}
+{math shift character $}
+{math mode: blank space }
+{\scriptfont}
+{\mathsurround}
+{math shift character $}
+! Math formula deleted: Insufficient symbol fonts.
+<recently read> $
+
+l.210 \mathsurround143pt$
+ C $\mathsurround40pt$$\mathsurrou...
+Sorry, but I can't typeset math unless \textfont 2
+and \scriptfont 2 and \scriptscriptfont 2 have all
+the \fontdimen values needed in math symbol fonts.
+
+{restoring \mathsurround=0.0pt}
+{restoring \scriptfont2=\smalltrip}
+{restoring \fam=0}
+{horizontal mode: blank space }
+{the letter C}
+{blank space }
+{math shift character $}
+{math mode: \mathsurround}
+{math shift character $}
+{restoring \mathsurround=0.0pt}
+{restoring \fam=0}
+{horizontal mode: math shift character $}
+{math mode: \mathsurround}
+{\hbox}
+{restricted horizontal mode: math shift character $}
+{math mode: math shift character $}
+{restoring \fam=-1}
+{restricted horizontal mode: end-group character }}
+{math mode: math shift character $}
+{restoring \mathsurround=0.0pt}
+{restoring \fam=0}
+{horizontal mode: \par}
+! Infinite glue shrinkage found in a paragraph.
+l.210 ...round60pt\hbox{$$}$\par
+ }
+The paragraph just ended includes some glue that has
+infinite shrinkability, e.g., `\hskip 0pt minus 1fil'.
+Such glue doesn't belong there---it allows a paragraph
+of any length to fit on one line. But it's safe to proceed,
+since the offensive shrinkability has been made finite.
+
+@firstpass
+@secondpass
+\rip A-
+@\discretionary via @@0 b=76 p=89 d=13850
+@@1: line 4.1- t=13850 -> @@0
+
+@ via @@0 b=65 p=0 d=4356
+@@2: line 4.1 t=4356 -> @@0
+@ via @@1 b=91 p=0 d=8464
+@@3: line 5.1 t=22314 -> @@1
+C$$
+@\math via @@0 b=17 p=0 d=324
+@@4: line 4.3 t=324 -> @@0
+@\math via @@2 b=12 p=0 d=169
+@\math via @@1 b=9 p=0 d=100
+@@5: line 5.2 t=4525 -> @@2
+@\math via @@3 b=12 p=0 d=169
+@@6: line 6.2 t=22483 -> @@3
+ C
+@ via @@4 b=71 p=0 d=5966
+@@7: line 5.1 t=6290 -> @@4
+@ via @@5 b=71 p=0 d=5184
+@@8: line 6.1 t=9709 -> @@5
+@ via @@6 b=71 p=0 d=5184
+@@9: line 7.1 t=27667 -> @@6
+$$$[]$
+@\par via @@7 b=57 p=-10000 d=4146
+@@10: line 6.3- t=10436 -> @@7
+@\par via @@8 b=57 p=-10000 d=4146
+@@11: line 7.3- t=13855 -> @@8
+@\par via @@9 b=57 p=-10000 d=4146
+@@12: line 8.3- t=31813 -> @@9
+
+
+Loose \hbox (badness 76) in paragraph at lines 206--210
+ \rip A
+
+\hbox(7.0+1.0)x100.0, glue set 0.91347
+.\glue(\leftskip) 3.0
+.\rip A
+.etc.
+
+
+Loose \hbox (badness 91) in paragraph at lines 206--210
+ \rip -
+
+\hbox(0.0+0.0)x100.0, glue set 0.97116
+.\glue(\leftskip) 3.0
+.\kern 2.0
+.etc.
+
+
+Tight \hbox (badness 12) in paragraph at lines 206--210
+ \rip C$$
+
+\hbox(0.0+0.0)x100.0, glue set - 0.5
+.\glue(\leftskip) 3.0
+.\rip C
+.etc.
+
+
+Loose \hbox (badness 71) in paragraph at lines 206--210
+ \rip C
+
+\hbox(0.0+0.0)x100.0, glue set 0.89423
+.\glue(\leftskip) 3.0
+.\rip C
+.etc.
+
+
+Tight \hbox (badness 57) in paragraph at lines 206--210
+ []$
+
+\hbox(0.0+0.0)x100.0, glue set - 0.83
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x120.0 []
+.etc.
+
+% t=95.0 plus 251.0 plus 1.0fil minus 811.0 g=16383.99998 b=0 p=37 c=37
+% t=105.0 plus 292.0 plus 1.0fil minus 811.0 g=16383.99998 b=0 p=-125 c=
+-125#
+% t=115.0 plus 333.0 plus 1.0fil minus 811.0 g=16383.99998 b=0 p=-125 c=
+-125#
+% t=125.0 plus 374.0 plus 1.0fil minus 811.0 g=16383.99998 b=0 p=0 c=0
+{vertical mode: end-group character }}
+{restoring \spaceskip=0.0pt}
+{restoring \looseness=0}
+{restoring \rightskip=0.0pt}
+{blank space }
+{\uccode}
+{\font}
+{\input}
+! Font \mumble=mumble not loadable: Metric (TFM) file not found.
+<to be read again>
+ \relax
+...
+l.211 ...ont\mumble=mumble\input
+ tripos % "AAAAAAAAAA"+errors
+I wasn't able to read the size data for this font,
+so I will ignore the font specification.
+[Wizards can fix TFM files using TFtoPL/PLtoTF.]
+You might try inserting a different font spec;
+e.g., type `I\font<same font id>=<substitute font name>'.
+
+{\relax}
+{\input}
+(tripos.tex
+{\par}
+{\uppercase}
+{the character 0}
+% t=135.0 plus 415.0 plus 1.0fil minus 811.0 g=16383.99998 b=0 p=0 c=0
+{horizontal mode: the character 0}
+Missing character: There is no 0 in font trip!
+{begin-group character {}
+{\outputpenalty}
+! Missing number, treated as zero.
+<to be read again>
+ }
+l.2 ...case {0{\outputpenalty }}
+
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+{end-group character }}
+{restoring \outputpenalty=-22222}
+{blank space }
+{the character [}
+Missing character: There is no [ in font trip!
+{\uppercase}
+{the letter A}
+Missing character: There is no [ in font trip!
+{blank space }
+)
+{\par}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+\rip AAAAAAAAAA
+@\par via @@0 b=10000 p=-10000 d=100000782
+@\par via @@1 b=10000 p=-10000 d=100000000
+@@2: line 1.0- t=100000782 -> @@0
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 2--212
+ [] \rip AAAAAAAAAA
+
+\hbox(7.0+1.0)x100.0, glue set 45.5
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{vertical mode: \penalty}
+% t=145.0 plus 498.0 plus 1.0fil minus 819.0 g=16383.99998 b=0 p=-33333
+c=-33333#
+\output->{\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999
+ \showboxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2
+\ifhbox 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \
+fi }
+{internal vertical mode: \tracingcommands}
+> -33333.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+l.212 \par\penalty-33333
+ % end hyphenation, math is next
+
+
+Completed box being shipped out [-2.0.0.0.11]
+\vbox(16383.99998+1.0)x100.0, glue set 16239.0fil
+.\glue(\topskip) 12.0 plus 1.0fil
+.\hbox(8.0+2.0)x100.0, glue set 33.53377
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\rip A
+..\glue 4.0 plus 1.99799 minus 1.00099
+..\rip /
+..\kern1.0
+..\discretionary replacing 2
+...\rip A (ligature AA)
+...\kern3.0
+...\rip -
+..\rip A (ligature AA)
+..\kern2.0
+..\discretionary replacing 3
+...\rip C (ligature B-)
+..|\rip A (ligature BB)
+..|\kern2.0
+..|\rip B
+..|\kern4.0
+..\rip A (ligature BB)
+..\kern2.0
+..\rip A (ligature BB)
+..\discretionary
+...\rip -
+..\discretionary replacing 1
+...\rip C
+...\rip -
+..|\rip A
+..\rip ^^82 (ligature CA)
+..\rip ^^82 (ligature CA)
+..\rip B (ligature C/)
+..\rip /
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+.\hbox(7.0+1.0)x100.0, glue set 41.5
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\rip A (ligature BB)
+..\kern2.0
+..\rip A (ligature BB)
+..\kern2.0
+..\rip A (ligature BB)
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+.\hbox(7.0+1.0)x100.0, glue set 41.5
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\closeout1
+..\discretionary replacing 2
+...\rip A (ligature BB)
+...\kern3.0
+...\rip -
+..\rip A (ligature BB)
+..\kern2.0
+..\discretionary replacing 3
+...\rip C (ligature B-)
+..|\rip A (ligature BB)
+..|\kern2.0
+..|\rip B
+..\rip A (ligature BB)
+..\kern2.0
+..\rip A (ligature BB)
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+.\hbox(8.0+2.0)x100.0, glue set 40.0
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\rip A (ligature BB)
+..\kern2.0
+..\discretionary replacing 3
+...\rip B
+...\kern4.0
+...\rip C
+..|\rip A (ligature BB)
+..|\kern2.0
+..|\rip B
+..\rip A (ligature BB)
+..\kern2.0
+..\rip A (ligature BB)
+..\kern 0.0
+..\rip B
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+.\hbox(7.0+1.0)x100.0, glue set 41.5
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\rip A (ligature BB)
+..\kern2.0
+..\rip A (ligature BB)
+..\kern2.0
+..\rip A (ligature BB)
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+.\glue(\baselineskip) 0.0 plus 41.0
+.\hbox(8.0+2.0)x20.0
+..\rip A
+..\kern2.0
+..\rip B
+..\glue 4.0 plus 2.0 minus 1.0
+..\rip a
+..\rip B
+..\glue 4.0 plus 2.46799 minus 0.81036
+.\glue(\parskip) 0.0 plus 42.0 minus 8.0
+.\penalty 0
+.\glue(\abovedisplayshortskip) 1.0 plus 45.0 minus 803.0
+.\glue(\baselineskip) 8.0 plus 41.0
+.\hbox(0.0+0.0)x0.0, shifted 50.0
+.\penalty 10000
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+0.0)x0.0, shifted 100.0
+.\penalty 0
+.\glue(\baselineskip) 3.0 plus 41.0
+.\hbox(7.0+1.0)x100.0, glue set 0.91347
+..\glue(\leftskip) 3.0
+..\rip A
+..\discretionary
+..\glue(\rightskip) 0.0 plus 104.0 minus 100.0
+.\penalty 37
+.\glue(\baselineskip) 9.0 plus 41.0
+.\hbox(0.0+0.0)x100.0, glue set 0.97116
+..\glue(\leftskip) 3.0
+..\kern 2.0
+..\kern-1.00002
+..\rip -
+..\glue(\rightskip) 0.0 plus 104.0 minus 100.0
+.\penalty -125
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+0.0)x100.0, glue set - 0.5
+..\glue(\leftskip) 3.0
+..\rip C
+..\mathon, surrounded 143.0
+..\mathoff
+..\glue(\rightskip) 0.0 plus 104.0 minus 100.0
+.\penalty -125
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+0.0)x100.0, glue set 0.89423
+..\glue(\leftskip) 3.0
+..\rip C
+..\glue(\rightskip) 0.0 plus 104.0 minus 100.0
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+0.0)x100.0, glue set - 0.83
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x120.0
+...\mathon, surrounded 60.0
+...\mathoff, surrounded 60.0
+..\mathoff, surrounded 60.0
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0 plus 104.0 minus 100.0
+.\glue(\parskip) 0.0 plus 42.0 minus 8.0
+.\glue(\baselineskip) 3.0 plus 41.0
+.\hbox(7.0+1.0)x100.0, glue set 45.5
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\rip A (ligature AAAAAAAAAA)
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+
+Memory usage before: 950&531; after: 546&448; still untouched: 706
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{vertical mode: begin-group character {}
+{\catcode}
+{\font}
+! Improper `at' size (0.0pt), replaced by 10pt.
+<to be read again>
+ \font
+l.213 ... \font?xyzzy at0pt\font
+ ? xyzzy scaled1?} % nonexistent
+I can only handle fonts at positive sizes that are
+less than 2048pt, so I've changed what you said to 10pt.
+
+! Font ?=xyzzy at 10.0pt not loadable: Metric (TFM) file not found.
+<to be read again>
+ \font
+l.213 ... \font?xyzzy at0pt\font
+ ? xyzzy scaled1?} % nonexistent
+I wasn't able to read the size data for this font,
+so I will ignore the font specification.
+[Wizards can fix TFM files using TFtoPL/PLtoTF.]
+You might try inserting a different font spec;
+e.g., type `I\font<same font id>=<substitute font name>'.
+
+{\font}
+! Font ?=xyzzy scaled 1 not loadable: Metric (TFM) file not found.
+<to be read again>
+ ?
+l.213 ...t\font ? xyzzy scaled1?
+ } % nonexistent
+I wasn't able to read the size data for this font,
+so I will ignore the font specification.
+[Wizards can fix TFM files using TFtoPL/PLtoTF.]
+You might try inserting a different font spec;
+e.g., type `I\font<same font id>=<substitute font name>'.
+
+{select font nullfont}
+{end-group character }}
+{restoring current font=\rip}
+{restoring ?=undefined}
+{restoring \catcode63=12}
+{blank space }
+{\font}
+{\font}
+! Improper `at' size (-10.0pt), replaced by 10pt.
+l.215 \font\ip trip at -10pt
+ % through the looking glass
+I can only handle fonts at positive sizes that are
+less than 2048pt, so I've changed what you said to 10pt.
+
+{\showthe}
+! You can't use `math shift character $' after \the.
+l.216 \showthe$
+
+I'm forgetting what you said and using zero instead.
+
+> 0.
+l.216 \showthe$
+
+
+{blank space }
+{\showthe}
+> \ip .
+<recently read> \font
+
+l.217 \showthe\font
+
+
+{\message}
+{\fontname}
+trip
+{blank space }
+{select font trip}
+{\textfont}
+{\scriptfont}
+{\scriptscriptfont}
+{\def}
+{blank space }
+{begin-group character {}
+{\tracingmacros}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{\global}
+{end-group character }}
+{restoring \tracingmacros=4}
+{blank space }
+{\mathcode}
+{\mathcode}
+{\delcode}
+{\catcode}
+{\catcode}
+{\mathcode}
+{\mathcode}
+{\def}
+{begin-group character {}
+{\catcode}
+{\global}
+{end-group character }}
+{restoring \catcode122=11}
+{blank space }
+{\parshape}
+
+\a ->1pt 11.0pt2pt 12.0pt3pt 13.0pt4pt 14.0pt5pt 15.0pt6pt 16.0pt7pt 17.
+0pt8pt 18.0pt9pt 19.0pt10pt 20.0pt
+{\chardef}
+{\hangindent}
+{\hangafter}
+{\begingroup}
+{\looseness}
+{\rightskip}
+{\-}
+{horizontal mode: \-}
+{the character -}
+{\-}
+{the character -}
+{\-}
+{blank space }
+{math shift character $}
+@firstpass
+[]\ip -
+@\discretionary via @@0 b=0 p=88 d=7745
+@@1: line 1.2- t=7745 -> @@0
+-
+@\discretionary via @@0 b=0 p=89 d=7922
+@@2: line 1.2- t=7922 -> @@0
+@\discretionary via @@1 b=0 p=89 d=8922
+@@3: line 2.2- t=16667 -> @@1
+-
+@\discretionary via @@0 b=0 p=88 d=7745
+@@4: line 1.2- t=7745 -> @@0
+@\discretionary via @@2 b=0 p=88 d=8745
+@\discretionary via @@1 b=0 p=88 d=8745
+@@5: line 2.2- t=16490 -> @@1
+@\discretionary via @@3 b=0 p=88 d=8745
+@@6: line 3.2- t=25412 -> @@3
+-
+-
+@\discretionary via @@0 b=0 p=89 d=7922
+@@7: line 1.2- t=7922 -> @@0
+@\discretionary via @@4 b=0 p=89 d=8922
+@\discretionary via @@2 b=0 p=89 d=8922
+@\discretionary via @@1 b=0 p=89 d=8922
+@@8: line 2.2- t=16667 -> @@1
+@\discretionary via @@5 b=0 p=89 d=8922
+@\discretionary via @@3 b=0 p=89 d=8922
+@@9: line 3.2- t=25412 -> @@5
+@\discretionary via @@6 b=0 p=89 d=8922
+@@10: line 4.2- t=34334 -> @@6
+A-
+@\discretionary via @@0 b=0 p=88 d=7745
+@@11: line 1.2- t=7745 -> @@0
+@\discretionary via @@7 b=0 p=88 d=8745
+@\discretionary via @@4 b=0 p=88 d=8745
+@\discretionary via @@2 b=0 p=88 d=8745
+@\discretionary via @@1 b=0 p=88 d=8745
+@@12: line 2.2- t=16490 -> @@1
+@\discretionary via @@8 b=0 p=88 d=8745
+@\discretionary via @@5 b=0 p=88 d=8745
+@\discretionary via @@3 b=0 p=88 d=8745
+@@13: line 3.2- t=25235 -> @@5
+@\discretionary via @@9 b=0 p=88 d=8745
+@\discretionary via @@6 b=0 p=88 d=8745
+@@14: line 4.2- t=34157 -> @@6
+@\discretionary via @@10 b=0 p=88 d=8745
+@@15: line 5.2- t=43079 -> @@10
+@\par via @@0 b=0 p=-10000 d=1
+@@16: line 1.2- t=1 -> @@0
+@\par via @@11 b=0 p=-10000 d=100001
+@\par via @@7 b=0 p=-10000 d=100001
+@\par via @@4 b=0 p=-10000 d=100001
+@\par via @@2 b=0 p=-10000 d=100001
+@\par via @@1 b=0 p=-10000 d=100001
+@@17: line 2.2- t=107746 -> @@1
+@\par via @@12 b=0 p=-10000 d=100001
+@\par via @@8 b=0 p=-10000 d=100001
+@\par via @@5 b=0 p=-10000 d=100001
+@\par via @@3 b=0 p=-10000 d=100001
+@@18: line 3.2- t=116491 -> @@5
+@\par via @@13 b=0 p=-10000 d=100001
+@\par via @@9 b=0 p=-10000 d=100001
+@\par via @@6 b=0 p=-10000 d=100001
+@@19: line 4.2- t=125236 -> @@13
+@\par via @@14 b=0 p=-10000 d=100001
+@\par via @@10 b=0 p=-10000 d=100001
+@@20: line 5.2- t=134158 -> @@14
+@\par via @@15 b=0 p=-10000 d=100001
+@@21: line 6.2- t=143080 -> @@15
+
+%% goal height=16383.99998, max depth=2.0
+% t=20.0 plus 1.0fil g=16383.99998 b=0 p=37 c=37#
+% t=30.0 plus 41.0 plus 1.0fil g=16383.99998 b=0 p=-213 c=-213#
+{display math mode: \number}
+{\the}
+! Improper alphabetic constant.
+<to be read again>
+ \relax
+l.249 ...mber\the\delcode`\relax
+ \over{{{}}}}\pagestretch=-1\p...
+A one-character control sequence belongs after a ` mark.
+So I'm essentially inserting \0 here.
+
+{the character -}
+{the character 1}
+{\relax}
+{\over}
+{begin-group character {}
+{math mode: begin-group character {}
+{begin-group character {}
+{end-group character }}
+{end-group character }}
+{end-group character }}
+{display math mode: end-group character }}
+! Extra }, or forgotten $.
+l.249 ...code`\relax\over{{{}}}}
+ \pagestretch=-1\pagetotal\sho...
+I've deleted a group-closing symbol because it seems to be
+spurious, as in `$x}$'. But perhaps the } is legitimate and
+you forgot something else, as in `\hbox{$x}'. In such cases
+the way to recover is to insert both the forgotten and the
+deleted material, e.g., by typing `I$}'.
+
+{\pagestretch}
+{\showlists}
+
+### display math mode entered at line 249
+\mathord
+.{}
+this will be denominator of:
+\fraction, thickness = default
+\\mathord []
+\\mathord []
+### vertical mode entered at line 0
+### current page:
+\glue(\topskip) 20.0 plus 1.0fil
+\hbox(0.0+0.0)x11.0, glue set 1.3fil, shifted 1.0
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+etc.
+total height 40.0 plus -40.0 plus 1.0fil
+ goal height 16383.99998
+prevdepth 1.0, prevgraf 3 lines
+
+! OK.
+l.249 ...=-1\pagetotal\showlists
+
+
+{\begingroup}
+{\halign}
+! Missing \endgroup inserted.
+<inserted text>
+ \endgroup
+...
+l.250 \begingroup\halign
+ to\the\displaywidth{#&#\crcr\crcr\cr...
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{\endgroup}
+{\halign}
+! Improper \halign inside $$'s.
+<recently read> \halign
+
+l.250 \begingroup\halign
+ to\the\displaywidth{#&#\crcr\crcr\cr...
+Displays can use special alignments (like \eqalignno)
+only if nothing but the alignment itself is between $$'s.
+So I've deleted the formulas that preceded this alignment.
+
+{internal vertical mode: \the}
+{restricted horizontal mode: end of alignment template}
+
+Loose \hbox (badness 1) in alignment at lines 250--250
+ [] []
+
+\hbox(0.0+0.0)x15.0, glue set 0.1875
+.\glue(\tabskip) 0.0 plus 40.0
+.\unsetbox(0.0+0.0)x0.0
+.etc.
+
+! Missing number, treated as zero.
+<to be read again>
+ =
+l.253 ...aysize* \global\setbox=
+
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+! Improper \setbox.
+<recently read> =
+
+l.253 ...aysize* \global\setbox=
+
+Sorry, \setbox is not allowed after \halign in a display,
+or between \accent and an accented character.
+
+! Missing $$ inserted.
+<to be read again>
+ \eqno
+l.254 \eqno
+ % another error (actually causes two error messag...
+Displays can use special alignments (like \eqalignno)
+only if nothing but the alignment itself is between $$'s.
+
+{restoring \predisplaypenalty=0}
+{restoring \displayindent=0.0pt}
+{restoring \displaywidth=0.0pt}
+{restoring \predisplaysize=0.0pt}
+{restoring \fam=0}
+% t=40.0 plus -40.0 plus 1.0fil g=16383.99998 b=0 p=101 c=101
+% t=53.0 plus 1.0 plus 1.0fil g=16383.99998 b=0 p=-1179647 c=-1179647#
+\output->{\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999
+ \showboxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2
+\ifhbox 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \
+fi }
+{internal vertical mode: \tracingcommands}
+> -1179647.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+...
+l.254 \eqno
+ % another error (actually causes two error messag...
+
+
+Completed box being shipped out [-2.0.0.0.11.0.327680]
+\vbox(16383.99998+0.0)x20.0, glue set 16331.0fil
+.\glue(\topskip) 20.0 plus 1.0fil
+.\hbox(0.0+0.0)x11.0, glue set 1.3fil, shifted 1.0
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\discretionary
+..\ip -
+..\glue(\rightskip) 0.0 plus 10.0fil minus 0.00002
+.\penalty 37
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+0.0)x12.0, glue set 2.0fil, shifted 2.0
+..\glue(\leftskip) 3.0
+..\kern-1.00002
+..\ip -
+..\discretionary
+..\discretionary
+..\ip -
+..\glue(\rightskip) 0.0 plus 10.0fil minus 0.00002
+.\penalty -213
+.\glue(\baselineskip) 3.0 plus 41.0
+.\hbox(7.0+1.0)x13.0, glue set 1.8fil, shifted 3.0
+..\glue(\leftskip) 3.0
+..\kern-1.00002
+..\ip - (ligature -
+)
+..\ip -
+..\discretionary
+..\kern1.0
+..\ip A
+..\discretionary
+...\ip -
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0 plus 10.0fil minus 0.00002
+.\penalty 101
+.\glue(\abovedisplayskip) 3.0
+.\glue(\baselineskip) 9.0 plus 41.0
+.\hbox(0.0+0.0)x15.0, glue set 0.1875, shifted 5.0
+..\glue(\tabskip) 0.0 plus 40.0
+..\hbox(0.0+0.0)x0.0
+..\glue(\tabskip) 0.0 plus 40.0
+
+Memory usage before: 339&413; after: 236&405; still untouched: 706
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{restoring \parshape=10}
+{restoring \hangafter=-12}
+{restoring \hangindent=-10.0pt}
+{restoring \looseness=2}
+{horizontal mode: \eqno}
+! You can't use `\eqno' in horizontal mode.
+<recently read> \eqno
+
+l.254 \eqno
+ % another error (actually causes two error messag...
+Sorry, but I'm not programmed to handle this case;
+I'll just pretend that you didn't ask for it.
+If you're in the wrong mode, you might be able to
+return to the right one by typing `I}' or `I$' or `I\par'.
+
+{\looseness}
+{math shift character $}
+{math mode: \right}
+! Missing delimiter (. inserted).
+<to be read again>
+ \mathchardef
+l.256 $\right\relax\mathchardef
+ \minus="322D % locally \minus ...
+I was expecting to see something like `(' or `\{' or
+`\}' here. If you typed, e.g., `{' instead of `\{', you
+should probably delete the `{' by typing `1' now, so that
+braces don't get unbalanced. Otherwise just proceed.
+Acceptable delimiters are characters whose \delcode is
+nonnegative, or you can use `\delimiter <delimiter code>'.
+
+! Extra \right.
+<to be read again>
+ \mathchardef
+l.256 $\right\relax\mathchardef
+ \minus="322D % locally \minus ...
+I'm ignoring a \right that had no matching \left.
+
+{\mathchardef}
+{\left}
+{the letter A}
+{\over}
+{the letter A}
+{\abovewithdelims}
+! Missing delimiter (. inserted).
+<to be read again>
+ ?
+l.257 ...ver A\abovewithdelims.?
+ \right(+\mskip1A\minus=A+\pen...
+I was expecting to see something like `(' or `\{' or
+`\}' here. If you typed, e.g., `{' instead of `\{', you
+should probably delete the `{' by typing `1' now, so that
+braces don't get unbalanced. Otherwise just proceed.
+Acceptable delimiters are characters whose \delcode is
+nonnegative, or you can use `\delimiter <delimiter code>'.
+
+! Missing number, treated as zero.
+<to be read again>
+ ?
+l.257 ...ver A\abovewithdelims.?
+ \right(+\mskip1A\minus=A+\pen...
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+! Illegal unit of measure (pt inserted).
+<to be read again>
+ ?
+l.257 ...ver A\abovewithdelims.?
+ \right(+\mskip1A\minus=A+\pen...
+Dimensions can be in units of em, ex, in, pt, pc,
+cm, mm, dd, cc, bp, or sp; but yours is a new one!
+I'll assume that you meant to say pt, for printer's points.
+To recover gracefully from this error, it's best to
+delete the erroneous units; e.g., type `2' to delete
+two letters. (See Chapter 27 of The TeXbook.)
+
+! Ambiguous; you need another { and }.
+<to be read again>
+ ?
+l.257 ...ver A\abovewithdelims.?
+ \right(+\mskip1A\minus=A+\pen...
+I'm ignoring this fraction specification, since I don't
+know whether a construction like `x \over y \over z'
+means `{x \over y} \over z' or `x \over {y \over z}'.
+
+{the character ?}
+{\right}
+
+(->\delimiter "4162362
+{the character +}
+{\mskip}
+! Illegal unit of measure (mu inserted).
+<to be read again>
+ A
+l.257 ...elims.?\right(+\mskip1A
+ \minus=A+\penalty+1000A
+The unit of measurement in math glue must be mu.
+To recover gracefully from this error, it's best to
+delete the erroneous units; e.g., type `2' to delete
+two letters. (See Chapter 27 of The TeXbook.)
+
+{the letter A}
+{\mathchar"322D}
+{the character =}
+{the letter A}
+{the character +}
+{\penalty}
+{the letter A}
+{blank space }
+{\relpenalty}
+{\binoppenalty}
+{\mathsurround}
+{math shift character $}
+! \scriptfont 0 is undefined (character ?).
+<recently read> $
+
+l.260 \mathsurround.11em$
+ \x % this formula goes on line 7
+Somewhere in the math formula just ended, you used the
+stated character from an undefined font family. For example,
+plain TeX doesn't allow \it or \sl in subscripts. Proceed,
+and I'll try to forget that I needed that character.
+
+{restoring \mathsurround=0.0pt}
+{restoring \binoppenalty=0}
+{restoring \relpenalty=0}
+{restoring \minus=\mathchar"232D}
+{restoring \fam=0}
+{horizontal mode: \char"C8}
+Missing character: There is no ^^c8 in font trip!
+{math shift character $}
+@firstpass
+$[] \ip /
+@\penalty via @@0 b=0 p=-3333 d=-11108888
+@@1: line 7.2 t=-11108888 -> @@0
+ A \smalltrip --
+@\penalty via @@0 b=0 p=-2222 d=-4937283
+@@2: line 7.2 t=-4937283 -> @@0
+@\penalty via @@1 b=0 p=-2222 d=-4937283
+@@3: line 8.2 t=-16046171 -> @@1
+ \ip A /
+@\penalty via @@0 b=0 p=1000 d=1000001
+@@4: line 7.2 t=1000001 -> @@0
+@\penalty via @@2 b=0 p=1000 d=1000001
+@\penalty via @@1 b=0 p=1000 d=1000001
+@@5: line 8.2 t=-10108887 -> @@1
+@\penalty via @@3 b=0 p=1000 d=1000001
+@@6: line 9.2 t=-15046170 -> @@3
+ A$
+@\par via @@0 b=0 p=-10000 d=1
+@@7: line 7.2- t=1 -> @@0
+@\par via @@4 b=0 p=-10000 d=1
+@\par via @@2 b=0 p=-10000 d=1
+@\par via @@1 b=0 p=-10000 d=1
+@@8: line 8.2- t=-11108887 -> @@1
+@\par via @@5 b=0 p=-10000 d=1
+@\par via @@3 b=0 p=-10000 d=1
+@@9: line 9.2- t=-16046170 -> @@3
+@\par via @@6 b=0 p=-10000 d=1
+@@10: line 10.2- t=-15046169 -> @@6
+
+%% goal height=16383.99998, max depth=2.0
+{display math mode: blank space }
+{\vadjust}
+{internal vertical mode: \penalty}
+{end-group character }}
+{restoring \parshape=10}
+{restoring \hangafter=-12}
+{restoring \hangindent=-10.0pt}
+{restoring \looseness=-2}
+{display math mode: \mkern}
+{\the}
+{the character 7}
+{\prevgraf}
+{\insert}
+! You can't \insert255.
+<to be read again>
+ {
+l.262 ...\prevgraf=8 \insert255{
+ \penalty999}
+I'm changing to \insert0; box 255 is special.
+
+{internal vertical mode: \penalty}
+{end-group character }}
+{restoring \parshape=10}
+{restoring \hangafter=-12}
+{restoring \hangindent=-10.0pt}
+{restoring \looseness=-2}
+{display math mode: blank space }
+{\char"C8}
+{\vcenter}
+{internal vertical mode: end-group character }}
+{restoring \parshape=10}
+{restoring \hangafter=-12}
+{restoring \hangindent=-10.0pt}
+{restoring \looseness=-2}
+{display math mode: blank space }
+{begin-group character {}
+{math mode: \mathaccent}
+{the letter A}
+{end-group character }}
+{end-group character }}
+{display math mode: subscript character |}
+{blank space }
+{superscript character ^}
+{math mode: \raise}
+{restricted horizontal mode: the letter a}
+{end-group character }}
+{math mode: \displaystyle}
+{\char}
+{\textstyle}
+{end-group character }}
+{display math mode: blank space }
+{\overline}
+{math mode: superscript character ^}
+{blank space }
+{the letter A}
+{subscript character |}
+{\mathinner}
+{end-group character }}
+{superscript character ^}
+{the letter A}
+{blank space }
+{\mathchar}
+{\char}
+{subscript character ^^A}
+{\mathaccent}
+{\mathop}
+{blank space }
+{\mathbin}
+{blank space }
+{\mathopen}
+{blank space }
+{\mathpunct}
+{\mathclose}
+{blank space }
+{\mathrel}
+{blank space }
+{\global}
+{\mathaccent}
+{\fam}
+{the letter A}
+{the character 9}
+{\the}
+! Bad number (-1).
+<to be read again>
+ }
+l.269 ...the\scriptscriptfont-1}
+ }}}}
+Since I expected to read a number between 0 and 15,
+I changed this one to zero.
+
+{select font trip}
+{end-group character }}
+{restoring current font=\ip}
+{restoring \fam=-1}
+{end-group character }}
+{end-group character }}
+{end-group character }}
+{end-group character }}
+{display math mode: blank space }
+{\mathop}
+{superscript character ^}
+{\mathop}
+{\nolimits}
+{\limits}
+{subscript character |}
+{blank space }
+{\mathord}
+! Missing { inserted.
+<to be read again>
+ \radical
+l.272 \mathord \radical
+ "161 % missing { will be inserted
+A left brace was mandatory here, so I've put one in.
+You might want to delete and/or insert some corrections
+so that I will find a matching right brace soon.
+(If you're confused by all this, try typing `I}' now.)
+
+{math mode: \radical}
+{\textstyle}
+{\radical}
+{\left}
+
+(->\delimiter "4162362
+{\scriptscriptstyle}
+{\mathop}
+{\underline}
+{blank space }
+{the letter A}
+{\atop}
+{\displaystyle}
+{the letter A}
+{subscript character |}
+{the letter A}
+{\hfil}
+{\over}
+{the letter B}
+{\nonscript}
+{\kern}
+{end-group character }}
+{superscript character ^}
+{end-group character }}
+{end-group character }}
+{blank space }
+{\nolimits}
+{subscript character |}
+{\mathop}
+{\nonscript}
+{\textstyle}
+{\nonscript}
+{\mskip}
+{\showthe}
+> 9.0mu minus 1.0fil.
+l.276 \showthe\lastskip
+ B\abovewithdelims(.2pt\displa...
+
+{the letter B}
+{\abovewithdelims}
+
+(->\delimiter "4162362
+{\displaylimits}
+! Limit controls must follow a math operator.
+<recently read> \displaylimits
+
+l.276 ...lims(.2pt\displaylimits
+ }^z
+I'm ignoring this misplaced \limits or \nolimits command.
+
+{end-group character }}
+{superscript character ^}
+
+z->\delimiter "4162362
+{blank space }
+{\discretionary}
+{restricted horizontal mode: \showthe}
+> 1000.
+l.277 ...ry{\showthe\spacefactor
+ -}{\smalltrip A\hss}{\smalltr...
+
+{the character -}
+{end-group character }}
+{select font trip at 5.0pt}
+{the letter A}
+{\hss}
+{end-group character }}
+{restoring current font=\ip}
+! Improper discretionary list.
+l.277 ...tor-}{\smalltrip A\hss}
+ {\smalltrip A}
+Discretionary lists must contain only boxes and kerns.
+
+The following discretionary sublist has been deleted:
+\glue 0.0 plus 1.0fil minus 1.0fil
+
+{select font trip at 5.0pt}
+{the letter A}
+{end-group character }}
+{restoring current font=\ip}
+! Illegal math \discretionary.
+l.277 ...ip A\hss}{\smalltrip A}
+
+Sorry: The third part of a discretionary break must be
+empty, in math formulas. I had to delete your third part.
+
+{math mode: blank space }
+{\right}
+{the letter A}
+{end-group character }}
+{end-group character }}
+{end-group character }}
+{display math mode: blank space }
+{\let}
+{\aftergroup}
+{\eqno}
+{math mode: \aftergroup}
+{\scriptstyle}
+{\mathchar"232D}
+
+(->\delimiter "4162362
+{\delimiter}
+{\mathpunct}
+{the letter A}
+{the letter A}
+{end-group character }}
+{blank space }
+{subscript character |}
+{the letter B}
+{\fam}
+{the character -}
+{end-group character }}
+{restoring \fam=-1}
+{superscript character ^}
+{\hbox}
+{restricted horizontal mode: the letter A}
+{end-group character }}
+{math mode: end-group character }}
+{begin-group character {}
+{\above}
+{begin-group character {}
+{the letter v}
+{\overwithdelims}
+{blank space }
+{\displaystyle}
+{begin-group character {}
+{the letter p}
+{the letter q}
+{\atopwithdelims}
+
+(->\delimiter "4162362
+
+(->\delimiter "4162362
+{\vrule}
+{end-group character }}
+{end-group character }}
+{blank space }
+{\show}
+> \penalty=\mathchar"232D.
+l.284 \show\penalty
+ \showlonglists
+
+
+\showlonglists ->{\tracingcommands 0\pagefillstretch -1\dimen 100 \showb
+oxbreadth 9999 \showboxdepth 9999 \showlists \pagegoal =10000pt}
+{begin-group character {}
+{\tracingcommands}
+
+### math mode entered at line 284
+### math mode entered at line 282
+\mathord
+.\fraction, thickness = default
+.\\mathord
+.\.\fam1 v
+./\displaystyle
+./\mathord
+./.\fraction, thickness 0.0, left-delimiter "162362, right-delimiter "16
+2362
+./.\\mathord
+./.\.\fam1 p
+./.\\mathrel
+./.\.\fam1 q
+././\rule(9.0+*)x0.4
+\mathord
+this will be denominator of:
+\fraction, thickness 9.0
+\{}
+### math mode entered at line 280
+\scriptstyle
+\mathbin
+.\fam3 -
+\mathopen
+.\fam1 b
+\mathpunct
+.\mathord
+..\fam1 A
+.\mathord
+..\fam1 A
+^\hbox(7.0+1.0)x2.0
+^.\ip A
+_\mathord
+_.\fam1 B
+_\mathord
+_.\fam0 -
+\mathord
+### display math mode entered at line 261
+\vadjust
+.\penalty 7
+\mkern-9.0mu
+\mathord
+.\fam0 7
+\insert0, natural size 0.0; split(1.0 plus 43.0,-2.0); float cost 100
+.\penalty 999
+\mathord
+.\fam0 ^^c8
+\vcenter
+.\vbox(-2.0+0.0)x0.0
+\accent\fam3 -
+.\fam1 A
+^\mathord
+^.\hbox(7.0+1.0)x2.0, shifted -2.0
+^..\ip a
+^\displaystyle
+^\mathbin
+^.\fam1 /
+^\textstyle
+_\fam0 -
+\overline
+.\mathord
+.^\fam1 A
+.\mathord
+..\fam1 A
+._\fam3 -
+.\mathinner
+..{}
+.^\mathord
+.^.\fam1 A
+.^\mathord
+.^.\fam1 A
+.^\mathord
+.^.\fam1 B
+.^_\accent\fam1 a
+.^_.\mathop
+.^_..\fam1 A
+.^_.\mathbin
+.^_..\fam1 A
+.^_.\mathopen
+.^_..\fam1 A
+.^_.\mathpunct
+.^_..\fam1 A
+.^_.\mathclose
+.^_..\fam1 A
+.^_.\mathrel
+.^_..\fam1 A
+.^_.\accent\fam1 a
+.^_..\mathord
+.^_...\fam13 A
+.^_..\mathord
+.^_...\fam13 9
+\mathop
+.\fam1 B
+^\fam1 C
+\mathop\limits
+.\fam1 b
+_\fam1 C
+\mathord
+.\radical"161
+..\textstyle
+..\radical"282382
+...\mathinner
+....\left"162362
+....\scriptscriptstyle
+....\mathop\nolimits
+.....\underline
+......\fraction, thickness 0.0
+......\\mathord
+......\.\fam1 A
+....../\displaystyle
+....../\mathord
+....../.\fam1 A
+....../^\fam2 -
+....../_\fraction, thickness = default
+....../_\\mathord
+....../_\.\fam1 A
+....../_\\glue 0.0 plus 1.0fil
+....../_/\mathord
+....../_/.\fam1 B
+....../_/\glue(\nonscript)
+....../_/\kern 1.0
+....^\fam1 b
+...._\fraction, thickness 2.0, left-delimiter "162362
+...._\\mathop
+...._\.\fam3
+...._\\glue(\nonscript)
+...._\\textstyle
+...._\\glue(\nonscript)
+...._\\glue(\mskip) 9.0mu minus 1.0fil
+...._\\mathord
+...._\.\fam1 B
+...._/{}
+....\discretionary
+.....\kern-1.00002
+.....\ip -
+....|\smalltrip A
+....\right"161361
+...\mathord
+....\fam1 A
+### vertical mode entered at line 0
+### current page:
+\glue(\topskip) 7.3 plus 1.0fil
+\hbox(12.7+3.7)x17.0, glue set 0.17223fil, shifted 7.0
+.\glue(\leftskip) 3.0
+.\mathon, surrounded 1.1
+.\hbox(12.7+3.7)x4.80002
+..\hbox(0.0+0.0)x0.1, shifted -7.0
+..\hbox(12.7+3.7)x1.70001
+...\hbox(0.0+0.0)x0.1, shifted -7.0
+...\vbox(12.7+3.7)x1.5
+....\hbox(3.5+0.5)x1.5
+.....\smalltrip A
+....\kern1.2
+....\rule(1.0+0.0)x*
+....\kern6.2
+....\hbox(3.5+0.5)x1.5
+.....\smalltrip A
+...\hbox(0.0+0.0)x0.1, shifted -7.0
+..\hbox(8.0+2.0)x3.0, shifted -4.0
+...\ip b
+.\glue(\medmuskip) 0.55554 minus 0.83331
+.\ip /
+.\penalty -3333
+.\glue 0.27777
+.\glue(\medmuskip) 0.55554 minus 0.83331
+.\ip A
+.\kern1.0
+.\glue(\thickmuskip) -1.11108
+.\smalltrip -
+.\smalltrip -
+.\penalty -2222
+.\glue(\thickmuskip) -1.11108
+.\ip A
+.\glue(\medmuskip) 0.55554 minus 0.83331
+.\ip /
+.\penalty 1000
+.\glue(\medmuskip) 0.55554 minus 0.83331
+.\ip A
+.\kern1.0
+.\mathoff, surrounded 1.1
+.\penalty 10000
+.\glue(\parfillskip) 0.0
+.\glue(\rightskip) 0.0 plus 10.0fil minus 0.00002
+total height 21.7 plus 1.0fil plus -803.0fill
+ goal height 16383.99998
+prevdepth 3.7, prevgraf 8 lines
+
+! OK.
+\showlonglists ...99 \showlists
+ \pagegoal =10000pt}
+l.284 ...\penalty \showlonglists
+
+
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{math shift character $}
+! Missing } inserted.
+<inserted text>
+ }
+...
+l.285 $
+ \expandafter$\csname!\endcsname % end of hairy displ...
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+{math shift character $}
+{display math mode: \expandafter}
+{\csname}
+Missing character: There is no v in font trip!
+{restoring \!=undefined}
+{restoring \fam=-1}
+! \textfont 0 is undefined (character 7).
+<to be read again>
+ \relax
+...
+l.285 ...fter$\csname!\endcsname
+ % end of hairy display, miss...
+Somewhere in the math formula just ended, you used the
+stated character from an undefined font family. For example,
+plain TeX doesn't allow \it or \sl in subscripts. Proceed,
+and I'll try to forget that I needed that character.
+
+! \textfont 0 is undefined (character ^^c8).
+<to be read again>
+ \relax
+...
+l.285 ...fter$\csname!\endcsname
+ % end of hairy display, miss...
+Somewhere in the math formula just ended, you used the
+stated character from an undefined font family. For example,
+plain TeX doesn't allow \it or \sl in subscripts. Proceed,
+and I'll try to forget that I needed that character.
+
+! \scriptfont 0 is undefined (character -).
+<to be read again>
+ \relax
+...
+l.285 ...fter$\csname!\endcsname
+ % end of hairy display, miss...
+Somewhere in the math formula just ended, you used the
+stated character from an undefined font family. For example,
+plain TeX doesn't allow \it or \sl in subscripts. Proceed,
+and I'll try to forget that I needed that character.
+
+! \scriptscriptfont 13 is undefined (character A).
+<to be read again>
+ \relax
+...
+l.285 ...fter$\csname!\endcsname
+ % end of hairy display, miss...
+Somewhere in the math formula just ended, you used the
+stated character from an undefined font family. For example,
+plain TeX doesn't allow \it or \sl in subscripts. Proceed,
+and I'll try to forget that I needed that character.
+
+! \scriptscriptfont 13 is undefined (character 9).
+<to be read again>
+ \relax
+...
+l.285 ...fter$\csname!\endcsname
+ % end of hairy display, miss...
+Somewhere in the math formula just ended, you used the
+stated character from an undefined font family. For example,
+plain TeX doesn't allow \it or \sl in subscripts. Proceed,
+and I'll try to forget that I needed that character.
+
+Missing character: There is no in font trip!
+
+Overfull \hbox (48.4746pt too wide) detected at line 285
+[][][] [] [] []|
+
+\hbox(68.26251+98.15005)x19.0, glue set - 1.0
+.\kern -2.49994
+.\vbox(6.0+-8.0)x0.0
+.etc.
+
+{restoring \penalty=\penalty}
+{restoring \displayindent=0.0pt}
+{restoring \displaywidth=0.0pt}
+{restoring \predisplaysize=0.0pt}
+{restoring \fam=0}
+{horizontal mode: \expandafter}
+{undefined}
+! Undefined control sequence.
+<recently read> \!
+
+l.285 ...fter$\csname!\endcsname
+ % end of hairy display, miss...
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+% t=21.7 plus 1.0fil plus -803.0fill g=10000.0 b=0 p=0 c=0#
+% t=262.41258 plus 80.0 plus 1.0fil plus -803.0fill g=10000.0 b=0 p=7 c=
+7
+% t=262.41258 plus 80.0 plus 1.0fil plus -803.0fill g=10000.0 b=0 p=-117
+9647 c=-1179647#
+\output->{\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999
+ \showboxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2
+\ifhbox 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \
+fi }
+{internal vertical mode: \tracingcommands}
+> -1179647.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+...
+l.285 ...fter$\csname!\endcsname
+ % end of hairy display, miss...
+
+
+Completed box being shipped out [-2.0.0.0.11.0.327680]
+\vbox(10000.0+2.0)x28.0, glue set 9737.58789fil
+.\glue(\topskip) 7.3 plus 1.0fil
+.\hbox(12.7+3.7)x17.0, glue set 0.17223fil, shifted 7.0
+..\glue(\leftskip) 3.0
+..\mathon, surrounded 1.1
+..\hbox(12.7+3.7)x4.80002
+...\hbox(0.0+0.0)x0.1, shifted -7.0
+...\hbox(12.7+3.7)x1.70001
+....\hbox(0.0+0.0)x0.1, shifted -7.0
+....\vbox(12.7+3.7)x1.5
+.....\hbox(3.5+0.5)x1.5
+......\smalltrip A
+.....\kern1.2
+.....\rule(1.0+0.0)x*
+.....\kern6.2
+.....\hbox(3.5+0.5)x1.5
+......\smalltrip A
+....\hbox(0.0+0.0)x0.1, shifted -7.0
+...\hbox(8.0+2.0)x3.0, shifted -4.0
+....\ip b
+..\glue(\medmuskip) 0.55554 minus 0.83331
+..\ip /
+..\penalty -3333
+..\glue 0.27777
+..\glue(\medmuskip) 0.55554 minus 0.83331
+..\ip A
+..\kern1.0
+..\glue(\thickmuskip) -1.11108
+..\smalltrip -
+..\smalltrip -
+..\penalty -2222
+..\glue(\thickmuskip) -1.11108
+..\ip A
+..\glue(\medmuskip) 0.55554 minus 0.83331
+..\ip /
+..\penalty 1000
+..\glue(\medmuskip) 0.55554 minus 0.83331
+..\ip A
+..\kern1.0
+..\mathoff, surrounded 1.1
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0 plus 10.0fil minus 0.00002
+.\penalty 0
+.\glue(\abovedisplayskip) 3.0
+.\glue(\lineskip) 0.0 plus 40.0
+.\hbox(68.26251+98.15005)x19.0, glue set - 1.0, shifted 9.0
+..\kern -2.49994
+..\vbox(6.0+-8.0)x0.0
+..\vbox(17.1+4.2)x5.99
+...\kern17.1
+...\hbox(0.0+0.0)x0.0, shifted 8.5
+....\bigtr
+p -
+...\kern-17.1
+...\hbox(17.1+4.2)x5.99
+....\ip A
+....\vbox(21.3+0.0)x3.99, shifted 4.2
+.....\hbox(9.0+0.0)x2.99, shifted 1.0
+......\hbox(7.0+1.0)x2.0, shifted -2.0
+.......\ip a
+......\ip /
+.....\kern12.3
+.....\hbox(0.0+0.0)x-0.01
+..\vbox(25.76251+4.1)x15.0156
+...\kern1.0
+...\rule(1.0+0.0)x*
+...\kern3.0
+...\hbox(20.76251+4.1)x15.0156
+....\hbox(3.5+0.5)x1.49, shifted -8.3
+.....\smalltrip A
+....\ip A
+....\hbox(0.0+0.0)x-5.01, shifted 4.1
+.....\ip -
+....\glue(\thinmuskip) 0.27777 plus 2.0fill minus 0.83331
+....\hbox(0.0+0.0)x0.0
+....\hbox(4.0+16.20003)x16.25781, shifted -16.76251
+.....\smalltrip A
+.....\kern0.5
+.....\kern1.0
+.....\smalltrip B
+.....\vbox(16.00002+2.0)x12.2678, shifted 14.20003
+......\kern8.99998
+......\hbox(0.0+0.0)x0.0, shifted 2.1389
+.......\bigtr
+p ^^82
+......\kern-8.99998
+......\hbox(16.00002+2.0)x12.2778
+.......\hbox(14.00002+2.0)x6.00002, shifted -0.99998
+........\bigtr
+p A
+.......\glue(\thinmuskip) 0.27777 plus 2.0fill minus 0.83331
+.......\bigtr
+p A
+.......\kern2.0
+.......\vbox(16.00002+0.0)x0.0
+........\hbox(14.00002+2.0)x0.0, shifted -3.0
+.........\bigtr
+p a
+........\kern0.0
+........\hbox(0.0+0.0)x0.0
+..\glue(\thinmuskip) 0.27777 plus 2.0fill minus 0.83331
+..\vbox(28.0+0.0)x3.0
+...\kern10.0
+...\hbox(0.0+0.0)x3.0, glue set 0.5fil
+....\glue 0.0 plus 1.0fil minus 1.0fil
+....\smalltrip C
+....\glue 0.0 plus 1.0fil minus 1.0fil
+...\kern6.0
+...\hbox(12.0+0.0)x3.0
+....\hbox(8.0+2.0)x3.0, shifted -4.0
+.....\ip B
+..\glue(\thinmuskip) 0.27777 plus 2.0fill minus 0.83331
+..\vbox(7.0+18.0)x8.0
+...\hbox(7.0+0.0)x8.0
+....\hbox(0.0+0.0)x8.0, shifted -7.0
+.....\ip M
+...\kern8.0
+...\hbox(0.0+0.0)x8.0, glue set 3.0fil, shifted -1.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+....\smalltrip C
+....\glue 0.0 plus 1.0fil minus 1.0fil
+...\kern10.0
+..\glue(\thinmuskip) 0.27777 plus 2.0fill minus 0.83331
+..\hbox(68.26251+98.15005)x39.63556
+...\hbox(68.26251+98.15005)x39.63556
+....\hbox(7.0+1.0)x3.0, shifted -54.26251
+.....\ip a
+....\vbox(68.26251+98.15005)x36.63556
+.....\kern7.0
+.....\rule(7.0+0.0)x*
+.....\kern1.56248
+.....\hbox(52.70003+98.15005)x36.63556
+......\hbox(0.0+0.0)x0.1, shifted -52.70003
+......\vbox(52.70003+98.15005)x36.53555
+.......\kern0.0
+.......\rule(0.0+0.0)x*
+.......\kern1.25
+.......\hbox(51.45003+98.15005)x36.53555
+........\hbox(51.45003+98.15005)x33.25778
+.........\vbox(-1.00002+22.99995)x7.0, shifted -18.99998
+..........\hbox(-1.00002+2.0)x7.0
+...........\ip
+
+..........\hbox(-1.00002+2.0)x7.0
+...........\ip
+
+..........\hbox(7.0+1.0)x3.0
+...........\ip A
+..........\hbox(-1.00002+2.0)x7.0
+...........\ip
+
+..........\hbox(-1.00002+2.0)x7.0
+...........\ip
+
+..........\hbox(8.0+2.0)x3.0
+...........\ip B
+.........\hbox(35.75003+94.55006)x8.39005
+..........\vbox(35.75003+94.55006)x8.39005
+...........\hbox(35.75003+49.05003)x8.39005
+............\hbox(0.0+0.0)x0.1, shifted -7.0
+............\vbox(35.75003+49.05003)x8.19003
+.............\hbox(14.00002+2.0)x8.19003, glue set 1.09502fil
+..............\glue 0.0 plus 1.0fil minus 1.0fil
+..............\bigtr
+p A
+..............\kern2.0
+..............\glue 0.0 plus 1.0fil minus 1.0fil
+.............\kern27.30002
+.............\hbox(8.1+33.40002)x8.19003
+..............\ip A
+..............\vbox(27.75002+13.75002)x6.19003, shifted 19.65001
+...............\hbox(0.0+0.0)x-2.51, shifted 1.0
+................\smalltrip -
+...............\kern4.0
+...............\hbox(23.75002+13.75002)x6.19003
+................\hbox(0.0+0.0)x0.1, shifted -7.0
+................\vbox(23.75002+13.75002)x6.00002
+.................\hbox(14.00002+2.0)x6.00002
+..................\bigtr
+p A
+..................\kern2.0
+..................\glue 0.0 plus 1.0fil
+.................\kern0.5
+.................\rule(0.5+0.0)x*
+.................\kern0.5
+.................\hbox(16.0+4.00002)x6.00002, glue set 0.00002fil
+..................\glue 0.0 plus 1.0fil minus 1.0fil
+..................\bigtr
+p B
+..................\glue(\nonscript)
+..................\glue 0.0 plus 1.0fil minus 1.0fil
+................\hbox(0.0+0.0)x0.1, shifted -7.0
+............\hbox(0.0+0.0)x0.1, shifted -7.0
+...........\kern27.30002
+...........\rule(9.1+0.0)x*
+.........\vbox(146.40009+3.2)x11.86772, shifted 94.95006
+..........\hbox(16.0+4.00002)x5.99
+...........\bigtr
+p b
+..........\kern106.40007
+..........\hbox(20.0+3.2)x11.86772
+...........\hbox(16.0+4.00002)x6.0, shifted -1.0
+............\bigtr
+p b
+...........\vbox(20.0+3.2)x5.77771
+............\hbox(8.0+2.0)x5.77771
+.............\hbox(0.0+0.0)x0.0, shifted -7.0
+.............\glue(\nonscript)
+.............\glue(\nonscript)
+.............\glue 2.49994 minus 1.0fil
+.............\glue(\thinmuskip) 0.27777 plus 2.0fill minus 0.83331
+.............\ip B
+............\kern2.0
+............\rule(2.0+0.0)x*
+............\kern9.2
+............\hbox(0.0+0.0)x5.77771
+...........\hbox(0.0+0.0)x0.1, shifted -7.0
+.........\discretionary
+..........\kern-1.00002
+..........\ip -
+.........|\smalltrip A
+.........\hbox(14.00002+2.0)x6.00002, shifted -0.99998
+..........\bigtr
+p a
+........\glue(\thinmuskip) 0.27777 plus 2.0fill minus 0.83331
+........\ip A
+........\kern1.0
+..\rule(*+*)x5.0
+.\penalty 10000
+.\glue(\lineskip) 0.0 plus 40.0
+.\hbox(20.5+50.80002)x8.27895, shifted 19.72105
+..\ip -
+..\smalltrip b
+..\hbox(3.5+0.5)x1.5
+...\smalltrip A
+...\kern0.5
+..\vbox(26.0+4.00002)x1.99, shifted 10.8
+...\hbox(7.0+1.0)x1.99
+....\ip A
+...\kern2.0
+...\hbox(16.0+4.00002)x0.99
+....\bigtr
+p B
+....\ip -
+..\hbox(20.5+50.80002)x8.28894
+...\hbox(20.5+50.80002)x8.28894
+....\hbox(0.0+0.0)x0.1, shifted -7.0
+....\vbox(20.5+50.80002)x8.08893
+.....\hbox(0.0+0.0)x8.08893
+.....\kern9.0
+.....\rule(9.0+0.0)x*
+.....\kern9.0
+.....\hbox(20.65001+23.65001)x8.08893
+......\hbox(20.65001+23.65001)x8.08893
+.......\hbox(20.65001+23.65001)x8.08893
+........\hbox(0.0+0.0)x0.1, shifted -7.0
+........\vbox(20.65001+23.65001)x7.88892
+.........\hbox(0.0+0.0)x7.88892
+.........\kern9.1
+.........\rule(9.1+0.0)x*
+.........\kern9.1
+.........\hbox(12.0+5.0)x7.88892
+..........\hbox(12.0+5.0)x7.88892
+...........\hbox(8.0+2.0)x3.0, shifted -4.0
+............\ip b
+...........\vbox(11.0+5.0)x1.88892
+............\hbox(0.0+0.0)x1.88892
+.............\ip p
+.............\ip t
+.............\ip s
+.............\ip q
+.............\ip t
+.............\kern3.0
+.............\ip q
+.............\ip p
+.............\glue(\thickmuskip) -1.11108
+.............\ip u
+............\kern7.0
+............\hbox(9.0+0.0)x1.88892, glue set 0.74446fil
+.............\glue 0.0 plus 1.0fil minus 1.0fil
+.............\rule(9.0+*)x0.4
+.............\glue 0.0 plus 1.0fil minus 1.0fil
+...........\hbox(8.0+2.0)x3.0, shifted -4.0
+............\ip b
+........\hbox(0.0+0.0)x0.1, shifted -7.0
+......\hbox(0.0+0.0)x0.0
+....\hbox(0.0+0.0)x0.1, shifted -7.0
+.\penalty 7
+
+Memory usage before: 2170&521; after: 1181&459; still untouched: 175
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{restoring \parshape=10}
+{restoring \hangafter=-12}
+{restoring \hangindent=-10.0pt}
+{restoring \looseness=-2}
+{horizontal mode: \relax}
+{\parshape}
+{\leftskip}
+{\spacefactor}
+{\raise}
+{restricted horizontal mode: \special}
+{blank space }
+{end-group character }}
+{horizontal mode: blank space }
+{\penalty}
+{\showbox}
+> \box0=
+\vbox(0.0+0.0)x0.0
+.\penalty 999
+
+! OK.
+<to be read again>
+ \spacefactor
+l.289 \showbox0\spacefactor
+ =0
+
+{\spacefactor}
+! Bad space factor (0).
+l.289 \showbox0\spacefactor=0
+
+I allow only values in the range 1..32767 here.
+
+{\write}
+{\par}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 12.0 t=100000782 -> @@0
+@\penalty via @@0 b=10000 p=-10000 d=100000782
+@@2: line 12.0 t=100000782 -> @@0
+@\penalty via @@1 b=10000 p=-10000 d=100000000
+@@3: line 13.0 t=200000782 -> @@1
+[]
+@\par via @@2 b=10000 p=-10000 d=100000000
+@@4: line 13.0- t=200000782 -> @@2
+@\par via @@3 b=10000 p=-10000 d=100000000
+@@5: line 14.0- t=300000782 -> @@3
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 285--290
+ []
+
+\hbox(1.0+0.0)x90.0, glue set 41.0
+.\glue(\leftskip) 0.0 plus -10.0fil
+.\hbox(0.0+0.0)x4.0, shifted -1.0 []
+.etc.
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 285--290
+ []
+
+\hbox(0.0+0.0)x100.0
+.\glue(\leftskip) 0.0 plus -10.0fil
+.\write10{\the \spacefactor }
+.etc.
+
+%% goal height=16383.99998, max depth=2.0
+% t=20.0 plus 1.0fil g=16383.99998 b=0 p=125 c=125#
+{vertical mode: end-group character }}
+! Extra }, or forgotten \endgroup.
+l.291 }
+ % this fails to match \begingroup
+I've deleted a group-closing symbol because it seems to be
+spurious, as in `$x}$'. But perhaps the } is legitimate and
+you forgot something else, as in `\hbox{$x}'. In such cases
+the way to recover is to insert both the forgotten and the
+deleted material, e.g., by typing `I$}'.
+
+{blank space }
+{\aftergroup}
+{\aftergroup}
+{\endgroup}
+{restoring \hangafter=-12}
+{restoring \hangindent=-10.0pt}
+{restoring \leftskip=3.0pt}
+{restoring \parshape=10}
+{restoring \rightskip=0.0pt}
+{restoring \looseness=0}
+{\lccode}
+{\mark}
+! Improper \spacefactor.
+l.293 \mark{\the\spacefactor
+ } % \spacefactor: not in vertical...
+You can refer to \spacefactor only in horizontal mode;
+you can refer to \prevdepth only in vertical mode; and
+neither of these is meaningful inside \write. So
+I'm forgetting what you said and using zero instead.
+
+{blank space }
+{math shift character $}
+% t=30.0 plus 41.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{horizontal mode: math shift character $}
+@firstpass
+@secondpass
+[]
+@\par via @@0 b=10000 p=-10000 d=*
+@@1: line 1.0- t=0 -> @@0
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 294--294
+ []
+
+\hbox(0.0+0.0)x11.0
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{display math mode: \global}
+{\mskip}
+{\catcode}
+{\catcode}
+{\the}
+{\def}
+{blank space }
+{\vtop}
+{internal vertical mode: \everydisplay}
+{\vbox}
+{end-group character }}
+{\noindent}
+{horizontal mode: math shift character $}
+\everydisplay->\global
+{display math mode: \global}
+{\lowercase}
+{the letter a}
+{the letter a}
+
+j->\relax
+{\relax}
+{math shift character $}
+{internal vertical mode: \ifvmode}
+{true}
+{restoring \displayindent=3.0pt}
+{restoring \displaywidth=13.0pt}
+{restoring \predisplaysize=24.0pt}
+{restoring \fam=-1}
+{horizontal mode: \fi}
+{end-group character }}
+{restoring \everydisplay=}
+{restoring \parshape=10}
+{restoring \hangafter=-12}
+{restoring \hangindent=-10.0pt}
+{display math mode: \hss}
+{\leqno}
+{math mode: \mathchardef}
+! Missing control sequence inserted.
+<inserted text>
+ \inaccessible
+...
+l.298 \leqno\mathchardef A
+ \/\left(\over\left(\global\errorcon...
+Please don't say `\def cs{...}', say `\def\cs{...}'.
+I've inserted an inaccessible control sequence so that your
+definition will be completed without mixing me up too badly.
+You can recover graciously from this error, if you're
+careful; see exercise 27.2 in The TeXbook.
+
+! Missing number, treated as zero.
+<to be read again>
+ A
+l.298 \leqno\mathchardef A
+ \/\left(\over\left(\global\errorcon...
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+{the letter A}
+{\/}
+{\left}
+
+(->\delimiter "4162362
+{\over}
+{\left}
+
+(->\delimiter "4162362
+{\global}
+{math shift character $}
+! Missing \right. inserted.
+<inserted text>
+ \right .
+<to be read again>
+ $
+l.298 ...bal\errorcontextlines5$
+ $
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{\right}
+{math shift character $}
+! Missing \right. inserted.
+<inserted text>
+ \right .
+<to be read again>
+ $
+l.298 ...bal\errorcontextlines5$
+ $
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{\right}
+{math shift character $}
+{restoring \inaccessible=undefined}
+{restoring \fam=-1}
+{restoring j=undefined}
+{restoring \catcode106=11}
+{restoring \catcode74=11}
+{restoring \displayindent=0.0pt}
+{restoring \displaywidth=0.0pt}
+{restoring \predisplaysize=0.0pt}
+{restoring \fam=0}
+% t=40.0 plus 124.0 plus 1.0fil minus 8.0 g=16383.99998 b=0 p=0 c=0#
+% t=66.00002 plus 164.0 plus 1.0fil minus 8.0 g=16383.99998 b=0 p=-11796
+47 c=-1179647#
+\output->{\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999
+ \showboxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2
+\ifhbox 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \
+fi }
+{internal vertical mode: \tracingcommands}
+> -1179647.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+l.298 ...al\errorcontextlines5$$
+
+
+
+Completed box being shipped out [-2.0.0.0.11.0.327680.1572864.0.-1073741
+823]
+\vbox(16383.99998+2.0)x100.0, glue set 16318.0fil
+.\glue(\topskip) 19.0 plus 1.0fil
+.\hbox(1.0+0.0)x90.0, glue set 41.0
+..\glue(\leftskip) 0.0 plus -10.0fil
+..\hbox(0.0+0.0)x4.0, shifted -1.0
+...\special{-12}
+...\glue 4.0 plus 2.0 minus 1.0
+..\glue 4.0 plus 2.0 minus 1.0
+..\penalty -10000
+..\glue(\rightskip) 0.0 plus 10.0fil minus 0.00002
+.\penalty 125
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+0.0)x100.0
+..\glue(\leftskip) 0.0 plus -10.0fil
+..\write10{\the \spacefactor }
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0 plus 10.0fil minus 0.00002
+.\mark{0}
+.\glue(\parskip) 0.0 plus 42.0 minus 8.0
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+0.0)x11.0, shifted 1.0
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\penalty 10000
+..\glue(\parfillskip) 0.0
+..\glue(\rightskip) 0.0
+.\penalty 0
+.\glue(\abovedisplayskip) 3.0
+.\glue(\lineskip) 0.0 plus 40.0
+.\hbox(12.0+13.00002)x13.0, shifted 3.0
+..\hbox(12.0+4.0)x8.1778
+...\ip A
+...\kern1.0
+...\kern0.0
+...\glue(\thinmuskip) 0.27777 plus 2.0fill minus 0.83331
+...\hbox(12.0+4.0)x4.90002
+....\hbox(8.0+2.0)x3.0, shifted -4.0
+.....\ip b
+....\hbox(9.2+4.0)x1.80002
+.....\hbox(0.0+0.0)x0.1, shifted -7.0
+.....\vbox(9.2+4.0)x1.6
+......\hbox(0.0+0.0)x1.6
+......\kern1.7
+......\rule(1.0+0.0)x*
+......\kern1.0
+......\hbox(9.5+0.0)x1.6
+.......\hbox(4.0+1.0)x1.5, shifted -5.5
+........\smalltrip b
+.......\hbox(0.0+0.0)x0.1, shifted -7.0
+.....\hbox(0.0+0.0)x0.1, shifted -7.0
+....\hbox(0.0+0.0)x0.1, shifted -7.0
+..\kern5.0
+..\hbox(0.0+13.00002)x-0.1778, glue set - 57.67767fil
+...\glue 4.99988 minus 4.99988
+...\vbox(-0.00002+13.00002)x52.5, glue set - 0.00247
+....\vbox(-0.00002+0.0)x0.0
+....\glue(\parskip) 0.0 plus 42.0 minus 8.0
+....\penalty 0
+....\glue(\abovedisplayshortskip) 1.0 plus 45.0 minus 803.0
+....\glue(\baselineskip) 3.0 plus 41.0
+....\hbox(7.0+1.0)x5.0, shifted 47.5
+.....\ip a
+.....\ip a
+.....\kern1.0
+....\penalty -1179647
+....\glue(\belowdisplayshortskip) 3.0 plus 46.0
+...\glue 0.0 plus 1.0fil minus 1.0fil
+
+\write->\the \spacefactor
+! Improper \spacefactor.
+<write> \the \spacefactor
+
+<inserted text>
+ }\endwrite
+<to be read again>
+ }
+<output> ...\fi 54\copy 25\fi 4}
+ \ifvoid 254\relax \else \err...
+l.298 ...al\errorcontextlines5$$
+
+You can refer to \spacefactor only in horizontal mode;
+you can refer to \prevdepth only in vertical mode; and
+neither of these is meaningful inside \write. So
+I'm forgetting what you said and using zero instead.
+
+0
+Memory usage before: 640&415; after: 397&410; still untouched: 175
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{restoring \parshape=10}
+{restoring \hangafter=-12}
+{restoring \hangindent=-10.0pt}
+{horizontal mode: \par}
+{vertical mode: \hangindent}
+{\par}
+{\showthe}
+> 0.0pt.
+l.300 ...\par\showthe\hangindent
+ \hangindent 254cm
+
+{\hangindent}
+{\parfillskip}
+{\fontdimen}
+{\the}
+{\the}
+{the character 0}
+{horizontal mode: the character 0}
+Missing character: There is no 0 in font trip!
+{the letter A}
+{blank space }
+{\char}
+{math shift character $}
+@firstpass
+@secondpass
+[]\ip A
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+^^82
+@\par via @@0 b=62 p=-10000 d=3969
+@@2: line 1.1- t=3969 -> @@0
+
+
+Loose \hbox (badness 62) in paragraph at lines 302--303
+ []\ip A ^^82
+
+\hbox(7.0+1.0)x100.0, glue set 0.85295
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+%% goal height=16383.99998, max depth=2.0
+{display math mode: \global}
+{\leqno}
+{math mode: \kern}
+{math shift character $}
+! Display math should end with $$.
+<to be read again>
+ \par
+l.303 ...e\leqno\kern1009pt$\par
+
+The `$' that I just saw supposedly matches a previous `$$'.
+So I shall assume that you typed `$$' both times.
+
+{restoring \fam=-1}
+{restoring \displayindent=0.0pt}
+{restoring \displaywidth=0.0pt}
+{restoring \predisplaysize=0.0pt}
+{restoring \fam=0}
+% t=20.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+% t=40.0 plus 82.0 plus 1.0fil g=16383.99998 b=0 p=-1179647 c=-1179647#
+\output->{\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999
+ \showboxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2
+\ifhbox 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \
+fi }
+{internal vertical mode: \tracingcommands}
+> -1179647.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+<to be read again>
+ \par
+l.303 ...e\leqno\kern1009pt$\par
+
+
+
+Completed box being shipped out [-2.0.0.0.11.0.327680.1572864.1073741823
+.-1073741823]
+\vbox(16383.99998+0.0)x8236.0, glue set 16344.0fil
+.\glue(\topskip) 13.0 plus 1.0fil
+.\hbox(7.0+1.0)x100.0, glue set 0.85295
+..\glue(\leftskip) 3.0
+..\hbox(0.0+0.0)x0.0
+..\ip A
+..\glue 4.0 plus 1.99799 minus 1.00099
+..\ip ^^82
+..\penalty 10000
+..\glue(\parfillskip) 0.0 plus 100.0
+..\glue(\rightskip) 0.0
+.\penalty 0
+.\glue(\baselineskip) 9.0 plus 41.0
+.\hbox(0.0+0.0)x1009.0, shifted 7227.0
+..\kern 1009.0
+.\penalty 10000
+.\glue(\baselineskip) 10.0 plus 41.0
+.\hbox(0.0+0.0)x-7127.0, shifted 7227.0
+
+Memory usage before: 235&401; after: 178&399; still untouched: 175
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{restoring \hangindent=7227.0pt}
+{horizontal mode: \par}
+{vertical mode: \showlists}
+
+### vertical mode entered at line 0
+prevdepth 0.0, prevgraf 4 lines
+
+! OK.
+l.304 \showlists
+ {\catcode`!13\global\everyhbox{\def!{}}}
+
+{begin-group character {}
+{\catcode}
+{\global}
+{end-group character }}
+{restoring \catcode33=12}
+{blank space }
+{\count}
+{\baselineskip}
+{begin-group character {}
+{\sfcode}
+{\vfuzz}
+{\everyvbox}
+{\vbox}
+\everyvbox->
+{internal vertical mode: blank space }
+{\hsize}
+{\tolerance}
+{the letter A}
+{horizontal mode: the letter A}
+{blank space }
+{the letter A}
+{blank space }
+{the letter A}
+{blank space }
+{the letter A}
+{blank space }
+{the letter A}
+{\clubpenalty}
+{\par}
+@firstpass
+@secondpass
+[]\ip A A A
+@ via @@0 b=* p=0 d=*
+@@1: line 1.3 t=0 -> @@0
+A A
+@\par via @@1 b=12 p=-10000 d=*
+@@2: line 2.2- t=0 -> @@1
+
+
+Overfull \hbox (3.0pt too wide) in paragraph at lines 308--308
+ []\ip A A A|
+
+\hbox(7.0+1.0)x10.0, glue set - 1.0
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+
+Tight \hbox (badness 12) in paragraph at lines 308--308
+ \ip A A
+
+\hbox(7.0+1.0)x10.0, glue set - 0.5
+.\glue(\leftskip) 3.0
+.\ip A
+.etc.
+
+{internal vertical mode: \hbadness}
+{\hfuzz}
+{the letter A}
+{horizontal mode: the letter A}
+{blank space }
+{the letter A}
+{blank space }
+{the letter A}
+{blank space }
+{the letter A}
+{blank space }
+{the letter A}
+{\leaders}
+{\par}
+@firstpass
+@secondpass
+[]\ip A A A
+@ via @@0 b=* p=0 d=*
+@@1: line 1.3 t=0 -> @@0
+A A
+@\par via @@1 b=12 p=-10000 d=*
+@@2: line 2.2- t=0 -> @@1
+
+{internal vertical mode: end-group character }}
+{restoring \hfuzz=0.0pt}
+{restoring \hbadness=0}
+{restoring \clubpenalty=125}
+{restoring \tolerance=10000}
+{restoring \hsize=100.0pt}
+
+Overfull \vbox (18.0pt too high) detected at line 309
+
+\vbox(11.0+1.0)x10.0, glue set - 1.0
+.\hbox(7.0+1.0)x10.0, glue set - 1.0 []
+.\penalty 10000
+.etc.
+
+%% goal height=16383.99998, max depth=2.0
+{vertical mode: blank space }
+{\message}
+1000000
+{end-group character }}
+{restoring \everyvbox=}
+{restoring \vfuzz=0.0pt}
+{restoring \sfcode65=999}
+{blank space }
+{\vbox}
+{internal vertical mode: \hbadness}
+{\hfuzz}
+{\hbox}
+\everyhbox->\def !{}
+{restricted horizontal mode: \def}
+{\hskip}
+{end-group character }}
+{restoring !=undefined}
+
+Overfull \hbox (1.0pt too wide) detected at line 311
+
+
+\hbox(0.0+0.0)x0.0, glue set - 1.0
+.\glue 10.0 minus 9.0
+
+{internal vertical mode: blank space }
+{\hbadness}
+{\hbox}
+\everyhbox->\def !{}
+{restricted horizontal mode: \def}
+{\hskip}
+{end-group character }}
+{restoring !=undefined}
+
+Underfull \hbox (badness 101) detected at line 312
+
+
+\hbox(0.0+0.0)x10.03749, glue set 1.00375
+.\glue 0.0 plus 10.0
+
+{internal vertical mode: \tracingcommands}
+{\message}
+101
+{end-group character }}
+{restoring \tracingcommands=2}
+{restoring \hfuzz=0.0pt}
+{restoring \hbadness=0}
+% t=20.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{vertical mode: \lineskiplimit}
+{\everyhbox}
+{blank space }
+{\def}
+{blank space }
+{\dimendef}
+{\dimen}
+{\vbox}
+{internal vertical mode: \tracinglostchars}
+{the letter A}
+{horizontal mode: the letter A}
+{\/}
+
+\space ->
+{blank space }
+
+\space ->
+{blank space }
+{\ignorespaces}
+
+\space ->
+
+\space ->
+{the letter J}
+{blank space }
+{\vskip}
+{\par}
+@firstpass
+@secondpass
+[]\ip A
+@\kern via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+
+@\par via @@0 b=56 p=-10000 d=3249
+@\par via @@1 b=10000 p=-10000 d=100000000
+@@2: line 1.1- t=3249 -> @@0
+
+
+Loose \hbox (badness 56) in paragraph at lines 315--316
+ []\ip A
+
+\hbox(7.0+1.0)x100.0, glue set 0.82695
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{internal vertical mode: \vskip}
+{\moveleft}
+{\boxmaxdepth}
+{\mark}
+{end-group character }}
+{restoring \boxmaxdepth=1000.0pt}
+
+Underfull \vbox (badness 10000) detected at line 316
+
+\vbox(10.0+-1.0)x0.0
+.\mark{vii}
+
+{\vskip}
+{\unskip}
+{\setbox}
+{\showthe}
+> -1.0pt.
+l.317 ...astbox\showthe\lastskip
+ % \lastskip=-1pt (\baselines...
+
+{\unskip}
+{\vskip}
+{\kern}
+{\penalty}
+{\showbox}
+> \box22=
+\vbox(10.0+-1.0)x0.0
+.\mark{vii}
+
+! OK.
+<to be read again>
+ }
+l.318 ...lty\lastkern\showbox22}
+
+
+{end-group character }}
+{restoring \box22=void}
+{restoring \tracinglostchars=2}
+
+Underfull \vbox (badness 10000) detected at line 318
+
+\vbox(11.0+0.0)x100.0
+.\hbox(7.0+1.0)x100.0, glue set 0.82695 []
+.\glue 2.0
+.etc.
+
+% t=31.0 plus 40.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{vertical mode: blank space }
+{\showbox}
+> \box22=void
+
+! OK.
+<to be read again>
+ \kern
+l.319 \showbox22\kern
+ 3pt\message{\the\lastkern}\unkern
+
+{\kern}
+{\message}
+3.0pt
+{\unkern}
+{\show}
+> \botmark=\botmark:
+0.
+l.320 \show\botmark
+ \catcode`;13\def;{\setbox`; }
+
+{\catcode}
+{\def}
+{blank space }
+{\lineskiplimit}
+
+\space ->
+
+\space ->
+{blank space }
+{\count}
+{\vbox}
+
+\space ->
+{internal vertical mode: \accent}
+{horizontal mode: \accent}
+Missing character: There is no ^^c8 in font trip!
+
+\space ->
+{blank space }
+{\accent}
+
+\space ->
+
+;->\setbox `;
+! Improper \setbox.
+<to be read again>
+ \char
+l.322 ...2 \def\^^M{\ } ; \char
+ '101
+Sorry, \setbox is not allowed after \halign in a display,
+or between \accent and an accented character.
+
+{the letter A}
+{\ }
+{\fontdimen}
+{\ }
+{\spaceskip}
+
+\^^M->\
+{\ }
+{\vskip}
+{\par}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+[]\ip AA
+@ via @@0 b=10000 p=0 d=100000782
+@ via @@1 b=10000 p=0 d=100000000
+@@2: line 1.0 t=100000782 -> @@0
+
+@\par via @@0 b=44 p=-10000 d=2025
+@\par via @@1 b=54 p=-10000 d=3025
+@\par via @@2 b=10000 p=-10000 d=100000000
+@@3: line 1.1- t=2025 -> @@0
+
+
+Loose \hbox (badness 44) in paragraph at lines 322--324
+ [] []\ip AA
+
+\hbox(10.50002+1.0)x100.0, glue set 0.76414
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{internal vertical mode: \vskip}
+{end-group character }}
+{restoring \spaceskip=0.0pt}
+{restoring \^^M=undefined}
+
+Overfull \vbox (0.50002pt too high) detected at line 324
+
+\vbox(11.0+0.0)x100.0, glue set - 1.0
+.\hbox(10.50002+1.0)x100.0, glue set 0.76414 []
+.\glue 10.0 minus 10.0
+
+% t=41.0 plus 40.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{vertical mode: blank space }
+{\penalty}
+% t=52.0 plus 80.0 plus 1.0fil g=16383.99998 b=0 p=-2147483647 c=-214748
+3647#
+\output->{\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999
+ \showboxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2
+\ifhbox 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \
+fi }
+{internal vertical mode: \tracingcommands}
+> -2147483647.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+l.325 \penalty-2147483647
+ % that's the largest value TeX will...
+
+
+Completed box being shipped out [-2.0.0.0.11.196608.327680.1572864.10737
+41823]
+\vbox(16383.99998+0.0)x100.0, glue set 16332.0fil
+.\glue(\topskip) 9.0 plus 1.0fil
+.\vbox(11.0+1.0)x10.0, glue set - 1.0
+..\hbox(7.0+1.0)x10.0, glue set - 1.0
+...\glue(\leftskip) 3.0
+...\hbox(0.0+0.0)x0.0
+...\ip A
+...\glue 4.0 plus 1.0 minus 2.0
+...\ip A
+...\glue 4.0 plus 1.0 minus 2.0
+...\ip A
+...\glue(\rightskip) 0.0
+...\rule(*+*)x5.0
+..\penalty 10000
+..\glue(\baselineskip) 2.0
+..\hbox(7.0+1.0)x10.0, glue set - 0.5
+...\glue(\leftskip) 3.0
+...\ip A
+...\glue 4.0 plus 1.0 minus 2.0
+...\ip A
+...\penalty 10000
+...\glue(\parfillskip) 0.0 plus 100.0
+...\glue(\rightskip) 0.0
+..\glue(\parskip) 0.0 plus 42.0 minus 8.0
+..\glue(\baselineskip) 2.0
+..\hbox(7.0+1.0)x10.0, glue set - 1.0
+...\glue(\leftskip) 3.0
+...\hbox(0.0+0.0)x0.0
+...\ip A
+...\glue 4.0 plus 1.0 minus 2.0
+...\ip A
+...\glue 4.0 plus 1.0 minus 2.0
+...\ip A
+...\glue(\rightskip) 0.0
+..\penalty 10000
+..\glue(\baselineskip) 2.0
+..\hbox(7.0+1.0)x10.0, glue set - 0.5
+...\glue(\leftskip) 3.0
+...\ip A
+...\glue 4.0 plus 1.0 minus 2.0
+...\ip A
+...\penalty 10000
+...\glue(\parfillskip) 0.0 plus 100.0
+...\glue(\rightskip) 0.0
+.\glue(\lineskip) 0.0 plus 40.0
+.\vbox(10.0+0.0)x10.03749
+..\hbox(0.0+0.0)x0.0, glue set - 1.0
+...\glue 10.0 minus 9.0
+..\glue(\baselineskip) 10.0
+..\hbox(0.0+0.0)x10.03749, glue set 1.00375
+...\glue 0.0 plus 10.0
+.\glue(\baselineskip) -1.0
+.\vbox(11.0+0.0)x100.0
+..\hbox(7.0+1.0)x100.0, glue set 0.82695
+...\glue(\leftskip) 3.0
+...\hbox(0.0+0.0)x0.0
+...\ip A
+...\kern 1.0
+...\glue 4.0 plus 1.99799 minus 1.00099
+...\glue 4.0 plus 1.99799 minus 1.00099
+...\penalty 10000
+...\glue(\parfillskip) 0.0 plus 100.0
+...\glue(\rightskip) 0.0
+..\glue 2.0
+..\glue -2.0
+..\kern 0.0
+..\penalty 0
+.\glue(\lineskip) 0.0 plus 40.0
+.\vbox(11.0+0.0)x100.0, glue set - 1.0
+..\hbox(10.50002+1.0)x100.0, glue set 0.76414
+...\glue(\leftskip) 3.0
+...\hbox(0.0+0.0)x0.0
+...\glue 4.0 plus 2.0 minus 1.0
+...\kern -5.50003 (for accent)
+...\hbox(8.0+2.0)x3.0, shifted -2.50002
+....\ip B
+...\kern 2.50003 (for accent)
+...\ip A
+...\ip A
+...\glue 4.0 plus 2.0 minus 1.0
+...\glue 4.0 plus 2.0 minus 88.0
+...\penalty 10000
+...\glue(\parfillskip) 0.0 plus 100.0
+...\glue(\rightskip) 0.0
+..\glue 10.0 minus 10.0
+
+Memory usage before: 651&432; after: 417&418; still untouched: 175
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{vertical mode: \penalty}
+! Number too big.
+l.326 \penalty-2147483648
+ % see?
+I can only go up to 2147483647='17777777777="7FFFFFFF,
+so I'm using that number instead of yours.
+
+{\tabskip}
+{\let}
+{\count}
+{begin-group character {}
+{\errhelp}
+{\errmessage}
+! .
+l.328 ...l is lost}\errmessage{}
+ }
+all is lost
+
+{end-group character }}
+{restoring \errhelp=}
+{blank space }
+{\def}
+{blank space }
+{\looseness}
+{\setbox}
+{internal vertical mode: \vskip}
+{end-group character }}
+{restoring \looseness=-1}
+{vertical mode: blank space }
+{\halign}
+{internal vertical mode: \iftrue}
+{true}
+{\else}
+
+\d #1\d ->#1#1
+#1<-##
+! Only one # is allowed per tab.
+<argument> ##
+
+\d #1\d ->#1#1
+
+l.333 ...7200bp minus 4\wd4\d#\d
+ \cr % \d#\d becomes (erroneou...
+There should be exactly one # between &'s, when an
+\halign or \valign is being set up. In this case you had
+more than one, so I'm ignoring all but the first.
+
+{restricted horizontal mode: \global}
+{\spaceskip}
+{\def}
+{\def}
+{\expandafter}
+
+\A ->B
+
+\xx ->\global \gdef \A {\global \count \count 1=####\cr \omit \cr \tabsk
+ip }
+{\global}
+{the letter B}
+{end of alignment template}
+{\vbox}
+{internal vertical mode: \halign}
+
+\A ->\global \count \count 1=##\cr \omit \cr \tabskip
+{restricted horizontal mode: end of alignment template}
+{\global}
+{end of alignment template}
+{restoring \tabskip=4.49998pt plus 7227.0pt}
+{internal vertical mode: the letter A}
+{horizontal mode: the letter A}
+{end-group character }}
+@firstpass
+@secondpass
+[]\ip AA
+@\par via @@0 b=86 p=-10000 d=*
+@@1: line 1.1- t=0 -> @@0
+
+
+Loose \hbox (badness 86) in paragraph at lines 337--337
+ []\ip AA
+
+\hbox(7.0+1.0)x100.0, glue set 0.95
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{restoring \looseness=-1}
+{restricted horizontal mode: blank space }
+{end of alignment template}
+{restoring \xx=undefined}
+{retaining \A=macro:->\global \count \count 1=##\cr \ETC.}
+{restoring \spaceskip=0.0pt}
+{\valign}
+{internal vertical mode: the letter A}
+{horizontal mode: the letter A}
+Missing character: There is no } in font trip!
+{end of alignment template}
+@firstpass
+@secondpass
+[]\ip A
+@\par via @@0 b=86 p=-10000 d=*
+@@1: line 1.1- t=0 -> @@0
+
+
+Loose \hbox (badness 86) in paragraph at lines 337--337
+ []\ip A
+
+\hbox(7.0+1.0)x100.0, glue set 0.95
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{internal vertical mode: end of alignment template}
+{restoring \looseness=-1}
+{begin-group character {}
+{blank space }
+{end-group character }}
+{end of alignment template}
+{end of alignment template}
+{restoring \looseness=-1}
+
+Overfull \vbox (21.99997pt too high) in alignment at lines 337--337
+
+\vbox(-5.0+0.0)x0.0
+.\glue(\tabskip) 4.49998 plus 7227.0
+.\unsetbox(0.0+0.0)x0.0
+.etc.
+
+{restricted horizontal mode: end of alignment template}
+{\global}
+{\fontname}
+{\romannumeral}
+{blank space }
+{\lccode}
+
+\A ->\uppercase { \message {trip at 5.0pt\ip mix}\lowercase {vq}}
+{\uppercase}
+{blank space }
+{\message}
+TRIP AT 5.0PT\ip AIX
+{\lowercase}
+{the letter v}
+Missing character: There is no v in font trip!
+{the letter b}
+{blank space }
+{end of alignment template}
+{math shift character $}
+{math mode: math shift character $}
+{restoring \fam=0}
+{restricted horizontal mode: end of alignment template}
+
+\A ->\uppercase { \message {trip at 5.0pt\ip mix}\lowercase {vq}}
+{\hss}
+{\uppercase}
+{blank space }
+{\message}
+TRIP AT 5.0PT\ip AIX
+{\lowercase}
+{the letter v}
+Missing character: There is no v in font trip!
+{the letter b}
+{blank space }
+{end of alignment template}
+{restoring \lccode81=113}
+{\show}
+> \A=macro:
+->\uppercase { \message {trip at 5.0pt\ip mix}\lowercase {vq}} .
+<template> \A
+ \endtemplate
+l.340 ...\omit$$\span\A&\show\cr
+ \omit\cr
+
+{end of alignment template}
+{end of alignment template}
+{internal vertical mode: \global}
+{\errmessage}
+! \count 2=-1118806.
+<recently read> }
+
+l.341 ...ge{\count2=\the\count2}
+ }
+This error message was generated by an \errmessage
+command, so I can't give any explicit help.
+Pretend that you're Hercule Poirot: Examine all clues,
+and deduce the truth by order and method.
+
+{end-group character }}
+{restoring \looseness=-1}
+{restricted horizontal mode: \mark}
+{end of alignment template}
+{\mark}
+{end of alignment template}
+{restoring \tabskip=0.0154pt minus 3.21002pt}
+
+Tight \hbox (badness 12) in alignment at lines 331--342
+ [] [] [] []
+
+\hbox(0.0+0.0)x205.12613, glue set - 0.5
+.\glue(\tabskip) 0.0154 minus 3.21002
+.\unsetbox(0.0+0.0)x0.0
+.etc.
+
+%% goal height=16383.99998, max depth=2.0
+% t=20.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+% t=30.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+% t=40.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{vertical mode: blank space }
+{\errmessage}
+! \prevdepth =0.0pt.
+l.343 ...evdepth=\the\prevdepth}
+
+(That was another \errmessage.)
+
+{blank space }
+{\penalty}
+% t=40.0 plus 40.0 plus 1.0fil g=16383.99998 b=0 p=-88888 c=-88888#
+\output->{\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999
+ \showboxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2
+\ifhbox 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \
+fi }
+{internal vertical mode: \tracingcommands}
+> -88888.
+<output> ...wthe \outputpenalty
+ \showboxbreadth 9999 \showbox...
+l.344 \penalty-88888
+ % end alignment test, now miscellaneous ...
+
+
+Completed box being shipped out [-2.2.-1118806.0.11.196608.327680.157286
+4.1073741823]
+\vbox(16383.99998+0.0)x205.12613, glue set 16344.0fil
+.\glue(\topskip) 0.0 plus 1.0fil
+.\hbox(20.0+2.0)x205.12613, glue set - 0.5
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(20.0+2.0)x0.0, glue set - 1.0
+...\ip B
+...\vbox(20.0+1.0)x100.0
+....\hbox(0.0+0.0)x0.0, glue set 0.00174
+.....\glue(\tabskip) 4.49998 plus 7227.0
+.....\hbox(0.0+0.0)x0.0
+.....\glue(\tabskip) -17.07162
+....\glue(\baselineskip) 10.0
+....\hbox(0.0+0.0)x0.0, glue set 0.00174
+.....\glue(\tabskip) 4.49998 plus 7227.0
+.....\hbox(0.0+0.0)x0.0
+.....\glue(\tabskip) -17.07162
+....\glue(\parskip) 0.0 plus 42.0 minus 8.0
+....\glue(\baselineskip) 3.0
+....\hbox(7.0+1.0)x100.0, glue set 0.95
+.....\glue(\leftskip) 3.0
+.....\hbox(0.0+0.0)x0.0
+.....\ip A (ligature AA)
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 100.0
+.....\glue(\rightskip) 0.0
+...\glue(\spaceskip) 4.0 minus 0.00002
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(0.0+0.0)x106.9846
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(20.0+2.0)x100.0
+...\vbox(-5.0+0.0)x100.0
+....\glue(\tabskip) 4.49998 plus 7227.0
+....\vbox(0.0+0.0)x100.0
+.....\hbox(7.0+1.0)x100.0, glue set 0.95
+......\glue(\leftskip) 3.0
+......\hbox(0.0+0.0)x0.0
+......\ip A
+......\penalty 10000
+......\glue(\parfillskip) 0.0 plus 100.0
+......\glue(\rightskip) 0.0
+....\glue(\tabskip) 0.0
+....\vbox(8.0+0.0)x0.0
+....\glue(\tabskip) 4.49998 plus 7227.0
+...\vbox(-5.0+0.0)x0.0
+....\glue(\tabskip) 4.49998 plus 7227.0
+....\vbox(0.0+0.0)x0.0
+....\glue(\tabskip) 0.0
+....\vbox(8.0+0.0)x0.0
+....\glue(\tabskip) 4.49998 plus 7227.0
+..\glue(\tabskip) 4.49998 plus 7227.0
+.\glue(\baselineskip) 0.0
+.\hbox(8.0+2.0)x205.12613, glue set - 0.5
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(8.0+2.0)x0.0, glue set 177.80537fil
+...\glue 4.0 plus 2.0 minus 88.0
+...\glue 4.0 plus 2.0 minus 88.0
+...\ip b
+...\glue 4.0 plus 2.0 minus 88.0
+...\mathon
+...\mathoff
+...\glue 0.0 plus 1.0fil minus 1.0fil
+...\glue 4.0 plus 2.0 minus 88.0
+...\ip b
+...\glue 4.0 plus 2.0 minus 88.0
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(0.0+0.0)x106.9846
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(0.0+0.0)x100.0
+..\glue(\tabskip) 4.49998 plus 7227.0
+..\hbox(8.0+2.0)x0.0
+..\glue(\tabskip) 0.0154 minus 3.21002
+.\glue(\baselineskip) 8.0
+.\hbox(0.0+0.0)x205.12613, glue set - 0.5
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(0.0+0.0)x0.0
+..\glue(\tabskip) 0.0154 minus 3.21002
+.\glue(\lineskip) 0.0 plus 40.0
+.\hbox(0.0+0.0)x205.12613, glue set - 0.5
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(0.0+0.0)x0.0
+..\glue(\tabskip) 0.0154 minus 3.21002
+..\hbox(0.0+0.0)x106.9846
+..\glue(\tabskip) 0.0154 minus 3.21002
+.\mark{a}
+.\mark{b}
+
+Memory usage before: 776&458; after: 464&452; still untouched: 175
+{restoring \box254=void}
+{restoring \hoffset=0.0pt}
+{restoring \showboxdepth=1}
+{restoring \showboxbreadth=2}
+{restoring \tracingcommands=2}
+{restoring \looseness=-1}
+{vertical mode: \newlinechar}
+{\global}
+!
+ou can't use a prefix with `\unskip'.
+<to be read again>
+ \unskip
+l.345 ...inechar`
+\global\unskip
+ \show^^
+\newlinechar\lastpena...
+I'll pretend you didn't say \long or \outer or \global.
+
+{\unskip}
+{\show}
+> the character ^^Y.
+l.345 ...
+\global\unskip\show^^
+
+ \newlinechar\lastpenalty\unpe...
+
+{\newlinechar}
+{\unpenalty}
+! You can't use `\unpenalty' in vertical mode.
+l.345 ...r\lastpenalty\unpenalty
+ \unkern
+Sorry...I usually can't take things from the current page.
+Perhaps you can make the output routine do it.
+
+{\unkern}
+! You can't use `\unkern' in vertical mode.
+l.345 ...enalty\unpenalty\unkern
+
+Sorry...I usually can't take things from the current page.
+Try `I\kern-\lastkern' instead.
+
+{\lastbox}
+! You can't use `\lastbox' in vertical mode.
+l.346 \lastbox
+ \penalty5\message{\the\lastpenalty\the\newlinec...
+Sorry...I usually can't take things from the current page.
+This \lastbox will therefore be void.
+
+{\penalty}
+{\message}
+510000
+{\textfont}
+! Bad number (16).
+<to be read again>
+ =
+l.346 ...ewlinechar}\textfont16=
+ \relax
+Since I expected to read a number between 0 and 15,
+I changed this one to zero.
+
+! Missing font identifier.
+<to be read again>
+ \relax
+l.346 ...char}\textfont16=\relax
+
+I was looking for a control sequence whose
+current meaning has been defined by \font.
+
+{\relax}
+{\outer}
+! Missing control sequence inserted.
+<inserted text>
+ \inaccessible
+<to be read again>
+ {
+l.347 \outer\def{
+ }?
+Please don't say `\def cs{...}', say `\def\cs{...}'.
+I've inserted an inaccessible control sequence so that your
+definition will be completed without mixing me up too badly.
+You can recover graciously from this error, if you're
+careful; see exercise 27.2 in The TeXbook.
+
+{the character ?}
+{horizontal mode: the character ?}
+Missing character: There is no ? in font trip!
+{blank space }
+{\dimen}
+{\showthe}
+> -16383.99998pt.
+l.348 ...77777sp\showthe\dimen5
+ % this should be OK
+
+{\dimen}
+! Dimension too large.
+<to be read again>
+ \showthe
+l.349 \dimen6=-'40000pt\showthe
+ \dimen6 % this should overflow
+I can't work with sizes bigger than about 19 feet.
+Continue and I'll use the largest value I can.
+
+{\showthe}
+> -16383.99998pt.
+l.349 ...40000pt\showthe\dimen6
+ % this should overflow
+
+{\dimen}
+{\showthe}
+> -8355.74998pt.
+l.350 ...\dimen5\showthe\dimen7
+ \multiply\dimen7 2\showthe\di...
+
+{\multiply}
+! Arithmetic overflow.
+<to be read again>
+ \showthe
+l.350 ...ltiply\dimen7 2\showthe
+ \dimen7
+I can't carry out that multiplication or division,
+since the result is out of range.
+
+{\showthe}
+> -8355.74998pt.
+l.350 ...dimen7 2\showthe\dimen7
+
+
+{undefined}
+! Undefined control sequence.
+l.351 \a^^@^^@a
+ @ % an undefined control sequence followed by ...
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+! Text line contains an invalid character.
+l.351 \a^^@^^@a@
+ % an undefined control sequence followed by ...
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+
+{begin-group character {}
+{\aftergroup}
+{\aftergroup}
+{\gdef}
+{blank space }
+{\def}
+{blank space }
+
+\b ->\c
+
+\c ->
+{end-group character }}
+{restoring \c=undefined}
+
+\gobble #1->
+#1<-\c
+{blank space }
+{\def}
+{blank space }
+{\outer}
+{\toks0}
+Runaway text?
+! Forbidden control sequence found while scanning text of \tokens.
+<inserted text>
+ }
+<to be read again>
+ \a^^@^^@a
+l.354 ...ar#2{}\tokens{\a^^@^^@a
+ \par!
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+
+\a^^@^^@a #1\par #2->
+#1<-
+#2<-!
+{blank space }
+{\long}
+{blank space }
+{\outer}
+! Parameters must be numbered consecutively.
+<to be read again>
+ 8
+l.356 ...ef\lo#1#2U3#4#5#6#7#8#8
+ #9#{\relax}
+I've inserted the digit you should have used after the #.
+Type `1' to delete what you did use.
+
+! You already have nine parameters.
+l.356 ...\lo#1#2U3#4#5#6#7#8#8#9
+ #{\relax}
+I'm going to ignore the # sign you just used.
+
+{blank space }
+{\ifcase}
+{case 1}
+
+\l #1->
+#1<-\par
+
+\b #1\par ->
+Runaway argument?
+{
+! Paragraph ended before \b was complete.
+<to be read again>
+ \par
+l.357 ...defined\or\l\par\b{\par
+ % occurrence of \par aborts \b
+I suspect you've forgotten a `}', causing me to apply this
+control sequence to too much text. How can we recover?
+My plan is to forget the whole thing and hope for the best.
+
+{\par}
+@firstpass
+@secondpass
+[]
+@ via @@0 b=10000 p=0 d=100000782
+@@1: line 1.0 t=100000782 -> @@0
+
+@\par via @@0 b=22 p=-10000 d=529
+@@2: line 1.1- t=529 -> @@0
+@\par via @@1 b=10000 p=-10000 d=100000000
+@@3: line 2.0- t=200000782 -> @@1
+
+
+Loose \hbox (badness 22) in paragraph at lines 347--357
+ []
+
+\hbox(0.0+0.0)x100.0, glue set 0.60527
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+%% goal height=16383.99998, max depth=2.0
+
+\b #1\par ->
+#1<-\l \undefined
+{vertical mode: \else}
+{\ifcase}
+{\iftrue}
+{true}
+{case -1}
+{\ifcase}
+{\fi}
+{case 5}
+{\fi}
+{\catcode}
+{\let}
+{\def}
+{blank space }
+{\halign}
+{internal vertical mode: \ifcase}
+{case 3}
+! Incomplete \ifcase; all text was ignored after line 363.
+<inserted text>
+ \fi
+<to be read again>
+ \lo
+l.363 \^^C{{\span\ifcase3 \lo
+ #\cr............89{}\cr} % runaw...
+A forbidden control sequence occurred in skipped text.
+This kind of error happens when you say `\if...' and forget
+the matching `\fi'. I've inserted a `\fi'; this might work.
+
+Runaway preamble?
+{
+! Forbidden control sequence found while scanning preamble of \^^C.
+<inserted text>
+ \cr }
+<to be read again>
+ \lo
+l.363 \^^C{{\span\ifcase3 \lo
+ #\cr............89{}\cr} % runaw...
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+! Missing # inserted in alignment preamble.
+<to be read again>
+ \cr
+<inserted text> \cr
+ }
+<to be read again>
+ \lo
+l.363 \^^C{{\span\ifcase3 \lo
+ #\cr............89{}\cr} % runaw...
+There should be exactly one # between &'s, when an
+\halign or \valign is being set up. In this case you had
+none, so I've put one in; maybe that will work.
+
+
+\lo #1#2U3#4#5#6#7#8#989{->\relax {
+#1<-##
+#2<-\cr
+U3<-.
+#4<-.
+#5<-.
+#6<-.
+#7<-.
+#8<-.
+#9<-......
+{vertical mode: \relax}
+{begin-group character {}
+{end-group character }}
+{\cr}
+! Misplaced \cr.
+l.363 ...#\cr............89{}\cr
+ } % runaway preamble?
+I can't figure out why you would want to use a tab mark
+or \cr or \span just now. If something like a right brace
+up above has ended a previous alignment prematurely,
+you're probably due for more error messages, and you
+might try typing `S' now just to see what is salvageable.
+
+{end-group character }}
+! Too many }'s.
+l.363 ...\cr............89{}\cr}
+ % runaway preamble?
+You've closed more groups than you opened.
+Such booboos are generally harmless, so keep going.
+
+{blank space }
+{\def}
+! Illegal parameter number in definition of \a.
+<to be read again>
+ 2
+l.364 \def\a^^C1{\d#1\d\l{#2
+ }\l#1\par\a^^@^^@a#1\par# % runaw...
+You meant to type ## instead of #, right?
+Or maybe a } was forgotten somewhere earlier, and things
+are all screwed up? I'm going to assume that you meant ##.
+
+Runaway definition?
+^^C1->\d ^^C1\d \l {##2}\l ^^C1\par
+! Forbidden control sequence found while scanning definition of \a.
+<inserted text>
+ }
+<to be read again>
+ \a^^@^^@a
+l.364 ...\l{#2}\l#1\par\a^^@^^@a
+ #1\par# % runaway in definiti...
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+
+\a^^@^^@a #1\par #2->
+#1<-##1
+#2<-##
+{blank space }
+{\xdef}
+
+\d #1\d ->#1#1
+#1<-##1
+
+\l #1->
+#1<-##2
+
+\l #1->
+#1<-##
+Runaway definition?
+^^C1->^^C1^^C11\par
+! Forbidden control sequence found while scanning definition of \a.
+<inserted text>
+ }
+<to be read again>
+ \a^^@^^@a
+l.365 ...\l{#2}\l#1\par\a^^@^^@a
+ #1\par# % runaway in definiti...
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+
+\a^^@^^@a #1\par #2->
+#1<-##1
+#2<-##
+{blank space }
+
+\T 12#101001{->-.#1pt{
+Runaway argument?
+! Forbidden control sequence found while scanning use of \T.
+<inserted text>
+ \par
+<to be read again>
+ \a^^@^^@a
+l.366 \T^^?a^^@^^@a
+ \par{\lo\par % runaway in use
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+! Use of \T doesn't match its definition.
+<inserted text>
+ \par
+<to be read again>
+ \a^^@^^@a
+l.366 \T^^?a^^@^^@a
+ \par{\lo\par % runaway in use
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
+
+{\par}
+
+\a^^@^^@a #1\par #2->
+#1<-
+Runaway argument?
+{
+! Forbidden control sequence found while scanning use of \a^^@^^@a.
+<inserted text>
+ \par
+<to be read again>
+ \lo
+l.366 \T^^?a^^@^^@a\par{\lo
+ \par % runaway in use
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+
+\lo #1#2U3#4#5#6#7#8#989{->\relax {
+#1<-\par
+Runaway argument?
+! Forbidden control sequence found while scanning use of \lo.
+<inserted text>
+ \par
+<to be read again>
+ \lo
+l.367 \lo
+ \par\par\par P \par\par\par\par\par\par89{} \muski...
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+
+\lo #1#2U3#4#5#6#7#8#989{->\relax {
+#1<-\par
+#2<-\par
+U3<-\par
+#4<-P
+#5<-\par
+#6<-\par
+#7<-\par
+#8<-\par
+#9<-\par \par
+{\relax}
+{begin-group character {}
+{end-group character }}
+{blank space }
+{\muskip}
+{\muskipdef}
+{\muskip3}
+{\showthe}
+> 5.0mu plus 4.0mu minus 2.0mu.
+l.368 ....5\shmip \showthe\shmip
+
+
+{begin-group character {}
+{\advance}
+! Incompatible glue units.
+l.369 {\advance\shmip by \shkip
+ \endlinechar-1
+I'm going to assume that 1mu=1pt when they're mixed.
+
+{\endlinechar}
+{\divide}
+{\endlinechar}
+{\global}
+{\showthe}
+> 0.0mu minus -0.00003fil.
+l.372 \showthe\shmip
+
+
+{end-group character }}
+{restoring \endlinechar=13}
+{retaining \muskip3=0.0mu minus -0.00003fil}
+{\divide}
+! Arithmetic overflow.
+l.374 By ^^p
+ \toks1={\a\test}
+I can't carry out that multiplication or division,
+since the result is out of range.
+
+{\toks}
+{blank space }
+{superscript character ^}
+! Missing $ inserted.
+<inserted text>
+ $
+<to be read again>
+ ^
+l.375 ^
+ \leaders\vrule\mskip\shmip M\leaders\hrule\nonscript\h...
+I've inserted a begin-math/end-math symbol since I think
+you left one out. Proceed, with fingers crossed.
+
+{math shift character $}
+% t=20.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{horizontal mode: math shift character $}
+{math mode: superscript character ^}
+! Missing { inserted.
+<to be read again>
+ \leaders
+l.375 ^\leaders
+ \vrule\mskip\shmip M\leaders\hrule\nonscript\h...
+A left brace was mandatory here, so I've put one in.
+You might want to delete and/or insert some corrections
+so that I will find a matching right brace soon.
+(If you're confused by all this, try typing `I}' now.)
+
+{\leaders}
+! Leaders not followed by proper glue.
+<to be read again>
+ \mskip
+l.375 ^\leaders\vrule\mskip
+ \shmip M\leaders\hrule\nonscript\h...
+You should say `\leaders <box or rule><hskip or vskip>'.
+I found the <box or rule>, but there's no suitable
+<hskip or vskip>, so I'm ignoring these leaders.
+
+{\mskip}
+{the letter M}
+{\leaders}
+! Leaders not followed by proper glue.
+<to be read again>
+ \nonscript
+l.375 ...leaders\hrule\nonscript
+ \hskip\thinmuskip
+You should say `\leaders <box or rule><hskip or vskip>'.
+I found the <box or rule>, but there's no suitable
+<hskip or vskip>, so I'm ignoring these leaders.
+
+{\nonscript}
+{\hskip}
+! Incompatible glue units.
+l.375 ...script\hskip\thinmuskip
+
+I'm going to assume that 1mu=1pt when they're mixed.
+
+{\par}
+! Missing $ inserted.
+<inserted text>
+ $
+<to be read again>
+ \par
+l.376
+
+I've inserted a begin-math/end-math symbol since I think
+you left one out. Proceed, with fingers crossed.
+
+{math shift character $}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ $
+<to be read again>
+ \par
+l.376
+
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+{math shift character $}
+{restoring \fam=0}
+{horizontal mode: \par}
+@firstpass
+@secondpass
+[]$[]$
+@\par via @@0 b=80 p=-10000 d=*
+@@1: line 1.1- t=0 -> @@0
+
+
+Loose \hbox (badness 80) in paragraph at lines 375--376
+ []$[]$
+
+\hbox(8.2+0.0)x100.0, glue set 0.9301
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{vertical mode: begin-group character {}
+{\setbox}
+{restricted horizontal mode: \vfill}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ \vfill
+l.377 {\setbox3\hbox{\vfill
+ \vsplit 3 0pt}
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+{vertical mode: \vfill}
+{\vsplit}
+! Missing `to' inserted.
+<to be read again>
+ 0
+l.377 ...\hbox{\vfill\vsplit 3 0
+ pt}
+I'm working on `\vsplit<box number> to <dimen>';
+will look for the <dimen> next.
+
+! \vsplit needs a \vbox.
+<to be read again>
+ }
+l.377 ...ox{\vfill\vsplit 3 0pt}
+
+The box you are trying to split is an \hbox.
+I can't split such a box, so I'll leave it alone.
+
+{end-group character }}
+{restoring \box3=
+\vbox(0.0+-8.53581)x0.0 []}
+{blank space }
+{\def}
+! Parameters must be numbered consecutively.
+<to be read again>
+ 2
+l.378 \def\a#2
+ {}
+I've inserted the digit you should have used after the #.
+Type `1' to delete what you did use.
+
+{blank space }
+{\show}
+> the letter A.
+l.379 \show A
+
+
+{blank space }
+{\show}
+> \a^^@^^@a=\outer macro:
+#1\par #2->.
+l.380 \show\a^^@^^@a
+
+
+{\show}
+> (=macro:
+->\delimiter "4162362 .
+l.381 \show (
+
+
+{blank space }
+{\message}
+{\meaning}
+{\noexpand}
+\long\outer macro:#1#2U3#4#5#6#7#8#989{->\relax {\lo
+{blank space }
+{\show}
+> \^^C=\halign.
+l.383 \show\^^C
+
+
+{blank space }
+{\show}
+> \batchmode=\batchmode.
+l.384 \show\batchmode
+
+
+{\show}
+> \error=undefined.
+l.385 \show\error
+
+
+{\showthe}
+> {\tracingcommands 0\showthe \outputpenalty \showboxbreadth 9999 \showb
+oxdepth 9999 \hoffset 1sp {\setbox 254=\box 255\shipout \ifvbox 2\ifhbox
+ 254 \error \fi 54\copy 25\fi 4} \ifvoid 254\relax \else \error \fi }.
+l.386 \showthe\output
+
+
+{\showthe}
+> 1.0mu plus 2.0fill minus 3.0mu.
+l.387 \showthe\thinmuskip
+
+
+{\showthe}
+> -2.0pt.
+<recently read> \enorm
+
+l.388 \showthe\fontdimen1\enorm
+
+
+{\ifx}
+{false}
+{\par}
+% t=30.0 plus 42.0 plus 1.0fil minus 8.0 g=16383.99998 b=0 p=0 c=0#
+{\if}
+{\else}
+{true}
+{\else}
+{\fi}
+{\ifdim}
+{\iftrue}
+{true}
+! Missing = inserted for \ifdim.
+<to be read again>
+ 1
+l.390 \ifdim72p\iftrue t1
+ i\fi n\fi\fi \message{\jobname\ifx\l...
+I was expecting to see `<', `=', or `>'. Didn't.
+
+{\fi}
+{\fi}
+{false}
+{\fi}
+! Extra \fi.
+l.390 ...p\iftrue t1i\fi n\fi\fi
+ \message{\jobname\ifx\lo\lo ...
+I'm ignoring this; it doesn't match any \if.
+
+{\message}
+{\jobname}
+{\ifx}
+{true}
+tripOK
+{\fi}
+{\hangindent}
+{begin-group character {}
+{\if}
+{true}
+{blank space }
+{\prevgraf}
+{\if}
+{false}
+! Bad \prevgraf (-1).
+<to be read again>
+ \relax
+l.392 ...f 0123\error\else\relax
+ \fi\else\error\fi
+I allow only nonnegative values here.
+
+{\relax}
+{\fi}
+{\else}
+{\prevgraf}
+{\global}
+{end-group character }}
+{\showthe}
+> 2.
+l.393 ...er=2}\showthe\hangafter
+ \showthe\prevgraf
+
+{\showthe}
+> 1.
+l.393 ...gafter\showthe\prevgraf
+
+
+{\char}
+{horizontal mode: \char}
+Missing character: There is no ^^83 in font trip!
+{\showthe}
+> 0.
+l.394 \char'203\showthe\prevgraf
+ $\indent\mark{twain}
+
+{math shift character $}
+{math mode: \indent}
+{\mark}
+{blank space }
+{\setbox}
+{restricted horizontal mode: \vrule}
+{end-group character }}
+{math mode: alignment tab character &}
+! Misplaced alignment tab character &.
+l.395 \setbox3\hbox{\vrule}&
+ \moveleft\lastbox % can't do that...
+I can't figure out why you would want to use a tab mark
+here. If you just want an ampersand, the remedy is
+simple: Just type `I\&' now. But if some right brace
+up above has ended a previous alignment prematurely,
+you're probably due for more error messages, and you
+might try typing `S' now just to see what is salvageable.
+
+{\moveleft}
+! You can't use `\moveleft' in math mode.
+l.395 ...\hbox{\vrule}&\moveleft
+ \lastbox % can't do that in m...
+Sorry, but I'm not programmed to handle this case;
+I'll just pretend that you didn't ask for it.
+If you're in the wrong mode, you might be able to
+return to the right one by typing `I}' or `I$' or `I\par'.
+
+{\lastbox}
+! You can't use `\lastbox' in math mode.
+l.395 ...rule}&\moveleft\lastbox
+ % can't do that in math mode
+Sorry; this \lastbox will be void.
+
+{\unhbox}
+{\unhcopy}
+! Incompatible list can't be unboxed.
+<to be read again>
+ \accent
+l.396 \unhbox234\unhcopy3\accent
+ \x\vfill\vfil\vfilneg\vss % \...
+Sorry, Pandora. (You sneaky devil.)
+I refuse to unbox an \hbox in vertical mode or vice versa.
+And I can't open any boxes in math mode.
+
+{\accent}
+! Please use \mathaccent for accents in math mode.
+<recently read> \accent
+
+l.396 \unhbox234\unhcopy3\accent
+ \x\vfill\vfil\vfilneg\vss % \...
+I'm changing \accent to \mathaccent here; wish me luck.
+(Accents are not the same in formulas as they are in text.)
+
+! Missing { inserted.
+<to be read again>
+ \vfill
+l.396 ...unhcopy3\accent\x\vfill
+ \vfil\vfilneg\vss % \vfill ex...
+A left brace was mandatory here, so I've put one in.
+You might want to delete and/or insert some corrections
+so that I will find a matching right brace soon.
+(If you're confused by all this, try typing `I}' now.)
+
+{\vfill}
+! Missing $ inserted.
+<inserted text>
+ $
+<to be read again>
+ \vfill
+l.396 ...unhcopy3\accent\x\vfill
+ \vfil\vfilneg\vss % \vfill ex...
+I've inserted a begin-math/end-math symbol since I think
+you left one out. Proceed, with fingers crossed.
+
+{math shift character $}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ $
+<to be read again>
+ \vfill
+l.396 ...unhcopy3\accent\x\vfill
+ \vfil\vfilneg\vss % \vfill ex...
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+{math shift character $}
+! \textfont 0 is undefined (character ^^c8).
+<recently read> $
+
+<to be read again>
+ \vfill
+l.396 ...unhcopy3\accent\x\vfill
+ \vfil\vfilneg\vss % \vfill ex...
+Somewhere in the math formula just ended, you used the
+stated character from an undefined font family. For example,
+plain TeX doesn't allow \it or \sl in subscripts. Proceed,
+and I'll try to forget that I needed that character.
+
+{restoring \box3=
+\vbox(0.0+-8.53581)x0.0 []}
+{restoring \fam=0}
+{horizontal mode: \vfill}
+{\par}
+@firstpass
+@secondpass
+[]$[][][]$
+@\par via @@0 b=91 p=-10000 d=*
+@@1: line 1.1- t=0 -> @@0
+
+
+Loose \hbox (badness 91) in paragraph at lines 394--396
+ []$[][]$
+
+\hbox(0.0+0.0)x100.0, glue set 0.97
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{vertical mode: \vfill}
+{\vfil}
+{\vfilneg}
+{\vss}
+{\def}
+! Missing { inserted.
+l.397 \def\a}
+ {\let\a\xyzzy\csname a\endcsname}
+Where was the left brace? You said something like `\def\a}',
+which I'm going to interpret as `\def\a{}'.
+
+{begin-group character {}
+{\let}
+{\csname}
+{\relax}
+{end-group character }}
+{restoring \a=macro:->}
+{blank space }
+{\def}
+{\def}
+{\let}
+{\def}
+{blank space }
+{\ifx}
+{false}
+{\expandafter}
+
+\b ->\a \c
+{\ifx}
+{true}
+{\ifinner}
+{false}
+{\relax}
+{\fi}
+{\else}
+{\fi}
+{\ifvmode}
+{true}
+{math shift character $}
+% t=40.0 plus 84.0 plus 1.0fil plus 1.0fill minus 16.0 g=16383.99998 b=0
+ p=0 c=0#
+! Infinite glue shrinkage found on current page.
+<to be read again>
+ $
+l.402 \ifvmode$
+ \ifmmode\hbox tt\ifhmode\hfilneg\else\error\fi...
+The page about to be output contains some infinitely
+shrinkable glue, e.g., `\vss' or `\vskip 0pt minus 1fil'.
+Such glue doesn't belong there; but you can safely proceed,
+since the offensive shrinkability has been made finite.
+
+{horizontal mode: math shift character $}
+{math mode: \ifmmode}
+{true}
+{\hbox}
+! Missing { inserted.
+<to be read again>
+ t
+<to be read again>
+ t
+l.402 \ifvmode$\ifmmode\hbox tt
+ \ifhmode\hfilneg\else\error\fi...
+A left brace was mandatory here, so I've put one in.
+You might want to delete and/or insert some corrections
+so that I will find a matching right brace soon.
+(If you're confused by all this, try typing `I}' now.)
+
+{restricted horizontal mode: the letter t}
+{\ifhmode}
+{true}
+{\hfilneg}
+{\else}
+{end-group character }}
+{math mode: math shift character $}
+{restoring \fam=0}
+{horizontal mode: \fi}
+{\fi}
+{\noalign}
+! Misplaced \noalign.
+l.403 \noalign
+ \omit\endcsname % these are extra
+I expect to see \noalign only after the \cr of
+an alignment. Proceed, and I'll ignore this case.
+
+{\omit}
+! Misplaced \omit.
+l.403 \noalign\omit
+ \endcsname % these are extra
+I expect to see \omit only after tab marks or the \cr of
+an alignment. Proceed, and I'll ignore this case.
+
+{\endcsname}
+! Extra \endcsname.
+l.403 \noalign\omit\endcsname
+ % these are extra
+I'm ignoring this, since I wasn't doing a \csname.
+
+{\fontdimen}
+! Missing font identifier.
+<to be read again>
+ =
+l.404 \fontdimen 1000=
+ 20\varunit\showthe\fontdimen1000\trip\l...
+I was looking for a control sequence whose
+current meaning has been defined by \font.
+
+! Font \FONT? has only 12 fontdimen parameters.
+<to be read again>
+ =
+l.404 \fontdimen 1000=
+ 20\varunit\showthe\fontdimen1000\trip\l...
+To increase the number of font parameters, you must
+use \fontdimen immediately after the \font is loaded.
+
+{\showthe}
+! Font \ip has only 13 fontdimen parameters.
+<recently read> \trip
+
+l.404 ...wthe\fontdimen1000\trip
+ \let\PAR=\par
+To increase the number of font parameters, you must
+use \fontdimen immediately after the \font is loaded.
+
+> 0.0pt.
+<recently read> \trip
+
+l.404 ...wthe\fontdimen1000\trip
+ \let\PAR=\par
+
+{\let}
+{\gdef}
+{\expandafter}
+{\csname}
+{\ifx}
+{true}
+{\mag}
+
+\par ->\relax \PAR
+{\relax}
+{\par}
+@firstpass
+@secondpass
+[]$[]$
+@\par via @@0 b=91 p=-10000 d=*
+@@1: line 1.1- t=0 -> @@0
+
+
+Loose \hbox (badness 91) in paragraph at lines 402--406
+ []$[]$
+
+\hbox(0.0+0.0)x100.0, glue set 0.97
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{vertical mode: \fi}
+{\noindent}
+% t=50.0 plus 126.0 plus 2.0fil plus 2.0fill minus 25.0 g=16383.99998 b=
+0 p=0 c=0#
+{horizontal mode: begin-group character {}
+{\halign}
+
+\par ->\relax \PAR
+{\relax}
+{\par}
+{vertical mode: \halign}
+! Incompatible magnification (1999);
+ the previous value will be retained (2000).
+l.407 ...indent{\halign to 1true
+ mm\expandafter{\csname#\endcs...
+I can handle only one magnification ratio per job. So I've
+reverted to the magnification you used earlier on this run.
+
+{internal vertical mode: \expandafter}
+{\csname}
+{restricted horizontal mode: \relax}
+{\global}
+{undefined}
+! Undefined control sequence.
+<recently read> \foo
+
+<to be read again>
+ \endtemplate
+<template> \endtemplate
+
+l.408 ...bal\futurelet\endt\foo&
+ \show\endt&$&&&.}
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+{end of alignment template}
+{\show}
+> \endt=\outer endtemplate:
+.
+l.408 ...let\endt\foo&\show\endt
+ &$&&&.}
+
+{end of alignment template}
+
+\l #1->
+#1<-$
+{end of alignment template}
+! Extra alignment tab has been changed to \cr.
+<template> }\endtemplate
+
+l.408 ...\endt\foo&\show\endt&$&
+ &&.}
+You have given more \span or & marks than there were
+in the preamble to the \halign or \valign now in progress.
+So I'll assume that you meant to type \cr instead.
+
+{\relax}
+{end of alignment template}
+{end of alignment template}
+
+\l #1->
+#1<-.
+{blank space }
+
+\par ->\relax \PAR
+{\relax}
+{\par}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ \PAR
+l.409
+
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+! Missing \cr inserted.
+<inserted text>
+ \cr
+<to be read again>
+ }
+<to be read again>
+ \PAR
+l.409
+
+I'm guessing that you meant to end an alignment here.
+
+{\cr}
+! Missing { inserted.
+<inserted text>
+ {
+<to be read again>
+ \cr
+<to be read again>
+ }
+<to be read again>
+ \PAR
+l.409
+
+I've put in what seems to be necessary to fix
+the current column of the current alignment.
+Try to go on, since this might almost work.
+
+{begin-group character {}
+{end-group character }}
+{end of alignment template}
+
+Tight \hbox (badness 1) in alignment at lines 407--409
+ [] [] []
+
+\hbox(0.0+0.0)x1.42262, glue set - 0.20552
+.\glue(\tabskip) 0.0154 minus 3.21002
+.\unsetbox(0.0+0.0)x0.0
+.etc.
+
+% t=60.0 plus 168.0 plus 2.0fil plus 2.0fill minus 33.0 g=16383.99998 b=
+0 p=0 c=0#
+{vertical mode: \par}
+{\hbox}
+{restricted horizontal mode: \/}
+{\hrule}
+! You can't use `\hrule' here except with leaders.
+l.410 \hbox{\/\hrule
+ \textfont3=\enorm\prevdepth\advance\xspac...
+To put a horizontal rule in an hbox or an alignment,
+you should use \leaders or \hrulefill (see The TeXbook).
+
+{\textfont}
+{\prevdepth}
+! You can't use `\prevdepth' in restricted horizontal mode.
+l.410 ...tfont3=\enorm\prevdepth
+ \advance\xspaceskip by-\xspac...
+Sorry, but I'm not programmed to handle this case;
+I'll just pretend that you didn't ask for it.
+If you're in the wrong mode, you might be able to
+return to the right one by typing `I}' or `I$' or `I\par'.
+
+{\advance}
+{\spacefactor}
+{begin-group character {}
+{blank space }
+{end-group character }}
+{\everymath}
+{\fontdimen}
+{math shift character $}
+\everymath->\radical "3
+{math mode: \radical}
+{end-group character }}
+{\delimiterfactor}
+{\left}
+
+(->\delimiter "4162362
+{the letter A}
+{the letter a}
+{\right}
+{math shift character $}
+{restoring \delimiterfactor=10}
+{restoring \fam=0}
+{restricted horizontal mode: the letter A}
+{\/}
+{end-group character }}
+{restoring \everymath=}
+{restoring \xspaceskip=-1.0pt}
+{restoring \textfont3=\bigtr^^@p}
+% t=70.0 plus 168.0 plus 2.0fil plus 2.0fill minus 33.0 g=16383.99998 b=
+0 p=0 c=0#
+{vertical mode: blank space }
+{\openin}
+{\closein}
+{\iftrue}
+{true}
+{begin-group character {}
+{\ifeof}
+{true}
+{\openin}
+! Bad number (100).
+l.413 ...e{\ifeof 15\openin 100
+ tripos
+Since I expected to read a number between 0 and 15,
+I changed this one to zero.
+
+{\def}
+{blank space }
+{\catcode}
+{\catcode}
+{\outer}
+
+\loop ->\ifeof 0\let \loop =\relax \else {\global \read 0to \a }\show \a
+ \fi \loop
+{\ifeof}
+{false}
+{begin-group character {}
+{\global}
+{end-group character }}
+{\show}
+> \a=macro:
+->\par .
+\loop ...\read 0to \a }\show \a
+ \fi \loop
+l.415 ...er\def\uppercase{}\loop
+ }\else\fi
+
+{\fi}
+
+\loop ->\ifeof 0\let \loop =\relax \else {\global \read 0to \a }\show \a
+ \fi \loop
+{\ifeof}
+{false}
+{begin-group character {}
+{\global}
+Runaway definition?
+->
+! Forbidden control sequence found while scanning definition of \a.
+<inserted text>
+ }
+<read 0> \uppercase
+ {0{\outputpenalty }}
+\loop ... {\global \read 0to \a
+ }\show \a \fi \loop
+l.415 ...er\def\uppercase{}\loop
+ }\else\fi
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+! Text line contains an invalid character.
+<read 0> \uppercase {0
+ {\outputpenalty }}
+\loop ... {\global \read 0to \a
+ }\show \a \fi \loop
+l.415 ...er\def\uppercase{}\loop
+ }\else\fi
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+
+{end-group character }}
+{\show}
+> \a=macro:
+-> .
+\loop ...\read 0to \a }\show \a
+ \fi \loop
+l.415 ...er\def\uppercase{}\loop
+ }\else\fi
+
+{\fi}
+
+\loop ->\ifeof 0\let \loop =\relax \else {\global \read 0to \a }\show \a
+ \fi \loop
+{\ifeof}
+{false}
+{begin-group character {}
+{\global}
+Runaway definition?
+->[
+! Forbidden control sequence found while scanning definition of \a.
+<inserted text>
+ }
+<read 0> [\uppercase
+ {mmmmmmmmmm}[
+\loop ... {\global \read 0to \a
+ }\show \a \fi \loop
+l.415 ...er\def\uppercase{}\loop
+ }\else\fi
+I suspect you have forgotten a `}', causing me
+to read past where you wanted me to stop.
+I'll try to recover; but if the error is serious,
+you'd better type `E' or `X' now and fix your file.
+
+Runaway definition?
+->[ }{mmmmmmmmmm}[
+! File ended within \read.
+<read 0>
+
+\loop ... {\global \read 0to \a
+ }\show \a \fi \loop
+l.415 ...er\def\uppercase{}\loop
+ }\else\fi
+This \read has unbalanced braces.
+
+{end-group character }}
+{\show}
+> \a=macro:
+->[ }{mmmmmmmmmm}[ \par .
+\loop ...\read 0to \a }\show \a
+ \fi \loop
+l.415 ...er\def\uppercase{}\loop
+ }\else\fi
+
+{\fi}
+
+\loop ->\ifeof 0\let \loop =\relax \else {\global \read 0to \a }\show \a
+ \fi \loop
+{\ifeof}
+{true}
+{\let}
+{\else}
+{\relax}
+{end-group character }}
+{restoring \uppercase=\uppercase}
+{restoring \catcode91=12}
+{restoring \catcode48=12}
+{restoring \loop=undefined}
+{\else}
+{end-group character }}
+{restoring \#=undefined}
+{\def}
+
+\test #1->\let \test =
+#1<-.
+{\let}
+{\show}
+> \test=blank space .
+l.416 ...est= }\test. \show\test
+
+
+{\def}
+{blank space }
+{\pretolerance}
+{\toks0}
+{\unhbox}
+% t=3754.40189 plus 208.0 plus 2.0fil plus 2.0fill minus 33.0 g=16383.99
+998 b=0 p=0 c=0#
+{horizontal mode: \unhbox}
+
+\par ->\relax \PAR
+{\relax}
+{\par}
+[]
+@\par via @@0 b=91 p=-10000 d=*
+@@1: line 1.1- t=0 -> @@0
+
+
+Loose \hbox (badness 91) in paragraph at lines 418--418
+ []
+
+\hbox(0.0+0.0)x100.0, glue set 0.97
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{vertical mode: \everycr}
+{blank space }
+{\the}
+
+\a #1->\ifcat #1 \message \ifx #1 {\iffalse \fi \the \tokens \fi \fi }
+#1<-\test
+{\ifcat}
+{true}
+{\message}
+{\ifx}
+{true}
+{\iffalse}
+{false}
+{\fi}
+{\fi}
+\a \test
+{\ifcase}
+{\or}
+{case 1}
+{\ifeof}
+{\fi}
+! Missing number, treated as zero.
+<to be read again>
+ \relax
+<to be read again>
+ \fi
+l.419 ...ens\ifcase1\or\ifeof\fi
+ \def\stopinput{\error\let\inp...
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+{true}
+{\relax}
+{\fi}
+{\def}
+{blank space }
+{\let}
+{\let}
+{\halign}
+{internal vertical mode: \iffalse}
+{false}
+\everycr->\noalign {\penalty 97}
+{\penalty}
+{end-group character }}
+{restricted horizontal mode: \cr}
+! Misplaced \cr.
+<template> \cr
+
+<to be read again>
+ \cr
+l.420 ...cr#&\ifnum0=`{\fi\cr\cr
+ }
+I can't figure out why you would want to use a tab mark
+or \cr or \span just now. If something like a right brace
+up above has ended a previous alignment prematurely,
+you're probably due for more error messages, and you
+might try typing `S' now just to see what is salvageable.
+
+{alignment tab character &}
+! Misplaced alignment tab character &.
+<template> &
+ \ifnum 0=`{\fi \endtemplate
+l.420 ...cr#&\ifnum0=`{\fi\cr\cr
+ }
+I can't figure out why you would want to use a tab mark
+here. If you just want an ampersand, the remedy is
+simple: Just type `I\&' now. But if some right brace
+up above has ended a previous alignment prematurely,
+you're probably due for more error messages, and you
+might try typing `S' now just to see what is salvageable.
+
+{\ifnum}
+{\fi}
+{false}
+{end of alignment template}
+\everycr->\noalign {\penalty 97}
+{internal vertical mode: \penalty}
+{end-group character }}
+% t=3756.40189 plus 290.0 plus 2.0fil plus 2.0fill minus 41.0 g=16383.99
+998 b=0 p=97 c=97
+% t=3766.40189 plus 290.0 plus 2.0fil plus 2.0fill minus 41.0 g=16383.99
+998 b=0 p=97 c=97
+{vertical mode: blank space }
+{\let}
+{\def}
+{\def}
+
+\unbalanced ->\halign \lb
+{\halign}
+\everycr->\noalign {\penalty 97}
+{internal vertical mode: \penalty}
+{end-group character }}
+{restricted horizontal mode: \relax}
+{\expandafter}
+{\expandafter}
+{\expandafter}
+{\expandafter}
+{\expandafter}
+{\expandafter}
+{\expandafter}
+
+\trap #1->
+#1<-\endtemplate
+{undefined}
+! Undefined control sequence.
+<recently read> \err
+
+<to be read again>
+ \endt
+<template> \endtemplate
+
+l.422 ...rr\e\e\e\endt\e\trap\cr
+ \noexpand\cr}
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+{end of alignment template}
+\everycr->\noalign {\penalty 97}
+{internal vertical mode: \penalty}
+{end-group character }}
+{\noexpand}
+{restricted horizontal mode: end of alignment template}
+\everycr->\noalign {\penalty 97}
+{internal vertical mode: \penalty}
+{end-group character }}
+% t=3766.40189 plus 290.0 plus 2.0fil plus 2.0fill minus 41.0 g=16383.99
+998 b=0 p=97 c=97
+% t=3776.40189 plus 290.0 plus 2.0fil plus 2.0fill minus 41.0 g=16383.99
+998 b=0 p=97 c=97
+% t=3786.40189 plus 290.0 plus 2.0fil plus 2.0fill minus 41.0 g=16383.99
+998 b=0 p=97 c=97
+{vertical mode: blank space }
+
+\par ->\relax \PAR
+{\relax}
+{\par}
+{\expandafter}
+{\input}
+{\endinput}
+{\input}
+(tripos.tex
+\stopinput ->\error \let \input \die
+{undefined}
+! Undefined control sequence.
+\stopinput ->\error
+ \let \input \die
+l.1
+
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+{\let}
+
+\par ->\relax \PAR
+{\relax}
+{\par}
+)
+{\relax}
+{undefined}
+! Undefined control sequence.
+<recently read> \input
+
+l.424 ...t tripos\endinput\input
+ % one line of tripos
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+{\setbox}
+{internal vertical mode: \hbox}
+{restricted horizontal mode: \hbox}
+{\vadjust}
+{internal vertical mode: the letter A}
+{horizontal mode: the letter A}
+{end-group character }}
+[]\ip A
+@\par via @@0 b=86 p=-10000 d=*
+@@1: line 1.1- t=0 -> @@0
+
+
+Loose \hbox (badness 86) in paragraph at lines 425--425
+ []\ip A
+
+\hbox(7.0+1.0)x100.0, glue set 0.95
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{restricted horizontal mode: end-group character }}
+{end-group character }}
+{internal vertical mode: end-group character }}
+
+Underfull \vbox (badness 10000) detected at line 425
+
+\vbox(8192.0+0.0)x0.0
+.\hbox(0.0+0.0)x0.0 []
+
+{vertical mode: \vrule}
+{horizontal mode: \vrule}
+{\unhbox}
+! Incompatible list can't be unboxed.
+<to be read again>
+ \hrule
+l.425 ...}}\vrule\unhbox10\hrule
+
+Sorry, Pandora. (You sneaky devil.)
+I refuse to unbox an \hbox in vertical mode or vice versa.
+And I can't open any boxes in math mode.
+
+{\hrule}
+
+\par ->\relax \PAR
+{\relax}
+{\par}
+[]|
+@\par via @@0 b=89 p=-10000 d=*
+@@1: line 1.1- t=0 -> @@0
+
+
+Loose \hbox (badness 89) in paragraph at lines 425--425
+ []|
+
+\hbox(0.0+0.0)x100.0, glue set 0.966
+.\glue(\leftskip) 3.0
+.\hbox(0.0+0.0)x0.0
+.etc.
+
+{vertical mode: \hrule}
+{\output}
+{\futurelet}
+{\maxdeadcycles}
+{\show}
+> \dump=the character =.
+l.427 ...xdeadcycles=3\show\dump
+
+
+{\catcode}
+{\catcode}
+{\expandafter}
+{\csname}
+{\let}
+{\relax}
+
+\csname\endcsname{->{
+! Use of \csname\endcsname doesn't match its definition.
+l.429 \relax
+ \catcode`\qq1qM=13 \defqqM{\relax}#\begingroup{\s...
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
+
+{\catcode}
+{\def}
+{macro parameter character #}
+! You can't use `macro parameter character #' in vertical mode.
+l.429 ...^^M=13 \def^^M{\relax}#
+ \begingroup{\showboxdepth=4\s...
+Sorry, but I'm not programmed to handle this case;
+I'll just pretend that you didn't ask for it.
+If you're in the wrong mode, you might be able to
+return to the right one by typing `I}' or `I$' or `I\par'.
+
+{\begingroup}
+{begin-group character {}
+{\showboxdepth}
+{\showbox}
+> \box10=
+\vbox(8192.0+0.0)x0.0
+.\hbox(0.0+0.0)x0.0
+..\hbox(0.0+0.0)x0.0
+...\vadjust
+....\hbox(7.0+1.0)x100.0, glue set 0.95 []
+
+! OK.
+<to be read again>
+ }
+l.429 ...owboxdepth=4\showbox10}
+
+
+{end-group character }}
+{restoring \showboxdepth=1}
+
+^^M->\relax
+{\relax}
+
+^^M->\relax
+{\relax}
+{\long}
+{\immediate}
+\write->\string \caution \l
+{no mode: \string}
+
+\l #1\l ->#1
+! Argument of \l has an extra }.
+<inserted text>
+ \par
+<to be read again>
+ }
+<inserted text> }
+ \endwrite
+l.431 ...e10{\string\caution \l}
+ % living dangerously
+I've run across a `}' that doesn't seem to match anything.
+For example, `\def\a#1{...}' and `\a}' would produce
+this error. If you simply proceed now, the `\par' that
+I've just inserted will cause me to report a runaway
+argument that might be the root of the problem. But if
+your `}' was spurious, just type `2' and it will go away.
+
+Runaway argument?
+! Paragraph ended before \l was complete.
+<to be read again>
+ \par
+<to be read again>
+ }
+<inserted text> }
+ \endwrite
+l.431 ...e10{\string\caution \l}
+ % living dangerously
+I suspect you've forgotten a `}', causing me to apply this
+control sequence to too much text. How can we recover?
+My plan is to forget the whole thing and hope for the best.
+
+
+\par ->\relax \PAR
+\caution\relax \PAR
+{vertical mode: blank space }
+{\escapechar}
+{|tracingoutput}
+{|shipout}
+{internal vertical mode: |copy}
+{|box}
+{end-group character }}
+[-2.2.-1118806.0.11.196608.327680.1572864.1073741823
+! Huge page cannot be shipped out.
+<recently read> }
+
+l.432 ...ox{\copy10qq5e^5cbox10}
+
+The page just created is more than 18 feet tall or
+more than 18 feet wide, so I suspect something went wrong.
+
+The following box has been deleted:
+|vbox(16384.0+0.0)x0.0
+.|vbox(8192.0+0.0)x0.0 []
+.|glue(|lineskip) 0.0 plus 40.0
+.etc.
+
+]
+Memory usage before: 819&428; after: 720&426; still untouched: 175
+
+^^M->|relax
+{vertical mode: |relax}
+{|setbox}
+{restricted horizontal mode: |fontdimen}
+{|afterassignment}
+{|advance}
+! You can't use `|prevdepth' after |advance.
+l.434 ...relax\advance\prevdepth
+ \afterassignment\relax\future...
+I'm forgetting what you said and not changing anything.
+
+{|relax}
+{|afterassignment}
+{|futurelet}
+{|relax}
+
+^^M->|relax
+{|relax}
+{|message}
+{|noexpand}
+{|meaning}
+|l |long macro:#1|l ->#166
+{|vbox}
+{internal vertical mode: |hyphenchar}
+{|-}
+{horizontal mode: |-}
+{| }
+{the letter B}
+
+|par ->|relax |PAR
+{|relax}
+{|par}
+[]
+@|discretionary via @@0 b=10000 p=89 d=100008703
+@@1: line 1.0- t=100008703 -> @@0
+
+@ via @@0 b=10000 p=0 d=100000782
+@ via @@1 b=10000 p=0 d=100000000
+@@2: line 1.0 t=100000782 -> @@0
+|ip BBBBBB
+@|par via @@0 b=62 p=-10000 d=3969
+@|par via @@1 b=66 p=-10000 d=104489
+@|par via @@2 b=66 p=-10000 d=4489
+@@3: line 1.1- t=3969 -> @@0
+
+
+Loose \hbox (badness 62) in paragraph at lines 436--436
+ [] |ip BBBBBB
+
+|hbox(7.0+1.0)x100.0, glue set 0.85294
+.|glue(|leftskip) 3.0
+.|hbox(0.0+0.0)x0.0
+.etc.
+
+{internal vertical mode: |hyphenchar}
+{|-}
+{horizontal mode: |-}
+Missing character: There is no ? in font trip!
+{| }
+{the letter B}
+{end-group character }}
+[]
+@|discretionary via @@0 b=10000 p=89 d=100008703
+@@1: line 1.0- t=100008703 -> @@0
+
+@ via @@0 b=10000 p=0 d=100000782
+@ via @@1 b=10000 p=0 d=100000000
+@@2: line 1.0 t=100000782 -> @@0
+Missing character: There is no ? in font trip!
+|ip BBBBBB
+@|discretionary via @@0 b=10000 p=88 d=100008526
+@|discretionary via @@1 b=10000 p=88 d=100008744
+@|discretionary via @@2 b=10000 p=88 d=100007744
+@@3: line 1.0- t=100008526 -> @@0
+
+@|par via @@0 b=62 p=-10000 d=3969
+@|par via @@1 b=66 p=-10000 d=104489
+@|par via @@2 b=66 p=-10000 d=4489
+@|par via @@3 b=73 p=-10000 d=105476
+@@4: line 1.1- t=3969 -> @@0
+
+
+Loose \hbox (badness 62) in paragraph at lines 436--436
+ [] |ip BBBBBB
+
+|hbox(7.0+1.0)x100.0, glue set 0.85294
+.|glue(|leftskip) 3.0
+.|hbox(0.0+0.0)x0.0
+.etc.
+
+{restricted horizontal mode: |if}
+{|expandafter}
+
+|dol ->$
+{|noexpand}
+{true}
+{|fi}
+{|expandafter}
+{|noexpand}
+{|expandafter}
+{|noexpand}
+{undefined}
+! Undefined control sequence.
+<recently read> |undefined
+
+<to be read again>
+ |notexpanded: |expandafter
+l.437 ...ed\noexpand\expandafter
+ %
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+{|relax}
+{math shift character $}
+{math mode: |begingroup}
+{|mathop}
+{|vbox}
+{internal vertical mode: |vss}
+{end-group character }}
+{math mode: end-group character }}
+{|limits}
+{superscript character ^}
+! Missing { inserted.
+<to be read again>
+ |mathchoice
+l.438 ...ss}}\limits^\mathchoice
+ {}a}{A|{}}{\mathchoice}
+A left brace was mandatory here, so I've put one in.
+You might want to delete and/or insert some corrections
+so that I will find a matching right brace soon.
+(If you're confused by all this, try typing `I}' now.)
+
+{|mathchoice}
+{end-group character }}
+! Missing { inserted.
+<to be read again>
+ a
+l.438 ...}\limits^\mathchoice{}a
+ }{A|{}}{\mathchoice}
+A left brace was mandatory here, so I've put one in.
+You might want to delete and/or insert some corrections
+so that I will find a matching right brace soon.
+(If you're confused by all this, try typing `I}' now.)
+
+{the letter a}
+{end-group character }}
+{the letter A}
+{subscript character |}
+{end-group character }}
+{end-group character }}
+{|mathchoice}
+! Missing { inserted.
+<to be read again>
+ }
+l.438 ...{}a}{A|{}}{\mathchoice}
+
+A left brace was mandatory here, so I've put one in.
+You might want to delete and/or insert some corrections
+so that I will find a matching right brace soon.
+(If you're confused by all this, try typing `I}' now.)
+
+{end-group character }}
+
+^^M->|relax
+{end-group character }}
+{|relax}
+{begin-group character {}
+{end-group character }}
+{begin-group character {}
+{the letter B}
+{|over}
+{end-group character }}
+{|endgroup}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ |endgroup
+l.439 ...elax{}{B\over}\endgroup
+ \showlonglists$}\showboxbread...
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+! Missing { inserted.
+<to be read again>
+ |endgroup
+l.439 ...elax{}{B\over}\endgroup
+ \showlonglists$}\showboxbread...
+A left brace was mandatory here, so I've put one in.
+You might want to delete and/or insert some corrections
+so that I will find a matching right brace soon.
+(If you're confused by all this, try typing `I}' now.)
+
+{|endgroup}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ |endgroup
+l.439 ...elax{}{B\over}\endgroup
+ \showlonglists$}\showboxbread...
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+{|endgroup}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ |endgroup
+l.439 ...elax{}{B\over}\endgroup
+ \showlonglists$}\showboxbread...
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+{|endgroup}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ |endgroup
+l.439 ...elax{}{B\over}\endgroup
+ \showlonglists$}\showboxbread...
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+{|endgroup}
+
+|showlonglists ->{|tracingcommands 0|pagefillstretch -1|dimen 100 |showb
+oxbreadth 9999 |showboxdepth 9999 |showlists |pagegoal =10000pt}
+{begin-group character {}
+{|tracingcommands}
+
+### math mode entered at line 439
+### math mode entered at line 438
+|mathop|limits
+.|vbox(0.0+0.0)x0.0
+..|glue 0.0 plus 1.0fil minus 1.0fil
+^|mathchoice
+^T|mathord
+^T.|fam1 a
+^S|mathord
+^S.|fam1 A
+^S_{}
+^s|mathchoice
+^sS|mathord
+^sS.{}
+^sS|mathord
+^sS.|fraction, thickness = default
+^sS.\|mathord
+^sS.\.|fam1 B
+^sS./{}
+|mathord
+### restricted horizontal mode entered at line 433
+|vbox(17.0+1.0)x100.0
+.|hbox(7.0+1.0)x100.0, glue set 0.85294
+..|glue(|leftskip) 3.0
+..|hbox(0.0+0.0)x0.0
+..|discretionary
+..|glue 0.0 plus 2.0 minus 88.0
+..|ip A (ligature BB)
+..|kern2.0
+..|ip A (ligature BB)
+..|kern2.0
+..|ip A (ligature BB)
+..|penalty 10000
+..|glue(|parfillskip) 0.0 plus 100.0
+..|glue(|rightskip) 0.0
+.|glue(|parskip) 0.0 plus 42.0 minus 8.0
+.|glue(|baselineskip) 2.0
+.|hbox(7.0+1.0)x100.0, glue set 0.85294
+..|glue(|leftskip) 3.0
+..|hbox(0.0+0.0)x0.0
+..|discretionary
+..|glue 0.0 plus 2.0 minus 88.0
+..|ip A (ligature BB)
+..|kern2.0
+..|discretionary replacing 3
+...|ip B
+..||ip A (ligature BB)
+..||kern2.0
+..||ip B
+..|ip A (ligature BB)
+..|kern2.0
+..|ip A (ligature BB)
+..|penalty 10000
+..|glue(|parfillskip) 0.0 plus 100.0
+..|glue(|rightskip) 0.0
+spacefactor 1000
+### vertical mode entered at line 0
+### current page:
+|glue(|topskip) 20.0 plus 1.0fil
+|hbox(0.0+0.0)x100.0, glue set 0.60527
+.|glue(|leftskip) 3.0
+.|hbox(0.0+0.0)x0.0
+.|glue 4.0 plus 2.0 minus 88.0
+.|glue 4.0 plus 2.0 minus 88.0
+.|glue 4.0 plus 2.0 minus 88.0
+.|glue 4.0 plus 2.0 minus 88.0
+.|glue 4.0 plus 2.0 minus 88.0
+.|glue 4.0 plus 2.0 minus 88.0
+.|glue 4.0 plus 2.0 minus 88.0
+.|penalty 10000
+.|glue(|parfillskip) 0.0 plus 100.0
+.|glue(|rightskip) 0.0
+|glue(|parskip) 0.0 plus 42.0 minus 8.0
+|glue(|baselineskip) 1.8
+|hbox(8.2+0.0)x100.0, glue set 0.9301
+.|glue(|leftskip) 3.0
+.|hbox(0.0+0.0)x0.0
+.|mathon
+.|hbox(0.0+0.0)x3.99, shifted -8.2
+..|glue 0.0 minus -0.00003fil
+..|smalltrip M
+..|kern1.0
+..|glue(|nonscript)
+.|mathoff
+.|penalty 10000
+.|glue(|parfillskip) 0.0 plus 100.0
+.|glue(|rightskip) 0.0
+|glue 0.0 plus 1.0fill
+|glue(|parskip) 0.0 plus 42.0 minus 8.0
+|glue(|baselineskip) 10.0
+|hbox(0.0+0.0)x100.0, glue set 0.97
+.|glue(|leftskip) 3.0
+.|hbox(0.0+0.0)x0.0
+.|mathon
+.|hbox(0.0+0.0)x0.0
+.|hbox(0.0+0.0)x0.0
+.|mathoff
+.|penalty 10000
+.|glue(|parfillskip) 0.0 plus 100.0
+.|glue(|rightskip) 0.0
+|mark{twain}
+|glue 0.0 plus 1.0fill
+|glue 0.0 plus 1.0fil
+|glue 0.0 plus -1.0fil
+|glue 0.0 plus 1.0fil minus 1.0
+|glue(|parskip) 0.0 plus 42.0 minus 8.0
+|glue(|baselineskip) 10.0
+|hbox(0.0+0.0)x100.0, glue set 0.97
+.|glue(|leftskip) 3.0
+.|hbox(0.0+0.0)x0.0
+.|mathon
+.|hbox(0.0+0.0)x0.0
+..|ip t
+..|ip t
+..|glue 0.0 plus -1.0fil
+.|mathoff
+.|penalty 10000
+.|glue(|parfillskip) 0.0 plus 100.0
+.|glue(|rightskip) 0.0
+|glue(|parskip) 0.0 plus 42.0 minus 8.0
+|glue(|baselineskip) 10.0
+|hbox(0.0+0.0)x1.42262, glue set - 0.20552
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x0.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x0.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x4.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+|glue(|baselineskip) 10.0
+|hbox(0.0+0.0)x1.42262, glue set - 0.20552
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x0.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x0.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x4.0
+..|glue 4.0 plus 2.0 minus 88.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+|glue(|lineskip) 0.0 plus 40.0
+|hbox(3545.60136+140.80052)x2070.00168
+.|glue 6.0 plus 4.0 minus 44.0
+.|mathon
+.|hbox(3545.60136+140.80052)x614.40031
+..|hbox(1638.40019+409.6015)x614.40031, shifted -268.80098
+...|enorm b
+..|vbox(3545.60136+0.0)x0.0
+...|kern1638.40019
+...|rule(1638.40019+0.0)x*
+...|kern268.80098
+...|hbox(0.0+0.0)x0.0
+.|glue(|thinmuskip) -0.00002 plus 2.0fill minus -0.00005
+.|hbox(109.40036+95.40038)x1446.60138
+..|vbox(-1.00002+26.9999)x7.0, shifted -20.99995
+...|hbox(-1.00002+2.0)x7.0
+....|ip ^^@
+...|hbox(-1.00002+2.0)x7.0
+....|ip ^^@
+...|hbox(-1.00002+2.0)x7.0
+....|ip ^^@
+...|hbox(-1.00002+2.0)x7.0
+....|ip ^^@
+...|hbox(7.0+1.0)x3.0
+....|ip A
+...|hbox(-1.00002+2.0)x7.0
+....|ip ^^@
+...|hbox(-1.00002+2.0)x7.0
+....|ip ^^@
+...|hbox(-1.00002+2.0)x7.0
+....|ip ^^@
+...|hbox(-1.00002+2.0)x7.0
+....|ip ^^@
+...|hbox(8.0+2.0)x3.0
+....|ip B
+..|ip A
+..|kern1.0
+..|ip a
+..|kern1.0
+..|hbox(-204.80077+409.6015)x1433.60138, shifted -314.20113
+...|enorm ^^@
+.|mathoff
+.|ip A (ligature AA)
+.|kern 1.0
+|glue(|parskip) 0.0 plus 42.0 minus 8.0
+|glue(|lineskip) 0.0 plus 40.0
+|hbox(0.0+0.0)x100.0, glue set 0.97
+.|glue(|leftskip) 3.0
+.|hbox(0.0+0.0)x0.0
+.|penalty 10000
+.|glue(|parfillskip) 0.0 plus 100.0
+.|glue(|rightskip) 0.0
+|penalty 97
+|glue(|baselineskip) 10.0
+|hbox(0.0+0.0)x0.03079
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x0.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+|penalty 97
+|penalty 97
+|glue(|baselineskip) 10.0
+|hbox(0.0+0.0)x0.03079
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x0.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+|penalty 97
+|glue(|baselineskip) 10.0
+|hbox(0.0+0.0)x0.03079
+.|glue(|tabskip) 0.0154 minus 3.21002
+.|hbox(0.0+0.0)x0.0
+.|glue(|tabskip) 0.0154 minus 3.21002
+|penalty 97
+|glue(|parskip) 0.0 plus 42.0 minus 8.0
+|glue(|baselineskip) 10.0
+|hbox(0.0+0.0)x100.0, glue set 0.966
+.|glue(|leftskip) 3.0
+.|hbox(0.0+0.0)x0.0
+.|rule(*+*)x0.4
+.|penalty 10000
+.|glue(|parfillskip) 0.0 plus 100.0
+.|glue(|rightskip) 0.0
+total height 3796.40189 plus 332.0 plus 2.0fil plus -803.0fill minus 49.
+0
+ goal height 16383.99998
+### recent contributions:
+|rule(0.4+0.0)x*
+prevdepth ignored, prevgraf 1 line
+
+! OK.
+|showlonglists ...99 |showlists
+ |pagegoal =10000pt}
+l.439 ...\endgroup\showlonglists
+ $}\showboxbreadth9\showboxdepth9
+
+{restoring |showboxdepth=1}
+{restoring |showboxbreadth=2}
+{restoring |tracingcommands=2}
+{math shift character $}
+{restoring |fam=0}
+{restricted horizontal mode: end-group character }}
+{restoring |x=|char"C8}
+{vertical mode: |showboxbreadth}
+{|showboxdepth}
+
+^^M->|relax
+{|relax}
+{|showbox}
+> \box9=
+|hbox(19.6+1.0)x100.98999
+.|vbox(17.0+1.0)x100.0
+..|hbox(7.0+1.0)x100.0, glue set 0.85294
+...|glue(|leftskip) 3.0
+...|hbox(0.0+0.0)x0.0
+...|discretionary
+...|glue 0.0 plus 2.0 minus 88.0
+...|ip A (ligature BB)
+...|kern2.0
+...|ip A (ligature BB)
+...|kern2.0
+...|ip A (ligature BB)
+...etc.
+..|glue(|parskip) 0.0 plus 42.0 minus 8.0
+..|glue(|baselineskip) 2.0
+..|hbox(7.0+1.0)x100.0, glue set 0.85294
+...|glue(|leftskip) 3.0
+...|hbox(0.0+0.0)x0.0
+...|discretionary
+...|glue 0.0 plus 2.0 minus 88.0
+...|ip A (ligature BB)
+...|kern2.0
+...|discretionary replacing 3
+....|ip B
+...||ip A (ligature BB)
+...||kern2.0
+...||ip B
+...|ip A (ligature BB)
+...|kern2.0
+...etc.
+.|mathon
+.|vbox(19.6+0.0)x0.99
+..|kern10.0
+..|hbox(3.5+4.1)x0.99
+...|smalltrip A
+...|hbox(0.0+0.0)x-0.01, shifted 4.1
+..|kern2.0
+..|hbox(0.0+0.0)x0.99, glue set 0.49501fil
+...|glue 0.0 plus 1.0fil minus 1.0fil
+...|vbox(0.0+0.0)x0.0
+....|glue 0.0 plus 1.0fil minus 1.0fil
+...|glue 0.0 plus 1.0fil minus 1.0fil
+.|glue(|thinmuskip) -0.00002 plus 2.0fill minus -0.00005
+.|hbox(0.0+0.0)x0.0
+.|mathoff
+
+! OK.
+<to be read again>
+ |PAR
+l.440 \showbox9\PAR
+ {\output{}\penalty-10001\deadcycles=2}\scr...
+
+{|par}
+{begin-group character {}
+{|output}
+{|penalty}
+% t=3796.80188 plus 332.0 plus 2.0fil plus -803.0fill minus 49.0 g=10000
+.0 b=0 p=-10001 c=-10001#
+[-2.2.-1118806.0.11.196608.327680.1572864.1073741823]
+Memory usage before: 895&439; after: 290&420; still untouched: 175
+{|deadcycles}
+{end-group character }}
+{restoring |output={|showthe |deadcycles |global |advance |ETC.}
+{|scrollmode}
+
+{|hbox}
+{restricted horizontal mode: |write}
+{|showlists}
+
+### restricted horizontal mode entered at line 441
+|write-{|if 01{|else unbal}|fi }
+spacefactor 1000
+### vertical mode entered at line 0
+prevdepth ignored, prevgraf 1 line
+
+! OK.
+l.441 ...se unbal}\fi}\showlists
+ \tracingonline1%
+
+{|tracingonline}
+{|escapechar}
+{^^?global}
+{^^?global}
+{end}
+! Missing } inserted.
+<inserted text>
+ }
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+I've inserted something that you may have forgotten.
+(See the <inserted text> above.)
+With luck, this will get me unwedged. But if you
+really didn't forget anything, try typing `2' now; then
+my insertion and my current dilemma will both disappear.
+
+{end-group character }}
+{retaining escapechar=256}
+{restoring tracingonline=0}
+%% goal height=16383.99998, max depth=2.0
+{vertical mode: end}
+% t=20.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+% t=20.0 plus 1.0fil plus 1.0fill g=16383.99998 b=0 p=-1073741824 c=-107
+3741824#
+output->{showthe deadcycles global advance countz by1global globaldefs -
+1 gdef local {}unvbox 255end rb }
+{internal vertical mode: showthe}
+> 3.
+<output> {showthe deadcycles
+ global advance countz by1global ...
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+
+{global}
+{global}
+{gdef}
+{unvbox}
+{end}
+! You can't use `end' in internal vertical mode.
+<recently read> end
+
+<output> ...cal {}unvbox 255end
+ rb }
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+Sorry, but I'm not programmed to handle this case;
+I'll just pretend that you didn't ask for it.
+If you're in the wrong mode, you might be able to
+return to the right one by typing `I}' or `I$' or `I\par'.
+
+{end-group character }}
+! Unbalanced output routine.
+<output> ... {}unvbox 255end rb
+ }
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+Your sneaky output routine has problematic {'s and/or }'s.
+I can't handle that very well; good luck.
+
+{restoring local=undefined}
+%% goal height=16383.99998, max depth=2.0
+% t=20.0 plus 1.0fil g=16383.99998 b=0 p=0 c=0#
+{vertical mode: end}
+% t=20.0 plus 1.0fil plus 1.0fill g=16383.99998 b=0 p=0 c=0#
+% t=20.0 plus 1.0fil plus 2.0fill g=16383.99998 b=0 p=-1073741824 c=-107
+3741824#
+! Output loop---3 consecutive dead cycles.
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+I've concluded that your \output is awry; it never does a
+\shipout, so I'm shipping \box255 out myself. Next time
+increase \maxdeadcycles if you want me to be more patient!
+
+
+Completed box being shipped out [-1.2.-1118806.0.11.196608.327680.157286
+4.1073741823]
+vbox(16383.99998+0.0)x100.0, glue set 8182.0fill
+.glue(topskip) 20.0 plus 1.0fil
+.hbox(0.0+0.0)x0.0
+..write-{if 01{else unbal}fi }
+.hbox(0.0+0.0)x100.0
+.glue 0.0 plus 1.0fill
+.penalty 10000
+.hbox(0.0+0.0)x100.0
+.glue 0.0 plus 1.0fill
+
+write->if 01{else unbal}fi
+{no mode: if}
+{false}
+
+! Unbalanced write command.
+<write> if 01{else unbal}fi
+
+<inserted text>
+ }endwrite
+<to be read again>
+ end
+l.442 ...lobal\escapechar256\end
+
+On this page there's a \write with fewer real {'s than }'s.
+I can't handle that very well; good luck.
+
+unbal
+Memory usage before: 334&431; after: 292&418; still untouched: 175
+{vertical mode: end}
+ )
+(end occurred inside a group at level 1)
+(end occurred when if on line 442 was incomplete)
+(end occurred when ifcase on line 419 was incomplete)
+(end occurred when iftrue on line 413 was incomplete)
+Here is how much of TeX's memory you used:
+ 49 strings out of 1677
+ 273 string characters out of 8437
+ 2825 words of memory out of 3000
+ 372 multiletter control sequences out of 2100
+ 3041 words of font info for 4 fonts, out of 20000 for 75
+ 2 hyphenation exceptions out of 307
+ 7i,7n,9p,114b,38s stack positions out of 200i,40n,60p,500b,600s
+
+Output written on trip.dvi (16 pages, 2920 bytes).
diff --git a/systems/unix/tex-gpc/triplog/trip.log.diff b/systems/unix/tex-gpc/triplog/trip.log.diff
new file mode 100644
index 0000000000..44998a121f
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/trip.log.diff
@@ -0,0 +1,16 @@
+1,2c1,2
+< This is TeX-GPC (preloaded format=trip 2008.9.7) 7 SEP 2008 00:41
+< ** &trip trip
+---
+> This is TeX, Version 3.1415926 (preloaded format=trip 2008.3.15) 15 MAR 2008 02:23
+> ** &trip trip
+7296,7297c7296,7297
+< 49 strings out of 1677
+< 273 string characters out of 8437
+---
+> 47 strings out of 1674
+> 253 string characters out of 8354
+7302c7302
+< 7i,7n,9p,114b,38s stack positions out of 200i,40n,60p,500b,600s
+---
+> 7i,7n,9p,113b,38s stack positions out of 200i,40n,60p,500b,600s
diff --git a/systems/unix/tex-gpc/triplog/trip.pl b/systems/unix/tex-gpc/triplog/trip.pl
new file mode 100644
index 0000000000..6a38a92316
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/trip.pl
@@ -0,0 +1,833 @@
+(FAMILY UNSPECIFIED)
+(FACE F MRR)
+(CODINGSCHEME TEX TEST: NOT A REAL FONT)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM O 32107654321)
+(FONTDIMEN
+ (SLANT R -2.0)
+ (SPACE R 0.400001)
+ (STRETCH R 0.200001)
+ (SHRINK R 0.1)
+ (XHEIGHT R 0.45)
+ (QUAD R 1.0)
+ (EXTRASPACE R 0.200001)
+ (PARAMETER D 8 R 0.05)
+ (PARAMETER D 9 R 0.1)
+ (PARAMETER D 10 R 0.200001)
+ (PARAMETER D 11 R 0.3)
+ (PARAMETER D 12 R 0.400001)
+ (PARAMETER D 13 R 0.5)
+ )
+(BOUNDARYCHAR C Z)
+(LIGTABLE
+ (LABEL C t)
+ (KRN O 0 R -1.0)
+ (KRN O 0 R -0.01)
+ (KRN O 0 R -0.02)
+ (KRN O 0 R -0.03)
+ (KRN O 0 R -0.04)
+ (KRN O 0 R -0.05)
+ (KRN O 0 R -0.06)
+ (KRN O 0 R -0.07)
+ (KRN O 0 R -0.08)
+ (KRN O 0 R -0.09)
+ (KRN O 0 R -0.1)
+ (KRN O 0 R -0.11)
+ (KRN O 0 R -0.12)
+ (KRN O 0 R -0.13)
+ (KRN O 0 R -0.14)
+ (KRN O 0 R -0.15)
+ (KRN O 0 R -0.16)
+ (KRN O 0 R -0.17)
+ (KRN O 0 R -0.18)
+ (KRN O 0 R -0.19)
+ (KRN O 0 R -0.2)
+ (KRN O 0 R -0.21)
+ (KRN O 0 R -0.22)
+ (KRN O 0 R -0.23)
+ (KRN O 0 R -0.24)
+ (KRN O 0 R -0.25)
+ (KRN O 0 R -0.26)
+ (KRN O 0 R -0.27)
+ (KRN O 0 R -0.28)
+ (KRN O 0 R -0.29)
+ (KRN O 0 R -0.3)
+ (KRN O 0 R -0.31)
+ (KRN O 0 R -0.32)
+ (KRN O 0 R -0.33)
+ (KRN O 0 R -0.34)
+ (KRN O 0 R -0.35)
+ (KRN O 0 R -0.36)
+ (KRN O 0 R -0.37)
+ (KRN O 0 R -0.38)
+ (KRN O 0 R -0.39)
+ (KRN O 0 R -0.4)
+ (KRN O 0 R -0.41)
+ (KRN O 0 R -0.42)
+ (KRN O 0 R -0.43)
+ (KRN O 0 R -0.44)
+ (KRN O 0 R -0.45)
+ (KRN O 0 R -0.46)
+ (KRN O 0 R -0.47)
+ (KRN O 0 R -0.48)
+ (KRN O 0 R -0.49)
+ (KRN O 0 R -0.5)
+ (KRN O 0 R -0.51)
+ (KRN O 0 R -0.52)
+ (KRN O 0 R -0.53)
+ (KRN O 0 R -0.54)
+ (KRN O 0 R -0.55)
+ (KRN O 0 R -0.56)
+ (KRN O 0 R -0.57)
+ (KRN O 0 R -0.58)
+ (KRN O 0 R -0.59)
+ (KRN O 0 R -0.6)
+ (KRN O 0 R -0.61)
+ (KRN O 0 R -0.62)
+ (KRN O 0 R -0.63)
+ (KRN O 0 R -0.64)
+ (KRN O 0 R -0.65)
+ (KRN O 0 R -0.66)
+ (KRN O 0 R -0.67)
+ (KRN O 0 R -0.68)
+ (KRN O 0 R -0.69)
+ (KRN O 0 R -0.7)
+ (KRN O 0 R -0.71)
+ (KRN O 0 R -0.72)
+ (KRN O 0 R -0.73)
+ (KRN O 0 R -0.74)
+ (KRN O 0 R -0.75)
+ (KRN O 0 R -0.76)
+ (KRN O 0 R -0.77)
+ (KRN O 0 R -0.78)
+ (KRN O 0 R -0.79)
+ (KRN O 0 R -0.8)
+ (KRN O 0 R -0.81)
+ (KRN O 0 R -0.82)
+ (KRN O 0 R -0.83)
+ (KRN O 0 R -0.84)
+ (KRN O 0 R -0.85)
+ (KRN O 0 R -0.86)
+ (KRN O 0 R -0.87)
+ (KRN O 0 R -0.88)
+ (KRN O 0 R -0.89)
+ (KRN O 0 R -0.9)
+ (KRN O 0 R -0.91)
+ (KRN O 0 R -0.92)
+ (KRN O 0 R -0.93)
+ (KRN O 0 R -0.94)
+ (KRN O 0 R -0.95)
+ (KRN O 0 R -0.96)
+ (KRN O 0 R -0.97)
+ (KRN O 0 R -0.98)
+ (KRN O 0 R -0.99)
+ (KRN O 0 R -1.0)
+ (KRN O 0 R -1.01)
+ (KRN O 0 R -1.02)
+ (KRN O 0 R -1.03)
+ (KRN O 0 R -1.04)
+ (KRN O 0 R -1.05)
+ (KRN O 0 R -1.06)
+ (KRN O 0 R -1.07)
+ (KRN O 0 R -1.08)
+ (KRN O 0 R -1.09)
+ (KRN O 0 R -1.1)
+ (KRN O 0 R -1.11)
+ (KRN O 0 R -1.12)
+ (KRN O 0 R -1.13)
+ (KRN O 0 R -1.14)
+ (KRN O 0 R -1.15)
+ (KRN O 0 R -1.16)
+ (KRN O 0 R -1.17)
+ (KRN O 0 R -1.18)
+ (KRN O 0 R -1.19)
+ (KRN O 0 R -1.2)
+ (KRN O 0 R -1.21)
+ (KRN O 0 R -1.22)
+ (KRN O 0 R -1.23)
+ (KRN O 0 R -1.24)
+ (KRN O 0 R -1.25)
+ (KRN O 0 R -1.26)
+ (KRN O 0 R -1.27)
+ (KRN O 0 R -1.28)
+ (KRN O 0 R -1.29)
+ (KRN O 0 R -1.3)
+ (KRN O 0 R -1.31)
+ (KRN O 0 R -1.32)
+ (KRN O 0 R -1.33)
+ (KRN O 0 R -1.34)
+ (KRN O 0 R -1.35)
+ (KRN O 0 R -1.36)
+ (KRN O 0 R -1.37)
+ (KRN O 0 R -1.38)
+ (KRN O 0 R -1.39)
+ (KRN O 0 R -1.4)
+ (KRN O 0 R -1.41)
+ (KRN O 0 R -1.42)
+ (KRN O 0 R -1.43)
+ (KRN O 0 R -1.44)
+ (KRN O 0 R -1.45)
+ (KRN O 0 R -1.46)
+ (KRN O 0 R -1.47)
+ (KRN O 0 R -1.48)
+ (KRN O 0 R -1.49)
+ (KRN O 0 R -1.5)
+ (KRN O 0 R -1.51)
+ (KRN O 0 R -1.52)
+ (KRN O 0 R -1.53)
+ (KRN O 0 R -1.54)
+ (KRN O 0 R -1.55)
+ (KRN O 0 R -1.56)
+ (KRN O 0 R -1.57)
+ (KRN O 0 R -1.58)
+ (KRN O 0 R -1.59)
+ (KRN O 0 R -1.6)
+ (KRN O 0 R -1.61)
+ (KRN O 0 R -1.62)
+ (KRN O 0 R -1.63)
+ (KRN O 0 R -1.64)
+ (KRN O 0 R -1.65)
+ (KRN O 0 R -1.66)
+ (KRN O 0 R -1.67)
+ (KRN O 0 R -1.68)
+ (KRN O 0 R -1.69)
+ (KRN O 0 R -1.7)
+ (KRN O 0 R -1.71)
+ (KRN O 0 R -1.72)
+ (KRN O 0 R -1.73)
+ (KRN O 0 R -1.74)
+ (KRN O 0 R -1.75)
+ (KRN O 0 R -1.76)
+ (KRN O 0 R -1.77)
+ (KRN O 0 R -1.78)
+ (KRN O 0 R -1.79)
+ (KRN O 0 R -1.8)
+ (KRN O 0 R -1.81)
+ (KRN O 0 R -1.82)
+ (KRN O 0 R -1.83)
+ (KRN O 0 R -1.84)
+ (KRN O 0 R -1.85)
+ (KRN O 0 R -1.86)
+ (KRN O 0 R -1.87)
+ (KRN O 0 R -1.88)
+ (KRN O 0 R -1.89)
+ (KRN O 0 R -1.9)
+ (KRN O 0 R -1.91)
+ (KRN O 0 R -1.92)
+ (KRN O 0 R -1.93)
+ (KRN O 0 R -1.94)
+ (KRN O 0 R -1.95)
+ (KRN O 0 R -1.96)
+ (KRN O 0 R -1.97)
+ (KRN O 0 R -1.98)
+ (KRN O 0 R -1.99)
+ (KRN O 0 R -2.0)
+ (KRN O 0 R -2.01)
+ (KRN O 0 R -2.02)
+ (KRN O 0 R -2.03)
+ (KRN O 0 R -2.04)
+ (KRN O 0 R -2.05)
+ (KRN O 0 R -2.06)
+ (KRN O 0 R -2.07)
+ (KRN O 0 R -2.08)
+ (KRN O 0 R -2.09)
+ (KRN O 0 R -2.1)
+ (KRN O 0 R -2.11)
+ (KRN O 0 R -2.12)
+ (KRN O 0 R -2.13)
+ (KRN O 0 R -2.14)
+ (KRN O 0 R -2.15)
+ (KRN O 0 R -2.16)
+ (KRN O 0 R -2.17)
+ (KRN O 0 R -2.18)
+ (KRN O 0 R -2.19)
+ (KRN O 0 R -2.2)
+ (KRN O 0 R -2.21)
+ (KRN O 0 R -2.22)
+ (KRN O 0 R -2.23)
+ (KRN O 0 R -2.24)
+ (KRN O 0 R -2.25)
+ (KRN O 0 R -2.26)
+ (KRN O 0 R -2.27)
+ (KRN O 0 R -2.28)
+ (KRN O 0 R -2.29)
+ (KRN O 0 R -2.3)
+ (SKIP D 3)
+ (LABEL O 55)
+ (LIG O 0 O 55)
+ (/LIG> C q C p)
+ (LABEL O 57)
+ (KRN C A R 0.1)
+ (STOP)
+ (KRN O 0 R -2.31)
+ (KRN O 0 R -2.32)
+ (KRN O 0 R -2.33)
+ (KRN O 0 R -2.34)
+ (KRN O 0 R -2.35)
+ (KRN O 0 R -2.36)
+ (KRN O 0 R -2.37)
+ (KRN O 0 R -2.38)
+ (KRN O 0 R -2.39)
+ (KRN O 0 R -2.4)
+ (KRN O 0 R -2.41)
+ (KRN O 0 R -2.42)
+ (KRN O 0 R -2.43)
+ (KRN O 0 R -2.44)
+ (KRN O 0 R -2.45)
+ (KRN O 0 R -2.46)
+ (KRN O 0 R -2.47)
+ (KRN O 0 R -2.48)
+ (KRN O 0 R -2.49)
+ (KRN O 0 R -2.5)
+ (KRN O 0 R -2.51)
+ (KRN O 0 R -2.52)
+ (KRN O 0 R -2.53)
+ (KRN O 0 R -2.54)
+ (KRN O 0 R -2.55)
+ (KRN O 0 R -2.56)
+ (KRN O 0 R -2.57)
+ (/LIG/>> C r C s)
+ (SKIP D 9)
+ (LABEL C p)
+ (/LIG/ C q C r)
+ (/LIG/> C r C t)
+ (LIG C t C t)
+ (STOP)
+ (LABEL C q)
+ (/LIG/ C u C p)
+ (/LIG/ C s C r)
+ (KRN C t R 0.1)
+ (/LIG> C r C t)
+ (SKIP D 2)
+ (LABEL C r)
+ (LIG/ C u C q)
+ (/LIG C q C u)
+ (STOP)
+ (/LIG/ C p C s)
+ (KRN C s R 0.3)
+ (STOP)
+ (LABEL C s)
+ (LIG/> C p C q)
+ (KRN C r R 0.1)
+ (STOP)
+ (LABEL C u)
+ (/LIG C Z C p)
+ (LIG C p C r)
+ (STOP)
+ (LABEL BOUNDARYCHAR)
+ (LIG/ C q C q)
+ (/LIG C 1 C 5)
+ (KRN O 55 R -0.1)
+ (STOP)
+ (LABEL C 1)
+ (/LIG/ C 1 C 2)
+ (/LIG/ C 2 C 3)
+ (/LIG> O 55 C 1)
+ (SKIP D 1)
+ (LABEL C 2)
+ (/LIG/ C 1 C 3)
+ (/LIG/ C 3 C 4)
+ (SKIP D 2)
+ (LABEL C 3)
+ (/LIG/ C 1 C 4)
+ (/LIG/ C 2 C 4)
+ (/LIG/ C 4 C 5)
+ (SKIP D 3)
+ (LABEL C 4)
+ (/LIG/ C 1 C 5)
+ (/LIG/ C 2 C 5)
+ (/LIG/ C 3 C 5)
+ (/LIG/ C 5 C 6)
+ (SKIP D 4)
+ (LABEL C 5)
+ (/LIG/ C 1 C 6)
+ (/LIG/ C 2 C 6)
+ (/LIG/ C 3 C 6)
+ (/LIG/ C 4 C 6)
+ (/LIG/ C 6 C 7)
+ (SKIP D 5)
+ (LABEL C 6)
+ (/LIG/ C 1 C 7)
+ (/LIG/ C 2 C 7)
+ (/LIG/ C 3 C 7)
+ (/LIG/ C 4 C 7)
+ (/LIG/ C 5 C 7)
+ (/LIG/>> C Z C 7)
+ (STOP)
+ (LABEL C 7)
+ (KRN C Z R 0.1)
+ (LABEL C A)
+ (LIG C A C A)
+ (KRN C B R 0.200001)
+ (KRN O 55 R 0.3)
+ (KRN C 1 R -0.200001)
+ (STOP)
+ (LABEL C B)
+ (LIG C B C A)
+ (LIG O 55 C C)
+ (KRN C C R 0.400001)
+ (STOP)
+ (LABEL C C)
+ (LIG C A O 202)
+ (LIG O 57 C B)
+ (STOP)
+ )
+(CHARACTER O 0
+ (CHARWD R 0.700001)
+ (CHARHT R -0.1)
+ (CHARDP R 0.200001)
+ )
+(CHARACTER O 55
+ (CHARWD R -0.5)
+ (COMMENT
+ (LIG O 0 O 55)
+ (/LIG> C q C p)
+ (KRN C A R 0.1)
+ )
+ )
+(CHARACTER O 57
+ (CHARWD R 0.1)
+ (COMMENT
+ (KRN C A R 0.1)
+ )
+ )
+(CHARACTER C 1
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG/ C 1 C 2)
+ (/LIG/ C 2 C 3)
+ (/LIG> O 55 C 1)
+ (/LIG/ C 3 C 4)
+ (/LIG/ C 4 C 5)
+ (/LIG/ C 5 C 6)
+ (/LIG/ C 6 C 7)
+ (/LIG/>> C Z C 7)
+ )
+ )
+(CHARACTER C 2
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG/ C 1 C 3)
+ (/LIG/ C 3 C 4)
+ (/LIG/ C 4 C 5)
+ (/LIG/ C 5 C 6)
+ (/LIG/ C 6 C 7)
+ (/LIG/>> C Z C 7)
+ )
+ )
+(CHARACTER C 3
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG/ C 1 C 4)
+ (/LIG/ C 2 C 4)
+ (/LIG/ C 4 C 5)
+ (/LIG/ C 5 C 6)
+ (/LIG/ C 6 C 7)
+ (/LIG/>> C Z C 7)
+ )
+ )
+(CHARACTER C 4
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG/ C 1 C 5)
+ (/LIG/ C 2 C 5)
+ (/LIG/ C 3 C 5)
+ (/LIG/ C 5 C 6)
+ (/LIG/ C 6 C 7)
+ (/LIG/>> C Z C 7)
+ )
+ )
+(CHARACTER C 5
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG/ C 1 C 6)
+ (/LIG/ C 2 C 6)
+ (/LIG/ C 3 C 6)
+ (/LIG/ C 4 C 6)
+ (/LIG/ C 6 C 7)
+ (/LIG/>> C Z C 7)
+ )
+ )
+(CHARACTER C 6
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG/ C 1 C 7)
+ (/LIG/ C 2 C 7)
+ (/LIG/ C 3 C 7)
+ (/LIG/ C 4 C 7)
+ (/LIG/ C 5 C 7)
+ (/LIG/>> C Z C 7)
+ )
+ )
+(CHARACTER C 7
+ (CHARWD R 0.0)
+ (COMMENT
+ (KRN C Z R 0.1)
+ (LIG C A C A)
+ (KRN C B R 0.200001)
+ (KRN O 55 R 0.3)
+ (KRN C 1 R -0.200001)
+ )
+ )
+(CHARACTER C A
+ (CHARWD R 0.200001)
+ (CHARHT R 0.700001)
+ (CHARDP R 0.1)
+ (CHARIC R 0.1)
+ (COMMENT
+ (LIG C A C A)
+ (KRN C B R 0.200001)
+ (KRN O 55 R 0.3)
+ (KRN C 1 R -0.200001)
+ )
+ )
+(CHARACTER C B
+ (CHARWD R 0.3)
+ (CHARHT R 0.8)
+ (CHARDP R 0.200001)
+ (COMMENT
+ (LIG C B C A)
+ (LIG O 55 C C)
+ (KRN C C R 0.400001)
+ )
+ )
+(CHARACTER C C
+ (CHARWD R 0.400001)
+ (COMMENT
+ (LIG C A O 202)
+ (LIG O 57 C B)
+ )
+ )
+(CHARACTER C M
+ (CHARWD R 0.6)
+ (CHARIC R 0.200001)
+ (VARCHAR
+ (MID C A)
+ (BOT C B)
+ (REP O 0)
+ )
+ )
+(CHARACTER C a
+ (CHARWD R 0.200001)
+ (CHARHT R 0.700001)
+ (CHARDP R 0.1)
+ (CHARIC R 0.1)
+ (NEXTLARGER O 202)
+ )
+(CHARACTER C b
+ (CHARWD R 0.3)
+ (CHARHT R 0.8)
+ (CHARDP R 0.200001)
+ (NEXTLARGER C M)
+ )
+(CHARACTER C p
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG/ C q C r)
+ (/LIG/> C r C t)
+ (LIG C t C t)
+ )
+ )
+(CHARACTER C q
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG/ C u C p)
+ (/LIG/ C s C r)
+ (KRN C t R 0.1)
+ (/LIG> C r C t)
+ (/LIG/ C p C s)
+ (KRN C s R 0.3)
+ )
+ )
+(CHARACTER C r
+ (CHARWD R 0.0)
+ (COMMENT
+ (LIG/ C u C q)
+ (/LIG C q C u)
+ )
+ )
+(CHARACTER C s
+ (CHARWD R 0.0)
+ (COMMENT
+ (LIG/> C p C q)
+ (KRN C r R 0.1)
+ )
+ )
+(CHARACTER C t
+ (CHARWD R 0.0)
+ (COMMENT
+ (KRN O 0 R -1.0)
+ (KRN O 0 R -0.01)
+ (KRN O 0 R -0.02)
+ (KRN O 0 R -0.03)
+ (KRN O 0 R -0.04)
+ (KRN O 0 R -0.05)
+ (KRN O 0 R -0.06)
+ (KRN O 0 R -0.07)
+ (KRN O 0 R -0.08)
+ (KRN O 0 R -0.09)
+ (KRN O 0 R -0.1)
+ (KRN O 0 R -0.11)
+ (KRN O 0 R -0.12)
+ (KRN O 0 R -0.13)
+ (KRN O 0 R -0.14)
+ (KRN O 0 R -0.15)
+ (KRN O 0 R -0.16)
+ (KRN O 0 R -0.17)
+ (KRN O 0 R -0.18)
+ (KRN O 0 R -0.19)
+ (KRN O 0 R -0.2)
+ (KRN O 0 R -0.21)
+ (KRN O 0 R -0.22)
+ (KRN O 0 R -0.23)
+ (KRN O 0 R -0.24)
+ (KRN O 0 R -0.25)
+ (KRN O 0 R -0.26)
+ (KRN O 0 R -0.27)
+ (KRN O 0 R -0.28)
+ (KRN O 0 R -0.29)
+ (KRN O 0 R -0.3)
+ (KRN O 0 R -0.31)
+ (KRN O 0 R -0.32)
+ (KRN O 0 R -0.33)
+ (KRN O 0 R -0.34)
+ (KRN O 0 R -0.35)
+ (KRN O 0 R -0.36)
+ (KRN O 0 R -0.37)
+ (KRN O 0 R -0.38)
+ (KRN O 0 R -0.39)
+ (KRN O 0 R -0.4)
+ (KRN O 0 R -0.41)
+ (KRN O 0 R -0.42)
+ (KRN O 0 R -0.43)
+ (KRN O 0 R -0.44)
+ (KRN O 0 R -0.45)
+ (KRN O 0 R -0.46)
+ (KRN O 0 R -0.47)
+ (KRN O 0 R -0.48)
+ (KRN O 0 R -0.49)
+ (KRN O 0 R -0.5)
+ (KRN O 0 R -0.51)
+ (KRN O 0 R -0.52)
+ (KRN O 0 R -0.53)
+ (KRN O 0 R -0.54)
+ (KRN O 0 R -0.55)
+ (KRN O 0 R -0.56)
+ (KRN O 0 R -0.57)
+ (KRN O 0 R -0.58)
+ (KRN O 0 R -0.59)
+ (KRN O 0 R -0.6)
+ (KRN O 0 R -0.61)
+ (KRN O 0 R -0.62)
+ (KRN O 0 R -0.63)
+ (KRN O 0 R -0.64)
+ (KRN O 0 R -0.65)
+ (KRN O 0 R -0.66)
+ (KRN O 0 R -0.67)
+ (KRN O 0 R -0.68)
+ (KRN O 0 R -0.69)
+ (KRN O 0 R -0.7)
+ (KRN O 0 R -0.71)
+ (KRN O 0 R -0.72)
+ (KRN O 0 R -0.73)
+ (KRN O 0 R -0.74)
+ (KRN O 0 R -0.75)
+ (KRN O 0 R -0.76)
+ (KRN O 0 R -0.77)
+ (KRN O 0 R -0.78)
+ (KRN O 0 R -0.79)
+ (KRN O 0 R -0.8)
+ (KRN O 0 R -0.81)
+ (KRN O 0 R -0.82)
+ (KRN O 0 R -0.83)
+ (KRN O 0 R -0.84)
+ (KRN O 0 R -0.85)
+ (KRN O 0 R -0.86)
+ (KRN O 0 R -0.87)
+ (KRN O 0 R -0.88)
+ (KRN O 0 R -0.89)
+ (KRN O 0 R -0.9)
+ (KRN O 0 R -0.91)
+ (KRN O 0 R -0.92)
+ (KRN O 0 R -0.93)
+ (KRN O 0 R -0.94)
+ (KRN O 0 R -0.95)
+ (KRN O 0 R -0.96)
+ (KRN O 0 R -0.97)
+ (KRN O 0 R -0.98)
+ (KRN O 0 R -0.99)
+ (KRN O 0 R -1.0)
+ (KRN O 0 R -1.01)
+ (KRN O 0 R -1.02)
+ (KRN O 0 R -1.03)
+ (KRN O 0 R -1.04)
+ (KRN O 0 R -1.05)
+ (KRN O 0 R -1.06)
+ (KRN O 0 R -1.07)
+ (KRN O 0 R -1.08)
+ (KRN O 0 R -1.09)
+ (KRN O 0 R -1.1)
+ (KRN O 0 R -1.11)
+ (KRN O 0 R -1.12)
+ (KRN O 0 R -1.13)
+ (KRN O 0 R -1.14)
+ (KRN O 0 R -1.15)
+ (KRN O 0 R -1.16)
+ (KRN O 0 R -1.17)
+ (KRN O 0 R -1.18)
+ (KRN O 0 R -1.19)
+ (KRN O 0 R -1.2)
+ (KRN O 0 R -1.21)
+ (KRN O 0 R -1.22)
+ (KRN O 0 R -1.23)
+ (KRN O 0 R -1.24)
+ (KRN O 0 R -1.25)
+ (KRN O 0 R -1.26)
+ (KRN O 0 R -1.27)
+ (KRN O 0 R -1.28)
+ (KRN O 0 R -1.29)
+ (KRN O 0 R -1.3)
+ (KRN O 0 R -1.31)
+ (KRN O 0 R -1.32)
+ (KRN O 0 R -1.33)
+ (KRN O 0 R -1.34)
+ (KRN O 0 R -1.35)
+ (KRN O 0 R -1.36)
+ (KRN O 0 R -1.37)
+ (KRN O 0 R -1.38)
+ (KRN O 0 R -1.39)
+ (KRN O 0 R -1.4)
+ (KRN O 0 R -1.41)
+ (KRN O 0 R -1.42)
+ (KRN O 0 R -1.43)
+ (KRN O 0 R -1.44)
+ (KRN O 0 R -1.45)
+ (KRN O 0 R -1.46)
+ (KRN O 0 R -1.47)
+ (KRN O 0 R -1.48)
+ (KRN O 0 R -1.49)
+ (KRN O 0 R -1.5)
+ (KRN O 0 R -1.51)
+ (KRN O 0 R -1.52)
+ (KRN O 0 R -1.53)
+ (KRN O 0 R -1.54)
+ (KRN O 0 R -1.55)
+ (KRN O 0 R -1.56)
+ (KRN O 0 R -1.57)
+ (KRN O 0 R -1.58)
+ (KRN O 0 R -1.59)
+ (KRN O 0 R -1.6)
+ (KRN O 0 R -1.61)
+ (KRN O 0 R -1.62)
+ (KRN O 0 R -1.63)
+ (KRN O 0 R -1.64)
+ (KRN O 0 R -1.65)
+ (KRN O 0 R -1.66)
+ (KRN O 0 R -1.67)
+ (KRN O 0 R -1.68)
+ (KRN O 0 R -1.69)
+ (KRN O 0 R -1.7)
+ (KRN O 0 R -1.71)
+ (KRN O 0 R -1.72)
+ (KRN O 0 R -1.73)
+ (KRN O 0 R -1.74)
+ (KRN O 0 R -1.75)
+ (KRN O 0 R -1.76)
+ (KRN O 0 R -1.77)
+ (KRN O 0 R -1.78)
+ (KRN O 0 R -1.79)
+ (KRN O 0 R -1.8)
+ (KRN O 0 R -1.81)
+ (KRN O 0 R -1.82)
+ (KRN O 0 R -1.83)
+ (KRN O 0 R -1.84)
+ (KRN O 0 R -1.85)
+ (KRN O 0 R -1.86)
+ (KRN O 0 R -1.87)
+ (KRN O 0 R -1.88)
+ (KRN O 0 R -1.89)
+ (KRN O 0 R -1.9)
+ (KRN O 0 R -1.91)
+ (KRN O 0 R -1.92)
+ (KRN O 0 R -1.93)
+ (KRN O 0 R -1.94)
+ (KRN O 0 R -1.95)
+ (KRN O 0 R -1.96)
+ (KRN O 0 R -1.97)
+ (KRN O 0 R -1.98)
+ (KRN O 0 R -1.99)
+ (KRN O 0 R -2.0)
+ (KRN O 0 R -2.01)
+ (KRN O 0 R -2.02)
+ (KRN O 0 R -2.03)
+ (KRN O 0 R -2.04)
+ (KRN O 0 R -2.05)
+ (KRN O 0 R -2.06)
+ (KRN O 0 R -2.07)
+ (KRN O 0 R -2.08)
+ (KRN O 0 R -2.09)
+ (KRN O 0 R -2.1)
+ (KRN O 0 R -2.11)
+ (KRN O 0 R -2.12)
+ (KRN O 0 R -2.13)
+ (KRN O 0 R -2.14)
+ (KRN O 0 R -2.15)
+ (KRN O 0 R -2.16)
+ (KRN O 0 R -2.17)
+ (KRN O 0 R -2.18)
+ (KRN O 0 R -2.19)
+ (KRN O 0 R -2.2)
+ (KRN O 0 R -2.21)
+ (KRN O 0 R -2.22)
+ (KRN O 0 R -2.23)
+ (KRN O 0 R -2.24)
+ (KRN O 0 R -2.25)
+ (KRN O 0 R -2.26)
+ (KRN O 0 R -2.27)
+ (KRN O 0 R -2.28)
+ (KRN O 0 R -2.29)
+ (KRN O 0 R -2.3)
+ (KRN O 0 R -2.31)
+ (KRN O 0 R -2.32)
+ (KRN O 0 R -2.33)
+ (KRN O 0 R -2.34)
+ (KRN O 0 R -2.35)
+ (KRN O 0 R -2.36)
+ (KRN O 0 R -2.37)
+ (KRN O 0 R -2.38)
+ (KRN O 0 R -2.39)
+ (KRN O 0 R -2.4)
+ (KRN O 0 R -2.41)
+ (KRN O 0 R -2.42)
+ (KRN O 0 R -2.43)
+ (KRN O 0 R -2.44)
+ (KRN O 0 R -2.45)
+ (KRN O 0 R -2.46)
+ (KRN O 0 R -2.47)
+ (KRN O 0 R -2.48)
+ (KRN O 0 R -2.49)
+ (KRN O 0 R -2.5)
+ (KRN O 0 R -2.51)
+ (KRN O 0 R -2.52)
+ (KRN O 0 R -2.53)
+ (KRN O 0 R -2.54)
+ (KRN O 0 R -2.55)
+ (KRN O 0 R -2.56)
+ (KRN O 0 R -2.57)
+ (/LIG/>> C r C s)
+ (/LIG/ C p C s)
+ (KRN C s R 0.3)
+ )
+ )
+(CHARACTER C u
+ (CHARWD R 0.0)
+ (COMMENT
+ (/LIG C Z C p)
+ (LIG C p C r)
+ )
+ )
+(CHARACTER O 202
+ (CHARWD R 0.400001)
+ )
diff --git a/systems/unix/tex-gpc/triplog/trip.pl.diff b/systems/unix/tex-gpc/triplog/trip.pl.diff
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/trip.pl.diff
diff --git a/systems/unix/tex-gpc/triplog/trip.typ b/systems/unix/tex-gpc/triplog/trip.typ
new file mode 100644
index 0000000000..28e0b4b74d
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/trip.typ
@@ -0,0 +1,1214 @@
+This is DVItype-GPC
+Options selected:
+ Starting page = *.*.*.*.*.*.*.*.*.*
+ Maximum number of pages = 1000000
+ Output level = 2 (mnemonics)
+ Resolution = 72.27000000 pixels per inch
+numerator/denominator=25400000/473628672
+magnification=2000; 0.00003052 pixels per DVI unit
+' TeX output 2008.09.07:0041'
+
+42: beginning of page 0.0.0.0.11.0.0.0.0.0
+87: down4 129105920
+92: down3 655360
+96: push
+97: right3 1310720
+[ ]
+101: down3 1310720
+105: setrule height 65536, width 65536
+114: pop
+115: eop
+
+116: beginning of page -5000.0.0.0.11.53110374.0.0.0.0
+161: push
+162: down4 116090475
+167: push
+168: right3 262144
+[ ]
+172: setrule height 26214, width 655360
+181: right3 32773
+[ ]
+185: push
+186: fntdef1 0: trip---loaded at size 655360 DVI units
+ (this font is magnified 200%)
+206: fntnum0
+207: setchar65
+[A]
+208: pop
+209: w3 131072
+[ ]
+213: push
+214: setchar65
+[A]
+215: pop
+216: w0 131072
+[ ]
+217: push
+218: setchar65
+[A]
+219: pop
+220: w0 131072
+[ ]
+221: push
+222: setchar65
+[A]
+223: pop
+224: right3 229371
+[ ]
+228: push
+229: setchar65
+[A]
+230: pop
+231: w0 131072
+[ ]
+232: push
+233: setchar65
+[A]
+234: pop
+235: w0 131072
+[ ]
+236: push
+237: setchar65
+[A]
+238: pop
+239: w0 131072
+[ ]
+240: push
+241: setchar65
+[A]
+242: pop
+243: w3 144181
+[ ]
+247: push
+248: setchar65
+[A]
+249: pop
+250: w0 144181
+[ ]
+251: push
+252: setchar65
+[A]
+253: pop
+254: w0 144181
+[ ]
+255: push
+256: setchar65
+[A]
+257: pop
+258: w0 144181
+[ ]
+259: push
+260: setchar65
+[A]
+261: pop
+262: pop
+263: down3 1114112
+267: push
+268: right3 262144
+[ ]
+272: setrule height 26214, width 655360
+281: right3 32773
+285: push
+286: setchar65
+[A]
+287: pop
+288: w3 131072
+[ ]
+292: push
+293: setchar65
+[A]
+294: pop
+295: w0 131072
+[ ]
+296: push
+297: setchar65
+[A]
+298: pop
+299: w0 131072
+[ ]
+300: push
+301: setchar65
+[A]
+302: pop
+303: right3 229371
+[ ]
+307: push
+308: setchar65
+[A]
+309: pop
+310: w0 131072
+[ ]
+311: push
+312: setchar65
+[A]
+313: pop
+314: w0 131072
+[ ]
+315: push
+316: setchar65
+[A]
+317: pop
+318: w0 131072
+[ ]
+319: push
+320: setchar65
+[A]
+321: pop
+322: w3 144181
+[ ]
+326: push
+327: setchar65
+[A]
+328: pop
+329: w0 144181
+[ ]
+330: push
+331: setchar65
+[A]
+332: pop
+333: w0 144181
+[ ]
+334: push
+335: setchar65
+[A]
+336: pop
+337: w0 144181
+[ ]
+338: push
+339: setchar65
+[A]
+340: pop
+341: pop
+342: pop
+343: eop
+
+344: beginning of page 10000.0.0.0.11.131072.0.0.0.0
+389: push
+390: down4 32460719
+395: push
+396: fntnum0
+397: setchar65
+[A]
+398: down3 65536
+402: setrule height 524288, width 327680
+411: pop
+412: y3 1880637
+416: push
+417: setchar65
+[A]
+418: down3 65536
+422: setrule height 524288, width 327680
+431: pop
+432: y0 1880637
+433: push
+434: setchar65
+[A]
+435: down3 65536
+439: setrule height 524288, width 327680
+448: pop
+449: down3 -1396163
+453: push
+454: setchar65
+[A]
+455: down3 65536
+459: setrule height 524288, width 327680
+468: pop
+469: pop
+470: eop
+
+471: beginning of page -333.0.0.0.11.655360000.0.0.0.0
+516: push
+517: down4 651689984
+522: xxx '?-1000.0pt' non-ASCII character in xxx command!
+534: down3 655360
+538: push
+539: fntnum0
+540: setchar65
+[A]
+541: down3 65536
+545: setrule height 524288, width 327680
+554: pop
+555: pop
+556: eop
+
+557: beginning of page -333.0.0.0.11.0.0.0.0.0
+602: eop
+
+603: beginning of page -2.0.0.0.11.0.0.0.0.0
+648: eop
+
+649: beginning of page -2.0.0.0.11.0.0.0.0.0
+694: down4 1001310720
+699: push
+700: push
+701: push
+702: down3 -1441792
+706: down3 1441792
+710: pop
+711: pop
+712: push
+713: push
+714: down3 -1441792
+718: down3 1310720
+722: pop
+723: pop
+724: push
+725: push
+726: down3 -1441792
+730: down3 1310720
+734: pop
+735: pop
+736: pop
+737: y3 655360
+741: push
+742: right3 393217
+[ ]
+746: fntnum0
+747: setchar65
+748: right3 131072
+752: setchar66
+[A B]
+753: pop
+754: y0 655360
+755: push
+756: right3 196609
+760: setchar67
+[ C]
+761: push
+762: putrule height 26214, width 393216
+771: pop
+772: pop
+773: eop
+
+774: beginning of page -2.0.0.0.11.0.0.0.0.0
+819: down4 1001179648
+824: push
+825: right3 196609
+[ ]
+829: fntnum0
+830: setchar65
+831: right3 4653056
+835: setchar47
+836: right3 65536
+840: setchar65
+841: w3 131072
+845: setchar65
+846: w0 131072
+847: setchar65
+[A /A A A]
+848: set1 130
+850: set1 130
+852: setchar66
+853: setchar47
+[B/]
+854: pop
+855: y3 589824
+859: push
+860: right3 5898241
+864: setchar65
+865: w3 131072
+869: setchar65
+870: w0 131072
+871: setchar65
+[ A A A]
+872: pop
+873: down3 524288
+877: push
+878: right3 5898241
+882: setchar65
+883: w3 131072
+887: setchar65
+888: w0 131072
+889: setchar65
+[ A A A]
+890: pop
+891: y0 589824
+892: push
+893: right3 5701633
+897: setchar65
+898: w3 131072
+902: setchar65
+903: w0 131072
+904: setchar65
+905: setchar66
+[ A A AB]
+906: pop
+907: y0 589824
+908: push
+909: right3 5898241
+913: setchar65
+914: w3 131072
+918: setchar65
+919: w0 131072
+920: setchar65
+[ A A A]
+921: pop
+922: y0 589824
+923: push
+924: right1 1
+926: setchar65
+927: right3 131072
+931: setchar66
+932: right3 262144
+936: setchar97
+937: setchar66
+[A B aB]
+938: pop
+939: down3 2031616
+943: push
+944: right3 196609
+948: setchar65
+[ A]
+949: pop
+950: y3 655360
+954: push
+955: right3 262144
+959: setchar45
+[ -]
+960: pop
+961: y0 655360
+962: push
+963: right3 196609
+967: setchar67
+[ C]
+968: pop
+969: y0 655360
+970: push
+971: right3 196609
+975: setchar67
+[ C]
+976: pop
+977: y0 655360
+978: y0 655360
+979: push
+980: right3 6422529
+984: setchar65
+[ A]
+985: pop
+986: eop
+
+987: beginning of page -2.0.0.0.11.0.327680.0.0.0
+1032: down4 1001179648
+1037: push
+1038: right3 262145
+[ ]
+1042: fntnum0
+1043: setchar45
+[-]
+1044: pop
+1045: y3 655360
+1049: push
+1050: right3 262144
+1054: setchar45
+1055: setchar45
+[ --]
+1056: pop
+1057: y0 655360
+1058: push
+1059: right3 327680
+1063: setchar45
+1064: setchar45
+1065: right3 65536
+1069: setchar65
+[ --A]
+1070: pop
+1071: down3 851968
+1075: eop
+
+1076: beginning of page -2.0.0.0.11.0.327680.0.0.0
+1121: down4 639342208
+1126: push
+1127: push
+1128: push
+1129: push
+1130: down3 -602931
+1134: push
+1135: right3 740559
+[ ]
+1139: fntdef1 1: trip---loaded at size 327680 DVI units
+1159: fntnum1
+1160: setchar65
+[A]
+1161: pop
+1162: right3 740559
+[ ]
+1166: down3 176947
+1170: putrule height 65536, width 98304
+1179: down3 635699
+1183: push
+1184: setchar65
+[A]
+1185: pop
+1186: pop
+1187: pop
+1188: push
+1189: right3 845417
+[ ]
+1193: down3 -262144
+1197: fntnum0
+1198: setchar98
+[b]
+1199: pop
+1200: pop
+1201: right3 1078433
+1205: setchar47
+1206: right3 54612
+1210: setchar65
+1211: right2 -7280
+[ /A]
+1214: fntnum1
+1215: setchar45
+1216: setchar45
+1217: right3 -72816
+[--]
+1221: fntnum0
+1222: setchar65
+1223: w3 36408
+1227: setchar47
+1228: w0 36408
+1229: setchar65
+[A/A]
+1230: pop
+1231: down3 4912743
+1235: push
+1236: push
+1237: push
+1238: right3 983045
+[ ]
+1242: fntdef1 2: trip---loaded at size 1310720 DVI units
+ (this font is magnified 400%)
+1262: fntnum2
+1263: setchar45
+[-]
+1264: pop
+1265: push
+1266: right3 425989
+[ ]
+1270: fntnum0
+1271: setchar65
+[A]
+1272: push
+1273: down3 -530842
+1277: push
+1278: push
+1279: right3 65536
+1283: down3 -131072
+1287: setchar97
+[a]
+1288: pop
+1289: right3 196608
+1293: setchar47
+[ /]
+1294: pop
+1295: pop
+1296: pop
+1297: pop
+1298: push
+1299: right3 818550
+[ ]
+1303: down3 -1557300
+1307: putrule height 65536, width 984062
+1316: down3 1557300
+1320: push
+1321: push
+1322: down3 -543949
+1326: fntnum1
+1327: setchar65
+[A]
+1328: pop
+1329: right3 97649
+[ ]
+1333: fntnum0
+1334: setchar65
+[A]
+1335: push
+1336: down3 268698
+1340: setchar45
+[-]
+1341: pop
+1342: push
+1343: right3 -310131
+1347: down3 -1098548
+1351: fntnum1
+1352: setchar65
+1353: right3 98304
+1357: setchar66
+[A B]
+1358: push
+1359: down3 471859
+1363: push
+1364: right3 140175
+[ ]
+1368: fntnum2
+1369: set1 130
+1371: pop
+1372: down3 458754
+1376: push
+1377: push
+1378: down3 -65535
+1382: setchar65
+[A]
+1383: pop
+1384: right3 411421
+1388: setchar65
+[ A]
+1389: push
+1390: down3 -131072
+1394: push
+1395: right3 -65536
+1399: setchar97
+[a]
+1400: pop
+1401: pop
+1402: pop
+1403: pop
+1404: pop
+1405: pop
+1406: pop
+1407: push
+1408: down3 -1179648
+1412: push
+1413: right3 1798972
+[ ]
+1417: fntnum1
+1418: setchar67
+[C]
+1419: pop
+1420: down3 1179648
+1424: push
+1425: push
+1426: right3 1766204
+[ ]
+1430: down3 -262144
+1434: fntnum0
+1435: setchar66
+[B]
+1436: pop
+1437: pop
+1438: pop
+1439: push
+1440: push
+1441: push
+1442: right3 1926404
+[ ]
+1446: down3 -458752
+1450: setchar77
+[M]
+1451: pop
+1452: pop
+1453: down3 524288
+1457: push
+1458: right3 2057476
+[ ]
+1462: fntnum1
+1463: setchar67
+[C]
+1464: pop
+1465: pop
+1466: push
+1467: push
+1468: push
+1469: right3 2414284
+[ ]
+1473: down3 -3556148
+1477: fntnum0
+1478: setchar97
+[a]
+1479: pop
+1480: push
+1481: right3 2610892
+[ ]
+1485: down3 -3556148
+1489: putrule height 458752, width 2400948
+1498: down3 3556148
+1502: push
+1503: push
+1504: push
+1505: push
+1506: push
+1507: down3 -1245183
+1511: push
+1512: right2 6554
+1515: setchar0
+1516: pop
+1517: y3 65535
+1521: push
+1522: right2 6554
+1525: setchar0
+1526: pop
+1527: down3 589824
+1531: push
+1532: right2 6554
+1535: setchar65
+[A]
+1536: pop
+1537: down1 -1
+1539: push
+1540: right2 6554
+1543: setchar0
+1544: pop
+1545: y0 65535
+1546: push
+1547: right2 6554
+1550: setchar0
+1551: pop
+1552: down3 655360
+1556: push
+1557: right2 6554
+1560: setchar66
+[B]
+1561: pop
+1562: pop
+1563: push
+1564: push
+1565: push
+1566: push
+1567: down3 -1425409
+1571: push
+1572: right3 543623
+[ ]
+1576: fntnum2
+1577: setchar65
+[A]
+1578: pop
+1579: down3 2451048
+1583: push
+1584: right3 471860
+[ ]
+1588: fntnum0
+1589: setchar65
+[A]
+1590: push
+1591: down3 -530842
+1595: push
+1596: right3 65536
+1600: fntnum1
+1601: setchar45
+[-]
+1602: pop
+1603: down3 1818625
+1607: push
+1608: push
+1609: down3 -638976
+1613: push
+1614: right2 6554
+1617: fntnum2
+1618: setchar65
+[A]
+1619: pop
+1620: right2 6554
+1623: down3 196608
+1627: putrule height 32768, width 393217
+1636: down3 1081344
+1640: push
+1641: right1 1
+1643: setchar66
+[B]
+1644: pop
+1645: pop
+1646: pop
+1647: pop
+1648: pop
+1649: pop
+1650: pop
+1651: right3 465306
+[ ]
+1655: down3 5600055
+1659: putrule height 596378, width 549850
+1668: pop
+1669: pop
+1670: push
+1671: down3 -2323253
+1675: push
+1676: right3 1015156
+1680: setchar98
+[ b]
+1681: pop
+1682: down4 8545900
+1687: push
+1688: push
+1689: right3 1015156
+[ ]
+1693: down3 -65536
+1697: setchar98
+[b]
+1698: pop
+1699: push
+1700: down3 -786432
+1704: push
+1705: right3 1590412
+[ ]
+1709: fntnum0
+1710: setchar66
+[B]
+1711: pop
+1712: right3 1408372
+[ ]
+1716: down3 393216
+1720: putrule height 131072, width 378648
+1729: pop
+1730: pop
+1731: pop
+1732: push
+1733: right3 1792919
+[ ]
+1737: down3 -65535
+1741: fntnum2
+1742: setchar97
+[a]
+1743: pop
+1744: pop
+1745: right3 2204340
+[ ]
+1749: fntnum0
+1750: setchar65
+[A]
+1751: pop
+1752: pop
+1753: pop
+1754: pop
+1755: pop
+1756: pop
+1757: right3 5011840
+[ ]
+1761: down3 6432362
+1765: setrule height 10906014, width 327680
+1774: pop
+1775: down3 7775850
+1779: push
+1780: right3 1292440
+1784: setchar45
+[ -]
+1785: fntnum1
+1786: setchar98
+[b]
+1787: push
+1788: setchar65
+[A]
+1789: pop
+1790: push
+1791: down3 -537395
+1795: push
+1796: right3 98304
+[ ]
+1800: fntnum0
+1801: setchar65
+[A]
+1802: pop
+1803: down3 1245184
+1807: push
+1808: right3 98304
+1812: fntnum2
+1813: setchar66
+[B]
+1814: fntnum0
+1815: setchar45
+[-]
+1816: pop
+1817: pop
+1818: push
+1819: push
+1820: push
+1821: right3 235275
+[ ]
+1825: down3 -163840
+1829: putrule height 589824, width 530116
+1838: down3 1943143
+1842: push
+1843: push
+1844: push
+1845: push
+1846: right2 6554
+1849: down3 -160563
+1853: putrule height 596378, width 517008
+1862: down3 1382810
+1866: push
+1867: push
+1868: push
+1869: down3 -262144
+1873: setchar98
+[b]
+1874: pop
+1875: push
+1876: down3 -720896
+1880: push
+1881: w3 196608
+1885: setchar112
+1886: setchar116
+1887: setchar115
+1888: setchar113
+1889: setchar116
+1890: w0 196608
+1891: setchar113
+1892: setchar112
+1893: right3 -72816
+1897: setchar117
+[ ptsqt qpu]
+1898: pop
+1899: down3 1048576
+1903: push
+1904: right3 245397
+[ ]
+1908: setrule height 589824, width 26214
+1917: pop
+1918: pop
+1919: push
+1920: right3 320400
+[ ]
+1924: down3 -262144
+1928: setchar98
+[b]
+1929: pop
+1930: pop
+1931: pop
+1932: pop
+1933: pop
+1934: pop
+1935: pop
+1936: pop
+1937: pop
+1938: pop
+1939: pop
+1940: eop
+
+1941: beginning of page -2.0.0.0.11.0.327680.1572864.0.-1073741823
+1986: down4 1001179648
+1991: push
+1992: push
+1993: right1 1
+[ ]
+1995: down3 -65536
+1999: xxx '-12'
+2004: pop
+2005: pop
+2006: y3 655360
+2010: y0 655360
+2011: down3 983040
+2015: push
+2016: push
+2017: right3 196609
+[ ]
+2021: fntnum0
+2022: setchar65
+[A]
+2023: push
+2024: push
+2025: right3 83740
+2029: down3 -262144
+2033: setchar98
+[b]
+2034: pop
+2035: push
+2036: push
+2037: right3 286902
+[ ]
+2041: down3 -425984
+2045: putrule height 65536, width 104858
+2054: down3 688128
+2058: push
+2059: push
+2060: down3 -360448
+2064: fntnum1
+2065: setchar98
+[b]
+2066: pop
+2067: pop
+2068: pop
+2069: pop
+2070: pop
+2071: pop
+2072: push
+2073: push
+2074: down3 589825
+2078: push
+2079: right3 4500861
+[ ]
+2083: fntnum0
+2084: setchar97
+2085: setchar97
+[aa]
+2086: pop
+2087: pop
+2088: pop
+2089: pop
+2090: eop
+
+2091: beginning of page -2.0.0.0.11.0.327680.1572864.1073741823.-1073741823
+2136: down4 1001179648
+2141: push
+2142: right3 196609
+[ ]
+2146: fntnum0
+2147: setchar65
+2148: right3 373830
+[A ]
+2152: set1 130
+2154: pop
+2155: down3 655360
+2159: eop
+
+2160: beginning of page -2.0.0.0.11.196608.327680.1572864.1073741823.0
+2205: down4 1001179648
+2210: push
+2211: down3 -262144
+2215: push
+2216: right3 196609
+[ ]
+2220: fntnum0
+2221: setchar65
+2222: w3 131072
+2226: setchar65
+2227: w0 131072
+2228: setchar65
+[A A A]
+2229: down3 65536
+2233: setrule height 524288, width 327680
+2242: pop
+2243: y3 655360
+2247: push
+2248: right3 196609
+2252: setchar65
+2253: right3 196608
+2257: setchar65
+[ A A]
+2258: pop
+2259: down3 131072
+2263: push
+2264: right3 196609
+2268: setchar65
+2269: w3 131072
+2273: setchar65
+2274: w0 131072
+2275: setchar65
+[ A A A]
+2276: pop
+2277: y0 655360
+2278: push
+2279: right3 196609
+2283: setchar65
+2284: right3 196608
+2288: setchar65
+[ A A]
+2289: pop
+2290: pop
+2291: y3 720896
+2295: push
+2296: down3 -655360
+2300: down3 655360
+2304: pop
+2305: down3 655360
+2309: push
+2310: down3 -262144
+2314: push
+2315: right3 196609
+2319: setchar65
+[ A]
+2320: pop
+2321: pop
+2322: y0 720896
+2323: push
+2324: down2 -32767
+2327: push
+2328: push
+2329: right3 198462
+[ ]
+2333: down3 -163841
+2337: setchar66
+[B]
+2338: pop
+2339: right3 558912
+2343: setchar65
+2344: setchar65
+[ AA]
+2345: pop
+2346: pop
+2347: eop
+
+2348: beginning of page -2.2.-1118806.0.11.196608.327680.1572864.1073741823.0
+2393: down4 1001179648
+2398: push
+2399: push
+2400: right3 -104176
+[ ]
+2404: fntnum0
+2405: setchar66
+[B]
+2406: push
+2407: down3 -1310720
+2411: y3 655360
+2415: y0 655360
+2416: push
+2417: right3 196608
+2421: setchar65
+[ A]
+2422: pop
+2423: pop
+2424: pop
+2425: push
+2426: push
+2427: down3 622591
+2431: push
+2432: down3 458752
+2436: push
+2437: right3 6895421
+2441: setchar65
+[ A]
+2442: pop
+2443: pop
+2444: pop
+2445: pop
+2446: pop
+2447: y3 655360
+2451: push
+2452: push
+2453: right3 420112
+2457: setchar98
+2458: right4 12176941
+2463: setchar98
+[ b b]
+2464: pop
+2465: pop
+2466: y0 655360
+2467: eop
+
+2468: beginning of page -2.2.-1118806.0.11.196608.327680.1572864.1073741823.0
+2513: down3 1179648
+2517: z3 655360
+2521: push
+2522: push
+2523: right3 196608
+[ ]
+2527: down3 -537395
+2531: fntnum1
+2532: setchar77
+[M]
+2533: pop
+2534: pop
+2535: y4 203921760
+2540: y0 203921760
+2541: push
+2542: push
+2543: right3 196608
+[ ]
+2547: fntnum0
+2548: setchar116
+2549: setchar116
+[tt]
+2550: pop
+2551: pop
+2552: z0 655360
+2553: z0 655360
+2554: down4 232364531
+2559: push
+2560: push
+2561: push
+2562: right3 393216
+[ ]
+2566: down4 -17616141
+2571: fntdef1 3: trip---loaded at size 134217727 DVI units
+ (this font is magnified 40960%)
+2591: fntnum3
+2592: setchar98
+[b]
+2593: pop
+2594: pop
+2595: push
+2596: push
+2597: down3 -1376253
+2601: push
+2602: right4 40658554
+[ ]
+2607: fntnum0
+2608: setchar0
+2609: pop
+2610: y3 65535
+2614: push
+2615: right4 40658554
+[ ]
+2620: setchar0
+2621: pop
+2622: y0 65535
+2623: push
+2624: right4 40658554
+[ ]
+2629: setchar0
+2630: pop
+2631: y0 65535
+2632: push
+2633: right4 40658554
+[ ]
+2638: setchar0
+2639: pop
+2640: down3 589824
+2644: push
+2645: right4 40658554
+2650: setchar65
+[ A]
+2651: pop
+2652: down1 -1
+2654: push
+2655: right4 40658554
+[ ]
+2660: setchar0
+2661: pop
+2662: y0 65535
+2663: push
+2664: right4 40658554
+[ ]
+2669: setchar0
+2670: pop
+2671: y0 65535
+2672: push
+2673: right4 40658554
+[ ]
+2678: setchar0
+2679: pop
+2680: y0 65535
+2681: push
+2682: right4 40658554
+[ ]
+2687: setchar0
+2688: pop
+2689: z0 655360
+2690: push
+2691: right4 40658554
+2696: setchar66
+[ B]
+2697: pop
+2698: pop
+2699: right4 41117306
+2704: setchar65
+2705: w3 65536
+2709: setchar97
+[ Aa]
+2710: push
+2711: w0 65536
+2712: down4 -20591485
+2717: fntnum3
+2718: setchar0
+2719: pop
+2720: pop
+2721: right4 135463022
+[ ]
+2726: fntnum0
+2727: setchar65
+[A]
+2728: pop
+2729: down4 9227503
+2734: z0 655360
+2735: z0 655360
+2736: z0 655360
+2737: z0 655360
+2738: down2 26214
+2741: putrule height 26214, width 135659630
+2750: eop
+
+2751: beginning of page -1.2.-1118806.0.11.196608.327680.1572864.1073741823.0
+2796: down3 1179648
+2800: eop
+Postamble starts at byte 2801.
+maxv=1073741823, maxh=539754497, maxstackdepth=17, totalpages=16
+Font 3: trip scaled 409600
+Font 2: trip scaled 4000
+Font 1: trip
+Font 0: trip scaled 2000
diff --git a/systems/unix/tex-gpc/triplog/trip.typ.diff b/systems/unix/tex-gpc/triplog/trip.typ.diff
new file mode 100644
index 0000000000..2adcb4a6aa
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/trip.typ.diff
@@ -0,0 +1,8 @@
+1c1
+< This is DVItype-GPC
+---
+> This is DVItype, Version 3.6
+9c9
+< ' TeX output 2008.09.07:0041'
+---
+> ' TeX output 2008.03.15:0223'
diff --git a/systems/unix/tex-gpc/triplog/tripin.log.diff b/systems/unix/tex-gpc/triplog/tripin.log.diff
new file mode 100644
index 0000000000..42dda13c0c
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/tripin.log.diff
@@ -0,0 +1,10 @@
+1c1
+< This is TeX-GPC (INITEX) 7 SEP 2008 00:38
+---
+> This is TeX, Version 3.1415926 (INITEX) 15 MAR 2008 02:23
+450,451c450,451
+< (preloaded format=trip 2008.9.7)
+< 1323 strings of total length 23563
+---
+> (preloaded format=trip 2008.3.15)
+> 1326 strings of total length 23646
diff --git a/systems/unix/tex-gpc/triplog/tripos.tex b/systems/unix/tex-gpc/triplog/tripos.tex
new file mode 100644
index 0000000000..a0e25a24d8
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/tripos.tex
@@ -0,0 +1,3 @@
+
+\uppercase {0{\outputpenalty }}
+[\uppercase {mmmmmmmmmm}[
diff --git a/systems/unix/tex-gpc/triplog/tripos.tex.diff b/systems/unix/tex-gpc/triplog/tripos.tex.diff
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/systems/unix/tex-gpc/triplog/tripos.tex.diff
diff --git a/systems/unix/tex-gpc/weave.ch b/systems/unix/tex-gpc/weave.ch
new file mode 100644
index 0000000000..d125f8f108
--- /dev/null
+++ b/systems/unix/tex-gpc/weave.ch
@@ -0,0 +1,162 @@
+% This is a change file for WEAVE-GPC, Wolfgang Helbig, Nov. 2007
+% Apr. 2008 get file names from command line
+% Jul. 2008 pass the exit code
+[0] About WEAVE-GPC
+@x
+\pageno=\contentspagenumber \advance\pageno by 1
+@y
+\pageno=\contentspagenumber \advance\pageno by 1
+\input webmac-gpc
+\def\name{\tt WEAVE}
+
+\let\maybe=\iffalse % print changed modules only.
+
+\N0\*. About \namegpc.\fi
+This is an adaption of Donald~E. Knuth's \.{WEAVE}, version 4.4
+from December 2002, to Unix. \namegpc\ is based on GNU~Pascal,
+version 2.1.
+
+This program expects three file names on the command line: A
+web~file (\.{.web}), a change~file (\.{.ch}), and a \TeX~file
+(\.{.tex}). If you call \namegpc\ with the wrong number of command
+line arguments, it will tell you and exit.
+To support shell scripting, \namegpc\ sets the exit code to its
+`\\{history}'---zero means ok, one means a warning was issued, two
+an error occurred and three means \.{WEAVE} ended prematurely.
+
+\hint
+
+The input file \.{weave.tex} will exceed \TeX's memory. To fix,
+change the constant value \.{MEMMAX} to 32000 in \.{tex.p},
+recompile and run it on \.{weave.tex}. Put \.{\\tracingstats1}
+in \.{weave.tex}. The log file then shows the memory \TeX\ needed
+to compile its input.
+\medskip
+Comments and questions are welcome!
+\bigskip
+\address
+@z
+
+[1] Change the banner line
+@x
+@d banner=='This is WEAVE, Version 4.4'
+@y
+@d banner=='This is WEAVE-GPC'
+@z
+
+[2] terminal output and input
+@x
+program WEAVE(@!web_file,@!change_file,@!tex_file);
+@y
+program WEAVE(@!input,@!output);
+@z
+
+[3] shift left to turn debugging on, shift right to turn it off
+ @x
+ @d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging}
+ @d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging}
+ @y
+ @d debug==
+ @d gubed==
+ @z
+
+[3] turn stats on
+@x
+@d stat==@{ {change this to `$\\{stat}\equiv\null$'
+ when gathering usage statistics}
+@d tats==@t@>@} {change this to `$\\{tats}\equiv\null$'
+ when gathering usage statistics}
+@y
+@d stat==
+@d tats==
+@z
+
+[4] compiler directives
+@x
+@{@&$C-,A+,D-@} {no range check, catch arithmetic overflow, no debug overhead}
+@!debug @{@&$C+,D+@}@+ gubed {but turn everything on when debugging}
+@y
+@z
+
+[7] default case branch
+@x
+@d othercases == others: {default for cases not listed explicitly}
+@y
+@d othercases == @+else {default for cases not listed explicitly}
+@z
+
+[12] the type of text_files is text in ISO Pascal
+@x
+@!text_file=packed file of text_char;
+@y
+@!text_file=text;
+@z
+
+[20] terminal input/output
+@x
+@d print(#)==write(term_out,#) {`|print|' means write on the terminal}
+@y
+@d term_in == input
+@d term_out == output
+@d print(#)==write(term_out,#) {`|print|' means write on the terminal}
+@z
+
+[20] terminal output, implicitely defined in ISO Pasal
+@x
+@<Globals...@>=
+@!term_out:text_file; {the terminal as an output file}
+@y
+@z
+
+[21] terminal output, output is rewritten implicitely in ISO Pascal
+@x
+@<Set init...@>=
+rewrite(term_out,'TTY:'); {send |term_out| output to the terminal}
+@y
+@z
+
+[22] terminal output, don't need update in ISO Pascal
+@x
+@d update_terminal == break(term_out) {empty the terminal output buffer}
+@y
+@d update_terminal == do_nothing
+@z
+
+[24] get file names from command line
+@x
+begin reset(web_file); reset(change_file);
+@y
+begin reset(web_file, param_str(1)); reset(change_file, param_str(2));
+@z
+
+[26] get file names from command line
+@x
+rewrite(tex_file);
+@y
+if param_count <> 3 then fatal_error('Usage: ', param_str(0),
+ ' web-file change-file TeX-file');
+rewrite(tex_file, param_str(3));
+@z
+
+[258] Don't define Pascal's standard text files
+@x
+@!term_in:text_file; {the user's terminal as an input file}
+@y
+@z
+
+[259] terminal input, implicitely done in ISO Pascal
+@x
+reset(term_in,'TTY:','/I'); {open |term_in| as the terminal, don't do a |get|}
+@y
+@z
+
+[263] put eol after last terminal out line
+@x
+fatal_message: print_nl('(That was a fatal error, my friend.)');
+end {there are no other cases}
+@y
+fatal_message: print_nl('(That was a fatal error, my friend.)');
+end; {there are no other cases}
+new_line;
+halt(history) {pass the history as exit code to the operating system}
+@z
diff --git a/systems/unix/tex-gpc/webmac-gpc.tex b/systems/unix/tex-gpc/webmac-gpc.tex
new file mode 100644
index 0000000000..cd86a8b108
--- /dev/null
+++ b/systems/unix/tex-gpc/webmac-gpc.tex
@@ -0,0 +1,18 @@
+% TeX-GPC extensions to WEB macros
+\def\namegpc{$\hbox{\name}{}_{\fam0 GPC}$}
+\def\TeXgpc{\TeX$_{\fam0 GPC}$}
+\def\address{{\parindent0pt\sl
+ July 2014
+
+ Wolfgang Helbig, Programmierer\hfill
+ \.{http://wwwlehre.dhbw-stuttgart.de/\~helbig/}
+
+ Waiblingen, Baden-\kern-1.4pt W\"urttemberg\hfill
+ \.{helbig.wolfgang@kabelbw.de}
+}}
+\def\title{\namegpc}
+
+\def\hint{For hints on how to install and use this program, see
+the readme file in the \TeXgpc\ distribution and the \.{WEB} manual
+in Knuth's distribution (\.{webman.tex}). For further comments on
+GNU Pascal extensions used here consult \.{tex.ch}.}
diff --git a/systems/unix/tex-gpc/xdvi/README b/systems/unix/tex-gpc/xdvi/README
new file mode 100644
index 0000000000..724661ecf6
--- /dev/null
+++ b/systems/unix/tex-gpc/xdvi/README
@@ -0,0 +1,32 @@
+How to install xdvi for TeX-GPC:
+
+Get the source from
+ ftp http://math.berkeley.edu/~vojta/xdvi/xdvi-22.85.tar.gz
+It unpacks into xdvi-22.85.
+
+Edit config reflecting your binary directory, your man directory
+(i. e. a directory you have write permissions and has a subdirectory
+man1) and the resolution of your printer and then switch to xdvi-22.84
+and run
+../config && make clean && make && make install
+
+Unfortunately this neither works for NetBSD nor for Mac OS X.
+For NetBSD use this:
+../config && make clean && make && ../load && make install
+
+For Mac OS X use this:
+Instead replace the configure script in xdvi-22.84 with macconfigure,
+and replace xdvi.h with macxdvi.h.
+
+The xdvi is configured soley by DVIPSconf/XDvi, move XDvi to DVIPSconf.
+And this does not work on Mac-OS-X.
+workaround: xrdb -merge DVIPSconf/XDvi
+
+You might want to change /etc/man.conf to include your private man pages.
+I boldly replaced the line
+_default /usr/{share,X11R6,pkg,local}/man/
+to
+_default /usr/{helbig,share,X11R6,pkg,local}/man/
+
+enjoy
+Wolfgang
diff --git a/systems/unix/tex-gpc/xdvi/XDvi b/systems/unix/tex-gpc/xdvi/XDvi
new file mode 100644
index 0000000000..f71780809b
--- /dev/null
+++ b/systems/unix/tex-gpc/xdvi/XDvi
@@ -0,0 +1,14 @@
+! Options for xdvi for TeX-GPC:
+! Adapt pixelsPerInch to the resoulution of your printer.
+! mfMode is irrelavant in TeX-GPC (it is configured in mkpkfonts and mkfonts),
+! if set it breaks automatic .pk font making.
+!
+! geometry does not work with Mac OS X.
+! use xrdb -merge DVIPSConf/XDvi instead.
+xdvi*pixelsPerInch: 600
+xdvi*geometry: 760x715+0+0
+xdvi*background: white
+xdvi*paper: a4
+xdvi*shrinkFactor: 5
+xdvi*expert: 1
+xdvi*tickUnits: pt
diff --git a/systems/unix/tex-gpc/xdvi/config b/systems/unix/tex-gpc/xdvi/config
new file mode 100644
index 0000000000..7aabc0e718
--- /dev/null
+++ b/systems/unix/tex-gpc/xdvi/config
@@ -0,0 +1,15 @@
+# configure script for xdvi for TeX-GPC and NetBSD 3.0
+# change the prefix and the base resolution in BDPI.
+# The resolution must agree with the one in the METAFONT mode localfont!
+# Do not specify a mfmode here! It will break automatic font generation.
+CPPFLAGS='-DBDPI=600 -DMAKEPK=4' ./configure \
+--mandir=/users/helbig/man \
+--bindir=/users/helbig/bin \
+--with-default-texmf-path=DVIPSconf \
+--enable-ps-gs \
+--enable-old-make-pk \
+--enable-extra-app-defaults=DVIPSconf \
+--with-default-font-path=PKfonts \
+--with-default-header-path=DVIPSconf \
+--with-default-fig-path=.:TeXinputs \
+--without-mfmode
diff --git a/systems/unix/tex-gpc/xdvi/load b/systems/unix/tex-gpc/xdvi/load
new file mode 100644
index 0000000000..7128ea114b
--- /dev/null
+++ b/systems/unix/tex-gpc/xdvi/load
@@ -0,0 +1,5 @@
+# add -R for X11 shared library, necessary with NetBSD
+cc -Xlinker --allow-multiple-definition -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -o xdvi \
+xdvi.o events.o dvi-init.o dvi-draw.o special.o font-open.o filefind.o \
+pk.o vf.o util.o popups.o psheader.o psgs.o -lXaw -lXmu -lXt -lSM \
+-lICE -lm -lXext -lX11
diff --git a/systems/unix/tex-gpc/xdvi/macconfigure b/systems/unix/tex-gpc/xdvi/macconfigure
new file mode 100755
index 0000000000..71a46d4953
--- /dev/null
+++ b/systems/unix/tex-gpc/xdvi/macconfigure
@@ -0,0 +1,4640 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --with-x-toolkit=PKG use X toolkit PKG (xaw, xaw3d, motif, or no) [xaw]"
+ac_help="$ac_help
+ --with-tetex compile for use with teTeX"
+ac_help="$ac_help
+ --disable-grey disable greyscale anti-aliasing for shrunken bitmaps"
+ac_help="$ac_help
+ --disable-color disable support for color specials"
+ac_help="$ac_help
+ --disable-buttons disable buttons on the side of the window"
+ac_help="$ac_help
+ --disable-make-pk disable automatic generation of pk files via mktexpk
+ --enable-make-pk=PATH specify path for mktexpk"
+ac_help="$ac_help
+ --enable-old-make-pk[=PATH]
+ use old-style MakeTeXPK script instead of mktexpk"
+ac_help="$ac_help
+ --enable-gf enable gf format pixel files (in addition to pk)"
+ac_help="$ac_help
+ --enable-ps-gs[=PATH] enable PostScript support via ghostscript
+ (PATH, if given, points to the gs interpreter)"
+ac_help="$ac_help
+ --enable-ps-dps enable PostScript support via Display PostScript"
+ac_help="$ac_help
+ --enable-ps-news enable PostScript support via NeWS (Sun OpenWin)"
+ac_help="$ac_help
+ --enable-config-file=PATHLIST
+ look for configuration file in PATHLIST"
+ac_help="$ac_help
+ --enable-self-auto[=PATHLIST]
+ same as above; also determine xdvi binary path"
+ac_help="$ac_help
+ --enable-extra-app-defaults[=PATHLIST]
+ same as above; also enable extra app-defaults file"
+ac_help="$ac_help
+ --enable-dosnames use DOS-style names for fonts (e.g., dpi300/cmr10.pk)"
+ac_help="$ac_help
+ --enable-a4 set default paper size to A4 and default unit to cm"
+ac_help="$ac_help
+ --enable-texxet enable typesetting for right-to-left languages"
+ac_help="$ac_help
+ --with-mfmode=MODE:DPI set default Metafont mode to MODE at DPI dots/inch
+ --without-mfmode set default Metafont mode to none"
+ac_help="$ac_help
+ --with-default-texmf-path=PATH
+ set default texmf list to PATH"
+ac_help="$ac_help
+ --with-default-font-path=PATH
+ set default font path to PATH"
+ac_help="$ac_help
+ --with-default-vf-path=PATH
+ set default virtual font path to PATH"
+ac_help="$ac_help
+ --with-default-header-path=PATH
+ set default path path for PS figures to PATH"
+ac_help="$ac_help
+ --with-default-fig-path=PATH
+ set default figure path to PATH"
+ac_help="$ac_help
+ --with-default-source-path=PATH
+ set default path for source specials to PATH"
+ac_help="$ac_help
+ --with-default-dvips-path=CMD
+ set default print command to CMD"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+aux_top=NONE
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+imake=
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+x_top=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -aux-top | --aux-top | --aux-to | --aux-t | --aux- | --aux | --au | --a)
+ ac_prev=aux_top ;;
+ -aux-top=* | --aux-top=* | --aux-to=* | --aux-t=* | --aux-=* | --aux=* \
+ | --au=* | --a=*)
+ aux_top="$ac_optarg" ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --imake set flag for running from within imake
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --x-top=XTOP installation directory for X
+ --aux-top=AUXTOP secondary X top directory (e.g., for toolkit)
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [XTOP or $ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR [XTOP/include or guessed]
+ --x-libraries=DIR X library files are in DIR [XTOP/lib or guessed]
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ --imake | --imak | --ima | --im | -imake | -imak | -ima | -im)
+ imake=yes ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -x-top | --x-top | --x-to | --x-t)
+ ac_prev=x_top ;;
+ -x-top=* | --x-top=* | --x-to=* | --x-t=*)
+ x_top="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# Set prefix to x-top if appropriate.
+test "x$prefix" = xNONE && prefix="$x_top"
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=xdvi.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:613: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:643: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:694: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+ac_exeext=
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 737 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:773: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:863: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:916: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 921 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_cygwin=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:949: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 954 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+# helbig: gcc -g will create a directory conftest.dSYM, and configure thinks
+# that dSYM is the suffix. Furthermore, rm -rf is needed to remove the directory.
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:980: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+ ac_cv_exeext=.exe
+else
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.$ac_ext
+ ac_cv_exeext=
+ if { (eval echo configure:990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.dSYM) ;;
+ *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ else
+ { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ rm -rf conftest*
+ test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+
+
+cat <<EOF >>confdefs.h
+#undef _XOPEN_SOURCE /* needed because of imake */
+#define _XOPEN_SOURCE 1
+#define _XOPEN_SOURCE_EXTENDED 1
+#define __EXTENSIONS__ 1
+#ifdef _AIX
+#define _ALL_SOURCE 1
+#endif
+EOF
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1024: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1039 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1056 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1073 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+# If we find X, set shell vars x_includes and x_libraries to the
+# paths, otherwise set no_x=yes.
+# Uses ac_ vars as temps to allow command line to override cache and checks.
+# --without-x overrides everything else, but does not touch the cache.
+echo $ac_n "checking for X""... $ac_c" 1>&6
+echo "configure:1108: checking for X" >&5
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+ # Both variables are already set.
+ have_x=yes
+ else
+if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+if test "x$x_top" != xNONE; then
+ ac_x_includes="$x_top/include" ac_x_libraries="$x_top/lib"
+ if test ! -f "$ac_x_includes/X11/Xos.h" || test ! -d "$ac_x_libraries"; then
+ { echo "configure: error: $x_top does not point to a valid X install tree" 1>&2; exit 1; }
+ fi
+else
+ ac_x_includes=NO ac_x_libraries=NO
+ rm -fr conftestdir
+if mkdir conftestdir; then
+ cd conftestdir
+ # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+ cat > Imakefile <<'EOF'
+acfindx:
+ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+EOF
+# helbig: The suffix for libraries in Mac OS X is dylib.
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in dylib; do
+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+ test -f $ac_im_libdir/libX11.$ac_extension; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case "$ac_im_incroot" in
+ /usr/include) ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
+ esac
+ case "$ac_im_usrlibdir" in
+ /usr/lib | /lib) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
+ esac
+ fi
+ cd ..
+ rm -fr conftestdir
+fi
+
+fi
+if test "$ac_x_includes" = NO; then
+ # Guess where to find include files, by looking for this one X11 .h file.
+ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+ # First, try using that file with no special directory specified.
+cat > conftest.$ac_ext <<EOF
+#line 1171 "configure"
+#include "confdefs.h"
+#include <$x_direct_test_include>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ # Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ for ac_dir in \
+ /usr/X11/include \
+ /usr/X11R6/include \
+ /usr/X11R5/include \
+ /usr/X11R4/include \
+ \
+ /usr/include/X11 \
+ /usr/include/X11R6 \
+ /usr/include/X11R5 \
+ /usr/include/X11R4 \
+ \
+ /usr/local/X11/include \
+ /usr/local/X11R6/include \
+ /usr/local/X11R5/include \
+ /usr/local/X11R4/include \
+ \
+ /usr/local/include/X11 \
+ /usr/local/include/X11R6 \
+ /usr/local/include/X11R5 \
+ /usr/local/include/X11R4 \
+ \
+ /usr/X386/include \
+ /usr/x386/include \
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
+ /usr/local/include \
+ /usr/unsupported/include \
+ /usr/athena/include \
+ /usr/local/x11r5/include \
+ /usr/lpp/Xamples/include \
+ \
+ /usr/openwin/include \
+ /usr/openwin/share/include \
+ ; \
+ do
+ if test -r "$ac_dir/$x_direct_test_include"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+ done
+fi
+rm -f conftest*
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+ # Check for the libraries.
+
+ test -z "$x_direct_test_library" && x_direct_test_library=Xt
+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS="$LIBS"
+ LIBS="-l$x_direct_test_library $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1245 "configure"
+#include "confdefs.h"
+
+int main() {
+${x_direct_test_function}()
+; return 0; }
+EOF
+if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
+ /usr/X11/lib \
+ /usr/X11R6/lib \
+ /usr/X11R5/lib \
+ /usr/X11R4/lib \
+ \
+ /usr/lib/X11 \
+ /usr/lib/X11R6 \
+ /usr/lib/X11R5 \
+ /usr/lib/X11R4 \
+ \
+ /usr/local/X11/lib \
+ /usr/local/X11R6/lib \
+ /usr/local/X11R5/lib \
+ /usr/local/X11R4/lib \
+ \
+ /usr/local/lib/X11 \
+ /usr/local/lib/X11R6 \
+ /usr/local/lib/X11R5 \
+ /usr/local/lib/X11R4 \
+ \
+ /usr/X386/lib \
+ /usr/x386/lib \
+ /usr/XFree86/lib/X11 \
+ \
+ /usr/lib \
+ /usr/local/lib \
+ /usr/unsupported/lib \
+ /usr/athena/lib \
+ /usr/local/x11r5/lib \
+ /usr/lpp/Xamples/lib \
+ /lib/usr/lib/X11 \
+ \
+ /usr/openwin/lib \
+ /usr/openwin/share/lib \
+ ; \
+do
+ for ac_extension in dylib; do
+ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f conftest*
+fi # $ac_x_libraries = NO
+
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+ # Didn't find X anywhere. Cache the known absence of X.
+ ac_cv_have_x="have_x=no"
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+ fi
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ echo "$ac_t""$have_x" 1>&6
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+fi
+
+if test "$no_x" = yes || test -n "$imake"; then
+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+ if test "x$aux_top" != xNONE; then
+ X_CFLAGS="$X_CFLAGS -I$aux_top/include"
+ X_LIBS="$X_LIBS -L$aux_top/lib"
+ fi
+
+ if test -n "$x_includes"; then
+ X_CFLAGS="$X_CFLAGS -I$x_includes"
+ fi
+
+ # It would also be nice to do this for all -L options, not just this one.
+ if test -n "$x_libraries"; then
+ X_LIBS="$X_LIBS -L$x_libraries"
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space. Words are not sufficient . . . .
+ case "`(uname -sr) 2>/dev/null`" in
+ "SunOS 5"*)
+ echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
+echo "configure:1358: checking whether -R must be followed by a space" >&5
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
+ cat > conftest.$ac_ext <<EOF
+#line 1361 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_R_nospace=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_R_nospace=no
+fi
+rm -f conftest*
+ if test $ac_R_nospace = yes; then
+ echo "$ac_t""no" 1>&6
+ if test "x$aux_top" != xNONE; then
+ X_LIBS="$X_LIBS -R$aux_top/lib"
+ fi
+ X_LIBS="$X_LIBS -R$x_libraries"
+ else
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat > conftest.$ac_ext <<EOF
+#line 1387 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_R_space=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_R_space=no
+fi
+rm -f conftest*
+ if test $ac_R_space = yes; then
+ echo "$ac_t""yes" 1>&6
+ if test "x$aux_top" != xNONE; then
+ X_LIBS="$X_LIBS -R $aux_top/lib"
+ fi
+ X_LIBS="$X_LIBS -R $x_libraries"
+ else
+ echo "$ac_t""neither works" 1>&6
+ fi
+ fi
+ LIBS="$ac_xsave_LIBS"
+ esac
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And karl@cs.umb.edu says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
+echo "configure:1429: checking for dnet_ntoa in -ldnet" >&5
+ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldnet $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1437 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
+echo "configure:1470: checking for dnet_ntoa in -ldnet_stub" >&5
+ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldnet_stub $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1478 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # on Irix 5.2, according to dickey@clark.net.
+ echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:1518: checking for gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1523 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+gethostbyname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_gethostbyname=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_gethostbyname=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:1567: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lnsl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1575 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:1586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # lieder@skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says simon@lia.di.epfl.ch: it contains
+ # gethostby* variants that don't use the nameserver (or something).
+ # -lsocket must be given before -lnsl if both are needed.
+ # We assume that if connect needs -lnsl, so does gethostbyname.
+ echo $ac_n "checking for connect""... $ac_c" 1>&6
+echo "configure:1616: checking for connect" >&5
+if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1621 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+connect();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_connect=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_connect=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_connect = no; then
+ echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
+echo "configure:1665: checking for connect in -lsocket" >&5
+ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1673 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect();
+
+int main() {
+connect()
+; return 0; }
+EOF
+if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
+ echo $ac_n "checking for remove""... $ac_c" 1>&6
+echo "configure:1708: checking for remove" >&5
+if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1713 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char remove(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char remove();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_remove) || defined (__stub___remove)
+choke me
+#else
+remove();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_remove=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_remove=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_remove = no; then
+ echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
+echo "configure:1757: checking for remove in -lposix" >&5
+ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1765 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char remove();
+
+int main() {
+remove()
+; return 0; }
+EOF
+if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ echo $ac_n "checking for shmat""... $ac_c" 1>&6
+echo "configure:1800: checking for shmat" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1805 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shmat(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shmat();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_shmat) || defined (__stub___shmat)
+choke me
+#else
+shmat();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_shmat = no; then
+ echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+echo "configure:1849: checking for shmat in -lipc" >&5
+ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lipc $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1857 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shmat();
+
+int main() {
+shmat()
+; return 0; }
+EOF
+if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS="$LDFLAGS"
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+ echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
+echo "configure:1901: checking for IceConnectionNumber in -lICE" >&5
+ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1909 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char IceConnectionNumber();
+
+int main() {
+IceConnectionNumber()
+; return 0; }
+EOF
+if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ LDFLAGS="$ac_save_LDFLAGS"
+
+fi
+
+if test "x$have_x" != xyes; then
+ { echo "configure: error: this program cannot be compiled without X" 1>&2; exit 1; }
+fi
+
+ac_save_cpp=$ac_cpp
+ac_cpp="$ac_cpp $X_CFLAGS"
+for ac_hdr in X11/IntrinsicI.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1954: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1959 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ac_cpp=$ac_save_cpp
+
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1994: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1999 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2024 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2042 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2063 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+ echo $ac_n "checking for X11/Xosdefs.h""... $ac_c" 1>&6
+echo "configure:2096: checking for X11/Xosdefs.h" >&5
+if eval "test \"`echo '$''{'ac_cv_x11_xosdefs_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_x11_xosdefs_h=no
+ if test -n "$x_includes"; then
+ if test -r "$x_includes/X11/Xosdefs.h"; then
+ ac_cv_x11_xosdefs_h=yes
+ fi
+ else
+ cat > conftest.$ac_ext <<EOF
+#line 2107 "configure"
+#include "confdefs.h"
+#include <X11/Xosdefs.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_x11_xosdefs_h=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ fi
+fi
+
+echo "$ac_t""$ac_cv_x11_xosdefs_h" 1>&6
+ if test $ac_cv_x11_xosdefs_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_X11_XOSDEFS_H 1
+EOF
+
+ fi
+fi
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2139: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2144 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
+echo "configure:2180: checking for $ac_hdr that defines DIR" >&5
+if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2185 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_hdr>
+int main() {
+DIR *dirp = 0;
+; return 0; }
+EOF
+if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ eval "ac_cv_header_dirent_$ac_safe=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_dirent_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_header_dirent=$ac_hdr; break
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
+echo "configure:2218: checking for opendir in -ldir" >&5
+ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldir $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2226 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="$LIBS -ldir"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+echo "configure:2259: checking for opendir in -lx" >&5
+ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lx $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2267 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:2278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="$LIBS -lx"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
+echo "configure:2301: checking for sys/wait.h that is POSIX.1 compatible" >&5
+if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2306 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+int main() {
+int s;
+wait (&s);
+s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+; return 0; }
+EOF
+if { (eval echo configure:2322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_header_sys_wait_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+if test $ac_cv_header_sys_wait_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_WAIT_H 1
+EOF
+
+fi
+
+
+
+echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+echo "configure:2345: checking whether byte ordering is bigendian" >&5
+if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+cat > conftest.$ac_ext <<EOF
+#line 2352 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat > conftest.$ac_ext <<EOF
+#line 2367 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_bigendian=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_bigendian=no
+fi
+rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+if test $ac_cv_c_bigendian = unknown; then
+if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2398 "configure"
+#include "confdefs.h"
+main () {
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+EOF
+if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_bigendian=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_bigendian=yes
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+if test $ac_cv_c_bigendian = yes; then
+ cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+EOF
+
+fi
+
+ac_exeext=
+echo $ac_n "checking for integer type to use in bitmaps""... $ac_c" 1>&6
+echo "configure:2435: checking for integer type to use in bitmaps" >&5
+if eval "test \"`echo '$''{'xdvi_cv_bitmap_type'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2443 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ if ((sizeof(unsigned long) == 4 || sizeof(unsigned long) == 2)
+ && sizeof(unsigned long) != sizeof(unsigned int))
+ fprintf(f, "BMTYPE=long BMBYTES=%d\n", sizeof(unsigned long));
+ if (sizeof(unsigned int) == 4 || sizeof(unsigned int) == 2)
+ fprintf(f, "BMTYPE=int BMBYTES=%d\n", sizeof(unsigned int));
+ else if (sizeof(unsigned short) == 4 || sizeof(unsigned short) == 2)
+ fprintf(f, "BMTYPE=short BMBYTES=%d\n", sizeof(unsigned short));
+ else fprintf(f, "BMTYPE=char BMBYTES=%d\n", sizeof(unsigned char));
+ exit(0);
+}
+EOF
+if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ xdvi_cv_bitmap_type="`cat conftestval`"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ { echo "configure: error: could not determine integer type for bitmap" 1>&2; exit 1; }
+fi
+rm -fr conftest*
+fi
+
+fi
+
+eval "$xdvi_cv_bitmap_type"
+cat >> confdefs.h <<EOF
+#define BMTYPE $BMTYPE
+EOF
+
+cat >> confdefs.h <<EOF
+#define BMBYTES $BMBYTES
+EOF
+
+echo "$ac_t""unsigned $BMTYPE, size = $BMBYTES" 1>&6
+echo $ac_n "checking for whether the C compiler supports string concatenation""... $ac_c" 1>&6
+echo "configure:2486: checking for whether the C compiler supports string concatenation" >&5
+if eval "test \"`echo '$''{'xdvi_cc_concat'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2491 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+
+int main() {
+puts("Testing" " string" " concatenation");
+
+; return 0; }
+EOF
+if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ xdvi_cc_concat=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_cc_concat=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$xdvi_cc_concat" 1>&6
+KRHEADER_H=
+if test $xdvi_cc_concat = no; then
+ cat >> confdefs.h <<\EOF
+#define CC_K_AND_R 1
+EOF
+
+ KRHEADER_H=krheader.h
+fi
+
+echo $ac_n "checking for stropts.h and isastream()""... $ac_c" 1>&6
+echo "configure:2523: checking for stropts.h and isastream()" >&5
+if eval "test \"`echo '$''{'xdvi_cv_sys_streams'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2528 "configure"
+#include "confdefs.h"
+#include <stropts.h>
+
+int main() {
+#ifndef I_SETSIG
+choke me
+#else
+isastream(0);
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_cv_sys_streams=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_cv_sys_streams=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$xdvi_cv_sys_streams" 1>&6
+if test $xdvi_cv_sys_streams = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STREAMS 1
+EOF
+
+fi
+echo $ac_n "checking for SunOS 4""... $ac_c" 1>&6
+echo "configure:2560: checking for SunOS 4" >&5
+if eval "test \"`echo '$''{'xdvi_cv_sys_sunos_4'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "`(uname -sr) 2>/dev/null`" in
+"SunOS 4."*)
+ xdvi_cv_sys_sunos_4=yes ;;
+*) xdvi_cv_sys_sunos_4=no ;;
+esac
+fi
+
+echo "$ac_t""$xdvi_cv_sys_sunos_4" 1>&6
+if test $xdvi_cv_sys_sunos_4 = yes; then
+ cat >> confdefs.h <<\EOF
+#define SUNOS4 1
+EOF
+
+fi
+echo $ac_n "checking for certain old versions of Linux""... $ac_c" 1>&6
+echo "configure:2579: checking for certain old versions of Linux" >&5
+if eval "test \"`echo '$''{'xdvi_cv_sys_old_linux'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "`(uname -sr) 2>/dev/null`" in
+"Linux 2."[01].* | "Linux 2.2."[0-8] | "Linux 2.2."[0-8]-*)
+ xdvi_cv_sys_old_linux=yes ;;
+*) xdvi_cv_sys_old_linux=no ;;
+esac
+fi
+
+echo "$ac_t""$xdvi_cv_sys_old_linux" 1>&6
+if test $xdvi_cv_sys_old_linux = yes; then
+ cat >> confdefs.h <<\EOF
+#define FLAKY_SIGPOLL 1
+EOF
+
+fi
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2598: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2603 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:2631: checking for pid_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2636 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_pid_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_pid_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
+ cat >> confdefs.h <<\EOF
+#define pid_t int
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2664: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2669 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
+echo "configure:2697: checking for ptrdiff_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2702 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_ptrdiff_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_ptrdiff_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
+if test $ac_cv_type_ptrdiff_t = no; then
+ cat >> confdefs.h <<\EOF
+#define ptrdiff_t long
+EOF
+
+fi
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:2730: checking return type of signal handlers" >&5
+if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2735 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_type_signal=void
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_type_signal=int
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+
+echo $ac_n "checking for poll.h and poll()""... $ac_c" 1>&6
+echo "configure:2771: checking for poll.h and poll()" >&5
+if eval "test \"`echo '$''{'xdvi_cv_func_poll'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2776 "configure"
+#include "confdefs.h"
+#include <poll.h>
+
+int main() {
+poll((struct pollfd *) 0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_cv_func_poll=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_cv_func_poll=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$xdvi_cv_func_poll" 1>&6
+if test $xdvi_cv_func_poll = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_POLL 1
+EOF
+
+else
+ for ac_hdr in sys/select.h select.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2807: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2812 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
+echo "configure:2846: checking for vfork.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2851 "configure"
+#include "confdefs.h"
+#include <vfork.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_VFORK_H 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for working vfork""... $ac_c" 1>&6
+echo "configure:2881: checking for working vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "checking for vfork""... $ac_c" 1>&6
+echo "configure:2887: checking for vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2892 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char vfork(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char vfork();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_vfork) || defined (__stub___vfork)
+choke me
+#else
+vfork();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_vfork=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_vfork=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2937 "configure"
+#include "confdefs.h"
+/* Thanks to Paul Eggert for this test. */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent.
+ The compiler is told about this with #include <vfork.h>,
+ but some compilers (e.g. gcc -O) don't grok <vfork.h>.
+ Test for this by using a static variable whose address
+ is put into a register that is clobbered by the vfork. */
+static
+#ifdef __cplusplus
+sparc_address_test (int arg)
+#else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+main() {
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test ();
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems.
+ This test uses lots of local variables, at least
+ as many local variables as main has allocated so far
+ including compiler temporaries. 4 locals are enough for
+ gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
+ A buggy compiler should reuse the register of parent
+ for one of the local variables, since it will think that
+ parent can't possibly be used any more in this routine.
+ Assigning to the local variable will thus munge parent
+ in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3),
+ vfork doesn't separate parent from child file descriptors.
+ If the child closes a descriptor before it execs or exits,
+ this munges the parent's descriptor as well.
+ Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ exit(
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
+EOF
+if { (eval echo configure:3032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_vfork_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_vfork_works=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
+if test $ac_cv_func_vfork_works = no; then
+ cat >> confdefs.h <<\EOF
+#define vfork fork
+EOF
+
+fi
+
+if test $ac_cv_func_vfork_works = yes; then
+echo $ac_n "checking for whether setsid() is allowed within vfork()""... $ac_c" 1>&6
+echo "configure:3056: checking for whether setsid() is allowed within vfork()" >&5
+if eval "test \"`echo '$''{'xdvi_cv_setsid_in_vfork'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3064 "configure"
+#include "confdefs.h"
+/* Test adapted from Gnu autoconf */
+/* Thanks to Paul Eggert for this test. */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+int
+main() {
+ pid_t parent = getpid ();
+ pid_t child;
+
+ child = vfork ();
+
+ if (child == 0) {
+ if (setsid () == -1)
+ _exit(1);
+ _exit(0);
+ } else {
+ int status;
+
+ while (wait(&status) != child)
+ ;
+ exit(
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+ );
+ }
+}
+EOF
+if { (eval echo configure:3103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ xdvi_cv_setsid_in_vfork=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ xdvi_cv_setsid_in_vfork=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$xdvi_cv_setsid_in_vfork" 1>&6
+if test $xdvi_cv_setsid_in_vfork = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GOOD_SETSID_VFORK 1
+EOF
+
+fi
+fi
+echo $ac_n "checking for waitpid""... $ac_c" 1>&6
+echo "configure:3126: checking for waitpid" >&5
+if eval "test \"`echo '$''{'ac_cv_func_waitpid'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3131 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char waitpid(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char waitpid();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_waitpid) || defined (__stub___waitpid)
+choke me
+#else
+waitpid();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_waitpid=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_waitpid=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'waitpid`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_WAITPID 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+for ac_func in wait4
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3177: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3182 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+echo $ac_n "checking for putenv""... $ac_c" 1>&6
+echo "configure:3232: checking for putenv" >&5
+if eval "test \"`echo '$''{'ac_cv_func_putenv'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3237 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char putenv(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char putenv();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_putenv) || defined (__stub___putenv)
+choke me
+#else
+putenv();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_putenv=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_putenv=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'putenv`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_PUTENV 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+for ac_func in setenv
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3283: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3288 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+for ac_func in mkstemp sigaction strerror vsnprintf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3340: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3345 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for the function ulltostr() and the long long type""... $ac_c" 1>&6
+echo "configure:3393: checking for the function ulltostr() and the long long type" >&5
+if eval "test \"`echo '$''{'xdvi_cv_func_ulltostr'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3398 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+int main() {
+ char s[3 * sizeof(unsigned long long)];
+ unsigned long long value = 12345;
+ puts(ulltostr(value, s))
+; return 0; }
+EOF
+if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_cv_func_ulltostr=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_cv_func_ulltostr=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$xdvi_cv_func_ulltostr" 1>&6
+if test $xdvi_cv_func_ulltostr = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ULLTOSTR 1
+EOF
+
+fi
+
+if test $ac_cv_func_vsnprintf = yes; then
+ echo $ac_n "checking for a c99-compatible implementation of (v)snprintf()""... $ac_c" 1>&6
+echo "configure:3432: checking for a c99-compatible implementation of (v)snprintf()" >&5
+if eval "test \"`echo '$''{'xdvi_cv_func_good_vsnprintf'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3440 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int main()
+{
+ char s[2];
+ return (snprintf(s, 0, "test") != 4);
+}
+EOF
+if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ xdvi_cv_func_good_vsnprintf=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ xdvi_cv_func_good_vsnprintf=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$xdvi_cv_func_good_vsnprintf" 1>&6
+if test $xdvi_cv_func_good_vsnprintf = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GOOD_VSNPRINTF 1
+EOF
+
+fi
+fi
+
+MATH_LIB=
+echo $ac_n "checking for sin""... $ac_c" 1>&6
+echo "configure:3474: checking for sin" >&5
+if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3479 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sin(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_sin) || defined (__stub___sin)
+choke me
+#else
+sin();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_sin=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_sin=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
+echo "configure:3520: checking for sin in -lm" >&5
+ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3528 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin();
+
+int main() {
+sin()
+; return 0; }
+EOF
+if { (eval echo configure:3539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ MATH_LIB="-lm"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
+
+echo $ac_n "checking whether linker supports the --allow-multiple-definition flag""... $ac_c" 1>&6
+echo "configure:3564: checking whether linker supports the --allow-multiple-definition flag" >&5
+if eval "test \"`echo '$''{'xdvi_linker_multiple_defns'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ xdvi_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="-Xlinker --allow-multiple-definition"
+x_linker_options=""
+cat > conftest.$ac_ext <<EOF
+#line 3572 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+
+int main() {
+void foo(void);
+
+; return 0; }
+EOF
+if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_linker_multiple_defns=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_linker_multiple_defns=no
+
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$xdvi_linker_multiple_defns" 1>&6
+if test $xdvi_linker_multiple_defns = yes; then
+x_linker_options="-Xlinker --allow-multiple-definition"
+fi
+LDFLAGS="$xdvi_save_LDFLAGS"
+
+
+
+
+OPT_SRCS= OPT_OBJS=
+
+# Check whether --with-x-toolkit or --without-x-toolkit was given.
+if test "${with_x_toolkit+set}" = set; then
+ withval="$with_x_toolkit"
+ case "$withval" in
+yes | xaw)
+ X_PRE_LIBS="$X_PRE_LIBS $MATH_LIB"
+ MATH_LIB=
+ if test -z "$imake"; then
+# Cygwin needs -lXpm to be linked in explicitly; yet on older (<4.2)
+# versions of XFree86, -lXpm exists, but is not needed. So we do two checks.
+echo $ac_n "checking for whether -lXpm needs to be explicitly given""... $ac_c" 1>&6
+echo "configure:3617: checking for whether -lXpm needs to be explicitly given" >&5
+if eval "test \"`echo '$''{'xdvi_needs_explicit_xpm'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ xdvi_save_LIBS=$LIBS
+LIBS="-lXaw -lXmu -lXt$X_PRE_LIBS -lXext $LIBS $X_LIBS -lX11"
+cat > conftest.$ac_ext <<EOF
+#line 3624 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$LIBS -lXpm"
+cat > conftest.$ac_ext <<EOF
+#line 3644 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=unknown
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+LIBS=$xdvi_save_LIBS
+fi
+
+echo "$ac_t""$xdvi_needs_explicit_xpm" 1>&6
+if test "$xdvi_needs_explicit_xpm" = yes; then
+ X_PRE_LIBS=" -lXpm$X_PRE_LIBS"
+fi
+fi
+ X_PRE_LIBS=" -lXaw -lXmu -lXt$X_PRE_LIBS -lXext"
+ cat >> confdefs.h <<\EOF
+#define XAW 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS popups.c"
+ OPT_OBJS="$OPT_OBJS popups.o" ;;
+xaw3d)
+ X_PRE_LIBS="$X_PRE_LIBS $MATH_LIB"
+ MATH_LIB=
+ if test -z "$imake"; then
+# Cygwin needs -lXpm to be linked in explicitly; yet on older (<4.2)
+# versions of XFree86, -lXpm exists, but is not needed. So we do two checks.
+echo $ac_n "checking for whether -lXpm needs to be explicitly given""... $ac_c" 1>&6
+echo "configure:3689: checking for whether -lXpm needs to be explicitly given" >&5
+if eval "test \"`echo '$''{'xdvi_needs_explicit_xpm'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ xdvi_save_LIBS=$LIBS
+LIBS="-lXaw3d -lXmu -lXt$X_PRE_LIBS -lXext $LIBS $X_LIBS -lX11"
+cat > conftest.$ac_ext <<EOF
+#line 3696 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$LIBS -lXpm"
+cat > conftest.$ac_ext <<EOF
+#line 3716 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=unknown
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+LIBS=$xdvi_save_LIBS
+fi
+
+echo "$ac_t""$xdvi_needs_explicit_xpm" 1>&6
+if test "$xdvi_needs_explicit_xpm" = yes; then
+ X_PRE_LIBS=" -lXpm$X_PRE_LIBS"
+fi
+fi
+ X_PRE_LIBS=" -lXaw3d -lXmu -lXt$X_PRE_LIBS -lXext"
+ cat >> confdefs.h <<\EOF
+#define XAW 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define XAW3D 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS popups.c"
+ OPT_OBJS="$OPT_OBJS popups.o" ;;
+motif)
+ X_PRE_LIBS=" -lXm -lXmu -lXt$X_PRE_LIBS -lXext"
+ cat >> confdefs.h <<\EOF
+#define MOTIF 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS popups.c"
+ OPT_OBJS="$OPT_OBJS popups.o" ;;
+no)
+ X_PRE_LIBS= ;;
+*)
+ { echo "configure: error: invalid toolkit $withval given" 1>&2; exit 1; } ;;
+esac
+
+else
+ X_PRE_LIBS="$X_PRE_LIBS $MATH_LIB"
+ MATH_LIB=
+ if test -z "$imake"; then
+# Cygwin needs -lXpm to be linked in explicitly; yet on older (<4.2)
+# versions of XFree86, -lXpm exists, but is not needed. So we do two checks.
+echo $ac_n "checking for whether -lXpm needs to be explicitly given""... $ac_c" 1>&6
+echo "configure:3779: checking for whether -lXpm needs to be explicitly given" >&5
+if eval "test \"`echo '$''{'xdvi_needs_explicit_xpm'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ xdvi_save_LIBS=$LIBS
+LIBS="-lXaw -lXmu -lXt$X_PRE_LIBS -lXext $LIBS $X_LIBS -lX11"
+cat > conftest.$ac_ext <<EOF
+#line 3786 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$LIBS -lXpm"
+cat > conftest.$ac_ext <<EOF
+#line 3806 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XawTextReplace();
+
+int main() {
+XawTextReplace()
+; return 0; }
+EOF
+if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xdvi_needs_explicit_xpm=unknown
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+LIBS=$xdvi_save_LIBS
+fi
+
+echo "$ac_t""$xdvi_needs_explicit_xpm" 1>&6
+if test "$xdvi_needs_explicit_xpm" = yes; then
+ X_PRE_LIBS=" -lXpm$X_PRE_LIBS"
+fi
+fi
+ X_PRE_LIBS=" -lXaw -lXmu -lXt$X_PRE_LIBS -lXext"
+ cat >> confdefs.h <<\EOF
+#define XAW 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS popups.c"
+ OPT_OBJS="$OPT_OBJS popups.o"
+fi
+
+
+# Check whether --with-tetex or --without-tetex was given.
+if test "${with_tetex+set}" = set; then
+ withval="$with_tetex"
+ if test "$withval" != "no"; then
+ if test "${enable_ps_gs+set}" != set; then
+ enable_ps_gs=yes
+ fi
+ if test "${enable_extra_app_defaults+set}" != set; then
+ enable_extra_app_defaults="$withval"
+ fi
+ if test "${enable_dosnames+set}" != set; then
+ enable_dosnames=yes
+ fi
+fi
+
+fi
+
+
+# Check whether --enable-grey or --disable-grey was given.
+if test "${enable_grey+set}" = set; then
+ enableval="$enable_grey"
+ if test "$enableval" = yes; then
+ cat >> confdefs.h <<\EOF
+#define GREY 1
+EOF
+
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define GREY 1
+EOF
+
+fi
+
+
+# Check whether --enable-color or --disable-color was given.
+if test "${enable_color+set}" = set; then
+ enableval="$enable_color"
+ if test "$enableval" = yes; then
+ cat >> confdefs.h <<\EOF
+#define COLOR 1
+EOF
+
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define COLOR 1
+EOF
+
+fi
+
+
+# Check whether --enable-buttons or --disable-buttons was given.
+if test "${enable_buttons+set}" = set; then
+ enableval="$enable_buttons"
+ if test "$enableval" = yes; then
+ cat >> confdefs.h <<\EOF
+#define BUTTONS 1
+EOF
+
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define BUTTONS 1
+EOF
+
+fi
+
+
+# Check whether --enable-make-pk or --disable-make-pk was given.
+if test "${enable_make_pk+set}" = set; then
+ enableval="$enable_make_pk"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define MKTEXPK 1
+EOF
+
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define MKTEXPK_PATH "$enableval"
+EOF
+
+ fi
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define MKTEXPK 1
+EOF
+
+fi
+
+
+# Check whether --enable-old-make-pk or --disable-old-make-pk was given.
+if test "${enable_old_make_pk+set}" = set; then
+ enableval="$enable_old_make_pk"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define MKTEXPK 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define MAKETEXPK 1
+EOF
+
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define MKTEXPK_PATH "$enableval"
+EOF
+
+ fi
+fi
+fi
+
+
+# Check whether --enable-gf or --disable-gf was given.
+if test "${enable_gf+set}" = set; then
+ enableval="$enable_gf"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define USE_GF 1
+EOF
+
+ OPT_SRCS="$OPT_SRCS gf.c"
+ OPT_OBJS="$OPT_OBJS gf.o"
+fi
+fi
+
+
+xdvi_ps_c= xdvi_ps_o=
+# Check whether --enable-ps-gs or --disable-ps-gs was given.
+if test "${enable_ps_gs+set}" = set; then
+ enableval="$enable_ps_gs"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define PS_GS 1
+EOF
+
+ xdvi_ps_c=" psgs.c"
+ xdvi_ps_o=" psgs.o"
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define GS_PATH "$enableval"
+EOF
+
+ fi
+fi
+fi
+
+
+# Check whether --enable-ps-dps or --disable-ps-dps was given.
+if test "${enable_ps_dps+set}" = set; then
+ enableval="$enable_ps_dps"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define PS_DPS 1
+EOF
+
+ xdvi_ps_c="$xdvi_ps_c psdps.c"
+ xdvi_ps_o="$xdvi_ps_o psdps.o"
+ X_PRE_LIBS=" -ldps$X_PRE_LIBS"
+ # Work around a bug in Solaris 2. This doesn't work with imake.
+ if test "x$x_includes" = x/usr/openwin/include && test ! -d $x_includes/DPS \
+ && test -d $x_includes/X11/DPS; then
+ CFLAGS="$CFLAGS -I$x_includes/X11"
+ fi
+fi
+fi
+
+
+# Check whether --enable-ps-news or --disable-ps-news was given.
+if test "${enable_ps_news+set}" = set; then
+ enableval="$enable_ps_news"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define PS_NEWS 1
+EOF
+
+ xdvi_ps_c="$xdvi_ps_c psnews.c"
+ xdvi_ps_o="$xdvi_ps_o psnews.o"
+ X_PRE_LIBS=" -u _xv_psview_pkg -lxvps -lxview -lcps -lolgx$X_PRE_LIBS"
+fi
+fi
+
+
+if test -n "$xdvi_ps_c"; then
+ OPT_SRCS="$OPT_SRCS psheader.c$xdvi_ps_c"
+ OPT_OBJS="$OPT_OBJS psheader.o$xdvi_ps_o"
+fi
+
+# Check whether --enable-config-file or --disable-config-file was given.
+if test "${enable_config_file+set}" = set; then
+ enableval="$enable_config_file"
+ if test "$enableval" != no; then
+ if test "$enableval" = yes; then
+ { echo "configure: error: Option \`--enable-config-file' requires an argument" 1>&2; exit 1; }
+ fi
+ cat >> confdefs.h <<EOF
+#define DEFAULT_CONFIG_PATH "$enableval"
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-self-auto or --disable-self-auto was given.
+if test "${enable_self_auto+set}" = set; then
+ enableval="$enable_self_auto"
+ if test "$enableval" != no; then
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_CONFIG_PATH "$enableval"
+EOF
+
+ fi
+ cat >> confdefs.h <<\EOF
+#define SELFAUTO 1
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-extra-app-defaults or --disable-extra-app-defaults was given.
+if test "${enable_extra_app_defaults+set}" = set; then
+ enableval="$enable_extra_app_defaults"
+ if test "$enableval" != no; then
+ if test "$enableval" != yes; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_CONFIG_PATH "$enableval"
+EOF
+
+ fi
+ cat >> confdefs.h <<\EOF
+#define EXTRA_APP_DEFAULTS 1
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-dosnames or --disable-dosnames was given.
+if test "${enable_dosnames+set}" = set; then
+ enableval="$enable_dosnames"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define DOSNAMES 1
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-a4 or --disable-a4 was given.
+if test "${enable_a4+set}" = set; then
+ enableval="$enable_a4"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define A4 1
+EOF
+
+fi
+fi
+
+
+# Check whether --enable-texxet or --disable-texxet was given.
+if test "${enable_texxet+set}" = set; then
+ enableval="$enable_texxet"
+ if test "$enableval" != no; then
+ cat >> confdefs.h <<\EOF
+#define TEXXET 1
+EOF
+
+fi
+fi
+
+
+# Check whether --with-mfmode or --without-mfmode was given.
+if test "${with_mfmode+set}" = set; then
+ withval="$with_mfmode"
+ if test "x$withval" != xno; then
+ echo "$withval" | grep ':[0-9][0-9]*$' >/dev/null 2>&1 \
+ || echo "configure: warning: the mfmode should end with a dots-per-inch value" 1>&2
+ cat >> confdefs.h <<EOF
+#define MFMODE "$withval"
+EOF
+
+fi
+else
+ cat >> confdefs.h <<\EOF
+#define MFMODE "cx:300"
+EOF
+
+fi
+
+
+# Check whether --with-default-texmf-path or --without-default-texmf-path was given.
+if test "${with_default_texmf_path+set}" = set; then
+ withval="$with_default_texmf_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_TEXMF_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_TEXMF_PATH "/usr/local/tex/texmf"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-font-path or --without-default-font-path was given.
+if test "${with_default_font_path+set}" = set; then
+ withval="$with_default_font_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_FONT_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_FONT_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-vf-path or --without-default-vf-path was given.
+if test "${with_default_vf_path+set}" = set; then
+ withval="$with_default_vf_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_VF_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_VF_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-header-path or --without-default-header-path was given.
+if test "${with_default_header_path+set}" = set; then
+ withval="$with_default_header_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_HEADER_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_HEADER_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-fig-path or --without-default-fig-path was given.
+if test "${with_default_fig_path+set}" = set; then
+ withval="$with_default_fig_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_FIG_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_FIG_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-source-path or --without-default-source-path was given.
+if test "${with_default_source_path+set}" = set; then
+ withval="$with_default_source_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_SOURCE_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_SOURCE_PATH ".:%S"
+EOF
+
+
+fi
+
+
+# Check whether --with-default-dvips-path or --without-default-dvips-path was given.
+if test "${with_default_dvips_path+set}" = set; then
+ withval="$with_default_dvips_path"
+ cat >> confdefs.h <<EOF
+#define DEFAULT_DVIPS_PATH "$withval"
+EOF
+
+
+else
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_DVIPS_PATH "dvips"
+EOF
+
+
+fi
+
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# A kludge necessary for CPPFLAGS to allow quoted args
+CPPFLAGS="`echo "$CPPFLAGS" | sed 's/\\\"/\\\\\\\"/g'`"
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo " config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@x_top@%$x_top%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@EXEEXT@%$EXEEXT%g
+s%@CPP@%$CPP%g
+s%@X_CFLAGS@%$X_CFLAGS%g
+s%@X_PRE_LIBS@%$X_PRE_LIBS%g
+s%@X_LIBS@%$X_LIBS%g
+s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@KRHEADER_H@%$KRHEADER_H%g
+s%@MATH_LIB@%$MATH_LIB%g
+s%@x_linker_options@%$x_linker_options%g
+s%@OPT_SRCS@%$OPT_SRCS%g
+s%@OPT_OBJS@%$OPT_OBJS%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+if test -n "$imake"; then
+ ac_noimake_makefile=
+else
+ ac_noimake_makefile='Makefile '
+fi
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"$ac_noimake_makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h:config.hin"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/systems/unix/tex-gpc/xdvi/macxdvi.h b/systems/unix/tex-gpc/xdvi/macxdvi.h
new file mode 100644
index 0000000000..c72024fa51
--- /dev/null
+++ b/systems/unix/tex-gpc/xdvi/macxdvi.h
@@ -0,0 +1,1299 @@
+/*========================================================================*\
+
+Copyright (c) 1990-2004 Paul Vojta
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+PAUL VOJTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+NOTE:
+ xdvi is based on prior work, as noted in the modification history
+ in xdvi.c.
+
+\*========================================================================*/
+ /* helbig changed this file to make it work on Mac OS X */
+ /* it defined XOPEN_SOURCE, which causes NSIG to be not defined,
+ which breaks signal.h included by event.c */
+
+/*
+ * Written by Eric C. Cooper, CMU
+ */
+
+#ifndef XDVI_H
+#define XDVI_H
+
+/********************************
+ * The C environment *
+ *******************************/
+
+#ifdef __hpux
+/* On HP-UX 10.10 B and 20.10, compiling with _XOPEN_SOURCE + ..._EXTENDED
+ * leads to poll() not realizing that a file descriptor is writable in psgs.c.
+ */
+#define _HPUX_SOURCE 1
+#else
+#undef _XOPEN_SOURCE /* needed because of imake */
+#define _XOPEN_SOURCE_EXTENDED 1
+#define __EXTENSIONS__ 1 /* needed to get struct timeval on SunOS 5.5 */
+#define _SVID_SOURCE 1 /* needed to get S_IFLNK in glibc */
+#define _BSD_SOURCE 1 /* needed to get F_SETOWN in glibc-2.1.3 */
+#endif
+
+#include "config.h"
+
+/* Some O/S dependent kludges. */
+#ifdef _AIX
+#define _ALL_SOURCE 1
+#endif
+
+/* If xmkmf is broken and there's a symlink from /usr/include/X11 to the right
+ * place, then there will be no -I... argument on the cc command line for the
+ * X include files. Since gcc version 3 and higher sets __STDC__ to 0 when
+ * including system header files on some platforms, we may end up with
+ * NeedFunctionPrototypes set to 0 when it should be 1. So, let's force the
+ * issue.
+ */
+
+#if __STDC__ && !defined(FUNCPROTO)
+# define FUNCPROTO (-1)
+#endif
+
+#if STDC_HEADERS
+# include <stddef.h>
+# include <stdlib.h>
+ /* the following works around the wchar_t problem */
+# include <X11/X.h>
+# if HAVE_X11_XOSDEFS_H
+# include <X11/Xosdefs.h>
+# endif
+# ifdef X_NOT_STDC_ENV
+# undef X_NOT_STDC_ENV
+# undef X_WCHAR
+# include <X11/Xlib.h>
+# define X_NOT_STDC_ENV
+# endif
+#endif
+
+#include <X11/Xlib.h> /* include Xfuncs.h, if available */
+#include <X11/Xutil.h> /* needed for XDestroyImage */
+#include <X11/Xos.h>
+
+#if XlibSpecificationRelease >= 5
+#include <X11/Xfuncs.h>
+#endif
+
+#undef TOOLKIT
+
+#if XAW || MOTIF
+
+#define TOOLKIT 1
+#include <X11/Intrinsic.h>
+#if (defined(VMS) && (XtSpecificationRelease <= 4)) || defined(lint)
+# include <X11/IntrinsicP.h>
+#endif
+#if MOTIF
+# include <Xm/Xm.h>
+# ifndef MOTIF_TIMERS /* see comment in events.c */
+# define MOTIF_TIMERS (XmVERSION >= 2)
+# endif
+#endif
+
+#else /* not TOOLKIT */
+
+#define XtNumber(arr) (sizeof(arr)/sizeof(arr[0]))
+#define XtWindow(win) (win)
+typedef unsigned long Pixel;
+typedef char Boolean;
+typedef unsigned int Dimension;
+#undef BUTTONS
+#undef EXTRA_APP_DEFAULTS
+
+#endif /* not TOOLKIT */
+
+#if EXTRA_APP_DEFAULTS && !SELFAUTO
+#define SELFAUTO 1
+#endif
+
+#if SELFAUTO && !defined(DEFAULT_CONFIG_PATH)
+#define DEFAULT_CONFIG_PATH \
+ ".:$SELFAUTOLOC:$SELFAUTODIR:$SELFAUTOPARENT:$SELFAUTODIR/share/texmf/web2c:$SELFAUTOPARENT/share/texmf/web2c:$SELFAUTODIR/texmf/web2c:$SELFAUTOPARENT/texmf/web2c:$TETEXDIR:$TEXMF/web2c"
+#endif
+
+#undef CFGFILE /* no cheating */
+
+#if defined(DEFAULT_CONFIG_PATH)
+#define CFGFILE 1
+#endif
+
+typedef char Bool3; /* Yes/No/Maybe */
+
+#define True 1
+#define False 0
+#define Maybe 2
+
+#ifdef VMS
+#include <string.h>
+#define index strchr
+#define rindex strrchr
+#define bzero(a, b) (void) memset ((void *) (a), 0, (size_t) (b))
+#define bcopy(a, b, c) (void) memmove ((void *) (b), (void *) (a), (size_t) (c))
+#endif
+
+#include <stdio.h>
+#include <setjmp.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+
+#ifndef NeedFunctionPrototypes
+#if __STDC__
+#define NeedFunctionPrototypes 1
+#else /* STDC */
+#define NeedFunctionPrototypes 0
+#endif /* STDC */
+#endif /* NeedFunctionPrototypes */
+
+#if NeedFunctionPrototypes
+#define ARGS(x) x
+#else
+#define ARGS(x) ()
+#endif
+
+#ifndef KPATHSEA
+
+/* These macros munge function declarations to make them work in both
+ cases. The P?H macros are used for declarations, the P?C for
+ definitions. See <ansidecl.h> from the GNU C library. P1H(void)
+ also works for definitions of routines which take no args. */
+
+#if NeedFunctionPrototypes /* Don't use __STDC__ here (gcc + SunOS 4) */
+
+#define P1H(p1) (p1)
+#define P2H(p1, p2) (p1, p2)
+
+#define P1C(t1,n1)(t1 n1)
+#define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
+#define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
+#define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
+
+#else /* not NeedFunctionPrototypes */
+
+#define P1H(p1) ()
+#define P2H(p1, p2) ()
+
+#define P1C(t1,n1) (n1) t1 n1;
+#define P2C(t1,n1, t2,n2) (n1,n2) t1 n1; t2 n2;
+#define P3C(t1,n1, t2,n2, t3,n3) (n1,n2,n3) t1 n1; t2 n2; t3 n3;
+#define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1,n2,n3,n4) \
+ t1 n1; t2 n2; t3 n3; t4 n4;
+
+#endif /* not NeedFunctionPrototypes */
+
+#endif /* not KPATHSEA */
+
+#ifndef NeedWidePrototypes
+#define NeedWidePrototypes NeedFunctionPrototypes
+#endif
+
+#ifndef NeedVarargsPrototypes
+#define NeedVarargsPrototypes NeedFunctionPrototypes
+#endif
+
+#if NeedVarargsPrototypes
+#define VARGS(x) x
+#else
+#define VARGS(x) ()
+#endif
+
+#ifndef _XFUNCPROTOBEGIN
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#endif
+
+#ifndef _Xconst
+#if __STDC__
+#define _Xconst const
+#else /* STDC */
+#define _Xconst
+#endif /* STDC */
+#endif /* _Xconst */
+
+#ifndef VOLATILE
+#if __STDC__ || (defined(__stdc__) && defined(__convex__))
+#define VOLATILE volatile
+#else
+#define VOLATILE /* nothing */
+#endif
+#endif
+
+#ifndef NORETURN
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)
+# define NORETURN __attribute__((__noreturn__))
+# else
+# define NORETURN /* nothing */
+# endif
+#endif
+
+#ifndef UNUSED
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define UNUSED __attribute__((__unused__))
+# else
+# define UNUSED /* nothing */
+# endif
+#endif
+
+#ifndef OPEN_MODE
+#ifndef VMS
+#define OPEN_MODE "r"
+#else /* VMS */
+#define OPEN_MODE "r", "ctx=stm"
+#endif /* VMS */
+#endif /* OPEN_MODE */
+
+#ifndef VMS
+#define OPEN_MODE_ARGS _Xconst char *
+#else
+#define OPEN_MODE_ARGS _Xconst char *, _Xconst char *
+#endif
+
+#define Printf (void) printf
+#define Puts (void) puts
+#define Fprintf (void) fprintf
+#define Sprintf (void) sprintf
+#define Fseek (void) fseek
+#define Fread (void) fread
+#define Fputs (void) fputs
+#define Putc (void) putc
+#define Putchar (void) putchar
+#define Fclose (void) fclose
+#define Fflush (void) fflush
+#define Strcat (void) strcat
+#define Strcpy (void) strcpy
+
+/********************************
+ * Types and data *
+ *******************************/
+
+#ifndef EXTERN
+#define EXTERN extern
+#define INIT(x)
+#endif
+
+#define MAXDIM 32767
+
+typedef unsigned char ubyte;
+
+#if NeedWidePrototypes
+typedef unsigned int wide_ubyte;
+typedef int wide_bool;
+#define WIDENINT (int)
+#else
+typedef ubyte wide_ubyte;
+typedef Boolean wide_bool;
+#define WIDENINT
+#endif
+
+#if defined(MAKETEXPK) && !defined(MKTEXPK)
+#define MKTEXPK 1
+#endif
+
+/*
+ * pixel_conv is currently used only for converting absolute positions
+ * to pixel values; although normally it should be
+ * ((int) ((x) / shrink_factor + (1 << 15) >> 16)),
+ * the rounding is achieved instead by moving the constant 1 << 15 to
+ * PAGE_OFFSET in dvi-draw.c.
+ */
+#define pixel_conv(x) ((int) ((x) / shrink_factor >> 16))
+#define pixel_round(x) ((int) ROUNDUP(x, shrink_factor << 16))
+#define spell_conv0(n, f) ((long) (n * f))
+#define spell_conv(n) spell_conv0(n, dimconv)
+
+#define BMUNIT unsigned BMTYPE
+#define BMBITS (8 * BMBYTES)
+
+#define ADD(a, b) ((BMUNIT *) (((char *) a) + b))
+#define SUB(a, b) ((BMUNIT *) (((char *) a) - b))
+
+extern BMUNIT bit_masks[BMBITS + 1];
+
+struct frame {
+ struct framedata {
+ long dvi_h, dvi_v, w, x, y, z;
+ int pxl_v;
+ } data;
+ struct frame *next, *prev;
+};
+
+#ifndef TEXXET
+typedef long (*set_char_proc) ARGS((wide_ubyte));
+#else
+typedef void (*set_char_proc) ARGS((wide_ubyte, wide_ubyte));
+#endif
+
+typedef void (*home_proc) ARGS((wide_bool));
+
+struct drawinf { /* this information is saved when using virtual fonts */
+ struct framedata data;
+ struct font *fontp;
+ set_char_proc set_char_p;
+ int tn_table_len;
+ struct font **tn_table;
+ struct tn *tn_head;
+ ubyte *pos, *end;
+ struct font *virtual;
+#ifdef TEXXET
+ int dir;
+#endif
+};
+
+EXTERN struct drawinf currinf;
+
+/* entries below with the characters 'dvi' in them are actually stored in
+ scaled pixel units */
+
+#define DVI_H currinf.data.dvi_h
+#define PXL_H pixel_conv(currinf.data.dvi_h)
+#define DVI_V currinf.data.dvi_v
+#define PXL_V currinf.data.pxl_v
+#define WW currinf.data.w
+#define XX currinf.data.x
+#define YY currinf.data.y
+#define ZZ currinf.data.z
+#define ROUNDUP(x,y) (((x)+(y)-1)/(y))
+
+EXTERN int current_page;
+EXTERN int total_pages;
+EXTERN int pageno_correct INIT(1);
+EXTERN long magnification;
+EXTERN double dimconv;
+EXTERN double tpic_conv;
+EXTERN int n_files_left INIT(32767); /* for LRU closing of fonts */
+EXTERN unsigned int page_w, page_h;
+
+#if defined(GS_PATH) && !defined(PS_GS)
+#define PS_GS 1
+#endif
+
+#if defined(PS_DPS) || defined(PS_NEWS) || defined(PS_GS)
+#define PS 1
+#else
+#define PS 0
+#endif
+
+EXTERN int scanned_page; /* last page prescanned */
+
+#if PS
+EXTERN int scanned_page_ps; /* last page scanned for PS specials */
+EXTERN int scanned_page_ps_bak; /* save the above if PS is turned off */
+#endif
+
+#if COLOR
+EXTERN int scanned_page_color; /* last page scanned for color spcls */
+#endif
+
+EXTERN int scanned_page_reset; /* number to reset the above to */
+
+/*
+ * The following is set when we're prescanning before opening up the windows,
+ * and we hit a PostScript header file. We can't start up gs until we get
+ * a window to associate the process to, so we have to prescan twice.
+ */
+#if PS_GS
+EXTERN Boolean gs_postpone_prescan INIT(False);
+#endif
+
+/*
+ * Per-page data in DVI file, indexed by page number - 1.
+ * Offset is initialized in prepare_pages().
+ * Page size is initialized while prescanning.
+ */
+struct per_page {
+ long offset;
+ unsigned int pw, ph; /* page size */
+ unsigned int ww, wh; /* window size */
+};
+
+EXTERN struct per_page *page_info;
+
+/*
+ * Set if the -paper option overrides papersize specials.
+ */
+EXTERN Boolean ignore_papersize_specials INIT(False);
+
+/*
+ * Mechanism for reducing repeated warning about specials, lost characters, etc.
+ */
+EXTERN Boolean warn_spec_now;
+
+/*
+ * If we're in the middle of a PSFIG special.
+ */
+EXTERN Boolean psfig_begun INIT(False);
+
+/*
+ * Page on which to draw box from forward source special searching.
+ */
+EXTERN int source_fwd_box_page INIT(-1); /* -1 means no box */
+
+/*
+ * Information on deferred source operation. See do_pages() for meaning.
+ */
+EXTERN _Xconst char *source_forward_string INIT(NULL);
+EXTERN int source_reverse_x, source_reverse_y;
+EXTERN int source_show_all;
+
+
+/*
+ * Bitmap structure for raster ops.
+ */
+struct bitmap {
+ unsigned short w, h; /* width and height in pixels */
+ short bytes_wide; /* scan-line width in bytes */
+ char *bits; /* pointer to the bits */
+};
+
+/*
+ * Per-character information.
+ * There is one of these for each character in a font (raster fonts only).
+ * All fields are filled in at font definition time,
+ * except for the bitmap, which is "faulted in"
+ * when the character is first referenced.
+ */
+struct glyph {
+ long addr; /* address of bitmap in font file */
+ long dvi_adv; /* DVI units to move reference point */
+ short x, y; /* x and y offset in pixels */
+ struct bitmap bitmap; /* bitmap for character */
+ short x2, y2; /* x and y offset in pixels (shrunken bitmap) */
+#if GREY
+# if COLOR
+ struct fgrec *fg; /* fgrec for which these pixmaps are valid */
+# endif
+ XImage *image2;
+ char *pixmap2;
+ char *pixmap2_t;
+#endif /* GREY */
+ struct bitmap bitmap2; /* shrunken bitmap for character */
+};
+
+/*
+ * Per-character information for virtual fonts
+ */
+struct macro {
+ ubyte *pos; /* address of first byte of macro */
+ ubyte *end; /* address of last+1 byte */
+ long dvi_adv; /* DVI units to move reference point */
+ Boolean free_me; /* if free(pos) should be called when */
+ /* freeing space */
+};
+
+/*
+ * The layout of a font information block.
+ * There is one of these for every loaded font or magnification thereof.
+ * Duplicates are eliminated: this is necessary because of possible recursion
+ * in virtual fonts.
+ *
+ * Also note the strange units. The design size is in 1/2^20 point
+ * units (also called micro-points), and the individual character widths
+ * are in the TFM file in 1/2^20 ems units, i.e., relative to the design size.
+ *
+ * We then change the sizes to SPELL units (unshrunk pixel / 2^16).
+ */
+
+#define NOMAGSTP (-29999)
+
+typedef void (*read_char_proc) ARGS((struct font *, wide_ubyte));
+
+struct font {
+ struct font *next; /* link to next font info block */
+ char *fontname; /* name of font */
+ float fsize; /* size information (dots per inch) */
+ int magstepval; /* magstep number * two, or NOMAGSTP */
+ FILE *file; /* open font file or NULL */
+ char *filename; /* name of font file */
+ long checksum; /* checksum */
+ unsigned short timestamp; /* for LRU management of fonts */
+ ubyte flags; /* flags byte (see values below) */
+ ubyte maxchar; /* largest character code */
+ double dimconv; /* size conversion factor */
+ set_char_proc set_char_p; /* proc used to set char */
+ /* these fields are used by (loaded) raster fonts */
+ read_char_proc read_char; /* function to read bitmap */
+ struct glyph *glyph;
+ /* these fields are used by (loaded) virtual fonts */
+ struct font **vf_table; /* list of fonts used by this vf */
+ struct tn *vf_chain; /* ditto, if TeXnumber >= VFTABLELEN */
+ struct font *first_font; /* first font defined */
+ struct macro *macro;
+ /* I suppose the above could be put into a union, but we */
+ /* wouldn't save all that much space. */
+};
+
+#define FONT_IN_USE 1 /* used for housekeeping */
+#define FONT_LOADED 2 /* if font file has been read */
+#define FONT_VIRTUAL 4 /* if font is virtual */
+
+#define TNTABLELEN 30 /* length of TeXnumber array (dvi file) */
+#define VFTABLELEN 5 /* length of TeXnumber array (virtual fonts) */
+
+struct tn {
+ struct tn *next; /* link to next TeXnumber info block */
+ int TeXnumber; /* font number (in DVI file) */
+ struct font *fontp; /* pointer to the rest of the info */
+};
+
+EXTERN struct font *tn_table[TNTABLELEN];
+EXTERN struct font *font_head INIT(NULL);
+EXTERN struct tn *tn_head INIT(NULL);
+EXTERN ubyte maxchar;
+EXTERN unsigned short current_timestamp INIT(0);
+
+/*
+ * Command line flags.
+ */
+
+extern struct _resource {
+#if TOOLKIT && CFGFILE
+ _Xconst char *progname;
+#endif
+#if TOOLKIT
+ int shrinkfactor;
+ _Xconst char *main_translations;
+ _Xconst char *wheel_translations;
+ int dvips_hang;
+ int dvips_fail_hang;
+#endif
+ int wheel_unit;
+ int _density;
+#ifdef GREY
+ float _gamma;
+#endif
+ int _pixels_per_inch;
+ _Xconst char *sidemargin;
+ _Xconst char *topmargin;
+ _Xconst char *xoffset;
+ _Xconst char *yoffset;
+ _Xconst char *paper;
+ _Xconst char *_alt_font;
+#ifdef MKTEXPK
+ Boolean makepk;
+#endif
+ _Xconst char *mfmode;
+ _Xconst char *editor;
+ _Xconst char *src_pos;
+ Boolean src_fork;
+ Boolean _list_fonts;
+ Boolean reverse;
+ Boolean _warn_spec;
+ Boolean _hush_chars;
+ Boolean _hush_chk;
+ Boolean safer;
+#if defined(VMS) || !defined(TOOLKIT)
+ _Xconst char *fore_color;
+ _Xconst char *back_color;
+#endif
+ Pixel _fore_Pixel;
+ Pixel _back_Pixel;
+#ifdef TOOLKIT
+ Pixel _brdr_Pixel;
+ Pixel _hl_Pixel;
+ Pixel _cr_Pixel;
+#endif
+ _Xconst char *icon_geometry;
+ Boolean keep_flag;
+ Boolean copy;
+ Boolean thorough;
+#if PS
+ /* default is to use DPS, then NEWS, then GhostScript;
+ * we will figure out later on which one we will use */
+ Boolean _postscript;
+ Boolean allow_shell;
+#ifdef PS_DPS
+ Boolean useDPS;
+#endif
+#ifdef PS_NEWS
+ Boolean useNeWS;
+#endif
+#ifdef PS_GS
+ Boolean useGS;
+ Boolean gs_safer;
+ Boolean gs_alpha;
+ _Xconst char *gs_path;
+ _Xconst char *gs_palette;
+#endif
+#endif /* PS */
+ Boolean prescan;
+ _Xconst char *debug_arg;
+ Boolean version_flag;
+#if BUTTONS
+ Boolean expert;
+ _Xconst char *button_translations;
+ int shrinkbutton[9];
+ Dimension btn_side_spacing;
+ Dimension btn_top_spacing;
+ Dimension btn_between_spacing;
+ Dimension btn_between_extra;
+ Dimension btn_border_width;
+#endif
+ _Xconst char *mg_arg[5];
+#if COLOR
+ Boolean _use_color;
+#endif
+#ifdef GREY
+ Boolean _use_grey;
+ Bool3 install;
+#endif
+#if TOOLKIT
+ _Xconst char *dvips_path;
+#endif
+} resource;
+
+/* As a convenience, we define the field names without leading underscores
+ * to point to the field of the above record. Here are the global ones;
+ * the local ones are defined in each module. */
+
+#define density resource._density
+#define pixels_per_inch resource._pixels_per_inch
+#define alt_font resource._alt_font
+#define list_fonts resource._list_fonts
+#define warn_spec resource._warn_spec
+#define hush_chars resource._hush_chars
+#define hush_chk resource._hush_chk
+#if COLOR
+#define use_color resource._use_color
+#endif
+#ifdef GREY
+#define use_grey resource._use_grey
+#endif
+
+#ifndef TOOLKIT
+EXTERN Pixel brdr_Pixel;
+#endif
+
+#if GREY
+EXTERN Pixel plane_masks[4];
+#endif
+
+#if GREY || COLOR
+EXTERN XColor color_data[2];
+#define fore_color_data color_data[0]
+#define back_color_data color_data[1]
+#endif
+
+#if COLOR
+
+struct rgb {
+ unsigned short r, g, b;
+};
+
+struct pagecolor {
+ struct rgb bg;
+ unsigned int stacksize;
+ _Xconst struct rgb *colorstack;
+};
+
+/* Information on background color and initial color stack for each page. */
+EXTERN struct pagecolor *page_colors INIT(NULL);
+
+/* The initial color stack is gotten from the pagecolor record for a page. */
+EXTERN _Xconst struct rgb *color_bottom;
+EXTERN unsigned int color_bot_size; /* number of entries */
+
+/* Additions to the runtime color stack on a given page are stored in a linked
+ list. "struct colorframe" is defined in special.c. */
+EXTERN struct colorframe *rcs_top;
+
+/* Color states. */
+EXTERN struct rgb fg_initial; /* Initial fg (from command line) */
+EXTERN struct rgb bg_initial; /* Initial bg */
+
+/*
+ * For each (foreground, background) color pair, we keep information (depending
+ * on the color model). It is organized as a linked list of linked lists,
+ * with background color more significant.
+ */
+
+struct bgrec {
+ struct bgrec *next;
+ struct rgb color;
+ struct fgrec *fg_head;
+ Boolean pixel_good; /* if the pixel entry is valid */
+ Pixel pixel;
+};
+
+struct fgrec {
+ struct fgrec *next;
+ struct rgb color;
+ Boolean pixel_good; /* if the pixel entry is valid */
+ Pixel pixel;
+#if GREY
+ Boolean palette_good; /* if the palette entry is valid */
+ Pixel palette[16]; /* non-TrueColor only */
+#endif
+};
+
+EXTERN struct bgrec *bg_head INIT(NULL); /* head of list */
+EXTERN struct bgrec *bg_current INIT(NULL); /* current bg value */
+EXTERN struct fgrec *fg_current; /* current fg value */
+EXTERN struct fgrec *fg_active INIT(NULL); /* where the GCs are */
+
+/* List of allocated colors (to be deallocated upon document change) */
+EXTERN Pixel *color_list; /* list of colors */
+EXTERN unsigned int color_list_len INIT(0); /* current len of list*/
+EXTERN unsigned int color_list_max INIT(0); /* allocated size */
+
+/* Whether the color situation has been warned about. */
+EXTERN Boolean color_warned INIT(False);
+
+/* Cursor color (for XRecolorCursor). */
+extern XColor cr_Color;
+
+#endif /* COLOR */
+
+extern struct mg_size_rec {
+ int w;
+ int h;
+}
+ mg_size[5];
+
+EXTERN int debug INIT(0);
+
+#define DBG_BITMAP 1
+#define DBG_DVI 2
+#define DBG_PK 4
+#define DBG_BATCH 8
+#define DBG_EVENT 16
+#define DBG_OPEN 32
+#define DBG_PS 64
+#define DBG_CLIENT 128
+#define DBG_ALL (~DBG_BATCH)
+
+EXTERN int offset_x, offset_y;
+EXTERN unsigned int unshrunk_paper_w, unshrunk_paper_h;
+EXTERN unsigned int unshrunk_page_w, unshrunk_page_h;
+
+EXTERN char *dvi_name INIT(NULL); /* dvi file name */
+EXTERN FILE *dvi_file; /* user's file */
+EXTERN time_t dvi_time; /* last modification time */
+EXTERN ino_t dvi_inode; /* used for source specials */
+EXTERN unsigned char *dvi_property; /* for setting in window */
+EXTERN size_t dvi_property_length;
+#if TOOLKIT
+EXTERN Boolean titles_are_stale INIT(True);
+ /* replace icon/window titles */
+#endif
+EXTERN _Xconst char *prog;
+EXTERN int bak_shrink; /* last shrink factor != 1 */
+EXTERN Dimension window_w, window_h;
+EXTERN XImage *image;
+EXTERN int backing_store;
+EXTERN int home_x, home_y;
+
+EXTERN Display *DISP;
+EXTERN Screen *SCRN;
+#if TOOLKIT
+extern XtActionsRec Actions[];
+extern Cardinal num_actions;
+#endif
+#if XAW
+EXTERN XtAccelerators accels_cr, accels_cr_click;
+#endif
+#ifdef GREY
+EXTERN Visual *our_visual;
+EXTERN unsigned int our_depth;
+EXTERN Colormap our_colormap;
+#else
+#define our_depth (unsigned int) DefaultDepthOfScreen(SCRN)
+#define our_visual DefaultVisualOfScreen(SCRN)
+#define our_colormap DefaultColormapOfScreen(SCRN)
+#endif
+EXTERN GC ruleGC;
+EXTERN GC foreGC, highGC;
+EXTERN GC foreGC2;
+EXTERN GC copyGC;
+EXTERN Boolean copy;
+
+EXTERN Cursor redraw_cursor, ready_cursor, drag_cursor[3];
+
+#if TOOLKIT
+struct xdvi_action {
+ struct xdvi_action *next;
+ XtActionProc proc;
+ Cardinal num_params;
+ String param;
+};
+
+struct wheel_acts {
+ struct wheel_acts *next;
+ Modifiers mask;
+ Modifiers value;
+ struct _LateBindings *late_bindings;
+ unsigned int button;
+ struct xdvi_action *action;
+};
+
+EXTERN struct wheel_acts *wheel_actions;
+#endif
+
+#if MOTIF && BUTTONS
+EXTERN XtTranslations wheel_trans_table INIT(NULL);
+#endif
+
+#ifdef GREY
+EXTERN Pixel *pixeltbl;
+EXTERN Pixel *pixeltbl_t;
+#endif /* GREY */
+
+/*
+ * Flag values and masks for event_flags
+ */
+
+#define EV_IDLE (1<<0) /* non-event */
+#define EV_CURSOR (1<<1) /* cursor needs to revert back to ready */
+#define EV_EXPOSE (1<<2) /* expose occurred somewhere */
+#define EV_MAG_MOVE (1<<3) /* magnifier moved */
+#define EV_MAG_GONE (1<<4) /* magnifier gone while being drawn */
+#define EV_ACK (1<<5) /* used internally */
+#define EV_SRC (1<<6) /* source special operation is pending */
+#define EV_NEWPAGE (1<<7) /* new page requested */
+#define EV_PS_TOGGLE (1<<8) /* PostScript toggled on or off */
+#define EV_NEWDOC (1<<9) /* new dvi file requested */
+#define EV_TERM (1<<10) /* quit */
+#define EV_MAXPLUS1 (1<<11)
+
+#define EV_GE_IDLE (EV_MAXPLUS1 - EV_IDLE)
+#define EV_GT_IDLE (EV_MAXPLUS1 - EV_CURSOR)
+#define EV_GE_CURSOR (EV_MAXPLUS1 - EV_CURSOR)
+#define EV_GE_EXPOSE (EV_MAXPLUS1 - EV_EXPOSE)
+#define EV_GE_MAG_MOVE (EV_MAXPLUS1 - EV_MAG_MOVE)
+#define EV_GE_MAG_GONE (EV_MAXPLUS1 - EV_MAG_GONE)
+#define EV_GE_ACK (EV_MAXPLUS1 - EV_ACK)
+#define EV_GE_NEWPAGE (EV_MAXPLUS1 - EV_NEWPAGE)
+#define EV_GE_PS_TOGGLE (EV_MAXPLUS1 - EV_PS_TOGGLE)
+#define EV_GE_NEWDOC (EV_MAXPLUS1 - EV_NEWDOC)
+#define EV_GE_TERM (EV_MAXPLUS1 - EV_TERM)
+
+#define EV_NOWAIT EV_GE_IDLE
+
+EXTERN unsigned int ev_flags INIT(EV_IDLE);
+EXTERN VOLATILE int event_counter INIT(0);
+EXTERN jmp_buf canit_env;
+
+struct xchild {
+ struct xchild *next; /* link to next in list */
+ pid_t pid; /* pid of process, or 0 */
+ Boolean killable; /* if can be killed with SIGKILL */
+ void (*proc) ARGS((int)); /* procedure to call */
+};
+
+struct xio {
+ struct xio *next; /* link to next in list */
+ int fd; /* file descriptor */
+ int xio_events; /* same as in struct pollfd (can't call
+ it events because poll.h on AIX
+ defines events to something else) */
+#if HAVE_POLL
+ struct pollfd *pfd;
+#endif
+ void (*read_proc) ARGS((void)); /* call to read */
+ void (*write_proc) ARGS((void)); /* call to write */
+};
+
+struct xtimer {
+ struct xtimer *next; /* link to next in chain */
+ struct timeval when; /* when to call the routine */
+ void (*proc) ARGS((struct xtimer *)); /* procedure to call */
+#if MOTIF_TIMERS
+ XtTimerCallbackProc xt_proc; /* additional data for Xm */
+ XtPointer closure;
+#endif
+};
+
+#if MOTIF_TIMERS
+# define TIMER_INIT(proc) {NULL, {0, 0}, proc, NULL, NULL}
+#else
+# define TIMER_INIT(proc) {NULL, {0, 0}, proc}
+#endif
+
+struct WindowRec {
+ Window win;
+ int shrinkfactor;
+ int base_x, base_y;
+ unsigned int width, height;
+ int min_x, max_x, min_y, max_y; /* for pending expose events */
+};
+
+extern struct WindowRec mane, alt, currwin;
+EXTERN int min_x, max_x, min_y, max_y;
+EXTERN Boolean drawing_mag INIT(False);
+
+#define shrink_factor currwin.shrinkfactor
+
+#if TOOLKIT
+EXTERN Widget top_level INIT(0);
+EXTERN Widget vport_widget, draw_widget, clip_widget;
+# if MOTIF
+EXTERN Widget shrink_button[4];
+EXTERN Widget x_bar, y_bar; /* horizontal and vert. scroll bars */
+# endif
+# if BUTTONS
+EXTERN Widget form_widget;
+EXTERN int xtra_wid INIT(0);
+extern _Xconst char default_button_config[]; /* defined in events.c */
+# if XAW
+EXTERN Widget panel_widget;
+EXTERN Cursor panel_cursor INIT(0);
+# endif
+# endif
+#else /* not TOOLKIT */
+EXTERN Window top_level INIT(0);
+
+#define BAR_WID 12 /* width of darkened area */
+#define BAR_THICK 15 /* gross amount removed */
+#endif /* not TOOLKIT */
+
+#if XAW
+#define WARN(t, s) (void) warning_popup(s, "OK", NULL)
+#define WARN1(t, s, s1) (void) warning_popup_long(s, "OK", NULL, s1)
+#define WARN2(t, s, s1, s2) (void) warning_popup_long(s, "OK", NULL, s1, s2)
+#elif MOTIF
+#define WARN(t, s) (void) warning_popup(s, t, NULL, NULL)
+#define WARN1(t, s, s1) (void) warning_popup_long(s, t, NULL, NULL, s1)
+#define WARN2(t, s, s1, s2) (void) warning_popup_long(s, t, NULL, NULL, s1, s2)
+#elif CC_K_AND_R
+#define WARN(t, s) (void) fputs(s "\n", stderr)
+#define WARN1(t, s, s1) (void) fprintf(stderr, s "\n", s1)
+#else
+#define WARN(t, s) (void) (fputs(s, stderr), putc('\n', stderr))
+#define WARN1(t, s, s1) (void) (fprintf(stderr, s, s1), putc('\n', stderr))
+#endif
+
+/*
+ * If a popup is popped up before the main window, then the main window is
+ * likely to cover it. So we have to postpone popping them up until after
+ * realizing the main window. It is not workable to pop them up immediately
+ * and then raise them later, due to unpredictable window manager behavior.
+ */
+
+#if TOOLKIT
+EXTERN Boolean postpone_popups INIT(True);
+EXTERN size_t n_init_popups INIT(0);
+EXTERN Widget *init_popups;
+EXTERN size_t alloc_init_popups INIT(0);
+#endif
+
+/*
+ * Structure to use for status popups.
+ */
+
+#if TOOLKIT
+struct status_popup {
+ Widget shell;
+ Widget label;
+ int expected_type;
+ Boolean popped;
+ Boolean spurious;
+};
+#endif
+
+EXTERN char *ffline INIT(NULL); /* an array used by filefind to store */
+ /* the file name being formed. */
+ /* It expands as needed. */
+ /* Also used elsewhere. */
+EXTERN size_t ffline_len INIT(0); /* current length of ffline[] */
+
+/*
+ * Used by the geometry-scanning routines.
+ * It passes pointers to routines to be called at certain
+ * points in the dvi file, and other information.
+ */
+
+struct geom_info {
+ void (*geom_box) ARGS((struct geom_info *,
+ long, long, long, long));
+ void (*geom_special) ARGS((struct geom_info *, _Xconst char *));
+ jmp_buf done_env;
+ void *geom_data;
+};
+
+typedef void (*mouse_proc) ARGS((XEvent *));
+extern void null_mouse ARGS((XEvent *));
+
+EXTERN mouse_proc mouse_motion INIT(null_mouse);
+EXTERN mouse_proc mouse_release INIT(null_mouse);
+
+/* Used for source special lookup (forward search) and for window manager
+ delete protocol (toolkit only). */
+
+#if XAW
+EXTERN Atom atoms[5];
+#elif MOTIF
+EXTERN Atom atoms[4];
+#else
+EXTERN Atom atoms[3];
+#endif
+
+#define ATOM_XDVI_WINDOWS (atoms[0])
+#define ATOM_DVI_FILE (atoms[1])
+#define ATOM_SRC_GOTO (atoms[2])
+#if TOOLKIT
+#define XA_WM_DELETE_WINDOW (atoms[3])
+#endif
+#if XAW
+#define XA_WM_PROTOCOLS (atoms[4])
+#endif
+
+#ifdef SELFAUTO
+EXTERN _Xconst char *argv0; /* argv[0] */
+#endif
+
+#if PS
+
+extern struct psprocs {
+ void (*toggle) ARGS((void));
+ void (*destroy) ARGS((void));
+ void (*interrupt) ARGS((void));
+ void (*endpage) ARGS((void));
+ void (*drawbegin) ARGS((int, int, _Xconst char *));
+ void (*drawraw) ARGS((_Xconst char *));
+ void (*drawfile) ARGS((_Xconst char *, FILE *));
+ void (*drawend) ARGS((_Xconst char *));
+ void (*beginheader) ARGS((void));
+ void (*endheader) ARGS((void));
+ void (*newdoc) ARGS((void));
+} psp, no_ps_procs;
+
+#endif /* PS */
+
+/********************************
+ * Procedures *
+ *******************************/
+
+_XFUNCPROTOBEGIN
+
+extern int atopix ARGS((_Xconst char *, wide_bool));
+#if TOOLKIT
+extern Bool compile_action ARGS((_Xconst char *, struct xdvi_action **));
+#endif
+#if BUTTONS
+extern void create_buttons ARGS((void));
+#if XAW
+extern void set_button_panel_height ARGS((XtArgVal));
+#endif
+#endif /* BUTTONS */
+#if GREY
+extern void init_plane_masks ARGS((void));
+#endif
+#if COLOR
+extern Pixel alloc_color ARGS((_Xconst struct rgb *, Pixel));
+extern void do_color_change ARGS((void));
+#elif GREY
+extern void init_pix ARGS((void));
+#endif
+extern void expose ARGS((struct WindowRec *, int, int,
+ unsigned int, unsigned int));
+extern void home ARGS((wide_bool));
+extern void reconfig ARGS((void));
+#if TOOLKIT
+extern void handle_resize ARGS((Widget, XtPointer, XEvent *, Boolean *));
+extern void handle_expose ARGS((Widget, XtPointer, XEvent *, Boolean *));
+extern void handle_property_change ARGS((Widget, XtPointer, XEvent *,
+ Boolean *));
+#endif
+#if XAW
+extern void handle_messages ARGS((Widget, XtPointer, XEvent *, Boolean *));
+#elif MOTIF
+extern void handle_wm_delete ARGS((Widget, XtPointer, XtPointer));
+#endif
+extern void goto_page ARGS((int, home_proc));
+#if MOTIF
+extern void file_pulldown_callback ARGS((Widget, XtPointer, XtPointer));
+extern void navigate_pulldown_callback ARGS((Widget, XtPointer, XtPointer));
+extern void scale_pulldown_callback ARGS((Widget, XtPointer, XtPointer));
+extern void set_shrink_factor ARGS((int));
+extern void popdown_callback ARGS((Widget, XtPointer, XtPointer));
+#endif
+#if !TOOLKIT
+extern void showmessage ARGS((_Xconst char *));
+#endif
+extern void set_chld ARGS((struct xchild *));
+extern void clear_chld ARGS((struct xchild *));
+extern void set_io ARGS((struct xio *));
+extern void clear_io ARGS((struct xio *));
+extern void set_timer ARGS((struct xtimer *, int));
+extern void cancel_timer ARGS((struct xtimer *));
+extern unsigned int read_events ARGS((unsigned int));
+extern void enable_intr ARGS((void));
+extern void do_pages ARGS((void)) NORETURN;
+#if XAW
+extern void simple_popup ARGS((struct status_popup *, _Xconst char *,
+ XtCallbackProc));
+extern void simple_popdown ARGS((struct status_popup *));
+extern void do_popup ARGS((Widget));
+extern Widget warning_popup ARGS((_Xconst char *, _Xconst char *,
+ XtCallbackProc));
+extern Widget warning_popup_long VARGS((_Xconst char *, _Xconst char *,
+ XtCallbackProc, ...));
+extern void Act_print ARGS((Widget, XEvent *, String *, Cardinal *));
+extern void Act_open_dvi_file ARGS((Widget, XEvent *, String *,
+ Cardinal *));
+#elif MOTIF
+extern void simple_popup ARGS((struct status_popup *, _Xconst char *,
+ XtCallbackProc));
+extern void simple_popdown ARGS((struct status_popup *));
+extern void do_popup ARGS((Widget));
+extern Widget warning_popup ARGS((_Xconst char *, int, _Xconst char *,
+ XtCallbackProc));
+extern Widget warning_popup_long ARGS((_Xconst char *, int, _Xconst char *,
+ XtCallbackProc, ...));
+extern void Act_print ARGS((Widget, XEvent *, String *, Cardinal *));
+extern void Act_open_dvi_file ARGS((Widget, XEvent *, String *,
+ Cardinal *));
+#endif
+extern void reset_fonts ARGS((void));
+#if COLOR
+extern void reset_colors ARGS((void));
+extern void full_reset_colors ARGS((void));
+#endif
+extern void realloc_font ARGS((struct font *, wide_ubyte));
+extern void realloc_virtual_font ARGS((struct font *, wide_ubyte));
+extern Boolean load_font ARGS((struct font *));
+extern struct font *define_font ARGS((FILE *, wide_ubyte,
+ struct font *, struct font **, unsigned int,
+ struct tn **));
+extern void init_page ARGS((void));
+extern Boolean open_dvi_file ARGS((_Xconst char *));
+extern void form_dvi_property ARGS((ino_t));
+extern void init_dvi_file ARGS((void));
+extern void set_dvi_property ARGS((void));
+extern Boolean check_dvi_file ARGS((void));
+extern void reload_dvi_file ARGS((void));
+#ifndef TEXXET
+extern long set_char ARGS((wide_ubyte));
+extern long load_n_set_char ARGS((wide_ubyte));
+extern long set_vf_char ARGS((wide_ubyte));
+#else
+extern void set_char ARGS((wide_ubyte, wide_ubyte));
+extern void load_n_set_char ARGS((wide_ubyte, wide_ubyte));
+extern void set_vf_char ARGS((wide_ubyte, wide_ubyte));
+#endif
+extern void prescan ARGS((void));
+extern void draw_page ARGS((void));
+extern void source_reverse_search ARGS((int, int));
+extern void source_special_show ARGS((wide_bool));
+extern void source_forward_search ARGS((_Xconst char *));
+#if CFGFILE
+extern void readconfig ARGS((void));
+#endif
+extern void init_font_open ARGS((void));
+extern FILE *font_open ARGS((_Xconst char *, char **, double, int *, int,
+ char **));
+#if PS
+extern void ps_clear_cache ARGS((void));
+extern void ps_destroy ARGS((void));
+#endif
+extern void init_prescan ARGS((void));
+#if COLOR
+extern void scan_color_eop ARGS((void));
+extern void set_fg_color ARGS((_Xconst struct rgb *));
+#endif
+extern void applicationDoSpecial ARGS((char *));
+extern void scan_special ARGS((char *));
+extern void geom_do_special ARGS((struct geom_info *, char *, double));
+extern void xdvi_exit ARGS((int)) NORETURN;
+extern void oops VARGS((_Xconst char *, ...)) NORETURN;
+#ifndef KPATHSEA
+extern void *xmalloc ARGS((unsigned));
+extern void *xrealloc ARGS((void *, unsigned));
+extern char *xstrdup ARGS((_Xconst char *));
+extern char *xmemdup ARGS((_Xconst char *, size_t));
+#endif
+#if TOOLKIT && !HAVE_STRERROR && !defined strerror
+extern char *strerror ARGS((int));
+#endif
+extern void expandline ARGS((size_t));
+extern void alloc_bitmap ARGS((struct bitmap *));
+#ifndef KPATHSEA
+extern void xputenv ARGS((_Xconst char *, _Xconst char *));
+#endif
+extern int memicmp ARGS((_Xconst char *, _Xconst char *, size_t));
+extern FILE *xfopen ARGS((_Xconst char *, OPEN_MODE_ARGS));
+#if XAW
+extern int xopen ARGS((_Xconst char *, int));
+#endif
+extern int xpipe ARGS((int *));
+extern DIR *xopendir ARGS((_Xconst char *));
+extern _Xconst struct passwd *ff_getpw ARGS((_Xconst char **, _Xconst char *));
+extern unsigned long num ARGS((FILE *, int));
+extern long snum ARGS((FILE *, int));
+extern size_t property_get_data ARGS((Window, Atom, unsigned char **,
+ int (*x_get_property) (Display *, Window, Atom, long,
+ long, Bool, Atom, Atom *, int *, unsigned long *,
+ unsigned long *, unsigned char **)));
+#if PS
+extern int xdvi_temp_fd ARGS((char **));
+#endif
+extern void prep_fd ARGS((int, wide_bool));
+extern void read_PK_index ARGS((struct font *, wide_bool));
+extern void read_GF_index ARGS((struct font *, wide_bool));
+extern void read_VF_index ARGS((struct font *, wide_bool));
+
+#if PS
+extern void ps_init_paths ARGS((void));
+extern void drawbegin_none ARGS((int, int, _Xconst char *));
+extern void draw_bbox ARGS((void));
+extern void NullProc ARGS((void));
+#ifdef PS_DPS
+extern Boolean initDPS ARGS((void));
+#endif
+#ifdef PS_NEWS
+extern Boolean initNeWS ARGS((void));
+#endif
+#ifdef PS_GS
+extern Boolean initGS ARGS((void));
+extern void gs_resume_prescan ARGS((void));
+#endif
+#endif /* PS */
+
+_XFUNCPROTOEND
+
+#define one(fp) ((unsigned char) getc(fp))
+#define sone(fp) ((long) one(fp))
+#define two(fp) num (fp, 2)
+#define stwo(fp) snum(fp, 2)
+#define four(fp) num (fp, 4)
+#define sfour(fp) snum(fp, 4)
+
+#endif /* XDVI_H */