Lines Matching refs:stream
117 ssize_t (*write)(php_stream *stream, const char *buf, size_t count);
118 ssize_t (*read)(php_stream *stream, char *buf, size_t count);
119 int (*close)(php_stream *stream, int close_handle);
120 int (*flush)(php_stream *stream);
125 int (*seek)(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffset);
126 int (*cast)(php_stream *stream, int castas, void **ret);
127 int (*stat)(php_stream *stream, php_stream_statbuf *ssb);
128 int (*set_option)(php_stream *stream, int option, int value, void *ptrparam);
136 int (*stream_closer)(php_stream_wrapper *wrapper, php_stream *stream);
138 int (*stream_stat)(php_stream_wrapper *wrapper, php_stream *stream, php_stream_statbuf *ssb);
250 #define PHP_STREAM_CONTEXT(stream) \ argument
251 ((php_stream_context*) ((stream)->ctx ? ((stream)->ctx->ptr) : NULL))
265 #define php_stream_get_resource_id(stream) ((php_stream *)(stream))->res->handle argument
267 #define php_stream_auto_cleanup(stream) { (stream)->__exposed = 1; } argument
271 #define php_stream_to_zval(stream, zval) { ZVAL_RES(zval, (stream)->res); (stream)->__exposed = 1; } argument
293 PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream **stream);
309 PHPAPI int _php_stream_free(php_stream *stream, int close_options);
310 #define php_stream_free(stream, close_options) _php_stream_free((stream), (close_options)) argument
311 #define php_stream_close(stream) _php_stream_free((stream), PHP_STREAM_FREE_CLOSE) argument
312 #define php_stream_pclose(stream) _php_stream_free((stream), PHP_STREAM_FREE_CLOSE_PERSISTENT) argument
314 PHPAPI int _php_stream_seek(php_stream *stream, zend_off_t offset, int whence);
315 #define php_stream_rewind(stream) _php_stream_seek((stream), 0L, SEEK_SET) argument
316 #define php_stream_seek(stream, offset, whence) _php_stream_seek((stream), (offset), (whence)) argument
318 PHPAPI zend_off_t _php_stream_tell(php_stream *stream);
319 #define php_stream_tell(stream) _php_stream_tell((stream)) argument
321 PHPAPI ssize_t _php_stream_read(php_stream *stream, char *buf, size_t count);
322 #define php_stream_read(stream, buf, count) _php_stream_read((stream), (buf), (count)) argument
324 PHPAPI zend_string *php_stream_read_to_str(php_stream *stream, size_t len);
326 PHPAPI ssize_t _php_stream_write(php_stream *stream, const char *buf, size_t count);
327 #define php_stream_write_string(stream, str) _php_stream_write(stream, str, strlen(str)) argument
328 #define php_stream_write(stream, buf, count) _php_stream_write(stream, (buf), (count)) argument
330 PHPAPI zend_result _php_stream_fill_read_buffer(php_stream *stream, size_t size);
331 #define php_stream_fill_read_buffer(stream, size) _php_stream_fill_read_buffer((stream), (size)) argument
333 PHPAPI ssize_t _php_stream_printf(php_stream *stream, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(pr…
338 PHPAPI bool _php_stream_eof(php_stream *stream);
339 #define php_stream_eof(stream) _php_stream_eof((stream)) argument
341 PHPAPI int _php_stream_getc(php_stream *stream);
342 #define php_stream_getc(stream) _php_stream_getc((stream)) argument
344 PHPAPI int _php_stream_putc(php_stream *stream, int c);
345 #define php_stream_putc(stream, c) _php_stream_putc((stream), (c)) argument
347 PHPAPI int _php_stream_flush(php_stream *stream, int closing);
348 #define php_stream_flush(stream) _php_stream_flush((stream), 0) argument
350 PHPAPI int _php_stream_sync(php_stream *stream, bool data_only);
351 #define php_stream_sync(stream, d) _php_stream_sync((stream), (d)) argument
353 PHPAPI char *_php_stream_get_line(php_stream *stream, char *buf, size_t maxlen, size_t *returned_le…
354 #define php_stream_gets(stream, buf, maxlen) _php_stream_get_line((stream), (buf), (maxlen), NULL) argument
356 #define php_stream_get_line(stream, buf, maxlen, retlen) _php_stream_get_line((stream), (buf), (max… argument
357 PHPAPI zend_string *php_stream_get_record(php_stream *stream, size_t maxlen, const char *delim, siz…
360 PHPAPI bool _php_stream_puts(php_stream *stream, const char *buf);
361 #define php_stream_puts(stream, buf) _php_stream_puts((stream), (buf)) argument
363 PHPAPI int _php_stream_stat(php_stream *stream, php_stream_statbuf *ssb);
364 #define php_stream_stat(stream, ssb) _php_stream_stat((stream), (ssb)) argument
390 PHPAPI int _php_stream_set_option(php_stream *stream, int option, int value, void *ptrparam);
391 #define php_stream_set_option(stream, option, value, ptrvalue) _php_stream_set_option((stream), (op… argument
393 #define php_stream_set_chunk_size(stream, size) _php_stream_set_option((stream), PHP_STREAM_OPTION_… argument
432 #define php_stream_supports_lock(stream) (_php_stream_set_option((stream), PHP_STREAM_OPTION_LOCKIN… argument
433 #define php_stream_lock(stream, mode) _php_stream_set_option((stream), PHP_STREAM_OPTION_LOCKING, … argument
444 #define php_stream_truncate_supported(stream) (_php_stream_set_option((stream), PHP_STREAM_OPTION_T… argument
447 PHPAPI int _php_stream_truncate_set_size(php_stream *stream, size_t newsize);
448 #define php_stream_truncate_set_size(stream, size) _php_stream_truncate_set_size((stream), (size)) argument
452 #define php_stream_populate_meta_data(stream, zv) (_php_stream_set_option((stream), PHP_STREAM_OPTI… argument
467 #define php_stream_sync_supported(stream) (_php_stream_set_option((stream), PHP_STREAM_OPTION_SYNC_… argument
493 #define php_stream_passthru(stream) _php_stream_passthru((stream) STREAMS_CC) argument
518 PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show_err);
521 #define php_stream_can_cast(stream, as) _php_stream_cast((stream), (as), NULL, 0) argument
522 #define php_stream_cast(stream, as, ret, show_err) _php_stream_cast((stream), (as), (ret), (show_er… argument
526 #define php_stream_is(stream, anops) ((stream)->ops == anops) argument
529 #define php_stream_is_persistent(stream) (stream)->is_persistent argument
595 PHPAPI const char *php_stream_locate_eol(php_stream *stream, zend_string *buf);