Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/inputc.mac
There is 1 other file named inputc.mac in the archive. Click here to see a list.
00100	COMMENT * SIMULA specification;
00200	OPTIONS(/E:QUICK,inputcheck);
00300	BOOLEAN PROCEDURE inputcheck(inputfile); REF(Infile)inputfile;
00400	COMMENT Returns TRUE if INIMAGE can be done on inputfile without delay,
00500	otherwise FALSE. Performs no input.
00600	;
00700	
00800	!*;! MACRO-10 code !*;!
00900	
01000		TITLE	inputcheck
01100		ENTRY	inputcheck
01200		SUBTTL	SIMULA utility, Lars Enderin Dec 1975
01300	
01400	;! Copyright 1975 by the Swedish Defence Research Institute.
01500	;! Copying is allowed.
01600	
01700		sall
01800		search	simmac,simmcr,simrpa
01900		macinit
02000	
02100		;! Local definitions ;!
02200	
02300		inputfile==XWAC1
02400		GL.LIN==1B11
02500		OPDEF	IONDX.	[CALLI 127]
02600	
02700	inputcheck:
02800		PROC
02900		EXCH	XWAC1,(XTAC)	;! Get file ref
03000		CAIE	XWAC1,NONE
03200		SKIPE	OFFSET(ZIFEND)(XWAC1)
03300		 GOTO	L7	;! End of file
03400		edit(267)	;![267]
03500		LF	X1,ZFICHN(XWAC1)
03600		L	X1
03700		DEVTYP
03800		 GOTO	L7	;! Error
04100		ANDI	TY.DEV
04200		IF	;! TTY
04300			CAIE	.TYTTY
04400			GOTO	FALSE
04500		THEN	;! Use GETLCH
04600			LF	X1,ZFIDVN(XWAC1)
04700			IONDX.	X1,
04800			 GOTO	L7
04900			JUMPE	X1,L7
05000			GETLCH	X1
05100			TLNE	X1,(GL.LIN)
05200			 GOTO	L8	;! There is an input line available
05300		ELSE	;! May be PTY
05400			CAIE	.TYPTY
05500			 GOTO	L8
05600			L	X1
05700			JOBSTS
05800			 GOTO	L7
05900			TLNE	(JB.UOA)
06000			 GOTO	L8
06100		FI
06200	L7():!	TDZA	XWAC1,XWAC1
06300	L8():!	SETO	XWAC1,
06400	L9():!	EXCH	XWAC1,(XTAC)
06500		RETURN
06600		EPROC
06700		LIT
06800		END;