Lines Matching refs:fpos
41 size_t fpos; member
57 if (ms->fpos + count > ms->fsize) { in php_stream_memory_write()
61 tmp = emalloc(ms->fpos + count); in php_stream_memory_write()
63 tmp = erealloc(ms->data, ms->fpos + count); in php_stream_memory_write()
66 count = ms->fsize - ms->fpos + 1; in php_stream_memory_write()
69 ms->fsize = ms->fpos + count; in php_stream_memory_write()
76 memcpy(ms->data+ms->fpos, (char*)buf, count); in php_stream_memory_write()
77 ms->fpos += count; in php_stream_memory_write()
90 if (ms->fpos == ms->fsize) { in php_stream_memory_read()
94 if (ms->fpos + count >= ms->fsize) { in php_stream_memory_read()
95 count = ms->fsize - ms->fpos; in php_stream_memory_read()
100 memcpy(buf, ms->data+ms->fpos, count); in php_stream_memory_read()
101 ms->fpos += count; in php_stream_memory_read()
142 if (ms->fpos < (size_t)(-offset)) { in php_stream_memory_seek()
143 ms->fpos = 0; in php_stream_memory_seek()
147 ms->fpos = ms->fpos + offset; in php_stream_memory_seek()
148 *newoffs = ms->fpos; in php_stream_memory_seek()
153 if (ms->fpos + (size_t)(offset) > ms->fsize) { in php_stream_memory_seek()
154 ms->fpos = ms->fsize; in php_stream_memory_seek()
158 ms->fpos = ms->fpos + offset; in php_stream_memory_seek()
159 *newoffs = ms->fpos; in php_stream_memory_seek()
166 ms->fpos = ms->fsize; in php_stream_memory_seek()
170 ms->fpos = offset; in php_stream_memory_seek()
171 *newoffs = ms->fpos; in php_stream_memory_seek()
177 ms->fpos = ms->fsize; in php_stream_memory_seek()
181 ms->fpos = 0; in php_stream_memory_seek()
185 ms->fpos = ms->fsize + offset; in php_stream_memory_seek()
186 *newoffs = ms->fpos; in php_stream_memory_seek()
191 *newoffs = ms->fpos; in php_stream_memory_seek()
264 if (newsize < ms->fpos) { in php_stream_memory_set_option()
265 ms->fpos = newsize; in php_stream_memory_set_option()
300 self->fpos = 0; in _php_stream_memory_create()