Lines Matching refs:stream

47 static ssize_t php_stream_memory_write(php_stream *stream, const char *buf, size_t count)  in php_stream_memory_write()  argument
49 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_write()
80 static ssize_t php_stream_memory_read(php_stream *stream, char *buf, size_t count) in php_stream_memory_read() argument
82 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_read()
86 stream->eof = 1; in php_stream_memory_read()
105 static int php_stream_memory_close(php_stream *stream, int close_handle) in php_stream_memory_close() argument
107 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_close()
120 static int php_stream_memory_flush(php_stream *stream) in php_stream_memory_flush() argument
129 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
131 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_seek()
144 stream->eof = 0; in php_stream_memory_seek()
155 stream->eof = 0; in php_stream_memory_seek()
167 stream->eof = 0; in php_stream_memory_seek()
182 stream->eof = 0; in php_stream_memory_seek()
193 static int php_stream_memory_cast(php_stream *stream, int castas, void **ret) in php_stream_memory_cast() argument
199 static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ in php_stream_memory_stat() argument
202 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_stat()
231 static int php_stream_memory_set_option(php_stream *stream, int option, int value, void *ptrparam) … in php_stream_memory_set_option() argument
233 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_set_option()
303 php_stream *stream; in _php_stream_memory_create() local
312 stream = php_stream_alloc_rel(&php_stream_memory_ops, self, 0, _php_stream_mode_to_str(mode)); in _php_stream_memory_create()
313 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in _php_stream_memory_create()
314 return stream; in _php_stream_memory_create()
322 php_stream *stream; in _php_stream_memory_open() local
325 if ((stream = php_stream_memory_create_rel(mode)) != NULL) { in _php_stream_memory_open()
326 ms = (php_stream_memory_data*)stream->abstract; in _php_stream_memory_open()
335 php_stream_write(stream, buf, length); in _php_stream_memory_open()
339 return stream; in _php_stream_memory_open()
345 PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length STREAMS_DC) in _php_stream_memory_get_buffer() argument
347 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in _php_stream_memory_get_buffer()
371 static ssize_t php_stream_temp_write(php_stream *stream, const char *buf, size_t count) in php_stream_temp_write() argument
373 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_write()
392 php_stream_encloses(stream, ts->innerstream); in php_stream_temp_write()
401 static ssize_t php_stream_temp_read(php_stream *stream, char *buf, size_t count) in php_stream_temp_read() argument
403 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_read()
414 stream->eof = ts->innerstream->eof; in php_stream_temp_read()
422 static int php_stream_temp_close(php_stream *stream, int close_handle) in php_stream_temp_close() argument
424 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_close()
449 static int php_stream_temp_flush(php_stream *stream) in php_stream_temp_flush() argument
451 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_flush()
460 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
462 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_seek()
473 stream->eof = ts->innerstream->eof; in php_stream_temp_seek()
480 static int php_stream_temp_cast(php_stream *stream, int castas, void **ret) in php_stream_temp_cast() argument
482 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_cast()
524 php_stream_encloses(stream, ts->innerstream); in php_stream_temp_cast()
531 static int php_stream_temp_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ in php_stream_temp_stat() argument
533 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_stat()
542 static int php_stream_temp_set_option(php_stream *stream, int option, int value, void *ptrparam) /*… in php_stream_temp_set_option() argument
544 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_set_option()
577 php_stream *stream; in _php_stream_temp_create_ex() local
586 stream = php_stream_alloc_rel(&php_stream_temp_ops, self, 0, _php_stream_mode_to_str(mode)); in _php_stream_temp_create_ex()
587 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in _php_stream_temp_create_ex()
589 php_stream_encloses(stream, self->innerstream); in _php_stream_temp_create_ex()
591 return stream; in _php_stream_temp_create_ex()
605 php_stream *stream; in _php_stream_temp_open() local
609 if ((stream = php_stream_temp_create_rel(mode, max_memory_usage)) != NULL) { in _php_stream_temp_open()
612 php_stream_temp_write(stream, buf, length); in _php_stream_temp_open()
613 php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs); in _php_stream_temp_open()
615 ts = (php_stream_temp_data*)stream->abstract; in _php_stream_temp_open()
619 return stream; in _php_stream_temp_open()
637 php_stream *stream; in php_stream_url_wrap_rfc2397() local
747 if ((stream = php_stream_temp_create_rel(0, ~0u)) != NULL) { in php_stream_url_wrap_rfc2397()
749 php_stream_temp_write(stream, comma, ilen); in php_stream_url_wrap_rfc2397()
750 php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs); in php_stream_url_wrap_rfc2397()
753 if (vlen >= sizeof(stream->mode)) { in php_stream_url_wrap_rfc2397()
754 vlen = sizeof(stream->mode) - 1; in php_stream_url_wrap_rfc2397()
756 memcpy(stream->mode, mode, vlen); in php_stream_url_wrap_rfc2397()
757 stream->mode[vlen] = '\0'; in php_stream_url_wrap_rfc2397()
758 stream->ops = &php_stream_rfc2397_ops; in php_stream_url_wrap_rfc2397()
759 ts = (php_stream_temp_data*)stream->abstract; in php_stream_url_wrap_rfc2397()
770 return stream; in php_stream_url_wrap_rfc2397()