Home
last modified time | relevance | path

Searched refs:_flag (Results 1 – 25 of 71) sorted by relevance

123

/illumos-gate/usr/src/lib/libc/port/stdio/
H A Dfopen.c76 iop->_flag = 0; /* release iop */ in fopen()
88 if (iop == NULL || iop->_flag == 0) { in _freopen_null()
104 if (!(iop->_flag & _IONBF) && (iop->_flag & (_IOWRT | _IOREAD | _IORW))) in _freopen_null()
107 if (iop->_flag & _IOMYBUF) { in _freopen_null()
156 iop->_flag &= ~_DEF_FLAG_MASK; /* clear lower 8-bits */ in _freopen_null()
158 iop->_flag |= _IOREAD; in _freopen_null()
161 iop->_flag |= _IOWRT; in _freopen_null()
164 iop->_flag |= _IOWRT; in _freopen_null()
168 iop->_flag = (iop->_flag & ~(_IOREAD | _IOWRT)) | _IORW; in _freopen_null()
172 iop->_flag = _IOREAD; in _freopen_null()
[all …]
H A Dfseek.c54 iop->_flag &= ~_IOEOF; in fseek()
56 if (!(iop->_flag & _IOREAD) && !(iop->_flag & (_IOWRT | _IORW))) { in fseek()
62 if (iop->_flag & _IOREAD) { in fseek()
63 if (ptrname == 1 && iop->_base && !(iop->_flag&_IONBF)) { in fseek()
66 } else if (iop->_flag & (_IOWRT | _IORW)) { in fseek()
74 if (iop->_flag & _IORW) { in fseek()
75 iop->_flag &= ~(_IOREAD | _IOWRT); in fseek()
H A Dfseeko.c61 iop->_flag &= ~_IOEOF; in fseeko64()
63 if (!(iop->_flag & _IOREAD) && !(iop->_flag & (_IOWRT | _IORW))) { in fseeko64()
69 if (iop->_flag & _IOREAD) { in fseeko64()
70 if (ptrname == 1 && iop->_base && !(iop->_flag&_IONBF)) { in fseeko64()
73 } else if (iop->_flag & (_IOWRT | _IORW)) { in fseeko64()
81 if (iop->_flag & _IORW) { in fseeko64()
82 iop->_flag &= ~(_IOREAD | _IOWRT); in fseeko64()
H A D_filbuf.c62 if (!(iop->_flag & _IOREAD)) { /* check, correct permissions */ in _filbuf()
63 if (iop->_flag & _IORW) { in _filbuf()
64 iop->_flag |= _IOREAD; /* change direction */ in _filbuf()
85 if (iop->_flag & (_IONBF | _IOLBF)) in _filbuf()
96 if ((flag = iop->_flag) & _IOEOF) { in _filbuf()
125 iop->_flag |= _IOEOF; in _filbuf()
127 iop->_flag |= _IOERR; in _filbuf()
H A D_wrtchk.c43 if ((iop->_flag & (_IOWRT | _IOEOF)) != _IOWRT) { in _wrtchk()
44 if (!(iop->_flag & (_IOWRT | _IORW))) { in _wrtchk()
45 iop->_flag |= _IOERR; in _wrtchk()
49 iop->_flag = (iop->_flag & ~_IOEOF) | _IOWRT; in _wrtchk()
56 !(iop->_flag & (_IOLBF | _IONBF))) { in _wrtchk()
H A Dflush.c201 if ((fp->_flag & (_IOLBF | _IOWRT | _IONBF)) == in _flushlbf()
208 if ((fp->_flag & (_IOLBF | _IOWRT)) == in _flushlbf()
383 fp->_flag = _DEF_FLAG_MASK; in _findiop()
551 if (iop->_flag & (_IOLBF | _IONBF)) in _xflsbuf()
563 iop->_flag |= _IOERR; in _xflsbuf()
628 unsigned int flag = iop->_flag; in _fflush_l_iops()
640 if (!(iop->_flag & _IONBF)) { in _fflush_l_iops()
646 if (iop->_flag & _IOWRT) { in _fflush_l_iops()
649 } else if (iop->_flag & _IOREAD) { in _fflush_l_iops()
675 if (!(iop->_flag & _IOWRT)) { in _fflush_u()
[all …]
H A Dsetvbuf.c46 int sflag = iop->_flag & _IOMYBUF; in setvbuf()
51 iop->_flag &= ~(_IOMYBUF | _IONBF | _IOLBF); in setvbuf()
55 iop->_flag |= _IONBF; /* file is unbuffered */ in setvbuf()
65 iop->_flag |= _IOMYBUF; in setvbuf()
75 iop->_flag |= type; /* buffer file */ in setvbuf()
87 iop->_flag |= _IOMYBUF; in setvbuf()
H A D__extensions.c42 return (stream->_flag & _IOREAD); in __freading()
53 return (stream->_flag & _IOWRT); in __fwriting()
62 return (stream->_flag & (_IOREAD|_IORW)); in __freadable()
71 return (stream->_flag & (_IOWRT|_IORW)); in __fwritable()
80 return (stream->_flag & _IOLBF); in __flbf()
H A D_findbuf.c73 if (iop->_flag & _IONBF) { /* need a small buffer, at least */ in _findbuf()
80 iop->_flag |= _IOMYBUF; in _findbuf()
101 iop->_flag |= _IOMYBUF; in _findbuf()
112 if (!(iop->_flag & _IONBF) && tty != 0) in _findbuf()
113 iop->_flag |= _IOLBF; in _findbuf()
H A Dsetbuf.c56 if ((iop->_base != NULL) && (iop->_flag & _IOMYBUF)) in setbuf()
58 iop->_flag &= ~(_IOMYBUF | _IONBF | _IOLBF); in setbuf()
60 iop->_flag |= _IONBF; in setbuf()
69 iop->_flag |= _IOMYBUF; in setbuf()
81 iop->_flag |= _IOLBF; in setbuf()
H A D_flsbuf.c52 switch (iop->_flag & (_IOFBF | _IOLBF | _IONBF | in _flsbuf()
75 iop->_flag |= _IOERR; in _flsbuf()
82 } while (iop->_flag & (_IOLBF | _IONBF)); in _flsbuf()
88 return ((iop->_flag & _IOERR) ? EOF : (unsigned char)ch); in _flsbuf()
H A Dftell.c73 if (iop->_flag & _IOREAD) { in ftell_common()
75 } else if (iop->_flag & (_IOWRT | _IORW)) { in ftell_common()
77 if (((iop->_flag & (_IOWRT | _IONBF)) == _IOWRT) && in ftell_common()
80 } else if ((iop->_flag & _IORW) && (iop->_base != 0)) { in ftell_common()
H A Drewind.c59 iop->_flag &= ~(_IOERR | _IOEOF); in _rewind_unlocked()
60 if (iop->_flag & _IORW) in _rewind_unlocked()
61 iop->_flag &= ~(_IOREAD | _IOWRT); in _rewind_unlocked()
H A Dfdopen.c72 iop->_flag = 0; /* release iop */ in fdopen()
89 iop->_flag = flag; in fdopen()
98 iop->_flag = 0; /* release iop */ in fdopen()
/illumos-gate/usr/src/lib/libc/inc/
H A Dstdiom.h70 #define SET_IONOLOCK(iop) ((iop)->_flag |= _IONOLOCK)
71 #define CLEAR_IONOLOCK(iop) ((iop)->_flag &= ~_IONOLOCK)
72 #define GET_IONOLOCK(iop) ((iop)->_flag & _IONOLOCK)
73 #define SET_BYTE_MODE(iop) ((iop)->_flag |= _BYTE_MODE_FLAG)
74 #define CLEAR_BYTE_MODE(iop) ((iop)->_flag &= ~_BYTE_MODE_FLAG)
75 #define GET_BYTE_MODE(iop) ((iop)->_flag & _BYTE_MODE_FLAG)
76 #define SET_WC_MODE(iop) ((iop)->_flag |= _WC_MODE_FLAG)
77 #define CLEAR_WC_MODE(iop) ((iop)->_flag &= ~_WC_MODE_FLAG)
78 #define GET_WC_MODE(iop) ((iop)->_flag & _WC_MODE_FLAG)
79 #define GET_NO_MODE(iop) (!((iop)->_flag & \
[all …]
/illumos-gate/usr/src/lib/libc/port/print/
H A Dvwprintf.c72 if (!(stdout->_flag & _IOWRT)) { in _vwprintf_c89()
74 if (stdout->_flag & _IORW) { in _vwprintf_c89()
76 stdout->_flag |= _IOWRT; in _vwprintf_c89()
119 if (!(iop->_flag & _IOWRT)) { in _vfwprintf_c89()
121 if (iop->_flag & _IORW) { in _vfwprintf_c89()
123 iop->_flag |= _IOWRT; in _vfwprintf_c89()
166 siop._flag = _IOREAD; in _vswprintf_c89()
H A Dwprintf.c72 if (!(stdout->_flag & _IOWRT)) { in wprintf()
74 if (stdout->_flag & _IORW) { in wprintf()
76 stdout->_flag |= _IOWRT; in wprintf()
115 if (!(iop->_flag & _IOWRT)) { in fwprintf()
117 if (iop->_flag & _IORW) { in fwprintf()
119 iop->_flag |= _IOWRT; in fwprintf()
156 siop._flag = _IOREAD; in swprintf()
H A Dvprintf.c69 if (!(stdout->_flag & _IOWRT)) { in _vprintf_c89()
71 if (stdout->_flag & _IORW) { in _vprintf_c89()
73 stdout->_flag |= _IOWRT; in _vprintf_c89()
/illumos-gate/usr/src/stand/lib/sa/
H A Dstdio.c53 if ((stream->_flag & flags) != flags) { in fcheck()
67 stream->_flag = 0; in fclose()
88 return ((stream->_flag & F_ERROR) != 0); in ferror()
94 stream->_flag &= ~F_ERROR; in clearerr()
123 stream->_flag |= F_ERROR; in fgets()
186 if ((stream->_flag & F_OPEN) == 0) { in fopen()
192 stream->_flag |= F_OPEN; in fopen()
260 stream->_flag |= F_ERROR; in fread()
315 stream->_flag |= F_ERROR; in fseek()
/illumos-gate/usr/src/ucblib/libucb/port/gen/
H A Dsetbuffer.c57 if (iop->_base != 0 && iop->_flag & _IOMYBUF) in setbuffer()
59 iop->_flag &= ~(_IOMYBUF | _IONBF | _IOLBF); in setbuffer()
61 iop->_flag |= _IONBF; in setbuffer()
71 iop->_flag |= _IOMYBUF; in setbuffer()
101 iop->_flag |= _IOLBF|_IOMYBUF; in setlinebuf()
/illumos-gate/usr/src/ucblib/libucb/port/stdio/
H A Dvprintf.c51 if (!(stdout->_flag & _IOWRT)) { in vprintf()
53 if (stdout->_flag & _IORW) { in vprintf()
55 stdout->_flag |= _IOWRT; in vprintf()
H A Dvfprintf.c53 if (!(iop->_flag & _IOWRT)) { in vfprintf()
55 if (iop->_flag & _IORW) { in vfprintf()
57 iop->_flag |= _IOWRT; in vfprintf()
H A Dprintf.c45 if (!(stdout->_flag & _IOWRT)) { in printf()
47 if (stdout->_flag & _IORW) { in printf()
49 stdout->_flag |= _IOWRT; in printf()
H A Dfprintf.c56 if (!(iop->_flag & _IOWRT)) { in fprintf()
58 if (iop->_flag & _IORW) { in fprintf()
60 iop->_flag |= _IOWRT; in fprintf()
/illumos-gate/usr/src/head/iso/
H A Dstdio_iso.h308 inline void clearerr(FILE *_p) { _p->_flag &= ~(_IOERR | _IOEOF); } in clearerr()
309 inline int feof(FILE *_p) { return _p->_flag & _IOEOF; } in feof()
310 inline int ferror(FILE *_p) { return _p->_flag & _IOERR; } in ferror()
313 #define clearerr(p) ((void)((p)->_flag &= ~(_IOERR | _IOEOF)))
314 #define feof(p) ((p)->_flag & _IOEOF)
315 #define ferror(p) ((p)->_flag & _IOERR)

123