/osnet-11/usr/src/lib/libc/port/stdio/ |
H A D | _wrtchk.c | 41 _wrtchk(FILE *iop) argument 43 if ((iop->_flag & (_IOWRT | _IOEOF)) != _IOWRT) { 44 if (!(iop->_flag & (_IOWRT | _IORW))) { 45 iop->_flag |= _IOERR; 49 _READ2WRT(iop); 53 if (iop->_base == NULL && _findbuf(iop) == NULL) 55 else if ((iop->_ptr == iop->_base) && 56 !(iop [all...] |
H A D | rewind.c | 45 rewind(FILE *iop) argument 49 FLOCKFILE(lk, iop); 50 _rewind_unlocked(iop); 55 _rewind_unlocked(FILE *iop) argument 57 (void) _fflush_u(iop); 58 (void) lseek64(FILENO(iop), 0, SEEK_SET); 59 iop->_cnt = 0; 60 iop->_ptr = iop->_base; 61 iop [all...] |
H A D | ungetc.c | 41 int _ungetc_unlocked(int c, FILE *iop); 44 ungetc(int c, FILE *iop) argument 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) argument 59 if (iop->_ptr <= iop->_base) { 60 if (iop->_base == 0) { 61 if (_findbuf(iop) [all...] |
H A D | getc.c | 48 getc(FILE *iop) argument 53 FLOCKFILE(lk, iop); 55 _SET_ORIENTATION_BYTE(iop); 57 c = (--iop->_cnt < 0) ? __filbuf(iop) : *iop->_ptr++; 64 getc_unlocked(FILE *iop) argument 66 return ((--iop->_cnt < 0) ? __filbuf(iop) : *iop [all...] |
H A D | putc.c | 48 putc(int ch, FILE *iop) argument 53 FLOCKFILE(lk, iop); 55 _SET_ORIENTATION_BYTE(iop); 57 if (--iop->_cnt < 0) 58 ret = __flsbuf((unsigned char) ch, iop); 60 (*iop->_ptr++) = (unsigned char)ch; 69 putc_unlocked(int ch, FILE *iop) argument 71 if (--iop->_cnt < 0) 72 return (__flsbuf((unsigned char) ch, iop)); 74 return (*iop [all...] |
H A D | _filbuf.c | 54 _filbuf(FILE *iop) argument 65 if (!(iop->_flag & _IOREAD)) /* check, correct permissions */ 67 if (iop->_flag & _IORW) 68 iop->_flag |= _IOREAD; /* change direction */ 76 if (iop->_base == 0) { 77 if ((endbuf = _findbuf(iop)) == 0) /* get buffer and */ 82 endbuf = _bufend(iop); 88 if (iop->_flag & (_IONBF | _IOLBF)) 99 if ((flag = iop->_flag) & _IOEOF) { 103 * therefore iop [all...] |
H A D | fseeko.c | 57 fseeko64(FILE *iop, off64_t offset, int ptrname) argument 62 FLOCKFILE(lk, iop); 63 iop->_flag &= ~_IOEOF; 65 if (!(iop->_flag & _IOREAD) && !(iop->_flag & (_IOWRT | _IORW))) { 71 if (iop->_flag & _IOREAD) { 72 if (ptrname == 1 && iop->_base && !(iop->_flag&_IONBF)) { 73 offset -= iop->_cnt; 75 } else if (iop 93 fseeko(FILE *iop, off_t offset, int ptrname) argument [all...] |
H A D | flockf.c | 55 _flockget(FILE *iop) argument 57 rmutex_t *rl = IOB_LCK(iop); 65 ftrylockfile(FILE *iop) argument 67 rmutex_t *rl = IOB_LCK(iop); 75 flockfile(FILE *iop) argument 77 rmutex_t *rl = IOB_LCK(iop); 84 funlockfile(FILE *iop) argument 86 rmutex_t *rl = IOB_LCK(iop); 93 __fsetlocking(FILE *iop, int type) argument 97 ret = GET_IONOLOCK(iop) [all...] |
H A D | setbuffer.c | 43 setbuffer(FILE *iop, char *abuf, size_t asize) argument 46 (void) setvbuf(iop, NULL, _IONBF, 0); 48 (void) setvbuf(iop, abuf, _IOFBF, asize); 58 setlinebuf(FILE *iop) argument 60 (void) fflush(iop); 61 (void) setvbuf(iop, NULL, _IOLBF, 128);
|
H A D | _flsbuf.c | 45 _flsbuf(int ch, FILE *iop) /* flush (write) buffer, save ch, */ argument 52 switch (iop->_flag & (_IOFBF | _IOLBF | _IONBF | 56 if (iop->_base != 0 && iop->_ptr > iop->_base) 60 if (iop->_ptr >= _bufend(iop)) 67 if ((*iop->_ptr++ = (unsigned char)ch) == '\n') 68 (void) _xflsbuf(iop); 69 iop [all...] |
H A D | fgets.c | 46 fgets(char *buf, int size, FILE *iop) argument 54 FLOCKFILE(lk, iop); 56 _SET_ORIENTATION_BYTE(iop); 58 if (!(iop->_flag & (_IOREAD | _IORW))) { 64 if (iop->_base == NULL) { 65 if ((bufend = _findbuf(iop)) == NULL) { 71 bufend = _bufend(iop); 76 if (iop->_cnt <= 0) { 77 if (__filbuf(iop) != EOF) { 78 iop [all...] |
H A D | fseek.c | 50 fseek(FILE *iop, long offset, int ptrname) argument 55 FLOCKFILE(lk, iop); 56 iop->_flag &= ~_IOEOF; 58 if (!(iop->_flag & _IOREAD) && !(iop->_flag & (_IOWRT | _IORW))) { 64 if (iop->_flag & _IOREAD) { 65 if (ptrname == 1 && iop->_base && !(iop->_flag&_IONBF)) { 66 offset -= iop->_cnt; 68 } else if (iop [all...] |
H A D | fwrite.c | 46 _fwrite_unlocked(const void *ptr, size_t size, size_t count, FILE *iop); 49 fwrite(const void *ptr, size_t size, size_t count, FILE *iop) argument 54 FLOCKFILE(lk, iop); 56 _SET_ORIENTATION_BYTE(iop); 58 retval = _fwrite_unlocked(ptr, size, count, iop); 65 _fwrite_unlocked(const void *ptr, size_t size, size_t count, FILE *iop) argument 71 if (_WRTCHK(iop)) 84 if (iop->_flag & _IOLBF) { 85 bufend = _bufend(iop); 86 iop [all...] |
H A D | getchar.c | 51 FILE *iop = stdin; local 53 return (getc(iop)); 63 FILE *iop = stdin; local 65 return (GETC(iop));
|
H A D | putchar.c | 50 FILE *iop = stdout; local 52 return (putc(ch, iop)); 65 FILE *iop = stdout; local 67 return (PUTC(ch, iop));
|
H A D | ftell.c | 53 ftell(FILE *iop) argument 59 FLOCKFILE(lk, iop); 60 if (iop->_cnt < 0) 61 iop->_cnt = 0; 62 if (iop->_flag & _IOREAD) 63 adjust = (ptrdiff_t)-iop->_cnt; 64 else if (iop->_flag & (_IOWRT | _IORW)) { 66 if (((iop->_flag & (_IOWRT | _IONBF)) == _IOWRT) && 67 (iop->_base != 0)) 68 adjust = iop [all...] |
H A D | fopen.c | 63 FILE *iop; local 66 iop = _findiop(); 68 * Note that iop is not locked here, since no other thread could 69 * possibly call _endopen with the same iop at this point. 71 rc = _endopen(name, type, iop, LARGE_OPEN); 73 if (rc == NULL && iop != NULL) 74 iop->_flag = 0; /* release iop */ 80 _freopen_null(const char *type, FILE *iop) argument 86 if (iop 197 freopen(const char *name, const char *type, FILE *iop) argument [all...] |
H A D | fdopen.c | 58 /* iop doesn't need locking since this function is creating it */ 59 FILE *iop; local 67 if ((iop = _findiop()) == 0) { 74 iop->_flag = 0; /* release iop */ 91 iop->_flag = flag; 94 iop->_file = fd; 97 SET_FILE(iop, fd); 98 } else if (_file_set(iop, fd, type) != 0) { 100 iop [all...] |
H A D | ftello.c | 61 ftello64(FILE *iop) argument 67 FLOCKFILE(lk, iop); 68 if (iop->_cnt < 0) 69 iop->_cnt = 0; 70 if (iop->_flag & _IOREAD) 71 adjust = (ptrdiff_t)-iop->_cnt; 72 else if (iop->_flag & (_IOWRT | _IORW)) { 74 if (((iop->_flag & (_IOWRT | _IONBF)) == _IOWRT) && 75 (iop->_base != 0)) 76 adjust = iop 92 ftello(FILE *iop) argument [all...] |
H A D | setbuf.c | 44 setbuf(FILE *iop, char *abuf) argument 47 int fno = GET_FD(iop); /* file number */ 52 FLOCKFILE(lk, iop); 53 if ((iop->_base != 0) && (iop->_flag & _IOMYBUF)) 54 free((char *)iop->_base - PUSHBACK); 55 iop->_flag &= ~(_IOMYBUF | _IONBF | _IOLBF); 57 iop->_flag |= _IONBF; 69 iop->_flag |= _IOMYBUF; 74 iop [all...] |
H A D | fread.c | 47 fread(void *ptr, size_t size, size_t count, FILE *iop) argument 54 FLOCKFILE(lk, iop); 56 _SET_ORIENTATION_BYTE(iop); 59 if (!(iop->_flag & (_IOREAD | _IORW))) { 60 iop->_flag |= _IOERR; 66 if (iop->_flag & _IOEOF) { 80 if (iop->_cnt < s) { 81 if (iop->_cnt > 0) { 82 (void) memcpy((void*)dptr, iop->_ptr, 83 iop [all...] |
/osnet-11/usr/src/lib/libc/inc/ |
H A D | stdiom.h | 59 #define SET_IONOLOCK(iop) ((iop)->_flag |= _IONOLOCK) 60 #define CLEAR_IONOLOCK(iop) ((iop)->_flag &= ~_IONOLOCK) 61 #define GET_IONOLOCK(iop) ((iop)->_flag & _IONOLOCK) 62 #define SET_BYTE_MODE(iop) ((iop)->_flag |= _BYTE_MODE_FLAG) 63 #define CLEAR_BYTE_MODE(iop) ((iop) [all...] |
/osnet-11/usr/src/lib/libc/port/i18n/ |
H A D | __ungetwc_xpg5.c | 37 * associated with an input stream "iop". That character, c, 54 __ungetwc_xpg5(wint_t wc, FILE *iop) argument 63 FLOCKFILE(lk, iop); 65 if (_set_orientation_wide(iop, &lc, 72 if ((wc == WEOF) || ((iop->_flag & _IOREAD) == 0)) { 83 if (iop->_ptr <= iop->_base) { 84 if (iop->_base == NULL) { 88 if (iop->_ptr == iop [all...] |
H A D | __fgetwc_xpg5.c | 41 __fgetwc_xpg5(FILE *iop) argument 48 FLOCKFILE(lk, iop); 50 if (_set_orientation_wide(iop, &lc, 57 result = fp_fgetwc(lc, iop); 63 __getwc_xpg5(FILE *iop) argument 65 return (__fgetwc_xpg5(iop));
|
/osnet-11/usr/src/lib/libc/port/print/ |
H A D | vfprintf.c | 55 _vfprintf_c89(FILE *iop, const char *format, va_list ap) argument 57 vfprintf(FILE *iop, const char *format, va_list ap) 64 FLOCKFILE(lk, iop); 66 _SET_ORIENTATION_BYTE(iop); 68 if (!(iop->_flag & _IOWRT)) { 70 if (iop->_flag & _IORW) { 72 _READ2WRT(iop); 81 count = _ndoprnt(format, ap, iop, _F_INTMAX32); 83 count = _ndoprnt(format, ap, iop, 0); 87 if (FERROR(iop) || coun [all...] |