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()
78 static ssize_t php_stream_memory_read(php_stream *stream, char *buf, size_t count) in php_stream_memory_read() argument
80 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_read()
84 stream->eof = 1; in php_stream_memory_read()
102 static int php_stream_memory_close(php_stream *stream, int close_handle) in php_stream_memory_close() argument
104 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_close()
114 static int php_stream_memory_flush(php_stream *stream) in php_stream_memory_flush() argument
123 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
125 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_seek()
138 stream->eof = 0; in php_stream_memory_seek()
142 stream->eof = 0; in php_stream_memory_seek()
155 stream->eof = 0; in php_stream_memory_seek()
162 stream->eof = 0; in php_stream_memory_seek()
171 stream->eof = 0; in php_stream_memory_seek()
182 static int php_stream_memory_cast(php_stream *stream, int castas, void **ret) in php_stream_memory_cast() argument
188 static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ in php_stream_memory_stat() argument
191 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_stat()
220 static int php_stream_memory_set_option(php_stream *stream, int option, int value, void *ptrparam) … in php_stream_memory_set_option() argument
222 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_set_option()
293 php_stream *stream; in _php_stream_memory_create() local
300 stream = php_stream_alloc_rel(&php_stream_memory_ops, self, 0, _php_stream_mode_to_str(mode)); in _php_stream_memory_create()
301 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in _php_stream_memory_create()
302 return stream; in _php_stream_memory_create()
310 php_stream *stream; in _php_stream_memory_open() local
313 if ((stream = php_stream_memory_create_rel(mode)) != NULL) { in _php_stream_memory_open()
314 ms = (php_stream_memory_data*)stream->abstract; in _php_stream_memory_open()
317 return stream; in _php_stream_memory_open()
323 PHPAPI zend_string *_php_stream_memory_get_buffer(php_stream *stream STREAMS_DC) in _php_stream_memory_get_buffer()
325 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in _php_stream_memory_get_buffer()
345 static ssize_t php_stream_temp_write(php_stream *stream, const char *buf, size_t count) in php_stream_temp_write() argument
347 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_write()
366 php_stream_encloses(stream, ts->innerstream); in php_stream_temp_write()
376 static ssize_t php_stream_temp_read(php_stream *stream, char *buf, size_t count) in php_stream_temp_read() argument
378 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_read()
389 stream->eof = ts->innerstream->eof; in php_stream_temp_read()
397 static int php_stream_temp_close(php_stream *stream, int close_handle) in php_stream_temp_close() argument
399 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_close()
424 static int php_stream_temp_flush(php_stream *stream) in php_stream_temp_flush() argument
426 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_flush()
435 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
437 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_seek()
448 stream->eof = ts->innerstream->eof; in php_stream_temp_seek()
455 static int php_stream_temp_cast(php_stream *stream, int castas, void **ret) in php_stream_temp_cast() argument
457 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_cast()
498 php_stream_encloses(stream, ts->innerstream); in php_stream_temp_cast()
505 static int php_stream_temp_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ in php_stream_temp_stat() argument
507 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_stat()
516 static int php_stream_temp_set_option(php_stream *stream, int option, int value, void *ptrparam) /*… in php_stream_temp_set_option() argument
518 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_set_option()
551 php_stream *stream; in _php_stream_temp_create_ex() local
560 stream = php_stream_alloc_rel(&php_stream_temp_ops, self, 0, _php_stream_mode_to_str(mode)); in _php_stream_temp_create_ex()
561 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in _php_stream_temp_create_ex()
563 php_stream_encloses(stream, self->innerstream); in _php_stream_temp_create_ex()
565 return stream; in _php_stream_temp_create_ex()
579 php_stream *stream; in _php_stream_temp_open() local
583 if ((stream = php_stream_temp_create_rel(mode, max_memory_usage)) != NULL) { in _php_stream_temp_open()
586 php_stream_temp_write(stream, buf, length); in _php_stream_temp_open()
587 php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs); in _php_stream_temp_open()
589 ts = (php_stream_temp_data*)stream->abstract; in _php_stream_temp_open()
593 return stream; in _php_stream_temp_open()
611 php_stream *stream; in php_stream_url_wrap_rfc2397() local
723 if ((stream = php_stream_temp_create_rel(0, ~0u)) != NULL) { in php_stream_url_wrap_rfc2397()
725 php_stream_temp_write(stream, comma, ilen); in php_stream_url_wrap_rfc2397()
726 php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs); in php_stream_url_wrap_rfc2397()
729 if (vlen >= sizeof(stream->mode)) { in php_stream_url_wrap_rfc2397()
730 vlen = sizeof(stream->mode) - 1; in php_stream_url_wrap_rfc2397()
732 memcpy(stream->mode, mode, vlen); in php_stream_url_wrap_rfc2397()
733 stream->mode[vlen] = '\0'; in php_stream_url_wrap_rfc2397()
734 stream->ops = &php_stream_rfc2397_ops; in php_stream_url_wrap_rfc2397()
735 ts = (php_stream_temp_data*)stream->abstract; in php_stream_url_wrap_rfc2397()
746 return stream; in php_stream_url_wrap_rfc2397()