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

123456

/illumos-gate/usr/src/lib/libbc/libc/stdio/common/
H A Dstdiom.h33 #define _BUFSYNC(iop) if ((iop->_base + iop->_bufsiz) - iop->_ptr < \
34 ( iop->_cnt < 0 ? 0 : iop->_cnt ) ) \
35 _bufsync(iop)
36 #define _WRTCHK(iop) ((((iop->_flag & (_IOWRT | _IOEOF)) != _IOWRT) \
37 || (iop
[all...]
H A Drew.c34 rewind(iop)
35 register FILE *iop;
37 (void) fflush(iop);
38 (void) lseek(fileno(iop), 0L, 0);
39 iop->_cnt = 0;
40 iop->_ptr = iop->_base;
41 iop->_flag &= ~(_IOERR | _IOEOF);
42 if(iop->_flag & _IORW)
43 iop
[all...]
H A Dungetc.c36 ungetc(c, iop)
38 register FILE *iop;
42 if((iop->_flag & (_IOREAD|_IORW)) == 0)
45 if (iop->_base == NULL) /* get buffer if we don't have one */
46 _findbuf(iop);
48 if((iop->_flag & _IOREAD) == 0 || iop->_ptr <= iop->_base)
49 if(iop->_ptr == iop
[all...]
H A Dsetbuffer.c46 setbuffer(FILE *iop, char *buf, int size) argument
48 int fno = fileno(iop); /* file number */
50 if (iop->_base != NULL && iop->_flag&_IOMYBUF)
51 free((char *)iop->_base);
52 iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF);
53 if ((iop->_base = (unsigned char *)buf) == NULL) {
54 iop->_flag |= _IONBF; /* file unbuffered except in fastio */
56 iop->_base = _smbuf[fno];
57 iop
72 setlinebuf(FILE *iop) argument
[all...]
H A Dftell.c42 ftell(iop)
43 register FILE *iop;
48 if(iop->_cnt < 0)
49 iop->_cnt = 0;
50 if(iop->_flag & _IOREAD)
51 adjust = - iop->_cnt;
52 else if(iop->_flag & (_IOWRT | _IORW)) {
54 if(iop->_flag & _IOWRT && iop->_base &&
55 (iop
[all...]
H A Dfseek.c42 fseek(iop, offset, ptrname)
43 register FILE *iop;
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 Dclrerr.c32 clearerr(iop)
33 register FILE *iop;
35 iop->_flag &= ~(_IOERR | _IOEOF);
/illumos-gate/usr/src/lib/libbc/libc/stdio/4.2/
H A Dsetbuf.c41 setbuf(iop, buf)
42 register FILE *iop;
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...]
H A Dflsbuf.c69 fclose(FILE *iop) argument
73 if(iop == NULL)
75 if(iop->_flag & (_IOREAD | _IOWRT | _IORW)
76 && (iop->_flag & _IOSTRG) == 0) {
77 rtn = (iop->_flag & _IONBF)? 0: fflush(iop);
78 if(close(fileno(iop)) < 0)
81 if(iop->_flag & _IOMYBUF) {
82 free((char*)iop->_base);
83 iop
100 fflush(FILE *iop) argument
124 _flsbuf(unsigned char c, FILE *iop) argument
179 _xflsbuf(FILE *iop) argument
202 _wrtchk(FILE *iop) argument
227 _findbuf(FILE *iop) argument
277 _bufsync(FILE *iop) argument
[all...]
H A Dfprintf.c39 fprintf(FILE *iop, char *format, ...) argument
45 if (!(iop->_flag & _IOWRT)) {
47 if (iop->_flag & _IORW) {
49 iop->_flag |= _IOWRT;
56 if (iop->_flag & _IONBF) {
57 iop->_flag &= ~_IONBF;
58 iop->_ptr = iop->_base = localbuf;
59 iop->_bufsiz = BUFSIZ;
60 count = _doprnt(format, ap, iop);
[all...]
H A Dvfprintf.c39 vfprintf(FILE *iop, char *format, va_list ap) argument
44 if (!(iop->_flag & _IOWRT)) {
46 if (iop->_flag & _IORW) {
48 iop->_flag |= _IOWRT;
54 if (iop->_flag & _IONBF) {
55 iop->_flag &= ~_IONBF;
56 iop->_ptr = iop->_base = localbuf;
57 iop->_bufsiz = BUFSIZ;
58 count = _doprnt(format, ap, iop);
[all...]
H A Dfilbuf.c41 __filbuf(FILE *iop) argument
43 return (_filbuf(iop));
47 _filbuf(FILE *iop) argument
50 if ( !(iop->_flag & _IOREAD) )
51 if (iop->_flag & _IORW)
52 iop->_flag |= _IOREAD;
56 if (iop->_flag&(_IOSTRG|_IOEOF))
59 if (iop->_base == NULL) /* get buffer if we don't have one */
60 _findbuf(iop);
62 if (iop
[all...]
/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 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 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 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...]
/illumos-gate/usr/src/lib/libbc/libc/stdio/sys5/
H A Dfilbuf.c41 __filbuf(FILE *iop) argument
43 return (_filbuf(iop));
47 _filbuf(FILE *iop) argument
49 if ( !(iop->_flag & _IOREAD) )
50 if (iop->_flag & _IORW)
51 iop->_flag |= _IOREAD;
55 if (iop->_flag&_IOSTRG)
58 if (iop->_base == NULL) /* get buffer if we don't have one */
59 _findbuf(iop);
64 if (iop
84 lbfflush(FILE *iop) argument
[all...]
H A Dfprintf.c39 fprintf(FILE *iop, char *format, ...) argument
45 if (!(iop->_flag & _IOWRT)) {
47 if (iop->_flag & _IORW) {
49 iop->_flag |= _IOWRT;
56 if (iop->_flag & _IONBF) {
57 iop->_flag &= ~_IONBF;
58 iop->_ptr = iop->_base = localbuf;
59 iop->_bufsiz = BUFSIZ;
60 count = _doprnt(format, ap, iop);
[all...]
H A Dvfprintf.c39 vfprintf(FILE *iop, char *format, va_list ap) argument
44 if (!(iop->_flag & _IOWRT)) {
46 if (iop->_flag & _IORW) {
48 iop->_flag |= _IOWRT;
54 if (iop->_flag & _IONBF) {
55 iop->_flag &= ~_IONBF;
56 iop->_ptr = iop->_base = localbuf;
57 iop->_bufsiz = BUFSIZ;
58 count = _doprnt(format, ap, iop);
[all...]
H A Dsetbuf.c41 setbuf(iop, buf)
42 register FILE *iop;
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...]
H A Dflsbuf.c67 fclose(FILE *iop) argument
71 if(iop == NULL)
73 if(iop->_flag & (_IOREAD | _IOWRT | _IORW)
74 && (iop->_flag & _IOSTRG) == 0) {
75 rtn = (iop->_flag & _IONBF)? 0: fflush(iop);
76 if(close(fileno(iop)) < 0)
79 if(iop->_flag & _IOMYBUF) {
80 free((char*)iop->_base);
81 iop
98 fflush(FILE *iop) argument
127 _flsbuf(unsigned char c, FILE *iop) argument
183 _xflsbuf(FILE *iop) argument
207 _wrtchk(FILE *iop) argument
232 _findbuf(FILE *iop) argument
282 _bufsync(FILE *iop) argument
[all...]
/illumos-gate/usr/src/lib/libc/inc/
H A Dstdiom.h61 #define SET_IONOLOCK(iop) ((iop)->_flag |= _IONOLOCK)
62 #define CLEAR_IONOLOCK(iop) ((iop)->_flag &= ~_IONOLOCK)
63 #define GET_IONOLOCK(iop) ((iop)->_flag & _IONOLOCK)
64 #define SET_BYTE_MODE(iop) ((iop)->_flag |= _BYTE_MODE_FLAG)
65 #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...]

Completed in 378 milliseconds

123456