Lines Matching refs:toread
688 size_t toread = 0, didread = 0; in _php_stream_read() local
698 toread = stream->writepos - stream->readpos; in _php_stream_read()
699 if (toread > size) { in _php_stream_read()
700 toread = size; in _php_stream_read()
703 memcpy(buf, stream->readbuf + stream->readpos, toread); in _php_stream_read()
704 stream->readpos += toread; in _php_stream_read()
705 size -= toread; in _php_stream_read()
706 buf += toread; in _php_stream_read()
707 didread += toread; in _php_stream_read()
716 toread = stream->ops->read(stream, buf, size); in _php_stream_read()
717 if (toread == (size_t) -1) { in _php_stream_read()
724 toread = stream->writepos - stream->readpos; in _php_stream_read()
725 if (toread > size) { in _php_stream_read()
726 toread = size; in _php_stream_read()
729 if (toread > 0) { in _php_stream_read()
730 memcpy(buf, stream->readbuf + stream->readpos, toread); in _php_stream_read()
731 stream->readpos += toread; in _php_stream_read()
734 if (toread > 0) { in _php_stream_read()
735 didread += toread; in _php_stream_read()
736 buf += toread; in _php_stream_read()
737 size -= toread; in _php_stream_read()
947 size_t toread; in _php_stream_get_line() local
950 toread = stream->chunk_size; in _php_stream_get_line()
952 toread = maxlen - 1; in _php_stream_get_line()
953 if (toread > stream->chunk_size) { in _php_stream_get_line()
954 toread = stream->chunk_size; in _php_stream_get_line()
958 php_stream_fill_read_buffer(stream, toread); in _php_stream_get_line()