Lines Matching refs:maxlen
884 PHPAPI char *_php_stream_get_line(php_stream *stream, char *buf, size_t maxlen, in _php_stream_get_line() argument
895 } else if (maxlen == 0) { in _php_stream_get_line()
943 if (cpysz >= maxlen - 1) { in _php_stream_get_line()
944 cpysz = maxlen - 1; in _php_stream_get_line()
954 maxlen -= cpysz; in _php_stream_get_line()
969 toread = maxlen - 1; in _php_stream_get_line()
1002 size_t maxlen, in _php_stream_search_delim() argument
1010 seek_len = MIN(STREAM_BUFFERED_AMOUNT(stream), maxlen); in _php_stream_search_delim()
1025 PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *returned_len, const c… in php_stream_get_record() argument
1033 if (maxlen == 0) { in php_stream_get_record()
1039 stream, maxlen, 0, delim, delim_len TSRMLS_CC); in php_stream_get_record()
1044 while (!found_delim && buffered_len < maxlen) { in php_stream_get_record()
1048 to_read_now = MIN(maxlen - buffered_len, stream->chunk_size); in php_stream_get_record()
1068 stream, maxlen, in php_stream_get_record()
1082 } else if (!has_delim && STREAM_BUFFERED_AMOUNT(stream) >= maxlen) { in php_stream_get_record()
1083 tent_ret_len = maxlen; in php_stream_get_record()
1089 if (STREAM_BUFFERED_AMOUNT(stream) < maxlen && !stream->eof) { in php_stream_get_record()
1096 tent_ret_len = MIN(STREAM_BUFFERED_AMOUNT(stream), maxlen); in php_stream_get_record()
1425 PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen, int persistent ST… in _php_stream_copy_to_mem() argument
1434 if (maxlen == 0) { in _php_stream_copy_to_mem()
1438 if (maxlen == PHP_STREAM_COPY_ALL) { in _php_stream_copy_to_mem()
1439 maxlen = 0; in _php_stream_copy_to_mem()
1442 if (maxlen > 0) { in _php_stream_copy_to_mem()
1443 ptr = *buf = pemalloc_rel_orig(maxlen + 1, persistent); in _php_stream_copy_to_mem()
1444 while ((len < maxlen) && !php_stream_eof(src)) { in _php_stream_copy_to_mem()
1445 ret = php_stream_read(src, ptr, maxlen - len); in _php_stream_copy_to_mem()
1496 PHPAPI int _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size_t maxlen, size_t *… in _php_stream_copy_to_stream_ex() argument
1509 if (maxlen == 0) { in _php_stream_copy_to_stream_ex()
1514 if (maxlen == PHP_STREAM_COPY_ALL) { in _php_stream_copy_to_stream_ex()
1515 maxlen = 0; in _php_stream_copy_to_stream_ex()
1533 …p = php_stream_mmap_range(src, php_stream_tell(src), maxlen, PHP_STREAM_MAP_MODE_SHARED_READONLY, … in _php_stream_copy_to_stream_ex()
1555 if (maxlen && (maxlen - haveread) < readchunk) { in _php_stream_copy_to_stream_ex()
1556 readchunk = maxlen - haveread; in _php_stream_copy_to_stream_ex()
1583 if (maxlen - haveread == 0) { in _php_stream_copy_to_stream_ex()
1603 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()
1606 int ret = _php_stream_copy_to_stream_ex(src, dest, maxlen, &len STREAMS_REL_CC TSRMLS_CC); in _php_stream_copy_to_stream()
1607 if (ret == SUCCESS && len == 0 && maxlen != 0) { in _php_stream_copy_to_stream()