Lines Matching refs:maxlen
921 PHPAPI char *_php_stream_get_line(php_stream *stream, char *buf, size_t maxlen, in _php_stream_get_line() argument
932 } else if (maxlen == 0) { in _php_stream_get_line()
980 if (cpysz >= maxlen - 1) { in _php_stream_get_line()
981 cpysz = maxlen - 1; in _php_stream_get_line()
991 maxlen -= cpysz; in _php_stream_get_line()
1006 toread = maxlen - 1; in _php_stream_get_line()
1039 size_t maxlen, in _php_stream_search_delim() argument
1047 seek_len = MIN(STREAM_BUFFERED_AMOUNT(stream), maxlen); in _php_stream_search_delim()
1062 PHPAPI zend_string *php_stream_get_record(php_stream *stream, size_t maxlen, const char *delim, siz… in php_stream_get_record() argument
1070 if (maxlen == 0) { in php_stream_get_record()
1076 stream, maxlen, 0, delim, delim_len); in php_stream_get_record()
1081 while (!found_delim && buffered_len < maxlen) { in php_stream_get_record()
1085 to_read_now = MIN(maxlen - buffered_len, stream->chunk_size); in php_stream_get_record()
1105 stream, maxlen, in php_stream_get_record()
1119 } else if (!has_delim && STREAM_BUFFERED_AMOUNT(stream) >= maxlen) { in php_stream_get_record()
1120 tent_ret_len = maxlen; in php_stream_get_record()
1126 if (STREAM_BUFFERED_AMOUNT(stream) < maxlen && !stream->eof) { in php_stream_get_record()
1133 tent_ret_len = MIN(STREAM_BUFFERED_AMOUNT(stream), maxlen); in php_stream_get_record()
1516 PHPAPI zend_string *_php_stream_copy_to_mem(php_stream *src, size_t maxlen, int persistent STREAMS_… in _php_stream_copy_to_mem() argument
1526 if (maxlen == 0) { in _php_stream_copy_to_mem()
1530 if (maxlen == PHP_STREAM_COPY_ALL) { in _php_stream_copy_to_mem()
1531 maxlen = 0; in _php_stream_copy_to_mem()
1534 if (maxlen > 0 && maxlen < 4 * CHUNK_SIZE) { in _php_stream_copy_to_mem()
1535 result = zend_string_alloc(maxlen, persistent); in _php_stream_copy_to_mem()
1537 while ((len < maxlen) && !php_stream_eof(src)) { in _php_stream_copy_to_mem()
1538 ret = php_stream_read(src, ptr, maxlen - len); in _php_stream_copy_to_mem()
1551 if (len < maxlen / 2) { in _php_stream_copy_to_mem()
1569 if (maxlen > 0 && buflen > maxlen) { in _php_stream_copy_to_mem()
1570 buflen = maxlen; in _php_stream_copy_to_mem()
1583 if (maxlen == len) { in _php_stream_copy_to_mem()
1586 if (maxlen > 0 && buflen + step > maxlen) { in _php_stream_copy_to_mem()
1587 buflen = maxlen; in _php_stream_copy_to_mem()
1609 PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size_t maxlen, … in _php_stream_copy_to_stream_ex() argument
1620 if (maxlen == 0) { in _php_stream_copy_to_stream_ex()
1641 const size_t cfr_max = MIN(maxlen, (size_t)SSIZE_MAX); in _php_stream_copy_to_stream_ex()
1656 if ((maxlen != PHP_STREAM_COPY_ALL && nbytes == maxlen) || php_stream_eof(src)) { in _php_stream_copy_to_stream_ex()
1700 if (maxlen == PHP_STREAM_COPY_ALL) { in _php_stream_copy_to_stream_ex()
1701 maxlen = 0; in _php_stream_copy_to_stream_ex()
1710 if (maxlen == 0) { in _php_stream_copy_to_stream_ex()
1714 must_read = maxlen - haveread; in _php_stream_copy_to_stream_ex()
1755 if (maxlen != 0) { in _php_stream_copy_to_stream_ex()
1770 if (maxlen && (maxlen - haveread) < readchunk) { in _php_stream_copy_to_stream_ex()
1771 readchunk = maxlen - haveread; in _php_stream_copy_to_stream_ex()
1795 if (maxlen && maxlen == haveread) { in _php_stream_copy_to_stream_ex()
1808 PHPAPI size_t _php_stream_copy_to_stream(php_stream *src, php_stream *dest, size_t maxlen STREAMS_D… in _php_stream_copy_to_stream()
1811 zend_result ret = _php_stream_copy_to_stream_ex(src, dest, maxlen, &len STREAMS_REL_CC); in _php_stream_copy_to_stream()
1812 if (ret == SUCCESS && len == 0 && maxlen != 0) { in _php_stream_copy_to_stream()