52000 #include "rundecs.h" 52010 (* COPYRIGHT 1983 C.H.LINDSEY, UNIVERSITY OF MANCHESTER *) 52020 (**) 52030 (**) 52040 FUNCTION STRUCTSCOPE(STRUCTPTR: UNDRESSP; TEMPLATE: DPOINT):DEPTHRANGE; EXTERN; 52050 PROCEDURE GARBAGE(ANOBJECT:OBJECTP); EXTERN; 52060 FUNCTION NEXTEL(I: INTEGER; VAR PDESC1: PDESC): BOOLEAN; EXTERN; 52070 PROCEDURE PCINCR(STRUCTPTR: UNDRESSP; TEMPLATE: DPOINT; INCREMENT: INTEGER); EXTERN; 52080 PROCEDURE FORMPDESC(OLDESC: OBJECTP; VAR PDESC1: PDESC); EXTERN; 52090 PROCEDURE PCINCRMULT(ELSPTR: OBJECTP; INCREMENT: INTEGER); EXTERN; 52100 FUNCTION COPYDESC(ORIGINAL: OBJECTP; NEWSORT: STRUCTYPE): OBJECTP; EXTERN; 52110 PROCEDURE TESTCC (TARGET: OBJECTP); EXTERN; 52120 PROCEDURE ERRORR(N :INTEGER); EXTERN; 52130 FUNCTION CHKDESC(SOURCEMULT, CDESC: OBJECTP): OBJECTP; EXTERN; 52140 (**) 52150 (**) 52160 PROCEDURE PCINCRSLICE(MULT: OBJECTP; VAR APDESC: PDESC; INCREMENT: INTEGER); 52170 VAR I, ELSIZE: INTEGER; 52180 TEMPLATE: DPOINT; 52190 PTR: UNDRESSP; 52200 BEGIN WITH APDESC, MULT^ DO 52210 BEGIN 52220 TEMPLATE := MDBLOCK; 52230 IF ORD(TEMPLATE)<=MAXSIZE THEN (*NOT STRUCT*) 52240 IF ORD(TEMPLATE)=0 THEN (*DRESSED*) 52250 WHILE NEXTEL(0, APDESC) DO WITH PDESCVEC[0] DO 52260 BEGIN 52270 PTR := INCPTR(PVALUE, PP); 52280 WHILE ORD(PTR)0 THEN 52400 WHILE NEXTEL(0, APDESC) DO WITH PDESCVEC[0] DO 52410 BEGIN 52420 I := PP; 52430 WHILE IPDESC2.PSIZE THEN 53370 WHILE NEXTEL(0, PDESC1) DO 53380 WITH PDESC1, PDESCVEC[0] DO 53390 BEGIN 53400 VECPOS := PP; 53410 WHILE VECPOS=CCOUNT THEN 53720 IF CCOUNT<>0 THEN CCOUNT := CCOUNT+1 ELSE (*NA*) 53730 ELSE IF DESTELS^.CCOUNT=0 THEN CCOUNT := 0; 53740 (*CCOUNT=0 TREATED AS INFINITY*) 53750 (*CCOUNT(SOURCELS) = MAX(CCOUNT(SOURCELS), CCOUNT(DESTELS)+1)*) 53760 NEWSOURCE:=COPYDESC(SOURCE,MULT); 53770 FPINC(SOURCELS^); 53780 FPINC(NEWSOURCE^); 53790 IF FPTST(PVALUE^) THEN GARBAGE(PVALUE); 53800 PVALUE:= SOURCELS 53810 END 53820 ELSE 53830 BEGIN 53840 IF FPTWO(PVALUE^) THEN 53850 TESTCC(DESTINATION); 53860 DESTELS := PVALUE; 53870 FORMPDESC(SOURCE, PDESC1); 53880 PCINCRSLICE(SOURCE, PDESC1, +INCRF); 53890 PCINCRMULT(DESTELS, -INCRF); 53900 VECPOS := ELSCONST; 53910 WHILE NEXTEL(0, PDESC1) DO WITH PDESC1, PDESCVEC[0] DO 53920 BEGIN 53930 MOVELEFT(INCPTR(SOURCELS, PP), INCPTR(DESTELS, VECPOS), PSIZE); 53940 VECPOS:= VECPOS+PSIZE 53950 END 53960 END; 53970 IF FPTST(SOURCE^) THEN GARBAGE(SOURCE); 53980 TASSTM := DESTINATION; 53990 END; 54000 (**) 54010 (**) 54020 FUNCTION SCPTTM(DESTINATION, SOURCE: OBJECTP): OBJECTP; 54030 (*PSCOPETT+4*) 54040 BEGIN 54050 WITH SOURCE^ DO 54060 BEGIN 54070 IF OSCOPE=0 THEN OSCOPE := MULTSCOPE(SOURCE); 54080 IF DESTINATION^.OSCOPE