1: /* @(#)findiop.c 2.1 SCCS id keyword */ 2: #include <stdio.h> 3: 4: FILE * 5: _findiop() 6: { 7: extern FILE *_lastbuf; 8: register FILE *iop; 9: 10: for(iop = _iob; iop->_flag & (_IOREAD|_IOWRT|_IORW);) 11: if (++iop >= _lastbuf) 12: return(NULL); 13: 14: return(iop); 15: }