diff options
Diffstat (limited to 'quantum/painter/qp_stream.h')
-rw-r--r-- | quantum/painter/qp_stream.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/painter/qp_stream.h b/quantum/painter/qp_stream.h index 878b9bf530..c0e745adc1 100644 --- a/quantum/painter/qp_stream.h +++ b/quantum/painter/qp_stream.h @@ -41,6 +41,8 @@ typedef struct qp_stream_t qp_stream_t; uint32_t qp_stream_read_impl(void *output_buf, uint32_t member_size, uint32_t num_members, qp_stream_t *stream); uint32_t qp_stream_write_impl(const void *input_buf, uint32_t member_size, uint32_t num_members, qp_stream_t *stream); +#define qp_stream_close(stream_ptr) (((qp_stream_t *)(stream_ptr))->close((qp_stream_t *)(stream_ptr))) + #define STREAM_EOF ((int16_t)(-1)) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -52,6 +54,7 @@ struct qp_stream_t { int (*seek)(qp_stream_t *stream, int32_t offset, int origin); int32_t (*tell)(qp_stream_t *stream); bool (*is_eof)(qp_stream_t *stream); + void (*close)(qp_stream_t *stream); }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -77,6 +80,6 @@ typedef struct qp_file_stream_t { FILE * file; } qp_file_stream_t; -qp_file_stream_t qo_make_file_stream(FILE *f); +qp_file_stream_t qp_make_file_stream(FILE *f); #endif // QP_STREAM_HAS_FILE_IO |