Lines Matching refs:stream

147 static gdIOCtx *create_stream_context(php_stream *stream, int close_stream);
690 php_stream *stream; in PHP_FUNCTION() local
696 stream = php_stream_open_wrapper(ZSTR_VAL(file), "rb", IGNORE_PATH | REPORT_ERRORS, NULL); in PHP_FUNCTION()
697 if (stream == NULL) { in PHP_FUNCTION()
715 while (b < hdr_size && (n = php_stream_read(stream, (char*)&font[b], hdr_size - b)) > 0) { in PHP_FUNCTION()
721 if (php_stream_eof(stream)) { in PHP_FUNCTION()
726 php_stream_close(stream); in PHP_FUNCTION()
729 i = php_stream_tell(stream); in PHP_FUNCTION()
730 php_stream_seek(stream, 0, SEEK_END); in PHP_FUNCTION()
731 body_size_check = php_stream_tell(stream) - hdr_size; in PHP_FUNCTION()
732 php_stream_seek(stream, i, SEEK_SET); in PHP_FUNCTION()
737 php_stream_close(stream); in PHP_FUNCTION()
749 php_stream_close(stream); in PHP_FUNCTION()
758 php_stream_close(stream); in PHP_FUNCTION()
765 while (b < body_size && (n = php_stream_read(stream, &font->data[b], body_size - b)) > 0) { in PHP_FUNCTION()
772 if (php_stream_eof(stream)) { in PHP_FUNCTION()
777 php_stream_close(stream); in PHP_FUNCTION()
780 php_stream_close(stream); in PHP_FUNCTION()
1645 php_stream *stream; in _php_image_create_from() local
1673 stream = php_stream_open_wrapper(file, "rb", REPORT_ERRORS|IGNORE_PATH, NULL); in _php_image_create_from()
1674 if (stream == NULL) { in _php_image_create_from()
1679 if (php_stream_is(stream, PHP_STREAM_IS_STDIO)) { in _php_image_create_from()
1680 if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)&fp, REPORT_ERRORS)) { in _php_image_create_from()
1689 buff = php_stream_copy_to_mem(stream, PHP_STREAM_COPY_ALL, 0); in _php_image_create_from()
1715 else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO)) { in _php_image_create_from()
1717 …if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO | PHP_STREAM_CAST_TRY_HARD, (void **) &… in _php_image_create_from()
1750 php_stream_close(stream); in _php_image_create_from()
1757 php_stream_close(stream); in _php_image_create_from()
1978 php_stream *stream; in PHP_FUNCTION() local
1987 stream = php_stream_open_wrapper(file, "wb", REPORT_ERRORS|IGNORE_PATH, NULL); in PHP_FUNCTION()
1988 if (stream == NULL) { in PHP_FUNCTION()
1992 ctx = create_stream_context(stream, 1); in PHP_FUNCTION()
4145 php_stream * stream = (php_stream *)ctx->data; in _php_image_stream_putc() local
4146 php_stream_write(stream, &ch, 1); in _php_image_stream_putc()
4151 php_stream * stream = (php_stream *)ctx->data; in _php_image_stream_putbuf() local
4152 return php_stream_write(stream, (void *)buf, l); in _php_image_stream_putbuf()
4178 php_stream *stream; in create_stream_context_from_zval() local
4182 php_stream_from_zval_no_verify(stream, to_zval); in create_stream_context_from_zval()
4183 if (stream == NULL) { in create_stream_context_from_zval()
4193 stream = php_stream_open_wrapper(Z_STRVAL_P(to_zval), "wb", REPORT_ERRORS|IGNORE_PATH, NULL); in create_stream_context_from_zval()
4194 if (stream == NULL) { in create_stream_context_from_zval()
4202 return create_stream_context(stream, close_stream); in create_stream_context_from_zval()
4205 static gdIOCtx *create_stream_context(php_stream *stream, int close_stream) { in create_stream_context() argument
4215 ctx->data = (void *)stream; in create_stream_context()