Home
last modified time | relevance | path

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

12

/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dvasprintf.c36 f._bf._base = f._p = 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()
52 f._bf._base = NULL; in vasprintf()
Dasprintf.c38 f._bf._base = f._p = malloc(128); in asprintf()
39 if (f._bf._base == NULL) in asprintf()
41 f._bf._size = f._w = 127; /* Leave room for the NUL */ in asprintf()
48 _base = realloc(f._bf._base, ret + 1); in asprintf()
55 free(f._bf._base); in asprintf()
56 f._bf._base = NULL; in asprintf()
Dvswprintf.c58 f._bf._base = f._p = malloc(128); in vswprintf()
59 if (f._bf._base == NULL) { in vswprintf()
63 f._bf._size = f._w = 127; /* Leave room for the NUL */ in vswprintf()
67 free(f._bf._base); in vswprintf()
73 free(f._bf._base); in vswprintf()
77 mbp = (char *)f._bf._base; in vswprintf()
84 free(f._bf._base); in vswprintf()
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()
69 fp->_bf._base = fp->_p = p; in __smakebuf()
70 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()
Dfvwrite.c107 size_t blen = fp->_p - fp->_bf._base; in __sfvwrite()
112 _size = fp->_bf._size; in __sfvwrite()
116 _base = realloc(fp->_bf._base, _size + 1); in __sfvwrite()
119 fp->_w += _size - fp->_bf._size; in __sfvwrite()
120 fp->_bf._base = _base; in __sfvwrite()
121 fp->_bf._size = _size; in __sfvwrite()
132 } else if (fp->_p > fp->_bf._base && len > w) { in __sfvwrite()
139 } else if (len >= (w = fp->_bf._size)) { in __sfvwrite()
172 w = fp->_w + fp->_bf._size; in __sfvwrite()
173 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()
139 fp->_bf._base = fp->_p = (unsigned char *)buf; in setvbuf()
140 fp->_bf._size = size; in setvbuf()
149 fp->_lbfsize = -fp->_bf._size; in setvbuf()
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()
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.c54 f._bf._base = f._p = (unsigned char *)str; in vsscanf()
55 f._bf._size = f._r = strlen(str); in vsscanf()
Dsscanf.c58 f._bf._base = f._p = (unsigned char *)str; in sscanf()
59 f._bf._size = f._r = strlen(str); in sscanf()
Dvsnprintf.c59 f._bf._base = f._p = (unsigned char *)str; in vsnprintf()
60 f._bf._size = f._w = n - 1; in vsnprintf()
Dvdprintf.c64 f._bf._base = buf; in vdprintf()
65 f._bf._size = sizeof(buf); in vdprintf()
Dfflush.c66 if ((p = fp->_bf._base) == NULL) in __sflush()
76 fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size; in __sflush()
Dvswscanf.c80 f._bf._base = f._p = (unsigned char *)mbstr; in vswscanf()
81 f._bf._size = f._r = mlen; in vswscanf()
Dungetc.c126 if (fp->_bf._base != NULL && fp->_p > fp->_bf._base && in ungetc()
Dvfprintf.c134 fake._bf._base = fake._p = buf; in __sbprintf()
135 fake._bf._size = fake._w = sizeof(buf); in __sbprintf()
/bionic/libc/stdio/
Dsprintf.c57 f._bf._base = f._p = (unsigned char *)str; in sprintf()
58 f._bf._size = f._w = INT_MAX; in sprintf()
Dsnprintf.c61 f._bf._base = f._p = (unsigned char *)str; in snprintf()
62 f._bf._size = f._w = n - 1; in snprintf()
Drefill.c94 if (fp->_bf._base == NULL) in __srefill()
112 fp->_p = fp->_bf._base; in __srefill()
113 fp->_r = (*fp->_read)(fp->_cookie, (char *)fp->_p, fp->_bf._size); in __srefill()
Dstdio_ext.cpp38 return fp->_bf._size; in __fbufsize()
70 return fp->_p - fp->_bf._base; in __fpending()
Dfread.c76 if (fp->_bf._base == NULL) { in fread()
104 if (total > (size_t) fp->_bf._size) { in fread()
Dstdio.cpp154 fp->_bf._base = NULL; /* no buffer */ in __sfp()
155 fp->_bf._size = 0; in __sfp()
309 if (fp->_flags & __SMBF) free(fp->_bf._base); in freopen()
313 fp->_bf._base = NULL; in freopen()
314 fp->_bf._size = 0; in freopen()
377 if (fp->_flags & __SMBF) free(fp->_bf._base); in fclose()
461 result += fp->_p - fp->_bf._base; in __ftello64_unlocked()
489 if (fp->_bf._base == NULL) __smakebuf(fp); in __fseeko64()
498 fp->_p = fp->_bf._base; in __fseeko64()
Dlocal.h70 struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ member
219 ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \

12