Lines Matching defs:iop

92 		retp = put_wide(iop, &bufptr, bufferend, p, n, sflag); \
101 retp = pad_wide(iop, &bufptr, bufferend, s, n, sflag); \
134 if (!_dowrite(p, n, iop, &bufptr)) {\
170 if (!_dowrite(s, PAD_LEN, iop, &bufptr)) \
213 _dowrite(const char *p, ssize_t n, FILE *iop, unsigned char **ptrptr);
267 _dowrite(const char *p, ssize_t n, FILE *iop, unsigned char **ptrptr)
269 if (!(iop->_flag & _IOREAD)) {
270 iop->_cnt -= (*ptrptr - iop->_ptr);
271 iop->_ptr = *ptrptr;
272 _bufsync(iop, _bufend(iop));
273 if (_FWRITE(p, 1, n, iop) != n) {
276 *ptrptr = iop->_ptr;
278 if (n > iop->_cnt)
279 n = iop->_cnt;
280 iop->_cnt -= n;
282 iop->_ptr = *ptrptr;
300 put_wide(FILE *iop, unsigned char **bufptr,
313 iop->_ptr = bufferend;
345 if (!_dowrite(tmpp, len, iop, bufptr)) {
359 pad_wide(FILE *iop, unsigned char **bufptr,
374 iop->_ptr = bufferend;
383 if (!_dowrite(s, PAD_LEN, iop, bufptr))
388 if (!_dowrite(s, nn, iop, bufptr))
401 _wdoprnt(const wchar_t *format, va_list in_args, FILE *iop)
403 return (_wndoprnt(format, in_args, iop, 0));
407 _doprnt(const char *format, va_list in_args, FILE *iop)
409 return (_ndoprnt(format, in_args, iop, 0));
416 _wndoprnt(const wchar_t *format, va_list in_args, FILE *iop, int prflag)
419 _ndoprnt(const char *format, va_list in_args, FILE *iop, int prflag)
429 /* bufptr is used inside of doprnt instead of iop->_ptr; */
430 /* bufferend is a copy of _bufend(iop), if it exists. For */
431 /* dummy file descriptors (iop->_flag & _IOREAD), bufferend */
591 if (iop->_flag == _IOREAD)
597 /* Note that iop->_base should not equal 0 for sprintf and vsprintf */
598 if (iop->_base == 0) {
599 if (_findbuf(iop) == 0)
603 if (!(iop->_flag & (_IOLBF|_IONBF)))
604 iop->_cnt = _bufend(iop) - iop->_base;
611 bufptr = iop->_ptr;
613 maxcount = (size_t)iop->_cnt;
614 bufferend = (unsigned char *)(((wchar_t *)iop->_ptr) +
617 bufferend = _bufend(iop);
621 bufptr = iop->_ptr;
622 if (iop->_flag & _IOREAD) {
626 if (iop->_cnt == MAXINT) {
635 * iop with _IORW has been read.
637 bufferend = _bufend(iop);
652 bufferend = _bufend(iop);
677 ssize_t nn = bufptr - iop->_ptr;
681 iop->_ptr = bufptr;
686 iop->_cnt -= nn;
687 iop->_ptr = bufptr;
689 if ((bufptr + iop->_cnt) > bufferend && !(iop->_flag \
691 _bufsync(iop, bufferend);
692 if (iop->_flag & (_IONBF | _IOLBF) && \
693 (iop->_flag & _IONBF || \
694 memchr((char *)(bufptr+iop->_cnt), \
695 '\n', -iop->_cnt) != NULL))
696 (void) _xflsbuf(iop);
698 return (FERROR(iop) ? EOF : (ssize_t)count);
700 return (FERROR(iop) ? EOF : (int)count);