98400 #include "rundecs.h" 98410 (* COPYRIGHT 1983 C.H.LINDSEY, UNIVERSITY OF MANCHESTER *) 98420 (**) 98430 PROCEDURE SETWRITEMOOD(PCOV:OBJECTP); EXTERN; 98440 (*+01() (*$X6*) ()+01*) 98450 PROCEDURE AOPEN( EFET:FETROOMP; DISP:INTEGER; LFN:LFNTYPE; BUF:IPOINT ); EXTERN; 98460 FUNCTION PROC( PROCEDURE P (*-01() ( COV: OBJECTP ; EFET: FETROOMP ) ()-01*) ): ASPROC ; EXTERN ; 98470 (*-01() 98480 FUNCTION PROC2( PROCEDURE P( COV, STRNG: OBJECTP ; LB, UB: INTEGER ; EFET: FETROOMP ) ): ASPROC ; EXTERN ; 98490 ()-01*) 98500 PROCEDURE SONEWLINE(COV: OBJECTP; EFET: FETROOMP); EXTERN; 98510 PROCEDURE SONEWPAGE(COV: OBJECTP; EFET: FETROOMP); EXTERN; 98520 PROCEDURE SORESET(COV: OBJECTP; EFET: FETROOMP); EXTERN; 98530 PROCEDURE SOWRSTR(COV, STRNG: OBJECTP; LB, UB: INTEGER; EFET: FETROOMP); EXTERN; 98540 (**) 98550 (**) 98560 PROCEDURE STOUTCH(PCOV: OBJECTP; LFN: LFNTYPE); 98570 VAR 98580 (*+01() AW66: ^W66 ; ()+01*) 98590 PINT: INTPOINT; 98600 (*+01() 98610 TEMP: PACKED RECORD CASE SEVERAL OF 98620 1: (INT: INTEGER); 98630 2: (LFN: PACKED ARRAY [1..7] OF CHAR; 98640 EFET1: 0..777777B); 98650 0, 3, 4, 5, 6, 7, 8, 9, 10: (); 98660 END; 98670 ()+01*) 98680 (*+05() HEIGHT, WIDTH: INTEGER; ()+05*) 98690 BEGIN WITH PCOV^ DO 98700 BEGIN 98710 CHARBOUND := 120; 98720 LINEBOUND := 60; 98730 PAGEBOUND := 16; 98740 POSSIBLES:=[PUTPOSS,ESTABPOSS]; 98750 AOPEN(BOOK, FORWRITE, LFN, ORD(BOOK)+BUFFOFFSET); 98760 STATUS := [OPENED,NOTRESET,CHARMOOD,NOTSET]; 98770 (*+01() 98780 AW66 := ASPTR(66B); 98790 IF (BOOK^.LFN='OUTPUT:') AND (AW66^.JOPR<>3) (*OUTPUT AND NOT ONLINE*) 98800 OR (BOOK^.LFN='LSTFILE') (*SPECIAL CASE*) THEN 98810 STATUS := STATUS+[CARRIAGE]; 98820 IF (BOOK^.LFN<>'OUTPUT:') AND (BOOK^.LFN<>'LSTFILE') THEN POSSIBLES := POSSIBLES+[RESETPOSS]; 98830 IF (BOOK^.LFN='OUTPUT:') AND (AW66^.JOPR=3) (*OUTPUT AND ONLINE*) THEN 98840 BEGIN 98850 PINT := ASPTR(3); 98860 TEMP.LFN := 'OUTPUT:'; TEMP.EFET1 := ORD(BOOK)+14; 98870 PINT^ := TEMP.INT; (*TO ENSURE THAT OUTPUT GETS FLUSHED*) 98880 CHARBOUND := 79; 98890 END; 98900 ()+01*) 98910 (*+05() 98920 IF WINDOW( BOOK^.XFILE^.FILEDES , HEIGHT , WIDTH ) <> 0 THEN 98930 BEGIN 98940 LINEBOUND := HEIGHT; 98950 CHARBOUND := WIDTH 98960 END ; 98970 ()+05*) 98980 DOPUTS:=PROC(*-01()2()-01*)(SOWRSTR); 98990 DONEWLINE := PROC(SONEWLINE); 99000 DONEWPAGE := PROC(SONEWPAGE); 99010 DORESET := PROC(SORESET); 99020 SETWRITEMOOD(PCOV) 99030 END 99040 END; 99050 (*+01() (*$X4*) ()+01*) 99060 (**) 99070 (**) 99080 (*-02() 99090 BEGIN (*OF A68*) 99100 END; (*OF A68*) 99110 ()-02*) 99120 (*+01() 99130 BEGIN (*OF MAIN PROGRAM*) 99140 END (* OF EVERYTHING *). 99150 ()+01*)