Home
last modified time | relevance | path

Searched refs:stream (Results 1 – 25 of 652) sorted by relevance

12345678910>>...27

/PHP-5.4/main/streams/
H A Dstreams.c511 stream->wrapper->wops->stream_closer(stream->wrapper, stream TSRMLS_CC); in _php_stream_free()
562 pefree(stream, stream->is_persistent); in _php_stream_free()
641 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, in _php_stream_fill_read_buffer()
683 if (stream->readbuf && stream->readbuflen - stream->writepos < stream->chunk_size) { in _php_stream_fill_read_buffer()
684 … memmove(stream->readbuf, stream->readbuf + stream->readpos, stream->readbuflen - stream->readpos); in _php_stream_fill_read_buffer()
685 stream->writepos -= stream->readpos; in _php_stream_fill_read_buffer()
691 if (stream->readbuflen - stream->writepos < stream->chunk_size) { in _php_stream_fill_read_buffer()
693 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, in _php_stream_fill_read_buffer()
697 justread = stream->ops->read(stream, stream->readbuf + stream->writepos, in _php_stream_fill_read_buffer()
1129 stream->ops->seek(stream, stream->position, SEEK_SET, &stream->position TSRMLS_CC); in _php_stream_write_buffer()
[all …]
H A Dcast.c208 if (stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0) { in _php_stream_cast()
211 stream->ops->seek(stream, stream->position, SEEK_SET, &dummy TSRMLS_CC); in _php_stream_cast()
212 stream->readpos = stream->writepos = 0; in _php_stream_cast()
219 if (stream->stdiocast) { in _php_stream_cast()
229 stream->ops->cast && in _php_stream_cast()
231 stream->ops->cast(stream, castas, ret TSRMLS_CC) == SUCCESS in _php_stream_cast()
272 …if (!php_stream_is_filtered(stream) && stream->ops->cast && stream->ops->cast(stream, castas, NULL… in _php_stream_cast()
273 if (FAILURE == stream->ops->cast(stream, castas, ret TSRMLS_CC)) { in _php_stream_cast()
309 } else if (stream->ops->cast && stream->ops->cast(stream, castas, ret TSRMLS_CC) == SUCCESS) { in _php_stream_cast()
329 if ((stream->writepos - stream->readpos) > 0 && in _php_stream_cast()
[all …]
H A Dphp_stream_mmap.h63 #define php_stream_mmap_supported(stream) (_php_stream_set_option((stream), PHP_STREAM_OPTION_MMAP_… argument
67 #define php_stream_mmap_possible(stream) (!php_stream_is_filtered((stream)) && php_stream_mmap_su… argument
70 PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mm…
71 #define php_stream_mmap_range(stream, offset, length, mode, mapped_len) _php_stream_mmap_range((str… argument
74 PHPAPI int _php_stream_mmap_unmap(php_stream *stream TSRMLS_DC);
75 #define php_stream_mmap_unmap(stream) _php_stream_mmap_unmap((stream) TSRMLS_CC) argument
77 PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, off_t readden TSRMLS_DC);
78 #define php_stream_mmap_unmap_ex(stream, readden) _php_stream_mmap_unmap_ex((stream), (readden) T… argument
H A Dmemory.c92 stream->eof = 1; in php_stream_memory_read()
145 stream->eof = 0; in php_stream_memory_seek()
156 stream->eof = 0; in php_stream_memory_seek()
168 stream->eof = 0; in php_stream_memory_seek()
183 stream->eof = 0; in php_stream_memory_seek()
292 php_stream *stream; in _php_stream_memory_create() local
303 return stream; in _php_stream_memory_create()
328 return stream; in _php_stream_memory_open()
565 return stream; in _php_stream_temp_create()
587 return stream; in _php_stream_temp_open()
[all …]
H A Dphp_stream_glob_wrapper.h26 PHPAPI char* _php_glob_stream_get_path(php_stream *stream, int copy, int *plen STREAMS_DC TSRMLS_DC…
27 #define php_glob_stream_get_path(stream, copy, plen) _php_glob_stream_get_path((stream), (copy), (p… argument
29 PHPAPI char* _php_glob_stream_get_pattern(php_stream *stream, int copy, int *plen STREAMS_DC TSRMLS…
30 #define php_glob_stream_get_pattern(stream, copy, plen) _php_glob_stream_get_pattern((stream), (cop… argument
32 PHPAPI int _php_glob_stream_get_count(php_stream *stream, int *pflags STREAMS_DC TSRMLS_DC);
33 #define php_glob_stream_get_count(stream, pflags) _php_glob_stream_get_count((stream), (pflags) STR… argument
H A Dfilter.c339 php_stream *stream = chain->stream; in php_stream_filter_append_ex() local
351 if (&(stream->readfilters) == chain && (stream->writepos - stream->readpos) > 0) { in php_stream_filter_append_ex()
359 …bucket = php_stream_bucket_new(stream, (char*) stream->readbuf + stream->readpos, stream->writepos… in php_stream_filter_append_ex()
363 if (stream->readpos + consumed > (uint)stream->writepos) { in php_stream_filter_append_ex()
401 if (stream->readbuflen - stream->writepos < bucket->buflen) { in php_stream_filter_append_ex()
403 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, stream->is_persistent); in php_stream_filter_append_ex()
447 stream = chain->stream; in _php_stream_filter_flush()
487 memcpy(stream->readbuf, stream->readbuf + stream->readpos, stream->writepos - stream->readpos); in _php_stream_filter_flush()
489 stream->writepos -= stream->readpos; in _php_stream_filter_flush()
491 if (flushed_size > (stream->readbuflen - stream->writepos)) { in _php_stream_filter_flush()
[all …]
H A Dtransports.c60 php_stream *stream = NULL; in _php_stream_xport_create() local
80 return stream; in _php_stream_xport_create()
83 php_stream_pclose(stream); in _php_stream_xport_create()
84 stream = NULL; in _php_stream_xport_create()
132 stream = (*factory)(protocol, n, in _php_stream_xport_create()
136 if (stream) { in _php_stream_xport_create()
185 php_stream_pclose(stream); in _php_stream_xport_create()
187 php_stream_close(stream); in _php_stream_xport_create()
189 stream = NULL; in _php_stream_xport_create()
192 return stream; in _php_stream_xport_create()
[all …]
H A Dmmap.c25 PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mm… in _php_stream_mmap_range() argument
40 …if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_S… in _php_stream_mmap_range()
49 PHPAPI int _php_stream_mmap_unmap(php_stream *stream TSRMLS_DC) in _php_stream_mmap_unmap()
51 …return php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_UNMAP, NULL) == P… in _php_stream_mmap_unmap()
54 PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, off_t readden TSRMLS_DC) in _php_stream_mmap_unmap_ex() argument
58 if (php_stream_seek(stream, readden, SEEK_CUR) != 0) { in _php_stream_mmap_unmap_ex()
61 if (php_stream_mmap_unmap(stream) == 0) { in _php_stream_mmap_unmap_ex()
H A Dxp_socket.c154 php_sock_stream_wait_for_data(stream, sock TSRMLS_CC); in php_sockop_read()
209 pefree(sock, php_stream_is_persistent(stream)); in php_sockop_close()
575 if (stream->ops == &php_stream_unix_socket_ops || stream->ops == &php_stream_unixdg_socket_ops) { in php_tcp_sockop_bind()
625 if (stream->ops == &php_stream_unix_socket_ops || stream->ops == &php_stream_unixdg_socket_ops) { in php_tcp_sockop_connect()
657 …if (stream->context && php_stream_context_get_option(stream->context, "socket", "bindto", &tmpzval… in php_tcp_sockop_connect()
736 if (stream->context) { in php_tcp_sockop_accept()
737 zend_list_addref(stream->context->rsrc_id); in php_tcp_sockop_accept()
784 php_stream *stream = NULL; in php_stream_generic_socket_factory() local
819 if (stream == NULL) { in php_stream_generic_socket_factory()
825 return stream; in php_stream_generic_socket_factory()
[all …]
/PHP-5.4/Zend/
H A Dzend_stream.c82 munmap(stream->mmap.map, stream->mmap.len + ZEND_MMAP_AHEAD); in zend_stream_unmap()
88 stream->mmap.len = 0; in zend_stream_unmap()
92 stream->handle = stream->mmap.old_handle; in zend_stream_unmap()
98 if (stream->mmap.old_closer && stream->handle) { in zend_stream_mmap_closer()
99 stream->mmap.old_closer(stream->handle TSRMLS_CC); in zend_stream_mmap_closer()
314 if (fh->handle.stream.closer && fh->handle.stream.handle) {
315 fh->handle.stream.closer(fh->handle.stream.handle TSRMLS_CC);
347 return fh1->handle.stream.handle == fh2->handle.stream.handle;
349 return (fh1->handle.stream.handle == &fh1->handle.stream &&
350 fh2->handle.stream.handle == &fh2->handle.stream &&
[all …]
/PHP-5.4/ext/standard/
H A Dftp_fopen_wrapper.c305 return stream; in php_ftp_fopen_connect()
312 if (stream) { in php_ftp_fopen_connect()
465 if (!stream) { in php_stream_url_wrap_ftp()
595 if (stream) { in php_stream_url_wrap_ftp()
707 if (!stream) { in php_stream_ftp_opendir()
770 if (stream) { in php_stream_ftp_opendir()
897 if (stream) { in php_stream_ftp_url_stat()
947 if (stream) { in php_stream_ftp_unlink()
1026 if (stream) { in php_stream_ftp_rename()
1120 if (stream) { in php_stream_ftp_mkdir()
[all …]
H A Dimage.c447 length = php_read2(stream TSRMLS_CC); in php_read_APP()
948 if (php_stream_rewind(stream)) { in php_get_wbmp()
953 if (php_stream_getc(stream) != 0) { in php_get_wbmp()
959 i = php_stream_getc(stream); in php_get_wbmp()
967 i = php_stream_getc(stream); in php_get_wbmp()
976 i = php_stream_getc(stream); in php_get_wbmp()
1025 if (php_stream_rewind(stream)) { in php_get_xbm()
1302 if (!stream) { in php_getimagesize_from_stream()
1393 php_stream *stream = NULL; in php_getimagesize_from_any() local
1414 if (!stream) { in php_getimagesize_from_any()
[all …]
H A Dphp_fopen_wrapper.c43 stream->eof = 1; in php_stream_output_read()
77 if (!stream->eof) { in php_stream_input_read()
81 stream->eof = 1; in php_stream_input_read()
91 stream->eof = 1; in php_stream_input_read()
97 stream->eof = 1; in php_stream_input_read()
109 efree(stream->abstract); in php_stream_input_close()
342 return stream; in php_stream_url_wrap_php()
361 if (stream) { in php_stream_url_wrap_php()
363 return stream; in php_stream_url_wrap_php()
373 if (stream == NULL) { in php_stream_url_wrap_php()
[all …]
H A Dstreamsfuncs.c137 if (stream == NULL) { in PHP_FUNCTION()
299 php_stream *stream; in PHP_FUNCTION() local
327 php_stream *stream; in PHP_FUNCTION() local
356 php_stream *stream; in PHP_FUNCTION() local
406 php_stream *stream; in PHP_FUNCTION() local
489 php_stream *stream; in PHP_FUNCTION() local
607 php_stream *stream; in stream_array_to_fd_set() local
740 if ((stream->writepos - stream->readpos) > 0) { in stream_array_emulate_read_fd_set()
999 if (stream) { in decode_context_param()
1216 if (strchr(stream->mode, 'r') || strchr(stream->mode, '+')) { in apply_filter_to_stream()
[all …]
/PHP-5.4/main/
H A Dphp_streams.h249 #define php_stream_get_resource_id(stream) (stream)->rsrc_id argument
252 # define php_stream_auto_cleanup(stream) { (stream)->__exposed++; } argument
256 # define php_stream_to_zval(stream, zval) { ZVAL_RESOURCE(zval, (stream)->rsrc_id); (stream)->__exp… argument
295 #define php_stream_tell(stream) _php_stream_tell((stream) TSRMLS_CC) argument
317 #define php_stream_eof(stream) _php_stream_eof((stream) TSRMLS_CC) argument
320 #define php_stream_getc(stream) _php_stream_getc((stream) TSRMLS_CC) argument
323 #define php_stream_putc(stream, c) _php_stream_putc((stream), (c) TSRMLS_CC) argument
326 #define php_stream_flush(stream) _php_stream_flush((stream), 0 TSRMLS_CC) argument
336 #define php_stream_puts(stream, buf) _php_stream_puts((stream), (buf) TSRMLS_CC) argument
490 #define php_stream_is(stream, anops) ((stream)->ops == anops) argument
[all …]
/PHP-5.4/ext/standard/tests/file/
H A Dfgetc_basic.phpt72 resource(%d) of type (stream)
76 resource(%d) of type (stream)
80 resource(%d) of type (stream)
84 resource(%d) of type (stream)
88 resource(%d) of type (stream)
92 resource(%d) of type (stream)
98 resource(%d) of type (stream)
102 resource(%d) of type (stream)
106 resource(%d) of type (stream)
110 resource(%d) of type (stream)
[all …]
H A D007_basic.phpt95 resource(%d) of type (stream)
108 resource(%d) of type (stream)
121 resource(%d) of type (stream)
134 resource(%d) of type (stream)
147 resource(%d) of type (stream)
160 resource(%d) of type (stream)
173 resource(%d) of type (stream)
186 resource(%d) of type (stream)
199 resource(%d) of type (stream)
212 resource(%d) of type (stream)
[all …]
H A Duserstreams_002.phpt34 test("valid stream", $fd, STDIN);
37 test("return value not a stream resource", $fd, "foo");
38 test("return value is stream itself", $fd, $fd);
46 ------ valid stream: -------
55 Warning: stream_select(): No stream arrays were passed in %s
62 Warning: stream_select(): No stream arrays were passed in %s
65 ------ return value not a stream resource: -------
73 Warning: stream_select(): No stream arrays were passed in %s
76 ------ return value is stream itself: -------
82 Warning: stream_select(): No stream arrays were passed in %s
[all …]
/PHP-5.4/ext/zlib/
H A Dzlib_fopen_wrapper.c30 php_stream *stream; member
41 stream->eof = 1; in php_gziop_read()
82 if (self->stream) { in php_gziop_close()
83 php_stream_close(self->stream); in php_gziop_close()
84 self->stream = NULL; in php_gziop_close()
92 static int php_gziop_flush(php_stream *stream TSRMLS_DC) in php_gziop_flush()
113 php_stream *stream = NULL, *innerstream = NULL; in php_stream_gzopen() local
136 self->stream = innerstream; in php_stream_gzopen()
141 if (stream) { in php_stream_gzopen()
142 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in php_stream_gzopen()
[all …]
/PHP-5.4/ext/standard/tests/streams/
H A Dbug54946.phpt6 $stream = fopen($filename, "w"); // w or a
7 $retval = stream_get_contents($stream, 1, 1);
8 fclose($stream);
16 $stream = fopen($filename, "a");
17 $retval = stream_get_contents($stream, 1, 1);
19 fclose($stream);
26 $stream = fopen($filename, "a");
27 fseek($stream, 1);
28 $retval = stream_get_contents($stream, 1);
30 fclose($stream);
/PHP-5.4/ext/bz2/
H A Dbz2.c132 php_stream *stream; member
145 stream->eof = 1; in php_bz2iop_read()
167 if (self->stream) { in php_bz2iop_close()
253 if (stream) { in _php_stream_bz2open()
277 if (stream) { in _php_stream_bz2open()
278 php_stream_close(stream); in _php_stream_bz2open()
338 php_stream *stream; in PHP_FUNCTION() local
412 … else if (stream_mode_len == 1 && stream->mode[0] != 'r' && stream->mode[0] != 'w' && stream->mode… in PHP_FUNCTION()
445 stream = php_stream_bz2open_from_BZFILE(bz, mode, stream); in PHP_FUNCTION()
451 if (stream) { in PHP_FUNCTION()
[all …]
/PHP-5.4/ext/standard/tests/filters/
H A Dfilter_errors.inc18 $stream = fopen('php://memory', 'wb+');
20 fwrite($stream, b".\r\n$data");
21 fseek($stream, 0, SEEK_SET);
22 stream_get_line($stream, 8192, "\r\n");
24 $f = stream_filter_append($stream, $filter);
28 $stream = fopen('php://memory', 'wb+');
30 fwrite($stream, b"$data");
31 fseek($stream, 0, SEEK_SET);
33 stream_filter_append($stream, $filter);
34 stream_get_contents($stream);
/PHP-5.4/ext/zip/
H A Dzip_stream.c23 php_stream *stream; member
41 stream->eof = 1; in php_zip_ops_read()
48 stream->eof = 1; in php_zip_ops_read()
60 if (!stream) { in php_zip_ops_write()
84 stream->abstract = NULL; in php_zip_ops_close()
92 if (!stream) { in php_zip_ops_flush()
218 self->stream = NULL; in php_stream_zip_open()
227 if (!stream) { in php_stream_zip_open()
230 return stream; in php_stream_zip_open()
311 if (!stream) { in php_stream_zip_opener()
[all …]
/PHP-5.4/ext/openssl/
H A Dxp_ssl.c69 …if (stream->wrapperdata && stream->wrapper && strcasecmp(stream->wrapper->wops->label, "HTTP") == … in is_http_stream_talking_to_iis()
120 stream->eof = 1; in handle_ssl_error()
419 handle_ssl_error(stream, 0, 1 TSRMLS_CC); in php_openssl_setup_crypto()
542 if (stream->context) { in php_openssl_enable_crypto()
546 stream->context, "ssl", in php_openssl_enable_crypto()
560 stream->context, "ssl", in php_openssl_enable_crypto()
649 if (stream->context) { in php_openssl_tcp_sockop_accept()
650 zend_list_addref(stream->context->rsrc_id); in php_openssl_tcp_sockop_accept()
909 php_stream *stream = NULL; in php_openssl_ssl_socket_factory() local
933 if (stream == NULL) { in php_openssl_ssl_socket_factory()
[all …]
/PHP-5.4/ext/standard/tests/dir/
H A Dscandir_variation8.phpt78 resource(%d) of type (stream)
81 resource(%d) of type (stream)
84 resource(%d) of type (stream)
87 resource(%d) of type (stream)
90 resource(%d) of type (stream)
93 resource(%d) of type (stream)
96 resource(%d) of type (stream)
99 resource(%d) of type (stream)
102 resource(%d) of type (stream)
105 resource(%d) of type (stream)
[all …]

Completed in 145 milliseconds

12345678910>>...27