-- file: TexOpsImpl.mesa -- Pascal-to-Mesa translator output, translated at September 27, 1985 10:21:37 am PDT DIRECTORY PascalBasic, TexTypes, TexInteraction, TexMemory, TexSymbols, TexScan, TexOps, TexRest, TexSysdepInline; TexOpsImpl: PROGRAM IMPORTS PascalBasic, TexTypes, TexInteraction, TexMemory, TexSymbols, TexScan, TexOps, TexRest, TexSysdepInline EXPORTS TexOps = PUBLIC BEGIN OPEN PascalBasic, TexTypes, TexInteraction, TexMemory, TexSymbols, TexScan, TexOps, TexRest, TexSysdepInline; --:532----539: TfmFile: ByteFile; --:539----549: FontInfo: LONG POINTER TO ARRAY PascalInteger[0..25000] OF MemoryWord ← PascalStaticZone.NEW[ARRAY PascalInteger[0..25000] OF MemoryWord]; FmemPtr: PascalInteger[0..FontMemSize]; FontPtr: InternalFontNumber; FontCheck: LONG POINTER TO ARRAY InternalFontNumber OF FourQuarters ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF FourQuarters]; FontSize: LONG POINTER TO ARRAY InternalFontNumber OF Scaled ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF Scaled]; FontDsize: LONG POINTER TO ARRAY InternalFontNumber OF Scaled ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF Scaled]; FontParams: LONG POINTER TO ARRAY InternalFontNumber OF Halfword ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF Halfword]; FontName: LONG POINTER TO ARRAY InternalFontNumber OF StrNumber ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF StrNumber]; FontArea: LONG POINTER TO ARRAY InternalFontNumber OF StrNumber ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF StrNumber]; FontBc: LONG POINTER TO ARRAY InternalFontNumber OF EightBits ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF EightBits]; FontEc: LONG POINTER TO ARRAY InternalFontNumber OF EightBits ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF EightBits]; FontGlue: LONG POINTER TO ARRAY InternalFontNumber OF Halfword ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF Halfword]; FontUsed: LONG POINTER TO ARRAY InternalFontNumber OF PascalBoolean ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalBoolean]; FontFamily: LONG POINTER TO ARRAY InternalFontNumber OF StrNumber ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF StrNumber]; FontFace: LONG POINTER TO ARRAY InternalFontNumber OF EightBits ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF EightBits]; FontPypeCode: LONG POINTER TO ARRAY InternalFontNumber OF CedarNat ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF CedarNat]; --:549----550: CharBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; WidthBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; HeightBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; DepthBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; ItalicBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; LigKernBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; KernBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; ExtenBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; ParamBase: LONG POINTER TO ARRAY InternalFontNumber OF PascalInteger ← PascalStaticZone.NEW[ARRAY InternalFontNumber OF PascalInteger]; --:550----555: NullCharacter: FourQuarters; CurS: PascalInteger; --:616----646: TotalStretch: LONG POINTER TO ARRAY GlueOrd OF Scaled ← PascalStaticZone.NEW[ARRAY GlueOrd OF Scaled]; TotalShrink: LONG POINTER TO ARRAY GlueOrd OF Scaled ← PascalStaticZone.NEW[ARRAY GlueOrd OF Scaled]; --:661----684: EmptyField: TwoHalves; NullDelimiter: FourQuarters; --:684----719: CurMlist: Halfword; CurStyle: SmallNumber; CurSize: SmallNumber; CurMu: Scaled; MlistPenalties: PascalBoolean; --:719----724: CurF: InternalFontNumber; CurC: Quarterword; CurI: FourQuarters; --:724 --764:-- MagicOffset: PascalInteger; --:764----770:-- CurAlign: Halfword; CurSpan: Halfword; AlignPtr: Halfword; --:770----814:-- JustBox: Halfword; PrintSize: PROCEDURE[S: PascalInteger] = BEGIN IF S=0 THEN PrintEsc[280] ELSE IF S=16 THEN PrintEsc[281] ELSE PrintEsc[282]; END;--:699----1355: PrintFamAndChar: PROCEDURE[P: Halfword] = BEGIN PrintEsc[332]; PrintInt[Mem[P]↑.Hh.B0];PrintChar[32];PrintAscii[Mem[P]↑.Hh.B1]; END; PrintDelimiter: PROCEDURE[P: Halfword] = BEGIN A:PascalInteger; 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: PrintSubsidiaryData: PROCEDURE[P: Halfword, C: AsciiCode] = BEGIN IF( INT[PoolPtr]-StrStart↑[StrPtr])>=DepthThreshold THEN BEGIN IF Mem [P]↑.Hh.Rh#0 THEN Print[186]; END ELSE BEGIN BEGIN StrPool↑[PoolPtr]←C; PoolPtr←PoolPtr+1; END;TempPtr←P; SELECT Mem[P]↑.Hh.Rh FROM 1 =>BEGIN PrintLn[];PrintCurrentString[]; PrintFamAndChar[P]; END;2 =>ShowInfo[]; 3 =>IF Mem[P]↑.Hh.Lh=0 THEN BEGIN PrintLn[];PrintCurrentString[];Print[718]; END ELSE ShowInfo[]; ENDCASE => NULL;PoolPtr← INT[PoolPtr]-1; END; END;--:692----694: PrintStyle: PROCEDURE[C: PascalInteger] = BEGIN SELECT PascalDIVPower2[C ,1]FROM 0 =>PrintEsc[719]; 1 =>PrintEsc[720];2 =>PrintEsc[721];3 =>PrintEsc[722]; ENDCASE =>Print[723]; END;--:694----225:-- ScanRuleSpec: PROCEDURE RETURNS[ScanRuleSpecResult: Halfword] = BEGIN Q:Halfword; Q←NewRule[]; IF CurCmd=35 THEN Mem[Q+1]↑.Int←26214 ELSE BEGIN Mem[Q+3]↑.Int←26214; Mem[Q+2]↑.Int←0; END; DO {--Label21:--IF ScanKeyword[592] THEN BEGIN ScanDimen[FALSE,FALSE,FALSE]; Mem[Q+1]↑.Int←CurVal; GOTO Label21; END; IF ScanKeyword[593] THEN BEGIN ScanDimen[FALSE,FALSE,FALSE]; Mem[Q+3]↑.Int←CurVal; GOTO Label21; END; IF ScanKeyword[594] THEN BEGIN ScanDimen[FALSE,FALSE,FALSE]; Mem[Q+2]↑.Int←CurVal; GOTO Label21; END;ScanRuleSpecResult←Q;EXIT; EXITS Label21 => NULL} ENDLOOP; END;--:463----464: ScanSpec: PROCEDURE = BEGIN {IF ScanKeyword[700] THEN SaveStack↑[SavePtr+0].Int←0 ELSE IF ScanKeyword[701] THEN SaveStack↑[SavePtr+0].Int←1 ELSE BEGIN SaveStack↑[SavePtr+0].Int←1;SaveStack↑[SavePtr+1].Int←0; GOTO Label40; END; ScanDimen[FALSE,FALSE,FALSE];SaveStack↑[SavePtr+1].Int←CurVal; EXITS Label40 => NULL};SavePtr←SavePtr+2;ScanLeftBrace[]; END;--:645----649: Hpack: PROCEDURE[P: Halfword,W: Scaled,M: SmallNumber] RETURNS[HpackResult: Halfword] = BEGIN R:Halfword;Q:Halfword;H, D, X:Scaled;S:Scaled; G:Halfword;O:GlueOrd;F:InternalFontNumber;I:FourQuarters; Hd:EightBits;B:PascalInteger; 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--;WHILE P#0 DO--651: BEGIN DO {--Label21:--WHILE( INT[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]+PascalDIVPower2[(Hd),4]].Int;IF S>H THEN H←S; S←FontInfo↑[ DepthBase↑[F]+PascalMODPower2Mask[(Hd),15]].Int;IF S>D THEN D←S; P←Mem[P]↑.Hh.Rh; END--:654-- ENDLOOP ; IF P#0 THEN BEGIN SELECT Mem[P]↑.Hh.B0 FROM 0,1,2,13 =>--653: BEGIN X←X+Mem[P+1]↑.Int; IF INT[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 ENDLOOP ; 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 ENDLOOP ; 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-- NULL;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 INT[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,9 =>X←X+Mem[P+1]↑.Int;6 =>--652:--BEGIN Mem[64988]↑←Mem[P+1]↑; Mem[64988]↑.Hh.Rh←Mem[P]↑.Hh.Rh;P←64988; GOTO Label21; END--:652--; ENDCASE => NULL; P←Mem[P]↑.Hh.Rh; END;EXIT; EXITS Label21 => NULL} ENDLOOP; END--:651-- ENDLOOP ; 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 Label10; 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←PascalFLOAT[X]/PascalFLOAT[TotalStretch↑[O]] ELSE BEGIN Mem[R+5]↑.Hh.B0←0;Mem[R+6]↑.Gr←0.0; END; IF(Eqtb↑[4793].Int<10000)AND (O=0)AND (Mem[R+5]↑.Hh.Rh#0) THEN--660: BEGIN B←Badness[X,TotalStretch↑[0]]; IF B>Eqtb↑[4793].Int THEN BEGIN PrintLn[]; IF B>100 THEN PrintNl[702] ELSE PrintNl[703];Print[704];PrintInt[B]; GOTO Label50; END; END--:660--; GOTO Label10; 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←PascalFLOAT[(-X)]/PascalFLOAT[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 Mem[R+6]↑. Gr←1.0;--666: IF(-X-TotalShrink↑[0]>Eqtb↑[5209].Int)OR (Eqtb↑[4793].Int<100) THEN BEGIN IF (Eqtb↑[5217].Int>0)AND (-X-TotalShrink↑[0]>Eqtb↑[5209].Int) THEN BEGIN WHILE Mem[Q]↑.Hh.Rh#0 DO Q←Mem[Q]↑.Hh.Rh ENDLOOP ;Mem[Q]↑.Hh.Rh←NewRule[]; Mem[Mem[Q]↑.Hh.Rh+1]↑.Int←Eqtb↑[5217].Int; END;PrintLn[];PrintNl[710]; PrintScaled[-X-TotalShrink↑[0]];Print[711]; GOTO Label50; END--:666--; END ELSE IF(Eqtb↑[4793].Int<100)AND (O=0)AND (Mem[R+5]↑.Hh.Rh#0) THEN--667: BEGIN B←Badness[-X,TotalShrink↑[0]]; IF B>Eqtb↑[4793].Int THEN BEGIN PrintLn[];PrintNl[712];PrintInt[B]; GOTO Label50; END; END--:667--; GOTO Label10; END--:664----:657--;EXITS Label50 => NULL};--663: IF OutputActive THEN Print[705] ELSE BEGIN IF PackBeginLine#0 THEN BEGIN IF PackBeginLine>0 THEN Print[706] ELSE Print[707]; PrintInt[ABS[PackBeginLine]];Print[708]; END ELSE Print[709]; PrintInt[Line]; END;PrintLn[];FontInShortDisplay←0; ShortDisplay[Mem[R+5]↑.Hh.Rh];PrintLn[];BeginDiagnostic[];ShowBox[R]; EndDiagnostic[TRUE]--:663--;EXITS Label10 => NULL};HpackResult←R; END;--:649----668: Vpackage: PROCEDURE[P: Halfword,H: Scaled,M: SmallNumber,L: Scaled] RETURNS[VpackageResult: Halfword] = BEGIN R:Halfword;W, D, X:Scaled;S:Scaled;G:Halfword;O:GlueOrd; B:PascalInteger; 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( INT[P]>=HiMemMin) THEN Confusion[713] ELSE SELECT Mem[P]↑.Hh.B0 FROM 0,1, 2,13 =>--670:--BEGIN X←X+D+Mem[P+3]↑.Int;D←Mem[P+2]↑.Int; IF INT[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-- NULL; 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 INT[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; ENDCASE => NULL;P←Mem[P]↑.Hh.Rh; END--:669-- ENDLOOP ;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 Label10; 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←PascalFLOAT[X]/PascalFLOAT[TotalStretch↑[O]] ELSE BEGIN Mem[R+5]↑.Hh.B0←0;Mem[R+6]↑.Gr←0.0; END; IF(Eqtb↑[4794].Int<10000)AND (O=0)AND (Mem[R+5]↑.Hh.Rh#0) THEN--674: BEGIN B←Badness[X,TotalStretch↑[0]]; IF B>Eqtb↑[4794].Int THEN BEGIN PrintLn[]; IF B>100 THEN PrintNl[702] ELSE PrintNl[703];Print[714];PrintInt[B]; GOTO Label50; END; END--:674--; GOTO Label10; 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←PascalFLOAT[(-X)]/PascalFLOAT[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 Mem[R+6]↑. Gr←1.0;--677: IF(-X-TotalShrink↑[0]>Eqtb↑[5210].Int)OR (Eqtb↑[4794].Int<100) THEN BEGIN PrintLn[];PrintNl[715];PrintScaled[-X-TotalShrink↑[0]];Print[716]; GOTO Label50; END--:677--; END ELSE IF(Eqtb↑[4794].Int<100)AND (O=0)AND (Mem[R+5]↑.Hh.Rh#0) THEN--678: BEGIN B←Badness[-X,TotalShrink↑[0]]; IF B>Eqtb↑[4794].Int THEN BEGIN PrintLn[];PrintNl[717];PrintInt[B]; GOTO Label50; END; END--:678--; GOTO Label10; END--:676----:672--;EXITS Label50 => NULL};--675: IF OutputActive THEN Print[705] ELSE BEGIN IF PackBeginLine#0 THEN BEGIN Print[707];PrintInt[ABS[PackBeginLine]];Print[708]; END ELSE Print[709];PrintInt[Line];PrintLn[]; END;BeginDiagnostic[]; ShowBox[R];EndDiagnostic[TRUE]--:675--;EXITS Label10 => NULL};VpackageResult←R; END;--:668----679: AppendToVlist: PROCEDURE[B: Halfword] = BEGIN D:Scaled;P:Halfword; IF CurList.AuxField>-65536000 THEN BEGIN D←Mem[Eqtb↑[3027].Hh.Rh +1]↑.Int-CurList.AuxField-Mem[B+3]↑.Int; IF D<Eqtb↑[5203].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←Mem[B+2]↑.Int; END;--:679----686: NewNoad: PROCEDURE RETURNS[NewNoadResult: Halfword] = BEGIN P:Halfword; 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;NewNoadResult←P; END;--:686 --688:-- NewStyle: PROCEDURE[S: SmallNumber] RETURNS[NewStyleResult: Halfword] = BEGIN P:Halfword; P←GetNode[3];Mem[P]↑.Hh.B0←14;Mem[P]↑.Hh.B1←S;Mem[P+1]↑.Int←0; Mem[P+2]↑.Int←0;NewStyleResult←P; END;--:688----689: NewChoice: PROCEDURE RETURNS[NewChoiceResult: Halfword] = BEGIN P:Halfword; 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;NewChoiceResult←P; END;--:689----693: ShowInfo: PROCEDURE = BEGIN ShowNodeList[Mem[TempPtr]↑.Hh.Lh]; END;--:693 CharBox: PROCEDURE[F: InternalFontNumber,C: Quarterword] RETURNS[CharBoxResult: Halfword] = BEGIN Q:FourQuarters;Hd:EightBits;B, P:Halfword; Q←FontInfo↑[CharBase↑[F]+C].Qqqq;Hd←Q.B1;B←NewNullBox[]; Mem[B+1]↑.Int←FontInfo↑[WidthBase↑[F]+Q.B0].Int+FontInfo↑[ ItalicBase↑[F] +PascalDIVPower2[(Q.B2),2]].Int; Mem[B+3]↑.Int←FontInfo↑[ HeightBase↑[F]+PascalDIVPower2[(Hd),4]].Int; Mem[B+2]↑.Int←FontInfo↑[ DepthBase↑[F]+PascalMODPower2Mask[(Hd),15]].Int;P←GetAvail[]; Mem[P]↑.Hh.B1←C;Mem[P]↑.Hh.B0←F;Mem[B+5]↑.Hh.Rh←P;CharBoxResult←B; END;--:709 VarDelimiter: PROCEDURE[D: Halfword,S: SmallNumber,V: Scaled] RETURNS[VarDelimiterResult: Halfword] = BEGIN B:Halfword;F, G:InternalFontNumber;C, X, Y:Quarterword; M, N:PascalInteger;U:Scaled;W:Scaled;Q:FourQuarters;Hd:EightBits; R:FourQuarters;Z:SmallNumber;LargeAttempt:PascalBoolean; 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; DO Z←Z-16;G←Eqtb↑[4079+Z].Hh.Rh;IF G#0 THEN--708:--BEGIN Y←X; DO {--Label22:--IF( INT[Y]>=FontBc↑[G])AND ( INT[Y]<=FontEc↑[G]) THEN BEGIN Q←FontInfo↑[CharBase↑ [G]+Y].Qqqq;IF( INT[Q.B0]>0) THEN BEGIN IF( PascalMODPower2Mask[(Q.B2),3])=3 THEN BEGIN F←G;C←Y; GOTO Label40; END;Hd←Q.B1; U←FontInfo↑[ HeightBase↑[G]+PascalDIVPower2[(Hd),4]].Int+FontInfo↑[ DepthBase↑[G]+PascalMODPower2Mask[(Hd) ,15]].Int;IF U>W THEN BEGIN F←G;C←Y;W←U;IF U>=V THEN GOTO Label40; END; IF( PascalMODPower2Mask[(Q.B2),3])=2 THEN BEGIN Y←Q.B3; GOTO Label22; END; END; END;EXIT; EXITS Label22 => NULL} ENDLOOP; END--:708--; IF INT[Z]<16 THEN EXIT; ENDLOOP; END--:707--;IF LargeAttempt THEN GOTO Label40;LargeAttempt←TRUE; Z←Mem[D]↑.Qqqq.B2;X←Mem[D]↑.Qqqq.B3; END ENDLOOP ;EXITS Label40 => NULL};IF F#0 THEN--710: IF( PascalMODPower2Mask[(Q.B2),3])=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] +PascalDIVPower2[(Q.B2),2]].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-- ENDLOOP ;C←R.B2;IF C#0 THEN StackIntoBox[B,F,C];C←R.B3; FOR i:INT IN [ INT[1 ].. INT[N ]] DO M ← i; StackIntoBox[B,F,C] ENDLOOP;C←R.B1; IF C#0 THEN BEGIN StackIntoBox[B,F,C];C←R.B3; FOR i:INT IN [ INT[1 ].. INT[N ]] DO M ← i; StackIntoBox[B,F,C] ENDLOOP; 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↑[5212].Int; END; Mem[B+4]↑.Int←Half[Mem[B+3]↑.Int-Mem[B+2]↑.Int]-FontInfo↑[22+ParamBase↑ [Eqtb↑[4081+S].Hh.Rh]].Int;VarDelimiterResult←B; END;--:706----715: END.