Lines Matching refs:stream
45 static ssize_t php_stream_memory_write(php_stream *stream, const char *buf, size_t count) in php_stream_memory_write() argument
47 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_write()
72 static ssize_t php_stream_memory_read(php_stream *stream, char *buf, size_t count) in php_stream_memory_read() argument
74 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_read()
78 stream->eof = 1; in php_stream_memory_read()
96 static int php_stream_memory_close(php_stream *stream, int close_handle) in php_stream_memory_close() argument
98 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_close()
108 static int php_stream_memory_flush(php_stream *stream) in php_stream_memory_flush() argument
117 static int php_stream_memory_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *ne… in php_stream_memory_seek() argument
119 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_seek()
132 stream->eof = 0; in php_stream_memory_seek()
143 stream->eof = 0; in php_stream_memory_seek()
155 stream->eof = 0; in php_stream_memory_seek()
170 stream->eof = 0; in php_stream_memory_seek()
181 static int php_stream_memory_cast(php_stream *stream, int castas, void **ret) in php_stream_memory_cast() argument
187 static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ in php_stream_memory_stat() argument
190 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_stat()
219 static int php_stream_memory_set_option(php_stream *stream, int option, int value, void *ptrparam) … in php_stream_memory_set_option() argument
221 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_set_option()
292 php_stream *stream; in _php_stream_memory_create() local
299 stream = php_stream_alloc_rel(&php_stream_memory_ops, self, 0, _php_stream_mode_to_str(mode)); in _php_stream_memory_create()
300 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in _php_stream_memory_create()
301 return stream; in _php_stream_memory_create()
309 php_stream *stream; in _php_stream_memory_open() local
312 if ((stream = php_stream_memory_create_rel(mode)) != NULL) { in _php_stream_memory_open()
313 ms = (php_stream_memory_data*)stream->abstract; in _php_stream_memory_open()
316 return stream; in _php_stream_memory_open()
322 PHPAPI zend_string *_php_stream_memory_get_buffer(php_stream *stream STREAMS_DC) in _php_stream_memory_get_buffer()
324 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in _php_stream_memory_get_buffer()
344 static ssize_t php_stream_temp_write(php_stream *stream, const char *buf, size_t count) in php_stream_temp_write() argument
346 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_write()
365 php_stream_encloses(stream, ts->innerstream); in php_stream_temp_write()
375 static ssize_t php_stream_temp_read(php_stream *stream, char *buf, size_t count) in php_stream_temp_read() argument
377 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_read()
388 stream->eof = ts->innerstream->eof; in php_stream_temp_read()
396 static int php_stream_temp_close(php_stream *stream, int close_handle) in php_stream_temp_close() argument
398 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_close()
423 static int php_stream_temp_flush(php_stream *stream) in php_stream_temp_flush() argument
425 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_flush()
434 static int php_stream_temp_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newo… in php_stream_temp_seek() argument
436 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_seek()
447 stream->eof = ts->innerstream->eof; in php_stream_temp_seek()
454 static int php_stream_temp_cast(php_stream *stream, int castas, void **ret) in php_stream_temp_cast() argument
456 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_cast()
497 php_stream_encloses(stream, ts->innerstream); in php_stream_temp_cast()
504 static int php_stream_temp_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ in php_stream_temp_stat() argument
506 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_stat()
515 static int php_stream_temp_set_option(php_stream *stream, int option, int value, void *ptrparam) /*… in php_stream_temp_set_option() argument
517 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_set_option()
550 php_stream *stream; in _php_stream_temp_create_ex() local
559 stream = php_stream_alloc_rel(&php_stream_temp_ops, self, 0, _php_stream_mode_to_str(mode)); in _php_stream_temp_create_ex()
560 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in _php_stream_temp_create_ex()
562 php_stream_encloses(stream, self->innerstream); in _php_stream_temp_create_ex()
564 return stream; in _php_stream_temp_create_ex()
578 php_stream *stream; in _php_stream_temp_open() local
582 if ((stream = php_stream_temp_create_rel(mode, max_memory_usage)) != NULL) { in _php_stream_temp_open()
585 php_stream_temp_write(stream, buf, length); in _php_stream_temp_open()
586 php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs); in _php_stream_temp_open()
588 ts = (php_stream_temp_data*)stream->abstract; in _php_stream_temp_open()
592 return stream; in _php_stream_temp_open()
610 php_stream *stream; in php_stream_url_wrap_rfc2397() local
720 if ((stream = php_stream_temp_create_rel(0, ~0u)) != NULL) { in php_stream_url_wrap_rfc2397()
722 php_stream_temp_write(stream, comma, ilen); in php_stream_url_wrap_rfc2397()
723 php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs); in php_stream_url_wrap_rfc2397()
726 if (vlen >= sizeof(stream->mode)) { in php_stream_url_wrap_rfc2397()
727 vlen = sizeof(stream->mode) - 1; in php_stream_url_wrap_rfc2397()
729 memcpy(stream->mode, mode, vlen); in php_stream_url_wrap_rfc2397()
730 stream->mode[vlen] = '\0'; in php_stream_url_wrap_rfc2397()
731 stream->ops = &php_stream_rfc2397_ops; in php_stream_url_wrap_rfc2397()
732 ts = (php_stream_temp_data*)stream->abstract; in php_stream_url_wrap_rfc2397()
743 return stream; in php_stream_url_wrap_rfc2397()