Searched refs:iop (Results 1 - 25 of 78) sorted by relevance

1234

/osnet-11/usr/src/lib/libc/port/stdio/
H A D_wrtchk.c41 _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 Drewind.c45 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 Dungetc.c41 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 Dgetc.c48 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 Dputc.c48 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.c54 _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 Dfseeko.c57 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 Dflockf.c55 _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 Dsetbuffer.c43 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.c45 _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 Dfgets.c46 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 Dfseek.c50 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 Dfwrite.c46 _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 Dgetchar.c51 FILE *iop = stdin; local
53 return (getc(iop));
63 FILE *iop = stdin; local
65 return (GETC(iop));
H A Dputchar.c50 FILE *iop = stdout; local
52 return (putc(ch, iop));
65 FILE *iop = stdout; local
67 return (PUTC(ch, iop));
H A Dftell.c53 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 Dfopen.c63 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 Dfdopen.c58 /* 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 Dftello.c61 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 Dsetbuf.c44 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 Dfread.c47 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 Dstdiom.h59 #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.c37 * 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.c41 __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 Dvfprintf.c55 _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...]

Completed in 23 milliseconds

1234