/titanic_51/usr/src/lib/libc/inc/ |
H A D | stdiom.h | 61 #define SET_IONOLOCK(iop) ((iop)->_flag |= _IONOLOCK) argument 62 #define CLEAR_IONOLOCK(iop) ((iop)->_flag &= ~_IONOLOCK) argument 63 #define GET_IONOLOCK(iop) ((iop)->_flag & _IONOLOCK) argument 64 #define SET_BYTE_MODE(iop) ((iop)->_flag |= _BYTE_MODE_FLAG) argument 65 #define CLEAR_BYTE_MODE(iop) ((iop) argument 66 GET_BYTE_MODE(iop) global() argument 67 SET_WC_MODE(iop) global() argument 68 CLEAR_WC_MODE(iop) global() argument 69 GET_WC_MODE(iop) global() argument 70 GET_NO_MODE(iop) global() argument 72 SET_SEEKABLE(iop) global() argument 73 CLEAR_SEEKABLE(iop) global() argument 74 GET_SEEKABLE(iop) global() argument 78 SET_IONOLOCK(iop) global() argument 79 CLEAR_IONOLOCK(iop) global() argument 80 GET_IONOLOCK(iop) global() argument 81 SET_BYTE_MODE(iop) global() argument 82 CLEAR_BYTE_MODE(iop) global() argument 83 GET_BYTE_MODE(iop) global() argument 84 SET_WC_MODE(iop) global() argument 85 CLEAR_WC_MODE(iop) global() argument 86 GET_WC_MODE(iop) global() argument 87 GET_NO_MODE(iop) global() argument 89 SET_SEEKABLE(iop) global() argument 90 CLEAR_SEEKABLE(iop) global() argument 91 GET_SEEKABLE(iop) global() argument 94 STDIOP(iop) global() argument 97 IOPIND(iop) global() argument 128 _bufend(iop) global() argument 153 _realbufend(iop) global() argument 183 GET_FD(iop) global() argument 184 SET_FILE(iop,fd) global() argument 186 GET_FD(iop) global() argument 188 SET_FILE(iop,fd) global() argument 247 _WRTCHK(iop) global() argument 254 IOB_LCK(iop) global() argument 256 IOB_LCK(iop) global() argument [all...] |
/titanic_51/usr/src/lib/libbc/libc/stdio/4.2/ |
H A D | flsbuf.c | 69 fclose(FILE *iop) in fclose() argument 73 if(iop == NULL) in fclose() 75 if(iop->_flag & (_IOREAD | _IOWRT | _IORW) in fclose() 76 && (iop->_flag & _IOSTRG) == 0) { in fclose() 77 rtn = (iop->_flag & _IONBF)? 0: fflush(iop); in fclose() 78 if(close(fileno(iop)) < 0) in fclose() 81 if(iop->_flag & _IOMYBUF) { in fclose() 82 free((char*)iop->_base); in fclose() 83 iop in fclose() 100 fflush(FILE * iop) fflush() argument 124 _flsbuf(unsigned char c,FILE * iop) _flsbuf() argument 179 _xflsbuf(FILE * iop) _xflsbuf() argument 202 _wrtchk(FILE * iop) _wrtchk() argument 227 _findbuf(FILE * iop) _findbuf() argument 277 _bufsync(FILE * iop) _bufsync() argument [all...] |
H A D | filbuf.c | 41 __filbuf(FILE *iop) in __filbuf() argument 43 return (_filbuf(iop)); in __filbuf() 47 _filbuf(FILE *iop) in _filbuf() argument 50 if ( !(iop->_flag & _IOREAD) ) in _filbuf() 51 if (iop->_flag & _IORW) in _filbuf() 52 iop->_flag |= _IOREAD; in _filbuf() 56 if (iop->_flag&(_IOSTRG|_IOEOF)) in _filbuf() 59 if (iop->_base == NULL) /* get buffer if we don't have one */ in _filbuf() 60 _findbuf(iop); in _filbuf() 62 if (iop in _filbuf() [all...] |
H A D | vfprintf.c | 39 vfprintf(FILE *iop, char *format, va_list ap) in vfprintf() argument 44 if (!(iop->_flag & _IOWRT)) { in vfprintf() 46 if (iop->_flag & _IORW) { in vfprintf() 48 iop->_flag |= _IOWRT; in vfprintf() 54 if (iop->_flag & _IONBF) { in vfprintf() 55 iop->_flag &= ~_IONBF; in vfprintf() 56 iop->_ptr = iop->_base = localbuf; in vfprintf() 57 iop->_bufsiz = BUFSIZ; in vfprintf() 58 count = _doprnt(format, ap, iop); in vfprintf() [all...] |
H A D | fprintf.c | 39 fprintf(FILE *iop, char *format, ...) in fprintf() argument 45 if (!(iop->_flag & _IOWRT)) { in fprintf() 47 if (iop->_flag & _IORW) { in fprintf() 49 iop->_flag |= _IOWRT; in fprintf() 56 if (iop->_flag & _IONBF) { in fprintf() 57 iop->_flag &= ~_IONBF; in fprintf() 58 iop->_ptr = iop->_base = localbuf; in fprintf() 59 iop->_bufsiz = BUFSIZ; in fprintf() 60 count = _doprnt(format, ap, iop); in fprintf() [all...] |
/titanic_51/usr/src/lib/libbc/libc/stdio/sys5/ |
H A D | flsbuf.c | 67 fclose(FILE *iop) in fclose() argument 71 if(iop == NULL) in fclose() 73 if(iop->_flag & (_IOREAD | _IOWRT | _IORW) in fclose() 74 && (iop->_flag & _IOSTRG) == 0) { in fclose() 75 rtn = (iop->_flag & _IONBF)? 0: fflush(iop); in fclose() 76 if(close(fileno(iop)) < 0) in fclose() 79 if(iop->_flag & _IOMYBUF) { in fclose() 80 free((char*)iop->_base); in fclose() 81 iop in fclose() 98 fflush(FILE * iop) fflush() argument 127 _flsbuf(unsigned char c,FILE * iop) _flsbuf() argument 183 _xflsbuf(FILE * iop) _xflsbuf() argument 207 _wrtchk(FILE * iop) _wrtchk() argument 232 _findbuf(FILE * iop) _findbuf() argument 282 _bufsync(FILE * iop) _bufsync() argument [all...] |
H A D | filbuf.c | 41 __filbuf(FILE *iop) in __filbuf() argument 43 return (_filbuf(iop)); in __filbuf() 47 _filbuf(FILE *iop) in _filbuf() argument 49 if ( !(iop->_flag & _IOREAD) ) in _filbuf() 50 if (iop->_flag & _IORW) in _filbuf() 51 iop->_flag |= _IOREAD; in _filbuf() 55 if (iop->_flag&_IOSTRG) in _filbuf() 58 if (iop->_base == NULL) /* get buffer if we don't have one */ in _filbuf() 59 _findbuf(iop); in _filbuf() 64 if (iop in _filbuf() 84 lbfflush(FILE * iop) lbfflush() argument [all...] |
H A D | vfprintf.c | 39 vfprintf(FILE *iop, char *format, va_list ap) in vfprintf() argument 44 if (!(iop->_flag & _IOWRT)) { in vfprintf() 46 if (iop->_flag & _IORW) { in vfprintf() 48 iop->_flag |= _IOWRT; in vfprintf() 54 if (iop->_flag & _IONBF) { in vfprintf() 55 iop->_flag &= ~_IONBF; in vfprintf() 56 iop->_ptr = iop->_base = localbuf; in vfprintf() 57 iop->_bufsiz = BUFSIZ; in vfprintf() 58 count = _doprnt(format, ap, iop); in vfprintf() [all...] |
H A D | fprintf.c | 39 fprintf(FILE *iop, char *format, ...) in fprintf() argument 45 if (!(iop->_flag & _IOWRT)) { in fprintf() 47 if (iop->_flag & _IORW) { in fprintf() 49 iop->_flag |= _IOWRT; in fprintf() 56 if (iop->_flag & _IONBF) { in fprintf() 57 iop->_flag &= ~_IONBF; in fprintf() 58 iop->_ptr = iop->_base = localbuf; in fprintf() 59 iop->_bufsiz = BUFSIZ; in fprintf() 60 count = _doprnt(format, ap, iop); in fprintf() [all...] |
H A D | setbuf.c | 41 setbuf(iop, buf) in setbuf() argument 42 register FILE *iop; in setbuf() 45 register int fno = fileno(iop); /* file number */ 47 if(iop->_base != NULL && iop->_flag & _IOMYBUF) 48 free((char*)iop->_base); 49 iop->_flag &= ~(_IOMYBUF | _IONBF | _IOLBF); 50 if((iop->_base = (unsigned char*)buf) == NULL) { 51 iop->_flag |= _IONBF; /* file unbuffered except in fastio */ 53 iop [all...] |
/titanic_51/usr/src/lib/libc/port/stdio/ |
H A D | flush.c | 195 * We also automatically skip non allocated iop's. in _flushlbf() 267 * for finer granularity, use fp->_lock for allocating an iop in _findiop() 387 isseekable(FILE *iop) in isseekable() argument 394 if (fstat64(GET_FD(iop), &fstatbuf) != 0) { in isseekable() 400 SET_SEEKABLE(iop); in isseekable() 413 CLEAR_SEEKABLE(iop); in isseekable() 415 SET_SEEKABLE(iop); in isseekable() 423 _setbufend(FILE *iop, Uchar *end) /* set the end pointer for this iop */ in _setbufend() argument 425 iop in _setbufend() 433 _realbufend(FILE * iop) _realbufend() argument 452 getxfdat(FILE * iop) getxfdat() argument 463 _setbufend(FILE * iop,Uchar * end) _setbufend() argument 483 _realbufend(FILE * iop) _realbufend() argument 500 _reallock(FILE * iop) _reallock() argument 512 _bufsync(FILE * iop,Uchar * bufend) _bufsync() argument 526 _xflsbuf(FILE * iop) _xflsbuf() argument 564 fflush(FILE * iop) fflush() argument 659 _fflush_u(FILE * iop) _fflush_u() argument 686 fclose(FILE * iop) fclose() argument 774 close_fd(FILE * iop) close_fd() argument 832 _getmbstate(FILE * iop) _getmbstate() argument 854 _file_get(FILE * iop) _file_get() argument 887 _file_set(FILE * iop,int fd,const char * type) _file_set() argument [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) in fwrite() argument 54 FLOCKFILE(lk, iop); in fwrite() 56 _SET_ORIENTATION_BYTE(iop); in fwrite() 58 retval = _fwrite_unlocked(ptr, size, count, iop); in fwrite() 65 _fwrite_unlocked(const void *ptr, size_t size, size_t count, FILE *iop) in _fwrite_unlocked() argument 71 if (_WRTCHK(iop)) in _fwrite_unlocked() 84 if (iop->_flag & _IOLBF) { in _fwrite_unlocked() 85 bufend = _bufend(iop); in _fwrite_unlocked() 86 iop in _fwrite_unlocked() [all...] |
H A D | fopen.c | 63 FILE *iop; in fopen() local 66 iop = _findiop(); in fopen() 68 * Note that iop is not locked here, since no other thread could in fopen() 69 * possibly call _endopen with the same iop at this point. in fopen() 71 rc = _endopen(name, type, iop, LARGE_OPEN); in fopen() 73 if (rc == NULL && iop != NULL) in fopen() 74 iop->_flag = 0; /* release iop */ in fopen() 80 _freopen_null(const char *type, FILE *iop) in _freopen_null() argument 86 if (iop in _freopen_null() 197 freopen(const char * name,const char * type,FILE * iop) freopen() argument [all...] |
H A D | _filbuf.c | 54 _filbuf(FILE *iop) in _filbuf() argument 65 if (!(iop->_flag & _IOREAD)) /* check, correct permissions */ in _filbuf() 67 if (iop->_flag & _IORW) in _filbuf() 68 iop->_flag |= _IOREAD; /* change direction */ in _filbuf() 76 if (iop->_base == 0) { in _filbuf() 77 if ((endbuf = _findbuf(iop)) == 0) /* get buffer and */ in _filbuf() 82 endbuf = _bufend(iop); in _filbuf() 88 if (iop->_flag & (_IONBF | _IOLBF)) in _filbuf() 99 if ((flag = iop->_flag) & _IOEOF) { in _filbuf() 103 * therefore iop in _filbuf() [all...] |
H A D | ungetc.c | 41 int _ungetc_unlocked(int c, FILE *iop); 44 ungetc(int c, FILE *iop) in ungetc() argument 46 FLOCKRETURN(iop, _ungetc_unlocked(c, iop)) in ungetc() 51 * iop->_lock is already held at a higher level - required since we do not 55 _ungetc_unlocked(int c, FILE *iop) in _ungetc_unlocked() argument 59 if (iop->_ptr <= iop->_base) { in _ungetc_unlocked() 60 if (iop->_base == 0) { in _ungetc_unlocked() 61 if (_findbuf(iop) in _ungetc_unlocked() [all...] |
H A D | _flsbuf.c | 45 _flsbuf(int ch, FILE *iop) /* flush (write) buffer, save ch, */ in _flsbuf() argument 52 switch (iop->_flag & (_IOFBF | _IOLBF | _IONBF | in _flsbuf() 56 if (iop->_base != 0 && iop->_ptr > iop->_base) in _flsbuf() 60 if (iop->_ptr >= _bufend(iop)) in _flsbuf() 67 if ((*iop->_ptr++ = (unsigned char)ch) == '\n') in _flsbuf() 68 (void) _xflsbuf(iop); in _flsbuf() 69 iop in _flsbuf() [all...] |
H A D | fseeko.c | 57 fseeko64(FILE *iop, off64_t offset, int ptrname) in fseeko64() argument 62 FLOCKFILE(lk, iop); in fseeko64() 63 iop->_flag &= ~_IOEOF; in fseeko64() 65 if (!(iop->_flag & _IOREAD) && !(iop->_flag & (_IOWRT | _IORW))) { in fseeko64() 71 if (iop->_flag & _IOREAD) { in fseeko64() 72 if (ptrname == 1 && iop->_base && !(iop->_flag&_IONBF)) { in fseeko64() 73 offset -= iop->_cnt; in fseeko64() 75 } else if (iop in fseeko64() 93 fseeko(FILE * iop,off_t offset,int ptrname) fseeko() argument [all...] |
H A D | fseek.c | 50 fseek(FILE *iop, long offset, int ptrname) in fseek() argument 55 FLOCKFILE(lk, iop); in fseek() 56 iop->_flag &= ~_IOEOF; in fseek() 58 if (!(iop->_flag & _IOREAD) && !(iop->_flag & (_IOWRT | _IORW))) { in fseek() 64 if (iop->_flag & _IOREAD) { in fseek() 65 if (ptrname == 1 && iop->_base && !(iop->_flag&_IONBF)) { in fseek() 66 offset -= iop->_cnt; in fseek() 68 } else if (iop in fseek() [all...] |
/titanic_51/usr/src/lib/libbc/libc/stdio/common/ |
H A D | fseek.c | 42 fseek(iop, offset, ptrname) in fseek() argument 43 register FILE *iop; in fseek() 50 iop->_flag &= ~_IOEOF; 51 if(iop->_flag & _IOREAD) { 52 if(ptrname < 2 && iop->_base && !(iop->_flag&_IONBF)) { 53 c = iop->_cnt; 56 long curpos = lseek(fileno(iop), 0L, 1); 65 if(!(iop->_flag&_IORW) && c > 0 && p <= c && 66 p >= iop [all...] |
H A D | setbuffer.c | 46 setbuffer(FILE *iop, char *buf, int size) in setbuffer() argument 48 int fno = fileno(iop); /* file number */ in setbuffer() 50 if (iop->_base != NULL && iop->_flag&_IOMYBUF) in setbuffer() 51 free((char *)iop->_base); in setbuffer() 52 iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF); in setbuffer() 53 if ((iop->_base = (unsigned char *)buf) == NULL) { in setbuffer() 54 iop->_flag |= _IONBF; /* file unbuffered except in fastio */ in setbuffer() 56 iop->_base = _smbuf[fno]; in setbuffer() 57 iop in setbuffer() 72 setlinebuf(FILE * iop) setlinebuf() argument [all...] |
H A D | fwrite.c | 49 fwrite(ptr, size, count, iop) in fwrite() argument 52 register FILE *iop; 59 if (size <= 0 || count <= 0 || _WRTCHK(iop)) 62 bufend = iop->_base + iop->_bufsiz; 65 /* if the file is unbuffered, or if the iop->ptr = iop->base, and there 67 prev_ptr = iop->_ptr; 68 if (iop->_base >= iop [all...] |
H A D | stdiom.h | 33 #define _BUFSYNC(iop) if ((iop->_base + iop->_bufsiz) - iop->_ptr < \ argument 34 ( iop->_cnt < 0 ? 0 : iop->_cnt ) ) \ 35 _bufsync(iop) 36 #define _WRTCHK(iop) ((((iop->_flag & (_IOWRT | _IOEOF)) != _IOWRT) \ argument 37 || (iop [all...] |
/titanic_51/usr/src/ucblib/libucb/port/stdio/ |
H A D | fopen.c | 55 _endopen(const char *file, const char *mode, FILE *iop, int largefile) in _endopen() argument 59 if (iop == NULL || file == NULL || file[0] == '\0') in _endopen() 83 iop->_cnt = 0; in _endopen() 85 iop->_file = fd; in _endopen() 88 SET_FILE(iop, fd); in _endopen() 89 } else if (_file_set(iop, fd, mode) != 0) { in _endopen() 95 iop->_flag = plus ? _IORW : (mode[0] == 'r') ? _IOREAD : _IOWRT; in _endopen() 102 iop->_base = iop->_ptr = NULL; in _endopen() 106 * iop in _endopen() 114 FILE *iop; fopen() local 133 FILE *iop; fopen64() local 145 freopen(const char * file,const char * mode,FILE * iop) freopen() argument 153 freopen64(const char * file,const char * mode,FILE * iop) freopen64() argument [all...] |
/titanic_51/usr/src/lib/libc/port/locale/ |
H A D | ungetwc.c | 38 * associated with an input stream "iop". That character, c, 55 __ungetwc_impl(wint_t wc, FILE *iop, int orient) in __ungetwc_impl() argument 62 FLOCKFILE(lk, iop); in __ungetwc_impl() 64 if (orient && GET_NO_MODE(iop)) { in __ungetwc_impl() 65 _setorientation(iop, _WC_MODE); in __ungetwc_impl() 67 if ((wc == WEOF) || ((iop->_flag & _IOREAD) == 0)) { in __ungetwc_impl() 78 if (iop->_ptr <= iop->_base) { in __ungetwc_impl() 79 if (iop->_base == NULL) { in __ungetwc_impl() 83 if (iop in __ungetwc_impl() 103 __ungetwc_xpg5(wint_t wc,FILE * iop) __ungetwc_xpg5() argument 109 ungetwc(wint_t wc,FILE * iop) ungetwc() argument [all...] |
/titanic_51/usr/src/ucblib/libucb/inc/ |
H A D | stdiom.h | 76 #define _bufend(iop) _realbufend(iop) argument 77 #define setbufend(iop, end) _setbufend(iop, end) argument 85 extern Uchar *_realbufend(FILE *iop); 86 extern void _setbufend(FILE *iop, Uchar *end); 87 extern int _wrtchk(FILE *iop); 92 extern void _bufsync(FILE *iop, Uchar *bufend); 93 extern int _xflsbuf(FILE *iop); 98 extern Uchar *_findbuf(FILE *iop); 102 SET_FILE(iop,fd) global() argument 117 _WRTCHK(iop) global() argument [all...] |