Lines Matching defs:iop
41 int _ungetc_unlocked(int c, FILE *iop);
44 ungetc(int c, FILE *iop)
46 FLOCKRETURN(iop, _ungetc_unlocked(c, iop))
51 * iop->_lock is already held at a higher level - required since we do not
55 _ungetc_unlocked(int c, FILE *iop)
59 if (iop->_ptr <= iop->_base) {
60 if (iop->_base == 0) {
61 if (_findbuf(iop) == 0)
63 } else if (iop->_ptr <= iop->_base - PUSHBACK)
66 if ((iop->_flag & _IOREAD) == 0) /* basically a no-op on write stream */
67 ++iop->_ptr;
68 if (*--iop->_ptr != (unsigned char) c)
69 *iop->_ptr = (unsigned char) c; /* was *--iop->_ptr = c; */
70 ++iop->_cnt;
71 iop->_flag &= ~_IOEOF;