Lines Matching refs:stream

62 	php_stream *stream;  member
67 static ssize_t php_bz2iop_read(php_stream *stream, char *buf, size_t count) in php_bz2iop_read() argument
69 struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *)stream->abstract; in php_bz2iop_read()
81 stream->eof = 1; in php_bz2iop_read()
97 static ssize_t php_bz2iop_write(php_stream *stream, const char *buf, size_t count) in php_bz2iop_write() argument
100 struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *)stream->abstract; in php_bz2iop_write()
125 static int php_bz2iop_close(php_stream *stream, int close_handle) in php_bz2iop_close() argument
127 struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *)stream->abstract; in php_bz2iop_close()
134 if (self->stream) { in php_bz2iop_close()
135 …php_stream_free(self->stream, PHP_STREAM_FREE_CLOSE | (close_handle == 0 ? PHP_STREAM_FREE_PRESERV… in php_bz2iop_close()
143 static int php_bz2iop_flush(php_stream *stream) in php_bz2iop_flush() argument
145 struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *)stream->abstract; in php_bz2iop_flush()
168 self->stream = innerstream; in _php_stream_bz2open_from_BZFILE()
184 php_stream *retstream = NULL, *stream = NULL; in _php_stream_bz2open() local
221 stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path); in _php_stream_bz2open()
223 if (stream) { in _php_stream_bz2open()
225 if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **) &fd, REPORT_ERRORS)) { in _php_stream_bz2open()
239 retstream = _php_stream_bz2open_from_BZFILE(bz_file, mode, stream STREAMS_REL_CC); in _php_stream_bz2open()
247 if (stream) { in _php_stream_bz2open()
248 php_stream_close(stream); in _php_stream_bz2open()
308 php_stream *stream; in PHP_FUNCTION() local
315 php_stream_from_zval(stream, bz); in PHP_FUNCTION()
322 data = php_stream_read_to_str(stream, len); in PHP_FUNCTION()
338 php_stream *stream = NULL; in PHP_FUNCTION() local
361 stream = php_stream_bz2open(NULL, Z_STRVAL_P(file), mode, REPORT_ERRORS, NULL); in PHP_FUNCTION()
367 php_stream_from_zval(stream, file); in PHP_FUNCTION()
368 stream_mode_len = strlen(stream->mode); in PHP_FUNCTION()
370 if (stream_mode_len != 1 && !(stream_mode_len == 2 && memchr(stream->mode, 'b', 2))) { in PHP_FUNCTION()
371 php_error_docref(NULL, E_WARNING, "Cannot use stream opened in mode '%s'", stream->mode); in PHP_FUNCTION()
373 … else if (stream_mode_len == 1 && stream->mode[0] != 'r' && stream->mode[0] != 'w' && stream->mode… in PHP_FUNCTION()
374 php_error_docref(NULL, E_WARNING, "Cannot use stream opened in mode '%s'", stream->mode); in PHP_FUNCTION()
381 if (stream->mode[0] != mode[0] && !(stream_mode_len == 2 && stream->mode[1] != mode[0])) { in PHP_FUNCTION()
388 if (stream->mode[0] != mode[0] && !(stream_mode_len == 2 && stream->mode[1] != mode[0]) in PHP_FUNCTION()
389 && stream->mode[0] != 'a' && !(stream_mode_len == 2 && stream->mode[1] != 'a') in PHP_FUNCTION()
390 && stream->mode[0] != 'x' && !(stream_mode_len == 2 && stream->mode[1] != 'x')) { in PHP_FUNCTION()
398 if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_FD, (void *) &fd, REPORT_ERRORS)) { in PHP_FUNCTION()
404 stream = php_stream_bz2open_from_BZFILE(bz, mode, stream); in PHP_FUNCTION()
410 if (stream) { in PHP_FUNCTION()
411 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
567 php_stream *stream; in php_bz2_error() local
576 php_stream_from_zval(stream, bzp); in php_bz2_error()
578 if (!php_stream_is(stream, PHP_STREAM_IS_BZIP2)) { in php_bz2_error()
583 self = (struct php_bz2_stream_data_t *) stream->abstract; in php_bz2_error()