/bionic/libc/upstream-openbsd/lib/libc/stdio/ |
D | fgetln.c | 79 if ((p = memchr((void *)fp->_p, '\n', fp->_r)) != NULL) { in fgetln() 86 ret = (char *)fp->_p; in fgetln() 87 *lenp = len = p - fp->_p; in fgetln() 90 fp->_p = p; in fgetln() 115 (void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p, in fgetln() 120 if ((p = memchr((void *)fp->_p, '\n', fp->_r)) == NULL) in fgetln() 125 diff = p - fp->_p; in fgetln() 129 (void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p, in fgetln() 132 fp->_p = p; in fgetln()
|
D | ungetc.c | 63 fp->_p = p; in __submore() 72 fp->_p = p + i; in __submore() 114 *--fp->_p = c; in ungetc() 126 if (fp->_bf._base != NULL && fp->_p > fp->_bf._base && in ungetc() 127 fp->_p[-1] == c) { in ungetc() 128 fp->_p--; in ungetc() 137 fp->_up = fp->_p; in ungetc() 141 fp->_p = &fp->_ubuf[sizeof(fp->_ubuf) - 1]; in ungetc()
|
D | fvwrite.c | 66 #define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n)) in __sfvwrite() 107 size_t blen = fp->_p - fp->_bf._base; in __sfvwrite() 122 fp->_p = _base + blen; in __sfvwrite() 130 fp->_p += w; in __sfvwrite() 132 } else if (fp->_p > fp->_bf._base && len > w) { in __sfvwrite() 136 fp->_p += w; in __sfvwrite() 149 fp->_p += w; in __sfvwrite() 173 if (fp->_p > fp->_bf._base && s > w) { in __sfvwrite() 176 fp->_p += w; in __sfvwrite() 187 fp->_p += w; in __sfvwrite()
|
D | vfscanf.c | 134 isspace(*fp->_p)) in __svfscanf() 135 nread++, fp->_r--, fp->_p++; in __svfscanf() 152 if (*fp->_p != c) in __svfscanf() 154 fp->_r--, fp->_p++; in __svfscanf() 318 while (isspace(*fp->_p)) { in __svfscanf() 321 fp->_p++; in __svfscanf() 353 buf[n++] = *fp->_p; in __svfscanf() 354 fp->_p++; in __svfscanf() 389 fp->_p += n; in __svfscanf() 398 fp->_p += width; in __svfscanf() [all …]
|
D | fgets.c | 76 p = fp->_p; in fgets() 90 fp->_p = t; in fgets() 97 fp->_p += len; in fgets()
|
D | getdelim.c | 76 p = memchr(fp->_p, sep, (size_t)fp->_r); in getdelim() 80 len = (p - fp->_p) + 1; in getdelim() 113 (void)memcpy((*buf + off), fp->_p, len); in getdelim() 116 fp->_p += (int)len; in getdelim()
|
D | vsprintf.c | 54 f._bf._base = f._p = (unsigned char *)str; in vsprintf() 57 *f._p = '\0'; in vsprintf()
|
D | wbuf.c | 72 n = fp->_p - fp->_bf._base; in __swbuf() 79 *fp->_p++ = c; in __swbuf()
|
D | vsnprintf.c | 59 f._bf._base = f._p = (unsigned char *)str; in vsnprintf() 62 *f._p = '\0'; in vsnprintf()
|
D | makebuf.c | 57 fp->_bf._base = fp->_p = fp->_nbuf; in __smakebuf() 64 fp->_bf._base = fp->_p = fp->_nbuf; in __smakebuf() 69 fp->_bf._base = fp->_p = p; in __smakebuf()
|
D | vasprintf.c | 36 f._bf._base = f._p = malloc(128); in vasprintf() 43 *f._p = '\0'; in vasprintf()
|
D | asprintf.c | 38 f._bf._base = f._p = malloc(128); in asprintf() 47 *f._p = '\0'; in asprintf()
|
D | rget.c | 48 return (*fp->_p++); in __srget()
|
D | fflush.c | 69 n = fp->_p - p; /* write this much */ in __sflush() 75 fp->_p = p; in __sflush()
|
D | vswprintf.c | 58 f._bf._base = f._p = malloc(128); in vswprintf() 76 *f._p = '\0'; in vswprintf()
|
D | fpurge.c | 56 fp->_p = fp->_bf._base; in fpurge()
|
D | vsscanf.c | 54 f._bf._base = f._p = (unsigned char *)str; in vsscanf()
|
D | setvbuf.c | 109 fp->_bf._base = fp->_p = fp->_nbuf; in setvbuf() 139 fp->_bf._base = fp->_p = (unsigned char *)buf; in setvbuf()
|
D | sscanf.c | 58 f._bf._base = f._p = (unsigned char *)str; in sscanf()
|
D | vdprintf.c | 60 f._p = buf; in vdprintf()
|
/bionic/libc/stdio/ |
D | local.h | 60 unsigned char *_p; /* current position in (some) buffer */ member 255 #define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) 256 static __inline int __sputc(int _c, FILE* _p) { in __sputc() argument 257 if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) { in __sputc() 258 return (*_p->_p++ = _c); in __sputc() 260 return (__swbuf(_c, _p)); in __sputc()
|
D | sprintf.c | 57 f._bf._base = f._p = (unsigned char *)str; in sprintf() 62 *f._p = '\0'; in sprintf()
|
D | snprintf.c | 61 f._bf._base = f._p = (unsigned char *)str; in snprintf() 66 *f._p = '\0'; in snprintf()
|
D | refill.c | 88 fp->_p = fp->_up; 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()
|
D | fread.c | 87 memcpy(dst, fp->_p, buffered_bytes); in fread() 88 fp->_p += buffered_bytes; in fread()
|