Lines Matching refs:stream

131 #define PHP_STREAM_TO_ZVAL(stream, arg) \  argument
132 php_stream_from_zval_no_verify(stream, arg); \
133 if (stream == NULL) { \
334 php_stream *stream; in PHP_FUNCTION() local
341 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
356 if (php_stream_lock(stream, act)) { in PHP_FUNCTION()
394 md.stream = php_stream_open_wrapper(filename, "rb", in PHP_FUNCTION()
397 if (!md.stream) { in PHP_FUNCTION()
523 php_stream_close(md.stream); in PHP_FUNCTION()
535 php_stream *stream; in PHP_FUNCTION() local
558 stream = php_stream_open_wrapper_ex(filename, "rb", in PHP_FUNCTION()
561 if (!stream) { in PHP_FUNCTION()
565 if (offset > 0 && php_stream_seek(stream, offset, SEEK_SET) < 0) { in PHP_FUNCTION()
567 php_stream_close(stream); in PHP_FUNCTION()
571 if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) { in PHP_FUNCTION()
584 php_stream_close(stream); in PHP_FUNCTION()
592 php_stream *stream; in PHP_FUNCTION() local
631stream = php_stream_open_wrapper_ex(filename, mode, ((flags & PHP_FILE_USE_INCLUDE_PATH) ? USE_PAT… in PHP_FUNCTION()
632 if (stream == NULL) { in PHP_FUNCTION()
636 if (flags & LOCK_EX && (!php_stream_supports_lock(stream) || php_stream_lock(stream, LOCK_EX))) { in PHP_FUNCTION()
637 php_stream_close(stream); in PHP_FUNCTION()
643 php_stream_truncate_set_size(stream, 0); in PHP_FUNCTION()
649 if (php_stream_copy_to_stream_ex(srcstream, stream, PHP_STREAM_COPY_ALL, &len) != SUCCESS) { in PHP_FUNCTION()
665 numbytes = php_stream_write(stream, Z_STRVAL_P(data), Z_STRLEN_P(data)); in PHP_FUNCTION()
687 bytes_written = php_stream_write(stream, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); in PHP_FUNCTION()
708 numbytes = php_stream_write(stream, Z_STRVAL(out), Z_STRLEN(out)); in PHP_FUNCTION()
721 php_stream_close(stream); in PHP_FUNCTION()
747 php_stream *stream; in PHP_FUNCTION() local
771stream = php_stream_open_wrapper_ex(filename, "rb", (use_include_path ? USE_PATH : 0) | ENFORCE_SA… in PHP_FUNCTION()
772 if (!stream) { in PHP_FUNCTION()
779 if ((target_len = php_stream_copy_to_mem(stream, &target_buf, PHP_STREAM_COPY_ALL, 0))) { in PHP_FUNCTION()
783 if (!(p = php_stream_locate_eol(stream, target_buf, target_len TSRMLS_CC))) { in PHP_FUNCTION()
788 if (stream->flags & PHP_STREAM_FLAG_EOL_MAC) { in PHP_FUNCTION()
838 php_stream_close(stream); in PHP_FUNCTION()
892 php_stream *stream; in PHP_NAMED_FUNCTION() local
898 stream = php_stream_fopen_tmpfile(); in PHP_NAMED_FUNCTION()
900 if (stream) { in PHP_NAMED_FUNCTION()
901 php_stream_to_zval(stream, return_value); in PHP_NAMED_FUNCTION()
916 php_stream *stream; in PHP_NAMED_FUNCTION() local
929stream = php_stream_open_wrapper_ex(filename, mode, (use_include_path ? USE_PATH : 0) | ENFORCE_SA… in PHP_NAMED_FUNCTION()
931 if (stream == NULL) { in PHP_NAMED_FUNCTION()
935 php_stream_to_zval(stream, return_value); in PHP_NAMED_FUNCTION()
944 php_stream *stream; in PHP_FUNCTION() local
950 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
952 if ((stream->flags & PHP_STREAM_FLAG_NO_FCLOSE) != 0) { in PHP_FUNCTION()
953 php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a valid stream resource", stream->rsrc_id); in PHP_FUNCTION()
957 if (!stream->is_persistent) { in PHP_FUNCTION()
958 zend_list_delete(stream->rsrc_id); in PHP_FUNCTION()
960 php_stream_pclose(stream); in PHP_FUNCTION()
974 php_stream *stream; in PHP_FUNCTION() local
1033 stream = php_stream_fopen_from_pipe(fp, mode); in PHP_FUNCTION()
1035 if (stream == NULL) { in PHP_FUNCTION()
1039 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
1051 php_stream *stream; in PHP_FUNCTION() local
1057 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1059 zend_list_delete(stream->rsrc_id); in PHP_FUNCTION()
1069 php_stream *stream; in PHP_FUNCTION() local
1075 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1077 if (php_stream_eof(stream)) { in PHP_FUNCTION()
1094 php_stream *stream; in PHP_FUNCTION() local
1100 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1104 buf = php_stream_get_line(stream, NULL, 0, &line_len); in PHP_FUNCTION()
1115 if (php_stream_get_line(stream, buf, len, &line_len) == NULL) { in PHP_FUNCTION()
1148 php_stream *stream; in PHP_FUNCTION() local
1154 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1156 result = php_stream_getc(stream); in PHP_FUNCTION()
1178 php_stream *stream; in PHP_FUNCTION() local
1186 PHP_STREAM_TO_ZVAL(stream, &fd); in PHP_FUNCTION()
1200 if ((retval = php_stream_get_line(stream, buf, len, &actual_len)) == NULL) { in PHP_FUNCTION()
1207 …retval_len = php_strip_tags(retval, actual_len, &stream->fgetss_state, allowed_tags, allowed_tags_… in PHP_FUNCTION()
1272 php_stream *stream; in PHP_FUNCTION() local
1288 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1295 ret = php_stream_write(stream, buffer ? buffer : arg2, num_bytes); in PHP_FUNCTION()
1310 php_stream *stream; in PHP_FUNCTION() local
1316 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1318 ret = php_stream_flush(stream); in PHP_FUNCTION()
1331 php_stream *stream; in PHP_FUNCTION() local
1337 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1339 if (-1 == php_stream_rewind(stream)) { in PHP_FUNCTION()
1352 php_stream *stream; in PHP_FUNCTION() local
1358 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1360 ret = php_stream_tell(stream); in PHP_FUNCTION()
1374 php_stream *stream; in PHP_FUNCTION() local
1380 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1382 RETURN_LONG(php_stream_seek(stream, arg2, whence)); in PHP_FUNCTION()
1472 php_stream *stream; in PHP_FUNCTION() local
1485stream = php_stream_open_wrapper_ex(filename, "rb", (use_include_path ? USE_PATH : 0) | ENFORCE_SA… in PHP_FUNCTION()
1486 if (stream) { in PHP_FUNCTION()
1487 size = php_stream_passthru(stream); in PHP_FUNCTION()
1488 php_stream_close(stream); in PHP_FUNCTION()
1529 php_stream *stream; in PHP_FUNCTION() local
1535 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1537 size = php_stream_passthru(stream); in PHP_FUNCTION()
1628 php_stream *stream; in PHP_NAMED_FUNCTION() local
1634 PHP_STREAM_TO_ZVAL(stream, &fp); in PHP_NAMED_FUNCTION()
1636 if (!php_stream_truncate_supported(stream)) { in PHP_NAMED_FUNCTION()
1641 RETURN_BOOL(0 == php_stream_truncate_set_size(stream, size)); in PHP_NAMED_FUNCTION()
1652 php_stream *stream; in PHP_NAMED_FUNCTION() local
1663 PHP_STREAM_TO_ZVAL(stream, &fp); in PHP_NAMED_FUNCTION()
1665 if (php_stream_stat(stream, &stat_ssb)) { in PHP_NAMED_FUNCTION()
1883 php_stream *stream; in PHP_FUNCTION() local
1889 PHP_STREAM_TO_ZVAL(stream, &arg1); in PHP_FUNCTION()
1897 Z_STRLEN_P(return_value) = php_stream_read(stream, Z_STRVAL_P(return_value), len); in PHP_FUNCTION()
1957 php_stream *stream; in PHP_FUNCTION() local
1996 PHP_STREAM_TO_ZVAL(stream, &fp); in PHP_FUNCTION()
2052 ret = php_stream_write(stream, csvline.c, csvline.len); in PHP_FUNCTION()
2057 ret = php_stream_write(stream, buffer, len); in PHP_FUNCTION()
2080 php_stream *stream; in PHP_FUNCTION() local
2148 PHP_STREAM_TO_ZVAL(stream, &fd); in PHP_FUNCTION()
2152 if ((buf = php_stream_get_line(stream, NULL, 0, &buf_len)) == NULL) { in PHP_FUNCTION()
2157 if (php_stream_get_line(stream, buf, len + 1, &buf_len) == NULL) { in PHP_FUNCTION()
2163 php_fgetcsv(stream, delimiter, enclosure, escape, buf_len, buf, return_value TSRMLS_CC); in PHP_FUNCTION()
2167 PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char escape_char, size_… in php_fgetcsv() argument
2255 if (stream == NULL) { in php_fgetcsv()
2257 } else if ((new_buf = php_stream_get_line(stream, NULL, 0, &new_len)) == NULL) { in php_fgetcsv()
2418 if (stream) { in php_fgetcsv()
2475 while (md->ulc || (!php_stream_eof(md->stream) && (ch = php_stream_getc(md->stream)))) { in php_next_meta_token()
2476 if (php_stream_eof(md->stream)) { in php_next_meta_token()
2505 …while (!php_stream_eof(md->stream) && (ch = php_stream_getc(md->stream)) && ch != compliment && ch… in php_next_meta_token()
2541 …while (!php_stream_eof(md->stream) && (ch = php_stream_getc(md->stream)) && (isalnum(ch) || strchr… in php_next_meta_token()