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

12345

/illumos-gate/usr/src/lib/libc/port/stdio/
H A D_wrtchk.c43 _wrtchk(FILE *iop) argument
45 if ((iop->_flag & (_IOWRT | _IOEOF)) != _IOWRT) {
46 if (!(iop->_flag & (_IOWRT | _IORW))) {
47 iop->_flag |= _IOERR;
51 iop->_flag = (iop->_flag & ~_IOEOF) | _IOWRT;
55 if (iop->_base == NULL && _findbuf(iop) == NULL)
57 else if ((iop->_ptr == iop
[all...]
H A Dgetc.c46 getc(FILE *iop) argument
51 FLOCKFILE(lk, iop);
52 c = getc_unlocked(iop);
59 getc_unlocked(FILE *iop) argument
61 _SET_ORIENTATION_BYTE(iop);
62 return ((--iop->_cnt < 0) ? __filbuf(iop) : *iop->_ptr++);
66 _getc_internal(FILE *iop) argument
68 return ((--iop
[all...]
H A Drewind.c43 rewind(FILE *iop) argument
47 FLOCKFILE(lk, iop);
48 _rewind_unlocked(iop);
53 _rewind_unlocked(FILE *iop) argument
55 (void) _fflush_u(iop);
56 (void) _xseek64(iop, 0, SEEK_SET);
57 iop->_cnt = 0;
58 iop->_ptr = iop->_base;
59 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 Dmse.c49 * This function/macro gets the orientation bound to the specified iop.
52 * _WC_MODE if iop has been bound to Wide orientation
53 * _BYTE_MODE if iop has been bound to Byte orientation
54 * _NO_MODE if iop has been bound to neither Wide nor Byte
57 _getorientation(FILE *iop) argument
59 if (GET_BYTE_MODE(iop))
61 else if (GET_WC_MODE(iop))
69 * This function/macro sets the orientation to the specified iop.
78 _setorientation(FILE *iop, _IOP_orientation_t mode) argument
82 CLEAR_BYTE_MODE(iop);
[all...]
H A D_filbuf.c51 _filbuf(FILE *iop) argument
62 if (!(iop->_flag & _IOREAD)) { /* check, correct permissions */
63 if (iop->_flag & _IORW) {
64 iop->_flag |= _IOREAD; /* change direction */
72 if (iop->_base == 0) {
74 if ((endbuf = _findbuf(iop)) == 0) {
78 endbuf = _bufend(iop);
85 if (iop->_flag & (_IONBF | _IOLBF))
96 if ((flag = iop->_flag) & _IOEOF) {
100 * therefore iop
[all...]
H A Dfseeko.c55 fseeko64(FILE *iop, off64_t offset, int ptrname) argument
60 FLOCKFILE(lk, iop);
61 iop->_flag &= ~_IOEOF;
63 if (!(iop->_flag & _IOREAD) && !(iop->_flag & (_IOWRT | _IORW))) {
69 if (iop->_flag & _IOREAD) {
70 if (ptrname == 1 && iop->_base && !(iop->_flag&_IONBF)) {
71 offset -= iop->_cnt;
73 } else if (iop
91 fseeko(FILE *iop, off_t offset, int ptrname) argument
[all...]
H A Dftell.c51 ftell_common(FILE *iop) argument
57 FLOCKFILE(lk, iop);
67 if (_get_fd(iop) == -1) {
68 (void) _fflush_u(iop);
71 if (iop->_cnt < 0)
72 iop->_cnt = 0;
73 if (iop->_flag & _IOREAD) {
74 adjust = (ptrdiff_t)-iop->_cnt;
75 } else if (iop->_flag & (_IOWRT | _IORW)) {
77 if (((iop
98 ftell(FILE *iop) 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 Dputc.c46 putc(int ch, FILE *iop) argument
51 FLOCKFILE(lk, iop);
52 ret = putc_unlocked(ch, iop);
58 putc_unlocked(int ch, FILE *iop) argument
60 _SET_ORIENTATION_BYTE(iop);
62 if (--iop->_cnt < 0)
63 return (__flsbuf((unsigned char) ch, iop));
65 return (*iop->_ptr++ = (unsigned char)ch);
69 _putc_internal(int ch, FILE *iop) argument
71 if (--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 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 D_flsbuf.c47 _flsbuf(int ch, FILE *iop) argument
52 switch (iop->_flag & (_IOFBF | _IOLBF | _IONBF |
55 if (iop->_base != 0 && iop->_ptr > iop->_base)
59 if (iop->_ptr >= _bufend(iop))
66 if ((*iop->_ptr++ = (unsigned char)ch) == '\n')
67 (void) _xflsbuf(iop);
68 iop
[all...]
H A Dfseek.c48 fseek(FILE *iop, long offset, int ptrname) argument
53 FLOCKFILE(lk, iop);
54 iop->_flag &= ~_IOEOF;
56 if (!(iop->_flag & _IOREAD) && !(iop->_flag & (_IOWRT | _IORW))) {
62 if (iop->_flag & _IOREAD) {
63 if (ptrname == 1 && iop->_base && !(iop->_flag&_IONBF)) {
64 offset -= iop->_cnt;
66 } else if (iop
[all...]
H A Dfwrite.c44 _fwrite_unlocked(const void *ptr, size_t size, size_t count, FILE *iop);
47 fwrite(const void *ptr, size_t size, size_t count, FILE *iop) argument
52 FLOCKFILE(lk, iop);
54 _SET_ORIENTATION_BYTE(iop);
56 retval = _fwrite_unlocked(ptr, size, count, iop);
63 _fwrite_unlocked(const void *ptr, size_t size, size_t count, FILE *iop) argument
69 if (_WRTCHK(iop))
82 if (iop->_flag & _IOLBF) {
83 bufend = _bufend(iop);
84 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 Dfopen.c65 FILE *iop; local
68 iop = _findiop();
70 * Note that iop is not locked here, since no other thread could
71 * possibly call _endopen with the same iop at this point.
73 rc = _endopen(name, type, iop, LARGE_OPEN);
75 if (rc == NULL && iop != NULL)
76 iop->_flag = 0; /* release iop */
82 _freopen_null(const char *type, FILE *iop) argument
88 if (iop
210 freopen(const char *name, const char *type, FILE *iop) argument
[all...]
/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)
[all...]
/illumos-gate/usr/src/lib/libc/port/locale/
H A Dungetwc.c38 * associated with an input stream "iop". That character, c,
55 __ungetwc_impl(wint_t wc, FILE *iop, int orient) argument
62 FLOCKFILE(lk, iop);
64 if (orient && GET_NO_MODE(iop)) {
65 _setorientation(iop, _WC_MODE);
67 if ((wc == WEOF) || ((iop->_flag & _IOREAD) == 0)) {
78 if (iop->_ptr <= iop->_base) {
79 if (iop->_base == NULL) {
83 if (iop
103 __ungetwc_xpg5(wint_t wc, FILE *iop) argument
109 ungetwc(wint_t wc, FILE *iop) argument
[all...]
/illumos-gate/usr/src/ucblib/libucb/inc/
H A Dstdiom.h76 #define _bufend(iop) _realbufend(iop)
77 #define setbufend(iop, end) _setbufend(iop, end)
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);
[all...]
/illumos-gate/usr/src/ucblib/libucb/port/stdio/
H A Dvfprintf.c51 vfprintf(FILE *iop, const char *format, va_list ap) argument
55 if (!(iop->_flag & _IOWRT)) {
57 if (iop->_flag & _IORW) {
59 iop->_flag |= _IOWRT;
65 count = _doprnt((char *) format, ap, iop);
/illumos-gate/usr/src/ucblib/libucb/port/gen/
H A Dsetbuffer.c50 setbuffer(FILE *iop, char *abuf, int asize) argument
53 int fno = fileno(iop); /* file number */
57 if (iop->_base != 0 && iop->_flag & _IOMYBUF)
58 free((char *)iop->_base - PUSHBACK);
59 iop->_flag &= ~(_IOMYBUF | _IONBF | _IOLBF);
61 iop->_flag |= _IONBF;
71 iop->_flag |= _IOMYBUF;
81 iop->_base = temp;
82 _setbufend(iop, tem
92 setlinebuf(FILE *iop) argument
[all...]
/illumos-gate/usr/src/lib/libc/port/print/
H A Dvfprintf.c57 _vfprintf_c89(FILE *iop, const char *format, va_list ap) argument
59 vfprintf(FILE *iop, const char *format, va_list ap)
66 FLOCKFILE(lk, iop);
68 _SET_ORIENTATION_BYTE(iop);
70 if (!(iop->_flag & _IOWRT)) {
72 if (iop->_flag & _IORW) {
74 iop->_flag |= _IOWRT;
83 count = _ndoprnt(format, ap, iop, _F_INTMAX32);
85 count = _ndoprnt(format, ap, iop, 0);
89 if (FERROR(iop) || coun
[all...]
/illumos-gate/usr/src/cmd/bhyve/
H A Dinout.c104 struct inout_port iop; local
108 bzero(&iop, sizeof(iop));
109 iop.name = "default";
110 iop.port = start;
111 iop.size = size;
112 iop.flags = IOPORT_F_INOUT | IOPORT_F_DEFAULT;
113 iop.handler = default_inout;
115 register_inout(&iop);
155 struct inout_port **iopp, *iop; local
176 register_inout(struct inout_port *iop) argument
204 unregister_inout(struct inout_port *iop) argument
[all...]

Completed in 84 milliseconds

12345