{****************************************************************************} {* Puffer-Operationen *} {****************************************************************************} FUNCTION EndOfBlock : boolean; VAR h : boolean; BEGIN h:=EOF(MainFile); IF IncludeFlag THEN IF EOF(InclFile) THEN BEGIN h:=true; IncludeFlag:=false; SchliesseIncludeFile END; IF NOT(h) THEN h:=Sonder(zeile); IF abs(MaxAvail)<500 THEN h:=true; EndOfBlock:=h END; PROCEDURE ClearPuffer; BEGIN p:=Anfang; WHILE p^.Naechster<>NIL DO BEGIN q:=p; dispose(p); p:=q^.Naechster; END; dispose(p); PufferVoll:=false END; PROCEDURE LiesPuffer; VAR h:boolean; BEGIN PufferGroesse:=0; new(q); Anfang:=q; q^.Naechster:=NIL; REPEAT IF IncludeFlag THEN BEGIN readln(InclFile,zeile); FileName:=InclFileName END ELSE BEGIN readln(MainFile,zeile); FileName:=MainFilename END; q^.Eintrag:=zeile; PufferGroesse:=PufferGroesse+1; new(p); q^.Naechster:=p; p^.Naechster:=NIL; q:=p; UNTIL EndOfBlock; PufferVoll:=true END; PROCEDURE Print(a:line); VAR i : integer; BEGIN IF FileName[2]=':' THEN FileName:=copy(FileName,3,length(FileName)-2); write(LST,FileName,': ':14-length(FileName)); FOR i:=1 TO Iter DO write(LST,' '); write(LST,a,' ') END;