ack/lang/a68s/liba68s/standin.p
1988-10-04 13:41:01 +00:00

74 lines
2.4 KiB
OpenEdge ABL

90500 #include "rundecs.h"
90510 (* COPYRIGHT 1983 C.H.LINDSEY, UNIVERSITY OF MANCHESTER *)
90520 (**)
90530 (**)
90540 PROCEDURE SETSTATUS(COV:OBJECTP; VAR FYLE: FYL);
90550 VAR STAT:STATUSSET;
90560 BEGIN
90570 IF NOTINITIALIZED IN COV^.STATUS THEN STAT := [NOTINITIALIZED,LFE,PAGEOVERFLOW,LINEOVERFLOW]
90580 ELSE IF EOF(FYLE) THEN STAT := [LFE,PAGEOVERFLOW,LINEOVERFLOW]
90590 ELSE IF (*-50()FYLE^=CHR(12)()-50*) (*+50()EOS(FYLE)()+50*) THEN
90600 STAT := [PAGEOVERFLOW,LINEOVERFLOW]
90610 ELSE IF EOLN(FYLE) THEN STAT := [LINEOVERFLOW]
90620 ELSE STAT := [];
90630 COV^.STATUS:=COV^.STATUS-[NOTINITIALIZED,LFE,PAGEOVERFLOW,LINEOVERFLOW]+STAT;
90640 END;
90650 (**)
90660 (**)
90670 (*******STAND IN PRIMITVES*******)
90680 (**)
90690 (**)
90700 PROCEDURE SIRDSTR(
90710 PCOV: OBJECTP ; VAR CHARS: GETBUFTYPE ; T (*+01() , T1 ()+01*): TERMSET ; VAR I: INTEGER ; VAR FYLE: FYL
90720 ) ;
90730 (*LINEOK*)
90740 BEGIN WITH PCOV^ DO
90750 IF I<0 THEN
90760 BEGIN I := ORD(FYLE^); GET(FYLE); COFCPOS := COFCPOS+1 END
90770 ELSE
90780 WHILE NOT EOLN(FYLE) AND NOT (FYLE^ IN T)
90790 (*+01() AND ((ORD(FYLE^)<=59) OR NOT (CHR(ORD(FYLE^)-59) IN T1)) ()+01*) DO
90800 BEGIN CHARS[I] := FYLE^; I := I+1; GET(FYLE); COFCPOS := COFCPOS+1 END;
90810 SETSTATUS(PCOV, FYLE)
90820 END;
90830 (**)
90840 (**)
90850 PROCEDURE SINEWLINE(COV:OBJECTP; VAR FYLE :FYL);
90860 BEGIN WITH COV^ DO
90870 BEGIN READLN(FYLE);
90880 LOFCPOS:=LOFCPOS+1;
90890 COFCPOS:=1;
90900 STATUS := STATUS-[NOTINITIALIZED];
90910 END;
90920 SETSTATUS(COV, FYLE)
90930 END;
90940 (**)
90950 (**)
90960 PROCEDURE SINEWPAGE(COV:OBJECTP; VAR FYLE :FYL);
90970 BEGIN WITH COV^ DO
90980 BEGIN
90990 (*-50() WHILE FYLE^<>CHR(12) DO GET(FYLE); GET(FYLE); ()-50*)
91000 (*+50() GETSEG(FYLE) ; ()+50*)
91010 COFCPOS:=1; LOFCPOS:=1; POFCPOS:=POFCPOS+1;
91020 END;
91030 SETSTATUS(COV, FYLE)
91040 END;
91050 (**)
91060 (**)
91070 PROCEDURE SIRESET(COV: OBJECTP; VAR FYLE: FYL);
91080 (*OPENED,MOODOK*)
91090 BEGIN WITH COV^ DO
91100 IF RESETPOSS IN POSSIBLES THEN
91110 BEGIN RESET(FYLE); SETSTATUS(COV, FYLE) END
91120 END;
91130 (**)
91140 (**)
91150 (*-02()
91160 BEGIN (*OF A68*)
91170 END; (*OF A68*)
91180 ()-02*)
91190 (*+01()
91200 BEGIN (*OF MAIN PROGRAM*)
91210 END (*OF EVERYTHING*).
91220 ()+01*)