#+======================================================================= SUBROUTINE TAQIO( IOFC, LUN, IEF, IPRI, IOSB, IPRL, IDSW ) INTEGER*2 IOFC, LUN, IEF, IPRI INTEGER*2 IOSB(2), IPRL(6), IDSW # Performs an input QIO to get characters from a terminal # type-ahead buffer. All parameters are exactly as for a # normal QIO directive (except that none are optional). # This routine acts like a QIO for which an immediate # time-out has been specified, i.e. it only reads characters # already typed and returns. If less than the desired # of # chars are in the type-ahead buffer, the IOSB return code # is set to IS.TMO. # #-======================================================================= INTEGER*2 LCLPRL(6) #local copy of param list DEFINE(ISSUC, 1) DEFINE(ISTMO, 2) # ----------------------------------------------------------------------- NWANT = IPRL(2) #desired # to read NTA = NTABUF( LUN ) #actual # in ta buffer NXPECT = MIN( NWANT, NTA ) IF( NTA > 0 ) { # there are some chars in ta buffer, issue a read for them LCLPRL(1) = IPRL(1) LCLPRL(2) = NXPECT CALL WTQIO( IOFC, LUN, IEF,, IOSB, LCLPRL, IDSW ) } ELSE { # ta buffer is empty, fake a timed out read IDSW = ISSUC IOSB(1) = ISSUC #successful read of ... IOSB(2) = 0 #no chars } # if caller wanted more than available, & we read all in ta buf IF ( (IOSB(2)