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()
103 static int php_stream_memory_close(php_stream *stream, int close_handle) in php_stream_memory_close() argument
105 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_close()
118 static int php_stream_memory_flush(php_stream *stream) in php_stream_memory_flush() argument
127 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
129 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_seek()
142 stream->eof = 0; in php_stream_memory_seek()
153 stream->eof = 0; in php_stream_memory_seek()
165 stream->eof = 0; in php_stream_memory_seek()
180 stream->eof = 0; in php_stream_memory_seek()
191 static int php_stream_memory_cast(php_stream *stream, int castas, void **ret) in php_stream_memory_cast() argument
197 static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */ in php_stream_memory_stat() argument
200 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_stat()
229 static int php_stream_memory_set_option(php_stream *stream, int option, int value, void *ptrparam) … in php_stream_memory_set_option() argument
231 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in php_stream_memory_set_option()
301 php_stream *stream; in _php_stream_memory_create() local
310 stream = php_stream_alloc_rel(&php_stream_memory_ops, self, 0, _php_stream_mode_to_str(mode)); in _php_stream_memory_create()
311 stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; in _php_stream_memory_create()
312 return stream; in _php_stream_memory_create()
320 php_stream *stream; in _php_stream_memory_open() local
323 if ((stream = php_stream_memory_create_rel(mode)) != NULL) { in _php_stream_memory_open()
324 ms = (php_stream_memory_data*)stream->abstract; in _php_stream_memory_open()
333 php_stream_write(stream, buf, length); in _php_stream_memory_open()
337 return stream; in _php_stream_memory_open()
343 PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length STREAMS_DC) in _php_stream_memory_get_buffer() argument
345 php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; in _php_stream_memory_get_buffer()
369 static ssize_t php_stream_temp_write(php_stream *stream, const char *buf, size_t count) in php_stream_temp_write() argument
371 php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; in php_stream_temp_write()
391 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()