Lines Matching refs:toread
708 ssize_t toread = 0, didread = 0; in _php_stream_read() local
718 toread = stream->writepos - stream->readpos; in _php_stream_read()
719 if (toread > size) { in _php_stream_read()
720 toread = size; in _php_stream_read()
723 memcpy(buf, stream->readbuf + stream->readpos, toread); in _php_stream_read()
724 stream->readpos += toread; in _php_stream_read()
725 size -= toread; in _php_stream_read()
726 buf += toread; in _php_stream_read()
727 didread += toread; in _php_stream_read()
737 toread = stream->ops->read(stream, buf, size); in _php_stream_read()
738 if (toread < 0) { in _php_stream_read()
742 return toread; in _php_stream_read()
754 toread = stream->writepos - stream->readpos; in _php_stream_read()
755 if ((size_t) toread > size) { in _php_stream_read()
756 toread = size; in _php_stream_read()
759 if (toread > 0) { in _php_stream_read()
760 memcpy(buf, stream->readbuf + stream->readpos, toread); in _php_stream_read()
761 stream->readpos += toread; in _php_stream_read()
764 if (toread > 0) { in _php_stream_read()
765 didread += toread; in _php_stream_read()
766 buf += toread; in _php_stream_read()
767 size -= toread; in _php_stream_read()
1001 size_t toread; in _php_stream_get_line() local
1004 toread = stream->chunk_size; in _php_stream_get_line()
1006 toread = maxlen - 1; in _php_stream_get_line()
1007 if (toread > stream->chunk_size) { in _php_stream_get_line()
1008 toread = stream->chunk_size; in _php_stream_get_line()
1012 php_stream_fill_read_buffer(stream, toread); in _php_stream_get_line()