36400 #include "rundecs.h" 36410 (* COPYRIGHT 1983 C.H.LINDSEY, UNIVERSITY OF MANCHESTER *) 36420 (**) 36430 (**) 36440 FUNCTION CRSTRUCT(TEMPLATE: DPOINT): OBJECTP; EXTERN; 36450 (**) 36460 (**) 36470 FUNCTION HEAPSTR(TEMPLATE: DPOINT): OBJECTP; 36480 (*PLEAPGEN+1*) 36490 VAR NEWREF: OBJECTP; 36500 BEGIN 36510 IF ORD(TEMPLATE)=SZINT THEN 36520 BEGIN 36530 ENEW(NEWREF, REF1SIZE); 36540 WITH NEWREF^ DO BEGIN 36550 (*-02() FIRSTWORD := SORTSHIFT * ORD(REF1); ()-02*) 36560 (*+02() PCOUNT:=0; SORT:=REF1; ()+02*) 36570 (*+01() SECONDWORD := 0; ()+01*) 36580 ANCESTOR := NEWREF; 36590 PVALUE := HIGHPCOUNT; 36600 OFFSET := REF1SIZE-SZINT; 36610 VALUE := INTUNDEF 36620 END 36630 END 36640 (*-01() 36650 ELSE IF ORD(TEMPLATE)=SZLONG THEN 36660 BEGIN 36670 ENEW(NEWREF, REF2SIZE); 36680 WITH NEWREF^ DO BEGIN 36690 (*-02() FIRSTWORD := SORTSHIFT * ORD(REF2); ()-02*) 36700 (*+02() PCOUNT:=0; SORT:=REF2; ()+02*) 36710 ANCESTOR := NEWREF; 36720 PVALUE := HIGHPCOUNT; 36730 OFFSET := REF2SIZE-SZINT; 36740 LONGVALUE := LONGUNDEF 36750 END 36760 END 36770 ()-01*) 36780 ELSE 36790 BEGIN 36800 ENEW(NEWREF, REFNSIZE); 36810 WITH NEWREF^ DO 36820 BEGIN 36830 (*-02() FIRSTWORD := SORTSHIFT * ORD(REFN); ()-02*) 36840 (*+02() PCOUNT:=0; SORT:=REFN; ()+02*) 36850 (*+01() SECONDWORD := 0; ()+01*) 36860 IF ORD(TEMPLATE)=0 THEN PVALUE := UNDEFIN 36870 ELSE 36880 BEGIN 36890 PVALUE := CRSTRUCT(TEMPLATE); 36900 FPINC(PVALUE^); 36910 ANCESTOR := NEWREF; 36920 OFFSET := STRUCTCONST; 36930 END; 36940 END 36950 END; 36960 NEWREF^.OSCOPE := 3; 36970 HEAPSTR := NEWREF; 36980 END; 36990 (**) 37000 (**) 37010 FUNCTION GENSTR(TEMPLATE: DPOINT; LOCRG: DEPTHRANGE): OBJECTP; 37020 (*PLEAPGEN*) 37030 VAR NEWREF: OBJECTP; 37040 BEGIN 37050 NEWREF := HEAPSTR(TEMPLATE); 37060 NEWREF^.OSCOPE := SCOPE+LOCRG; 37070 GENSTR := NEWREF; 37080 END; 37090 (**) 37100 (**) 37110 (*-02() BEGIN END ; ()-02*) 37120 (*+01() 37130 BEGIN (*OF MAIN PROGRAM*) 37140 END (*OF EVERYTHING*). 37150 ()+01*)