Lines Matching refs:writepos

551 		while (!stream->eof && (stream->writepos - stream->readpos < (zend_off_t)to_read_now)) {  in _php_stream_fill_read_buffer()
560 if (justread < 0 && stream->writepos == stream->readpos) { in _php_stream_fill_read_buffer()
599 if (stream->readbuf && stream->readbuflen - stream->writepos < bucket->buflen) { in _php_stream_fill_read_buffer()
600 if (stream->writepos > stream->readpos) { in _php_stream_fill_read_buffer()
601 … memmove(stream->readbuf, stream->readbuf + stream->readpos, stream->writepos - stream->readpos); in _php_stream_fill_read_buffer()
603 stream->writepos -= stream->readpos; in _php_stream_fill_read_buffer()
607 if (stream->readbuflen - stream->writepos < bucket->buflen) { in _php_stream_fill_read_buffer()
613 memcpy(stream->readbuf + stream->writepos, bucket->buf, bucket->buflen); in _php_stream_fill_read_buffer()
615 stream->writepos += bucket->buflen; in _php_stream_fill_read_buffer()
646 if (stream->writepos - stream->readpos < (zend_off_t)size) { in _php_stream_fill_read_buffer()
650 if (stream->readbuf && stream->readbuflen - stream->writepos < stream->chunk_size) { in _php_stream_fill_read_buffer()
651 if (stream->writepos > stream->readpos) { in _php_stream_fill_read_buffer()
652 … memmove(stream->readbuf, stream->readbuf + stream->readpos, stream->writepos - stream->readpos); in _php_stream_fill_read_buffer()
654 stream->writepos -= stream->readpos; in _php_stream_fill_read_buffer()
660 if (stream->readbuflen - stream->writepos < stream->chunk_size) { in _php_stream_fill_read_buffer()
666 justread = stream->ops->read(stream, (char*)stream->readbuf + stream->writepos, in _php_stream_fill_read_buffer()
667 stream->readbuflen - stream->writepos in _php_stream_fill_read_buffer()
672 stream->writepos += justread; in _php_stream_fill_read_buffer()
688 if (stream->writepos > stream->readpos) { in _php_stream_read()
690 toread = stream->writepos - stream->readpos; in _php_stream_read()
725 toread = stream->writepos - stream->readpos; in _php_stream_read()
782 if (stream->writepos - stream->readpos > 0) { in _php_stream_eof()
856 avail = stream->writepos - stream->readpos; in php_stream_locate_eol()
919 avail = stream->writepos - stream->readpos; in _php_stream_get_line()
983 if (stream->writepos - stream->readpos == 0) { in _php_stream_get_line()
1005 ((size_t)(((stream)->writepos) - (stream)->readpos))
1127 …s->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0 && stream->readpos != stream->writepos) { in _php_stream_write_buffer()
1128 stream->readpos = stream->writepos = 0; in _php_stream_write_buffer()
1307 if (offset > 0 && offset <= stream->writepos - stream->readpos) { in _php_stream_seek()
1316 offset <= stream->position + stream->writepos - stream->readpos) { in _php_stream_seek()
1348 stream->readpos = stream->writepos = 0; in _php_stream_seek()