Google
 

Trailing-Edge - PDP-10 Archives - BB-L014E-BM - autopatch/listng.c05
There are no other files named listng.c05 in the archive.
 REP 5/1	;05C1
	!COPYRIGHT (C) 1973,1981 BY DIGITAL EQUIPMENT CORPORATION
	!AUTHOR: D. B. TOLMAN/DCE/SJW/RDH/TFV/EGM
 WIT
	!COPYRIGHT (C) 1973,1982 BY DIGITAL EQUIPMENT CORPORATION
	!AUTHOR: D. B. TOLMAN/DCE/SJW/RDH/TFV/EGM/PY
 REP 11/1	;05C2
	GLOBAL BIND LISTNV = 6^24 + 0^18 + 26;	! Version Date:	28-Sep-81
 WIT
	GLOBAL BIND LISTNV = 6^24 + 0^18 + #1162;	! Version Date: 29-Jun-82
 INS 103/1	;05C3
	***** End V6 Development *****

	1162	PY	29-Jun-82	------
		Replace oblsolete RDTXT JSYS with TEXTI. Add routine WRITECRLF
	        to type a CRLF when control-Z is read from a terminal. CONVERT
		the ENDOFILE returned by LEXINI to EOF.
	        
 REP 562/1	;05C4
		MACRO  RDTXT = JSYS (0,#505) $;
 WIT
	%[1162]% MACRO	TEXTI = JSYS (0,#524) $;
	%[1162]% OWN	TEXTIARGBLOCK[5];
	%[1162]% BIND	RDCWB = 0,	!COUNT OF WORDS FOLLOWING IN ARG BLOCK
	%[1162]% 	RDFLG = 1,	!FLAG WORD
	%[1162]% 	RDIOJ = 2,	!INPUT,,OUTPUT JFN
	%[1162]% 	RDDBP = 3,	!DESTINATION BYTE POINTER
	%[1162]% 	RDDBC = 4;	!DESTINATION NUMBER OF BYTES AVAILABLE
 REP 574/1	;05C5
		R1 _  .XDEVJFN(SRC);
		R1<LEFT> _ .XDEVJFN(SRC);
		R2 _ (.BUFFERS(SRC)<RIGHT>)<36,7>;
		R3 _ 1^RDTOP + 1^RDJFN;	!TOPS 10 BREAK
		R3<RIGHT> _ XSINSIZ*5;	!BYTE COUNT

		IF SKIP(RDTXT) EQL 0
 WIT
	%[1162]% TEXTIARGBLOCK[RDCWB] _ 4;	!BLOCK SIZE
	%[1162]% TEXTIARGBLOCK[RDFLG] _ 1^RDTOP + 1^RDJFN;	!FLAGS
	%[1162]% TEXTIARGBLOCK[RDIOJ]<LEFT> _ .XDEVJFN(SRC);	!INPUT JFN
	%[1162]% TEXTIARGBLOCK[RDIOJ]<RIGHT> _ .XDEVJFN(SRC);	!OUTPUT JFN
	%[1162]% TEXTIARGBLOCK[RDDBP] _ (.BUFFERS(SRC)<RIGHT>)<36,7>; !DEST PTR
	%[1162]% TEXTIARGBLOCK[RDDBC] _ XSINSIZ*5; !BYTE COUNT
	%[1162]% R1 _ TEXTIARGBLOCK[0]<0,0>;

	%[1162]% IF SKIP(TEXTI) EQL 0
 REP 585/1	;05C6

			FATLERR( PLIT'RDTXT',.LINELINE-1,E61<0,0>);
 WIT
	%[1162]% 	FATLERR( PLIT'TEXTI',.LINELINE-1,E61<0,0>);
 REP 591/1	;05C7
		LASTCHARACTER _ ..R2;	!SAVE LAST CHARACTER FOR EOF CHECK
		%ZERO FILL%
		(.R2<RIGHT>)<0,.R2<30,6>> _ 0;

		XWORDCNT(SRC) _ .R2<RIGHT> - .BUFFERS(SRC) + 1;
 WIT
	%[1162]% LASTCHARACTER _ ..TEXTIARGBLOCK[RDDBP];	!SAVE LAST CHARACTER
	%[1162]% 						!FOR EOF CHECK
		%ZERO FILL%
	%[1162]% (.TEXTIARGBLOCK[RDDBP]<RIGHT>)<0,.TEXTIARGBLOCK[RDDBP]<30,6>> _ 0;

	%[1162]% XWORDCNT(SRC) _ .TEXTIARGBLOCK[RDDBP]<RIGHT> - .BUFFERS(SRC) + 1;
 REP 984/1	;05C8
	% INITIALIZE "LEXICAL".  IT IS POSSIBLE THAT AN EOF MAY BE RETURNED.
	   SOMEWHAT UNLIKELY THOUGH  %

	RETURN LEXINIT()  
 WIT
	% INITIALIZE "LEXICAL".  IT IS POSSIBLE THAT AN END OF FILE MAY
	  BE RETURNED. SOMEWHAT UNLIKELY THOUGH  %

	%[1162]% IF LEXINIT() EQL ENDOFILE<0,0> THEN RETURN EOF
 INS 1389/1	;05C9
	%[1162]%    GLOBAL ROUTINE
	%[1162]% WRITECRLF  =
	%[1162]% BEGIN
	%[1162]% IF FTTENEX THEN
	%[1162]% BEGIN
	%[1162]% REGISTER R1=1,R2=2,R3=3;
	%[1162]% LOCAL RSV[3];
	%[1162]% MACHOP  JSYS = #104;
	%[1162]% MACRO	SOUT = JSYS (0,#53) $;
	%[1162]% RSV[0] _ .R1; RSV[1] _ .R2; RSV[2] _ .R3;
	%[1162]% R1 _ .XDEVJFN(SRC); !SOURCE JFN
	%[1162]% R2 _ UPLIT (ASCIZ '?M?J')<36,7>;      !POINT TO CR,LF
	%[1162]% R3 _ 0; 	     !TERMINATE ON NULL
	%[1162]% SOUT;
	%[1162]% R1 _ .RSV[0]; R2 _ .RSV[1]; R3 _ .RSV[2];
	%[1162]% END
	%[1162]% END;	 % WRITECRLF %
 SUM 22745