From c455604f3592fd679d4b97637366bc9b5a5fef50 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 11 Feb 2021 03:00:49 +0000 Subject: CTAN sync 202102110300 --- systems/knuth/local/cm/ccn10.mf | 75 + systems/knuth/local/etc/addencodings.pl | 5383 +++++++++++++++++++++++++++++ systems/knuth/local/lib/10list.tex | 83 + systems/knuth/local/lib/6list.tex | 2 +- systems/knuth/local/lib/cwebmac.tex | 28 +- systems/knuth/local/lib/domino.mf | 40 +- systems/knuth/local/lib/gkpmac.tex | 45 +- systems/knuth/local/lib/letter.tex | 119 - systems/knuth/local/lib/letterformat.tex | 85 + systems/knuth/local/lib/list-latin.tex | 30 - systems/knuth/local/lib/llist-latin.tex | 84 + systems/knuth/local/lib/llist.tex | 2 +- systems/knuth/local/lib/twimac.tex | 18 +- systems/knuth/local/mf-sparc/ini_to_trap | 0 systems/knuth/local/mf/ini_to_trap | 0 systems/knuth/local/mfware/ext.o | Bin 0 -> 21224 bytes systems/knuth/local/mfware/gftodvi | Bin 0 -> 396008 bytes systems/knuth/local/mfware/gftodvi.ch | 516 +++ systems/knuth/local/mfware/gftodvi.o | Bin 0 -> 114416 bytes systems/knuth/local/mfware/gftodvi.p | 854 +++++ systems/knuth/local/mfware/gray.log | 26 + systems/knuth/local/mfware/io.2602gf | Bin 0 -> 1724 bytes systems/knuth/local/mfware/io.dvi | Bin 0 -> 2408 bytes systems/knuth/local/mfware/io.log | 6 + systems/knuth/local/mfware/io.ps | 332 ++ systems/knuth/local/mfware/missfont.log | 2 + systems/knuth/local/tex-sparc/ini_to_trip | 0 systems/knuth/local/tex-sparc/ini_to_vir | 0 systems/knuth/local/tex/ini_to_trip | 0 systems/knuth/local/tex/ini_to_vir | 0 systems/knuth/local/texware/dvityext.o | Bin 0 -> 17432 bytes systems/knuth/local/texware/dvitype | Bin 0 -> 363359 bytes systems/knuth/local/texware/dvitype.o | Bin 0 -> 81452 bytes systems/knuth/local/texware/dvitype.out | 35 + systems/knuth/local/texware/dvitype.out-k | 34 + systems/knuth/local/texware/pooltype | Bin 0 -> 313421 bytes systems/knuth/local/texware/pooltype.o | Bin 0 -> 12064 bytes systems/knuth/local/texware/texput.dvi | Bin 0 -> 196 bytes systems/knuth/local/texware/texput.log | 4 + systems/knuth/local/texware/tftopl.o | Bin 0 -> 82856 bytes systems/knuth/local/web/tangext.o | Bin 0 -> 10640 bytes systems/knuth/local/web/tangle | Bin 0 -> 389576 bytes systems/knuth/local/web/tangle.o | Bin 0 -> 116360 bytes systems/knuth/local/web/tangle.p-bak | 814 +++++ systems/knuth/local/web/weave.o | Bin 0 -> 163060 bytes 45 files changed, 8411 insertions(+), 206 deletions(-) create mode 100644 systems/knuth/local/cm/ccn10.mf create mode 100755 systems/knuth/local/etc/addencodings.pl create mode 100644 systems/knuth/local/lib/10list.tex delete mode 100644 systems/knuth/local/lib/letter.tex create mode 100644 systems/knuth/local/lib/letterformat.tex create mode 100644 systems/knuth/local/lib/llist-latin.tex mode change 100644 => 100755 systems/knuth/local/mf-sparc/ini_to_trap mode change 100644 => 100755 systems/knuth/local/mf/ini_to_trap create mode 100644 systems/knuth/local/mfware/ext.o create mode 100755 systems/knuth/local/mfware/gftodvi create mode 100644 systems/knuth/local/mfware/gftodvi.ch create mode 100644 systems/knuth/local/mfware/gftodvi.o create mode 100644 systems/knuth/local/mfware/gftodvi.p create mode 100644 systems/knuth/local/mfware/gray.log create mode 100644 systems/knuth/local/mfware/io.2602gf create mode 100644 systems/knuth/local/mfware/io.dvi create mode 100644 systems/knuth/local/mfware/io.log create mode 100644 systems/knuth/local/mfware/io.ps create mode 100644 systems/knuth/local/mfware/missfont.log mode change 100644 => 100755 systems/knuth/local/tex-sparc/ini_to_trip mode change 100644 => 100755 systems/knuth/local/tex-sparc/ini_to_vir mode change 100644 => 100755 systems/knuth/local/tex/ini_to_trip mode change 100644 => 100755 systems/knuth/local/tex/ini_to_vir create mode 100644 systems/knuth/local/texware/dvityext.o create mode 100755 systems/knuth/local/texware/dvitype create mode 100644 systems/knuth/local/texware/dvitype.o create mode 100644 systems/knuth/local/texware/dvitype.out create mode 100644 systems/knuth/local/texware/dvitype.out-k create mode 100755 systems/knuth/local/texware/pooltype create mode 100644 systems/knuth/local/texware/pooltype.o create mode 100644 systems/knuth/local/texware/texput.dvi create mode 100644 systems/knuth/local/texware/texput.log create mode 100644 systems/knuth/local/texware/tftopl.o create mode 100644 systems/knuth/local/web/tangext.o create mode 100755 systems/knuth/local/web/tangle create mode 100644 systems/knuth/local/web/tangle.o create mode 100644 systems/knuth/local/web/tangle.p-bak create mode 100644 systems/knuth/local/web/weave.o (limited to 'systems/knuth/local') diff --git a/systems/knuth/local/cm/ccn10.mf b/systems/knuth/local/cm/ccn10.mf new file mode 100644 index 0000000000..4dc258d14c --- /dev/null +++ b/systems/knuth/local/cm/ccn10.mf @@ -0,0 +1,75 @@ +% Concrete Roman Narrow 10 point +if unknown cmbase: input cmbase fi + +font_identifier:="CCR"; font_size 10pt#; + +u#:=17/36pt#; % unit width +width_adj#:=0pt#; % width adjustment for certain characters +serif_fit#:=1/36pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=3/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=0pt#; % extra space added to all sidebars + +body_height#:=270/36pt#; % height of tallest characters +asc_height#:=250/36pt#; % height of lowercase ascenders +cap_height#:=246/36pt#; % height of caps +fig_height#:=232/36pt#; % height of numerals +x_height#:=165/36pt#; % height of lowercase without ascenders +math_axis#:=90/36pt#; % axis of symmetry for math symbols +bar_height#:=92/36pt#; % height of crossbar in lowercase e +comma_depth#:=70/36pt#; % depth of comma below baseline +desc_depth#:=70/36pt#; % depth of lowercase descenders + +crisp#:=0pt#; % diameter of serif corners +tiny#:=11/36pt#; % diameter of rounded corners +fine#:=6/36pt#; % diameter of sharply rounded corners +thin_join#:=17/36pt#; % width of extrafine details +hair#:=21/36pt#; % lowercase hairline breadth +stem#:=25/36pt#; % lowercase stem breadth +curve#:=27/36pt#; % lowercase curve breadth +ess#:=25/36pt#; % breadth in middle of lowercase s +flare#:=29/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=38/36pt#; % diameter of dots +cap_hair#:=21/36pt#; % uppercase hairline breadth +cap_stem#:=27/36pt#; % uppercase stem breadth +cap_curve#:=28/36pt#; % uppercase curve breadth +cap_ess#:=27/36pt#; % breadth in middle of uppercase s +rule_thickness#:=.4pt#; % thickness of lines in math symbols + +dish#:=0/36pt#; % amount erased at top or bottom of serifs +bracket#:=5/36pt#; % vertical distance from serif base to tangent +jut#:=30/36pt#; % protrusion of lowercase serifs +cap_jut#:=32/36pt#; % protrusion of uppercase serifs +beak_jut#:=10/36pt#; % horizontal protrusion of beak serifs +beak#:=70/36pt#; % vertical protrusion of beak serifs +vair#:=21/36pt#; % vertical diameter of hairlines +notch_cut#:=30/36pt#; % maximum breadth above or below notches +bar#:=21/36pt#; % lowercase bar thickness +slab#:=21/36pt#; % serif and arm thickness +cap_bar#:=21/36pt#; % uppercase bar thickness +cap_band#:=21/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=1pt#; % max breadth above/below uppercase notches +serif_drop#:=5/36pt#; % vertical drop of sloped serifs +stem_corr#:=1/36pt#; % for small refinements of stem breadth +vair_corr#:=1/36pt#; % for small refinements of hairline height +apex_corr#:=0pt#; % extra width at diagonal junctions + +o#:=4/36pt#; % amount of overshoot for curves +apex_o#:=3/36pt#; % amount of overshoot for diagonal junctions + +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +fudge:=.95; % factor applied to weights of heavy characters +math_spread:=0; % extra openness of math symbols +superness:=8/11; % parameter for superellipses +superpull:=1/15; % extra openness inside bowls +beak_darkness:=4/30; % fraction of triangle inside beak serifs +ligs:=2; % level of ligatures to be included + +square_dots:=false; % should dots be square? +hefty:=false; % should we try hard not to be overweight? +serifs:=true; % should serifs and bulbs be attached? +monospace:=false; % should all characters have the same width? +variant_g:=false; % should an italic-style g be used? +low_asterisk:=false; % should the asterisk be centered at the axis? +math_fitting:=false; % should math-mode spacing be used? + +generate roman % switch to the driver file diff --git a/systems/knuth/local/etc/addencodings.pl b/systems/knuth/local/etc/addencodings.pl new file mode 100755 index 0000000000..eba7b59f43 --- /dev/null +++ b/systems/knuth/local/etc/addencodings.pl @@ -0,0 +1,5383 @@ +# +# Given a dvips file with bitmap fonts, add the appropriate font +# encodings, bounding box, and scale. +# +use strict ; +my @names ; +my $loc = 0 ; +my $hdpi = 0 ; +my $hscale = 0 ; +my $rewritebb = 1 ; +my $scalefont = 1 ; +my $deduplicate = 0 ; +while (@ARGV && $ARGV[0] =~ /^-/) { + my $arg = shift @ARGV ; + if ($arg eq '--nofontbb') { + $rewritebb = 0 ; + } elsif ($arg eq '--noscale') { + $scalefont = 0 ; + } elsif ($arg eq '--deduplicate') { + $deduplicate = 1 ; + } else { + die "Bad arg; should be one of --nofontbb or --noscale." ; + } +} +sub emit { + my $s = shift ; + if ($loc + 1 + length($s) > 75) { + print "\n" ; + $loc = 0 ; + } +# if ($loc) { +# print " " ; +# $loc++ ; +# } + print $s ; + $loc += length($s) ; +} +my $encnum = 0 ; +my %cache ; +my $cacheable ; +sub emitnames { + my $cacheable = shift ; + if ($deduplicate && defined($cache{$cacheable})) { + # we use load to get the value and defer execution. + print "/$cache{$cacheable} load\n" ; + } else { + my $key = "EN" . $encnum++ ; + $cache{$cacheable} = $key ; + print $cacheable ; + emit("A/$key X ") ; + } +} +sub resetcache { + $encnum = 0 ; + %cache = () ; +} +my %allenc = () ; +sub loadall { + my @keys = () ; + my @enc = () ; + while () { + if (/^([^ ]*):$/) { + my $key = $1 ; + if (@enc) { + my $enc = join '', @enc ; + $allenc{$_} = $enc for @keys ; + @enc = () ; + @keys = () ; + } + push @keys, $key ; + } else { + push @enc, $_ ; + } + } + if (@enc) { + my $enc = join '', @enc ; + $allenc{$_} = $enc for @keys ; + } +} +my @k = () ; +my $keep = 0 ; +my $fn = undef ; +my $lastcc = 0 ; +my $slop = 1 ; +my $llx ; +my $lly ; +my $urx ; +my $ury ; +my $end ; +my $str ; +my $minx ; +my $maxx ; +my $miny ; +my $maxy ; +my $at ; +sub scansizes { + $str = join '', @k ; + $at = -1 ; + $llx = 0 ; + $lly = 0 ; + $urx = 0 ; + $ury = 0 ; + $end = length($str) ; + while (1) { + $at = index($str, ">", $at+1) ; + last if $at < 0 ; + my $endhex = $at - 1 ; + $at++ ; + my @numargs = () ; + my $c ; + while (1) { + $at++ while $at < $end && substr($str, $at, 1) le ' ' ; + last if $at >= $end ; + $c = substr($str, $at, 1) ; + if ($c eq '-' || ('0' le $c && $c le '9')) { + my $num = '' ; + while ($c eq '-' || ('0' le $c && $c le '9')) { + $num .= $c ; + $at++ ; + $c = substr($str, $at, 1) ; + } + push @numargs, 0 + $num ; + } else { + last ; + } + } + next if $c eq '<' && @numargs == 0 ; + die "Fail saw $c" if $c ne 'D' && $c ne 'I' ; + die "Bad args" if $c eq 'D' && @numargs != 1 && @numargs != 6 ; + die "Bad args" if $c eq 'I' && @numargs != 0 && @numargs != 5 ; + if ($c eq 'D') { + $lastcc = $numargs[-1] ; + } else { + $lastcc++ ; + } + if (@numargs < 4) { + # find the previous 10 hex digits + my $digs = '' ; + while ($endhex > 0 && length($digs) < 10) { + $c = substr($str, $endhex, 1) ; + if (('0' le $c && $c le '9') || ('A' le $c && $c le 'Z')) { + $digs = $c . $digs ; + } else { + die "Bad char in hex string" if $c gt ' ' && $c ne '<' && $c ne '>' ; + } + $endhex-- ; + } + die "Did not find ten digs" if length($digs) != 10 ; + my $i ; + for ($i=0; $i<5; $i++) { + splice(@numargs, $i, 0, hex(substr($digs, 2*$i, 2))) ; + } + } + $numargs[2] = 128 - $numargs[2] ; + $numargs[3] = $numargs[3] - 127 ; + $minx = $numargs[2] ; + $maxx = $numargs[0] + $numargs[2] ; + $miny = $numargs[3] - $numargs[1] ; + $maxy = $numargs[3] ; + $minx -= $slop ; + $miny -= $slop ; + $maxx += $slop ; + $maxy += $slop ; + $llx = $minx if $minx < $llx ; + $lly = $miny if $miny < $lly ; + $urx = $maxx if $maxx > $urx ; + $ury = $maxy if $maxy > $ury ; + } +} +loadall() ; +my $bufptr = 0 ; +my @buf ; +my $landscape = 0 ; +my $insetup = 0 ; +while (<>) { + push @buf, $_ ; + $insetup = 1 if /^%%BeginSetup/ ; + last if /^%%EndSetup/ ; + $landscape = 1 if /\@landscape/ && $insetup ; +} +my $addview = 1 ; +my $fontsize ; +my $hsi ; +my $fid ; +my $viewori ; +while (1) { + if ($bufptr < @buf) { + $_ = $buf[$bufptr++] ; + } else { + $_ = <> ; + last if !$_ ; + } + if (/TeXDict begin \d+ \d+ \d+ (\d+) /) { + $hdpi = $1 ; + } + if (/^%DVIPSBeginSection/) { + resetcache() ; + } + if (/^%EndDVIPSBitmapFont/) { + $hscale = $hdpi * $fontsize / 72 ; + $hsi = 1 / $hscale ; + $hsi = 1 if !$scalefont ; + my @cacheable = () ; + if (open E, "dvips-$fn.enc") { + print STDERR "Reading dvips-$fn.enc\n" ; + my $safeunderbar = $_ ; + while () { + push @cacheable, $_ ; + } + close E ; + $_ = $safeunderbar ; + $cacheable = join '', @cacheable ; + emitnames($cacheable) ; + } elsif (defined($allenc{$fn})) { + emitnames($allenc{$fn}) ; + } else { + warn "Cannot find encoding for $fn.enc" ; + print "IEn\n" ; + } + scansizes() ; + print "IEn S/IEn X FBB FMat/FMat[$hsi 0 0 -$hsi 0 0]N\n" ; + print "/FBB[$llx $lly $urx $ury]N\n" if $rewritebb ; + print for @k ; + print "/$fid load 0 $fid currentfont $hscale scalefont put\n" if $scalefont ; + print "/FMat X/FBB X/IEn X\n" ; + $keep = 0 ; + } + if ($keep) { + push @k, $_ ; + } else { + print ; + } + if (/^%%EndComments/ && $addview) { + if ($landscape) { + $viewori = "0 -1 1 0" ; + } else { + $viewori = "1 0 0 1" ; + } + print <>}\BlueGreen #1\Black \pdfendlink + << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink % changed in 3.69 \else \ifpdf{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}% \special{pdf: ec}}\special{pdf: ann width \thewidth\space height \theheight \space depth \thedepth\space << /Border [0 0 0] @@ -278,7 +282,8 @@ \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 \noindent{\let\*=\lapstar\bf\secstar.\quad}% \ifpdftex\smash{\raise\baselineskip\hbox to0pt{% - \let\*=\empty\pdfdest num \secstar fith}} +% \let\*=\empty\pdfdest num \secstar fith}} % bad space in versions < 3.68 + \let\*=\empty\pdfdest num \secstar fith}}% changed in version 3.68 \else\ifpdf\smash{\raise\baselineskip\hbox to0pt{% \let\*=\empty\special{% pdf: dest (\romannumeral\secstar) [ @thispage /FitH @ypos ]}}}\fi\fi} @@ -340,7 +345,7 @@ \def\T#1{\leavevmode % octal, hex or decimal constant \hbox{$\def\?{\kern.2em}% % \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant % versions < 3.67 - \def\$##1{\egroup_{\rm##1}\bgroup}% suffix to constant + \def\$##1{\egroup_{\rm##1}\bgroup}% suffix to constant % in version 3.67 \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick) \let\~=\oct \let\^=\hex {#1}$}} \def\U{\note{This code is used in section}} % xref for use of a section @@ -407,7 +412,8 @@ \newdimen\pagewidth \pagewidth=6.5in % the width of each page \newdimen\pageheight \pageheight=8.7in % the height of each page \newdimen\fullpageheight \fullpageheight=9in % page height including headlines -\newdimen\pageshift \pageshift=0in % shift righthand pages wrt lefthand ones +\newdimen\pageshift \pageshift=\hoffset + % shift righthand pages wrt lefthand ones (changed in version 3.70) \def\magnify#1{\mag=#1\pagewidth=6.5truein\pageheight=8.7truein \fullpageheight=9truein\setpage} \def\setpage{\hsize\pagewidth\vsize\pageheight} % use after changing page size @@ -457,6 +463,7 @@ \def\fin{\par\vfill\eject % this is done when we are ending the index \ifpagesaved\null\vfill\eject\fi % output a null index column \if L\lr\else\null\vfill\eject\fi % finish the current page + \ifpdftex \makebookmarks \fi % added in Version 3.68 \parfillskip 0pt plus 1fil \def\grouptitle{NAMES OF THE SECTIONS} \let\topsecno=\nullsec @@ -470,7 +477,8 @@ \def\Us{\note{Used in sections}} % crossref for uses of a section \def\I{\par\hangindent 2em}\let\*=* \ifacro \def\outsecname{Names of the sections} \let\Xpdf\X - \ifpdftex \makebookmarks \pdfdest name {NOS} fitb +% \ifpdftex \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68 + \ifpdftex \pdfdest name {NOS} fith % changed in version 3.69 \pdfoutline goto name {NOS} count -\secno {\outsecname} \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.% {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}% diff --git a/systems/knuth/local/lib/domino.mf b/systems/knuth/local/lib/domino.mf index 6bd9da121b..578110eb32 100644 --- a/systems/knuth/local/lib/domino.mf +++ b/systems/knuth/local/lib/domino.mf @@ -14,41 +14,49 @@ % instead of 16,32,48. But the present scheme seems mathematically better. mode_setup; p#:=in#/300; -d#:=64p#; +%d#:=64p#; +d#:=63p#; % changed September 2016 (makes the font slightly smaller) define_pixels(p); font_identifier:="DOMINO"; font_coding_scheme:="dominoes"; font_size:=10pt#; +font_quad:=d#; +font_normal_space:=d#; -pickup pencircle scaled p; tiny_pen=savepen; +pickup pencircle scaled .5p; tiny_pen=savepen; pickup pencircle scaled 13p; huge_pen=savepen; % I first tried 15p, and it looked OK, but the Taiwan set has smaller dots -pickup pencircle scaled 3p; bound_pen=savepen; def begindomchar(expr code)= beginchar(code,d#,d#,0); pickup tiny_pen; - for x=0 step 2p until 60p: - drawdot (x+.5p,1.5p); drawdot (x+1.5p,.5p); - drawdot (.5p,x+3.5p); drawdot (1.5p,x+2.5p); - drawdot (w-1.5p,x+1.5p); drawdot (w-.5p,x+.5p); - drawdot (x+2.5p,h-.5p); drawdot (x+3.5p,h-1.5p); +% for x=0 step 2p until 60p: +% drawdot (x+.5p,1.5p); drawdot (x+1.5p,.5p); +% drawdot (.5p,x+3.5p); drawdot (1.5p,x+2.5p); +% drawdot (w-1.5p,x+1.5p); drawdot (w-.5p,x+.5p); +% drawdot (x+2.5p,h-.5p); drawdot (x+3.5p,h-1.5p); +% September 2016: that approach gave bad effect at join between domino halves + for x=0 step 3p until 57p: + drawdot (x+1.5p,1.5p); + drawdot (w-1.5p,x+1.5p); + drawdot (w-1.5p-x,h-1.5p); + drawdot (1.5p,h-1.5p-x); endfor % fill (2p,2p)--(w-2p,2p)--(w-2p,h-2p)--(2p,h-2p)--cycle; fill (3p,3p)--(w-3p,3p)--(w-3p,h-3p)--(3p,h-3p)--cycle; pickup huge_pen; enddef; -def dota = erase drawdot(16p,48p) enddef; -def dotb = erase drawdot(32p,48p) enddef; -def dotc = erase drawdot(48p,48p) enddef; -def dotd = erase drawdot(16p,32p) enddef; -def dote = erase drawdot(32p,32p) enddef; -def dotf = erase drawdot(48p,32p) enddef; +def dota = erase drawdot(16p,47p) enddef; +def dotb = erase drawdot(31.5p,47p) enddef; +def dotc = erase drawdot(47p,47p) enddef; +def dotd = erase drawdot(16p,31.5p) enddef; +def dote = erase drawdot(31.5p,31.5p) enddef; +def dotf = erase drawdot(47p,31.5p) enddef; def dotg = erase drawdot(16p,16p) enddef; -def doth = erase drawdot(32p,16p) enddef; -def doti = erase drawdot(48p,16p) enddef; +def doth = erase drawdot(31.5p,16p) enddef; +def doti = erase drawdot(47p,16p) enddef; def v(expr code)=128+ASCII code enddef; % change character code for vertical format diff --git a/systems/knuth/local/lib/gkpmac.tex b/systems/knuth/local/lib/gkpmac.tex index 1ae0f1a7a6..5b143505a2 100644 --- a/systems/knuth/local/lib/gkpmac.tex +++ b/systems/knuth/local/lib/gkpmac.tex @@ -4,12 +4,12 @@ % Fonts for regular text -\font\textrm=ccr10 % roman -\font\textit=ccti10 % italic (emphasis) -\font\textsl=ccsl10 % slanted (titles) -\font\textbf=cmbx10 % bold -\font\textcsc=cccsc10 % caps and small caps -\font\oldsty=ccmi10 % equation numbers +\font\textrm=ccr10 % roman +\font\textit=ccti10 % italic (emphasis) +\font\textsl=ccsl10 % slanted (titles) +\font\textbf=cmbx10 % bold +\font\textcsc=cccsc10 % caps and small caps +\font\oldsty=ccmi10 % equation numbers \font\twelvett=cmtt12 % Fonts for regular math @@ -266,8 +266,8 @@ \smallskip\noindent} \def\beginsection#1 #2 \par{ % should not be first in the chapter - \backup=\lastskip % but should come on first or second page of chapter - \mark{#1\enspace #2} % because the mark gives running head on right page + \backup=\lastskip % but should come on first or second page of chapter + \mark{#1\enspace #2} % because the mark gives running head on right page \nobreak\vskip-\backup\penalty-200 {\subtitle\baselineskip=34pt \noindent\hbox to2\parindent{#1\hfil}\uppercase{\kern-.05em#2}\par} @@ -413,8 +413,8 @@ \def\copyrite{\ifpreprint{\textfont2=\sevensy\sevenrm\copyright\ 1988 Addison-Wesley Publishing Company; all rights reserved}\fi} -\newdimen\htrimsize \htrimsize=7.5in -\newdimen\vtrimsize \vtrimsize=9.1875in +\newdimen\htrimsize \htrimsize=7.375in +\newdimen\vtrimsize \vtrimsize=9.25in \newdimen\outermargin \outermargin=23mm \newdimen\topmargin \topmargin=10mm % plus height of the headline box \newbox\htrim \newbox\vtrim \newbox\trimmarks @@ -438,14 +438,15 @@ \vbox to\vtrimsize{\kern\topmargin\fi \vbox to\totheight{ \offinterlineskip % butt the boxes together + \vskip2.5pt % adjustment at the top (10 Jan 2011) \vbox to 2pc{ % this part goes on top of the regular pages \ifodd\pageno \rightheadline\else\leftheadline\fi \vfill} % this completes the \vbox to 2pc \ifodd\pageno\moveright7pc\fi #1 \vfill \iftitle \global\titlefalse % reset the titlepage switch - \ifodd\pageno \hbox to35pc{\hfil\foliofont\folio} - \else\hbox{\foliofont\folio}\fi\fi + \ifodd\pageno \hbox to35pc{\hfil\foliofont\folio} + \else\hbox{\foliofont\folio}\fi\fi \ifpreprint\ifinxmode\makeinxfooter\fi\fi \iffinal % finish the trimmed page }\vfill}\ifodd\pageno\hskip\outermargin\else\hss\fi @@ -489,9 +490,9 @@ \catcode`\|=\active \expandafter\def\expandafter\dospecials\expandafter{\dospecials\do\|} -\newcount\defcount % number of old definitions not yet repeated -\newcount\changecount % number of new definitions that are changed -\newcount\miscount % number of unknown references +\newcount\defcount % number of old definitions not yet repeated +\newcount\changecount % number of new definitions that are changed +\newcount\miscount % number of unknown references \newread\tempin \def\refin#1 {\openin\tempin=#1.ref @@ -763,6 +764,7 @@ \def\And{\quad{\rm and}\quad} \let\==\equiv \def\tmod#1{(mod~$#1$)} +\def\pmod#1{\allowbreak\mkern18mu\hbox{(}{\rm mod}\,\,#1\hbox{)}} \let\implies=\Longrightarrow \def\?{\hbox{!`}} % subfactorial \def\hyp{\mathop{F{}}\nolimits\hyper} @@ -770,14 +772,14 @@ \def\hyper#1#2#3{\mathchoice{\tightplus \hbox{$\displaystyle\biggl({#1\atop#2}\Big\vert\,{#3}\!\biggr)$}}% {\bigl({#1\atop#2}\vert\mskip2mu#3\bigr)}% - {}{}} % used only in D and T styles + {}{}} % used only in D and T styles %\def\hypk_#1{\mathop{F{}}_{#1}\nolimits\hyper} % confl with mFn convention \def\hypk_#1#2#3#4{\mathop{F{}}\mathchoice{\tightplus \hbox{$\displaystyle\biggl({#2\atop#3}\Big\vert\,{#4}\!\biggr)$}% \lower\fontdimen11\mathsym\hbox{$\scriptstyle\!#1$}}% {\bigl({#2\atop#3}\vert\mskip2mu#4\bigr)\lower\fontdimen12\mathsym \hbox{$\scriptstyle\!#1$}}% - {}{}} % used only in D and T styles + {}{}} % used only in D and T styles \def\double(#1\choose#2){\mathchoice{\biggl(\!\!{#1\choose#2}\!\!\biggr)} {\bigl(\!{#1\choose#2}\!\bigr)}{}{}} % only D and T styles \def\hypstrut{\vphantom{_1\_^k}} % if there's another denominator with \_^k @@ -853,9 +855,9 @@ \hyphenation{logical Mac-Mahon hyper-geo-metric hyper-geo-met-rics Ber-noulli} -\preprintfalse % WE ARE MAKING THE REAL BOOK! -\inxmodetrue % WE ARE PREPARING A ROUGH INDEX -\showmissestrue % THE REFERENCES SHOULD ALL BE READY NOW +\preprintfalse % WE ARE MAKING THE REAL BOOK! +\inxmodetrue % WE ARE PREPARING A ROUGH INDEX +\showmissestrue % THE REFERENCES SHOULD ALL BE READY NOW \ifinxmode\immediate\openout\inx=\jobname.inx \fi % file for index reminders \ifinxmode\immediate\openout\bnx=\jobname.bnx \fi % file for bib reminders @@ -883,7 +885,8 @@ \message{OK, I'm making final copy with trim marks!} \hoffset=-.5in \getnxtpg % this should ensure eof on the \pages file -\else\message{OK, I'll ship only the requested pages!}\fi\fi +\else\message{OK, I'll ship only the requested pages!} + \hoffset=-.5in\fi\fi \def\shipout{\ifeof\pages\let\next=\Shipout \else\ifnum\pageno=\nxtpg\getnxtpg\let\next=\Shipout \else\let\next=\Tosspage\fi\fi \next} diff --git a/systems/knuth/local/lib/letter.tex b/systems/knuth/local/lib/letter.tex deleted file mode 100644 index efa2bf02fd..0000000000 --- a/systems/knuth/local/lib/letter.tex +++ /dev/null @@ -1,119 +0,0 @@ -% This macro file is for business letters - -\def\today{\ifcase\month\or - January\or February\or March\or April\or May\or June\or - July\or August\or September\or October\or November\or December\fi - \space\number\day, \number\year} -\def\narrower{\advance\leftskip by 20pt \advance\rightskip by 20pt } - -\raggedbottom -\interlinepenalty=1000 -\hsize=6.25truein \voffset=24pt \advance\vsize by-\voffset -\parindent=0pt \parskip=0pt -\nopagenumbers -\headline={\ifnum\pageno>1 - \tenrm To \addressee\hfil\today\hfil Page \folio - \else\hfil\fi} - -\def\beginlinemode{\endmode - \begingroup\obeylines\def\endmode{\par\endgroup}} -\def\beginparmode{\endmode - \begingroup\parskip=\medskipamount \def\endmode{\par\endgroup}} -\let\endmode=\par -\def\endletter{\endmode\vfill\supereject \pageno=1 } - -\newdimen\longindentation \longindentation=4truein -\newbox\theaddress -\def\address{\beginlinemode\getaddress} -{\obeylines\gdef\getaddress#1 - #2 - {\gdef\addressee{#2\unskip}% - \global\setbox\theaddress=\vbox\bgroup\raggedright% - \hsize=\longindentation \everypar{\hangindent2em}#2 - \def\endmode{\egroup\endgroup \copy\theaddress \bigskip}}} - -\def\body{\beginparmode} -\def\closing{\beginlinemode\getclosing} -{\obeylines\gdef\getclosing #1 - #2 - {\nobreak\bigskip \leftskip=\longindentation #2 - \nobreak\bigskip\bigskip\bigskip % space for signature - \def - {\endgraf\nobreak}}} -\def\annotations{\beginlinemode\def\par{\endgraf\nobreak}\obeylines\par} -\def\ps{\beginparmode\nobreak - \interlinepenalty5000\def\par{\endgraf\penalty5000}} -\def\cc{\beginparmode\nobreak - \interlinepenalty5000\def\par{\endgraf\penalty5000}} - -\def\up#1{\leavevmode \raise.16ex\hbox{#1}} -\font\smallheadfont=cmr8 at 8truept -\font\largeheadfont=cmbx10 at 14.4truept -\font\logofont=stan70 at 70truept -\def\stanfordseal{\vbox{\kern-3truept\hbox{\logofont A}\kern-3truept}} - -\def\csdreturn{Computer Science Department\par \stanfordreturn} -\def\stanfordreturn{Stanford University\par - Stanford, CA 94305\kern.5pt-9045 USA\par} -\def\letterhead{\pageno=1 \univletterhead - {\leftskip=\longindentation - {\baselineskip9truept\smallheadfont\sendingaddress} - \bigskip\bigskip\rm\today\bigskip}} -\def\specrule#1{\nointerlineskip - \line{\hbox to 60truept{\hrulefill - \hphantom{\stanfordseal\kern-#1truept}% - \hrulefill}\hrulefill}\nointerlineskip} -\def\univletterhead{\vglue-34pt - \specrule{11}\vskip8truept - \hbox{\hbox to\longindentation{\smash{\hbox to60truept{\hfil\kern2.5truept - \lower10truept\stanfordseal\hfil}}% - \largeheadfont STANFORD UNIVERSITY\hfil}% - \smallheadfont STANFORD, CALIFORNIA 94305\kern.5pt-9045} - \vskip6truept\specrule{17}\vskip13truept } - -\def\deklet{ - \def\sendingaddress{DONALD E. KNUTH\par - Professor Emeritus of The Art of\par - \qquad Computer Programming\par - Department of Computer Science\par - Telephone \up[650\up]\thinspace 723-4367\par} - \def\returnaddress{Prof.~D. E. Knuth\par \csdreturn} - \letterhead} - -\def\memoto{\beginlinemode\parindent=60truept - \everypar{\hangindent70truept}\startmemo} -\def\bigmemoto{\beginlinemode\parindent=60pt % use this for magstep>1! - \everypar{\hangindent70pt}\startmemo} -\def\textin#1{\noindent\hbox to\parindent{#1\hss}\ignorespaces} -{\obeylines\gdef\startmemo #1 - {\gdef\addressee{#1}% - \global\pageno=1 \vglue-34pt\specrule{11}\vskip8truept - \leftline{\smash{\hbox to60truept{\hfil\kern2.5truept - \lower10truept\stanfordseal\hfil}}% - \largeheadfont Stanford Computer Science Department % - \rm\today}% - \vskip6truept\specrule{20}\bigskip\bigskip\bigskip% - \textin{Memo to:}#1 - \def\endmode{\par\endgroup\bigskip}} - \gdef\from #1 - {\smallskip\textin{From:}#1 - } - \gdef\subject #1 - {\smallskip\textin{Subject:}#1 - } -} - -\def\makelabel{\endletter\hbox{\vrule - \vbox{\hrule \kern6truept - \hbox{\kern6truept\stanfordseal\kern3pt - \vbox{\smallheadfont\baselineskip9truept\hsize=2truein\returnaddress} - \kern6truept}\kern6truept\hrule}\vrule} - \kern.1truein - \hbox{\vrule - \vbox{\hrule \kern12truept - \hbox{\kern12truept\copy\theaddress - \kern12truept}\kern12truept\hrule}\vrule} - \pageno=0\vfill\eject} - -\def\frac#1/#2{\leavemode\kern.1em\raise.5ex\hbox{\the\scriptfont0 - #1}\kern-.1em/\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}} diff --git a/systems/knuth/local/lib/letterformat.tex b/systems/knuth/local/lib/letterformat.tex new file mode 100644 index 0000000000..bc2144a3c1 --- /dev/null +++ b/systems/knuth/local/lib/letterformat.tex @@ -0,0 +1,85 @@ +% This macro file is for business letters + +\def\today{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year} + +\raggedbottom +\interlinepenalty=1000 +\hsize=6.25truein +\voffset=24pt +\advance\vsize by-\voffset +\parindent=0pt +\parskip=0pt +\nopagenumbers +\headline={\ifnum\pageno>1 + \tenrm To \addressee\hfil\today\hfil Page \folio + \else\hfil\fi} + +\def\beginlinemode{\endmode + \begingroup\obeylines\def\endmode{\par\endgroup}} +\def\beginparmode{\endmode + \begingroup\parskip=\medskipamount \def\endmode{\par\endgroup}} +\let\endmode=\par +\def\endletter{\endmode\vfill\supereject} + +\newdimen\longindentation \longindentation=4truein +\newbox\theaddress +\def\address{\beginlinemode\getaddress} +{\obeylines\gdef\getaddress #1 + #2 + {#1\gdef\addressee{#2}% + \global\setbox\theaddress=\vbox\bgroup\raggedright% + \hsize=\longindentation \everypar{\hangindent2em}#2 + \def\endmode{\egroup\endgroup \copy\theaddress \bigskip}}} + +\def\body{\beginparmode} +\def\closing{\beginlinemode\getclosing} +{\obeylines\gdef\getclosing #1 + #2 + {#1\nobreak\bigskip \leftskip=\longindentation #2 + \nobreak\bigskip\bigskip\bigskip % space for signature + \def + {\endgraf\nobreak}}} +\def\annotations{\beginlinemode\def\par{\endgraf\nobreak}\obeylines\par} +\def\ps{\beginparmode\nobreak + \interlinepenalty5000\def\par{\endgraf\penalty5000 }} + +\def\up#1{\leavevmode \raise.16ex\hbox{#1}} +\font\smallheadfont=cmr8 at 8truept +\font\largeheadfont=cmdunh10 at 14.4truept +\font\logofont=manfnt at 14.4truept + +\def\rjdletterhead{ + \def\sendingaddress{R. J. DROFNATS, F.T.U.G.\par + PROFESSOR OF FARM ECOLOGY\par + TEX.RJD @ SU-SCORE.ARPA\par + \up[415\up]\thinspace 497-4975\par} + \def\returnaddress{R. J. Drofnats, Dept.~of Farm Ecology\par + The University of St.~Anford\par + P. O. Box 1009, Haga Alto, CA 94321 USA} + \letterhead} + +\def\letterhead{\pageno=1 \def\addressee{} \univletterhead + {\leftskip=\longindentation + {\baselineskip9truept\smallheadfont\sendingaddress} + \bigskip\bigskip\rm\today\bigskip}} + +\def\univletterhead{\vglue-\voffset + \hbox{\hbox to\longindentation{\raise4truemm\hbox{\logofont + \kern2truept X\kern-1.667truept + \lower2truept\hbox{X}\kern-1.667truept X}\hfil + \largeheadfont The University of St.~Anford\hfil}% + \kern-\longindentation + \vbox{\smallheadfont\baselineskip9truept + \leftskip=\longindentation BOX 1009\par HAGA ALTO, CA 94321}} + \vskip2truept\hrule\vskip4truept } + +\def\makelabel{\endletter\hbox{\vrule + \vbox{\hrule \kern6truept + \hbox{\kern6truept\vbox to 2truein{\hsize=\longindentation + \smallheadfont\baselineskip9truept\returnaddress + \vfill\moveright 2truein\copy\theaddress\vfill}% + \kern6truept}\kern6truept\hrule}\vrule} + \pageno=0\vfill\eject} diff --git a/systems/knuth/local/lib/list-latin.tex b/systems/knuth/local/lib/list-latin.tex index 71d5bb6d9a..09e27dd479 100644 --- a/systems/knuth/local/lib/list-latin.tex +++ b/systems/knuth/local/lib/list-latin.tex @@ -1,4 +1,3 @@ -% This program by D. E. Knuth is not copyrighted and can be used freely. % Makes a listing of one or more files % Extended to allow the Latin-1 accented characters in UTF-8 encoding % Typical usage: @@ -63,32 +62,3 @@ % at present, it's indistinguishable from newline (^^J). % You can get up to 103 characters on a line without an overfull box. - -% Further notes from Don, January 2017: -% -% Maybe I'm the only person left who still uses plain TeX in a UTF-8 world. -% -% But for what it's worth, I'm appending a little file that I prepared today, -% since it turned out to be useful in a project of interest to me. -% -% Namely, I've got a program that takes an XML encoding of organ-pipe -% settings, used by performers when they change the stops during a -% performance, and translates it into a human-readable form. -% I mean, the output says "when you reach combination nunber 0013, -% the following ranks of pipes are set to play". -% -% The names of those ranks of pipes often contain accented characters, -% as well as things like the German \ss. In order to use such texts on the Web, -% I have them in UTF-8 code. But to make a verbatim hardcopy listing using -% nice typewriter-style fonts, I wanted a program like "list.tex", which -% I've been using to print text files for more than 25 years. -% -% Fortunately, the accented characters all turn out to be two-character -% sequences in UTF-8, where the first character is always '303. So I -% can simply make that character active, and it can then change the -% following character appropriately. -% -% Therefore I added a few lines to "list.tex", resulting in "list-latin.tex". -% And it works! Hence it might be a useful addition to the CTAN archives. -% -% Yours truly, Don diff --git a/systems/knuth/local/lib/llist-latin.tex b/systems/knuth/local/lib/llist-latin.tex new file mode 100644 index 0000000000..cbc6140850 --- /dev/null +++ b/systems/knuth/local/lib/llist-latin.tex @@ -0,0 +1,84 @@ +% Makes a landscape listing of one or more files +% Extended to allow the Latin-1 accented characters in UTF-8 encoding +% Typical usage: +% tex llist-latin *.txt \\end + +\def\grabfile#1 {\setbox0=\lastbox\endgraf\doit{#1}} +\everypar{\grabfile} + +\font\filenamefont= cmtt8 scaled\magstep3 +\font\headlinefont= cmr8 +\font\listingfont= cmtex8 +\font\ttfont= cmtt8 +\font\syttfont= cmsytt10 at 8pt +\font\eoffont= cmti8 + +\def\today{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year} +\newcount\m \newcount\n +\n=\time \divide\n 60 \m=-\n \multiply\m 60 \advance\m \time +\def\hours{\twodigits\n\twodigits\m} +\def\twodigits#1{\ifnum #1<10 0\fi \number#1} + +\newlinechar=`@ +\message{@\today\space at \hours} + +\baselineskip=9pt +\medskipamount=4pt minus 1pt +\raggedbottom +\nopagenumbers + +\newcount\n +\catcode`\^^c3=\active +\def\missing{{\syttfont\char15}} +\def^^c3#1{\n=`#1\advance\n by-128 + {\ttfont\ifcase\n + \`A\or\'A\or\^A\or\~A\or\"A\or\AA\or\AE\or\c C\or + \`E\or\'E\or\^E\or\"E\or\`I\or\'I\or\^I\or\"I\or + \missing\or\~N\or\`O\or\'O\or\^O\or\~O\or\"O\or{\syttfont\char2}\or + \O\or\`U\or\'U\or\^U\or\"U\or\'Y\or\missing\or\ss\or + \`a\or\'a\or\^a\or\~a\or\"a\or\aa\or\ae\or\c c\or + \`e\or\'e\or\^e\or\"e\or\`\i\or\'\i\or\^\i\or\"\i\or + \missing\or\~n\or\`o\or\'o\or\^o\or\~o\or\"o\or{\syttfont\char4}\or + \o\or\`u\or\'u\or\^u\or\"u\or\'y\or\missing\or\"y\fi}} + +\chardef\other=12 +\def\doit#1{\message{@Listing #1@} + \begingroup \everypar{} \frenchspacing + \headline{\ifright \headlinefont \hfill Page \folio + \else\filenamefont#1\quad\headlinefont \today\ at \hours\hss \fi} + \def\do##1{\catcode`##1=\other}\dospecials + \catcode127=\other \catcode9=\other \catcode12=\other + \parindent 0pt \parfillskip=0pt plus 1fil minus .8in + \everypar{\hangindent 1in} \rightskip=0pt plus 2in + \def\par{\ifvmode\penalty-50\medskip\else\endgraf\fi} + \listingfont \obeylines \obeyspaces \global\pageno=1 + \input #1 {\eoffont(end of\/ file)}\endgraf\vfill\eject + \ifright\null\vfill\eject\fi\endgroup} +{\obeyspaces\global\let =\ } +\catcode`\_=\other % allow _ in file names + +\hsize=4.6truein +\vsize=7truein +\hoffset=-.5truein +\voffset=-.2truein +\newif\ifright +\newbox\lefthalf +\output{\ifright + \shipout\hbox{\hbox to5.5in{\box\lefthalf\hss}% + \vbox{\makeheadline\pagebody\makefootline}} + \advancepageno\global\rightfalse + \else\global\setbox\lefthalf\vbox{\makeheadline\pagebody\makefootline} + \global\righttrue\fi} + +\special{landscape} + +% A tab (^^I) prints as lowercase gamma. +% Character ^^M could be made visible, with a bit of work; +% at present, it's indistinguishable from newline (^^J). + +% You can get up to 91 characters on a line without an overfull box. +% (But lines with more than 84 characters will be clipped, if they +% appear on a righthand halfpage.) diff --git a/systems/knuth/local/lib/llist.tex b/systems/knuth/local/lib/llist.tex index f107169e24..9674f61803 100644 --- a/systems/knuth/local/lib/llist.tex +++ b/systems/knuth/local/lib/llist.tex @@ -31,7 +31,7 @@ \def\doit#1{\message{@Listing #1@} \begingroup \everypar{} \frenchspacing \headline{\ifright \headlinefont \hfill Page \folio - \else\filenamefont#1\quad\headlinefont \today\ at \hours\hfill \fi} + \else\filenamefont#1\quad\headlinefont \today\ at \hours\hss \fi} \def\do##1{\catcode`##1=\other}\dospecials \catcode127=\other \catcode9=\other \catcode12=\other \parindent 0pt \parfillskip=0pt plus 1fil minus .8in diff --git a/systems/knuth/local/lib/twimac.tex b/systems/knuth/local/lib/twimac.tex index 99905f168c..ce9d983350 100644 --- a/systems/knuth/local/lib/twimac.tex +++ b/systems/knuth/local/lib/twimac.tex @@ -238,10 +238,11 @@ \begingroup\catcode`\_=\active \globaldefs=1 \def\flushout{\ifvoid\partialpage\else \setbox0=\vsplit\partialpage to 44pc - \shipout\vbox{ + \setbox2=\vbox{ \vbox to 3pc{ \hbox to 35pc{\vbox to10pt{}\nineit\rhead\hfil\eightrm\folio}\vfill} - \nointerlineskip\box0} + \nointerlineskip\box0}% + \shipout\box2 \global\advance\pageno 1 \let\=\makeref \ifsorted \let\readin=\readln \readrefs @@ -252,13 +253,12 @@ \hyphenpenalty 10000 \exhyphenpenalty 10000 \noindent\vbox to1pt{}\par % 1pt = \topskip - \ninept \readin} - \shipout\vbox to47pc{ + \setbox2=\vbox to47pc{ \vbox to 3pc{ \hbox to 35pc{\vbox to10pt{}\eightrm\folio\hfil\nineit\rrhead\/}\vfill} \unvbox\partialpage \vfill -% \ifdim\ht0>1pt \kern8pt\hrule \hbox{% - \ifdim\ht0>1pt \kern11pt\hrule \hbox{% % changed Oct 87 by DEK! + \ifdim\ht0>1pt \kern11pt\hrule \hbox{% changed 8pt to 11pt Oct 87 by DEK! \nsize=\ht0 \advance\nsize-\topskip \divide\nsize by 3 \divide\nsize by\ninept \multiply\nsize by\ninept \advance\nsize\topskip @@ -267,7 +267,8 @@ \divide\msize by 2 \divide\msize by\ninept \multiply\msize by\ninept \advance\msize\topskip \vbox to\nsize{\vsplit0 to\msize\vss}\kern1pc - \vbox to\nsize{\box0\vss}} \fi} + \vbox to\nsize{\box0\vss}} \fi}% + \shipout\box2 \global\advance\pageno 1 \global\let\rhead=\rrhead\fi {\globaldefs=1 \nn=199 \loop \ifnum\nn<221 \toks\nn={} \count\nn=0 \advance\nn 1 \repeat @@ -338,10 +339,11 @@ \def\lheader{\vbox to10pt{}\nineit\rhead\hfil\eightrm\folio} \def\rheader{\vbox to10pt{}\eightrm\folio\hfil\nineit\rhead\/} \def\page{\box255 } -\def\normaloutput#1{\shipout\vbox{ +\def\normaloutput#1{\setbox2=\vbox{ \vbox to 3pc{ \hbox to 35pc{\ifodd\pageno\rheader\else\lheader\fi}\vfill} - \nointerlineskip#1} + \nointerlineskip#1}% + \shipout\box2 \global\advance\pageno 1 } \newbox\sbox % saved box preceding the index diff --git a/systems/knuth/local/mf-sparc/ini_to_trap b/systems/knuth/local/mf-sparc/ini_to_trap old mode 100644 new mode 100755 diff --git a/systems/knuth/local/mf/ini_to_trap b/systems/knuth/local/mf/ini_to_trap old mode 100644 new mode 100755 diff --git a/systems/knuth/local/mfware/ext.o b/systems/knuth/local/mfware/ext.o new file mode 100644 index 0000000000..e39b18e77f Binary files /dev/null and b/systems/knuth/local/mfware/ext.o differ diff --git a/systems/knuth/local/mfware/gftodvi b/systems/knuth/local/mfware/gftodvi new file mode 100755 index 0000000000..6e52c25f83 Binary files /dev/null and b/systems/knuth/local/mfware/gftodvi differ diff --git a/systems/knuth/local/mfware/gftodvi.ch b/systems/knuth/local/mfware/gftodvi.ch new file mode 100644 index 0000000000..b4acb5b484 --- /dev/null +++ b/systems/knuth/local/mfware/gftodvi.ch @@ -0,0 +1,516 @@ +% Change file for the GFtoDVI processor, for use with GNU Pascal +% (by Don Knuth; see ../mfware-sparc for the prehistory) + +% History: +% 2000.04.30 Original version + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [0] WEAVE: print changes only +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +\pageno=\contentspagenumber \advance\pageno by 1 +@y +\pageno=\contentspagenumber \advance\pageno by 1 +\let\maybe=\iffalse +\def\title{GF\lowercase{to}DVI changes for {\mc GNU} Pascal} +@z +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [1] Change banner string +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@d banner=='This is GFtoDVI, Version 3.0' {printed when the program starts} +@y +@d banner=='This is GFtoDVI, Version 3.0 for Linux' + {printed when the program starts} +@z +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [2] Use default case statement feature of ISO Extended Pascal +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@d othercases == others: {default for cases not listed explicitly} +@y +@d othercases == otherwise {default for cases not listed explicitly} +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [3] Add inclusion of ext.h and standard input to program header +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@p program GF_to_DVI(@!output); +label @@/ +const @@/ +type @@/ +var @@/ +procedure initialize; {this procedure gets things started properly} + var @!i,@!j,@!m,@!n:integer; {loop indices for initializations} + begin print_ln(banner);@/ + @@/ + end; +@y +@p program GF_to_DVI(@!input,@!output); +label @@/ +const @@/ +type UNIX_filename = packed array [1..1024] of char; +@@/ +var @@/ +@\@=#include "../tex/ext.h"@>@\ {declarations for external C procedures} +procedure initialize; {this procedure gets things started properly} + var @!i,@!j,@!m,@!n:integer; {loop indices for initializations} + begin print_ln(banner);@/ + @@/ + first_input:=true; + end; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [5] Enlarge file_name_size to 1024 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@= +@!max_labels=2000; {maximum number of labels and dots and rules per character} +@!pool_size=10000; {maximum total length of labels and other strings} +@!max_strings=1100; {maximum number of labels and other strings} +@!terminal_line_length=150; {maximum number of characters input in a single + line of input from the terminal} +@!file_name_size=50; {a file name shouldn't be longer than this} +@!font_mem_size=2000; {space for font metric data} +@!dvi_buf_size=800; {size of the output buffer; must be a multiple of 8} +@!widest_row=8192; {maximum number of pixels per row} +@!lig_lookahead=20; {size of stack used when inserting ligature characters} +@y +@= +@!max_labels=2000; {maximum number of labels and dots per character} +@!pool_size=10000; {maximum total length of labels and other strings} +@!max_strings=1100; {maximum number of labels and other strings} +@!terminal_line_length=150; {maximum number of characters input in a single + line of input from the terminal} +@!file_name_size=1024; {a file name shouldn't be longer than this} +@!font_mem_size=2000; {space for font metric data} +@!dvi_buf_size=800; {size of the output buffer; must be a multiple of 8} +@!widest_row=8192; {maximum number of pixels per row} +@!lig_lookahead=20; {size of stack used when inserting ligature characters} +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [8] Add to end of abort() message +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@d abort(#)==@+begin print(' ',#); jump_out;@+end +@y +@d abort(#)==@+begin print_ln(' ',#); jump_out;@+end +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [was15,now16] change update_terminal to flush(), change def'n of term_in +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +Since the terminal is being used for both input and output, some systems +need a special routine to make sure that the user can see a prompt message +before waiting for input based on that message. (Otherwise the message +may just be sitting in a hidden buffer somewhere, and the user will have +no idea what the program is waiting for.) We shall call a system-dependent +subroutine |update_terminal| in order to avoid this problem. + +@d update_terminal == break(output) {empty the terminal output buffer} + +@= +@!buffer:array[0..terminal_line_length] of 0..255; +@!term_in:text_file; {the terminal, considered as an input file} +@y +Since the terminal is being used for both input and output, some systems +need a special routine to make sure that the user can see a prompt message +before waiting for input based on that message. (Otherwise the message +may just be sitting in a hidden buffer somewhere, and the user will have +no idea what the program is waiting for.) We shall call a system-dependent +subroutine |update_terminal| in order to avoid this problem. +@^system dependencies@> + +@d update_terminal == flush_stdout {empty the terminal output buffer} +@d term_in == input {standard input} + +@= +@!buffer:array[0..terminal_line_length] of ByteCard; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [was16,now17] Remove reset(term_in) from input_ln +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@ A global variable |line_length| records the first buffer position after +the line just read. +@^system dependencies@> + +@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 + +@p procedure input_ln; {inputs a line from the terminal} +begin update_terminal; +if first_input then first_input:=false +else if eoln(term_in) then read_ln(term_in); +line_length:=0; +while (line_length + +@p procedure open_gf_file; {prepares to read packed bytes in |gf_file|} +begin reset(gf_file,name_of_file); +cur_loc:=0; +end; +@# +procedure open_tfm_file; {prepares to read packed bytes in |tfm_file|} +begin reset(tfm_file,name_of_file); +end; +@# +procedure open_dvi_file; {prepares to write packed bytes in |dvi_file|} +begin rewrite(dvi_file,name_of_file); +end; +@y +variable that specifies the file name. + +An external C procedure, |test_access| is used to check whether or not the +open will work. It is declared in the \.{ext.h} include file, and it returns +|true| or |false|. The |name_of_file| global holds the file name whose access +is to be tested. +The first parameter for |test_access| is the access mode, +one of |read_access_mode| or |write_access_mode|. + +We also implement path searching in |test_access|: its second parameter is +one of the ``file path'' constants defined below. If |name_of_file| +doesn't start with |'/'| then |test_access| tries prepending pathnames +from the appropriate path list until success or the end of path list +is reached. +On return, |real_name_of_file| contains the original name with the path +that succeeded (if any) prepended. It is the name used in the various +open procedures. + +@d read_access_mode=4 {``read'' mode for |test_access|} +@d write_access_mode=2 {``write'' mode for |test_access|} + +@d no_file_path=0 {do no path searching} +@d font_file_path=3 {path specifier for \.{TFM} files} + +@p procedure open_gf_file; {prepares to read packed bytes in |gf_file|} +var@!i: 1..file_name_size; +begin if test_access(read_access_mode,no_file_path) then + begin reset(gf_file,real_name_of_file); cur_loc:=0; + end +else begin i:=1; + while (real_name_of_file[i] <> chr(0)) do@+incr(i); + abort('Can''t open GF file ',real_name_of_file:i); + end; +end; +@# +procedure open_tfm_file; {prepares to read packed bytes in |tfm_file|} +var@!i: 1..file_name_size; +begin if test_access(read_access_mode,font_file_path) then + begin reset(tfm_file,real_name_of_file); cur_loc:=0; + end +else begin i:=1; + while (real_name_of_file[i] <> chr(0)) do@+incr(i); + abort('Can''t open TFM file ',real_name_of_file:i); + end; +end; +@# +procedure open_dvi_file; {prepares to write packed bytes in |dvi_file|} +var@!i: 1..file_name_size; +begin if test_access(write_access_mode,no_file_path) then + rewrite(dvi_file,real_name_of_file) +else begin i:=1; + while (real_name_of_file[i] <> chr(0)) do@+incr(i); + abort('Can''t write on DVI file ',real_name_of_file:i); + end; +end; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [48] Declare real_name_of_file +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +be read next, and the string |name_of_file| will be set to the current +file name before the file-opening procedures are called. + +@= +@!cur_loc:integer; {current byte number in |gf_file|} +@!name_of_file:packed array[1..file_name_size] of char; {external file name} +@y +be read next, and the string |name_of_file| will be set to the current +file name before the file-opening procedures are called. +Under UNIX, we also have a |real_name_of_file| string, that gets +set by the external |test_access| procedure after path searching. + +@= +@!cur_loc:integer; {current byte number in |gf_file|} +@!name_of_file,@!real_name_of_file:external UNIX_filename; + {external names} +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [78] change default extension to ".2602gf" +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +l:=3; init_str3(".")("g")("f")(gf_ext);@/ +@y +l:=7; init_str7(".")("2")("6")("0")("2")("g")("f")(gf_ext);@/ +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [87] change ">" and ":" to "/" in file name scanning +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@ The file names we shall deal with for illustrative purposes have the +following structure: If the name contains `\.>' or `\.:', the file area +consists of all characters up to and including the final such character; +otherwise the file area is null. If the remaining file name contains +`\..', the file extension consists of all such characters from the first +remaining `\..' to the end, otherwise the file extension is null. +@^system dependencies@> + +We can scan such file names easily by using two global variables that keep track +of the occurrences of area and extension delimiters: + +@= +@!area_delimiter:pool_pointer; {the most recent `\.>' or `\.:', if any} +@!ext_delimiter:pool_pointer; {the relevant `\..', if any} +@y +@ The file names we shall deal with for Linux have the +following structure: If the name contains `\./', the file area +consists of all characters up to and including the final such character; +otherwise the file area is null. If the remaining file name contains +`\..', the file extension consists of all such characters from the first +remaining `\..' to the end, otherwise the file extension is null. +@^system dependencies@> + +We can scan such file names easily by using two global variables that keep track +of the occurrences of area and extension delimiters: + +@= +@!area_delimiter:pool_pointer; {the most recent `\./', if any} +@!ext_delimiter:pool_pointer; {the relevant `\..', if any} +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [88] change home_font_area to null_string (open_tfm provides path) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@ Font metric files whose areas are not given +explicitly are assumed to appear in a standard system area called +|home_font_area|. This system area name will, of course, vary from place +to place. The program here sets it to `\.{TeXfonts:}'. +@^system dependencies@> +@.TeXfonts@> + +@= +l:=9; init_str9("T")("e")("X")("f")("o")("n")("t")("s")(":")(home_font_area);@/ +@y +@ Font metric files whose areas are not given +explicitly are assumed to appear in a standard system area called +|home_font_area|. This system area name will, of course, vary from place +to place. In the Linux version, we set |home_font_area| +to |null_string| because the default areas to search for \.{TFM} files +are built into the routine |test_access|. +@^system dependencies@> + +@= +l:=0; init_str0(home_font_area);@/ +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [90] change more_name to understand UNIX file name paths +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@p function more_name(@!c:ASCII_code):boolean; +begin if c=" " then more_name:=false +else begin if (c=">")or(c=":") then + begin area_delimiter:=pool_ptr; ext_delimiter:=0; + end + else if (c=".")and(ext_delimiter=0) then ext_delimiter:=pool_ptr; + str_room(1); append_char(c); {contribute |c| to the current string} + more_name:=true; + end; +end; +@y +@p function more_name(@!c:ASCII_code):boolean; +begin if c=" " then more_name:=false +else begin if (c="/") then + begin area_delimiter:=pool_ptr; ext_delimiter:=0; + end + else if (c=".")and(ext_delimiter=0) then ext_delimiter:=pool_ptr; + str_room(1); append_char(c); {contribute |c| to the current string} + more_name:=true; + end; +end; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [92] change pack_file_name for UNIX conventions +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@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 + buf_ptr:=0; buffer[line_length]:="?"; + while buffer[buf_ptr]=" " do incr(buf_ptr); + if buf_ptr; + 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 obtains the name of the generic font file to +be input from the command line. +It opens the file, making sure that some input is +present; then it opens the output file. + +@p procedure start_gf; +label done; +var + arg_buffer: UNIX_filename; + arg_buf_ptr: 1..file_name_size; +begin if (argc > 2) then abort('Usage: gftodvi [GF-file]'); +if argc = 1 then begin + print_nl('GF file name: '); input_ln; +@.GF file name@> + end +else begin + argv(1, arg_buffer); + arg_buf_ptr := 1; + line_length := 0; + while (arg_buf_ptr < file_name_size) + and (line_length < terminal_line_length) + and (arg_buffer[arg_buf_ptr] <> chr(0)) do + begin + buffer[line_length] := xord[arg_buffer[arg_buf_ptr]]; + incr(line_length); + incr(arg_buf_ptr); + end; +end; + buf_ptr:=0; buffer[line_length]:="?"; + while buffer[buf_ptr]=" " do incr(buf_ptr); + if buf_ptr; + if cur_ext=null_string then cur_ext:=gf_ext; + pack_file_name(cur_name,cur_area,cur_ext); open_gf_file; + end; +job_name:=cur_name; pack_file_name(job_name,null_string,dvi_ext); +open_dvi_file; +end; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [was216,now219] call set_paths before gf_start to initialize paths +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@p begin initialize; {get all variables initialized} +@; +start_gf; {open the input and output files} +@y +@p begin initialize; {get all variables initialized} +@; +set_paths; {initialize paths for \.{TFM} files from environment if needed} +start_gf; {open the input and output files} +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [was216,now219] finish normal end with newline on terminal +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x + cur_gf:=get_byte; str_ptr:=init_str_ptr; pool_ptr:=str_start[str_ptr]; + end; +final_end:end. +@y + cur_gf:=get_byte; str_ptr:=init_str_ptr; pool_ptr:=str_start[str_ptr]; + end; +final_end:print_ln(' '); +end. +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [was219,now222] declare special global +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@* System-dependent changes. +This section should be replaced, if necessary, by changes to the program +that are necessary to make \.{GFtoDVI} work at a particular installation. +It is usually best to design your change file so that all changes to +previous sections preserve the section numbering; then everybody's version +will be consistent with the printed program. More extensive changes, +which introduce new sections, can be inserted here; then only the index +itself will get a new section number. +@^system dependencies@> +@y +@* System-dependent changes. +This section should be replaced, if necessary, by changes to the program +that are necessary to make \.{GFtoDVI} work at a particular installation. +It is usually best to design your change file so that all changes to +previous sections preserve the section numbering; then everybody's version +will be consistent with the printed program. More extensive changes, +which introduce new sections, can be inserted here; then only the index +itself will get a new section number. +@^system dependencies@> + +@= +@!first_input:boolean; {true before the first call to |input_ln|} + +@ @= +@!word_file=file of memory_word; {needed in \.{ext.h}} +@z diff --git a/systems/knuth/local/mfware/gftodvi.o b/systems/knuth/local/mfware/gftodvi.o new file mode 100644 index 0000000000..5d1defdd72 Binary files /dev/null and b/systems/knuth/local/mfware/gftodvi.o differ diff --git a/systems/knuth/local/mfware/gftodvi.p b/systems/knuth/local/mfware/gftodvi.p new file mode 100644 index 0000000000..59b5810afb --- /dev/null +++ b/systems/knuth/local/mfware/gftodvi.p @@ -0,0 +1,854 @@ +{3:}program GFtoDVI(input,output);label{4:}9999;{:4}const{5:} +maxlabels=2000;poolsize=10000;maxstrings=1100;terminallinelength=150; +filenamesize=1024;fontmemsize=2000;dvibufsize=800;widestrow=8192; +liglookahead=20;{:5}type UNIXfilename=packed array[1..1024]of char;{9:} +scaled=integer;{:9}{10:}ASCIIcode=0..255;{:10}{11:} +textfile=packed file of char;{:11}{45:}eightbits=ByteCard; +bytefile=packed file of eightbits;{:45}{52:}fontindex=0..fontmemsize; +quarterword=0..255;fourquarters=packed record b0:quarterword; +b1:quarterword;b2:quarterword;b3:quarterword;end; +memoryword=record case boolean of true:(sc:scaled); +false:(qqqq:fourquarters);end;internalfontnumber=1..5;{:52}{70:} +poolpointer=0..poolsize;strnumber=0..maxstrings;{:70}{79:} +keywordcode=0..19;{:79}{104:}dviindex=0..dvibufsize;{:104}{139:} +nodepointer=0..maxlabels;{:139}{223:}wordfile=file of memoryword;{:223} +var{12:}xord:array[char]of ASCIIcode;xchr:array[ASCIIcode]of char;{:12} +{16:}buffer:array[0..terminallinelength]of ByteCard;{:16}{18:} +bufptr:0..terminallinelength;linelength:0..terminallinelength;{:18}{37:} +lf,lh,bc,ec,nw,nh,nd,ni,nl,nk,ne,np:0..32767;{:37}{46:}gffile:bytefile; +dvifile:bytefile;tfmfile:bytefile;{:46}{48:}curloc:integer; +nameoffile,realnameoffile:external UNIXfilename;{:48}{49:} +b0,b1,b2,b3:eightbits;{:49}{53:}fontinfo:array[fontindex]of memoryword; +fmemptr:fontindex;fontcheck:array[internalfontnumber]of fourquarters; +fontsize:array[internalfontnumber]of scaled; +fontdsize:array[internalfontnumber]of scaled; +fontbc:array[internalfontnumber]of eightbits; +fontec:array[internalfontnumber]of eightbits; +charbase:array[internalfontnumber]of integer; +widthbase:array[internalfontnumber]of integer; +heightbase:array[internalfontnumber]of integer; +depthbase:array[internalfontnumber]of integer; +italicbase:array[internalfontnumber]of integer; +ligkernbase:array[internalfontnumber]of integer; +kernbase:array[internalfontnumber]of integer; +extenbase:array[internalfontnumber]of integer; +parambase:array[internalfontnumber]of integer; +bcharlabel:array[internalfontnumber]of fontindex; +fontbchar:array[internalfontnumber]of 0..256;{:53}{71:} +strpool:packed array[poolpointer]of ASCIIcode; +strstart:array[strnumber]of poolpointer;poolptr:poolpointer; +strptr:strnumber;initstrptr:strnumber;{:71}{76:}l:integer;{:76}{80:} +curgf:eightbits;curstring:strnumber;labeltype:eightbits;{:80}{86:} +curname:strnumber;curarea:strnumber;curext:strnumber;{:86}{87:} +areadelimiter:poolpointer;extdelimiter:poolpointer;{:87}{93:} +jobname:strnumber;{:93}{96:}interaction:boolean;fontsnotloaded:boolean; +fontname:array[internalfontnumber]of strnumber; +fontarea:array[internalfontnumber]of strnumber; +fontat:array[internalfontnumber]of scaled;{:96}{102:}totalpages:integer; +maxv:scaled;maxh:scaled;lastbop:integer;{:102}{105:} +dvibuf:array[dviindex]of eightbits;halfbuf:dviindex;dvilimit:dviindex; +dviptr:dviindex;dvioffset:integer;{:105}{117:}boxwidth:scaled; +boxheight:scaled;boxdepth:scaled; +ligstack:array[1..liglookahead]of quarterword;dummyinfo:fourquarters; +suppresslig:boolean;{:117}{127:}c:array[1..120]of 1..4095; +d:array[1..120]of 2..4096;twotothe:array[0..13]of 1..8192;{:127}{134:} +ruleslant:real;slantn:integer;slantunit:real;slantreported:real;{:134} +{140:}xl,xr,yt,yb:array[1..maxlabels]of scaled; +xx,yy:array[0..maxlabels]of scaled; +prev,next:array[0..maxlabels]of nodepointer; +info:array[1..maxlabels]of strnumber;maxnode:nodepointer; +maxheight:scaled;maxdepth:scaled;{:140}{149:}firstdot:nodepointer; +twin:boolean;{:149}{155:}rulethickness:scaled;offsetx,offsety:scaled; +xoffset,yoffset:scaled;preminx,premaxx,preminy,premaxy:scaled;{:155} +{158:}ruleptr:nodepointer;{:158}{160:}labeltail:nodepointer; +titlehead,titletail:nodepointer;{:160}{166:}charcode,ext:integer; +minx,maxx,miny,maxy:integer;x,y:integer;z:integer;{:166}{168:} +xratio,yratio,slantratio:real;unscxratio,unscyratio,unscslantratio:real; +fudgefactor:real;deltax,deltay:scaled;dvix,dviy:scaled;overcol:scaled; +pageheight,pagewidth:scaled;{:168}{174:}grayrulethickness:scaled; +tempx,tempy:scaled;{:174}{182:}overflowline:integer;{:182}{183:} +delta:scaled;halfxheight:scaled;thricexheight:scaled; +dotwidth,dotheight:scaled;{:183}{207:}b:array[0..4095]of 0..120; +rho:array[0..4095]of 1..4096;{:207}{211:} +a:array[0..widestrow]of 0..4095;{:211}{212:}blankrows:integer;{:212} +{220:}k,m,p,q,r,s,t,dx,dy:integer;timestamp:strnumber;uselogo:boolean; +{:220}{222:}firstinput:boolean;{:222} +#include "../tex/ext.h" +procedure initialize;var i,j,m,n:integer; +begin writeln('This is GFtoDVI, Version 3.0 for Linux');{13:} +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]:='~';{:13}{14:}for i:=0 to 31 do xchr[i]:='?'; +for i:=127 to 255 do xchr[i]:='?';{:14}{15:} +for i:=0 to 255 do xord[chr(i)]:=32;for i:=1 to 255 do xord[xchr[i]]:=i; +xord['?']:=63;{:15}{54:}fmemptr:=0;{:54}{97:}interaction:=false; +fontsnotloaded:=true;fontname[1]:=29;fontname[2]:=30;fontname[3]:=31; +fontname[4]:=0;fontname[5]:=32;for k:=1 to 5 do begin fontarea[k]:=0; +fontat[k]:=0;end;{:97}{103:}totalpages:=0;maxv:=0;maxh:=0;lastbop:=-1; +{:103}{106:}halfbuf:=dvibufsize div 2;dvilimit:=dvibufsize;dviptr:=0; +dvioffset:=0;{:106}{118:}dummyinfo.b0:=0;dummyinfo.b1:=0; +dummyinfo.b2:=0;dummyinfo.b3:=0;{:118}{126:}c[1]:=1;d[1]:=2; +twotothe[0]:=1;m:=1;for k:=1 to 13 do twotothe[k]:=2*twotothe[k-1]; +for k:=2 to 6 do{128:}begin n:=twotothe[k-1]; +for j:=0 to n-1 do begin m:=m+1;c[m]:=m;d[m]:=n+n;end;end{:128}; +for k:=7 to 12 do{129:}begin n:=twotothe[k-1]; +for j:=k downto 1 do begin m:=m+1;d[m]:=n+n; +if j=k then c[m]:=n else c[m]:=c[m-1]+twotothe[j-1];end;end{:129};{:126} +{142:}yy[0]:=-1073741824;yy[maxlabels]:=1073741824;{:142} +firstinput:=true;end;{:3}{8:}procedure jumpout;begin goto 9999;end;{:8} +{17:}procedure inputln;begin flushstdout; +if firstinput then firstinput:=false else if eoln(input)then readln( +input);linelength:=0; +while(linelengthchr(0))do i:=i+1; +begin writeln(' ','Can''t open GF file ',realnameoffile:i);jumpout;end; +end;end;procedure opentfmfile;var i:1..filenamesize; +begin if testaccess(4,3)then begin reset(tfmfile,realnameoffile); +curloc:=0;end else begin i:=1;while(realnameoffile[i]<>chr(0))do i:=i+1; +begin writeln(' ','Can''t open TFM file ',realnameoffile:i);jumpout;end; +end;end;procedure opendvifile;var i:1..filenamesize; +begin if testaccess(2,0)then rewrite(dvifile,realnameoffile)else begin i +:=1;while(realnameoffile[i]<>chr(0))do i:=i+1; +begin writeln(' ','Can''t write on DVI file ',realnameoffile:i);jumpout; +end;end;end;{:47}{50:}procedure readtfmword;begin read(tfmfile,b0); +read(tfmfile,b1);read(tfmfile,b2);read(tfmfile,b3);end;{:50}{51:} +function getbyte:integer;var b:eightbits; +begin if eof(gffile)then getbyte:=0 else begin read(gffile,b); +curloc:=curloc+1;getbyte:=b;end;end;function gettwobytes:integer; +var a,b:eightbits;begin read(gffile,a);read(gffile,b);curloc:=curloc+2; +gettwobytes:=a*256+b;end;function getthreebytes:integer; +var a,b,c:eightbits;begin read(gffile,a);read(gffile,b);read(gffile,c); +curloc:=curloc+3;getthreebytes:=(a*256+b)*256+c;end; +function signedquad:integer;var a,b,c,d:eightbits;begin read(gffile,a); +read(gffile,b);read(gffile,c);read(gffile,d);curloc:=curloc+4; +if a<128 then signedquad:=((a*256+b)*256+c)*256+d else signedquad:=(((a +-256)*256+b)*256+c)*256+d;end;{:51}{58:} +procedure readfontinfo(f:integer;s:scaled);label 30,11;var k:fontindex; +lf,lh,bc,ec,nw,nh,nd,ni,nl,nk,ne,np:0..65535;bchlabel:integer; +bchar:0..256;qw:fourquarters;sw:scaled;z:scaled;alpha:integer; +beta:1..16;begin{59:}{60:}begin readtfmword;lf:=b0*256+b1;lh:=b2*256+b3; +readtfmword;bc:=b0*256+b1;ec:=b2*256+b3; +if(bc>ec+1)or(ec>255)then goto 11;if bc>255 then begin bc:=1;ec:=0;end; +readtfmword;nw:=b0*256+b1;nh:=b2*256+b3;readtfmword;nd:=b0*256+b1; +ni:=b2*256+b3;readtfmword;nl:=b0*256+b1;nk:=b2*256+b3;readtfmword; +ne:=b0*256+b1;np:=b2*256+b3; +if lf<>6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+nk+ne+np then goto 11;end{:60}; +{61:}lf:=lf-6-lh;if np<8 then lf:=lf+8-np; +if fmemptr+lf>fontmemsize then begin writeln(' ','No room for TFM file!' +);jumpout;end;charbase[f]:=fmemptr-bc;widthbase[f]:=charbase[f]+ec+1; +heightbase[f]:=widthbase[f]+nw;depthbase[f]:=heightbase[f]+nh; +italicbase[f]:=depthbase[f]+nd;ligkernbase[f]:=italicbase[f]+ni; +kernbase[f]:=ligkernbase[f]+nl;extenbase[f]:=kernbase[f]+nk; +parambase[f]:=extenbase[f]+ne{:61};{62:}begin if lh<2 then goto 11; +begin readtfmword;qw.b0:=b0+0;qw.b1:=b1+0;qw.b2:=b2+0;qw.b3:=b3+0; +fontcheck[f]:=qw;end;readtfmword;if b0>127 then goto 11; +z:=((b0*256+b1)*256+b2)*16+(b3 div 16);if z<65536 then goto 11; +while lh>2 do begin readtfmword;lh:=lh-1;end;fontdsize[f]:=z; +if s>0 then z:=s;fontsize[f]:=z;end{:62};{63:} +for k:=fmemptr to widthbase[f]-1 do begin begin readtfmword;qw.b0:=b0+0; +qw.b1:=b1+0;qw.b2:=b2+0;qw.b3:=b3+0;fontinfo[k].qqqq:=qw;end; +if(b0>=nw)or(b1 div 16>=nh)or(b1 mod 16>=nd)or(b2 div 4>=ni)then goto 11 +;case b2 mod 4 of 1:if b3>=nl then goto 11;3:if b3>=ne then goto 11; +0,2:;end;end{:63};{64:}begin{65:}begin alpha:=16*z;beta:=16; +while z>=8388608 do begin z:=z div 2;beta:=beta div 2;end;end{:65}; +for k:=widthbase[f]to ligkernbase[f]-1 do begin readtfmword; +sw:=(((((b3*z)div 256)+(b2*z))div 256)+(b1*z))div beta; +if b0=0 then fontinfo[k].sc:=sw else if b0=255 then fontinfo[k].sc:=sw- +alpha else goto 11;end;if fontinfo[widthbase[f]].sc<>0 then goto 11; +if fontinfo[heightbase[f]].sc<>0 then goto 11; +if fontinfo[depthbase[f]].sc<>0 then goto 11; +if fontinfo[italicbase[f]].sc<>0 then goto 11;end{:64};{66:} +begin bchlabel:=32767;bchar:=256; +if nl>0 then begin for k:=ligkernbase[f]to kernbase[f]-1 do begin begin +readtfmword;qw.b0:=b0+0;qw.b1:=b1+0;qw.b2:=b2+0;qw.b3:=b3+0; +fontinfo[k].qqqq:=qw;end; +if b0>128 then begin if 256*b2+b3>=nl then goto 11; +if b0=255 then if k=ligkernbase[f]then bchar:=b1; +end else begin if b1<>bchar then begin if(b1ec)then goto 11 +end; +if b2<128 then begin if(b3ec)then goto 11 end else if 256*(b2 +-128)+b3>=nk then goto 11;end;end;if b0=255 then bchlabel:=256*b2+b3; +end;for k:=kernbase[f]to extenbase[f]-1 do begin readtfmword; +sw:=(((((b3*z)div 256)+(b2*z))div 256)+(b1*z))div beta; +if b0=0 then fontinfo[k].sc:=sw else if b0=255 then fontinfo[k].sc:=sw- +alpha else goto 11;end;end{:66};{67:} +for k:=extenbase[f]to parambase[f]-1 do begin begin readtfmword; +qw.b0:=b0+0;qw.b1:=b1+0;qw.b2:=b2+0;qw.b3:=b3+0;fontinfo[k].qqqq:=qw; +end;if b0<>0 then begin if(b0ec)then goto 11 end; +if b1<>0 then begin if(b1ec)then goto 11 end; +if b2<>0 then begin if(b2ec)then goto 11 end; +begin if(b3ec)then goto 11 end;end{:67};{68:} +begin for k:=1 to np do if k=1 then begin readtfmword; +if b0>127 then sw:=b0-256 else sw:=b0;sw:=sw*256+b1;sw:=sw*256+b2; +fontinfo[parambase[f]].sc:=(sw*16)+(b3 div 16); +end else begin readtfmword; +sw:=(((((b3*z)div 256)+(b2*z))div 256)+(b1*z))div beta; +if b0=0 then fontinfo[parambase[f]+k-1].sc:=sw else if b0=255 then +fontinfo[parambase[f]+k-1].sc:=sw-alpha else goto 11;end; +for k:=np+1 to 8 do fontinfo[parambase[f]+k-1].sc:=0;end{:68};{69:} +fontbc[f]:=bc;fontec[f]:=ec; +if bchlabelc then begin writeln(' ','?');jumpout;end; +while l>0 do begin begin strpool[poolptr]:=buffer[l];poolptr:=poolptr+1; +end;l:=l-1;end;strptr:=strptr+1;strstart[strptr]:=poolptr;end;{:75}{81:} +function interpretxxx:keywordcode;label 30,31,45;var k:integer; +j:integer;l:0..13;m:keywordcode;n1:0..13;n2:poolpointer;c:keywordcode; +begin c:=19;curstring:=0;case curgf of 244:goto 30; +243:begin k:=signedquad;goto 30;end;239:k:=getbyte;240:k:=gettwobytes; +241:k:=getthreebytes;242:k:=signedquad;end;{82:}j:=0; +if k<2 then goto 45;while true do begin l:=j;if j=k then goto 31; +if j=13 then goto 45;j:=j+1;buffer[j]:=getbyte; +if buffer[j]=32 then goto 31;end;31:{83:} +for m:=0 to 18 do if(strstart[m+1]-strstart[m])=l then begin n1:=0; +n2:=strstart[m]; +while(n1poolsize then begin writeln(' ','Too many strings!' +);jumpout;end;end;while j243 then getyyy:=0 else begin v:=signedquad; +curgf:=getbyte;getyyy:=v;end;end;{:84}{85:}procedure skipnop;label 30; +var k:integer;j:integer;begin case curgf of 244:goto 30; +243:begin k:=signedquad;goto 30;end;239:k:=getbyte;240:k:=gettwobytes; +241:k:=getthreebytes;242:k:=signedquad;end; +for j:=1 to k do curgf:=getbyte;30:curgf:=getbyte;end;{:85}{89:} +procedure beginname;begin areadelimiter:=0;extdelimiter:=0;end;{:89} +{90:}function morename(c:ASCIIcode):boolean; +begin if c=32 then morename:=false else begin if(c=47)then begin +areadelimiter:=poolptr;extdelimiter:=0; +end else if(c=46)and(extdelimiter=0)then extdelimiter:=poolptr; +begin if poolptr+1>poolsize then begin writeln(' ','Too many strings!'); +jumpout;end;end;begin strpool[poolptr]:=c;poolptr:=poolptr+1;end; +morename:=true;end;end;{:90}{91:}procedure endname; +begin if strptr+3>maxstrings then begin writeln(' ','Too many strings!') +;jumpout;end; +if areadelimiter=0 then curarea:=0 else begin curarea:=strptr; +strptr:=strptr+1;strstart[strptr]:=areadelimiter+1;end; +if extdelimiter=0 then begin curext:=0;curname:=makestring; +end else begin curname:=strptr;strptr:=strptr+1; +strstart[strptr]:=extdelimiter;curext:=makestring;end;end;{:91}{92:} +procedure packfilename(n,a,e:strnumber);var k:integer;c:ASCIIcode; +j:integer;namelength:0..filenamesize;begin k:=0; +for j:=strstart[a]to strstart[a+1]-1 do begin c:=strpool[j];k:=k+1; +if k<=filenamesize then nameoffile[k]:=xchr[c];end; +for j:=strstart[n]to strstart[n+1]-1 do begin c:=strpool[j];k:=k+1; +if k<=filenamesize then nameoffile[k]:=xchr[c];end; +for j:=strstart[e]to strstart[e+1]-1 do begin c:=strpool[j];k:=k+1; +if k<=filenamesize then nameoffile[k]:=xchr[c];end; +if k2)then begin writeln(' ','Usage: gftodvi [GF-file]'); +jumpout;end;if argc=1 then begin begin writeln;write('GF file name: '); +end;inputln;end else begin argv(1,argbuffer);argbufptr:=1;linelength:=0; +while(argbufptrchr(0))do begin buffer[linelength]:=xord[argbuffer +[argbufptr]];linelength:=linelength+1;argbufptr:=argbufptr+1;end;end; +bufptr:=0;buffer[linelength]:=63; +while buffer[bufptr]=32 do bufptr:=bufptr+1; +if bufptr=0 then begin dvibuf[dviptr]:=x div 16777216; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap; +end else begin x:=x+1073741824;x:=x+1073741824; +begin dvibuf[dviptr]:=(x div 16777216)+128;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;end;x:=x mod 16777216; +begin dvibuf[dviptr]:=x div 65536;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;x:=x mod 65536; +begin dvibuf[dviptr]:=x div 256;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;begin dvibuf[dviptr]:=x mod 256; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;end;{:110}{111:} +procedure dvifontdef(f:internalfontnumber);var k:integer; +begin begin dvibuf[dviptr]:=243;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;begin dvibuf[dviptr]:=f; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end; +begin dvibuf[dviptr]:=fontcheck[f].b0-0;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +begin dvibuf[dviptr]:=fontcheck[f].b1-0;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +begin dvibuf[dviptr]:=fontcheck[f].b2-0;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +begin dvibuf[dviptr]:=fontcheck[f].b3-0;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;dvifour(fontsize[f]); +dvifour(fontdsize[f]); +begin dvibuf[dviptr]:=(strstart[fontarea[f]+1]-strstart[fontarea[f]]); +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end; +begin dvibuf[dviptr]:=(strstart[fontname[f]+1]-strstart[fontname[f]]); +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;{112:} +for k:=strstart[fontarea[f]]to strstart[fontarea[f]+1]-1 do begin dvibuf +[dviptr]:=strpool[k];dviptr:=dviptr+1;if dviptr=dvilimit then dviswap; +end; +for k:=strstart[fontname[f]]to strstart[fontname[f]+1]-1 do begin dvibuf +[dviptr]:=strpool[k];dviptr:=dviptr+1;if dviptr=dvilimit then dviswap; +end{:112};end;{98:}procedure loadfonts;label 30,22,40,45; +var f:internalfontnumber;i:fourquarters;j,k,v:integer;m:1..8;n1:0..13; +n2:poolpointer;begin if interaction then{99:} +while true do begin 45:begin writeln; +write('Special font substitution: ');end;22:inputln; +if linelength=0 then goto 30;{100:}bufptr:=0;buffer[linelength]:=32; +while buffer[bufptr]<>32 do bufptr:=bufptr+1; +for m:=1 to 8 do if(strstart[m+1]-strstart[m])=bufptr then begin n1:=0; +n2:=strstart[m]; +while(n1poolsize then begin writeln(' ', +'Too many strings!');jumpout;end;end; +while bufptr4 then fontarea[m-4]:=makestring else begin fontname[m]:=makestring +;fontarea[m]:=0;fontat[m]:=0;end;initstrptr:=strptr{:101}; +write('OK; any more? ');goto 22;end;30:{:99};fontsnotloaded:=false; +for f:=1 to 5 do if(f<>4)or((strstart[fontname[f]+1]-strstart[fontname[f +]])>0)then begin if(strstart[fontarea[f]+1]-strstart[fontarea[f]])=0 +then fontarea[f]:=34;packfilename(fontname[f],fontarea[f],21); +opentfmfile;readfontinfo(f,fontat[f]); +if fontarea[f]=34 then fontarea[f]:=0;dvifontdef(f);end;{137:} +if(strstart[fontname[4]+1]-strstart[fontname[4]])=0 then ruleslant:=0.0 +else begin ruleslant:=fontinfo[1+parambase[4]].sc/65536; +slantn:=fontec[4];i:=fontinfo[charbase[4]+slantn].qqqq; +slantunit:=fontinfo[heightbase[4]+(i.b1-0)div 16].sc/slantn;end; +slantreported:=0.0;{:137}{169:}i:=fontinfo[charbase[3]+1].qqqq; +if not(i.b0>0)then begin writeln(' ','Missing pixel char!');jumpout;end; +unscxratio:=fontinfo[widthbase[3]+i.b0].sc;xratio:=unscxratio/65536; +unscyratio:=fontinfo[heightbase[3]+(i.b1-0)div 16].sc; +yratio:=unscyratio/65536; +unscslantratio:=fontinfo[1+parambase[3]].sc*yratio; +slantratio:=unscslantratio/65536; +if xratio*yratio=0 then begin writeln(' ','Vanishing pixel size!'); +jumpout;end;fudgefactor:=(slantratio/xratio)/yratio;{:169}{175:} +grayrulethickness:=fontinfo[8+parambase[3]].sc; +if grayrulethickness=0 then grayrulethickness:=26214;{:175}{184:} +i:=fontinfo[charbase[3]+0].qqqq; +if not(i.b0>0)then begin writeln(' ','Missing dot char!');jumpout;end; +dotwidth:=fontinfo[widthbase[3]+i.b0].sc; +dotheight:=fontinfo[heightbase[3]+(i.b1-0)div 16].sc; +delta:=fontinfo[2+parambase[2]].sc div 2; +thricexheight:=3*fontinfo[5+parambase[2]].sc; +halfxheight:=thricexheight div 6;{:184}{205:} +for k:=0 to 4095 do b[k]:=0; +for k:=fontbc[3]to fontec[3]do if k>=1 then if k<=120 then if(fontinfo[ +charbase[3]+k].qqqq.b0>0)then begin v:=c[k];repeat b[v]:=k;v:=v+d[k]; +until v>4095;end;{:205}{206:}for j:=0 to 11 do begin k:=twotothe[j]; +v:=k;repeat rho[v]:=k;v:=v+k+k;until v>4095;end;rho[0]:=4096;{:206};end; +{:98}{:111}{113:}procedure typeset(c:eightbits); +begin if c>=128 then begin dvibuf[dviptr]:=128;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;begin dvibuf[dviptr]:=c; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;end;{:113}{114:} +procedure dviscaled(x:real);var n:integer;m:integer;k:integer; +begin n:=round(x/6553.6);if n<0 then begin begin dvibuf[dviptr]:=45; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;n:=-n;end; +m:=n div 10;k:=0;repeat k:=k+1;buffer[k]:=(m mod 10)+48;m:=m div 10; +until m=0;repeat begin dvibuf[dviptr]:=buffer[k];dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;k:=k-1;until k=0; +if n mod 10<>0 then begin begin dvibuf[dviptr]:=46;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;begin dvibuf[dviptr]:=(n mod 10)+48; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;end;end;{:114} +{116:}procedure hbox(s:strnumber;f:internalfontnumber;sendit:boolean); +label 22,30;var k,endk,maxk:poolpointer;i,j:fourquarters;curl:0..256; +curr:0..256;bchar:0..256;stackptr:0..liglookahead;l:fontindex; +kernamount:scaled;hd:eightbits;x:scaled;savec:ASCIIcode; +begin boxwidth:=0;boxheight:=0;boxdepth:=0;k:=strstart[s]; +maxk:=strstart[s+1];savec:=strpool[maxk];strpool[maxk]:=32; +while kfontec[f])then begin i:=dummyinfo; +if curl=256 then l:=bcharlabel[f]else l:=fontmemsize; +end else begin i:=fontinfo[charbase[f]+curl].qqqq; +if((i.b2-0)mod 4)<>1 then l:=fontmemsize else begin l:=ligkernbase[f]+i. +b3;j:=fontinfo[l].qqqq; +if j.b0-0>128 then l:=ligkernbase[f]+256*(j.b2-0)+j.b3;end;end; +if suppresslig then suppresslig:=false else while l=128 then begin +kernamount:=fontinfo[kernbase[f]+256*(j.b2-128)+j.b3].sc;goto 30; +end else{122:}begin case j.b2-0 of 1,5:curl:=j.b3-0; +2,6:begin curr:=j.b3;if stackptr=0 then begin stackptr:=1; +if k0 then begin stackptr:=stackptr-1; +if stackptr>0 then curr:=ligstack[stackptr]else if k3 then goto 30;goto 22;end{:122};if j.b0-0>=128 then goto 30; +l:=l+j.b0+1;end;30:{:120};{121:} +if(i.b0>0)then begin boxwidth:=boxwidth+fontinfo[widthbase[f]+i.b0].sc+ +kernamount;hd:=i.b1-0;x:=fontinfo[heightbase[f]+(hd)div 16].sc; +if x>boxheight then boxheight:=x;x:=fontinfo[depthbase[f]+hd mod 16].sc; +if x>boxdepth then boxdepth:=x;if sendit then begin typeset(curl); +if kernamount<>0 then begin begin dvibuf[dviptr]:=146;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;dvifour(kernamount);end;end; +kernamount:=0;end{:121};{123:}curl:=curr-0; +if stackptr>0 then begin begin stackptr:=stackptr-1; +if stackptr>0 then curr:=ligstack[stackptr]else if k0.001 then begin begin writeln; +write('Sorry, I can''t make diagonal rules of slant ',r:10:5,'!');end; +slantreported:=r;end;end;{:138}{141:}function getavail:nodepointer; +begin maxnode:=maxnode+1;if maxnode=maxlabels then begin writeln(' ', +'Too many labels and/or rules!');jumpout;end;getavail:=maxnode;end; +{:141}{143:}procedure nodeins(p,q:nodepointer);var r:nodepointer; +begin if yy[p]>=yy[q]then begin repeat r:=q;q:=next[q]; +until yy[p]<=yy[q];next[r]:=p;prev[p]:=r;next[p]:=q;prev[q]:=p; +end else begin repeat r:=q;q:=prev[q];until yy[p]>=yy[q];prev[r]:=p; +next[p]:=r;prev[p]:=q;next[q]:=p;end; +if yy[p]-yt[p]>maxheight then maxheight:=yy[p]-yt[p]; +if yb[p]-yy[p]>maxdepth then maxdepth:=yb[p]-yy[p];end;{:143}{145:} +function overlap(p,q:nodepointer):boolean;label 10;var ythresh:scaled; +xleft,xright,ytop,ybot:scaled;r:nodepointer;begin xleft:=xl[p]; +xright:=xr[p];ytop:=yt[p];ybot:=yb[p];{146:}ythresh:=ybot+maxheight; +r:=next[q]; +while yy[r]yt[r]then if xleftxl[r]then if ytopythresh do begin if ybot>yt[r]then if xleftxl[r]then if ytopyy[p]-dmin do begin d:=abs(xx[q]-xx[p]); +if d0 then begin begin dvibuf[dviptr]:=146;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;dvifour(x);end; +if y<>0 then begin begin dvibuf[dviptr]:=160;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;dvifour(y);end;end;{:171}{185:} +procedure topcoords(p:nodepointer);begin xx[p]:=dvix-(boxwidth div 2); +xl[p]:=xx[p]-delta;xr[p]:=xx[p]+boxwidth+delta;yb[p]:=dviy-dotheight; +yy[p]:=yb[p]-boxdepth;yt[p]:=yy[p]-boxheight-delta;end;{:185}{186:} +procedure botcoords(p:nodepointer);begin xx[p]:=dvix-(boxwidth div 2); +xl[p]:=xx[p]-delta;xr[p]:=xx[p]+boxwidth+delta;yt[p]:=dviy+dotheight; +yy[p]:=yt[p]+boxheight;yb[p]:=yy[p]+boxdepth+delta;end; +procedure rightcoords(p:nodepointer);begin xl[p]:=dvix+dotwidth; +xx[p]:=xl[p];xr[p]:=xx[p]+boxwidth+delta;yy[p]:=dviy+halfxheight; +yb[p]:=yy[p]+boxdepth+delta;yt[p]:=yy[p]-boxheight-delta;end; +procedure leftcoords(p:nodepointer);begin xr[p]:=dvix-dotwidth; +xx[p]:=xr[p]-boxwidth;xl[p]:=xx[p]-delta;yy[p]:=dviy+halfxheight; +yb[p]:=yy[p]+boxdepth+delta;yt[p]:=yy[p]-boxheight-delta;end;{:186} +{194:}function placelabel(p:nodepointer):boolean;label 10,40; +var oct:0..15;dfl:nodepointer;begin hbox(info[p],2,false);dvix:=xx[p]; +dviy:=yy[p];{195:}dfl:=xl[p];oct:=xr[p];{196:} +case oct of 0,4,9,13:leftcoords(p);1,2,8,11:botcoords(p); +3,7,10,14:rightcoords(p);6,5,15,12:topcoords(p);end; +if not overlap(p,dfl)then goto 40{:196};{197:} +case oct of 0,3,15,12:botcoords(p);1,5,10,14:leftcoords(p); +2,6,9,13:rightcoords(p);7,4,8,11:topcoords(p);end; +if not overlap(p,dfl)then goto 40{:197};{198:} +case oct of 0,3,14,13:topcoords(p);1,5,11,15:rightcoords(p); +2,6,8,12:leftcoords(p);7,4,9,10:botcoords(p);end; +if not overlap(p,dfl)then goto 40{:198};{199:} +case oct of 0,4,8,12:rightcoords(p);1,2,9,10:topcoords(p); +3,7,11,15:leftcoords(p);6,5,14,13:botcoords(p);end; +if not overlap(p,dfl)then goto 40{:199};xx[p]:=dvix;yy[p]:=dviy; +xl[p]:=dfl;placelabel:=false;goto 10{:195};40:nodeins(p,dfl); +dvigoto(xx[p],yy[p]);hbox(info[p],2,true);begin dvibuf[dviptr]:=142; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;placelabel:=true; +10:end;{:194}{218:}procedure dopixels;label 30,31,21,22,10; +var paintblack:boolean;startingcol,finishingcol:0..widestrow; +j:0..widestrow;l:integer;i:fourquarters;v:eightbits; +begin begin dvibuf[dviptr]:=174;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +deltax:=deltax+round(unscxratio*minx);for j:=0 to maxx-minx do a[j]:=0; +l:=1;z:=0;startingcol:=0;finishingcol:=0;y:=maxy+12;paintblack:=false; +blankrows:=0;curgf:=getbyte;while true do begin{213:}repeat{214:} +if blankrows>0 then blankrows:=blankrows-1 else if curgf<>69 then begin +x:=z;if startingcol>x then startingcol:=x;{215:} +while true do begin 22:case curgf of 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14, +15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38, +39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62, +63:k:=curgf;64:k:=getbyte;65:k:=gettwobytes;66:k:=getthreebytes; +69:goto 31;70:begin blankrows:=0;z:=0;paintblack:=false;curgf:=getbyte; +goto 31;end;71:begin blankrows:=getbyte;z:=0;paintblack:=false; +curgf:=getbyte;goto 31;end;72:begin blankrows:=gettwobytes;z:=0; +paintblack:=false;curgf:=getbyte;goto 31;end; +73:begin blankrows:=getthreebytes;z:=0;paintblack:=false;curgf:=getbyte; +goto 31;end; +74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,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,123,124,125,126,127,128,129,130,131,132,133, +134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151, +152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169, +170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187, +188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205, +206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, +224,225,226,227,228,229,230,231,232,233,234,235,236,237,238:begin z:= +curgf-74;paintblack:=true;curgf:=getbyte;goto 31;end; +239,240,241,242,243,244:begin skipnop;goto 22;end; +otherwise begin writeln(' ','Bad GF file: ','Improper opcode', +'! (at byte ',curloc-1:1,')');jumpout;end end;{216:} +if x+k>finishingcol then finishingcol:=x+k; +if paintblack then for j:=x to x+k-1 do a[j]:=a[j]+l; +paintblack:=not paintblack;x:=x+k;curgf:=getbyte{:216};end;31:{:215}; +end;{:214};l:=l+l;y:=y-1;until l=4096;{:213}; +dvigoto(0,deltay-round(unscyratio*y));{208:}j:=startingcol; +while true do begin while(j<=finishingcol)and(b[a[j]]=0)do j:=j+1; +if j>finishingcol then goto 30;begin dvibuf[dviptr]:=141; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;{209:} +begin dvibuf[dviptr]:=146;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +dvifour(round(unscxratio*j+unscslantratio*y)+deltax){:209}; +repeat v:=b[a[j]];a[j]:=a[j]-c[v];k:=j;j:=j+1; +while b[a[j]]=v do begin a[j]:=a[j]-c[v];j:=j+1;end;k:=j-k;{210:} +21:if k=1 then typeset(v)else begin i:=fontinfo[charbase[3]+v].qqqq; +if((i.b2-0)mod 4)=2 then begin if odd(k)then typeset(v);k:=k div 2; +v:=i.b3-0;goto 21;end else repeat typeset(v);k:=k-1;until k=0;end{:210}; +until b[a[j]]=0;begin dvibuf[dviptr]:=142;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;end;30:{:208}; +begin dvibuf[dviptr]:=142;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;{217:}l:=rho[a[startingcol]]; +for j:=startingcol+1 to finishingcol do if l>rho[a[j]]then l:=rho[a[j]]; +if l=4096 then if curgf=69 then goto 10 else begin y:=y-blankrows; +blankrows:=0;l:=1;startingcol:=z;finishingcol:=z; +end else begin while a[startingcol]=0 do startingcol:=startingcol+1; +while a[finishingcol]=0 do finishingcol:=finishingcol-1; +for j:=startingcol to finishingcol do a[j]:=a[j]div l;l:=4096 div l; +end{:217};end;10:end;{:218}{219:}begin initialize;{77:}strptr:=0; +poolptr:=0;strstart[0]:=0;l:=0;firststring(0);l:=9;buffer[9]:=116; +buffer[8]:=105;buffer[7]:=116;buffer[6]:=108;buffer[5]:=101; +buffer[4]:=102;buffer[3]:=111;buffer[2]:=110;buffer[1]:=116; +firststring(1);l:=9;buffer[9]:=108;buffer[8]:=97;buffer[7]:=98; +buffer[6]:=101;buffer[5]:=108;buffer[4]:=102;buffer[3]:=111; +buffer[2]:=110;buffer[1]:=116;firststring(2);l:=8;buffer[8]:=103; +buffer[7]:=114;buffer[6]:=97;buffer[5]:=121;buffer[4]:=102; +buffer[3]:=111;buffer[2]:=110;buffer[1]:=116;firststring(3);l:=9; +buffer[9]:=115;buffer[8]:=108;buffer[7]:=97;buffer[6]:=110; +buffer[5]:=116;buffer[4]:=102;buffer[3]:=111;buffer[2]:=110; +buffer[1]:=116;firststring(4);l:=13;buffer[13]:=116;buffer[12]:=105; +buffer[11]:=116;buffer[10]:=108;buffer[9]:=101;buffer[8]:=102; +buffer[7]:=111;buffer[6]:=110;buffer[5]:=116;buffer[4]:=97; +buffer[3]:=114;buffer[2]:=101;buffer[1]:=97;firststring(5);l:=13; +buffer[13]:=108;buffer[12]:=97;buffer[11]:=98;buffer[10]:=101; +buffer[9]:=108;buffer[8]:=102;buffer[7]:=111;buffer[6]:=110; +buffer[5]:=116;buffer[4]:=97;buffer[3]:=114;buffer[2]:=101; +buffer[1]:=97;firststring(6);l:=12;buffer[12]:=103;buffer[11]:=114; +buffer[10]:=97;buffer[9]:=121;buffer[8]:=102;buffer[7]:=111; +buffer[6]:=110;buffer[5]:=116;buffer[4]:=97;buffer[3]:=114; +buffer[2]:=101;buffer[1]:=97;firststring(7);l:=13;buffer[13]:=115; +buffer[12]:=108;buffer[11]:=97;buffer[10]:=110;buffer[9]:=116; +buffer[8]:=102;buffer[7]:=111;buffer[6]:=110;buffer[5]:=116; +buffer[4]:=97;buffer[3]:=114;buffer[2]:=101;buffer[1]:=97; +firststring(8);l:=11;buffer[11]:=116;buffer[10]:=105;buffer[9]:=116; +buffer[8]:=108;buffer[7]:=101;buffer[6]:=102;buffer[5]:=111; +buffer[4]:=110;buffer[3]:=116;buffer[2]:=97;buffer[1]:=116; +firststring(9);l:=11;buffer[11]:=108;buffer[10]:=97;buffer[9]:=98; +buffer[8]:=101;buffer[7]:=108;buffer[6]:=102;buffer[5]:=111; +buffer[4]:=110;buffer[3]:=116;buffer[2]:=97;buffer[1]:=116; +firststring(10);l:=10;buffer[10]:=103;buffer[9]:=114;buffer[8]:=97; +buffer[7]:=121;buffer[6]:=102;buffer[5]:=111;buffer[4]:=110; +buffer[3]:=116;buffer[2]:=97;buffer[1]:=116;firststring(11);l:=11; +buffer[11]:=115;buffer[10]:=108;buffer[9]:=97;buffer[8]:=110; +buffer[7]:=116;buffer[6]:=102;buffer[5]:=111;buffer[4]:=110; +buffer[3]:=116;buffer[2]:=97;buffer[1]:=116;firststring(12);l:=4; +buffer[4]:=114;buffer[3]:=117;buffer[2]:=108;buffer[1]:=101; +firststring(13);l:=5;buffer[5]:=116;buffer[4]:=105;buffer[3]:=116; +buffer[2]:=108;buffer[1]:=101;firststring(14);l:=13;buffer[13]:=114; +buffer[12]:=117;buffer[11]:=108;buffer[10]:=101;buffer[9]:=116; +buffer[8]:=104;buffer[7]:=105;buffer[6]:=99;buffer[5]:=107; +buffer[4]:=110;buffer[3]:=101;buffer[2]:=115;buffer[1]:=115; +firststring(15);l:=6;buffer[6]:=111;buffer[5]:=102;buffer[4]:=102; +buffer[3]:=115;buffer[2]:=101;buffer[1]:=116;firststring(16);l:=7; +buffer[7]:=120;buffer[6]:=111;buffer[5]:=102;buffer[4]:=102; +buffer[3]:=115;buffer[2]:=101;buffer[1]:=116;firststring(17);l:=7; +buffer[7]:=121;buffer[6]:=111;buffer[5]:=102;buffer[4]:=102; +buffer[3]:=115;buffer[2]:=101;buffer[1]:=116;firststring(18);{:77}{78:} +l:=7;buffer[7]:=46;buffer[6]:=50;buffer[5]:=54;buffer[4]:=48; +buffer[3]:=50;buffer[2]:=103;buffer[1]:=102;firststring(19);l:=4; +buffer[4]:=46;buffer[3]:=100;buffer[2]:=118;buffer[1]:=105; +firststring(20);l:=4;buffer[4]:=46;buffer[3]:=116;buffer[2]:=102; +buffer[1]:=109;firststring(21);l:=7;buffer[7]:=32;buffer[6]:=32; +buffer[5]:=80;buffer[4]:=97;buffer[3]:=103;buffer[2]:=101;buffer[1]:=32; +firststring(22);l:=12;buffer[12]:=32;buffer[11]:=32;buffer[10]:=67; +buffer[9]:=104;buffer[8]:=97;buffer[7]:=114;buffer[6]:=97;buffer[5]:=99; +buffer[4]:=116;buffer[3]:=101;buffer[2]:=114;buffer[1]:=32; +firststring(23);l:=6;buffer[6]:=32;buffer[5]:=32;buffer[4]:=69; +buffer[3]:=120;buffer[2]:=116;buffer[1]:=32;firststring(24);l:=4; +buffer[4]:=32;buffer[3]:=32;buffer[2]:=96;buffer[1]:=96;firststring(25); +l:=2;buffer[2]:=39;buffer[1]:=39;firststring(26);l:=3;buffer[3]:=32; +buffer[2]:=61;buffer[1]:=32;firststring(27);l:=4;buffer[4]:=32; +buffer[3]:=43;buffer[2]:=32;buffer[1]:=40;firststring(28);l:=4; +buffer[4]:=99;buffer[3]:=109;buffer[2]:=114;buffer[1]:=56; +firststring(29);l:=6;buffer[6]:=99;buffer[5]:=109;buffer[4]:=116; +buffer[3]:=116;buffer[2]:=49;buffer[1]:=48;firststring(30);l:=4; +buffer[4]:=103;buffer[3]:=114;buffer[2]:=97;buffer[1]:=121; +firststring(31);l:=5;buffer[5]:=108;buffer[4]:=111;buffer[3]:=103; +buffer[2]:=111;buffer[1]:=56;firststring(32);l:=8;buffer[8]:=77; +buffer[7]:=69;buffer[6]:=84;buffer[5]:=65;buffer[4]:=70;buffer[3]:=79; +buffer[2]:=78;buffer[1]:=84;firststring(33);{:78}{88:}l:=0; +firststring(34);{:88};setpaths;startgf;{221:} +if getbyte<>247 then begin writeln(' ','Bad GF file: ','No preamble', +'! (at byte ',curloc-1:1,')');jumpout;end; +if getbyte<>131 then begin writeln(' ','Bad GF file: ','Wrong ID', +'! (at byte ',curloc-1:1,')');jumpout;end;k:=getbyte; +for m:=1 to k do begin strpool[poolptr]:=getbyte;poolptr:=poolptr+1;end; +begin dvibuf[dviptr]:=247;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;begin dvibuf[dviptr]:=2; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;dvifour(25400000); +dvifour(473628672);dvifour(1000);begin dvibuf[dviptr]:=k; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;uselogo:=false; +s:=strstart[strptr]; +for m:=1 to k do begin dvibuf[dviptr]:=strpool[s+m-1];dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +if strpool[s]=32 then if strpool[s+1]=77 then if strpool[s+2]=69 then if +strpool[s+3]=84 then if strpool[s+4]=65 then if strpool[s+5]=70 then if +strpool[s+6]=79 then if strpool[s+7]=78 then if strpool[s+8]=84 then +begin strptr:=strptr+1;strstart[strptr]:=s+9;uselogo:=true;end; +timestamp:=makestring{:221};curgf:=getbyte;initstrptr:=strptr; +while true do begin{144:}maxnode:=0;next[0]:=maxlabels; +prev[maxlabels]:=0;maxheight:=0;maxdepth:=0;{:144}{156:} +rulethickness:=0;offsetx:=0;offsety:=0;xoffset:=0;yoffset:=0; +preminx:=268435456;premaxx:=-268435456;preminy:=268435456; +premaxy:=-268435456;{:156}{161:}ruleptr:=0;titlehead:=0;titletail:=0; +next[maxlabels]:=0;labeltail:=maxlabels;firstdot:=maxlabels;{:161}; +while(curgf>=239)and(curgf<=244)do{154:}begin k:=interpretxxx; +case k of 19:; +1,2,3,4:if fontsnotloaded then begin fontname[k]:=curstring; +fontarea[k]:=0;fontat[k]:=0;initstrptr:=strptr;end else begin writeln; +write('(Tardy font change will be ignored (byte ',curloc:1,')!)');end; +5,6,7,8:if fontsnotloaded then begin fontarea[k-4]:=curstring; +initstrptr:=strptr;end else begin writeln; +write('(Tardy font change will be ignored (byte ',curloc:1,')!)');end; +9,10,11,12:if fontsnotloaded then begin fontat[k-8]:=getyyy; +initstrptr:=strptr;end else begin writeln; +write('(Tardy font change will be ignored (byte ',curloc:1,')!)');end; +15:rulethickness:=getyyy;13:{159:}begin p:=getavail;next[p]:=ruleptr; +ruleptr:=p;xl[p]:=getyyy;yt[p]:=getyyy;xr[p]:=getyyy;yb[p]:=getyyy; +if xl[p]premaxx then premaxx:=xl[p]; +if yt[p]premaxy then premaxy:=yt[p]; +if xr[p]premaxx then premaxx:=xr[p]; +if yb[p]premaxy then premaxy:=yb[p];xx[p]:=rulethickness;end{:159}; +16:{157:}begin offsetx:=getyyy;offsety:=getyyy;end{:157}; +17:xoffset:=getyyy;18:yoffset:=getyyy;14:{162:}begin p:=getavail; +info[p]:=curstring; +if titlehead=0 then titlehead:=p else next[titletail]:=p;titletail:=p; +end{:162};0:{163:}if(labeltype<47)or(labeltype>56)then begin writeln; +write('Bad label type precedes byte ',curloc:1,'!'); +end else begin p:=getavail;next[labeltail]:=p;labeltail:=p; +prev[p]:=labeltype;info[p]:=curstring;xx[p]:=getyyy;yy[p]:=getyyy; +if xx[p]premaxx then premaxx:=xx[p]; +if yy[p]premaxy then premaxy:=yy[p];end{:163};end;end{:154}; +if curgf=248 then{115:}begin begin dvibuf[dviptr]:=248;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;dvifour(lastbop); +lastbop:=dvioffset+dviptr-5;dvifour(25400000);dvifour(473628672); +dvifour(1000);dvifour(maxv);dvifour(maxh);begin dvibuf[dviptr]:=0; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end; +begin dvibuf[dviptr]:=3;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +begin dvibuf[dviptr]:=totalpages div 256;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +begin dvibuf[dviptr]:=totalpages mod 256;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end; +if not fontsnotloaded then for k:=1 to 5 do if(strstart[fontname[k]+1]- +strstart[fontname[k]])>0 then dvifontdef(k);begin dvibuf[dviptr]:=249; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;dvifour(lastbop); +begin dvibuf[dviptr]:=2;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;k:=4+((dvibufsize-dviptr)mod 4); +while k>0 do begin begin dvibuf[dviptr]:=223;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;k:=k-1;end;{109:} +if dvilimit=halfbuf then writedvi(halfbuf,dvibufsize-1); +if dviptr>0 then writedvi(0,dviptr-1){:109};goto 9999;end{:115}; +if curgf<>67 then if curgf<>68 then begin writeln(' ','Missing boc!'); +jumpout;end;{164:}begin if fontsnotloaded then loadfonts;{165:} +if curgf=67 then begin ext:=signedquad;charcode:=ext mod 256; +if charcode<0 then charcode:=charcode+256;ext:=(ext-charcode)div 256; +k:=signedquad;minx:=signedquad;maxx:=signedquad;miny:=signedquad; +maxy:=signedquad;end else begin ext:=0;charcode:=getbyte;minx:=getbyte; +maxx:=getbyte;minx:=maxx-minx;miny:=getbyte;maxy:=getbyte; +miny:=maxy-miny;end; +if maxx-minx>widestrow then begin writeln(' ','Character too wide!'); +jumpout;end{:165};{170:} +if preminxmaxy*65536 then offsety:=offsety+maxy*65536-premaxy; +if premaxx>maxx*65536 then premaxx:=premaxx div 65536 else premaxx:=maxx +; +if preminy=0 then overcol:=round(unscxratio*premaxx+unscslantratio* +maxy)else overcol:=round(unscxratio*premaxx+unscslantratio*miny); +overcol:=overcol+deltax+10000000; +pageheight:=round(unscyratio*(maxy+1-preminy))+3276800-offsety; +if pageheight>maxv then maxv:=pageheight; +pagewidth:=overcol-10000000{:170};{172:}begin dvibuf[dviptr]:=139; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end; +totalpages:=totalpages+1;dvifour(totalpages);dvifour(charcode); +dvifour(ext);for k:=3 to 9 do dvifour(0);dvifour(lastbop); +lastbop:=dvioffset+dviptr-45;dvigoto(0,655360); +if uselogo then begin begin dvibuf[dviptr]:=176;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;hbox(33,5,true);end; +begin dvibuf[dviptr]:=172;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;hbox(timestamp,1,true); +hbox(22,1,true);dviscaled(totalpages*65536.0); +if(charcode<>0)or(ext<>0)then begin hbox(23,1,true); +dviscaled(charcode*65536.0);if ext<>0 then begin hbox(24,1,true); +dviscaled(ext*65536.0);end;end; +if titlehead<>0 then begin next[titletail]:=0;repeat hbox(25,1,true); +hbox(info[titlehead],1,true);hbox(26,1,true);titlehead:=next[titlehead]; +until titlehead=0;end;begin dvibuf[dviptr]:=142;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end{:172};write('[',totalpages:1); +flushstdout;{173:}if ruleslant<>0 then begin dvibuf[dviptr]:=175; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end; +while ruleptr<>0 do begin p:=ruleptr;ruleptr:=next[p]; +if xx[p]=0 then xx[p]:=grayrulethickness; +if xx[p]>0 then begin convert(xl[p],yt[p]);tempx:=dvix;tempy:=dviy; +convert(xr[p],yb[p]);if abs(tempx-dvix)<6554 then{176:} +begin if tempy>dviy then begin k:=tempy;tempy:=dviy;dviy:=k;end; +dvigoto(dvix-(xx[p]div 2),dviy);begin dvibuf[dviptr]:=137; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end; +dvifour(dviy-tempy);dvifour(xx[p]);begin dvibuf[dviptr]:=142; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;end{:176} +else if abs(tempy-dviy)<6554 then{177:} +begin if tempxxx[p])then +slantcomplaint((dvix-tempx)/(tempy-dviy))else begin if tempy>dviy then +begin k:=tempy;tempy:=dviy;dviy:=k;k:=tempx;tempx:=dvix;dvix:=k;end; +m:=round((dviy-tempy)/slantunit);if m>0 then begin dvigoto(dvix,dviy); +q:=((m-1)div slantn)+1;k:=m div q;p:=m mod q;q:=q-p;{179:}typeset(k); +dy:=round(k*slantunit);begin dvibuf[dviptr]:=170;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;dvifour(-dy); +while q>1 do begin typeset(k);begin dvibuf[dviptr]:=166; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;q:=q-1;end{:179}; +{180:}if p>0 then begin k:=k+1;typeset(k);dy:=round(k*slantunit); +begin dvibuf[dviptr]:=170;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;dvifour(-dy); +while p>1 do begin typeset(k);begin dvibuf[dviptr]:=166; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;p:=p-1;end; +end{:180};begin dvibuf[dviptr]:=142;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;end;end{:178};end;end{:173};{181:} +overflowline:=1;if next[maxlabels]<>0 then begin next[labeltail]:=0; +begin dvibuf[dviptr]:=174;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;{187:}p:=next[maxlabels]; +firstdot:=maxnode+1;while p<>0 do begin convert(xx[p],yy[p]); +xx[p]:=dvix;yy[p]:=dviy;if prev[p]<53 then{188:}begin q:=getavail; +xl[p]:=q;info[q]:=p;xx[q]:=dvix;xl[q]:=dvix-dotwidth; +xr[q]:=dvix+dotwidth;yy[q]:=dviy;yt[q]:=dviy-dotheight; +yb[q]:=dviy+dotheight;nodeins(q,0);dvigoto(xx[q],yy[q]); +begin dvibuf[dviptr]:=0;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;begin dvibuf[dviptr]:=142; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;end{:188}; +p:=next[p];end{:187};{191:}p:=next[maxlabels]; +while p<>0 do begin if prev[p]<=48 then{192:}begin r:=xl[p]; +q:=nearestdot(r,10);if twin then xr[p]:=8 else xr[p]:=0; +if q<>0 then begin dx:=xx[q]-xx[r];dy:=yy[q]-yy[r]; +if dy>0 then xr[p]:=xr[p]+4;if dx<0 then xr[p]:=xr[p]+1; +if dy>dx then xr[p]:=xr[p]+1;if-dy>dx then xr[p]:=xr[p]+1;end;end{:192}; +p:=next[p];end;{:191};begin dvibuf[dviptr]:=173;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;{189:}q:=maxlabels; +while next[q]<>0 do begin p:=next[q]; +if prev[p]>48 then begin next[q]:=next[p];{190:} +begin hbox(info[p],2,false);dvix:=xx[p];dviy:=yy[p]; +if prev[p]<53 then r:=xl[p]else r:=0;case prev[p]of 49,53:topcoords(p); +50,54:leftcoords(p);51,55:rightcoords(p);52,56:botcoords(p);end; +nodeins(p,r);dvigoto(xx[p],yy[p]);hbox(info[p],2,true); +begin dvibuf[dviptr]:=142;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;end{:190};end else q:=next[q]; +end{:189};{193:}q:=maxlabels;while next[q]<>0 do begin p:=next[q]; +r:=next[p];s:=xl[p]; +if placelabel(p)then next[q]:=r else begin info[s]:=0; +if prev[p]=47 then next[q]:=r else q:=p;end;end{:193};{200:}{201:} +p:=next[0];while p<>maxlabels do begin q:=next[p]; +if(p0 do begin{202:}begin r:=next[xl[p]];s:=next[r];t:=next[p]; +next[p]:=s;prev[s]:=p;next[r]:=p;prev[p]:=r;q:=nearestdot(p,0); +next[r]:=s;prev[s]:=r;next[p]:=t;overflowline:=overflowline+1; +dvigoto(overcol,overflowline*thricexheight+655360);hbox(info[p],2,true); +if q<>0 then begin hbox(27,2,true);hbox(info[info[q]],2,true); +hbox(28,2,true); +dviscaled((xx[p]-xx[q])/xratio+(yy[p]-yy[q])*fudgefactor); +begin dvibuf[dviptr]:=44;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;dviscaled((yy[q]-yy[p])/yratio); +begin dvibuf[dviptr]:=41;dviptr:=dviptr+1; +if dviptr=dvilimit then dviswap;end;end;begin dvibuf[dviptr]:=142; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;end{:202}; +p:=next[p];end{:200};end{:181};dopixels;begin dvibuf[dviptr]:=140; +dviptr:=dviptr+1;if dviptr=dvilimit then dviswap;end;{203:} +if overflowline>1 then pagewidth:=overcol+10000000; +if pagewidth>maxh then maxh:=pagewidth{:203};write(']');flushstdout; +end{:164};curgf:=getbyte;strptr:=initstrptr;poolptr:=strstart[strptr]; +end;9999:writeln(' ');end.{:219} diff --git a/systems/knuth/local/mfware/gray.log b/systems/knuth/local/mfware/gray.log new file mode 100644 index 0000000000..fc88fc7835 --- /dev/null +++ b/systems/knuth/local/mfware/gray.log @@ -0,0 +1,26 @@ +This is METAFONT, Version 2.7182 (Web2C 7.3.1) (base=mf 1999.9.25) 30 APR 2000 22:42 +**\mode:=ljfour; mag:=1+0/600; nonstopmode; input gray +(/usr/share/texmf/fonts/source/public/misc/gray.mf +(/usr/share/texmf/fonts/source/public/misc/graycx.mf +! This file is for cx only. + + ; +l.4 ...>cx: errmessage "This file is for cx only"; + fi +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. + +(/usr/share/texmf/fonts/source/public/misc/grayf.mf [0] [1] [2] [3] [4] +[5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] +[21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] +[36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] +[51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [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] [91] [92] [93] [94] [95] +[96] [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] ) ) ) +Font metrics written on gray.tfm. +Output written on gray.600gf (123 characters, 13296 bytes). diff --git a/systems/knuth/local/mfware/io.2602gf b/systems/knuth/local/mfware/io.2602gf new file mode 100644 index 0000000000..1cc09b42dc Binary files /dev/null and b/systems/knuth/local/mfware/io.2602gf differ diff --git a/systems/knuth/local/mfware/io.dvi b/systems/knuth/local/mfware/io.dvi new file mode 100644 index 0000000000..41044640e0 Binary files /dev/null and b/systems/knuth/local/mfware/io.dvi differ diff --git a/systems/knuth/local/mfware/io.log b/systems/knuth/local/mfware/io.log new file mode 100644 index 0000000000..82e33f497e --- /dev/null +++ b/systems/knuth/local/mfware/io.log @@ -0,0 +1,6 @@ +This is METAFONT, Version 2.7182 (Web2C 7.3.1) (base=mf 1999.9.25) 30 APR 2000 22:36 +**io +(/usr/share/texmf/metafont/base/io.mf +The letter O [79]) +*end +Output written on io.2602gf (1 character, 1724 bytes). diff --git a/systems/knuth/local/mfware/io.ps b/systems/knuth/local/mfware/io.ps new file mode 100644 index 0000000000..8c9011ddc0 --- /dev/null +++ b/systems/knuth/local/mfware/io.ps @@ -0,0 +1,332 @@ +%!PS-Adobe-2.0 +%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software +%%Title: io.dvi +%%Pages: 1 +%%PageOrder: Ascend +%%BoundingBox: 0 0 612 792 +%%EndComments +%DVIPSWebPage: (www.radicaleye.com) +%DVIPSCommandLine: dvips io -o +%DVIPSParameters: dpi=600, compressed +%DVIPSSource: METAFONT output 2000.04.30:2236 +%%BeginProcSet: texc.pro +%! +/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S +N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 +mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 +0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ +landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize +mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ +matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round +exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ +statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] +N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin +/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array +/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 +array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N +df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A +definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get +}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} +B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr +1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 +1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx +0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx +sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B +/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ +/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ +A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy +get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} +ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp +fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 +{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add +chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ +1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} +forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn +/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put +}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ +bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A +mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ +SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ +userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X +1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 +index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N +/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ +/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) +(LaserWriter 16/600)]{A length product length le{A length product exch 0 +exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse +end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask +grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} +imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round +exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto +fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p +delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} +B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ +p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S +rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + +%%EndProcSet +TeXDict begin 40258431 52099146 1000 600 600 (io.dvi) +@start +%DVIPSBitmapFont: Fa logo8 8 7 +/Fa 7 85 df65 +D<007FB6FCB71280A2160000F8C9FCB0B612F081A25D00F8C9FCACB7FC1680A26C150021 +2879A72E>69 D<007FB6FCB71280A2160000F8C9FCB0B612F081A25D00F8C9FCB0127021 +2979A72E>I<007016E000F8ED01F0A26C15036C1507A26C150FA26D141FA26D143F6D14 +7F00FB157DD8F9F014F9A2D8F8F8EB01F1A2017CEB03E1017E1307013E14C16DEB0F81A2 +90390F801F01A2903807C03EECE07E0103137C903801F0F8A2903800F9F0A2EC7FE0A2EC +3FC0EC1F80A2EC0F00A291C7FCA30070ED00E02C2A79A83A>77 D<0070EC01C000F8EC03 +E07E7E7EA27F7F7FEAFBF0EAF9F8EAF8FC137E7F7FEB0F8014C0EB07E0EB03F0EB01F8EB +00FC147E143E141F1583EC0FC3EC07E3EC03F3EC01FBEC00FF157F153F151FA2150F1507 +1503A50070EC01C0232A79A831>I<90380FFFF8017F13FF48B612C048813A07FC001FF0 +D80FE0EB03F8D81F80EB00FC90C8127C003E81A24881A448ED0F80B1007CED1F00A36C15 +3E003F157ED81FC0495AD80FF8EB0FF86CB65A6C5DC61580011F01FCC7FC292A7CA831> +I<007FB712C0B812E0A26C16C0C7001FC8FCB3B2140E2B2980A72B>84 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fb gray 7.70874 26 +/Fb 26 123 df0 D<120CA212C0A21203A21230A20808808708>I<120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A20810808708>3 +D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A20818808708>7 D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A20820808708>15 +D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A20828808708>31 +D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A20830808708>63 D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A20838808708>70 +D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A20840808708>78 +D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A20848808708>87 D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A20850808708>97 +D<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230 +A2120CA212C0A21203A21230A2120CA212C0A21203A21230A20858808708>108 +D<120CA212C0A21203A21230A20808802F08>I<120CA212C0A21203A21230A2120CA212 +C0A21203A21230A20810803708>I<120CA212C0A21203A21230A2120CA212C0A21203A2 +1230A2120CA212C0A21203A21230A20818803F08>I<120CA212C0A21203A21230A2120C +A212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A20820 +804708>I<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A212 +03A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A20828804F08>I< +120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2 +120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2 +0830805708>I<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0 +A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0 +A21203A21230A2120CA212C0A21203A21230A20838805F08>I<120CA212C0A21203A212 +30A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A212 +30A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A212 +30A2120CA212C0A21203A21230A20840806708>I<120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA2 +12C0A21203A21230A2120CA212C0A21203A21230A20848806F08>I<120CA212C0A21203 +A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203 +A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203 +A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203 +A21230A20850807708>I<120CA212C0A21203A21230A2120CA212C0A21203A21230A212 +0CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A212 +0CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A212 +0CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A208 +58807F08>I<120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A2 +1203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A2 +1203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A2 +1203A21230A2120CA212C0A21203A21230A2120CA212C0A21203A21230A2120CA212C0A2 +1203A21230A20860808708>II<390C0C0C +0CA239C0C0C0C0A23903030303A23930303030A2390C0C0C0CA239C0C0C0C0A239030303 +03A23930303030A2390C0C0C0CA239C0C0C0C0A23903030303A23930303030A2390C0C0C +0CA239C0C0C0C0A23903030303A23930303030A2390C0C0C0CA239C0C0C0C0A239030303 +03A23930303030A2390C0C0C0CA239C0C0C0C0A23903030303A23930303030A2390C0C0C +0CA239C0C0C0C0A23903030303A23930303030A2390C0C0C0CA239C0C0C0C0A239030303 +03A23930303030A2390C0C0C0CA239C0C0C0C0A23903030303A23930303030A2390C0C0C +0CA239C0C0C0C0A23903030303A23930303030A2390C0C0C0CA239C0C0C0C0A239030303 +03A23930303030A2390C0C0C0CA239C0C0C0C0A23903030303A23930303030A220608087 +20>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fc cmtt10 10 16 +/Fc 16 115 df<143814FC13011303EB07F8EB0FF0EB1FC0EB3F80EB7F0013FE485A485A +5B12075B120F5B485AA2123F90C7FCA25A127EA312FE5AAC7E127EA3127F7EA27F121FA2 +6C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0EB0FF0EB07F8EB03FC130113001438 +164272B92C>40 D<127012FC7E7E6C7E6C7EEA0FE06C7E6C7E6C7E6C7E137F7F1480131F +14C0130FEB07E0A214F01303A214F81301A314FC1300AC130114F8A3130314F0A2130714 +E0A2EB0FC0131F1480133F14005B13FE485A485A485A485AEA3FC0485A48C7FC5A5A1270 +164279B92C>I<147814FCAF007FB612F0B712F8A46C15F0C700FCC7FCAF147825267DAB +2C>43 DI<121FEA3F80EA7FC0EAFFE0A5 +EA7FC0EA3F80EA1F000B0B708A2C>46 D<1307497EA2131FA2133F137F13FF5A1207127F +B5FC13DF139FEA7C1F1200B3AE007FB512E0B612F0A36C14E01C3477B32C>49 +DI< +EB0FFC90387FFF8048B512E0000714F84880391FF807FEEBC0004848137F6D7F1680151F +A26C5A6CC7FCC8FC153F16005D15FE14014A5AEC1FF890381FFFF0495BA215F86D7F9038 +0007FEEC00FF81ED3F80ED1FC0150FA216E01507A2123C127EB4FC150F16C0A248141F00 +7FEC3F806DEB7F006C6C5B391FF807FE6CB55A6C5C6C14E0C66C1380D90FFCC7FC23357C +B32C>II<000FB512FE4880A35D01 +80C8FCADEB83FE90389FFF8090B512E015F8819038FE03FE9038F000FF01C07F49EB3F80 +90C7121F6C15C0C8120FA2ED07E0A4123C127EB4FC150F16C0A248141F007EEC3F80007F +EC7F006C6C5B6D485A391FF80FFC6CB55A6C5C000114C06C6C90C7FCEB0FF823347CB22C +>II56 DI<007FB612F0B712F8A4003F15F0CAFCA8003FB612F0B712F8A46C15F025147D +A22C>61 D<387FFFE0B57EA37EEA0003B3B3A5007FB61280B712C0A36C158022337BB22C +>108 D114 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fd cmr8 8 27 +/Fd 27 118 df<003C13F0387E01F838FF03FCA2EB83FEA2EA7F81383D80F600011306A3 +0003130EEB000CA248131C00061318000E13384813704813E0387001C00060138017157E +AD23>34 D<123C127E12FFA4127E123C08087A8714>46 D48 +D<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23>III<140EA2141E143EA2147E14FEA2EB01BE1303143E13 +06130E130C131813381330136013E013C0EA0180120313001206120E120C5A123812305A +12E0B612FCA2C7EA3E00A9147F90381FFFFCA21E2D7EAC23>I54 D<1230123C003FB512F8A215F05A15E039700001C00060148014 +0348EB0700140E140CC7121C5C143014705C495AA2495AA249C7FCA25B130E131EA2133E +A3133C137CA413FCA913781D2E7CAC23>I57 +D<123C127E12FFA4127E123C1200AD123C127E12FFA4127E123C081D7A9C14>I67 D79 +DI<007FB7 +12F8A29039000FC003007C150000701638A200601618A200E0161CA248160CA5C71500B3 +A94A7E011FB512E0A22E2D7EAC33>84 D<0003130C48131C000E13384813704813E00030 +13C0EA700100601380A2EAE00300C01300A300DE137800FF13FCEB83FEA2EA7F81A2383F +00FC001E1378171577AD23>92 D<13FF000713C0380F01F0381C00F8003F137C80A2143F +001E7FC7FCA4EB07FF137F3801FE1FEA07F0EA1FC0EA3F80EA7F00127E00FE14065AA314 +3F7E007E137F007FEBEF8C391F83C7FC390FFF03F83901FC01E01F207D9E23>97 +D99 D101 +D<013F13F89038FFC3FE3903E1FF1E3807807C000F140C391F003E00A2003E7FA76C133E +A26C6C5A00071378380FE1F0380CFFC0D81C3FC7FC90C8FCA3121E121F380FFFF814FF6C +14C04814F0391E0007F848130048147C12F848143CA46C147C007C14F86CEB01F06CEB03 +E03907E01F803901FFFE0038003FF01F2D7E9D23>103 DI108 +D111 D<3807C0FE39FFC7FF809038CF03E0390FDC01 +F03907F800FC49137E49133E49133FED1F80A3ED0FC0A8151F1680A2ED3F00A26D137E6D +137C5D9038FC01F09038CE07E09038C7FF80D9C1FCC7FC01C0C8FCA9487EEAFFFEA2222B +7E9D27>I<380781F838FF87FEEB8E3FEA0F9CEA07B813B0EBF01EEBE000A45BB0487EB5 +FCA2181E7E9D1C>114 D<1360A413E0A312011203A21207121FB512F0A23803E000AF14 +18A714383801F03014703800F860EB3FE0EB0F80152A7FA81B>116 +DI E +%EndDVIPSBitmapFont +end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin + +%%EndSetup +%%Page: 1 1 +1 0 bop 0 83 a Fa(MET)n(AF)m(ONT)22 b Fd(output)j(2000.04.30:2236)49 +b(P)n(age)25 b(1)47 b(Character)24 b(79)48 b(\\The)24 +b(letter)h(O")p 2302 2495 4 2016 v -2 2495 V 0 2497 2304 +4 v 0 481 V 0 2497 V 160 1528 a Fb(\000)1142 2551 y(\000)2144 +1446 y(\000)1160 423 y(\000)278 1507 y(\000)1152 2497 +y(\000)2026 1467 y(\000)1152 470 y(\000)396 1486 y(\000)1162 +2442 y(\000)1908 1488 y(\000)1144 518 y(\000)49 1546 +y Fc(1l)1099 2626 y(2l)2168 1464 y(3l)1117 399 y(4l)302 +1525 y(1)2050 1485 y(3)420 1504 y(1r)1118 2418 y(2r)1796 +1506 y(3r)1100 592 y(4r)3571 297 y(2)43 b(=)g(2l)g(+)g(\(1.2,6.8\))3571 +405 y(4)g(=)g(4r)g(+)g(\(1,5.9\))760 431 y Fb +(mmnnoopppqqqrrrsssttttuuuuvvvvvwwwwwwwwyzzzzzwwwwwwwwvvvvvuuuuutttt)p +(sssrrrqqqppooonnmm)600 527 y +(mnnopqqrrsttuuvvwwxzzllaaWWNNFF??\037\037\037\017\017\017\007\007\007) +p(\003\003\003\003\003\001\001\001\001\001\001)144 b +(\001\001\001\001\001\001\001\003\003\003\003\007\007\007\017\017\017)p +(\037\037\037???FFNNWWaalyzzzwwvvuutssrrqpponnm)488 623 +y(mnopqrsstuvwyzzzlaWNFF?\037\017\007\007\003\001\001)680 +b(\001\003\003\007\017\017\037?FNNWalxzzzzwwvutssrqponm)400 +719 y(mnopqstuvwzzzzlaWN?\037\017\007\003\001)920 b +(\001\003\007\017\037?FWalzzzzzwvutsrponm)336 815 y +(moprsuvwxyzzzzaNF\037\017\003\001)1088 b +(\003\007\037?NWlyzzzzzwvusrpom)280 911 y(moqrtvyzzzzzWF\037\007\001) +1208 b(\001\003\017?Nazzzzzzwvtrpn)240 1007 y(mpruwxyzzzzzaF\017\003) +1304 b(\001\007\037Nlyzzzzzzvtqo)208 1103 y(nqtwzzzzzzlF\017\001)1376 +b(\003\037Nzzzzzzzurn)184 1199 y(nswyzzzzzzW\017)1440 +b(\017Wzzzzzzzvr)168 1295 y(ouzzzzzzz\007)1472 b(\007yzzzzzzzp)160 +1391 y(rxzzzzzzz)1496 b(\001yzzzzzzz)160 1487 y(yzzzzzzz)1504 +b(xzzzzzzzN)160 1583 y(?xzzzzzzzwn)1472 b(mvxyzzzzzzl\037)168 +1679 y(\003Nxzzzzzzzsn)1440 b(nsxyzzzzzzW\017)192 1775 +y(\017Nlxyzzzzzzvro)1392 b(nrvxzzzzzzaF\017\001)216 1871 +y(\003\037Faxyzzzzzzurpm)1320 b(oqtwxyzzzzzlN?\007\001)256 +1967 y(\003\017?Naxzzzzzzwusqom)1224 b(nprtvyzzzzzaNF\037\007\001)304 +2063 y(\001\007\037?NWlxyzzzzzwvtrqonm)1096 b +(mnpqsuvzzzzzlWN?\037\007\003)368 2159 y +(\001\007\017\037?NWalxzzzzzwvutrqponm)936 b +(mnopqstuvyzzzzlaWF?\037\017\007\001)448 2255 y +(\001\003\007\017\037?FNWWalxyzzzzwvuttsrqpponnm)696 +b(mmnoopqrsstuvwxyzzzlaWWNF?\037\017\007\003\001)552 +2351 y +(\001\001\003\007\017\017\037??FNNWaallxzzzzwwvuuttsssrrqqqpppoooonn)p +(nnmmmmmmm)144 b +(mmmmmmmnnnnoooopppqqqrrssttuuvvwwzzzllaaWNNFF?\037\017\017\007\003\003) +p(\001)704 2447 y +(\001\001\003\003\007\007\017\017\037\037\037??FFFNNNWWWaaaalllllzzz)p +(zzzzzzzzzllllaaaaWWWNNNFFF???\037\037\017\017\007\007\003\003\001\001) +992 2543 y +(\001\001\001\001\001\001\001\001\003\003\003\003\003\003\003\003\003)p +(\003\003\003\003\003\003\003\003\003\003\003\003\003\001\001\001\001)p +(\001\001\001\001)p eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/systems/knuth/local/mfware/missfont.log b/systems/knuth/local/mfware/missfont.log new file mode 100644 index 0000000000..3f1733c91e --- /dev/null +++ b/systems/knuth/local/mfware/missfont.log @@ -0,0 +1,2 @@ +mktexpk --mfmode ljfour --bdpi 600 --mag 1+0/600 --dpi 600 gray +mktexpk --mfmode ljfour --bdpi 600 --mag 1+0/600 --dpi 600 gray diff --git a/systems/knuth/local/tex-sparc/ini_to_trip b/systems/knuth/local/tex-sparc/ini_to_trip old mode 100644 new mode 100755 diff --git a/systems/knuth/local/tex-sparc/ini_to_vir b/systems/knuth/local/tex-sparc/ini_to_vir old mode 100644 new mode 100755 diff --git a/systems/knuth/local/tex/ini_to_trip b/systems/knuth/local/tex/ini_to_trip old mode 100644 new mode 100755 diff --git a/systems/knuth/local/tex/ini_to_vir b/systems/knuth/local/tex/ini_to_vir old mode 100644 new mode 100755 diff --git a/systems/knuth/local/texware/dvityext.o b/systems/knuth/local/texware/dvityext.o new file mode 100644 index 0000000000..2666d8eabe Binary files /dev/null and b/systems/knuth/local/texware/dvityext.o differ diff --git a/systems/knuth/local/texware/dvitype b/systems/knuth/local/texware/dvitype new file mode 100755 index 0000000000..d1715b64d1 Binary files /dev/null and b/systems/knuth/local/texware/dvitype differ diff --git a/systems/knuth/local/texware/dvitype.o b/systems/knuth/local/texware/dvitype.o new file mode 100644 index 0000000000..61a7c2a083 Binary files /dev/null and b/systems/knuth/local/texware/dvitype.o differ diff --git a/systems/knuth/local/texware/dvitype.out b/systems/knuth/local/texware/dvitype.out new file mode 100644 index 0000000000..f8f9897a56 --- /dev/null +++ b/systems/knuth/local/texware/dvitype.out @@ -0,0 +1,35 @@ +This is DVItype, Version 3.6 for Linux +Options selected: + Starting page = * + Maximum number of pages = 1000000 + Output level = 4 (the works) + Resolution = 600.00000000 pixels per inch + New magnification factor = 2.000 +numerator/denominator=25400000/473628672 +magnification=2000; 0.00025336 pixels per DVI unit +' TeX output 2000.04.30:1633' +Postamble starts at byte 133. +maxv=43725786, maxh=30785863, maxstackdepth=2, totalpages=1 +Font 0: cmr10 scaled 2000---loaded at size 655360 DVI units + (this font is magnified 200%) + +42: beginning of page 1 +87: push +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) +88: down3 -917504 v:=0-917504=-917504, vv:=-232 +92: pop +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) +93: down4 42152922 v:=0+42152922=42152922, vv:=10680 +98: down3 1572864 v:=42152922+1572864=43725786, vv:=11078 +102: push +level 0:(h=0,v=43725786,w=0,x=0,y=0,z=0,hh=0,vv=11078) +103: right4 15229091 h:=0+15229091=15229091, hh:=3858 +[ ] +108: fntdef1 0: cmr10 +129: fntnum0 current font is cmr10 +130: setchar49 h:=15229091+327681=15556772, hh:=3941 +[1] +131: pop +level 0:(h=0,v=43725786,w=0,x=0,y=0,z=0,hh=0,vv=11078) +132: eop + diff --git a/systems/knuth/local/texware/dvitype.out-k b/systems/knuth/local/texware/dvitype.out-k new file mode 100644 index 0000000000..1b61fb86bb --- /dev/null +++ b/systems/knuth/local/texware/dvitype.out-k @@ -0,0 +1,34 @@ +This is DVItype, Version 3.6 (Web2C 7.3.1) +Options selected: + Starting page = * + Maximum number of pages = 1000000 + Output level = 4 (the works) + Resolution = 600.00000000 pixels per inch + New magnification factor = 2.000 +numerator/denominator=25400000/473628672 +magnification=2000; 0.00025336 pixels per DVI unit +' TeX output 2000.04.30:1633' +Postamble starts at byte 133. +maxv=43725786, maxh=30785863, maxstackdepth=2, totalpages=1 +Font 0: cmr10 scaled 2000---loaded at size 655360 DVI units + (this font is magnified 200%) + +42: beginning of page 1 +87: push +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) +88: down3 -917504 v:=0-917504=-917504, vv:=-232 +92: pop +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) +93: down4 42152922 v:=0+42152922=42152922, vv:=10680 +98: down3 1572864 v:=42152922+1572864=43725786, vv:=11078 +102: push +level 0:(h=0,v=43725786,w=0,x=0,y=0,z=0,hh=0,vv=11078) +103: right4 15229091 h:=0+15229091=15229091, hh:=3858 +[ ] +108: fntdef1 0: cmr10 +129: fntnum0 current font is cmr10 +130: setchar49 h:=15229091+327681=15556772, hh:=3941 +[1] +131: pop +level 0:(h=0,v=43725786,w=0,x=0,y=0,z=0,hh=0,vv=11078) +132: eop diff --git a/systems/knuth/local/texware/pooltype b/systems/knuth/local/texware/pooltype new file mode 100755 index 0000000000..e8ade0e79e Binary files /dev/null and b/systems/knuth/local/texware/pooltype differ diff --git a/systems/knuth/local/texware/pooltype.o b/systems/knuth/local/texware/pooltype.o new file mode 100644 index 0000000000..fd50c6b499 Binary files /dev/null and b/systems/knuth/local/texware/pooltype.o differ diff --git a/systems/knuth/local/texware/texput.dvi b/systems/knuth/local/texware/texput.dvi new file mode 100644 index 0000000000..c0aafa20a8 Binary files /dev/null and b/systems/knuth/local/texware/texput.dvi differ diff --git a/systems/knuth/local/texware/texput.log b/systems/knuth/local/texware/texput.log new file mode 100644 index 0000000000..1819c908f4 --- /dev/null +++ b/systems/knuth/local/texware/texput.log @@ -0,0 +1,4 @@ +This is TeX, Version 3.14159 (Web2C 7.3.1) (format=tex 1999.9.25) 30 APR 2000 16:33 +**\null\bye +] +Output written on texput.dvi (1 page, 196 bytes). diff --git a/systems/knuth/local/texware/tftopl.o b/systems/knuth/local/texware/tftopl.o new file mode 100644 index 0000000000..402fea8853 Binary files /dev/null and b/systems/knuth/local/texware/tftopl.o differ diff --git a/systems/knuth/local/web/tangext.o b/systems/knuth/local/web/tangext.o new file mode 100644 index 0000000000..12b4a2bb28 Binary files /dev/null and b/systems/knuth/local/web/tangext.o differ diff --git a/systems/knuth/local/web/tangle b/systems/knuth/local/web/tangle new file mode 100755 index 0000000000..c7fed1d2e1 Binary files /dev/null and b/systems/knuth/local/web/tangle differ diff --git a/systems/knuth/local/web/tangle.o b/systems/knuth/local/web/tangle.o new file mode 100644 index 0000000000..3d7ffb6ae7 Binary files /dev/null and b/systems/knuth/local/web/tangle.o differ diff --git a/systems/knuth/local/web/tangle.p-bak b/systems/knuth/local/web/tangle.p-bak new file mode 100644 index 0000000000..9023c906b5 --- /dev/null +++ b/systems/knuth/local/web/tangle.p-bak @@ -0,0 +1,814 @@ +{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=50;unambiglength=7;{:8}type{11:}ASCIIcode=integer(8);{:11} +{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} +{190:}UNIXfilename=packed array[1..60]of char;{:190}var{9:}history:0..3; +{:9}{13:}xord:external array[char]of ASCIIcode; +xchr:external array[ASCIIcode]of char;{:13}{23:}webfile:text; +changefile:text;{:23}{25:}Pascalfile:text;pool:text;{:25}{27:} +buffer:external array[0..bufsize]of ASCIIcode;{:27}{29:} +phaseone:boolean;{:29}{38:} +bytemem:packed array[0..2,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..2]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..unambiglength]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:external integer;loc:0..bufsize;inputhasended: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:} +{troubleshooting:boolean;ddt:integer;dd:integer;debugcycle:integer; +debugskipped:integer;}{:179}{185:}{wo:0..2;}{:185}{189:} +webname,changename,Pascalname,poolname:UNIXfilename;{:189} +#include "tangext.h" +{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};flush(output);history:=2; +{debugskipped:=debugcycle;debughelp;}end;{:31}{34:}procedure jumpout; +begin goto 9999;end;{:34}{191:}procedure scanargs; +var dotpos,i,a:integer;c:char;fname:UNIXfilename; +foundweb,foundchange:boolean;begin foundweb:=false;foundchange:=false; +for a:=1 to argc-1 do begin argv(a,fname); +if fname[1]<>'-'then begin if not foundweb then{192:}begin dotpos:=-1; +i:=1;while(fname[i]<>' ')and(i<=55)do begin webname[i]:=fname[i]; +if fname[i]='.'then dotpos:=i;i:=i+1;end; +if dotpos=-1 then begin dotpos:=i;webname[dotpos]:='.'; +webname[dotpos+1]:='w';webname[dotpos+2]:='e';webname[dotpos+3]:='b'; +webname[dotpos+4]:=' ';end else webname[i]:=' '; +for i:=1 to dotpos do begin c:=webname[i];Pascalname[i]:=c; +poolname[i]:=c;end;Pascalname[dotpos+1]:='p';Pascalname[dotpos+2]:=' '; +poolname[dotpos+1]:='p';poolname[dotpos+2]:='o';poolname[dotpos+3]:='o'; +poolname[dotpos+4]:='l';poolname[dotpos+5]:=' ';foundweb:=true;end{:192} +else if not foundchange then{193:}begin dotpos:=-1;i:=1; +while(fname[i]<>' ')and(i<=55)do begin changename[i]:=fname[i]; +if fname[i]='.'then dotpos:=i;i:=i+1;end; +if dotpos=-1 then begin dotpos:=i;changename[dotpos]:='.'; +changename[dotpos+1]:='c';changename[dotpos+2]:='h'; +changename[dotpos+3]:=' ';end else changename[i]:=' ';foundchange:=true; +end{:193}else{196:}begin begin writeln(output); +write(output,'! Usage: webfile[.web] [changefile[.ch]]');end;error; +jumpout;end{:196};end else{195:}begin{196:}begin begin writeln(output); +write(output,'! Usage: webfile[.web] [changefile[.ch]]');end;error; +jumpout;end{:196};end{:195};end;if not foundweb then{196:} +begin begin writeln(output); +write(output,'! Usage: webfile[.web] [changefile[.ch]]');end;error; +jumpout;end{:196};if not foundchange then{194:}begin changename[1]:='/'; +changename[2]:='d';changename[3]:='e';changename[4]:='v'; +changename[5]:='/';changename[6]:='n';changename[7]:='u'; +changename[8]:='l';changename[9]:='l';changename[10]:=' ';end{:194};end; +{:191}procedure initialize;var{16:}i:0..255;{:16}{41:}wi:0..2;{: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]:=chr(i);for i:=128 to 255 do xchr[i]:=chr(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}{21:}{:21}{26:} +scanargs;rewrite(Pascalfile,Pascalname);rewrite(pool,poolname);{:26} +{42:}for wi:=0 to 2 do begin bytestart[wi]:=0;byteptr[wi]:=0;end; +bytestart[3]:=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:}{troubleshooting:=true; +debugcycle:=1;debugskipped:=0;troubleshooting:=false;debugcycle:=99999;} +{:180}end;{:2}{24:}procedure openinput;begin reset(webfile,webname); +reset(changefile,changename);end;{:24}{28:} +function inputln(var f:text):boolean;begin limit:=0; +if testeof(f)then inputln:=false else begin lineread(f); +if limit=bufsize then begin limit:=limit-1;begin writeln(output); +write(output,'! Input line too long');end;loc:=0;error;end; +inputln:=true;end;end;{:28}{49:}procedure printid(p:namepointer); +var k:0..maxbytes;w:0..2; +begin if p>=nameptr then write(output,'IMPOSSIBLE')else begin w:=p mod 3 +; +for k:=bytestart[p]to bytestart[p+3]-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..2;l:0..bufsize;p,q:namepointer;s:0..unambiglength; +begin l:=idloc-idfirst;{54:}h:=buffer[idfirst];i:=idfirst+1; +while i0 do begin if bytestart[p+3]-bytestart[p]=l then{56:} +begin i:=idfirst;k:=bytestart[p];w:=p mod 3; +while(i0)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(i95 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 3; +while(k95 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+3])and(choppedid[s]<>0)then goto 32; +begin writeln(output);write(output,'! Identifier conflict with ');end; +for k:=bytestart[q]to bytestart[q+3]-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 3;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-3 then begin writeln(output); +write(output,'! Sorry, ','name',' capacity exceeded');error;history:=3; +jumpout;end;i:=idfirst;while i34 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 i536870839 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..2;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 3;c:=1;j:=1; +while(kl then c:=1 else c:=4 else if j>l then c:=3 +else if modtext[j]maxbytes then begin writeln(output); +write(output,'! Sorry, ','byte memory',' capacity exceeded');error; +history:=3;jumpout;end;if nameptr>maxnames-3 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+3]:=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..2;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 3;c:=1;j:=1; +while(kl then c:=1 else c:=4 else if j>l then c:=3 +else if modtext[j]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 storetwobytes(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=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 3,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,'@\'); +otherwise 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 3]:=byteptr[nameptr mod 3]-1;}end{:91}; +end else if textlink[curstate.replfield]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..2; +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 storetwobytes(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;otherwise 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 3; +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-3 then begin writeln(output); +write(output,'! Sorry, ','name',' capacity exceeded');error;history:=3; +jumpout;end;bytestart[nameptr+3]:=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;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 troubleshooting 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);flush(output);end; +if breakptrb 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]=100)and(outcontrib[2]=105)and(outcontrib[3]= +118))or((outcontrib[1]=77)and(outcontrib[2]=79)and(outcontrib[3]=68))or( +(outcontrib[1]=109)and(outcontrib[2]=111)and(outcontrib[3]=100))))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;otherwise 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; +otherwise 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]=100)and(outbuf[outptr-2]=105)and(outbuf[outptr-1]= +118))or((outbuf[outptr-3]=77)and(outbuf[outptr-2]=79)and(outbuf[outptr-1 +]=68))or((outbuf[outptr-3]=109)and(outbuf[outptr-2]=111)and(outbuf[ +outptr-1]=100))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}otherwise 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 sendtheoutput;label 2,21,22;var curchar:eightbits; +k:0..linelength;j:0..maxbytes;w:0..2;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,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; +sendout(2,1);end;130:begin k:=0;j:=bytestart[curval];w:=curval mod 3; +while(k=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]:=97;outcontrib[2]:=110;outcontrib[3]:=100; +sendout(2,3);end;5:begin outcontrib[1]:=110;outcontrib[2]:=111; +outcontrib[3]:=116;sendout(2,3);end;6:begin outcontrib[1]:=105; +outcontrib[2]:=110;sendout(2,2);end;31:begin outcontrib[1]:=111; +outcontrib[2]:=114;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 k0 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 if bracelevel=0 then sendout(0,123)else sendout(0,91); +if curval<0 then begin sendout(0,58);sendval(-curval); +end else begin sendval(curval);sendout(0,58);end; +if bracelevel=0 then sendout(0,125)else sendout(0,93);end;{:121} +127:begin sendout(3,0);outstate:=6;end;2:{118:}begin k:=0; +repeat if k0 do begin if outptr<=linelength then breakptr:=outptr; +flushbuffer;end;outstate:=0;end{:122};otherwise begin writeln(output); +write(output,'! Can''t output ASCII code ',curchar:1);error;end end; +goto 22;2:{120:}repeat if k69)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 linesdontmatch:boolean;label 10; +var k:0..bufsize;begin linesdontmatch:=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;linesdontmatch:=false;10:end;{:127}{128:} +procedure primethechangebuffer;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 linesdontmatch 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; +inputhasended:=true;goto 10;end;if linesdontmatch 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 primethechangebuffer; +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 inputhasended:=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);flush(output); +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; +otherwise 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 inputhasended 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 inputhasended 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 inputhasended 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 inputhasended 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-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;otherwise if c>=128 then goto 20 else end; +31:{if troubleshooting 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; +otherwise{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 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}otherwise 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;otherwise goto 10 end;{177:}storetwobytes(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]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;flush(output);{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};sendtheoutput;{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 2 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{:187}; +writeln(output);if(history<>0)and(history<>1)then exit(1)else exit(0); +end.{:182} diff --git a/systems/knuth/local/web/weave.o b/systems/knuth/local/web/weave.o new file mode 100644 index 0000000000..de0e197f71 Binary files /dev/null and b/systems/knuth/local/web/weave.o differ -- cgit v1.2.3