Lines Matching refs:toread
694 ssize_t toread = 0, didread = 0; in _php_stream_read() local
704 toread = stream->writepos - stream->readpos; in _php_stream_read()
705 if (toread > size) { in _php_stream_read()
706 toread = size; in _php_stream_read()
709 memcpy(buf, stream->readbuf + stream->readpos, toread); in _php_stream_read()
710 stream->readpos += toread; in _php_stream_read()
711 size -= toread; in _php_stream_read()
712 buf += toread; in _php_stream_read()
713 didread += toread; in _php_stream_read()
722 toread = stream->ops->read(stream, buf, size); in _php_stream_read()
723 if (toread < 0) { in _php_stream_read()
727 return toread; in _php_stream_read()
739 toread = stream->writepos - stream->readpos; in _php_stream_read()
740 if ((size_t) toread > size) { in _php_stream_read()
741 toread = size; in _php_stream_read()
744 if (toread > 0) { in _php_stream_read()
745 memcpy(buf, stream->readbuf + stream->readpos, toread); in _php_stream_read()
746 stream->readpos += toread; in _php_stream_read()
749 if (toread > 0) { in _php_stream_read()
750 didread += toread; in _php_stream_read()
751 buf += toread; in _php_stream_read()
752 size -= toread; in _php_stream_read()
984 size_t toread; in _php_stream_get_line() local
987 toread = stream->chunk_size; in _php_stream_get_line()
989 toread = maxlen - 1; in _php_stream_get_line()
990 if (toread > stream->chunk_size) { in _php_stream_get_line()
991 toread = stream->chunk_size; in _php_stream_get_line()
995 php_stream_fill_read_buffer(stream, toread); in _php_stream_get_line()