{4:}{9:}
[inherit('sys$library:starlet')]
{:9}PROGRAM ETEX;LABEL{6:}1,9998,9999;{:6}CONST{11:}MEMMAX=327144;
MEMMIN=0;BUFSIZE=2048;SIZEINPUTLINE=133;ERRORLINE=79;HALFERRORLINE=50;
MAXPRINTLINE=79;STACKSIZE=200;MAXINOPEN=12;FONTMAX=255;
FONTMEMSIZE=81920;PARAMSIZE=60;NESTSIZE=40;MAXSTRINGS=15400;
STRINGVACANCIES=160000;POOLSIZE=186000;SAVESIZE=2000;TRIESIZE=45000;
TRIEOPSIZE=1000;DVIBUFSIZE=1024;VAXBLOCKLENGTH=512;FILENAMESIZE=255;
POOLFNAME='ETEX.POOL';{:11}TYPE{18:}ASCIICODE=0..255;{:18}{25:}
EIGHTBITS=0..255;ALPHAFILE= text ;
BYTEBLOCK=PACKED ARRAY[0..VAXBLOCKLENGTH-1]OF EIGHTBITS;
BYTEFILE=PACKED FILE OF BYTEBLOCK;{:25}{38:}POOLPOINTER=0..POOLSIZE;
STRNUMBER=0..MAXSTRINGS;PACKEDASCIICODE=0..255;{:38}{101:}
SCALED=INTEGER;NONNEGATIVEINTEGER=0..2147483647;SMALLNUMBER=0..63;{:101}
{109:}GLUERATIO=REAL;{:109}{113:}QUARTERWORD=0..511;HALFWORD=0..327145;
TWOCHOICES=1..2;FOURCHOICES=1..4;TWOHALVES=PACKED RECORD RH:HALFWORD;
CASE TWOCHOICES OF 1:(LH:HALFWORD);2:(B0:QUARTERWORD;B1:QUARTERWORD);
END;FOURQUARTERS=PACKED RECORD B0:QUARTERWORD;B1:QUARTERWORD;
B2:QUARTERWORD;B3:QUARTERWORD;END;
MEMORYWORD=PACKED RECORD CASE FOURCHOICES OF 1:(INT:INTEGER);
2:(GR:GLUERATIO);3:(HH:TWOHALVES);4:(QQQQ:FOURQUARTERS);END;
WORDBLOCK=PACKED ARRAY[0..VAXBLOCKLENGTH-1]OF MEMORYWORD;
WORDFILE=PACKED FILE OF WORDBLOCK;{:113}{150:}GLUEORD=0..3;{:150}{212:}
LISTSTATERECORD=RECORD MODEFIELD:-203..203;HEADFIELD,TAILFIELD:HALFWORD;
ETEXAUXFIELD:HALFWORD;PGFIELD,MLFIELD:INTEGER;AUXFIELD:MEMORYWORD;END;
{:212}{269:}GROUPCODE=0..16;{:269}{300:}
INSTATERECORD=RECORD STATEFIELD,INDEXFIELD:QUARTERWORD;
STARTFIELD,LOCFIELD,LIMITFIELD,NAMEFIELD:HALFWORD;END;{:300}{548:}
INTERNALFONTNUMBER=0..FONTMAX;FONTINDEX=0..FONTMEMSIZE;{:548}{594:}
DVIINDEX=0..DVIBUFSIZE;{:594}{920:}TRIEPOINTER=0..TRIESIZE;{:920}{925:}
HYPHPOINTER=0..503;{:925}{1412:}SAVEPOINTER=0..SAVESIZE;{:1412}{1623:}
SIGNEDHALFWORD=[ word ]-32768..32767;SIXTEENBITS=[ word ]0..65535;
FILESIZE=[ word ]0..FILENAMESIZE;VAXFFLOAT=PACKED RECORD FRAC1:0..127;
EXPO:0..255;SIGN:BOOLEAN;FRAC:0..65535;END;{:1623}{1626:}
UNSAFEFILE=[ unsafe ]FILE OF CHAR;FABPTR=^ FAB$type ;RABPTR=^ RAB$type ;
NAMPTR=^ NAM$type ;CHRPTR=^CHAR;{:1626}{1630:}
VMSITEMLIST=PACKED RECORD CASE BOOLEAN OF TRUE:(BUFFERLENGTH:SIXTEENBITS
;ITEMCODE:SIXTEENBITS;BUFFERADDR:[ long ]INTEGER;
RETLENADDR:[ long ]INTEGER);FALSE:(NEXTITEM:[ long ]INTEGER)END;{:1630}
{1634:}DESCRTYPE=PACKED RECORD LEN:SIXTEENBITS;DESCTYPE:EIGHTBITS;
DESCCLASS:EIGHTBITS;STRING:[ long ]INTEGER;END;DESCRPTR=^DESCRTYPE;
{:1634}{1636:}EDITORIDENT=RECORD CMDOFFSET:INTEGER;
IMAGE,ENTRY,QUITTING,EXITING,CMDTEXT:STRNUMBER;
STARTQUAL,EDTLIKE:BOOLEAN;LOGICAL:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;
END;{:1636}{1639:}EDITRESULT=(FAILED,QUIT,EDITED);{:1639}VAR{13:}
BAD:INTEGER;{:13}{20:}XORD:ARRAY[CHAR]OF ASCIICODE;
XCHR:ARRAY[ASCIICODE]OF CHAR;{:20}{26:}
NAMEOFFILE,DEFAULTNAME:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;
NAMELENGTH,DEFLTLENGTH:FILESIZE;{:26}{30:}
AUXBUF:VARYING[SIZEINPUTLINE]OF CHAR;
BUFFER:ARRAY[0..BUFSIZE]OF ASCIICODE;FIRST:0..BUFSIZE;LAST:0..BUFSIZE;
MAXBUFSTACK:0..BUFSIZE;{:30}{32:}TERMIN:ALPHAFILE;TERMOUT:ALPHAFILE;
{:32}{39:}STRPOOL:PACKED ARRAY[POOLPOINTER]OF PACKEDASCIICODE;
STRSTART:ARRAY[STRNUMBER]OF POOLPOINTER;POOLPTR:POOLPOINTER;
STRPTR:STRNUMBER;INITPOOLPTR:POOLPOINTER;INITSTRPTR:STRNUMBER;{:39}{50:}
POOLFILE:ALPHAFILE;{:50}{54:}LOGFILE:ALPHAFILE;EDCMDFILE:ALPHAFILE;
SELECTOR:0..22;DIG:ARRAY[0..22]OF 0..15;TALLY:INTEGER;
TERMOFFSET:0..MAXPRINTLINE;FILEOFFSET:0..MAXPRINTLINE;
TRICKBUF:ARRAY[0..ERRORLINE]OF ASCIICODE;TRICKCOUNT:INTEGER;
FIRSTCOUNT:INTEGER;{:54}{73:}INTERACTION:0..3;{:73}{76:}
DELETIONSALLOWED:BOOLEAN;SETBOXALLOWED:BOOLEAN;HISTORY:0..3;
ERRORCOUNT:-1..100;{:76}{79:}HELPLINE:ARRAY[0..5]OF STRNUMBER;
HELPPTR:0..6;USEERRHELP:BOOLEAN;{:79}{96:}INTERRUPT:[ volatile ]INTEGER;
OKTOINTERRUPT:BOOLEAN;{:96}{104:}ARITHERROR:BOOLEAN;REMAINDER:SCALED;
{:104}{115:}TEMPPTR:HALFWORD;{:115}{116:}
MEM:ARRAY[MEMMIN..MEMMAX]OF MEMORYWORD;LOMEMMAX:HALFWORD;
HIMEMMIN:HALFWORD;{:116}{117:}VARUSED,DYNUSED:INTEGER;{:117}{118:}
AVAIL:HALFWORD;MEMEND:HALFWORD;{:118}{124:}ROVER:HALFWORD;{:124}{165:}
{FREE:PACKED ARRAY[MEMMIN..MEMMAX]OF BOOLEAN;
WASFREE:PACKED ARRAY[MEMMIN..MEMMAX]OF BOOLEAN;
WASMEMEND,WASLOMAX,WASHIMIN:HALFWORD;PANICKING:BOOLEAN;}{:165}{173:}
FONTINSHORTDISPLAY:INTEGER;{:173}{181:}DEPTHTHRESHOLD:INTEGER;
BREADTHMAX:INTEGER;{:181}{213:}
NEST:ARRAY[0..NESTSIZE]OF LISTSTATERECORD;NESTPTR:0..NESTSIZE;
MAXNESTSTACK:0..NESTSIZE;CURLIST:LISTSTATERECORD;SHOWNMODE:-203..203;
{:213}{246:}OLDSETTING:0..22;{:246}{253:}
EQTB:ARRAY[1..14021]OF MEMORYWORD;
XEQLEVEL:ARRAY[13168..14021]OF QUARTERWORD;{:253}{256:}
HASH:ARRAY[514..10780]OF TWOHALVES;HASHUSED:HALFWORD;
NONEWCONTROLSEQUENCE:BOOLEAN;CSCOUNT:INTEGER;{:256}{271:}
SAVESTACK:ARRAY[0..SAVESIZE]OF MEMORYWORD;SAVEPTR:0..SAVESIZE;
MAXSAVESTACK:0..SAVESIZE;CURLEVEL:QUARTERWORD;CURGROUP:GROUPCODE;
CURBOUNDARY:0..SAVESIZE;{:271}{286:}MAGSET:INTEGER;{:286}{297:}
CURCMD:EIGHTBITS;CURCHR:HALFWORD;CURCS:HALFWORD;CURTOK:HALFWORD;{:297}
{301:}INPUTSTACK:ARRAY[0..STACKSIZE]OF INSTATERECORD;
INPUTPTR:0..STACKSIZE;MAXINSTACK:0..STACKSIZE;CURINPUT:INSTATERECORD;
{:301}{304:}INOPEN:0..MAXINOPEN;OPENPARENS:0..MAXINOPEN;
INPUTFILE:ARRAY[1..MAXINOPEN]OF ALPHAFILE;LINE:INTEGER;
LINESTACK:ARRAY[1..MAXINOPEN]OF INTEGER;{:304}{305:}SCANNERSTATUS:0..5;
WARNINGINDEX:HALFWORD;DEFREF:HALFWORD;{:305}{308:}
PARAMSTACK:ARRAY[0..PARAMSIZE]OF HALFWORD;PARAMPTR:0..PARAMSIZE;
MAXPARAMSTACK:INTEGER;{:308}{309:}ALIGNSTATE:INTEGER;{:309}{310:}
BASEPTR:0..STACKSIZE;{:310}{333:}PARLOC:HALFWORD;PARTOKEN:HALFWORD;
{:333}{361:}FORCEEOF:BOOLEAN;{:361}{382:}CURMARK:ARRAY[0..4]OF HALFWORD;
{:382}{387:}LONGSTATE:111..114;{:387}{388:}
PSTACK:ARRAY[0..8]OF HALFWORD;{:388}{410:}CURVAL:INTEGER;
CURVALLEVEL:0..5;{:410}{438:}RADIX:SMALLNUMBER;{:438}{447:}
CURORDER:GLUEORD;{:447}{480:}READFILE:ARRAY[0..15]OF ALPHAFILE;
READOPEN:ARRAY[0..16]OF 0..2;{:480}{489:}CONDPTR:HALFWORD;IFLIMIT:0..4;
CURIF:SMALLNUMBER;IFLINE:INTEGER;{:489}{493:}SKIPLINE:INTEGER;{:493}
{512:}CURNAME:STRNUMBER;CURAREA:STRNUMBER;CUREXT:STRNUMBER;{:512}{513:}
AREADELIMITER:POOLPOINTER;TEXAREA,TEXFONTAREA:STRNUMBER;
INPNAME,FONTSNAME:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;
INPLEN,FONTSLEN:FILESIZE;I:INTEGER;EXTDELIMITER:POOLPOINTER;{:513}{520:}
TEXFNAMEDEFAULT:PACKED ARRAY[1..9]OF CHAR;
TEXFORMATDEFAULT:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;
POOLNAME:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;FORMATAREALENGTH:FILESIZE;
FORMATDEFAULTLENGTH:INTEGER;{:520}{527:}NAMEINPROGRESS:BOOLEAN;
JOBNAME:STRNUMBER;LOGOPENED:BOOLEAN;{:527}{532:}DVIFILE:BYTEFILE;
OUTPUTFILENAME:STRNUMBER;LOGNAME:STRNUMBER;{:532}{539:}TFMFILE:BYTEFILE;
{:539}{549:}FONTINFO:ARRAY[FONTINDEX]OF MEMORYWORD;FMEMPTR:FONTINDEX;
FONTPTR:INTERNALFONTNUMBER;
FONTCHECK:ARRAY[INTERNALFONTNUMBER]OF FOURQUARTERS;
FONTSIZE:ARRAY[INTERNALFONTNUMBER]OF SCALED;
FONTDSIZE:ARRAY[INTERNALFONTNUMBER]OF SCALED;
FONTPARAMS:ARRAY[INTERNALFONTNUMBER]OF FONTINDEX;
FONTNAME:ARRAY[INTERNALFONTNUMBER]OF STRNUMBER;
FONTAREA:ARRAY[INTERNALFONTNUMBER]OF STRNUMBER;
FONTBC:ARRAY[INTERNALFONTNUMBER]OF EIGHTBITS;
FONTEC:ARRAY[INTERNALFONTNUMBER]OF EIGHTBITS;
FONTGLUE:ARRAY[INTERNALFONTNUMBER]OF HALFWORD;
FONTUSED:ARRAY[INTERNALFONTNUMBER]OF BOOLEAN;
HYPHENCHAR:ARRAY[INTERNALFONTNUMBER]OF INTEGER;
SKEWCHAR:ARRAY[INTERNALFONTNUMBER]OF INTEGER;
BCHARLABEL:ARRAY[INTERNALFONTNUMBER]OF FONTINDEX;
FONTBCHAR:ARRAY[INTERNALFONTNUMBER]OF 0..256;
FONTFALSEBCHAR:ARRAY[INTERNALFONTNUMBER]OF 0..256;{:549}{550:}
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;{:550}{555:}
NULLCHARACTER:FOURQUARTERS;{:555}{592:}TOTALPAGES:INTEGER;MAXV:SCALED;
MAXH:SCALED;MAXPUSH:INTEGER;LASTBOP:INTEGER;DEADCYCLES:INTEGER;
DOINGLEADERS:BOOLEAN;C,F:QUARTERWORD;RULEHT,RULEDP,RULEWD:SCALED;
G:HALFWORD;LQ,LR:INTEGER;{:592}{595:}
DBUFFER:[ volatile , aligned (9)]PACKED RECORD CASE BOOLEAN OF FALSE:(B:
PACKED ARRAY[DVIINDEX]OF EIGHTBITS);TRUE:(L:BYTEBLOCK;R:BYTEBLOCK;
J:EIGHTBITS);END;HALFBUF:DVIINDEX;DVILIMIT:DVIINDEX;DVIPTR:DVIINDEX;
DVIOFFSET:INTEGER;DVIGONE:INTEGER;{:595}{605:}DOWNPTR,RIGHTPTR:HALFWORD;
{:605}{616:}DVIH,DVIV:SCALED;CURH,CURV:SCALED;DVIF:INTERNALFONTNUMBER;
CURS:INTEGER;{:616}{646:}
TOTALSTRETCH,TOTALSHRINK:ARRAY[GLUEORD]OF SCALED;LASTBADNESS:INTEGER;
{:646}{647:}ADJUSTTAIL:HALFWORD;{:647}{661:}PACKBEGINLINE:INTEGER;{:661}
{684:}EMPTYFIELD:TWOHALVES;NULLDELIMITER:FOURQUARTERS;{:684}{719:}
CURMLIST:HALFWORD;CURSTYLE:SMALLNUMBER;CURSIZE:SMALLNUMBER;CURMU:SCALED;
MLISTPENALTIES:BOOLEAN;{:719}{724:}CURF:INTERNALFONTNUMBER;
CURC:QUARTERWORD;CURI:FOURQUARTERS;{:724}{764:}MAGICOFFSET:INTEGER;
{:764}{770:}CURALIGN:HALFWORD;CURSPAN:HALFWORD;CURLOOP:HALFWORD;
ALIGNPTR:HALFWORD;CURHEAD,CURTAIL:HALFWORD;{:770}{814:}JUSTBOX:HALFWORD;
{:814}{821:}PASSIVE:HALFWORD;PRINTEDNODE:HALFWORD;PASSNUMBER:HALFWORD;
{:821}{823:}ACTIVEWIDTH:ARRAY[1..6]OF SCALED;
CURACTIVEWIDTH:ARRAY[1..6]OF SCALED;BACKGROUND:ARRAY[1..6]OF SCALED;
BREAKWIDTH:ARRAY[1..6]OF SCALED;{:823}{825:}NOSHRINKERRORYET:BOOLEAN;
{:825}{828:}CURP:HALFWORD;SECONDPASS:BOOLEAN;FINALPASS:BOOLEAN;
THRESHOLD:INTEGER;{:828}{833:}MINIMALDEMERITS:ARRAY[0..3]OF INTEGER;
MINIMUMDEMERITS:INTEGER;BESTPLACE:ARRAY[0..3]OF HALFWORD;
BESTPLLINE:ARRAY[0..3]OF HALFWORD;{:833}{839:}DISCWIDTH:SCALED;{:839}
{847:}EASYLINE:HALFWORD;LASTSPECIALLINE:HALFWORD;FIRSTWIDTH:SCALED;
SECONDWIDTH:SCALED;FIRSTINDENT:SCALED;SECONDINDENT:SCALED;{:847}{872:}
BESTBET:HALFWORD;FEWESTDEMERITS:INTEGER;BESTLINE:HALFWORD;
ACTUALLOOSENESS:INTEGER;LINEDIFF:INTEGER;{:872}{892:}
HC:ARRAY[0..65]OF 0..256;HN:SMALLNUMBER;HA,HB:HALFWORD;
HF:INTERNALFONTNUMBER;HU:ARRAY[0..63]OF 0..256;HYFCHAR:INTEGER;
CURLANG,INITCURLANG:ASCIICODE;LHYF,RHYF,INITLHYF,INITRHYF:INTEGER;
HYFBCHAR:HALFWORD;{:892}{900:}HYF:ARRAY[0..64]OF 0..9;INITLIST:HALFWORD;
INITLIG:BOOLEAN;INITLFT:BOOLEAN;{:900}{905:}HYPHENPASSED:SMALLNUMBER;
{:905}{907:}CURL,CURR:HALFWORD;CURQ:HALFWORD;LIGSTACK:HALFWORD;
LIGATUREPRESENT:BOOLEAN;LFTHIT,RTHIT:BOOLEAN;{:907}{921:}
TRIE:ARRAY[TRIEPOINTER]OF TWOHALVES;
HYFDISTANCE:ARRAY[1..TRIEOPSIZE]OF SMALLNUMBER;
HYFNUM:ARRAY[1..TRIEOPSIZE]OF SMALLNUMBER;
HYFNEXT:ARRAY[1..TRIEOPSIZE]OF QUARTERWORD;
OPSTART:ARRAY[ASCIICODE]OF 0..TRIEOPSIZE;{:921}{926:}
HYPHWORD:ARRAY[HYPHPOINTER]OF STRNUMBER;
HYPHLIST:ARRAY[HYPHPOINTER]OF HALFWORD;HYPHCOUNT:HYPHPOINTER;{:926}
{943:}TRIEOPHASH:ARRAY[-TRIEOPSIZE..TRIEOPSIZE]OF 0..TRIEOPSIZE;
TRIEUSED:ARRAY[ASCIICODE]OF QUARTERWORD;
TRIEOPLANG:ARRAY[1..TRIEOPSIZE]OF ASCIICODE;
TRIEOPVAL:ARRAY[1..TRIEOPSIZE]OF QUARTERWORD;TRIEOPPTR:0..TRIEOPSIZE;
{:943}{947:}TRIEC:PACKED ARRAY[TRIEPOINTER]OF PACKEDASCIICODE;
TRIEO:PACKED ARRAY[TRIEPOINTER]OF QUARTERWORD;
TRIEL:PACKED ARRAY[TRIEPOINTER]OF TRIEPOINTER;
TRIER:PACKED ARRAY[TRIEPOINTER]OF TRIEPOINTER;TRIEPTR:TRIEPOINTER;
TRIEHASH:PACKED ARRAY[TRIEPOINTER]OF TRIEPOINTER;{:947}{950:}
TRIETAKEN:PACKED ARRAY[1..TRIESIZE]OF BOOLEAN;
TRIEMIN:ARRAY[ASCIICODE]OF TRIEPOINTER;TRIEMAX:TRIEPOINTER;
TRIENOTREADY:BOOLEAN;{:950}{971:}BESTHEIGHTPLUSDEPTH:SCALED;{:971}{980:}
PAGETAIL:HALFWORD;PAGECONTENTS:0..2;PAGEMAXDEPTH:SCALED;
BESTPAGEBREAK:HALFWORD;LEASTPAGECOST:INTEGER;BESTSIZE:SCALED;{:980}
{982:}PAGESOFAR:ARRAY[0..7]OF SCALED;LASTGLUE:HALFWORD;
LASTPENALTY:INTEGER;LASTKERN:SCALED;LASTNODETYPE:INTEGER;
INSERTPENALTIES:INTEGER;{:982}{989:}OUTPUTACTIVE:BOOLEAN;{:989}{1032:}
MAINF:INTERNALFONTNUMBER;MAINI:FOURQUARTERS;MAINJ:FOURQUARTERS;
MAINK:FONTINDEX;MAINP:HALFWORD;MAINS:INTEGER;BCHAR:HALFWORD;
FALSEBCHAR:HALFWORD;CANCELBOUNDARY:BOOLEAN;INSDISC:BOOLEAN;{:1032}
{1074:}CURBOX:HALFWORD;{:1074}{1266:}AFTERTOKEN:HALFWORD;{:1266}{1281:}
LONGHELPSEEN:BOOLEAN;{:1281}{1299:}FORMATIDENT:STRNUMBER;{:1299}{1305:}
FMTFILE:WORDFILE;{:1305}{1331:}INITFLAG:BOOLEAN;{:1331}{1342:}
WRITEFILE:ARRAY[0..15]OF ALPHAFILE;WRITEOPEN:ARRAY[0..17]OF BOOLEAN;
{:1342}{1345:}WRITELOC:HALFWORD;{:1345}{1386:}ETEXMODE:0..1;{:1386}
{1394:}EOFSEEN:ARRAY[1..MAXINOPEN]OF BOOLEAN;{:1394}{1439:}
LRTEMP:HALFWORD;LRPTR:HALFWORD;LRPROBLEMS:INTEGER;CURDIR:SMALLNUMBER;
{:1439}{1483:}PSEUDOFILES:HALFWORD;{:1483}{1506:}
GRPSTACK:ARRAY[0..MAXINOPEN]OF SAVEPOINTER;
IFSTACK:ARRAY[0..MAXINOPEN]OF HALFWORD;{:1506}{1547:}MAXREGNUM:HALFWORD;
MAXREGHELPLINE:STRNUMBER;{:1547}{1549:}SAROOT:ARRAY[0..6]OF HALFWORD;
CURPTR:HALFWORD;SANULL:MEMORYWORD;{:1549}{1568:}SACHAIN:HALFWORD;
SALEVEL:QUARTERWORD;{:1568}{1575:}LASTLINEFILL:HALFWORD;
DOLASTLINEFIT:BOOLEAN;ACTIVENODESIZE:SMALLNUMBER;
FILLWIDTH:ARRAY[0..2]OF SCALED;BESTPLSHORT:ARRAY[0..3]OF SCALED;
BESTPLGLUE:ARRAY[0..3]OF SCALED;{:1575}{1591:}HYPHSTART:TRIEPOINTER;
HYPHINDEX:TRIEPOINTER;{:1591}{1592:}DISCPTR:ARRAY[1..3]OF HALFWORD;
{:1592}{1603:}COPYERR:(IGNOREIT,PRINTIT,SAVEIT);LABELSIZE:-1..14;{:1603}
{1616:}FORMATQUAL,DVIQUAL,CMDLINEPRESENT,CONTINUEQUAL,EIGHTQUAL,JOBQUAL,
BATCHQUAL,LOGQUAL,DIAGQUAL,EDITQUAL:BOOLEAN;DIAGFILE:ALPHAFILE;
DIAGNAME:STRNUMBER;TEMPFILE:ALPHAFILE;
LOGFNAME,DIAGFNAME,EDITNAME,LJOBNAME,DVIFNAME:PACKED ARRAY[1..
FILENAMESIZE]OF CHAR;LOGFLEN,DIAGFLEN,EDITLEN,LLENNAME,DVIFLEN:FILESIZE;
{:1616}{1619:}ETEX_CLI:[ external, readonly ] unsigned ;{:1619}{1622:}
TFMCOUNT:0..VAXBLOCKLENGTH;FMTCOUNT:0..VAXBLOCKLENGTH;{:1622}{1624:}
RES:[ volatile ]INTEGER;TTCHAN:[ volatile ]SIGNEDHALFWORD;{:1624}{1628:}
INFAB,OUTFAB:FABPTR;INRAB,OUTRAB:RABPTR;LASTLENGTH:INTEGER;
LASTNAME:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;LASTBASENAMLEN:INTEGER;
LASTBASENAME:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;{:1628}{1637:}
EDITOR:PACKED ARRAY[1..4]OF EDITORIDENT;{:1637}{1665:}
EMPTYEDITOR:EDITORIDENT;{:1665}{34:}PROCEDURE WAKEUPTERMINAL;
BEGIN OUTRAB^.RAB$V_CCO:=TRUE;WRITELN(TERMOUT);OUTRAB^.RAB$V_CCO:=FALSE;
END;{:34}{1618:}
[ external]FUNCTION cli$present( %stdescr ENTITY:[ volatile , readonly ]
PACKED ARRAY[L1..U1:INTEGER]OF CHAR:= %immed 0):INTEGER;EXTERN;
[ external]FUNCTION cli$get_value( %stdescr ENTITY:[ volatile ,
readonly ]PACKED ARRAY[L1..U1:INTEGER]OF CHAR:= %immed 0;
%stdescr RETURNS:[ volatile ]PACKED ARRAY[L2..U2:INTEGER]OF CHAR:=
%immed 0;VAR RETLEN:[ volatile ]SIXTEENBITS:= %immed 0):INTEGER;EXTERN;
[ external]FUNCTION cli$dcl_parse( %stdescr CMDLINE:[ volatile ,
readonly ]PACKED ARRAY[L1..U1:INTEGER]OF CHAR:= %immed 0;
%immed CLDTABLE:[ volatile , readonly ] unsigned := %immed 0):INTEGER;
EXTERN;
[ external]FUNCTION lib$get_foreign( %stdescr CMDLIN:[ volatile ]PACKED
ARRAY[L1..U1:INTEGER]OF CHAR:= %immed 0;
%stdescr PROMPT:[ volatile ]PACKED ARRAY[L2..U2:INTEGER]OF CHAR:=
%immed 0;VAR LEN:[ volatile ]SIXTEENBITS:= %immed 0;
VAR FLAG:[ volatile ]INTEGER:= %immed 0):INTEGER;EXTERN;
[ external, asynchronous]FUNCTION lib$sig_to_ret( %ref SIGNALARGS:[
volatile , unsafe ]ARRAY[L1..U1:INTEGER]OF[ byte ]EIGHTBITS;
%ref MECHANARGS:[ volatile , unsafe ]ARRAY[L2..U2:INTEGER]OF[ byte ]
EIGHTBITS):INTEGER;EXTERN;{:1618}{1625:}
[ asynchronous]PROCEDURE CTRLCROUT;BEGIN INTERRUPT:=1;
$qiow(,TTCHAN, io$_setmode + io$m_ctrlcast ,,,, %immed CTRLCROUT,,
%immed 3,,,);;END;{:1625}{1627:}FUNCTION USERRESET(VAR FAB: FAB$type ;
VAR RAB: RAB$type ;VAR F:UNSAFEFILE):INTEGER;LABEL 30;VAR STS:INTEGER;
NAM:NAMPTR;P:CHRPTR;I:INTEGER;ICHR:INTEGER;BEGIN LASTLENGTH:=0;
STS:=$parse(FAB);IF NOT ODD(STS)THEN GOTO 30;STS:=$search(FAB);
IF ODD(STS)THEN FAB.FAB$V_NAM:=TRUE;STS:=$open(FAB);
IF NOT ODD(STS)THEN GOTO 30;STS:=$connect(RAB);
IF NOT ODD(STS)THEN GOTO 30;NAM:=FAB.FAB$L_NAM::NAMPTR;
IF NAM=NIL THEN GOTO 30;LASTLENGTH:=NAM^.NAM$B_RSL;
FOR I:=1 TO LASTLENGTH DO BEGIN P:=(NAM^.NAM$L_RSA::INTEGER+I-1)::CHRPTR
;LASTNAME[I]:=P^;END;LASTBASENAMLEN:=NAM^.NAM$B_NAME;
FOR I:=1 TO LASTBASENAMLEN DO BEGIN P:=(NAM^.NAM$L_NAME::INTEGER+I-1)::
CHRPTR;ICHR:=ORD(P^);IF(ICHR>64)AND(ICHR<91)THEN ICHR:=ICHR+32;
LASTBASENAME[I]:=CHR(ICHR);END;30:USERRESET:=STS;END;
FUNCTION USERREWRITE(VAR FAB: FAB$type ;VAR RAB: RAB$type ;
VAR F:UNSAFEFILE):INTEGER;LABEL 30;VAR STS:INTEGER;NAM:NAMPTR;P:CHRPTR;
I:INTEGER;ICHR:INTEGER;BEGIN STS:=$create(FAB);
IF NOT ODD(STS)THEN GOTO 30;STS:=$connect(RAB);
IF NOT ODD(STS)THEN GOTO 30;NAM:=FAB.FAB$L_NAM::NAMPTR;
IF NAM=NIL THEN GOTO 30;LASTLENGTH:=NAM^.NAM$B_RSL;
FOR I:=1 TO LASTLENGTH DO BEGIN P:=(NAM^.NAM$L_RSA::INTEGER+I-1)::CHRPTR
;LASTNAME[I]:=P^;END;LASTBASENAMLEN:=NAM^.NAM$B_NAME;
FOR I:=1 TO LASTBASENAMLEN DO BEGIN P:=(NAM^.NAM$L_NAME::INTEGER+I-1)::
CHRPTR;ICHR:=ORD(P^);IF(ICHR>64)AND(ICHR<91)THEN ICHR:=ICHR+32;
LASTBASENAME[I]:=CHR(ICHR);END;30:USERREWRITE:=STS;END;
FUNCTION PAS$FAB(VAR FOOBAR:UNSAFEFILE):FABPTR;EXTERN;
FUNCTION PAS$RAB(VAR FOOBAR:UNSAFEFILE):RABPTR;EXTERN;{:1627}{1629:}
FUNCTION TRANSLATE(VAR T:PACKED ARRAY[L1..U1:INTEGER]OF CHAR;
VAR LEN:SIGNEDHALFWORD):BOOLEAN;VAR S:VARYING[FILENAMESIZE]OF CHAR;
TRNLNMRETURN:INTEGER;RETURNLENGTH:[ volatile ]INTEGER;
ATTRIBUTES:UNSIGNED;ITEMLIST:[ volatile ]ARRAY[0..1]OF VMSITEMLIST;
BEGIN S:= substr(T,1,LEN);ATTRIBUTES:= lnm$m_case_blind ;
RETURNLENGTH:=0;WITH ITEMLIST[0]DO BEGIN BUFFERLENGTH:=FILENAMESIZE;
ITEMCODE:= lnm$_string ;BUFFERADDR:= iaddress(T);
RETLENADDR:= iaddress(RETURNLENGTH);END;ITEMLIST[1].NEXTITEM:=0;
TRNLNMRETURN:= $trnlnm(ATTRIBUTES,'LNM$DCL_LOGICAL',S,,ITEMLIST);
LEN:=RETURNLENGTH;TRANSLATE:=TRNLNMRETURN= sts$k_success ;END;{:1629}
{1631:}[ external]FUNCTION lib$callg( %immed ARGLIST:[ long ]INTEGER;
%immed USERPROC:[ long ]INTEGER):INTEGER;EXTERN;
FUNCTION CALLEDITOR(PROC:[ long ]INTEGER;
PARAM1,PARAM3:[ volatile ]DESCRPTR):INTEGER;
VAR CALLGDESCRIPTOR:PACKED ARRAY[1..4]OF[ long ]INTEGER;
BEGIN CALLGDESCRIPTOR[1]:=1;CALLGDESCRIPTOR[2]:=PARAM1::INTEGER;
IF PARAM3<>NIL THEN BEGIN CALLGDESCRIPTOR[1]:=3;CALLGDESCRIPTOR[3]:=0;
CALLGDESCRIPTOR[4]:=PARAM3::INTEGER;END;
CALLEDITOR:= lib$callg( iaddress(CALLGDESCRIPTOR),PROC)END;{:1631}
{1632:}
[ external, asynchronous]FUNCTION str$get1_dx( %ref ALLOC:[ readonly ]
SIXTEENBITS; %immed DESCRP:DESCRPTR):INTEGER;EXTERN;
[ external, asynchronous]FUNCTION str$free1_dx( %immed DESCRP:DESCRPTR):
INTEGER;EXTERN;
[ external, asynchronous]PROCEDURE lib$signal( %immed CONDCODE:INTEGER;
%immed NUMOFARGS:INTEGER:= %immed 0;
%immed FAOARGUMENT:[list,unsafe]INTEGER);EXTERN;{:1632}{1633:}
PROCEDURE STRTODESCR(POOLSTRING:STRNUMBER;
VAR DYNAMSTR:[ volatile ]DESCRPTR);VAR CHPTR,STRSTAT:INTEGER;
STRSIZE:SIXTEENBITS;CHCTR:CHRPTR;
BEGIN IF DYNAMSTR=NIL THEN BEGIN NEW(DYNAMSTR);
WITH DYNAMSTR^DO BEGIN LEN:=0;DESCTYPE:= dsc$k_dtype_t ;
DESCCLASS:= dsc$k_class_d ;STRING:=0 END;
END ELSE IF DYNAMSTR^.LEN<>0 THEN BEGIN STRSTAT:= str$free1_dx(DYNAMSTR)
;IF NOT ODD(STRSTAT)THEN lib$signal(STRSTAT)END;
CHPTR:=STRSTART[POOLSTRING];
STRSIZE:=STRSTART[POOLSTRING+1]-STRSTART[POOLSTRING];
STRSTAT:= str$get1_dx(STRSIZE,DYNAMSTR);
IF NOT ODD(STRSTAT)THEN lib$signal(STRSTAT);
CHCTR:=DYNAMSTR^.STRING::CHRPTR;
WHILE STRSIZE>0 DO BEGIN CHCTR^:=XCHR[STRPOOL[CHPTR]];
CHCTR:=(CHCTR::INTEGER+1)::CHRPTR;CHPTR:=CHPTR+1;STRSIZE:=STRSIZE-1 END;
END;{:1633}{1635:}PROCEDURE RELEASE(STRING:DESCRPTR);
VAR STRSTAT:INTEGER;
BEGIN IF STRING<>NIL THEN BEGIN STRSTAT:= str$free1_dx(STRING);
IF NOT ODD(STRSTAT)THEN lib$signal(STRSTAT);DISPOSE(STRING);STRING:=NIL;
END;END;{:1635}{1640:}
[ external]FUNCTION lib$find_image_symbol( %immed FILENM:DESCRPTR;
%immed SYMBOL:DESCRPTR; %ref SYMBOLVALUE:[ volatile , long ]INTEGER;
%immed IMAGENAME:DESCRPTR:= %immed 0):INTEGER;EXTERN;
[ external]FUNCTION lib$spawn( %immed CMD:DESCRPTR;
%immed SYSINPUT:DESCRPTR:= %immed 0;
%immed SYSOUTPUT:DESCRPTR:= %immed 0;
%ref FLAGS:[ long ]INTEGER:= %immed 0; %immed PRCNM:DESCRPTR:= %immed 0;
%ref PID:[ long ]INTEGER:= %immed 0;
%ref STATUS:[ long ]INTEGER:= %immed 0):INTEGER;EXTERN;
FUNCTION EDIT(FILENM,CMDFILE:STRNUMBER;EDITOR:EDITORIDENT):EDITRESULT;
VAR EDITCOMMANDLINE:DESCRPTR;CHARCT:SIXTEENBITS;EDITORENTRY:INTEGER;
EDITORSTATUS,STRSTAT:INTEGER;CHPTR:CHRPTR;QUITSTATUS,EXITSTATUS:INTEGER;
IMAGESYMBOL,ENTRYPOINT,BADSYMBOL,GOODSYMBOL:DESCRPTR;
EDITFILE,EDITCMD:DESCRPTR;BEGIN{1647:}RESET(TEMPFILE);CHARCT:=1;
WHILE NOT EOF(TEMPFILE)DO BEGIN GET(TEMPFILE);
CHARCT:=CHARCT+1 END{:1647};EDITCOMMANDLINE:=NIL;{1648:}
NEW(EDITCOMMANDLINE);WITH EDITCOMMANDLINE^DO BEGIN LEN:=0;
DESCTYPE:= dsc$k_dtype_t ;DESCCLASS:= dsc$k_class_d ;STRING:=0 END;
STRSTAT:= str$get1_dx(CHARCT,EDITCOMMANDLINE);
IF NOT ODD(STRSTAT)THEN lib$signal(STRSTAT);
CHPTR:=EDITCOMMANDLINE^.STRING::CHRPTR;RESET(TEMPFILE);
WHILE NOT EOF(TEMPFILE)DO BEGIN CHPTR^:=TEMPFILE^;GET(TEMPFILE);
CHPTR:=(CHPTR::INTEGER+1)::CHRPTR END{:1648};EDITFILE:=NIL;EDITCMD:=NIL;
IF EDITOR.EDTLIKE THEN BEGIN STRTODESCR(FILENM,EDITFILE);
STRTODESCR(CMDFILE,EDITCMD);END;EDIT:=FAILED;EDITORSTATUS:=4;
QUITSTATUS:=0;EXITSTATUS:= sts$k_success ;{1641:}IMAGESYMBOL:=NIL;
ENTRYPOINT:=NIL;BADSYMBOL:=NIL;GOODSYMBOL:=NIL;
STRTODESCR(EDITOR.IMAGE,IMAGESYMBOL);
STRTODESCR(EDITOR.ENTRY,ENTRYPOINT);
STRTODESCR(EDITOR.QUITTING,BADSYMBOL);
STRTODESCR(EDITOR.EXITING,GOODSYMBOL){:1641};
IF EDITOR.IMAGE<>0 THEN BEGIN IF lib$find_image_symbol(IMAGESYMBOL,
ENTRYPOINT,EDITORENTRY)= sts$k_success THEN{1642:}BEGIN{1645:}
IF EDITOR.QUITTING<>0 THEN IF NOT ODD( lib$find_image_symbol(IMAGESYMBOL
,BADSYMBOL,QUITSTATUS))THEN QUITSTATUS:= sts$k_success ;
IF EDITOR.EXITING<>0 THEN IF NOT ODD( lib$find_image_symbol(IMAGESYMBOL,
GOODSYMBOL,EXITSTATUS))THEN EXITSTATUS:= sts$k_success {:1645};
IF EDITOR.EDTLIKE THEN EDITORSTATUS:=CALLEDITOR(EDITORENTRY,EDITFILE,
EDITCMD)ELSE{1646:}BEGIN CHPTR:=EDITCOMMANDLINE^.STRING::CHRPTR;
FOR CHARCT:=1 TO EDITOR.CMDOFFSET DO BEGIN CHPTR^:=' ';
CHPTR:=(CHPTR::INTEGER+1)::CHRPTR END;
EDITORSTATUS:=CALLEDITOR(EDITORENTRY,EDITCOMMANDLINE,NIL);END{:1646};
END{:1642}ELSE EDITOR.IMAGE:=0 END;
IF EDITOR.IMAGE=0 THEN STRSTAT:= lib$spawn(CMD:=EDITCOMMANDLINE,STATUS:=
EDITORSTATUS);{1643:}RELEASE(IMAGESYMBOL);RELEASE(ENTRYPOINT);
RELEASE(BADSYMBOL);RELEASE(GOODSYMBOL);RELEASE(EDITCOMMANDLINE);
RELEASE(EDITFILE);RELEASE(EDITCMD);{:1643};{1644:}
IF EDITORSTATUS>= sts$m_inhib_msg THEN EDITORSTATUS:=EDITORSTATUS-
sts$m_inhib_msg ;
IF EDITORSTATUS=EXITSTATUS THEN EDIT:=EDITED ELSE IF EDITORSTATUS=
QUITSTATUS THEN EDIT:=QUIT{:1644}END;{:1640}PROCEDURE INITIALIZE;
VAR{19:}I:INTEGER;{:19}{163:}K:INTEGER;{:163}{927:}Z:HYPHPOINTER;{:927}
BEGIN{8:}{21:}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]:='~';{:21}{23:}XCHR[0]:=' ';
FOR I:=1 TO 31 DO XCHR[I]:=CHR(I);XCHR[12]:=CHR(12);XCHR[9]:=CHR(9);
FOR I:=127 TO 159 DO XCHR[I]:=' ';FOR I:=160 TO 255 DO XCHR[I]:=CHR(I);
{:23}{24:}FOR I:=0 TO 255 DO XORD[CHR(I)]:=127;
FOR I:=128 TO 255 DO XORD[XCHR[I]]:=I;
FOR I:=0 TO 126 DO XORD[XCHR[I]]:=I;{:24}{74:}INTERACTION:=3;{:74}{77:}
DELETIONSALLOWED:=TRUE;SETBOXALLOWED:=TRUE;ERRORCOUNT:=0;{:77}{80:}
HELPPTR:=0;USEERRHELP:=FALSE;{:80}{97:}INTERRUPT:=0;OKTOINTERRUPT:=TRUE;
IF $assign('SYS$COMMAND',TTCHAN,,)= sts$k_success THEN $qiow(,TTCHAN,
io$_setmode + io$m_ctrlcast ,,,, %immed CTRLCROUT,, %immed 3,,,);;{:97}
{166:}{WASMEMEND:=MEMMIN;WASLOMAX:=MEMMIN;WASHIMIN:=MEMMAX;
PANICKING:=FALSE;}{:166}{215:}NESTPTR:=0;MAXNESTSTACK:=0;
CURLIST.MODEFIELD:=1;CURLIST.HEADFIELD:=327143;
CURLIST.TAILFIELD:=327143;CURLIST.ETEXAUXFIELD:=0;
CURLIST.AUXFIELD.INT:=-65536000;CURLIST.MLFIELD:=0;CURLIST.PGFIELD:=0;
SHOWNMODE:=0;{991:}PAGECONTENTS:=0;PAGETAIL:=327142;
MEM[327142].HH.RH:=0;LASTGLUE:=327145;LASTPENALTY:=0;LASTKERN:=0;
LASTNODETYPE:=-1;PAGESOFAR[7]:=0;PAGEMAXDEPTH:=0{:991};{:215}{254:}
FOR K:=13168 TO 14021 DO XEQLEVEL[K]:=1;{:254}{257:}
NONEWCONTROLSEQUENCE:=TRUE;HASH[514].LH:=0;HASH[514].RH:=0;
FOR K:=515 TO 10780 DO HASH[K]:=HASH[514];{:257}{272:}SAVEPTR:=0;
CURLEVEL:=1;CURGROUP:=0;CURBOUNDARY:=0;MAXSAVESTACK:=0;{:272}{287:}
MAGSET:=0;{:287}{383:}CURMARK[0]:=0;CURMARK[1]:=0;CURMARK[2]:=0;
CURMARK[3]:=0;CURMARK[4]:=0;{:383}{439:}CURVAL:=0;CURVALLEVEL:=0;
RADIX:=0;CURORDER:=0;{:439}{481:}FOR K:=0 TO 16 DO READOPEN[K]:=2;{:481}
{490:}CONDPTR:=0;IFLIMIT:=0;CURIF:=0;IFLINE:=0;{:490}{521:}
TEXFNAMEDEFAULT:='plain.fmt';
cli$get_value('TEXFORMATS',TEXFORMATDEFAULT,FORMATAREALENGTH);
POOLNAME:=TEXFORMATDEFAULT;
FOR I:=1 TO length(POOLFNAME)DO POOLNAME[I+FORMATAREALENGTH]:=POOLFNAME[
I];
FOR I:=1 TO 9 DO TEXFORMATDEFAULT[I+FORMATAREALENGTH]:=TEXFNAMEDEFAULT[I
];FORMATDEFAULTLENGTH:=FORMATAREALENGTH+9;{:521}{551:}
FOR K:=0 TO FONTMAX DO FONTUSED[K]:=FALSE;{:551}{556:}
NULLCHARACTER.B0:=0;NULLCHARACTER.B1:=0;NULLCHARACTER.B2:=0;
NULLCHARACTER.B3:=0;{:556}{593:}TOTALPAGES:=0;MAXV:=0;MAXH:=0;
MAXPUSH:=0;LASTBOP:=-1;DOINGLEADERS:=FALSE;DEADCYCLES:=0;CURS:=-1;{:593}
{596:}HALFBUF:=DVIBUFSIZE DIV 2;DVILIMIT:=DVIBUFSIZE;DVIPTR:=0;
DVIOFFSET:=0;DVIGONE:=0;{:596}{606:}DOWNPTR:=0;RIGHTPTR:=0;{:606}{648:}
ADJUSTTAIL:=0;LASTBADNESS:=0;{:648}{662:}PACKBEGINLINE:=0;{:662}{685:}
EMPTYFIELD.RH:=0;EMPTYFIELD.LH:=0;NULLDELIMITER.B0:=0;
NULLDELIMITER.B1:=0;NULLDELIMITER.B2:=0;NULLDELIMITER.B3:=0;{:685}{771:}
ALIGNPTR:=0;CURALIGN:=0;CURSPAN:=0;CURLOOP:=0;CURHEAD:=0;CURTAIL:=0;
{:771}{928:}FOR Z:=0 TO 503 DO BEGIN HYPHWORD[Z]:=0;HYPHLIST[Z]:=0;END;
HYPHCOUNT:=0;{:928}{990:}OUTPUTACTIVE:=FALSE;INSERTPENALTIES:=0;{:990}
{1033:}LIGATUREPRESENT:=FALSE;CANCELBOUNDARY:=FALSE;LFTHIT:=FALSE;
RTHIT:=FALSE;INSDISC:=FALSE;{:1033}{1267:}AFTERTOKEN:=0;{:1267}{1282:}
LONGHELPSEEN:=FALSE;{:1282}{1300:}FORMATIDENT:=0;{:1300}{1343:}
FOR K:=0 TO 17 DO WRITEOPEN[K]:=FALSE;{:1343}{1440:}LRTEMP:=0;LRPTR:=0;
LRPROBLEMS:=0;CURDIR:=0;{:1440}{1484:}PSEUDOFILES:=0;{:1484}{1550:}
SAROOT[6]:=0;SANULL.HH.LH:=0;SANULL.HH.RH:=0;{:1550}{1569:}SACHAIN:=0;
SALEVEL:=0;{:1569}{1593:}DISCPTR[2]:=0;DISCPTR[3]:=0;{:1593}{1638:}
WITH EDITOR[1]DO BEGIN LOGICAL:='CALLABLE_LSE';IMAGE:=1417;ENTRY:=1418;
QUITTING:=1419;EXITING:=1420;CMDTEXT:=1421;CMDOFFSET:=0;STARTQUAL:=TRUE;
EDTLIKE:=FALSE;END;WITH EDITOR[2]DO BEGIN LOGICAL:='CALLABLE_TPU';
IMAGE:=1422;ENTRY:=1423;QUITTING:=1419;EXITING:=1420;CMDTEXT:=1424;
CMDOFFSET:=5;STARTQUAL:=TRUE;EDTLIKE:=FALSE;END;
WITH EDITOR[3]DO BEGIN LOGICAL:='CALLABLE_EDT';IMAGE:=1425;ENTRY:=1426;
QUITTING:=0;EXITING:=0;CMDTEXT:=1427;CMDOFFSET:=0;STARTQUAL:=FALSE;
EDTLIKE:=TRUE;END;WITH EDITOR[4]DO BEGIN LOGICAL:='CALLABLE_TECO';
IMAGE:=1428;ENTRY:=1429;QUITTING:=0;EXITING:=0;CMDTEXT:=1430;
CMDOFFSET:=0;STARTQUAL:=FALSE;EDTLIKE:=TRUE;END;{:1638}{1666:}
WITH EMPTYEDITOR DO BEGIN LOGICAL:='';IMAGE:=0;ENTRY:=0;QUITTING:=0;
EXITING:=0;CMDTEXT:=0;CMDOFFSET:=0;STARTQUAL:=FALSE;EDTLIKE:=FALSE;END;
{:1666}IF INITFLAG THEN BEGIN{164:}FOR K:=1 TO 19 DO MEM[K].INT:=0;K:=0;
WHILE K<=19 DO BEGIN MEM[K].HH.RH:=1;MEM[K].HH.B0:=0;MEM[K].HH.B1:=0;
K:=K+4;END;MEM[6].INT:=65536;MEM[4].HH.B0:=1;MEM[10].INT:=65536;
MEM[8].HH.B0:=2;MEM[14].INT:=65536;MEM[12].HH.B0:=1;MEM[15].INT:=65536;
MEM[12].HH.B1:=1;MEM[18].INT:=-65536;MEM[16].HH.B0:=1;ROVER:=20;
MEM[ROVER].HH.RH:=327145;MEM[ROVER].HH.LH:=1000;
MEM[ROVER+1].HH.LH:=ROVER;MEM[ROVER+1].HH.RH:=ROVER;
LOMEMMAX:=ROVER+1000;MEM[LOMEMMAX].HH.RH:=0;MEM[LOMEMMAX].HH.LH:=0;
FOR K:=327131 TO 327144 DO MEM[K]:=MEM[LOMEMMAX];{790:}
MEM[327134].HH.LH:=14614;{:790}{797:}MEM[327135].HH.RH:=512;
MEM[327135].HH.LH:=0;{:797}{820:}MEM[327137].HH.B0:=1;
MEM[327138].HH.LH:=327145;MEM[327137].HH.B1:=0;{:820}{981:}
MEM[327144].HH.B1:=255;MEM[327144].HH.B0:=1;MEM[327144].HH.RH:=327144;
{:981}{988:}MEM[327142].HH.B0:=10;MEM[327142].HH.B1:=0;{:988};AVAIL:=0;
MEMEND:=327144;HIMEMMIN:=327131;VARUSED:=20;DYNUSED:=14;{:164}{222:}
EQTB[10781].HH.B0:=101;EQTB[10781].HH.RH:=0;EQTB[10781].HH.B1:=0;
FOR K:=1 TO 10780 DO EQTB[K]:=EQTB[10781];{:222}{228:}
EQTB[10782].HH.RH:=0;EQTB[10782].HH.B1:=1;EQTB[10782].HH.B0:=117;
FOR K:=10783 TO 11311 DO EQTB[K]:=EQTB[10782];
MEM[0].HH.RH:=MEM[0].HH.RH+530;{:228}{232:}EQTB[11312].HH.RH:=0;
EQTB[11312].HH.B0:=118;EQTB[11312].HH.B1:=1;
FOR K:=11313 TO 11316 DO EQTB[K]:=EQTB[11312];
FOR K:=11317 TO 11582 DO EQTB[K]:=EQTB[10781];EQTB[11583].HH.RH:=0;
EQTB[11583].HH.B0:=119;EQTB[11583].HH.B1:=1;
FOR K:=11584 TO 11838 DO EQTB[K]:=EQTB[11583];EQTB[11839].HH.RH:=0;
EQTB[11839].HH.B0:=120;EQTB[11839].HH.B1:=1;
FOR K:=11840 TO 11887 DO EQTB[K]:=EQTB[11839];EQTB[11888].HH.RH:=0;
EQTB[11888].HH.B0:=120;EQTB[11888].HH.B1:=1;
FOR K:=11889 TO 13167 DO EQTB[K]:=EQTB[11888];
FOR K:=0 TO 255 DO BEGIN EQTB[11888+K].HH.RH:=12;EQTB[12912+K].HH.RH:=K;
EQTB[12656+K].HH.RH:=1000;END;EQTB[11901].HH.RH:=5;
EQTB[11920].HH.RH:=10;EQTB[11980].HH.RH:=0;EQTB[11925].HH.RH:=14;
EQTB[11900].HH.RH:=5;EQTB[12015].HH.RH:=15;EQTB[11888].HH.RH:=9;
FOR K:=48 TO 57 DO EQTB[12912+K].HH.RH:=K+28672;
FOR K:=65 TO 90 DO BEGIN EQTB[11888+K].HH.RH:=11;
EQTB[11888+K+32].HH.RH:=11;EQTB[12912+K].HH.RH:=K+28928;
EQTB[12912+K+32].HH.RH:=K+28960;EQTB[12144+K].HH.RH:=K+32;
EQTB[12144+K+32].HH.RH:=K+32;EQTB[12400+K].HH.RH:=K;
EQTB[12400+K+32].HH.RH:=K;EQTB[12656+K].HH.RH:=999;END;{:232}{240:}
FOR K:=13168 TO 13488 DO EQTB[K].INT:=0;EQTB[13185].INT:=1000;
EQTB[13169].INT:=10000;EQTB[13209].INT:=1;EQTB[13208].INT:=25;
EQTB[13213].INT:=92;EQTB[13216].INT:=13;
FOR K:=0 TO 255 DO EQTB[13489+K].INT:=-1;EQTB[13535].INT:=0;{:240}{250:}
FOR K:=13745 TO 14021 DO EQTB[K].INT:=0;{:250}{258:}HASHUSED:=10514;
CSCOUNT:=0;EQTB[10523].HH.B0:=116;HASH[10523].RH:=505;{:258}{552:}
FONTPTR:=0;FMEMPTR:=7;FONTNAME[0]:=808;FONTAREA[0]:=339;
HYPHENCHAR[0]:=45;SKEWCHAR[0]:=-1;BCHARLABEL[0]:=0;FONTBCHAR[0]:=256;
FONTFALSEBCHAR[0]:=256;FONTBC[0]:=1;FONTEC[0]:=0;FONTSIZE[0]:=0;
FONTDSIZE[0]:=0;CHARBASE[0]:=0;WIDTHBASE[0]:=0;HEIGHTBASE[0]:=0;
DEPTHBASE[0]:=0;ITALICBASE[0]:=0;LIGKERNBASE[0]:=0;KERNBASE[0]:=0;
EXTENBASE[0]:=0;FONTGLUE[0]:=0;FONTPARAMS[0]:=7;PARAMBASE[0]:=-1;
FOR K:=0 TO 6 DO FONTINFO[K].INT:=0;{:552}{946:}
FOR K:=-TRIEOPSIZE TO TRIEOPSIZE DO TRIEOPHASH[K]:=0;
FOR K:=0 TO 255 DO TRIEUSED[K]:=0;TRIEOPPTR:=0;{:946}{951:}
TRIENOTREADY:=TRUE;TRIEL[0]:=0;TRIEC[0]:=0;TRIEPTR:=0;{:951}{1216:}
HASH[10514].RH:=1199;{:1216}{1301:}FORMATIDENT:=1265;{:1301}{1369:}
HASH[10522].RH:=1306;EQTB[10522].HH.B1:=1;EQTB[10522].HH.B0:=113;
EQTB[10522].HH.RH:=0;{:1369}{1387:}ETEXMODE:=0;{1545:}MAXREGNUM:=255;
MAXREGHELPLINE:=697;{:1545}{:1387}{1551:}FOR I:=0 TO 5 DO SAROOT[I]:=0;
{:1551}{1587:}TRIER[0]:=0;HYPHSTART:=0;{:1587}END;{:8}END;{56:}
PROCEDURE DIAGCHAR(S:ASCIICODE);VAR CH:CHAR;BEGIN CH:=XCHR[S];
IF DIAGQUAL THEN WRITE(DIAGFILE,CH);
IF CH='"'THEN IF DIAGQUAL THEN WRITE(DIAGFILE,CH)END;
PROCEDURE TEMPCHAR(S:ASCIICODE);VAR CH:CHAR;BEGIN CH:=XCHR[S];
WRITE(TEMPFILE,CH);IF CH='"'THEN WRITE(TEMPFILE,CH)END;
PROCEDURE DIAGPRINT(S:INTEGER);VAR J:POOLPOINTER;BEGIN J:=STRSTART[S];
WHILE J<STRSTART[S+1]DO BEGIN DIAGCHAR(STRPOOL[J]);J:=J+1 END;END;{:56}
{57:}PROCEDURE PRINTLN;
BEGIN CASE SELECTOR OF 19:BEGIN WRITELN(TERMOUT,CHR(13),CHR(10));
IF LOGQUAL THEN WRITELN(LOGFILE);TERMOFFSET:=0;FILEOFFSET:=0;END;
18:BEGIN IF LOGQUAL THEN WRITELN(LOGFILE);FILEOFFSET:=0;END;
17:BEGIN WRITELN(TERMOUT,CHR(13),CHR(10));TERMOFFSET:=0;END;16,20,21:;
22:WRITELN(EDCMDFILE);OTHERWISE WRITELN(WRITEFILE[SELECTOR])END;END;
{:57}{58:}PROCEDURE PRINTCHAR(S:ASCIICODE);LABEL 10;BEGIN IF{244:}
S=EQTB[13217].INT{:244}THEN IF SELECTOR<20 THEN BEGIN PRINTLN;GOTO 10;
END;{1602:}
CASE COPYERR OF PRINTIT:BEGIN IF LABELSIZE<>0 THEN DIAGCHAR(S);
IF LABELSIZE>0 THEN LABELSIZE:=LABELSIZE-1 END;IGNOREIT:;
SAVEIT:TEMPCHAR(S)END{:1602};
CASE SELECTOR OF 19:BEGIN WRITE(TERMOUT,XCHR[S]);
IF LOGQUAL THEN WRITE(LOGFILE,XCHR[S]);TERMOFFSET:=TERMOFFSET+1;
FILEOFFSET:=FILEOFFSET+1;
IF TERMOFFSET=MAXPRINTLINE THEN BEGIN WRITELN(TERMOUT,CHR(13),CHR(10));
TERMOFFSET:=0;END;
IF FILEOFFSET=MAXPRINTLINE THEN BEGIN IF LOGQUAL THEN WRITELN(LOGFILE);
FILEOFFSET:=0;END;END;18:BEGIN IF LOGQUAL THEN WRITE(LOGFILE,XCHR[S]);
FILEOFFSET:=FILEOFFSET+1;IF FILEOFFSET=MAXPRINTLINE THEN PRINTLN;END;
17:BEGIN WRITE(TERMOUT,XCHR[S]);TERMOFFSET:=TERMOFFSET+1;
IF TERMOFFSET=MAXPRINTLINE THEN PRINTLN;END;16:;
20:IF TALLY<TRICKCOUNT THEN TRICKBUF[TALLY MOD ERRORLINE]:=S;
21:BEGIN IF POOLPTR<POOLSIZE THEN BEGIN STRPOOL[POOLPTR]:=S;
POOLPTR:=POOLPTR+1;END;END;22:WRITE(EDCMDFILE,XCHR[S]);
OTHERWISE WRITE(WRITEFILE[SELECTOR],XCHR[S])END;TALLY:=TALLY+1;10:END;
{:58}{59:}PROCEDURE PRINT(S:INTEGER);LABEL 10;VAR J:POOLPOINTER;
NL:INTEGER;
BEGIN IF S>=STRPTR THEN S:=260 ELSE IF S<256 THEN IF S<0 THEN S:=260
ELSE BEGIN IF SELECTOR>20 THEN BEGIN PRINTCHAR(S);GOTO 10;END;IF({244:}
S=EQTB[13217].INT{:244})THEN IF SELECTOR<20 THEN BEGIN PRINTLN;GOTO 10;
END;NL:=EQTB[13217].INT;EQTB[13217].INT:=-1;J:=STRSTART[S];
WHILE J<STRSTART[S+1]DO BEGIN PRINTCHAR(STRPOOL[J]);J:=J+1;END;
EQTB[13217].INT:=NL;GOTO 10;END;J:=STRSTART[S];
WHILE J<STRSTART[S+1]DO BEGIN PRINTCHAR(STRPOOL[J]);J:=J+1;END;10:END;
{:59}{60:}PROCEDURE SLOWPRINT(S:INTEGER);VAR J:POOLPOINTER;
BEGIN IF(S>=STRPTR)OR(S<256)THEN PRINT(S)ELSE BEGIN J:=STRSTART[S];
WHILE J<STRSTART[S+1]DO BEGIN PRINT(STRPOOL[J]);J:=J+1;END;END;END;{:60}
{62:}PROCEDURE PRINTNL(S:STRNUMBER);
BEGIN IF((TERMOFFSET>0)AND(ODD(SELECTOR)))OR((FILEOFFSET>0)AND(SELECTOR
>=18))THEN PRINTLN;PRINT(S);END;{:62}{63:}
PROCEDURE PRINTESC(S:STRNUMBER);VAR C:INTEGER;BEGIN{243:}
C:=EQTB[13213].INT{:243};IF C>=0 THEN IF C<256 THEN PRINT(C);
SLOWPRINT(S);END;{:63}{64:}PROCEDURE PRINTTHEDIGS(K:EIGHTBITS);
BEGIN WHILE K>0 DO BEGIN K:=K-1;
IF DIG[K]<10 THEN PRINTCHAR(48+DIG[K])ELSE PRINTCHAR(55+DIG[K]);END;END;
{:64}{65:}PROCEDURE PRINTINT(N:INTEGER);VAR K:0..23;M:INTEGER;
BEGIN K:=0;IF N<0 THEN BEGIN PRINTCHAR(45);
IF N>-100000000 THEN N:=-N ELSE BEGIN M:=-1-N;N:=M DIV 10;
M:=(M MOD 10)+1;K:=1;IF M<10 THEN DIG[0]:=M ELSE BEGIN DIG[0]:=0;N:=N+1;
END;END;END;REPEAT DIG[K]:=N MOD 10;N:=N DIV 10;K:=K+1;UNTIL N=0;
PRINTTHEDIGS(K);END;{:65}{262:}PROCEDURE PRINTCS(P:INTEGER);
BEGIN IF P<514 THEN IF P>=257 THEN IF P=513 THEN BEGIN PRINTESC(507);
PRINTESC(508);END ELSE BEGIN PRINTESC(P-257);
IF EQTB[11888+P-257].HH.RH=11 THEN PRINTCHAR(32);
END ELSE IF P<1 THEN PRINTESC(509)ELSE PRINT(P-1)ELSE IF P>=10781 THEN
PRINTESC(509)ELSE IF(HASH[P].RH<0)OR(HASH[P].RH>=STRPTR)THEN PRINTESC(
510)ELSE BEGIN PRINTESC(HASH[P].RH);PRINTCHAR(32);END;END;{:262}{263:}
PROCEDURE SPRINTCS(P:HALFWORD);
BEGIN IF P<514 THEN IF P<257 THEN PRINT(P-1)ELSE IF P<513 THEN PRINTESC(
P-257)ELSE BEGIN PRINTESC(507);PRINTESC(508);
END ELSE PRINTESC(HASH[P].RH);END;{:263}{518:}
PROCEDURE PRINTFILENAME(N,A,E:INTEGER);BEGIN SLOWPRINT(A);SLOWPRINT(N);
SLOWPRINT(E);END;{:518}{699:}PROCEDURE PRINTSIZE(S:INTEGER);
BEGIN IF S=0 THEN PRINTESC(415)ELSE IF S=16 THEN PRINTESC(416)ELSE
PRINTESC(417);END;{:699}{1355:}PROCEDURE PRINTWRITEWHATSIT(S:STRNUMBER;
P:HALFWORD);BEGIN PRINTESC(S);
IF MEM[P+1].HH.LH<16 THEN PRINTINT(MEM[P+1].HH.LH)ELSE IF MEM[P+1].HH.LH
=16 THEN PRINTCHAR(42)ELSE PRINTCHAR(45);END;{:1355}{1555:}
PROCEDURE PRINTSANUM(Q:HALFWORD);VAR N:HALFWORD;
BEGIN IF MEM[Q].HH.B0<32 THEN N:=MEM[Q+1].HH.RH ELSE BEGIN N:=MEM[Q].HH.
B0 MOD 16;Q:=MEM[Q].HH.RH;N:=N+16*MEM[Q].HH.B0;Q:=MEM[Q].HH.RH;
N:=N+256*(MEM[Q].HH.B0+16*MEM[MEM[Q].HH.RH].HH.B0);END;PRINTINT(N);END;
{:1555}{1649:}PROCEDURE EDITLOCATE(LINE,COL:INTEGER);BEGIN PRINT(1431);
PRINTINT(LINE);PRINTCHAR(44);PRINTINT(COL);PRINT(1432)END;{:1649}{1650:}
FUNCTION EDITFILE(STACKITEM:INSTATERECORD;LINE:INTEGER):BOOLEAN;FORWARD;
{:1650}{78:}PROCEDURE NORMALIZESELECTOR;FORWARD;PROCEDURE GETTOKEN;
FORWARD;PROCEDURE TERMINPUT;FORWARD;PROCEDURE SHOWCONTEXT;FORWARD;
PROCEDURE BEGINFILEREADING;FORWARD;PROCEDURE OPENLOGFILE;FORWARD;
PROCEDURE CLOSEFILESANDTERMINATE;FORWARD;PROCEDURE CLEARFORERRORPROMPT;
FORWARD;PROCEDURE GIVEERRHELP;FORWARD;{PROCEDURE DEBUGHELP;FORWARD;}
{:78}{81:}PROCEDURE JUMPOUT;BEGIN GOTO 9998;END;{:81}{82:}
PROCEDURE ERROR;LABEL 22,10;VAR C:ASCIICODE;S1,S2,S3,S4:INTEGER;
BEGIN IF HISTORY<2 THEN HISTORY:=2;PRINTCHAR(46);{1604:}
COPYERR:=IGNOREIT;RESET(TEMPFILE){:1604};SHOWCONTEXT;
IF INTERACTION=3 THEN{83:}WHILE TRUE DO BEGIN 22:CLEARFORERRORPROMPT;
BEGIN WAKEUPTERMINAL;PRINT(265);TERMINPUT;END;
IF LAST=FIRST THEN GOTO 10;C:=BUFFER[FIRST];IF C>=97 THEN C:=C-32;{84:}
CASE C OF 48,49,50,51,52,53,54,55,56,57:IF DELETIONSALLOWED THEN{88:}
BEGIN S1:=CURTOK;S2:=CURCMD;S3:=CURCHR;S4:=ALIGNSTATE;
ALIGNSTATE:=1000000;OKTOINTERRUPT:=FALSE;
IF(LAST>FIRST+1)AND(BUFFER[FIRST+1]>=48)AND(BUFFER[FIRST+1]<=57)THEN C:=
C*10+BUFFER[FIRST+1]-48*11 ELSE C:=C-48;WHILE C>0 DO BEGIN GETTOKEN;
C:=C-1;END;CURTOK:=S1;CURCMD:=S2;CURCHR:=S3;ALIGNSTATE:=S4;
OKTOINTERRUPT:=TRUE;BEGIN HELPPTR:=2;HELPLINE[1]:=280;HELPLINE[0]:=281;
END;SHOWCONTEXT;GOTO 22;END{:88};{68:BEGIN DEBUGHELP;GOTO 22;END;}
69:IF BASEPTR>0 THEN BEGIN IF EDITFILE(INPUTSTACK[BASEPTR],LINE)THEN
BEGIN IF CONTINUEQUAL THEN BEGIN SHOWCONTEXT;GOTO 22;
END ELSE BEGIN INTERACTION:=2;JUMPOUT;END END ELSE BEGIN PRINTNL(266);
SLOWPRINT(INPUTSTACK[BASEPTR].NAMEFIELD);PRINT(267);PRINTINT(LINE);
INTERACTION:=2;JUMPOUT;END END;72:{89:}
BEGIN IF USEERRHELP THEN BEGIN GIVEERRHELP;USEERRHELP:=FALSE;
END ELSE BEGIN IF HELPPTR=0 THEN BEGIN HELPPTR:=2;HELPLINE[1]:=282;
HELPLINE[0]:=283;END;REPEAT HELPPTR:=HELPPTR-1;PRINT(HELPLINE[HELPPTR]);
PRINTLN;UNTIL HELPPTR=0;END;BEGIN HELPPTR:=4;HELPLINE[3]:=284;
HELPLINE[2]:=283;HELPLINE[1]:=285;HELPLINE[0]:=286;END;GOTO 22;END{:89};
73:{87:}BEGIN BEGINFILEREADING;
IF LAST>FIRST+1 THEN BEGIN CURINPUT.LOCFIELD:=FIRST+1;BUFFER[FIRST]:=32;
END ELSE BEGIN BEGIN WAKEUPTERMINAL;PRINT(279);TERMINPUT;END;
CURINPUT.LOCFIELD:=FIRST;END;FIRST:=LAST;CURINPUT.LIMITFIELD:=LAST-1;
GOTO 10;END{:87};81,82,83:{86:}BEGIN ERRORCOUNT:=0;INTERACTION:=0+C-81;
PRINT(274);CASE C OF 81:PRINTESC(275);82:PRINTESC(276);83:PRINTESC(277);
END;PRINT(278);PRINTLN;IF ODD(SELECTOR)THEN WRITELN(TERMOUT);
IF C=81 THEN SELECTOR:=SELECTOR-1;GOTO 10;END{:86};
88:BEGIN INTERACTION:=2;JUMPOUT;END;OTHERWISE END;{85:}BEGIN PRINT(268);
PRINTNL(269);PRINTNL(270);IF BASEPTR>0 THEN PRINT(271);
IF DELETIONSALLOWED THEN PRINTNL(272);PRINTNL(273);END{:85}{:84};
END{:83};ERRORCOUNT:=ERRORCOUNT+1;
IF ERRORCOUNT=100 THEN BEGIN PRINTNL(264);HISTORY:=3;JUMPOUT;END;{90:}
IF INTERACTION>0 THEN SELECTOR:=SELECTOR-1;
IF USEERRHELP THEN BEGIN PRINTLN;GIVEERRHELP;
END ELSE WHILE HELPPTR>0 DO BEGIN HELPPTR:=HELPPTR-1;
PRINTNL(HELPLINE[HELPPTR]);END;PRINTLN;
IF INTERACTION>0 THEN SELECTOR:=SELECTOR+1;PRINTLN{:90};10:END;{:82}
{93:}PROCEDURE FATALERROR(S:STRNUMBER);BEGIN NORMALIZESELECTOR;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(288);END;BEGIN HELPPTR:=1;HELPLINE[0]:=S;END;
BEGIN IF INTERACTION=3 THEN INTERACTION:=2;IF LOGOPENED THEN ERROR;
{IF INTERACTION>0 THEN DEBUGHELP;}HISTORY:=3;JUMPOUT;END;END;{:93}{94:}
PROCEDURE OVERFLOW(S:STRNUMBER;N:INTEGER);BEGIN NORMALIZESELECTOR;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(289);END;PRINT(S);PRINTCHAR(61);PRINTINT(N);
PRINTCHAR(93);BEGIN HELPPTR:=2;HELPLINE[1]:=290;HELPLINE[0]:=291;END;
BEGIN IF INTERACTION=3 THEN INTERACTION:=2;IF LOGOPENED THEN ERROR;
{IF INTERACTION>0 THEN DEBUGHELP;}HISTORY:=3;JUMPOUT;END;END;{:94}{95:}
PROCEDURE CONFUSION(S:STRNUMBER);BEGIN NORMALIZESELECTOR;
IF HISTORY<2 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(292);END;PRINT(S);
PRINTCHAR(41);BEGIN HELPPTR:=1;HELPLINE[0]:=293;END;
END ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(294);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=295;HELPLINE[0]:=296;END;END;
BEGIN IF INTERACTION=3 THEN INTERACTION:=2;IF LOGOPENED THEN ERROR;
{IF INTERACTION>0 THEN DEBUGHELP;}HISTORY:=3;JUMPOUT;END;END;{:95}{:4}
{27:}FUNCTION AOPENIN(VAR F:ALPHAFILE):BOOLEAN;
BEGIN OPEN(F,NAMEOFFILE, readonly ,user_action:=USERRESET,
error:=continue);
IF STATUS(F)>0 THEN AOPENIN:=FALSE ELSE BEGIN RESET(F,error:=continue);
AOPENIN:=STATUS(F)<=0;END;END;
FUNCTION AOPENOUT(VAR F:ALPHAFILE):BOOLEAN;
BEGIN OPEN(F,NAMEOFFILE, new ,16383,disposition:=delete, default :=
DEFAULTNAME,user_action:=USERREWRITE,error:=continue);
IF STATUS(F)>0 THEN AOPENOUT:=FALSE ELSE BEGIN LINELIMIT(F,MAXINT);
REWRITE(F,error:=continue);AOPENOUT:=STATUS(F)<=0;END;END;
FUNCTION BOPENIN(VAR F:BYTEFILE):BOOLEAN;
BEGIN OPEN(F,NAMEOFFILE, readonly ,user_action:=USERRESET,
error:=continue);
IF STATUS(F)>0 THEN BOPENIN:=FALSE ELSE BEGIN RESET(F,error:=continue);
BOPENIN:=STATUS(F)<=0;END;END;FUNCTION BOPENOUT(VAR F:BYTEFILE):BOOLEAN;
BEGIN OPEN(F,NAMEOFFILE, new ,disposition:=delete, default :=DEFAULTNAME
,user_action:=USERREWRITE,error:=continue);
IF STATUS(F)>0 THEN BOPENOUT:=FALSE ELSE BEGIN REWRITE(F,error:=continue
);BOPENOUT:=STATUS(F)<=0;END;END;
FUNCTION WOPENIN(VAR F:WORDFILE):BOOLEAN;
BEGIN OPEN(F,NAMEOFFILE, readonly ,user_action:=USERRESET,
error:=continue);
IF STATUS(F)>0 THEN WOPENIN:=FALSE ELSE BEGIN RESET(F,error:=continue);
WOPENIN:=STATUS(F)<=0;END;FMTCOUNT:=0;END;
FUNCTION WOPENOUT(VAR F:WORDFILE):BOOLEAN;
BEGIN OPEN(F,NAMEOFFILE, new ,disposition:=delete,user_action:=
USERREWRITE,error:=continue);
IF STATUS(F)>0 THEN WOPENOUT:=FALSE ELSE BEGIN REWRITE(F,error:=continue
);WOPENOUT:=STATUS(F)<=0;END;FMTCOUNT:=0;END;{:27}{28:}
PROCEDURE ACLOSE(VAR F:ALPHAFILE);
BEGIN CLOSE(F,disposition:=save,error:=continue);END;
PROCEDURE BCLOSE(VAR F:BYTEFILE);
BEGIN CLOSE(F,disposition:=save,error:=continue);END;
PROCEDURE WCLOSE(VAR F:WORDFILE);
BEGIN CLOSE(F,disposition:=save,error:=continue);END;{:28}{31:}
FUNCTION INPUTLN(VAR F:ALPHAFILE;BYPASSEOLN:BOOLEAN):BOOLEAN;LABEL 40;
VAR LEN:INTEGER;K:0..BUFSIZE;BEGIN LAST:=FIRST;
IF STATUS(F)<>0 THEN INPUTLN:=FALSE ELSE BEGIN WHILE NOT EOLN(F)DO BEGIN
READ(F,AUXBUF,error:=continue);LEN:=AUXBUF.length;
IF LAST+LEN>=MAXBUFSTACK THEN BEGIN IF LAST+LEN<BUFSIZE THEN MAXBUFSTACK
:=LAST+LEN ELSE{35:}
IF FORMATIDENT=0 THEN BEGIN WRITELN(TERMOUT,'Buffer size exceeded!');
GOTO 9999;END ELSE BEGIN CURINPUT.LOCFIELD:=FIRST;
CURINPUT.LIMITFIELD:=LAST-1;OVERFLOW(257,BUFSIZE);END{:35};END;
FOR K:=LAST TO LAST+LEN-1 DO BUFFER[K]:=XORD[AUXBUF[K-LAST+1]];
LAST:=LAST+LEN;END;
40:IF LAST>FIRST THEN IF BUFFER[LAST-1]=32 THEN BEGIN LAST:=LAST-1;
GOTO 40;END;INPUTLN:=TRUE;READLN(F,error:=continue);END;END;{:31}{37:}
FUNCTION INITTERMINAL:BOOLEAN;LABEL 10;
VAR COMMANDLINE:PACKED ARRAY[1..256]OF CHAR;LEN:SIXTEENBITS;I:INTEGER;
BEGIN BEGIN OPEN(TERMIN, 'SYS$INPUT' );RESET(TERMIN);
INFAB:= PAS$FAB(TERMIN);INRAB:= PAS$RAB(TERMIN);END;
IF CMDLINEPRESENT THEN BEGIN cli$get_value('COMMAND_LINE',COMMANDLINE,
LEN);I:=1;WHILE(I<=LEN)AND(COMMANDLINE[I]=' ')DO I:=I+1;
IF I<=LEN THEN BEGIN CURINPUT.LOCFIELD:=FIRST;LAST:=FIRST;
WHILE I<=LEN DO BEGIN BUFFER[LAST]:=XORD[COMMANDLINE[I]];LAST:=LAST+1;
I:=I+1;END;INITTERMINAL:=TRUE;GOTO 10;END;END;
WHILE TRUE DO BEGIN WAKEUPTERMINAL;WRITE(TERMOUT,'**');
IF ODD(SELECTOR)THEN WRITELN(TERMOUT);
IF NOT INPUTLN(TERMIN,TRUE)THEN BEGIN WRITE(TERMOUT,CHR(13),CHR(10));
WRITELN(TERMOUT,'! End of file on the terminal... why?',CHR(13),CHR(10))
;INITTERMINAL:=FALSE;GOTO 10;END;CURINPUT.LOCFIELD:=FIRST;
WHILE(CURINPUT.LOCFIELD<LAST)AND(BUFFER[CURINPUT.LOCFIELD]=32)DO
CURINPUT.LOCFIELD:=CURINPUT.LOCFIELD+1;
IF CURINPUT.LOCFIELD<LAST THEN BEGIN INITTERMINAL:=TRUE;GOTO 10;END;
WRITELN(TERMOUT,'Please type the name of your input file.',CHR(13),CHR(
10));END;10:END;{:37}{43:}FUNCTION MAKESTRING:STRNUMBER;
BEGIN IF STRPTR=MAXSTRINGS THEN OVERFLOW(259,MAXSTRINGS-INITSTRPTR);
STRPTR:=STRPTR+1;STRSTART[STRPTR]:=POOLPTR;MAKESTRING:=STRPTR-1;END;
{:43}{45:}FUNCTION STREQBUF(S:STRNUMBER;K:INTEGER):BOOLEAN;LABEL 45;
VAR J:POOLPOINTER;RESULT:BOOLEAN;BEGIN J:=STRSTART[S];
WHILE J<STRSTART[S+1]DO BEGIN IF STRPOOL[J]<>BUFFER[K]THEN BEGIN RESULT
:=FALSE;GOTO 45;END;J:=J+1;K:=K+1;END;RESULT:=TRUE;45:STREQBUF:=RESULT;
END;{:45}{46:}FUNCTION STREQSTR(S,T:STRNUMBER):BOOLEAN;LABEL 45;
VAR J,K:POOLPOINTER;RESULT:BOOLEAN;BEGIN RESULT:=FALSE;
IF(STRSTART[S+1]-STRSTART[S])<>(STRSTART[T+1]-STRSTART[T])THEN GOTO 45;
J:=STRSTART[S];K:=STRSTART[T];
WHILE J<STRSTART[S+1]DO BEGIN IF STRPOOL[J]<>STRPOOL[K]THEN GOTO 45;
J:=J+1;K:=K+1;END;RESULT:=TRUE;45:STREQSTR:=RESULT;END;{:46}{47:}
FUNCTION GETSTRINGSSTARTED:BOOLEAN;LABEL 30,10;VAR K,L:0..255;M,N:CHAR;
G:STRNUMBER;A:INTEGER;C:BOOLEAN;BEGIN POOLPTR:=0;STRPTR:=0;
STRSTART[0]:=0;{48:}FOR K:=0 TO 255 DO BEGIN IF({49:}
(K<32)OR((K>126)AND(K<160))OR(K=255)OR((K>=160)AND NOT EIGHTQUAL){:49}
)THEN BEGIN BEGIN STRPOOL[POOLPTR]:=94;POOLPTR:=POOLPTR+1;END;
BEGIN STRPOOL[POOLPTR]:=94;POOLPTR:=POOLPTR+1;END;
IF K<64 THEN BEGIN STRPOOL[POOLPTR]:=K+64;POOLPTR:=POOLPTR+1;
END ELSE IF K<128 THEN BEGIN STRPOOL[POOLPTR]:=K-64;POOLPTR:=POOLPTR+1;
END ELSE BEGIN L:=K DIV 16;IF L<10 THEN BEGIN STRPOOL[POOLPTR]:=L+48;
POOLPTR:=POOLPTR+1;END ELSE BEGIN STRPOOL[POOLPTR]:=L+87;
POOLPTR:=POOLPTR+1;END;L:=K MOD 16;
IF L<10 THEN BEGIN STRPOOL[POOLPTR]:=L+48;POOLPTR:=POOLPTR+1;
END ELSE BEGIN STRPOOL[POOLPTR]:=L+87;POOLPTR:=POOLPTR+1;END;END;
END ELSE BEGIN STRPOOL[POOLPTR]:=K;POOLPTR:=POOLPTR+1;END;G:=MAKESTRING;
END{:48};{51:}NAMEOFFILE:=POOLNAME;
IF AOPENIN(POOLFILE)THEN BEGIN C:=FALSE;REPEAT{52:}
BEGIN IF EOF(POOLFILE)THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'! ETEX.POOL has no check sum.',CHR(13),CHR(10));
ACLOSE(POOLFILE);GETSTRINGSSTARTED:=FALSE;GOTO 10;END;
READ(POOLFILE,M,N);IF M='*'THEN{53:}BEGIN A:=0;K:=1;
WHILE TRUE DO BEGIN IF(XORD[N]<48)OR(XORD[N]>57)THEN BEGIN
WAKEUPTERMINAL;
WRITELN(TERMOUT,'! ETEX.POOL check sum doesn''t have nine digits.',CHR(
13),CHR(10));ACLOSE(POOLFILE);GETSTRINGSSTARTED:=FALSE;GOTO 10;END;
A:=10*A+XORD[N]-48;IF K=9 THEN GOTO 30;K:=K+1;READ(POOLFILE,N);END;
30:IF A<>340764991 THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'! ETEX.POOL doesn''t match; TANGLE me again.',CHR(13),
CHR(10));ACLOSE(POOLFILE);GETSTRINGSSTARTED:=FALSE;GOTO 10;END;C:=TRUE;
END{:53}
ELSE BEGIN IF(XORD[M]<48)OR(XORD[M]>57)OR(XORD[N]<48)OR(XORD[N]>57)THEN
BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'! ETEX.POOL line doesn''t begin with two digits.',CHR(
13),CHR(10));ACLOSE(POOLFILE);GETSTRINGSSTARTED:=FALSE;GOTO 10;END;
L:=XORD[M]*10+XORD[N]-48*11;
IF POOLPTR+L+STRINGVACANCIES>POOLSIZE THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'! You have to increase POOLSIZE.',CHR(13),CHR(10));
ACLOSE(POOLFILE);GETSTRINGSSTARTED:=FALSE;GOTO 10;END;
FOR K:=1 TO L DO BEGIN IF EOLN(POOLFILE)THEN M:=' 'ELSE READ(POOLFILE,M)
;BEGIN STRPOOL[POOLPTR]:=XORD[M];POOLPTR:=POOLPTR+1;END;END;
READLN(POOLFILE);G:=MAKESTRING;END;END{:52};UNTIL C;ACLOSE(POOLFILE);
GETSTRINGSSTARTED:=TRUE;END ELSE BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'! I can''t read ETEX.POOL.',CHR(13),CHR(10));
ACLOSE(POOLFILE);GETSTRINGSSTARTED:=FALSE;GOTO 10;END{:51};10:END;{:47}
{66:}PROCEDURE PRINTTWO(N:INTEGER);BEGIN N:=ABS(N)MOD 100;
PRINTCHAR(48+(N DIV 10));PRINTCHAR(48+(N MOD 10));END;{:66}{67:}
PROCEDURE PRINTHEX(N:INTEGER);VAR K:0..22;BEGIN K:=0;PRINTCHAR(34);
REPEAT DIG[K]:=N MOD 16;N:=N DIV 16;K:=K+1;UNTIL N=0;PRINTTHEDIGS(K);
END;{:67}{69:}PROCEDURE PRINTROMANINT(N:INTEGER);LABEL 10;
VAR J,K:POOLPOINTER;U,V:NONNEGATIVEINTEGER;BEGIN J:=STRSTART[261];
V:=1000;WHILE TRUE DO BEGIN WHILE N>=V DO BEGIN PRINTCHAR(STRPOOL[J]);
N:=N-V;END;IF N<=0 THEN GOTO 10;K:=J+2;U:=V DIV(STRPOOL[K-1]-48);
IF STRPOOL[K-1]=50 THEN BEGIN K:=K+2;U:=U DIV(STRPOOL[K-1]-48);END;
IF N+U>=V THEN BEGIN PRINTCHAR(STRPOOL[K]);N:=N+U;END ELSE BEGIN J:=J+2;
V:=V DIV(STRPOOL[J-1]-48);END;END;10:END;{:69}{70:}
PROCEDURE PRINTCURRENTSTRING;VAR J:POOLPOINTER;
BEGIN J:=STRSTART[STRPTR];
WHILE J<POOLPTR DO BEGIN PRINTCHAR(STRPOOL[J]);J:=J+1;END;END;{:70}{71:}
PROCEDURE TERMINPUT;VAR K:0..BUFSIZE;
BEGIN IF ODD(SELECTOR)THEN WRITELN(TERMOUT);
IF NOT INPUTLN(TERMIN,TRUE)THEN FATALERROR(262);INRAB^.RAB$V_PTA:=FALSE;
TERMOFFSET:=0;SELECTOR:=SELECTOR-1;
IF LAST<>FIRST THEN FOR K:=FIRST TO LAST-1 DO PRINT(BUFFER[K]);PRINTLN;
SELECTOR:=SELECTOR+1;END;{:71}{91:}PROCEDURE INTERROR(N:INTEGER);
BEGIN PRINT(287);PRINTINT(N);PRINTCHAR(41);ERROR;END;{:91}{92:}
PROCEDURE NORMALIZESELECTOR;
BEGIN IF LOGOPENED THEN SELECTOR:=19 ELSE SELECTOR:=17;
IF JOBNAME=0 THEN OPENLOGFILE;
IF INTERACTION=0 THEN SELECTOR:=SELECTOR-1;END;{:92}{98:}
PROCEDURE PAUSEFORINSTRUCTIONS;
BEGIN IF OKTOINTERRUPT THEN BEGIN INTERACTION:=3;
IF(SELECTOR=18)OR(SELECTOR=16)THEN SELECTOR:=SELECTOR+1;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(297);END;BEGIN HELPPTR:=3;HELPLINE[2]:=298;
HELPLINE[1]:=299;HELPLINE[0]:=300;END;DELETIONSALLOWED:=FALSE;ERROR;
DELETIONSALLOWED:=TRUE;INTERRUPT:=0;END;END;{:98}{100:}
FUNCTION HALF(X:INTEGER):INTEGER;
BEGIN IF ODD(X)THEN HALF:=(X+1)DIV 2 ELSE HALF:=X DIV 2;END;{:100}{102:}
FUNCTION ROUNDDECIMALS(K:SMALLNUMBER):SCALED;VAR A:INTEGER;BEGIN A:=0;
WHILE K>0 DO BEGIN K:=K-1;A:=(A+DIG[K]*131072)DIV 10;END;
ROUNDDECIMALS:=(A+1)DIV 2;END;{:102}{103:}
PROCEDURE PRINTSCALED(S:SCALED);VAR DELTA:SCALED;
BEGIN IF S<0 THEN BEGIN PRINTCHAR(45);S:=-S;END;PRINTINT(S DIV 65536);
PRINTCHAR(46);S:=10*(S MOD 65536)+5;DELTA:=10;
REPEAT IF DELTA>65536 THEN S:=S-17232;PRINTCHAR(48+(S DIV 65536));
S:=10*(S MOD 65536);DELTA:=DELTA*10;UNTIL S<=DELTA;END;{:103}{105:}
FUNCTION MULTANDADD(N:INTEGER;X,Y,MAXANSWER:SCALED):SCALED;
BEGIN IF N<0 THEN BEGIN X:=-X;N:=-N;END;
IF N=0 THEN MULTANDADD:=Y ELSE IF((X<=(MAXANSWER-Y)DIV N)AND(-X<=(
MAXANSWER+Y)DIV N))THEN MULTANDADD:=N*X+Y ELSE BEGIN ARITHERROR:=TRUE;
MULTANDADD:=0;END;END;{:105}{106:}FUNCTION XOVERN(X:SCALED;
N:INTEGER):SCALED;VAR NEGATIVE:BOOLEAN;BEGIN NEGATIVE:=FALSE;
IF N=0 THEN BEGIN ARITHERROR:=TRUE;XOVERN:=0;REMAINDER:=X;
END ELSE BEGIN IF N<0 THEN BEGIN X:=-X;N:=-N;NEGATIVE:=TRUE;END;
IF X>=0 THEN BEGIN XOVERN:=X DIV N;REMAINDER:=X MOD N;
END ELSE BEGIN XOVERN:=-((-X)DIV N);REMAINDER:=-((-X)MOD N);END;END;
IF NEGATIVE THEN REMAINDER:=-REMAINDER;END;{:106}{107:}
FUNCTION XNOVERD(X:SCALED;N,D:INTEGER):SCALED;VAR POSITIVE:BOOLEAN;
T,U,V:NONNEGATIVEINTEGER;
BEGIN IF X>=0 THEN POSITIVE:=TRUE ELSE BEGIN X:=-X;POSITIVE:=FALSE;END;
T:=(X MOD 32768)*N;U:=(X DIV 32768)*N+(T DIV 32768);
V:=(U MOD D)*32768+(T MOD 32768);
IF U DIV D>=32768 THEN ARITHERROR:=TRUE ELSE U:=32768*(U DIV D)+(V DIV D
);IF POSITIVE THEN BEGIN XNOVERD:=U;REMAINDER:=V MOD D;
END ELSE BEGIN XNOVERD:=-U;REMAINDER:=-(V MOD D);END;END;{:107}{108:}
FUNCTION BADNESS(T,S:SCALED):HALFWORD;VAR R:INTEGER;
BEGIN IF T=0 THEN BADNESS:=0 ELSE IF S<=0 THEN BADNESS:=10000 ELSE BEGIN
IF T<=7230584 THEN R:=(T*297)DIV S ELSE IF S>=1663497 THEN R:=T DIV(S
DIV 297)ELSE R:=T;
IF R>1290 THEN BADNESS:=10000 ELSE BADNESS:=(R*R*R+131072)DIV 262144;
END;END;{:108}{114:}{PROCEDURE PRINTWORD(W:MEMORYWORD);
BEGIN PRINTINT(W.INT);PRINTCHAR(32);PRINTSCALED(W.INT);PRINTCHAR(32);
PRINTSCALED(ROUND(65536*DBLE(W.GR)));PRINTLN;PRINTINT(W.HH.LH);
PRINTCHAR(61);PRINTINT(W.HH.B0);PRINTCHAR(58);PRINTINT(W.HH.B1);
PRINTCHAR(59);PRINTINT(W.HH.RH);PRINTCHAR(32);PRINTINT(W.QQQQ.B0);
PRINTCHAR(58);PRINTINT(W.QQQQ.B1);PRINTCHAR(58);PRINTINT(W.QQQQ.B2);
PRINTCHAR(58);PRINTINT(W.QQQQ.B3);END;}{:114}{119:}{292:}
PROCEDURE SHOWTOKENLIST(P,Q:INTEGER;L:INTEGER);LABEL 10;VAR M,C:INTEGER;
MATCHCHR:ASCIICODE;N:ASCIICODE;BEGIN MATCHCHR:=35;N:=48;TALLY:=0;
WHILE(P<>0)AND(TALLY<L)DO BEGIN IF P=Q THEN{320:}
BEGIN FIRSTCOUNT:=TALLY;TRICKCOUNT:=TALLY+1+ERRORLINE-HALFERRORLINE;
IF TRICKCOUNT<ERRORLINE THEN TRICKCOUNT:=ERRORLINE;END{:320};{293:}
IF(P<HIMEMMIN)OR(P>MEMEND)THEN BEGIN PRINTESC(310);GOTO 10;END;
IF MEM[P].HH.LH>=4095 THEN PRINTCS(MEM[P].HH.LH-4095)ELSE BEGIN M:=MEM[P
].HH.LH DIV 256;C:=MEM[P].HH.LH MOD 256;
IF MEM[P].HH.LH<0 THEN PRINTESC(562)ELSE{294:}
CASE M OF 1,2,3,4,7,8,10,11,12:PRINT(C);6:BEGIN PRINT(C);PRINT(C);END;
5:BEGIN PRINT(MATCHCHR);
IF C<=9 THEN PRINTCHAR(C+48)ELSE BEGIN PRINTCHAR(33);GOTO 10;END;END;
13:BEGIN MATCHCHR:=C;PRINT(C);N:=N+1;PRINTCHAR(N);IF N>57 THEN GOTO 10;
END;14:IF C=0 THEN PRINT(563);OTHERWISE PRINTESC(562)END{:294};END{:293}
;P:=MEM[P].HH.RH;END;IF P<>0 THEN PRINTESC(411);10:END;{:292}{306:}
PROCEDURE RUNAWAY;VAR P:HALFWORD;
BEGIN IF SCANNERSTATUS>1 THEN BEGIN PRINTNL(577);
CASE SCANNERSTATUS OF 2:BEGIN PRINT(578);P:=DEFREF;END;
3:BEGIN PRINT(579);P:=327141;END;4:BEGIN PRINT(580);P:=327140;END;
5:BEGIN PRINT(581);P:=DEFREF;END;END;PRINTCHAR(63);PRINTLN;
SHOWTOKENLIST(MEM[P].HH.RH,0,ERRORLINE-10);END;END;{:306}{:119}{120:}
FUNCTION GETAVAIL:HALFWORD;VAR P:HALFWORD;BEGIN P:=AVAIL;
IF P<>0 THEN AVAIL:=MEM[AVAIL].HH.RH ELSE IF MEMEND<MEMMAX THEN BEGIN
MEMEND:=MEMEND+1;P:=MEMEND;END ELSE BEGIN HIMEMMIN:=HIMEMMIN-1;
P:=HIMEMMIN;IF HIMEMMIN<=LOMEMMAX THEN BEGIN RUNAWAY;
OVERFLOW(301,MEMMAX+1-MEMMIN);END;END;MEM[P].HH.RH:=0;
DYNUSED:=DYNUSED+1;GETAVAIL:=P;END;{:120}{123:}
PROCEDURE FLUSHLIST(P:HALFWORD);VAR Q,R:HALFWORD;
BEGIN IF P<>0 THEN BEGIN R:=P;REPEAT Q:=R;R:=MEM[R].HH.RH;
DYNUSED:=DYNUSED-1;UNTIL R=0;MEM[Q].HH.RH:=AVAIL;AVAIL:=P;END;END;{:123}
{125:}FUNCTION GETNODE(S:INTEGER):HALFWORD;LABEL 40,10,20;
VAR P:HALFWORD;Q:HALFWORD;R:INTEGER;T:INTEGER;BEGIN 20:P:=ROVER;
REPEAT{127:}Q:=P+MEM[P].HH.LH;
WHILE(MEM[Q].HH.RH=327145)DO BEGIN T:=MEM[Q+1].HH.RH;
IF Q=ROVER THEN ROVER:=T;MEM[T+1].HH.LH:=MEM[Q+1].HH.LH;
MEM[MEM[Q+1].HH.LH+1].HH.RH:=T;Q:=Q+MEM[Q].HH.LH;END;R:=Q-S;
IF R>P+1 THEN{128:}BEGIN MEM[P].HH.LH:=R-P;ROVER:=P;GOTO 40;END{:128};
IF R=P THEN IF MEM[P+1].HH.RH<>P THEN{129:}BEGIN ROVER:=MEM[P+1].HH.RH;
T:=MEM[P+1].HH.LH;MEM[ROVER+1].HH.LH:=T;MEM[T+1].HH.RH:=ROVER;GOTO 40;
END{:129};MEM[P].HH.LH:=Q-P{:127};P:=MEM[P+1].HH.RH;UNTIL P=ROVER;
IF S=1073741824 THEN BEGIN GETNODE:=327145;GOTO 10;END;
IF LOMEMMAX+2<HIMEMMIN THEN IF LOMEMMAX+2<=327145 THEN{126:}
BEGIN IF HIMEMMIN-LOMEMMAX>=1998 THEN T:=LOMEMMAX+1000 ELSE T:=LOMEMMAX
+1+(HIMEMMIN-LOMEMMAX)DIV 2;P:=MEM[ROVER+1].HH.LH;Q:=LOMEMMAX;
MEM[P+1].HH.RH:=Q;MEM[ROVER+1].HH.LH:=Q;IF T>327145 THEN T:=327145;
MEM[Q+1].HH.RH:=ROVER;MEM[Q+1].HH.LH:=P;MEM[Q].HH.RH:=327145;
MEM[Q].HH.LH:=T-LOMEMMAX;LOMEMMAX:=T;MEM[LOMEMMAX].HH.RH:=0;
MEM[LOMEMMAX].HH.LH:=0;ROVER:=Q;GOTO 20;END{:126};
OVERFLOW(301,MEMMAX+1-MEMMIN);40:MEM[R].HH.RH:=0;VARUSED:=VARUSED+S;
GETNODE:=R;10:END;{:125}{130:}PROCEDURE FREENODE(P:HALFWORD;S:HALFWORD);
VAR Q:HALFWORD;BEGIN MEM[P].HH.LH:=S;MEM[P].HH.RH:=327145;
Q:=MEM[ROVER+1].HH.LH;MEM[P+1].HH.LH:=Q;MEM[P+1].HH.RH:=ROVER;
MEM[ROVER+1].HH.LH:=P;MEM[Q+1].HH.RH:=P;VARUSED:=VARUSED-S;END;{:130}
{131:}PROCEDURE SORTAVAIL;VAR P,Q,R:HALFWORD;OLDROVER:HALFWORD;
BEGIN P:=GETNODE(1073741824);P:=MEM[ROVER+1].HH.RH;
MEM[ROVER+1].HH.RH:=327145;OLDROVER:=ROVER;WHILE P<>OLDROVER DO{132:}
IF P<ROVER THEN BEGIN Q:=P;P:=MEM[Q+1].HH.RH;MEM[Q+1].HH.RH:=ROVER;
ROVER:=Q;END ELSE BEGIN Q:=ROVER;
WHILE MEM[Q+1].HH.RH<P DO Q:=MEM[Q+1].HH.RH;R:=MEM[P+1].HH.RH;
MEM[P+1].HH.RH:=MEM[Q+1].HH.RH;MEM[Q+1].HH.RH:=P;P:=R;END{:132};
P:=ROVER;
WHILE MEM[P+1].HH.RH<>327145 DO BEGIN MEM[MEM[P+1].HH.RH+1].HH.LH:=P;
P:=MEM[P+1].HH.RH;END;MEM[P+1].HH.RH:=ROVER;MEM[ROVER+1].HH.LH:=P;END;
{:131}{136:}FUNCTION NEWNULLBOX:HALFWORD;VAR P:HALFWORD;
BEGIN P:=GETNODE(7);MEM[P].HH.B0:=0;MEM[P].HH.B1:=0;MEM[P+1].INT:=0;
MEM[P+2].INT:=0;MEM[P+3].INT:=0;MEM[P+4].INT:=0;MEM[P+5].HH.RH:=0;
MEM[P+5].HH.B0:=0;MEM[P+5].HH.B1:=0;MEM[P+6].GR:=0.0;NEWNULLBOX:=P;END;
{:136}{139:}FUNCTION NEWRULE:HALFWORD;VAR P:HALFWORD;
BEGIN P:=GETNODE(4);MEM[P].HH.B0:=2;MEM[P].HH.B1:=0;
MEM[P+1].INT:=-1073741824;MEM[P+2].INT:=-1073741824;
MEM[P+3].INT:=-1073741824;NEWRULE:=P;END;{:139}{144:}
FUNCTION NEWLIGATURE(F,C:QUARTERWORD;Q:HALFWORD):HALFWORD;
VAR P:HALFWORD;BEGIN P:=GETNODE(2);MEM[P].HH.B0:=6;MEM[P+1].HH.B0:=F;
MEM[P+1].HH.B1:=C;MEM[P+1].HH.RH:=Q;MEM[P].HH.B1:=0;NEWLIGATURE:=P;END;
FUNCTION NEWLIGITEM(C:QUARTERWORD):HALFWORD;VAR P:HALFWORD;
BEGIN P:=GETNODE(2);MEM[P].HH.B1:=C;MEM[P+1].HH.RH:=0;NEWLIGITEM:=P;END;
{:144}{145:}FUNCTION NEWDISC:HALFWORD;VAR P:HALFWORD;
BEGIN P:=GETNODE(2);MEM[P].HH.B0:=7;MEM[P].HH.B1:=0;MEM[P+1].HH.LH:=0;
MEM[P+1].HH.RH:=0;NEWDISC:=P;END;{:145}{147:}FUNCTION NEWMATH(W:SCALED;
S:SMALLNUMBER):HALFWORD;VAR P:HALFWORD;BEGIN P:=GETNODE(2);
MEM[P].HH.B0:=9;MEM[P].HH.B1:=S;MEM[P+1].INT:=W;NEWMATH:=P;END;{:147}
{151:}FUNCTION NEWSPEC(P:HALFWORD):HALFWORD;VAR Q:HALFWORD;
BEGIN Q:=GETNODE(4);MEM[Q]:=MEM[P];MEM[Q].HH.RH:=0;
MEM[Q+1].INT:=MEM[P+1].INT;MEM[Q+2].INT:=MEM[P+2].INT;
MEM[Q+3].INT:=MEM[P+3].INT;NEWSPEC:=Q;END;{:151}{152:}
FUNCTION NEWPARAMGLUE(N:SMALLNUMBER):HALFWORD;VAR P:HALFWORD;Q:HALFWORD;
BEGIN P:=GETNODE(2);MEM[P].HH.B0:=10;MEM[P].HH.B1:=N+1;
MEM[P+1].HH.RH:=0;Q:={224:}EQTB[10782+N].HH.RH{:224};MEM[P+1].HH.LH:=Q;
MEM[Q].HH.RH:=MEM[Q].HH.RH+1;NEWPARAMGLUE:=P;END;{:152}{153:}
FUNCTION NEWGLUE(Q:HALFWORD):HALFWORD;VAR P:HALFWORD;
BEGIN P:=GETNODE(2);MEM[P].HH.B0:=10;MEM[P].HH.B1:=0;MEM[P+1].HH.RH:=0;
MEM[P+1].HH.LH:=Q;MEM[Q].HH.RH:=MEM[Q].HH.RH+1;NEWGLUE:=P;END;{:153}
{154:}FUNCTION NEWSKIPPARAM(N:SMALLNUMBER):HALFWORD;VAR P:HALFWORD;
BEGIN TEMPPTR:=NEWSPEC({224:}EQTB[10782+N].HH.RH{:224});
P:=NEWGLUE(TEMPPTR);MEM[TEMPPTR].HH.RH:=0;MEM[P].HH.B1:=N+1;
NEWSKIPPARAM:=P;END;{:154}{156:}FUNCTION NEWKERN(W:SCALED):HALFWORD;
VAR P:HALFWORD;BEGIN P:=GETNODE(2);MEM[P].HH.B0:=11;MEM[P].HH.B1:=0;
MEM[P+1].INT:=W;NEWKERN:=P;END;{:156}{158:}
FUNCTION NEWPENALTY(M:INTEGER):HALFWORD;VAR P:HALFWORD;
BEGIN P:=GETNODE(2);MEM[P].HH.B0:=12;MEM[P].HH.B1:=0;MEM[P+1].INT:=M;
NEWPENALTY:=P;END;{:158}{167:}{PROCEDURE CHECKMEM(PRINTLOCS:BOOLEAN);
LABEL 31,32;VAR P,Q:HALFWORD;CLOBBERED:BOOLEAN;
BEGIN FOR P:=MEMMIN TO LOMEMMAX DO FREE[P]:=FALSE;
FOR P:=HIMEMMIN TO MEMEND DO FREE[P]:=FALSE;[168:]P:=AVAIL;Q:=0;
CLOBBERED:=FALSE;
WHILE P<>0 DO BEGIN IF(P>MEMEND)OR(P<HIMEMMIN)THEN CLOBBERED:=TRUE ELSE
IF FREE[P]THEN CLOBBERED:=TRUE;IF CLOBBERED THEN BEGIN PRINTNL(302);
PRINTINT(Q);GOTO 31;END;FREE[P]:=TRUE;Q:=P;P:=MEM[Q].HH.RH;END;
31:[:168];[169:]P:=ROVER;Q:=0;CLOBBERED:=FALSE;
REPEAT IF(P>=LOMEMMAX)OR(P<MEMMIN)THEN CLOBBERED:=TRUE ELSE IF(MEM[P+1].
HH.RH>=LOMEMMAX)OR(MEM[P+1].HH.RH<MEMMIN)THEN CLOBBERED:=TRUE ELSE IF
NOT((MEM[P].HH.RH=327145))OR(MEM[P].HH.LH<2)OR(P+MEM[P].HH.LH>LOMEMMAX)
OR(MEM[MEM[P+1].HH.RH+1].HH.LH<>P)THEN CLOBBERED:=TRUE;
IF CLOBBERED THEN BEGIN PRINTNL(303);PRINTINT(Q);GOTO 32;END;
FOR Q:=P TO P+MEM[P].HH.LH-1 DO BEGIN IF FREE[Q]THEN BEGIN PRINTNL(304);
PRINTINT(Q);GOTO 32;END;FREE[Q]:=TRUE;END;Q:=P;P:=MEM[P+1].HH.RH;
UNTIL P=ROVER;32:[:169];[170:]P:=MEMMIN;
WHILE P<=LOMEMMAX DO BEGIN IF(MEM[P].HH.RH=327145)THEN BEGIN PRINTNL(305
);PRINTINT(P);END;WHILE(P<=LOMEMMAX)AND NOT FREE[P]DO P:=P+1;
WHILE(P<=LOMEMMAX)AND FREE[P]DO P:=P+1;END[:170];
IF PRINTLOCS THEN[171:]BEGIN PRINTNL(306);
FOR P:=MEMMIN TO LOMEMMAX DO IF NOT FREE[P]AND((P>WASLOMAX)OR WASFREE[P]
)THEN BEGIN PRINTCHAR(32);PRINTINT(P);END;
FOR P:=HIMEMMIN TO MEMEND DO IF NOT FREE[P]AND((P<WASHIMIN)OR(P>
WASMEMEND)OR WASFREE[P])THEN BEGIN PRINTCHAR(32);PRINTINT(P);END;
END[:171];FOR P:=MEMMIN TO LOMEMMAX DO WASFREE[P]:=FREE[P];
FOR P:=HIMEMMIN TO MEMEND DO WASFREE[P]:=FREE[P];WASMEMEND:=MEMEND;
WASLOMAX:=LOMEMMAX;WASHIMIN:=HIMEMMIN;END;}{:167}{172:}
{PROCEDURE SEARCHMEM(P:HALFWORD);VAR Q:INTEGER;
BEGIN FOR Q:=MEMMIN TO LOMEMMAX DO BEGIN IF MEM[Q].HH.RH=P THEN BEGIN
PRINTNL(307);PRINTINT(Q);PRINTCHAR(41);END;
IF MEM[Q].HH.LH=P THEN BEGIN PRINTNL(308);PRINTINT(Q);PRINTCHAR(41);END;
END;
FOR Q:=HIMEMMIN TO MEMEND DO BEGIN IF MEM[Q].HH.RH=P THEN BEGIN PRINTNL(
307);PRINTINT(Q);PRINTCHAR(41);END;
IF MEM[Q].HH.LH=P THEN BEGIN PRINTNL(308);PRINTINT(Q);PRINTCHAR(41);END;
END;
[255:]FOR Q:=1 TO 11838 DO BEGIN IF EQTB[Q].HH.RH=P THEN BEGIN PRINTNL(
504);PRINTINT(Q);PRINTCHAR(41);END;END[:255];
[285:]IF SAVEPTR>0 THEN FOR Q:=0 TO SAVEPTR-1 DO BEGIN IF SAVESTACK[Q].
HH.RH=P THEN BEGIN PRINTNL(554);PRINTINT(Q);PRINTCHAR(41);END;END[:285];
[933:]FOR Q:=0 TO 503 DO BEGIN IF HYPHLIST[Q]=P THEN BEGIN PRINTNL(949);
PRINTINT(Q);PRINTCHAR(41);END;END[:933];END;}{:172}{174:}
PROCEDURE SHORTDISPLAY(P:INTEGER);VAR N:INTEGER;
BEGIN WHILE P>MEMMIN DO BEGIN IF(P>=HIMEMMIN)THEN BEGIN IF P<=MEMEND
THEN BEGIN IF MEM[P].HH.B0<>FONTINSHORTDISPLAY THEN BEGIN IF(MEM[P].HH.
B0<0)OR(MEM[P].HH.B0>FONTMAX)THEN PRINTCHAR(42)ELSE{267:}
PRINTESC(HASH[10524+MEM[P].HH.B0].RH){:267};PRINTCHAR(32);
FONTINSHORTDISPLAY:=MEM[P].HH.B0;END;PRINT(MEM[P].HH.B1);END;
END ELSE{175:}CASE MEM[P].HH.B0 OF 0,1,3,8,4,5,13:PRINT(309);
2:PRINTCHAR(124);10:IF MEM[P+1].HH.LH<>0 THEN PRINTCHAR(32);
9:IF MEM[P].HH.B1>=4 THEN PRINT(309)ELSE PRINTCHAR(36);
6:SHORTDISPLAY(MEM[P+1].HH.RH);7:BEGIN SHORTDISPLAY(MEM[P+1].HH.LH);
SHORTDISPLAY(MEM[P+1].HH.RH);N:=MEM[P].HH.B1;
WHILE N>0 DO BEGIN IF MEM[P].HH.RH<>0 THEN P:=MEM[P].HH.RH;N:=N-1;END;
END;OTHERWISE END{:175};P:=MEM[P].HH.RH;END;END;{:174}{176:}
PROCEDURE PRINTFONTANDCHAR(P:INTEGER);
BEGIN IF P>MEMEND THEN PRINTESC(310)ELSE BEGIN IF(MEM[P].HH.B0<0)OR(MEM[
P].HH.B0>FONTMAX)THEN PRINTCHAR(42)ELSE{267:}
PRINTESC(HASH[10524+MEM[P].HH.B0].RH){:267};PRINTCHAR(32);
PRINT(MEM[P].HH.B1);END;END;PROCEDURE PRINTMARK(P:INTEGER);
BEGIN PRINTCHAR(123);
IF(P<HIMEMMIN)OR(P>MEMEND)THEN PRINTESC(310)ELSE SHOWTOKENLIST(MEM[P].HH
.RH,0,MAXPRINTLINE-10);PRINTCHAR(125);END;
PROCEDURE PRINTRULEDIMEN(D:SCALED);
BEGIN IF(D=-1073741824)THEN PRINTCHAR(42)ELSE PRINTSCALED(D);END;{:176}
{177:}PROCEDURE PRINTGLUE(D:SCALED;ORDER:INTEGER;S:STRNUMBER);
BEGIN PRINTSCALED(D);
IF(ORDER<0)OR(ORDER>3)THEN PRINT(311)ELSE IF ORDER>0 THEN BEGIN PRINT(
312);WHILE ORDER>1 DO BEGIN PRINTCHAR(108);ORDER:=ORDER-1;END;
END ELSE IF S<>0 THEN PRINT(S);END;{:177}{178:}
PROCEDURE PRINTSPEC(P:INTEGER;S:STRNUMBER);
BEGIN IF(P<MEMMIN)OR(P>=LOMEMMAX)THEN PRINTCHAR(42)ELSE BEGIN
PRINTSCALED(MEM[P+1].INT);IF S<>0 THEN PRINT(S);
IF MEM[P+2].INT<>0 THEN BEGIN PRINT(313);
PRINTGLUE(MEM[P+2].INT,MEM[P].HH.B0,S);END;
IF MEM[P+3].INT<>0 THEN BEGIN PRINT(314);
PRINTGLUE(MEM[P+3].INT,MEM[P].HH.B1,S);END;END;END;{:178}{179:}{691:}
PROCEDURE PRINTFAMANDCHAR(P:HALFWORD);BEGIN PRINTESC(467);
PRINTINT(MEM[P].HH.B0);PRINTCHAR(32);PRINT(MEM[P].HH.B1);END;
PROCEDURE PRINTDELIMITER(P:HALFWORD);VAR A:INTEGER;
BEGIN A:=MEM[P].QQQQ.B0*256+MEM[P].QQQQ.B1;
A:=A*4096+MEM[P].QQQQ.B2*256+MEM[P].QQQQ.B3;
IF A<0 THEN PRINTINT(A)ELSE PRINTHEX(A);END;{:691}{692:}
PROCEDURE SHOWINFO;FORWARD;PROCEDURE PRINTSUBSIDIARYDATA(P:HALFWORD;
C:ASCIICODE);
BEGIN IF(POOLPTR-STRSTART[STRPTR])>=DEPTHTHRESHOLD THEN BEGIN IF MEM[P].
HH.RH<>0 THEN PRINT(315);END ELSE BEGIN BEGIN STRPOOL[POOLPTR]:=C;
POOLPTR:=POOLPTR+1;END;TEMPPTR:=P;CASE MEM[P].HH.RH OF 1:BEGIN PRINTLN;
PRINTCURRENTSTRING;PRINTFAMANDCHAR(P);END;2:SHOWINFO;
3:IF MEM[P].HH.LH=0 THEN BEGIN PRINTLN;PRINTCURRENTSTRING;PRINT(868);
END ELSE SHOWINFO;OTHERWISE END;POOLPTR:=POOLPTR-1;END;END;{:692}{694:}
PROCEDURE PRINTSTYLE(C:INTEGER);BEGIN CASE C DIV 2 OF 0:PRINTESC(869);
1:PRINTESC(870);2:PRINTESC(871);3:PRINTESC(872);OTHERWISE PRINT(873)END;
END;{:694}{225:}PROCEDURE PRINTSKIPPARAM(N:INTEGER);
BEGIN CASE N OF 0:PRINTESC(379);1:PRINTESC(380);2:PRINTESC(381);
3:PRINTESC(382);4:PRINTESC(383);5:PRINTESC(384);6:PRINTESC(385);
7:PRINTESC(386);8:PRINTESC(387);9:PRINTESC(388);10:PRINTESC(389);
11:PRINTESC(390);12:PRINTESC(391);13:PRINTESC(392);14:PRINTESC(393);
15:PRINTESC(394);16:PRINTESC(395);17:PRINTESC(396);
OTHERWISE PRINT(397)END;END;{:225}{:179}{182:}
PROCEDURE SHOWNODELIST(P:INTEGER);LABEL 10;VAR N:INTEGER;G:DOUBLE;
BEGIN IF(POOLPTR-STRSTART[STRPTR])>DEPTHTHRESHOLD THEN BEGIN IF P>0 THEN
PRINT(315);GOTO 10;END;N:=0;WHILE P>MEMMIN DO BEGIN PRINTLN;
PRINTCURRENTSTRING;IF P>MEMEND THEN BEGIN PRINT(316);GOTO 10;END;N:=N+1;
IF N>BREADTHMAX THEN BEGIN PRINT(317);GOTO 10;END;{183:}
IF(P>=HIMEMMIN)THEN PRINTFONTANDCHAR(P)ELSE CASE MEM[P].HH.B0 OF 0,1,13:
{184:}
BEGIN IF MEM[P].HH.B0=0 THEN PRINTESC(104)ELSE IF MEM[P].HH.B0=1 THEN
PRINTESC(118)ELSE PRINTESC(319);PRINT(320);PRINTSCALED(MEM[P+3].INT);
PRINTCHAR(43);PRINTSCALED(MEM[P+2].INT);PRINT(321);
PRINTSCALED(MEM[P+1].INT);IF MEM[P].HH.B0=13 THEN{185:}
BEGIN IF MEM[P].HH.B1<>0 THEN BEGIN PRINT(287);PRINTINT(MEM[P].HH.B1+1);
PRINT(323);END;IF MEM[P+6].INT<>0 THEN BEGIN PRINT(324);
PRINTGLUE(MEM[P+6].INT,MEM[P+5].HH.B1,0);END;
IF MEM[P+4].INT<>0 THEN BEGIN PRINT(325);
PRINTGLUE(MEM[P+4].INT,MEM[P+5].HH.B0,0);END;END{:185}ELSE BEGIN{186:}
G:=DBLE(MEM[P+6].GR);
IF(G<>0.0D0)AND(MEM[P+5].HH.B0<>0)THEN BEGIN PRINT(326);
IF MEM[P+5].HH.B0=2 THEN PRINT(327);
IF(MEM[P+6].GR::VAXFFLOAT.SIGN AND(MEM[P+6].GR::VAXFFLOAT.EXPO=0))THEN
PRINT(328)ELSE IF ABS(G)>20000.0D0 THEN BEGIN IF G>0.0D0 THEN PRINTCHAR(
62)ELSE PRINT(329);PRINTGLUE(20000*65536,MEM[P+5].HH.B1,0);
END ELSE PRINTGLUE(ROUND(65536*G),MEM[P+5].HH.B1,0);END{:186};
IF MEM[P+4].INT<>0 THEN BEGIN PRINT(322);PRINTSCALED(MEM[P+4].INT);END;
IF(ETEXMODE=1)THEN{1438:}
IF(MEM[P].HH.B0=0)AND(MEM[P].HH.B1=2)THEN PRINT(1368){:1438};END;
BEGIN BEGIN STRPOOL[POOLPTR]:=46;POOLPTR:=POOLPTR+1;END;
SHOWNODELIST(MEM[P+5].HH.RH);POOLPTR:=POOLPTR-1;END;END{:184};2:{187:}
BEGIN PRINTESC(330);PRINTRULEDIMEN(MEM[P+3].INT);PRINTCHAR(43);
PRINTRULEDIMEN(MEM[P+2].INT);PRINT(321);PRINTRULEDIMEN(MEM[P+1].INT);
END{:187};3:{188:}BEGIN PRINTESC(331);PRINTINT(MEM[P].HH.B1);PRINT(332);
PRINTSCALED(MEM[P+3].INT);PRINT(333);PRINTSPEC(MEM[P+4].HH.RH,0);
PRINTCHAR(44);PRINTSCALED(MEM[P+2].INT);PRINT(334);
PRINTINT(MEM[P+1].INT);BEGIN BEGIN STRPOOL[POOLPTR]:=46;
POOLPTR:=POOLPTR+1;END;SHOWNODELIST(MEM[P+4].HH.LH);POOLPTR:=POOLPTR-1;
END;END{:188};8:{1356:}
CASE MEM[P].HH.B1 OF 0:BEGIN PRINTWRITEWHATSIT(1295,P);PRINTCHAR(61);
PRINTFILENAME(MEM[P+1].HH.RH,MEM[P+2].HH.LH,MEM[P+2].HH.RH);END;
1:BEGIN PRINTWRITEWHATSIT(603,P);PRINTMARK(MEM[P+1].HH.RH);END;
2:PRINTWRITEWHATSIT(1296,P);3:BEGIN PRINTESC(1297);
PRINTMARK(MEM[P+1].HH.RH);END;4:BEGIN PRINTESC(1299);
PRINTINT(MEM[P+1].HH.RH);PRINT(1302);PRINTINT(MEM[P+1].HH.B0);
PRINTCHAR(44);PRINTINT(MEM[P+1].HH.B1);PRINTCHAR(41);END;
OTHERWISE PRINT(1303)END{:1356};10:{189:}IF MEM[P].HH.B1>=100 THEN{190:}
BEGIN PRINTESC(339);
IF MEM[P].HH.B1=101 THEN PRINTCHAR(99)ELSE IF MEM[P].HH.B1=102 THEN
PRINTCHAR(120);PRINT(340);PRINTSPEC(MEM[P+1].HH.LH,0);
BEGIN BEGIN STRPOOL[POOLPTR]:=46;POOLPTR:=POOLPTR+1;END;
SHOWNODELIST(MEM[P+1].HH.RH);POOLPTR:=POOLPTR-1;END;END{:190}
ELSE BEGIN PRINTESC(335);IF MEM[P].HH.B1<>0 THEN BEGIN PRINTCHAR(40);
IF MEM[P].HH.B1<98 THEN PRINTSKIPPARAM(MEM[P].HH.B1-1)ELSE IF MEM[P].HH.
B1=98 THEN PRINTESC(336)ELSE PRINTESC(337);PRINTCHAR(41);END;
IF MEM[P].HH.B1<>98 THEN BEGIN PRINTCHAR(32);
IF MEM[P].HH.B1<98 THEN PRINTSPEC(MEM[P+1].HH.LH,0)ELSE PRINTSPEC(MEM[P
+1].HH.LH,338);END;END{:189};11:{191:}
IF MEM[P].HH.B1<>99 THEN BEGIN PRINTESC(341);
IF MEM[P].HH.B1<>0 THEN PRINTCHAR(32);PRINTSCALED(MEM[P+1].INT);
IF MEM[P].HH.B1=2 THEN PRINT(342);END ELSE BEGIN PRINTESC(343);
PRINTSCALED(MEM[P+1].INT);PRINT(338);END{:191};9:{192:}
IF MEM[P].HH.B1>1 THEN BEGIN IF ODD(MEM[P].HH.B1)THEN PRINTESC(344)ELSE
PRINTESC(345);
IF MEM[P].HH.B1>8 THEN PRINTCHAR(82)ELSE IF MEM[P].HH.B1>4 THEN
PRINTCHAR(76)ELSE PRINTCHAR(77);END ELSE BEGIN PRINTESC(346);
IF MEM[P].HH.B1=0 THEN PRINT(347)ELSE PRINT(348);
IF MEM[P+1].INT<>0 THEN BEGIN PRINT(349);PRINTSCALED(MEM[P+1].INT);END;
END{:192};6:{193:}BEGIN PRINTFONTANDCHAR(P+1);PRINT(350);
IF MEM[P].HH.B1>1 THEN PRINTCHAR(124);
FONTINSHORTDISPLAY:=MEM[P+1].HH.B0;SHORTDISPLAY(MEM[P+1].HH.RH);
IF ODD(MEM[P].HH.B1)THEN PRINTCHAR(124);PRINTCHAR(41);END{:193};
12:{194:}BEGIN PRINTESC(351);PRINTINT(MEM[P+1].INT);END{:194};7:{195:}
BEGIN PRINTESC(352);IF MEM[P].HH.B1>0 THEN BEGIN PRINT(353);
PRINTINT(MEM[P].HH.B1);END;BEGIN BEGIN STRPOOL[POOLPTR]:=46;
POOLPTR:=POOLPTR+1;END;SHOWNODELIST(MEM[P+1].HH.LH);POOLPTR:=POOLPTR-1;
END;BEGIN STRPOOL[POOLPTR]:=124;POOLPTR:=POOLPTR+1;END;
SHOWNODELIST(MEM[P+1].HH.RH);POOLPTR:=POOLPTR-1;END{:195};4:{196:}
BEGIN PRINTESC(354);IF MEM[P+1].HH.LH<>0 THEN BEGIN PRINTCHAR(115);
PRINTINT(MEM[P+1].HH.LH);END;PRINTMARK(MEM[P+1].HH.RH);END{:196};
5:{197:}BEGIN PRINTESC(355);BEGIN BEGIN STRPOOL[POOLPTR]:=46;
POOLPTR:=POOLPTR+1;END;SHOWNODELIST(MEM[P+1].INT);POOLPTR:=POOLPTR-1;
END;END{:197};{690:}14:PRINTSTYLE(MEM[P].HH.B1);15:{695:}
BEGIN PRINTESC(528);BEGIN STRPOOL[POOLPTR]:=68;POOLPTR:=POOLPTR+1;END;
SHOWNODELIST(MEM[P+1].HH.LH);POOLPTR:=POOLPTR-1;
BEGIN STRPOOL[POOLPTR]:=84;POOLPTR:=POOLPTR+1;END;
SHOWNODELIST(MEM[P+1].HH.RH);POOLPTR:=POOLPTR-1;
BEGIN STRPOOL[POOLPTR]:=83;POOLPTR:=POOLPTR+1;END;
SHOWNODELIST(MEM[P+2].HH.LH);POOLPTR:=POOLPTR-1;
BEGIN STRPOOL[POOLPTR]:=115;POOLPTR:=POOLPTR+1;END;
SHOWNODELIST(MEM[P+2].HH.RH);POOLPTR:=POOLPTR-1;END{:695};
16,17,18,19,20,21,22,23,24,27,26,29,28,30,31:{696:}
BEGIN CASE MEM[P].HH.B0 OF 16:PRINTESC(874);17:PRINTESC(875);
18:PRINTESC(876);19:PRINTESC(877);20:PRINTESC(878);21:PRINTESC(879);
22:PRINTESC(880);23:PRINTESC(881);27:PRINTESC(882);26:PRINTESC(883);
29:PRINTESC(543);24:BEGIN PRINTESC(537);PRINTDELIMITER(P+4);END;
28:BEGIN PRINTESC(511);PRINTFAMANDCHAR(P+4);END;30:BEGIN PRINTESC(884);
PRINTDELIMITER(P+1);END;
31:BEGIN IF MEM[P].HH.B1=0 THEN PRINTESC(885)ELSE PRINTESC(886);
PRINTDELIMITER(P+1);END;END;
IF MEM[P].HH.B0<30 THEN BEGIN IF MEM[P].HH.B1<>0 THEN IF MEM[P].HH.B1=1
THEN PRINTESC(887)ELSE PRINTESC(888);PRINTSUBSIDIARYDATA(P+1,46);END;
PRINTSUBSIDIARYDATA(P+2,94);PRINTSUBSIDIARYDATA(P+3,95);END{:696};
25:{697:}BEGIN PRINTESC(889);
IF MEM[P+1].INT=1073741824 THEN PRINT(890)ELSE PRINTSCALED(MEM[P+1].INT)
;
IF(MEM[P+4].QQQQ.B0<>0)OR(MEM[P+4].QQQQ.B1<>0)OR(MEM[P+4].QQQQ.B2<>0)OR(
MEM[P+4].QQQQ.B3<>0)THEN BEGIN PRINT(891);PRINTDELIMITER(P+4);END;
IF(MEM[P+5].QQQQ.B0<>0)OR(MEM[P+5].QQQQ.B1<>0)OR(MEM[P+5].QQQQ.B2<>0)OR(
MEM[P+5].QQQQ.B3<>0)THEN BEGIN PRINT(892);PRINTDELIMITER(P+5);END;
PRINTSUBSIDIARYDATA(P+2,92);PRINTSUBSIDIARYDATA(P+3,47);END{:697};{:690}
OTHERWISE PRINT(318)END{:183};P:=MEM[P].HH.RH;END;10:END;{:182}{198:}
PROCEDURE SHOWBOX(P:HALFWORD);BEGIN{236:}
DEPTHTHRESHOLD:=EQTB[13193].INT;BREADTHMAX:=EQTB[13192].INT{:236};
IF BREADTHMAX<=0 THEN BREADTHMAX:=5;
IF POOLPTR+DEPTHTHRESHOLD>=POOLSIZE THEN DEPTHTHRESHOLD:=POOLSIZE-
POOLPTR-1;SHOWNODELIST(P);PRINTLN;END;{:198}{200:}
PROCEDURE DELETETOKENREF(P:HALFWORD);
BEGIN IF MEM[P].HH.LH=0 THEN FLUSHLIST(P)ELSE MEM[P].HH.LH:=MEM[P].HH.LH
-1;END;{:200}{201:}PROCEDURE DELETEGLUEREF(P:HALFWORD);
BEGIN IF MEM[P].HH.RH=0 THEN FREENODE(P,4)ELSE MEM[P].HH.RH:=MEM[P].HH.
RH-1;END;{:201}{202:}PROCEDURE FLUSHNODELIST(P:HALFWORD);LABEL 30;
VAR Q:HALFWORD;BEGIN WHILE P<>0 DO BEGIN Q:=MEM[P].HH.RH;
IF(P>=HIMEMMIN)THEN BEGIN MEM[P].HH.RH:=AVAIL;AVAIL:=P;
DYNUSED:=DYNUSED-1;
END ELSE BEGIN CASE MEM[P].HH.B0 OF 0,1,13:BEGIN FLUSHNODELIST(MEM[P+5].
HH.RH);FREENODE(P,7);GOTO 30;END;2:BEGIN FREENODE(P,4);GOTO 30;END;
3:BEGIN FLUSHNODELIST(MEM[P+4].HH.LH);DELETEGLUEREF(MEM[P+4].HH.RH);
FREENODE(P,5);GOTO 30;END;8:{1358:}
BEGIN CASE MEM[P].HH.B1 OF 0:FREENODE(P,3);
1,3:BEGIN DELETETOKENREF(MEM[P+1].HH.RH);FREENODE(P,2);GOTO 30;END;
2,4:FREENODE(P,2);OTHERWISE CONFUSION(1305)END;GOTO 30;END{:1358};
10:BEGIN BEGIN IF MEM[MEM[P+1].HH.LH].HH.RH=0 THEN FREENODE(MEM[P+1].HH.
LH,4)ELSE MEM[MEM[P+1].HH.LH].HH.RH:=MEM[MEM[P+1].HH.LH].HH.RH-1;END;
IF MEM[P+1].HH.RH<>0 THEN FLUSHNODELIST(MEM[P+1].HH.RH);END;11,9,12:;
6:FLUSHNODELIST(MEM[P+1].HH.RH);4:DELETETOKENREF(MEM[P+1].HH.RH);
7:BEGIN FLUSHNODELIST(MEM[P+1].HH.LH);FLUSHNODELIST(MEM[P+1].HH.RH);END;
5:FLUSHNODELIST(MEM[P+1].INT);{698:}14:BEGIN FREENODE(P,3);GOTO 30;END;
15:BEGIN FLUSHNODELIST(MEM[P+1].HH.LH);FLUSHNODELIST(MEM[P+1].HH.RH);
FLUSHNODELIST(MEM[P+2].HH.LH);FLUSHNODELIST(MEM[P+2].HH.RH);
FREENODE(P,3);GOTO 30;END;
16,17,18,19,20,21,22,23,24,27,26,29,28:BEGIN IF MEM[P+1].HH.RH>=2 THEN
FLUSHNODELIST(MEM[P+1].HH.LH);
IF MEM[P+2].HH.RH>=2 THEN FLUSHNODELIST(MEM[P+2].HH.LH);
IF MEM[P+3].HH.RH>=2 THEN FLUSHNODELIST(MEM[P+3].HH.LH);
IF MEM[P].HH.B0=24 THEN FREENODE(P,5)ELSE IF MEM[P].HH.B0=28 THEN
FREENODE(P,5)ELSE FREENODE(P,4);GOTO 30;END;30,31:BEGIN FREENODE(P,4);
GOTO 30;END;25:BEGIN FLUSHNODELIST(MEM[P+2].HH.LH);
FLUSHNODELIST(MEM[P+3].HH.LH);FREENODE(P,6);GOTO 30;END;{:698}
OTHERWISE CONFUSION(356)END;FREENODE(P,2);30:END;P:=Q;END;END;{:202}
{204:}FUNCTION COPYNODELIST(P:HALFWORD):HALFWORD;VAR H:HALFWORD;
Q:HALFWORD;R:HALFWORD;WORDS:0..5;BEGIN H:=GETAVAIL;Q:=H;
WHILE P<>0 DO BEGIN{205:}WORDS:=1;
IF(P>=HIMEMMIN)THEN R:=GETAVAIL ELSE{206:}
CASE MEM[P].HH.B0 OF 0,1,13:BEGIN R:=GETNODE(7);MEM[R+6]:=MEM[P+6];
MEM[R+5]:=MEM[P+5];MEM[R+5].HH.RH:=COPYNODELIST(MEM[P+5].HH.RH);
WORDS:=5;END;2:BEGIN R:=GETNODE(4);WORDS:=4;END;3:BEGIN R:=GETNODE(5);
MEM[R+4]:=MEM[P+4];
MEM[MEM[P+4].HH.RH].HH.RH:=MEM[MEM[P+4].HH.RH].HH.RH+1;
MEM[R+4].HH.LH:=COPYNODELIST(MEM[P+4].HH.LH);WORDS:=4;END;8:{1357:}
CASE MEM[P].HH.B1 OF 0:BEGIN R:=GETNODE(3);WORDS:=3;END;
1,3:BEGIN R:=GETNODE(2);
MEM[MEM[P+1].HH.RH].HH.LH:=MEM[MEM[P+1].HH.RH].HH.LH+1;WORDS:=2;END;
2,4:BEGIN R:=GETNODE(2);WORDS:=2;END;OTHERWISE CONFUSION(1304)END{:1357}
;10:BEGIN R:=GETNODE(2);
MEM[MEM[P+1].HH.LH].HH.RH:=MEM[MEM[P+1].HH.LH].HH.RH+1;
MEM[R+1].HH.LH:=MEM[P+1].HH.LH;
MEM[R+1].HH.RH:=COPYNODELIST(MEM[P+1].HH.RH);END;
11,9,12:BEGIN R:=GETNODE(2);WORDS:=2;END;6:BEGIN R:=GETNODE(2);
MEM[R+1]:=MEM[P+1];MEM[R+1].HH.RH:=COPYNODELIST(MEM[P+1].HH.RH);END;
7:BEGIN R:=GETNODE(2);MEM[R+1].HH.LH:=COPYNODELIST(MEM[P+1].HH.LH);
MEM[R+1].HH.RH:=COPYNODELIST(MEM[P+1].HH.RH);END;4:BEGIN R:=GETNODE(2);
MEM[MEM[P+1].HH.RH].HH.LH:=MEM[MEM[P+1].HH.RH].HH.LH+1;WORDS:=2;END;
5:BEGIN R:=GETNODE(2);MEM[R+1].INT:=COPYNODELIST(MEM[P+1].INT);END;
OTHERWISE CONFUSION(357)END{:206};WHILE WORDS>0 DO BEGIN WORDS:=WORDS-1;
MEM[R+WORDS]:=MEM[P+WORDS];END{:205};MEM[Q].HH.RH:=R;Q:=R;
P:=MEM[P].HH.RH;END;MEM[Q].HH.RH:=0;Q:=MEM[H].HH.RH;
BEGIN MEM[H].HH.RH:=AVAIL;AVAIL:=H;DYNUSED:=DYNUSED-1;END;
COPYNODELIST:=Q;END;{:204}{211:}PROCEDURE PRINTMODE(M:INTEGER);
BEGIN IF M>0 THEN CASE M DIV(101)OF 0:PRINT(358);1:PRINT(359);
2:PRINT(360);
END ELSE IF M=0 THEN PRINT(361)ELSE CASE(-M)DIV(101)OF 0:PRINT(362);
1:PRINT(363);2:PRINT(346);END;PRINT(364);END;{:211}{216:}
PROCEDURE PUSHNEST;
BEGIN IF NESTPTR>MAXNESTSTACK THEN BEGIN MAXNESTSTACK:=NESTPTR;
IF NESTPTR=NESTSIZE THEN OVERFLOW(365,NESTSIZE);END;
NEST[NESTPTR]:=CURLIST;NESTPTR:=NESTPTR+1;CURLIST.HEADFIELD:=GETAVAIL;
CURLIST.TAILFIELD:=CURLIST.HEADFIELD;CURLIST.PGFIELD:=0;
CURLIST.MLFIELD:=LINE;CURLIST.ETEXAUXFIELD:=0;END;{:216}{217:}
PROCEDURE POPNEST;BEGIN BEGIN MEM[CURLIST.HEADFIELD].HH.RH:=AVAIL;
AVAIL:=CURLIST.HEADFIELD;DYNUSED:=DYNUSED-1;END;NESTPTR:=NESTPTR-1;
CURLIST:=NEST[NESTPTR];END;{:217}{218:}PROCEDURE PRINTTOTALS;FORWARD;
PROCEDURE SHOWACTIVITIES;VAR P:0..NESTSIZE;M:-203..203;A:MEMORYWORD;
Q,R:HALFWORD;T:INTEGER;BEGIN NEST[NESTPTR]:=CURLIST;PRINTNL(339);
PRINTLN;FOR P:=NESTPTR DOWNTO 0 DO BEGIN M:=NEST[P].MODEFIELD;
A:=NEST[P].AUXFIELD;PRINTNL(366);PRINTMODE(M);PRINT(367);
PRINTINT(ABS(NEST[P].MLFIELD));
IF M=102 THEN IF NEST[P].PGFIELD<>8585216 THEN BEGIN PRINT(368);
PRINTINT(NEST[P].PGFIELD MOD 65536);PRINT(369);
PRINTINT(NEST[P].PGFIELD DIV 4194304);PRINTCHAR(44);
PRINTINT((NEST[P].PGFIELD DIV 65536)MOD 64);PRINTCHAR(41);END;
IF NEST[P].MLFIELD<0 THEN PRINT(370);IF P=0 THEN BEGIN{986:}
IF 327142<>PAGETAIL THEN BEGIN PRINTNL(989);
IF OUTPUTACTIVE THEN PRINT(990);SHOWBOX(MEM[327142].HH.RH);
IF PAGECONTENTS>0 THEN BEGIN PRINTNL(991);PRINTTOTALS;PRINTNL(992);
PRINTSCALED(PAGESOFAR[0]);R:=MEM[327144].HH.RH;
WHILE R<>327144 DO BEGIN PRINTLN;PRINTESC(331);T:=MEM[R].HH.B1;
PRINTINT(T);PRINT(993);T:=XOVERN(MEM[R+3].INT,1000)*EQTB[13233+T].INT;
PRINTSCALED(T);IF MEM[R].HH.B0=1 THEN BEGIN Q:=327142;T:=0;
REPEAT Q:=MEM[Q].HH.RH;
IF(MEM[Q].HH.B0=3)AND(MEM[Q].HH.B1=MEM[R].HH.B1)THEN T:=T+1;
UNTIL Q=MEM[R+1].HH.LH;PRINT(994);PRINTINT(T);PRINT(995);END;
R:=MEM[R].HH.RH;END;END;END{:986};
IF MEM[327143].HH.RH<>0 THEN PRINTNL(371);END;
SHOWBOX(MEM[NEST[P].HEADFIELD].HH.RH);{219:}
CASE ABS(M)DIV(101)OF 0:BEGIN PRINTNL(372);
IF A.INT<=-65536000 THEN PRINT(373)ELSE PRINTSCALED(A.INT);
IF NEST[P].PGFIELD<>0 THEN BEGIN PRINT(374);PRINTINT(NEST[P].PGFIELD);
PRINT(375);IF NEST[P].PGFIELD<>1 THEN PRINTCHAR(115);END;END;
1:BEGIN PRINTNL(376);PRINTINT(A.HH.LH);
IF M>0 THEN IF A.HH.RH>0 THEN BEGIN PRINT(377);PRINTINT(A.HH.RH);END;
END;2:IF A.INT<>0 THEN BEGIN PRINT(378);SHOWBOX(A.INT);END;END{:219};
END;END;{:218}{237:}PROCEDURE PRINTPARAM(N:INTEGER);
BEGIN CASE N OF 0:PRINTESC(423);1:PRINTESC(424);2:PRINTESC(425);
3:PRINTESC(426);4:PRINTESC(427);5:PRINTESC(428);6:PRINTESC(429);
7:PRINTESC(430);8:PRINTESC(431);9:PRINTESC(432);10:PRINTESC(433);
11:PRINTESC(434);12:PRINTESC(435);13:PRINTESC(436);14:PRINTESC(437);
15:PRINTESC(438);16:PRINTESC(439);17:PRINTESC(440);18:PRINTESC(441);
19:PRINTESC(442);20:PRINTESC(443);21:PRINTESC(444);22:PRINTESC(445);
23:PRINTESC(446);24:PRINTESC(447);25:PRINTESC(448);26:PRINTESC(449);
27:PRINTESC(450);28:PRINTESC(451);29:PRINTESC(452);30:PRINTESC(453);
31:PRINTESC(454);32:PRINTESC(455);33:PRINTESC(456);34:PRINTESC(457);
35:PRINTESC(458);36:PRINTESC(459);37:PRINTESC(460);38:PRINTESC(461);
39:PRINTESC(462);40:PRINTESC(463);41:PRINTESC(464);42:PRINTESC(465);
43:PRINTESC(466);44:PRINTESC(467);45:PRINTESC(468);46:PRINTESC(469);
47:PRINTESC(470);48:PRINTESC(471);49:PRINTESC(472);50:PRINTESC(473);
51:PRINTESC(474);52:PRINTESC(475);53:PRINTESC(476);54:PRINTESC(477);
{1393:}55:PRINTESC(1316);56:PRINTESC(1317);57:PRINTESC(1318);
58:PRINTESC(1319);59:PRINTESC(1320);60:PRINTESC(1321);61:PRINTESC(1322);
62:PRINTESC(1323);63:PRINTESC(1324);{:1393}{1434:}64:PRINTESC(1363);
{:1434}OTHERWISE PRINT(478)END;END;{:237}{241:}PROCEDURE FIXDATEANDTIME;
VAR T:ARRAY[1..7]OF SIGNEDHALFWORD;BEGIN $numtim(T);
EQTB[13191].INT:=T[1];EQTB[13190].INT:=T[2];EQTB[13189].INT:=T[3];
EQTB[13188].INT:=T[4]*60+T[5];END;{:241}{245:}PROCEDURE BEGINDIAGNOSTIC;
BEGIN OLDSETTING:=SELECTOR;
IF(EQTB[13197].INT<=0)AND(SELECTOR=19)THEN BEGIN SELECTOR:=SELECTOR-1;
IF HISTORY=0 THEN HISTORY:=1;END;END;
PROCEDURE ENDDIAGNOSTIC(BLANKLINE:BOOLEAN);BEGIN PRINTNL(339);
IF BLANKLINE THEN PRINTLN;SELECTOR:=OLDSETTING;END;{:245}{247:}
PROCEDURE PRINTLENGTHPARAM(N:INTEGER);BEGIN CASE N OF 0:PRINTESC(481);
1:PRINTESC(482);2:PRINTESC(483);3:PRINTESC(484);4:PRINTESC(485);
5:PRINTESC(486);6:PRINTESC(487);7:PRINTESC(488);8:PRINTESC(489);
9:PRINTESC(490);10:PRINTESC(491);11:PRINTESC(492);12:PRINTESC(493);
13:PRINTESC(494);14:PRINTESC(495);15:PRINTESC(496);16:PRINTESC(497);
17:PRINTESC(498);18:PRINTESC(499);19:PRINTESC(500);20:PRINTESC(501);
OTHERWISE PRINT(502)END;END;{:247}{252:}{298:}
PROCEDURE PRINTCMDCHR(CMD:QUARTERWORD;CHRCODE:HALFWORD);VAR N:INTEGER;
BEGIN CASE CMD OF 1:BEGIN PRINT(564);PRINT(CHRCODE);END;
2:BEGIN PRINT(565);PRINT(CHRCODE);END;3:BEGIN PRINT(566);PRINT(CHRCODE);
END;6:BEGIN PRINT(567);PRINT(CHRCODE);END;7:BEGIN PRINT(568);
PRINT(CHRCODE);END;8:BEGIN PRINT(569);PRINT(CHRCODE);END;9:PRINT(570);
10:BEGIN PRINT(571);PRINT(CHRCODE);END;11:BEGIN PRINT(572);
PRINT(CHRCODE);END;12:BEGIN PRINT(573);PRINT(CHRCODE);END;{227:}
75,76:IF CHRCODE<10800 THEN PRINTSKIPPARAM(CHRCODE-10782)ELSE IF CHRCODE
<11056 THEN BEGIN PRINTESC(398);PRINTINT(CHRCODE-10800);
END ELSE BEGIN PRINTESC(399);PRINTINT(CHRCODE-11056);END;{:227}{231:}
72:IF CHRCODE>=11327 THEN BEGIN PRINTESC(410);PRINTINT(CHRCODE-11327);
END ELSE CASE CHRCODE OF 11317:PRINTESC(401);11318:PRINTESC(402);
11319:PRINTESC(403);11320:PRINTESC(404);11321:PRINTESC(405);
11322:PRINTESC(406);11323:PRINTESC(407);11324:PRINTESC(408);{1392:}
11325:PRINTESC(1315);{:1392}OTHERWISE PRINTESC(409)END;{:231}{239:}
73:IF CHRCODE<13233 THEN PRINTPARAM(CHRCODE-13168)ELSE BEGIN PRINTESC(
479);PRINTINT(CHRCODE-13233);END;{:239}{249:}
74:IF CHRCODE<13766 THEN PRINTLENGTHPARAM(CHRCODE-13745)ELSE BEGIN
PRINTESC(503);PRINTINT(CHRCODE-13766);END;{:249}{266:}45:PRINTESC(511);
90:PRINTESC(512);40:PRINTESC(513);41:PRINTESC(514);77:PRINTESC(522);
61:PRINTESC(515);42:PRINTESC(535);16:PRINTESC(516);107:PRINTESC(507);
88:PRINTESC(521);15:PRINTESC(517);92:PRINTESC(518);67:PRINTESC(508);
62:PRINTESC(519);64:PRINTESC(32);
102:IF CHRCODE=0 THEN PRINTESC(520){1496:}ELSE PRINTESC(782){:1496};
32:PRINTESC(523);36:PRINTESC(524);39:PRINTESC(525);37:PRINTESC(331);
44:PRINTESC(47);18:BEGIN PRINTESC(354);IF CHRCODE>0 THEN PRINTCHAR(115);
END;46:PRINTESC(526);17:PRINTESC(527);54:PRINTESC(528);91:PRINTESC(529);
34:PRINTESC(530);65:PRINTESC(531);103:PRINTESC(532);55:PRINTESC(336);
63:PRINTESC(533);66:PRINTESC(537);
96:IF CHRCODE=0 THEN PRINTESC(538){1493:}ELSE PRINTESC(1378){:1493};
0:PRINTESC(539);98:PRINTESC(540);80:PRINTESC(536);
84:CASE CHRCODE OF 11312:PRINTESC(534);{1598:}11313:PRINTESC(1411);
11314:PRINTESC(1412);11315:PRINTESC(1413);11316:PRINTESC(1414);{:1598}
END;109:IF CHRCODE=0 THEN PRINTESC(541){1421:}
ELSE IF CHRCODE=1 THEN PRINTESC(1353)ELSE PRINTESC(1354){:1421};
71:{1566:}BEGIN PRINTESC(410);IF CHRCODE<>0 THEN PRINTSANUM(CHRCODE);
END{:1566};38:PRINTESC(355);33:IF CHRCODE=0 THEN PRINTESC(542){1436:}
ELSE CASE CHRCODE OF 6:PRINTESC(1364);7:PRINTESC(1365);
10:PRINTESC(1366);OTHERWISE PRINTESC(1367)END{:1436};56:PRINTESC(543);
35:PRINTESC(544);{:266}{335:}13:PRINTESC(606);{:335}{377:}
104:IF CHRCODE=0 THEN PRINTESC(638){1481:}
ELSE IF CHRCODE=2 THEN PRINTESC(1376){:1481}ELSE PRINTESC(639);{:377}
{385:}110:BEGIN CASE(CHRCODE MOD 5)OF 1:PRINTESC(641);2:PRINTESC(642);
3:PRINTESC(643);4:PRINTESC(644);OTHERWISE PRINTESC(640)END;
IF CHRCODE>=5 THEN PRINTCHAR(115);END;{:385}{412:}89:{1565:}
BEGIN IF(CHRCODE<0)OR(CHRCODE>19)THEN CMD:=(MEM[CHRCODE].HH.B0 DIV 16)
ELSE BEGIN CMD:=CHRCODE-0;CHRCODE:=0;END;
IF CMD=0 THEN PRINTESC(479)ELSE IF CMD=1 THEN PRINTESC(503)ELSE IF CMD=2
THEN PRINTESC(398)ELSE PRINTESC(399);
IF CHRCODE<>0 THEN PRINTSANUM(CHRCODE);END{:1565};{:412}{417:}
79:IF CHRCODE=1 THEN PRINTESC(678)ELSE PRINTESC(677);
82:IF CHRCODE=0 THEN PRINTESC(679){1427:}
ELSE IF CHRCODE=2 THEN PRINTESC(1359){:1427}ELSE PRINTESC(680);
83:IF CHRCODE=1 THEN PRINTESC(681)ELSE IF CHRCODE=3 THEN PRINTESC(682)
ELSE PRINTESC(683);70:CASE CHRCODE OF 0:PRINTESC(684);1:PRINTESC(685);
2:PRINTESC(686);4:PRINTESC(687);{1381:}3:PRINTESC(1311);
6:PRINTESC(1312);{:1381}{1398:}7:PRINTESC(1338);8:PRINTESC(1339);{:1398}
{1401:}9:PRINTESC(1340);10:PRINTESC(1341);11:PRINTESC(1342);{:1401}
{1404:}14:PRINTESC(1343);15:PRINTESC(1344);16:PRINTESC(1345);
17:PRINTESC(1346);{:1404}{1407:}18:PRINTESC(1347);19:PRINTESC(1348);
20:PRINTESC(1349);{:1407}{1512:}25:PRINTESC(1387);26:PRINTESC(1388);
27:PRINTESC(1389);28:PRINTESC(1390);{:1512}{1535:}12:PRINTESC(1394);
13:PRINTESC(1395);21:PRINTESC(1396);22:PRINTESC(1397);{:1535}{1539:}
23:PRINTESC(1398);24:PRINTESC(1399);{:1539}OTHERWISE PRINTESC(688)END;
{:417}{469:}108:CASE CHRCODE OF 0:PRINTESC(744);1:PRINTESC(745);
2:PRINTESC(746);3:PRINTESC(747);4:PRINTESC(748);{1383:}6:PRINTESC(1313);
{:1383}OTHERWISE PRINTESC(749)END;{:469}{488:}
105:BEGIN IF CHRCODE>=32 THEN PRINTESC(782);
CASE CHRCODE MOD 32 OF 1:PRINTESC(766);2:PRINTESC(767);3:PRINTESC(768);
4:PRINTESC(769);5:PRINTESC(770);6:PRINTESC(771);7:PRINTESC(772);
8:PRINTESC(773);9:PRINTESC(774);10:PRINTESC(775);11:PRINTESC(776);
12:PRINTESC(777);13:PRINTESC(778);14:PRINTESC(779);15:PRINTESC(780);
16:PRINTESC(781);{1497:}17:PRINTESC(1379);18:PRINTESC(1380);
19:PRINTESC(1381);{:1497}OTHERWISE PRINTESC(765)END;END;{:488}{492:}
106:IF CHRCODE=2 THEN PRINTESC(783)ELSE IF CHRCODE=4 THEN PRINTESC(784)
ELSE PRINTESC(785);{:492}{781:}
4:IF CHRCODE=256 THEN PRINTESC(907)ELSE BEGIN PRINT(911);PRINT(CHRCODE);
END;5:IF CHRCODE=257 THEN PRINTESC(908)ELSE PRINTESC(909);{:781}{984:}
81:CASE CHRCODE OF 0:PRINTESC(979);1:PRINTESC(980);2:PRINTESC(981);
3:PRINTESC(982);4:PRINTESC(983);5:PRINTESC(984);6:PRINTESC(985);
OTHERWISE PRINTESC(986)END;{:984}{1053:}
14:IF CHRCODE=1 THEN PRINTESC(1034)ELSE PRINTESC(344);{:1053}{1059:}
26:CASE CHRCODE OF 4:PRINTESC(1035);0:PRINTESC(1036);1:PRINTESC(1037);
2:PRINTESC(1038);OTHERWISE PRINTESC(1039)END;
27:CASE CHRCODE OF 4:PRINTESC(1040);0:PRINTESC(1041);1:PRINTESC(1042);
2:PRINTESC(1043);OTHERWISE PRINTESC(1044)END;28:PRINTESC(337);
29:PRINTESC(341);30:PRINTESC(343);{:1059}{1072:}
21:IF CHRCODE=1 THEN PRINTESC(1062)ELSE PRINTESC(1063);
22:IF CHRCODE=1 THEN PRINTESC(1064)ELSE PRINTESC(1065);
20:CASE CHRCODE OF 0:PRINTESC(412);1:PRINTESC(1066);2:PRINTESC(1067);
3:PRINTESC(974);4:PRINTESC(1068);5:PRINTESC(976);
OTHERWISE PRINTESC(1069)END;
31:IF CHRCODE=100 THEN PRINTESC(1071)ELSE IF CHRCODE=101 THEN PRINTESC(
1072)ELSE IF CHRCODE=102 THEN PRINTESC(1073)ELSE PRINTESC(1070);{:1072}
{1089:}43:IF CHRCODE=0 THEN PRINTESC(1089)ELSE PRINTESC(1088);{:1089}
{1108:}
25:IF CHRCODE=10 THEN PRINTESC(1100)ELSE IF CHRCODE=11 THEN PRINTESC(
1099)ELSE PRINTESC(1098);
23:IF CHRCODE=1 THEN PRINTESC(1102)ELSE PRINTESC(1101);
24:IF CHRCODE=1 THEN PRINTESC(1104){1595:}
ELSE IF CHRCODE=2 THEN PRINTESC(1409)ELSE IF CHRCODE=3 THEN PRINTESC(
1410){:1595}ELSE PRINTESC(1103);{:1108}{1115:}
47:IF CHRCODE=1 THEN PRINTESC(45)ELSE PRINTESC(352);{:1115}{1143:}
48:IF CHRCODE=1 THEN PRINTESC(1136)ELSE PRINTESC(1135);{:1143}{1157:}
50:CASE CHRCODE OF 16:PRINTESC(874);17:PRINTESC(875);18:PRINTESC(876);
19:PRINTESC(877);20:PRINTESC(878);21:PRINTESC(879);22:PRINTESC(880);
23:PRINTESC(881);26:PRINTESC(883);OTHERWISE PRINTESC(882)END;
51:IF CHRCODE=1 THEN PRINTESC(887)ELSE IF CHRCODE=2 THEN PRINTESC(888)
ELSE PRINTESC(1137);{:1157}{1170:}53:PRINTSTYLE(CHRCODE);{:1170}{1179:}
52:CASE CHRCODE OF 1:PRINTESC(1156);2:PRINTESC(1157);3:PRINTESC(1158);
4:PRINTESC(1159);5:PRINTESC(1160);OTHERWISE PRINTESC(1155)END;{:1179}
{1189:}49:IF CHRCODE=30 THEN PRINTESC(884){1432:}
ELSE IF CHRCODE=1 THEN PRINTESC(886){:1432}ELSE PRINTESC(885);{:1189}
{1209:}
93:IF CHRCODE=1 THEN PRINTESC(1180)ELSE IF CHRCODE=2 THEN PRINTESC(1181)
{1504:}ELSE IF CHRCODE=8 THEN PRINTESC(1259){:1504}ELSE PRINTESC(1182);
97:IF CHRCODE=0 THEN PRINTESC(1183)ELSE IF CHRCODE=1 THEN PRINTESC(1184)
ELSE IF CHRCODE=2 THEN PRINTESC(1185)ELSE PRINTESC(1186);{:1209}{1220:}
94:IF CHRCODE<>0 THEN PRINTESC(1201)ELSE PRINTESC(1200);{:1220}{1223:}
95:CASE CHRCODE OF 0:PRINTESC(1202);1:PRINTESC(1203);2:PRINTESC(1204);
3:PRINTESC(1205);4:PRINTESC(1206);5:PRINTESC(1207);
OTHERWISE PRINTESC(1208)END;68:BEGIN PRINTESC(516);PRINTHEX(CHRCODE);
END;69:BEGIN PRINTESC(527);PRINTHEX(CHRCODE);END;{:1223}{1231:}
85:IF CHRCODE=11888 THEN PRINTESC(418)ELSE IF CHRCODE=12912 THEN
PRINTESC(422)ELSE IF CHRCODE=12144 THEN PRINTESC(419)ELSE IF CHRCODE=
12400 THEN PRINTESC(420)ELSE IF CHRCODE=12656 THEN PRINTESC(421)ELSE
PRINTESC(480);86:PRINTSIZE(CHRCODE-11840);{:1231}{1251:}
99:IF CHRCODE=1 THEN PRINTESC(962)ELSE PRINTESC(950);{:1251}{1255:}
78:IF CHRCODE=0 THEN PRINTESC(1226)ELSE PRINTESC(1227);{:1255}{1261:}
87:BEGIN PRINT(1235);SLOWPRINT(FONTNAME[CHRCODE]);
IF FONTSIZE[CHRCODE]<>FONTDSIZE[CHRCODE]THEN BEGIN PRINT(750);
PRINTSCALED(FONTSIZE[CHRCODE]);PRINT(400);END;END;{:1261}{1263:}
100:CASE CHRCODE OF 0:PRINTESC(275);1:PRINTESC(276);2:PRINTESC(277);
OTHERWISE PRINTESC(1236)END;{:1263}{1273:}
60:IF CHRCODE=0 THEN PRINTESC(1238)ELSE PRINTESC(1237);{:1273}{1278:}
58:IF CHRCODE=0 THEN PRINTESC(1239)ELSE PRINTESC(1240);{:1278}{1287:}
57:IF CHRCODE=12144 THEN PRINTESC(1246)ELSE PRINTESC(1247);{:1287}
{1292:}19:CASE CHRCODE OF 1:PRINTESC(1249);2:PRINTESC(1250);
3:PRINTESC(1251);{1410:}4:PRINTESC(1350);{:1410}{1419:}5:PRINTESC(1352);
{:1419}{1424:}6:PRINTESC(1355);{:1424}OTHERWISE PRINTESC(1248)END;
{:1292}{1295:}101:PRINT(1258);111,112,113,114:BEGIN N:=CMD-111;
IF MEM[MEM[CHRCODE].HH.RH].HH.LH=3585 THEN N:=N+4;
IF ODD(N DIV 4)THEN PRINTESC(1259);IF ODD(N)THEN PRINTESC(1180);
IF ODD(N DIV 2)THEN PRINTESC(1181);IF N>0 THEN PRINTCHAR(32);
PRINT(1260);END;115:PRINTESC(1261);{:1295}{1346:}
59:CASE CHRCODE OF 0:PRINTESC(1295);1:PRINTESC(603);2:PRINTESC(1296);
3:PRINTESC(1297);4:PRINTESC(1298);5:PRINTESC(1299);
OTHERWISE PRINT(1300)END;{:1346}OTHERWISE PRINT(574)END;END;{:298}
PROCEDURE SHOWEQTB(N:HALFWORD);
BEGIN IF N<1 THEN PRINTCHAR(63)ELSE IF N<10782 THEN{223:}
BEGIN SPRINTCS(N);PRINTCHAR(61);
PRINTCMDCHR(EQTB[N].HH.B0,EQTB[N].HH.RH);
IF EQTB[N].HH.B0>=111 THEN BEGIN PRINTCHAR(58);
SHOWTOKENLIST(MEM[EQTB[N].HH.RH].HH.RH,0,32);END;END{:223}
ELSE IF N<11312 THEN{229:}IF N<10800 THEN BEGIN PRINTSKIPPARAM(N-10782);
PRINTCHAR(61);
IF N<10797 THEN PRINTSPEC(EQTB[N].HH.RH,400)ELSE PRINTSPEC(EQTB[N].HH.RH
,338);END ELSE IF N<11056 THEN BEGIN PRINTESC(398);PRINTINT(N-10800);
PRINTCHAR(61);PRINTSPEC(EQTB[N].HH.RH,400);END ELSE BEGIN PRINTESC(399);
PRINTINT(N-11056);PRINTCHAR(61);PRINTSPEC(EQTB[N].HH.RH,338);END{:229}
ELSE IF N<13168 THEN{233:}IF N<11317 THEN BEGIN PRINTCMDCHR(84,N);
PRINTCHAR(61);
IF EQTB[N].HH.RH=0 THEN PRINTCHAR(48)ELSE IF N>11312 THEN BEGIN PRINTINT
(MEM[EQTB[N].HH.RH+1].INT);PRINTCHAR(32);
PRINTINT(MEM[EQTB[N].HH.RH+2].INT);
IF MEM[EQTB[N].HH.RH+1].INT>1 THEN PRINTESC(411);
END ELSE PRINTINT(MEM[EQTB[11312].HH.RH].HH.LH);
END ELSE IF N<11327 THEN BEGIN PRINTCMDCHR(72,N);PRINTCHAR(61);
IF EQTB[N].HH.RH<>0 THEN SHOWTOKENLIST(MEM[EQTB[N].HH.RH].HH.RH,0,32);
END ELSE IF N<11583 THEN BEGIN PRINTESC(410);PRINTINT(N-11327);
PRINTCHAR(61);
IF EQTB[N].HH.RH<>0 THEN SHOWTOKENLIST(MEM[EQTB[N].HH.RH].HH.RH,0,32);
END ELSE IF N<11839 THEN BEGIN PRINTESC(412);PRINTINT(N-11583);
PRINTCHAR(61);
IF EQTB[N].HH.RH=0 THEN PRINT(413)ELSE BEGIN DEPTHTHRESHOLD:=0;
BREADTHMAX:=1;SHOWNODELIST(EQTB[N].HH.RH);END;
END ELSE IF N<11888 THEN{234:}
BEGIN IF N=11839 THEN PRINT(414)ELSE IF N<11856 THEN BEGIN PRINTESC(415)
;PRINTINT(N-11840);END ELSE IF N<11872 THEN BEGIN PRINTESC(416);
PRINTINT(N-11856);END ELSE BEGIN PRINTESC(417);PRINTINT(N-11872);END;
PRINTCHAR(61);PRINTESC(HASH[10524+EQTB[N].HH.RH].RH);END{:234}ELSE{235:}
IF N<12912 THEN BEGIN IF N<12144 THEN BEGIN PRINTESC(418);
PRINTINT(N-11888);END ELSE IF N<12400 THEN BEGIN PRINTESC(419);
PRINTINT(N-12144);END ELSE IF N<12656 THEN BEGIN PRINTESC(420);
PRINTINT(N-12400);END ELSE BEGIN PRINTESC(421);PRINTINT(N-12656);END;
PRINTCHAR(61);PRINTINT(EQTB[N].HH.RH);END ELSE BEGIN PRINTESC(422);
PRINTINT(N-12912);PRINTCHAR(61);PRINTINT(EQTB[N].HH.RH);END{:235}{:233}
ELSE IF N<13745 THEN{242:}
BEGIN IF N<13233 THEN PRINTPARAM(N-13168)ELSE IF N<13489 THEN BEGIN
PRINTESC(479);PRINTINT(N-13233);END ELSE BEGIN PRINTESC(480);
PRINTINT(N-13489);END;PRINTCHAR(61);PRINTINT(EQTB[N].INT);END{:242}
ELSE IF N<=14021 THEN{251:}
BEGIN IF N<13766 THEN PRINTLENGTHPARAM(N-13745)ELSE BEGIN PRINTESC(503);
PRINTINT(N-13766);END;PRINTCHAR(61);PRINTSCALED(EQTB[N].INT);PRINT(400);
END{:251}ELSE PRINTCHAR(63);END;{:252}{259:}
FUNCTION IDLOOKUP(J,L:INTEGER):HALFWORD;LABEL 40;VAR H:INTEGER;
D:INTEGER;P:HALFWORD;K:HALFWORD;BEGIN{261:}H:=BUFFER[J];
FOR K:=J+1 TO J+L-1 DO BEGIN H:=H+H+BUFFER[K];
WHILE H>=8501 DO H:=H-8501;END{:261};P:=H+514;
WHILE TRUE DO BEGIN IF HASH[P].RH>0 THEN IF(STRSTART[HASH[P].RH+1]-
STRSTART[HASH[P].RH])=L THEN IF STREQBUF(HASH[P].RH,J)THEN GOTO 40;
IF HASH[P].LH=0 THEN BEGIN IF NONEWCONTROLSEQUENCE THEN P:=10781 ELSE{
260:}
BEGIN IF HASH[P].RH>0 THEN BEGIN REPEAT IF(HASHUSED=514)THEN OVERFLOW(
506,10000);HASHUSED:=HASHUSED-1;UNTIL HASH[HASHUSED].RH=0;
HASH[P].LH:=HASHUSED;P:=HASHUSED;END;
BEGIN IF POOLPTR+L>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR);END;
D:=(POOLPTR-STRSTART[STRPTR]);
WHILE POOLPTR>STRSTART[STRPTR]DO BEGIN POOLPTR:=POOLPTR-1;
STRPOOL[POOLPTR+L]:=STRPOOL[POOLPTR];END;
FOR K:=J TO J+L-1 DO BEGIN STRPOOL[POOLPTR]:=BUFFER[K];
POOLPTR:=POOLPTR+1;END;HASH[P].RH:=MAKESTRING;POOLPTR:=POOLPTR+D;
CSCOUNT:=CSCOUNT+1;END{:260};GOTO 40;END;P:=HASH[P].LH;END;
40:IDLOOKUP:=P;END;{:259}{264:}PROCEDURE PRIMITIVE(S:STRNUMBER;
C:QUARTERWORD;O:HALFWORD);VAR K:POOLPOINTER;J:0..BUFSIZE;L:SMALLNUMBER;
BEGIN IF S<256 THEN CURVAL:=S+257 ELSE BEGIN K:=STRSTART[S];
L:=STRSTART[S+1]-K;IF FIRST+L>BUFSIZE+1 THEN OVERFLOW(257,BUFSIZE);
FOR J:=0 TO L-1 DO BUFFER[FIRST+J]:=STRPOOL[K+J];
CURVAL:=IDLOOKUP(FIRST,L);BEGIN STRPTR:=STRPTR-1;
POOLPTR:=STRSTART[STRPTR];END;HASH[CURVAL].RH:=S;END;
EQTB[CURVAL].HH.B1:=1;EQTB[CURVAL].HH.B0:=C;EQTB[CURVAL].HH.RH:=O;END;
{:264}{268:}{284:}PROCEDURE RESTORETRACE(P:HALFWORD;S:STRNUMBER);
BEGIN BEGINDIAGNOSTIC;PRINTCHAR(123);PRINT(S);PRINTCHAR(32);SHOWEQTB(P);
PRINTCHAR(125);ENDDIAGNOSTIC(FALSE);END;{:284}{1395:}
PROCEDURE PRINTGROUP(E:BOOLEAN);LABEL 10;
BEGIN CASE CURGROUP OF 0:BEGIN PRINT(1325);GOTO 10;END;
1,14:BEGIN IF CURGROUP=14 THEN PRINT(1326);PRINT(1327);END;
2,3:BEGIN IF CURGROUP=3 THEN PRINT(1328);PRINT(1069);END;4:PRINT(976);
5:PRINT(1068);6,7:BEGIN IF CURGROUP=7 THEN PRINT(1329);PRINT(1330);END;
8:PRINT(401);10:PRINT(1331);11:PRINT(331);12:PRINT(543);
9,13,15,16:BEGIN PRINT(346);
IF CURGROUP=13 THEN PRINT(1332)ELSE IF CURGROUP=15 THEN PRINT(1333)ELSE
IF CURGROUP=16 THEN PRINT(1334);END;END;PRINT(1335);PRINTINT(CURLEVEL);
PRINTCHAR(41);
IF SAVESTACK[SAVEPTR-1].INT<>0 THEN BEGIN IF E THEN PRINT(367)ELSE PRINT
(267);PRINTINT(SAVESTACK[SAVEPTR-1].INT);END;10:END;{:1395}{1396:}
PROCEDURE GROUPTRACE(E:BOOLEAN);BEGIN BEGINDIAGNOSTIC;PRINTCHAR(123);
IF E THEN PRINT(1336)ELSE PRINT(1337);PRINTGROUP(E);PRINTCHAR(125);
ENDDIAGNOSTIC(FALSE);END;{:1396}{1489:}FUNCTION PSEUDOINPUT:BOOLEAN;
VAR P:HALFWORD;SZ:INTEGER;W:FOURQUARTERS;R:HALFWORD;BEGIN LAST:=FIRST;
P:=MEM[PSEUDOFILES].HH.LH;
IF P=0 THEN PSEUDOINPUT:=FALSE ELSE BEGIN MEM[PSEUDOFILES].HH.LH:=MEM[P]
.HH.RH;SZ:=MEM[P].HH.LH;IF 4*SZ-3>=BUFSIZE-LAST THEN{35:}
IF FORMATIDENT=0 THEN BEGIN WRITELN(TERMOUT,'Buffer size exceeded!');
GOTO 9999;END ELSE BEGIN CURINPUT.LOCFIELD:=FIRST;
CURINPUT.LIMITFIELD:=LAST-1;OVERFLOW(257,BUFSIZE);END{:35};LAST:=FIRST;
FOR R:=P+1 TO P+SZ-1 DO BEGIN W:=MEM[R].QQQQ;BUFFER[LAST]:=W.B0;
BUFFER[LAST+1]:=W.B1;BUFFER[LAST+2]:=W.B2;BUFFER[LAST+3]:=W.B3;
LAST:=LAST+4;END;IF LAST>=MAXBUFSTACK THEN MAXBUFSTACK:=LAST+1;
WHILE(LAST>FIRST)AND(BUFFER[LAST-1]=32)DO LAST:=LAST-1;FREENODE(P,SZ);
PSEUDOINPUT:=TRUE;END;END;{:1489}{1490:}PROCEDURE PSEUDOCLOSE;
VAR P,Q:HALFWORD;BEGIN P:=MEM[PSEUDOFILES].HH.RH;
Q:=MEM[PSEUDOFILES].HH.LH;BEGIN MEM[PSEUDOFILES].HH.RH:=AVAIL;
AVAIL:=PSEUDOFILES;DYNUSED:=DYNUSED-1;END;PSEUDOFILES:=P;
WHILE Q<>0 DO BEGIN P:=Q;Q:=MEM[P].HH.RH;FREENODE(P,MEM[P].HH.LH);END;
END;{:1490}{1507:}PROCEDURE GROUPWARNING;VAR I:0..MAXINOPEN;W:BOOLEAN;
BEGIN BASEPTR:=INPUTPTR;INPUTSTACK[BASEPTR]:=CURINPUT;I:=INOPEN;
W:=FALSE;WHILE(GRPSTACK[I]=CURBOUNDARY)AND(I>0)DO BEGIN{1508:}
IF EQTB[13227].INT>0 THEN BEGIN WHILE(INPUTSTACK[BASEPTR].STATEFIELD=0)
OR(INPUTSTACK[BASEPTR].INDEXFIELD>I)DO BASEPTR:=BASEPTR-1;
IF INPUTSTACK[BASEPTR].NAMEFIELD>17 THEN W:=TRUE;END{:1508};
GRPSTACK[I]:=SAVESTACK[SAVEPTR].HH.RH;I:=I-1;END;
IF W THEN BEGIN PRINTNL(1383);PRINTGROUP(TRUE);PRINT(1384);PRINTLN;
IF EQTB[13227].INT>1 THEN SHOWCONTEXT;IF HISTORY=0 THEN HISTORY:=1;END;
END;{:1507}{1509:}PROCEDURE IFWARNING;VAR I:0..MAXINOPEN;W:BOOLEAN;
BEGIN BASEPTR:=INPUTPTR;INPUTSTACK[BASEPTR]:=CURINPUT;I:=INOPEN;
W:=FALSE;WHILE IFSTACK[I]=CONDPTR DO BEGIN{1508:}
IF EQTB[13227].INT>0 THEN BEGIN WHILE(INPUTSTACK[BASEPTR].STATEFIELD=0)
OR(INPUTSTACK[BASEPTR].INDEXFIELD>I)DO BASEPTR:=BASEPTR-1;
IF INPUTSTACK[BASEPTR].NAMEFIELD>17 THEN W:=TRUE;END{:1508};
IFSTACK[I]:=MEM[CONDPTR].HH.RH;I:=I-1;END;IF W THEN BEGIN PRINTNL(1383);
PRINTCMDCHR(105,CURIF);IF IFLINE<>0 THEN BEGIN PRINT(1356);
PRINTINT(IFLINE);END;PRINT(1384);PRINTLN;
IF EQTB[13227].INT>1 THEN SHOWCONTEXT;IF HISTORY=0 THEN HISTORY:=1;END;
END;{:1509}{1510:}PROCEDURE FILEWARNING;VAR P:HALFWORD;L:QUARTERWORD;
C:QUARTERWORD;I:INTEGER;BEGIN P:=SAVEPTR;L:=CURLEVEL;C:=CURGROUP;
SAVEPTR:=CURBOUNDARY;
WHILE GRPSTACK[INOPEN]<>SAVEPTR DO BEGIN CURLEVEL:=CURLEVEL-1;
PRINTNL(1385);PRINTGROUP(TRUE);PRINT(1386);
CURGROUP:=SAVESTACK[SAVEPTR].HH.B1;
SAVEPTR:=SAVESTACK[SAVEPTR].HH.RH END;SAVEPTR:=P;CURLEVEL:=L;
CURGROUP:=C;P:=CONDPTR;L:=IFLIMIT;C:=CURIF;I:=IFLINE;
WHILE IFSTACK[INOPEN]<>CONDPTR DO BEGIN PRINTNL(1385);
PRINTCMDCHR(105,CURIF);IF IFLIMIT=2 THEN PRINTESC(785);
IF IFLINE<>0 THEN BEGIN PRINT(1356);PRINTINT(IFLINE);END;PRINT(1386);
IFLINE:=MEM[CONDPTR+1].INT;CURIF:=MEM[CONDPTR].HH.B1;
IFLIMIT:=MEM[CONDPTR].HH.B0;CONDPTR:=MEM[CONDPTR].HH.RH;END;CONDPTR:=P;
IFLIMIT:=L;CURIF:=C;IFLINE:=I;PRINTLN;
IF EQTB[13227].INT>1 THEN SHOWCONTEXT;IF HISTORY=0 THEN HISTORY:=1;END;
{:1510}{1554:}PROCEDURE DELETESAREF(Q:HALFWORD);LABEL 10;VAR P:HALFWORD;
I:SMALLNUMBER;S:SMALLNUMBER;BEGIN MEM[Q+1].HH.LH:=MEM[Q+1].HH.LH-1;
IF MEM[Q+1].HH.LH<>0 THEN GOTO 10;
IF MEM[Q].HH.B0<32 THEN IF MEM[Q+2].INT=0 THEN S:=3 ELSE GOTO 10 ELSE
BEGIN IF MEM[Q].HH.B0<64 THEN IF MEM[Q+1].HH.RH=0 THEN DELETEGLUEREF(0)
ELSE GOTO 10 ELSE IF MEM[Q+1].HH.RH<>0 THEN GOTO 10;S:=2;END;
REPEAT I:=MEM[Q].HH.B0 MOD 16;P:=Q;Q:=MEM[P].HH.RH;FREENODE(P,S);
IF Q=0 THEN BEGIN SAROOT[I]:=0;GOTO 10;END;
BEGIN IF ODD(I)THEN MEM[Q+(I DIV 2)+1].HH.RH:=0 ELSE MEM[Q+(I DIV 2)+1].
HH.LH:=0;MEM[Q].HH.B1:=MEM[Q].HH.B1-1;END;S:=9;UNTIL MEM[Q].HH.B1>0;
10:END;{:1554}{1556:}PROCEDURE SHOWSA(P:HALFWORD;S:STRNUMBER);
VAR T:SMALLNUMBER;BEGIN BEGINDIAGNOSTIC;PRINTCHAR(123);PRINT(S);
PRINTCHAR(32);
IF P=0 THEN PRINTCHAR(63)ELSE BEGIN T:=(MEM[P].HH.B0 DIV 16);
IF T<4 THEN PRINTCMDCHR(89,P)ELSE IF T=4 THEN BEGIN PRINTESC(412);
PRINTSANUM(P);END ELSE IF T=5 THEN PRINTCMDCHR(71,P)ELSE PRINTCHAR(63);
PRINTCHAR(61);
IF T=0 THEN PRINTINT(MEM[P+2].INT)ELSE IF T=1 THEN BEGIN PRINTSCALED(MEM
[P+2].INT);PRINT(400);END ELSE BEGIN P:=MEM[P+1].HH.RH;
IF T=2 THEN PRINTSPEC(P,400)ELSE IF T=3 THEN PRINTSPEC(P,338)ELSE IF T=4
THEN IF P=0 THEN PRINT(413)ELSE BEGIN DEPTHTHRESHOLD:=0;BREADTHMAX:=1;
SHOWNODELIST(P);
END ELSE IF T=5 THEN BEGIN IF P<>0 THEN SHOWTOKENLIST(MEM[P].HH.RH,0,32)
;END ELSE PRINTCHAR(63);END;END;PRINTCHAR(125);ENDDIAGNOSTIC(FALSE);END;
{:1556}{1570:}PROCEDURE SASAVE(P:HALFWORD);VAR Q:HALFWORD;I:QUARTERWORD;
BEGIN IF CURLEVEL<>SALEVEL THEN BEGIN IF SAVEPTR>MAXSAVESTACK THEN BEGIN
MAXSAVESTACK:=SAVEPTR;
IF MAXSAVESTACK>SAVESIZE-7 THEN OVERFLOW(545,SAVESIZE);END;
SAVESTACK[SAVEPTR].HH.B0:=4;SAVESTACK[SAVEPTR].HH.B1:=SALEVEL;
SAVESTACK[SAVEPTR].HH.RH:=SACHAIN;SAVEPTR:=SAVEPTR+1;SACHAIN:=0;
SALEVEL:=CURLEVEL;END;I:=MEM[P].HH.B0;
IF I<32 THEN BEGIN IF MEM[P+2].INT=0 THEN BEGIN Q:=GETNODE(2);I:=96;
END ELSE BEGIN Q:=GETNODE(3);MEM[Q+2].INT:=MEM[P+2].INT;END;
MEM[Q+1].HH.RH:=0;END ELSE BEGIN Q:=GETNODE(2);
MEM[Q+1].HH.RH:=MEM[P+1].HH.RH;END;MEM[Q+1].HH.LH:=P;MEM[Q].HH.B0:=I;
MEM[Q].HH.B1:=MEM[P].HH.B1;MEM[Q].HH.RH:=SACHAIN;SACHAIN:=Q;
MEM[P+1].HH.LH:=MEM[P+1].HH.LH+1;END;{:1570}{1571:}
PROCEDURE SADESTROY(P:HALFWORD);
BEGIN IF MEM[P].HH.B0<64 THEN DELETEGLUEREF(MEM[P+1].HH.RH)ELSE IF MEM[P
+1].HH.RH<>0 THEN IF MEM[P].HH.B0<80 THEN FLUSHNODELIST(MEM[P+1].HH.RH)
ELSE DELETETOKENREF(MEM[P+1].HH.RH);END;{:1571}{1572:}
PROCEDURE SADEF(P:HALFWORD;E:HALFWORD);
BEGIN MEM[P+1].HH.LH:=MEM[P+1].HH.LH+1;
IF MEM[P+1].HH.RH=E THEN BEGIN IF EQTB[13223].INT>0 THEN SHOWSA(P,547);
SADESTROY(P);END ELSE BEGIN IF EQTB[13223].INT>0 THEN SHOWSA(P,548);
IF MEM[P].HH.B1=CURLEVEL THEN SADESTROY(P)ELSE SASAVE(P);
MEM[P].HH.B1:=CURLEVEL;MEM[P+1].HH.RH:=E;
IF EQTB[13223].INT>0 THEN SHOWSA(P,549);END;DELETESAREF(P);END;
PROCEDURE SAWDEF(P:HALFWORD;W:INTEGER);
BEGIN MEM[P+1].HH.LH:=MEM[P+1].HH.LH+1;
IF MEM[P+2].INT=W THEN BEGIN IF EQTB[13223].INT>0 THEN SHOWSA(P,547);
END ELSE BEGIN IF EQTB[13223].INT>0 THEN SHOWSA(P,548);
IF MEM[P].HH.B1<>CURLEVEL THEN SASAVE(P);MEM[P].HH.B1:=CURLEVEL;
MEM[P+2].INT:=W;IF EQTB[13223].INT>0 THEN SHOWSA(P,549);END;
DELETESAREF(P);END;{:1572}{1573:}PROCEDURE GSADEF(P:HALFWORD;
E:HALFWORD);BEGIN MEM[P+1].HH.LH:=MEM[P+1].HH.LH+1;
IF EQTB[13223].INT>0 THEN SHOWSA(P,550);SADESTROY(P);MEM[P].HH.B1:=1;
MEM[P+1].HH.RH:=E;IF EQTB[13223].INT>0 THEN SHOWSA(P,549);
DELETESAREF(P);END;PROCEDURE GSAWDEF(P:HALFWORD;W:INTEGER);
BEGIN MEM[P+1].HH.LH:=MEM[P+1].HH.LH+1;
IF EQTB[13223].INT>0 THEN SHOWSA(P,550);MEM[P].HH.B1:=1;MEM[P+2].INT:=W;
IF EQTB[13223].INT>0 THEN SHOWSA(P,549);DELETESAREF(P);END;{:1573}
{1574:}PROCEDURE SARESTORE;VAR P:HALFWORD;
BEGIN REPEAT P:=MEM[SACHAIN+1].HH.LH;
IF MEM[P].HH.B1=1 THEN BEGIN IF MEM[P].HH.B0>=32 THEN SADESTROY(SACHAIN)
;IF EQTB[13205].INT>0 THEN SHOWSA(P,552);
END ELSE BEGIN IF MEM[P].HH.B0<32 THEN IF MEM[SACHAIN].HH.B0<32 THEN MEM
[P+2].INT:=MEM[SACHAIN+2].INT ELSE MEM[P+2].INT:=0 ELSE BEGIN SADESTROY(
P);MEM[P+1].HH.RH:=MEM[SACHAIN+1].HH.RH;END;
MEM[P].HH.B1:=MEM[SACHAIN].HH.B1;
IF EQTB[13205].INT>0 THEN SHOWSA(P,553);END;DELETESAREF(P);P:=SACHAIN;
SACHAIN:=MEM[P].HH.RH;
IF MEM[P].HH.B0<32 THEN FREENODE(P,3)ELSE FREENODE(P,2);UNTIL SACHAIN=0;
END;{:1574}{:268}{274:}PROCEDURE NEWSAVELEVEL(C:GROUPCODE);
BEGIN IF SAVEPTR>MAXSAVESTACK THEN BEGIN MAXSAVESTACK:=SAVEPTR;
IF MAXSAVESTACK>SAVESIZE-7 THEN OVERFLOW(545,SAVESIZE);END;
IF(ETEXMODE=1)THEN BEGIN SAVESTACK[SAVEPTR+0].INT:=LINE;
SAVEPTR:=SAVEPTR+1;END;SAVESTACK[SAVEPTR].HH.B0:=3;
SAVESTACK[SAVEPTR].HH.B1:=CURGROUP;
SAVESTACK[SAVEPTR].HH.RH:=CURBOUNDARY;
IF CURLEVEL=511 THEN OVERFLOW(546,511);CURBOUNDARY:=SAVEPTR;CURGROUP:=C;
IF EQTB[13224].INT>0 THEN GROUPTRACE(FALSE);CURLEVEL:=CURLEVEL+1;
SAVEPTR:=SAVEPTR+1;END;{:274}{275:}PROCEDURE EQDESTROY(W:MEMORYWORD);
VAR Q:HALFWORD;
BEGIN CASE W.HH.B0 OF 111,112,113,114:DELETETOKENREF(W.HH.RH);
117:DELETEGLUEREF(W.HH.RH);118:BEGIN Q:=W.HH.RH;
IF Q<>0 THEN FREENODE(Q,MEM[Q].HH.LH+MEM[Q].HH.LH+1);END;
119:FLUSHNODELIST(W.HH.RH);{1567:}
71,89:IF(W.HH.RH<0)OR(W.HH.RH>19)THEN DELETESAREF(W.HH.RH);{:1567}
OTHERWISE END;END;{:275}{276:}PROCEDURE EQSAVE(P:HALFWORD;
L:QUARTERWORD);
BEGIN IF SAVEPTR>MAXSAVESTACK THEN BEGIN MAXSAVESTACK:=SAVEPTR;
IF MAXSAVESTACK>SAVESIZE-7 THEN OVERFLOW(545,SAVESIZE);END;
IF L=0 THEN SAVESTACK[SAVEPTR].HH.B0:=1 ELSE BEGIN SAVESTACK[SAVEPTR]:=
EQTB[P];SAVEPTR:=SAVEPTR+1;SAVESTACK[SAVEPTR].HH.B0:=0;END;
SAVESTACK[SAVEPTR].HH.B1:=L;SAVESTACK[SAVEPTR].HH.RH:=P;
SAVEPTR:=SAVEPTR+1;END;{:276}{277:}PROCEDURE EQDEFINE(P:HALFWORD;
T:QUARTERWORD;E:HALFWORD);LABEL 10;
BEGIN IF(ETEXMODE=1)AND(EQTB[P].HH.B0=T)AND(EQTB[P].HH.RH=E)THEN BEGIN
IF EQTB[13223].INT>0 THEN RESTORETRACE(P,547);EQDESTROY(EQTB[P]);
GOTO 10;END;IF EQTB[13223].INT>0 THEN RESTORETRACE(P,548);
IF EQTB[P].HH.B1=CURLEVEL THEN EQDESTROY(EQTB[P])ELSE IF CURLEVEL>1 THEN
EQSAVE(P,EQTB[P].HH.B1);EQTB[P].HH.B1:=CURLEVEL;EQTB[P].HH.B0:=T;
EQTB[P].HH.RH:=E;IF EQTB[13223].INT>0 THEN RESTORETRACE(P,549);10:END;
{:277}{278:}PROCEDURE EQWORDDEFINE(P:HALFWORD;W:INTEGER);LABEL 10;
BEGIN IF(ETEXMODE=1)AND(EQTB[P].INT=W)THEN BEGIN IF EQTB[13223].INT>0
THEN RESTORETRACE(P,547);GOTO 10;END;
IF EQTB[13223].INT>0 THEN RESTORETRACE(P,548);
IF XEQLEVEL[P]<>CURLEVEL THEN BEGIN EQSAVE(P,XEQLEVEL[P]);
XEQLEVEL[P]:=CURLEVEL;END;EQTB[P].INT:=W;
IF EQTB[13223].INT>0 THEN RESTORETRACE(P,549);10:END;{:278}{279:}
PROCEDURE GEQDEFINE(P:HALFWORD;T:QUARTERWORD;E:HALFWORD);
BEGIN IF EQTB[13223].INT>0 THEN RESTORETRACE(P,550);
BEGIN EQDESTROY(EQTB[P]);EQTB[P].HH.B1:=1;EQTB[P].HH.B0:=T;
EQTB[P].HH.RH:=E;END;IF EQTB[13223].INT>0 THEN RESTORETRACE(P,549);END;
PROCEDURE GEQWORDDEFINE(P:HALFWORD;W:INTEGER);
BEGIN IF EQTB[13223].INT>0 THEN RESTORETRACE(P,550);
BEGIN EQTB[P].INT:=W;XEQLEVEL[P]:=1;END;
IF EQTB[13223].INT>0 THEN RESTORETRACE(P,549);END;{:279}{280:}
PROCEDURE SAVEFORAFTER(T:HALFWORD);
BEGIN IF CURLEVEL>1 THEN BEGIN IF SAVEPTR>MAXSAVESTACK THEN BEGIN
MAXSAVESTACK:=SAVEPTR;
IF MAXSAVESTACK>SAVESIZE-7 THEN OVERFLOW(545,SAVESIZE);END;
SAVESTACK[SAVEPTR].HH.B0:=2;SAVESTACK[SAVEPTR].HH.B1:=0;
SAVESTACK[SAVEPTR].HH.RH:=T;SAVEPTR:=SAVEPTR+1;END;END;{:280}{281:}
PROCEDURE BACKINPUT;FORWARD;PROCEDURE UNSAVE;LABEL 30;VAR P:HALFWORD;
L:QUARTERWORD;T:HALFWORD;A:BOOLEAN;BEGIN A:=FALSE;
IF CURLEVEL>1 THEN BEGIN CURLEVEL:=CURLEVEL-1;{282:}
WHILE TRUE DO BEGIN SAVEPTR:=SAVEPTR-1;
IF SAVESTACK[SAVEPTR].HH.B0=3 THEN GOTO 30;P:=SAVESTACK[SAVEPTR].HH.RH;
IF SAVESTACK[SAVEPTR].HH.B0=2 THEN{326:}BEGIN T:=CURTOK;CURTOK:=P;
IF A THEN BEGIN P:=GETAVAIL;MEM[P].HH.LH:=CURTOK;
MEM[P].HH.RH:=CURINPUT.LOCFIELD;CURINPUT.LOCFIELD:=P;
CURINPUT.STARTFIELD:=P;
IF CURTOK<768 THEN IF CURTOK<512 THEN ALIGNSTATE:=ALIGNSTATE-1 ELSE
ALIGNSTATE:=ALIGNSTATE+1;END ELSE BEGIN BACKINPUT;A:=(ETEXMODE=1);END;
CURTOK:=T;END{:326}
ELSE IF SAVESTACK[SAVEPTR].HH.B0=4 THEN BEGIN SARESTORE;SACHAIN:=P;
SALEVEL:=SAVESTACK[SAVEPTR].HH.B1;
END ELSE BEGIN IF SAVESTACK[SAVEPTR].HH.B0=0 THEN BEGIN L:=SAVESTACK[
SAVEPTR].HH.B1;SAVEPTR:=SAVEPTR-1;
END ELSE SAVESTACK[SAVEPTR]:=EQTB[10781];{283:}
IF P<13168 THEN IF EQTB[P].HH.B1=1 THEN BEGIN EQDESTROY(SAVESTACK[
SAVEPTR]);IF EQTB[13205].INT>0 THEN RESTORETRACE(P,552);
END ELSE BEGIN EQDESTROY(EQTB[P]);EQTB[P]:=SAVESTACK[SAVEPTR];
IF EQTB[13205].INT>0 THEN RESTORETRACE(P,553);
END ELSE IF XEQLEVEL[P]<>1 THEN BEGIN EQTB[P]:=SAVESTACK[SAVEPTR];
XEQLEVEL[P]:=L;IF EQTB[13205].INT>0 THEN RESTORETRACE(P,553);
END ELSE BEGIN IF EQTB[13205].INT>0 THEN RESTORETRACE(P,552);END{:283};
END;END;30:IF EQTB[13224].INT>0 THEN GROUPTRACE(TRUE);
IF GRPSTACK[INOPEN]=CURBOUNDARY THEN GROUPWARNING;
CURGROUP:=SAVESTACK[SAVEPTR].HH.B1;
CURBOUNDARY:=SAVESTACK[SAVEPTR].HH.RH;
IF(ETEXMODE=1)THEN SAVEPTR:=SAVEPTR-1{:282};END ELSE CONFUSION(551);END;
{:281}{288:}PROCEDURE PREPAREMAG;
BEGIN IF(MAGSET>0)AND(EQTB[13185].INT<>MAGSET)THEN BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(555);END;PRINTINT(EQTB[13185].INT);PRINT(556);
PRINTNL(557);BEGIN HELPPTR:=2;HELPLINE[1]:=558;HELPLINE[0]:=559;END;
INTERROR(MAGSET);GEQWORDDEFINE(13185,MAGSET);END;
IF(EQTB[13185].INT<=0)OR(EQTB[13185].INT>32768)THEN BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(560);END;BEGIN HELPPTR:=1;HELPLINE[0]:=561;END;
INTERROR(EQTB[13185].INT);GEQWORDDEFINE(13185,1000);END;
MAGSET:=EQTB[13185].INT;END;{:288}{295:}PROCEDURE TOKENSHOW(P:HALFWORD);
BEGIN IF P<>0 THEN SHOWTOKENLIST(MEM[P].HH.RH,0,10000000);END;{:295}
{296:}PROCEDURE PRINTMEANING;BEGIN PRINTCMDCHR(CURCMD,CURCHR);
IF CURCMD>=111 THEN BEGIN PRINTCHAR(58);PRINTLN;TOKENSHOW(CURCHR);
END ELSE IF(CURCMD=110)AND(CURCHR<5)THEN BEGIN PRINTCHAR(58);PRINTLN;
TOKENSHOW(CURMARK[CURCHR]);END;END;{:296}{299:}PROCEDURE SHOWCURCMDCHR;
VAR N:INTEGER;L:INTEGER;P:HALFWORD;BEGIN BEGINDIAGNOSTIC;PRINTNL(123);
IF CURLIST.MODEFIELD<>SHOWNMODE THEN BEGIN PRINTMODE(CURLIST.MODEFIELD);
PRINT(575);SHOWNMODE:=CURLIST.MODEFIELD;END;PRINTCMDCHR(CURCMD,CURCHR);
IF EQTB[13225].INT>0 THEN IF CURCMD>=105 THEN IF CURCMD<=106 THEN BEGIN
PRINT(575);IF CURCMD=106 THEN BEGIN PRINTCMDCHR(105,CURIF);
PRINTCHAR(32);N:=0;L:=IFLINE;END ELSE BEGIN N:=1;L:=LINE;END;P:=CONDPTR;
WHILE P<>0 DO BEGIN N:=N+1;P:=MEM[P].HH.RH;END;PRINT(576);PRINTINT(N);
PRINTCHAR(41);IF L<>0 THEN BEGIN PRINT(1356);PRINTINT(L);END;END;
PRINTCHAR(125);ENDDIAGNOSTIC(FALSE);END;{:299}{311:}
PROCEDURE SHOWCONTEXT;LABEL 30;VAR OLDSETTING:0..22;NN:INTEGER;
BOTTOMLINE:BOOLEAN;{315:}I:0..BUFSIZE;J:0..BUFSIZE;L:0..HALFERRORLINE;
M:INTEGER;N:0..ERRORLINE;P:INTEGER;Q:INTEGER;{:315}
BEGIN BASEPTR:=INPUTPTR;INPUTSTACK[BASEPTR]:=CURINPUT;{1605:}
IF DIAGQUAL THEN WRITELN(DIAGFILE,'!');
IF DIAGQUAL THEN WRITELN(DIAGFILE,'  start diagnostic'){:1605};NN:=-1;
BOTTOMLINE:=FALSE;WHILE TRUE DO BEGIN CURINPUT:=INPUTSTACK[BASEPTR];
IF(CURINPUT.STATEFIELD<>0)THEN IF(CURINPUT.NAMEFIELD>19)OR(BASEPTR=0)
THEN BOTTOMLINE:=TRUE;
IF(BASEPTR=INPUTPTR)OR BOTTOMLINE OR(NN<EQTB[13222].INT)THEN{312:}
BEGIN IF(BASEPTR=INPUTPTR)OR(CURINPUT.STATEFIELD<>0)OR(CURINPUT.
INDEXFIELD<>3)OR(CURINPUT.LOCFIELD<>0)THEN BEGIN TALLY:=0;
OLDSETTING:=SELECTOR;IF CURINPUT.STATEFIELD<>0 THEN BEGIN{313:}
IF CURINPUT.NAMEFIELD<=17 THEN BEGIN{1607:}
IF DIAGQUAL THEN WRITE(DIAGFILE,'    region/text/label="');
COPYERR:=PRINTIT;LABELSIZE:=14{:1607};
IF(CURINPUT.NAMEFIELD=0)THEN IF BASEPTR=0 THEN PRINTNL(582)ELSE PRINTNL(
583)ELSE BEGIN PRINTNL(584);
IF CURINPUT.NAMEFIELD=17 THEN PRINTCHAR(42)ELSE PRINTINT(CURINPUT.
NAMEFIELD-1);PRINTCHAR(62);END;{1608:}COPYERR:=IGNOREIT;
IF DIAGQUAL THEN WRITE(DIAGFILE,'" "'){:1608};
END ELSE IF CURINPUT.INDEXFIELD<>INOPEN THEN BEGIN PRINTNL(585);
PRINTINT(LINESTACK[CURINPUT.INDEXFIELD+1]);END ELSE BEGIN PRINTNL(585);
PRINTINT(LINE);{1609:}
IF DIAGQUAL THEN WRITE(DIAGFILE,'    region/file/primary ');
DIAGPRINT(CURINPUT.NAMEFIELD);IF DIAGQUAL THEN WRITELN(DIAGFILE,' -');
IF DIAGQUAL THEN WRITELN(DIAGFILE,'          /line=',LINE:1,
'/column_range=(1,65535)'){:1609};END;PRINTCHAR(32){:313};{318:}
BEGIN L:=TALLY;TALLY:=0;SELECTOR:=20;TRICKCOUNT:=1000000;END;
IF BUFFER[CURINPUT.LIMITFIELD]=EQTB[13216].INT THEN J:=CURINPUT.
LIMITFIELD ELSE J:=CURINPUT.LIMITFIELD+1;
IF J>0 THEN FOR I:=CURINPUT.STARTFIELD TO J-1 DO BEGIN IF I=CURINPUT.
LOCFIELD THEN BEGIN FIRSTCOUNT:=TALLY;
TRICKCOUNT:=TALLY+1+ERRORLINE-HALFERRORLINE;
IF TRICKCOUNT<ERRORLINE THEN TRICKCOUNT:=ERRORLINE;END;PRINT(BUFFER[I]);
END;IF CURINPUT.NAMEFIELD<=17 THEN{1613:}BEGIN COPYERR:=PRINTIT;
LABELSIZE:=-1 END{:1613}{:318};END ELSE BEGIN{314:}{1610:}
IF DIAGQUAL THEN WRITE(DIAGFILE,'    region/text/label="');
COPYERR:=PRINTIT;LABELSIZE:=14{:1610};
CASE CURINPUT.INDEXFIELD OF 0:PRINTNL(586);1,2:PRINTNL(587);
3:IF CURINPUT.LOCFIELD=0 THEN PRINTNL(588)ELSE PRINTNL(589);
4:PRINTNL(590);5:BEGIN PRINTLN;PRINTCS(CURINPUT.NAMEFIELD);END;
6:PRINTNL(591);7:PRINTNL(592);8:PRINTNL(593);9:PRINTNL(594);
10:PRINTNL(595);11:PRINTNL(596);12:PRINTNL(597);13:PRINTNL(598);
14:PRINTNL(599);15:PRINTNL(600);16:PRINTNL(601);
OTHERWISE PRINTNL(63)END;{1608:}COPYERR:=IGNOREIT;
IF DIAGQUAL THEN WRITE(DIAGFILE,'" "'){:1608}{:314};{319:}
BEGIN L:=TALLY;TALLY:=0;SELECTOR:=20;TRICKCOUNT:=1000000;END;
IF CURINPUT.INDEXFIELD<5 THEN SHOWTOKENLIST(CURINPUT.STARTFIELD,CURINPUT
.LOCFIELD,100000)ELSE SHOWTOKENLIST(MEM[CURINPUT.STARTFIELD].HH.RH,
CURINPUT.LOCFIELD,100000);{1613:}BEGIN COPYERR:=PRINTIT;
LABELSIZE:=-1 END{:1613};{:319};END;SELECTOR:=OLDSETTING;{317:}
IF TRICKCOUNT=1000000 THEN BEGIN FIRSTCOUNT:=TALLY;
TRICKCOUNT:=TALLY+1+ERRORLINE-HALFERRORLINE;
IF TRICKCOUNT<ERRORLINE THEN TRICKCOUNT:=ERRORLINE;END;
IF TALLY<TRICKCOUNT THEN M:=TALLY-FIRSTCOUNT ELSE M:=TRICKCOUNT-
FIRSTCOUNT;IF L+FIRSTCOUNT<=HALFERRORLINE THEN BEGIN P:=0;
N:=L+FIRSTCOUNT;END ELSE BEGIN PRINT(278);
P:=L+FIRSTCOUNT-HALFERRORLINE+3;N:=HALFERRORLINE;END;
FOR Q:=P TO FIRSTCOUNT-1 DO PRINTCHAR(TRICKBUF[Q MOD ERRORLINE]);{1611:}
IF COPYERR=PRINTIT THEN BEGIN COPYERR:=IGNOREIT;PRINTLN;
FOR Q:=1 TO N DO PRINTCHAR(32);COPYERR:=PRINTIT END ELSE BEGIN PRINTLN;
FOR Q:=1 TO N DO PRINTCHAR(32);END{:1611};
IF M+N<=ERRORLINE THEN P:=FIRSTCOUNT+M ELSE P:=FIRSTCOUNT+(ERRORLINE-N-3
);FOR Q:=FIRSTCOUNT TO P-1 DO PRINTCHAR(TRICKBUF[Q MOD ERRORLINE]);
IF M+N>ERRORLINE THEN PRINT(278);{1612:}
IF COPYERR=PRINTIT THEN BEGIN IF DIAGQUAL THEN WRITE(DIAGFILE,
'"/line=1/column_range=(');N:=N-L;
IF DIAGQUAL THEN WRITELN(DIAGFILE,N+1:1,',65535)');COPYERR:=IGNOREIT;
END ELSE IF DIAGQUAL THEN WRITELN(DIAGFILE,'    region/nested/column=',
CURINPUT.LOCFIELD-CURINPUT.STARTFIELD+1:1){:1612}{:317};NN:=NN+1;END;
END{:312}ELSE IF NN=EQTB[13222].INT THEN BEGIN PRINTNL(278);NN:=NN+1;
END;IF BOTTOMLINE THEN GOTO 30;BASEPTR:=BASEPTR-1;END;
30:CURINPUT:=INPUTSTACK[INPUTPTR];{1606:}
IF DIAGQUAL THEN WRITE(DIAGFILE,'      message "%TEX-E-TEXERROR, ');
WHILE NOT EOF(TEMPFILE)DO BEGIN IF DIAGQUAL THEN WRITE(DIAGFILE,TEMPFILE
^);GET(TEMPFILE)END;IF DIAGQUAL THEN WRITELN(DIAGFILE,'"');
IF DIAGQUAL THEN WRITELN(DIAGFILE,'  end diagnostic'){:1606};END;{:311}
{323:}PROCEDURE BEGINTOKENLIST(P:HALFWORD;T:QUARTERWORD);
BEGIN BEGIN IF INPUTPTR>MAXINSTACK THEN BEGIN MAXINSTACK:=INPUTPTR;
IF INPUTPTR=STACKSIZE THEN OVERFLOW(602,STACKSIZE);END;
INPUTSTACK[INPUTPTR]:=CURINPUT;INPUTPTR:=INPUTPTR+1;END;
CURINPUT.STATEFIELD:=0;CURINPUT.STARTFIELD:=P;CURINPUT.INDEXFIELD:=T;
IF T>=5 THEN BEGIN MEM[P].HH.LH:=MEM[P].HH.LH+1;
IF T=5 THEN CURINPUT.LIMITFIELD:=PARAMPTR ELSE BEGIN CURINPUT.LOCFIELD:=
MEM[P].HH.RH;IF EQTB[13198].INT>1 THEN BEGIN BEGINDIAGNOSTIC;
PRINTNL(339);CASE T OF 15:PRINTESC(354);16:PRINTESC(603);
OTHERWISE PRINTCMDCHR(72,T+11311)END;PRINT(563);TOKENSHOW(P);
ENDDIAGNOSTIC(FALSE);END;END;END ELSE CURINPUT.LOCFIELD:=P;END;{:323}
{324:}PROCEDURE ENDTOKENLIST;
BEGIN IF CURINPUT.INDEXFIELD>=3 THEN BEGIN IF CURINPUT.INDEXFIELD<=4
THEN FLUSHLIST(CURINPUT.STARTFIELD)ELSE BEGIN DELETETOKENREF(CURINPUT.
STARTFIELD);
IF CURINPUT.INDEXFIELD=5 THEN WHILE PARAMPTR>CURINPUT.LIMITFIELD DO
BEGIN PARAMPTR:=PARAMPTR-1;FLUSHLIST(PARAMSTACK[PARAMPTR]);END;END;
END ELSE IF CURINPUT.INDEXFIELD=1 THEN IF ALIGNSTATE>500000 THEN
ALIGNSTATE:=0 ELSE FATALERROR(604);BEGIN INPUTPTR:=INPUTPTR-1;
CURINPUT:=INPUTSTACK[INPUTPTR];END;
BEGIN IF INTERRUPT<>0 THEN PAUSEFORINSTRUCTIONS;END;END;{:324}{325:}
PROCEDURE BACKINPUT;VAR P:HALFWORD;
BEGIN WHILE(CURINPUT.STATEFIELD=0)AND(CURINPUT.LOCFIELD=0)DO
ENDTOKENLIST;P:=GETAVAIL;MEM[P].HH.LH:=CURTOK;
IF CURTOK<768 THEN IF CURTOK<512 THEN ALIGNSTATE:=ALIGNSTATE-1 ELSE
ALIGNSTATE:=ALIGNSTATE+1;
BEGIN IF INPUTPTR>MAXINSTACK THEN BEGIN MAXINSTACK:=INPUTPTR;
IF INPUTPTR=STACKSIZE THEN OVERFLOW(602,STACKSIZE);END;
INPUTSTACK[INPUTPTR]:=CURINPUT;INPUTPTR:=INPUTPTR+1;END;
CURINPUT.STATEFIELD:=0;CURINPUT.STARTFIELD:=P;CURINPUT.INDEXFIELD:=3;
CURINPUT.LOCFIELD:=P;END;{:325}{327:}PROCEDURE BACKERROR;
BEGIN OKTOINTERRUPT:=FALSE;BACKINPUT;OKTOINTERRUPT:=TRUE;ERROR;END;
PROCEDURE INSERROR;BEGIN OKTOINTERRUPT:=FALSE;BACKINPUT;
CURINPUT.INDEXFIELD:=4;OKTOINTERRUPT:=TRUE;ERROR;END;{:327}{328:}
PROCEDURE BEGINFILEREADING;
BEGIN IF INOPEN=MAXINOPEN THEN OVERFLOW(605,MAXINOPEN);
IF FIRST=BUFSIZE THEN OVERFLOW(257,BUFSIZE);INOPEN:=INOPEN+1;
BEGIN IF INPUTPTR>MAXINSTACK THEN BEGIN MAXINSTACK:=INPUTPTR;
IF INPUTPTR=STACKSIZE THEN OVERFLOW(602,STACKSIZE);END;
INPUTSTACK[INPUTPTR]:=CURINPUT;INPUTPTR:=INPUTPTR+1;END;
CURINPUT.INDEXFIELD:=INOPEN;EOFSEEN[CURINPUT.INDEXFIELD]:=FALSE;
GRPSTACK[CURINPUT.INDEXFIELD]:=CURBOUNDARY;
IFSTACK[CURINPUT.INDEXFIELD]:=CONDPTR;
LINESTACK[CURINPUT.INDEXFIELD]:=LINE;CURINPUT.STARTFIELD:=FIRST;
CURINPUT.STATEFIELD:=1;CURINPUT.NAMEFIELD:=0;END;{:328}{329:}
PROCEDURE ENDFILEREADING;BEGIN FIRST:=CURINPUT.STARTFIELD;
LINE:=LINESTACK[CURINPUT.INDEXFIELD];
IF(CURINPUT.NAMEFIELD=18)OR(CURINPUT.NAMEFIELD=19)THEN PSEUDOCLOSE ELSE
IF CURINPUT.NAMEFIELD>17 THEN ACLOSE(INPUTFILE[CURINPUT.INDEXFIELD]);
BEGIN INPUTPTR:=INPUTPTR-1;CURINPUT:=INPUTSTACK[INPUTPTR];END;
INOPEN:=INOPEN-1;END;{:329}{330:}PROCEDURE CLEARFORERRORPROMPT;
BEGIN WHILE(CURINPUT.STATEFIELD<>0)AND(CURINPUT.NAMEFIELD=0)AND(INPUTPTR
>0)AND(CURINPUT.LOCFIELD>CURINPUT.LIMITFIELD)DO ENDFILEREADING;PRINTLN;
INRAB^.RAB$V_PTA:=TRUE;END;{:330}{336:}PROCEDURE CHECKOUTERVALIDITY;
VAR P:HALFWORD;Q:HALFWORD;
BEGIN IF SCANNERSTATUS<>0 THEN BEGIN DELETIONSALLOWED:=FALSE;{337:}
IF CURCS<>0 THEN BEGIN IF(CURINPUT.STATEFIELD=0)OR(CURINPUT.NAMEFIELD<1)
OR(CURINPUT.NAMEFIELD>17)THEN BEGIN P:=GETAVAIL;
MEM[P].HH.LH:=4095+CURCS;BEGINTOKENLIST(P,3);END;CURCMD:=10;CURCHR:=32;
END{:337};IF SCANNERSTATUS>1 THEN{338:}BEGIN RUNAWAY;
IF CURCS=0 THEN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(613);END ELSE BEGIN CURCS:=0;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(614);END;END;PRINT(615);{339:}P:=GETAVAIL;
CASE SCANNERSTATUS OF 2:BEGIN PRINT(578);MEM[P].HH.LH:=637;END;
3:BEGIN PRINT(621);MEM[P].HH.LH:=PARTOKEN;LONGSTATE:=113;END;
4:BEGIN PRINT(580);MEM[P].HH.LH:=637;Q:=P;P:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[P].HH.LH:=14610;ALIGNSTATE:=-1000000;END;5:BEGIN PRINT(581);
MEM[P].HH.LH:=637;END;END;BEGINTOKENLIST(P,4){:339};PRINT(616);
SPRINTCS(WARNINGINDEX);BEGIN HELPPTR:=4;HELPLINE[3]:=617;
HELPLINE[2]:=618;HELPLINE[1]:=619;HELPLINE[0]:=620;END;ERROR;END{:338}
ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(607);END;PRINTCMDCHR(105,CURIF);
PRINT(608);PRINTINT(SKIPLINE);BEGIN HELPPTR:=3;HELPLINE[2]:=609;
HELPLINE[1]:=610;HELPLINE[0]:=611;END;
IF CURCS<>0 THEN CURCS:=0 ELSE HELPLINE[2]:=612;CURTOK:=14613;INSERROR;
END;DELETIONSALLOWED:=TRUE;END;END;{:336}{340:}PROCEDURE FIRMUPTHELINE;
FORWARD;{:340}{341:}PROCEDURE GETNEXT;LABEL 20,25,21,26,40,10;
VAR K:0..BUFSIZE;T:HALFWORD;CAT:0..15;C,CC:ASCIICODE;D:2..3;
BEGIN 20:CURCS:=0;IF CURINPUT.STATEFIELD<>0 THEN{343:}
BEGIN 25:IF CURINPUT.LOCFIELD<=CURINPUT.LIMITFIELD THEN BEGIN CURCHR:=
BUFFER[CURINPUT.LOCFIELD];CURINPUT.LOCFIELD:=CURINPUT.LOCFIELD+1;
21:CURCMD:=EQTB[11888+CURCHR].HH.RH;{344:}
CASE CURINPUT.STATEFIELD+CURCMD OF{345:}10,26,42,27,43{:345}:GOTO 25;
1,17,33:{354:}
BEGIN IF CURINPUT.LOCFIELD>CURINPUT.LIMITFIELD THEN CURCS:=513 ELSE
BEGIN 26:K:=CURINPUT.LOCFIELD;CURCHR:=BUFFER[K];
CAT:=EQTB[11888+CURCHR].HH.RH;K:=K+1;
IF CAT=11 THEN CURINPUT.STATEFIELD:=17 ELSE IF CAT=10 THEN CURINPUT.
STATEFIELD:=17 ELSE CURINPUT.STATEFIELD:=1;
IF(CAT=11)AND(K<=CURINPUT.LIMITFIELD)THEN{356:}
BEGIN REPEAT CURCHR:=BUFFER[K];CAT:=EQTB[11888+CURCHR].HH.RH;K:=K+1;
UNTIL(CAT<>11)OR(K>CURINPUT.LIMITFIELD);{355:}
BEGIN IF BUFFER[K]=CURCHR THEN IF CAT=7 THEN IF K<CURINPUT.LIMITFIELD
THEN BEGIN C:=BUFFER[K+1];IF C<128 THEN BEGIN D:=2;
IF(((C>=48)AND(C<=57))OR((C>=97)AND(C<=102)))THEN IF K+2<=CURINPUT.
LIMITFIELD THEN BEGIN CC:=BUFFER[K+2];
IF(((CC>=48)AND(CC<=57))OR((CC>=97)AND(CC<=102)))THEN D:=D+1;END;
IF D>2 THEN BEGIN IF C<=57 THEN CURCHR:=C-48 ELSE CURCHR:=C-87;
IF CC<=57 THEN CURCHR:=16*CURCHR+CC-48 ELSE CURCHR:=16*CURCHR+CC-87;
BUFFER[K-1]:=CURCHR;
END ELSE IF C<64 THEN BUFFER[K-1]:=C+64 ELSE BUFFER[K-1]:=C-64;
CURINPUT.LIMITFIELD:=CURINPUT.LIMITFIELD-D;FIRST:=FIRST-D;
WHILE K<=CURINPUT.LIMITFIELD DO BEGIN BUFFER[K]:=BUFFER[K+D];K:=K+1;END;
GOTO 26;END;END;END{:355};IF CAT<>11 THEN K:=K-1;
IF K>CURINPUT.LOCFIELD+1 THEN BEGIN CURCS:=IDLOOKUP(CURINPUT.LOCFIELD,K-
CURINPUT.LOCFIELD);CURINPUT.LOCFIELD:=K;GOTO 40;END;END{:356}ELSE{355:}
BEGIN IF BUFFER[K]=CURCHR THEN IF CAT=7 THEN IF K<CURINPUT.LIMITFIELD
THEN BEGIN C:=BUFFER[K+1];IF C<128 THEN BEGIN D:=2;
IF(((C>=48)AND(C<=57))OR((C>=97)AND(C<=102)))THEN IF K+2<=CURINPUT.
LIMITFIELD THEN BEGIN CC:=BUFFER[K+2];
IF(((CC>=48)AND(CC<=57))OR((CC>=97)AND(CC<=102)))THEN D:=D+1;END;
IF D>2 THEN BEGIN IF C<=57 THEN CURCHR:=C-48 ELSE CURCHR:=C-87;
IF CC<=57 THEN CURCHR:=16*CURCHR+CC-48 ELSE CURCHR:=16*CURCHR+CC-87;
BUFFER[K-1]:=CURCHR;
END ELSE IF C<64 THEN BUFFER[K-1]:=C+64 ELSE BUFFER[K-1]:=C-64;
CURINPUT.LIMITFIELD:=CURINPUT.LIMITFIELD-D;FIRST:=FIRST-D;
WHILE K<=CURINPUT.LIMITFIELD DO BEGIN BUFFER[K]:=BUFFER[K+D];K:=K+1;END;
GOTO 26;END;END;END{:355};CURCS:=257+BUFFER[CURINPUT.LOCFIELD];
CURINPUT.LOCFIELD:=CURINPUT.LOCFIELD+1;END;40:CURCMD:=EQTB[CURCS].HH.B0;
CURCHR:=EQTB[CURCS].HH.RH;IF CURCMD>=113 THEN CHECKOUTERVALIDITY;
END{:354};14,30,46:{353:}BEGIN CURCS:=CURCHR+1;
CURCMD:=EQTB[CURCS].HH.B0;CURCHR:=EQTB[CURCS].HH.RH;
CURINPUT.STATEFIELD:=1;IF CURCMD>=113 THEN CHECKOUTERVALIDITY;END{:353};
8,24,40:{352:}
BEGIN IF CURCHR=BUFFER[CURINPUT.LOCFIELD]THEN IF CURINPUT.LOCFIELD<
CURINPUT.LIMITFIELD THEN BEGIN C:=BUFFER[CURINPUT.LOCFIELD+1];
IF C<128 THEN BEGIN CURINPUT.LOCFIELD:=CURINPUT.LOCFIELD+2;
IF(((C>=48)AND(C<=57))OR((C>=97)AND(C<=102)))THEN IF CURINPUT.LOCFIELD<=
CURINPUT.LIMITFIELD THEN BEGIN CC:=BUFFER[CURINPUT.LOCFIELD];
IF(((CC>=48)AND(CC<=57))OR((CC>=97)AND(CC<=102)))THEN BEGIN CURINPUT.
LOCFIELD:=CURINPUT.LOCFIELD+1;
IF C<=57 THEN CURCHR:=C-48 ELSE CURCHR:=C-87;
IF CC<=57 THEN CURCHR:=16*CURCHR+CC-48 ELSE CURCHR:=16*CURCHR+CC-87;
GOTO 21;END;END;IF C<64 THEN CURCHR:=C+64 ELSE CURCHR:=C-64;GOTO 21;END;
END;CURINPUT.STATEFIELD:=1;END{:352};16,32,48:{346:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(622);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=623;HELPLINE[0]:=624;END;DELETIONSALLOWED:=FALSE;ERROR;
DELETIONSALLOWED:=TRUE;GOTO 20;END{:346};{347:}11:{349:}
BEGIN CURINPUT.STATEFIELD:=17;CURCHR:=32;END{:349};6:{348:}
BEGIN CURINPUT.LOCFIELD:=CURINPUT.LIMITFIELD+1;CURCMD:=10;CURCHR:=32;
END{:348};22,15,31,47:{350:}
BEGIN CURINPUT.LOCFIELD:=CURINPUT.LIMITFIELD+1;GOTO 25;END{:350};
38:{351:}BEGIN CURINPUT.LOCFIELD:=CURINPUT.LIMITFIELD+1;CURCS:=PARLOC;
CURCMD:=EQTB[CURCS].HH.B0;CURCHR:=EQTB[CURCS].HH.RH;
IF CURCMD>=113 THEN CHECKOUTERVALIDITY;END{:351};
2:ALIGNSTATE:=ALIGNSTATE+1;18,34:BEGIN CURINPUT.STATEFIELD:=1;
ALIGNSTATE:=ALIGNSTATE+1;END;3:ALIGNSTATE:=ALIGNSTATE-1;
19,35:BEGIN CURINPUT.STATEFIELD:=1;ALIGNSTATE:=ALIGNSTATE-1;END;
20,21,23,25,28,29,36,37,39,41,44,45:CURINPUT.STATEFIELD:=1;{:347}
OTHERWISE END{:344};END ELSE BEGIN CURINPUT.STATEFIELD:=33;{360:}
IF CURINPUT.NAMEFIELD>17 THEN{362:}BEGIN LINE:=LINE+1;
FIRST:=CURINPUT.STARTFIELD;
IF NOT FORCEEOF THEN IF CURINPUT.NAMEFIELD<=19 THEN BEGIN IF PSEUDOINPUT
THEN FIRMUPTHELINE ELSE IF(EQTB[11325].HH.RH<>0)AND NOT EOFSEEN[CURINPUT
.INDEXFIELD]THEN BEGIN CURINPUT.LIMITFIELD:=FIRST-1;
EOFSEEN[CURINPUT.INDEXFIELD]:=TRUE;BEGINTOKENLIST(EQTB[11325].HH.RH,14);
GOTO 20;END ELSE FORCEEOF:=TRUE;
END ELSE BEGIN IF INPUTLN(INPUTFILE[CURINPUT.INDEXFIELD],TRUE)THEN
FIRMUPTHELINE ELSE IF(EQTB[11325].HH.RH<>0)AND NOT EOFSEEN[CURINPUT.
INDEXFIELD]THEN BEGIN CURINPUT.LIMITFIELD:=FIRST-1;
EOFSEEN[CURINPUT.INDEXFIELD]:=TRUE;BEGINTOKENLIST(EQTB[11325].HH.RH,14);
GOTO 20;END ELSE FORCEEOF:=TRUE;END;
IF FORCEEOF THEN BEGIN IF EQTB[13227].INT>0 THEN IF(GRPSTACK[INOPEN]<>
CURBOUNDARY)OR(IFSTACK[INOPEN]<>CONDPTR)THEN FILEWARNING;
IF CURINPUT.NAMEFIELD>=19 THEN BEGIN PRINTCHAR(41);
OPENPARENS:=OPENPARENS-1;IF ODD(SELECTOR)THEN WRITELN(TERMOUT);END;
FORCEEOF:=FALSE;ENDFILEREADING;CHECKOUTERVALIDITY;GOTO 20;END;
IF(EQTB[13216].INT<0)OR(EQTB[13216].INT>255)THEN CURINPUT.LIMITFIELD:=
CURINPUT.LIMITFIELD-1 ELSE BUFFER[CURINPUT.LIMITFIELD]:=EQTB[13216].INT;
FIRST:=CURINPUT.LIMITFIELD+1;CURINPUT.LOCFIELD:=CURINPUT.STARTFIELD;
END{:362}ELSE BEGIN IF NOT(CURINPUT.NAMEFIELD=0)THEN BEGIN CURCMD:=0;
CURCHR:=0;GOTO 10;END;IF INPUTPTR>0 THEN BEGIN ENDFILEREADING;GOTO 20;
END;IF SELECTOR<18 THEN OPENLOGFILE;
IF INTERACTION>1 THEN BEGIN IF(EQTB[13216].INT<0)OR(EQTB[13216].INT>255)
THEN CURINPUT.LIMITFIELD:=CURINPUT.LIMITFIELD+1;
IF CURINPUT.LIMITFIELD=CURINPUT.STARTFIELD THEN PRINTNL(625);PRINTLN;
FIRST:=CURINPUT.STARTFIELD;BEGIN WAKEUPTERMINAL;PRINT(42);TERMINPUT;END;
CURINPUT.LIMITFIELD:=LAST;
IF(EQTB[13216].INT<0)OR(EQTB[13216].INT>255)THEN CURINPUT.LIMITFIELD:=
CURINPUT.LIMITFIELD-1 ELSE BUFFER[CURINPUT.LIMITFIELD]:=EQTB[13216].INT;
FIRST:=CURINPUT.LIMITFIELD+1;CURINPUT.LOCFIELD:=CURINPUT.STARTFIELD;
END ELSE FATALERROR(626);END{:360};
BEGIN IF INTERRUPT<>0 THEN PAUSEFORINSTRUCTIONS;END;GOTO 25;END;
END{:343}ELSE{357:}
IF CURINPUT.LOCFIELD<>0 THEN BEGIN T:=MEM[CURINPUT.LOCFIELD].HH.LH;
CURINPUT.LOCFIELD:=MEM[CURINPUT.LOCFIELD].HH.RH;
IF T>=4095 THEN BEGIN CURCS:=T-4095;CURCMD:=EQTB[CURCS].HH.B0;
CURCHR:=EQTB[CURCS].HH.RH;IF CURCMD>=113 THEN IF CURCMD=116 THEN{358:}
BEGIN CURCS:=MEM[CURINPUT.LOCFIELD].HH.LH-4095;CURINPUT.LOCFIELD:=0;
CURCMD:=EQTB[CURCS].HH.B0;CURCHR:=EQTB[CURCS].HH.RH;
IF CURCMD>100 THEN BEGIN CURCMD:=0;CURCHR:=257;END;END{:358}
ELSE CHECKOUTERVALIDITY;END ELSE BEGIN CURCMD:=T DIV 256;
CURCHR:=T MOD 256;CASE CURCMD OF 1:ALIGNSTATE:=ALIGNSTATE+1;
2:ALIGNSTATE:=ALIGNSTATE-1;5:{359:}
BEGIN BEGINTOKENLIST(PARAMSTACK[CURINPUT.LIMITFIELD+CURCHR-1],0);
GOTO 20;END{:359};OTHERWISE END;END;END ELSE BEGIN ENDTOKENLIST;GOTO 20;
END{:357};{342:}
IF CURCMD<=5 THEN IF CURCMD>=4 THEN IF ALIGNSTATE=0 THEN{789:}
BEGIN IF SCANNERSTATUS=4 THEN FATALERROR(604);
CURCMD:=MEM[CURALIGN+5].HH.LH;MEM[CURALIGN+5].HH.LH:=CURCHR;
IF CURCMD=63 THEN BEGINTOKENLIST(327134,2)ELSE BEGINTOKENLIST(MEM[
CURALIGN+2].INT,2);ALIGNSTATE:=1000000;GOTO 20;END{:789}{:342};10:END;
{:341}{363:}PROCEDURE FIRMUPTHELINE;VAR K:0..BUFSIZE;
BEGIN CURINPUT.LIMITFIELD:=LAST;
IF EQTB[13196].INT>0 THEN IF INTERACTION>1 THEN BEGIN WAKEUPTERMINAL;
PRINTLN;IF CURINPUT.STARTFIELD<CURINPUT.LIMITFIELD THEN FOR K:=CURINPUT.
STARTFIELD TO CURINPUT.LIMITFIELD-1 DO PRINT(BUFFER[K]);
FIRST:=CURINPUT.LIMITFIELD;BEGIN WAKEUPTERMINAL;PRINT(627);TERMINPUT;
END;
IF LAST>FIRST THEN BEGIN FOR K:=FIRST TO LAST-1 DO BUFFER[K+CURINPUT.
STARTFIELD-FIRST]:=BUFFER[K];
CURINPUT.LIMITFIELD:=CURINPUT.STARTFIELD+LAST-FIRST;END;END;END;{:363}
{365:}PROCEDURE GETTOKEN;BEGIN NONEWCONTROLSEQUENCE:=FALSE;GETNEXT;
NONEWCONTROLSEQUENCE:=TRUE;
IF CURCS=0 THEN CURTOK:=(CURCMD*256)+CURCHR ELSE CURTOK:=4095+CURCS;END;
{:365}{366:}{389:}PROCEDURE MACROCALL;LABEL 10,22,30,31,40;
VAR R:HALFWORD;P:HALFWORD;Q:HALFWORD;S:HALFWORD;T:HALFWORD;U,V:HALFWORD;
RBRACEPTR:HALFWORD;N:SMALLNUMBER;UNBALANCE:HALFWORD;M:HALFWORD;
REFCOUNT:HALFWORD;SAVESCANNERSTATUS:SMALLNUMBER;
SAVEWARNINGINDEX:HALFWORD;MATCHCHR:ASCIICODE;
BEGIN SAVESCANNERSTATUS:=SCANNERSTATUS;SAVEWARNINGINDEX:=WARNINGINDEX;
WARNINGINDEX:=CURCS;REFCOUNT:=CURCHR;R:=MEM[REFCOUNT].HH.RH;N:=0;
IF EQTB[13198].INT>0 THEN{401:}BEGIN BEGINDIAGNOSTIC;PRINTLN;
PRINTCS(WARNINGINDEX);TOKENSHOW(REFCOUNT);ENDDIAGNOSTIC(FALSE);END{:401}
;IF MEM[R].HH.LH=3585 THEN R:=MEM[R].HH.RH;
IF MEM[R].HH.LH<>3584 THEN{391:}BEGIN SCANNERSTATUS:=3;UNBALANCE:=0;
LONGSTATE:=EQTB[CURCS].HH.B0;
IF LONGSTATE>=113 THEN LONGSTATE:=LONGSTATE-2;
REPEAT MEM[327141].HH.RH:=0;
IF(MEM[R].HH.LH>3583)OR(MEM[R].HH.LH<3328)THEN S:=0 ELSE BEGIN MATCHCHR
:=MEM[R].HH.LH-3328;S:=MEM[R].HH.RH;R:=S;P:=327141;M:=0;END;{392:}
22:GETTOKEN;IF CURTOK=MEM[R].HH.LH THEN{394:}BEGIN R:=MEM[R].HH.RH;
IF(MEM[R].HH.LH>=3328)AND(MEM[R].HH.LH<=3584)THEN BEGIN IF CURTOK<512
THEN ALIGNSTATE:=ALIGNSTATE-1;GOTO 40;END ELSE GOTO 22;END{:394};{397:}
IF S<>R THEN IF S=0 THEN{398:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(659);END;SPRINTCS(WARNINGINDEX);
PRINT(660);BEGIN HELPPTR:=4;HELPLINE[3]:=661;HELPLINE[2]:=662;
HELPLINE[1]:=663;HELPLINE[0]:=664;END;ERROR;GOTO 10;END{:398}
ELSE BEGIN T:=S;REPEAT BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=MEM[T].HH.LH;P:=Q;END;M:=M+1;U:=MEM[T].HH.RH;V:=S;
WHILE TRUE DO BEGIN IF U=R THEN IF CURTOK<>MEM[V].HH.LH THEN GOTO 30
ELSE BEGIN R:=MEM[V].HH.RH;GOTO 22;END;
IF MEM[U].HH.LH<>MEM[V].HH.LH THEN GOTO 30;U:=MEM[U].HH.RH;
V:=MEM[V].HH.RH;END;30:T:=MEM[T].HH.RH;UNTIL T=R;R:=S;END{:397};
IF CURTOK=PARTOKEN THEN IF LONGSTATE<>112 THEN{396:}
BEGIN IF LONGSTATE=111 THEN BEGIN RUNAWAY;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(654);END;SPRINTCS(WARNINGINDEX);PRINT(655);
BEGIN HELPPTR:=3;HELPLINE[2]:=656;HELPLINE[1]:=657;HELPLINE[0]:=658;END;
BACKERROR;END;PSTACK[N]:=MEM[327141].HH.RH;
ALIGNSTATE:=ALIGNSTATE-UNBALANCE;FOR M:=0 TO N DO FLUSHLIST(PSTACK[M]);
GOTO 10;END{:396};IF CURTOK<768 THEN IF CURTOK<512 THEN{399:}
BEGIN UNBALANCE:=1;WHILE TRUE DO BEGIN BEGIN BEGIN Q:=AVAIL;
IF Q=0 THEN Q:=GETAVAIL ELSE BEGIN AVAIL:=MEM[Q].HH.RH;MEM[Q].HH.RH:=0;
DYNUSED:=DYNUSED+1;END;END;MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=CURTOK;P:=Q;
END;GETTOKEN;IF CURTOK=PARTOKEN THEN IF LONGSTATE<>112 THEN{396:}
BEGIN IF LONGSTATE=111 THEN BEGIN RUNAWAY;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(654);END;SPRINTCS(WARNINGINDEX);PRINT(655);
BEGIN HELPPTR:=3;HELPLINE[2]:=656;HELPLINE[1]:=657;HELPLINE[0]:=658;END;
BACKERROR;END;PSTACK[N]:=MEM[327141].HH.RH;
ALIGNSTATE:=ALIGNSTATE-UNBALANCE;FOR M:=0 TO N DO FLUSHLIST(PSTACK[M]);
GOTO 10;END{:396};
IF CURTOK<768 THEN IF CURTOK<512 THEN UNBALANCE:=UNBALANCE+1 ELSE BEGIN
UNBALANCE:=UNBALANCE-1;IF UNBALANCE=0 THEN GOTO 31;END;END;
31:RBRACEPTR:=P;BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=CURTOK;
P:=Q;END;END{:399}ELSE{395:}BEGIN BACKINPUT;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(646);END;SPRINTCS(WARNINGINDEX);PRINT(647);
BEGIN HELPPTR:=6;HELPLINE[5]:=648;HELPLINE[4]:=649;HELPLINE[3]:=650;
HELPLINE[2]:=651;HELPLINE[1]:=652;HELPLINE[0]:=653;END;
ALIGNSTATE:=ALIGNSTATE+1;LONGSTATE:=111;CURTOK:=PARTOKEN;INSERROR;
END{:395}ELSE{393:}
BEGIN IF CURTOK=2592 THEN IF MEM[R].HH.LH<=3584 THEN IF MEM[R].HH.LH>=
3328 THEN GOTO 22;BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=CURTOK;P:=Q;END;END{:393};M:=M+1;
IF MEM[R].HH.LH>3584 THEN GOTO 22;IF MEM[R].HH.LH<3328 THEN GOTO 22;
40:IF S<>0 THEN{400:}
BEGIN IF(M=1)AND(MEM[P].HH.LH<768)AND(P<>327141)THEN BEGIN MEM[RBRACEPTR
].HH.RH:=0;BEGIN MEM[P].HH.RH:=AVAIL;AVAIL:=P;DYNUSED:=DYNUSED-1;END;
P:=MEM[327141].HH.RH;PSTACK[N]:=MEM[P].HH.RH;BEGIN MEM[P].HH.RH:=AVAIL;
AVAIL:=P;DYNUSED:=DYNUSED-1;END;END ELSE PSTACK[N]:=MEM[327141].HH.RH;
N:=N+1;IF EQTB[13198].INT>0 THEN BEGIN BEGINDIAGNOSTIC;
PRINTNL(MATCHCHR);PRINTINT(N);PRINT(665);
SHOWTOKENLIST(PSTACK[N-1],0,1000);ENDDIAGNOSTIC(FALSE);END;END{:400}
{:392};UNTIL MEM[R].HH.LH=3584;END{:391};{390:}
WHILE(CURINPUT.STATEFIELD=0)AND(CURINPUT.LOCFIELD=0)DO ENDTOKENLIST;
BEGINTOKENLIST(REFCOUNT,5);CURINPUT.NAMEFIELD:=WARNINGINDEX;
CURINPUT.LOCFIELD:=MEM[R].HH.RH;
IF N>0 THEN BEGIN IF PARAMPTR+N>MAXPARAMSTACK THEN BEGIN MAXPARAMSTACK:=
PARAMPTR+N;IF MAXPARAMSTACK>PARAMSIZE THEN OVERFLOW(645,PARAMSIZE);END;
FOR M:=0 TO N-1 DO PARAMSTACK[PARAMPTR+M]:=PSTACK[M];
PARAMPTR:=PARAMPTR+N;END{:390};10:SCANNERSTATUS:=SAVESCANNERSTATUS;
WARNINGINDEX:=SAVEWARNINGINDEX;END;{:389}{379:}PROCEDURE INSERTRELAX;
BEGIN CURTOK:=4095+CURCS;BACKINPUT;CURTOK:=14616;BACKINPUT;
CURINPUT.INDEXFIELD:=4;END;{:379}{1485:}PROCEDURE PSEUDOSTART;FORWARD;
{:1485}{1543:}PROCEDURE SCANREGISTERNUM;FORWARD;{:1543}{1548:}
PROCEDURE NEWINDEX(I:QUARTERWORD;Q:HALFWORD);VAR K:SMALLNUMBER;
BEGIN CURPTR:=GETNODE(9);MEM[CURPTR].HH.B0:=I;MEM[CURPTR].HH.B1:=0;
MEM[CURPTR].HH.RH:=Q;FOR K:=1 TO 8 DO MEM[CURPTR+K]:=SANULL;END;{:1548}
{1552:}PROCEDURE FINDSAELEMENT(T:SMALLNUMBER;N:HALFWORD;W:BOOLEAN);
LABEL 45,46,47,48,49,10;VAR Q:HALFWORD;I:SMALLNUMBER;
BEGIN CURPTR:=SAROOT[T];
BEGIN IF CURPTR=0 THEN IF W THEN GOTO 45 ELSE GOTO 10;END;Q:=CURPTR;
I:=N DIV 4096;
IF ODD(I)THEN CURPTR:=MEM[Q+(I DIV 2)+1].HH.RH ELSE CURPTR:=MEM[Q+(I DIV
2)+1].HH.LH;BEGIN IF CURPTR=0 THEN IF W THEN GOTO 46 ELSE GOTO 10;END;
Q:=CURPTR;I:=(N DIV 256)MOD 16;
IF ODD(I)THEN CURPTR:=MEM[Q+(I DIV 2)+1].HH.RH ELSE CURPTR:=MEM[Q+(I DIV
2)+1].HH.LH;BEGIN IF CURPTR=0 THEN IF W THEN GOTO 47 ELSE GOTO 10;END;
Q:=CURPTR;I:=(N DIV 16)MOD 16;
IF ODD(I)THEN CURPTR:=MEM[Q+(I DIV 2)+1].HH.RH ELSE CURPTR:=MEM[Q+(I DIV
2)+1].HH.LH;BEGIN IF CURPTR=0 THEN IF W THEN GOTO 48 ELSE GOTO 10;END;
Q:=CURPTR;I:=N MOD 16;
IF ODD(I)THEN CURPTR:=MEM[Q+(I DIV 2)+1].HH.RH ELSE CURPTR:=MEM[Q+(I DIV
2)+1].HH.LH;IF(CURPTR=0)AND W THEN GOTO 49;GOTO 10;45:NEWINDEX(T,0);
SAROOT[T]:=CURPTR;Q:=CURPTR;I:=N DIV 4096;46:NEWINDEX(I,Q);
BEGIN IF ODD(I)THEN MEM[Q+(I DIV 2)+1].HH.RH:=CURPTR ELSE MEM[Q+(I DIV 2
)+1].HH.LH:=CURPTR;MEM[Q].HH.B1:=MEM[Q].HH.B1+1;END;Q:=CURPTR;
I:=(N DIV 256)MOD 16;47:NEWINDEX(I,Q);
BEGIN IF ODD(I)THEN MEM[Q+(I DIV 2)+1].HH.RH:=CURPTR ELSE MEM[Q+(I DIV 2
)+1].HH.LH:=CURPTR;MEM[Q].HH.B1:=MEM[Q].HH.B1+1;END;Q:=CURPTR;
I:=(N DIV 16)MOD 16;48:NEWINDEX(I,Q);
BEGIN IF ODD(I)THEN MEM[Q+(I DIV 2)+1].HH.RH:=CURPTR ELSE MEM[Q+(I DIV 2
)+1].HH.LH:=CURPTR;MEM[Q].HH.B1:=MEM[Q].HH.B1+1;END;Q:=CURPTR;
I:=N MOD 16;49:{1553:}IF T=6 THEN BEGIN CURPTR:=GETNODE(4);
MEM[CURPTR+1]:=SANULL;MEM[CURPTR+2]:=SANULL;MEM[CURPTR+3]:=SANULL;
END ELSE BEGIN IF T<=1 THEN BEGIN CURPTR:=GETNODE(3);
MEM[CURPTR+2].INT:=0;MEM[CURPTR+1].HH.RH:=N;
END ELSE BEGIN CURPTR:=GETNODE(2);
IF T<=3 THEN BEGIN MEM[CURPTR+1].HH.RH:=0;MEM[0].HH.RH:=MEM[0].HH.RH+1;
END ELSE MEM[CURPTR+1].HH.RH:=0;END;MEM[CURPTR+1].HH.LH:=0;END;
MEM[CURPTR].HH.B0:=16*T+I;MEM[CURPTR].HH.B1:=1{:1553};
MEM[CURPTR].HH.RH:=Q;
BEGIN IF ODD(I)THEN MEM[Q+(I DIV 2)+1].HH.RH:=CURPTR ELSE MEM[Q+(I DIV 2
)+1].HH.LH:=CURPTR;MEM[Q].HH.B1:=MEM[Q].HH.B1+1;END;10:END;{:1552}
PROCEDURE PASSTEXT;FORWARD;PROCEDURE STARTINPUT;FORWARD;
PROCEDURE CONDITIONAL;FORWARD;PROCEDURE GETXTOKEN;FORWARD;
PROCEDURE CONVTOKS;FORWARD;PROCEDURE INSTHETOKS;FORWARD;
PROCEDURE EXPAND;LABEL 21;VAR T:HALFWORD;P,Q,R:HALFWORD;J:0..BUFSIZE;
CVBACKUP:INTEGER;CVLBACKUP,RADIXBACKUP,COBACKUP:SMALLNUMBER;
BACKUPBACKUP:HALFWORD;SAVESCANNERSTATUS:SMALLNUMBER;
BEGIN CVBACKUP:=CURVAL;CVLBACKUP:=CURVALLEVEL;RADIXBACKUP:=RADIX;
COBACKUP:=CURORDER;BACKUPBACKUP:=MEM[327131].HH.RH;
21:IF CURCMD<111 THEN{367:}
BEGIN IF EQTB[13204].INT>1 THEN SHOWCURCMDCHR;CASE CURCMD OF 110:{386:}
BEGIN T:=CURCHR MOD 5;IF CURCHR>=5 THEN SCANREGISTERNUM ELSE CURVAL:=0;
IF CURVAL=0 THEN CURPTR:=CURMARK[T]ELSE{1557:}
BEGIN FINDSAELEMENT(6,CURVAL,FALSE);
IF CURPTR<>0 THEN IF ODD(T)THEN CURPTR:=MEM[CURPTR+(T DIV 2)+1].HH.RH
ELSE CURPTR:=MEM[CURPTR+(T DIV 2)+1].HH.LH;END{:1557};
IF CURPTR<>0 THEN BEGINTOKENLIST(CURPTR,15);END{:386};
102:IF CURCHR=0 THEN{368:}BEGIN GETTOKEN;T:=CURTOK;GETTOKEN;
IF CURCMD>100 THEN EXPAND ELSE BACKINPUT;CURTOK:=T;BACKINPUT;END{:368}
ELSE{1498:}BEGIN GETTOKEN;
IF(CURCMD=105)AND(CURCHR<>16)THEN BEGIN CURCHR:=CURCHR+32;GOTO 21;END;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(694);END;PRINTESC(782);PRINT(1382);
PRINTCMDCHR(CURCMD,CURCHR);PRINTCHAR(39);BEGIN HELPPTR:=1;
HELPLINE[0]:=624;END;BACKERROR;END{:1498};103:{369:}
BEGIN SAVESCANNERSTATUS:=SCANNERSTATUS;SCANNERSTATUS:=0;GETTOKEN;
SCANNERSTATUS:=SAVESCANNERSTATUS;T:=CURTOK;BACKINPUT;
IF T>=4095 THEN BEGIN P:=GETAVAIL;MEM[P].HH.LH:=14618;
MEM[P].HH.RH:=CURINPUT.LOCFIELD;CURINPUT.STARTFIELD:=P;
CURINPUT.LOCFIELD:=P;END;END{:369};107:{372:}BEGIN R:=GETAVAIL;P:=R;
REPEAT GETXTOKEN;IF CURCS=0 THEN BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=CURTOK;P:=Q;END;UNTIL CURCS<>0;IF CURCMD<>67 THEN{373:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(634);END;PRINTESC(508);
PRINT(635);BEGIN HELPPTR:=2;HELPLINE[1]:=636;HELPLINE[0]:=637;END;
BACKERROR;END{:373};{374:}J:=FIRST;P:=MEM[R].HH.RH;
WHILE P<>0 DO BEGIN IF J>=MAXBUFSTACK THEN BEGIN MAXBUFSTACK:=J+1;
IF MAXBUFSTACK=BUFSIZE THEN OVERFLOW(257,BUFSIZE);END;
BUFFER[J]:=MEM[P].HH.LH MOD 256;J:=J+1;P:=MEM[P].HH.RH;END;
IF J>FIRST+1 THEN BEGIN NONEWCONTROLSEQUENCE:=FALSE;
CURCS:=IDLOOKUP(FIRST,J-FIRST);NONEWCONTROLSEQUENCE:=TRUE;
END ELSE IF J=FIRST THEN CURCS:=513 ELSE CURCS:=257+BUFFER[FIRST]{:374};
FLUSHLIST(R);IF EQTB[CURCS].HH.B0=101 THEN BEGIN EQDEFINE(CURCS,0,256);
END;CURTOK:=CURCS+4095;BACKINPUT;END{:372};108:CONVTOKS;109:INSTHETOKS;
105:CONDITIONAL;106:{510:}
BEGIN IF EQTB[13225].INT>0 THEN IF EQTB[13204].INT<=1 THEN SHOWCURCMDCHR
;
IF CURCHR>IFLIMIT THEN IF IFLIMIT=1 THEN INSERTRELAX ELSE BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(786);END;PRINTCMDCHR(106,CURCHR);
BEGIN HELPPTR:=1;HELPLINE[0]:=787;END;ERROR;
END ELSE BEGIN WHILE CURCHR<>2 DO PASSTEXT;{496:}
BEGIN IF IFSTACK[INOPEN]=CONDPTR THEN IFWARNING;P:=CONDPTR;
IFLINE:=MEM[P+1].INT;CURIF:=MEM[P].HH.B1;IFLIMIT:=MEM[P].HH.B0;
CONDPTR:=MEM[P].HH.RH;FREENODE(P,2);END{:496};END;END{:510};104:{378:}
IF CURCHR=1 THEN FORCEEOF:=TRUE{1482:}
ELSE IF CURCHR=2 THEN PSEUDOSTART{:1482}
ELSE IF NAMEINPROGRESS THEN INSERTRELAX ELSE STARTINPUT{:378};
OTHERWISE{370:}BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(628);END;
BEGIN HELPPTR:=5;HELPLINE[4]:=629;HELPLINE[3]:=630;HELPLINE[2]:=631;
HELPLINE[1]:=632;HELPLINE[0]:=633;END;ERROR;END{:370}END;END{:367}
ELSE IF CURCMD<115 THEN MACROCALL ELSE{375:}BEGIN CURTOK:=14615;
BACKINPUT;END{:375};CURVAL:=CVBACKUP;CURVALLEVEL:=CVLBACKUP;
RADIX:=RADIXBACKUP;CURORDER:=COBACKUP;MEM[327131].HH.RH:=BACKUPBACKUP;
END;{:366}{380:}PROCEDURE GETXTOKEN;LABEL 20,30;BEGIN 20:GETNEXT;
IF CURCMD<=100 THEN GOTO 30;
IF CURCMD>=111 THEN IF CURCMD<115 THEN MACROCALL ELSE BEGIN CURCS:=10520
;CURCMD:=9;GOTO 30;END ELSE EXPAND;GOTO 20;
30:IF CURCS=0 THEN CURTOK:=(CURCMD*256)+CURCHR ELSE CURTOK:=4095+CURCS;
END;{:380}{381:}PROCEDURE XTOKEN;BEGIN WHILE CURCMD>100 DO BEGIN EXPAND;
GETNEXT;END;
IF CURCS=0 THEN CURTOK:=(CURCMD*256)+CURCHR ELSE CURTOK:=4095+CURCS;END;
{:381}{403:}PROCEDURE SCANLEFTBRACE;BEGIN{404:}REPEAT GETXTOKEN;
UNTIL(CURCMD<>10)AND(CURCMD<>0){:404};
IF CURCMD<>1 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(666);END;
BEGIN HELPPTR:=4;HELPLINE[3]:=667;HELPLINE[2]:=668;HELPLINE[1]:=669;
HELPLINE[0]:=670;END;BACKERROR;CURTOK:=379;CURCMD:=1;CURCHR:=123;
ALIGNSTATE:=ALIGNSTATE+1;END;END;{:403}{405:}
PROCEDURE SCANOPTIONALEQUALS;BEGIN{406:}REPEAT GETXTOKEN;
UNTIL CURCMD<>10{:406};IF CURTOK<>3133 THEN BACKINPUT;END;{:405}{407:}
FUNCTION SCANKEYWORD(S:STRNUMBER):BOOLEAN;LABEL 10;VAR P:HALFWORD;
Q:HALFWORD;K:POOLPOINTER;BEGIN P:=327131;MEM[P].HH.RH:=0;K:=STRSTART[S];
WHILE K<STRSTART[S+1]DO BEGIN GETXTOKEN;
IF(CURCS=0)AND((CURCHR=STRPOOL[K])OR(CURCHR=STRPOOL[K]-32))THEN BEGIN
BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=CURTOK;P:=Q;END;K:=K+1;
END ELSE IF(CURCMD<>10)OR(P<>327131)THEN BEGIN BACKINPUT;
IF P<>327131 THEN BEGINTOKENLIST(MEM[327131].HH.RH,3);
SCANKEYWORD:=FALSE;GOTO 10;END;END;FLUSHLIST(MEM[327131].HH.RH);
SCANKEYWORD:=TRUE;10:END;{:407}{408:}PROCEDURE MUERROR;
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(671);END;BEGIN HELPPTR:=1;
HELPLINE[0]:=672;END;ERROR;END;{:408}{409:}PROCEDURE SCANINT;FORWARD;
{433:}PROCEDURE SCANEIGHTBITINT;BEGIN SCANINT;
IF(CURVAL<0)OR(CURVAL>255)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(696);END;BEGIN HELPPTR:=2;HELPLINE[1]:=697;HELPLINE[0]:=698;END;
INTERROR(CURVAL);CURVAL:=0;END;END;{:433}{434:}PROCEDURE SCANCHARNUM;
BEGIN SCANINT;
IF(CURVAL<0)OR(CURVAL>255)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(699);END;BEGIN HELPPTR:=2;HELPLINE[1]:=700;HELPLINE[0]:=698;END;
INTERROR(CURVAL);CURVAL:=0;END;END;{:434}{435:}PROCEDURE SCANFOURBITINT;
BEGIN SCANINT;
IF(CURVAL<0)OR(CURVAL>15)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(701);END;BEGIN HELPPTR:=2;HELPLINE[1]:=702;HELPLINE[0]:=698;END;
INTERROR(CURVAL);CURVAL:=0;END;END;{:435}{436:}
PROCEDURE SCANFIFTEENBITINT;BEGIN SCANINT;
IF(CURVAL<0)OR(CURVAL>32767)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(703);END;BEGIN HELPPTR:=2;HELPLINE[1]:=704;HELPLINE[0]:=698;END;
INTERROR(CURVAL);CURVAL:=0;END;END;{:436}{437:}
PROCEDURE SCANTWENTYSEVENBITINT;BEGIN SCANINT;
IF(CURVAL<0)OR(CURVAL>134217727)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(705);END;BEGIN HELPPTR:=2;HELPLINE[1]:=706;HELPLINE[0]:=698;END;
INTERROR(CURVAL);CURVAL:=0;END;END;{:437}{1544:}
PROCEDURE SCANREGISTERNUM;BEGIN SCANINT;
IF(CURVAL<0)OR(CURVAL>MAXREGNUM)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(696);END;BEGIN HELPPTR:=2;HELPLINE[1]:=MAXREGHELPLINE;
HELPLINE[0]:=698;END;INTERROR(CURVAL);CURVAL:=0;END;END;{:1544}{1416:}
PROCEDURE SCANGENERALTEXT;FORWARD;{:1416}{1444:}PROCEDURE REMOVEENDM;
VAR P:HALFWORD;BEGIN P:=CURLIST.HEADFIELD;
WHILE MEM[P].HH.RH<>CURLIST.TAILFIELD DO P:=MEM[P].HH.RH;
IF NOT(P>=HIMEMMIN)THEN BEGIN LRTEMP:=CURLIST.TAILFIELD;MEM[P].HH.RH:=0;
CURLIST.TAILFIELD:=P;END;END;{:1444}{1445:}PROCEDURE INSERTENDM;
LABEL 30;VAR P:HALFWORD;
BEGIN IF NOT(CURLIST.TAILFIELD>=HIMEMMIN)THEN IF(MEM[CURLIST.TAILFIELD].
HH.B0=9)AND(MEM[CURLIST.TAILFIELD].HH.B1=2)THEN BEGIN FREENODE(LRTEMP,2)
;P:=CURLIST.HEADFIELD;
WHILE MEM[P].HH.RH<>CURLIST.TAILFIELD DO P:=MEM[P].HH.RH;
FREENODE(CURLIST.TAILFIELD,2);MEM[P].HH.RH:=0;CURLIST.TAILFIELD:=P;
GOTO 30;END;MEM[CURLIST.TAILFIELD].HH.RH:=LRTEMP;
CURLIST.TAILFIELD:=LRTEMP;30:LRTEMP:=0;END;{:1445}{1505:}
PROCEDURE GETXORPROTECTED;LABEL 10;BEGIN WHILE TRUE DO BEGIN GETTOKEN;
IF CURCMD<=100 THEN GOTO 10;
IF(CURCMD>=111)AND(CURCMD<115)THEN IF MEM[MEM[CURCHR].HH.RH].HH.LH=3585
THEN GOTO 10;EXPAND;END;10:END;{:1505}{1514:}PROCEDURE SCANEXPR;FORWARD;
{:1514}{1519:}PROCEDURE SCANNORMALGLUE;FORWARD;PROCEDURE SCANMUGLUE;
FORWARD;{:1519}{577:}PROCEDURE SCANFONTIDENT;VAR F:INTERNALFONTNUMBER;
M:HALFWORD;BEGIN{406:}REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};
IF CURCMD=88 THEN F:=EQTB[11839].HH.RH ELSE IF CURCMD=87 THEN F:=CURCHR
ELSE IF CURCMD=86 THEN BEGIN M:=CURCHR;SCANFOURBITINT;
F:=EQTB[M+CURVAL].HH.RH;
END ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(824);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=825;HELPLINE[0]:=826;END;BACKERROR;F:=0;END;CURVAL:=F;END;
{:577}{578:}PROCEDURE FINDFONTDIMEN(WRITING:BOOLEAN);
VAR F:INTERNALFONTNUMBER;N:INTEGER;BEGIN SCANINT;N:=CURVAL;
SCANFONTIDENT;F:=CURVAL;
IF N<=0 THEN CURVAL:=FMEMPTR ELSE BEGIN IF WRITING AND(N<=4)AND(N>=2)AND
(FONTGLUE[F]<>0)THEN BEGIN DELETEGLUEREF(FONTGLUE[F]);FONTGLUE[F]:=0;
END;IF N>FONTPARAMS[F]THEN IF F<FONTPTR THEN CURVAL:=FMEMPTR ELSE{580:}
BEGIN REPEAT IF FMEMPTR=FONTMEMSIZE THEN OVERFLOW(831,FONTMEMSIZE);
FONTINFO[FMEMPTR].INT:=0;FMEMPTR:=FMEMPTR+1;
FONTPARAMS[F]:=FONTPARAMS[F]+1;UNTIL N=FONTPARAMS[F];CURVAL:=FMEMPTR-1;
END{:580}ELSE CURVAL:=N+PARAMBASE[F];END;{579:}
IF CURVAL=FMEMPTR THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(809);END;
PRINTESC(HASH[10524+F].RH);PRINT(827);PRINTINT(FONTPARAMS[F]);
PRINT(828);BEGIN HELPPTR:=2;HELPLINE[1]:=829;HELPLINE[0]:=830;END;ERROR;
END{:579};END;{:578}{:409}{413:}
PROCEDURE SCANSOMETHINGINTERNAL(LEVEL:SMALLNUMBER;NEGATIVE:BOOLEAN);
LABEL 10;VAR M:HALFWORD;Q:HALFWORD;I:FOURQUARTERS;P:0..NESTSIZE;
BEGIN M:=CURCHR;CASE CURCMD OF 85:{414:}BEGIN SCANCHARNUM;
IF M=12912 THEN BEGIN CURVAL:=EQTB[12912+CURVAL].HH.RH;CURVALLEVEL:=0;
END ELSE IF M<12912 THEN BEGIN CURVAL:=EQTB[M+CURVAL].HH.RH;
CURVALLEVEL:=0;END ELSE BEGIN CURVAL:=EQTB[M+CURVAL].INT;CURVALLEVEL:=0;
END;END{:414};71,72,86,87,88:{415:}
IF LEVEL<>5 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(673);END;
BEGIN HELPPTR:=3;HELPLINE[2]:=674;HELPLINE[1]:=675;HELPLINE[0]:=676;END;
BACKERROR;BEGIN CURVAL:=0;CURVALLEVEL:=1;END;
END ELSE IF CURCMD<=72 THEN BEGIN IF CURCMD<72 THEN IF M=0 THEN BEGIN
SCANREGISTERNUM;
IF CURVAL<256 THEN CURVAL:=EQTB[11327+CURVAL].HH.RH ELSE BEGIN
FINDSAELEMENT(5,CURVAL,FALSE);
IF CURPTR=0 THEN CURVAL:=0 ELSE CURVAL:=MEM[CURPTR+1].HH.RH;END;
END ELSE CURVAL:=MEM[M+1].HH.RH ELSE CURVAL:=EQTB[M].HH.RH;
CURVALLEVEL:=5;END ELSE BEGIN BACKINPUT;SCANFONTIDENT;
BEGIN CURVAL:=10524+CURVAL;CURVALLEVEL:=4;END;END{:415};
73:BEGIN CURVAL:=EQTB[M].INT;CURVALLEVEL:=0;END;
74:BEGIN CURVAL:=EQTB[M].INT;CURVALLEVEL:=1;END;
75:BEGIN CURVAL:=EQTB[M].HH.RH;CURVALLEVEL:=2;END;
76:BEGIN CURVAL:=EQTB[M].HH.RH;CURVALLEVEL:=3;END;79:{418:}
IF ABS(CURLIST.MODEFIELD)<>M THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(689);END;PRINTCMDCHR(79,M);BEGIN HELPPTR:=4;HELPLINE[3]:=690;
HELPLINE[2]:=691;HELPLINE[1]:=692;HELPLINE[0]:=693;END;ERROR;
IF LEVEL<>5 THEN BEGIN CURVAL:=0;CURVALLEVEL:=1;
END ELSE BEGIN CURVAL:=0;CURVALLEVEL:=0;END;
END ELSE IF M=1 THEN BEGIN CURVAL:=CURLIST.AUXFIELD.INT;CURVALLEVEL:=1;
END ELSE BEGIN CURVAL:=CURLIST.AUXFIELD.HH.LH;CURVALLEVEL:=0;END{:418};
80:{422:}IF CURLIST.MODEFIELD=0 THEN BEGIN CURVAL:=0;CURVALLEVEL:=0;
END ELSE BEGIN NEST[NESTPTR]:=CURLIST;P:=NESTPTR;
WHILE ABS(NEST[P].MODEFIELD)<>1 DO P:=P-1;BEGIN CURVAL:=NEST[P].PGFIELD;
CURVALLEVEL:=0;END;END{:422};82:{419:}
BEGIN IF M=0 THEN CURVAL:=DEADCYCLES{1428:}
ELSE IF M=2 THEN CURVAL:=INTERACTION{:1428}ELSE CURVAL:=INSERTPENALTIES;
CURVALLEVEL:=0;END{:419};81:{421:}
BEGIN IF(PAGECONTENTS=0)AND(NOT OUTPUTACTIVE)THEN IF M=0 THEN CURVAL:=
1073741823 ELSE CURVAL:=0 ELSE CURVAL:=PAGESOFAR[M];CURVALLEVEL:=1;
END{:421};84:{423:}BEGIN IF M>11312 THEN{1599:}BEGIN SCANINT;
IF(EQTB[M].HH.RH=0)OR(CURVAL<0)THEN CURVAL:=0 ELSE BEGIN IF CURVAL>MEM[
EQTB[M].HH.RH+1].INT THEN CURVAL:=MEM[EQTB[M].HH.RH+1].INT;
CURVAL:=MEM[EQTB[M].HH.RH+CURVAL+1].INT;END;END{:1599}
ELSE IF EQTB[11312].HH.RH=0 THEN CURVAL:=0 ELSE CURVAL:=MEM[EQTB[11312].
HH.RH].HH.LH;CURVALLEVEL:=0;END{:423};83:{420:}BEGIN SCANREGISTERNUM;
IF CURVAL<256 THEN Q:=EQTB[11583+CURVAL].HH.RH ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR=0 THEN Q:=0 ELSE Q:=MEM[CURPTR+1].HH.RH;END;
IF Q=0 THEN CURVAL:=0 ELSE CURVAL:=MEM[Q+M].INT;CURVALLEVEL:=1;END{:420}
;68,69:BEGIN CURVAL:=CURCHR;CURVALLEVEL:=0;END;77:{425:}
BEGIN FINDFONTDIMEN(FALSE);FONTINFO[FMEMPTR].INT:=0;
BEGIN CURVAL:=FONTINFO[CURVAL].INT;CURVALLEVEL:=1;END;END{:425};
78:{426:}BEGIN SCANFONTIDENT;
IF M=0 THEN BEGIN CURVAL:=HYPHENCHAR[CURVAL];CURVALLEVEL:=0;
END ELSE BEGIN CURVAL:=SKEWCHAR[CURVAL];CURVALLEVEL:=0;END;END{:426};
89:{427:}
BEGIN IF(M<0)OR(M>19)THEN BEGIN CURVALLEVEL:=(MEM[M].HH.B0 DIV 16);
IF CURVALLEVEL<2 THEN CURVAL:=MEM[M+2].INT ELSE CURVAL:=MEM[M+1].HH.RH;
END ELSE BEGIN SCANREGISTERNUM;CURVALLEVEL:=M-0;
IF CURVAL>255 THEN BEGIN FINDSAELEMENT(CURVALLEVEL,CURVAL,FALSE);
IF CURPTR=0 THEN IF CURVALLEVEL<2 THEN CURVAL:=0 ELSE CURVAL:=0 ELSE IF
CURVALLEVEL<2 THEN CURVAL:=MEM[CURPTR+2].INT ELSE CURVAL:=MEM[CURPTR+1].
HH.RH;END ELSE CASE CURVALLEVEL OF 0:CURVAL:=EQTB[13233+CURVAL].INT;
1:CURVAL:=EQTB[13766+CURVAL].INT;2:CURVAL:=EQTB[10800+CURVAL].HH.RH;
3:CURVAL:=EQTB[11056+CURVAL].HH.RH;END;END;END{:427};70:{424:}
IF M>3 THEN IF M>=23 THEN{1513:}
BEGIN IF M<24 THEN BEGIN CASE M OF{1540:}23:SCANMUGLUE;{:1540}END;
CURVALLEVEL:=2;END ELSE IF M<25 THEN BEGIN CASE M OF{1541:}
24:SCANNORMALGLUE;{:1541}END;CURVALLEVEL:=3;
END ELSE BEGIN CURVALLEVEL:=M-25;SCANEXPR;END;
WHILE CURVALLEVEL>LEVEL DO BEGIN IF CURVALLEVEL=2 THEN BEGIN M:=CURVAL;
CURVAL:=MEM[M+1].INT;DELETEGLUEREF(M);
END ELSE IF CURVALLEVEL=3 THEN MUERROR;CURVALLEVEL:=CURVALLEVEL-1;END;
IF NEGATIVE THEN IF CURVALLEVEL>=2 THEN BEGIN M:=CURVAL;
CURVAL:=NEWSPEC(M);DELETEGLUEREF(M);{431:}
BEGIN MEM[CURVAL+1].INT:=-MEM[CURVAL+1].INT;
MEM[CURVAL+2].INT:=-MEM[CURVAL+2].INT;
MEM[CURVAL+3].INT:=-MEM[CURVAL+3].INT;END{:431};
END ELSE CURVAL:=-CURVAL;GOTO 10;END{:1513}
ELSE IF M>=14 THEN BEGIN CASE M OF{1405:}
14,15,16,17:BEGIN SCANFONTIDENT;Q:=CURVAL;SCANCHARNUM;
IF(FONTBC[Q]<=CURVAL)AND(FONTEC[Q]>=CURVAL)THEN BEGIN I:=FONTINFO[
CHARBASE[Q]+CURVAL].QQQQ;
CASE M OF 14:CURVAL:=FONTINFO[WIDTHBASE[Q]+I.B0].INT;
15:CURVAL:=FONTINFO[HEIGHTBASE[Q]+(I.B1)DIV 16].INT;
16:CURVAL:=FONTINFO[DEPTHBASE[Q]+(I.B1)MOD 16].INT;
17:CURVAL:=FONTINFO[ITALICBASE[Q]+(I.B2)DIV 4].INT;END;
END ELSE CURVAL:=0;END;{:1405}{1408:}18,19,20:BEGIN Q:=CURCHR-18;
SCANINT;
IF(EQTB[11312].HH.RH=0)OR(CURVAL<=0)THEN CURVAL:=0 ELSE BEGIN IF Q=2
THEN BEGIN Q:=CURVAL MOD 2;CURVAL:=(CURVAL+Q)DIV 2;END;
IF CURVAL>MEM[EQTB[11312].HH.RH].HH.LH THEN CURVAL:=MEM[EQTB[11312].HH.
RH].HH.LH;CURVAL:=MEM[EQTB[11312].HH.RH+2*CURVAL-Q].INT;END;
CURVALLEVEL:=1;END;{:1408}{1537:}21,22:BEGIN SCANNORMALGLUE;Q:=CURVAL;
IF M=21 THEN CURVAL:=MEM[Q+2].INT ELSE CURVAL:=MEM[Q+3].INT;
DELETEGLUEREF(Q);END;{:1537}END;CURVALLEVEL:=1;
END ELSE BEGIN CASE M OF 4:CURVAL:=LINE;5:CURVAL:=LASTBADNESS;{1382:}
6:CURVAL:=2;{:1382}{1399:}7:CURVAL:=CURLEVEL-1;8:CURVAL:=CURGROUP;
{:1399}{1402:}9:BEGIN Q:=CONDPTR;CURVAL:=0;
WHILE Q<>0 DO BEGIN CURVAL:=CURVAL+1;Q:=MEM[Q].HH.RH;END;END;
10:IF CONDPTR=0 THEN CURVAL:=0 ELSE IF CURIF<32 THEN CURVAL:=CURIF+1
ELSE CURVAL:=-(CURIF-31);
11:IF(IFLIMIT=4)OR(IFLIMIT=3)THEN CURVAL:=1 ELSE IF IFLIMIT=2 THEN
CURVAL:=-1 ELSE CURVAL:=0;{:1402}{1536:}12,13:BEGIN SCANNORMALGLUE;
Q:=CURVAL;IF M=12 THEN CURVAL:=MEM[Q].HH.B0 ELSE CURVAL:=MEM[Q].HH.B1;
DELETEGLUEREF(Q);END;{:1536}END;CURVALLEVEL:=0;
END ELSE BEGIN IF CURCHR=2 THEN CURVAL:=0 ELSE CURVAL:=0;
IF CURCHR=3 THEN BEGIN CURVAL:=0;
IF(CURLIST.TAILFIELD=CURLIST.HEADFIELD)OR(CURLIST.MODEFIELD=0)THEN
CURVAL:=-1;END ELSE CURVALLEVEL:=CURCHR;
IF NOT(CURLIST.TAILFIELD>=HIMEMMIN)AND(CURLIST.MODEFIELD<>0)THEN BEGIN
IF(MEM[CURLIST.TAILFIELD].HH.B0=9)AND(MEM[CURLIST.TAILFIELD].HH.B1=3)
THEN REMOVEENDM;
CASE CURCHR OF 0:IF MEM[CURLIST.TAILFIELD].HH.B0=12 THEN CURVAL:=MEM[
CURLIST.TAILFIELD+1].INT;
1:IF MEM[CURLIST.TAILFIELD].HH.B0=11 THEN CURVAL:=MEM[CURLIST.TAILFIELD
+1].INT;
2:IF MEM[CURLIST.TAILFIELD].HH.B0=10 THEN BEGIN CURVAL:=MEM[CURLIST.
TAILFIELD+1].HH.LH;
IF MEM[CURLIST.TAILFIELD].HH.B1=99 THEN CURVALLEVEL:=3;END;
3:IF(MEM[CURLIST.TAILFIELD].HH.B0<>9)OR(MEM[CURLIST.TAILFIELD].HH.B1<>3)
THEN IF MEM[CURLIST.TAILFIELD].HH.B0<=13 THEN CURVAL:=MEM[CURLIST.
TAILFIELD].HH.B0+1 ELSE CURVAL:=15;END;IF LRTEMP<>0 THEN INSERTENDM;
END ELSE IF(CURLIST.MODEFIELD=1)AND(CURLIST.TAILFIELD=CURLIST.HEADFIELD)
THEN CASE CURCHR OF 0:CURVAL:=LASTPENALTY;1:CURVAL:=LASTKERN;
2:IF LASTGLUE<>327145 THEN CURVAL:=LASTGLUE;3:CURVAL:=LASTNODETYPE;END;
END{:424};OTHERWISE{428:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(694);END;
PRINTCMDCHR(CURCMD,CURCHR);PRINT(695);PRINTESC(541);BEGIN HELPPTR:=1;
HELPLINE[0]:=693;END;ERROR;IF LEVEL<>5 THEN BEGIN CURVAL:=0;
CURVALLEVEL:=1;END ELSE BEGIN CURVAL:=0;CURVALLEVEL:=0;END;END{:428}END;
WHILE CURVALLEVEL>LEVEL DO{429:}
BEGIN IF CURVALLEVEL=2 THEN CURVAL:=MEM[CURVAL+1].INT ELSE IF
CURVALLEVEL=3 THEN MUERROR;CURVALLEVEL:=CURVALLEVEL-1;END{:429};{430:}
IF NEGATIVE THEN IF CURVALLEVEL>=2 THEN BEGIN CURVAL:=NEWSPEC(CURVAL);
{431:}BEGIN MEM[CURVAL+1].INT:=-MEM[CURVAL+1].INT;
MEM[CURVAL+2].INT:=-MEM[CURVAL+2].INT;
MEM[CURVAL+3].INT:=-MEM[CURVAL+3].INT;END{:431};
END ELSE CURVAL:=-CURVAL ELSE IF(CURVALLEVEL>=2)AND(CURVALLEVEL<=3)THEN
MEM[CURVAL].HH.RH:=MEM[CURVAL].HH.RH+1{:430};10:END;{:413}{440:}
PROCEDURE SCANINT;LABEL 30;VAR NEGATIVE:BOOLEAN;M:INTEGER;D:SMALLNUMBER;
VACUOUS:BOOLEAN;OKSOFAR:BOOLEAN;BEGIN RADIX:=0;OKSOFAR:=TRUE;{441:}
NEGATIVE:=FALSE;REPEAT{406:}REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};
IF CURTOK=3117 THEN BEGIN NEGATIVE:=NOT NEGATIVE;CURTOK:=3115;END;
UNTIL CURTOK<>3115{:441};IF CURTOK=3168 THEN{442:}BEGIN GETTOKEN;
IF CURTOK<4095 THEN BEGIN CURVAL:=CURCHR;
IF CURCMD<=2 THEN IF CURCMD=2 THEN ALIGNSTATE:=ALIGNSTATE+1 ELSE
ALIGNSTATE:=ALIGNSTATE-1;
END ELSE IF CURTOK<4352 THEN CURVAL:=CURTOK-4096 ELSE CURVAL:=CURTOK
-4352;
IF CURVAL>255 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(707);END;
BEGIN HELPPTR:=2;HELPLINE[1]:=708;HELPLINE[0]:=709;END;CURVAL:=48;
BACKERROR;END ELSE{443:}BEGIN GETXTOKEN;IF CURCMD<>10 THEN BACKINPUT;
END{:443};END{:442}
ELSE IF(CURCMD>=68)AND(CURCMD<=89)THEN SCANSOMETHINGINTERNAL(0,FALSE)
ELSE{444:}BEGIN RADIX:=10;M:=214748364;
IF CURTOK=3111 THEN BEGIN RADIX:=8;M:=268435456;GETXTOKEN;
END ELSE IF CURTOK=3106 THEN BEGIN RADIX:=16;M:=134217728;GETXTOKEN;END;
VACUOUS:=TRUE;CURVAL:=0;{445:}
WHILE TRUE DO BEGIN IF(CURTOK<3120+RADIX)AND(CURTOK>=3120)AND(CURTOK<=
3129)THEN D:=CURTOK-3120 ELSE IF RADIX=16 THEN IF(CURTOK<=2886)AND(
CURTOK>=2881)THEN D:=CURTOK-2871 ELSE IF(CURTOK<=3142)AND(CURTOK>=3137)
THEN D:=CURTOK-3127 ELSE GOTO 30 ELSE GOTO 30;VACUOUS:=FALSE;
IF(CURVAL>=M)AND((CURVAL>M)OR(D>7)OR(RADIX<>10))THEN BEGIN IF OKSOFAR
THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(710);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=711;HELPLINE[0]:=712;END;ERROR;CURVAL:=2147483647;
OKSOFAR:=FALSE;END;END ELSE CURVAL:=CURVAL*RADIX+D;GETXTOKEN;END;
30:{:445};IF VACUOUS THEN{446:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(673);END;BEGIN HELPPTR:=3;
HELPLINE[2]:=674;HELPLINE[1]:=675;HELPLINE[0]:=676;END;BACKERROR;
END{:446}ELSE IF CURCMD<>10 THEN BACKINPUT;END{:444};
IF NEGATIVE THEN CURVAL:=-CURVAL;END;{:440}{448:}
PROCEDURE SCANDIMEN(MU,INF,SHORTCUT:BOOLEAN);LABEL 30,31,32,40,45,88,89;
VAR NEGATIVE:BOOLEAN;F:INTEGER;{450:}NUM,DENOM:1..65536;
K,KK:SMALLNUMBER;P,Q:HALFWORD;V:SCALED;SAVECURVAL:INTEGER;{:450}
BEGIN F:=0;ARITHERROR:=FALSE;CURORDER:=0;NEGATIVE:=FALSE;
IF NOT SHORTCUT THEN BEGIN{441:}NEGATIVE:=FALSE;REPEAT{406:}
REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};
IF CURTOK=3117 THEN BEGIN NEGATIVE:=NOT NEGATIVE;CURTOK:=3115;END;
UNTIL CURTOK<>3115{:441};IF(CURCMD>=68)AND(CURCMD<=89)THEN{449:}
IF MU THEN BEGIN SCANSOMETHINGINTERNAL(3,FALSE);{451:}
IF CURVALLEVEL>=2 THEN BEGIN V:=MEM[CURVAL+1].INT;DELETEGLUEREF(CURVAL);
CURVAL:=V;END{:451};IF CURVALLEVEL=3 THEN GOTO 89;
IF CURVALLEVEL<>0 THEN MUERROR;
END ELSE BEGIN SCANSOMETHINGINTERNAL(1,FALSE);
IF CURVALLEVEL=1 THEN GOTO 89;END{:449}ELSE BEGIN BACKINPUT;
IF CURTOK=3116 THEN CURTOK:=3118;
IF CURTOK<>3118 THEN SCANINT ELSE BEGIN RADIX:=10;CURVAL:=0;END;
IF CURTOK=3116 THEN CURTOK:=3118;IF(RADIX=10)AND(CURTOK=3118)THEN{452:}
BEGIN K:=0;P:=0;GETTOKEN;WHILE TRUE DO BEGIN GETXTOKEN;
IF(CURTOK>3129)OR(CURTOK<3120)THEN GOTO 31;
IF K<17 THEN BEGIN Q:=GETAVAIL;MEM[Q].HH.RH:=P;
MEM[Q].HH.LH:=CURTOK-3120;P:=Q;K:=K+1;END;END;
31:FOR KK:=K DOWNTO 1 DO BEGIN DIG[KK-1]:=MEM[P].HH.LH;Q:=P;
P:=MEM[P].HH.RH;BEGIN MEM[Q].HH.RH:=AVAIL;AVAIL:=Q;DYNUSED:=DYNUSED-1;
END;END;F:=ROUNDDECIMALS(K);IF CURCMD<>10 THEN BACKINPUT;END{:452};END;
END;IF CURVAL<0 THEN BEGIN NEGATIVE:=NOT NEGATIVE;CURVAL:=-CURVAL;END;
{453:}IF INF THEN{454:}IF SCANKEYWORD(312)THEN BEGIN CURORDER:=1;
WHILE SCANKEYWORD(108)DO BEGIN IF CURORDER=3 THEN BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(714);END;PRINT(715);BEGIN HELPPTR:=1;
HELPLINE[0]:=716;END;ERROR;END ELSE CURORDER:=CURORDER+1;END;GOTO 88;
END{:454};{455:}SAVECURVAL:=CURVAL;{406:}REPEAT GETXTOKEN;
UNTIL CURCMD<>10{:406};
IF(CURCMD<68)OR(CURCMD>89)THEN BACKINPUT ELSE BEGIN IF MU THEN BEGIN
SCANSOMETHINGINTERNAL(3,FALSE);{451:}
IF CURVALLEVEL>=2 THEN BEGIN V:=MEM[CURVAL+1].INT;DELETEGLUEREF(CURVAL);
CURVAL:=V;END{:451};IF CURVALLEVEL<>3 THEN MUERROR;
END ELSE SCANSOMETHINGINTERNAL(1,FALSE);V:=CURVAL;GOTO 40;END;
IF MU THEN GOTO 45;IF SCANKEYWORD(717)THEN V:=({558:}
FONTINFO[6+PARAMBASE[EQTB[11839].HH.RH]].INT{:558}
)ELSE IF SCANKEYWORD(718)THEN V:=({559:}
FONTINFO[5+PARAMBASE[EQTB[11839].HH.RH]].INT{:559})ELSE GOTO 45;{443:}
BEGIN GETXTOKEN;IF CURCMD<>10 THEN BACKINPUT;END{:443};
40:CURVAL:=MULTANDADD(SAVECURVAL,V,XNOVERD(V,F,65536),1073741823);
GOTO 89;45:{:455};IF MU THEN{456:}
IF SCANKEYWORD(338)THEN GOTO 88 ELSE BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(714);END;PRINT(719);BEGIN HELPPTR:=4;HELPLINE[3]:=720;
HELPLINE[2]:=721;HELPLINE[1]:=722;HELPLINE[0]:=723;END;ERROR;GOTO 88;
END{:456};IF SCANKEYWORD(713)THEN{457:}BEGIN PREPAREMAG;
IF EQTB[13185].INT<>1000 THEN BEGIN CURVAL:=XNOVERD(CURVAL,1000,EQTB[
13185].INT);F:=(1000*F+65536*REMAINDER)DIV EQTB[13185].INT;
CURVAL:=CURVAL+(F DIV 65536);F:=F MOD 65536;END;END{:457};
IF SCANKEYWORD(400)THEN GOTO 88;{458:}
IF SCANKEYWORD(724)THEN BEGIN NUM:=7227;DENOM:=100;
END ELSE IF SCANKEYWORD(725)THEN BEGIN NUM:=12;DENOM:=1;
END ELSE IF SCANKEYWORD(726)THEN BEGIN NUM:=7227;DENOM:=254;
END ELSE IF SCANKEYWORD(727)THEN BEGIN NUM:=7227;DENOM:=2540;
END ELSE IF SCANKEYWORD(728)THEN BEGIN NUM:=7227;DENOM:=7200;
END ELSE IF SCANKEYWORD(729)THEN BEGIN NUM:=1238;DENOM:=1157;
END ELSE IF SCANKEYWORD(730)THEN BEGIN NUM:=14856;DENOM:=1157;
END ELSE IF SCANKEYWORD(731)THEN GOTO 30 ELSE{459:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(714);END;PRINT(732);
BEGIN HELPPTR:=6;HELPLINE[5]:=733;HELPLINE[4]:=734;HELPLINE[3]:=735;
HELPLINE[2]:=721;HELPLINE[1]:=722;HELPLINE[0]:=723;END;ERROR;GOTO 32;
END{:459};CURVAL:=XNOVERD(CURVAL,NUM,DENOM);
F:=(NUM*F+65536*REMAINDER)DIV DENOM;CURVAL:=CURVAL+(F DIV 65536);
F:=F MOD 65536;32:{:458};
88:IF CURVAL>=16384 THEN ARITHERROR:=TRUE ELSE CURVAL:=CURVAL*65536+F;
30:{:453};{443:}BEGIN GETXTOKEN;IF CURCMD<>10 THEN BACKINPUT;END{:443};
89:IF ARITHERROR OR(ABS(CURVAL)>=1073741824)THEN{460:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(736);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=737;HELPLINE[0]:=738;END;ERROR;CURVAL:=1073741823;
ARITHERROR:=FALSE;END{:460};IF NEGATIVE THEN CURVAL:=-CURVAL;END;{:448}
{461:}PROCEDURE SCANGLUE(LEVEL:SMALLNUMBER);LABEL 10;
VAR NEGATIVE:BOOLEAN;Q:HALFWORD;MU:BOOLEAN;BEGIN MU:=(LEVEL=3);{441:}
NEGATIVE:=FALSE;REPEAT{406:}REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};
IF CURTOK=3117 THEN BEGIN NEGATIVE:=NOT NEGATIVE;CURTOK:=3115;END;
UNTIL CURTOK<>3115{:441};
IF(CURCMD>=68)AND(CURCMD<=89)THEN BEGIN SCANSOMETHINGINTERNAL(LEVEL,
NEGATIVE);
IF CURVALLEVEL>=2 THEN BEGIN IF CURVALLEVEL<>LEVEL THEN MUERROR;GOTO 10;
END;IF CURVALLEVEL=0 THEN SCANDIMEN(MU,FALSE,TRUE)ELSE IF LEVEL=3 THEN
MUERROR;END ELSE BEGIN BACKINPUT;SCANDIMEN(MU,FALSE,FALSE);
IF NEGATIVE THEN CURVAL:=-CURVAL;END;{462:}Q:=NEWSPEC(0);
MEM[Q+1].INT:=CURVAL;
IF SCANKEYWORD(739)THEN BEGIN SCANDIMEN(MU,TRUE,FALSE);
MEM[Q+2].INT:=CURVAL;MEM[Q].HH.B0:=CURORDER;END;
IF SCANKEYWORD(740)THEN BEGIN SCANDIMEN(MU,TRUE,FALSE);
MEM[Q+3].INT:=CURVAL;MEM[Q].HH.B1:=CURORDER;END;CURVAL:=Q{:462};10:END;
{1515:}{1526:}FUNCTION ADDORSUB(X,Y,MAXANSWER:INTEGER;
NEGATIVE:BOOLEAN):INTEGER;VAR A:INTEGER;BEGIN IF NEGATIVE THEN Y:=-Y;
IF X>=0 THEN IF Y<=MAXANSWER-X THEN A:=X+Y ELSE BEGIN ARITHERROR:=TRUE;
A:=0;
END ELSE IF Y>=-MAXANSWER-X THEN A:=X+Y ELSE BEGIN ARITHERROR:=TRUE;
A:=0;END;ADDORSUB:=A;END;{:1526}{1530:}
FUNCTION QUOTIENT(N,D:INTEGER):INTEGER;VAR NEGATIVE:BOOLEAN;A:INTEGER;
BEGIN IF D=0 THEN BEGIN ARITHERROR:=TRUE;A:=0;
END ELSE BEGIN IF D>0 THEN NEGATIVE:=FALSE ELSE BEGIN D:=-D;
NEGATIVE:=TRUE;END;IF N<0 THEN BEGIN N:=-N;NEGATIVE:=NOT NEGATIVE;END;
A:=N DIV D;N:=N-A*D;D:=N-D;IF D+N>=0 THEN A:=A+1;IF NEGATIVE THEN A:=-A;
END;QUOTIENT:=A;END;{:1530}{1532:}
FUNCTION FRACT(X,N,D,MAXANSWER:INTEGER):INTEGER;LABEL 40,41,88,30;
VAR NEGATIVE:BOOLEAN;A:INTEGER;F:INTEGER;H:INTEGER;R:INTEGER;T:INTEGER;
BEGIN IF D=0 THEN GOTO 88;A:=0;
IF D>0 THEN NEGATIVE:=FALSE ELSE BEGIN D:=-D;NEGATIVE:=TRUE;END;
IF X<0 THEN BEGIN X:=-X;NEGATIVE:=NOT NEGATIVE;
END ELSE IF X=0 THEN GOTO 30;IF N<0 THEN BEGIN N:=-N;
NEGATIVE:=NOT NEGATIVE;END;T:=N DIV D;IF T>MAXANSWER DIV X THEN GOTO 88;
A:=T*X;N:=N-T*D;IF N=0 THEN GOTO 40;T:=X DIV D;
IF T>(MAXANSWER-A)DIV N THEN GOTO 88;A:=A+T*N;X:=X-T*D;
IF X=0 THEN GOTO 40;IF X<N THEN BEGIN T:=X;X:=N;N:=T;END;{1533:}F:=0;
R:=(D DIV 2)-D;H:=-R;WHILE TRUE DO BEGIN IF ODD(N)THEN BEGIN R:=R+X;
IF R>=0 THEN BEGIN R:=R-D;F:=F+1;END;END;N:=N DIV 2;IF N=0 THEN GOTO 41;
IF X<H THEN X:=X+X ELSE BEGIN T:=X-D;X:=T+X;F:=F+N;
IF X<N THEN BEGIN IF X=0 THEN GOTO 41;T:=X;X:=N;N:=T;END;END;END;
41:{:1533}IF F>(MAXANSWER-A)THEN GOTO 88;A:=A+F;
40:IF NEGATIVE THEN A:=-A;GOTO 30;88:BEGIN ARITHERROR:=TRUE;A:=0;END;
30:FRACT:=A;END;{:1532}PROCEDURE SCANEXPR;LABEL 20,22,40;
VAR A,B:BOOLEAN;L:SMALLNUMBER;R:SMALLNUMBER;S:SMALLNUMBER;O:SMALLNUMBER;
E:INTEGER;T:INTEGER;F:INTEGER;N:INTEGER;P:HALFWORD;Q:HALFWORD;
BEGIN L:=CURVALLEVEL;A:=ARITHERROR;B:=FALSE;P:=0;{1516:}20:R:=0;E:=0;
S:=0;T:=0;N:=0;22:IF S=0 THEN O:=L ELSE O:=0;{1518:}{406:}
REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};IF CURTOK=3112 THEN{1521:}
BEGIN Q:=GETNODE(4);MEM[Q].HH.RH:=P;MEM[Q].HH.B0:=L;MEM[Q].HH.B1:=4*S+R;
MEM[Q+1].INT:=E;MEM[Q+2].INT:=T;MEM[Q+3].INT:=N;P:=Q;L:=O;GOTO 20;
END{:1521};BACKINPUT;
IF O=0 THEN SCANINT ELSE IF O=1 THEN SCANDIMEN(FALSE,FALSE,FALSE)ELSE IF
O=2 THEN SCANNORMALGLUE ELSE SCANMUGLUE;F:=CURVAL{:1518};40:{1517:}
{406:}REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};
IF CURTOK=3115 THEN O:=1 ELSE IF CURTOK=3117 THEN O:=2 ELSE IF CURTOK=
3114 THEN O:=3 ELSE IF CURTOK=3119 THEN O:=4 ELSE BEGIN O:=0;
IF P=0 THEN BEGIN IF CURCMD<>0 THEN BACKINPUT;
END ELSE IF CURTOK<>3113 THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1392);END;BEGIN HELPPTR:=1;HELPLINE[0]:=1393;END;BACKERROR;END;
END{:1517};ARITHERROR:=B;{1523:}
IF(L=0)OR(S>2)THEN BEGIN IF(F>2147483647)OR(F<-2147483647)THEN BEGIN
ARITHERROR:=TRUE;F:=0;END;
END ELSE IF L=1 THEN BEGIN IF ABS(F)>1073741823 THEN BEGIN ARITHERROR:=
TRUE;F:=0;END;
END ELSE BEGIN IF(ABS(MEM[F+1].INT)>1073741823)OR(ABS(MEM[F+2].INT)>
1073741823)OR(ABS(MEM[F+3].INT)>1073741823)THEN BEGIN ARITHERROR:=TRUE;
DELETEGLUEREF(F);F:=NEWSPEC(0);END;END{:1523};CASE S OF{1524:}
0:IF(L>=2)AND(O<>0)THEN BEGIN T:=NEWSPEC(F);DELETEGLUEREF(F);
IF MEM[T+2].INT=0 THEN MEM[T].HH.B0:=0;
IF MEM[T+3].INT=0 THEN MEM[T].HH.B1:=0;END ELSE T:=F;{:1524}{1528:}
3:IF O=4 THEN BEGIN N:=F;O:=5;
END ELSE IF L=0 THEN T:=MULTANDADD(T,F,0,2147483647)ELSE IF L=1 THEN T:=
MULTANDADD(T,F,0,1073741823)ELSE BEGIN MEM[T+1].INT:=MULTANDADD(MEM[T+1]
.INT,F,0,1073741823);
MEM[T+2].INT:=MULTANDADD(MEM[T+2].INT,F,0,1073741823);
MEM[T+3].INT:=MULTANDADD(MEM[T+3].INT,F,0,1073741823);END;{:1528}{1529:}
4:IF L<2 THEN T:=QUOTIENT(T,F)ELSE BEGIN MEM[T+1].INT:=QUOTIENT(MEM[T+1]
.INT,F);MEM[T+2].INT:=QUOTIENT(MEM[T+2].INT,F);
MEM[T+3].INT:=QUOTIENT(MEM[T+3].INT,F);END;{:1529}{1531:}
5:IF L=0 THEN T:=FRACT(T,N,F,2147483647)ELSE IF L=1 THEN T:=FRACT(T,N,F,
1073741823)ELSE BEGIN MEM[T+1].INT:=FRACT(MEM[T+1].INT,N,F,1073741823);
MEM[T+2].INT:=FRACT(MEM[T+2].INT,N,F,1073741823);
MEM[T+3].INT:=FRACT(MEM[T+3].INT,N,F,1073741823);END;{:1531}END;
IF O>2 THEN S:=O ELSE{1525:}BEGIN S:=0;
IF R=0 THEN E:=T ELSE IF L=0 THEN E:=ADDORSUB(E,T,2147483647,R=2)ELSE IF
L=1 THEN E:=ADDORSUB(E,T,1073741823,R=2)ELSE{1527:}
BEGIN MEM[E+1].INT:=ADDORSUB(MEM[E+1].INT,MEM[T+1].INT,1073741823,R=2);
IF MEM[E].HH.B0=MEM[T].HH.B0 THEN MEM[E+2].INT:=ADDORSUB(MEM[E+2].INT,
MEM[T+2].INT,1073741823,R=2)ELSE IF(MEM[E].HH.B0<MEM[T].HH.B0)AND(MEM[T
+2].INT<>0)THEN BEGIN MEM[E+2].INT:=MEM[T+2].INT;
MEM[E].HH.B0:=MEM[T].HH.B0;END;
IF MEM[E].HH.B1=MEM[T].HH.B1 THEN MEM[E+3].INT:=ADDORSUB(MEM[E+3].INT,
MEM[T+3].INT,1073741823,R=2)ELSE IF(MEM[E].HH.B1<MEM[T].HH.B1)AND(MEM[T
+3].INT<>0)THEN BEGIN MEM[E+3].INT:=MEM[T+3].INT;
MEM[E].HH.B1:=MEM[T].HH.B1;END;DELETEGLUEREF(T);
IF MEM[E+2].INT=0 THEN MEM[E].HH.B0:=0;
IF MEM[E+3].INT=0 THEN MEM[E].HH.B1:=0;END{:1527};R:=O;END{:1525};
B:=ARITHERROR;IF O<>0 THEN GOTO 22;IF P<>0 THEN{1522:}BEGIN F:=E;Q:=P;
E:=MEM[Q+1].INT;T:=MEM[Q+2].INT;N:=MEM[Q+3].INT;S:=MEM[Q].HH.B1 DIV 4;
R:=MEM[Q].HH.B1 MOD 4;L:=MEM[Q].HH.B0;P:=MEM[Q].HH.RH;FREENODE(Q,4);
GOTO 40;END{:1522}{:1516};
IF B THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1216);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=1391;HELPLINE[0]:=1218;END;ERROR;
IF L>=2 THEN BEGIN DELETEGLUEREF(E);E:=0;MEM[E].HH.RH:=MEM[E].HH.RH+1;
END ELSE E:=0;END;ARITHERROR:=A;CURVAL:=E;CURVALLEVEL:=L;END;{:1515}
{1520:}PROCEDURE SCANNORMALGLUE;BEGIN SCANGLUE(2);END;
PROCEDURE SCANMUGLUE;BEGIN SCANGLUE(3);END;{:1520}{:461}{463:}
FUNCTION SCANRULESPEC:HALFWORD;LABEL 21;VAR Q:HALFWORD;BEGIN Q:=NEWRULE;
IF CURCMD=35 THEN MEM[Q+1].INT:=26214 ELSE BEGIN MEM[Q+3].INT:=26214;
MEM[Q+2].INT:=0;END;
21:IF SCANKEYWORD(741)THEN BEGIN SCANDIMEN(FALSE,FALSE,FALSE);
MEM[Q+1].INT:=CURVAL;GOTO 21;END;
IF SCANKEYWORD(742)THEN BEGIN SCANDIMEN(FALSE,FALSE,FALSE);
MEM[Q+3].INT:=CURVAL;GOTO 21;END;
IF SCANKEYWORD(743)THEN BEGIN SCANDIMEN(FALSE,FALSE,FALSE);
MEM[Q+2].INT:=CURVAL;GOTO 21;END;SCANRULESPEC:=Q;END;{:463}{464:}{1417:}
PROCEDURE SCANGENERALTEXT;LABEL 40;VAR S:0..5;W:HALFWORD;D:HALFWORD;
P:HALFWORD;Q:HALFWORD;UNBALANCE:HALFWORD;BEGIN S:=SCANNERSTATUS;
W:=WARNINGINDEX;D:=DEFREF;SCANNERSTATUS:=5;WARNINGINDEX:=CURCS;
DEFREF:=GETAVAIL;MEM[DEFREF].HH.LH:=0;P:=DEFREF;SCANLEFTBRACE;
UNBALANCE:=1;WHILE TRUE DO BEGIN GETTOKEN;
IF CURTOK<768 THEN IF CURCMD<2 THEN UNBALANCE:=UNBALANCE+1 ELSE BEGIN
UNBALANCE:=UNBALANCE-1;IF UNBALANCE=0 THEN GOTO 40;END;
BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=CURTOK;P:=Q;END;END;
40:Q:=MEM[DEFREF].HH.RH;BEGIN MEM[DEFREF].HH.RH:=AVAIL;AVAIL:=DEFREF;
DYNUSED:=DYNUSED-1;END;IF Q=0 THEN CURVAL:=327141 ELSE CURVAL:=P;
MEM[327141].HH.RH:=Q;SCANNERSTATUS:=S;WARNINGINDEX:=W;DEFREF:=D;END;
{:1417}{1486:}PROCEDURE PSEUDOSTART;VAR OLDSETTING:0..22;S:STRNUMBER;
L,M:POOLPOINTER;P,Q,R:HALFWORD;W:FOURQUARTERS;NL,SZ:INTEGER;
BEGIN SCANGENERALTEXT;OLDSETTING:=SELECTOR;SELECTOR:=21;
TOKENSHOW(327141);SELECTOR:=OLDSETTING;FLUSHLIST(MEM[327141].HH.RH);
BEGIN IF POOLPTR+1>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR);END;
S:=MAKESTRING;{1487:}STRPOOL[POOLPTR]:=32;L:=STRSTART[S];
NL:=EQTB[13217].INT;P:=GETAVAIL;Q:=P;WHILE L<POOLPTR DO BEGIN M:=L;
WHILE(L<POOLPTR)AND(STRPOOL[L]<>NL)DO L:=L+1;SZ:=(L-M+7)DIV 4;
IF SZ=1 THEN SZ:=2;R:=GETNODE(SZ);MEM[Q].HH.RH:=R;Q:=R;MEM[Q].HH.LH:=SZ;
WHILE SZ>2 DO BEGIN SZ:=SZ-1;R:=R+1;W.B0:=STRPOOL[M];W.B1:=STRPOOL[M+1];
W.B2:=STRPOOL[M+2];W.B3:=STRPOOL[M+3];MEM[R].QQQQ:=W;M:=M+4;END;
W.B0:=32;W.B1:=32;W.B2:=32;W.B3:=32;IF L>M THEN BEGIN W.B0:=STRPOOL[M];
IF L>M+1 THEN BEGIN W.B1:=STRPOOL[M+1];
IF L>M+2 THEN BEGIN W.B2:=STRPOOL[M+2];IF L>M+3 THEN W.B3:=STRPOOL[M+3];
END;END;END;MEM[R+1].QQQQ:=W;IF STRPOOL[L]=NL THEN L:=L+1;END;
MEM[P].HH.LH:=MEM[P].HH.RH;MEM[P].HH.RH:=PSEUDOFILES;
PSEUDOFILES:=P{:1487};BEGIN STRPTR:=STRPTR-1;POOLPTR:=STRSTART[STRPTR];
END;{1488:}BEGINFILEREADING;LINE:=0;
CURINPUT.LIMITFIELD:=CURINPUT.STARTFIELD;
CURINPUT.LOCFIELD:=CURINPUT.LIMITFIELD+1;
IF EQTB[13226].INT>0 THEN BEGIN IF TERMOFFSET>MAXPRINTLINE-3 THEN
PRINTLN ELSE IF(TERMOFFSET>0)OR(FILEOFFSET>0)THEN PRINTCHAR(32);
CURINPUT.NAMEFIELD:=19;PRINT(1377);OPENPARENS:=OPENPARENS+1;
IF ODD(SELECTOR)THEN WRITELN(TERMOUT);
END ELSE CURINPUT.NAMEFIELD:=18{:1488};END;{:1486}
FUNCTION STRTOKS(B:POOLPOINTER):HALFWORD;VAR P:HALFWORD;Q:HALFWORD;
T:HALFWORD;K:POOLPOINTER;
BEGIN BEGIN IF POOLPTR+1>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR
);END;P:=327141;MEM[P].HH.RH:=0;K:=B;
WHILE K<POOLPTR DO BEGIN T:=STRPOOL[K];
IF T=32 THEN T:=2592 ELSE T:=3072+T;BEGIN BEGIN Q:=AVAIL;
IF Q=0 THEN Q:=GETAVAIL ELSE BEGIN AVAIL:=MEM[Q].HH.RH;MEM[Q].HH.RH:=0;
DYNUSED:=DYNUSED+1;END;END;MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=T;P:=Q;END;
K:=K+1;END;POOLPTR:=B;STRTOKS:=P;END;{:464}{465:}
FUNCTION THETOKS:HALFWORD;LABEL 10;VAR OLDSETTING:0..22;P,Q,R:HALFWORD;
B:POOLPOINTER;C:SMALLNUMBER;BEGIN{1422:}
IF ODD(CURCHR)THEN BEGIN C:=CURCHR;SCANGENERALTEXT;
IF C=1 THEN THETOKS:=CURVAL ELSE BEGIN OLDSETTING:=SELECTOR;
SELECTOR:=21;B:=POOLPTR;P:=GETAVAIL;MEM[P].HH.RH:=MEM[327141].HH.RH;
TOKENSHOW(P);FLUSHLIST(P);SELECTOR:=OLDSETTING;THETOKS:=STRTOKS(B);END;
GOTO 10;END{:1422};GETXTOKEN;SCANSOMETHINGINTERNAL(5,FALSE);
IF CURVALLEVEL>=4 THEN{466:}BEGIN P:=327141;MEM[P].HH.RH:=0;
IF CURVALLEVEL=4 THEN BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=4095+CURVAL;P:=Q;
END ELSE IF CURVAL<>0 THEN BEGIN R:=MEM[CURVAL].HH.RH;
WHILE R<>0 DO BEGIN BEGIN BEGIN Q:=AVAIL;
IF Q=0 THEN Q:=GETAVAIL ELSE BEGIN AVAIL:=MEM[Q].HH.RH;MEM[Q].HH.RH:=0;
DYNUSED:=DYNUSED+1;END;END;MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=MEM[R].HH.LH;
P:=Q;END;R:=MEM[R].HH.RH;END;END;THETOKS:=P;END{:466}
ELSE BEGIN OLDSETTING:=SELECTOR;SELECTOR:=21;B:=POOLPTR;
CASE CURVALLEVEL OF 0:PRINTINT(CURVAL);1:BEGIN PRINTSCALED(CURVAL);
PRINT(400);END;2:BEGIN PRINTSPEC(CURVAL,400);DELETEGLUEREF(CURVAL);END;
3:BEGIN PRINTSPEC(CURVAL,338);DELETEGLUEREF(CURVAL);END;END;
SELECTOR:=OLDSETTING;THETOKS:=STRTOKS(B);END;10:END;{:465}{467:}
PROCEDURE INSTHETOKS;BEGIN MEM[327132].HH.RH:=THETOKS;
BEGINTOKENLIST(MEM[327141].HH.RH,4);END;{:467}{470:}PROCEDURE CONVTOKS;
VAR OLDSETTING:0..22;C:SMALLNUMBER;SAVESCANNERSTATUS:SMALLNUMBER;
B:POOLPOINTER;BEGIN C:=CURCHR;{471:}CASE C OF 0,1:SCANINT;
2,3:BEGIN SAVESCANNERSTATUS:=SCANNERSTATUS;SCANNERSTATUS:=0;GETTOKEN;
SCANNERSTATUS:=SAVESCANNERSTATUS;END;4:SCANFONTIDENT;
5:IF JOBNAME=0 THEN OPENLOGFILE;{1384:}6:;{:1384}END{:471};
OLDSETTING:=SELECTOR;SELECTOR:=21;B:=POOLPTR;{472:}
CASE C OF 0:PRINTINT(CURVAL);1:PRINTROMANINT(CURVAL);
2:IF CURCS<>0 THEN SPRINTCS(CURCS)ELSE PRINTCHAR(CURCHR);3:PRINTMEANING;
4:BEGIN PRINT(FONTNAME[CURVAL]);
IF FONTSIZE[CURVAL]<>FONTDSIZE[CURVAL]THEN BEGIN PRINT(750);
PRINTSCALED(FONTSIZE[CURVAL]);PRINT(400);END;END;5:PRINT(JOBNAME);
{1385:}6:PRINT(256);{:1385}END{:472};SELECTOR:=OLDSETTING;
MEM[327132].HH.RH:=STRTOKS(B);BEGINTOKENLIST(MEM[327141].HH.RH,4);END;
{:470}{473:}FUNCTION SCANTOKS(MACRODEF,XPAND:BOOLEAN):HALFWORD;
LABEL 40,30,31,32;VAR T:HALFWORD;S:HALFWORD;P:HALFWORD;Q:HALFWORD;
UNBALANCE:HALFWORD;HASHBRACE:HALFWORD;
BEGIN IF MACRODEF THEN SCANNERSTATUS:=2 ELSE SCANNERSTATUS:=5;
WARNINGINDEX:=CURCS;DEFREF:=GETAVAIL;MEM[DEFREF].HH.LH:=0;P:=DEFREF;
HASHBRACE:=0;T:=3120;IF MACRODEF THEN{474:}
BEGIN WHILE TRUE DO BEGIN GETTOKEN;IF CURTOK<768 THEN GOTO 31;
IF CURCMD=6 THEN{476:}BEGIN S:=3328+CURCHR;GETTOKEN;
IF CURCMD=1 THEN BEGIN HASHBRACE:=CURTOK;BEGIN Q:=GETAVAIL;
MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=CURTOK;P:=Q;END;BEGIN Q:=GETAVAIL;
MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=3584;P:=Q;END;GOTO 30;END;
IF T=3129 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(753);END;
BEGIN HELPPTR:=1;HELPLINE[0]:=754;END;ERROR;END ELSE BEGIN T:=T+1;
IF CURTOK<>T THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(755);END;
BEGIN HELPPTR:=2;HELPLINE[1]:=756;HELPLINE[0]:=757;END;BACKERROR;END;
CURTOK:=S;END;END{:476};BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=CURTOK;P:=Q;END;END;31:BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=3584;P:=Q;END;IF CURCMD=2 THEN{475:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(666);END;
ALIGNSTATE:=ALIGNSTATE+1;BEGIN HELPPTR:=2;HELPLINE[1]:=751;
HELPLINE[0]:=752;END;ERROR;GOTO 40;END{:475};30:END{:474}
ELSE SCANLEFTBRACE;{477:}UNBALANCE:=1;
WHILE TRUE DO BEGIN IF XPAND THEN{478:}
BEGIN WHILE TRUE DO BEGIN GETNEXT;
IF CURCMD>=111 THEN IF MEM[MEM[CURCHR].HH.RH].HH.LH=3585 THEN BEGIN
CURCMD:=0;CURCHR:=257;END;IF CURCMD<=100 THEN GOTO 32;
IF CURCMD<>109 THEN EXPAND ELSE BEGIN Q:=THETOKS;
IF MEM[327141].HH.RH<>0 THEN BEGIN MEM[P].HH.RH:=MEM[327141].HH.RH;P:=Q;
END;END;END;32:XTOKEN END{:478}ELSE GETTOKEN;
IF CURTOK<768 THEN IF CURCMD<2 THEN UNBALANCE:=UNBALANCE+1 ELSE BEGIN
UNBALANCE:=UNBALANCE-1;IF UNBALANCE=0 THEN GOTO 40;
END ELSE IF CURCMD=6 THEN IF MACRODEF THEN{479:}BEGIN S:=CURTOK;
IF XPAND THEN GETXTOKEN ELSE GETTOKEN;
IF CURCMD<>6 THEN IF(CURTOK<=3120)OR(CURTOK>T)THEN BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(758);END;SPRINTCS(WARNINGINDEX);
BEGIN HELPPTR:=3;HELPLINE[2]:=759;HELPLINE[1]:=760;HELPLINE[0]:=761;END;
BACKERROR;CURTOK:=S;END ELSE CURTOK:=1232+CURCHR;END{:479};
BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=CURTOK;P:=Q;END;
END{:477};40:SCANNERSTATUS:=0;IF HASHBRACE<>0 THEN BEGIN Q:=GETAVAIL;
MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=HASHBRACE;P:=Q;END;SCANTOKS:=P;END;{:473}
{482:}PROCEDURE READTOKS(N:INTEGER;R:HALFWORD;J:HALFWORD);LABEL 30;
VAR P:HALFWORD;Q:HALFWORD;S:INTEGER;M:SMALLNUMBER;
BEGIN SCANNERSTATUS:=2;WARNINGINDEX:=R;DEFREF:=GETAVAIL;
MEM[DEFREF].HH.LH:=0;P:=DEFREF;BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=3584;P:=Q;END;IF(N<0)OR(N>15)THEN M:=16 ELSE M:=N;
S:=ALIGNSTATE;ALIGNSTATE:=1000000;REPEAT{483:}BEGINFILEREADING;
CURINPUT.NAMEFIELD:=M+1;IF READOPEN[M]=2 THEN{484:}
IF INTERACTION>1 THEN IF N<0 THEN BEGIN WAKEUPTERMINAL;PRINT(339);
TERMINPUT;END ELSE BEGIN WAKEUPTERMINAL;PRINTLN;SPRINTCS(R);
BEGIN WAKEUPTERMINAL;PRINT(61);TERMINPUT;END;N:=-1;
END ELSE FATALERROR(762){:484}ELSE IF READOPEN[M]=1 THEN{485:}
IF INPUTLN(READFILE[M],FALSE)THEN READOPEN[M]:=0 ELSE BEGIN ACLOSE(
READFILE[M]);READOPEN[M]:=2;END{:485}ELSE{486:}
BEGIN IF NOT INPUTLN(READFILE[M],TRUE)THEN BEGIN ACLOSE(READFILE[M]);
READOPEN[M]:=2;IF ALIGNSTATE<>1000000 THEN BEGIN RUNAWAY;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(763);END;PRINTESC(538);BEGIN HELPPTR:=1;
HELPLINE[0]:=764;END;ALIGNSTATE:=1000000;ERROR;END;END;END{:486};
CURINPUT.LIMITFIELD:=LAST;
IF(EQTB[13216].INT<0)OR(EQTB[13216].INT>255)THEN CURINPUT.LIMITFIELD:=
CURINPUT.LIMITFIELD-1 ELSE BUFFER[CURINPUT.LIMITFIELD]:=EQTB[13216].INT;
FIRST:=CURINPUT.LIMITFIELD+1;CURINPUT.LOCFIELD:=CURINPUT.STARTFIELD;
CURINPUT.STATEFIELD:=33;{1494:}
IF J=1 THEN BEGIN WHILE CURINPUT.LOCFIELD<=CURINPUT.LIMITFIELD DO BEGIN
CURCHR:=BUFFER[CURINPUT.LOCFIELD];
CURINPUT.LOCFIELD:=CURINPUT.LOCFIELD+1;
IF CURCHR=32 THEN CURTOK:=2592 ELSE CURTOK:=CURCHR+3072;
BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;MEM[Q].HH.LH:=CURTOK;P:=Q;END;END;
GOTO 30;END{:1494};WHILE TRUE DO BEGIN GETTOKEN;
IF CURTOK=0 THEN GOTO 30;
IF ALIGNSTATE<1000000 THEN BEGIN REPEAT GETTOKEN;UNTIL CURTOK=0;
ALIGNSTATE:=1000000;GOTO 30;END;BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=CURTOK;P:=Q;END;END;30:ENDFILEREADING{:483};
UNTIL ALIGNSTATE=1000000;CURVAL:=DEFREF;SCANNERSTATUS:=0;ALIGNSTATE:=S;
END;{:482}{494:}PROCEDURE PASSTEXT;LABEL 30;VAR L:INTEGER;
SAVESCANNERSTATUS:SMALLNUMBER;BEGIN SAVESCANNERSTATUS:=SCANNERSTATUS;
SCANNERSTATUS:=1;L:=0;SKIPLINE:=LINE;WHILE TRUE DO BEGIN GETNEXT;
IF CURCMD=106 THEN BEGIN IF L=0 THEN GOTO 30;IF CURCHR=2 THEN L:=L-1;
END ELSE IF CURCMD=105 THEN L:=L+1;END;
30:SCANNERSTATUS:=SAVESCANNERSTATUS;
IF EQTB[13225].INT>0 THEN SHOWCURCMDCHR;END;{:494}{497:}
PROCEDURE CHANGEIFLIMIT(L:SMALLNUMBER;P:HALFWORD);LABEL 10;
VAR Q:HALFWORD;BEGIN IF P=CONDPTR THEN IFLIMIT:=L ELSE BEGIN Q:=CONDPTR;
WHILE TRUE DO BEGIN IF Q=0 THEN CONFUSION(765);
IF MEM[Q].HH.RH=P THEN BEGIN MEM[Q].HH.B0:=L;GOTO 10;END;
Q:=MEM[Q].HH.RH;END;END;10:END;{:497}{498:}PROCEDURE CONDITIONAL;
LABEL 10,50;VAR B:BOOLEAN;R:60..62;M,N:INTEGER;P,Q:HALFWORD;
SAVESCANNERSTATUS:SMALLNUMBER;SAVECONDPTR:HALFWORD;THISIF:SMALLNUMBER;
ISUNLESS:BOOLEAN;
BEGIN IF EQTB[13225].INT>0 THEN IF EQTB[13204].INT<=1 THEN SHOWCURCMDCHR
;{495:}BEGIN P:=GETNODE(2);MEM[P].HH.RH:=CONDPTR;MEM[P].HH.B0:=IFLIMIT;
MEM[P].HH.B1:=CURIF;MEM[P+1].INT:=IFLINE;CONDPTR:=P;CURIF:=CURCHR;
IFLIMIT:=1;IFLINE:=LINE;END{:495};SAVECONDPTR:=CONDPTR;
ISUNLESS:=(CURCHR>=32);THISIF:=CURCHR MOD 32;{501:}
CASE THISIF OF 0,1:{506:}BEGIN BEGIN GETXTOKEN;
IF CURCMD=0 THEN IF CURCHR=257 THEN BEGIN CURCMD:=13;
CURCHR:=CURTOK-4096;END;END;IF(CURCMD>13)OR(CURCHR>255)THEN BEGIN M:=0;
N:=256;END ELSE BEGIN M:=CURCMD;N:=CURCHR;END;BEGIN GETXTOKEN;
IF CURCMD=0 THEN IF CURCHR=257 THEN BEGIN CURCMD:=13;
CURCHR:=CURTOK-4096;END;END;
IF(CURCMD>13)OR(CURCHR>255)THEN BEGIN CURCMD:=0;CURCHR:=256;END;
IF THISIF=0 THEN B:=(N=CURCHR)ELSE B:=(M=CURCMD);END{:506};2,3:{503:}
BEGIN IF THISIF=2 THEN SCANINT ELSE SCANDIMEN(FALSE,FALSE,FALSE);
N:=CURVAL;{406:}REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};
IF(CURTOK>=3132)AND(CURTOK<=3134)THEN R:=CURTOK-3072 ELSE BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(790);END;PRINTCMDCHR(105,THISIF);
BEGIN HELPPTR:=1;HELPLINE[0]:=791;END;BACKERROR;R:=61;END;
IF THISIF=2 THEN SCANINT ELSE SCANDIMEN(FALSE,FALSE,FALSE);
CASE R OF 60:B:=(N<CURVAL);61:B:=(N=CURVAL);62:B:=(N>CURVAL);END;
END{:503};4:{504:}BEGIN SCANINT;B:=ODD(CURVAL);END{:504};
5:B:=(ABS(CURLIST.MODEFIELD)=1);6:B:=(ABS(CURLIST.MODEFIELD)=102);
7:B:=(ABS(CURLIST.MODEFIELD)=203);8:B:=(CURLIST.MODEFIELD<0);
9,10,11:{505:}BEGIN SCANREGISTERNUM;
IF CURVAL<256 THEN P:=EQTB[11583+CURVAL].HH.RH ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR=0 THEN P:=0 ELSE P:=MEM[CURPTR+1].HH.RH;END;
IF THISIF=9 THEN B:=(P=0)ELSE IF P=0 THEN B:=FALSE ELSE IF THISIF=10
THEN B:=(MEM[P].HH.B0=0)ELSE B:=(MEM[P].HH.B0=1);END{:505};12:{507:}
BEGIN SAVESCANNERSTATUS:=SCANNERSTATUS;SCANNERSTATUS:=0;GETNEXT;
N:=CURCS;P:=CURCMD;Q:=CURCHR;GETNEXT;
IF CURCMD<>P THEN B:=FALSE ELSE IF CURCMD<111 THEN B:=(CURCHR=Q)ELSE{508
:}BEGIN P:=MEM[CURCHR].HH.RH;Q:=MEM[EQTB[N].HH.RH].HH.RH;
IF P=Q THEN B:=TRUE ELSE BEGIN WHILE(P<>0)AND(Q<>0)DO IF MEM[P].HH.LH<>
MEM[Q].HH.LH THEN P:=0 ELSE BEGIN P:=MEM[P].HH.RH;Q:=MEM[Q].HH.RH;END;
B:=((P=0)AND(Q=0));END;END{:508};SCANNERSTATUS:=SAVESCANNERSTATUS;
END{:507};13:BEGIN SCANFOURBITINT;B:=(READOPEN[CURVAL]=2);END;
14:B:=TRUE;15:B:=FALSE;{1499:}17:BEGIN SAVESCANNERSTATUS:=SCANNERSTATUS;
SCANNERSTATUS:=0;GETNEXT;B:=(CURCMD<>101);
SCANNERSTATUS:=SAVESCANNERSTATUS;END;{:1499}{1500:}18:BEGIN N:=GETAVAIL;
P:=N;REPEAT GETXTOKEN;IF CURCS=0 THEN BEGIN Q:=GETAVAIL;MEM[P].HH.RH:=Q;
MEM[Q].HH.LH:=CURTOK;P:=Q;END;UNTIL CURCS<>0;IF CURCMD<>67 THEN{373:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(634);END;PRINTESC(508);
PRINT(635);BEGIN HELPPTR:=2;HELPLINE[1]:=636;HELPLINE[0]:=637;END;
BACKERROR;END{:373};{1501:}M:=FIRST;P:=MEM[N].HH.RH;
WHILE P<>0 DO BEGIN IF M>=MAXBUFSTACK THEN BEGIN MAXBUFSTACK:=M+1;
IF MAXBUFSTACK=BUFSIZE THEN OVERFLOW(257,BUFSIZE);END;
BUFFER[M]:=MEM[P].HH.LH MOD 256;M:=M+1;P:=MEM[P].HH.RH;END;
IF M>FIRST+1 THEN CURCS:=IDLOOKUP(FIRST,M-FIRST)ELSE IF M=FIRST THEN
CURCS:=513 ELSE CURCS:=257+BUFFER[FIRST]{:1501};FLUSHLIST(N);
B:=(EQTB[CURCS].HH.B0<>101);END;{:1500}{1502:}19:BEGIN SCANFONTIDENT;
N:=CURVAL;SCANCHARNUM;
IF(FONTBC[N]<=CURVAL)AND(FONTEC[N]>=CURVAL)THEN B:=(FONTINFO[CHARBASE[N]
+CURVAL].QQQQ.B0>0)ELSE B:=FALSE;END;{:1502}16:{509:}BEGIN SCANINT;
N:=CURVAL;IF EQTB[13204].INT>1 THEN BEGIN BEGINDIAGNOSTIC;PRINT(792);
PRINTINT(N);PRINTCHAR(125);ENDDIAGNOSTIC(FALSE);END;
WHILE N<>0 DO BEGIN PASSTEXT;
IF CONDPTR=SAVECONDPTR THEN IF CURCHR=4 THEN N:=N-1 ELSE GOTO 50 ELSE IF
CURCHR=2 THEN{496:}BEGIN IF IFSTACK[INOPEN]=CONDPTR THEN IFWARNING;
P:=CONDPTR;IFLINE:=MEM[P+1].INT;CURIF:=MEM[P].HH.B1;
IFLIMIT:=MEM[P].HH.B0;CONDPTR:=MEM[P].HH.RH;FREENODE(P,2);END{:496};END;
CHANGEIFLIMIT(4,SAVECONDPTR);GOTO 10;END{:509};END{:501};
IF ISUNLESS THEN B:=NOT B;IF EQTB[13204].INT>1 THEN{502:}
BEGIN BEGINDIAGNOSTIC;IF B THEN PRINT(788)ELSE PRINT(789);
ENDDIAGNOSTIC(FALSE);END{:502};
IF B THEN BEGIN CHANGEIFLIMIT(3,SAVECONDPTR);GOTO 10;END;{500:}
WHILE TRUE DO BEGIN PASSTEXT;
IF CONDPTR=SAVECONDPTR THEN BEGIN IF CURCHR<>4 THEN GOTO 50;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(786);END;PRINTESC(784);BEGIN HELPPTR:=1;
HELPLINE[0]:=787;END;ERROR;END ELSE IF CURCHR=2 THEN{496:}
BEGIN IF IFSTACK[INOPEN]=CONDPTR THEN IFWARNING;P:=CONDPTR;
IFLINE:=MEM[P+1].INT;CURIF:=MEM[P].HH.B1;IFLIMIT:=MEM[P].HH.B0;
CONDPTR:=MEM[P].HH.RH;FREENODE(P,2);END{:496};END{:500};
50:IF CURCHR=2 THEN{496:}
BEGIN IF IFSTACK[INOPEN]=CONDPTR THEN IFWARNING;P:=CONDPTR;
IFLINE:=MEM[P+1].INT;CURIF:=MEM[P].HH.B1;IFLIMIT:=MEM[P].HH.B0;
CONDPTR:=MEM[P].HH.RH;FREENODE(P,2);END{:496}ELSE IFLIMIT:=2;10:END;
{:498}{515:}PROCEDURE BEGINNAME;BEGIN AREADELIMITER:=0;EXTDELIMITER:=0;
END;{:515}{516:}FUNCTION MORENAME(C:ASCIICODE):BOOLEAN;
BEGIN IF C=32 THEN MORENAME:=FALSE ELSE BEGIN BEGIN IF POOLPTR+1>
POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR);END;IF(C=63)THEN C:=37;
BEGIN STRPOOL[POOLPTR]:=C;POOLPTR:=POOLPTR+1;END;
IF(C=62)OR(C=93)OR(C=58)THEN BEGIN AREADELIMITER:=(POOLPTR-STRSTART[
STRPTR]);EXTDELIMITER:=0;
END ELSE IF(C=46)AND(EXTDELIMITER=0)THEN EXTDELIMITER:=(POOLPTR-STRSTART
[STRPTR]);MORENAME:=TRUE;END;END;{:516}{517:}PROCEDURE ENDNAME;
LABEL 20,10;VAR T:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;I:POOLPOINTER;
LEN:SIGNEDHALFWORD;
BEGIN 20:IF(STRPOOL[STRSTART[STRPTR]+AREADELIMITER]=58)AND(POOLPTR=
STRSTART[STRPTR]+AREADELIMITER+1)THEN BEGIN CURAREA:=MAKESTRING;
LEN:=(STRSTART[CURAREA+1]-STRSTART[CURAREA])-1;
FOR I:=1 TO LEN DO T[I]:=XCHR[STRPOOL[STRSTART[CURAREA]+I-1]];
IF NOT TRANSLATE(T,LEN)THEN BEGIN CUREXT:=339;CURNAME:=339;GOTO 10;END;
BEGIN STRPTR:=STRPTR-1;POOLPTR:=STRSTART[STRPTR];END;BEGINNAME;
FOR I:=1 TO LEN DO IF NOT MORENAME(XORD[T[I]])THEN GOTO 20;GOTO 20;END;
IF STRPTR+3>MAXSTRINGS THEN OVERFLOW(259,MAXSTRINGS-INITSTRPTR);
IF AREADELIMITER=0 THEN CURAREA:=339 ELSE BEGIN CURAREA:=STRPTR;
STRSTART[STRPTR+1]:=STRSTART[STRPTR]+AREADELIMITER;STRPTR:=STRPTR+1;END;
IF EXTDELIMITER=0 THEN BEGIN CUREXT:=339;CURNAME:=MAKESTRING;
END ELSE BEGIN CURNAME:=STRPTR;
STRSTART[STRPTR+1]:=STRSTART[STRPTR]+EXTDELIMITER-AREADELIMITER-1;
STRPTR:=STRPTR+1;CUREXT:=MAKESTRING;END;10:END;{:517}{519:}
PROCEDURE PACKFILENAME(N,A,E:STRNUMBER);VAR K:INTEGER;C:ASCIICODE;
J:POOLPOINTER;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 K<=FILENAMESIZE THEN NAMELENGTH:=K ELSE NAMELENGTH:=FILENAMESIZE;
FOR K:=NAMELENGTH+1 TO FILENAMESIZE DO NAMEOFFILE[K]:=' ';END;{:519}
{523:}PROCEDURE PACKBUFFEREDNAME(N:SMALLNUMBER;A,B:INTEGER);
VAR K:INTEGER;C:ASCIICODE;J:INTEGER;
BEGIN IF N+B-A+5>FILENAMESIZE THEN B:=A+FILENAMESIZE-N-5;K:=0;
FOR J:=1 TO N DO BEGIN C:=XORD[TEXFORMATDEFAULT[J]];K:=K+1;
IF K<=FILENAMESIZE THEN NAMEOFFILE[K]:=XCHR[C];END;
FOR J:=A TO B DO BEGIN C:=BUFFER[J];K:=K+1;
IF K<=FILENAMESIZE THEN NAMEOFFILE[K]:=XCHR[C];END;
FOR J:=FORMATDEFAULTLENGTH-3 TO FORMATDEFAULTLENGTH DO BEGIN C:=XORD[
TEXFORMATDEFAULT[J]];K:=K+1;
IF K<=FILENAMESIZE THEN NAMEOFFILE[K]:=XCHR[C];END;
IF K<=FILENAMESIZE THEN NAMELENGTH:=K ELSE NAMELENGTH:=FILENAMESIZE;
FOR K:=NAMELENGTH+1 TO FILENAMESIZE DO NAMEOFFILE[K]:=' ';END;{:523}
{525:}FUNCTION MAKENAMESTRING:STRNUMBER;VAR K:1..FILENAMESIZE;
BEGIN IF(POOLPTR+LASTLENGTH>POOLSIZE)OR(STRPTR=MAXSTRINGS)OR((POOLPTR-
STRSTART[STRPTR])>0)THEN MAKENAMESTRING:=63 ELSE BEGIN FOR K:=1 TO
LASTLENGTH DO BEGIN STRPOOL[POOLPTR]:=XORD[LASTNAME[K]];
POOLPTR:=POOLPTR+1;END;MAKENAMESTRING:=MAKESTRING;END;END;
FUNCTION AMAKENAMESTRING(VAR F:ALPHAFILE):STRNUMBER;
BEGIN AMAKENAMESTRING:=MAKENAMESTRING;END;
FUNCTION BMAKENAMESTRING(VAR F:BYTEFILE):STRNUMBER;
BEGIN BMAKENAMESTRING:=MAKENAMESTRING;END;
FUNCTION WMAKENAMESTRING(VAR F:WORDFILE):STRNUMBER;
BEGIN WMAKENAMESTRING:=MAKENAMESTRING;END;{:525}{526:}
PROCEDURE SCANFILENAME;LABEL 30;BEGIN NAMEINPROGRESS:=TRUE;BEGINNAME;
{406:}REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};
WHILE TRUE DO BEGIN IF(CURCMD>12)OR(CURCHR>255)THEN BEGIN BACKINPUT;
GOTO 30;END;IF NOT MORENAME(CURCHR)THEN GOTO 30;GETXTOKEN;END;
30:ENDNAME;NAMEINPROGRESS:=FALSE;END;{:526}{529:}
PROCEDURE PACKJOBNAME(S:STRNUMBER);BEGIN CURAREA:=339;CUREXT:=S;
CURNAME:=JOBNAME;PACKFILENAME(CURNAME,CURAREA,CUREXT);END;
FUNCTION PACKDEFAULTNAME(QUAL:BOOLEAN;
DFNAME:PACKED ARRAY[L1..U1:INTEGER]OF CHAR;DFLEN:FILESIZE):BOOLEAN;
VAR K:INTEGER;
BEGIN FOR K:=1 TO FILENAMESIZE DO DEFAULTNAME[K]:=NAMEOFFILE[K];
DEFLTLENGTH:=NAMELENGTH;IF QUAL THEN BEGIN NAMEOFFILE:=DFNAME;
NAMELENGTH:=DFLEN;
IF NAMELENGTH<FILENAMESIZE THEN FOR K:=NAMELENGTH+1 TO FILENAMESIZE DO
NAMEOFFILE[K]:=' ';END;PACKDEFAULTNAME:=QUAL;END;
PROCEDURE CLEARDEFAULTNAME;VAR K:INTEGER;
BEGIN FOR K:=1 TO FILENAMESIZE DO DEFAULTNAME[K]:=' ';END;{:529}{530:}
PROCEDURE PROMPTFILENAME(S,E:STRNUMBER);LABEL 30;VAR K:0..BUFSIZE;
BEGIN IF INTERACTION=2 THEN WAKEUPTERMINAL;
IF S=794 THEN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(795);
END ELSE BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(796);END;
PRINTFILENAME(CURNAME,CURAREA,CUREXT);PRINT(797);
IF E=798 THEN SHOWCONTEXT;PRINTNL(799);PRINT(S);
IF INTERACTION<2 THEN FATALERROR(800);INRAB^.RAB$V_PTA:=TRUE;
BEGIN WAKEUPTERMINAL;PRINT(575);TERMINPUT;END;{1604:}COPYERR:=IGNOREIT;
RESET(TEMPFILE){:1604};{531:}BEGIN BEGINNAME;K:=FIRST;
WHILE(BUFFER[K]=32)AND(K<LAST)DO K:=K+1;
WHILE TRUE DO BEGIN IF K=LAST THEN GOTO 30;
IF NOT MORENAME(BUFFER[K])THEN GOTO 30;K:=K+1;END;30:ENDNAME;END{:531};
IF CUREXT=339 THEN CUREXT:=E;PACKFILENAME(CURNAME,CURAREA,CUREXT);END;
{:530}{534:}{1615:}PROCEDURE OPENDIAGFILE;BEGIN PACKJOBNAME(1415);
IF PACKDEFAULTNAME(DIAGQUAL,DIAGFNAME,DIAGFLEN)THEN BEGIN WHILE NOT
AOPENOUT(DIAGFILE)DO PROMPTFILENAME(1416,1415);
DIAGNAME:=AMAKENAMESTRING(DIAGFILE);
IF DIAGQUAL THEN WRITELN(DIAGFILE,'start module');END ELSE DIAGNAME:=46;
CLEARDEFAULTNAME;END;{:1615}PROCEDURE OPENLOGFILE;VAR OLDSETTING:0..22;
K:0..BUFSIZE;L:0..BUFSIZE;MONTHS:PACKED ARRAY[1..36]OF CHAR;
BEGIN OLDSETTING:=SELECTOR;IF JOBNAME=0 THEN JOBNAME:=803;
PACKJOBNAME(804);
IF PACKDEFAULTNAME(LOGQUAL,LOGFNAME,LOGFLEN)THEN BEGIN WHILE NOT
AOPENOUT(LOGFILE)DO{535:}BEGIN SELECTOR:=17;PROMPTFILENAME(806,804);
END{:535};LOGNAME:=AMAKENAMESTRING(LOGFILE);END ELSE LOGNAME:=46;
CLEARDEFAULTNAME;OPENDIAGFILE;SELECTOR:=18;LOGOPENED:=TRUE;{536:}
BEGIN IF LOGQUAL THEN WRITE(LOGFILE,'This is e-TeX, Version ',
'3.14159-2.0',';fMar06 [PD VMS 3.6f]');SLOWPRINT(FORMATIDENT);
PRINT(807);PRINTINT(EQTB[13189].INT);PRINTCHAR(32);
MONTHS:='JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC';
FOR K:=3*EQTB[13190].INT-2 TO 3*EQTB[13190].INT DO IF LOGQUAL THEN WRITE
(LOGFILE,MONTHS[K]);PRINTCHAR(32);PRINTINT(EQTB[13191].INT);
PRINTCHAR(32);PRINTTWO(EQTB[13188].INT DIV 60);PRINTCHAR(58);
PRINTTWO(EQTB[13188].INT MOD 60);IF(ETEXMODE=1)THEN BEGIN;
IF LOGQUAL THEN WRITELN(LOGFILE);
IF LOGQUAL THEN WRITE(LOGFILE,'entering extended mode');END;END{:536};
INPUTSTACK[INPUTPTR]:=CURINPUT;PRINTNL(805);L:=INPUTSTACK[0].LIMITFIELD;
IF BUFFER[L]=EQTB[13216].INT THEN L:=L-1;
FOR K:=1 TO L DO PRINT(BUFFER[K]);PRINTLN;SELECTOR:=OLDSETTING+2;END;
{:534}{537:}FUNCTION XOPENIN(VAR F:ALPHAFILE):BOOLEAN;
BEGIN OPEN(F,NAMEOFFILE, readonly ,user_action:=USERRESET,
error:=continue);
IF STATUS(F)>0 THEN BEGIN IF CURAREA=339 THEN BEGIN PACKFILENAME(CURNAME
,TEXAREA,CUREXT);
OPEN(F,NAMEOFFILE, readonly ,user_action:=USERRESET,error:=continue);
END;END;
IF STATUS(F)>0 THEN XOPENIN:=FALSE ELSE BEGIN RESET(F,error:=continue);
XOPENIN:=STATUS(F)<=0;END;END;PROCEDURE STARTINPUT;LABEL 30;
VAR K:INTEGER;BEGIN SCANFILENAME;IF CUREXT=339 THEN CUREXT:=798;
PACKFILENAME(CURNAME,CURAREA,CUREXT);
WHILE TRUE DO BEGIN BEGINFILEREADING;
IF XOPENIN(INPUTFILE[CURINPUT.INDEXFIELD])THEN GOTO 30;ENDFILEREADING;
PROMPTFILENAME(794,798);END;
30:CURINPUT.NAMEFIELD:=AMAKENAMESTRING(INPUTFILE[CURINPUT.INDEXFIELD]);
IF JOBNAME=0 THEN BEGIN IF LASTBASENAMLEN=(STRSTART[CURNAME+1]-STRSTART[
CURNAME])THEN BEGIN FOR K:=1 TO LASTBASENAMLEN DO STRPOOL[STRSTART[
CURNAME]+K-1]:=XORD[LASTBASENAME[K]];
END ELSE IF(POOLPTR+LASTBASENAMLEN<=POOLSIZE)AND(STRPTR<>MAXSTRINGS)AND(
(POOLPTR-STRSTART[STRPTR])<=0)THEN BEGIN FOR K:=1 TO LASTBASENAMLEN DO
BEGIN STRPOOL[POOLPTR]:=XORD[LASTBASENAME[K]];POOLPTR:=POOLPTR+1;END;
CURNAME:=MAKESTRING;END;JOBNAME:=CURNAME;OPENLOGFILE;END;
IF TERMOFFSET+(STRSTART[CURINPUT.NAMEFIELD+1]-STRSTART[CURINPUT.
NAMEFIELD])>MAXPRINTLINE-2 THEN PRINTLN ELSE IF(TERMOFFSET>0)OR(
FILEOFFSET>0)THEN PRINTCHAR(32);PRINTCHAR(40);OPENPARENS:=OPENPARENS+1;
SLOWPRINT(CURINPUT.NAMEFIELD);IF ODD(SELECTOR)THEN WRITELN(TERMOUT);
CURINPUT.STATEFIELD:=33;{538:}BEGIN LINE:=1;
IF INPUTLN(INPUTFILE[CURINPUT.INDEXFIELD],FALSE)THEN;FIRMUPTHELINE;
IF(EQTB[13216].INT<0)OR(EQTB[13216].INT>255)THEN CURINPUT.LIMITFIELD:=
CURINPUT.LIMITFIELD-1 ELSE BUFFER[CURINPUT.LIMITFIELD]:=EQTB[13216].INT;
FIRST:=CURINPUT.LIMITFIELD+1;CURINPUT.LOCFIELD:=CURINPUT.STARTFIELD;
END{:538};END;{:537}{560:}FUNCTION READFONTINFO(U:HALFWORD;
NOM,AIRE:STRNUMBER;S:SCALED):INTERNALFONTNUMBER;LABEL 30,11,45;
VAR K:FONTINDEX;FILEOPENED:BOOLEAN;
LF,LH,BC,EC,NW,NH,ND,NI,NL,NK,NE,NP:HALFWORD;F:INTERNALFONTNUMBER;
G:INTERNALFONTNUMBER;A,B,C,D:EIGHTBITS;QW:FOURQUARTERS;SW:SCALED;
BCHLABEL:INTEGER;BCHAR:0..256;Z:SCALED;ALPHA:INTEGER;BETA:1..16;
BEGIN G:=0;{562:}{563:}FILEOPENED:=FALSE;
IF AIRE=339 THEN PACKFILENAME(NOM,TEXFONTAREA,818)ELSE PACKFILENAME(NOM,
AIRE,818);IF NOT BOPENIN(TFMFILE)THEN GOTO 11;TFMCOUNT:=0;
FILEOPENED:=TRUE{:563};{565:}BEGIN BEGIN LF:=TFMFILE^[TFMCOUNT];
IF LF>127 THEN GOTO 11;BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;LF:=LF*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN LH:=TFMFILE^[TFMCOUNT];IF LH>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;LH:=LH*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN BC:=TFMFILE^[TFMCOUNT];IF BC>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BC:=BC*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN EC:=TFMFILE^[TFMCOUNT];IF EC>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;EC:=EC*256+TFMFILE^[TFMCOUNT];END;
IF(BC>EC+1)OR(EC>255)THEN GOTO 11;IF BC>255 THEN BEGIN BC:=1;EC:=0;END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN NW:=TFMFILE^[TFMCOUNT];IF NW>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;NW:=NW*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN NH:=TFMFILE^[TFMCOUNT];IF NH>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;NH:=NH*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN ND:=TFMFILE^[TFMCOUNT];IF ND>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;ND:=ND*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN NI:=TFMFILE^[TFMCOUNT];IF NI>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;NI:=NI*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN NL:=TFMFILE^[TFMCOUNT];IF NL>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;NL:=NL*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN NK:=TFMFILE^[TFMCOUNT];IF NK>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;NK:=NK*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN NE:=TFMFILE^[TFMCOUNT];IF NE>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;NE:=NE*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN NP:=TFMFILE^[TFMCOUNT];IF NP>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;NP:=NP*256+TFMFILE^[TFMCOUNT];END;
IF LF<>6+LH+(EC-BC+1)+NW+NH+ND+NI+NL+NK+NE+NP THEN GOTO 11;END{:565};
{566:}LF:=LF-6-LH;IF NP<7 THEN LF:=LF+7-NP;
IF(FONTPTR=FONTMAX)OR(FMEMPTR+LF>FONTMEMSIZE)THEN{567:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(809);END;SPRINTCS(U);
PRINTCHAR(61);PRINTFILENAME(NOM,AIRE,339);IF S>=0 THEN BEGIN PRINT(750);
PRINTSCALED(S);PRINT(400);END ELSE IF S<>-1000 THEN BEGIN PRINT(810);
PRINTINT(-S);END;PRINT(819);BEGIN HELPPTR:=4;HELPLINE[3]:=820;
HELPLINE[2]:=821;HELPLINE[1]:=822;HELPLINE[0]:=823;END;ERROR;GOTO 30;
END{:567};F:=FONTPTR+1;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-256*(128);
EXTENBASE[F]:=KERNBASE[F]+256*(128)+NK;
PARAMBASE[F]:=EXTENBASE[F]+NE{:566};{568:}BEGIN IF LH<2 THEN GOTO 11;
BEGIN BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;A:=TFMFILE^[TFMCOUNT];QW.B0:=A;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;B:=TFMFILE^[TFMCOUNT];QW.B1:=B;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;C:=TFMFILE^[TFMCOUNT];QW.B2:=C;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;D:=TFMFILE^[TFMCOUNT];QW.B3:=D;FONTCHECK[F]:=QW;END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN Z:=TFMFILE^[TFMCOUNT];IF Z>127 THEN GOTO 11;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;Z:=Z*256+TFMFILE^[TFMCOUNT];END;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;Z:=Z*256+TFMFILE^[TFMCOUNT];
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;Z:=(Z*16)+(TFMFILE^[TFMCOUNT]DIV 16);
IF Z<65536 THEN GOTO 11;WHILE LH>2 DO BEGIN BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;LH:=LH-1;END;FONTDSIZE[F]:=Z;
IF S<>-1000 THEN IF S>=0 THEN Z:=S ELSE Z:=XNOVERD(Z,-S,1000);
FONTSIZE[F]:=Z;END{:568};{569:}
FOR K:=FMEMPTR TO WIDTHBASE[F]-1 DO BEGIN BEGIN BEGIN TFMCOUNT:=TFMCOUNT
+1;IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;A:=TFMFILE^[TFMCOUNT];QW.B0:=A;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;B:=TFMFILE^[TFMCOUNT];QW.B1:=B;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;C:=TFMFILE^[TFMCOUNT];QW.B2:=C;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;D:=TFMFILE^[TFMCOUNT];QW.B3:=D;FONTINFO[K].QQQQ:=QW;
END;
IF(A>=NW)OR(B DIV 16>=NH)OR(B MOD 16>=ND)OR(C DIV 4>=NI)THEN GOTO 11;
CASE C MOD 4 OF 1:IF D>=NL THEN GOTO 11;3:IF D>=NE THEN GOTO 11;2:{570:}
BEGIN BEGIN IF(D<BC)OR(D>EC)THEN GOTO 11 END;
WHILE D<K+BC-FMEMPTR DO BEGIN QW:=FONTINFO[CHARBASE[F]+D].QQQQ;
IF((QW.B2)MOD 4)<>2 THEN GOTO 45;D:=QW.B3;END;
IF D=K+BC-FMEMPTR THEN GOTO 11;45:END{:570};OTHERWISE END;END{:569};
{571:}BEGIN{572:}BEGIN ALPHA:=16;WHILE Z>=8388608 DO BEGIN Z:=Z DIV 2;
ALPHA:=ALPHA+ALPHA;END;BETA:=256 DIV ALPHA;ALPHA:=ALPHA*Z;END{:572};
FOR K:=WIDTHBASE[F]TO LIGKERNBASE[F]-1 DO BEGIN BEGIN TFMCOUNT:=TFMCOUNT
+1;IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;A:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;B:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;C:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;D:=TFMFILE^[TFMCOUNT];
SW:=(((((D*Z)DIV 256)+(C*Z))DIV 256)+(B*Z))DIV BETA;
IF A=0 THEN FONTINFO[K].INT:=SW ELSE IF A=255 THEN FONTINFO[K].INT:=SW-
ALPHA ELSE GOTO 11;END;IF FONTINFO[WIDTHBASE[F]].INT<>0 THEN GOTO 11;
IF FONTINFO[HEIGHTBASE[F]].INT<>0 THEN GOTO 11;
IF FONTINFO[DEPTHBASE[F]].INT<>0 THEN GOTO 11;
IF FONTINFO[ITALICBASE[F]].INT<>0 THEN GOTO 11;END{:571};{573:}
BCHLABEL:=32767;BCHAR:=256;
IF NL>0 THEN BEGIN FOR K:=LIGKERNBASE[F]TO KERNBASE[F]+256*(128)-1 DO
BEGIN BEGIN BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;A:=TFMFILE^[TFMCOUNT];QW.B0:=A;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;B:=TFMFILE^[TFMCOUNT];QW.B1:=B;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;C:=TFMFILE^[TFMCOUNT];QW.B2:=C;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;D:=TFMFILE^[TFMCOUNT];QW.B3:=D;FONTINFO[K].QQQQ:=QW;
END;IF A>128 THEN BEGIN IF 256*C+D>=NL THEN GOTO 11;
IF A=255 THEN IF K=LIGKERNBASE[F]THEN BCHAR:=B;
END ELSE BEGIN IF B<>BCHAR THEN BEGIN BEGIN IF(B<BC)OR(B>EC)THEN GOTO 11
END;QW:=FONTINFO[CHARBASE[F]+B].QQQQ;IF NOT(QW.B0>0)THEN GOTO 11;END;
IF C<128 THEN BEGIN BEGIN IF(D<BC)OR(D>EC)THEN GOTO 11 END;
QW:=FONTINFO[CHARBASE[F]+D].QQQQ;IF NOT(QW.B0>0)THEN GOTO 11;
END ELSE IF 256*(C-128)+D>=NK THEN GOTO 11;
IF A<128 THEN IF K-LIGKERNBASE[F]+A+1>=NL THEN GOTO 11;END;END;
IF A=255 THEN BCHLABEL:=256*C+D;END;
FOR K:=KERNBASE[F]+256*(128)TO EXTENBASE[F]-1 DO BEGIN BEGIN TFMCOUNT:=
TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;A:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;B:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;C:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;D:=TFMFILE^[TFMCOUNT];
SW:=(((((D*Z)DIV 256)+(C*Z))DIV 256)+(B*Z))DIV BETA;
IF A=0 THEN FONTINFO[K].INT:=SW ELSE IF A=255 THEN FONTINFO[K].INT:=SW-
ALPHA ELSE GOTO 11;END;{:573};{574:}
FOR K:=EXTENBASE[F]TO PARAMBASE[F]-1 DO BEGIN BEGIN BEGIN TFMCOUNT:=
TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;A:=TFMFILE^[TFMCOUNT];QW.B0:=A;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;B:=TFMFILE^[TFMCOUNT];QW.B1:=B;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;C:=TFMFILE^[TFMCOUNT];QW.B2:=C;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;D:=TFMFILE^[TFMCOUNT];QW.B3:=D;FONTINFO[K].QQQQ:=QW;
END;IF A<>0 THEN BEGIN BEGIN IF(A<BC)OR(A>EC)THEN GOTO 11 END;
QW:=FONTINFO[CHARBASE[F]+A].QQQQ;IF NOT(QW.B0>0)THEN GOTO 11;END;
IF B<>0 THEN BEGIN BEGIN IF(B<BC)OR(B>EC)THEN GOTO 11 END;
QW:=FONTINFO[CHARBASE[F]+B].QQQQ;IF NOT(QW.B0>0)THEN GOTO 11;END;
IF C<>0 THEN BEGIN BEGIN IF(C<BC)OR(C>EC)THEN GOTO 11 END;
QW:=FONTINFO[CHARBASE[F]+C].QQQQ;IF NOT(QW.B0>0)THEN GOTO 11;END;
BEGIN BEGIN IF(D<BC)OR(D>EC)THEN GOTO 11 END;
QW:=FONTINFO[CHARBASE[F]+D].QQQQ;IF NOT(QW.B0>0)THEN GOTO 11;END;
END{:574};{575:}
BEGIN FOR K:=1 TO NP DO IF K=1 THEN BEGIN BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;SW:=TFMFILE^[TFMCOUNT];IF SW>127 THEN SW:=SW-256;
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;SW:=SW*256+TFMFILE^[TFMCOUNT];
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;SW:=SW*256+TFMFILE^[TFMCOUNT];
BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;
FONTINFO[PARAMBASE[F]].INT:=(SW*16)+(TFMFILE^[TFMCOUNT]DIV 16);
END ELSE BEGIN BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;A:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;B:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;C:=TFMFILE^[TFMCOUNT];BEGIN TFMCOUNT:=TFMCOUNT+1;
IF TFMCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(TFMFILE,error:=continue);
TFMCOUNT:=0;END END;D:=TFMFILE^[TFMCOUNT];
SW:=(((((D*Z)DIV 256)+(C*Z))DIV 256)+(B*Z))DIV BETA;
IF A=0 THEN FONTINFO[PARAMBASE[F]+K-1].INT:=SW ELSE IF A=255 THEN
FONTINFO[PARAMBASE[F]+K-1].INT:=SW-ALPHA ELSE GOTO 11;END;
IF STATUS(TFMFILE)<>0 THEN GOTO 11;
FOR K:=NP+1 TO 7 DO FONTINFO[PARAMBASE[F]+K-1].INT:=0;END{:575};{576:}
IF NP>=7 THEN FONTPARAMS[F]:=NP ELSE FONTPARAMS[F]:=7;
HYPHENCHAR[F]:=EQTB[13214].INT;SKEWCHAR[F]:=EQTB[13215].INT;
IF BCHLABEL<NL THEN BCHARLABEL[F]:=BCHLABEL+LIGKERNBASE[F]ELSE
BCHARLABEL[F]:=0;FONTBCHAR[F]:=BCHAR;FONTFALSEBCHAR[F]:=BCHAR;
IF BCHAR<=EC THEN IF BCHAR>=BC THEN BEGIN QW:=FONTINFO[CHARBASE[F]+BCHAR
].QQQQ;IF(QW.B0>0)THEN FONTFALSEBCHAR[F]:=256;END;FONTNAME[F]:=NOM;
FONTAREA[F]:=AIRE;FONTBC[F]:=BC;FONTEC[F]:=EC;FONTGLUE[F]:=0;
CHARBASE[F]:=CHARBASE[F];WIDTHBASE[F]:=WIDTHBASE[F];
LIGKERNBASE[F]:=LIGKERNBASE[F];KERNBASE[F]:=KERNBASE[F];
EXTENBASE[F]:=EXTENBASE[F];PARAMBASE[F]:=PARAMBASE[F]-1;
FMEMPTR:=FMEMPTR+LF;FONTPTR:=F;G:=F;GOTO 30{:576}{:562};11:{561:}
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(809);END;SPRINTCS(U);PRINTCHAR(61);
PRINTFILENAME(NOM,AIRE,339);IF S>=0 THEN BEGIN PRINT(750);
PRINTSCALED(S);PRINT(400);END ELSE IF S<>-1000 THEN BEGIN PRINT(810);
PRINTINT(-S);END;IF FILEOPENED THEN PRINT(811)ELSE PRINT(812);
BEGIN HELPPTR:=5;HELPLINE[4]:=813;HELPLINE[3]:=814;HELPLINE[2]:=815;
HELPLINE[1]:=816;HELPLINE[0]:=817;END;ERROR{:561};
30:IF FILEOPENED THEN BCLOSE(TFMFILE);READFONTINFO:=G;END;{:560}{581:}
PROCEDURE CHARWARNING(F:INTERNALFONTNUMBER;C:EIGHTBITS);
VAR OLDSETTING:INTEGER;
BEGIN IF EQTB[13203].INT>0 THEN BEGIN OLDSETTING:=EQTB[13197].INT;
IF(ETEXMODE=1)AND(EQTB[13203].INT>1)THEN EQTB[13197].INT:=1;
BEGIN BEGINDIAGNOSTIC;PRINTNL(832);PRINT(C);PRINT(833);
SLOWPRINT(FONTNAME[F]);PRINTCHAR(33);ENDDIAGNOSTIC(FALSE);END;
EQTB[13197].INT:=OLDSETTING;END;END;{:581}{582:}
FUNCTION NEWCHARACTER(F:INTERNALFONTNUMBER;C:EIGHTBITS):HALFWORD;
LABEL 10;VAR P:HALFWORD;
BEGIN IF FONTBC[F]<=C THEN IF FONTEC[F]>=C THEN IF(FONTINFO[CHARBASE[F]+
C].QQQQ.B0>0)THEN BEGIN P:=GETAVAIL;MEM[P].HH.B0:=F;MEM[P].HH.B1:=C;
NEWCHARACTER:=P;GOTO 10;END;CHARWARNING(F,C);NEWCHARACTER:=0;10:END;
{:582}{598:}PROCEDURE DVISWAP;
BEGIN IF DVILIMIT=DVIBUFSIZE THEN BEGIN IF DVIQUAL THEN WRITE(DVIFILE,
DBUFFER.L);DVILIMIT:=HALFBUF;DVIOFFSET:=DVIOFFSET+DVIBUFSIZE;DVIPTR:=0;
END ELSE BEGIN IF DVIQUAL THEN WRITE(DVIFILE,DBUFFER.R);
DVILIMIT:=DVIBUFSIZE;END;DVIGONE:=DVIGONE+HALFBUF;END;{:598}{600:}
PROCEDURE DVIFOUR(X:INTEGER);
BEGIN IF X>=0 THEN BEGIN DBUFFER.B[DVIPTR]:=X DIV 16777216;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;
END ELSE BEGIN X:=X+1073741824;X:=X+1073741824;
BEGIN DBUFFER.B[DVIPTR]:=(X DIV 16777216)+128;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;END;X:=X MOD 16777216;
BEGIN DBUFFER.B[DVIPTR]:=X DIV 65536;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;X:=X MOD 65536;
BEGIN DBUFFER.B[DVIPTR]:=X DIV 256;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;BEGIN DBUFFER.B[DVIPTR]:=X MOD 256;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;END;{:600}{601:}
PROCEDURE DVIPOP(L:INTEGER);
BEGIN IF(L=DVIOFFSET+DVIPTR)AND(DVIPTR>0)THEN DVIPTR:=DVIPTR-1 ELSE
BEGIN DBUFFER.B[DVIPTR]:=142;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;END;{:601}{602:}
PROCEDURE DVIFONTDEF(F:INTERNALFONTNUMBER);VAR K:POOLPOINTER;
BEGIN BEGIN DBUFFER.B[DVIPTR]:=243;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;BEGIN DBUFFER.B[DVIPTR]:=F-1;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=FONTCHECK[F].B0;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=FONTCHECK[F].B1;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=FONTCHECK[F].B2;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=FONTCHECK[F].B3;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;DVIFOUR(FONTSIZE[F]);
DVIFOUR(FONTDSIZE[F]);
BEGIN DBUFFER.B[DVIPTR]:=(STRSTART[FONTAREA[F]+1]-STRSTART[FONTAREA[F]])
;DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=(STRSTART[FONTNAME[F]+1]-STRSTART[FONTNAME[F]])
;DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;{603:}
FOR K:=STRSTART[FONTAREA[F]]TO STRSTART[FONTAREA[F]+1]-1 DO BEGIN
DBUFFER.B[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
DBUFFER.B[DVIPTR]:=STRPOOL[K];DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END{:603};END;{:602}{607:}
PROCEDURE MOVEMENT(W:SCALED;O:EIGHTBITS);LABEL 10,40,45,2,1;
VAR MSTATE:SMALLNUMBER;P,Q:HALFWORD;K:INTEGER;BEGIN Q:=GETNODE(3);
MEM[Q+1].INT:=W;MEM[Q+2].INT:=DVIOFFSET+DVIPTR;
IF O=157 THEN BEGIN MEM[Q].HH.RH:=DOWNPTR;DOWNPTR:=Q;
END ELSE BEGIN MEM[Q].HH.RH:=RIGHTPTR;RIGHTPTR:=Q;END;{611:}
P:=MEM[Q].HH.RH;MSTATE:=0;
WHILE P<>0 DO BEGIN IF MEM[P+1].INT=W THEN{612:}
CASE MSTATE+MEM[P].HH.LH OF 3,4,15,16:IF MEM[P+2].INT<DVIGONE THEN GOTO
45 ELSE{613:}BEGIN K:=MEM[P+2].INT-DVIOFFSET;
IF K<0 THEN K:=K+DVIBUFSIZE;DBUFFER.B[K]:=DBUFFER.B[K]+5;
MEM[P].HH.LH:=1;GOTO 40;END{:613};
5,9,11:IF MEM[P+2].INT<DVIGONE THEN GOTO 45 ELSE{614:}
BEGIN K:=MEM[P+2].INT-DVIOFFSET;IF K<0 THEN K:=K+DVIBUFSIZE;
DBUFFER.B[K]:=DBUFFER.B[K]+10;MEM[P].HH.LH:=2;GOTO 40;END{:614};
1,2,8,13:GOTO 40;OTHERWISE END{:612}
ELSE CASE MSTATE+MEM[P].HH.LH OF 1:MSTATE:=6;2:MSTATE:=12;8,13:GOTO 45;
OTHERWISE END;P:=MEM[P].HH.RH;END;45:{:611};{610:}MEM[Q].HH.LH:=3;
IF ABS(W)>=8388608 THEN BEGIN BEGIN DBUFFER.B[DVIPTR]:=O+3;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;DVIFOUR(W);GOTO 10;
END;IF ABS(W)>=32768 THEN BEGIN BEGIN DBUFFER.B[DVIPTR]:=O+2;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
IF W<0 THEN W:=W+16777216;BEGIN DBUFFER.B[DVIPTR]:=W DIV 65536;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;W:=W MOD 65536;
GOTO 2;END;IF ABS(W)>=128 THEN BEGIN BEGIN DBUFFER.B[DVIPTR]:=O+1;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
IF W<0 THEN W:=W+65536;GOTO 2;END;BEGIN DBUFFER.B[DVIPTR]:=O;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
IF W<0 THEN W:=W+256;GOTO 1;2:BEGIN DBUFFER.B[DVIPTR]:=W DIV 256;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
1:BEGIN DBUFFER.B[DVIPTR]:=W MOD 256;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;GOTO 10{:610};40:{609:}
MEM[Q].HH.LH:=MEM[P].HH.LH;
IF MEM[Q].HH.LH=1 THEN BEGIN BEGIN DBUFFER.B[DVIPTR]:=O+4;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
WHILE MEM[Q].HH.RH<>P DO BEGIN Q:=MEM[Q].HH.RH;
CASE MEM[Q].HH.LH OF 3:MEM[Q].HH.LH:=5;4:MEM[Q].HH.LH:=6;OTHERWISE END;
END;END ELSE BEGIN BEGIN DBUFFER.B[DVIPTR]:=O+9;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
WHILE MEM[Q].HH.RH<>P DO BEGIN Q:=MEM[Q].HH.RH;
CASE MEM[Q].HH.LH OF 3:MEM[Q].HH.LH:=4;5:MEM[Q].HH.LH:=6;OTHERWISE END;
END;END{:609};10:END;{:607}{615:}PROCEDURE PRUNEMOVEMENTS(L:INTEGER);
LABEL 30,10;VAR P:HALFWORD;
BEGIN WHILE DOWNPTR<>0 DO BEGIN IF MEM[DOWNPTR+2].INT<L THEN GOTO 30;
P:=DOWNPTR;DOWNPTR:=MEM[P].HH.RH;FREENODE(P,3);END;
30:WHILE RIGHTPTR<>0 DO BEGIN IF MEM[RIGHTPTR+2].INT<L THEN GOTO 10;
P:=RIGHTPTR;RIGHTPTR:=MEM[P].HH.RH;FREENODE(P,3);END;10:END;{:615}{618:}
PROCEDURE VLISTOUT;FORWARD;{:618}{619:}{1368:}
PROCEDURE SPECIALOUT(P:HALFWORD);VAR OLDSETTING:0..22;K:POOLPOINTER;
BEGIN IF CURH<>DVIH THEN BEGIN MOVEMENT(CURH-DVIH,143);DVIH:=CURH;END;
IF CURV<>DVIV THEN BEGIN MOVEMENT(CURV-DVIV,157);DVIV:=CURV;END;
OLDSETTING:=SELECTOR;SELECTOR:=21;
SHOWTOKENLIST(MEM[MEM[P+1].HH.RH].HH.RH,0,POOLSIZE-POOLPTR);
SELECTOR:=OLDSETTING;
BEGIN IF POOLPTR+1>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR);END;
IF(POOLPTR-STRSTART[STRPTR])<256 THEN BEGIN BEGIN DBUFFER.B[DVIPTR]:=239
;DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=(POOLPTR-STRSTART[STRPTR]);DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
END ELSE BEGIN BEGIN DBUFFER.B[DVIPTR]:=242;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;DVIFOUR((POOLPTR-STRSTART[STRPTR]));
END;
FOR K:=STRSTART[STRPTR]TO POOLPTR-1 DO BEGIN DBUFFER.B[DVIPTR]:=STRPOOL[
K];DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
POOLPTR:=STRSTART[STRPTR];END;{:1368}{1370:}
PROCEDURE WRITEOUT(P:HALFWORD);VAR OLDSETTING:0..22;OLDMODE:INTEGER;
J:SMALLNUMBER;Q,R:HALFWORD;BEGIN{1371:}Q:=GETAVAIL;MEM[Q].HH.LH:=637;
R:=GETAVAIL;MEM[Q].HH.RH:=R;MEM[R].HH.LH:=14617;BEGINTOKENLIST(Q,4);
BEGINTOKENLIST(MEM[P+1].HH.RH,16);Q:=GETAVAIL;MEM[Q].HH.LH:=379;
BEGINTOKENLIST(Q,4);OLDMODE:=CURLIST.MODEFIELD;CURLIST.MODEFIELD:=0;
CURCS:=WRITELOC;Q:=SCANTOKS(FALSE,TRUE);GETTOKEN;
IF CURTOK<>14617 THEN{1372:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1307);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=1308;HELPLINE[0]:=1021;END;ERROR;REPEAT GETTOKEN;
UNTIL CURTOK=14617;END{:1372};CURLIST.MODEFIELD:=OLDMODE;
ENDTOKENLIST{:1371};OLDSETTING:=SELECTOR;J:=MEM[P+1].HH.LH;
IF WRITEOPEN[J]THEN SELECTOR:=J ELSE BEGIN IF(J=17)AND(SELECTOR=19)THEN
SELECTOR:=18;PRINTNL(339);END;TOKENSHOW(DEFREF);PRINTLN;
FLUSHLIST(DEFREF);SELECTOR:=OLDSETTING;END;{:1370}{1373:}
PROCEDURE OUTWHAT(P:HALFWORD);VAR J:SMALLNUMBER;
BEGIN CASE MEM[P].HH.B1 OF 0,1,2:{1374:}
IF NOT DOINGLEADERS THEN BEGIN J:=MEM[P+1].HH.LH;
IF MEM[P].HH.B1=1 THEN WRITEOUT(P)ELSE BEGIN IF WRITEOPEN[J]THEN ACLOSE(
WRITEFILE[J]);
IF MEM[P].HH.B1=2 THEN WRITEOPEN[J]:=FALSE ELSE IF J<16 THEN BEGIN
CURNAME:=MEM[P+1].HH.RH;CURAREA:=MEM[P+2].HH.LH;CUREXT:=MEM[P+2].HH.RH;
IF CUREXT=339 THEN CUREXT:=798;PACKFILENAME(CURNAME,CURAREA,CUREXT);
WHILE NOT AOPENOUT(WRITEFILE[J])DO PROMPTFILENAME(1310,798);
WRITEOPEN[J]:=TRUE;END;END;END{:1374};3:SPECIALOUT(P);4:;
OTHERWISE CONFUSION(1309)END;END;{:1373}{1433:}
FUNCTION DOGLUE(THISBOX,P:HALFWORD):SCALED;LABEL 22,15,30;
VAR Q:HALFWORD;GORDER:GLUEORD;GSIGN:0..2;S:SCALED;GLUETEMP:DOUBLE;
BEGIN GORDER:=MEM[THISBOX+5].HH.B1;GSIGN:=MEM[THISBOX+5].HH.B0;S:=0;
IF GSIGN=1 THEN BEGIN IF MEM[G].HH.B0=GORDER THEN S:=S+MEM[G+2].INT;
END ELSE BEGIN IF MEM[G].HH.B1=GORDER THEN S:=S-MEM[G+3].INT;END;
IF NOT(ETEXMODE=1)OR(MEM[P].HH.B1>=100)THEN GOTO 30;Q:=P;
22:MEM[Q].HH.B0:=11;MEM[Q+1].INT:=MEM[G+1].INT;
BEGIN IF MEM[G].HH.RH=0 THEN FREENODE(G,4)ELSE MEM[G].HH.RH:=MEM[G].HH.
RH-1;END;15:Q:=MEM[Q].HH.RH;
IF(Q<>0)AND NOT(Q>=HIMEMMIN)THEN CASE MEM[Q].HH.B0 OF 3,4,5,11,12:GOTO
15;10:IF MEM[Q].HH.B1<100 THEN BEGIN G:=MEM[Q+1].HH.LH;
IF GSIGN=1 THEN BEGIN IF MEM[G].HH.B0=GORDER THEN S:=S+MEM[G+2].INT;
END ELSE BEGIN IF MEM[G].HH.B1=GORDER THEN S:=S-MEM[G+3].INT;END;
GOTO 22;END;OTHERWISE END;
30:IF S<>0 THEN BEGIN GLUETEMP:=DBLE(MEM[THISBOX+6].GR)*S;
IF GLUETEMP>1000000000.0D0 THEN GLUETEMP:=1000000000.0D0 ELSE IF
GLUETEMP<-1000000000.0D0 THEN GLUETEMP:=-1000000000.0D0;
S:=ROUND(GLUETEMP);IF MEM[P].HH.B0=11 THEN MEM[P+1].INT:=MEM[P+1].INT+S;
END;DOGLUE:=S;END;{:1433}{1452:}FUNCTION NEWEDGE(S:SMALLNUMBER;
W:SCALED):HALFWORD;VAR P:HALFWORD;BEGIN P:=GETNODE(3);MEM[P].HH.B0:=14;
MEM[P].HH.B1:=S;MEM[P+1].INT:=W;MEM[P+2].INT:=0;NEWEDGE:=P;END;{:1452}
{1456:}FUNCTION REVERSE(THISBOX,T:HALFWORD):HALFWORD;LABEL 21,15,30;
VAR L:HALFWORD;P:HALFWORD;Q:HALFWORD;GSIGN:0..2;M,N:HALFWORD;
BEGIN GSIGN:=MEM[THISBOX+5].HH.B0;L:=T;P:=TEMPPTR;M:=0;N:=0;
WHILE TRUE DO BEGIN WHILE P<>0 DO{1457:}
21:IF(P>=HIMEMMIN)THEN REPEAT F:=MEM[P].HH.B0;C:=MEM[P].HH.B1;
CURH:=CURH+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+C].QQQQ.B0].INT;
Q:=MEM[P].HH.RH;MEM[P].HH.RH:=L;L:=P;P:=Q;
UNTIL NOT(P>=HIMEMMIN)ELSE{1458:}BEGIN Q:=MEM[P].HH.RH;
CASE MEM[P].HH.B0 OF 0,1,2,11:RULEWD:=MEM[P+1].INT;{1459:}
10:BEGIN G:=MEM[P+1].HH.LH;RULEWD:=MEM[G+1].INT;
IF GSIGN<>0 THEN RULEWD:=RULEWD+DOGLUE(THISBOX,P);
IF MEM[P].HH.B1>=100 THEN BEGIN TEMPPTR:=MEM[P+1].HH.RH;
IF MEM[TEMPPTR].HH.B0=2 THEN BEGIN DELETEGLUEREF(G);FREENODE(P,2);
P:=TEMPPTR;MEM[P+1].INT:=RULEWD;END;END;END;{:1459}{1460:}
6:BEGIN FLUSHNODELIST(MEM[P+1].HH.RH);TEMPPTR:=P;P:=GETAVAIL;
MEM[P]:=MEM[TEMPPTR+1];MEM[P].HH.RH:=Q;FREENODE(TEMPPTR,2);GOTO 21;END;
{:1460}{1461:}9:BEGIN RULEWD:=MEM[P+1].INT;
IF ODD(MEM[P].HH.B1)THEN IF MEM[LRPTR].HH.LH<>(4*(MEM[P].HH.B1 DIV 4)+3)
THEN BEGIN MEM[P].HH.B0:=11;LRPROBLEMS:=LRPROBLEMS+1;
END ELSE BEGIN BEGIN TEMPPTR:=LRPTR;LRPTR:=MEM[TEMPPTR].HH.RH;
BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;
END;IF N>0 THEN BEGIN N:=N-1;MEM[P].HH.B1:=MEM[P].HH.B1-1;
END ELSE BEGIN MEM[P].HH.B0:=11;IF M>0 THEN M:=M-1 ELSE{1462:}
BEGIN FREENODE(P,2);MEM[T].HH.RH:=Q;MEM[T+1].INT:=RULEWD;
MEM[T+2].INT:=-CURH-RULEWD;GOTO 30;END{:1462};END;
END ELSE BEGIN BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=(4*(MEM[P].HH.B1 DIV 4)+3);
MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;END;
IF(N>0)OR((MEM[P].HH.B1 DIV 8)<>CURDIR)THEN BEGIN N:=N+1;
MEM[P].HH.B1:=MEM[P].HH.B1+1;END ELSE BEGIN MEM[P].HH.B0:=11;M:=M+1;END;
END;END;{:1461}14:CONFUSION(1373);OTHERWISE GOTO 15 END;
CURH:=CURH+RULEWD;15:MEM[P].HH.RH:=L;
IF MEM[P].HH.B0=11 THEN IF(RULEWD=0)OR(L=0)THEN BEGIN FREENODE(P,2);
P:=L;END;L:=P;P:=Q;END{:1458}{:1457};
IF(T=0)AND(M=0)AND(N=0)THEN GOTO 30;P:=NEWMATH(0,MEM[LRPTR].HH.LH);
LRPROBLEMS:=LRPROBLEMS+10000;END;30:REVERSE:=L;END;{:1456}
PROCEDURE HLISTOUT;LABEL 21,13,14,15;VAR BASELINE:SCALED;
LEFTEDGE:SCALED;SAVEH,SAVEV:SCALED;THISBOX:HALFWORD;GSIGN:0..2;
P:HALFWORD;SAVELOC:INTEGER;LEADERBOX:HALFWORD;LEADERWD:SCALED;LX:SCALED;
OUTERDOINGLEADERS:BOOLEAN;EDGE:SCALED;PREVP:HALFWORD;
BEGIN THISBOX:=TEMPPTR;GSIGN:=MEM[THISBOX+5].HH.B0;
P:=MEM[THISBOX+5].HH.RH;CURS:=CURS+1;
IF CURS>0 THEN BEGIN DBUFFER.B[DVIPTR]:=141;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;IF CURS>MAXPUSH THEN MAXPUSH:=CURS;
SAVELOC:=DVIOFFSET+DVIPTR;BASELINE:=CURV;PREVP:=THISBOX+5;
IF(ETEXMODE=1)THEN BEGIN{1446:}BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=0;MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;
END{:1446};
IF MEM[THISBOX].HH.B1=2 THEN IF CURDIR=1 THEN BEGIN CURDIR:=0;
CURH:=CURH-MEM[THISBOX+1].INT;END ELSE MEM[THISBOX].HH.B1:=0;
IF(CURDIR=1)AND(MEM[THISBOX].HH.B1<>1)THEN{1454:}BEGIN SAVEH:=CURH;
TEMPPTR:=P;P:=NEWKERN(0);MEM[PREVP].HH.RH:=P;CURH:=0;
MEM[P].HH.RH:=REVERSE(THISBOX,0);MEM[P+1].INT:=-CURH;CURH:=SAVEH;
MEM[THISBOX].HH.B1:=1;END{:1454};END;LEFTEDGE:=CURH;WHILE P<>0 DO{620:}
21:IF(P>=HIMEMMIN)THEN BEGIN IF CURH<>DVIH THEN BEGIN MOVEMENT(CURH-DVIH
,143);DVIH:=CURH;END;IF CURV<>DVIV THEN BEGIN MOVEMENT(CURV-DVIV,157);
DVIV:=CURV;END;REPEAT F:=MEM[P].HH.B0;C:=MEM[P].HH.B1;
IF F<>DVIF THEN{621:}BEGIN IF NOT FONTUSED[F]THEN BEGIN DVIFONTDEF(F);
FONTUSED[F]:=TRUE;END;IF F<=64 THEN BEGIN DBUFFER.B[DVIPTR]:=F+170;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;
END ELSE BEGIN BEGIN DBUFFER.B[DVIPTR]:=235;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;BEGIN DBUFFER.B[DVIPTR]:=F-1;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;END;DVIF:=F;
END{:621};IF C>=128 THEN BEGIN DBUFFER.B[DVIPTR]:=128;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;BEGIN DBUFFER.B[DVIPTR]:=C;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
CURH:=CURH+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+C].QQQQ.B0].INT;
PREVP:=MEM[PREVP].HH.RH;P:=MEM[P].HH.RH;UNTIL NOT(P>=HIMEMMIN);
DVIH:=CURH;END ELSE{622:}BEGIN CASE MEM[P].HH.B0 OF 0,1:{623:}
IF MEM[P+5].HH.RH=0 THEN CURH:=CURH+MEM[P+1].INT ELSE BEGIN SAVEH:=DVIH;
SAVEV:=DVIV;CURV:=BASELINE+MEM[P+4].INT;TEMPPTR:=P;
EDGE:=CURH+MEM[P+1].INT;IF CURDIR=1 THEN CURH:=EDGE;
IF MEM[P].HH.B0=1 THEN VLISTOUT ELSE HLISTOUT;DVIH:=SAVEH;DVIV:=SAVEV;
CURH:=EDGE;CURV:=BASELINE;END{:623};2:BEGIN RULEHT:=MEM[P+3].INT;
RULEDP:=MEM[P+2].INT;RULEWD:=MEM[P+1].INT;GOTO 14;END;8:{1367:}
OUTWHAT(P){:1367};10:{625:}BEGIN G:=MEM[P+1].HH.LH;RULEWD:=MEM[G+1].INT;
IF GSIGN<>0 THEN RULEWD:=RULEWD+DOGLUE(THISBOX,P);
IF MEM[P].HH.B1>=100 THEN{626:}BEGIN LEADERBOX:=MEM[P+1].HH.RH;
IF MEM[LEADERBOX].HH.B0=2 THEN BEGIN RULEHT:=MEM[LEADERBOX+3].INT;
RULEDP:=MEM[LEADERBOX+2].INT;GOTO 14;END;LEADERWD:=MEM[LEADERBOX+1].INT;
IF(LEADERWD>0)AND(RULEWD>0)THEN BEGIN RULEWD:=RULEWD+10;
IF CURDIR=1 THEN CURH:=CURH-10;EDGE:=CURH+RULEWD;LX:=0;{627:}
IF MEM[P].HH.B1=100 THEN BEGIN SAVEH:=CURH;
CURH:=LEFTEDGE+LEADERWD*((CURH-LEFTEDGE)DIV LEADERWD);
IF CURH<SAVEH THEN CURH:=CURH+LEADERWD;
END ELSE BEGIN LQ:=RULEWD DIV LEADERWD;LR:=RULEWD MOD LEADERWD;
IF MEM[P].HH.B1=101 THEN CURH:=CURH+(LR DIV 2)ELSE BEGIN LX:=(2*LR+LQ+1)
DIV(2*LQ+2);CURH:=CURH+((LR-(LQ-1)*LX)DIV 2);END;END{:627};
WHILE CURH+LEADERWD<=EDGE DO{628:}
BEGIN CURV:=BASELINE+MEM[LEADERBOX+4].INT;
IF CURV<>DVIV THEN BEGIN MOVEMENT(CURV-DVIV,157);DVIV:=CURV;END;
SAVEV:=DVIV;IF CURH<>DVIH THEN BEGIN MOVEMENT(CURH-DVIH,143);DVIH:=CURH;
END;SAVEH:=DVIH;TEMPPTR:=LEADERBOX;IF CURDIR=1 THEN CURH:=CURH+LEADERWD;
OUTERDOINGLEADERS:=DOINGLEADERS;DOINGLEADERS:=TRUE;
IF MEM[LEADERBOX].HH.B0=1 THEN VLISTOUT ELSE HLISTOUT;
DOINGLEADERS:=OUTERDOINGLEADERS;DVIV:=SAVEV;DVIH:=SAVEH;CURV:=BASELINE;
CURH:=SAVEH+LEADERWD+LX;END{:628};
IF CURDIR=1 THEN CURH:=EDGE ELSE CURH:=EDGE-10;GOTO 15;END;END{:626};
GOTO 13;END{:625};11:CURH:=CURH+MEM[P+1].INT;
9:BEGIN IF(ETEXMODE=1)THEN{1450:}
BEGIN IF ODD(MEM[P].HH.B1)THEN IF MEM[LRPTR].HH.LH=(4*(MEM[P].HH.B1 DIV
4)+3)THEN BEGIN TEMPPTR:=LRPTR;LRPTR:=MEM[TEMPPTR].HH.RH;
BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;
END ELSE BEGIN IF MEM[P].HH.B1>4 THEN LRPROBLEMS:=LRPROBLEMS+1;
END ELSE BEGIN BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=(4*(MEM[P].HH.B1 DIV 4)+3);
MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;END;
IF(MEM[P].HH.B1 DIV 8)<>CURDIR THEN{1455:}BEGIN SAVEH:=CURH;
TEMPPTR:=MEM[P].HH.RH;RULEWD:=MEM[P+1].INT;FREENODE(P,2);
CURDIR:=1-CURDIR;P:=NEWEDGE(CURDIR,RULEWD);MEM[PREVP].HH.RH:=P;
CURH:=CURH-LEFTEDGE+RULEWD;
MEM[P].HH.RH:=REVERSE(THISBOX,NEWEDGE(1-CURDIR,0));MEM[P+2].INT:=CURH;
CURDIR:=1-CURDIR;CURH:=SAVEH;GOTO 21;END{:1455};END;MEM[P].HH.B0:=11;
END{:1450};CURH:=CURH+MEM[P+1].INT;END;6:{652:}
BEGIN MEM[327132]:=MEM[P+1];MEM[327132].HH.RH:=MEM[P].HH.RH;P:=327132;
GOTO 21;END{:652};{1453:}14:BEGIN CURH:=CURH+MEM[P+1].INT;
LEFTEDGE:=CURH+MEM[P+2].INT;CURDIR:=MEM[P].HH.B1;END;{:1453}
OTHERWISE END;GOTO 15;14:{624:}
IF(RULEHT=-1073741824)THEN RULEHT:=MEM[THISBOX+3].INT;
IF(RULEDP=-1073741824)THEN RULEDP:=MEM[THISBOX+2].INT;
RULEHT:=RULEHT+RULEDP;
IF(RULEHT>0)AND(RULEWD>0)THEN BEGIN IF CURH<>DVIH THEN BEGIN MOVEMENT(
CURH-DVIH,143);DVIH:=CURH;END;CURV:=BASELINE+RULEDP;
IF CURV<>DVIV THEN BEGIN MOVEMENT(CURV-DVIV,157);DVIV:=CURV;END;
BEGIN DBUFFER.B[DVIPTR]:=132;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;DVIFOUR(RULEHT);DVIFOUR(RULEWD);
CURV:=BASELINE;DVIH:=DVIH+RULEWD;END{:624};13:CURH:=CURH+RULEWD;
15:PREVP:=P;P:=MEM[P].HH.RH;END{:622}{:620};
IF(ETEXMODE=1)THEN BEGIN{1451:}
BEGIN WHILE MEM[LRPTR].HH.LH<>0 DO BEGIN IF MEM[LRPTR].HH.LH>4 THEN
LRPROBLEMS:=LRPROBLEMS+10000;BEGIN TEMPPTR:=LRPTR;
LRPTR:=MEM[TEMPPTR].HH.RH;BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;
AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;END;END;BEGIN TEMPPTR:=LRPTR;
LRPTR:=MEM[TEMPPTR].HH.RH;BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;
AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;END;END{:1451};
IF MEM[THISBOX].HH.B1=2 THEN CURDIR:=1;END;PRUNEMOVEMENTS(SAVELOC);
IF CURS>0 THEN DVIPOP(SAVELOC);CURS:=CURS-1;END;{:619}{629:}
PROCEDURE VLISTOUT;LABEL 13,14,15;VAR LEFTEDGE:SCALED;TOPEDGE:SCALED;
SAVEH,SAVEV:SCALED;THISBOX:HALFWORD;GSIGN:0..2;P:HALFWORD;
SAVELOC:INTEGER;LEADERBOX:HALFWORD;LEADERHT:SCALED;LX:SCALED;
OUTERDOINGLEADERS:BOOLEAN;EDGE:SCALED;BEGIN THISBOX:=TEMPPTR;
GSIGN:=MEM[THISBOX+5].HH.B0;P:=MEM[THISBOX+5].HH.RH;CURS:=CURS+1;
IF CURS>0 THEN BEGIN DBUFFER.B[DVIPTR]:=141;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;IF CURS>MAXPUSH THEN MAXPUSH:=CURS;
SAVELOC:=DVIOFFSET+DVIPTR;LEFTEDGE:=CURH;CURV:=CURV-MEM[THISBOX+3].INT;
TOPEDGE:=CURV;WHILE P<>0 DO{630:}
BEGIN IF(P>=HIMEMMIN)THEN CONFUSION(835)ELSE{631:}
BEGIN CASE MEM[P].HH.B0 OF 0,1:{632:}
IF MEM[P+5].HH.RH=0 THEN CURV:=CURV+MEM[P+3].INT+MEM[P+2].INT ELSE BEGIN
CURV:=CURV+MEM[P+3].INT;
IF CURV<>DVIV THEN BEGIN MOVEMENT(CURV-DVIV,157);DVIV:=CURV;END;
SAVEH:=DVIH;SAVEV:=DVIV;
IF CURDIR=1 THEN CURH:=LEFTEDGE-MEM[P+4].INT ELSE CURH:=LEFTEDGE+MEM[P+4
].INT;TEMPPTR:=P;IF MEM[P].HH.B0=1 THEN VLISTOUT ELSE HLISTOUT;
DVIH:=SAVEH;DVIV:=SAVEV;CURV:=SAVEV+MEM[P+2].INT;CURH:=LEFTEDGE;
END{:632};2:BEGIN RULEHT:=MEM[P+3].INT;RULEDP:=MEM[P+2].INT;
RULEWD:=MEM[P+1].INT;GOTO 14;END;8:{1366:}OUTWHAT(P){:1366};10:{634:}
BEGIN G:=MEM[P+1].HH.LH;RULEHT:=MEM[G+1].INT;
IF GSIGN<>0 THEN RULEHT:=RULEHT+DOGLUE(THISBOX,P);
IF MEM[P].HH.B1>=100 THEN{635:}BEGIN LEADERBOX:=MEM[P+1].HH.RH;
IF MEM[LEADERBOX].HH.B0=2 THEN BEGIN RULEWD:=MEM[LEADERBOX+1].INT;
RULEDP:=0;GOTO 14;END;
LEADERHT:=MEM[LEADERBOX+3].INT+MEM[LEADERBOX+2].INT;
IF(LEADERHT>0)AND(RULEHT>0)THEN BEGIN RULEHT:=RULEHT+10;
EDGE:=CURV+RULEHT;LX:=0;{636:}
IF MEM[P].HH.B1=100 THEN BEGIN SAVEV:=CURV;
CURV:=TOPEDGE+LEADERHT*((CURV-TOPEDGE)DIV LEADERHT);
IF CURV<SAVEV THEN CURV:=CURV+LEADERHT;
END ELSE BEGIN LQ:=RULEHT DIV LEADERHT;LR:=RULEHT MOD LEADERHT;
IF MEM[P].HH.B1=101 THEN CURV:=CURV+(LR DIV 2)ELSE BEGIN LX:=(2*LR+LQ+1)
DIV(2*LQ+2);CURV:=CURV+((LR-(LQ-1)*LX)DIV 2);END;END{:636};
WHILE CURV+LEADERHT<=EDGE DO{637:}
BEGIN IF CURDIR=1 THEN CURH:=LEFTEDGE-MEM[LEADERBOX+4].INT ELSE CURH:=
LEFTEDGE+MEM[LEADERBOX+4].INT;
IF CURH<>DVIH THEN BEGIN MOVEMENT(CURH-DVIH,143);DVIH:=CURH;END;
SAVEH:=DVIH;CURV:=CURV+MEM[LEADERBOX+3].INT;
IF CURV<>DVIV THEN BEGIN MOVEMENT(CURV-DVIV,157);DVIV:=CURV;END;
SAVEV:=DVIV;TEMPPTR:=LEADERBOX;OUTERDOINGLEADERS:=DOINGLEADERS;
DOINGLEADERS:=TRUE;
IF MEM[LEADERBOX].HH.B0=1 THEN VLISTOUT ELSE HLISTOUT;
DOINGLEADERS:=OUTERDOINGLEADERS;DVIV:=SAVEV;DVIH:=SAVEH;CURH:=LEFTEDGE;
CURV:=SAVEV-MEM[LEADERBOX+3].INT+LEADERHT+LX;END{:637};CURV:=EDGE-10;
GOTO 15;END;END{:635};GOTO 13;END{:634};11:CURV:=CURV+MEM[P+1].INT;
OTHERWISE END;GOTO 15;14:{633:}
IF(RULEWD=-1073741824)THEN RULEWD:=MEM[THISBOX+1].INT;
RULEHT:=RULEHT+RULEDP;CURV:=CURV+RULEHT;
IF(RULEHT>0)AND(RULEWD>0)THEN BEGIN IF CURDIR=1 THEN CURH:=CURH-RULEWD;
IF CURH<>DVIH THEN BEGIN MOVEMENT(CURH-DVIH,143);DVIH:=CURH;END;
IF CURV<>DVIV THEN BEGIN MOVEMENT(CURV-DVIV,157);DVIV:=CURV;END;
BEGIN DBUFFER.B[DVIPTR]:=137;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;DVIFOUR(RULEHT);DVIFOUR(RULEWD);
CURH:=LEFTEDGE;END;GOTO 15{:633};13:CURV:=CURV+RULEHT;END{:631};
15:P:=MEM[P].HH.RH;END{:630};PRUNEMOVEMENTS(SAVELOC);
IF CURS>0 THEN DVIPOP(SAVELOC);CURS:=CURS-1;END;{:629}{638:}
PROCEDURE SHIPOUT(P:HALFWORD);LABEL 30;VAR PAGELOC:INTEGER;J,K:0..9;
S:POOLPOINTER;OLDSETTING:0..22;
BEGIN IF EQTB[13202].INT>0 THEN BEGIN PRINTNL(339);PRINTLN;PRINT(836);
END;IF TERMOFFSET>MAXPRINTLINE-9 THEN PRINTLN ELSE IF(TERMOFFSET>0)OR(
FILEOFFSET>0)THEN PRINTCHAR(32);PRINTCHAR(91);J:=9;
WHILE(EQTB[13233+J].INT=0)AND(J>0)DO J:=J-1;
FOR K:=0 TO J DO BEGIN PRINTINT(EQTB[13233+K].INT);
IF K<J THEN PRINTCHAR(46);END;IF ODD(SELECTOR)THEN WRITELN(TERMOUT);
IF EQTB[13202].INT>0 THEN BEGIN PRINTCHAR(93);BEGINDIAGNOSTIC;
SHOWBOX(P);ENDDIAGNOSTIC(TRUE);END;{640:}{641:}
IF(MEM[P+3].INT>1073741823)OR(MEM[P+2].INT>1073741823)OR(MEM[P+3].INT+
MEM[P+2].INT+EQTB[13764].INT>1073741823)OR(MEM[P+1].INT+EQTB[13763].INT>
1073741823)THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(840);END;
BEGIN HELPPTR:=2;HELPLINE[1]:=841;HELPLINE[0]:=842;END;ERROR;
IF EQTB[13202].INT<=0 THEN BEGIN BEGINDIAGNOSTIC;PRINTNL(843);
SHOWBOX(P);ENDDIAGNOSTIC(TRUE);END;GOTO 30;END;
IF MEM[P+3].INT+MEM[P+2].INT+EQTB[13764].INT>MAXV THEN MAXV:=MEM[P+3].
INT+MEM[P+2].INT+EQTB[13764].INT;
IF MEM[P+1].INT+EQTB[13763].INT>MAXH THEN MAXH:=MEM[P+1].INT+EQTB[13763]
.INT{:641};{617:}DVIH:=0;DVIV:=0;CURH:=EQTB[13763].INT;DVIF:=0;
IF OUTPUTFILENAME=0 THEN BEGIN IF JOBNAME=0 THEN OPENLOGFILE;
PACKJOBNAME(801);
IF PACKDEFAULTNAME(DVIQUAL,DVIFNAME,DVIFLEN)THEN BEGIN WHILE NOT
BOPENOUT(DVIFILE)DO PROMPTFILENAME(802,801);
OUTPUTFILENAME:=BMAKENAMESTRING(DVIFILE);END ELSE OUTPUTFILENAME:=46;
CLEARDEFAULTNAME;END;
IF TOTALPAGES=0 THEN BEGIN BEGIN DBUFFER.B[DVIPTR]:=247;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=2;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;DVIFOUR(25400000);
DVIFOUR(473628672);PREPAREMAG;DVIFOUR(EQTB[13185].INT);
OLDSETTING:=SELECTOR;SELECTOR:=21;PRINT(834);PRINTINT(EQTB[13191].INT);
PRINTCHAR(46);PRINTTWO(EQTB[13190].INT);PRINTCHAR(46);
PRINTTWO(EQTB[13189].INT);PRINTCHAR(58);
PRINTTWO(EQTB[13188].INT DIV 60);PRINTTWO(EQTB[13188].INT MOD 60);
SELECTOR:=OLDSETTING;
BEGIN DBUFFER.B[DVIPTR]:=(POOLPTR-STRSTART[STRPTR]);DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
FOR S:=STRSTART[STRPTR]TO POOLPTR-1 DO BEGIN DBUFFER.B[DVIPTR]:=STRPOOL[
S];DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;
POOLPTR:=STRSTART[STRPTR];END{:617};PAGELOC:=DVIOFFSET+DVIPTR;
BEGIN DBUFFER.B[DVIPTR]:=139;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
FOR K:=0 TO 9 DO DVIFOUR(EQTB[13233+K].INT);DVIFOUR(LASTBOP);
LASTBOP:=PAGELOC;CURV:=MEM[P+3].INT+EQTB[13764].INT;TEMPPTR:=P;
IF MEM[P].HH.B0=1 THEN VLISTOUT ELSE HLISTOUT;
BEGIN DBUFFER.B[DVIPTR]:=140;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;TOTALPAGES:=TOTALPAGES+1;CURS:=-1;
30:{:640};IF(ETEXMODE=1)THEN{1463:}
BEGIN IF LRPROBLEMS>0 THEN BEGIN{1449:}BEGIN PRINTLN;PRINTNL(1370);
PRINTINT(LRPROBLEMS DIV 10000);PRINT(1371);
PRINTINT(LRPROBLEMS MOD 10000);PRINT(1372);LRPROBLEMS:=0;END{:1449};
PRINTCHAR(41);PRINTLN;END;IF(LRPTR<>0)OR(CURDIR<>0)THEN CONFUSION(1374);
END{:1463};IF EQTB[13202].INT<=0 THEN PRINTCHAR(93);DEADCYCLES:=0;
IF ODD(SELECTOR)THEN WRITELN(TERMOUT);{639:}
IF EQTB[13199].INT>1 THEN BEGIN PRINTNL(837);PRINTINT(VARUSED);
PRINTCHAR(38);PRINTINT(DYNUSED);PRINTCHAR(59);END;FLUSHNODELIST(P);
IF EQTB[13199].INT>1 THEN BEGIN PRINT(838);PRINTINT(VARUSED);
PRINTCHAR(38);PRINTINT(DYNUSED);PRINT(839);
PRINTINT(HIMEMMIN-LOMEMMAX-1);PRINTLN;END;{:639};END;{:638}{645:}
PROCEDURE SCANSPEC(C:GROUPCODE;THREECODES:BOOLEAN);LABEL 40;
VAR S:INTEGER;SPECCODE:0..1;
BEGIN IF THREECODES THEN S:=SAVESTACK[SAVEPTR+0].INT;
IF SCANKEYWORD(850)THEN SPECCODE:=0 ELSE IF SCANKEYWORD(851)THEN
SPECCODE:=1 ELSE BEGIN SPECCODE:=1;CURVAL:=0;GOTO 40;END;
SCANDIMEN(FALSE,FALSE,FALSE);
40:IF THREECODES THEN BEGIN SAVESTACK[SAVEPTR+0].INT:=S;
SAVEPTR:=SAVEPTR+1;END;SAVESTACK[SAVEPTR+0].INT:=SPECCODE;
SAVESTACK[SAVEPTR+1].INT:=CURVAL;SAVEPTR:=SAVEPTR+2;NEWSAVELEVEL(C);
SCANLEFTBRACE;END;{:645}{649:}FUNCTION HPACK(P:HALFWORD;W:SCALED;
M:SMALLNUMBER):HALFWORD;LABEL 21,50,10;VAR R:HALFWORD;Q:HALFWORD;
H,D,X:SCALED;S:SCALED;G:HALFWORD;O:GLUEORD;F:INTERNALFONTNUMBER;
I:FOURQUARTERS;HD:EIGHTBITS;BEGIN LASTBADNESS:=0;R:=GETNODE(7);
MEM[R].HH.B0:=0;MEM[R].HH.B1:=0;MEM[R+4].INT:=0;Q:=R+5;MEM[Q].HH.RH:=P;
H:=0;{650:}D:=0;X:=0;TOTALSTRETCH[0]:=0;TOTALSHRINK[0]:=0;
TOTALSTRETCH[1]:=0;TOTALSHRINK[1]:=0;TOTALSTRETCH[2]:=0;
TOTALSHRINK[2]:=0;TOTALSTRETCH[3]:=0;TOTALSHRINK[3]:=0{:650};
IF(EQTB[13232].INT>0)THEN{1446:}BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=0;MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;
END{:1446};WHILE P<>0 DO{651:}BEGIN 21:WHILE(P>=HIMEMMIN)DO{654:}
BEGIN F:=MEM[P].HH.B0;I:=FONTINFO[CHARBASE[F]+MEM[P].HH.B1].QQQQ;
HD:=I.B1;X:=X+FONTINFO[WIDTHBASE[F]+I.B0].INT;
S:=FONTINFO[HEIGHTBASE[F]+(HD)DIV 16].INT;IF S>H THEN H:=S;
S:=FONTINFO[DEPTHBASE[F]+(HD)MOD 16].INT;IF S>D THEN D:=S;
P:=MEM[P].HH.RH;END{:654};
IF P<>0 THEN BEGIN CASE MEM[P].HH.B0 OF 0,1,2,13:{653:}
BEGIN X:=X+MEM[P+1].INT;
IF MEM[P].HH.B0>=2 THEN S:=0 ELSE S:=MEM[P+4].INT;
IF MEM[P+3].INT-S>H THEN H:=MEM[P+3].INT-S;
IF MEM[P+2].INT+S>D THEN D:=MEM[P+2].INT+S;END{:653};
3,4,5:IF ADJUSTTAIL<>0 THEN{655:}
BEGIN WHILE MEM[Q].HH.RH<>P DO Q:=MEM[Q].HH.RH;
IF MEM[P].HH.B0=5 THEN BEGIN MEM[ADJUSTTAIL].HH.RH:=MEM[P+1].INT;
WHILE MEM[ADJUSTTAIL].HH.RH<>0 DO ADJUSTTAIL:=MEM[ADJUSTTAIL].HH.RH;
P:=MEM[P].HH.RH;FREENODE(MEM[Q].HH.RH,2);
END ELSE BEGIN MEM[ADJUSTTAIL].HH.RH:=P;ADJUSTTAIL:=P;P:=MEM[P].HH.RH;
END;MEM[Q].HH.RH:=P;P:=Q;END{:655};8:{1360:}{:1360};10:{656:}
BEGIN G:=MEM[P+1].HH.LH;X:=X+MEM[G+1].INT;O:=MEM[G].HH.B0;
TOTALSTRETCH[O]:=TOTALSTRETCH[O]+MEM[G+2].INT;O:=MEM[G].HH.B1;
TOTALSHRINK[O]:=TOTALSHRINK[O]+MEM[G+3].INT;
IF MEM[P].HH.B1>=100 THEN BEGIN G:=MEM[P+1].HH.RH;
IF MEM[G+3].INT>H THEN H:=MEM[G+3].INT;
IF MEM[G+2].INT>D THEN D:=MEM[G+2].INT;END;END{:656};
11:X:=X+MEM[P+1].INT;9:BEGIN X:=X+MEM[P+1].INT;
IF(EQTB[13232].INT>0)THEN{1447:}
IF ODD(MEM[P].HH.B1)THEN IF MEM[LRPTR].HH.LH=(4*(MEM[P].HH.B1 DIV 4)+3)
THEN BEGIN TEMPPTR:=LRPTR;LRPTR:=MEM[TEMPPTR].HH.RH;
BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;
END ELSE BEGIN LRPROBLEMS:=LRPROBLEMS+1;MEM[P].HH.B0:=11;
MEM[P].HH.B1:=1;END ELSE BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=(4*(MEM[P].HH.B1 DIV 4)+3);
MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;END{:1447};END;6:{652:}
BEGIN MEM[327132]:=MEM[P+1];MEM[327132].HH.RH:=MEM[P].HH.RH;P:=327132;
GOTO 21;END{:652};OTHERWISE END;P:=MEM[P].HH.RH;END;END{:651};
IF ADJUSTTAIL<>0 THEN MEM[ADJUSTTAIL].HH.RH:=0;MEM[R+3].INT:=H;
MEM[R+2].INT:=D;{657:}IF M=1 THEN W:=X+W;MEM[R+1].INT:=W;X:=W-X;
IF X=0 THEN BEGIN MEM[R+5].HH.B0:=0;MEM[R+5].HH.B1:=0;MEM[R+6].GR:=0.0;
GOTO 10;END ELSE IF X>0 THEN{658:}BEGIN{659:}
IF TOTALSTRETCH[3]<>0 THEN O:=3 ELSE IF TOTALSTRETCH[2]<>0 THEN O:=2
ELSE IF TOTALSTRETCH[1]<>0 THEN O:=1 ELSE O:=0{:659};MEM[R+5].HH.B1:=O;
MEM[R+5].HH.B0:=1;
IF TOTALSTRETCH[O]<>0 THEN MEM[R+6].GR:=SNGL(1.0D0*X/TOTALSTRETCH[O])
ELSE BEGIN MEM[R+5].HH.B0:=0;MEM[R+6].GR:=0.0;END;
IF O=0 THEN IF MEM[R+5].HH.RH<>0 THEN{660:}
BEGIN LASTBADNESS:=BADNESS(X,TOTALSTRETCH[0]);
IF LASTBADNESS>EQTB[13194].INT THEN BEGIN PRINTLN;
IF LASTBADNESS>100 THEN PRINTNL(852)ELSE PRINTNL(853);PRINT(854);
PRINTINT(LASTBADNESS);GOTO 50;END;END{:660};GOTO 10;END{:658}ELSE{664:}
BEGIN{665:}
IF TOTALSHRINK[3]<>0 THEN O:=3 ELSE IF TOTALSHRINK[2]<>0 THEN O:=2 ELSE
IF TOTALSHRINK[1]<>0 THEN O:=1 ELSE O:=0{:665};MEM[R+5].HH.B1:=O;
MEM[R+5].HH.B0:=2;
IF TOTALSHRINK[O]<>0 THEN MEM[R+6].GR:=SNGL(1.0D0*(-X)/TOTALSHRINK[O])
ELSE BEGIN MEM[R+5].HH.B0:=0;MEM[R+6].GR:=0.0;END;
IF(TOTALSHRINK[O]<-X)AND(O=0)AND(MEM[R+5].HH.RH<>0)THEN BEGIN
LASTBADNESS:=1000000;MEM[R+6].GR:=1.0;{666:}
IF(-X-TOTALSHRINK[0]>EQTB[13753].INT)OR(EQTB[13194].INT<100)THEN BEGIN
IF(EQTB[13761].INT>0)AND(-X-TOTALSHRINK[0]>EQTB[13753].INT)THEN BEGIN
WHILE MEM[Q].HH.RH<>0 DO Q:=MEM[Q].HH.RH;MEM[Q].HH.RH:=NEWRULE;
MEM[MEM[Q].HH.RH+1].INT:=EQTB[13761].INT;END;PRINTLN;PRINTNL(860);
PRINTSCALED(-X-TOTALSHRINK[0]);PRINT(861);GOTO 50;END{:666};
END ELSE IF O=0 THEN IF MEM[R+5].HH.RH<>0 THEN{667:}
BEGIN LASTBADNESS:=BADNESS(-X,TOTALSHRINK[0]);
IF LASTBADNESS>EQTB[13194].INT THEN BEGIN PRINTLN;PRINTNL(862);
PRINTINT(LASTBADNESS);GOTO 50;END;END{:667};GOTO 10;END{:664}{:657};
50:{663:}
IF OUTPUTACTIVE THEN PRINT(855)ELSE BEGIN IF PACKBEGINLINE<>0 THEN BEGIN
IF PACKBEGINLINE>0 THEN PRINT(856)ELSE PRINT(857);
PRINTINT(ABS(PACKBEGINLINE));PRINT(858);END ELSE PRINT(859);
PRINTINT(LINE);END;PRINTLN;FONTINSHORTDISPLAY:=0;
SHORTDISPLAY(MEM[R+5].HH.RH);PRINTLN;BEGINDIAGNOSTIC;SHOWBOX(R);
ENDDIAGNOSTIC(TRUE){:663};10:IF(EQTB[13232].INT>0)THEN{1448:}
BEGIN IF MEM[LRPTR].HH.LH<>0 THEN BEGIN WHILE MEM[Q].HH.RH<>0 DO Q:=MEM[
Q].HH.RH;REPEAT TEMPPTR:=Q;Q:=NEWMATH(0,MEM[LRPTR].HH.LH);
MEM[TEMPPTR].HH.RH:=Q;LRPROBLEMS:=LRPROBLEMS+10000;BEGIN TEMPPTR:=LRPTR;
LRPTR:=MEM[TEMPPTR].HH.RH;BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;
AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;END;UNTIL MEM[LRPTR].HH.LH=0;END;
IF LRPROBLEMS>0 THEN BEGIN{1449:}BEGIN PRINTLN;PRINTNL(1370);
PRINTINT(LRPROBLEMS DIV 10000);PRINT(1371);
PRINTINT(LRPROBLEMS MOD 10000);PRINT(1372);LRPROBLEMS:=0;END{:1449};
GOTO 50;END;BEGIN TEMPPTR:=LRPTR;LRPTR:=MEM[TEMPPTR].HH.RH;
BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;
END;IF LRPTR<>0 THEN CONFUSION(1369);END{:1448};HPACK:=R;END;{:649}
{668:}FUNCTION VPACKAGE(P:HALFWORD;H:SCALED;M:SMALLNUMBER;
L:SCALED):HALFWORD;LABEL 50,10;VAR R:HALFWORD;W,D,X:SCALED;S:SCALED;
G:HALFWORD;O:GLUEORD;BEGIN LASTBADNESS:=0;R:=GETNODE(7);MEM[R].HH.B0:=1;
MEM[R].HH.B1:=0;MEM[R+4].INT:=0;MEM[R+5].HH.RH:=P;W:=0;{650:}D:=0;X:=0;
TOTALSTRETCH[0]:=0;TOTALSHRINK[0]:=0;TOTALSTRETCH[1]:=0;
TOTALSHRINK[1]:=0;TOTALSTRETCH[2]:=0;TOTALSHRINK[2]:=0;
TOTALSTRETCH[3]:=0;TOTALSHRINK[3]:=0{:650};WHILE P<>0 DO{669:}
BEGIN IF(P>=HIMEMMIN)THEN CONFUSION(863)ELSE CASE MEM[P].HH.B0 OF 0,1,2,
13:{670:}BEGIN X:=X+D+MEM[P+3].INT;D:=MEM[P+2].INT;
IF MEM[P].HH.B0>=2 THEN S:=0 ELSE S:=MEM[P+4].INT;
IF MEM[P+1].INT+S>W THEN W:=MEM[P+1].INT+S;END{:670};8:{1359:}{:1359};
10:{671:}BEGIN X:=X+D;D:=0;G:=MEM[P+1].HH.LH;X:=X+MEM[G+1].INT;
O:=MEM[G].HH.B0;TOTALSTRETCH[O]:=TOTALSTRETCH[O]+MEM[G+2].INT;
O:=MEM[G].HH.B1;TOTALSHRINK[O]:=TOTALSHRINK[O]+MEM[G+3].INT;
IF MEM[P].HH.B1>=100 THEN BEGIN G:=MEM[P+1].HH.RH;
IF MEM[G+1].INT>W THEN W:=MEM[G+1].INT;END;END{:671};
11:BEGIN X:=X+D+MEM[P+1].INT;D:=0;END;OTHERWISE END;P:=MEM[P].HH.RH;
END{:669};MEM[R+1].INT:=W;IF D>L THEN BEGIN X:=X+D-L;MEM[R+2].INT:=L;
END ELSE MEM[R+2].INT:=D;{672:}IF M=1 THEN H:=X+H;MEM[R+3].INT:=H;
X:=H-X;IF X=0 THEN BEGIN MEM[R+5].HH.B0:=0;MEM[R+5].HH.B1:=0;
MEM[R+6].GR:=0.0;GOTO 10;END ELSE IF X>0 THEN{673:}BEGIN{659:}
IF TOTALSTRETCH[3]<>0 THEN O:=3 ELSE IF TOTALSTRETCH[2]<>0 THEN O:=2
ELSE IF TOTALSTRETCH[1]<>0 THEN O:=1 ELSE O:=0{:659};MEM[R+5].HH.B1:=O;
MEM[R+5].HH.B0:=1;
IF TOTALSTRETCH[O]<>0 THEN MEM[R+6].GR:=SNGL(1.0D0*X/TOTALSTRETCH[O])
ELSE BEGIN MEM[R+5].HH.B0:=0;MEM[R+6].GR:=0.0;END;
IF O=0 THEN IF MEM[R+5].HH.RH<>0 THEN{674:}
BEGIN LASTBADNESS:=BADNESS(X,TOTALSTRETCH[0]);
IF LASTBADNESS>EQTB[13195].INT THEN BEGIN PRINTLN;
IF LASTBADNESS>100 THEN PRINTNL(852)ELSE PRINTNL(853);PRINT(864);
PRINTINT(LASTBADNESS);GOTO 50;END;END{:674};GOTO 10;END{:673}ELSE{676:}
BEGIN{665:}
IF TOTALSHRINK[3]<>0 THEN O:=3 ELSE IF TOTALSHRINK[2]<>0 THEN O:=2 ELSE
IF TOTALSHRINK[1]<>0 THEN O:=1 ELSE O:=0{:665};MEM[R+5].HH.B1:=O;
MEM[R+5].HH.B0:=2;
IF TOTALSHRINK[O]<>0 THEN MEM[R+6].GR:=SNGL(1.0D0*(-X)/TOTALSHRINK[O])
ELSE BEGIN MEM[R+5].HH.B0:=0;MEM[R+6].GR:=0.0;END;
IF(TOTALSHRINK[O]<-X)AND(O=0)AND(MEM[R+5].HH.RH<>0)THEN BEGIN
LASTBADNESS:=1000000;MEM[R+6].GR:=1.0;{677:}
IF(-X-TOTALSHRINK[0]>EQTB[13754].INT)OR(EQTB[13195].INT<100)THEN BEGIN
PRINTLN;PRINTNL(865);PRINTSCALED(-X-TOTALSHRINK[0]);PRINT(866);GOTO 50;
END{:677};END ELSE IF O=0 THEN IF MEM[R+5].HH.RH<>0 THEN{678:}
BEGIN LASTBADNESS:=BADNESS(-X,TOTALSHRINK[0]);
IF LASTBADNESS>EQTB[13195].INT THEN BEGIN PRINTLN;PRINTNL(867);
PRINTINT(LASTBADNESS);GOTO 50;END;END{:678};GOTO 10;END{:676}{:672};
50:{675:}
IF OUTPUTACTIVE THEN PRINT(855)ELSE BEGIN IF PACKBEGINLINE<>0 THEN BEGIN
PRINT(857);PRINTINT(ABS(PACKBEGINLINE));PRINT(858);END ELSE PRINT(859);
PRINTINT(LINE);PRINTLN;END;BEGINDIAGNOSTIC;SHOWBOX(R);
ENDDIAGNOSTIC(TRUE){:675};10:VPACKAGE:=R;END;{:668}{679:}
PROCEDURE APPENDTOVLIST(B:HALFWORD);VAR D:SCALED;P:HALFWORD;
BEGIN IF CURLIST.AUXFIELD.INT>-65536000 THEN BEGIN D:=MEM[EQTB[10783].HH
.RH+1].INT-CURLIST.AUXFIELD.INT-MEM[B+3].INT;
IF D<EQTB[13747].INT THEN P:=NEWPARAMGLUE(0)ELSE BEGIN P:=NEWSKIPPARAM(1
);MEM[TEMPPTR+1].INT:=D;END;MEM[CURLIST.TAILFIELD].HH.RH:=P;
CURLIST.TAILFIELD:=P;END;MEM[CURLIST.TAILFIELD].HH.RH:=B;
CURLIST.TAILFIELD:=B;CURLIST.AUXFIELD.INT:=MEM[B+2].INT;END;{:679}{686:}
FUNCTION NEWNOAD:HALFWORD;VAR P:HALFWORD;BEGIN P:=GETNODE(4);
MEM[P].HH.B0:=16;MEM[P].HH.B1:=0;MEM[P+1].HH:=EMPTYFIELD;
MEM[P+3].HH:=EMPTYFIELD;MEM[P+2].HH:=EMPTYFIELD;NEWNOAD:=P;END;{:686}
{688:}FUNCTION NEWSTYLE(S:SMALLNUMBER):HALFWORD;VAR P:HALFWORD;
BEGIN P:=GETNODE(3);MEM[P].HH.B0:=14;MEM[P].HH.B1:=S;MEM[P+1].INT:=0;
MEM[P+2].INT:=0;NEWSTYLE:=P;END;{:688}{689:}FUNCTION NEWCHOICE:HALFWORD;
VAR P:HALFWORD;BEGIN P:=GETNODE(3);MEM[P].HH.B0:=15;MEM[P].HH.B1:=0;
MEM[P+1].HH.LH:=0;MEM[P+1].HH.RH:=0;MEM[P+2].HH.LH:=0;MEM[P+2].HH.RH:=0;
NEWCHOICE:=P;END;{:689}{693:}PROCEDURE SHOWINFO;
BEGIN SHOWNODELIST(MEM[TEMPPTR].HH.LH);END;{:693}{704:}
FUNCTION FRACTIONRULE(T:SCALED):HALFWORD;VAR P:HALFWORD;
BEGIN P:=NEWRULE;MEM[P+3].INT:=T;MEM[P+2].INT:=0;FRACTIONRULE:=P;END;
{:704}{705:}FUNCTION OVERBAR(B:HALFWORD;K,T:SCALED):HALFWORD;
VAR P,Q:HALFWORD;BEGIN P:=NEWKERN(K);MEM[P].HH.RH:=B;Q:=FRACTIONRULE(T);
MEM[Q].HH.RH:=P;P:=NEWKERN(T);MEM[P].HH.RH:=Q;
OVERBAR:=VPACKAGE(P,0,1,1073741823);END;{:705}{706:}{709:}
FUNCTION CHARBOX(F:INTERNALFONTNUMBER;C:QUARTERWORD):HALFWORD;
VAR Q:FOURQUARTERS;HD:EIGHTBITS;B,P:HALFWORD;
BEGIN Q:=FONTINFO[CHARBASE[F]+C].QQQQ;HD:=Q.B1;B:=NEWNULLBOX;
MEM[B+1].INT:=FONTINFO[WIDTHBASE[F]+Q.B0].INT+FONTINFO[ITALICBASE[F]+(Q.
B2)DIV 4].INT;MEM[B+3].INT:=FONTINFO[HEIGHTBASE[F]+(HD)DIV 16].INT;
MEM[B+2].INT:=FONTINFO[DEPTHBASE[F]+(HD)MOD 16].INT;P:=GETAVAIL;
MEM[P].HH.B1:=C;MEM[P].HH.B0:=F;MEM[B+5].HH.RH:=P;CHARBOX:=B;END;{:709}
{711:}PROCEDURE STACKINTOBOX(B:HALFWORD;F:INTERNALFONTNUMBER;
C:QUARTERWORD);VAR P:HALFWORD;BEGIN P:=CHARBOX(F,C);
MEM[P].HH.RH:=MEM[B+5].HH.RH;MEM[B+5].HH.RH:=P;
MEM[B+3].INT:=MEM[P+3].INT;END;{:711}{712:}
FUNCTION HEIGHTPLUSDEPTH(F:INTERNALFONTNUMBER;C:QUARTERWORD):SCALED;
VAR Q:FOURQUARTERS;HD:EIGHTBITS;BEGIN Q:=FONTINFO[CHARBASE[F]+C].QQQQ;
HD:=Q.B1;
HEIGHTPLUSDEPTH:=FONTINFO[HEIGHTBASE[F]+(HD)DIV 16].INT+FONTINFO[
DEPTHBASE[F]+(HD)MOD 16].INT;END;{:712}FUNCTION VARDELIMITER(D:HALFWORD;
S:SMALLNUMBER;V:SCALED):HALFWORD;LABEL 40,22;VAR B:HALFWORD;
F,G:INTERNALFONTNUMBER;C,X,Y:QUARTERWORD;M,N:INTEGER;U:SCALED;W:SCALED;
Q:FOURQUARTERS;HD:EIGHTBITS;R:FOURQUARTERS;Z:SMALLNUMBER;
LARGEATTEMPT:BOOLEAN;BEGIN F:=0;W:=0;LARGEATTEMPT:=FALSE;
Z:=MEM[D].QQQQ.B0;X:=MEM[D].QQQQ.B1;WHILE TRUE DO BEGIN{707:}
IF(Z<>0)OR(X<>0)THEN BEGIN Z:=Z+S+16;REPEAT Z:=Z-16;
G:=EQTB[11840+Z].HH.RH;IF G<>0 THEN{708:}BEGIN Y:=X;
IF(Y>=FONTBC[G])AND(Y<=FONTEC[G])THEN BEGIN 22:Q:=FONTINFO[CHARBASE[G]+Y
].QQQQ;IF(Q.B0>0)THEN BEGIN IF((Q.B2)MOD 4)=3 THEN BEGIN F:=G;C:=Y;
GOTO 40;END;HD:=Q.B1;
U:=FONTINFO[HEIGHTBASE[G]+(HD)DIV 16].INT+FONTINFO[DEPTHBASE[G]+(HD)MOD
16].INT;IF U>W THEN BEGIN F:=G;C:=Y;W:=U;IF U>=V THEN GOTO 40;END;
IF((Q.B2)MOD 4)=2 THEN BEGIN Y:=Q.B3;GOTO 22;END;END;END;END{:708};
UNTIL Z<16;END{:707};IF LARGEATTEMPT THEN GOTO 40;LARGEATTEMPT:=TRUE;
Z:=MEM[D].QQQQ.B2;X:=MEM[D].QQQQ.B3;END;40:IF F<>0 THEN{710:}
IF((Q.B2)MOD 4)=3 THEN{713:}BEGIN B:=NEWNULLBOX;MEM[B].HH.B0:=1;
R:=FONTINFO[EXTENBASE[F]+Q.B3].QQQQ;{714:}C:=R.B3;
U:=HEIGHTPLUSDEPTH(F,C);W:=0;Q:=FONTINFO[CHARBASE[F]+C].QQQQ;
MEM[B+1].INT:=FONTINFO[WIDTHBASE[F]+Q.B0].INT+FONTINFO[ITALICBASE[F]+(Q.
B2)DIV 4].INT;C:=R.B2;IF C<>0 THEN W:=W+HEIGHTPLUSDEPTH(F,C);C:=R.B1;
IF C<>0 THEN W:=W+HEIGHTPLUSDEPTH(F,C);C:=R.B0;
IF C<>0 THEN W:=W+HEIGHTPLUSDEPTH(F,C);N:=0;
IF U>0 THEN WHILE W<V DO BEGIN W:=W+U;N:=N+1;IF R.B1<>0 THEN W:=W+U;
END{:714};C:=R.B2;IF C<>0 THEN STACKINTOBOX(B,F,C);C:=R.B3;
FOR M:=1 TO N DO STACKINTOBOX(B,F,C);C:=R.B1;
IF C<>0 THEN BEGIN STACKINTOBOX(B,F,C);C:=R.B3;
FOR M:=1 TO N DO STACKINTOBOX(B,F,C);END;C:=R.B0;
IF C<>0 THEN STACKINTOBOX(B,F,C);MEM[B+2].INT:=W-MEM[B+3].INT;END{:713}
ELSE B:=CHARBOX(F,C){:710}ELSE BEGIN B:=NEWNULLBOX;
MEM[B+1].INT:=EQTB[13756].INT;END;
MEM[B+4].INT:=HALF(MEM[B+3].INT-MEM[B+2].INT)-FONTINFO[22+PARAMBASE[EQTB
[11842+S].HH.RH]].INT;VARDELIMITER:=B;END;{:706}{715:}
FUNCTION REBOX(B:HALFWORD;W:SCALED):HALFWORD;VAR P:HALFWORD;
F:INTERNALFONTNUMBER;V:SCALED;
BEGIN IF(MEM[B+1].INT<>W)AND(MEM[B+5].HH.RH<>0)THEN BEGIN IF MEM[B].HH.
B0=1 THEN B:=HPACK(B,0,1);P:=MEM[B+5].HH.RH;
IF((P>=HIMEMMIN))AND(MEM[P].HH.RH=0)THEN BEGIN F:=MEM[P].HH.B0;
V:=FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+MEM[P].HH.B1].QQQQ.B0].INT
;IF V<>MEM[B+1].INT THEN MEM[P].HH.RH:=NEWKERN(MEM[B+1].INT-V);END;
FREENODE(B,7);B:=NEWGLUE(12);MEM[B].HH.RH:=P;
WHILE MEM[P].HH.RH<>0 DO P:=MEM[P].HH.RH;MEM[P].HH.RH:=NEWGLUE(12);
REBOX:=HPACK(B,W,0);END ELSE BEGIN MEM[B+1].INT:=W;REBOX:=B;END;END;
{:715}{716:}FUNCTION MATHGLUE(G:HALFWORD;M:SCALED):HALFWORD;
VAR P:HALFWORD;N:INTEGER;F:SCALED;BEGIN N:=XOVERN(M,65536);F:=REMAINDER;
IF F<0 THEN BEGIN N:=N-1;F:=F+65536;END;P:=GETNODE(4);
MEM[P+1].INT:=MULTANDADD(N,MEM[G+1].INT,XNOVERD(MEM[G+1].INT,F,65536),
1073741823);MEM[P].HH.B0:=MEM[G].HH.B0;
IF MEM[P].HH.B0=0 THEN MEM[P+2].INT:=MULTANDADD(N,MEM[G+2].INT,XNOVERD(
MEM[G+2].INT,F,65536),1073741823)ELSE MEM[P+2].INT:=MEM[G+2].INT;
MEM[P].HH.B1:=MEM[G].HH.B1;
IF MEM[P].HH.B1=0 THEN MEM[P+3].INT:=MULTANDADD(N,MEM[G+3].INT,XNOVERD(
MEM[G+3].INT,F,65536),1073741823)ELSE MEM[P+3].INT:=MEM[G+3].INT;
MATHGLUE:=P;END;{:716}{717:}PROCEDURE MATHKERN(P:HALFWORD;M:SCALED);
VAR N:INTEGER;F:SCALED;
BEGIN IF MEM[P].HH.B1=99 THEN BEGIN N:=XOVERN(M,65536);F:=REMAINDER;
IF F<0 THEN BEGIN N:=N-1;F:=F+65536;END;
MEM[P+1].INT:=MULTANDADD(N,MEM[P+1].INT,XNOVERD(MEM[P+1].INT,F,65536),
1073741823);MEM[P].HH.B1:=1;END;END;{:717}{718:}PROCEDURE FLUSHMATH;
BEGIN FLUSHNODELIST(MEM[CURLIST.HEADFIELD].HH.RH);
FLUSHNODELIST(CURLIST.AUXFIELD.INT);MEM[CURLIST.HEADFIELD].HH.RH:=0;
CURLIST.TAILFIELD:=CURLIST.HEADFIELD;CURLIST.AUXFIELD.INT:=0;END;{:718}
{720:}PROCEDURE MLISTTOHLIST;FORWARD;FUNCTION CLEANBOX(P:HALFWORD;
S:SMALLNUMBER):HALFWORD;LABEL 40;VAR Q:HALFWORD;SAVESTYLE:SMALLNUMBER;
X:HALFWORD;R:HALFWORD;
BEGIN CASE MEM[P].HH.RH OF 1:BEGIN CURMLIST:=NEWNOAD;
MEM[CURMLIST+1]:=MEM[P];END;2:BEGIN Q:=MEM[P].HH.LH;GOTO 40;END;
3:CURMLIST:=MEM[P].HH.LH;OTHERWISE BEGIN Q:=NEWNULLBOX;GOTO 40;END END;
SAVESTYLE:=CURSTYLE;CURSTYLE:=S;MLISTPENALTIES:=FALSE;MLISTTOHLIST;
Q:=MEM[327141].HH.RH;CURSTYLE:=SAVESTYLE;{703:}
BEGIN IF CURSTYLE<4 THEN CURSIZE:=0 ELSE CURSIZE:=16*((CURSTYLE-2)DIV 2)
;CURMU:=XOVERN(FONTINFO[6+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT,18);
END{:703};
40:IF(Q>=HIMEMMIN)OR(Q=0)THEN X:=HPACK(Q,0,1)ELSE IF(MEM[Q].HH.RH=0)AND(
MEM[Q].HH.B0<=1)AND(MEM[Q+4].INT=0)THEN X:=Q ELSE X:=HPACK(Q,0,1);{721:}
Q:=MEM[X+5].HH.RH;IF(Q>=HIMEMMIN)THEN BEGIN R:=MEM[Q].HH.RH;
IF R<>0 THEN IF MEM[R].HH.RH=0 THEN IF NOT(R>=HIMEMMIN)THEN IF MEM[R].HH
.B0=11 THEN BEGIN FREENODE(R,2);MEM[Q].HH.RH:=0;END;END{:721};
CLEANBOX:=X;END;{:720}{722:}PROCEDURE FETCH(A:HALFWORD);
BEGIN CURC:=MEM[A].HH.B1;CURF:=EQTB[11840+MEM[A].HH.B0+CURSIZE].HH.RH;
IF CURF=0 THEN{723:}BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(339);END;
PRINTSIZE(CURSIZE);PRINTCHAR(32);PRINTINT(MEM[A].HH.B0);PRINT(893);
PRINT(CURC);PRINTCHAR(41);BEGIN HELPPTR:=4;HELPLINE[3]:=894;
HELPLINE[2]:=895;HELPLINE[1]:=896;HELPLINE[0]:=897;END;ERROR;
CURI:=NULLCHARACTER;MEM[A].HH.RH:=0;END{:723}
ELSE BEGIN IF(CURC>=FONTBC[CURF])AND(CURC<=FONTEC[CURF])THEN CURI:=
FONTINFO[CHARBASE[CURF]+CURC].QQQQ ELSE CURI:=NULLCHARACTER;
IF NOT((CURI.B0>0))THEN BEGIN CHARWARNING(CURF,CURC);MEM[A].HH.RH:=0;
END;END;END;{:722}{726:}{734:}PROCEDURE MAKEOVER(Q:HALFWORD);
BEGIN MEM[Q+1].HH.LH:=OVERBAR(CLEANBOX(Q+1,2*(CURSTYLE DIV 2)+1),3*
FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT,FONTINFO[8+
PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT);MEM[Q+1].HH.RH:=2;END;{:734}
{735:}PROCEDURE MAKEUNDER(Q:HALFWORD);VAR P,X,Y:HALFWORD;DELTA:SCALED;
BEGIN X:=CLEANBOX(Q+1,CURSTYLE);
P:=NEWKERN(3*FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT);
MEM[X].HH.RH:=P;
MEM[P].HH.RH:=FRACTIONRULE(FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE].HH.
RH]].INT);Y:=VPACKAGE(X,0,1,1073741823);
DELTA:=MEM[Y+3].INT+MEM[Y+2].INT+FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE
].HH.RH]].INT;MEM[Y+3].INT:=MEM[X+3].INT;
MEM[Y+2].INT:=DELTA-MEM[Y+3].INT;MEM[Q+1].HH.LH:=Y;MEM[Q+1].HH.RH:=2;
END;{:735}{736:}PROCEDURE MAKEVCENTER(Q:HALFWORD);VAR V:HALFWORD;
DELTA:SCALED;BEGIN V:=MEM[Q+1].HH.LH;
IF MEM[V].HH.B0<>1 THEN CONFUSION(543);DELTA:=MEM[V+3].INT+MEM[V+2].INT;
MEM[V+3].INT:=FONTINFO[22+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT+HALF
(DELTA);MEM[V+2].INT:=DELTA-MEM[V+3].INT;END;{:736}{737:}
PROCEDURE MAKERADICAL(Q:HALFWORD);VAR X,Y:HALFWORD;DELTA,CLR:SCALED;
BEGIN X:=CLEANBOX(Q+1,2*(CURSTYLE DIV 2)+1);
IF CURSTYLE<2 THEN CLR:=FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]]
.INT+(ABS(FONTINFO[5+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT)DIV 4)
ELSE BEGIN CLR:=FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT;
CLR:=CLR+(ABS(CLR)DIV 4);END;
Y:=VARDELIMITER(Q+4,CURSIZE,MEM[X+3].INT+MEM[X+2].INT+CLR+FONTINFO[8+
PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT);
DELTA:=MEM[Y+2].INT-(MEM[X+3].INT+MEM[X+2].INT+CLR);
IF DELTA>0 THEN CLR:=CLR+HALF(DELTA);MEM[Y+4].INT:=-(MEM[X+3].INT+CLR);
MEM[Y].HH.RH:=OVERBAR(X,CLR,MEM[Y+3].INT);MEM[Q+1].HH.LH:=HPACK(Y,0,1);
MEM[Q+1].HH.RH:=2;END;{:737}{738:}PROCEDURE MAKEMATHACCENT(Q:HALFWORD);
LABEL 30,31;VAR P,X,Y:HALFWORD;A:INTEGER;C:QUARTERWORD;
F:INTERNALFONTNUMBER;I:FOURQUARTERS;S:SCALED;H:SCALED;DELTA:SCALED;
W:SCALED;BEGIN FETCH(Q+4);IF(CURI.B0>0)THEN BEGIN I:=CURI;C:=CURC;
F:=CURF;{741:}S:=0;IF MEM[Q+1].HH.RH=1 THEN BEGIN FETCH(Q+1);
IF((CURI.B2)MOD 4)=1 THEN BEGIN A:=LIGKERNBASE[CURF]+CURI.B3;
CURI:=FONTINFO[A].QQQQ;
IF CURI.B0>128 THEN BEGIN A:=LIGKERNBASE[CURF]+256*CURI.B2+CURI.B3
+32768-256*(128);CURI:=FONTINFO[A].QQQQ;END;
WHILE TRUE DO BEGIN IF CURI.B1=SKEWCHAR[CURF]THEN BEGIN IF CURI.B2>=128
THEN IF CURI.B0<=128 THEN S:=FONTINFO[KERNBASE[CURF]+256*CURI.B2+CURI.B3
].INT;GOTO 31;END;IF CURI.B0>=128 THEN GOTO 31;A:=A+CURI.B0+1;
CURI:=FONTINFO[A].QQQQ;END;END;END;31:{:741};
X:=CLEANBOX(Q+1,2*(CURSTYLE DIV 2)+1);W:=MEM[X+1].INT;H:=MEM[X+3].INT;
{740:}WHILE TRUE DO BEGIN IF((I.B2)MOD 4)<>2 THEN GOTO 30;Y:=I.B3;
I:=FONTINFO[CHARBASE[F]+Y].QQQQ;IF NOT(I.B0>0)THEN GOTO 30;
IF FONTINFO[WIDTHBASE[F]+I.B0].INT>W THEN GOTO 30;C:=Y;END;30:{:740};
IF H<FONTINFO[5+PARAMBASE[F]].INT THEN DELTA:=H ELSE DELTA:=FONTINFO[5+
PARAMBASE[F]].INT;
IF(MEM[Q+2].HH.RH<>0)OR(MEM[Q+3].HH.RH<>0)THEN IF MEM[Q+1].HH.RH=1 THEN{
742:}BEGIN FLUSHNODELIST(X);X:=NEWNOAD;MEM[X+1]:=MEM[Q+1];
MEM[X+2]:=MEM[Q+2];MEM[X+3]:=MEM[Q+3];MEM[Q+2].HH:=EMPTYFIELD;
MEM[Q+3].HH:=EMPTYFIELD;MEM[Q+1].HH.RH:=3;MEM[Q+1].HH.LH:=X;
X:=CLEANBOX(Q+1,CURSTYLE);DELTA:=DELTA+MEM[X+3].INT-H;H:=MEM[X+3].INT;
END{:742};Y:=CHARBOX(F,C);MEM[Y+4].INT:=S+HALF(W-MEM[Y+1].INT);
MEM[Y+1].INT:=0;P:=NEWKERN(-DELTA);MEM[P].HH.RH:=X;MEM[Y].HH.RH:=P;
Y:=VPACKAGE(Y,0,1,1073741823);MEM[Y+1].INT:=MEM[X+1].INT;
IF MEM[Y+3].INT<H THEN{739:}BEGIN P:=NEWKERN(H-MEM[Y+3].INT);
MEM[P].HH.RH:=MEM[Y+5].HH.RH;MEM[Y+5].HH.RH:=P;MEM[Y+3].INT:=H;END{:739}
;MEM[Q+1].HH.LH:=Y;MEM[Q+1].HH.RH:=2;END;END;{:738}{743:}
PROCEDURE MAKEFRACTION(Q:HALFWORD);VAR P,V,X,Y,Z:HALFWORD;
DELTA,DELTA1,DELTA2,SHIFTUP,SHIFTDOWN,CLR:SCALED;
BEGIN IF MEM[Q+1].INT=1073741824 THEN MEM[Q+1].INT:=FONTINFO[8+PARAMBASE
[EQTB[11843+CURSIZE].HH.RH]].INT;{744:}
X:=CLEANBOX(Q+2,CURSTYLE+2-2*(CURSTYLE DIV 6));
Z:=CLEANBOX(Q+3,2*(CURSTYLE DIV 2)+3-2*(CURSTYLE DIV 6));
IF MEM[X+1].INT<MEM[Z+1].INT THEN X:=REBOX(X,MEM[Z+1].INT)ELSE Z:=REBOX(
Z,MEM[X+1].INT);
IF CURSTYLE<2 THEN BEGIN SHIFTUP:=FONTINFO[8+PARAMBASE[EQTB[11842+
CURSIZE].HH.RH]].INT;
SHIFTDOWN:=FONTINFO[11+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT;
END ELSE BEGIN SHIFTDOWN:=FONTINFO[12+PARAMBASE[EQTB[11842+CURSIZE].HH.
RH]].INT;
IF MEM[Q+1].INT<>0 THEN SHIFTUP:=FONTINFO[9+PARAMBASE[EQTB[11842+CURSIZE
].HH.RH]].INT ELSE SHIFTUP:=FONTINFO[10+PARAMBASE[EQTB[11842+CURSIZE].HH
.RH]].INT;END{:744};IF MEM[Q+1].INT=0 THEN{745:}
BEGIN IF CURSTYLE<2 THEN CLR:=7*FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE]
.HH.RH]].INT ELSE CLR:=3*FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]
].INT;
DELTA:=HALF(CLR-((SHIFTUP-MEM[X+2].INT)-(MEM[Z+3].INT-SHIFTDOWN)));
IF DELTA>0 THEN BEGIN SHIFTUP:=SHIFTUP+DELTA;SHIFTDOWN:=SHIFTDOWN+DELTA;
END;END{:745}ELSE{746:}
BEGIN IF CURSTYLE<2 THEN CLR:=3*MEM[Q+1].INT ELSE CLR:=MEM[Q+1].INT;
DELTA:=HALF(MEM[Q+1].INT);
DELTA1:=CLR-((SHIFTUP-MEM[X+2].INT)-(FONTINFO[22+PARAMBASE[EQTB[11842+
CURSIZE].HH.RH]].INT+DELTA));
DELTA2:=CLR-((FONTINFO[22+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT-
DELTA)-(MEM[Z+3].INT-SHIFTDOWN));
IF DELTA1>0 THEN SHIFTUP:=SHIFTUP+DELTA1;
IF DELTA2>0 THEN SHIFTDOWN:=SHIFTDOWN+DELTA2;END{:746};{747:}
V:=NEWNULLBOX;MEM[V].HH.B0:=1;MEM[V+3].INT:=SHIFTUP+MEM[X+3].INT;
MEM[V+2].INT:=MEM[Z+2].INT+SHIFTDOWN;MEM[V+1].INT:=MEM[X+1].INT;
IF MEM[Q+1].INT=0 THEN BEGIN P:=NEWKERN((SHIFTUP-MEM[X+2].INT)-(MEM[Z+3]
.INT-SHIFTDOWN));MEM[P].HH.RH:=Z;
END ELSE BEGIN Y:=FRACTIONRULE(MEM[Q+1].INT);
P:=NEWKERN((FONTINFO[22+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT-DELTA)
-(MEM[Z+3].INT-SHIFTDOWN));MEM[Y].HH.RH:=P;MEM[P].HH.RH:=Z;
P:=NEWKERN((SHIFTUP-MEM[X+2].INT)-(FONTINFO[22+PARAMBASE[EQTB[11842+
CURSIZE].HH.RH]].INT+DELTA));MEM[P].HH.RH:=Y;END;MEM[X].HH.RH:=P;
MEM[V+5].HH.RH:=X{:747};{748:}
IF CURSTYLE<2 THEN DELTA:=FONTINFO[20+PARAMBASE[EQTB[11842+CURSIZE].HH.
RH]].INT ELSE DELTA:=FONTINFO[21+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].
INT;X:=VARDELIMITER(Q+4,CURSIZE,DELTA);MEM[X].HH.RH:=V;
Z:=VARDELIMITER(Q+5,CURSIZE,DELTA);MEM[V].HH.RH:=Z;
MEM[Q+1].INT:=HPACK(X,0,1){:748};END;{:743}{749:}
FUNCTION MAKEOP(Q:HALFWORD):SCALED;VAR DELTA:SCALED;P,V,X,Y,Z:HALFWORD;
C:QUARTERWORD;I:FOURQUARTERS;SHIFTUP,SHIFTDOWN:SCALED;
BEGIN IF(MEM[Q].HH.B1=0)AND(CURSTYLE<2)THEN MEM[Q].HH.B1:=1;
IF MEM[Q+1].HH.RH=1 THEN BEGIN FETCH(Q+1);
IF(CURSTYLE<2)AND(((CURI.B2)MOD 4)=2)THEN BEGIN C:=CURI.B3;
I:=FONTINFO[CHARBASE[CURF]+C].QQQQ;IF(I.B0>0)THEN BEGIN CURC:=C;CURI:=I;
MEM[Q+1].HH.B1:=C;END;END;
DELTA:=FONTINFO[ITALICBASE[CURF]+(CURI.B2)DIV 4].INT;
X:=CLEANBOX(Q+1,CURSTYLE);
IF(MEM[Q+3].HH.RH<>0)AND(MEM[Q].HH.B1<>1)THEN MEM[X+1].INT:=MEM[X+1].INT
-DELTA;
MEM[X+4].INT:=HALF(MEM[X+3].INT-MEM[X+2].INT)-FONTINFO[22+PARAMBASE[EQTB
[11842+CURSIZE].HH.RH]].INT;MEM[Q+1].HH.RH:=2;MEM[Q+1].HH.LH:=X;
END ELSE DELTA:=0;IF MEM[Q].HH.B1=1 THEN{750:}
BEGIN X:=CLEANBOX(Q+2,2*(CURSTYLE DIV 4)+4+(CURSTYLE MOD 2));
Y:=CLEANBOX(Q+1,CURSTYLE);Z:=CLEANBOX(Q+3,2*(CURSTYLE DIV 4)+5);
V:=NEWNULLBOX;MEM[V].HH.B0:=1;MEM[V+1].INT:=MEM[Y+1].INT;
IF MEM[X+1].INT>MEM[V+1].INT THEN MEM[V+1].INT:=MEM[X+1].INT;
IF MEM[Z+1].INT>MEM[V+1].INT THEN MEM[V+1].INT:=MEM[Z+1].INT;
X:=REBOX(X,MEM[V+1].INT);Y:=REBOX(Y,MEM[V+1].INT);
Z:=REBOX(Z,MEM[V+1].INT);MEM[X+4].INT:=HALF(DELTA);
MEM[Z+4].INT:=-MEM[X+4].INT;MEM[V+3].INT:=MEM[Y+3].INT;
MEM[V+2].INT:=MEM[Y+2].INT;{751:}
IF MEM[Q+2].HH.RH=0 THEN BEGIN FREENODE(X,7);MEM[V+5].HH.RH:=Y;
END ELSE BEGIN SHIFTUP:=FONTINFO[11+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]
].INT-MEM[X+2].INT;
IF SHIFTUP<FONTINFO[9+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT THEN
SHIFTUP:=FONTINFO[9+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT;
P:=NEWKERN(SHIFTUP);MEM[P].HH.RH:=Y;MEM[X].HH.RH:=P;
P:=NEWKERN(FONTINFO[13+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT);
MEM[P].HH.RH:=X;MEM[V+5].HH.RH:=P;
MEM[V+3].INT:=MEM[V+3].INT+FONTINFO[13+PARAMBASE[EQTB[11843+CURSIZE].HH.
RH]].INT+MEM[X+3].INT+MEM[X+2].INT+SHIFTUP;END;
IF MEM[Q+3].HH.RH=0 THEN FREENODE(Z,7)ELSE BEGIN SHIFTDOWN:=FONTINFO[12+
PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT-MEM[Z+3].INT;
IF SHIFTDOWN<FONTINFO[10+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT THEN
SHIFTDOWN:=FONTINFO[10+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT;
P:=NEWKERN(SHIFTDOWN);MEM[Y].HH.RH:=P;MEM[P].HH.RH:=Z;
P:=NEWKERN(FONTINFO[13+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT);
MEM[Z].HH.RH:=P;
MEM[V+2].INT:=MEM[V+2].INT+FONTINFO[13+PARAMBASE[EQTB[11843+CURSIZE].HH.
RH]].INT+MEM[Z+3].INT+MEM[Z+2].INT+SHIFTDOWN;END{:751};MEM[Q+1].INT:=V;
END{:750};MAKEOP:=DELTA;END;{:749}{752:}PROCEDURE MAKEORD(Q:HALFWORD);
LABEL 20,10;VAR A:INTEGER;P,R:HALFWORD;
BEGIN 20:IF MEM[Q+3].HH.RH=0 THEN IF MEM[Q+2].HH.RH=0 THEN IF MEM[Q+1].
HH.RH=1 THEN BEGIN P:=MEM[Q].HH.RH;
IF P<>0 THEN IF(MEM[P].HH.B0>=16)AND(MEM[P].HH.B0<=22)THEN IF MEM[P+1].
HH.RH=1 THEN IF MEM[P+1].HH.B0=MEM[Q+1].HH.B0 THEN BEGIN MEM[Q+1].HH.RH
:=4;FETCH(Q+1);
IF((CURI.B2)MOD 4)=1 THEN BEGIN A:=LIGKERNBASE[CURF]+CURI.B3;
CURC:=MEM[P+1].HH.B1;CURI:=FONTINFO[A].QQQQ;
IF CURI.B0>128 THEN BEGIN A:=LIGKERNBASE[CURF]+256*CURI.B2+CURI.B3
+32768-256*(128);CURI:=FONTINFO[A].QQQQ;END;WHILE TRUE DO BEGIN{753:}
IF CURI.B1=CURC THEN IF CURI.B0<=128 THEN IF CURI.B2>=128 THEN BEGIN P:=
NEWKERN(FONTINFO[KERNBASE[CURF]+256*CURI.B2+CURI.B3].INT);
MEM[P].HH.RH:=MEM[Q].HH.RH;MEM[Q].HH.RH:=P;GOTO 10;
END ELSE BEGIN BEGIN IF INTERRUPT<>0 THEN PAUSEFORINSTRUCTIONS;END;
CASE CURI.B2 OF 1,5:MEM[Q+1].HH.B1:=CURI.B3;2,6:MEM[P+1].HH.B1:=CURI.B3;
3,7,11:BEGIN R:=NEWNOAD;MEM[R+1].HH.B1:=CURI.B3;
MEM[R+1].HH.B0:=MEM[Q+1].HH.B0;MEM[Q].HH.RH:=R;MEM[R].HH.RH:=P;
IF CURI.B2<11 THEN MEM[R+1].HH.RH:=1 ELSE MEM[R+1].HH.RH:=4;END;
OTHERWISE BEGIN MEM[Q].HH.RH:=MEM[P].HH.RH;MEM[Q+1].HH.B1:=CURI.B3;
MEM[Q+3]:=MEM[P+3];MEM[Q+2]:=MEM[P+2];FREENODE(P,4);END END;
IF CURI.B2>3 THEN GOTO 10;MEM[Q+1].HH.RH:=1;GOTO 20;END{:753};
IF CURI.B0>=128 THEN GOTO 10;A:=A+CURI.B0+1;CURI:=FONTINFO[A].QQQQ;END;
END;END;END;10:END;{:752}{756:}PROCEDURE MAKESCRIPTS(Q:HALFWORD;
DELTA:SCALED);VAR P,X,Y,Z:HALFWORD;SHIFTUP,SHIFTDOWN,CLR:SCALED;
T:SMALLNUMBER;BEGIN P:=MEM[Q+1].INT;
IF(P>=HIMEMMIN)THEN BEGIN SHIFTUP:=0;SHIFTDOWN:=0;
END ELSE BEGIN Z:=HPACK(P,0,1);IF CURSTYLE<4 THEN T:=16 ELSE T:=32;
SHIFTUP:=MEM[Z+3].INT-FONTINFO[18+PARAMBASE[EQTB[11842+T].HH.RH]].INT;
SHIFTDOWN:=MEM[Z+2].INT+FONTINFO[19+PARAMBASE[EQTB[11842+T].HH.RH]].INT;
FREENODE(Z,7);END;IF MEM[Q+2].HH.RH=0 THEN{757:}
BEGIN X:=CLEANBOX(Q+3,2*(CURSTYLE DIV 4)+5);
MEM[X+1].INT:=MEM[X+1].INT+EQTB[13757].INT;
IF SHIFTDOWN<FONTINFO[16+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT THEN
SHIFTDOWN:=FONTINFO[16+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT;
CLR:=MEM[X+3].INT-(ABS(FONTINFO[5+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].
INT*4)DIV 5);IF SHIFTDOWN<CLR THEN SHIFTDOWN:=CLR;
MEM[X+4].INT:=SHIFTDOWN;END{:757}ELSE BEGIN{758:}
BEGIN X:=CLEANBOX(Q+2,2*(CURSTYLE DIV 4)+4+(CURSTYLE MOD 2));
MEM[X+1].INT:=MEM[X+1].INT+EQTB[13757].INT;
IF ODD(CURSTYLE)THEN CLR:=FONTINFO[15+PARAMBASE[EQTB[11842+CURSIZE].HH.
RH]].INT ELSE IF CURSTYLE<2 THEN CLR:=FONTINFO[13+PARAMBASE[EQTB[11842+
CURSIZE].HH.RH]].INT ELSE CLR:=FONTINFO[14+PARAMBASE[EQTB[11842+CURSIZE]
.HH.RH]].INT;IF SHIFTUP<CLR THEN SHIFTUP:=CLR;
CLR:=MEM[X+2].INT+(ABS(FONTINFO[5+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].
INT)DIV 4);IF SHIFTUP<CLR THEN SHIFTUP:=CLR;END{:758};
IF MEM[Q+3].HH.RH=0 THEN MEM[X+4].INT:=-SHIFTUP ELSE{759:}
BEGIN Y:=CLEANBOX(Q+3,2*(CURSTYLE DIV 4)+5);
MEM[Y+1].INT:=MEM[Y+1].INT+EQTB[13757].INT;
IF SHIFTDOWN<FONTINFO[17+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT THEN
SHIFTDOWN:=FONTINFO[17+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT;
CLR:=4*FONTINFO[8+PARAMBASE[EQTB[11843+CURSIZE].HH.RH]].INT-((SHIFTUP-
MEM[X+2].INT)-(MEM[Y+3].INT-SHIFTDOWN));
IF CLR>0 THEN BEGIN SHIFTDOWN:=SHIFTDOWN+CLR;
CLR:=(ABS(FONTINFO[5+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT*4)DIV 5)-
(SHIFTUP-MEM[X+2].INT);IF CLR>0 THEN BEGIN SHIFTUP:=SHIFTUP+CLR;
SHIFTDOWN:=SHIFTDOWN-CLR;END;END;MEM[X+4].INT:=DELTA;
P:=NEWKERN((SHIFTUP-MEM[X+2].INT)-(MEM[Y+3].INT-SHIFTDOWN));
MEM[X].HH.RH:=P;MEM[P].HH.RH:=Y;X:=VPACKAGE(X,0,1,1073741823);
MEM[X+4].INT:=SHIFTDOWN;END{:759};END;
IF MEM[Q+1].INT=0 THEN MEM[Q+1].INT:=X ELSE BEGIN P:=MEM[Q+1].INT;
WHILE MEM[P].HH.RH<>0 DO P:=MEM[P].HH.RH;MEM[P].HH.RH:=X;END;END;{:756}
{762:}FUNCTION MAKELEFTRIGHT(Q:HALFWORD;STYLE:SMALLNUMBER;
MAXD,MAXH:SCALED):SMALLNUMBER;VAR DELTA,DELTA1,DELTA2:SCALED;
BEGIN CURSTYLE:=STYLE;{703:}
BEGIN IF CURSTYLE<4 THEN CURSIZE:=0 ELSE CURSIZE:=16*((CURSTYLE-2)DIV 2)
;CURMU:=XOVERN(FONTINFO[6+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT,18);
END{:703};
DELTA2:=MAXD+FONTINFO[22+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT;
DELTA1:=MAXH+MAXD-DELTA2;IF DELTA2>DELTA1 THEN DELTA1:=DELTA2;
DELTA:=(DELTA1 DIV 500)*EQTB[13186].INT;
DELTA2:=DELTA1+DELTA1-EQTB[13755].INT;
IF DELTA<DELTA2 THEN DELTA:=DELTA2;
MEM[Q+1].INT:=VARDELIMITER(Q+1,CURSIZE,DELTA);
MAKELEFTRIGHT:=MEM[Q].HH.B0-(10);END;{:762}PROCEDURE MLISTTOHLIST;
LABEL 21,82,80,81,83,30;VAR MLIST:HALFWORD;PENALTIES:BOOLEAN;
STYLE:SMALLNUMBER;SAVESTYLE:SMALLNUMBER;Q:HALFWORD;R:HALFWORD;
RTYPE:SMALLNUMBER;T:SMALLNUMBER;P,X,Y,Z:HALFWORD;PEN:INTEGER;
S:SMALLNUMBER;MAXH,MAXD:SCALED;DELTA:SCALED;BEGIN MLIST:=CURMLIST;
PENALTIES:=MLISTPENALTIES;STYLE:=CURSTYLE;Q:=MLIST;R:=0;RTYPE:=17;
MAXH:=0;MAXD:=0;{703:}
BEGIN IF CURSTYLE<4 THEN CURSIZE:=0 ELSE CURSIZE:=16*((CURSTYLE-2)DIV 2)
;CURMU:=XOVERN(FONTINFO[6+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT,18);
END{:703};WHILE Q<>0 DO{727:}BEGIN{728:}21:DELTA:=0;
CASE MEM[Q].HH.B0 OF 18:CASE RTYPE OF 18,17,19,20,22,30:BEGIN MEM[Q].HH.
B0:=16;GOTO 21;END;OTHERWISE END;19,21,22,31:BEGIN{729:}
IF RTYPE=18 THEN MEM[R].HH.B0:=16{:729};IF MEM[Q].HH.B0=31 THEN GOTO 80;
END;{733:}30:GOTO 80;25:BEGIN MAKEFRACTION(Q);GOTO 82;END;
17:BEGIN DELTA:=MAKEOP(Q);IF MEM[Q].HH.B1=1 THEN GOTO 82;END;
16:MAKEORD(Q);20,23:;24:MAKERADICAL(Q);27:MAKEOVER(Q);26:MAKEUNDER(Q);
28:MAKEMATHACCENT(Q);29:MAKEVCENTER(Q);{:733}{730:}
14:BEGIN CURSTYLE:=MEM[Q].HH.B1;{703:}
BEGIN IF CURSTYLE<4 THEN CURSIZE:=0 ELSE CURSIZE:=16*((CURSTYLE-2)DIV 2)
;CURMU:=XOVERN(FONTINFO[6+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT,18);
END{:703};GOTO 81;END;15:{731:}
BEGIN CASE CURSTYLE DIV 2 OF 0:BEGIN P:=MEM[Q+1].HH.LH;
MEM[Q+1].HH.LH:=0;END;1:BEGIN P:=MEM[Q+1].HH.RH;MEM[Q+1].HH.RH:=0;END;
2:BEGIN P:=MEM[Q+2].HH.LH;MEM[Q+2].HH.LH:=0;END;
3:BEGIN P:=MEM[Q+2].HH.RH;MEM[Q+2].HH.RH:=0;END;END;
FLUSHNODELIST(MEM[Q+1].HH.LH);FLUSHNODELIST(MEM[Q+1].HH.RH);
FLUSHNODELIST(MEM[Q+2].HH.LH);FLUSHNODELIST(MEM[Q+2].HH.RH);
MEM[Q].HH.B0:=14;MEM[Q].HH.B1:=CURSTYLE;MEM[Q+1].INT:=0;MEM[Q+2].INT:=0;
IF P<>0 THEN BEGIN Z:=MEM[Q].HH.RH;MEM[Q].HH.RH:=P;
WHILE MEM[P].HH.RH<>0 DO P:=MEM[P].HH.RH;MEM[P].HH.RH:=Z;END;GOTO 81;
END{:731};3,4,5,8,12,7:GOTO 81;
2:BEGIN IF MEM[Q+3].INT>MAXH THEN MAXH:=MEM[Q+3].INT;
IF MEM[Q+2].INT>MAXD THEN MAXD:=MEM[Q+2].INT;GOTO 81;END;10:BEGIN{732:}
IF MEM[Q].HH.B1=99 THEN BEGIN X:=MEM[Q+1].HH.LH;Y:=MATHGLUE(X,CURMU);
DELETEGLUEREF(X);MEM[Q+1].HH.LH:=Y;MEM[Q].HH.B1:=0;
END ELSE IF(CURSIZE<>0)AND(MEM[Q].HH.B1=98)THEN BEGIN P:=MEM[Q].HH.RH;
IF P<>0 THEN IF(MEM[P].HH.B0=10)OR(MEM[P].HH.B0=11)THEN BEGIN MEM[Q].HH.
RH:=MEM[P].HH.RH;MEM[P].HH.RH:=0;FLUSHNODELIST(P);END;END{:732};GOTO 81;
END;11:BEGIN MATHKERN(Q,CURMU);GOTO 81;END;{:730}
OTHERWISE CONFUSION(898)END;{754:}CASE MEM[Q+1].HH.RH OF 1,4:{755:}
BEGIN FETCH(Q+1);
IF(CURI.B0>0)THEN BEGIN DELTA:=FONTINFO[ITALICBASE[CURF]+(CURI.B2)DIV 4]
.INT;P:=NEWCHARACTER(CURF,CURC);
IF(MEM[Q+1].HH.RH=4)AND(FONTINFO[2+PARAMBASE[CURF]].INT<>0)THEN DELTA:=0
;
IF(MEM[Q+3].HH.RH=0)AND(DELTA<>0)THEN BEGIN MEM[P].HH.RH:=NEWKERN(DELTA)
;DELTA:=0;END;END ELSE P:=0;END{:755};0:P:=0;2:P:=MEM[Q+1].HH.LH;
3:BEGIN CURMLIST:=MEM[Q+1].HH.LH;SAVESTYLE:=CURSTYLE;
MLISTPENALTIES:=FALSE;MLISTTOHLIST;CURSTYLE:=SAVESTYLE;{703:}
BEGIN IF CURSTYLE<4 THEN CURSIZE:=0 ELSE CURSIZE:=16*((CURSTYLE-2)DIV 2)
;CURMU:=XOVERN(FONTINFO[6+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT,18);
END{:703};P:=HPACK(MEM[327141].HH.RH,0,1);END;
OTHERWISE CONFUSION(899)END;MEM[Q+1].INT:=P;
IF(MEM[Q+3].HH.RH=0)AND(MEM[Q+2].HH.RH=0)THEN GOTO 82;
MAKESCRIPTS(Q,DELTA){:754}{:728};82:Z:=HPACK(MEM[Q+1].INT,0,1);
IF MEM[Z+3].INT>MAXH THEN MAXH:=MEM[Z+3].INT;
IF MEM[Z+2].INT>MAXD THEN MAXD:=MEM[Z+2].INT;FREENODE(Z,7);80:R:=Q;
RTYPE:=MEM[R].HH.B0;IF RTYPE=31 THEN BEGIN RTYPE:=30;CURSTYLE:=STYLE;
{703:}
BEGIN IF CURSTYLE<4 THEN CURSIZE:=0 ELSE CURSIZE:=16*((CURSTYLE-2)DIV 2)
;CURMU:=XOVERN(FONTINFO[6+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT,18);
END{:703};END;81:Q:=MEM[Q].HH.RH;END{:727};{729:}
IF RTYPE=18 THEN MEM[R].HH.B0:=16{:729};{760:}P:=327141;MEM[P].HH.RH:=0;
Q:=MLIST;RTYPE:=0;CURSTYLE:=STYLE;{703:}
BEGIN IF CURSTYLE<4 THEN CURSIZE:=0 ELSE CURSIZE:=16*((CURSTYLE-2)DIV 2)
;CURMU:=XOVERN(FONTINFO[6+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT,18);
END{:703};WHILE Q<>0 DO BEGIN{761:}T:=16;S:=4;PEN:=10000;
CASE MEM[Q].HH.B0 OF 17,20,21,22,23:T:=MEM[Q].HH.B0;18:BEGIN T:=18;
PEN:=EQTB[13177].INT;END;19:BEGIN T:=19;PEN:=EQTB[13178].INT;END;
16,29,27,26:;24:S:=5;28:S:=5;25:BEGIN T:=23;S:=6;END;
30,31:T:=MAKELEFTRIGHT(Q,STYLE,MAXD,MAXH);14:{763:}
BEGIN CURSTYLE:=MEM[Q].HH.B1;S:=3;{703:}
BEGIN IF CURSTYLE<4 THEN CURSIZE:=0 ELSE CURSIZE:=16*((CURSTYLE-2)DIV 2)
;CURMU:=XOVERN(FONTINFO[6+PARAMBASE[EQTB[11842+CURSIZE].HH.RH]].INT,18);
END{:703};GOTO 83;END{:763};8,12,2,7,5,3,4,10,11:BEGIN MEM[P].HH.RH:=Q;
P:=Q;Q:=MEM[Q].HH.RH;MEM[P].HH.RH:=0;GOTO 30;END;
OTHERWISE CONFUSION(900)END{:761};{766:}
IF RTYPE>0 THEN BEGIN CASE STRPOOL[RTYPE*8+T+MAGICOFFSET]OF 48:X:=0;
49:IF CURSTYLE<4 THEN X:=15 ELSE X:=0;50:X:=15;
51:IF CURSTYLE<4 THEN X:=16 ELSE X:=0;
52:IF CURSTYLE<4 THEN X:=17 ELSE X:=0;OTHERWISE CONFUSION(902)END;
IF X<>0 THEN BEGIN Y:=MATHGLUE(EQTB[10782+X].HH.RH,CURMU);Z:=NEWGLUE(Y);
MEM[Y].HH.RH:=0;MEM[P].HH.RH:=Z;P:=Z;MEM[Z].HH.B1:=X+1;END;END{:766};
{767:}IF MEM[Q+1].INT<>0 THEN BEGIN MEM[P].HH.RH:=MEM[Q+1].INT;
REPEAT P:=MEM[P].HH.RH;UNTIL MEM[P].HH.RH=0;END;
IF PENALTIES THEN IF MEM[Q].HH.RH<>0 THEN IF PEN<10000 THEN BEGIN RTYPE
:=MEM[MEM[Q].HH.RH].HH.B0;
IF RTYPE<>12 THEN IF RTYPE<>19 THEN BEGIN Z:=NEWPENALTY(PEN);
MEM[P].HH.RH:=Z;P:=Z;END;END{:767};IF MEM[Q].HH.B0=31 THEN T:=20;
RTYPE:=T;83:R:=Q;Q:=MEM[Q].HH.RH;FREENODE(R,S);30:END{:760};END;{:726}
{772:}PROCEDURE PUSHALIGNMENT;VAR P:HALFWORD;BEGIN P:=GETNODE(5);
MEM[P].HH.RH:=ALIGNPTR;MEM[P].HH.LH:=CURALIGN;
MEM[P+1].HH.LH:=MEM[327136].HH.RH;MEM[P+1].HH.RH:=CURSPAN;
MEM[P+2].INT:=CURLOOP;MEM[P+3].INT:=ALIGNSTATE;MEM[P+4].HH.LH:=CURHEAD;
MEM[P+4].HH.RH:=CURTAIL;ALIGNPTR:=P;CURHEAD:=GETAVAIL;END;
PROCEDURE POPALIGNMENT;VAR P:HALFWORD;
BEGIN BEGIN MEM[CURHEAD].HH.RH:=AVAIL;AVAIL:=CURHEAD;DYNUSED:=DYNUSED-1;
END;P:=ALIGNPTR;CURTAIL:=MEM[P+4].HH.RH;CURHEAD:=MEM[P+4].HH.LH;
ALIGNSTATE:=MEM[P+3].INT;CURLOOP:=MEM[P+2].INT;CURSPAN:=MEM[P+1].HH.RH;
MEM[327136].HH.RH:=MEM[P+1].HH.LH;CURALIGN:=MEM[P].HH.LH;
ALIGNPTR:=MEM[P].HH.RH;FREENODE(P,5);END;{:772}{774:}{782:}
PROCEDURE GETPREAMBLETOKEN;LABEL 20;BEGIN 20:GETTOKEN;
WHILE(CURCHR=256)AND(CURCMD=4)DO BEGIN GETTOKEN;
IF CURCMD>100 THEN BEGIN EXPAND;GETTOKEN;END;END;
IF CURCMD=9 THEN FATALERROR(604);
IF(CURCMD=75)AND(CURCHR=10793)THEN BEGIN SCANOPTIONALEQUALS;SCANGLUE(2);
IF EQTB[13211].INT>0 THEN GEQDEFINE(10793,117,CURVAL)ELSE EQDEFINE(10793
,117,CURVAL);GOTO 20;END;END;{:782}PROCEDURE ALIGNPEEK;FORWARD;
PROCEDURE NORMALPARAGRAPH;FORWARD;PROCEDURE INITALIGN;LABEL 30,31,32,22;
VAR SAVECSPTR:HALFWORD;P:HALFWORD;BEGIN SAVECSPTR:=CURCS;PUSHALIGNMENT;
ALIGNSTATE:=-1000000;{776:}
IF(CURLIST.MODEFIELD=203)AND((CURLIST.TAILFIELD<>CURLIST.HEADFIELD)OR(
CURLIST.AUXFIELD.INT<>0))THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(689);END;PRINTESC(523);PRINT(903);BEGIN HELPPTR:=3;
HELPLINE[2]:=904;HELPLINE[1]:=905;HELPLINE[0]:=906;END;ERROR;FLUSHMATH;
END{:776};PUSHNEST;{775:}
IF CURLIST.MODEFIELD=203 THEN BEGIN CURLIST.MODEFIELD:=-1;
CURLIST.AUXFIELD.INT:=NEST[NESTPTR-2].AUXFIELD.INT;
END ELSE IF CURLIST.MODEFIELD>0 THEN CURLIST.MODEFIELD:=-CURLIST.
MODEFIELD{:775};SCANSPEC(6,FALSE);{777:}MEM[327136].HH.RH:=0;
CURALIGN:=327136;CURLOOP:=0;SCANNERSTATUS:=4;WARNINGINDEX:=SAVECSPTR;
ALIGNSTATE:=-1000000;WHILE TRUE DO BEGIN{778:}
MEM[CURALIGN].HH.RH:=NEWPARAMGLUE(11);
CURALIGN:=MEM[CURALIGN].HH.RH{:778};IF CURCMD=5 THEN GOTO 30;{779:}
{783:}P:=327140;MEM[P].HH.RH:=0;WHILE TRUE DO BEGIN GETPREAMBLETOKEN;
IF CURCMD=6 THEN GOTO 31;
IF(CURCMD<=5)AND(CURCMD>=4)AND(ALIGNSTATE=-1000000)THEN IF(P=327140)AND(
CURLOOP=0)AND(CURCMD=4)THEN CURLOOP:=CURALIGN ELSE BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(912);END;BEGIN HELPPTR:=3;HELPLINE[2]:=913;
HELPLINE[1]:=914;HELPLINE[0]:=915;END;BACKERROR;GOTO 31;
END ELSE IF(CURCMD<>10)OR(P<>327140)THEN BEGIN MEM[P].HH.RH:=GETAVAIL;
P:=MEM[P].HH.RH;MEM[P].HH.LH:=CURTOK;END;END;31:{:783};
MEM[CURALIGN].HH.RH:=NEWNULLBOX;CURALIGN:=MEM[CURALIGN].HH.RH;
MEM[CURALIGN].HH.LH:=327135;MEM[CURALIGN+1].INT:=-1073741824;
MEM[CURALIGN+3].INT:=MEM[327140].HH.RH;{784:}P:=327140;MEM[P].HH.RH:=0;
WHILE TRUE DO BEGIN 22:GETPREAMBLETOKEN;
IF(CURCMD<=5)AND(CURCMD>=4)AND(ALIGNSTATE=-1000000)THEN GOTO 32;
IF CURCMD=6 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(916);END;
BEGIN HELPPTR:=3;HELPLINE[2]:=913;HELPLINE[1]:=914;HELPLINE[0]:=917;END;
ERROR;GOTO 22;END;MEM[P].HH.RH:=GETAVAIL;P:=MEM[P].HH.RH;
MEM[P].HH.LH:=CURTOK;END;32:MEM[P].HH.RH:=GETAVAIL;P:=MEM[P].HH.RH;
MEM[P].HH.LH:=14614{:784};MEM[CURALIGN+2].INT:=MEM[327140].HH.RH{:779};
END;30:SCANNERSTATUS:=0{:777};NEWSAVELEVEL(6);
IF EQTB[11324].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11324].HH.RH,13);
ALIGNPEEK;END;{:774}{786:}{787:}PROCEDURE INITSPAN(P:HALFWORD);
BEGIN PUSHNEST;
IF CURLIST.MODEFIELD=-102 THEN CURLIST.AUXFIELD.HH.LH:=1000 ELSE BEGIN
CURLIST.AUXFIELD.INT:=-65536000;NORMALPARAGRAPH;END;CURSPAN:=P;END;
{:787}PROCEDURE INITROW;BEGIN PUSHNEST;
CURLIST.MODEFIELD:=(-103)-CURLIST.MODEFIELD;
IF CURLIST.MODEFIELD=-102 THEN CURLIST.AUXFIELD.HH.LH:=0 ELSE CURLIST.
AUXFIELD.INT:=0;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWGLUE(MEM[MEM[327136].HH.RH+1].HH.
LH);CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B1:=12;CURALIGN:=MEM[MEM[327136].HH.RH].HH.RH;
CURTAIL:=CURHEAD;INITSPAN(CURALIGN);END;{:786}{788:}PROCEDURE INITCOL;
BEGIN MEM[CURALIGN+5].HH.LH:=CURCMD;
IF CURCMD=63 THEN ALIGNSTATE:=0 ELSE BEGIN BACKINPUT;
BEGINTOKENLIST(MEM[CURALIGN+3].INT,1);END;END;{:788}{791:}
FUNCTION FINCOL:BOOLEAN;LABEL 10;VAR P:HALFWORD;Q,R:HALFWORD;S:HALFWORD;
U:HALFWORD;W:SCALED;O:GLUEORD;N:HALFWORD;
BEGIN IF CURALIGN=0 THEN CONFUSION(918);Q:=MEM[CURALIGN].HH.RH;
IF Q=0 THEN CONFUSION(918);IF ALIGNSTATE<500000 THEN FATALERROR(604);
P:=MEM[Q].HH.RH;{792:}
IF(P=0)AND(MEM[CURALIGN+5].HH.LH<257)THEN IF CURLOOP<>0 THEN{793:}
BEGIN MEM[Q].HH.RH:=NEWNULLBOX;P:=MEM[Q].HH.RH;MEM[P].HH.LH:=327135;
MEM[P+1].INT:=-1073741824;CURLOOP:=MEM[CURLOOP].HH.RH;{794:}Q:=327140;
R:=MEM[CURLOOP+3].INT;WHILE R<>0 DO BEGIN MEM[Q].HH.RH:=GETAVAIL;
Q:=MEM[Q].HH.RH;MEM[Q].HH.LH:=MEM[R].HH.LH;R:=MEM[R].HH.RH;END;
MEM[Q].HH.RH:=0;MEM[P+3].INT:=MEM[327140].HH.RH;Q:=327140;
R:=MEM[CURLOOP+2].INT;WHILE R<>0 DO BEGIN MEM[Q].HH.RH:=GETAVAIL;
Q:=MEM[Q].HH.RH;MEM[Q].HH.LH:=MEM[R].HH.LH;R:=MEM[R].HH.RH;END;
MEM[Q].HH.RH:=0;MEM[P+2].INT:=MEM[327140].HH.RH{:794};
CURLOOP:=MEM[CURLOOP].HH.RH;MEM[P].HH.RH:=NEWGLUE(MEM[CURLOOP+1].HH.LH);
END{:793}ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(919);END;
PRINTESC(908);BEGIN HELPPTR:=3;HELPLINE[2]:=920;HELPLINE[1]:=921;
HELPLINE[0]:=922;END;MEM[CURALIGN+5].HH.LH:=257;ERROR;END{:792};
IF MEM[CURALIGN+5].HH.LH<>256 THEN BEGIN UNSAVE;NEWSAVELEVEL(6);{796:}
BEGIN IF CURLIST.MODEFIELD=-102 THEN BEGIN ADJUSTTAIL:=CURTAIL;
U:=HPACK(MEM[CURLIST.HEADFIELD].HH.RH,0,1);W:=MEM[U+1].INT;
CURTAIL:=ADJUSTTAIL;ADJUSTTAIL:=0;
END ELSE BEGIN U:=VPACKAGE(MEM[CURLIST.HEADFIELD].HH.RH,0,1,0);
W:=MEM[U+3].INT;END;N:=0;IF CURSPAN<>CURALIGN THEN{798:}
BEGIN Q:=CURSPAN;REPEAT N:=N+1;Q:=MEM[MEM[Q].HH.RH].HH.RH;
UNTIL Q=CURALIGN;IF N>511 THEN CONFUSION(923);Q:=CURSPAN;
WHILE MEM[MEM[Q].HH.LH].HH.RH<N DO Q:=MEM[Q].HH.LH;
IF MEM[MEM[Q].HH.LH].HH.RH>N THEN BEGIN S:=GETNODE(2);
MEM[S].HH.LH:=MEM[Q].HH.LH;MEM[S].HH.RH:=N;MEM[Q].HH.LH:=S;
MEM[S+1].INT:=W;
END ELSE IF MEM[MEM[Q].HH.LH+1].INT<W THEN MEM[MEM[Q].HH.LH+1].INT:=W;
END{:798}ELSE IF W>MEM[CURALIGN+1].INT THEN MEM[CURALIGN+1].INT:=W;
MEM[U].HH.B0:=13;MEM[U].HH.B1:=N;{659:}
IF TOTALSTRETCH[3]<>0 THEN O:=3 ELSE IF TOTALSTRETCH[2]<>0 THEN O:=2
ELSE IF TOTALSTRETCH[1]<>0 THEN O:=1 ELSE O:=0{:659};MEM[U+5].HH.B1:=O;
MEM[U+6].INT:=TOTALSTRETCH[O];{665:}
IF TOTALSHRINK[3]<>0 THEN O:=3 ELSE IF TOTALSHRINK[2]<>0 THEN O:=2 ELSE
IF TOTALSHRINK[1]<>0 THEN O:=1 ELSE O:=0{:665};MEM[U+5].HH.B0:=O;
MEM[U+4].INT:=TOTALSHRINK[O];POPNEST;MEM[CURLIST.TAILFIELD].HH.RH:=U;
CURLIST.TAILFIELD:=U;END{:796};{795:}
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWGLUE(MEM[MEM[CURALIGN].HH.RH+1].
HH.LH);CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B1:=12{:795};
IF MEM[CURALIGN+5].HH.LH>=257 THEN BEGIN FINCOL:=TRUE;GOTO 10;END;
INITSPAN(P);END;ALIGNSTATE:=1000000;REPEAT GETXORPROTECTED;
UNTIL CURCMD<>10;CURALIGN:=P;INITCOL;FINCOL:=FALSE;10:END;{:791}{799:}
PROCEDURE FINROW;VAR P:HALFWORD;
BEGIN IF CURLIST.MODEFIELD=-102 THEN BEGIN P:=HPACK(MEM[CURLIST.
HEADFIELD].HH.RH,0,1);POPNEST;APPENDTOVLIST(P);
IF CURHEAD<>CURTAIL THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=MEM[CURHEAD
].HH.RH;CURLIST.TAILFIELD:=CURTAIL;END;
END ELSE BEGIN P:=VPACKAGE(MEM[CURLIST.HEADFIELD].HH.RH,0,1,1073741823);
POPNEST;MEM[CURLIST.TAILFIELD].HH.RH:=P;CURLIST.TAILFIELD:=P;
CURLIST.AUXFIELD.HH.LH:=1000;END;MEM[P].HH.B0:=13;MEM[P+6].INT:=0;
IF EQTB[11324].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11324].HH.RH,13);
ALIGNPEEK;END;{:799}{800:}PROCEDURE DOASSIGNMENTS;FORWARD;
PROCEDURE RESUMEAFTERDISPLAY;FORWARD;PROCEDURE BUILDPAGE;FORWARD;
PROCEDURE FINALIGN;VAR P,Q,R,S,U,V:HALFWORD;T,W:SCALED;O:SCALED;
N:HALFWORD;RULESAVE:SCALED;AUXSAVE:MEMORYWORD;
BEGIN IF CURGROUP<>6 THEN CONFUSION(924);UNSAVE;
IF CURGROUP<>6 THEN CONFUSION(925);UNSAVE;
IF NEST[NESTPTR-1].MODEFIELD=203 THEN O:=EQTB[13760].INT ELSE O:=0;
{801:}Q:=MEM[MEM[327136].HH.RH].HH.RH;REPEAT FLUSHLIST(MEM[Q+3].INT);
FLUSHLIST(MEM[Q+2].INT);P:=MEM[MEM[Q].HH.RH].HH.RH;
IF MEM[Q+1].INT=-1073741824 THEN{802:}BEGIN MEM[Q+1].INT:=0;
R:=MEM[Q].HH.RH;S:=MEM[R+1].HH.LH;
IF S<>0 THEN BEGIN MEM[0].HH.RH:=MEM[0].HH.RH+1;DELETEGLUEREF(S);
MEM[R+1].HH.LH:=0;END;END{:802};IF MEM[Q].HH.LH<>327135 THEN{803:}
BEGIN T:=MEM[Q+1].INT+MEM[MEM[MEM[Q].HH.RH+1].HH.LH+1].INT;
R:=MEM[Q].HH.LH;S:=327135;MEM[S].HH.LH:=P;N:=1;
REPEAT MEM[R+1].INT:=MEM[R+1].INT-T;U:=MEM[R].HH.LH;
WHILE MEM[R].HH.RH>N DO BEGIN S:=MEM[S].HH.LH;
N:=MEM[MEM[S].HH.LH].HH.RH+1;END;
IF MEM[R].HH.RH<N THEN BEGIN MEM[R].HH.LH:=MEM[S].HH.LH;MEM[S].HH.LH:=R;
MEM[R].HH.RH:=MEM[R].HH.RH-1;S:=R;
END ELSE BEGIN IF MEM[R+1].INT>MEM[MEM[S].HH.LH+1].INT THEN MEM[MEM[S].
HH.LH+1].INT:=MEM[R+1].INT;FREENODE(R,2);END;R:=U;UNTIL R=327135;
END{:803};MEM[Q].HH.B0:=13;MEM[Q].HH.B1:=0;MEM[Q+3].INT:=0;
MEM[Q+2].INT:=0;MEM[Q+5].HH.B1:=0;MEM[Q+5].HH.B0:=0;MEM[Q+6].INT:=0;
MEM[Q+4].INT:=0;Q:=P;UNTIL Q=0{:801};{804:}SAVEPTR:=SAVEPTR-2;
PACKBEGINLINE:=-CURLIST.MLFIELD;
IF CURLIST.MODEFIELD=-1 THEN BEGIN RULESAVE:=EQTB[13761].INT;
EQTB[13761].INT:=0;
P:=HPACK(MEM[327136].HH.RH,SAVESTACK[SAVEPTR+1].INT,SAVESTACK[SAVEPTR+0]
.INT);EQTB[13761].INT:=RULESAVE;
END ELSE BEGIN Q:=MEM[MEM[327136].HH.RH].HH.RH;
REPEAT MEM[Q+3].INT:=MEM[Q+1].INT;MEM[Q+1].INT:=0;
Q:=MEM[MEM[Q].HH.RH].HH.RH;UNTIL Q=0;
P:=VPACKAGE(MEM[327136].HH.RH,SAVESTACK[SAVEPTR+1].INT,SAVESTACK[SAVEPTR
+0].INT,1073741823);Q:=MEM[MEM[327136].HH.RH].HH.RH;
REPEAT MEM[Q+1].INT:=MEM[Q+3].INT;MEM[Q+3].INT:=0;
Q:=MEM[MEM[Q].HH.RH].HH.RH;UNTIL Q=0;END;PACKBEGINLINE:=0{:804};{805:}
Q:=MEM[CURLIST.HEADFIELD].HH.RH;S:=CURLIST.HEADFIELD;
WHILE Q<>0 DO BEGIN IF NOT(Q>=HIMEMMIN)THEN IF MEM[Q].HH.B0=13 THEN{807:
}BEGIN IF CURLIST.MODEFIELD=-1 THEN BEGIN MEM[Q].HH.B0:=0;
MEM[Q+1].INT:=MEM[P+1].INT;
IF NEST[NESTPTR-1].MODEFIELD=203 THEN MEM[Q].HH.B1:=2;
END ELSE BEGIN MEM[Q].HH.B0:=1;MEM[Q+3].INT:=MEM[P+3].INT;END;
MEM[Q+5].HH.B1:=MEM[P+5].HH.B1;MEM[Q+5].HH.B0:=MEM[P+5].HH.B0;
MEM[Q+6].GR:=MEM[P+6].GR;MEM[Q+4].INT:=O;R:=MEM[MEM[Q+5].HH.RH].HH.RH;
S:=MEM[MEM[P+5].HH.RH].HH.RH;REPEAT{808:}N:=MEM[R].HH.B1;
T:=MEM[S+1].INT;W:=T;U:=327140;MEM[R].HH.B1:=0;
WHILE N>0 DO BEGIN N:=N-1;{809:}S:=MEM[S].HH.RH;V:=MEM[S+1].HH.LH;
MEM[U].HH.RH:=NEWGLUE(V);U:=MEM[U].HH.RH;MEM[U].HH.B1:=12;
T:=T+MEM[V+1].INT;
IF MEM[P+5].HH.B0=1 THEN BEGIN IF MEM[V].HH.B0=MEM[P+5].HH.B1 THEN T:=T+
ROUND(DBLE(MEM[P+6].GR)*MEM[V+2].INT);
END ELSE IF MEM[P+5].HH.B0=2 THEN BEGIN IF MEM[V].HH.B1=MEM[P+5].HH.B1
THEN T:=T-ROUND(DBLE(MEM[P+6].GR)*MEM[V+3].INT);END;S:=MEM[S].HH.RH;
MEM[U].HH.RH:=NEWNULLBOX;U:=MEM[U].HH.RH;T:=T+MEM[S+1].INT;
IF CURLIST.MODEFIELD=-1 THEN MEM[U+1].INT:=MEM[S+1].INT ELSE BEGIN MEM[U
].HH.B0:=1;MEM[U+3].INT:=MEM[S+1].INT;END{:809};END;
IF CURLIST.MODEFIELD=-1 THEN{810:}BEGIN MEM[R+3].INT:=MEM[Q+3].INT;
MEM[R+2].INT:=MEM[Q+2].INT;
IF T=MEM[R+1].INT THEN BEGIN MEM[R+5].HH.B0:=0;MEM[R+5].HH.B1:=0;
MEM[R+6].GR:=0.0;
END ELSE IF T>MEM[R+1].INT THEN BEGIN MEM[R+5].HH.B0:=1;
IF MEM[R+6].INT=0 THEN MEM[R+6].GR:=0.0 ELSE MEM[R+6].GR:=SNGL(1.0D0*(T-
MEM[R+1].INT)/MEM[R+6].INT);
END ELSE BEGIN MEM[R+5].HH.B1:=MEM[R+5].HH.B0;MEM[R+5].HH.B0:=2;
IF MEM[R+4].INT=0 THEN MEM[R+6].GR:=0.0 ELSE IF(MEM[R+5].HH.B1=0)AND(MEM
[R+1].INT-T>MEM[R+4].INT)THEN MEM[R+6].GR:=1.0 ELSE MEM[R+6].GR:=SNGL(
1.0D0*(MEM[R+1].INT-T)/MEM[R+4].INT);END;MEM[R+1].INT:=W;
MEM[R].HH.B0:=0;END{:810}ELSE{811:}BEGIN MEM[R+1].INT:=MEM[Q+1].INT;
IF T=MEM[R+3].INT THEN BEGIN MEM[R+5].HH.B0:=0;MEM[R+5].HH.B1:=0;
MEM[R+6].GR:=0.0;
END ELSE IF T>MEM[R+3].INT THEN BEGIN MEM[R+5].HH.B0:=1;
IF MEM[R+6].INT=0 THEN MEM[R+6].GR:=0.0 ELSE MEM[R+6].GR:=SNGL(1.0D0*(T-
MEM[R+3].INT)/MEM[R+6].INT);
END ELSE BEGIN MEM[R+5].HH.B1:=MEM[R+5].HH.B0;MEM[R+5].HH.B0:=2;
IF MEM[R+4].INT=0 THEN MEM[R+6].GR:=0.0 ELSE IF(MEM[R+5].HH.B1=0)AND(MEM
[R+3].INT-T>MEM[R+4].INT)THEN MEM[R+6].GR:=1.0 ELSE MEM[R+6].GR:=SNGL(
1.0D0*(MEM[R+3].INT-T)/MEM[R+4].INT);END;MEM[R+3].INT:=W;
MEM[R].HH.B0:=1;END{:811};MEM[R+4].INT:=0;
IF U<>327140 THEN BEGIN MEM[U].HH.RH:=MEM[R].HH.RH;
MEM[R].HH.RH:=MEM[327140].HH.RH;R:=U;END{:808};
R:=MEM[MEM[R].HH.RH].HH.RH;S:=MEM[MEM[S].HH.RH].HH.RH;UNTIL R=0;
END{:807}ELSE IF MEM[Q].HH.B0=2 THEN{806:}
BEGIN IF(MEM[Q+1].INT=-1073741824)THEN MEM[Q+1].INT:=MEM[P+1].INT;
IF(MEM[Q+3].INT=-1073741824)THEN MEM[Q+3].INT:=MEM[P+3].INT;
IF(MEM[Q+2].INT=-1073741824)THEN MEM[Q+2].INT:=MEM[P+2].INT;
IF O<>0 THEN BEGIN R:=MEM[Q].HH.RH;MEM[Q].HH.RH:=0;Q:=HPACK(Q,0,1);
MEM[Q+4].INT:=O;MEM[Q].HH.RH:=R;MEM[S].HH.RH:=Q;END;END{:806};S:=Q;
Q:=MEM[Q].HH.RH;END{:805};FLUSHNODELIST(P);POPALIGNMENT;{812:}
AUXSAVE:=CURLIST.AUXFIELD;P:=MEM[CURLIST.HEADFIELD].HH.RH;
Q:=CURLIST.TAILFIELD;POPNEST;IF CURLIST.MODEFIELD=203 THEN{1206:}
BEGIN DOASSIGNMENTS;IF CURCMD<>3 THEN{1207:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1179);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=904;HELPLINE[0]:=905;END;BACKERROR;END{:1207}ELSE{1197:}
BEGIN GETXTOKEN;
IF CURCMD<>3 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1175);END;
BEGIN HELPPTR:=2;HELPLINE[1]:=1176;HELPLINE[0]:=1177;END;BACKERROR;END;
END{:1197};FLUSHNODELIST(CURLIST.ETEXAUXFIELD);POPNEST;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPENALTY(EQTB[13179].INT);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPARAMGLUE(3);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.RH:=P;IF P<>0 THEN CURLIST.TAILFIELD:=Q;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPENALTY(EQTB[13180].INT);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPARAMGLUE(4);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
CURLIST.AUXFIELD.INT:=AUXSAVE.INT;RESUMEAFTERDISPLAY;END{:1206}
ELSE BEGIN CURLIST.AUXFIELD:=AUXSAVE;MEM[CURLIST.TAILFIELD].HH.RH:=P;
IF P<>0 THEN CURLIST.TAILFIELD:=Q;IF CURLIST.MODEFIELD=1 THEN BUILDPAGE;
END{:812};END;{785:}PROCEDURE ALIGNPEEK;LABEL 20;
BEGIN 20:ALIGNSTATE:=1000000;REPEAT GETXORPROTECTED;UNTIL CURCMD<>10;
IF CURCMD=34 THEN BEGIN SCANLEFTBRACE;NEWSAVELEVEL(7);
IF CURLIST.MODEFIELD=-1 THEN NORMALPARAGRAPH;
END ELSE IF CURCMD=2 THEN FINALIGN ELSE IF(CURCMD=5)AND(CURCHR=258)THEN
GOTO 20 ELSE BEGIN INITROW;INITCOL;END;END;{:785}{:800}{815:}{826:}
FUNCTION FINITESHRINK(P:HALFWORD):HALFWORD;VAR Q:HALFWORD;
BEGIN IF NOSHRINKERRORYET THEN BEGIN NOSHRINKERRORYET:=FALSE;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(926);END;BEGIN HELPPTR:=5;HELPLINE[4]:=927;
HELPLINE[3]:=928;HELPLINE[2]:=929;HELPLINE[1]:=930;HELPLINE[0]:=931;END;
ERROR;END;Q:=NEWSPEC(P);MEM[Q].HH.B1:=0;DELETEGLUEREF(P);
FINITESHRINK:=Q;END;{:826}{829:}PROCEDURE TRYBREAK(PI:INTEGER;
BREAKTYPE:SMALLNUMBER);LABEL 10,30,31,22,60,40,45;VAR R:HALFWORD;
PREVR:HALFWORD;OLDL:HALFWORD;NOBREAKYET:BOOLEAN;{830:}
PREVPREVR:HALFWORD;S:HALFWORD;Q:HALFWORD;V:HALFWORD;T:INTEGER;
F:INTERNALFONTNUMBER;L:HALFWORD;NODERSTAYSACTIVE:BOOLEAN;
LINEWIDTH:SCALED;FITCLASS:0..3;B:HALFWORD;D:INTEGER;
ARTIFICIALDEMERITS:BOOLEAN;SAVELINK:HALFWORD;SHORTFALL:SCALED;{:830}
{1577:}G:SCALED;{:1577}BEGIN{831:}
IF ABS(PI)>=10000 THEN IF PI>0 THEN GOTO 10 ELSE PI:=-10000{:831};
NOBREAKYET:=TRUE;PREVR:=327137;OLDL:=0;
CURACTIVEWIDTH[1]:=ACTIVEWIDTH[1];CURACTIVEWIDTH[2]:=ACTIVEWIDTH[2];
CURACTIVEWIDTH[3]:=ACTIVEWIDTH[3];CURACTIVEWIDTH[4]:=ACTIVEWIDTH[4];
CURACTIVEWIDTH[5]:=ACTIVEWIDTH[5];CURACTIVEWIDTH[6]:=ACTIVEWIDTH[6];
WHILE TRUE DO BEGIN 22:R:=MEM[PREVR].HH.RH;{832:}
IF MEM[R].HH.B0=2 THEN BEGIN CURACTIVEWIDTH[1]:=CURACTIVEWIDTH[1]+MEM[R
+1].INT;CURACTIVEWIDTH[2]:=CURACTIVEWIDTH[2]+MEM[R+2].INT;
CURACTIVEWIDTH[3]:=CURACTIVEWIDTH[3]+MEM[R+3].INT;
CURACTIVEWIDTH[4]:=CURACTIVEWIDTH[4]+MEM[R+4].INT;
CURACTIVEWIDTH[5]:=CURACTIVEWIDTH[5]+MEM[R+5].INT;
CURACTIVEWIDTH[6]:=CURACTIVEWIDTH[6]+MEM[R+6].INT;PREVPREVR:=PREVR;
PREVR:=R;GOTO 22;END{:832};{835:}BEGIN L:=MEM[R+1].HH.LH;
IF L>OLDL THEN BEGIN IF(MINIMUMDEMERITS<1073741823)AND((OLDL<>EASYLINE)
OR(R=327137))THEN{836:}BEGIN IF NOBREAKYET THEN{837:}
BEGIN NOBREAKYET:=FALSE;BREAKWIDTH[1]:=BACKGROUND[1];
BREAKWIDTH[2]:=BACKGROUND[2];BREAKWIDTH[3]:=BACKGROUND[3];
BREAKWIDTH[4]:=BACKGROUND[4];BREAKWIDTH[5]:=BACKGROUND[5];
BREAKWIDTH[6]:=BACKGROUND[6];S:=CURP;
IF BREAKTYPE>0 THEN IF CURP<>0 THEN{840:}BEGIN T:=MEM[CURP].HH.B1;
V:=CURP;S:=MEM[CURP+1].HH.RH;WHILE T>0 DO BEGIN T:=T-1;V:=MEM[V].HH.RH;
{841:}IF(V>=HIMEMMIN)THEN BEGIN F:=MEM[V].HH.B0;
BREAKWIDTH[1]:=BREAKWIDTH[1]-FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+
MEM[V].HH.B1].QQQQ.B0].INT;
END ELSE CASE MEM[V].HH.B0 OF 6:BEGIN F:=MEM[V+1].HH.B0;
BREAKWIDTH[1]:=BREAKWIDTH[1]-FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+
MEM[V+1].HH.B1].QQQQ.B0].INT;END;
0,1,2,11:BREAKWIDTH[1]:=BREAKWIDTH[1]-MEM[V+1].INT;
OTHERWISE CONFUSION(932)END{:841};END;WHILE S<>0 DO BEGIN{842:}
IF(S>=HIMEMMIN)THEN BEGIN F:=MEM[S].HH.B0;
BREAKWIDTH[1]:=BREAKWIDTH[1]+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+
MEM[S].HH.B1].QQQQ.B0].INT;
END ELSE CASE MEM[S].HH.B0 OF 6:BEGIN F:=MEM[S+1].HH.B0;
BREAKWIDTH[1]:=BREAKWIDTH[1]+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+
MEM[S+1].HH.B1].QQQQ.B0].INT;END;
0,1,2,11:BREAKWIDTH[1]:=BREAKWIDTH[1]+MEM[S+1].INT;
OTHERWISE CONFUSION(933)END{:842};S:=MEM[S].HH.RH;END;
BREAKWIDTH[1]:=BREAKWIDTH[1]+DISCWIDTH;
IF MEM[CURP+1].HH.RH=0 THEN S:=MEM[V].HH.RH;END{:840};
WHILE S<>0 DO BEGIN IF(S>=HIMEMMIN)THEN GOTO 30;
CASE MEM[S].HH.B0 OF 10:{838:}BEGIN V:=MEM[S+1].HH.LH;
BREAKWIDTH[1]:=BREAKWIDTH[1]-MEM[V+1].INT;
BREAKWIDTH[2+MEM[V].HH.B0]:=BREAKWIDTH[2+MEM[V].HH.B0]-MEM[V+2].INT;
BREAKWIDTH[6]:=BREAKWIDTH[6]-MEM[V+3].INT;END{:838};12:;
9:BREAKWIDTH[1]:=BREAKWIDTH[1]-MEM[S+1].INT;
11:IF MEM[S].HH.B1<>1 THEN GOTO 30 ELSE BREAKWIDTH[1]:=BREAKWIDTH[1]-MEM
[S+1].INT;OTHERWISE GOTO 30 END;S:=MEM[S].HH.RH;END;30:END{:837};{843:}
IF MEM[PREVR].HH.B0=2 THEN BEGIN MEM[PREVR+1].INT:=MEM[PREVR+1].INT-
CURACTIVEWIDTH[1]+BREAKWIDTH[1];
MEM[PREVR+2].INT:=MEM[PREVR+2].INT-CURACTIVEWIDTH[2]+BREAKWIDTH[2];
MEM[PREVR+3].INT:=MEM[PREVR+3].INT-CURACTIVEWIDTH[3]+BREAKWIDTH[3];
MEM[PREVR+4].INT:=MEM[PREVR+4].INT-CURACTIVEWIDTH[4]+BREAKWIDTH[4];
MEM[PREVR+5].INT:=MEM[PREVR+5].INT-CURACTIVEWIDTH[5]+BREAKWIDTH[5];
MEM[PREVR+6].INT:=MEM[PREVR+6].INT-CURACTIVEWIDTH[6]+BREAKWIDTH[6];
END ELSE IF PREVR=327137 THEN BEGIN ACTIVEWIDTH[1]:=BREAKWIDTH[1];
ACTIVEWIDTH[2]:=BREAKWIDTH[2];ACTIVEWIDTH[3]:=BREAKWIDTH[3];
ACTIVEWIDTH[4]:=BREAKWIDTH[4];ACTIVEWIDTH[5]:=BREAKWIDTH[5];
ACTIVEWIDTH[6]:=BREAKWIDTH[6];END ELSE BEGIN Q:=GETNODE(7);
MEM[Q].HH.RH:=R;MEM[Q].HH.B0:=2;MEM[Q].HH.B1:=0;
MEM[Q+1].INT:=BREAKWIDTH[1]-CURACTIVEWIDTH[1];
MEM[Q+2].INT:=BREAKWIDTH[2]-CURACTIVEWIDTH[2];
MEM[Q+3].INT:=BREAKWIDTH[3]-CURACTIVEWIDTH[3];
MEM[Q+4].INT:=BREAKWIDTH[4]-CURACTIVEWIDTH[4];
MEM[Q+5].INT:=BREAKWIDTH[5]-CURACTIVEWIDTH[5];
MEM[Q+6].INT:=BREAKWIDTH[6]-CURACTIVEWIDTH[6];MEM[PREVR].HH.RH:=Q;
PREVPREVR:=PREVR;PREVR:=Q;END{:843};
IF ABS(EQTB[13184].INT)>=1073741823-MINIMUMDEMERITS THEN MINIMUMDEMERITS
:=1073741822 ELSE MINIMUMDEMERITS:=MINIMUMDEMERITS+ABS(EQTB[13184].INT);
FOR FITCLASS:=0 TO 3 DO BEGIN IF MINIMALDEMERITS[FITCLASS]<=
MINIMUMDEMERITS THEN{845:}BEGIN Q:=GETNODE(2);MEM[Q].HH.RH:=PASSIVE;
PASSIVE:=Q;MEM[Q+1].HH.RH:=CURP;PASSNUMBER:=PASSNUMBER+1;
MEM[Q].HH.LH:=PASSNUMBER;MEM[Q+1].HH.LH:=BESTPLACE[FITCLASS];
Q:=GETNODE(ACTIVENODESIZE);MEM[Q+1].HH.RH:=PASSIVE;
MEM[Q+1].HH.LH:=BESTPLLINE[FITCLASS]+1;MEM[Q].HH.B1:=FITCLASS;
MEM[Q].HH.B0:=BREAKTYPE;MEM[Q+2].INT:=MINIMALDEMERITS[FITCLASS];
IF DOLASTLINEFIT THEN{1584:}BEGIN MEM[Q+3].INT:=BESTPLSHORT[FITCLASS];
MEM[Q+4].INT:=BESTPLGLUE[FITCLASS];END{:1584};MEM[Q].HH.RH:=R;
MEM[PREVR].HH.RH:=Q;PREVR:=Q;IF EQTB[13200].INT>0 THEN{846:}
BEGIN PRINTNL(934);PRINTINT(MEM[PASSIVE].HH.LH);PRINT(935);
PRINTINT(MEM[Q+1].HH.LH-1);PRINTCHAR(46);PRINTINT(FITCLASS);
IF BREAKTYPE=1 THEN PRINTCHAR(45);PRINT(936);PRINTINT(MEM[Q+2].INT);
IF DOLASTLINEFIT THEN{1585:}BEGIN PRINT(1407);PRINTSCALED(MEM[Q+3].INT);
IF CURP=0 THEN PRINT(1408)ELSE PRINT(1005);PRINTSCALED(MEM[Q+4].INT);
END{:1585};PRINT(937);
IF MEM[PASSIVE+1].HH.LH=0 THEN PRINTCHAR(48)ELSE PRINTINT(MEM[MEM[
PASSIVE+1].HH.LH].HH.LH);END{:846};END{:845};
MINIMALDEMERITS[FITCLASS]:=1073741823;END;MINIMUMDEMERITS:=1073741823;
{844:}IF R<>327137 THEN BEGIN Q:=GETNODE(7);MEM[Q].HH.RH:=R;
MEM[Q].HH.B0:=2;MEM[Q].HH.B1:=0;
MEM[Q+1].INT:=CURACTIVEWIDTH[1]-BREAKWIDTH[1];
MEM[Q+2].INT:=CURACTIVEWIDTH[2]-BREAKWIDTH[2];
MEM[Q+3].INT:=CURACTIVEWIDTH[3]-BREAKWIDTH[3];
MEM[Q+4].INT:=CURACTIVEWIDTH[4]-BREAKWIDTH[4];
MEM[Q+5].INT:=CURACTIVEWIDTH[5]-BREAKWIDTH[5];
MEM[Q+6].INT:=CURACTIVEWIDTH[6]-BREAKWIDTH[6];MEM[PREVR].HH.RH:=Q;
PREVPREVR:=PREVR;PREVR:=Q;END{:844};END{:836};IF R=327137 THEN GOTO 10;
{850:}IF L>EASYLINE THEN BEGIN LINEWIDTH:=SECONDWIDTH;OLDL:=327144;
END ELSE BEGIN OLDL:=L;
IF L>LASTSPECIALLINE THEN LINEWIDTH:=SECONDWIDTH ELSE IF EQTB[11312].HH.
RH=0 THEN LINEWIDTH:=FIRSTWIDTH ELSE LINEWIDTH:=MEM[EQTB[11312].HH.RH+2*
L].INT;END{:850};END;END{:835};{851:}BEGIN ARTIFICIALDEMERITS:=FALSE;
SHORTFALL:=LINEWIDTH-CURACTIVEWIDTH[1];IF SHORTFALL>0 THEN{852:}
IF(CURACTIVEWIDTH[3]<>0)OR(CURACTIVEWIDTH[4]<>0)OR(CURACTIVEWIDTH[5]<>0)
THEN BEGIN IF DOLASTLINEFIT THEN BEGIN IF CURP=0 THEN{1579:}
BEGIN IF(MEM[R+3].INT=0)OR(MEM[R+4].INT<=0)THEN GOTO 45;
IF(CURACTIVEWIDTH[3]<>FILLWIDTH[0])OR(CURACTIVEWIDTH[4]<>FILLWIDTH[1])OR
(CURACTIVEWIDTH[5]<>FILLWIDTH[2])THEN GOTO 45;
IF MEM[R+3].INT>0 THEN G:=CURACTIVEWIDTH[2]ELSE G:=CURACTIVEWIDTH[6];
IF G<=0 THEN GOTO 45;ARITHERROR:=FALSE;
G:=FRACT(G,MEM[R+3].INT,MEM[R+4].INT,1073741823);
IF EQTB[13229].INT<1000 THEN G:=FRACT(G,EQTB[13229].INT,1000,1073741823)
;IF ARITHERROR THEN IF MEM[R+3].INT>0 THEN G:=1073741823 ELSE G:=
-1073741823;IF G>0 THEN{1580:}BEGIN IF G>SHORTFALL THEN G:=SHORTFALL;
IF G>7230584 THEN IF CURACTIVEWIDTH[2]<1663497 THEN BEGIN B:=10000;
FITCLASS:=0;GOTO 40;END;B:=BADNESS(G,CURACTIVEWIDTH[2]);
IF B>12 THEN IF B>99 THEN FITCLASS:=0 ELSE FITCLASS:=1 ELSE FITCLASS:=2;
GOTO 40;END{:1580}ELSE IF G<0 THEN{1581:}
BEGIN IF-G>CURACTIVEWIDTH[6]THEN G:=-CURACTIVEWIDTH[6];
B:=BADNESS(-G,CURACTIVEWIDTH[6]);
IF B>12 THEN FITCLASS:=3 ELSE FITCLASS:=2;GOTO 40;END{:1581};
45:END{:1579};SHORTFALL:=0;END;B:=0;FITCLASS:=2;
END ELSE BEGIN IF SHORTFALL>7230584 THEN IF CURACTIVEWIDTH[2]<1663497
THEN BEGIN B:=10000;FITCLASS:=0;GOTO 31;END;
B:=BADNESS(SHORTFALL,CURACTIVEWIDTH[2]);
IF B>12 THEN IF B>99 THEN FITCLASS:=0 ELSE FITCLASS:=1 ELSE FITCLASS:=2;
31:END{:852}ELSE{853:}
BEGIN IF-SHORTFALL>CURACTIVEWIDTH[6]THEN B:=10001 ELSE B:=BADNESS(-
SHORTFALL,CURACTIVEWIDTH[6]);IF B>12 THEN FITCLASS:=3 ELSE FITCLASS:=2;
END{:853};IF DOLASTLINEFIT THEN{1582:}BEGIN IF CURP=0 THEN SHORTFALL:=0;
IF SHORTFALL>0 THEN G:=CURACTIVEWIDTH[2]ELSE IF SHORTFALL<0 THEN G:=
CURACTIVEWIDTH[6]ELSE G:=0;END{:1582};
40:IF(B>10000)OR(PI=-10000)THEN{854:}
BEGIN IF FINALPASS AND(MINIMUMDEMERITS=1073741823)AND(MEM[R].HH.RH=
327137)AND(PREVR=327137)THEN ARTIFICIALDEMERITS:=TRUE ELSE IF B>
THRESHOLD THEN GOTO 60;NODERSTAYSACTIVE:=FALSE;END{:854}
ELSE BEGIN PREVR:=R;IF B>THRESHOLD THEN GOTO 22;NODERSTAYSACTIVE:=TRUE;
END;{855:}IF ARTIFICIALDEMERITS THEN D:=0 ELSE{859:}
BEGIN D:=EQTB[13170].INT+B;
IF ABS(D)>=10000 THEN D:=100000000 ELSE D:=D*D;
IF PI<>0 THEN IF PI>0 THEN D:=D+PI*PI ELSE IF PI>-10000 THEN D:=D-PI*PI;
IF(BREAKTYPE=1)AND(MEM[R].HH.B0=1)THEN IF CURP<>0 THEN D:=D+EQTB[13182].
INT ELSE D:=D+EQTB[13183].INT;
IF ABS(FITCLASS-MEM[R].HH.B1)>1 THEN D:=D+EQTB[13184].INT;END{:859};
IF EQTB[13200].INT>0 THEN{856:}BEGIN IF PRINTEDNODE<>CURP THEN{857:}
BEGIN PRINTNL(339);
IF CURP=0 THEN SHORTDISPLAY(MEM[PRINTEDNODE].HH.RH)ELSE BEGIN SAVELINK:=
MEM[CURP].HH.RH;MEM[CURP].HH.RH:=0;PRINTNL(339);
SHORTDISPLAY(MEM[PRINTEDNODE].HH.RH);MEM[CURP].HH.RH:=SAVELINK;END;
PRINTEDNODE:=CURP;END{:857};PRINTNL(64);
IF CURP=0 THEN PRINTESC(606)ELSE IF MEM[CURP].HH.B0<>10 THEN BEGIN IF
MEM[CURP].HH.B0=12 THEN PRINTESC(535)ELSE IF MEM[CURP].HH.B0=7 THEN
PRINTESC(352)ELSE IF MEM[CURP].HH.B0=11 THEN PRINTESC(341)ELSE PRINTESC(
346);END;PRINT(938);
IF MEM[R+1].HH.RH=0 THEN PRINTCHAR(48)ELSE PRINTINT(MEM[MEM[R+1].HH.RH].
HH.LH);PRINT(939);IF B>10000 THEN PRINTCHAR(42)ELSE PRINTINT(B);
PRINT(940);PRINTINT(PI);PRINT(941);
IF ARTIFICIALDEMERITS THEN PRINTCHAR(42)ELSE PRINTINT(D);END{:856};
D:=D+MEM[R+2].INT;
IF D<=MINIMALDEMERITS[FITCLASS]THEN BEGIN MINIMALDEMERITS[FITCLASS]:=D;
BESTPLACE[FITCLASS]:=MEM[R+1].HH.RH;BESTPLLINE[FITCLASS]:=L;
IF DOLASTLINEFIT THEN{1583:}BEGIN BESTPLSHORT[FITCLASS]:=SHORTFALL;
BESTPLGLUE[FITCLASS]:=G;END{:1583};
IF D<MINIMUMDEMERITS THEN MINIMUMDEMERITS:=D;END{:855};
IF NODERSTAYSACTIVE THEN GOTO 22;60:{860:}
MEM[PREVR].HH.RH:=MEM[R].HH.RH;FREENODE(R,ACTIVENODESIZE);
IF PREVR=327137 THEN{861:}BEGIN R:=MEM[327137].HH.RH;
IF MEM[R].HH.B0=2 THEN BEGIN ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+MEM[R+1].INT
;ACTIVEWIDTH[2]:=ACTIVEWIDTH[2]+MEM[R+2].INT;
ACTIVEWIDTH[3]:=ACTIVEWIDTH[3]+MEM[R+3].INT;
ACTIVEWIDTH[4]:=ACTIVEWIDTH[4]+MEM[R+4].INT;
ACTIVEWIDTH[5]:=ACTIVEWIDTH[5]+MEM[R+5].INT;
ACTIVEWIDTH[6]:=ACTIVEWIDTH[6]+MEM[R+6].INT;
CURACTIVEWIDTH[1]:=ACTIVEWIDTH[1];CURACTIVEWIDTH[2]:=ACTIVEWIDTH[2];
CURACTIVEWIDTH[3]:=ACTIVEWIDTH[3];CURACTIVEWIDTH[4]:=ACTIVEWIDTH[4];
CURACTIVEWIDTH[5]:=ACTIVEWIDTH[5];CURACTIVEWIDTH[6]:=ACTIVEWIDTH[6];
MEM[327137].HH.RH:=MEM[R].HH.RH;FREENODE(R,7);END;END{:861}
ELSE IF MEM[PREVR].HH.B0=2 THEN BEGIN R:=MEM[PREVR].HH.RH;
IF R=327137 THEN BEGIN CURACTIVEWIDTH[1]:=CURACTIVEWIDTH[1]-MEM[PREVR+1]
.INT;CURACTIVEWIDTH[2]:=CURACTIVEWIDTH[2]-MEM[PREVR+2].INT;
CURACTIVEWIDTH[3]:=CURACTIVEWIDTH[3]-MEM[PREVR+3].INT;
CURACTIVEWIDTH[4]:=CURACTIVEWIDTH[4]-MEM[PREVR+4].INT;
CURACTIVEWIDTH[5]:=CURACTIVEWIDTH[5]-MEM[PREVR+5].INT;
CURACTIVEWIDTH[6]:=CURACTIVEWIDTH[6]-MEM[PREVR+6].INT;
MEM[PREVPREVR].HH.RH:=327137;FREENODE(PREVR,7);PREVR:=PREVPREVR;
END ELSE IF MEM[R].HH.B0=2 THEN BEGIN CURACTIVEWIDTH[1]:=CURACTIVEWIDTH[
1]+MEM[R+1].INT;CURACTIVEWIDTH[2]:=CURACTIVEWIDTH[2]+MEM[R+2].INT;
CURACTIVEWIDTH[3]:=CURACTIVEWIDTH[3]+MEM[R+3].INT;
CURACTIVEWIDTH[4]:=CURACTIVEWIDTH[4]+MEM[R+4].INT;
CURACTIVEWIDTH[5]:=CURACTIVEWIDTH[5]+MEM[R+5].INT;
CURACTIVEWIDTH[6]:=CURACTIVEWIDTH[6]+MEM[R+6].INT;
MEM[PREVR+1].INT:=MEM[PREVR+1].INT+MEM[R+1].INT;
MEM[PREVR+2].INT:=MEM[PREVR+2].INT+MEM[R+2].INT;
MEM[PREVR+3].INT:=MEM[PREVR+3].INT+MEM[R+3].INT;
MEM[PREVR+4].INT:=MEM[PREVR+4].INT+MEM[R+4].INT;
MEM[PREVR+5].INT:=MEM[PREVR+5].INT+MEM[R+5].INT;
MEM[PREVR+6].INT:=MEM[PREVR+6].INT+MEM[R+6].INT;
MEM[PREVR].HH.RH:=MEM[R].HH.RH;FREENODE(R,7);END;END{:860};END{:851};
END;10:{858:}
IF CURP=PRINTEDNODE THEN IF CURP<>0 THEN IF MEM[CURP].HH.B0=7 THEN BEGIN
T:=MEM[CURP].HH.B1;WHILE T>0 DO BEGIN T:=T-1;
PRINTEDNODE:=MEM[PRINTEDNODE].HH.RH;END;END{:858}END;{:829}{877:}
PROCEDURE POSTLINEBREAK(D:BOOLEAN);LABEL 30,31;VAR Q,R,S:HALFWORD;
DISCBREAK:BOOLEAN;POSTDISCBREAK:BOOLEAN;CURWIDTH:SCALED;
CURINDENT:SCALED;T:QUARTERWORD;PEN:INTEGER;CURLINE:HALFWORD;
LRPTR:HALFWORD;BEGIN LRPTR:=CURLIST.ETEXAUXFIELD;{878:}
Q:=MEM[BESTBET+1].HH.RH;CURP:=0;REPEAT R:=Q;Q:=MEM[Q+1].HH.LH;
MEM[R+1].HH.LH:=CURP;CURP:=R;UNTIL Q=0{:878};CURLINE:=CURLIST.PGFIELD+1;
REPEAT{880:}IF(EQTB[13232].INT>0)THEN{1441:}BEGIN Q:=MEM[327141].HH.RH;
IF LRPTR<>0 THEN BEGIN TEMPPTR:=LRPTR;R:=Q;
REPEAT S:=NEWMATH(0,(MEM[TEMPPTR].HH.LH-1));MEM[S].HH.RH:=R;R:=S;
TEMPPTR:=MEM[TEMPPTR].HH.RH;UNTIL TEMPPTR=0;MEM[327141].HH.RH:=R;END;
WHILE Q<>MEM[CURP+1].HH.RH DO BEGIN IF NOT(Q>=HIMEMMIN)THEN IF MEM[Q].HH
.B0=9 THEN{1442:}
IF ODD(MEM[Q].HH.B1)THEN BEGIN IF LRPTR<>0 THEN IF MEM[LRPTR].HH.LH=(4*(
MEM[Q].HH.B1 DIV 4)+3)THEN BEGIN TEMPPTR:=LRPTR;
LRPTR:=MEM[TEMPPTR].HH.RH;BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;
AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;END;
END ELSE BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=(4*(MEM[Q].HH.B1 DIV 4)+3);
MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;END{:1442};Q:=MEM[Q].HH.RH;END;
END{:1441};{881:}Q:=MEM[CURP+1].HH.RH;DISCBREAK:=FALSE;
POSTDISCBREAK:=FALSE;
IF Q<>0 THEN IF MEM[Q].HH.B0=10 THEN BEGIN DELETEGLUEREF(MEM[Q+1].HH.LH)
;MEM[Q+1].HH.LH:=EQTB[10790].HH.RH;MEM[Q].HH.B1:=9;
MEM[EQTB[10790].HH.RH].HH.RH:=MEM[EQTB[10790].HH.RH].HH.RH+1;GOTO 30;
END ELSE BEGIN IF MEM[Q].HH.B0=7 THEN{882:}BEGIN T:=MEM[Q].HH.B1;{883:}
IF T=0 THEN R:=MEM[Q].HH.RH ELSE BEGIN R:=Q;
WHILE T>1 DO BEGIN R:=MEM[R].HH.RH;T:=T-1;END;S:=MEM[R].HH.RH;
R:=MEM[S].HH.RH;MEM[S].HH.RH:=0;FLUSHNODELIST(MEM[Q].HH.RH);
MEM[Q].HH.B1:=0;END{:883};IF MEM[Q+1].HH.RH<>0 THEN{884:}
BEGIN S:=MEM[Q+1].HH.RH;WHILE MEM[S].HH.RH<>0 DO S:=MEM[S].HH.RH;
MEM[S].HH.RH:=R;R:=MEM[Q+1].HH.RH;MEM[Q+1].HH.RH:=0;POSTDISCBREAK:=TRUE;
END{:884};IF MEM[Q+1].HH.LH<>0 THEN{885:}BEGIN S:=MEM[Q+1].HH.LH;
MEM[Q].HH.RH:=S;WHILE MEM[S].HH.RH<>0 DO S:=MEM[S].HH.RH;
MEM[Q+1].HH.LH:=0;Q:=S;END{:885};MEM[Q].HH.RH:=R;DISCBREAK:=TRUE;
END{:882}
ELSE IF MEM[Q].HH.B0=11 THEN MEM[Q+1].INT:=0 ELSE IF MEM[Q].HH.B0=9 THEN
BEGIN MEM[Q+1].INT:=0;IF(EQTB[13232].INT>0)THEN{1442:}
IF ODD(MEM[Q].HH.B1)THEN BEGIN IF LRPTR<>0 THEN IF MEM[LRPTR].HH.LH=(4*(
MEM[Q].HH.B1 DIV 4)+3)THEN BEGIN TEMPPTR:=LRPTR;
LRPTR:=MEM[TEMPPTR].HH.RH;BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;
AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;END;
END ELSE BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=(4*(MEM[Q].HH.B1 DIV 4)+3);
MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;END{:1442};END;
END ELSE BEGIN Q:=327141;WHILE MEM[Q].HH.RH<>0 DO Q:=MEM[Q].HH.RH;END;
{886:}R:=NEWPARAMGLUE(8);MEM[R].HH.RH:=MEM[Q].HH.RH;MEM[Q].HH.RH:=R;
Q:=R{:886};30:{:881};IF(EQTB[13232].INT>0)THEN{1443:}
IF LRPTR<>0 THEN BEGIN S:=327141;R:=MEM[S].HH.RH;
WHILE R<>Q DO BEGIN S:=R;R:=MEM[S].HH.RH;END;R:=LRPTR;
WHILE R<>0 DO BEGIN TEMPPTR:=NEWMATH(0,MEM[R].HH.LH);
MEM[S].HH.RH:=TEMPPTR;S:=TEMPPTR;R:=MEM[R].HH.RH;END;MEM[S].HH.RH:=Q;
END{:1443};{887:}R:=MEM[Q].HH.RH;MEM[Q].HH.RH:=0;Q:=MEM[327141].HH.RH;
MEM[327141].HH.RH:=R;
IF EQTB[10789].HH.RH<>0 THEN BEGIN R:=NEWPARAMGLUE(7);MEM[R].HH.RH:=Q;
Q:=R;END{:887};{889:}
IF CURLINE>LASTSPECIALLINE THEN BEGIN CURWIDTH:=SECONDWIDTH;
CURINDENT:=SECONDINDENT;
END ELSE IF EQTB[11312].HH.RH=0 THEN BEGIN CURWIDTH:=FIRSTWIDTH;
CURINDENT:=FIRSTINDENT;
END ELSE BEGIN CURWIDTH:=MEM[EQTB[11312].HH.RH+2*CURLINE].INT;
CURINDENT:=MEM[EQTB[11312].HH.RH+2*CURLINE-1].INT;END;
ADJUSTTAIL:=327139;JUSTBOX:=HPACK(Q,CURWIDTH,0);
MEM[JUSTBOX+4].INT:=CURINDENT{:889};{888:}APPENDTOVLIST(JUSTBOX);
IF 327139<>ADJUSTTAIL THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=MEM[
327139].HH.RH;CURLIST.TAILFIELD:=ADJUSTTAIL;END;ADJUSTTAIL:=0{:888};
{890:}IF CURLINE+1<>BESTLINE THEN BEGIN Q:=EQTB[11313].HH.RH;
IF Q<>0 THEN BEGIN R:=CURLINE;IF R>MEM[Q+1].INT THEN R:=MEM[Q+1].INT;
PEN:=MEM[Q+R+1].INT;END ELSE PEN:=EQTB[13181].INT;Q:=EQTB[11314].HH.RH;
IF Q<>0 THEN BEGIN R:=CURLINE-CURLIST.PGFIELD;
IF R>MEM[Q+1].INT THEN R:=MEM[Q+1].INT;PEN:=PEN+MEM[Q+R+1].INT;
END ELSE IF CURLINE=CURLIST.PGFIELD+1 THEN PEN:=PEN+EQTB[13173].INT;
IF D THEN Q:=EQTB[11316].HH.RH ELSE Q:=EQTB[11315].HH.RH;
IF Q<>0 THEN BEGIN R:=BESTLINE-CURLINE-1;
IF R>MEM[Q+1].INT THEN R:=MEM[Q+1].INT;PEN:=PEN+MEM[Q+R+1].INT;
END ELSE IF CURLINE+2=BESTLINE THEN IF D THEN PEN:=PEN+EQTB[13175].INT
ELSE PEN:=PEN+EQTB[13174].INT;
IF DISCBREAK THEN PEN:=PEN+EQTB[13176].INT;
IF PEN<>0 THEN BEGIN R:=NEWPENALTY(PEN);MEM[CURLIST.TAILFIELD].HH.RH:=R;
CURLIST.TAILFIELD:=R;END;END{:890}{:880};CURLINE:=CURLINE+1;
CURP:=MEM[CURP+1].HH.LH;IF CURP<>0 THEN IF NOT POSTDISCBREAK THEN{879:}
BEGIN R:=327141;WHILE TRUE DO BEGIN Q:=MEM[R].HH.RH;
IF Q=MEM[CURP+1].HH.RH THEN GOTO 31;IF(Q>=HIMEMMIN)THEN GOTO 31;
IF(MEM[Q].HH.B0<9)THEN GOTO 31;
IF MEM[Q].HH.B0=11 THEN IF MEM[Q].HH.B1<>1 THEN GOTO 31;R:=Q;
IF MEM[Q].HH.B0=9 THEN IF(EQTB[13232].INT>0)THEN{1442:}
IF ODD(MEM[Q].HH.B1)THEN BEGIN IF LRPTR<>0 THEN IF MEM[LRPTR].HH.LH=(4*(
MEM[Q].HH.B1 DIV 4)+3)THEN BEGIN TEMPPTR:=LRPTR;
LRPTR:=MEM[TEMPPTR].HH.RH;BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;
AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;END;
END ELSE BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=(4*(MEM[Q].HH.B1 DIV 4)+3);
MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;END{:1442};END;
31:IF R<>327141 THEN BEGIN MEM[R].HH.RH:=0;
FLUSHNODELIST(MEM[327141].HH.RH);MEM[327141].HH.RH:=Q;END;END{:879};
UNTIL CURP=0;
IF(CURLINE<>BESTLINE)OR(MEM[327141].HH.RH<>0)THEN CONFUSION(948);
CURLIST.PGFIELD:=BESTLINE-1;CURLIST.ETEXAUXFIELD:=LRPTR;END;{:877}{895:}
{906:}FUNCTION RECONSTITUTE(J,N:SMALLNUMBER;
BCHAR,HCHAR:HALFWORD):SMALLNUMBER;LABEL 22,30;VAR P:HALFWORD;T:HALFWORD;
Q:FOURQUARTERS;CURRH:HALFWORD;TESTCHAR:HALFWORD;W:SCALED;K:FONTINDEX;
BEGIN HYPHENPASSED:=0;T:=327140;W:=0;MEM[327140].HH.RH:=0;{908:}
CURL:=HU[J];CURQ:=T;IF J=0 THEN BEGIN LIGATUREPRESENT:=INITLIG;
P:=INITLIST;IF LIGATUREPRESENT THEN LFTHIT:=INITLFT;
WHILE P>0 DO BEGIN BEGIN MEM[T].HH.RH:=GETAVAIL;T:=MEM[T].HH.RH;
MEM[T].HH.B0:=HF;MEM[T].HH.B1:=MEM[P].HH.B1;END;P:=MEM[P].HH.RH;END;
END ELSE IF CURL<256 THEN BEGIN MEM[T].HH.RH:=GETAVAIL;T:=MEM[T].HH.RH;
MEM[T].HH.B0:=HF;MEM[T].HH.B1:=CURL;END;LIGSTACK:=0;
BEGIN IF J<N THEN CURR:=HU[J+1]ELSE CURR:=BCHAR;
IF ODD(HYF[J])THEN CURRH:=HCHAR ELSE CURRH:=256;END{:908};22:{909:}
IF CURL=256 THEN BEGIN K:=BCHARLABEL[HF];
IF K=0 THEN GOTO 30 ELSE Q:=FONTINFO[K].QQQQ;
END ELSE BEGIN Q:=FONTINFO[CHARBASE[HF]+CURL].QQQQ;
IF((Q.B2)MOD 4)<>1 THEN GOTO 30;K:=LIGKERNBASE[HF]+Q.B3;
Q:=FONTINFO[K].QQQQ;
IF Q.B0>128 THEN BEGIN K:=LIGKERNBASE[HF]+256*Q.B2+Q.B3+32768-256*(128);
Q:=FONTINFO[K].QQQQ;END;END;
IF CURRH<256 THEN TESTCHAR:=CURRH ELSE TESTCHAR:=CURR;
WHILE TRUE DO BEGIN IF Q.B1=TESTCHAR THEN IF Q.B0<=128 THEN IF CURRH<256
THEN BEGIN HYPHENPASSED:=J;HCHAR:=256;CURRH:=256;GOTO 22;
END ELSE BEGIN IF HCHAR<256 THEN IF ODD(HYF[J])THEN BEGIN HYPHENPASSED:=
J;HCHAR:=256;END;IF Q.B2<128 THEN{911:}
BEGIN IF CURL=256 THEN LFTHIT:=TRUE;
IF J=N THEN IF LIGSTACK=0 THEN RTHIT:=TRUE;
BEGIN IF INTERRUPT<>0 THEN PAUSEFORINSTRUCTIONS;END;
CASE Q.B2 OF 1,5:BEGIN CURL:=Q.B3;LIGATUREPRESENT:=TRUE;END;
2,6:BEGIN CURR:=Q.B3;
IF LIGSTACK>0 THEN MEM[LIGSTACK].HH.B1:=CURR ELSE BEGIN LIGSTACK:=
NEWLIGITEM(CURR);IF J=N THEN BCHAR:=256 ELSE BEGIN P:=GETAVAIL;
MEM[LIGSTACK+1].HH.RH:=P;MEM[P].HH.B1:=HU[J+1];MEM[P].HH.B0:=HF;END;END;
END;3:BEGIN CURR:=Q.B3;P:=LIGSTACK;LIGSTACK:=NEWLIGITEM(CURR);
MEM[LIGSTACK].HH.RH:=P;END;
7,11:BEGIN IF LIGATUREPRESENT THEN BEGIN P:=NEWLIGATURE(HF,CURL,MEM[CURQ
].HH.RH);IF LFTHIT THEN BEGIN MEM[P].HH.B1:=2;LFTHIT:=FALSE;END;
IF FALSE THEN IF LIGSTACK=0 THEN BEGIN MEM[P].HH.B1:=MEM[P].HH.B1+1;
RTHIT:=FALSE;END;MEM[CURQ].HH.RH:=P;T:=P;LIGATUREPRESENT:=FALSE;END;
CURQ:=T;CURL:=Q.B3;LIGATUREPRESENT:=TRUE;END;OTHERWISE BEGIN CURL:=Q.B3;
LIGATUREPRESENT:=TRUE;
IF LIGSTACK>0 THEN BEGIN IF MEM[LIGSTACK+1].HH.RH>0 THEN BEGIN MEM[T].HH
.RH:=MEM[LIGSTACK+1].HH.RH;T:=MEM[T].HH.RH;J:=J+1;END;P:=LIGSTACK;
LIGSTACK:=MEM[P].HH.RH;FREENODE(P,2);
IF LIGSTACK=0 THEN BEGIN IF J<N THEN CURR:=HU[J+1]ELSE CURR:=BCHAR;
IF ODD(HYF[J])THEN CURRH:=HCHAR ELSE CURRH:=256;
END ELSE CURR:=MEM[LIGSTACK].HH.B1;
END ELSE IF J=N THEN GOTO 30 ELSE BEGIN BEGIN MEM[T].HH.RH:=GETAVAIL;
T:=MEM[T].HH.RH;MEM[T].HH.B0:=HF;MEM[T].HH.B1:=CURR;END;J:=J+1;
BEGIN IF J<N THEN CURR:=HU[J+1]ELSE CURR:=BCHAR;
IF ODD(HYF[J])THEN CURRH:=HCHAR ELSE CURRH:=256;END;END;END END;
IF Q.B2>4 THEN IF Q.B2<>7 THEN GOTO 30;GOTO 22;END{:911};
W:=FONTINFO[KERNBASE[HF]+256*Q.B2+Q.B3].INT;GOTO 30;END;
IF Q.B0>=128 THEN IF CURRH=256 THEN GOTO 30 ELSE BEGIN CURRH:=256;
GOTO 22;END;K:=K+Q.B0+1;Q:=FONTINFO[K].QQQQ;END;30:{:909};{910:}
IF LIGATUREPRESENT THEN BEGIN P:=NEWLIGATURE(HF,CURL,MEM[CURQ].HH.RH);
IF LFTHIT THEN BEGIN MEM[P].HH.B1:=2;LFTHIT:=FALSE;END;
IF RTHIT THEN IF LIGSTACK=0 THEN BEGIN MEM[P].HH.B1:=MEM[P].HH.B1+1;
RTHIT:=FALSE;END;MEM[CURQ].HH.RH:=P;T:=P;LIGATUREPRESENT:=FALSE;END;
IF W<>0 THEN BEGIN MEM[T].HH.RH:=NEWKERN(W);T:=MEM[T].HH.RH;W:=0;END;
IF LIGSTACK>0 THEN BEGIN CURQ:=T;CURL:=MEM[LIGSTACK].HH.B1;
LIGATUREPRESENT:=TRUE;
BEGIN IF MEM[LIGSTACK+1].HH.RH>0 THEN BEGIN MEM[T].HH.RH:=MEM[LIGSTACK+1
].HH.RH;T:=MEM[T].HH.RH;J:=J+1;END;P:=LIGSTACK;LIGSTACK:=MEM[P].HH.RH;
FREENODE(P,2);
IF LIGSTACK=0 THEN BEGIN IF J<N THEN CURR:=HU[J+1]ELSE CURR:=BCHAR;
IF ODD(HYF[J])THEN CURRH:=HCHAR ELSE CURRH:=256;
END ELSE CURR:=MEM[LIGSTACK].HH.B1;END;GOTO 22;END{:910};
RECONSTITUTE:=J;END;{:906}PROCEDURE HYPHENATE;
LABEL 50,30,40,41,42,45,10;VAR{901:}I,J,L:0..65;Q,R,S:HALFWORD;
BCHAR:HALFWORD;{:901}{912:}MAJORTAIL,MINORTAIL:HALFWORD;C:ASCIICODE;
CLOC:0..63;RCOUNT:INTEGER;HYFNODE:HALFWORD;{:912}{922:}Z:TRIEPOINTER;
V:INTEGER;{:922}{929:}H:HYPHPOINTER;K:STRNUMBER;U:POOLPOINTER;{:929}
BEGIN{923:}FOR J:=0 TO HN DO HYF[J]:=0;{930:}H:=HC[1];HN:=HN+1;
HC[HN]:=CURLANG;FOR J:=2 TO HN DO H:=(H+H+HC[J])MOD 503;
WHILE TRUE DO BEGIN{931:}K:=HYPHWORD[H];IF K=0 THEN GOTO 45;
IF(STRSTART[K+1]-STRSTART[K])<HN THEN GOTO 45;
IF(STRSTART[K+1]-STRSTART[K])=HN THEN BEGIN J:=1;U:=STRSTART[K];
REPEAT IF STRPOOL[U]<HC[J]THEN GOTO 45;IF STRPOOL[U]>HC[J]THEN GOTO 30;
J:=J+1;U:=U+1;UNTIL J>HN;{932:}S:=HYPHLIST[H];
WHILE S<>0 DO BEGIN HYF[MEM[S].HH.LH]:=1;S:=MEM[S].HH.RH;END{:932};
HN:=HN-1;GOTO 40;END;30:{:931};IF H>0 THEN H:=H-1 ELSE H:=503;END;
45:HN:=HN-1{:930};IF TRIE[CURLANG+1].B1<>CURLANG THEN GOTO 10;HC[0]:=0;
HC[HN+1]:=0;HC[HN+2]:=256;
FOR J:=0 TO HN-RHYF+1 DO BEGIN Z:=TRIE[CURLANG+1].RH+HC[J];L:=J;
WHILE HC[L]=TRIE[Z].B1 DO BEGIN IF TRIE[Z].B0<>0 THEN{924:}
BEGIN V:=TRIE[Z].B0;REPEAT V:=V+OPSTART[CURLANG];I:=L-HYFDISTANCE[V];
IF HYFNUM[V]>HYF[I]THEN HYF[I]:=HYFNUM[V];V:=HYFNEXT[V];UNTIL V=0;
END{:924};L:=L+1;Z:=TRIE[Z].RH+HC[L];END;END;
40:FOR J:=0 TO LHYF-1 DO HYF[J]:=0;
FOR J:=0 TO RHYF-1 DO HYF[HN-J]:=0{:923};{902:}
FOR J:=LHYF TO HN-RHYF DO IF ODD(HYF[J])THEN GOTO 41;GOTO 10;41:{:902};
{903:}Q:=MEM[HB].HH.RH;MEM[HB].HH.RH:=0;R:=MEM[HA].HH.RH;
MEM[HA].HH.RH:=0;BCHAR:=HYFBCHAR;
IF(HA>=HIMEMMIN)THEN IF MEM[HA].HH.B0<>HF THEN GOTO 42 ELSE BEGIN
INITLIST:=HA;INITLIG:=FALSE;HU[0]:=MEM[HA].HH.B1;
END ELSE IF MEM[HA].HH.B0=6 THEN IF MEM[HA+1].HH.B0<>HF THEN GOTO 42
ELSE BEGIN INITLIST:=MEM[HA+1].HH.RH;INITLIG:=TRUE;
INITLFT:=(MEM[HA].HH.B1>1);HU[0]:=MEM[HA+1].HH.B1;
IF INITLIST=0 THEN IF INITLFT THEN BEGIN HU[0]:=256;INITLIG:=FALSE;END;
FREENODE(HA,2);
END ELSE BEGIN IF NOT(R>=HIMEMMIN)THEN IF MEM[R].HH.B0=6 THEN IF MEM[R].
HH.B1>1 THEN GOTO 42;J:=1;S:=HA;INITLIST:=0;GOTO 50;END;S:=CURP;
WHILE MEM[S].HH.RH<>HA DO S:=MEM[S].HH.RH;J:=0;GOTO 50;42:S:=HA;J:=0;
HU[0]:=256;INITLIG:=FALSE;INITLIST:=0;50:FLUSHNODELIST(R);{913:}
REPEAT L:=J;J:=RECONSTITUTE(J,HN,BCHAR,HYFCHAR)+1;
IF HYPHENPASSED=0 THEN BEGIN MEM[S].HH.RH:=MEM[327140].HH.RH;
WHILE MEM[S].HH.RH>0 DO S:=MEM[S].HH.RH;IF ODD(HYF[J-1])THEN BEGIN L:=J;
HYPHENPASSED:=J-1;MEM[327140].HH.RH:=0;END;END;
IF HYPHENPASSED>0 THEN{914:}REPEAT R:=GETNODE(2);
MEM[R].HH.RH:=MEM[327140].HH.RH;MEM[R].HH.B0:=7;MAJORTAIL:=R;RCOUNT:=0;
WHILE MEM[MAJORTAIL].HH.RH>0 DO BEGIN MAJORTAIL:=MEM[MAJORTAIL].HH.RH;
RCOUNT:=RCOUNT+1;END;I:=HYPHENPASSED;HYF[I]:=0;{915:}MINORTAIL:=0;
MEM[R+1].HH.LH:=0;HYFNODE:=NEWCHARACTER(HF,HYFCHAR);
IF HYFNODE<>0 THEN BEGIN I:=I+1;C:=HU[I];HU[I]:=HYFCHAR;
BEGIN MEM[HYFNODE].HH.RH:=AVAIL;AVAIL:=HYFNODE;DYNUSED:=DYNUSED-1;END;
END;WHILE L<=I DO BEGIN L:=RECONSTITUTE(L,I,FONTBCHAR[HF],256)+1;
IF MEM[327140].HH.RH>0 THEN BEGIN IF MINORTAIL=0 THEN MEM[R+1].HH.LH:=
MEM[327140].HH.RH ELSE MEM[MINORTAIL].HH.RH:=MEM[327140].HH.RH;
MINORTAIL:=MEM[327140].HH.RH;
WHILE MEM[MINORTAIL].HH.RH>0 DO MINORTAIL:=MEM[MINORTAIL].HH.RH;END;END;
IF HYFNODE<>0 THEN BEGIN HU[I]:=C;L:=I;I:=I-1;END{:915};{916:}
MINORTAIL:=0;MEM[R+1].HH.RH:=0;CLOC:=0;
IF BCHARLABEL[HF]<>0 THEN BEGIN L:=L-1;C:=HU[L];CLOC:=L;HU[L]:=256;END;
WHILE L<J DO BEGIN REPEAT L:=RECONSTITUTE(L,HN,BCHAR,256)+1;
IF CLOC>0 THEN BEGIN HU[CLOC]:=C;CLOC:=0;END;
IF MEM[327140].HH.RH>0 THEN BEGIN IF MINORTAIL=0 THEN MEM[R+1].HH.RH:=
MEM[327140].HH.RH ELSE MEM[MINORTAIL].HH.RH:=MEM[327140].HH.RH;
MINORTAIL:=MEM[327140].HH.RH;
WHILE MEM[MINORTAIL].HH.RH>0 DO MINORTAIL:=MEM[MINORTAIL].HH.RH;END;
UNTIL L>=J;WHILE L>J DO{917:}BEGIN J:=RECONSTITUTE(J,HN,BCHAR,256)+1;
MEM[MAJORTAIL].HH.RH:=MEM[327140].HH.RH;
WHILE MEM[MAJORTAIL].HH.RH>0 DO BEGIN MAJORTAIL:=MEM[MAJORTAIL].HH.RH;
RCOUNT:=RCOUNT+1;END;END{:917};END{:916};{918:}
IF RCOUNT>127 THEN BEGIN MEM[S].HH.RH:=MEM[R].HH.RH;MEM[R].HH.RH:=0;
FLUSHNODELIST(R);END ELSE BEGIN MEM[S].HH.RH:=R;MEM[R].HH.B1:=RCOUNT;
END;S:=MAJORTAIL{:918};HYPHENPASSED:=J-1;MEM[327140].HH.RH:=0;
UNTIL NOT ODD(HYF[J-1]){:914};UNTIL J>HN;MEM[S].HH.RH:=Q{:913};
FLUSHLIST(INITLIST){:903};10:END;{:895}{942:}{944:}
FUNCTION NEWTRIEOP(D,N:SMALLNUMBER;V:QUARTERWORD):QUARTERWORD;LABEL 10;
VAR H:-TRIEOPSIZE..TRIEOPSIZE;U:QUARTERWORD;L:0..TRIEOPSIZE;
BEGIN H:=ABS(N+313*D+361*V+1009*CURLANG)MOD(TRIEOPSIZE+TRIEOPSIZE)-
TRIEOPSIZE;WHILE TRUE DO BEGIN L:=TRIEOPHASH[H];
IF L=0 THEN BEGIN IF TRIEOPPTR=TRIEOPSIZE THEN OVERFLOW(958,TRIEOPSIZE);
U:=TRIEUSED[CURLANG];IF U=511 THEN OVERFLOW(959,511);
TRIEOPPTR:=TRIEOPPTR+1;U:=U+1;TRIEUSED[CURLANG]:=U;
HYFDISTANCE[TRIEOPPTR]:=D;HYFNUM[TRIEOPPTR]:=N;HYFNEXT[TRIEOPPTR]:=V;
TRIEOPLANG[TRIEOPPTR]:=CURLANG;TRIEOPHASH[H]:=TRIEOPPTR;
TRIEOPVAL[TRIEOPPTR]:=U;NEWTRIEOP:=U;GOTO 10;END;
IF(HYFDISTANCE[L]=D)AND(HYFNUM[L]=N)AND(HYFNEXT[L]=V)AND(TRIEOPLANG[L]=
CURLANG)THEN BEGIN NEWTRIEOP:=TRIEOPVAL[L];GOTO 10;END;
IF H>-TRIEOPSIZE THEN H:=H-1 ELSE H:=TRIEOPSIZE;END;10:END;{:944}{948:}
FUNCTION TRIENODE(P:TRIEPOINTER):TRIEPOINTER;LABEL 10;VAR H:TRIEPOINTER;
Q:TRIEPOINTER;
BEGIN H:=ABS(TRIEC[P]+1009*TRIEO[P]+2718*TRIEL[P]+3142*TRIER[P])MOD
TRIESIZE;WHILE TRUE DO BEGIN Q:=TRIEHASH[H];
IF Q=0 THEN BEGIN TRIEHASH[H]:=P;TRIENODE:=P;GOTO 10;END;
IF(TRIEC[Q]=TRIEC[P])AND(TRIEO[Q]=TRIEO[P])AND(TRIEL[Q]=TRIEL[P])AND(
TRIER[Q]=TRIER[P])THEN BEGIN TRIENODE:=Q;GOTO 10;END;
IF H>0 THEN H:=H-1 ELSE H:=TRIESIZE;END;10:END;{:948}{949:}
FUNCTION COMPRESSTRIE(P:TRIEPOINTER):TRIEPOINTER;
BEGIN IF P=0 THEN COMPRESSTRIE:=0 ELSE BEGIN TRIEL[P]:=COMPRESSTRIE(
TRIEL[P]);TRIER[P]:=COMPRESSTRIE(TRIER[P]);COMPRESSTRIE:=TRIENODE(P);
END;END;{:949}{953:}PROCEDURE FIRSTFIT(P:TRIEPOINTER);LABEL 45,40;
VAR H:TRIEPOINTER;Z:TRIEPOINTER;Q:TRIEPOINTER;C:ASCIICODE;
L,R:TRIEPOINTER;LL:1..256;BEGIN C:=TRIEC[P];Z:=TRIEMIN[C];
WHILE TRUE DO BEGIN H:=Z-C;{954:}
IF TRIEMAX<H+256 THEN BEGIN IF TRIESIZE<=H+256 THEN OVERFLOW(960,
TRIESIZE);REPEAT TRIEMAX:=TRIEMAX+1;TRIETAKEN[TRIEMAX]:=FALSE;
TRIE[TRIEMAX].RH:=TRIEMAX+1;TRIE[TRIEMAX].LH:=TRIEMAX-1;
UNTIL TRIEMAX=H+256;END{:954};IF TRIETAKEN[H]THEN GOTO 45;{955:}
Q:=TRIER[P];WHILE Q>0 DO BEGIN IF TRIE[H+TRIEC[Q]].RH=0 THEN GOTO 45;
Q:=TRIER[Q];END;GOTO 40{:955};45:Z:=TRIE[Z].RH;END;40:{956:}
TRIETAKEN[H]:=TRUE;TRIEHASH[P]:=H;Q:=P;REPEAT Z:=H+TRIEC[Q];
L:=TRIE[Z].LH;R:=TRIE[Z].RH;TRIE[R].LH:=L;TRIE[L].RH:=R;TRIE[Z].RH:=0;
IF L<256 THEN BEGIN IF Z<256 THEN LL:=Z ELSE LL:=256;
REPEAT TRIEMIN[L]:=R;L:=L+1;UNTIL L=LL;END;Q:=TRIER[Q];UNTIL Q=0{:956};
END;{:953}{957:}PROCEDURE TRIEPACK(P:TRIEPOINTER);VAR Q:TRIEPOINTER;
BEGIN REPEAT Q:=TRIEL[P];
IF(Q>0)AND(TRIEHASH[Q]=0)THEN BEGIN FIRSTFIT(Q);TRIEPACK(Q);END;
P:=TRIER[P];UNTIL P=0;END;{:957}{959:}PROCEDURE TRIEFIX(P:TRIEPOINTER);
VAR Q:TRIEPOINTER;C:ASCIICODE;Z:TRIEPOINTER;BEGIN Z:=TRIEHASH[P];
REPEAT Q:=TRIEL[P];C:=TRIEC[P];TRIE[Z+C].RH:=TRIEHASH[Q];
TRIE[Z+C].B1:=C;TRIE[Z+C].B0:=TRIEO[P];IF Q>0 THEN TRIEFIX(Q);
P:=TRIER[P];UNTIL P=0;END;{:959}{960:}PROCEDURE NEWPATTERNS;LABEL 30,31;
VAR K,L:0..64;DIGITSENSED:BOOLEAN;V:QUARTERWORD;P,Q:TRIEPOINTER;
FIRSTCHILD:BOOLEAN;C:ASCIICODE;
BEGIN IF TRIENOTREADY THEN BEGIN IF EQTB[13218].INT<=0 THEN CURLANG:=0
ELSE IF EQTB[13218].INT>255 THEN CURLANG:=0 ELSE CURLANG:=EQTB[13218].
INT;SCANLEFTBRACE;{961:}K:=0;HYF[0]:=0;DIGITSENSED:=FALSE;
WHILE TRUE DO BEGIN GETXTOKEN;CASE CURCMD OF 11,12:{962:}
IF DIGITSENSED OR(CURCHR<48)OR(CURCHR>57)THEN BEGIN IF CURCHR=46 THEN
CURCHR:=0 ELSE BEGIN CURCHR:=EQTB[12144+CURCHR].HH.RH;
IF CURCHR=0 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(966);END;
BEGIN HELPPTR:=1;HELPLINE[0]:=965;END;ERROR;END;END;
IF K<63 THEN BEGIN K:=K+1;HC[K]:=CURCHR;HYF[K]:=0;DIGITSENSED:=FALSE;
END;END ELSE IF K<63 THEN BEGIN HYF[K]:=CURCHR-48;DIGITSENSED:=TRUE;
END{:962};10,2:BEGIN IF K>0 THEN{963:}BEGIN{965:}
IF HC[1]=0 THEN HYF[0]:=0;IF HC[K]=0 THEN HYF[K]:=0;L:=K;V:=0;
WHILE TRUE DO BEGIN IF HYF[L]<>0 THEN V:=NEWTRIEOP(K-L,HYF[L],V);
IF L>0 THEN L:=L-1 ELSE GOTO 31;END;31:{:965};Q:=0;HC[0]:=CURLANG;
WHILE L<=K DO BEGIN C:=HC[L];L:=L+1;P:=TRIEL[Q];FIRSTCHILD:=TRUE;
WHILE(P>0)AND(C>TRIEC[P])DO BEGIN Q:=P;P:=TRIER[Q];FIRSTCHILD:=FALSE;
END;IF(P=0)OR(C<TRIEC[P])THEN{964:}
BEGIN IF TRIEPTR=TRIESIZE THEN OVERFLOW(960,TRIESIZE);
TRIEPTR:=TRIEPTR+1;TRIER[TRIEPTR]:=P;P:=TRIEPTR;TRIEL[P]:=0;
IF FIRSTCHILD THEN TRIEL[Q]:=P ELSE TRIER[Q]:=P;TRIEC[P]:=C;TRIEO[P]:=0;
END{:964};Q:=P;END;
IF TRIEO[Q]<>0 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(967);END;
BEGIN HELPPTR:=1;HELPLINE[0]:=965;END;ERROR;END;TRIEO[Q]:=V;END{:963};
IF CURCMD=2 THEN GOTO 30;K:=0;HYF[0]:=0;DIGITSENSED:=FALSE;END;
OTHERWISE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(964);END;PRINTESC(962);
BEGIN HELPPTR:=1;HELPLINE[0]:=965;END;ERROR;END END;END;30:{:961};
IF EQTB[13231].INT>0 THEN{1588:}BEGIN C:=CURLANG;FIRSTCHILD:=FALSE;P:=0;
REPEAT Q:=P;P:=TRIER[Q];UNTIL(P=0)OR(C<=TRIEC[P]);
IF(P=0)OR(C<TRIEC[P])THEN{964:}
BEGIN IF TRIEPTR=TRIESIZE THEN OVERFLOW(960,TRIESIZE);
TRIEPTR:=TRIEPTR+1;TRIER[TRIEPTR]:=P;P:=TRIEPTR;TRIEL[P]:=0;
IF FIRSTCHILD THEN TRIEL[Q]:=P ELSE TRIER[Q]:=P;TRIEC[P]:=C;TRIEO[P]:=0;
END{:964};Q:=P;{1589:}P:=TRIEL[Q];FIRSTCHILD:=TRUE;
FOR C:=0 TO 255 DO IF(EQTB[12144+C].HH.RH>0)OR((C=255)AND FIRSTCHILD)
THEN BEGIN IF P=0 THEN{964:}
BEGIN IF TRIEPTR=TRIESIZE THEN OVERFLOW(960,TRIESIZE);
TRIEPTR:=TRIEPTR+1;TRIER[TRIEPTR]:=P;P:=TRIEPTR;TRIEL[P]:=0;
IF FIRSTCHILD THEN TRIEL[Q]:=P ELSE TRIER[Q]:=P;TRIEC[P]:=C;TRIEO[P]:=0;
END{:964}ELSE TRIEC[P]:=C;TRIEO[P]:=EQTB[12144+C].HH.RH;Q:=P;
P:=TRIER[Q];FIRSTCHILD:=FALSE;END;
IF FIRSTCHILD THEN TRIEL[Q]:=0 ELSE TRIER[Q]:=0{:1589};END{:1588};
END ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(961);END;PRINTESC(962);
BEGIN HELPPTR:=1;HELPLINE[0]:=963;END;ERROR;
MEM[327132].HH.RH:=SCANTOKS(FALSE,FALSE);FLUSHLIST(DEFREF);END;END;
{:960}{966:}PROCEDURE INITTRIE;VAR P:TRIEPOINTER;J,K,T:INTEGER;
R,S:TRIEPOINTER;H:TWOHALVES;BEGIN{952:}{945:}OPSTART[0]:=-0;
FOR J:=1 TO 255 DO OPSTART[J]:=OPSTART[J-1]+TRIEUSED[J-1];
FOR J:=1 TO TRIEOPPTR DO TRIEOPHASH[J]:=OPSTART[TRIEOPLANG[J]]+TRIEOPVAL
[J];
FOR J:=1 TO TRIEOPPTR DO WHILE TRIEOPHASH[J]>J DO BEGIN K:=TRIEOPHASH[J]
;T:=HYFDISTANCE[K];HYFDISTANCE[K]:=HYFDISTANCE[J];HYFDISTANCE[J]:=T;
T:=HYFNUM[K];HYFNUM[K]:=HYFNUM[J];HYFNUM[J]:=T;T:=HYFNEXT[K];
HYFNEXT[K]:=HYFNEXT[J];HYFNEXT[J]:=T;TRIEOPHASH[J]:=TRIEOPHASH[K];
TRIEOPHASH[K]:=K;END{:945};FOR P:=0 TO TRIESIZE DO TRIEHASH[P]:=0;
TRIER[0]:=COMPRESSTRIE(TRIER[0]);TRIEL[0]:=COMPRESSTRIE(TRIEL[0]);
FOR P:=0 TO TRIEPTR DO TRIEHASH[P]:=0;
FOR P:=0 TO 255 DO TRIEMIN[P]:=P+1;TRIE[0].RH:=1;TRIEMAX:=0{:952};
IF TRIEL[0]<>0 THEN BEGIN FIRSTFIT(TRIEL[0]);TRIEPACK(TRIEL[0]);END;
IF TRIER[0]<>0 THEN{1590:}
BEGIN IF TRIEL[0]=0 THEN FOR P:=0 TO 255 DO TRIEMIN[P]:=P+2;
FIRSTFIT(TRIER[0]);TRIEPACK(TRIER[0]);HYPHSTART:=TRIEHASH[TRIER[0]];
END{:1590};{958:}H.RH:=0;H.B0:=0;H.B1:=0;
IF TRIEMAX=0 THEN BEGIN FOR R:=0 TO 256 DO TRIE[R]:=H;TRIEMAX:=256;
END ELSE BEGIN IF TRIER[0]>0 THEN TRIEFIX(TRIER[0]);
IF TRIEL[0]>0 THEN TRIEFIX(TRIEL[0]);R:=0;REPEAT S:=TRIE[R].RH;
TRIE[R]:=H;R:=S;UNTIL R>TRIEMAX;END;TRIE[0].B1:=63;{:958};
TRIENOTREADY:=FALSE;END;{:966}{:942}PROCEDURE LINEBREAK(D:BOOLEAN);
LABEL 30,31,32,33,34,35,22;VAR{862:}AUTOBREAKING:BOOLEAN;PREVP:HALFWORD;
Q,R,S,PREVS:HALFWORD;F:INTERNALFONTNUMBER;{:862}{893:}J:SMALLNUMBER;
C:0..255;{:893}BEGIN PACKBEGINLINE:=CURLIST.MLFIELD;{816:}
MEM[327141].HH.RH:=MEM[CURLIST.HEADFIELD].HH.RH;
IF(CURLIST.TAILFIELD>=HIMEMMIN)THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=
NEWPENALTY(10000);CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;
END ELSE IF MEM[CURLIST.TAILFIELD].HH.B0<>10 THEN BEGIN MEM[CURLIST.
TAILFIELD].HH.RH:=NEWPENALTY(10000);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;
END ELSE BEGIN MEM[CURLIST.TAILFIELD].HH.B0:=12;
DELETEGLUEREF(MEM[CURLIST.TAILFIELD+1].HH.LH);
FLUSHNODELIST(MEM[CURLIST.TAILFIELD+1].HH.RH);
MEM[CURLIST.TAILFIELD+1].INT:=10000;END;
MEM[CURLIST.TAILFIELD].HH.RH:=NEWPARAMGLUE(14);
LASTLINEFILL:=MEM[CURLIST.TAILFIELD].HH.RH;
INITCURLANG:=CURLIST.PGFIELD MOD 65536;
INITLHYF:=CURLIST.PGFIELD DIV 4194304;
INITRHYF:=(CURLIST.PGFIELD DIV 65536)MOD 64;POPNEST;{:816}{827:}
NOSHRINKERRORYET:=TRUE;
IF(MEM[EQTB[10789].HH.RH].HH.B1<>0)AND(MEM[EQTB[10789].HH.RH+3].INT<>0)
THEN BEGIN EQTB[10789].HH.RH:=FINITESHRINK(EQTB[10789].HH.RH);END;
IF(MEM[EQTB[10790].HH.RH].HH.B1<>0)AND(MEM[EQTB[10790].HH.RH+3].INT<>0)
THEN BEGIN EQTB[10790].HH.RH:=FINITESHRINK(EQTB[10790].HH.RH);END;
Q:=EQTB[10789].HH.RH;R:=EQTB[10790].HH.RH;
BACKGROUND[1]:=MEM[Q+1].INT+MEM[R+1].INT;BACKGROUND[2]:=0;
BACKGROUND[3]:=0;BACKGROUND[4]:=0;BACKGROUND[5]:=0;
BACKGROUND[2+MEM[Q].HH.B0]:=MEM[Q+2].INT;
BACKGROUND[2+MEM[R].HH.B0]:=BACKGROUND[2+MEM[R].HH.B0]+MEM[R+2].INT;
BACKGROUND[6]:=MEM[Q+3].INT+MEM[R+3].INT;{1576:}DOLASTLINEFIT:=FALSE;
ACTIVENODESIZE:=3;
IF EQTB[13229].INT>0 THEN BEGIN Q:=MEM[LASTLINEFILL+1].HH.LH;
IF(MEM[Q+2].INT>0)AND(MEM[Q].HH.B0>0)THEN IF(BACKGROUND[3]=0)AND(
BACKGROUND[4]=0)AND(BACKGROUND[5]=0)THEN BEGIN DOLASTLINEFIT:=TRUE;
ACTIVENODESIZE:=5;FILLWIDTH[0]:=0;FILLWIDTH[1]:=0;FILLWIDTH[2]:=0;
FILLWIDTH[MEM[Q].HH.B0-1]:=MEM[Q+2].INT;END;END{:1576};{:827}{834:}
MINIMUMDEMERITS:=1073741823;MINIMALDEMERITS[3]:=1073741823;
MINIMALDEMERITS[2]:=1073741823;MINIMALDEMERITS[1]:=1073741823;
MINIMALDEMERITS[0]:=1073741823;{:834}{848:}
IF EQTB[11312].HH.RH=0 THEN IF EQTB[13762].INT=0 THEN BEGIN
LASTSPECIALLINE:=0;SECONDWIDTH:=EQTB[13748].INT;SECONDINDENT:=0;
END ELSE{849:}BEGIN LASTSPECIALLINE:=ABS(EQTB[13209].INT);
IF EQTB[13209].INT<0 THEN BEGIN FIRSTWIDTH:=EQTB[13748].INT-ABS(EQTB[
13762].INT);
IF EQTB[13762].INT>=0 THEN FIRSTINDENT:=EQTB[13762].INT ELSE FIRSTINDENT
:=0;SECONDWIDTH:=EQTB[13748].INT;SECONDINDENT:=0;
END ELSE BEGIN FIRSTWIDTH:=EQTB[13748].INT;FIRSTINDENT:=0;
SECONDWIDTH:=EQTB[13748].INT-ABS(EQTB[13762].INT);
IF EQTB[13762].INT>=0 THEN SECONDINDENT:=EQTB[13762].INT ELSE
SECONDINDENT:=0;END;END{:849}
ELSE BEGIN LASTSPECIALLINE:=MEM[EQTB[11312].HH.RH].HH.LH-1;
SECONDWIDTH:=MEM[EQTB[11312].HH.RH+2*(LASTSPECIALLINE+1)].INT;
SECONDINDENT:=MEM[EQTB[11312].HH.RH+2*LASTSPECIALLINE+1].INT;END;
IF EQTB[13187].INT=0 THEN EASYLINE:=LASTSPECIALLINE ELSE EASYLINE:=
327145{:848};{863:}THRESHOLD:=EQTB[13168].INT;
IF THRESHOLD>=0 THEN BEGIN IF EQTB[13200].INT>0 THEN BEGIN
BEGINDIAGNOSTIC;PRINTNL(942);END;SECONDPASS:=FALSE;FINALPASS:=FALSE;
END ELSE BEGIN THRESHOLD:=EQTB[13169].INT;SECONDPASS:=TRUE;
FINALPASS:=(EQTB[13765].INT<=0);
IF EQTB[13200].INT>0 THEN BEGINDIAGNOSTIC;END;
WHILE TRUE DO BEGIN IF THRESHOLD>10000 THEN THRESHOLD:=10000;
IF SECONDPASS THEN{891:}BEGIN IF TRIENOTREADY THEN INITTRIE;
CURLANG:=INITCURLANG;LHYF:=INITLHYF;RHYF:=INITRHYF;
IF TRIE[HYPHSTART+CURLANG].B1<>CURLANG THEN HYPHINDEX:=0 ELSE HYPHINDEX
:=TRIE[HYPHSTART+CURLANG].RH;END{:891};{864:}Q:=GETNODE(ACTIVENODESIZE);
MEM[Q].HH.B0:=0;MEM[Q].HH.B1:=2;MEM[Q].HH.RH:=327137;MEM[Q+1].HH.RH:=0;
MEM[Q+1].HH.LH:=CURLIST.PGFIELD+1;MEM[Q+2].INT:=0;MEM[327137].HH.RH:=Q;
IF DOLASTLINEFIT THEN{1578:}BEGIN MEM[Q+3].INT:=0;MEM[Q+4].INT:=0;
END{:1578};ACTIVEWIDTH[1]:=BACKGROUND[1];ACTIVEWIDTH[2]:=BACKGROUND[2];
ACTIVEWIDTH[3]:=BACKGROUND[3];ACTIVEWIDTH[4]:=BACKGROUND[4];
ACTIVEWIDTH[5]:=BACKGROUND[5];ACTIVEWIDTH[6]:=BACKGROUND[6];PASSIVE:=0;
PRINTEDNODE:=327141;PASSNUMBER:=0;FONTINSHORTDISPLAY:=0{:864};
CURP:=MEM[327141].HH.RH;AUTOBREAKING:=TRUE;PREVP:=CURP;
WHILE(CURP<>0)AND(MEM[327137].HH.RH<>327137)DO{866:}
BEGIN IF(CURP>=HIMEMMIN)THEN{867:}BEGIN PREVP:=CURP;
REPEAT F:=MEM[CURP].HH.B0;
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F
]+MEM[CURP].HH.B1].QQQQ.B0].INT;CURP:=MEM[CURP].HH.RH;
UNTIL NOT(CURP>=HIMEMMIN);END{:867};
CASE MEM[CURP].HH.B0 OF 0,1,2:ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+MEM[CURP+1]
.INT;8:{1362:}
IF MEM[CURP].HH.B1=4 THEN BEGIN CURLANG:=MEM[CURP+1].HH.RH;
LHYF:=MEM[CURP+1].HH.B0;RHYF:=MEM[CURP+1].HH.B1;END{:1362};
10:BEGIN{868:}
IF AUTOBREAKING THEN BEGIN IF(PREVP>=HIMEMMIN)THEN TRYBREAK(0,0)ELSE IF(
MEM[PREVP].HH.B0<9)THEN TRYBREAK(0,0)ELSE IF(MEM[PREVP].HH.B0=11)AND(MEM
[PREVP].HH.B1<>1)THEN TRYBREAK(0,0);END;
IF(MEM[MEM[CURP+1].HH.LH].HH.B1<>0)AND(MEM[MEM[CURP+1].HH.LH+3].INT<>0)
THEN BEGIN MEM[CURP+1].HH.LH:=FINITESHRINK(MEM[CURP+1].HH.LH);END;
Q:=MEM[CURP+1].HH.LH;ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+MEM[Q+1].INT;
ACTIVEWIDTH[2+MEM[Q].HH.B0]:=ACTIVEWIDTH[2+MEM[Q].HH.B0]+MEM[Q+2].INT;
ACTIVEWIDTH[6]:=ACTIVEWIDTH[6]+MEM[Q+3].INT{:868};
IF SECONDPASS AND AUTOBREAKING THEN{894:}BEGIN PREVS:=CURP;
S:=MEM[PREVS].HH.RH;IF S<>0 THEN BEGIN{896:}
WHILE TRUE DO BEGIN IF(S>=HIMEMMIN)THEN BEGIN C:=MEM[S].HH.B1;
HF:=MEM[S].HH.B0;
END ELSE IF MEM[S].HH.B0=6 THEN IF MEM[S+1].HH.RH=0 THEN GOTO 22 ELSE
BEGIN Q:=MEM[S+1].HH.RH;C:=MEM[Q].HH.B1;HF:=MEM[Q].HH.B0;
END ELSE IF(MEM[S].HH.B0=11)AND(MEM[S].HH.B1=0)THEN GOTO 22 ELSE IF MEM[
S].HH.B0=8 THEN BEGIN{1363:}
IF MEM[S].HH.B1=4 THEN BEGIN CURLANG:=MEM[S+1].HH.RH;
LHYF:=MEM[S+1].HH.B0;RHYF:=MEM[S+1].HH.B1;
IF TRIE[HYPHSTART+CURLANG].B1<>CURLANG THEN HYPHINDEX:=0 ELSE HYPHINDEX
:=TRIE[HYPHSTART+CURLANG].RH;END{:1363};GOTO 22;END ELSE GOTO 31;
IF HYPHINDEX=0 THEN HC[0]:=EQTB[12144+C].HH.RH ELSE IF TRIE[HYPHINDEX+C]
.B1<>C THEN HC[0]:=0 ELSE HC[0]:=TRIE[HYPHINDEX+C].B0;
IF HC[0]<>0 THEN IF(HC[0]=C)OR(EQTB[13206].INT>0)THEN GOTO 32 ELSE GOTO
31;22:PREVS:=S;S:=MEM[PREVS].HH.RH;END;32:HYFCHAR:=HYPHENCHAR[HF];
IF HYFCHAR<0 THEN GOTO 31;IF HYFCHAR>255 THEN GOTO 31;HA:=PREVS{:896};
IF LHYF+RHYF>63 THEN GOTO 31;{897:}HN:=0;
WHILE TRUE DO BEGIN IF(S>=HIMEMMIN)THEN BEGIN IF MEM[S].HH.B0<>HF THEN
GOTO 33;HYFBCHAR:=MEM[S].HH.B1;C:=HYFBCHAR;
IF HYPHINDEX=0 THEN HC[0]:=EQTB[12144+C].HH.RH ELSE IF TRIE[HYPHINDEX+C]
.B1<>C THEN HC[0]:=0 ELSE HC[0]:=TRIE[HYPHINDEX+C].B0;
IF HC[0]=0 THEN GOTO 33;IF HN=63 THEN GOTO 33;HB:=S;HN:=HN+1;HU[HN]:=C;
HC[HN]:=HC[0];HYFBCHAR:=256;END ELSE IF MEM[S].HH.B0=6 THEN{898:}
BEGIN IF MEM[S+1].HH.B0<>HF THEN GOTO 33;J:=HN;Q:=MEM[S+1].HH.RH;
IF Q>0 THEN HYFBCHAR:=MEM[Q].HH.B1;WHILE Q>0 DO BEGIN C:=MEM[Q].HH.B1;
IF HYPHINDEX=0 THEN HC[0]:=EQTB[12144+C].HH.RH ELSE IF TRIE[HYPHINDEX+C]
.B1<>C THEN HC[0]:=0 ELSE HC[0]:=TRIE[HYPHINDEX+C].B0;
IF HC[0]=0 THEN GOTO 33;IF J=63 THEN GOTO 33;J:=J+1;HU[J]:=C;
HC[J]:=HC[0];Q:=MEM[Q].HH.RH;END;HB:=S;HN:=J;
IF ODD(MEM[S].HH.B1)THEN HYFBCHAR:=FONTBCHAR[HF]ELSE HYFBCHAR:=256;
END{:898}ELSE IF(MEM[S].HH.B0=11)AND(MEM[S].HH.B1=0)THEN BEGIN HB:=S;
HYFBCHAR:=FONTBCHAR[HF];END ELSE GOTO 33;S:=MEM[S].HH.RH;END;33:{:897};
{899:}IF HN<LHYF+RHYF THEN GOTO 31;
WHILE TRUE DO BEGIN IF NOT((S>=HIMEMMIN))THEN CASE MEM[S].HH.B0 OF 6:;
11:IF MEM[S].HH.B1<>0 THEN GOTO 34;8,10,12,3,5,4:GOTO 34;
OTHERWISE GOTO 31 END;S:=MEM[S].HH.RH;END;34:{:899};HYPHENATE;END;
31:END{:894};END;
11:IF MEM[CURP].HH.B1=1 THEN BEGIN IF NOT(MEM[CURP].HH.RH>=HIMEMMIN)AND
AUTOBREAKING THEN IF MEM[MEM[CURP].HH.RH].HH.B0=10 THEN TRYBREAK(0,0);
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+MEM[CURP+1].INT;
END ELSE ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+MEM[CURP+1].INT;
6:BEGIN F:=MEM[CURP+1].HH.B0;
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F
]+MEM[CURP+1].HH.B1].QQQQ.B0].INT;END;7:{869:}
BEGIN S:=MEM[CURP+1].HH.LH;DISCWIDTH:=0;
IF S=0 THEN TRYBREAK(EQTB[13172].INT,1)ELSE BEGIN REPEAT{870:}
IF(S>=HIMEMMIN)THEN BEGIN F:=MEM[S].HH.B0;
DISCWIDTH:=DISCWIDTH+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+MEM[S].
HH.B1].QQQQ.B0].INT;
END ELSE CASE MEM[S].HH.B0 OF 6:BEGIN F:=MEM[S+1].HH.B0;
DISCWIDTH:=DISCWIDTH+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+MEM[S+1]
.HH.B1].QQQQ.B0].INT;END;0,1,2,11:DISCWIDTH:=DISCWIDTH+MEM[S+1].INT;
OTHERWISE CONFUSION(946)END{:870};S:=MEM[S].HH.RH;UNTIL S=0;
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+DISCWIDTH;TRYBREAK(EQTB[13171].INT,1);
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]-DISCWIDTH;END;R:=MEM[CURP].HH.B1;
S:=MEM[CURP].HH.RH;WHILE R>0 DO BEGIN{871:}
IF(S>=HIMEMMIN)THEN BEGIN F:=MEM[S].HH.B0;
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F
]+MEM[S].HH.B1].QQQQ.B0].INT;
END ELSE CASE MEM[S].HH.B0 OF 6:BEGIN F:=MEM[S+1].HH.B0;
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F
]+MEM[S+1].HH.B1].QQQQ.B0].INT;END;
0,1,2,11:ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+MEM[S+1].INT;
OTHERWISE CONFUSION(947)END{:871};R:=R-1;S:=MEM[S].HH.RH;END;
PREVP:=CURP;CURP:=S;GOTO 35;END{:869};
9:BEGIN IF MEM[CURP].HH.B1<4 THEN AUTOBREAKING:=ODD(MEM[CURP].HH.B1);
BEGIN IF NOT(MEM[CURP].HH.RH>=HIMEMMIN)AND AUTOBREAKING THEN IF MEM[MEM[
CURP].HH.RH].HH.B0=10 THEN TRYBREAK(0,0);
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+MEM[CURP+1].INT;END;END;
12:TRYBREAK(MEM[CURP+1].INT,0);4,3,5:;OTHERWISE CONFUSION(945)END;
PREVP:=CURP;CURP:=MEM[CURP].HH.RH;35:END{:866};IF CURP=0 THEN{873:}
BEGIN TRYBREAK(-10000,1);IF MEM[327137].HH.RH<>327137 THEN BEGIN{874:}
R:=MEM[327137].HH.RH;FEWESTDEMERITS:=1073741823;
REPEAT IF MEM[R].HH.B0<>2 THEN IF MEM[R+2].INT<FEWESTDEMERITS THEN BEGIN
FEWESTDEMERITS:=MEM[R+2].INT;BESTBET:=R;END;R:=MEM[R].HH.RH;
UNTIL R=327137;BESTLINE:=MEM[BESTBET+1].HH.LH{:874};
IF EQTB[13187].INT=0 THEN GOTO 30;{875:}BEGIN R:=MEM[327137].HH.RH;
ACTUALLOOSENESS:=0;
REPEAT IF MEM[R].HH.B0<>2 THEN BEGIN LINEDIFF:=MEM[R+1].HH.LH-BESTLINE;
IF((LINEDIFF<ACTUALLOOSENESS)AND(EQTB[13187].INT<=LINEDIFF))OR((LINEDIFF
>ACTUALLOOSENESS)AND(EQTB[13187].INT>=LINEDIFF))THEN BEGIN BESTBET:=R;
ACTUALLOOSENESS:=LINEDIFF;FEWESTDEMERITS:=MEM[R+2].INT;
END ELSE IF(LINEDIFF=ACTUALLOOSENESS)AND(MEM[R+2].INT<FEWESTDEMERITS)
THEN BEGIN BESTBET:=R;FEWESTDEMERITS:=MEM[R+2].INT;END;END;
R:=MEM[R].HH.RH;UNTIL R=327137;BESTLINE:=MEM[BESTBET+1].HH.LH;END{:875};
IF(ACTUALLOOSENESS=EQTB[13187].INT)OR FINALPASS THEN GOTO 30;END;
END{:873};{865:}Q:=MEM[327137].HH.RH;
WHILE Q<>327137 DO BEGIN CURP:=MEM[Q].HH.RH;
IF MEM[Q].HH.B0=2 THEN FREENODE(Q,7)ELSE FREENODE(Q,ACTIVENODESIZE);
Q:=CURP;END;Q:=PASSIVE;WHILE Q<>0 DO BEGIN CURP:=MEM[Q].HH.RH;
FREENODE(Q,2);Q:=CURP;END{:865};
IF NOT SECONDPASS THEN BEGIN IF EQTB[13200].INT>0 THEN PRINTNL(943);
THRESHOLD:=EQTB[13169].INT;SECONDPASS:=TRUE;
FINALPASS:=(EQTB[13765].INT<=0);
END ELSE BEGIN IF EQTB[13200].INT>0 THEN PRINTNL(944);
BACKGROUND[2]:=BACKGROUND[2]+EQTB[13765].INT;FINALPASS:=TRUE;END;END;
30:IF EQTB[13200].INT>0 THEN BEGIN ENDDIAGNOSTIC(TRUE);
NORMALIZESELECTOR;END;IF DOLASTLINEFIT THEN{1586:}
IF MEM[BESTBET+3].INT=0 THEN DOLASTLINEFIT:=FALSE ELSE BEGIN Q:=NEWSPEC(
MEM[LASTLINEFILL+1].HH.LH);DELETEGLUEREF(MEM[LASTLINEFILL+1].HH.LH);
MEM[Q+1].INT:=MEM[Q+1].INT+MEM[BESTBET+3].INT-MEM[BESTBET+4].INT;
MEM[Q+2].INT:=0;MEM[LASTLINEFILL+1].HH.LH:=Q;END{:1586};{:863};{876:}
POSTLINEBREAK(D){:876};{865:}Q:=MEM[327137].HH.RH;
WHILE Q<>327137 DO BEGIN CURP:=MEM[Q].HH.RH;
IF MEM[Q].HH.B0=2 THEN FREENODE(Q,7)ELSE FREENODE(Q,ACTIVENODESIZE);
Q:=CURP;END;Q:=PASSIVE;WHILE Q<>0 DO BEGIN CURP:=MEM[Q].HH.RH;
FREENODE(Q,2);Q:=CURP;END{:865};PACKBEGINLINE:=0;END;{1390:}
FUNCTION ETEXENABLED(B:BOOLEAN;J:QUARTERWORD;K:HALFWORD):BOOLEAN;
BEGIN IF NOT B THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(689);END;
PRINTCMDCHR(J,K);BEGIN HELPPTR:=1;HELPLINE[0]:=1314;END;ERROR;END;
ETEXENABLED:=B;END;{:1390}{1413:}PROCEDURE SHOWSAVEGROUPS;
LABEL 41,42,40,30;VAR P:0..NESTSIZE;M:-203..203;V:SAVEPOINTER;
L:QUARTERWORD;C:GROUPCODE;A:-1..1;I:INTEGER;J:QUARTERWORD;S:STRNUMBER;
BEGIN P:=NESTPTR;NEST[P]:=CURLIST;V:=SAVEPTR;L:=CURLEVEL;C:=CURGROUP;
SAVEPTR:=CURBOUNDARY;CURLEVEL:=CURLEVEL-1;A:=1;PRINTNL(339);PRINTLN;
WHILE TRUE DO BEGIN PRINTNL(366);PRINTGROUP(TRUE);
IF CURGROUP=0 THEN GOTO 30;REPEAT M:=NEST[P].MODEFIELD;
IF P>0 THEN P:=P-1 ELSE M:=1;UNTIL M<>102;PRINT(287);
CASE CURGROUP OF 1:BEGIN P:=P+1;GOTO 42;END;2,3:S:=1069;4:S:=976;
5:S:=1068;6:IF A=0 THEN BEGIN IF M=-1 THEN S:=523 ELSE S:=542;A:=1;
GOTO 41;END ELSE BEGIN IF A=1 THEN PRINT(1351)ELSE PRINTESC(908);
IF P>=A THEN P:=P-A;A:=0;GOTO 40;END;7:BEGIN P:=P+1;A:=-1;PRINTESC(530);
GOTO 42;END;8:BEGIN PRINTESC(401);GOTO 40;END;9:GOTO 42;
10,13:BEGIN IF CURGROUP=10 THEN PRINTESC(352)ELSE PRINTESC(528);
FOR I:=1 TO 3 DO IF I<=SAVESTACK[SAVEPTR-2].INT THEN PRINT(868);GOTO 42;
END;
11:BEGIN IF SAVESTACK[SAVEPTR-2].INT=255 THEN PRINTESC(355)ELSE BEGIN
PRINTESC(331);PRINTINT(SAVESTACK[SAVEPTR-2].INT);END;GOTO 42;END;
12:BEGIN S:=543;GOTO 41;END;14:BEGIN P:=P+1;PRINTESC(515);GOTO 40;END;
15:BEGIN IF M=203 THEN PRINTCHAR(36)ELSE IF NEST[P].MODEFIELD=203 THEN
BEGIN PRINTCMDCHR(48,SAVESTACK[SAVEPTR-2].INT);GOTO 40;END;
PRINTCHAR(36);GOTO 40;END;
16:BEGIN IF MEM[NEST[P+1].ETEXAUXFIELD].HH.B0=30 THEN PRINTESC(884)ELSE
PRINTESC(886);GOTO 40;END;END;{1415:}I:=SAVESTACK[SAVEPTR-4].INT;
IF I<>0 THEN IF I<1073741824 THEN BEGIN IF ABS(NEST[P].MODEFIELD)=1 THEN
J:=21 ELSE J:=22;IF I>0 THEN PRINTCMDCHR(J,0)ELSE PRINTCMDCHR(J,1);
PRINTSCALED(ABS(I));PRINT(400);
END ELSE IF I<1073807360 THEN BEGIN IF I>=1073774592 THEN BEGIN PRINTESC
(1182);I:=I-(32768);END;PRINTESC(540);PRINTINT(I-1073741824);
PRINTCHAR(61);END ELSE PRINTCMDCHR(31,I-(1073807261)){:1415};
41:PRINTESC(S);{1414:}
IF SAVESTACK[SAVEPTR-2].INT<>0 THEN BEGIN PRINTCHAR(32);
IF SAVESTACK[SAVEPTR-3].INT=0 THEN PRINT(850)ELSE PRINT(851);
PRINTSCALED(SAVESTACK[SAVEPTR-2].INT);PRINT(400);END{:1414};
42:PRINTCHAR(123);40:PRINTCHAR(41);CURLEVEL:=CURLEVEL-1;
CURGROUP:=SAVESTACK[SAVEPTR].HH.B1;
SAVEPTR:=SAVESTACK[SAVEPTR].HH.RH END;30:SAVEPTR:=V;CURLEVEL:=L;
CURGROUP:=C;END;{:1413}{1429:}PROCEDURE NEWINTERACTION;FORWARD;{:1429}
{:815}{934:}PROCEDURE NEWHYPHEXCEPTIONS;LABEL 21,10,40,45,46;
VAR N:0..64;J:0..64;H:HYPHPOINTER;K:STRNUMBER;P:HALFWORD;Q:HALFWORD;
S,T:STRNUMBER;U,V:POOLPOINTER;BEGIN SCANLEFTBRACE;
IF EQTB[13218].INT<=0 THEN CURLANG:=0 ELSE IF EQTB[13218].INT>255 THEN
CURLANG:=0 ELSE CURLANG:=EQTB[13218].INT;
IF TRIENOTREADY THEN BEGIN HYPHINDEX:=0;GOTO 46;END;
IF TRIE[HYPHSTART+CURLANG].B1<>CURLANG THEN HYPHINDEX:=0 ELSE HYPHINDEX
:=TRIE[HYPHSTART+CURLANG].RH;46:{935:}N:=0;P:=0;
WHILE TRUE DO BEGIN GETXTOKEN;21:CASE CURCMD OF 11,12,68:{937:}
IF CURCHR=45 THEN{938:}BEGIN IF N<63 THEN BEGIN Q:=GETAVAIL;
MEM[Q].HH.RH:=P;MEM[Q].HH.LH:=N;P:=Q;END;END{:938}
ELSE BEGIN IF HYPHINDEX=0 THEN HC[0]:=EQTB[12144+CURCHR].HH.RH ELSE IF
TRIE[HYPHINDEX+CURCHR].B1<>CURCHR THEN HC[0]:=0 ELSE HC[0]:=TRIE[
HYPHINDEX+CURCHR].B0;
IF HC[0]=0 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(954);END;
BEGIN HELPPTR:=2;HELPLINE[1]:=955;HELPLINE[0]:=956;END;ERROR;
END ELSE IF N<63 THEN BEGIN N:=N+1;HC[N]:=HC[0];END;END{:937};
16:BEGIN SCANCHARNUM;CURCHR:=CURVAL;CURCMD:=68;GOTO 21;END;
10,2:BEGIN IF N>1 THEN{939:}BEGIN N:=N+1;HC[N]:=CURLANG;
BEGIN IF POOLPTR+N>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR);END;
H:=0;FOR J:=1 TO N DO BEGIN H:=(H+H+HC[J])MOD 503;
BEGIN STRPOOL[POOLPTR]:=HC[J];POOLPTR:=POOLPTR+1;END;END;S:=MAKESTRING;
{940:}IF HYPHCOUNT=503 THEN OVERFLOW(957,503);HYPHCOUNT:=HYPHCOUNT+1;
WHILE HYPHWORD[H]<>0 DO BEGIN{941:}K:=HYPHWORD[H];
IF(STRSTART[K+1]-STRSTART[K])<(STRSTART[S+1]-STRSTART[S])THEN GOTO 40;
IF(STRSTART[K+1]-STRSTART[K])>(STRSTART[S+1]-STRSTART[S])THEN GOTO 45;
U:=STRSTART[K];V:=STRSTART[S];
REPEAT IF STRPOOL[U]<STRPOOL[V]THEN GOTO 40;
IF STRPOOL[U]>STRPOOL[V]THEN GOTO 45;U:=U+1;V:=V+1;
UNTIL U=STRSTART[K+1];40:Q:=HYPHLIST[H];HYPHLIST[H]:=P;P:=Q;
T:=HYPHWORD[H];HYPHWORD[H]:=S;S:=T;45:{:941};
IF H>0 THEN H:=H-1 ELSE H:=503;END;HYPHWORD[H]:=S;HYPHLIST[H]:=P{:940};
END{:939};IF CURCMD=2 THEN GOTO 10;N:=0;P:=0;END;OTHERWISE{936:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(689);END;PRINTESC(950);
PRINT(951);BEGIN HELPPTR:=2;HELPLINE[1]:=952;HELPLINE[0]:=953;END;ERROR;
END{:936}END;END{:935};10:END;{:934}{968:}
FUNCTION PRUNEPAGETOP(P:HALFWORD;S:BOOLEAN):HALFWORD;VAR PREVP:HALFWORD;
Q,R:HALFWORD;BEGIN PREVP:=327141;MEM[327141].HH.RH:=P;
WHILE P<>0 DO CASE MEM[P].HH.B0 OF 0,1,2:{969:}
BEGIN Q:=NEWSKIPPARAM(10);MEM[PREVP].HH.RH:=Q;MEM[Q].HH.RH:=P;
IF MEM[TEMPPTR+1].INT>MEM[P+3].INT THEN MEM[TEMPPTR+1].INT:=MEM[TEMPPTR
+1].INT-MEM[P+3].INT ELSE MEM[TEMPPTR+1].INT:=0;P:=0;END{:969};
8,4,3:BEGIN PREVP:=P;P:=MEM[PREVP].HH.RH;END;10,11,12:BEGIN Q:=P;
P:=MEM[Q].HH.RH;MEM[Q].HH.RH:=0;MEM[PREVP].HH.RH:=P;
IF S THEN BEGIN IF DISCPTR[3]=0 THEN DISCPTR[3]:=Q ELSE MEM[R].HH.RH:=Q;
R:=Q;END ELSE FLUSHNODELIST(Q);END;OTHERWISE CONFUSION(968)END;
PRUNEPAGETOP:=MEM[327141].HH.RH;END;{:968}{970:}
FUNCTION VERTBREAK(P:HALFWORD;H,D:SCALED):HALFWORD;LABEL 30,45,90;
VAR PREVP:HALFWORD;Q,R:HALFWORD;PI:INTEGER;B:INTEGER;LEASTCOST:INTEGER;
BESTPLACE:HALFWORD;PREVDP:SCALED;T:SMALLNUMBER;BEGIN PREVP:=P;
LEASTCOST:=1073741823;ACTIVEWIDTH[1]:=0;ACTIVEWIDTH[2]:=0;
ACTIVEWIDTH[3]:=0;ACTIVEWIDTH[4]:=0;ACTIVEWIDTH[5]:=0;ACTIVEWIDTH[6]:=0;
PREVDP:=0;WHILE TRUE DO BEGIN{972:}IF P=0 THEN PI:=-10000 ELSE{973:}
CASE MEM[P].HH.B0 OF 0,1,2:BEGIN ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+PREVDP+
MEM[P+3].INT;PREVDP:=MEM[P+2].INT;GOTO 45;END;8:{1365:}GOTO 45{:1365};
10:IF(MEM[PREVP].HH.B0<9)THEN PI:=0 ELSE GOTO 90;
11:BEGIN IF MEM[P].HH.RH=0 THEN T:=12 ELSE T:=MEM[MEM[P].HH.RH].HH.B0;
IF T=10 THEN PI:=0 ELSE GOTO 90;END;12:PI:=MEM[P+1].INT;4,3:GOTO 45;
OTHERWISE CONFUSION(969)END{:973};{974:}IF PI<10000 THEN BEGIN{975:}
IF ACTIVEWIDTH[1]<H THEN IF(ACTIVEWIDTH[3]<>0)OR(ACTIVEWIDTH[4]<>0)OR(
ACTIVEWIDTH[5]<>0)THEN B:=0 ELSE B:=BADNESS(H-ACTIVEWIDTH[1],ACTIVEWIDTH
[2])ELSE IF ACTIVEWIDTH[1]-H>ACTIVEWIDTH[6]THEN B:=1073741823 ELSE B:=
BADNESS(ACTIVEWIDTH[1]-H,ACTIVEWIDTH[6]){:975};
IF B<1073741823 THEN IF PI<=-10000 THEN B:=PI ELSE IF B<10000 THEN B:=B+
PI ELSE B:=100000;IF B<=LEASTCOST THEN BEGIN BESTPLACE:=P;LEASTCOST:=B;
BESTHEIGHTPLUSDEPTH:=ACTIVEWIDTH[1]+PREVDP;END;
IF(B=1073741823)OR(PI<=-10000)THEN GOTO 30;END{:974};
IF(MEM[P].HH.B0<10)OR(MEM[P].HH.B0>11)THEN GOTO 45;90:{976:}
IF MEM[P].HH.B0=11 THEN Q:=P ELSE BEGIN Q:=MEM[P+1].HH.LH;
ACTIVEWIDTH[2+MEM[Q].HH.B0]:=ACTIVEWIDTH[2+MEM[Q].HH.B0]+MEM[Q+2].INT;
ACTIVEWIDTH[6]:=ACTIVEWIDTH[6]+MEM[Q+3].INT;
IF(MEM[Q].HH.B1<>0)AND(MEM[Q+3].INT<>0)THEN BEGIN BEGIN IF INTERACTION=3
THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(970);END;BEGIN HELPPTR:=4;HELPLINE[3]:=971;HELPLINE[2]:=972;
HELPLINE[1]:=973;HELPLINE[0]:=931;END;ERROR;R:=NEWSPEC(Q);
MEM[R].HH.B1:=0;DELETEGLUEREF(Q);MEM[P+1].HH.LH:=R;Q:=R;END;END;
ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+PREVDP+MEM[Q+1].INT;PREVDP:=0{:976};
45:IF PREVDP>D THEN BEGIN ACTIVEWIDTH[1]:=ACTIVEWIDTH[1]+PREVDP-D;
PREVDP:=D;END;{:972};PREVP:=P;P:=MEM[PREVP].HH.RH;END;
30:VERTBREAK:=BESTPLACE;END;{:970}{977:}{1558:}
FUNCTION DOMARKS(A,L:SMALLNUMBER;Q:HALFWORD):BOOLEAN;VAR I:SMALLNUMBER;
BEGIN IF L<4 THEN BEGIN FOR I:=0 TO 15 DO BEGIN IF ODD(I)THEN CURPTR:=
MEM[Q+(I DIV 2)+1].HH.RH ELSE CURPTR:=MEM[Q+(I DIV 2)+1].HH.LH;
IF CURPTR<>0 THEN IF DOMARKS(A,L+1,CURPTR)THEN BEGIN IF ODD(I)THEN MEM[Q
+(I DIV 2)+1].HH.RH:=0 ELSE MEM[Q+(I DIV 2)+1].HH.LH:=0;
MEM[Q].HH.B1:=MEM[Q].HH.B1-1;END;END;
IF MEM[Q].HH.B1=0 THEN BEGIN FREENODE(Q,9);Q:=0;END;
END ELSE BEGIN CASE A OF{1559:}
0:IF MEM[Q+2].HH.RH<>0 THEN BEGIN DELETETOKENREF(MEM[Q+2].HH.RH);
MEM[Q+2].HH.RH:=0;DELETETOKENREF(MEM[Q+3].HH.LH);MEM[Q+3].HH.LH:=0;END;
{:1559}{1561:}
1:IF MEM[Q+2].HH.LH<>0 THEN BEGIN IF MEM[Q+1].HH.LH<>0 THEN
DELETETOKENREF(MEM[Q+1].HH.LH);DELETETOKENREF(MEM[Q+1].HH.RH);
MEM[Q+1].HH.RH:=0;
IF MEM[MEM[Q+2].HH.LH].HH.RH=0 THEN BEGIN DELETETOKENREF(MEM[Q+2].HH.LH)
;MEM[Q+2].HH.LH:=0;
END ELSE MEM[MEM[Q+2].HH.LH].HH.LH:=MEM[MEM[Q+2].HH.LH].HH.LH+1;
MEM[Q+1].HH.LH:=MEM[Q+2].HH.LH;END;{:1561}{1562:}
2:IF(MEM[Q+1].HH.LH<>0)AND(MEM[Q+1].HH.RH=0)THEN BEGIN MEM[Q+1].HH.RH:=
MEM[Q+1].HH.LH;MEM[MEM[Q+1].HH.LH].HH.LH:=MEM[MEM[Q+1].HH.LH].HH.LH+1;
END;{:1562}{1564:}
3:FOR I:=0 TO 4 DO BEGIN IF ODD(I)THEN CURPTR:=MEM[Q+(I DIV 2)+1].HH.RH
ELSE CURPTR:=MEM[Q+(I DIV 2)+1].HH.LH;
IF CURPTR<>0 THEN BEGIN DELETETOKENREF(CURPTR);
IF ODD(I)THEN MEM[Q+(I DIV 2)+1].HH.RH:=0 ELSE MEM[Q+(I DIV 2)+1].HH.LH
:=0;END;END;{:1564}END;
IF MEM[Q+2].HH.LH=0 THEN IF MEM[Q+3].HH.LH=0 THEN BEGIN FREENODE(Q,4);
Q:=0;END;END;DOMARKS:=(Q=0);END;{:1558}FUNCTION VSPLIT(N:HALFWORD;
H:SCALED):HALFWORD;LABEL 10,30;VAR V:HALFWORD;P:HALFWORD;Q:HALFWORD;
BEGIN CURVAL:=N;
IF CURVAL<256 THEN V:=EQTB[11583+CURVAL].HH.RH ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR=0 THEN V:=0 ELSE V:=MEM[CURPTR+1].HH.RH;END;
FLUSHNODELIST(DISCPTR[3]);DISCPTR[3]:=0;
IF SAROOT[6]<>0 THEN IF DOMARKS(0,0,SAROOT[6])THEN SAROOT[6]:=0;
IF CURMARK[3]<>0 THEN BEGIN DELETETOKENREF(CURMARK[3]);CURMARK[3]:=0;
DELETETOKENREF(CURMARK[4]);CURMARK[4]:=0;END;{978:}
IF V=0 THEN BEGIN VSPLIT:=0;GOTO 10;END;
IF MEM[V].HH.B0<>1 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL
;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(339);END;
PRINTESC(974);PRINT(975);PRINTESC(976);BEGIN HELPPTR:=2;
HELPLINE[1]:=977;HELPLINE[0]:=978;END;ERROR;VSPLIT:=0;GOTO 10;END{:978};
Q:=VERTBREAK(MEM[V+5].HH.RH,H,EQTB[13751].INT);{979:}P:=MEM[V+5].HH.RH;
IF P=Q THEN MEM[V+5].HH.RH:=0 ELSE WHILE TRUE DO BEGIN IF MEM[P].HH.B0=4
THEN IF MEM[P+1].HH.LH<>0 THEN{1560:}
BEGIN FINDSAELEMENT(6,MEM[P+1].HH.LH,TRUE);
IF MEM[CURPTR+2].HH.RH=0 THEN BEGIN MEM[CURPTR+2].HH.RH:=MEM[P+1].HH.RH;
MEM[MEM[P+1].HH.RH].HH.LH:=MEM[MEM[P+1].HH.RH].HH.LH+1;
END ELSE DELETETOKENREF(MEM[CURPTR+3].HH.LH);
MEM[CURPTR+3].HH.LH:=MEM[P+1].HH.RH;
MEM[MEM[P+1].HH.RH].HH.LH:=MEM[MEM[P+1].HH.RH].HH.LH+1;END{:1560}
ELSE IF CURMARK[3]=0 THEN BEGIN CURMARK[3]:=MEM[P+1].HH.RH;
CURMARK[4]:=CURMARK[3];MEM[CURMARK[3]].HH.LH:=MEM[CURMARK[3]].HH.LH+2;
END ELSE BEGIN DELETETOKENREF(CURMARK[4]);CURMARK[4]:=MEM[P+1].HH.RH;
MEM[CURMARK[4]].HH.LH:=MEM[CURMARK[4]].HH.LH+1;END;
IF MEM[P].HH.RH=Q THEN BEGIN MEM[P].HH.RH:=0;GOTO 30;END;
P:=MEM[P].HH.RH;END;30:{:979};Q:=PRUNEPAGETOP(Q,EQTB[13230].INT>0);
P:=MEM[V+5].HH.RH;FREENODE(V,7);
IF Q<>0 THEN Q:=VPACKAGE(Q,0,1,1073741823);
IF CURVAL<256 THEN EQTB[11583+CURVAL].HH.RH:=Q ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR<>0 THEN BEGIN MEM[CURPTR+1].HH.RH:=Q;
MEM[CURPTR+1].HH.LH:=MEM[CURPTR+1].HH.LH+1;DELETESAREF(CURPTR);END;END;
VSPLIT:=VPACKAGE(P,H,0,EQTB[13751].INT);10:END;{:977}{985:}
PROCEDURE PRINTTOTALS;BEGIN PRINTSCALED(PAGESOFAR[1]);
IF PAGESOFAR[2]<>0 THEN BEGIN PRINT(313);PRINTSCALED(PAGESOFAR[2]);
PRINT(339);END;IF PAGESOFAR[3]<>0 THEN BEGIN PRINT(313);
PRINTSCALED(PAGESOFAR[3]);PRINT(312);END;
IF PAGESOFAR[4]<>0 THEN BEGIN PRINT(313);PRINTSCALED(PAGESOFAR[4]);
PRINT(987);END;IF PAGESOFAR[5]<>0 THEN BEGIN PRINT(313);
PRINTSCALED(PAGESOFAR[5]);PRINT(988);END;
IF PAGESOFAR[6]<>0 THEN BEGIN PRINT(314);PRINTSCALED(PAGESOFAR[6]);END;
END;{:985}{987:}PROCEDURE FREEZEPAGESPECS(S:SMALLNUMBER);
BEGIN PAGECONTENTS:=S;PAGESOFAR[0]:=EQTB[13749].INT;
PAGEMAXDEPTH:=EQTB[13750].INT;PAGESOFAR[7]:=0;PAGESOFAR[1]:=0;
PAGESOFAR[2]:=0;PAGESOFAR[3]:=0;PAGESOFAR[4]:=0;PAGESOFAR[5]:=0;
PAGESOFAR[6]:=0;LEASTPAGECOST:=1073741823;
IF EQTB[13201].INT>0 THEN BEGIN BEGINDIAGNOSTIC;PRINTNL(996);
PRINTSCALED(PAGESOFAR[0]);PRINT(997);PRINTSCALED(PAGEMAXDEPTH);
ENDDIAGNOSTIC(FALSE);END;END;{:987}{992:}
PROCEDURE BOXERROR(N:EIGHTBITS);BEGIN ERROR;BEGINDIAGNOSTIC;
PRINTNL(843);SHOWBOX(EQTB[11583+N].HH.RH);ENDDIAGNOSTIC(TRUE);
FLUSHNODELIST(EQTB[11583+N].HH.RH);EQTB[11583+N].HH.RH:=0;END;{:992}
{993:}PROCEDURE ENSUREVBOX(N:EIGHTBITS);VAR P:HALFWORD;
BEGIN P:=EQTB[11583+N].HH.RH;
IF P<>0 THEN IF MEM[P].HH.B0=0 THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(998);END;BEGIN HELPPTR:=3;HELPLINE[2]:=999;HELPLINE[1]:=1000;
HELPLINE[0]:=1001;END;BOXERROR(N);END;END;{:993}{994:}{1012:}
PROCEDURE FIREUP(C:HALFWORD);LABEL 10;VAR P,Q,R,S:HALFWORD;
PREVP:HALFWORD;N:0..255;WAIT:BOOLEAN;SAVEVBADNESS:INTEGER;
SAVEVFUZZ:SCALED;SAVESPLITTOPSKIP:HALFWORD;BEGIN{1013:}
IF MEM[BESTPAGEBREAK].HH.B0=12 THEN BEGIN GEQWORDDEFINE(13207,MEM[
BESTPAGEBREAK+1].INT);MEM[BESTPAGEBREAK+1].INT:=10000;
END ELSE GEQWORDDEFINE(13207,10000){:1013};
IF SAROOT[6]<>0 THEN IF DOMARKS(1,0,SAROOT[6])THEN SAROOT[6]:=0;
IF CURMARK[2]<>0 THEN BEGIN IF CURMARK[0]<>0 THEN DELETETOKENREF(CURMARK
[0]);CURMARK[0]:=CURMARK[2];
MEM[CURMARK[0]].HH.LH:=MEM[CURMARK[0]].HH.LH+1;
DELETETOKENREF(CURMARK[1]);CURMARK[1]:=0;END;{1014:}
IF C=BESTPAGEBREAK THEN BESTPAGEBREAK:=0;{1015:}
IF EQTB[11838].HH.RH<>0 THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(339);END;PRINTESC(412);PRINT(1012);BEGIN HELPPTR:=2;
HELPLINE[1]:=1013;HELPLINE[0]:=1001;END;BOXERROR(255);END{:1015};
INSERTPENALTIES:=0;SAVESPLITTOPSKIP:=EQTB[10792].HH.RH;
IF EQTB[13221].INT<=0 THEN{1018:}BEGIN R:=MEM[327144].HH.RH;
WHILE R<>327144 DO BEGIN IF MEM[R+2].HH.LH<>0 THEN BEGIN N:=MEM[R].HH.B1
;ENSUREVBOX(N);
IF EQTB[11583+N].HH.RH=0 THEN EQTB[11583+N].HH.RH:=NEWNULLBOX;
P:=EQTB[11583+N].HH.RH+5;WHILE MEM[P].HH.RH<>0 DO P:=MEM[P].HH.RH;
MEM[R+2].HH.RH:=P;END;R:=MEM[R].HH.RH;END;END{:1018};Q:=327140;
MEM[Q].HH.RH:=0;PREVP:=327142;P:=MEM[PREVP].HH.RH;
WHILE P<>BESTPAGEBREAK DO BEGIN IF MEM[P].HH.B0=3 THEN BEGIN IF EQTB[
13221].INT<=0 THEN{1020:}BEGIN R:=MEM[327144].HH.RH;
WHILE MEM[R].HH.B1<>MEM[P].HH.B1 DO R:=MEM[R].HH.RH;
IF MEM[R+2].HH.LH=0 THEN WAIT:=TRUE ELSE BEGIN WAIT:=FALSE;
S:=MEM[R+2].HH.RH;MEM[S].HH.RH:=MEM[P+4].HH.LH;
IF MEM[R+2].HH.LH=P THEN{1021:}
BEGIN IF MEM[R].HH.B0=1 THEN IF(MEM[R+1].HH.LH=P)AND(MEM[R+1].HH.RH<>0)
THEN BEGIN WHILE MEM[S].HH.RH<>MEM[R+1].HH.RH DO S:=MEM[S].HH.RH;
MEM[S].HH.RH:=0;EQTB[10792].HH.RH:=MEM[P+4].HH.RH;
MEM[P+4].HH.LH:=PRUNEPAGETOP(MEM[R+1].HH.RH,FALSE);
IF MEM[P+4].HH.LH<>0 THEN BEGIN TEMPPTR:=VPACKAGE(MEM[P+4].HH.LH,0,1,
1073741823);MEM[P+3].INT:=MEM[TEMPPTR+3].INT+MEM[TEMPPTR+2].INT;
FREENODE(TEMPPTR,7);WAIT:=TRUE;END;END;MEM[R+2].HH.LH:=0;
N:=MEM[R].HH.B1;TEMPPTR:=MEM[EQTB[11583+N].HH.RH+5].HH.RH;
FREENODE(EQTB[11583+N].HH.RH,7);
EQTB[11583+N].HH.RH:=VPACKAGE(TEMPPTR,0,1,1073741823);END{:1021}
ELSE BEGIN WHILE MEM[S].HH.RH<>0 DO S:=MEM[S].HH.RH;MEM[R+2].HH.RH:=S;
END;END;{1022:}MEM[PREVP].HH.RH:=MEM[P].HH.RH;MEM[P].HH.RH:=0;
IF WAIT THEN BEGIN MEM[Q].HH.RH:=P;Q:=P;
INSERTPENALTIES:=INSERTPENALTIES+1;
END ELSE BEGIN DELETEGLUEREF(MEM[P+4].HH.RH);FREENODE(P,5);END;
P:=PREVP{:1022};END{:1020};
END ELSE IF MEM[P].HH.B0=4 THEN IF MEM[P+1].HH.LH<>0 THEN{1563:}
BEGIN FINDSAELEMENT(6,MEM[P+1].HH.LH,TRUE);
IF MEM[CURPTR+1].HH.RH=0 THEN BEGIN MEM[CURPTR+1].HH.RH:=MEM[P+1].HH.RH;
MEM[MEM[P+1].HH.RH].HH.LH:=MEM[MEM[P+1].HH.RH].HH.LH+1;END;
IF MEM[CURPTR+2].HH.LH<>0 THEN DELETETOKENREF(MEM[CURPTR+2].HH.LH);
MEM[CURPTR+2].HH.LH:=MEM[P+1].HH.RH;
MEM[MEM[P+1].HH.RH].HH.LH:=MEM[MEM[P+1].HH.RH].HH.LH+1;END{:1563}
ELSE{1016:}BEGIN IF CURMARK[1]=0 THEN BEGIN CURMARK[1]:=MEM[P+1].HH.RH;
MEM[CURMARK[1]].HH.LH:=MEM[CURMARK[1]].HH.LH+1;END;
IF CURMARK[2]<>0 THEN DELETETOKENREF(CURMARK[2]);
CURMARK[2]:=MEM[P+1].HH.RH;
MEM[CURMARK[2]].HH.LH:=MEM[CURMARK[2]].HH.LH+1;END{:1016};PREVP:=P;
P:=MEM[PREVP].HH.RH;END;EQTB[10792].HH.RH:=SAVESPLITTOPSKIP;{1017:}
IF P<>0 THEN BEGIN IF MEM[327143].HH.RH=0 THEN IF NESTPTR=0 THEN CURLIST
.TAILFIELD:=PAGETAIL ELSE NEST[0].TAILFIELD:=PAGETAIL;
MEM[PAGETAIL].HH.RH:=MEM[327143].HH.RH;MEM[327143].HH.RH:=P;
MEM[PREVP].HH.RH:=0;END;SAVEVBADNESS:=EQTB[13195].INT;
EQTB[13195].INT:=10000;SAVEVFUZZ:=EQTB[13754].INT;
EQTB[13754].INT:=1073741823;
EQTB[11838].HH.RH:=VPACKAGE(MEM[327142].HH.RH,BESTSIZE,0,PAGEMAXDEPTH);
EQTB[13195].INT:=SAVEVBADNESS;EQTB[13754].INT:=SAVEVFUZZ;
IF LASTGLUE<>327145 THEN DELETEGLUEREF(LASTGLUE);{991:}PAGECONTENTS:=0;
PAGETAIL:=327142;MEM[327142].HH.RH:=0;LASTGLUE:=327145;LASTPENALTY:=0;
LASTKERN:=0;LASTNODETYPE:=-1;PAGESOFAR[7]:=0;PAGEMAXDEPTH:=0{:991};
IF Q<>327140 THEN BEGIN MEM[327142].HH.RH:=MEM[327140].HH.RH;
PAGETAIL:=Q;END{:1017};{1019:}R:=MEM[327144].HH.RH;
WHILE R<>327144 DO BEGIN Q:=MEM[R].HH.RH;FREENODE(R,4);R:=Q;END;
MEM[327144].HH.RH:=327144{:1019}{:1014};
IF SAROOT[6]<>0 THEN IF DOMARKS(2,0,SAROOT[6])THEN SAROOT[6]:=0;
IF(CURMARK[0]<>0)AND(CURMARK[1]=0)THEN BEGIN CURMARK[1]:=CURMARK[0];
MEM[CURMARK[0]].HH.LH:=MEM[CURMARK[0]].HH.LH+1;END;
IF EQTB[11317].HH.RH<>0 THEN IF DEADCYCLES>=EQTB[13208].INT THEN{1024:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1014);END;PRINTINT(DEADCYCLES);
PRINT(1015);BEGIN HELPPTR:=3;HELPLINE[2]:=1016;HELPLINE[1]:=1017;
HELPLINE[0]:=1018;END;ERROR;END{:1024}ELSE{1025:}
BEGIN OUTPUTACTIVE:=TRUE;DEADCYCLES:=DEADCYCLES+1;PUSHNEST;
CURLIST.MODEFIELD:=-1;CURLIST.AUXFIELD.INT:=-65536000;
CURLIST.MLFIELD:=-LINE;BEGINTOKENLIST(EQTB[11317].HH.RH,6);
NEWSAVELEVEL(8);NORMALPARAGRAPH;SCANLEFTBRACE;GOTO 10;END{:1025};{1023:}
BEGIN IF MEM[327142].HH.RH<>0 THEN BEGIN IF MEM[327143].HH.RH=0 THEN IF
NESTPTR=0 THEN CURLIST.TAILFIELD:=PAGETAIL ELSE NEST[0].TAILFIELD:=
PAGETAIL ELSE MEM[PAGETAIL].HH.RH:=MEM[327143].HH.RH;
MEM[327143].HH.RH:=MEM[327142].HH.RH;MEM[327142].HH.RH:=0;
PAGETAIL:=327142;END;FLUSHNODELIST(DISCPTR[2]);DISCPTR[2]:=0;
SHIPOUT(EQTB[11838].HH.RH);EQTB[11838].HH.RH:=0;END{:1023};10:END;
{:1012}PROCEDURE BUILDPAGE;LABEL 10,30,31,22,80,90;VAR P:HALFWORD;
Q,R:HALFWORD;B,C:INTEGER;PI:INTEGER;N:0..255;DELTA,H,W:SCALED;
BEGIN IF(MEM[327143].HH.RH=0)OR OUTPUTACTIVE THEN GOTO 10;
REPEAT 22:P:=MEM[327143].HH.RH;{996:}
IF LASTGLUE<>327145 THEN DELETEGLUEREF(LASTGLUE);LASTPENALTY:=0;
LASTKERN:=0;LASTNODETYPE:=MEM[P].HH.B0+1;
IF MEM[P].HH.B0=10 THEN BEGIN LASTGLUE:=MEM[P+1].HH.LH;
MEM[LASTGLUE].HH.RH:=MEM[LASTGLUE].HH.RH+1;
END ELSE BEGIN LASTGLUE:=327145;
IF MEM[P].HH.B0=12 THEN LASTPENALTY:=MEM[P+1].INT ELSE IF MEM[P].HH.B0=
11 THEN LASTKERN:=MEM[P+1].INT;END{:996};{997:}{1000:}
CASE MEM[P].HH.B0 OF 0,1,2:IF PAGECONTENTS<2 THEN{1001:}
BEGIN IF PAGECONTENTS=0 THEN FREEZEPAGESPECS(2)ELSE PAGECONTENTS:=2;
Q:=NEWSKIPPARAM(9);
IF MEM[TEMPPTR+1].INT>MEM[P+3].INT THEN MEM[TEMPPTR+1].INT:=MEM[TEMPPTR
+1].INT-MEM[P+3].INT ELSE MEM[TEMPPTR+1].INT:=0;MEM[Q].HH.RH:=P;
MEM[327143].HH.RH:=Q;GOTO 22;END{:1001}ELSE{1002:}
BEGIN PAGESOFAR[1]:=PAGESOFAR[1]+PAGESOFAR[7]+MEM[P+3].INT;
PAGESOFAR[7]:=MEM[P+2].INT;GOTO 80;END{:1002};8:{1364:}GOTO 80{:1364};
10:IF PAGECONTENTS<2 THEN GOTO 31 ELSE IF(MEM[PAGETAIL].HH.B0<9)THEN PI
:=0 ELSE GOTO 90;
11:IF PAGECONTENTS<2 THEN GOTO 31 ELSE IF MEM[P].HH.RH=0 THEN GOTO 10
ELSE IF MEM[MEM[P].HH.RH].HH.B0=10 THEN PI:=0 ELSE GOTO 90;
12:IF PAGECONTENTS<2 THEN GOTO 31 ELSE PI:=MEM[P+1].INT;4:GOTO 80;
3:{1008:}BEGIN IF PAGECONTENTS=0 THEN FREEZEPAGESPECS(1);
N:=MEM[P].HH.B1;R:=327144;
WHILE N>=MEM[MEM[R].HH.RH].HH.B1 DO R:=MEM[R].HH.RH;N:=N;
IF MEM[R].HH.B1<>N THEN{1009:}BEGIN Q:=GETNODE(4);
MEM[Q].HH.RH:=MEM[R].HH.RH;MEM[R].HH.RH:=Q;R:=Q;MEM[R].HH.B1:=N;
MEM[R].HH.B0:=0;ENSUREVBOX(N);
IF EQTB[11583+N].HH.RH=0 THEN MEM[R+3].INT:=0 ELSE MEM[R+3].INT:=MEM[
EQTB[11583+N].HH.RH+3].INT+MEM[EQTB[11583+N].HH.RH+2].INT;
MEM[R+2].HH.LH:=0;Q:=EQTB[10800+N].HH.RH;
IF EQTB[13233+N].INT=1000 THEN H:=MEM[R+3].INT ELSE H:=XOVERN(MEM[R+3].
INT,1000)*EQTB[13233+N].INT;PAGESOFAR[0]:=PAGESOFAR[0]-H-MEM[Q+1].INT;
PAGESOFAR[2+MEM[Q].HH.B0]:=PAGESOFAR[2+MEM[Q].HH.B0]+MEM[Q+2].INT;
PAGESOFAR[6]:=PAGESOFAR[6]+MEM[Q+3].INT;
IF(MEM[Q].HH.B1<>0)AND(MEM[Q+3].INT<>0)THEN BEGIN BEGIN IF INTERACTION=3
THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1007);END;PRINTESC(398);PRINTINT(N);BEGIN HELPPTR:=3;
HELPLINE[2]:=1008;HELPLINE[1]:=1009;HELPLINE[0]:=931;END;ERROR;END;
END{:1009};
IF MEM[R].HH.B0=1 THEN INSERTPENALTIES:=INSERTPENALTIES+MEM[P+1].INT
ELSE BEGIN MEM[R+2].HH.RH:=P;
DELTA:=PAGESOFAR[0]-PAGESOFAR[1]-PAGESOFAR[7]+PAGESOFAR[6];
IF EQTB[13233+N].INT=1000 THEN H:=MEM[P+3].INT ELSE H:=XOVERN(MEM[P+3].
INT,1000)*EQTB[13233+N].INT;
IF((H<=0)OR(H<=DELTA))AND(MEM[P+3].INT+MEM[R+3].INT<=EQTB[13766+N].INT)
THEN BEGIN PAGESOFAR[0]:=PAGESOFAR[0]-H;
MEM[R+3].INT:=MEM[R+3].INT+MEM[P+3].INT;END ELSE{1010:}
BEGIN IF EQTB[13233+N].INT<=0 THEN W:=1073741823 ELSE BEGIN W:=PAGESOFAR
[0]-PAGESOFAR[1]-PAGESOFAR[7];
IF EQTB[13233+N].INT<>1000 THEN W:=XOVERN(W,EQTB[13233+N].INT)*1000;END;
IF W>EQTB[13766+N].INT-MEM[R+3].INT THEN W:=EQTB[13766+N].INT-MEM[R+3].
INT;Q:=VERTBREAK(MEM[P+4].HH.LH,W,MEM[P+2].INT);
MEM[R+3].INT:=MEM[R+3].INT+BESTHEIGHTPLUSDEPTH;
IF EQTB[13201].INT>0 THEN{1011:}BEGIN BEGINDIAGNOSTIC;PRINTNL(1010);
PRINTINT(N);PRINT(1011);PRINTSCALED(W);PRINTCHAR(44);
PRINTSCALED(BESTHEIGHTPLUSDEPTH);PRINT(940);
IF Q=0 THEN PRINTINT(-10000)ELSE IF MEM[Q].HH.B0=12 THEN PRINTINT(MEM[Q
+1].INT)ELSE PRINTCHAR(48);ENDDIAGNOSTIC(FALSE);END{:1011};
IF EQTB[13233+N].INT<>1000 THEN BESTHEIGHTPLUSDEPTH:=XOVERN(
BESTHEIGHTPLUSDEPTH,1000)*EQTB[13233+N].INT;
PAGESOFAR[0]:=PAGESOFAR[0]-BESTHEIGHTPLUSDEPTH;MEM[R].HH.B0:=1;
MEM[R+1].HH.RH:=Q;MEM[R+1].HH.LH:=P;
IF Q=0 THEN INSERTPENALTIES:=INSERTPENALTIES-10000 ELSE IF MEM[Q].HH.B0=
12 THEN INSERTPENALTIES:=INSERTPENALTIES+MEM[Q+1].INT;END{:1010};END;
GOTO 80;END{:1008};OTHERWISE CONFUSION(1002)END{:1000};{1005:}
IF PI<10000 THEN BEGIN{1007:}
IF PAGESOFAR[1]<PAGESOFAR[0]THEN IF(PAGESOFAR[3]<>0)OR(PAGESOFAR[4]<>0)
OR(PAGESOFAR[5]<>0)THEN B:=0 ELSE B:=BADNESS(PAGESOFAR[0]-PAGESOFAR[1],
PAGESOFAR[2])ELSE IF PAGESOFAR[1]-PAGESOFAR[0]>PAGESOFAR[6]THEN B:=
1073741823 ELSE B:=BADNESS(PAGESOFAR[1]-PAGESOFAR[0],PAGESOFAR[6]){:1007
};
IF B<1073741823 THEN IF PI<=-10000 THEN C:=PI ELSE IF B<10000 THEN C:=B+
PI+INSERTPENALTIES ELSE C:=100000 ELSE C:=B;
IF INSERTPENALTIES>=10000 THEN C:=1073741823;
IF EQTB[13201].INT>0 THEN{1006:}BEGIN BEGINDIAGNOSTIC;PRINTNL(37);
PRINT(936);PRINTTOTALS;PRINT(1005);PRINTSCALED(PAGESOFAR[0]);PRINT(939);
IF B=1073741823 THEN PRINTCHAR(42)ELSE PRINTINT(B);PRINT(940);
PRINTINT(PI);PRINT(1006);
IF C=1073741823 THEN PRINTCHAR(42)ELSE PRINTINT(C);
IF C<=LEASTPAGECOST THEN PRINTCHAR(35);ENDDIAGNOSTIC(FALSE);END{:1006};
IF C<=LEASTPAGECOST THEN BEGIN BESTPAGEBREAK:=P;BESTSIZE:=PAGESOFAR[0];
LEASTPAGECOST:=C;R:=MEM[327144].HH.RH;
WHILE R<>327144 DO BEGIN MEM[R+2].HH.LH:=MEM[R+2].HH.RH;R:=MEM[R].HH.RH;
END;END;IF(C=1073741823)OR(PI<=-10000)THEN BEGIN FIREUP(P);
IF OUTPUTACTIVE THEN GOTO 10;GOTO 30;END;END{:1005};
IF(MEM[P].HH.B0<10)OR(MEM[P].HH.B0>11)THEN GOTO 80;90:{1004:}
IF MEM[P].HH.B0=11 THEN Q:=P ELSE BEGIN Q:=MEM[P+1].HH.LH;
PAGESOFAR[2+MEM[Q].HH.B0]:=PAGESOFAR[2+MEM[Q].HH.B0]+MEM[Q+2].INT;
PAGESOFAR[6]:=PAGESOFAR[6]+MEM[Q+3].INT;
IF(MEM[Q].HH.B1<>0)AND(MEM[Q+3].INT<>0)THEN BEGIN BEGIN IF INTERACTION=3
THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1003);END;BEGIN HELPPTR:=4;HELPLINE[3]:=1004;HELPLINE[2]:=972;
HELPLINE[1]:=973;HELPLINE[0]:=931;END;ERROR;R:=NEWSPEC(Q);
MEM[R].HH.B1:=0;DELETEGLUEREF(Q);MEM[P+1].HH.LH:=R;Q:=R;END;END;
PAGESOFAR[1]:=PAGESOFAR[1]+PAGESOFAR[7]+MEM[Q+1].INT;
PAGESOFAR[7]:=0{:1004};80:{1003:}
IF PAGESOFAR[7]>PAGEMAXDEPTH THEN BEGIN PAGESOFAR[1]:=PAGESOFAR[1]+
PAGESOFAR[7]-PAGEMAXDEPTH;PAGESOFAR[7]:=PAGEMAXDEPTH;END;{:1003};{998:}
MEM[PAGETAIL].HH.RH:=P;PAGETAIL:=P;MEM[327143].HH.RH:=MEM[P].HH.RH;
MEM[P].HH.RH:=0;GOTO 30{:998};31:{999:}MEM[327143].HH.RH:=MEM[P].HH.RH;
MEM[P].HH.RH:=0;
IF EQTB[13230].INT>0 THEN BEGIN IF DISCPTR[2]=0 THEN DISCPTR[2]:=P ELSE
MEM[DISCPTR[1]].HH.RH:=P;DISCPTR[1]:=P;END ELSE FLUSHNODELIST(P){:999};
30:{:997};UNTIL MEM[327143].HH.RH=0;{995:}
IF NESTPTR=0 THEN CURLIST.TAILFIELD:=327143 ELSE NEST[0].TAILFIELD:=
327143{:995};10:END;{:994}{1030:}{1043:}PROCEDURE APPSPACE;
VAR Q:HALFWORD;
BEGIN IF(CURLIST.AUXFIELD.HH.LH>=2000)AND(EQTB[10795].HH.RH<>0)THEN Q:=
NEWPARAMGLUE(13)ELSE BEGIN IF EQTB[10794].HH.RH<>0 THEN MAINP:=EQTB[
10794].HH.RH ELSE{1042:}BEGIN MAINP:=FONTGLUE[EQTB[11839].HH.RH];
IF MAINP=0 THEN BEGIN MAINP:=NEWSPEC(0);
MAINK:=PARAMBASE[EQTB[11839].HH.RH]+2;
MEM[MAINP+1].INT:=FONTINFO[MAINK].INT;
MEM[MAINP+2].INT:=FONTINFO[MAINK+1].INT;
MEM[MAINP+3].INT:=FONTINFO[MAINK+2].INT;
FONTGLUE[EQTB[11839].HH.RH]:=MAINP;END;END{:1042};MAINP:=NEWSPEC(MAINP);
{1044:}
IF CURLIST.AUXFIELD.HH.LH>=2000 THEN MEM[MAINP+1].INT:=MEM[MAINP+1].INT+
FONTINFO[7+PARAMBASE[EQTB[11839].HH.RH]].INT;
MEM[MAINP+2].INT:=XNOVERD(MEM[MAINP+2].INT,CURLIST.AUXFIELD.HH.LH,1000);
MEM[MAINP+3].INT:=XNOVERD(MEM[MAINP+3].INT,1000,CURLIST.AUXFIELD.HH.LH){
:1044};Q:=NEWGLUE(MAINP);MEM[MAINP].HH.RH:=0;END;
MEM[CURLIST.TAILFIELD].HH.RH:=Q;CURLIST.TAILFIELD:=Q;END;{:1043}{1047:}
PROCEDURE INSERTDOLLARSIGN;BEGIN BACKINPUT;CURTOK:=804;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(1026);END;BEGIN HELPPTR:=2;HELPLINE[1]:=1027;
HELPLINE[0]:=1028;END;INSERROR;END;{:1047}{1049:}PROCEDURE YOUCANT;
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(694);END;
PRINTCMDCHR(CURCMD,CURCHR);PRINT(1029);PRINTMODE(CURLIST.MODEFIELD);END;
{:1049}{1050:}PROCEDURE REPORTILLEGALCASE;BEGIN YOUCANT;
BEGIN HELPPTR:=4;HELPLINE[3]:=1030;HELPLINE[2]:=1031;HELPLINE[1]:=1032;
HELPLINE[0]:=1033;END;ERROR;END;{:1050}{1051:}
FUNCTION PRIVILEGED:BOOLEAN;
BEGIN IF CURLIST.MODEFIELD>0 THEN PRIVILEGED:=TRUE ELSE BEGIN
REPORTILLEGALCASE;PRIVILEGED:=FALSE;END;END;{:1051}{1054:}
FUNCTION ITSALLOVER:BOOLEAN;LABEL 10;
BEGIN IF PRIVILEGED THEN BEGIN IF(327142=PAGETAIL)AND(CURLIST.HEADFIELD=
CURLIST.TAILFIELD)AND(DEADCYCLES=0)THEN BEGIN ITSALLOVER:=TRUE;GOTO 10;
END;BACKINPUT;BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWNULLBOX;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD+1].INT:=EQTB[13748].INT;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWGLUE(8);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPENALTY(-1073741824);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;BUILDPAGE;END;
ITSALLOVER:=FALSE;10:END;{:1054}{1060:}PROCEDURE APPENDGLUE;
VAR S:SMALLNUMBER;BEGIN S:=CURCHR;CASE S OF 0:CURVAL:=4;1:CURVAL:=8;
2:CURVAL:=12;3:CURVAL:=16;4:SCANGLUE(2);5:SCANGLUE(3);END;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWGLUE(CURVAL);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
IF S>=4 THEN BEGIN MEM[CURVAL].HH.RH:=MEM[CURVAL].HH.RH-1;
IF S>4 THEN MEM[CURLIST.TAILFIELD].HH.B1:=99;END;END;{:1060}{1061:}
PROCEDURE APPENDKERN;VAR S:QUARTERWORD;BEGIN S:=CURCHR;
SCANDIMEN(S=99,FALSE,FALSE);
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWKERN(CURVAL);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B1:=S;END;{:1061}{1064:}PROCEDURE OFFSAVE;
VAR P:HALFWORD;BEGIN IF CURGROUP=0 THEN{1066:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(786);END;
PRINTCMDCHR(CURCMD,CURCHR);BEGIN HELPPTR:=1;HELPLINE[0]:=1051;END;ERROR;
END{:1066}ELSE BEGIN BACKINPUT;P:=GETAVAIL;MEM[327141].HH.RH:=P;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(634);END;{1065:}
CASE CURGROUP OF 14:BEGIN MEM[P].HH.LH:=14611;PRINTESC(519);END;
15:BEGIN MEM[P].HH.LH:=804;PRINTCHAR(36);END;
16:BEGIN MEM[P].HH.LH:=14612;MEM[P].HH.RH:=GETAVAIL;P:=MEM[P].HH.RH;
MEM[P].HH.LH:=3118;PRINTESC(1050);END;OTHERWISE BEGIN MEM[P].HH.LH:=637;
PRINTCHAR(125);END END{:1065};PRINT(635);
BEGINTOKENLIST(MEM[327141].HH.RH,4);BEGIN HELPPTR:=5;HELPLINE[4]:=1045;
HELPLINE[3]:=1046;HELPLINE[2]:=1047;HELPLINE[1]:=1048;HELPLINE[0]:=1049;
END;ERROR;END;END;{:1064}{1069:}PROCEDURE EXTRARIGHTBRACE;
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1056);END;
CASE CURGROUP OF 14:PRINTESC(519);15:PRINTCHAR(36);16:PRINTESC(885);END;
BEGIN HELPPTR:=5;HELPLINE[4]:=1057;HELPLINE[3]:=1058;HELPLINE[2]:=1059;
HELPLINE[1]:=1060;HELPLINE[0]:=1061;END;ERROR;ALIGNSTATE:=ALIGNSTATE+1;
END;{:1069}{1070:}PROCEDURE NORMALPARAGRAPH;
BEGIN IF EQTB[13187].INT<>0 THEN EQWORDDEFINE(13187,0);
IF EQTB[13762].INT<>0 THEN EQWORDDEFINE(13762,0);
IF EQTB[13209].INT<>1 THEN EQWORDDEFINE(13209,1);
IF EQTB[11312].HH.RH<>0 THEN EQDEFINE(11312,118,0);
IF EQTB[11313].HH.RH<>0 THEN EQDEFINE(11313,118,0);END;{:1070}{1075:}
PROCEDURE BOXEND(BOXCONTEXT:INTEGER);VAR P:HALFWORD;A:SMALLNUMBER;
BEGIN IF BOXCONTEXT<1073741824 THEN{1076:}
BEGIN IF CURBOX<>0 THEN BEGIN MEM[CURBOX+4].INT:=BOXCONTEXT;
IF ABS(CURLIST.MODEFIELD)=1 THEN BEGIN APPENDTOVLIST(CURBOX);
IF ADJUSTTAIL<>0 THEN BEGIN IF 327139<>ADJUSTTAIL THEN BEGIN MEM[CURLIST
.TAILFIELD].HH.RH:=MEM[327139].HH.RH;CURLIST.TAILFIELD:=ADJUSTTAIL;END;
ADJUSTTAIL:=0;END;IF CURLIST.MODEFIELD>0 THEN BUILDPAGE;
END ELSE BEGIN IF ABS(CURLIST.MODEFIELD)=102 THEN CURLIST.AUXFIELD.HH.LH
:=1000 ELSE BEGIN P:=NEWNOAD;MEM[P+1].HH.RH:=2;MEM[P+1].HH.LH:=CURBOX;
CURBOX:=P;END;MEM[CURLIST.TAILFIELD].HH.RH:=CURBOX;
CURLIST.TAILFIELD:=CURBOX;END;END;END{:1076}
ELSE IF BOXCONTEXT<1073807360 THEN{1077:}
BEGIN IF BOXCONTEXT<1073774592 THEN BEGIN CURVAL:=BOXCONTEXT-1073741824;
A:=0;END ELSE BEGIN CURVAL:=BOXCONTEXT-1073774592;A:=4;END;
IF CURVAL<256 THEN IF(A>=4)THEN GEQDEFINE(11583+CURVAL,119,CURBOX)ELSE
EQDEFINE(11583+CURVAL,119,CURBOX)ELSE BEGIN FINDSAELEMENT(4,CURVAL,TRUE)
;IF(A>=4)THEN GSADEF(CURPTR,CURBOX)ELSE SADEF(CURPTR,CURBOX);END;
END{:1077}ELSE IF CURBOX<>0 THEN IF BOXCONTEXT>1073807360 THEN{1078:}
BEGIN{404:}REPEAT GETXTOKEN;UNTIL(CURCMD<>10)AND(CURCMD<>0){:404};
IF((CURCMD=26)AND(ABS(CURLIST.MODEFIELD)<>1))OR((CURCMD=27)AND(ABS(
CURLIST.MODEFIELD)=1))OR((CURCMD=28)AND(ABS(CURLIST.MODEFIELD)=203))THEN
BEGIN APPENDGLUE;MEM[CURLIST.TAILFIELD].HH.B1:=BOXCONTEXT-(1073807261);
MEM[CURLIST.TAILFIELD+1].HH.RH:=CURBOX;
END ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1074);END;BEGIN HELPPTR:=3;
HELPLINE[2]:=1075;HELPLINE[1]:=1076;HELPLINE[0]:=1077;END;BACKERROR;
FLUSHNODELIST(CURBOX);END;END{:1078}ELSE SHIPOUT(CURBOX);END;{:1075}
{1079:}PROCEDURE BEGINBOX(BOXCONTEXT:INTEGER);LABEL 10,30;
VAR P,Q:HALFWORD;M:QUARTERWORD;K:HALFWORD;N:HALFWORD;
BEGIN CASE CURCHR OF 0:BEGIN SCANREGISTERNUM;
IF CURVAL<256 THEN CURBOX:=EQTB[11583+CURVAL].HH.RH ELSE BEGIN
FINDSAELEMENT(4,CURVAL,FALSE);
IF CURPTR=0 THEN CURBOX:=0 ELSE CURBOX:=MEM[CURPTR+1].HH.RH;END;
IF CURVAL<256 THEN EQTB[11583+CURVAL].HH.RH:=0 ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR<>0 THEN BEGIN MEM[CURPTR+1].HH.RH:=0;
MEM[CURPTR+1].HH.LH:=MEM[CURPTR+1].HH.LH+1;DELETESAREF(CURPTR);END;END;
END;1:BEGIN SCANREGISTERNUM;
IF CURVAL<256 THEN Q:=EQTB[11583+CURVAL].HH.RH ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR=0 THEN Q:=0 ELSE Q:=MEM[CURPTR+1].HH.RH;END;
CURBOX:=COPYNODELIST(Q);END;2:{1080:}BEGIN CURBOX:=0;
IF ABS(CURLIST.MODEFIELD)=203 THEN BEGIN YOUCANT;BEGIN HELPPTR:=1;
HELPLINE[0]:=1078;END;ERROR;
END ELSE IF(CURLIST.MODEFIELD=1)AND(CURLIST.HEADFIELD=CURLIST.TAILFIELD)
THEN BEGIN YOUCANT;BEGIN HELPPTR:=2;HELPLINE[1]:=1079;HELPLINE[0]:=1080;
END;ERROR;
END ELSE BEGIN IF NOT(CURLIST.TAILFIELD>=HIMEMMIN)THEN BEGIN IF(MEM[
CURLIST.TAILFIELD].HH.B0=9)AND(MEM[CURLIST.TAILFIELD].HH.B1=3)THEN
REMOVEENDM;
IF(MEM[CURLIST.TAILFIELD].HH.B0=0)OR(MEM[CURLIST.TAILFIELD].HH.B0=1)THEN
{1081:}BEGIN Q:=CURLIST.HEADFIELD;REPEAT P:=Q;
IF NOT(Q>=HIMEMMIN)THEN IF MEM[Q].HH.B0=7 THEN BEGIN FOR M:=1 TO MEM[Q].
HH.B1 DO P:=MEM[P].HH.RH;IF P=CURLIST.TAILFIELD THEN GOTO 30;END;
Q:=MEM[P].HH.RH;UNTIL Q=CURLIST.TAILFIELD;CURBOX:=CURLIST.TAILFIELD;
MEM[CURBOX+4].INT:=0;CURLIST.TAILFIELD:=P;MEM[P].HH.RH:=0;30:END{:1081};
IF LRTEMP<>0 THEN INSERTENDM;END;END;END{:1080};3:{1082:}
BEGIN SCANREGISTERNUM;N:=CURVAL;
IF NOT SCANKEYWORD(850)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1081);END;BEGIN HELPPTR:=2;HELPLINE[1]:=1082;HELPLINE[0]:=1083;
END;ERROR;END;SCANDIMEN(FALSE,FALSE,FALSE);CURBOX:=VSPLIT(N,CURVAL);
END{:1082};OTHERWISE{1083:}BEGIN K:=CURCHR-4;
SAVESTACK[SAVEPTR+0].INT:=BOXCONTEXT;
IF K=102 THEN IF(BOXCONTEXT<1073741824)AND(ABS(CURLIST.MODEFIELD)=1)THEN
SCANSPEC(3,TRUE)ELSE SCANSPEC(2,TRUE)ELSE BEGIN IF K=1 THEN SCANSPEC(4,
TRUE)ELSE BEGIN SCANSPEC(5,TRUE);K:=1;END;NORMALPARAGRAPH;END;PUSHNEST;
CURLIST.MODEFIELD:=-K;IF K=1 THEN BEGIN CURLIST.AUXFIELD.INT:=-65536000;
IF EQTB[11322].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11322].HH.RH,11);
END ELSE BEGIN CURLIST.AUXFIELD.HH.LH:=1000;
IF EQTB[11321].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11321].HH.RH,10);END;
GOTO 10;END{:1083}END;BOXEND(BOXCONTEXT);10:END;{:1079}{1084:}
PROCEDURE SCANBOX(BOXCONTEXT:INTEGER);BEGIN{404:}REPEAT GETXTOKEN;
UNTIL(CURCMD<>10)AND(CURCMD<>0){:404};
IF CURCMD=20 THEN BEGINBOX(BOXCONTEXT)ELSE IF(BOXCONTEXT>=1073807361)AND
((CURCMD=36)OR(CURCMD=35))THEN BEGIN CURBOX:=SCANRULESPEC;
BOXEND(BOXCONTEXT);
END ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1084);END;BEGIN HELPPTR:=3;
HELPLINE[2]:=1085;HELPLINE[1]:=1086;HELPLINE[0]:=1087;END;BACKERROR;END;
END;{:1084}{1086:}PROCEDURE PACKAGE(C:SMALLNUMBER);VAR H:SCALED;
P:HALFWORD;D:SCALED;BEGIN D:=EQTB[13752].INT;UNSAVE;SAVEPTR:=SAVEPTR-3;
IF CURLIST.MODEFIELD=-102 THEN CURBOX:=HPACK(MEM[CURLIST.HEADFIELD].HH.
RH,SAVESTACK[SAVEPTR+2].INT,SAVESTACK[SAVEPTR+1].INT)ELSE BEGIN CURBOX:=
VPACKAGE(MEM[CURLIST.HEADFIELD].HH.RH,SAVESTACK[SAVEPTR+2].INT,SAVESTACK
[SAVEPTR+1].INT,D);IF C=4 THEN{1087:}BEGIN H:=0;P:=MEM[CURBOX+5].HH.RH;
IF P<>0 THEN IF MEM[P].HH.B0<=2 THEN H:=MEM[P+3].INT;
MEM[CURBOX+2].INT:=MEM[CURBOX+2].INT-H+MEM[CURBOX+3].INT;
MEM[CURBOX+3].INT:=H;END{:1087};END;POPNEST;
BOXEND(SAVESTACK[SAVEPTR+0].INT);END;{:1086}{1091:}
FUNCTION NORMMIN(H:INTEGER):SMALLNUMBER;
BEGIN IF H<=0 THEN NORMMIN:=1 ELSE IF H>=63 THEN NORMMIN:=63 ELSE
NORMMIN:=H;END;PROCEDURE NEWGRAF(INDENTED:BOOLEAN);
BEGIN CURLIST.PGFIELD:=0;
IF(CURLIST.MODEFIELD=1)OR(CURLIST.HEADFIELD<>CURLIST.TAILFIELD)THEN
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPARAMGLUE(2);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;PUSHNEST;
CURLIST.MODEFIELD:=102;CURLIST.AUXFIELD.HH.LH:=1000;
IF EQTB[13218].INT<=0 THEN CURLANG:=0 ELSE IF EQTB[13218].INT>255 THEN
CURLANG:=0 ELSE CURLANG:=EQTB[13218].INT;
CURLIST.AUXFIELD.HH.RH:=CURLANG;
CURLIST.PGFIELD:=(NORMMIN(EQTB[13219].INT)*64+NORMMIN(EQTB[13220].INT))
*65536+CURLANG;IF INDENTED THEN BEGIN CURLIST.TAILFIELD:=NEWNULLBOX;
MEM[CURLIST.HEADFIELD].HH.RH:=CURLIST.TAILFIELD;
MEM[CURLIST.TAILFIELD+1].INT:=EQTB[13745].INT;END;
IF EQTB[11318].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11318].HH.RH,7);
IF NESTPTR=1 THEN BUILDPAGE;END;{:1091}{1093:}PROCEDURE INDENTINHMODE;
VAR P,Q:HALFWORD;BEGIN IF CURCHR>0 THEN BEGIN P:=NEWNULLBOX;
MEM[P+1].INT:=EQTB[13745].INT;
IF ABS(CURLIST.MODEFIELD)=102 THEN CURLIST.AUXFIELD.HH.LH:=1000 ELSE
BEGIN Q:=NEWNOAD;MEM[Q+1].HH.RH:=2;MEM[Q+1].HH.LH:=P;P:=Q;END;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=P;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;END;END;{:1093}
{1095:}PROCEDURE HEADFORVMODE;
BEGIN IF CURLIST.MODEFIELD<0 THEN IF CURCMD<>36 THEN OFFSAVE ELSE BEGIN
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(694);END;PRINTESC(524);PRINT(1090);
BEGIN HELPPTR:=2;HELPLINE[1]:=1091;HELPLINE[0]:=1092;END;ERROR;
END ELSE BEGIN BACKINPUT;CURTOK:=PARTOKEN;BACKINPUT;
CURINPUT.INDEXFIELD:=4;END;END;{:1095}{1096:}PROCEDURE ENDGRAF;
BEGIN IF CURLIST.MODEFIELD=102 THEN BEGIN IF CURLIST.HEADFIELD=CURLIST.
TAILFIELD THEN POPNEST ELSE LINEBREAK(FALSE);
IF CURLIST.ETEXAUXFIELD<>0 THEN BEGIN FLUSHLIST(CURLIST.ETEXAUXFIELD);
CURLIST.ETEXAUXFIELD:=0;END;NORMALPARAGRAPH;ERRORCOUNT:=0;END;END;
{:1096}{1099:}PROCEDURE BEGININSERTORADJUST;
BEGIN IF CURCMD=38 THEN CURVAL:=255 ELSE BEGIN SCANEIGHTBITINT;
IF CURVAL=255 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1093);END;
PRINTESC(331);PRINTINT(255);BEGIN HELPPTR:=1;HELPLINE[0]:=1094;END;
ERROR;CURVAL:=0;END;END;SAVESTACK[SAVEPTR+0].INT:=CURVAL;
SAVEPTR:=SAVEPTR+1;NEWSAVELEVEL(11);SCANLEFTBRACE;NORMALPARAGRAPH;
PUSHNEST;CURLIST.MODEFIELD:=-1;CURLIST.AUXFIELD.INT:=-65536000;END;
{:1099}{1101:}PROCEDURE MAKEMARK;VAR P:HALFWORD;C:HALFWORD;
BEGIN IF CURCHR=0 THEN C:=0 ELSE BEGIN SCANREGISTERNUM;C:=CURVAL;END;
P:=SCANTOKS(FALSE,TRUE);P:=GETNODE(2);MEM[P+1].HH.LH:=C;MEM[P].HH.B0:=4;
MEM[P].HH.B1:=0;MEM[P+1].HH.RH:=DEFREF;MEM[CURLIST.TAILFIELD].HH.RH:=P;
CURLIST.TAILFIELD:=P;END;{:1101}{1103:}PROCEDURE APPENDPENALTY;
BEGIN SCANINT;BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPENALTY(CURVAL);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
IF CURLIST.MODEFIELD=1 THEN BUILDPAGE;END;{:1103}{1105:}
PROCEDURE DELETELAST;LABEL 10;VAR P,Q:HALFWORD;M:QUARTERWORD;
BEGIN IF(CURLIST.MODEFIELD=1)AND(CURLIST.TAILFIELD=CURLIST.HEADFIELD)
THEN{1106:}BEGIN IF(CURCHR<>10)OR(LASTGLUE<>327145)THEN BEGIN YOUCANT;
BEGIN HELPPTR:=2;HELPLINE[1]:=1079;HELPLINE[0]:=1095;END;
IF CURCHR=11 THEN HELPLINE[0]:=(1096)ELSE IF CURCHR<>10 THEN HELPLINE[0]
:=(1097);ERROR;END;END{:1106}
ELSE BEGIN IF NOT(CURLIST.TAILFIELD>=HIMEMMIN)THEN BEGIN IF(MEM[CURLIST.
TAILFIELD].HH.B0=9)AND(MEM[CURLIST.TAILFIELD].HH.B1=3)THEN REMOVEENDM;
IF MEM[CURLIST.TAILFIELD].HH.B0=CURCHR THEN BEGIN Q:=CURLIST.HEADFIELD;
REPEAT P:=Q;
IF NOT(Q>=HIMEMMIN)THEN IF MEM[Q].HH.B0=7 THEN BEGIN FOR M:=1 TO MEM[Q].
HH.B1 DO P:=MEM[P].HH.RH;IF P=CURLIST.TAILFIELD THEN GOTO 10;END;
Q:=MEM[P].HH.RH;UNTIL Q=CURLIST.TAILFIELD;MEM[P].HH.RH:=0;
FLUSHNODELIST(CURLIST.TAILFIELD);CURLIST.TAILFIELD:=P;END;
IF LRTEMP<>0 THEN INSERTENDM;END;END;10:END;{:1105}{1110:}
PROCEDURE UNPACKAGE;LABEL 30,10;VAR P:HALFWORD;C:0..1;
BEGIN IF CURCHR>1 THEN{1596:}
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=DISCPTR[CURCHR];DISCPTR[CURCHR]:=0;
GOTO 30;END{:1596};C:=CURCHR;SCANREGISTERNUM;
IF CURVAL<256 THEN P:=EQTB[11583+CURVAL].HH.RH ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR=0 THEN P:=0 ELSE P:=MEM[CURPTR+1].HH.RH;END;
IF P=0 THEN GOTO 10;
IF(ABS(CURLIST.MODEFIELD)=203)OR((ABS(CURLIST.MODEFIELD)=1)AND(MEM[P].HH
.B0<>1))OR((ABS(CURLIST.MODEFIELD)=102)AND(MEM[P].HH.B0<>0))THEN BEGIN
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(1105);END;BEGIN HELPPTR:=3;HELPLINE[2]:=1106;
HELPLINE[1]:=1107;HELPLINE[0]:=1108;END;ERROR;GOTO 10;END;
IF C=1 THEN MEM[CURLIST.TAILFIELD].HH.RH:=COPYNODELIST(MEM[P+5].HH.RH)
ELSE BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=MEM[P+5].HH.RH;
IF CURVAL<256 THEN EQTB[11583+CURVAL].HH.RH:=0 ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR<>0 THEN BEGIN MEM[CURPTR+1].HH.RH:=0;
MEM[CURPTR+1].HH.LH:=MEM[CURPTR+1].HH.LH+1;DELETESAREF(CURPTR);END;END;
FREENODE(P,7);END;
30:WHILE MEM[CURLIST.TAILFIELD].HH.RH<>0 DO CURLIST.TAILFIELD:=MEM[
CURLIST.TAILFIELD].HH.RH;10:END;{:1110}{1113:}
PROCEDURE APPENDITALICCORRECTION;LABEL 10;VAR P:HALFWORD;
F:INTERNALFONTNUMBER;
BEGIN IF CURLIST.TAILFIELD<>CURLIST.HEADFIELD THEN BEGIN IF(CURLIST.
TAILFIELD>=HIMEMMIN)THEN P:=CURLIST.TAILFIELD ELSE IF MEM[CURLIST.
TAILFIELD].HH.B0=6 THEN P:=CURLIST.TAILFIELD+1 ELSE GOTO 10;
F:=MEM[P].HH.B0;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWKERN(FONTINFO[ITALICBASE[F]+(
FONTINFO[CHARBASE[F]+MEM[P].HH.B1].QQQQ.B2)DIV 4].INT);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B1:=1;END;10:END;{:1113}{1117:}
PROCEDURE APPENDDISCRETIONARY;VAR C:INTEGER;
BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWDISC;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
IF CURCHR=1 THEN BEGIN C:=HYPHENCHAR[EQTB[11839].HH.RH];
IF C>=0 THEN IF C<256 THEN MEM[CURLIST.TAILFIELD+1].HH.LH:=NEWCHARACTER(
EQTB[11839].HH.RH,C);END ELSE BEGIN SAVEPTR:=SAVEPTR+1;
SAVESTACK[SAVEPTR-1].INT:=0;NEWSAVELEVEL(10);SCANLEFTBRACE;PUSHNEST;
CURLIST.MODEFIELD:=-102;CURLIST.AUXFIELD.HH.LH:=1000;END;END;{:1117}
{1119:}PROCEDURE BUILDDISCRETIONARY;LABEL 30,10;VAR P,Q:HALFWORD;
N:INTEGER;BEGIN UNSAVE;{1121:}Q:=CURLIST.HEADFIELD;P:=MEM[Q].HH.RH;N:=0;
WHILE P<>0 DO BEGIN IF NOT(P>=HIMEMMIN)THEN IF MEM[P].HH.B0>2 THEN IF
MEM[P].HH.B0<>11 THEN IF MEM[P].HH.B0<>6 THEN BEGIN BEGIN IF INTERACTION
=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1115);END;BEGIN HELPPTR:=1;HELPLINE[0]:=1116;END;ERROR;
BEGINDIAGNOSTIC;PRINTNL(1117);SHOWBOX(P);ENDDIAGNOSTIC(TRUE);
FLUSHNODELIST(P);MEM[Q].HH.RH:=0;GOTO 30;END;Q:=P;P:=MEM[Q].HH.RH;
N:=N+1;END;30:{:1121};P:=MEM[CURLIST.HEADFIELD].HH.RH;POPNEST;
CASE SAVESTACK[SAVEPTR-1].INT OF 0:MEM[CURLIST.TAILFIELD+1].HH.LH:=P;
1:MEM[CURLIST.TAILFIELD+1].HH.RH:=P;2:{1120:}
BEGIN IF(N>0)AND(ABS(CURLIST.MODEFIELD)=203)THEN BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(1109);END;PRINTESC(352);BEGIN HELPPTR:=2;
HELPLINE[1]:=1110;HELPLINE[0]:=1111;END;FLUSHNODELIST(P);N:=0;ERROR;
END ELSE MEM[CURLIST.TAILFIELD].HH.RH:=P;
IF N<=511 THEN MEM[CURLIST.TAILFIELD].HH.B1:=N ELSE BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(1112);END;BEGIN HELPPTR:=2;HELPLINE[1]:=1113;
HELPLINE[0]:=1114;END;ERROR;END;IF N>0 THEN CURLIST.TAILFIELD:=Q;
SAVEPTR:=SAVEPTR-1;GOTO 10;END{:1120};END;
SAVESTACK[SAVEPTR-1].INT:=SAVESTACK[SAVEPTR-1].INT+1;NEWSAVELEVEL(10);
SCANLEFTBRACE;PUSHNEST;CURLIST.MODEFIELD:=-102;
CURLIST.AUXFIELD.HH.LH:=1000;10:END;{:1119}{1123:}PROCEDURE MAKEACCENT;
VAR S,T:DOUBLE;P,Q,R:HALFWORD;F:INTERNALFONTNUMBER;A,H,X,W,DELTA:SCALED;
I:FOURQUARTERS;BEGIN SCANCHARNUM;F:=EQTB[11839].HH.RH;
P:=NEWCHARACTER(F,CURVAL);
IF P<>0 THEN BEGIN X:=FONTINFO[5+PARAMBASE[F]].INT;
S:=FONTINFO[1+PARAMBASE[F]].INT/65536.0D0;
A:=FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+MEM[P].HH.B1].QQQQ.B0].INT
;DOASSIGNMENTS;{1124:}Q:=0;F:=EQTB[11839].HH.RH;
IF(CURCMD=11)OR(CURCMD=12)OR(CURCMD=68)THEN Q:=NEWCHARACTER(F,CURCHR)
ELSE IF CURCMD=16 THEN BEGIN SCANCHARNUM;Q:=NEWCHARACTER(F,CURVAL);
END ELSE BACKINPUT{:1124};IF Q<>0 THEN{1125:}
BEGIN T:=FONTINFO[1+PARAMBASE[F]].INT/65536.0D0;
I:=FONTINFO[CHARBASE[F]+MEM[Q].HH.B1].QQQQ;
W:=FONTINFO[WIDTHBASE[F]+I.B0].INT;
H:=FONTINFO[HEIGHTBASE[F]+(I.B1)DIV 16].INT;
IF H<>X THEN BEGIN P:=HPACK(P,0,1);MEM[P+4].INT:=X-H;END;
DELTA:=ROUND((W-A)/2.0D0+H*T-X*S);R:=NEWKERN(DELTA);MEM[R].HH.B1:=2;
MEM[CURLIST.TAILFIELD].HH.RH:=R;MEM[R].HH.RH:=P;
CURLIST.TAILFIELD:=NEWKERN(-A-DELTA);MEM[CURLIST.TAILFIELD].HH.B1:=2;
MEM[P].HH.RH:=CURLIST.TAILFIELD;P:=Q;END{:1125};
MEM[CURLIST.TAILFIELD].HH.RH:=P;CURLIST.TAILFIELD:=P;
CURLIST.AUXFIELD.HH.LH:=1000;END;END;{:1123}{1127:}PROCEDURE ALIGNERROR;
BEGIN IF ABS(ALIGNSTATE)>2 THEN{1128:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1122);END;
PRINTCMDCHR(CURCMD,CURCHR);IF CURTOK=1062 THEN BEGIN BEGIN HELPPTR:=6;
HELPLINE[5]:=1123;HELPLINE[4]:=1124;HELPLINE[3]:=1125;HELPLINE[2]:=1126;
HELPLINE[1]:=1127;HELPLINE[0]:=1128;END;END ELSE BEGIN BEGIN HELPPTR:=5;
HELPLINE[4]:=1123;HELPLINE[3]:=1129;HELPLINE[2]:=1126;HELPLINE[1]:=1127;
HELPLINE[0]:=1128;END;END;ERROR;END{:1128}ELSE BEGIN BACKINPUT;
IF ALIGNSTATE<0 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(666);END;
ALIGNSTATE:=ALIGNSTATE+1;CURTOK:=379;
END ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1118);END;
ALIGNSTATE:=ALIGNSTATE-1;CURTOK:=637;END;BEGIN HELPPTR:=3;
HELPLINE[2]:=1119;HELPLINE[1]:=1120;HELPLINE[0]:=1121;END;INSERROR;END;
END;{:1127}{1129:}PROCEDURE NOALIGNERROR;
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1122);END;PRINTESC(530);
BEGIN HELPPTR:=2;HELPLINE[1]:=1130;HELPLINE[0]:=1131;END;ERROR;END;
PROCEDURE OMITERROR;BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1122);END;
PRINTESC(533);BEGIN HELPPTR:=2;HELPLINE[1]:=1132;HELPLINE[0]:=1131;END;
ERROR;END;{:1129}{1131:}PROCEDURE DOENDV;
BEGIN IF CURGROUP=6 THEN BEGIN ENDGRAF;IF FINCOL THEN FINROW;
END ELSE OFFSAVE;END;{:1131}{1135:}PROCEDURE CSERROR;
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(786);END;PRINTESC(508);
BEGIN HELPPTR:=1;HELPLINE[0]:=1134;END;ERROR;END;{:1135}{1136:}
PROCEDURE PUSHMATH(C:GROUPCODE);BEGIN PUSHNEST;CURLIST.MODEFIELD:=-203;
CURLIST.AUXFIELD.INT:=0;NEWSAVELEVEL(C);END;{:1136}{1138:}{1466:}
PROCEDURE JUSTCOPY(P,H,T:HALFWORD);LABEL 40,45;VAR R:HALFWORD;
WORDS:0..5;BEGIN WHILE P<>0 DO BEGIN WORDS:=1;
IF(P>=HIMEMMIN)THEN R:=GETAVAIL ELSE CASE MEM[P].HH.B0 OF 0,1:BEGIN R:=
GETNODE(7);MEM[R+6]:=MEM[P+6];MEM[R+5]:=MEM[P+5];WORDS:=5;
MEM[R+5].HH.RH:=0;END;2:BEGIN R:=GETNODE(4);WORDS:=4;END;
6:BEGIN R:=GETAVAIL;MEM[R]:=MEM[P+1];GOTO 40;END;
11,9:BEGIN R:=GETNODE(2);WORDS:=2;END;10:BEGIN R:=GETNODE(2);
MEM[MEM[P+1].HH.LH].HH.RH:=MEM[MEM[P+1].HH.LH].HH.RH+1;
MEM[R+1].HH.LH:=MEM[P+1].HH.LH;MEM[R+1].HH.RH:=0;END;8:{1357:}
CASE MEM[P].HH.B1 OF 0:BEGIN R:=GETNODE(3);WORDS:=3;END;
1,3:BEGIN R:=GETNODE(2);
MEM[MEM[P+1].HH.RH].HH.LH:=MEM[MEM[P+1].HH.RH].HH.LH+1;WORDS:=2;END;
2,4:BEGIN R:=GETNODE(2);WORDS:=2;END;OTHERWISE CONFUSION(1304)END{:1357}
;OTHERWISE GOTO 45 END;WHILE WORDS>0 DO BEGIN WORDS:=WORDS-1;
MEM[R+WORDS]:=MEM[P+WORDS];END;40:MEM[H].HH.RH:=R;H:=R;
45:P:=MEM[P].HH.RH;END;MEM[H].HH.RH:=T;END;{:1466}{1471:}
PROCEDURE JUSTREVERSE(P:HALFWORD);LABEL 40,30;VAR L:HALFWORD;T:HALFWORD;
Q:HALFWORD;M,N:HALFWORD;BEGIN M:=0;N:=0;
IF MEM[327141].HH.RH=0 THEN BEGIN JUSTCOPY(MEM[P].HH.RH,327141,0);
Q:=MEM[327141].HH.RH;END ELSE BEGIN Q:=MEM[P].HH.RH;MEM[P].HH.RH:=0;
FLUSHNODELIST(MEM[327141].HH.RH);END;T:=NEWEDGE(CURDIR,0);L:=T;
CURDIR:=1-CURDIR;WHILE Q<>0 DO IF(Q>=HIMEMMIN)THEN REPEAT P:=Q;
Q:=MEM[P].HH.RH;MEM[P].HH.RH:=L;L:=P;
UNTIL NOT(Q>=HIMEMMIN)ELSE BEGIN P:=Q;Q:=MEM[P].HH.RH;
IF MEM[P].HH.B0=9 THEN{1472:}
IF ODD(MEM[P].HH.B1)THEN IF MEM[LRPTR].HH.LH<>(4*(MEM[P].HH.B1 DIV 4)+3)
THEN BEGIN MEM[P].HH.B0:=11;LRPROBLEMS:=LRPROBLEMS+1;
END ELSE BEGIN BEGIN TEMPPTR:=LRPTR;LRPTR:=MEM[TEMPPTR].HH.RH;
BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;
END;IF N>0 THEN BEGIN N:=N-1;MEM[P].HH.B1:=MEM[P].HH.B1-1;
END ELSE BEGIN IF M>0 THEN M:=M-1 ELSE GOTO 40;MEM[P].HH.B0:=11;END;
END ELSE BEGIN BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=(4*(MEM[P].HH.B1 DIV 4)+3);
MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;END;
IF(N>0)OR((MEM[P].HH.B1 DIV 8)<>CURDIR)THEN BEGIN N:=N+1;
MEM[P].HH.B1:=MEM[P].HH.B1+1;END ELSE BEGIN MEM[P].HH.B0:=11;M:=M+1;END;
END{:1472};MEM[P].HH.RH:=L;L:=P;END;GOTO 30;
40:MEM[T+1].INT:=MEM[P+1].INT;MEM[T].HH.RH:=Q;FREENODE(P,2);
30:MEM[327141].HH.RH:=L;END;{:1471}PROCEDURE INITMATH;LABEL 21,40,45,30;
VAR W:SCALED;J:HALFWORD;X:INTEGER;L:SCALED;S:SCALED;P:HALFWORD;
Q:HALFWORD;F:INTERNALFONTNUMBER;N:INTEGER;V:SCALED;D:SCALED;
BEGIN GETTOKEN;IF(CURCMD=3)AND(CURLIST.MODEFIELD>0)THEN{1145:}
BEGIN J:=0;W:=-1073741823;
IF CURLIST.HEADFIELD=CURLIST.TAILFIELD THEN{1465:}BEGIN POPNEST;{1464:}
IF CURLIST.ETEXAUXFIELD=0 THEN X:=0 ELSE IF MEM[CURLIST.ETEXAUXFIELD].HH
.LH>=8 THEN X:=-1 ELSE X:=1{:1464};END{:1465}ELSE BEGIN LINEBREAK(TRUE);
{1146:}{1467:}IF(ETEXMODE=1)THEN{1473:}
BEGIN IF EQTB[10790].HH.RH=0 THEN J:=NEWKERN(0)ELSE J:=NEWPARAMGLUE(8);
IF EQTB[10789].HH.RH=0 THEN P:=NEWKERN(0)ELSE P:=NEWPARAMGLUE(7);
MEM[P].HH.RH:=J;J:=NEWNULLBOX;MEM[J+1].INT:=MEM[JUSTBOX+1].INT;
MEM[J+4].INT:=MEM[JUSTBOX+4].INT;MEM[J+5].HH.RH:=P;
MEM[J+5].HH.B1:=MEM[JUSTBOX+5].HH.B1;
MEM[J+5].HH.B0:=MEM[JUSTBOX+5].HH.B0;MEM[J+6].GR:=MEM[JUSTBOX+6].GR;
END{:1473};V:=MEM[JUSTBOX+4].INT;{1464:}
IF CURLIST.ETEXAUXFIELD=0 THEN X:=0 ELSE IF MEM[CURLIST.ETEXAUXFIELD].HH
.LH>=8 THEN X:=-1 ELSE X:=1{:1464};
IF X>=0 THEN BEGIN P:=MEM[JUSTBOX+5].HH.RH;MEM[327141].HH.RH:=0;
END ELSE BEGIN V:=-V-MEM[JUSTBOX+1].INT;P:=NEWMATH(0,6);
MEM[327141].HH.RH:=P;JUSTCOPY(MEM[JUSTBOX+5].HH.RH,P,NEWMATH(0,7));
CURDIR:=1;END;V:=V+2*FONTINFO[6+PARAMBASE[EQTB[11839].HH.RH]].INT;
IF(EQTB[13232].INT>0)THEN{1446:}BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=0;MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;
END{:1446}{:1467};WHILE P<>0 DO BEGIN{1147:}
21:IF(P>=HIMEMMIN)THEN BEGIN F:=MEM[P].HH.B0;
D:=FONTINFO[WIDTHBASE[F]+FONTINFO[CHARBASE[F]+MEM[P].HH.B1].QQQQ.B0].INT
;GOTO 40;END;CASE MEM[P].HH.B0 OF 0,1,2:BEGIN D:=MEM[P+1].INT;GOTO 40;
END;6:{652:}BEGIN MEM[327132]:=MEM[P+1];MEM[327132].HH.RH:=MEM[P].HH.RH;
P:=327132;GOTO 21;END{:652};11:D:=MEM[P+1].INT;{1469:}
9:BEGIN D:=MEM[P+1].INT;IF(EQTB[13232].INT>0)THEN{1470:}
IF ODD(MEM[P].HH.B1)THEN BEGIN IF MEM[LRPTR].HH.LH=(4*(MEM[P].HH.B1 DIV
4)+3)THEN BEGIN TEMPPTR:=LRPTR;LRPTR:=MEM[TEMPPTR].HH.RH;
BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;
END ELSE IF MEM[P].HH.B1>4 THEN BEGIN W:=1073741823;GOTO 30;
END END ELSE BEGIN BEGIN TEMPPTR:=GETAVAIL;
MEM[TEMPPTR].HH.LH:=(4*(MEM[P].HH.B1 DIV 4)+3);
MEM[TEMPPTR].HH.RH:=LRPTR;LRPTR:=TEMPPTR;END;
IF(MEM[P].HH.B1 DIV 8)<>CURDIR THEN BEGIN JUSTREVERSE(P);P:=327141;END;
END{:1470}ELSE IF MEM[P].HH.B1>=4 THEN BEGIN W:=1073741823;GOTO 30;END;
END;14:BEGIN D:=MEM[P+1].INT;CURDIR:=MEM[P].HH.B1;END;{:1469}10:{1148:}
BEGIN Q:=MEM[P+1].HH.LH;D:=MEM[Q+1].INT;
IF MEM[JUSTBOX+5].HH.B0=1 THEN BEGIN IF(MEM[JUSTBOX+5].HH.B1=MEM[Q].HH.
B0)AND(MEM[Q+2].INT<>0)THEN V:=1073741823;
END ELSE IF MEM[JUSTBOX+5].HH.B0=2 THEN BEGIN IF(MEM[JUSTBOX+5].HH.B1=
MEM[Q].HH.B1)AND(MEM[Q+3].INT<>0)THEN V:=1073741823;END;
IF MEM[P].HH.B1>=100 THEN GOTO 40;END{:1148};8:{1361:}D:=0{:1361};
OTHERWISE D:=0 END{:1147};IF V<1073741823 THEN V:=V+D;GOTO 45;
40:IF V<1073741823 THEN BEGIN V:=V+D;W:=V;END ELSE BEGIN W:=1073741823;
GOTO 30;END;45:P:=MEM[P].HH.RH;END;30:{1468:}
IF(EQTB[13232].INT>0)THEN BEGIN WHILE LRPTR<>0 DO BEGIN TEMPPTR:=LRPTR;
LRPTR:=MEM[TEMPPTR].HH.RH;BEGIN MEM[TEMPPTR].HH.RH:=AVAIL;
AVAIL:=TEMPPTR;DYNUSED:=DYNUSED-1;END;END;
IF LRPROBLEMS<>0 THEN BEGIN W:=1073741823;LRPROBLEMS:=0;END;END;
CURDIR:=0;FLUSHNODELIST(MEM[327141].HH.RH){:1468}{:1146};END;{1149:}
IF EQTB[11312].HH.RH=0 THEN IF(EQTB[13762].INT<>0)AND(((EQTB[13209].INT
>=0)AND(CURLIST.PGFIELD+2>EQTB[13209].INT))OR(CURLIST.PGFIELD+1<-EQTB[
13209].INT))THEN BEGIN L:=EQTB[13748].INT-ABS(EQTB[13762].INT);
IF EQTB[13762].INT>0 THEN S:=EQTB[13762].INT ELSE S:=0;
END ELSE BEGIN L:=EQTB[13748].INT;S:=0;
END ELSE BEGIN N:=MEM[EQTB[11312].HH.RH].HH.LH;
IF CURLIST.PGFIELD+2>=N THEN P:=EQTB[11312].HH.RH+2*N ELSE P:=EQTB[11312
].HH.RH+2*(CURLIST.PGFIELD+2);S:=MEM[P-1].INT;L:=MEM[P].INT;END{:1149};
PUSHMATH(15);CURLIST.MODEFIELD:=203;EQWORDDEFINE(13212,-1);
EQWORDDEFINE(13758,W);CURLIST.ETEXAUXFIELD:=J;
IF(ETEXMODE=1)THEN EQWORDDEFINE(13228,X);EQWORDDEFINE(13759,L);
EQWORDDEFINE(13760,S);
IF EQTB[11320].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11320].HH.RH,9);
IF NESTPTR=1 THEN BUILDPAGE;END{:1145}ELSE BEGIN BACKINPUT;{1139:}
BEGIN PUSHMATH(15);EQWORDDEFINE(13212,-1);
IF EQTB[11319].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11319].HH.RH,8);
END{:1139};END;END;{:1138}{1142:}PROCEDURE STARTEQNO;
BEGIN SAVESTACK[SAVEPTR+0].INT:=CURCHR;SAVEPTR:=SAVEPTR+1;{1139:}
BEGIN PUSHMATH(15);EQWORDDEFINE(13212,-1);
IF EQTB[11319].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11319].HH.RH,8);
END{:1139};END;{:1142}{1151:}PROCEDURE SCANMATH(P:HALFWORD);
LABEL 20,21,10;VAR C:INTEGER;BEGIN 20:{404:}REPEAT GETXTOKEN;
UNTIL(CURCMD<>10)AND(CURCMD<>0){:404};
21:CASE CURCMD OF 11,12,68:BEGIN C:=EQTB[12912+CURCHR].HH.RH;
IF C=32768 THEN BEGIN{1152:}BEGIN CURCS:=CURCHR+1;
CURCMD:=EQTB[CURCS].HH.B0;CURCHR:=EQTB[CURCS].HH.RH;XTOKEN;BACKINPUT;
END{:1152};GOTO 20;END;END;16:BEGIN SCANCHARNUM;CURCHR:=CURVAL;
CURCMD:=68;GOTO 21;END;17:BEGIN SCANFIFTEENBITINT;C:=CURVAL;END;
69:C:=CURCHR;15:BEGIN SCANTWENTYSEVENBITINT;C:=CURVAL DIV 4096;END;
OTHERWISE{1153:}BEGIN BACKINPUT;SCANLEFTBRACE;
SAVESTACK[SAVEPTR+0].INT:=P;SAVEPTR:=SAVEPTR+1;PUSHMATH(9);GOTO 10;
END{:1153}END;MEM[P].HH.RH:=1;MEM[P].HH.B1:=C MOD 256;
IF(C>=28672)AND((EQTB[13212].INT>=0)AND(EQTB[13212].INT<16))THEN MEM[P].
HH.B0:=EQTB[13212].INT ELSE MEM[P].HH.B0:=(C DIV 256)MOD 16;10:END;
{:1151}{1155:}PROCEDURE SETMATHCHAR(C:INTEGER);VAR P:HALFWORD;
BEGIN IF C>=32768 THEN{1152:}BEGIN CURCS:=CURCHR+1;
CURCMD:=EQTB[CURCS].HH.B0;CURCHR:=EQTB[CURCS].HH.RH;XTOKEN;BACKINPUT;
END{:1152}ELSE BEGIN P:=NEWNOAD;MEM[P+1].HH.RH:=1;
MEM[P+1].HH.B1:=C MOD 256;MEM[P+1].HH.B0:=(C DIV 256)MOD 16;
IF C>=28672 THEN BEGIN IF((EQTB[13212].INT>=0)AND(EQTB[13212].INT<16))
THEN MEM[P+1].HH.B0:=EQTB[13212].INT;MEM[P].HH.B0:=16;
END ELSE MEM[P].HH.B0:=16+(C DIV 4096);MEM[CURLIST.TAILFIELD].HH.RH:=P;
CURLIST.TAILFIELD:=P;END;END;{:1155}{1159:}PROCEDURE MATHLIMITSWITCH;
LABEL 10;
BEGIN IF CURLIST.HEADFIELD<>CURLIST.TAILFIELD THEN IF MEM[CURLIST.
TAILFIELD].HH.B0=17 THEN BEGIN MEM[CURLIST.TAILFIELD].HH.B1:=CURCHR;
GOTO 10;END;BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1138);END;BEGIN HELPPTR:=1;
HELPLINE[0]:=1139;END;ERROR;10:END;{:1159}{1160:}
PROCEDURE SCANDELIMITER(P:HALFWORD;R:BOOLEAN);
BEGIN IF R THEN SCANTWENTYSEVENBITINT ELSE BEGIN{404:}REPEAT GETXTOKEN;
UNTIL(CURCMD<>10)AND(CURCMD<>0){:404};
CASE CURCMD OF 11,12:CURVAL:=EQTB[13489+CURCHR].INT;
15:SCANTWENTYSEVENBITINT;OTHERWISE CURVAL:=-1 END;END;
IF CURVAL<0 THEN{1161:}BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1140);END;
BEGIN HELPPTR:=6;HELPLINE[5]:=1141;HELPLINE[4]:=1142;HELPLINE[3]:=1143;
HELPLINE[2]:=1144;HELPLINE[1]:=1145;HELPLINE[0]:=1146;END;BACKERROR;
CURVAL:=0;END{:1161};MEM[P].QQQQ.B0:=(CURVAL DIV 1048576)MOD 16;
MEM[P].QQQQ.B1:=(CURVAL DIV 4096)MOD 256;
MEM[P].QQQQ.B2:=(CURVAL DIV 256)MOD 16;MEM[P].QQQQ.B3:=CURVAL MOD 256;
END;{:1160}{1163:}PROCEDURE MATHRADICAL;
BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=GETNODE(5);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B0:=24;MEM[CURLIST.TAILFIELD].HH.B1:=0;
MEM[CURLIST.TAILFIELD+1].HH:=EMPTYFIELD;
MEM[CURLIST.TAILFIELD+3].HH:=EMPTYFIELD;
MEM[CURLIST.TAILFIELD+2].HH:=EMPTYFIELD;
SCANDELIMITER(CURLIST.TAILFIELD+4,TRUE);SCANMATH(CURLIST.TAILFIELD+1);
END;{:1163}{1165:}PROCEDURE MATHAC;BEGIN IF CURCMD=45 THEN{1166:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1147);END;PRINTESC(526);
PRINT(1148);BEGIN HELPPTR:=2;HELPLINE[1]:=1149;HELPLINE[0]:=1150;END;
ERROR;END{:1166};BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=GETNODE(5);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B0:=28;MEM[CURLIST.TAILFIELD].HH.B1:=0;
MEM[CURLIST.TAILFIELD+1].HH:=EMPTYFIELD;
MEM[CURLIST.TAILFIELD+3].HH:=EMPTYFIELD;
MEM[CURLIST.TAILFIELD+2].HH:=EMPTYFIELD;
MEM[CURLIST.TAILFIELD+4].HH.RH:=1;SCANFIFTEENBITINT;
MEM[CURLIST.TAILFIELD+4].HH.B1:=CURVAL MOD 256;
IF(CURVAL>=28672)AND((EQTB[13212].INT>=0)AND(EQTB[13212].INT<16))THEN
MEM[CURLIST.TAILFIELD+4].HH.B0:=EQTB[13212].INT ELSE MEM[CURLIST.
TAILFIELD+4].HH.B0:=(CURVAL DIV 256)MOD 16;
SCANMATH(CURLIST.TAILFIELD+1);END;{:1165}{1172:}PROCEDURE APPENDCHOICES;
BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWCHOICE;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;SAVEPTR:=SAVEPTR+1;
SAVESTACK[SAVEPTR-1].INT:=0;PUSHMATH(13);SCANLEFTBRACE;END;{:1172}
{1174:}{1184:}FUNCTION FINMLIST(P:HALFWORD):HALFWORD;VAR Q:HALFWORD;
BEGIN IF CURLIST.AUXFIELD.INT<>0 THEN{1185:}
BEGIN MEM[CURLIST.AUXFIELD.INT+3].HH.RH:=3;
MEM[CURLIST.AUXFIELD.INT+3].HH.LH:=MEM[CURLIST.HEADFIELD].HH.RH;
IF P=0 THEN Q:=CURLIST.AUXFIELD.INT ELSE BEGIN Q:=MEM[CURLIST.AUXFIELD.
INT+2].HH.LH;
IF(MEM[Q].HH.B0<>30)OR(CURLIST.ETEXAUXFIELD=0)THEN CONFUSION(885);
MEM[CURLIST.AUXFIELD.INT+2].HH.LH:=MEM[CURLIST.ETEXAUXFIELD].HH.RH;
MEM[CURLIST.ETEXAUXFIELD].HH.RH:=CURLIST.AUXFIELD.INT;
MEM[CURLIST.AUXFIELD.INT].HH.RH:=P;END;END{:1185}
ELSE BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=P;
Q:=MEM[CURLIST.HEADFIELD].HH.RH;END;POPNEST;FINMLIST:=Q;END;{:1184}
PROCEDURE BUILDCHOICES;LABEL 10;VAR P:HALFWORD;BEGIN UNSAVE;
P:=FINMLIST(0);
CASE SAVESTACK[SAVEPTR-1].INT OF 0:MEM[CURLIST.TAILFIELD+1].HH.LH:=P;
1:MEM[CURLIST.TAILFIELD+1].HH.RH:=P;2:MEM[CURLIST.TAILFIELD+2].HH.LH:=P;
3:BEGIN MEM[CURLIST.TAILFIELD+2].HH.RH:=P;SAVEPTR:=SAVEPTR-1;GOTO 10;
END;END;SAVESTACK[SAVEPTR-1].INT:=SAVESTACK[SAVEPTR-1].INT+1;
PUSHMATH(13);SCANLEFTBRACE;10:END;{:1174}{1176:}PROCEDURE SUBSUP;
VAR T:SMALLNUMBER;P:HALFWORD;BEGIN T:=0;P:=0;
IF CURLIST.TAILFIELD<>CURLIST.HEADFIELD THEN IF(MEM[CURLIST.TAILFIELD].
HH.B0>=16)AND(MEM[CURLIST.TAILFIELD].HH.B0<30)THEN BEGIN P:=CURLIST.
TAILFIELD+2+CURCMD-7;T:=MEM[P].HH.RH;END;IF(P=0)OR(T<>0)THEN{1177:}
BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWNOAD;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
P:=CURLIST.TAILFIELD+2+CURCMD-7;
IF T<>0 THEN BEGIN IF CURCMD=7 THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1151);END;BEGIN HELPPTR:=1;HELPLINE[0]:=1152;END;
END ELSE BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1153);END;BEGIN HELPPTR:=1;
HELPLINE[0]:=1154;END;END;ERROR;END;END{:1177};SCANMATH(P);END;{:1176}
{1181:}PROCEDURE MATHFRACTION;VAR C:SMALLNUMBER;BEGIN C:=CURCHR;
IF CURLIST.AUXFIELD.INT<>0 THEN{1183:}
BEGIN IF C>=3 THEN BEGIN SCANDELIMITER(327132,FALSE);
SCANDELIMITER(327132,FALSE);END;
IF C MOD 3=0 THEN SCANDIMEN(FALSE,FALSE,FALSE);
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(1161);END;BEGIN HELPPTR:=3;HELPLINE[2]:=1162;
HELPLINE[1]:=1163;HELPLINE[0]:=1164;END;ERROR;END{:1183}
ELSE BEGIN CURLIST.AUXFIELD.INT:=GETNODE(6);
MEM[CURLIST.AUXFIELD.INT].HH.B0:=25;MEM[CURLIST.AUXFIELD.INT].HH.B1:=0;
MEM[CURLIST.AUXFIELD.INT+2].HH.RH:=3;
MEM[CURLIST.AUXFIELD.INT+2].HH.LH:=MEM[CURLIST.HEADFIELD].HH.RH;
MEM[CURLIST.AUXFIELD.INT+3].HH:=EMPTYFIELD;
MEM[CURLIST.AUXFIELD.INT+4].QQQQ:=NULLDELIMITER;
MEM[CURLIST.AUXFIELD.INT+5].QQQQ:=NULLDELIMITER;
MEM[CURLIST.HEADFIELD].HH.RH:=0;CURLIST.TAILFIELD:=CURLIST.HEADFIELD;
{1182:}IF C>=3 THEN BEGIN SCANDELIMITER(CURLIST.AUXFIELD.INT+4,FALSE);
SCANDELIMITER(CURLIST.AUXFIELD.INT+5,FALSE);END;
CASE C MOD 3 OF 0:BEGIN SCANDIMEN(FALSE,FALSE,FALSE);
MEM[CURLIST.AUXFIELD.INT+1].INT:=CURVAL;END;
1:MEM[CURLIST.AUXFIELD.INT+1].INT:=1073741824;
2:MEM[CURLIST.AUXFIELD.INT+1].INT:=0;END{:1182};END;END;{:1181}{1191:}
PROCEDURE MATHLEFTRIGHT;VAR T:SMALLNUMBER;P:HALFWORD;Q:HALFWORD;
BEGIN T:=CURCHR;IF(T<>30)AND(CURGROUP<>16)THEN{1192:}
BEGIN IF CURGROUP=15 THEN BEGIN SCANDELIMITER(327132,FALSE);
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(786);END;IF T=1 THEN BEGIN PRINTESC(886);
BEGIN HELPPTR:=1;HELPLINE[0]:=1165;END;END ELSE BEGIN PRINTESC(885);
BEGIN HELPPTR:=1;HELPLINE[0]:=1166;END;END;ERROR;END ELSE OFFSAVE;
END{:1192}ELSE BEGIN P:=NEWNOAD;MEM[P].HH.B0:=T;
SCANDELIMITER(P+1,FALSE);IF T=1 THEN BEGIN MEM[P].HH.B0:=31;
MEM[P].HH.B1:=1;END;IF T=30 THEN Q:=P ELSE BEGIN Q:=FINMLIST(P);UNSAVE;
END;IF T<>31 THEN BEGIN PUSHMATH(16);MEM[CURLIST.HEADFIELD].HH.RH:=Q;
CURLIST.TAILFIELD:=P;CURLIST.ETEXAUXFIELD:=P;
END ELSE BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWNOAD;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B0:=23;MEM[CURLIST.TAILFIELD+1].HH.RH:=3;
MEM[CURLIST.TAILFIELD+1].HH.LH:=Q;END;END;END;{:1191}{1194:}{1477:}
PROCEDURE APPDISPLAY(J,B:HALFWORD;D:SCALED);VAR Z:SCALED;S:SCALED;
E:SCALED;X:INTEGER;P,Q,R,T,U:HALFWORD;BEGIN S:=EQTB[13760].INT;
X:=EQTB[13228].INT;
IF X=0 THEN MEM[B+4].INT:=S+D ELSE BEGIN Z:=EQTB[13759].INT;P:=B;{1478:}
IF X>0 THEN E:=Z-D-MEM[P+1].INT ELSE BEGIN E:=D;D:=Z-E-MEM[P+1].INT;END;
IF J<>0 THEN BEGIN B:=COPYNODELIST(J);MEM[B+3].INT:=MEM[P+3].INT;
MEM[B+2].INT:=MEM[P+2].INT;S:=S-MEM[B+4].INT;D:=D+S;
E:=E+MEM[B+1].INT-Z-S;END;
IF MEM[P].HH.B1=2 THEN Q:=P ELSE BEGIN R:=MEM[P+5].HH.RH;FREENODE(P,7);
IF R=0 THEN CONFUSION(1375);IF X>0 THEN BEGIN P:=R;REPEAT Q:=R;
R:=MEM[R].HH.RH;UNTIL R=0;END ELSE BEGIN P:=0;Q:=R;
REPEAT T:=MEM[R].HH.RH;MEM[R].HH.RH:=P;P:=R;R:=T;UNTIL R=0;END;
END{:1478};{1479:}IF J=0 THEN BEGIN R:=NEWKERN(0);T:=NEWKERN(0);
END ELSE BEGIN R:=MEM[B+5].HH.RH;T:=MEM[R].HH.RH;END;U:=NEWMATH(0,3);
IF MEM[T].HH.B0=10 THEN BEGIN J:=NEWSKIPPARAM(8);MEM[Q].HH.RH:=J;
MEM[J].HH.RH:=U;J:=MEM[T+1].HH.LH;MEM[TEMPPTR].HH.B0:=MEM[J].HH.B0;
MEM[TEMPPTR].HH.B1:=MEM[J].HH.B1;MEM[TEMPPTR+1].INT:=E-MEM[J+1].INT;
MEM[TEMPPTR+2].INT:=-MEM[J+2].INT;MEM[TEMPPTR+3].INT:=-MEM[J+3].INT;
MEM[U].HH.RH:=T;END ELSE BEGIN MEM[T+1].INT:=E;MEM[T].HH.RH:=U;
MEM[Q].HH.RH:=T;END;U:=NEWMATH(0,2);
IF MEM[R].HH.B0=10 THEN BEGIN J:=NEWSKIPPARAM(7);MEM[U].HH.RH:=J;
MEM[J].HH.RH:=P;J:=MEM[R+1].HH.LH;MEM[TEMPPTR].HH.B0:=MEM[J].HH.B0;
MEM[TEMPPTR].HH.B1:=MEM[J].HH.B1;MEM[TEMPPTR+1].INT:=D-MEM[J+1].INT;
MEM[TEMPPTR+2].INT:=-MEM[J+2].INT;MEM[TEMPPTR+3].INT:=-MEM[J+3].INT;
MEM[R].HH.RH:=U;END ELSE BEGIN MEM[R+1].INT:=D;MEM[R].HH.RH:=P;
MEM[U].HH.RH:=R;IF J=0 THEN BEGIN B:=HPACK(U,0,1);MEM[B+4].INT:=S;
END ELSE MEM[B+5].HH.RH:=U;END{:1479};END;APPENDTOVLIST(B);END;{:1477}
PROCEDURE AFTERMATH;VAR L:BOOLEAN;DANGER:BOOLEAN;M:INTEGER;P:HALFWORD;
A:HALFWORD;{1198:}B:HALFWORD;W:SCALED;Z:SCALED;E:SCALED;Q:SCALED;
D:SCALED;S:SCALED;G1,G2:SMALLNUMBER;R:HALFWORD;T:HALFWORD;{:1198}{1474:}
J:HALFWORD;{:1474}BEGIN DANGER:=FALSE;{1475:}
IF CURLIST.MODEFIELD=203 THEN J:=CURLIST.ETEXAUXFIELD{:1475};{1195:}
IF(FONTPARAMS[EQTB[11842].HH.RH]<22)OR(FONTPARAMS[EQTB[11858].HH.RH]<22)
OR(FONTPARAMS[EQTB[11874].HH.RH]<22)THEN BEGIN BEGIN IF INTERACTION=3
THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1167);END;BEGIN HELPPTR:=3;HELPLINE[2]:=1168;HELPLINE[1]:=1169;
HELPLINE[0]:=1170;END;ERROR;FLUSHMATH;DANGER:=TRUE;
END ELSE IF(FONTPARAMS[EQTB[11843].HH.RH]<13)OR(FONTPARAMS[EQTB[11859].
HH.RH]<13)OR(FONTPARAMS[EQTB[11875].HH.RH]<13)THEN BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(1171);END;BEGIN HELPPTR:=3;HELPLINE[2]:=1172;
HELPLINE[1]:=1173;HELPLINE[0]:=1174;END;ERROR;FLUSHMATH;DANGER:=TRUE;
END{:1195};M:=CURLIST.MODEFIELD;L:=FALSE;P:=FINMLIST(0);
IF CURLIST.MODEFIELD=-M THEN BEGIN{1197:}BEGIN GETXTOKEN;
IF CURCMD<>3 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1175);END;
BEGIN HELPPTR:=2;HELPLINE[1]:=1176;HELPLINE[0]:=1177;END;BACKERROR;END;
END{:1197};CURMLIST:=P;CURSTYLE:=2;MLISTPENALTIES:=FALSE;MLISTTOHLIST;
A:=HPACK(MEM[327141].HH.RH,0,1);MEM[A].HH.B1:=2;UNSAVE;
SAVEPTR:=SAVEPTR-1;IF SAVESTACK[SAVEPTR+0].INT=1 THEN L:=TRUE;
DANGER:=FALSE;{1475:}
IF CURLIST.MODEFIELD=203 THEN J:=CURLIST.ETEXAUXFIELD{:1475};{1195:}
IF(FONTPARAMS[EQTB[11842].HH.RH]<22)OR(FONTPARAMS[EQTB[11858].HH.RH]<22)
OR(FONTPARAMS[EQTB[11874].HH.RH]<22)THEN BEGIN BEGIN IF INTERACTION=3
THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1167);END;BEGIN HELPPTR:=3;HELPLINE[2]:=1168;HELPLINE[1]:=1169;
HELPLINE[0]:=1170;END;ERROR;FLUSHMATH;DANGER:=TRUE;
END ELSE IF(FONTPARAMS[EQTB[11843].HH.RH]<13)OR(FONTPARAMS[EQTB[11859].
HH.RH]<13)OR(FONTPARAMS[EQTB[11875].HH.RH]<13)THEN BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(1171);END;BEGIN HELPPTR:=3;HELPLINE[2]:=1172;
HELPLINE[1]:=1173;HELPLINE[0]:=1174;END;ERROR;FLUSHMATH;DANGER:=TRUE;
END{:1195};M:=CURLIST.MODEFIELD;P:=FINMLIST(0);END ELSE A:=0;
IF M<0 THEN{1196:}
BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWMATH(EQTB[13746].INT,0);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;CURMLIST:=P;
CURSTYLE:=2;MLISTPENALTIES:=(CURLIST.MODEFIELD>0);MLISTTOHLIST;
MEM[CURLIST.TAILFIELD].HH.RH:=MEM[327141].HH.RH;
WHILE MEM[CURLIST.TAILFIELD].HH.RH<>0 DO CURLIST.TAILFIELD:=MEM[CURLIST.
TAILFIELD].HH.RH;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWMATH(EQTB[13746].INT,1);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
CURLIST.AUXFIELD.HH.LH:=1000;UNSAVE;END{:1196}
ELSE BEGIN IF A=0 THEN{1197:}BEGIN GETXTOKEN;
IF CURCMD<>3 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1175);END;
BEGIN HELPPTR:=2;HELPLINE[1]:=1176;HELPLINE[0]:=1177;END;BACKERROR;END;
END{:1197};{1199:}CURMLIST:=P;CURSTYLE:=0;MLISTPENALTIES:=FALSE;
MLISTTOHLIST;P:=MEM[327141].HH.RH;ADJUSTTAIL:=327139;B:=HPACK(P,0,1);
P:=MEM[B+5].HH.RH;T:=ADJUSTTAIL;ADJUSTTAIL:=0;W:=MEM[B+1].INT;
Z:=EQTB[13759].INT;S:=EQTB[13760].INT;IF EQTB[13228].INT<0 THEN S:=-S-Z;
IF(A=0)OR DANGER THEN BEGIN E:=0;Q:=0;END ELSE BEGIN E:=MEM[A+1].INT;
Q:=E+FONTINFO[6+PARAMBASE[EQTB[11842].HH.RH]].INT;END;
IF W+Q>Z THEN{1201:}
BEGIN IF(E<>0)AND((W-TOTALSHRINK[0]+Q<=Z)OR(TOTALSHRINK[1]<>0)OR(
TOTALSHRINK[2]<>0)OR(TOTALSHRINK[3]<>0))THEN BEGIN FREENODE(B,7);
B:=HPACK(P,Z-Q,0);END ELSE BEGIN E:=0;IF W>Z THEN BEGIN FREENODE(B,7);
B:=HPACK(P,Z,0);END;END;W:=MEM[B+1].INT;END{:1201};{1202:}
MEM[B].HH.B1:=2;D:=HALF(Z-W);IF(E>0)AND(D<2*E)THEN BEGIN D:=HALF(Z-W-E);
IF P<>0 THEN IF NOT(P>=HIMEMMIN)THEN IF MEM[P].HH.B0=10 THEN D:=0;
END{:1202};{1203:}
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPENALTY(EQTB[13179].INT);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
IF(D+S<=EQTB[13758].INT)OR L THEN BEGIN G1:=3;G2:=4;
END ELSE BEGIN G1:=5;G2:=6;END;
IF L AND(E=0)THEN BEGIN APPDISPLAY(J,A,0);
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPENALTY(10000);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
END ELSE BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPARAMGLUE(G1);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END{:1203};{1204:}
IF E<>0 THEN BEGIN R:=NEWKERN(Z-W-E-D);IF L THEN BEGIN MEM[A].HH.RH:=R;
MEM[R].HH.RH:=B;B:=A;D:=0;END ELSE BEGIN MEM[B].HH.RH:=R;
MEM[R].HH.RH:=A;END;B:=HPACK(B,0,1);END;APPDISPLAY(J,B,D){:1204};{1205:}
IF(A<>0)AND(E=0)AND NOT L THEN BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH
:=NEWPENALTY(10000);CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
APPDISPLAY(J,A,Z-MEM[A+1].INT);G2:=0;END;
IF T<>327139 THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=MEM[327139].HH.RH;
CURLIST.TAILFIELD:=T;END;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPENALTY(EQTB[13180].INT);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
IF G2>0 THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWPARAMGLUE(G2);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END{:1205};{1476:}
FLUSHNODELIST(J){:1476};RESUMEAFTERDISPLAY{:1199};END;END;{:1194}{1200:}
PROCEDURE RESUMEAFTERDISPLAY;BEGIN IF CURGROUP<>15 THEN CONFUSION(1178);
UNSAVE;CURLIST.PGFIELD:=CURLIST.PGFIELD+3;PUSHNEST;
CURLIST.MODEFIELD:=102;CURLIST.AUXFIELD.HH.LH:=1000;
IF EQTB[13218].INT<=0 THEN CURLANG:=0 ELSE IF EQTB[13218].INT>255 THEN
CURLANG:=0 ELSE CURLANG:=EQTB[13218].INT;
CURLIST.AUXFIELD.HH.RH:=CURLANG;
CURLIST.PGFIELD:=(NORMMIN(EQTB[13219].INT)*64+NORMMIN(EQTB[13220].INT))
*65536+CURLANG;{443:}BEGIN GETXTOKEN;IF CURCMD<>10 THEN BACKINPUT;
END{:443};IF NESTPTR=1 THEN BUILDPAGE;END;{:1200}{1211:}{1215:}
PROCEDURE GETRTOKEN;LABEL 20;BEGIN 20:REPEAT GETTOKEN;
UNTIL CURTOK<>2592;
IF(CURCS=0)OR(CURCS>10514)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1193);END;BEGIN HELPPTR:=5;HELPLINE[4]:=1194;HELPLINE[3]:=1195;
HELPLINE[2]:=1196;HELPLINE[1]:=1197;HELPLINE[0]:=1198;END;
IF CURCS=0 THEN BACKINPUT;CURTOK:=14609;INSERROR;GOTO 20;END;END;{:1215}
{1229:}PROCEDURE TRAPZEROGLUE;
BEGIN IF(MEM[CURVAL+1].INT=0)AND(MEM[CURVAL+2].INT=0)AND(MEM[CURVAL+3].
INT=0)THEN BEGIN MEM[0].HH.RH:=MEM[0].HH.RH+1;DELETEGLUEREF(CURVAL);
CURVAL:=0;END;END;{:1229}{1236:}
PROCEDURE DOREGISTERCOMMAND(A:SMALLNUMBER);LABEL 40,10;
VAR L,Q,R,S:HALFWORD;P:0..3;E:BOOLEAN;W:INTEGER;BEGIN Q:=CURCMD;
E:=FALSE;{1237:}BEGIN IF Q<>89 THEN BEGIN GETXTOKEN;
IF(CURCMD>=73)AND(CURCMD<=76)THEN BEGIN L:=CURCHR;P:=CURCMD-73;GOTO 40;
END;IF CURCMD<>89 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(694);END;
PRINTCMDCHR(CURCMD,CURCHR);PRINT(695);PRINTCMDCHR(Q,0);BEGIN HELPPTR:=1;
HELPLINE[0]:=1219;END;ERROR;GOTO 10;END;END;
IF(CURCHR<0)OR(CURCHR>19)THEN BEGIN L:=CURCHR;P:=(MEM[L].HH.B0 DIV 16);
E:=TRUE;END ELSE BEGIN P:=CURCHR-0;SCANREGISTERNUM;
IF CURVAL>255 THEN BEGIN FINDSAELEMENT(P,CURVAL,TRUE);L:=CURPTR;E:=TRUE;
END ELSE CASE P OF 0:L:=CURVAL+13233;1:L:=CURVAL+13766;
2:L:=CURVAL+10800;3:L:=CURVAL+11056;END;END;END;
40:IF P<2 THEN IF E THEN W:=MEM[L+2].INT ELSE W:=EQTB[L].INT ELSE IF E
THEN S:=MEM[L+1].HH.RH ELSE S:=EQTB[L].HH.RH{:1237};
IF Q=89 THEN SCANOPTIONALEQUALS ELSE IF SCANKEYWORD(1215)THEN;
ARITHERROR:=FALSE;IF Q<91 THEN{1238:}
IF P<2 THEN BEGIN IF P=0 THEN SCANINT ELSE SCANDIMEN(FALSE,FALSE,FALSE);
IF Q=90 THEN CURVAL:=CURVAL+W;END ELSE BEGIN SCANGLUE(P);
IF Q=90 THEN{1239:}BEGIN Q:=NEWSPEC(CURVAL);R:=S;DELETEGLUEREF(CURVAL);
MEM[Q+1].INT:=MEM[Q+1].INT+MEM[R+1].INT;
IF MEM[Q+2].INT=0 THEN MEM[Q].HH.B0:=0;
IF MEM[Q].HH.B0=MEM[R].HH.B0 THEN MEM[Q+2].INT:=MEM[Q+2].INT+MEM[R+2].
INT ELSE IF(MEM[Q].HH.B0<MEM[R].HH.B0)AND(MEM[R+2].INT<>0)THEN BEGIN MEM
[Q+2].INT:=MEM[R+2].INT;MEM[Q].HH.B0:=MEM[R].HH.B0;END;
IF MEM[Q+3].INT=0 THEN MEM[Q].HH.B1:=0;
IF MEM[Q].HH.B1=MEM[R].HH.B1 THEN MEM[Q+3].INT:=MEM[Q+3].INT+MEM[R+3].
INT ELSE IF(MEM[Q].HH.B1<MEM[R].HH.B1)AND(MEM[R+3].INT<>0)THEN BEGIN MEM
[Q+3].INT:=MEM[R+3].INT;MEM[Q].HH.B1:=MEM[R].HH.B1;END;CURVAL:=Q;
END{:1239};END{:1238}ELSE{1240:}BEGIN SCANINT;
IF P<2 THEN IF Q=91 THEN IF P=0 THEN CURVAL:=MULTANDADD(W,CURVAL,0,
2147483647)ELSE CURVAL:=MULTANDADD(W,CURVAL,0,1073741823)ELSE CURVAL:=
XOVERN(W,CURVAL)ELSE BEGIN R:=NEWSPEC(S);
IF Q=91 THEN BEGIN MEM[R+1].INT:=MULTANDADD(MEM[S+1].INT,CURVAL,0,
1073741823);MEM[R+2].INT:=MULTANDADD(MEM[S+2].INT,CURVAL,0,1073741823);
MEM[R+3].INT:=MULTANDADD(MEM[S+3].INT,CURVAL,0,1073741823);
END ELSE BEGIN MEM[R+1].INT:=XOVERN(MEM[S+1].INT,CURVAL);
MEM[R+2].INT:=XOVERN(MEM[S+2].INT,CURVAL);
MEM[R+3].INT:=XOVERN(MEM[S+3].INT,CURVAL);END;CURVAL:=R;END;END{:1240};
IF ARITHERROR THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1216);END;
BEGIN HELPPTR:=2;HELPLINE[1]:=1217;HELPLINE[0]:=1218;END;ERROR;GOTO 10;
END;
IF P<2 THEN IF E THEN IF(A>=4)THEN GSAWDEF(L,CURVAL)ELSE SAWDEF(L,CURVAL
)ELSE IF(A>=4)THEN GEQWORDDEFINE(L,CURVAL)ELSE EQWORDDEFINE(L,CURVAL)
ELSE BEGIN TRAPZEROGLUE;
IF E THEN IF(A>=4)THEN GSADEF(L,CURVAL)ELSE SADEF(L,CURVAL)ELSE IF(A>=4)
THEN GEQDEFINE(L,117,CURVAL)ELSE EQDEFINE(L,117,CURVAL);END;10:END;
{:1236}{1243:}PROCEDURE ALTERAUX;VAR C:HALFWORD;
BEGIN IF CURCHR<>ABS(CURLIST.MODEFIELD)THEN REPORTILLEGALCASE ELSE BEGIN
C:=CURCHR;SCANOPTIONALEQUALS;
IF C=1 THEN BEGIN SCANDIMEN(FALSE,FALSE,FALSE);
CURLIST.AUXFIELD.INT:=CURVAL;END ELSE BEGIN SCANINT;
IF(CURVAL<=0)OR(CURVAL>32767)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1222);END;BEGIN HELPPTR:=1;HELPLINE[0]:=1223;END;INTERROR(CURVAL);
END ELSE CURLIST.AUXFIELD.HH.LH:=CURVAL;END;END;END;{:1243}{1244:}
PROCEDURE ALTERPREVGRAF;VAR P:0..NESTSIZE;BEGIN NEST[NESTPTR]:=CURLIST;
P:=NESTPTR;WHILE ABS(NEST[P].MODEFIELD)<>1 DO P:=P-1;SCANOPTIONALEQUALS;
SCANINT;
IF CURVAL<0 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(964);END;
PRINTESC(536);BEGIN HELPPTR:=1;HELPLINE[0]:=1224;END;INTERROR(CURVAL);
END ELSE BEGIN NEST[P].PGFIELD:=CURVAL;CURLIST:=NEST[NESTPTR];END;END;
{:1244}{1245:}PROCEDURE ALTERPAGESOFAR;VAR C:0..7;BEGIN C:=CURCHR;
SCANOPTIONALEQUALS;SCANDIMEN(FALSE,FALSE,FALSE);PAGESOFAR[C]:=CURVAL;
END;{:1245}{1246:}PROCEDURE ALTERINTEGER;VAR C:SMALLNUMBER;
BEGIN C:=CURCHR;SCANOPTIONALEQUALS;SCANINT;
IF C=0 THEN DEADCYCLES:=CURVAL{1430:}
ELSE IF C=2 THEN BEGIN IF(CURVAL<0)OR(CURVAL>3)THEN BEGIN BEGIN IF
INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(1360);END;BEGIN HELPPTR:=2;HELPLINE[1]:=1361;
HELPLINE[0]:=1362;END;INTERROR(CURVAL);END ELSE BEGIN CURCHR:=CURVAL;
NEWINTERACTION;END;END{:1430}ELSE INSERTPENALTIES:=CURVAL;END;{:1246}
{1247:}PROCEDURE ALTERBOXDIMEN;VAR C:SMALLNUMBER;B:HALFWORD;
BEGIN C:=CURCHR;SCANREGISTERNUM;
IF CURVAL<256 THEN B:=EQTB[11583+CURVAL].HH.RH ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR=0 THEN B:=0 ELSE B:=MEM[CURPTR+1].HH.RH;END;
SCANOPTIONALEQUALS;SCANDIMEN(FALSE,FALSE,FALSE);
IF B<>0 THEN MEM[B+C].INT:=CURVAL;END;{:1247}{1257:}
PROCEDURE NEWFONT(A:SMALLNUMBER);LABEL 50;VAR U:HALFWORD;S:SCALED;
F:INTERNALFONTNUMBER;T:STRNUMBER;OLDSETTING:0..22;
FLUSHABLESTRING:STRNUMBER;BEGIN IF JOBNAME=0 THEN OPENLOGFILE;GETRTOKEN;
U:=CURCS;
IF U>=514 THEN T:=HASH[U].RH ELSE IF U>=257 THEN IF U=513 THEN T:=1228
ELSE T:=U-257 ELSE BEGIN OLDSETTING:=SELECTOR;SELECTOR:=21;PRINT(1228);
PRINT(U-1);SELECTOR:=OLDSETTING;
BEGIN IF POOLPTR+1>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR);END;
T:=MAKESTRING;END;IF(A>=4)THEN GEQDEFINE(U,87,0)ELSE EQDEFINE(U,87,0);
SCANOPTIONALEQUALS;SCANFILENAME;{1258:}NAMEINPROGRESS:=TRUE;
IF SCANKEYWORD(1229)THEN{1259:}BEGIN SCANDIMEN(FALSE,FALSE,FALSE);
S:=CURVAL;IF(S<=0)OR(S>=134217728)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1231);END;PRINTSCALED(S);PRINT(1232);BEGIN HELPPTR:=2;
HELPLINE[1]:=1233;HELPLINE[0]:=1234;END;ERROR;S:=10*65536;END;END{:1259}
ELSE IF SCANKEYWORD(1230)THEN BEGIN SCANINT;S:=-CURVAL;
IF(CURVAL<=0)OR(CURVAL>32768)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(560);END;BEGIN HELPPTR:=1;HELPLINE[0]:=561;END;INTERROR(CURVAL);
S:=-1000;END;END ELSE S:=-1000;NAMEINPROGRESS:=FALSE{:1258};{1260:}
FLUSHABLESTRING:=STRPTR-1;
FOR F:=1 TO FONTPTR DO IF STREQSTR(FONTNAME[F],CURNAME)AND STREQSTR(
FONTAREA[F],CURAREA)THEN BEGIN IF CURNAME=FLUSHABLESTRING THEN BEGIN
BEGIN STRPTR:=STRPTR-1;POOLPTR:=STRSTART[STRPTR];END;
CURNAME:=FONTNAME[F];END;IF S>0 THEN BEGIN IF S=FONTSIZE[F]THEN GOTO 50;
END ELSE IF FONTSIZE[F]=XNOVERD(FONTDSIZE[F],-S,1000)THEN GOTO 50;
END{:1260};F:=READFONTINFO(U,CURNAME,CURAREA,S);50:EQTB[U].HH.RH:=F;
EQTB[10524+F]:=EQTB[U];HASH[10524+F].RH:=T;END;{:1257}{1265:}
PROCEDURE NEWINTERACTION;BEGIN PRINTLN;INTERACTION:=CURCHR;{75:}
IF INTERACTION=0 THEN SELECTOR:=16 ELSE SELECTOR:=17{:75};
IF LOGOPENED THEN SELECTOR:=SELECTOR+2;END;{:1265}
PROCEDURE PREFIXEDCOMMAND;LABEL 30,10;VAR A:SMALLNUMBER;
F:INTERNALFONTNUMBER;J:HALFWORD;K:FONTINDEX;P,Q:HALFWORD;N:INTEGER;
E:BOOLEAN;BEGIN A:=0;
WHILE CURCMD=93 DO BEGIN IF NOT ODD(A DIV CURCHR)THEN A:=A+CURCHR;{404:}
REPEAT GETXTOKEN;UNTIL(CURCMD<>10)AND(CURCMD<>0){:404};
IF CURCMD<=70 THEN{1212:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1188);END;
PRINTCMDCHR(CURCMD,CURCHR);PRINTCHAR(39);BEGIN HELPPTR:=1;
HELPLINE[0]:=1189;END;BACKERROR;GOTO 10;END{:1212};
IF EQTB[13204].INT>2 THEN IF(ETEXMODE=1)THEN SHOWCURCMDCHR;END;{1213:}
IF A>=8 THEN BEGIN J:=3585;A:=A-8;END ELSE J:=0;
IF(CURCMD<>97)AND((A MOD 4<>0)OR(J<>0))THEN BEGIN BEGIN IF INTERACTION=3
THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(694);END;PRINTESC(1180);PRINT(1190);PRINTESC(1181);PRINT(1191);
PRINTCMDCHR(CURCMD,CURCHR);PRINTCHAR(39);BEGIN HELPPTR:=1;
HELPLINE[0]:=1192;END;ERROR;END{:1213};{1214:}
IF EQTB[13211].INT<>0 THEN IF EQTB[13211].INT<0 THEN BEGIN IF(A>=4)THEN
A:=A-4;END ELSE BEGIN IF NOT(A>=4)THEN A:=A+4;END{:1214};
CASE CURCMD OF{1217:}
87:IF(A>=4)THEN GEQDEFINE(11839,120,CURCHR)ELSE EQDEFINE(11839,120,
CURCHR);{:1217}{1218:}
97:BEGIN IF ODD(CURCHR)AND NOT(A>=4)AND(EQTB[13211].INT>=0)THEN A:=A+4;
E:=(CURCHR>=2);GETRTOKEN;P:=CURCS;Q:=SCANTOKS(TRUE,E);
IF J<>0 THEN BEGIN Q:=GETAVAIL;MEM[Q].HH.LH:=J;
MEM[Q].HH.RH:=MEM[DEFREF].HH.RH;MEM[DEFREF].HH.RH:=Q;END;
IF(A>=4)THEN GEQDEFINE(P,111+(A MOD 4),DEFREF)ELSE EQDEFINE(P,111+(A MOD
4),DEFREF);END;{:1218}{1221:}94:BEGIN N:=CURCHR;GETRTOKEN;P:=CURCS;
IF N=0 THEN BEGIN REPEAT GETTOKEN;UNTIL CURCMD<>10;
IF CURTOK=3133 THEN BEGIN GETTOKEN;IF CURCMD=10 THEN GETTOKEN;END;
END ELSE BEGIN GETTOKEN;Q:=CURTOK;GETTOKEN;BACKINPUT;CURTOK:=Q;
BACKINPUT;END;
IF CURCMD>=111 THEN MEM[CURCHR].HH.LH:=MEM[CURCHR].HH.LH+1;
IF(A>=4)THEN GEQDEFINE(P,CURCMD,CURCHR)ELSE EQDEFINE(P,CURCMD,CURCHR);
END;{:1221}{1224:}95:BEGIN N:=CURCHR;GETRTOKEN;P:=CURCS;
IF(A>=4)THEN GEQDEFINE(P,0,256)ELSE EQDEFINE(P,0,256);
SCANOPTIONALEQUALS;CASE N OF 0:BEGIN SCANCHARNUM;
IF(A>=4)THEN GEQDEFINE(P,68,CURVAL)ELSE EQDEFINE(P,68,CURVAL);END;
1:BEGIN SCANFIFTEENBITINT;
IF(A>=4)THEN GEQDEFINE(P,69,CURVAL)ELSE EQDEFINE(P,69,CURVAL);END;
OTHERWISE BEGIN SCANREGISTERNUM;IF CURVAL>255 THEN BEGIN J:=N-2;
IF J>3 THEN J:=5;FINDSAELEMENT(J,CURVAL,TRUE);
MEM[CURPTR+1].HH.LH:=MEM[CURPTR+1].HH.LH+1;IF J=5 THEN J:=71 ELSE J:=89;
IF(A>=4)THEN GEQDEFINE(P,J,CURPTR)ELSE EQDEFINE(P,J,CURPTR);
END ELSE CASE N OF 2:IF(A>=4)THEN GEQDEFINE(P,73,13233+CURVAL)ELSE
EQDEFINE(P,73,13233+CURVAL);
3:IF(A>=4)THEN GEQDEFINE(P,74,13766+CURVAL)ELSE EQDEFINE(P,74,13766+
CURVAL);
4:IF(A>=4)THEN GEQDEFINE(P,75,10800+CURVAL)ELSE EQDEFINE(P,75,10800+
CURVAL);
5:IF(A>=4)THEN GEQDEFINE(P,76,11056+CURVAL)ELSE EQDEFINE(P,76,11056+
CURVAL);
6:IF(A>=4)THEN GEQDEFINE(P,72,11327+CURVAL)ELSE EQDEFINE(P,72,11327+
CURVAL);END;END END;END;{:1224}{1225:}96:BEGIN J:=CURCHR;SCANINT;
N:=CURVAL;IF NOT SCANKEYWORD(850)THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1081);END;BEGIN HELPPTR:=2;HELPLINE[1]:=1209;HELPLINE[0]:=1210;
END;ERROR;END;GETRTOKEN;P:=CURCS;READTOKS(N,P,J);
IF(A>=4)THEN GEQDEFINE(P,111,CURVAL)ELSE EQDEFINE(P,111,CURVAL);END;
{:1225}{1226:}71,72:BEGIN Q:=CURCS;E:=FALSE;
IF CURCMD=71 THEN IF CURCHR=0 THEN BEGIN SCANREGISTERNUM;
IF CURVAL>255 THEN BEGIN FINDSAELEMENT(5,CURVAL,TRUE);CURCHR:=CURPTR;
E:=TRUE;END ELSE CURCHR:=11327+CURVAL;END ELSE E:=TRUE;P:=CURCHR;
SCANOPTIONALEQUALS;{404:}REPEAT GETXTOKEN;
UNTIL(CURCMD<>10)AND(CURCMD<>0){:404};IF CURCMD<>1 THEN{1227:}
IF(CURCMD=71)OR(CURCMD=72)THEN BEGIN IF CURCMD=71 THEN IF CURCHR=0 THEN
BEGIN SCANREGISTERNUM;
IF CURVAL<256 THEN Q:=EQTB[11327+CURVAL].HH.RH ELSE BEGIN FINDSAELEMENT(
5,CURVAL,FALSE);IF CURPTR=0 THEN Q:=0 ELSE Q:=MEM[CURPTR+1].HH.RH;END;
END ELSE Q:=MEM[CURPTR+1].HH.RH ELSE Q:=EQTB[CURCHR].HH.RH;
IF Q=0 THEN IF E THEN IF(A>=4)THEN GSADEF(P,0)ELSE SADEF(P,0)ELSE IF(A>=
4)THEN GEQDEFINE(P,101,0)ELSE EQDEFINE(P,101,0)ELSE BEGIN MEM[Q].HH.LH:=
MEM[Q].HH.LH+1;
IF E THEN IF(A>=4)THEN GSADEF(P,Q)ELSE SADEF(P,Q)ELSE IF(A>=4)THEN
GEQDEFINE(P,111,Q)ELSE EQDEFINE(P,111,Q);END;GOTO 30;END{:1227};
BACKINPUT;CURCS:=Q;Q:=SCANTOKS(FALSE,FALSE);
IF MEM[DEFREF].HH.RH=0 THEN BEGIN IF E THEN IF(A>=4)THEN GSADEF(P,0)ELSE
SADEF(P,0)ELSE IF(A>=4)THEN GEQDEFINE(P,101,0)ELSE EQDEFINE(P,101,0);
BEGIN MEM[DEFREF].HH.RH:=AVAIL;AVAIL:=DEFREF;DYNUSED:=DYNUSED-1;END;
END ELSE BEGIN IF(P=11317)AND NOT E THEN BEGIN MEM[Q].HH.RH:=GETAVAIL;
Q:=MEM[Q].HH.RH;MEM[Q].HH.LH:=637;Q:=GETAVAIL;MEM[Q].HH.LH:=379;
MEM[Q].HH.RH:=MEM[DEFREF].HH.RH;MEM[DEFREF].HH.RH:=Q;END;
IF E THEN IF(A>=4)THEN GSADEF(P,DEFREF)ELSE SADEF(P,DEFREF)ELSE IF(A>=4)
THEN GEQDEFINE(P,111,DEFREF)ELSE EQDEFINE(P,111,DEFREF);END;END;{:1226}
{1228:}73:BEGIN P:=CURCHR;SCANOPTIONALEQUALS;SCANINT;
IF(A>=4)THEN GEQWORDDEFINE(P,CURVAL)ELSE EQWORDDEFINE(P,CURVAL);END;
74:BEGIN P:=CURCHR;SCANOPTIONALEQUALS;SCANDIMEN(FALSE,FALSE,FALSE);
IF(A>=4)THEN GEQWORDDEFINE(P,CURVAL)ELSE EQWORDDEFINE(P,CURVAL);END;
75,76:BEGIN P:=CURCHR;N:=CURCMD;SCANOPTIONALEQUALS;
IF N=76 THEN SCANGLUE(3)ELSE SCANGLUE(2);TRAPZEROGLUE;
IF(A>=4)THEN GEQDEFINE(P,117,CURVAL)ELSE EQDEFINE(P,117,CURVAL);END;
{:1228}{1232:}85:BEGIN{1233:}
IF CURCHR=11888 THEN N:=15 ELSE IF CURCHR=12912 THEN N:=32768 ELSE IF
CURCHR=12656 THEN N:=32767 ELSE IF CURCHR=13489 THEN N:=16777215 ELSE N
:=255{:1233};P:=CURCHR;SCANCHARNUM;P:=P+CURVAL;SCANOPTIONALEQUALS;
SCANINT;
IF((CURVAL<0)AND(P<13489))OR(CURVAL>N)THEN BEGIN BEGIN IF INTERACTION=3
THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1211);END;PRINTINT(CURVAL);
IF P<13489 THEN PRINT(1212)ELSE PRINT(1213);PRINTINT(N);
BEGIN HELPPTR:=1;HELPLINE[0]:=1214;END;ERROR;CURVAL:=0;END;
IF P<12912 THEN IF(A>=4)THEN GEQDEFINE(P,120,CURVAL)ELSE EQDEFINE(P,120,
CURVAL)ELSE IF P<13489 THEN IF(A>=4)THEN GEQDEFINE(P,120,CURVAL)ELSE
EQDEFINE(P,120,CURVAL)ELSE IF(A>=4)THEN GEQWORDDEFINE(P,CURVAL)ELSE
EQWORDDEFINE(P,CURVAL);END;{:1232}{1234:}86:BEGIN P:=CURCHR;
SCANFOURBITINT;P:=P+CURVAL;SCANOPTIONALEQUALS;SCANFONTIDENT;
IF(A>=4)THEN GEQDEFINE(P,120,CURVAL)ELSE EQDEFINE(P,120,CURVAL);END;
{:1234}{1235:}89,90,91,92:DOREGISTERCOMMAND(A);{:1235}{1241:}
98:BEGIN SCANREGISTERNUM;
IF(A>=4)THEN N:=1073774592+CURVAL ELSE N:=1073741824+CURVAL;
SCANOPTIONALEQUALS;
IF SETBOXALLOWED THEN SCANBOX(N)ELSE BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(689);END;PRINTESC(540);BEGIN HELPPTR:=2;HELPLINE[1]:=1220;
HELPLINE[0]:=1221;END;ERROR;END;END;{:1241}{1242:}79:ALTERAUX;
80:ALTERPREVGRAF;81:ALTERPAGESOFAR;82:ALTERINTEGER;83:ALTERBOXDIMEN;
{:1242}{1248:}84:BEGIN Q:=CURCHR;SCANOPTIONALEQUALS;SCANINT;N:=CURVAL;
IF N<=0 THEN P:=0 ELSE IF Q>11312 THEN BEGIN N:=(CURVAL DIV 2)+1;
P:=GETNODE(2*N+1);MEM[P].HH.LH:=N;N:=CURVAL;MEM[P+1].INT:=N;
FOR J:=P+2 TO P+N+1 DO BEGIN SCANINT;MEM[J].INT:=CURVAL;END;
IF NOT ODD(N)THEN MEM[P+N+2].INT:=0;END ELSE BEGIN P:=GETNODE(2*N+1);
MEM[P].HH.LH:=N;FOR J:=1 TO N DO BEGIN SCANDIMEN(FALSE,FALSE,FALSE);
MEM[P+2*J-1].INT:=CURVAL;SCANDIMEN(FALSE,FALSE,FALSE);
MEM[P+2*J].INT:=CURVAL;END;END;
IF(A>=4)THEN GEQDEFINE(Q,118,P)ELSE EQDEFINE(Q,118,P);END;{:1248}{1252:}
99:IF CURCHR=1 THEN BEGIN IF INITFLAG THEN BEGIN NEWPATTERNS;GOTO 30;
END;BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1225);END;HELPPTR:=0;ERROR;
REPEAT GETTOKEN;UNTIL CURCMD=2;GOTO 10;END ELSE BEGIN NEWHYPHEXCEPTIONS;
GOTO 30;END;{:1252}{1253:}77:BEGIN FINDFONTDIMEN(TRUE);K:=CURVAL;
SCANOPTIONALEQUALS;SCANDIMEN(FALSE,FALSE,FALSE);FONTINFO[K].INT:=CURVAL;
END;78:BEGIN N:=CURCHR;SCANFONTIDENT;F:=CURVAL;SCANOPTIONALEQUALS;
SCANINT;IF N=0 THEN HYPHENCHAR[F]:=CURVAL ELSE SKEWCHAR[F]:=CURVAL;END;
{:1253}{1256:}88:NEWFONT(A);{:1256}{1264:}100:NEWINTERACTION;{:1264}
OTHERWISE CONFUSION(1187)END;30:{1269:}
IF AFTERTOKEN<>0 THEN BEGIN CURTOK:=AFTERTOKEN;BACKINPUT;AFTERTOKEN:=0;
END{:1269};10:END;{:1211}{1270:}PROCEDURE DOASSIGNMENTS;LABEL 10;
BEGIN WHILE TRUE DO BEGIN{404:}REPEAT GETXTOKEN;
UNTIL(CURCMD<>10)AND(CURCMD<>0){:404};IF CURCMD<=70 THEN GOTO 10;
SETBOXALLOWED:=FALSE;PREFIXEDCOMMAND;SETBOXALLOWED:=TRUE;END;10:END;
{:1270}{1275:}PROCEDURE OPENORCLOSEIN;VAR C:0..1;N:0..15;
BEGIN C:=CURCHR;SCANFOURBITINT;N:=CURVAL;
IF READOPEN[N]<>2 THEN BEGIN ACLOSE(READFILE[N]);READOPEN[N]:=2;END;
IF C<>0 THEN BEGIN SCANOPTIONALEQUALS;SCANFILENAME;
IF CUREXT=339 THEN CUREXT:=798;PACKFILENAME(CURNAME,CURAREA,CUREXT);
IF XOPENIN(READFILE[N])THEN READOPEN[N]:=1;END;END;{:1275}{1279:}
PROCEDURE ISSUEMESSAGE;VAR OLDSETTING:0..22;C:0..1;S:STRNUMBER;
BEGIN C:=CURCHR;MEM[327132].HH.RH:=SCANTOKS(FALSE,TRUE);
OLDSETTING:=SELECTOR;SELECTOR:=21;TOKENSHOW(DEFREF);
SELECTOR:=OLDSETTING;FLUSHLIST(DEFREF);
BEGIN IF POOLPTR+1>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR);END;
S:=MAKESTRING;IF C=0 THEN{1280:}
BEGIN IF TERMOFFSET+(STRSTART[S+1]-STRSTART[S])>MAXPRINTLINE-2 THEN
PRINTLN ELSE IF(TERMOFFSET>0)OR(FILEOFFSET>0)THEN PRINTCHAR(32);
SLOWPRINT(S);IF ODD(SELECTOR)THEN WRITELN(TERMOUT);END{:1280}ELSE{1283:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(339);END;SLOWPRINT(S);
IF EQTB[11326].HH.RH<>0 THEN USEERRHELP:=TRUE ELSE IF LONGHELPSEEN THEN
BEGIN HELPPTR:=1;HELPLINE[0]:=1241;
END ELSE BEGIN IF INTERACTION<3 THEN LONGHELPSEEN:=TRUE;
BEGIN HELPPTR:=4;HELPLINE[3]:=1242;HELPLINE[2]:=1243;HELPLINE[1]:=1244;
HELPLINE[0]:=1245;END;END;ERROR;USEERRHELP:=FALSE;END{:1283};
BEGIN STRPTR:=STRPTR-1;POOLPTR:=STRSTART[STRPTR];END;END;{:1279}{1288:}
PROCEDURE SHIFTCASE;VAR B:HALFWORD;P:HALFWORD;T:HALFWORD;C:EIGHTBITS;
BEGIN B:=CURCHR;P:=SCANTOKS(FALSE,FALSE);P:=MEM[DEFREF].HH.RH;
WHILE P<>0 DO BEGIN{1289:}T:=MEM[P].HH.LH;
IF T<4352 THEN BEGIN C:=T MOD 256;
IF EQTB[B+C].HH.RH<>0 THEN MEM[P].HH.LH:=T-C+EQTB[B+C].HH.RH;END{:1289};
P:=MEM[P].HH.RH;END;BEGINTOKENLIST(MEM[DEFREF].HH.RH,3);
BEGIN MEM[DEFREF].HH.RH:=AVAIL;AVAIL:=DEFREF;DYNUSED:=DYNUSED-1;END;END;
{:1288}{1293:}PROCEDURE SHOWWHATEVER;LABEL 50;VAR P:HALFWORD;
T:SMALLNUMBER;M:0..4;L:INTEGER;N:INTEGER;BEGIN{1614:}COPYERR:=IGNOREIT;
REWRITE(TEMPFILE);{:1614};CASE CURCHR OF 3:BEGIN BEGINDIAGNOSTIC;
SHOWACTIVITIES;END;1:{1296:}BEGIN SCANREGISTERNUM;
IF CURVAL<256 THEN P:=EQTB[11583+CURVAL].HH.RH ELSE BEGIN FINDSAELEMENT(
4,CURVAL,FALSE);IF CURPTR=0 THEN P:=0 ELSE P:=MEM[CURPTR+1].HH.RH;END;
BEGINDIAGNOSTIC;PRINTNL(1262);PRINTINT(CURVAL);PRINTCHAR(61);
IF P=0 THEN PRINT(413)ELSE SHOWBOX(P);END{:1296};0:{1294:}
BEGIN GETTOKEN;IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(1257);
IF CURCS<>0 THEN BEGIN SPRINTCS(CURCS);PRINTCHAR(61);END;PRINTMEANING;
GOTO 50;END{:1294};{1411:}4:BEGIN BEGINDIAGNOSTIC;SHOWSAVEGROUPS;END;
{:1411}{1425:}6:BEGIN BEGINDIAGNOSTIC;PRINTNL(339);PRINTLN;
IF CONDPTR=0 THEN BEGIN PRINTNL(366);PRINT(1357);
END ELSE BEGIN P:=CONDPTR;N:=0;REPEAT N:=N+1;P:=MEM[P].HH.RH;UNTIL P=0;
P:=CONDPTR;T:=CURIF;L:=IFLINE;M:=IFLIMIT;REPEAT PRINTNL(1358);
PRINTINT(N);PRINT(575);PRINTCMDCHR(105,T);IF M=2 THEN PRINTESC(785);
IF L<>0 THEN BEGIN PRINT(1356);PRINTINT(L);END;N:=N-1;T:=MEM[P].HH.B1;
L:=MEM[P+1].INT;M:=MEM[P].HH.B0;P:=MEM[P].HH.RH;UNTIL P=0;END;END;
{:1425}OTHERWISE{1297:}BEGIN P:=THETOKS;
IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(1257);TOKENSHOW(327141);
FLUSHLIST(MEM[327141].HH.RH);GOTO 50;END{:1297}END;{1298:}
ENDDIAGNOSTIC(TRUE);BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1263);END;
IF SELECTOR=19 THEN IF EQTB[13197].INT<=0 THEN BEGIN SELECTOR:=17;
PRINT(1264);SELECTOR:=19;END{:1298};
50:IF INTERACTION<3 THEN BEGIN HELPPTR:=0;ERRORCOUNT:=ERRORCOUNT-1;
END ELSE IF EQTB[13197].INT>0 THEN BEGIN BEGIN HELPPTR:=3;
HELPLINE[2]:=1252;HELPLINE[1]:=1253;HELPLINE[0]:=1254;END;
END ELSE BEGIN BEGIN HELPPTR:=5;HELPLINE[4]:=1252;HELPLINE[3]:=1253;
HELPLINE[2]:=1254;HELPLINE[1]:=1255;HELPLINE[0]:=1256;END;END;ERROR;END;
{:1293}{1302:}PROCEDURE STOREFMTFILE;LABEL 41,42,31,32;
VAR J,K,L:INTEGER;P,Q:HALFWORD;X:INTEGER;W:FOURQUARTERS;BEGIN{1304:}
IF SAVEPTR<>0 THEN BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;
PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1266);END;
BEGIN HELPPTR:=1;HELPLINE[0]:=1267;END;
BEGIN IF INTERACTION=3 THEN INTERACTION:=2;IF LOGOPENED THEN ERROR;
{IF INTERACTION>0 THEN DEBUGHELP;}HISTORY:=3;JUMPOUT;END;END{:1304};
{1328:}SELECTOR:=21;PRINT(1280);PRINT(JOBNAME);PRINTCHAR(32);
PRINTINT(EQTB[13191].INT MOD 100);PRINTCHAR(46);
PRINTINT(EQTB[13190].INT);PRINTCHAR(46);PRINTINT(EQTB[13189].INT);
PRINTCHAR(41);IF INTERACTION=0 THEN SELECTOR:=18 ELSE SELECTOR:=19;
BEGIN IF POOLPTR+1>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR);END;
FORMATIDENT:=MAKESTRING;PACKJOBNAME(793);
WHILE NOT WOPENOUT(FMTFILE)DO PROMPTFILENAME(1281,793);PRINTNL(1282);
SLOWPRINT(WMAKENAMESTRING(FMTFILE));BEGIN STRPTR:=STRPTR-1;
POOLPTR:=STRSTART[STRPTR];END;PRINTNL(339);SLOWPRINT(FORMATIDENT){:1328}
;{1307:}BEGIN FMTFILE^[FMTCOUNT].INT:=340764991;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;{1388:}BEGIN FMTFILE^[FMTCOUNT].INT:=ETEXMODE;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;FOR J:=0 TO-0 DO EQTB[13232+J].INT:=0;{:1388}
{1491:}WHILE PSEUDOFILES<>0 DO PSEUDOCLOSE;{:1491}
BEGIN FMTFILE^[FMTCOUNT].INT:=0;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=327144;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=14021;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=8501;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=503;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END{:1307};{1309:}
BEGIN FMTFILE^[FMTCOUNT].INT:=POOLPTR;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=STRPTR;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
FOR K:=0 TO STRPTR DO BEGIN FMTFILE^[FMTCOUNT].INT:=STRSTART[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;K:=0;
WHILE K+4<POOLPTR DO BEGIN W.B0:=STRPOOL[K];W.B1:=STRPOOL[K+1];
W.B2:=STRPOOL[K+2];W.B3:=STRPOOL[K+3];BEGIN FMTFILE^[FMTCOUNT].QQQQ:=W;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;K:=K+4;END;K:=POOLPTR-4;W.B0:=STRPOOL[K];
W.B1:=STRPOOL[K+1];W.B2:=STRPOOL[K+2];W.B3:=STRPOOL[K+3];
BEGIN FMTFILE^[FMTCOUNT].QQQQ:=W;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;PRINTLN;PRINTINT(STRPTR);PRINT(1268);
PRINTINT(POOLPTR){:1309};{1311:}SORTAVAIL;VARUSED:=0;
BEGIN FMTFILE^[FMTCOUNT].INT:=LOMEMMAX;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=ROVER;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
IF(ETEXMODE=1)THEN FOR K:=0 TO 5 DO BEGIN FMTFILE^[FMTCOUNT].INT:=SAROOT
[K];BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;P:=0;Q:=ROVER;X:=0;
REPEAT FOR K:=P TO Q+1 DO BEGIN FMTFILE^[FMTCOUNT]:=MEM[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;X:=X+Q+2-P;VARUSED:=VARUSED+Q-P;
P:=Q+MEM[Q].HH.LH;Q:=MEM[Q+1].HH.RH;UNTIL Q=ROVER;
VARUSED:=VARUSED+LOMEMMAX-P;DYNUSED:=MEMEND+1-HIMEMMIN;
FOR K:=P TO LOMEMMAX DO BEGIN FMTFILE^[FMTCOUNT]:=MEM[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;X:=X+LOMEMMAX+1-P;
BEGIN FMTFILE^[FMTCOUNT].INT:=HIMEMMIN;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=AVAIL;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
FOR K:=HIMEMMIN TO MEMEND DO BEGIN FMTFILE^[FMTCOUNT]:=MEM[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;X:=X+MEMEND+1-HIMEMMIN;P:=AVAIL;
WHILE P<>0 DO BEGIN DYNUSED:=DYNUSED-1;P:=MEM[P].HH.RH;END;
BEGIN FMTFILE^[FMTCOUNT].INT:=VARUSED;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=DYNUSED;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;PRINTLN;PRINTINT(X);PRINT(1269);
PRINTINT(VARUSED);PRINTCHAR(38);PRINTINT(DYNUSED){:1311};{1313:}{1315:}
K:=1;REPEAT J:=K;
WHILE J<13167 DO BEGIN IF(EQTB[J].HH.RH=EQTB[J+1].HH.RH)AND(EQTB[J].HH.
B0=EQTB[J+1].HH.B0)AND(EQTB[J].HH.B1=EQTB[J+1].HH.B1)THEN GOTO 41;
J:=J+1;END;L:=13168;GOTO 31;41:J:=J+1;L:=J;
WHILE J<13167 DO BEGIN IF(EQTB[J].HH.RH<>EQTB[J+1].HH.RH)OR(EQTB[J].HH.
B0<>EQTB[J+1].HH.B0)OR(EQTB[J].HH.B1<>EQTB[J+1].HH.B1)THEN GOTO 31;
J:=J+1;END;31:BEGIN FMTFILE^[FMTCOUNT].INT:=L-K;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
WHILE K<L DO BEGIN BEGIN FMTFILE^[FMTCOUNT]:=EQTB[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;K:=K+1;END;K:=J+1;
BEGIN FMTFILE^[FMTCOUNT].INT:=K-L;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;UNTIL K=13168{:1315};{1316:}REPEAT J:=K;
WHILE J<14021 DO BEGIN IF EQTB[J].INT=EQTB[J+1].INT THEN GOTO 42;J:=J+1;
END;L:=14022;GOTO 32;42:J:=J+1;L:=J;
WHILE J<14021 DO BEGIN IF EQTB[J].INT<>EQTB[J+1].INT THEN GOTO 32;
J:=J+1;END;32:BEGIN FMTFILE^[FMTCOUNT].INT:=L-K;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
WHILE K<L DO BEGIN BEGIN FMTFILE^[FMTCOUNT]:=EQTB[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;K:=K+1;END;K:=J+1;
BEGIN FMTFILE^[FMTCOUNT].INT:=K-L;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;UNTIL K>14021{:1316};
BEGIN FMTFILE^[FMTCOUNT].INT:=PARLOC;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=WRITELOC;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;{1318:}BEGIN FMTFILE^[FMTCOUNT].INT:=HASHUSED;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;CSCOUNT:=10513-HASHUSED;
FOR P:=514 TO HASHUSED DO IF HASH[P].RH<>0 THEN BEGIN BEGIN FMTFILE^[
FMTCOUNT].INT:=P;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].HH:=HASH[P];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;CSCOUNT:=CSCOUNT+1;END;
FOR P:=HASHUSED+1 TO 10780 DO BEGIN FMTFILE^[FMTCOUNT].HH:=HASH[P];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=CSCOUNT;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;PRINTLN;PRINTINT(CSCOUNT);PRINT(1270){:1318}
{:1313};{1320:}BEGIN FMTFILE^[FMTCOUNT].INT:=FMEMPTR;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
FOR K:=0 TO FMEMPTR-1 DO BEGIN FMTFILE^[FMTCOUNT]:=FONTINFO[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTPTR;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;FOR K:=0 TO FONTPTR DO{1322:}
BEGIN BEGIN FMTFILE^[FMTCOUNT].QQQQ:=FONTCHECK[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTSIZE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTDSIZE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTPARAMS[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=HYPHENCHAR[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=SKEWCHAR[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTNAME[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTAREA[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTBC[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTEC[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=CHARBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=WIDTHBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=HEIGHTBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=DEPTHBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=ITALICBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=LIGKERNBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=KERNBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=EXTENBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=PARAMBASE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTGLUE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=BCHARLABEL[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTBCHAR[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FONTFALSEBCHAR[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;PRINTNL(1273);PRINTESC(HASH[10524+K].RH);
PRINTCHAR(61);PRINTFILENAME(FONTNAME[K],FONTAREA[K],339);
IF FONTSIZE[K]<>FONTDSIZE[K]THEN BEGIN PRINT(750);
PRINTSCALED(FONTSIZE[K]);PRINT(400);END;END{:1322};PRINTLN;
PRINTINT(FMEMPTR-7);PRINT(1271);PRINTINT(FONTPTR-0);PRINT(1272);
IF FONTPTR<>1 THEN PRINTCHAR(115){:1320};{1324:}
BEGIN FMTFILE^[FMTCOUNT].INT:=HYPHCOUNT;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
FOR K:=0 TO 503 DO IF HYPHWORD[K]<>0 THEN BEGIN BEGIN FMTFILE^[FMTCOUNT]
.INT:=K;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=HYPHWORD[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=HYPHLIST[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;END;PRINTLN;PRINTINT(HYPHCOUNT);PRINT(1274);
IF HYPHCOUNT<>1 THEN PRINTCHAR(115);IF TRIENOTREADY THEN INITTRIE;
BEGIN FMTFILE^[FMTCOUNT].INT:=TRIEMAX;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=HYPHSTART;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
FOR K:=0 TO TRIEMAX DO BEGIN FMTFILE^[FMTCOUNT].HH:=TRIE[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=TRIEOPPTR;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;
FOR K:=1 TO TRIEOPPTR DO BEGIN BEGIN FMTFILE^[FMTCOUNT].INT:=HYFDISTANCE
[K];BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=HYFNUM[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=HYFNEXT[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;END;PRINTNL(1275);PRINTINT(TRIEMAX);PRINT(1276);
PRINTINT(TRIEOPPTR);PRINT(1277);IF TRIEOPPTR<>1 THEN PRINTCHAR(115);
PRINT(1278);PRINTINT(TRIEOPSIZE);
FOR K:=255 DOWNTO 0 DO IF TRIEUSED[K]>0 THEN BEGIN PRINTNL(807);
PRINTINT(TRIEUSED[K]);PRINT(1279);PRINTINT(K);
BEGIN FMTFILE^[FMTCOUNT].INT:=K;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=TRIEUSED[K];
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;END{:1324};{1326:}
BEGIN FMTFILE^[FMTCOUNT].INT:=INTERACTION;BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=FORMATIDENT;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;BEGIN FMTFILE^[FMTCOUNT].INT:=69069;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;EQTB[13199].INT:=0{:1326};{1329:}
WHILE FMTCOUNT>0 DO BEGIN FMTFILE^[FMTCOUNT].INT:=0;
BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN PUT(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;END;WCLOSE(FMTFILE){:1329};END;{:1302}{1348:}{1349:}
PROCEDURE NEWWHATSIT(S:SMALLNUMBER;W:SMALLNUMBER);VAR P:HALFWORD;
BEGIN P:=GETNODE(W);MEM[P].HH.B0:=8;MEM[P].HH.B1:=S;
MEM[CURLIST.TAILFIELD].HH.RH:=P;CURLIST.TAILFIELD:=P;END;{:1349}{1350:}
PROCEDURE NEWWRITEWHATSIT(W:SMALLNUMBER);BEGIN NEWWHATSIT(CURCHR,W);
IF W<>2 THEN SCANFOURBITINT ELSE BEGIN SCANINT;
IF CURVAL<0 THEN CURVAL:=17 ELSE IF CURVAL>15 THEN CURVAL:=16;END;
MEM[CURLIST.TAILFIELD+1].HH.LH:=CURVAL;END;{:1350}PROCEDURE DOEXTENSION;
VAR K:INTEGER;P:HALFWORD;BEGIN CASE CURCHR OF 0:{1351:}
BEGIN NEWWRITEWHATSIT(3);SCANOPTIONALEQUALS;SCANFILENAME;
MEM[CURLIST.TAILFIELD+1].HH.RH:=CURNAME;
MEM[CURLIST.TAILFIELD+2].HH.LH:=CURAREA;
MEM[CURLIST.TAILFIELD+2].HH.RH:=CUREXT;END{:1351};1:{1352:}
BEGIN K:=CURCS;NEWWRITEWHATSIT(2);CURCS:=K;P:=SCANTOKS(FALSE,FALSE);
MEM[CURLIST.TAILFIELD+1].HH.RH:=DEFREF;END{:1352};2:{1353:}
BEGIN NEWWRITEWHATSIT(2);MEM[CURLIST.TAILFIELD+1].HH.RH:=0;END{:1353};
3:{1354:}BEGIN NEWWHATSIT(3,2);MEM[CURLIST.TAILFIELD+1].HH.LH:=0;
P:=SCANTOKS(FALSE,TRUE);MEM[CURLIST.TAILFIELD+1].HH.RH:=DEFREF;
END{:1354};4:{1375:}BEGIN GETXTOKEN;
IF(CURCMD=59)AND(CURCHR<=2)THEN BEGIN P:=CURLIST.TAILFIELD;DOEXTENSION;
OUTWHAT(CURLIST.TAILFIELD);FLUSHNODELIST(CURLIST.TAILFIELD);
CURLIST.TAILFIELD:=P;MEM[P].HH.RH:=0;END ELSE BACKINPUT;END{:1375};
5:{1377:}
IF ABS(CURLIST.MODEFIELD)<>102 THEN REPORTILLEGALCASE ELSE BEGIN
NEWWHATSIT(4,2);SCANINT;
IF CURVAL<=0 THEN CURLIST.AUXFIELD.HH.RH:=0 ELSE IF CURVAL>255 THEN
CURLIST.AUXFIELD.HH.RH:=0 ELSE CURLIST.AUXFIELD.HH.RH:=CURVAL;
MEM[CURLIST.TAILFIELD+1].HH.RH:=CURLIST.AUXFIELD.HH.RH;
MEM[CURLIST.TAILFIELD+1].HH.B0:=NORMMIN(EQTB[13219].INT);
MEM[CURLIST.TAILFIELD+1].HH.B1:=NORMMIN(EQTB[13220].INT);END{:1377};
OTHERWISE CONFUSION(1301)END;END;{:1348}{1376:}PROCEDURE FIXLANGUAGE;
VAR L:ASCIICODE;
BEGIN IF EQTB[13218].INT<=0 THEN L:=0 ELSE IF EQTB[13218].INT>255 THEN L
:=0 ELSE L:=EQTB[13218].INT;
IF L<>CURLIST.AUXFIELD.HH.RH THEN BEGIN NEWWHATSIT(4,2);
MEM[CURLIST.TAILFIELD+1].HH.RH:=L;CURLIST.AUXFIELD.HH.RH:=L;
MEM[CURLIST.TAILFIELD+1].HH.B0:=NORMMIN(EQTB[13219].INT);
MEM[CURLIST.TAILFIELD+1].HH.B1:=NORMMIN(EQTB[13220].INT);END;END;{:1376}
{1068:}PROCEDURE HANDLERIGHTBRACE;VAR P,Q:HALFWORD;D:SCALED;F:INTEGER;
BEGIN CASE CURGROUP OF 1:UNSAVE;
0:BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1052);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=1053;HELPLINE[0]:=1054;END;ERROR;END;
14,15,16:EXTRARIGHTBRACE;{1085:}2:PACKAGE(0);3:BEGIN ADJUSTTAIL:=327139;
PACKAGE(0);END;4:BEGIN ENDGRAF;PACKAGE(0);END;5:BEGIN ENDGRAF;
PACKAGE(4);END;{:1085}{1100:}11:BEGIN ENDGRAF;Q:=EQTB[10792].HH.RH;
MEM[Q].HH.RH:=MEM[Q].HH.RH+1;D:=EQTB[13751].INT;F:=EQTB[13210].INT;
UNSAVE;SAVEPTR:=SAVEPTR-1;
P:=VPACKAGE(MEM[CURLIST.HEADFIELD].HH.RH,0,1,1073741823);POPNEST;
IF SAVESTACK[SAVEPTR+0].INT<255 THEN BEGIN BEGIN MEM[CURLIST.TAILFIELD].
HH.RH:=GETNODE(5);CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B0:=3;
MEM[CURLIST.TAILFIELD].HH.B1:=SAVESTACK[SAVEPTR+0].INT;
MEM[CURLIST.TAILFIELD+3].INT:=MEM[P+3].INT+MEM[P+2].INT;
MEM[CURLIST.TAILFIELD+4].HH.LH:=MEM[P+5].HH.RH;
MEM[CURLIST.TAILFIELD+4].HH.RH:=Q;MEM[CURLIST.TAILFIELD+2].INT:=D;
MEM[CURLIST.TAILFIELD+1].INT:=F;
END ELSE BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=GETNODE(2);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B0:=5;MEM[CURLIST.TAILFIELD].HH.B1:=0;
MEM[CURLIST.TAILFIELD+1].INT:=MEM[P+5].HH.RH;DELETEGLUEREF(Q);END;
FREENODE(P,7);IF NESTPTR=0 THEN BUILDPAGE;END;8:{1026:}
BEGIN IF(CURINPUT.LOCFIELD<>0)OR((CURINPUT.INDEXFIELD<>6)AND(CURINPUT.
INDEXFIELD<>3))THEN{1027:}
BEGIN BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);
COPYERR:=SAVEIT;REWRITE(TEMPFILE);PRINT(1019);END;BEGIN HELPPTR:=2;
HELPLINE[1]:=1020;HELPLINE[0]:=1021;END;ERROR;REPEAT GETTOKEN;
UNTIL CURINPUT.LOCFIELD=0;END{:1027};ENDTOKENLIST;ENDGRAF;UNSAVE;
OUTPUTACTIVE:=FALSE;INSERTPENALTIES:=0;{1028:}
IF EQTB[11838].HH.RH<>0 THEN BEGIN BEGIN IF INTERACTION=3 THEN
WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;REWRITE(TEMPFILE);
PRINT(1022);END;PRINTESC(412);PRINTINT(255);BEGIN HELPPTR:=3;
HELPLINE[2]:=1023;HELPLINE[1]:=1024;HELPLINE[0]:=1025;END;BOXERROR(255);
END{:1028};
IF CURLIST.TAILFIELD<>CURLIST.HEADFIELD THEN BEGIN MEM[PAGETAIL].HH.RH:=
MEM[CURLIST.HEADFIELD].HH.RH;PAGETAIL:=CURLIST.TAILFIELD;END;
IF MEM[327142].HH.RH<>0 THEN BEGIN IF MEM[327143].HH.RH=0 THEN NEST[0].
TAILFIELD:=PAGETAIL;MEM[PAGETAIL].HH.RH:=MEM[327143].HH.RH;
MEM[327143].HH.RH:=MEM[327142].HH.RH;MEM[327142].HH.RH:=0;
PAGETAIL:=327142;END;FLUSHNODELIST(DISCPTR[2]);DISCPTR[2]:=0;POPNEST;
BUILDPAGE;END{:1026};{:1100}{1118:}10:BUILDDISCRETIONARY;{:1118}{1132:}
6:BEGIN BACKINPUT;CURTOK:=14610;
BEGIN IF INTERACTION=3 THEN WAKEUPTERMINAL;PRINTNL(263);COPYERR:=SAVEIT;
REWRITE(TEMPFILE);PRINT(634);END;PRINTESC(908);PRINT(635);
BEGIN HELPPTR:=1;HELPLINE[0]:=1133;END;INSERROR;END;{:1132}{1133:}
7:BEGIN ENDGRAF;UNSAVE;ALIGNPEEK;END;{:1133}{1168:}12:BEGIN ENDGRAF;
UNSAVE;SAVEPTR:=SAVEPTR-2;
P:=VPACKAGE(MEM[CURLIST.HEADFIELD].HH.RH,SAVESTACK[SAVEPTR+1].INT,
SAVESTACK[SAVEPTR+0].INT,1073741823);POPNEST;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWNOAD;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B0:=29;MEM[CURLIST.TAILFIELD+1].HH.RH:=2;
MEM[CURLIST.TAILFIELD+1].HH.LH:=P;END;{:1168}{1173:}13:BUILDCHOICES;
{:1173}{1186:}9:BEGIN UNSAVE;SAVEPTR:=SAVEPTR-1;
MEM[SAVESTACK[SAVEPTR+0].INT].HH.RH:=3;P:=FINMLIST(0);
MEM[SAVESTACK[SAVEPTR+0].INT].HH.LH:=P;
IF P<>0 THEN IF MEM[P].HH.RH=0 THEN IF MEM[P].HH.B0=16 THEN BEGIN IF MEM
[P+3].HH.RH=0 THEN IF MEM[P+2].HH.RH=0 THEN BEGIN MEM[SAVESTACK[SAVEPTR
+0].INT].HH:=MEM[P+1].HH;FREENODE(P,4);END;
END ELSE IF MEM[P].HH.B0=28 THEN IF SAVESTACK[SAVEPTR+0].INT=CURLIST.
TAILFIELD+1 THEN IF MEM[CURLIST.TAILFIELD].HH.B0=16 THEN{1187:}
BEGIN Q:=CURLIST.HEADFIELD;
WHILE MEM[Q].HH.RH<>CURLIST.TAILFIELD DO Q:=MEM[Q].HH.RH;
MEM[Q].HH.RH:=P;FREENODE(CURLIST.TAILFIELD,4);CURLIST.TAILFIELD:=P;
END{:1187};END;{:1186}OTHERWISE CONFUSION(1055)END;END;{:1068}
PROCEDURE MAINCONTROL;
LABEL 60,21,70,80,90,91,92,95,100,101,110,111,112,120,10;VAR T:INTEGER;
BEGIN IF EQTB[11323].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11323].HH.RH,12);
60:GETXTOKEN;21:{1031:}
IF INTERRUPT<>0 THEN IF OKTOINTERRUPT THEN BEGIN BACKINPUT;
BEGIN IF INTERRUPT<>0 THEN PAUSEFORINSTRUCTIONS;END;GOTO 60;END;
{IF PANICKING THEN CHECKMEM(FALSE);}
IF EQTB[13204].INT>0 THEN SHOWCURCMDCHR{:1031};
CASE ABS(CURLIST.MODEFIELD)+CURCMD OF 113,114,170:GOTO 70;
118:BEGIN SCANCHARNUM;CURCHR:=CURVAL;GOTO 70;END;167:BEGIN GETXTOKEN;
IF(CURCMD=11)OR(CURCMD=12)OR(CURCMD=68)OR(CURCMD=16)THEN CANCELBOUNDARY
:=TRUE;GOTO 21;END;
112:IF CURLIST.AUXFIELD.HH.LH=1000 THEN GOTO 120 ELSE APPSPACE;
166,267:GOTO 120;{1045:}1,102,203,11,213,268:;40,141,242:BEGIN{406:}
REPEAT GETXTOKEN;UNTIL CURCMD<>10{:406};GOTO 21;END;
15:IF ITSALLOVER THEN GOTO 10;{1048:}23,123,224,71,172,273,{:1048}
{1098:}39,{:1098}{1111:}45,{:1111}{1144:}49,150,{:1144}
7,108,209:REPORTILLEGALCASE;{1046:}
8,109,9,110,18,119,70,171,51,152,16,117,50,151,53,154,67,168,54,155,55,
156,57,158,56,157,31,132,52,153,29,130,47,148,212,216,217,230,227,236,
239{:1046}:INSERTDOLLARSIGN;{1056:}
37,137,238:BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=SCANRULESPEC;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
IF ABS(CURLIST.MODEFIELD)=1 THEN CURLIST.AUXFIELD.INT:=-65536000 ELSE IF
ABS(CURLIST.MODEFIELD)=102 THEN CURLIST.AUXFIELD.HH.LH:=1000;END;{:1056}
{1057:}28,128,229,231:APPENDGLUE;30,131,232,233:APPENDKERN;{:1057}
{1063:}2,103:NEWSAVELEVEL(1);62,163,264:NEWSAVELEVEL(14);
63,164,265:IF CURGROUP=14 THEN UNSAVE ELSE OFFSAVE;{:1063}{1067:}
3,104,205:HANDLERIGHTBRACE;{:1067}{1073:}22,124,225:BEGIN T:=CURCHR;
SCANDIMEN(FALSE,FALSE,FALSE);
IF T=0 THEN SCANBOX(CURVAL)ELSE SCANBOX(-CURVAL);END;
32,133,234:SCANBOX(1073807261+CURCHR);21,122,223:BEGINBOX(0);{:1073}
{1090:}44:NEWGRAF(CURCHR>0);
12,13,17,69,4,24,36,46,48,27,34,65,66:BEGIN BACKINPUT;NEWGRAF(TRUE);END;
{:1090}{1092:}145,246:INDENTINHMODE;{:1092}{1094:}
14:BEGIN NORMALPARAGRAPH;IF CURLIST.MODEFIELD>0 THEN BUILDPAGE;END;
115:BEGIN IF ALIGNSTATE<0 THEN OFFSAVE;ENDGRAF;
IF CURLIST.MODEFIELD=1 THEN BUILDPAGE;END;
116,129,138,126,134:HEADFORVMODE;{:1094}{1097:}
38,139,240,140,241:BEGININSERTORADJUST;19,120,221:MAKEMARK;{:1097}
{1102:}43,144,245:APPENDPENALTY;{:1102}{1104:}26,127,228:DELETELAST;
{:1104}{1109:}25,125,226:UNPACKAGE;{:1109}{1112:}
146:APPENDITALICCORRECTION;
247:BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWKERN(0);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;{:1112}{1116:}
149,250:APPENDDISCRETIONARY;{:1116}{1122:}147:MAKEACCENT;{:1122}{1126:}
6,107,208,5,106,207:ALIGNERROR;35,136,237:NOALIGNERROR;
64,165,266:OMITERROR;{:1126}{1130:}33:INITALIGN;135:{1437:}
IF CURCHR>0 THEN BEGIN IF ETEXENABLED((EQTB[13232].INT>0),CURCMD,CURCHR)
THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWMATH(0,CURCHR);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;END ELSE{:1437}
INITALIGN;
235:IF PRIVILEGED THEN IF CURGROUP=15 THEN INITALIGN ELSE OFFSAVE;
10,111:DOENDV;{:1130}{1134:}68,169,270:CSERROR;{:1134}{1137:}
105:INITMATH;{:1137}{1140:}
251:IF PRIVILEGED THEN IF CURGROUP=15 THEN STARTEQNO ELSE OFFSAVE;
{:1140}{1150:}204:BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWNOAD;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;BACKINPUT;
SCANMATH(CURLIST.TAILFIELD+1);END;{:1150}{1154:}
214,215,271:SETMATHCHAR(EQTB[12912+CURCHR].HH.RH);219:BEGIN SCANCHARNUM;
CURCHR:=CURVAL;SETMATHCHAR(EQTB[12912+CURCHR].HH.RH);END;
220:BEGIN SCANFIFTEENBITINT;SETMATHCHAR(CURVAL);END;
272:SETMATHCHAR(CURCHR);218:BEGIN SCANTWENTYSEVENBITINT;
SETMATHCHAR(CURVAL DIV 4096);END;{:1154}{1158:}
253:BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWNOAD;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B0:=CURCHR;SCANMATH(CURLIST.TAILFIELD+1);END;
254:MATHLIMITSWITCH;{:1158}{1162:}269:MATHRADICAL;{:1162}{1164:}
248,249:MATHAC;{:1164}{1167:}259:BEGIN SCANSPEC(12,FALSE);
NORMALPARAGRAPH;PUSHNEST;CURLIST.MODEFIELD:=-1;
CURLIST.AUXFIELD.INT:=-65536000;
IF EQTB[11322].HH.RH<>0 THEN BEGINTOKENLIST(EQTB[11322].HH.RH,11);END;
{:1167}{1171:}256:BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWSTYLE(CURCHR);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
258:BEGIN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWGLUE(0);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;
MEM[CURLIST.TAILFIELD].HH.B1:=98;END;257:APPENDCHOICES;{:1171}{1175:}
211,210:SUBSUP;{:1175}{1180:}255:MATHFRACTION;{:1180}{1190:}
252:MATHLEFTRIGHT;{:1190}{1193:}
206:IF CURGROUP=15 THEN AFTERMATH ELSE OFFSAVE;{:1193}{1210:}
72,173,274,73,174,275,74,175,276,75,176,277,76,177,278,77,178,279,78,179
,280,79,180,281,80,181,282,81,182,283,82,183,284,83,184,285,84,185,286,
85,186,287,86,187,288,87,188,289,88,189,290,89,190,291,90,191,292,91,192
,293,92,193,294,93,194,295,94,195,296,95,196,297,96,197,298,97,198,299,
98,199,300,99,200,301,100,201,302,101,202,303:PREFIXEDCOMMAND;{:1210}
{1268:}41,142,243:BEGIN GETTOKEN;AFTERTOKEN:=CURTOK;END;{:1268}{1271:}
42,143,244:BEGIN GETTOKEN;SAVEFORAFTER(CURTOK);END;{:1271}{1274:}
61,162,263:OPENORCLOSEIN;{:1274}{1276:}59,160,261:ISSUEMESSAGE;{:1276}
{1285:}58,159,260:SHIFTCASE;{:1285}{1290:}20,121,222:SHOWWHATEVER;
{:1290}{1347:}60,161,262:DOEXTENSION;{:1347}{:1045}END;GOTO 60;
70:{1034:}MAINS:=EQTB[12656+CURCHR].HH.RH;
IF MAINS=1000 THEN CURLIST.AUXFIELD.HH.LH:=1000 ELSE IF MAINS<1000 THEN
BEGIN IF MAINS>0 THEN CURLIST.AUXFIELD.HH.LH:=MAINS;
END ELSE IF CURLIST.AUXFIELD.HH.LH<1000 THEN CURLIST.AUXFIELD.HH.LH:=
1000 ELSE CURLIST.AUXFIELD.HH.LH:=MAINS;MAINF:=EQTB[11839].HH.RH;
BCHAR:=FONTBCHAR[MAINF];FALSEBCHAR:=FONTFALSEBCHAR[MAINF];
IF CURLIST.MODEFIELD>0 THEN IF EQTB[13218].INT<>CURLIST.AUXFIELD.HH.RH
THEN FIXLANGUAGE;BEGIN LIGSTACK:=AVAIL;
IF LIGSTACK=0 THEN LIGSTACK:=GETAVAIL ELSE BEGIN AVAIL:=MEM[LIGSTACK].HH
.RH;MEM[LIGSTACK].HH.RH:=0;DYNUSED:=DYNUSED+1;END;END;
MEM[LIGSTACK].HH.B0:=MAINF;CURL:=CURCHR;MEM[LIGSTACK].HH.B1:=CURL;
CURQ:=CURLIST.TAILFIELD;
IF CANCELBOUNDARY THEN BEGIN CANCELBOUNDARY:=FALSE;MAINK:=0;
END ELSE MAINK:=BCHARLABEL[MAINF];IF MAINK=0 THEN GOTO 92;CURR:=CURL;
CURL:=256;GOTO 111;80:{1035:}
IF CURL<256 THEN BEGIN IF MEM[CURLIST.TAILFIELD].HH.B1=HYPHENCHAR[MAINF]
THEN IF MEM[CURQ].HH.RH>0 THEN INSDISC:=TRUE;
IF LIGATUREPRESENT THEN BEGIN MAINP:=NEWLIGATURE(MAINF,CURL,MEM[CURQ].HH
.RH);IF LFTHIT THEN BEGIN MEM[MAINP].HH.B1:=2;LFTHIT:=FALSE;END;
IF RTHIT THEN IF LIGSTACK=0 THEN BEGIN MEM[MAINP].HH.B1:=MEM[MAINP].HH.
B1+1;RTHIT:=FALSE;END;MEM[CURQ].HH.RH:=MAINP;CURLIST.TAILFIELD:=MAINP;
LIGATUREPRESENT:=FALSE;END;IF INSDISC THEN BEGIN INSDISC:=FALSE;
IF CURLIST.MODEFIELD>0 THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWDISC;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;END;END{:1035};
90:{1036:}IF LIGSTACK=0 THEN GOTO 21;CURQ:=CURLIST.TAILFIELD;
CURL:=MEM[LIGSTACK].HH.B1;91:IF NOT(LIGSTACK>=HIMEMMIN)THEN GOTO 95;
92:IF(CURCHR<FONTBC[MAINF])OR(CURCHR>FONTEC[MAINF])THEN BEGIN
CHARWARNING(MAINF,CURCHR);BEGIN MEM[LIGSTACK].HH.RH:=AVAIL;
AVAIL:=LIGSTACK;DYNUSED:=DYNUSED-1;END;GOTO 60;END;
MAINI:=FONTINFO[CHARBASE[MAINF]+CURL].QQQQ;
IF NOT(MAINI.B0>0)THEN BEGIN CHARWARNING(MAINF,CURCHR);
BEGIN MEM[LIGSTACK].HH.RH:=AVAIL;AVAIL:=LIGSTACK;DYNUSED:=DYNUSED-1;END;
GOTO 60;END;BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=LIGSTACK;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END{:1036};100:{1038:}
GETNEXT;IF CURCMD=11 THEN GOTO 101;IF CURCMD=12 THEN GOTO 101;
IF CURCMD=68 THEN GOTO 101;XTOKEN;IF CURCMD=11 THEN GOTO 101;
IF CURCMD=12 THEN GOTO 101;IF CURCMD=68 THEN GOTO 101;
IF CURCMD=16 THEN BEGIN SCANCHARNUM;CURCHR:=CURVAL;GOTO 101;END;
IF CURCMD=65 THEN BCHAR:=256;CURR:=BCHAR;LIGSTACK:=0;GOTO 110;
101:MAINS:=EQTB[12656+CURCHR].HH.RH;
IF MAINS=1000 THEN CURLIST.AUXFIELD.HH.LH:=1000 ELSE IF MAINS<1000 THEN
BEGIN IF MAINS>0 THEN CURLIST.AUXFIELD.HH.LH:=MAINS;
END ELSE IF CURLIST.AUXFIELD.HH.LH<1000 THEN CURLIST.AUXFIELD.HH.LH:=
1000 ELSE CURLIST.AUXFIELD.HH.LH:=MAINS;BEGIN LIGSTACK:=AVAIL;
IF LIGSTACK=0 THEN LIGSTACK:=GETAVAIL ELSE BEGIN AVAIL:=MEM[LIGSTACK].HH
.RH;MEM[LIGSTACK].HH.RH:=0;DYNUSED:=DYNUSED+1;END;END;
MEM[LIGSTACK].HH.B0:=MAINF;CURR:=CURCHR;MEM[LIGSTACK].HH.B1:=CURR;
IF CURR=FALSEBCHAR THEN CURR:=256{:1038};110:{1039:}
IF((MAINI.B2)MOD 4)<>1 THEN GOTO 80;MAINK:=LIGKERNBASE[MAINF]+MAINI.B3;
MAINJ:=FONTINFO[MAINK].QQQQ;IF MAINJ.B0<=128 THEN GOTO 112;
MAINK:=LIGKERNBASE[MAINF]+256*MAINJ.B2+MAINJ.B3+32768-256*(128);
111:MAINJ:=FONTINFO[MAINK].QQQQ;
112:IF MAINJ.B1=CURR THEN IF MAINJ.B0<=128 THEN{1040:}
BEGIN IF MAINJ.B2>=128 THEN BEGIN IF CURL<256 THEN BEGIN IF MEM[CURLIST.
TAILFIELD].HH.B1=HYPHENCHAR[MAINF]THEN IF MEM[CURQ].HH.RH>0 THEN INSDISC
:=TRUE;
IF LIGATUREPRESENT THEN BEGIN MAINP:=NEWLIGATURE(MAINF,CURL,MEM[CURQ].HH
.RH);IF LFTHIT THEN BEGIN MEM[MAINP].HH.B1:=2;LFTHIT:=FALSE;END;
IF RTHIT THEN IF LIGSTACK=0 THEN BEGIN MEM[MAINP].HH.B1:=MEM[MAINP].HH.
B1+1;RTHIT:=FALSE;END;MEM[CURQ].HH.RH:=MAINP;CURLIST.TAILFIELD:=MAINP;
LIGATUREPRESENT:=FALSE;END;IF INSDISC THEN BEGIN INSDISC:=FALSE;
IF CURLIST.MODEFIELD>0 THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWDISC;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;END;END;
BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWKERN(FONTINFO[KERNBASE[MAINF]+256
*MAINJ.B2+MAINJ.B3].INT);
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;GOTO 90;END;
IF CURL=256 THEN LFTHIT:=TRUE ELSE IF LIGSTACK=0 THEN RTHIT:=TRUE;
BEGIN IF INTERRUPT<>0 THEN PAUSEFORINSTRUCTIONS;END;
CASE MAINJ.B2 OF 1,5:BEGIN CURL:=MAINJ.B3;
MAINI:=FONTINFO[CHARBASE[MAINF]+CURL].QQQQ;LIGATUREPRESENT:=TRUE;END;
2,6:BEGIN CURR:=MAINJ.B3;
IF LIGSTACK=0 THEN BEGIN LIGSTACK:=NEWLIGITEM(CURR);BCHAR:=256;
END ELSE IF(LIGSTACK>=HIMEMMIN)THEN BEGIN MAINP:=LIGSTACK;
LIGSTACK:=NEWLIGITEM(CURR);MEM[LIGSTACK+1].HH.RH:=MAINP;
END ELSE MEM[LIGSTACK].HH.B1:=CURR;END;3:BEGIN CURR:=MAINJ.B3;
MAINP:=LIGSTACK;LIGSTACK:=NEWLIGITEM(CURR);MEM[LIGSTACK].HH.RH:=MAINP;
END;7,11:BEGIN IF CURL<256 THEN BEGIN IF MEM[CURLIST.TAILFIELD].HH.B1=
HYPHENCHAR[MAINF]THEN IF MEM[CURQ].HH.RH>0 THEN INSDISC:=TRUE;
IF LIGATUREPRESENT THEN BEGIN MAINP:=NEWLIGATURE(MAINF,CURL,MEM[CURQ].HH
.RH);IF LFTHIT THEN BEGIN MEM[MAINP].HH.B1:=2;LFTHIT:=FALSE;END;
IF FALSE THEN IF LIGSTACK=0 THEN BEGIN MEM[MAINP].HH.B1:=MEM[MAINP].HH.
B1+1;RTHIT:=FALSE;END;MEM[CURQ].HH.RH:=MAINP;CURLIST.TAILFIELD:=MAINP;
LIGATUREPRESENT:=FALSE;END;IF INSDISC THEN BEGIN INSDISC:=FALSE;
IF CURLIST.MODEFIELD>0 THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=NEWDISC;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;END;END;
CURQ:=CURLIST.TAILFIELD;CURL:=MAINJ.B3;
MAINI:=FONTINFO[CHARBASE[MAINF]+CURL].QQQQ;LIGATUREPRESENT:=TRUE;END;
OTHERWISE BEGIN CURL:=MAINJ.B3;LIGATUREPRESENT:=TRUE;
IF LIGSTACK=0 THEN GOTO 80 ELSE GOTO 91;END END;
IF MAINJ.B2>4 THEN IF MAINJ.B2<>7 THEN GOTO 80;
IF CURL<256 THEN GOTO 110;MAINK:=BCHARLABEL[MAINF];GOTO 111;END{:1040};
IF MAINJ.B0=0 THEN MAINK:=MAINK+1 ELSE BEGIN IF MAINJ.B0>=128 THEN GOTO
80;MAINK:=MAINK+MAINJ.B0+1;END;GOTO 111{:1039};95:{1037:}
MAINP:=MEM[LIGSTACK+1].HH.RH;
IF MAINP>0 THEN BEGIN MEM[CURLIST.TAILFIELD].HH.RH:=MAINP;
CURLIST.TAILFIELD:=MEM[CURLIST.TAILFIELD].HH.RH;END;TEMPPTR:=LIGSTACK;
LIGSTACK:=MEM[TEMPPTR].HH.RH;FREENODE(TEMPPTR,2);
MAINI:=FONTINFO[CHARBASE[MAINF]+CURL].QQQQ;LIGATUREPRESENT:=TRUE;
IF LIGSTACK=0 THEN IF MAINP>0 THEN GOTO 100 ELSE CURR:=BCHAR ELSE CURR:=
MEM[LIGSTACK].HH.B1;GOTO 110{:1037}{:1034};120:{1041:}
IF EQTB[10794].HH.RH=0 THEN BEGIN{1042:}
BEGIN MAINP:=FONTGLUE[EQTB[11839].HH.RH];
IF MAINP=0 THEN BEGIN MAINP:=NEWSPEC(0);
MAINK:=PARAMBASE[EQTB[11839].HH.RH]+2;
MEM[MAINP+1].INT:=FONTINFO[MAINK].INT;
MEM[MAINP+2].INT:=FONTINFO[MAINK+1].INT;
MEM[MAINP+3].INT:=FONTINFO[MAINK+2].INT;
FONTGLUE[EQTB[11839].HH.RH]:=MAINP;END;END{:1042};
TEMPPTR:=NEWGLUE(MAINP);END ELSE TEMPPTR:=NEWPARAMGLUE(12);
MEM[CURLIST.TAILFIELD].HH.RH:=TEMPPTR;CURLIST.TAILFIELD:=TEMPPTR;
GOTO 60{:1041};10:END;{:1030}{1284:}PROCEDURE GIVEERRHELP;
BEGIN TOKENSHOW(EQTB[11326].HH.RH);END;{:1284}{1303:}{524:}
FUNCTION OPENFMTFILE:BOOLEAN;LABEL 40,10;VAR J:0..BUFSIZE;
BEGIN J:=CURINPUT.LOCFIELD;
IF BUFFER[CURINPUT.LOCFIELD]=38 THEN BEGIN CURINPUT.LOCFIELD:=CURINPUT.
LOCFIELD+1;J:=CURINPUT.LOCFIELD;BUFFER[LAST]:=32;
WHILE BUFFER[J]<>32 DO J:=J+1;PACKBUFFEREDNAME(0,CURINPUT.LOCFIELD,J-1);
IF WOPENIN(FMTFILE)THEN GOTO 40;
PACKBUFFEREDNAME(FORMATAREALENGTH,CURINPUT.LOCFIELD,J-1);
IF WOPENIN(FMTFILE)THEN GOTO 40;WAKEUPTERMINAL;
WRITELN(TERMOUT,'Sorry, I can''t find that format;',' will try PLAIN.',
CHR(13),CHR(10));IF ODD(SELECTOR)THEN WRITELN(TERMOUT);END;
PACKBUFFEREDNAME(FORMATDEFAULTLENGTH-4,1,0);
IF NOT WOPENIN(FMTFILE)THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'I can''t find the PLAIN format file!',CHR(13),CHR(10));
OPENFMTFILE:=FALSE;GOTO 10;END;40:CURINPUT.LOCFIELD:=J;
OPENFMTFILE:=TRUE;10:END;{:524}FUNCTION LOADFMTFILE:BOOLEAN;
LABEL 6666,10;VAR J,K:INTEGER;P,Q:HALFWORD;X:INTEGER;W:FOURQUARTERS;
BEGIN{1308:}X:=FMTFILE^[FMTCOUNT].INT;IF X<>340764991 THEN GOTO 6666;
{1389:}BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>1)THEN GOTO 6666 ELSE ETEXMODE:=X;END;
IF(ETEXMODE=1)THEN BEGIN{1546:}MAXREGNUM:=32767;MAXREGHELPLINE:=1406;
{:1546}END ELSE BEGIN{1545:}MAXREGNUM:=255;MAXREGHELPLINE:=697;{:1545}
END;{:1389}BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF X<>0 THEN GOTO 6666;BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF X<>327144 THEN GOTO 6666;BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF X<>14021 THEN GOTO 6666;BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF X<>8501 THEN GOTO 6666;BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF X<>503 THEN GOTO 6666{:1308};{1310:}
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;IF X<0 THEN GOTO 6666;
IF X>POOLSIZE THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'---! Must increase the ','string pool size',CHR(13),CHR
(10));GOTO 6666;END ELSE POOLPTR:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;IF X<0 THEN GOTO 6666;
IF X>MAXSTRINGS THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'---! Must increase the ','max strings',CHR(13),CHR(10))
;GOTO 6666;END ELSE STRPTR:=X;END;
FOR K:=0 TO STRPTR DO BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>POOLPTR)THEN GOTO 6666 ELSE STRSTART[K]:=X;END;K:=0;
WHILE K+4<POOLPTR DO BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;W:=FMTFILE^[FMTCOUNT].QQQQ;END;STRPOOL[K]:=W.B0;
STRPOOL[K+1]:=W.B1;STRPOOL[K+2]:=W.B2;STRPOOL[K+3]:=W.B3;K:=K+4;END;
K:=POOLPTR-4;BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;W:=FMTFILE^[FMTCOUNT].QQQQ;END;STRPOOL[K]:=W.B0;
STRPOOL[K+1]:=W.B1;STRPOOL[K+2]:=W.B2;STRPOOL[K+3]:=W.B3;
INITSTRPTR:=STRPTR;INITPOOLPTR:=POOLPTR{:1310};{1312:}
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<1019)OR(X>327130)THEN GOTO 6666 ELSE LOMEMMAX:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<20)OR(X>LOMEMMAX)THEN GOTO 6666 ELSE ROVER:=X;END;
IF(ETEXMODE=1)THEN FOR K:=0 TO 5 DO BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT
+1;IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>LOMEMMAX)THEN GOTO 6666 ELSE SAROOT[K]:=X;END;P:=0;Q:=ROVER;
REPEAT FOR K:=P TO Q+1 DO BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;MEM[K]:=FMTFILE^[FMTCOUNT];END;P:=Q+MEM[Q].HH.LH;
IF(P>LOMEMMAX)OR((Q>=MEM[Q+1].HH.RH)AND(MEM[Q+1].HH.RH<>ROVER))THEN GOTO
6666;Q:=MEM[Q+1].HH.RH;UNTIL Q=ROVER;
FOR K:=P TO LOMEMMAX DO BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;MEM[K]:=FMTFILE^[FMTCOUNT];END;
IF MEMMIN<-2 THEN BEGIN P:=MEM[ROVER+1].HH.LH;Q:=MEMMIN+1;
MEM[MEMMIN].HH.RH:=0;MEM[MEMMIN].HH.LH:=0;MEM[P+1].HH.RH:=Q;
MEM[ROVER+1].HH.LH:=Q;MEM[Q+1].HH.RH:=ROVER;MEM[Q+1].HH.LH:=P;
MEM[Q].HH.RH:=327145;MEM[Q].HH.LH:=-0-Q;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<LOMEMMAX+1)OR(X>327131)THEN GOTO 6666 ELSE HIMEMMIN:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>327144)THEN GOTO 6666 ELSE AVAIL:=X;END;MEMEND:=327144;
FOR K:=HIMEMMIN TO MEMEND DO BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;MEM[K]:=FMTFILE^[FMTCOUNT];END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;VARUSED:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;DYNUSED:=FMTFILE^[FMTCOUNT].INT;END{:1312};{1314:}
{1317:}K:=1;REPEAT BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<1)OR(K+X>14022)THEN GOTO 6666;
FOR J:=K TO K+X-1 DO BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;EQTB[J]:=FMTFILE^[FMTCOUNT];END;K:=K+X;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(K+X>14022)THEN GOTO 6666;
FOR J:=K TO K+X-1 DO EQTB[J]:=EQTB[K-1];K:=K+X;UNTIL K>14021{:1317};
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<514)OR(X>10514)THEN GOTO 6666 ELSE PARLOC:=X;END;
PARTOKEN:=4095+PARLOC;BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<514)OR(X>10514)THEN GOTO 6666 ELSE WRITELOC:=X;END;{1319:}
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<514)OR(X>10514)THEN GOTO 6666 ELSE HASHUSED:=X;END;P:=513;
REPEAT BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<P+1)OR(X>HASHUSED)THEN GOTO 6666 ELSE P:=X;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;HASH[P]:=FMTFILE^[FMTCOUNT].HH;END;UNTIL P=HASHUSED;
FOR P:=HASHUSED+1 TO 10780 DO BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;HASH[P]:=FMTFILE^[FMTCOUNT].HH;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;CSCOUNT:=FMTFILE^[FMTCOUNT].INT;END{:1319}{:1314};
{1321:}BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;IF X<7 THEN GOTO 6666;
IF X>FONTMEMSIZE THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'---! Must increase the ','font mem size',CHR(13),CHR(10
));GOTO 6666;END ELSE FMEMPTR:=X;END;
FOR K:=0 TO FMEMPTR-1 DO BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;FONTINFO[K]:=FMTFILE^[FMTCOUNT];END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;IF X<0 THEN GOTO 6666;
IF X>FONTMAX THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'---! Must increase the ','font max',CHR(13),CHR(10));
GOTO 6666;END ELSE FONTPTR:=X;END;FOR K:=0 TO FONTPTR DO{1323:}
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;FONTCHECK[K]:=FMTFILE^[FMTCOUNT].QQQQ;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;FONTSIZE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;FONTDSIZE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>327145)THEN GOTO 6666 ELSE FONTPARAMS[K]:=X;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;HYPHENCHAR[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;SKEWCHAR[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>STRPTR)THEN GOTO 6666 ELSE FONTNAME[K]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>STRPTR)THEN GOTO 6666 ELSE FONTAREA[K]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>255)THEN GOTO 6666 ELSE FONTBC[K]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>255)THEN GOTO 6666 ELSE FONTEC[K]:=X;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;CHARBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;WIDTHBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;HEIGHTBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;DEPTHBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;ITALICBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;LIGKERNBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;KERNBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;EXTENBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;PARAMBASE[K]:=FMTFILE^[FMTCOUNT].INT;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>LOMEMMAX)THEN GOTO 6666 ELSE FONTGLUE[K]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>FMEMPTR-1)THEN GOTO 6666 ELSE BCHARLABEL[K]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>256)THEN GOTO 6666 ELSE FONTBCHAR[K]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>256)THEN GOTO 6666 ELSE FONTFALSEBCHAR[K]:=X;END;END{:1323}
{:1321};{1325:}BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>503)THEN GOTO 6666 ELSE HYPHCOUNT:=X;END;
FOR K:=1 TO HYPHCOUNT DO BEGIN BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>503)THEN GOTO 6666 ELSE J:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>STRPTR)THEN GOTO 6666 ELSE HYPHWORD[J]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>327145)THEN GOTO 6666 ELSE HYPHLIST[J]:=X;END;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;IF X<0 THEN GOTO 6666;
IF X>TRIESIZE THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'---! Must increase the ','trie size',CHR(13),CHR(10));
GOTO 6666;END ELSE J:=X;END;TRIEMAX:=J;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>J)THEN GOTO 6666 ELSE HYPHSTART:=X;END;
FOR K:=0 TO J DO BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;TRIE[K]:=FMTFILE^[FMTCOUNT].HH;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;IF X<0 THEN GOTO 6666;
IF X>TRIEOPSIZE THEN BEGIN WAKEUPTERMINAL;
WRITELN(TERMOUT,'---! Must increase the ','trie op size',CHR(13),CHR(10)
);GOTO 6666;END ELSE J:=X;END;TRIEOPPTR:=J;
FOR K:=1 TO J DO BEGIN BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>63)THEN GOTO 6666 ELSE HYFDISTANCE[K]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>63)THEN GOTO 6666 ELSE HYFNUM[K]:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>511)THEN GOTO 6666 ELSE HYFNEXT[K]:=X;END;END;
FOR K:=0 TO 255 DO TRIEUSED[K]:=0;K:=256;
WHILE J>0 DO BEGIN BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>K-1)THEN GOTO 6666 ELSE K:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<1)OR(X>J)THEN GOTO 6666 ELSE X:=X;END;TRIEUSED[K]:=X;J:=J-X;
OPSTART[K]:=J;END;TRIENOTREADY:=FALSE{:1325};{1327:}
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>3)THEN GOTO 6666 ELSE INTERACTION:=X;END;
BEGIN BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<0)OR(X>STRPTR)THEN GOTO 6666 ELSE FORMATIDENT:=X;END;
BEGIN BEGIN FMTCOUNT:=FMTCOUNT+1;
IF FMTCOUNT=VAXBLOCKLENGTH THEN BEGIN GET(FMTFILE,error:=continue);
FMTCOUNT:=0;END END;X:=FMTFILE^[FMTCOUNT].INT;END;
IF(X<>69069)OR EOF(FMTFILE)THEN GOTO 6666{:1327};LOADFMTFILE:=TRUE;
GOTO 10;6666:WAKEUPTERMINAL;
WRITELN(TERMOUT,'(Fatal format file error; I''m stymied)',CHR(13),CHR(10
));LOADFMTFILE:=FALSE;10:END;{:1303}{1330:}{1333:}
PROCEDURE CLOSEFILESANDTERMINATE;VAR K:INTEGER;BEGIN{1378:}
FOR K:=0 TO 15 DO IF WRITEOPEN[K]THEN ACLOSE(WRITEFILE[K]){:1378};
IF EQTB[13199].INT>0 THEN{1334:}
IF LOGOPENED THEN BEGIN IF LOGQUAL THEN WRITELN(LOGFILE,' ');
IF LOGQUAL THEN WRITELN(LOGFILE,'Here is how much of TeX''s memory',
' you used:');
IF LOGQUAL THEN WRITE(LOGFILE,' ',STRPTR-INITSTRPTR:1,' string');
IF STRPTR<>INITSTRPTR+1 THEN IF LOGQUAL THEN WRITE(LOGFILE,'s');
IF LOGQUAL THEN WRITELN(LOGFILE,' out of ',MAXSTRINGS-INITSTRPTR:1);
IF LOGQUAL THEN WRITELN(LOGFILE,' ',POOLPTR-INITPOOLPTR:1,
' string characters out of ',POOLSIZE-INITPOOLPTR:1);
IF LOGQUAL THEN WRITELN(LOGFILE,' ',LOMEMMAX-MEMMIN+MEMEND-HIMEMMIN+2:1,
' words of memory out of ',MEMEND+1-MEMMIN:1);
IF LOGQUAL THEN WRITELN(LOGFILE,' ',CSCOUNT:1,
' multiletter control sequences out of ',10000:1);
IF LOGQUAL THEN WRITE(LOGFILE,' ',FMEMPTR:1,' words of font info for ',
FONTPTR-0:1,' font');
IF FONTPTR<>1 THEN IF LOGQUAL THEN WRITE(LOGFILE,'s');
IF LOGQUAL THEN WRITELN(LOGFILE,', out of ',FONTMEMSIZE:1,' for ',
FONTMAX-0:1);
IF LOGQUAL THEN WRITE(LOGFILE,' ',HYPHCOUNT:1,' hyphenation exception');
IF HYPHCOUNT<>1 THEN IF LOGQUAL THEN WRITE(LOGFILE,'s');
IF LOGQUAL THEN WRITELN(LOGFILE,' out of ',503:1);
IF LOGQUAL THEN WRITELN(LOGFILE,' ',MAXINSTACK:1,'i,',MAXNESTSTACK:1,
'n,',MAXPARAMSTACK:1,'p,',MAXBUFSTACK+1:1,'b,',MAXSAVESTACK+6:1,
's stack positions out of ',STACKSIZE:1,'i,',NESTSIZE:1,'n,',PARAMSIZE:1
,'p,',BUFSIZE:1,'b,',SAVESIZE:1,'s');END{:1334};WAKEUPTERMINAL;{642:}
WHILE CURS>-1 DO BEGIN IF CURS>0 THEN BEGIN DBUFFER.B[DVIPTR]:=142;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;
END ELSE BEGIN BEGIN DBUFFER.B[DVIPTR]:=140;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;TOTALPAGES:=TOTALPAGES+1;END;
CURS:=CURS-1;END;
IF TOTALPAGES=0 THEN PRINTNL(844)ELSE BEGIN BEGIN DBUFFER.B[DVIPTR]:=248
;DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;DVIFOUR(LASTBOP);
LASTBOP:=DVIOFFSET+DVIPTR-5;DVIFOUR(25400000);DVIFOUR(473628672);
PREPAREMAG;DVIFOUR(EQTB[13185].INT);DVIFOUR(MAXV);DVIFOUR(MAXH);
BEGIN DBUFFER.B[DVIPTR]:=MAXPUSH DIV 256;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=MAXPUSH MOD 256;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=(TOTALPAGES DIV 256)MOD 256;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;
BEGIN DBUFFER.B[DVIPTR]:=TOTALPAGES MOD 256;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;{643:}
WHILE FONTPTR>0 DO BEGIN IF FONTUSED[FONTPTR]THEN DVIFONTDEF(FONTPTR);
FONTPTR:=FONTPTR-1;END{:643};BEGIN DBUFFER.B[DVIPTR]:=249;
DVIPTR:=DVIPTR+1;IF DVIPTR=DVILIMIT THEN DVISWAP;END;DVIFOUR(LASTBOP);
BEGIN DBUFFER.B[DVIPTR]:=2;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;K:=4+((DVIBUFSIZE-DVIPTR)MOD 4);
WHILE K>0 DO BEGIN BEGIN DBUFFER.B[DVIPTR]:=223;DVIPTR:=DVIPTR+1;
IF DVIPTR=DVILIMIT THEN DVISWAP;END;K:=K-1;END;{599:}
IF(DVILIMIT=HALFBUF)AND DVIQUAL THEN WRITE(DVIFILE,DBUFFER.R);
FOR K:=DVIPTR TO DVIBUFSIZE DO DBUFFER.B[K]:=223;
IF(DVIPTR>0)AND DVIQUAL THEN WRITE(DVIFILE,DBUFFER.L);
IF(DVIPTR>HALFBUF)AND DVIQUAL THEN WRITE(DVIFILE,DBUFFER.R);{:599};
IF DVIQUAL THEN BEGIN BCLOSE(DVIFILE);PRINTNL(845);
SLOWPRINT(OUTPUTFILENAME);END ELSE PRINTNL(846);PRINT(287);
PRINTINT(TOTALPAGES);PRINT(847);IF TOTALPAGES<>1 THEN PRINTCHAR(115);
PRINT(848);PRINTINT(DVIOFFSET+DVIPTR);PRINT(849);END{:642};
IF DIAGQUAL THEN BEGIN IF DIAGQUAL THEN WRITELN(DIAGFILE);
IF DIAGQUAL THEN WRITELN(DIAGFILE,'end module');ACLOSE(DIAGFILE);
PRINTNL(1285);SLOWPRINT(DIAGNAME);PRINTCHAR(46);END;END;{:1333}{1335:}
PROCEDURE FINALCLEANUP;LABEL 10;VAR C:SMALLNUMBER;BEGIN C:=CURCHR;
IF JOBNAME=0 THEN OPENLOGFILE;
WHILE INPUTPTR>0 DO IF CURINPUT.STATEFIELD=0 THEN ENDTOKENLIST ELSE
ENDFILEREADING;WHILE OPENPARENS>0 DO BEGIN PRINT(1286);
OPENPARENS:=OPENPARENS-1;END;IF CURLEVEL>1 THEN BEGIN PRINTNL(40);
PRINTESC(1287);PRINT(1288);PRINTINT(CURLEVEL-1);PRINTCHAR(41);
IF(ETEXMODE=1)THEN SHOWSAVEGROUPS;END;
WHILE CONDPTR<>0 DO BEGIN PRINTNL(40);PRINTESC(1287);PRINT(1289);
PRINTCMDCHR(105,CURIF);IF IFLINE<>0 THEN BEGIN PRINT(1290);
PRINTINT(IFLINE);END;PRINT(1291);IFLINE:=MEM[CONDPTR+1].INT;
CURIF:=MEM[CONDPTR].HH.B1;TEMPPTR:=CONDPTR;CONDPTR:=MEM[CONDPTR].HH.RH;
FREENODE(TEMPPTR,2);END;
IF HISTORY<>0 THEN IF((HISTORY=1)OR(INTERACTION<3))THEN IF SELECTOR=19
THEN BEGIN SELECTOR:=17;PRINTNL(1292);SELECTOR:=19;END;
IF C=1 THEN BEGIN IF INITFLAG THEN BEGIN FOR C:=0 TO 4 DO IF CURMARK[C]
<>0 THEN DELETETOKENREF(CURMARK[C]);
IF SAROOT[6]<>0 THEN IF DOMARKS(3,0,SAROOT[6])THEN SAROOT[6]:=0;
FOR C:=2 TO 3 DO FLUSHNODELIST(DISCPTR[C]);STOREFMTFILE;GOTO 10;END;
PRINTNL(1293);GOTO 10;END;10:END;{:1335}{1336:}PROCEDURE INITPRIM;
BEGIN NONEWCONTROLSEQUENCE:=FALSE;FIRST:=0;{226:}
PRIMITIVE(379,75,10782);PRIMITIVE(380,75,10783);PRIMITIVE(381,75,10784);
PRIMITIVE(382,75,10785);PRIMITIVE(383,75,10786);PRIMITIVE(384,75,10787);
PRIMITIVE(385,75,10788);PRIMITIVE(386,75,10789);PRIMITIVE(387,75,10790);
PRIMITIVE(388,75,10791);PRIMITIVE(389,75,10792);PRIMITIVE(390,75,10793);
PRIMITIVE(391,75,10794);PRIMITIVE(392,75,10795);PRIMITIVE(393,75,10796);
PRIMITIVE(394,76,10797);PRIMITIVE(395,76,10798);PRIMITIVE(396,76,10799);
{:226}{230:}PRIMITIVE(401,72,11317);PRIMITIVE(402,72,11318);
PRIMITIVE(403,72,11319);PRIMITIVE(404,72,11320);PRIMITIVE(405,72,11321);
PRIMITIVE(406,72,11322);PRIMITIVE(407,72,11323);PRIMITIVE(408,72,11324);
PRIMITIVE(409,72,11326);{:230}{238:}PRIMITIVE(423,73,13168);
PRIMITIVE(424,73,13169);PRIMITIVE(425,73,13170);PRIMITIVE(426,73,13171);
PRIMITIVE(427,73,13172);PRIMITIVE(428,73,13173);PRIMITIVE(429,73,13174);
PRIMITIVE(430,73,13175);PRIMITIVE(431,73,13176);PRIMITIVE(432,73,13177);
PRIMITIVE(433,73,13178);PRIMITIVE(434,73,13179);PRIMITIVE(435,73,13180);
PRIMITIVE(436,73,13181);PRIMITIVE(437,73,13182);PRIMITIVE(438,73,13183);
PRIMITIVE(439,73,13184);PRIMITIVE(440,73,13185);PRIMITIVE(441,73,13186);
PRIMITIVE(442,73,13187);PRIMITIVE(443,73,13188);PRIMITIVE(444,73,13189);
PRIMITIVE(445,73,13190);PRIMITIVE(446,73,13191);PRIMITIVE(447,73,13192);
PRIMITIVE(448,73,13193);PRIMITIVE(449,73,13194);PRIMITIVE(450,73,13195);
PRIMITIVE(451,73,13196);PRIMITIVE(452,73,13197);PRIMITIVE(453,73,13198);
PRIMITIVE(454,73,13199);PRIMITIVE(455,73,13200);PRIMITIVE(456,73,13201);
PRIMITIVE(457,73,13202);PRIMITIVE(458,73,13203);PRIMITIVE(459,73,13204);
PRIMITIVE(460,73,13205);PRIMITIVE(461,73,13206);PRIMITIVE(462,73,13207);
PRIMITIVE(463,73,13208);PRIMITIVE(464,73,13209);PRIMITIVE(465,73,13210);
PRIMITIVE(466,73,13211);PRIMITIVE(467,73,13212);PRIMITIVE(468,73,13213);
PRIMITIVE(469,73,13214);PRIMITIVE(470,73,13215);PRIMITIVE(471,73,13216);
PRIMITIVE(472,73,13217);PRIMITIVE(473,73,13218);PRIMITIVE(474,73,13219);
PRIMITIVE(475,73,13220);PRIMITIVE(476,73,13221);PRIMITIVE(477,73,13222);
{:238}{248:}PRIMITIVE(481,74,13745);PRIMITIVE(482,74,13746);
PRIMITIVE(483,74,13747);PRIMITIVE(484,74,13748);PRIMITIVE(485,74,13749);
PRIMITIVE(486,74,13750);PRIMITIVE(487,74,13751);PRIMITIVE(488,74,13752);
PRIMITIVE(489,74,13753);PRIMITIVE(490,74,13754);PRIMITIVE(491,74,13755);
PRIMITIVE(492,74,13756);PRIMITIVE(493,74,13757);PRIMITIVE(494,74,13758);
PRIMITIVE(495,74,13759);PRIMITIVE(496,74,13760);PRIMITIVE(497,74,13761);
PRIMITIVE(498,74,13762);PRIMITIVE(499,74,13763);PRIMITIVE(500,74,13764);
PRIMITIVE(501,74,13765);{:248}{265:}PRIMITIVE(32,64,0);
PRIMITIVE(47,44,0);PRIMITIVE(511,45,0);PRIMITIVE(512,90,0);
PRIMITIVE(513,40,0);PRIMITIVE(514,41,0);PRIMITIVE(515,61,0);
PRIMITIVE(516,16,0);PRIMITIVE(507,107,0);PRIMITIVE(517,15,0);
PRIMITIVE(518,92,0);PRIMITIVE(508,67,0);PRIMITIVE(519,62,0);
HASH[10516].RH:=519;EQTB[10516]:=EQTB[CURVAL];PRIMITIVE(520,102,0);
PRIMITIVE(521,88,0);PRIMITIVE(522,77,0);PRIMITIVE(523,32,0);
PRIMITIVE(524,36,0);PRIMITIVE(525,39,0);PRIMITIVE(331,37,0);
PRIMITIVE(354,18,0);PRIMITIVE(526,46,0);PRIMITIVE(527,17,0);
PRIMITIVE(528,54,0);PRIMITIVE(529,91,0);PRIMITIVE(530,34,0);
PRIMITIVE(531,65,0);PRIMITIVE(532,103,0);PRIMITIVE(336,55,0);
PRIMITIVE(533,63,0);PRIMITIVE(534,84,11312);PRIMITIVE(535,42,0);
PRIMITIVE(536,80,0);PRIMITIVE(537,66,0);PRIMITIVE(538,96,0);
PRIMITIVE(539,0,256);HASH[10521].RH:=539;EQTB[10521]:=EQTB[CURVAL];
PRIMITIVE(540,98,0);PRIMITIVE(541,109,0);PRIMITIVE(410,71,0);
PRIMITIVE(355,38,0);PRIMITIVE(542,33,0);PRIMITIVE(543,56,0);
PRIMITIVE(544,35,0);{:265}{334:}PRIMITIVE(606,13,256);PARLOC:=CURVAL;
PARTOKEN:=4095+PARLOC;{:334}{376:}PRIMITIVE(638,104,0);
PRIMITIVE(639,104,1);{:376}{384:}PRIMITIVE(640,110,0);
PRIMITIVE(641,110,1);PRIMITIVE(642,110,2);PRIMITIVE(643,110,3);
PRIMITIVE(644,110,4);{:384}{411:}PRIMITIVE(479,89,0);
PRIMITIVE(503,89,1);PRIMITIVE(398,89,2);PRIMITIVE(399,89,3);{:411}{416:}
PRIMITIVE(677,79,102);PRIMITIVE(678,79,1);PRIMITIVE(679,82,0);
PRIMITIVE(680,82,1);PRIMITIVE(681,83,1);PRIMITIVE(682,83,3);
PRIMITIVE(683,83,2);PRIMITIVE(684,70,0);PRIMITIVE(685,70,1);
PRIMITIVE(686,70,2);PRIMITIVE(687,70,4);PRIMITIVE(688,70,5);{:416}{468:}
PRIMITIVE(744,108,0);PRIMITIVE(745,108,1);PRIMITIVE(746,108,2);
PRIMITIVE(747,108,3);PRIMITIVE(748,108,4);PRIMITIVE(749,108,5);{:468}
{487:}PRIMITIVE(765,105,0);PRIMITIVE(766,105,1);PRIMITIVE(767,105,2);
PRIMITIVE(768,105,3);PRIMITIVE(769,105,4);PRIMITIVE(770,105,5);
PRIMITIVE(771,105,6);PRIMITIVE(772,105,7);PRIMITIVE(773,105,8);
PRIMITIVE(774,105,9);PRIMITIVE(775,105,10);PRIMITIVE(776,105,11);
PRIMITIVE(777,105,12);PRIMITIVE(778,105,13);PRIMITIVE(779,105,14);
PRIMITIVE(780,105,15);PRIMITIVE(781,105,16);{:487}{491:}
PRIMITIVE(783,106,2);HASH[10518].RH:=783;EQTB[10518]:=EQTB[CURVAL];
PRIMITIVE(784,106,4);PRIMITIVE(785,106,3);{:491}{553:}
PRIMITIVE(808,87,0);HASH[10524].RH:=808;EQTB[10524]:=EQTB[CURVAL];{:553}
{780:}PRIMITIVE(907,4,256);PRIMITIVE(908,5,257);HASH[10515].RH:=908;
EQTB[10515]:=EQTB[CURVAL];PRIMITIVE(909,5,258);HASH[10519].RH:=910;
HASH[10520].RH:=910;EQTB[10520].HH.B0:=9;EQTB[10520].HH.RH:=327133;
EQTB[10520].HH.B1:=1;EQTB[10519]:=EQTB[10520];EQTB[10519].HH.B0:=115;
{:780}{983:}PRIMITIVE(979,81,0);PRIMITIVE(980,81,1);PRIMITIVE(981,81,2);
PRIMITIVE(982,81,3);PRIMITIVE(983,81,4);PRIMITIVE(984,81,5);
PRIMITIVE(985,81,6);PRIMITIVE(986,81,7);{:983}{1052:}
PRIMITIVE(344,14,0);PRIMITIVE(1034,14,1);{:1052}{1058:}
PRIMITIVE(1035,26,4);PRIMITIVE(1036,26,0);PRIMITIVE(1037,26,1);
PRIMITIVE(1038,26,2);PRIMITIVE(1039,26,3);PRIMITIVE(1040,27,4);
PRIMITIVE(1041,27,0);PRIMITIVE(1042,27,1);PRIMITIVE(1043,27,2);
PRIMITIVE(1044,27,3);PRIMITIVE(337,28,5);PRIMITIVE(341,29,1);
PRIMITIVE(343,30,99);{:1058}{1071:}PRIMITIVE(1062,21,1);
PRIMITIVE(1063,21,0);PRIMITIVE(1064,22,1);PRIMITIVE(1065,22,0);
PRIMITIVE(412,20,0);PRIMITIVE(1066,20,1);PRIMITIVE(1067,20,2);
PRIMITIVE(974,20,3);PRIMITIVE(1068,20,4);PRIMITIVE(976,20,5);
PRIMITIVE(1069,20,106);PRIMITIVE(1070,31,99);PRIMITIVE(1071,31,100);
PRIMITIVE(1072,31,101);PRIMITIVE(1073,31,102);{:1071}{1088:}
PRIMITIVE(1088,43,1);PRIMITIVE(1089,43,0);{:1088}{1107:}
PRIMITIVE(1098,25,12);PRIMITIVE(1099,25,11);PRIMITIVE(1100,25,10);
PRIMITIVE(1101,23,0);PRIMITIVE(1102,23,1);PRIMITIVE(1103,24,0);
PRIMITIVE(1104,24,1);{:1107}{1114:}PRIMITIVE(45,47,1);
PRIMITIVE(352,47,0);{:1114}{1141:}PRIMITIVE(1135,48,0);
PRIMITIVE(1136,48,1);{:1141}{1156:}PRIMITIVE(874,50,16);
PRIMITIVE(875,50,17);PRIMITIVE(876,50,18);PRIMITIVE(877,50,19);
PRIMITIVE(878,50,20);PRIMITIVE(879,50,21);PRIMITIVE(880,50,22);
PRIMITIVE(881,50,23);PRIMITIVE(883,50,26);PRIMITIVE(882,50,27);
PRIMITIVE(1137,51,0);PRIMITIVE(887,51,1);PRIMITIVE(888,51,2);{:1156}
{1169:}PRIMITIVE(869,53,0);PRIMITIVE(870,53,2);PRIMITIVE(871,53,4);
PRIMITIVE(872,53,6);{:1169}{1178:}PRIMITIVE(1155,52,0);
PRIMITIVE(1156,52,1);PRIMITIVE(1157,52,2);PRIMITIVE(1158,52,3);
PRIMITIVE(1159,52,4);PRIMITIVE(1160,52,5);{:1178}{1188:}
PRIMITIVE(884,49,30);PRIMITIVE(885,49,31);HASH[10517].RH:=885;
EQTB[10517]:=EQTB[CURVAL];{:1188}{1208:}PRIMITIVE(1180,93,1);
PRIMITIVE(1181,93,2);PRIMITIVE(1182,93,4);PRIMITIVE(1183,97,0);
PRIMITIVE(1184,97,1);PRIMITIVE(1185,97,2);PRIMITIVE(1186,97,3);{:1208}
{1219:}PRIMITIVE(1200,94,0);PRIMITIVE(1201,94,1);{:1219}{1222:}
PRIMITIVE(1202,95,0);PRIMITIVE(1203,95,1);PRIMITIVE(1204,95,2);
PRIMITIVE(1205,95,3);PRIMITIVE(1206,95,4);PRIMITIVE(1207,95,5);
PRIMITIVE(1208,95,6);{:1222}{1230:}PRIMITIVE(418,85,11888);
PRIMITIVE(422,85,12912);PRIMITIVE(419,85,12144);PRIMITIVE(420,85,12400);
PRIMITIVE(421,85,12656);PRIMITIVE(480,85,13489);PRIMITIVE(415,86,11840);
PRIMITIVE(416,86,11856);PRIMITIVE(417,86,11872);{:1230}{1250:}
PRIMITIVE(950,99,0);PRIMITIVE(962,99,1);{:1250}{1254:}
PRIMITIVE(1226,78,0);PRIMITIVE(1227,78,1);{:1254}{1262:}
PRIMITIVE(275,100,0);PRIMITIVE(276,100,1);PRIMITIVE(277,100,2);
PRIMITIVE(1236,100,3);{:1262}{1272:}PRIMITIVE(1237,60,1);
PRIMITIVE(1238,60,0);{:1272}{1277:}PRIMITIVE(1239,58,0);
PRIMITIVE(1240,58,1);{:1277}{1286:}PRIMITIVE(1246,57,12144);
PRIMITIVE(1247,57,12400);{:1286}{1291:}PRIMITIVE(1248,19,0);
PRIMITIVE(1249,19,1);PRIMITIVE(1250,19,2);PRIMITIVE(1251,19,3);{:1291}
{1344:}PRIMITIVE(1295,59,0);PRIMITIVE(603,59,1);WRITELOC:=CURVAL;
PRIMITIVE(1296,59,2);PRIMITIVE(1297,59,3);PRIMITIVE(1298,59,4);
PRIMITIVE(1299,59,5);{:1344};NONEWCONTROLSEQUENCE:=TRUE;END;{:1336}
{1338:}{PROCEDURE DEBUGHELP;LABEL 888,10;VAR K,L,M,N:INTEGER;
BEGIN WHILE TRUE DO BEGIN WAKEUPTERMINAL;PRINTNL(1294);
IF ODD(SELECTOR)THEN WRITELN(TERMOUT);READ(TERMIN,M);
IF M<0 THEN GOTO 10 ELSE IF M=0 THEN BEGIN GOTO 888;
888:M:=0;
['BREAKPOINT']
END ELSE BEGIN READ(TERMIN,N);CASE M OF[1339:]1:PRINTWORD(MEM[N]);
2:PRINTINT(MEM[N].HH.LH);3:PRINTINT(MEM[N].HH.RH);4:PRINTWORD(EQTB[N]);
5:PRINTWORD(FONTINFO[N]);6:PRINTWORD(SAVESTACK[N]);7:SHOWBOX(N);
8:BEGIN BREADTHMAX:=10000;DEPTHTHRESHOLD:=POOLSIZE-POOLPTR-10;
SHOWNODELIST(N);END;9:SHOWTOKENLIST(N,0,1000);10:SLOWPRINT(N);
11:CHECKMEM(N>0);12:SEARCHMEM(N);13:BEGIN READ(TERMIN,L);
PRINTCMDCHR(N,L);END;14:FOR K:=0 TO N DO PRINT(BUFFER[K]);
15:BEGIN FONTINSHORTDISPLAY:=0;SHORTDISPLAY(N);END;
16:PANICKING:=NOT PANICKING;[:1339]OTHERWISE PRINT(63)END;END;END;
10:END;}{:1338}{1601:}PROCEDURE lib$set_symbol ( %immed SYMBOL:DESCRPTR;
%immed VALUESTRING:DESCRPTR;TBLIND:INTEGER:= %immed 0);EXTERNAL;
PROCEDURE SYMBOLJOBNAME;VAR TMPDESCR:DESCRPTR;BEGIN TMPDESCR:=NIL;
IF JOBQUAL THEN BEGIN STRTODESCR(JOBNAME,TMPDESCR);
lib$set_symbol ( %stdescr LJOBNAME,TMPDESCR,2);END;END;{:1601}{1620:}
FUNCTION INITCLI(VAR TABLE:[ readonly ] unsigned ;
VERBNAME:[ readonly ]PACKED ARRAY[L1..U1:INTEGER]OF CHAR;
QUALNAME:[ readonly ]PACKED ARRAY[L2..U2:INTEGER]OF CHAR):INTEGER;
LABEL 10;VAR COMMANDLINE:PACKED ARRAY[1..256]OF CHAR;LEN:SIXTEENBITS;
STS:INTEGER;
FUNCTION CHECKCLI(UNIQUEDEFQUAL:[ readonly ]PACKED ARRAY[L1..U1:INTEGER]
OF CHAR):INTEGER;BEGIN establish( lib$sig_to_ret);
CHECKCLI:= cli$present(UNIQUEDEFQUAL);END;
BEGIN STS:= cli$get_value('$VERB',COMMANDLINE,LEN);
IF(ODD(STS)AND(LEN>0))THEN IF( substr(COMMANDLINE,1,LEN)=VERBNAME)THEN
IF(ODD(CHECKCLI(QUALNAME)))THEN BEGIN INITCLI:=1;GOTO 10;END;
lib$get_foreign(COMMANDLINE,,LEN);
COMMANDLINE:=VERBNAME+' '+ substr(COMMANDLINE,1,LEN);
INITCLI:= cli$dcl_parse(COMMANDLINE, iaddress(TABLE));10:END;{:1620}
{1621:}PROCEDURE GETCOMMANDLINE;
VAR QUALARGUMENT:PACKED ARRAY[1..256]OF CHAR;LEN:SIXTEENBITS;I:INTEGER;
J:0..BUFSIZE;BEGIN CMDLINEPRESENT:=ODD( cli$present('COMMAND_LINE'));
EDITQUAL:=ODD( cli$present('EDITOR'));
IF EDITQUAL THEN cli$get_value('EDITOR',EDITNAME,EDITLEN);
JOBQUAL:=ODD( cli$present('JOBNAME_SYMBOL'));
IF JOBQUAL THEN cli$get_value('JOBNAME_SYMBOL',LJOBNAME,LLENNAME);
CONTINUEQUAL:=ODD( cli$present('CONTINUE'));
BATCHQUAL:=ODD( cli$present('BATCH'));
DVIQUAL:=ODD( cli$present('OUTPUT'));
IF DVIQUAL THEN cli$get_value('OUTPUT',DVIFNAME,DVIFLEN);
LOGQUAL:=ODD( cli$present('LOG_FILE'));
IF LOGQUAL THEN cli$get_value('LOG_FILE',LOGFNAME,LOGFLEN);
DIAGQUAL:=ODD( cli$present('DIAGNOSTICS'));
IF DIAGQUAL THEN cli$get_value('DIAGNOSTICS',DIAGFNAME,DIAGFLEN);
FORMATQUAL:=ODD( cli$present('FORMAT'));
IF FORMATQUAL THEN BEGIN cli$get_value('FORMAT',QUALARGUMENT,LEN);
CURINPUT.LOCFIELD:=0;BUFFER[0]:=XORD['&'];J:=1;
FOR I:=1 TO LEN DO BEGIN BUFFER[J]:=XORD[QUALARGUMENT[I]];J:=J+1 END;
BUFFER[J]:=XORD[' '];IF FORMATIDENT<>0 THEN INITIALIZE;
IF NOT OPENFMTFILE THEN GOTO 9999;
IF NOT LOADFMTFILE THEN BEGIN WCLOSE(FMTFILE);GOTO 9999;END;
WCLOSE(FMTFILE);END;END;{:1621}{1651:}FUNCTION EDITFILE;
VAR EQUIVALENCE:PACKED ARRAY[1..FILENAMESIZE]OF CHAR;
EQUVLEN:SIGNEDHALFWORD;OLDSETTING:INTEGER;EDITSTATUS:EDITRESULT;
EDITCTR:INTEGER;EDITFOUND:INTEGER;{1657:}KKK:INTEGER;CMDFILE:STRNUMBER;
{:1657}{1660:}TECOCMD:[ volatile ]VARYING[FILENAMESIZE]OF CHAR;
ITEMLIST:[ volatile ]ARRAY[0..1]OF VMSITEMLIST;{:1660}{1663:}
NEXTCH:POOLPOINTER;HADSEMICOLON:BOOLEAN;{:1663}
BEGIN OLDSETTING:=SELECTOR;SELECTOR:=18;EDITFILE:=FALSE;
EDITSTATUS:=FAILED;EQUIVALENCE:=EDITNAME;EQUVLEN:=EDITLEN;
IF EDITQUAL THEN IF EQUIVALENCE[EQUVLEN]=':'THEN BEGIN EQUIVALENCE[
EQUVLEN]:=' ';EQUVLEN:=EQUVLEN-1;
EDITQUAL:=TRANSLATE(EQUIVALENCE,EQUVLEN);END;IF EDITQUAL THEN{1652:}
BEGIN PRINTNL(1433);{1653:}
FOR EDITCTR:=1 TO EQUVLEN DO IF EQUIVALENCE[EDITCTR]IN['a'..'z']THEN
EQUIVALENCE[EDITCTR]:=XCHR[XORD[EQUIVALENCE[EDITCTR]]-32]{:1653};{1654:}
EDITCTR:=1;EDITFOUND:=0;
WHILE(EDITCTR<=4)AND(EDITFOUND=0)DO BEGIN IF index(EDITOR[EDITCTR].
LOGICAL,EQUIVALENCE)=1 THEN EDITFOUND:=EDITCTR;EDITCTR:=EDITCTR+1 END;
{:1654};IF EDITFOUND<>0 THEN{1655:}
WITH EDITOR[EDITFOUND]DO BEGIN REWRITE(TEMPFILE);COPYERR:=SAVEIT;
PRINTNL(CMDTEXT);
IF STARTQUAL THEN WITH STACKITEM DO EDITLOCATE(LINE,LOCFIELD-STARTFIELD
+1);IF EDITFOUND=3 THEN{1656:}BEGIN NAMEOFFILE:='TEX_EDTINI';
DEFAULTNAME:='.EDT';
IF AOPENOUT(EDCMDFILE)THEN BEGIN CMDFILE:=MAKENAMESTRING;
EQUIVALENCE:='EDTINI';EQUVLEN:=6;
IF NOT TRANSLATE(EQUIVALENCE,EQUVLEN)THEN EQUVLEN:=6;COPYERR:=IGNOREIT;
SELECTOR:=22;PRINT(1434);PRINTLN;PRINT(1435);PRINTINT(LINE);
PRINTCHAR(59);WITH STACKITEM DO PRINTINT(LOCFIELD-STARTFIELD);
PRINT(1436);PRINTLN;PRINT(1437);PRINTLN;PRINT(1438);
FOR KKK:=1 TO EQUVLEN DO PRINTCHAR(XORD[EQUIVALENCE[KKK]]);
ACLOSE(EDCMDFILE);COPYERR:=SAVEIT;SELECTOR:=18;PRINT(1439);
PRINT(CMDFILE);PRINTCHAR(32);END END{:1656};IF EDITFOUND=4 THEN{1658:}
BEGIN NAMEOFFILE:='TEX_TECOINI';DEFAULTNAME:='.TEC';
IF AOPENOUT(EDCMDFILE)THEN BEGIN CMDFILE:=MAKENAMESTRING;
EQUIVALENCE:='TEC$INIT';EQUVLEN:=8;COPYERR:=IGNOREIT;SELECTOR:=22;
IF TRANSLATE(EQUIVALENCE,EQUVLEN)THEN BEGIN IF EQUIVALENCE[1]='$'THEN
BEGIN PRINT(1440);
FOR KKK:=2 TO EQUVLEN DO PRINTCHAR(XORD[EQUIVALENCE[KKK]]);
END ELSE FOR KKK:=1 TO EQUVLEN DO PRINTCHAR(XORD[EQUIVALENCE[KKK]]);
PRINTCHAR(27);PRINTLN;END;PRINT(1441);PRINTINT(LINE);PRINT(1442);
WITH STACKITEM DO PRINTINT(LOCFIELD-STARTFIELD);PRINT(1443);
PRINTCHAR(27);PRINTCHAR(27);PRINTLN;ACLOSE(EDCMDFILE);COPYERR:=SAVEIT;
SELECTOR:=18;PRINT(1439);PRINT(CMDFILE);PRINTCHAR(32);{1659:}
BEGIN TECOCMD:='$';KKK:=STRSTART[CMDFILE];
WHILE KKK<STRSTART[CMDFILE+1]DO BEGIN TECOCMD:=TECOCMD+XCHR[STRPOOL[KKK]
];KKK:=KKK+1 END;WITH ITEMLIST[0]DO BEGIN BUFFERLENGTH:=TECOCMD.length;
ITEMCODE:= lnm$_string ;BUFFERADDR:= iaddress(TECOCMD.body);
RETLENADDR:=0;END;ITEMLIST[1].NEXTITEM:=0;
$crelnm(,'LNM$PROCESS_TABLE','TEC$INIT',,ITEMLIST);END{:1659}
END END{:1658};PRINT(STACKITEM.NAMEFIELD);COPYERR:=IGNOREIT;
SELECTOR:=OLDSETTING;
IF EDTLIKE THEN BEGIN EDITSTATUS:=EDIT(STACKITEM.NAMEFIELD,CMDFILE,
EDITOR[EDITFOUND]);{1661:}
BEGIN IF EDITFOUND=4 THEN BEGIN IF EQUVLEN>0 THEN BEGIN WITH ITEMLIST[0]
DO BEGIN BUFFERLENGTH:=EQUVLEN;ITEMCODE:= lnm$_string ;
BUFFERADDR:= iaddress(EQUIVALENCE);RETLENADDR:=0;END;
ITEMLIST[1].NEXTITEM:=0;
$crelnm(,'LNM$PROCESS_TABLE','TEC$INIT',,ITEMLIST);
END ELSE $dellnm('LNM$PROCESS_TABLE','TEC$INIT');END;
delete_file(LASTNAME)END{:1661}
END ELSE EDITSTATUS:=EDIT(0,0,EDITOR[EDITFOUND]);END{:1655}ELSE{1664:}
BEGIN REWRITE(TEMPFILE);COPYERR:=SAVEIT;PRINTLN;
FOR KKK:=1 TO EQUVLEN DO PRINT(XORD[EQUIVALENCE[KKK]]);PRINT(32);
PRINT(STACKITEM.NAMEFIELD);PRINT(32);PRINTINT(LINE);PRINT(32);
WITH STACKITEM DO PRINTINT(LOCFIELD-STARTFIELD+1);
EDITSTATUS:=EDIT(0,0,EMPTYEDITOR);END{:1664};COPYERR:=IGNOREIT;
SELECTOR:=OLDSETTING;END{:1652};
IF EDITSTATUS<>FAILED THEN BEGIN EDITFILE:=TRUE;
IF EDITSTATUS=EDITED THEN{1662:}BEGIN HADSEMICOLON:=FALSE;
FOR NEXTCH:=STRSTART[STACKITEM.NAMEFIELD]TO STRSTART[STACKITEM.NAMEFIELD
+1]-1 DO BEGIN IF STRPOOL[NEXTCH]=59 THEN HADSEMICOLON:=TRUE;
IF HADSEMICOLON THEN STRPOOL[NEXTCH]:=32 END;END{:1662}END;
SELECTOR:=OLDSETTING;END;{:1651}{:1330}{1332:}BEGIN HISTORY:=3;
BEGIN OPEN(TERMOUT, 'SYS$OUTPUT' , carriage_control := none );
LINELIMIT(TERMOUT,MAXINT);REWRITE(TERMOUT);OUTFAB:= PAS$FAB(TERMOUT);
OUTRAB:= PAS$RAB(TERMOUT);END;
IF NOT ODD(INITCLI(ETEX_CLI,'ETEX','TEXFORMATS'))THEN BEGIN WRITELN(
TERMOUT,'Ouch---access to DCL command line interface has failed!',CHR(13
),CHR(10));GOTO 9999;END;INITFLAG:=ODD( cli$present('INIT'));{14:}
BAD:=0;IF(HALFERRORLINE<30)OR(HALFERRORLINE>ERRORLINE-15)THEN BAD:=1;
IF MAXPRINTLINE<60 THEN BAD:=2;IF DVIBUFSIZE MOD 8<>0 THEN BAD:=3;
IF 1100>327144 THEN BAD:=4;IF 8501>10000 THEN BAD:=5;
IF MAXINOPEN>=128 THEN BAD:=6;IF 327144<267 THEN BAD:=7;{:14}{111:}
IF(MEMMIN<>0)OR(MEMMAX<>327144)THEN BAD:=10;
IF(MEMMIN>0)OR(MEMMAX<327144)THEN BAD:=10;
IF(0>0)OR(511<127)THEN BAD:=11;IF(0>0)OR(327145<32767)THEN BAD:=12;
IF(0<0)OR(511>327145)THEN BAD:=13;
IF(MEMMIN<0)OR(MEMMAX>=327145)OR(-0-MEMMIN>327146)THEN BAD:=14;
IF(0<0)OR(FONTMAX>511)THEN BAD:=15;IF FONTMAX>256 THEN BAD:=16;
IF(SAVESIZE>327145)OR(MAXSTRINGS>327145)THEN BAD:=17;
IF BUFSIZE>327145 THEN BAD:=18;IF 511<255 THEN BAD:=19;{:111}{290:}
IF 14876>327145 THEN BAD:=21;{:290}{597:}
IF DVIBUFSIZE<>2*VAXBLOCKLENGTH THEN BAD:=223;{:597}{1249:}
IF 2*327144+1<327144-MEMMIN THEN BAD:=41;{:1249}
IF BAD>0 THEN BEGIN WRITELN(TERMOUT,
'Ouch---my internal constants have been clobbered!','---case ',BAD:1,CHR
(13),CHR(10));GOTO 9999;END;INITIALIZE;
EIGHTQUAL:=ODD( cli$present('EIGHT_BIT'));
IF INITFLAG THEN BEGIN IF NOT GETSTRINGSSTARTED THEN GOTO 9999;INITPRIM;
INITSTRPTR:=STRPTR;INITPOOLPTR:=POOLPTR;FIXDATEANDTIME;END;1:{1617:}
DIAGNAME:=0;GETCOMMANDLINE;IF BATCHQUAL THEN INTERACTION:=0;
COPYERR:=IGNOREIT{:1617};{55:}SELECTOR:=17;TALLY:=0;TERMOFFSET:=0;
FILEOFFSET:=0;{:55}{61:}
WRITE(TERMOUT,'This is e-TeX, Version ','3.14159-2.0',
';fMar06 [PD VMS 3.6f]');
IF FORMATIDENT=0 THEN WRITELN(TERMOUT,' (no format preloaded)',CHR(13),
CHR(10))ELSE BEGIN SLOWPRINT(FORMATIDENT);PRINTLN;END;
IF ODD(SELECTOR)THEN WRITELN(TERMOUT);{:61}{528:}JOBNAME:=0;
NAMEINPROGRESS:=FALSE;LOGOPENED:=FALSE;{:528}{533:}OUTPUTFILENAME:=0;
{:533};{1337:}BEGIN{331:}BEGIN INPUTPTR:=0;MAXINSTACK:=0;INOPEN:=0;
OPENPARENS:=0;MAXBUFSTACK:=0;GRPSTACK[0]:=0;IFSTACK[0]:=0;PARAMPTR:=0;
MAXPARAMSTACK:=0;FIRST:=BUFSIZE;REPEAT BUFFER[FIRST]:=0;FIRST:=FIRST-1;
UNTIL FIRST=0;SCANNERSTATUS:=0;WARNINGINDEX:=0;FIRST:=1;
CURINPUT.STATEFIELD:=33;CURINPUT.STARTFIELD:=1;CURINPUT.INDEXFIELD:=0;
LINE:=0;CURINPUT.NAMEFIELD:=0;FORCEEOF:=FALSE;ALIGNSTATE:=1000000;
IF NOT INITTERMINAL THEN GOTO 9999;CURINPUT.LIMITFIELD:=LAST;
FIRST:=LAST+1;END{:331};{1379:}
IF(BUFFER[CURINPUT.LOCFIELD]=42)AND(FORMATIDENT=1265)THEN BEGIN
NONEWCONTROLSEQUENCE:=FALSE;{1380:}PRIMITIVE(1311,70,3);
PRIMITIVE(1312,70,6);PRIMITIVE(1313,108,6);{:1380}{1391:}
PRIMITIVE(1315,72,11325);PRIMITIVE(1316,73,13223);
PRIMITIVE(1317,73,13224);PRIMITIVE(1318,73,13225);
PRIMITIVE(1319,73,13226);PRIMITIVE(1320,73,13227);
PRIMITIVE(1321,73,13228);PRIMITIVE(1322,73,13229);
PRIMITIVE(1323,73,13230);PRIMITIVE(1324,73,13231);{:1391}{1397:}
PRIMITIVE(1338,70,7);PRIMITIVE(1339,70,8);{:1397}{1400:}
PRIMITIVE(1340,70,9);PRIMITIVE(1341,70,10);PRIMITIVE(1342,70,11);{:1400}
{1403:}PRIMITIVE(1343,70,14);PRIMITIVE(1344,70,15);
PRIMITIVE(1345,70,16);PRIMITIVE(1346,70,17);{:1403}{1406:}
PRIMITIVE(1347,70,18);PRIMITIVE(1348,70,19);PRIMITIVE(1349,70,20);
{:1406}{1409:}PRIMITIVE(1350,19,4);{:1409}{1418:}PRIMITIVE(1352,19,5);
{:1418}{1420:}PRIMITIVE(1353,109,1);PRIMITIVE(1354,109,5);{:1420}{1423:}
PRIMITIVE(1355,19,6);{:1423}{1426:}PRIMITIVE(1359,82,2);{:1426}{1431:}
PRIMITIVE(886,49,1);{:1431}{1435:}PRIMITIVE(1363,73,13232);
PRIMITIVE(1364,33,6);PRIMITIVE(1365,33,7);PRIMITIVE(1366,33,10);
PRIMITIVE(1367,33,11);{:1435}{1480:}PRIMITIVE(1376,104,2);{:1480}{1492:}
PRIMITIVE(1378,96,1);{:1492}{1495:}PRIMITIVE(782,102,1);
PRIMITIVE(1379,105,17);PRIMITIVE(1380,105,18);PRIMITIVE(1381,105,19);
{:1495}{1503:}PRIMITIVE(1259,93,8);{:1503}{1511:}PRIMITIVE(1387,70,25);
PRIMITIVE(1388,70,26);PRIMITIVE(1389,70,27);PRIMITIVE(1390,70,28);
{:1511}{1534:}PRIMITIVE(1394,70,12);PRIMITIVE(1395,70,13);
PRIMITIVE(1396,70,21);PRIMITIVE(1397,70,22);{:1534}{1538:}
PRIMITIVE(1398,70,23);PRIMITIVE(1399,70,24);{:1538}{1542:}
PRIMITIVE(1400,18,5);PRIMITIVE(1401,110,5);PRIMITIVE(1402,110,6);
PRIMITIVE(1403,110,7);PRIMITIVE(1404,110,8);PRIMITIVE(1405,110,9);
{:1542}{1594:}PRIMITIVE(1409,24,2);PRIMITIVE(1410,24,3);{:1594}{1597:}
PRIMITIVE(1411,84,11313);PRIMITIVE(1412,84,11314);
PRIMITIVE(1413,84,11315);PRIMITIVE(1414,84,11316);{:1597}
CURINPUT.LOCFIELD:=CURINPUT.LOCFIELD+1;ETEXMODE:=1;{1546:}
MAXREGNUM:=32767;MAXREGHELPLINE:=1406;{:1546}END;
IF NOT NONEWCONTROLSEQUENCE THEN NONEWCONTROLSEQUENCE:=TRUE ELSE{:1379}
IF(FORMATIDENT=0)OR(BUFFER[CURINPUT.LOCFIELD]=38)THEN BEGIN IF
FORMATIDENT<>0 THEN INITIALIZE;IF NOT OPENFMTFILE THEN GOTO 9999;
IF NOT LOADFMTFILE THEN BEGIN WCLOSE(FMTFILE);GOTO 9999;END;
WCLOSE(FMTFILE);
WHILE(CURINPUT.LOCFIELD<CURINPUT.LIMITFIELD)AND(BUFFER[CURINPUT.LOCFIELD
]=32)DO CURINPUT.LOCFIELD:=CURINPUT.LOCFIELD+1;END;
IF(ETEXMODE=1)THEN WRITELN(TERMOUT,'entering extended mode',CHR(13),CHR(
10));
IF(EQTB[13216].INT<0)OR(EQTB[13216].INT>255)THEN CURINPUT.LIMITFIELD:=
CURINPUT.LIMITFIELD-1 ELSE BUFFER[CURINPUT.LIMITFIELD]:=EQTB[13216].INT;
FIXDATEANDTIME;{765:}MAGICOFFSET:=STRSTART[901]-9*16{:765};{75:}
IF INTERACTION=0 THEN SELECTOR:=16 ELSE SELECTOR:=17{:75};{514:}
cli$get_value('TEXINPUTS',INPNAME,INPLEN);
BEGIN IF POOLPTR+INPLEN>POOLSIZE THEN OVERFLOW(258,POOLSIZE-INITPOOLPTR)
;END;FOR I:=1 TO INPLEN DO BEGIN STRPOOL[POOLPTR]:=XORD[INPNAME[I]];
POOLPTR:=POOLPTR+1;END;TEXAREA:=MAKESTRING;
cli$get_value('TEXFONTS',FONTSNAME,FONTSLEN);
BEGIN IF POOLPTR+FONTSLEN>POOLSIZE THEN OVERFLOW(258,POOLSIZE-
INITPOOLPTR);END;
FOR I:=1 TO FONTSLEN DO BEGIN STRPOOL[POOLPTR]:=XORD[FONTSNAME[I]];
POOLPTR:=POOLPTR+1;END;TEXFONTAREA:=MAKESTRING{:514};
IF(CURINPUT.LOCFIELD<CURINPUT.LIMITFIELD)AND(EQTB[11888+BUFFER[CURINPUT.
LOCFIELD]].HH.RH<>0)THEN STARTINPUT;END{:1337};HISTORY:=0;MAINCONTROL;
FINALCLEANUP;9998:CLOSEFILESANDTERMINATE;
9999:IF LOGOPENED THEN BEGIN IF LOGQUAL THEN WRITELN(LOGFILE);
ACLOSE(LOGFILE);SELECTOR:=SELECTOR-2;
IF SELECTOR=17 THEN BEGIN IF LOGQUAL THEN BEGIN PRINTNL(1283);
SLOWPRINT(LOGNAME);PRINTCHAR(46);END ELSE PRINTNL(1284);END;END;{1600:}
SYMBOLJOBNAME;CASE HISTORY OF 0:$exit( sts$k_success );
1:$exit( sts$k_warning+sts$m_inhib_msg );
2:$exit( sts$k_error+sts$m_inhib_msg );
3:$exit( sts$k_severe+sts$m_inhib_msg )END{:1600};END.{:1332}
