Home
last modified time | relevance | path

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

12345678910>>...29

/PHP-7.0/main/streams/
H A Dstreams.c487 stream->wrapper->wops->stream_closer(stream->wrapper, stream); in _php_stream_free()
579 justread = stream->ops->read(stream, chunk_buf, stream->chunk_size); in _php_stream_fill_read_buffer()
619 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, in _php_stream_fill_read_buffer()
661 if (stream->readbuf && stream->readbuflen - stream->writepos < stream->chunk_size) { in _php_stream_fill_read_buffer()
662 … memmove(stream->readbuf, stream->readbuf + stream->readpos, stream->readbuflen - stream->readpos); in _php_stream_fill_read_buffer()
669 if (stream->readbuflen - stream->writepos < stream->chunk_size) { in _php_stream_fill_read_buffer()
671 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, in _php_stream_fill_read_buffer()
675 justread = stream->ops->read(stream, (char*)stream->readbuf + stream->writepos, in _php_stream_fill_read_buffer()
1107 stream->ops->seek(stream, stream->position, SEEK_SET, &stream->position); in _php_stream_write_buffer()
1214 ret = stream->ops->flush(stream); in _php_stream_flush()
[all …]
H A Dcast.c199 if (stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0) { in _php_stream_cast()
202 stream->ops->seek(stream, stream->position, SEEK_SET, &dummy); in _php_stream_cast()
203 stream->readpos = stream->writepos = 0; in _php_stream_cast()
210 if (stream->stdiocast) { in _php_stream_cast()
220 stream->ops->cast && in _php_stream_cast()
222 stream->ops->cast(stream, castas, ret) == SUCCESS in _php_stream_cast()
263 …if (!php_stream_is_filtered(stream) && stream->ops->cast && stream->ops->cast(stream, castas, NULL… in _php_stream_cast()
264 if (FAILURE == stream->ops->cast(stream, castas, ret)) { in _php_stream_cast()
300 } else if (stream->ops->cast && stream->ops->cast(stream, castas, ret) == SUCCESS) { in _php_stream_cast()
320 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);
75 #define php_stream_mmap_unmap(stream) _php_stream_mmap_unmap((stream)) argument
77 PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, zend_off_t readden);
78 #define php_stream_mmap_unmap_ex(stream, readden) _php_stream_mmap_unmap_ex((stream), (readden)) argument
H A Dphp_stream_glob_wrapper.h26 PHPAPI char* _php_glob_stream_get_path(php_stream *stream, int copy, size_t *plen STREAMS_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, size_t *plen STREAMS_DC);
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);
33 #define php_glob_stream_get_count(stream, pflags) _php_glob_stream_get_count((stream), (pflags) STR… argument
H A Dmemory.c91 stream->eof = 1; in php_stream_memory_read()
149 stream->eof = 0; in php_stream_memory_seek()
160 stream->eof = 0; in php_stream_memory_seek()
172 stream->eof = 0; in php_stream_memory_seek()
187 stream->eof = 0; in php_stream_memory_seek()
296 php_stream *stream; in _php_stream_memory_create() local
307 return stream; in _php_stream_memory_create()
332 return stream; in _php_stream_memory_open()
584 return stream; in _php_stream_temp_create_ex()
612 return stream; in _php_stream_temp_open()
[all …]
H A Dfilter.c337 php_stream *stream = chain->stream; in php_stream_filter_append_ex() local
349 if (&(stream->readfilters) == chain && (stream->writepos - stream->readpos) > 0) { in php_stream_filter_append_ex()
357 …bucket = php_stream_bucket_new(stream, (char*) stream->readbuf + stream->readpos, stream->writepos… in php_stream_filter_append_ex()
361 if (stream->readpos + consumed > (uint)stream->writepos) { in php_stream_filter_append_ex()
401 stream->readbuf = perealloc(stream->readbuf, stream->readbuflen, stream->is_persistent); in php_stream_filter_append_ex()
445 stream = chain->stream; in _php_stream_filter_flush()
485 memcpy(stream->readbuf, stream->readbuf + stream->readpos, stream->writepos - stream->readpos); in _php_stream_filter_flush()
487 stream->writepos -= stream->readpos; in _php_stream_filter_flush()
489 if (flushed_size > (stream->readbuflen - stream->writepos)) { in _php_stream_filter_flush()
491stream->readbuf = perealloc(stream->readbuf, stream->writepos + flushed_size + stream->chunk_size,… 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) in _php_stream_mmap_unmap() argument
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, zend_off_t readden) 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.c621 if (stream->ops == &php_stream_unix_socket_ops || stream->ops == &php_stream_unixdg_socket_ops) { in php_tcp_sockop_bind()
649 if (PHP_STREAM_CONTEXT(stream) in php_tcp_sockop_bind()
659 if (PHP_STREAM_CONTEXT(stream) in php_tcp_sockop_bind()
669 && PHP_STREAM_CONTEXT(stream) in php_tcp_sockop_bind()
747 && PHP_STREAM_CONTEXT(stream) in php_tcp_sockop_connect()
823 if (stream->ctx) { in php_tcp_sockop_accept()
824 GC_REFCOUNT(stream->ctx)++; in php_tcp_sockop_accept()
871 php_stream *stream = NULL; in php_stream_generic_socket_factory() local
906 if (stream == NULL) { in php_stream_generic_socket_factory()
912 return stream; in php_stream_generic_socket_factory()
[all …]
/PHP-7.0/Zend/
H A Dzend_stream.c81 munmap(stream->mmap.map, stream->mmap.len + ZEND_MMAP_AHEAD); in zend_stream_unmap()
87 stream->mmap.len = 0; in zend_stream_unmap()
91 stream->handle = stream->mmap.old_handle; in zend_stream_unmap()
97 if (stream->mmap.old_closer && stream->handle) { in zend_stream_mmap_closer()
98 stream->mmap.old_closer(stream->handle); in zend_stream_mmap_closer()
313 if (fh->handle.stream.closer && fh->handle.stream.handle) {
314 fh->handle.stream.closer(fh->handle.stream.handle);
346 return fh1->handle.stream.handle == fh2->handle.stream.handle;
348 return (fh1->handle.stream.handle == &fh1->handle.stream &&
349 fh2->handle.stream.handle == &fh2->handle.stream &&
[all …]
/PHP-7.0/ext/standard/
H A Dftp_fopen_wrapper.c308 return stream; in php_ftp_fopen_connect()
315 if (stream) { in php_ftp_fopen_connect()
469 if (!stream) { in php_stream_url_wrap_ftp()
599 if (stream) { in php_stream_url_wrap_ftp()
702 if (!stream) { in php_stream_ftp_opendir()
768 if (stream) { in php_stream_ftp_opendir()
895 if (stream) { in php_stream_ftp_url_stat()
945 if (stream) { in php_stream_ftp_unlink()
1024 if (stream) { in php_stream_ftp_rename()
1118 if (stream) { in php_stream_ftp_mkdir()
[all …]
H A Dimage.c441 length = php_read2(stream); in php_read_APP()
622 php_read2(stream); /* Lsiz */ in php_handle_jpc()
623 php_read2(stream); /* Rsiz */ in php_handle_jpc()
952 i = php_stream_getc(stream); in php_get_wbmp()
960 i = php_stream_getc(stream); in php_get_wbmp()
973 i = php_stream_getc(stream); in php_get_wbmp()
1077 php_get_xbm(stream, &result); in php_handle_xbm()
1305 if (!stream) { in php_getimagesize_from_stream()
1397 php_stream *stream = NULL; in php_getimagesize_from_any() local
1417 if (!stream) { in php_getimagesize_from_any()
[all …]
H A Dstreamsfuncs.c138 if (stream == NULL) { in PHP_FUNCTION()
298 php_stream *stream; in PHP_FUNCTION() local
330 php_stream *stream; in PHP_FUNCTION() local
359 php_stream *stream; in PHP_FUNCTION() local
407 php_stream *stream; in PHP_FUNCTION() local
487 php_stream *stream; in PHP_FUNCTION() local
590 php_stream *stream; in stream_array_to_fd_set() local
695 if ((stream->writepos - stream->readpos) > 0) { in stream_array_emulate_read_fd_set()
925 if (stream) { in decode_context_param()
1153 if (strchr(stream->mode, 'r') || strchr(stream->mode, '+')) { in apply_filter_to_stream()
[all …]
H A Dphp_fopen_wrapper.c43 stream->eof = 1; in php_stream_output_read()
101 stream->eof = 1; in php_stream_input_read()
112 efree(stream->abstract); in php_stream_input_close()
113 stream->abstract = NULL; in php_stream_input_close()
183 php_stream * stream = NULL; in php_stream_url_wrap_php() local
385 return stream; in php_stream_url_wrap_php()
404 if (stream) { in php_stream_url_wrap_php()
405 stream->ops = &php_stream_socket_ops; in php_stream_url_wrap_php()
406 return stream; in php_stream_url_wrap_php()
416 if (stream == NULL) { in php_stream_url_wrap_php()
[all …]
/PHP-7.0/main/
H A Dphp_streams.h236 ((php_stream_context*) ((stream)->ctx ? ((stream)->ctx->ptr) : NULL))
252 #define php_stream_auto_cleanup(stream) { (stream)->__exposed++; } argument
256 #define php_stream_to_zval(stream, zval) { ZVAL_RES(zval, (stream)->res); (stream)->__exposed++; } argument
304 #define php_stream_tell(stream) _php_stream_tell((stream)) argument
322 #define php_stream_eof(stream) _php_stream_eof((stream)) argument
325 #define php_stream_getc(stream) _php_stream_getc((stream)) argument
328 #define php_stream_putc(stream, c) _php_stream_putc((stream), (c)) argument
331 #define php_stream_flush(stream) _php_stream_flush((stream), 0) argument
341 #define php_stream_puts(stream, buf) _php_stream_puts((stream), (buf)) argument
497 #define php_stream_is(stream, anops) ((stream)->ops == anops) argument
[all …]
/PHP-7.0/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-7.0/ext/zlib/
H A Dzlib_fopen_wrapper.c32 php_stream *stream; member
44 stream->eof = 1; in php_gziop_read()
86 if (self->stream) { in php_gziop_close()
87 php_stream_close(self->stream); in php_gziop_close()
88 self->stream = NULL; in php_gziop_close()
96 static int php_gziop_flush(php_stream *stream) in php_gziop_flush() argument
117 php_stream *stream = NULL, *innerstream = NULL; in php_stream_gzopen() local
140 self->stream = innerstream; in php_stream_gzopen()
145 if (stream) { in php_stream_gzopen()
146 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in php_stream_gzopen()
[all …]
/PHP-7.0/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-7.0/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-7.0/ext/bz2/
H A Dbz2.c133 php_stream *stream; member
152 stream->eof = 1; in php_bz2iop_read()
198 if (self->stream) { in php_bz2iop_close()
287 if (stream) { in _php_stream_bz2open()
311 if (stream) { in _php_stream_bz2open()
312 php_stream_close(stream); in _php_stream_bz2open()
372 php_stream *stream; in PHP_FUNCTION() local
436 … else if (stream_mode_len == 1 && stream->mode[0] != 'r' && stream->mode[0] != 'w' && stream->mode… in PHP_FUNCTION()
469 stream = php_stream_bz2open_from_BZFILE(bz, mode, stream); in PHP_FUNCTION()
475 if (stream) { in PHP_FUNCTION()
[all …]
/PHP-7.0/ext/zip/
H A Dzip_stream.c38 php_stream *stream; member
57 stream->eof = 1; in php_zip_ops_read()
62 stream->eof = 1; in php_zip_ops_read()
71 stream->eof = 1; in php_zip_ops_read()
83 if (!stream) { in php_zip_ops_write()
115 if (!stream) { in php_zip_ops_flush()
241 self->stream = NULL; in php_stream_zip_open()
250 if (!stream) { in php_stream_zip_open()
253 return stream; in php_stream_zip_open()
333 if (!stream) { in php_stream_zip_opener()
[all …]
/PHP-7.0/ext/openssl/
H A Dxp_ssl.c168 …if (Z_TYPE(stream->wrapperdata) == IS_ARRAY && stream->wrapper && strcasecmp(stream->wrapper->wops… in is_http_stream_talking_to_iis()
216 stream->eof = 1; in handle_ssl_error()
273 php_stream *stream; in verify_callback() local
598 php_stream *stream; in win_cert_verify_callback() local
757 php_stream *stream; in load_stream_cafile() local
767 if (stream == NULL) { in load_stream_cafile()
1048 php_stream *stream; in limit_handshake_reneg() local
1307 php_stream *stream; in server_sni_callback() local
2496 if (stream->writepos == stream->readpos in php_openssl_sockop_cast()
2499 php_stream_fill_read_buffer(stream, pending < stream->chunk_size in php_openssl_sockop_cast()
[all …]
/PHP-7.0/sapi/phpdbg/tests/
H A Dphpdbg_get_executable_stream_wrapper.phpt20 * of stream wrappers.
24 * First, we define a stream wrapper that simply maps to a real file on disk.
40 $stream = \fopen($path, $mode);
42 if ($stream === false) {
46 $this->stream = $stream;
58 public function stream_read(int $count) : string { return \fread($this->stream, $count); }
59 public function stream_close() : bool { return \fclose($this->stream); }
60 public function stream_eof() : bool { return \feof($this->stream); }
61 public function stream_stat() { return \fstat($this->stream); }
63 private $stream = false;
[all …]

Completed in 124 milliseconds

12345678910>>...29