Home
last modified time | relevance | path

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

/bionic/libc/stdio/
Dvasprintf.c36 f._bf._base = f._p = (unsigned char *)malloc(128); in vasprintf()
37 if (f._bf._base == NULL) in vasprintf()
39 f._bf._size = f._w = 127; /* Leave room for the NUL */ in vasprintf()
44 _base = realloc(f._bf._base, ret + 1); in vasprintf()
51 free(f._bf._base); in vasprintf()
Dasprintf.c36 f._bf._base = f._p = (unsigned char *)malloc(128); in asprintf()
37 if (f._bf._base == NULL) in asprintf()
39 f._bf._size = f._w = 127; /* Leave room for the NUL */ in asprintf()
46 _base = realloc(f._bf._base, ret + 1); in asprintf()
53 free(f._bf._base); in asprintf()
Dmakebuf.c57 fp->_bf._base = fp->_p = fp->_nbuf; in __smakebuf()
58 fp->_bf._size = 1; in __smakebuf()
64 fp->_bf._base = fp->_p = fp->_nbuf; in __smakebuf()
65 fp->_bf._size = 1; in __smakebuf()
70 fp->_bf._base = fp->_p = p; in __smakebuf()
71 fp->_bf._size = size; in __smakebuf()
Dwsetup.c62 fp->_p = fp->_bf._base; in __swsetup()
70 if (fp->_bf._base == NULL) { in __swsetup()
82 fp->_lbfsize = -fp->_bf._size; in __swsetup()
84 fp->_w = fp->_flags & __SNBF ? 0 : fp->_bf._size; in __swsetup()
Dwbuf.c72 n = fp->_p - fp->_bf._base; in __swbuf()
73 if (n >= fp->_bf._size) { in __swbuf()
80 if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n')) in __swbuf()
Dfvwrite.c111 size_t blen = fp->_p - fp->_bf._base; in __sfvwrite()
116 _size = fp->_bf._size; in __sfvwrite()
120 _base = realloc(fp->_bf._base, _size + 1); in __sfvwrite()
123 fp->_w += _size - fp->_bf._size; in __sfvwrite()
124 fp->_bf._base = _base; in __sfvwrite()
125 fp->_bf._size = _size; in __sfvwrite()
136 } else if (fp->_p > fp->_bf._base && (int)len > w) { in __sfvwrite()
143 } else if ((int)len >= (w = fp->_bf._size)) { in __sfvwrite()
176 w = fp->_w + fp->_bf._size; in __sfvwrite()
177 if (fp->_p > fp->_bf._base && s > w) { in __sfvwrite()
[all …]
Dsetvbuf.c73 free((void *)fp->_bf._base); in setvbuf()
109 fp->_bf._base = fp->_p = fp->_nbuf; in setvbuf()
110 fp->_bf._size = 1; in setvbuf()
133 fp->_bf._base = fp->_p = (unsigned char *)buf; in setvbuf()
134 fp->_bf._size = size; in setvbuf()
143 fp->_lbfsize = -fp->_bf._size; in setvbuf()
Dfpurge.c56 fp->_p = fp->_bf._base; in fpurge()
58 fp->_w = fp->_flags & (__SLBF|__SNBF) ? 0 : fp->_bf._size; in fpurge()
Dvsprintf.c54 f._bf._base = f._p = (unsigned char *)str; in vsprintf()
55 f._bf._size = f._w = INT_MAX; in vsprintf()
Dvsscanf.c53 f._bf._base = f._p = (unsigned char *)str; in vsscanf()
54 f._bf._size = f._r = strlen(str); in vsscanf()
Dsprintf.c56 f._bf._base = f._p = (unsigned char *)str; in sprintf()
57 f._bf._size = f._w = INT_MAX; in sprintf()
Dvsnprintf.c59 f._bf._base = f._p = (unsigned char *)str; in vsnprintf()
60 f._bf._size = f._w = n - 1; in vsnprintf()
Dsscanf.c57 f._bf._base = f._p = (unsigned char *)str; in sscanf()
58 f._bf._size = f._r = strlen(str); in sscanf()
Dsnprintf.c60 f._bf._base = f._p = (unsigned char *)str; in snprintf()
61 f._bf._size = f._w = n - 1; in snprintf()
Dfseek.c97 curoff += fp->_p - fp->_bf._base; in fseeko()
124 if (fp->_bf._base == NULL) in fseeko()
172 n = fp->_up - fp->_bf._base; in fseeko()
176 n = fp->_p - fp->_bf._base; in fseeko()
191 fp->_p = fp->_bf._base + o; in fseeko()
212 fp->_p = fp->_bf._base; in fseeko()
239 fp->_p = fp->_bf._base; in fseeko()
Drefill.c97 if (fp->_bf._base == NULL) in __srefill()
115 fp->_p = fp->_bf._base; in __srefill()
116 fp->_r = (*fp->_read)(fp->_cookie, (char *)fp->_p, fp->_bf._size); in __srefill()
Dfflush.c66 if ((p = fp->_bf._base) == NULL) in __sflush()
76 fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size; in __sflush()
Dfreopen.c108 free((char *)fp->_bf._base); in freopen()
112 fp->_bf._base = NULL; in freopen()
113 fp->_bf._size = 0; in freopen()
Dfclose.c54 free((char *)fp->_bf._base); in fclose()
Dftell.c80 pos += fp->_p - fp->_bf._base; in ftello()
Dungetc.c126 if (fp->_bf._base != NULL && fp->_p > fp->_bf._base && in ungetc()
Dlocal.h72 ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \
Dfindfp.c132 fp->_bf._base = NULL; /* no buffer */ in __sfp()
133 fp->_bf._size = 0; in __sfp()
Dvfprintf.c98 fake._bf._base = fake._p = buf; in __sbprintf()
99 fake._bf._size = fake._w = sizeof(buf); in __sbprintf()
/bionic/libc/include/
Dstdio.h125 struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ member