Lines Matching refs:stream

90 	php_stream *stream = (php_stream*)cookie;  in stream_cookie_closer()  local
93 stream->fclose_stdiocast = PHP_STREAM_FCLOSE_NONE; in stream_cookie_closer()
94 return php_stream_free(stream, in stream_cookie_closer()
129 php_stream *stream = (php_stream*)cookie; in stream_cookie_closer() local
132 stream->fclose_stdiocast = PHP_STREAM_FCLOSE_NONE; in stream_cookie_closer()
133 return php_stream_free(stream, in stream_cookie_closer()
151 void php_stream_mode_sanitize_fdopen_fopencookie(php_stream *stream, char *result) in php_stream_mode_sanitize_fdopen_fopencookie() argument
155 const char *cur_mode = stream->mode; in php_stream_mode_sanitize_fdopen_fopencookie()
194 PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show_err) in _php_stream_cast() argument
201 php_stream_flush(stream); in _php_stream_cast()
202 if (stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0) { in _php_stream_cast()
205 stream->ops->seek(stream, stream->position, SEEK_SET, &dummy); in _php_stream_cast()
206 stream->readpos = stream->writepos = 0; in _php_stream_cast()
213 if (stream->stdiocast) { in _php_stream_cast()
215 *(FILE**)ret = stream->stdiocast; in _php_stream_cast()
222 if (php_stream_is(stream, PHP_STREAM_IS_STDIO) && in _php_stream_cast()
223 stream->ops->cast && in _php_stream_cast()
224 !php_stream_is_filtered(stream) && in _php_stream_cast()
225 stream->ops->cast(stream, castas, ret) == SUCCESS in _php_stream_cast()
238 php_stream_mode_sanitize_fdopen_fopencookie(stream, fixed_mode); in _php_stream_cast()
239 *(FILE**)ret = fopencookie(stream, fixed_mode, PHP_STREAM_COOKIE_FUNCTIONS); in _php_stream_cast()
245 stream->fclose_stdiocast = PHP_STREAM_FCLOSE_FOPENCOOKIE; in _php_stream_cast()
249 pos = php_stream_tell(stream); in _php_stream_cast()
266 …if (!php_stream_is_filtered(stream) && stream->ops->cast && stream->ops->cast(stream, castas, NULL… in _php_stream_cast()
267 if (FAILURE == stream->ops->cast(stream, castas, ret)) { in _php_stream_cast()
276 int retcopy = php_stream_copy_to_stream_ex(stream, newstream, PHP_STREAM_COPY_ALL, NULL); in _php_stream_cast()
289 php_stream_free(stream, PHP_STREAM_FREE_CLOSE_CASTED); in _php_stream_cast()
300 if (php_stream_is_filtered(stream)) { in _php_stream_cast()
305 } else if (stream->ops->cast && stream->ops->cast(stream, castas, ret) == SUCCESS) { in _php_stream_cast()
318 …php_error_docref(NULL, E_WARNING, "Cannot represent a stream of type %s as a %s", stream->ops->lab… in _php_stream_cast()
325 if ((stream->writepos - stream->readpos) > 0 && in _php_stream_cast()
326 stream->fclose_stdiocast != PHP_STREAM_FCLOSE_FOPENCOOKIE && in _php_stream_cast()
333 …s of buffered data lost during stream conversion!", (zend_long)(stream->writepos - stream->readpos… in _php_stream_cast()
337 stream->stdiocast = *(FILE**)ret; in _php_stream_cast()
341 php_stream_free(stream, PHP_STREAM_FREE_CLOSE_CASTED); in _php_stream_cast()
353 php_stream *stream = NULL; in _php_stream_open_wrapper_as_file() local
355 stream = php_stream_open_wrapper_rel(path, mode, options|STREAM_WILL_CAST, opened_path); in _php_stream_open_wrapper_as_file()
357 if (stream == NULL) { in _php_stream_open_wrapper_as_file()
361 …if (php_stream_cast(stream, PHP_STREAM_AS_STDIO|PHP_STREAM_CAST_TRY_HARD|PHP_STREAM_CAST_RELEASE, … in _php_stream_open_wrapper_as_file()
362 php_stream_close(stream); in _php_stream_open_wrapper_as_file()