Home
last modified time | relevance | path

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

12

/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dfgetln.c79 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()
Dungetc.c63 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()
Dfvwrite.c66 #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()
Dvfscanf.c134 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 …]
Dfgets.c76 p = fp->_p; in fgets()
90 fp->_p = t; in fgets()
97 fp->_p += len; in fgets()
Dvsprintf.c54 f._bf._base = f._p = (unsigned char *)str; in vsprintf()
57 *f._p = '\0'; in vsprintf()
Dgetdelim.c75 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()
Dfseek.c96 } 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()
Dwbuf.c72 n = fp->_p - fp->_bf._base; in __swbuf()
79 *fp->_p++ = c; in __swbuf()
Dvsnprintf.c59 f._bf._base = f._p = (unsigned char *)str; in vsnprintf()
62 *f._p = '\0'; in vsnprintf()
Dmakebuf.c57 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()
Drefill.c91 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()
Dftell.c75 } else if (fp->_flags & __SWR && fp->_p != NULL) { in ftello()
81 pos += fp->_p - fp->_bf._base; in ftello()
Dvasprintf.c36 f._bf._base = f._p = (unsigned char *)malloc(128); in vasprintf()
43 *f._p = '\0'; in vasprintf()
Drget.c48 return (*fp->_p++); in __srget()
Dasprintf.c39 f._bf._base = f._p = (unsigned char *)malloc(128); in asprintf()
48 *f._p = '\0'; in asprintf()
Dfflush.c69 n = fp->_p - p; /* write this much */ in __sflush()
75 fp->_p = p; in __sflush()
Dvswprintf.c58 f._bf._base = f._p = (unsigned char *)malloc(128); in vswprintf()
76 *f._p = '\0'; in vswprintf()
Dfpurge.c56 fp->_p = fp->_bf._base; in fpurge()
Dvsscanf.c54 f._bf._base = f._p = (unsigned char *)str; in vsscanf()
Dsetvbuf.c109 fp->_bf._base = fp->_p = fp->_nbuf; in setvbuf()
139 fp->_bf._base = fp->_p = (unsigned char *)buf; in setvbuf()
/bionic/libc/stdio/
Dlocal.h128 #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()
Dsprintf.c57 f._bf._base = f._p = (unsigned char *)str; in sprintf()
62 *f._p = '\0'; in sprintf()
Dsnprintf.c61 f._bf._base = f._p = (unsigned char *)str; in snprintf()
66 *f._p = '\0'; in snprintf()
Dfread.c87 memcpy(dst, fp->_p, buffered_bytes); in fread()
88 fp->_p += buffered_bytes; in fread()

12