Google
 

Trailing-Edge - PDP-10 Archives - -
There are no other files named in the archive.
	INTEGER FUNCTION IPCFSH(ERR)
C
C	IPCFSH
C
C	FLUSH ANY PACKETS IN QUEUE
C
C	CALL:
C		I = IPCFSH(ERR)
C
C	WHERE:
C		I	NUMBER OF PACKETS FLUSHED
C		ERR	LAST ERROR CODE GIVEN
C
C	MIKE BARNES UTHSCD(MCRC)
C
	IMPLICIT INTEGER(A-Z)
	DIMENSION PACKET(5)
C
C	--SETUP AND INITIALIZE
C
	Z = 0
	NUM = 0
	IPCFSH = NUM
10	DO 20 I2 = 1,10
20	PACKET(I1) = 0
	FLAGS = "400000000000
C
C	--CHECK FOR PACKETS
C
	ERR = IPCFR(FLAGS,Z,Z,PACKET,8,Z,Z)
	ERR = ERR .AND. "77
C
C	--GO HOME IF NO PACKETS READY TO READ
C
	IF (ERR .EQ. 03) RETURN
C
C	--INCREASE NUMBER OF PACKETS READ AND TRY AGAIN
C
	NUM = NUM+1
	IPCFSH = NUM
	GOTO 10
	END