/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 | vsprintf.c | 54 f._bf._base = f._p = (unsigned char *)str; in vsprintf() 57 *f._p = '\0'; in vsprintf()
|
D | getdelim.c | 75 p = memchr(fp->_p, sep, (size_t)fp->_r); in getdelim() 79 len = (p - fp->_p) + 1; in getdelim() 112 (void)memcpy((*buf + off), fp->_p, len); in getdelim() 115 fp->_p += (int)len; in getdelim()
|
D | fseek.c | 96 } else if (fp->_flags & __SWR && fp->_p != NULL) in fseeko() 97 curoff += fp->_p - 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() 220 fp->_p += n; in fseeko() 239 fp->_p = fp->_bf._base; in fseeko()
|
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 | refill.c | 91 fp->_p = fp->_up; 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()
|
D | ftell.c | 75 } else if (fp->_flags & __SWR && fp->_p != NULL) { in ftello() 81 pos += fp->_p - fp->_bf._base; in ftello()
|
D | vasprintf.c | 36 f._bf._base = f._p = (unsigned char *)malloc(128); in vasprintf() 43 *f._p = '\0'; in vasprintf()
|
D | rget.c | 48 return (*fp->_p++); in __srget()
|
D | asprintf.c | 39 f._bf._base = f._p = (unsigned char *)malloc(128); in asprintf() 48 *f._p = '\0'; in asprintf()
|
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 = (unsigned char *)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()
|
/bionic/libc/stdio/ |
D | local.h | 128 #define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) 129 static __inline int __sputc(int _c, FILE* _p) { in __sputc() argument 130 if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) { in __sputc() 131 return (*_p->_p++ = _c); in __sputc() 133 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 | fread.c | 87 memcpy(dst, fp->_p, buffered_bytes); in fread() 88 fp->_p += buffered_bytes; in fread()
|