diff --git a/libretro-common/formats/png/rpng_decode.c b/libretro-common/formats/png/rpng_decode.c index e4c7f217b6..95657465c6 100644 --- a/libretro-common/formats/png/rpng_decode.c +++ b/libretro-common/formats/png/rpng_decode.c @@ -571,8 +571,7 @@ static int png_reverse_filter_adam7(uint32_t **data_, return ret; } -int png_reverse_filter_iterate(struct rpng_t *rpng, - uint32_t **data) +int png_reverse_filter_iterate(rpng_t *rpng, uint32_t **data) { if (!rpng) return false; @@ -583,7 +582,7 @@ int png_reverse_filter_iterate(struct rpng_t *rpng, return png_reverse_filter_regular_iterate(data, &rpng->ihdr, &rpng->process); } -int rpng_load_image_argb_process_inflate_init(struct rpng_t *rpng, +int rpng_load_image_argb_process_inflate_init(rpng_t *rpng, uint32_t **data, unsigned *width, unsigned *height) { int zstatus; @@ -669,7 +668,7 @@ bool png_realloc_idat(const struct png_chunk *chunk, struct idat_buffer *buf) return true; } -bool rpng_load_image_argb_process_init(struct rpng_t *rpng, +bool rpng_load_image_argb_process_init(rpng_t *rpng, uint32_t **data, unsigned *width, unsigned *height) { rpng->process.inflate_buf_size = 0; diff --git a/libretro-common/formats/png/rpng_decode.h b/libretro-common/formats/png/rpng_decode.h index 1de1ed5574..94c47a45f2 100644 --- a/libretro-common/formats/png/rpng_decode.h +++ b/libretro-common/formats/png/rpng_decode.h @@ -40,10 +40,9 @@ bool png_read_plte(uint8_t *buf, bool png_realloc_idat(const struct png_chunk *chunk, struct idat_buffer *buf); -int png_reverse_filter_iterate(struct rpng_t *rpng, - uint32_t **data); +int png_reverse_filter_iterate(rpng_t *rpng, uint32_t **data); -bool rpng_load_image_argb_process_init(struct rpng_t *rpng, +bool rpng_load_image_argb_process_init(rpng_t *rpng, uint32_t **data, unsigned *width, unsigned *height); #endif diff --git a/libretro-common/formats/png/rpng_fbio.c b/libretro-common/formats/png/rpng_fbio.c index 2a2673e2d4..bf8647e425 100644 --- a/libretro-common/formats/png/rpng_fbio.c +++ b/libretro-common/formats/png/rpng_fbio.c @@ -97,7 +97,7 @@ static bool png_parse_ihdr_fio(FILE **fd, return true; } -bool rpng_load_image_argb_iterate(FILE **fd, struct rpng_t *rpng) +bool rpng_load_image_argb_iterate(FILE **fd, rpng_t *rpng) { struct png_chunk chunk = {0}; FILE *file = *fd; @@ -200,7 +200,7 @@ bool rpng_load_image_argb(const char *path, uint32_t **data, long pos, file_len; FILE *file; char header[8] = {0}; - struct rpng_t rpng = {{0}}; + rpng_t rpng = {{0}}; bool ret = true; int retval = 0; diff --git a/libretro-common/formats/png/rpng_internal.h b/libretro-common/formats/png/rpng_internal.h index a1ebcbccde..fbf64eea07 100644 --- a/libretro-common/formats/png/rpng_internal.h +++ b/libretro-common/formats/png/rpng_internal.h @@ -132,7 +132,7 @@ struct rpng_process_t zlib_file_handle_t handle; }; -struct rpng_t +struct rpng { struct rpng_process_t process; bool has_ihdr; @@ -165,7 +165,7 @@ static INLINE uint32_t dword_be(const uint8_t *buf) return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3] << 0); } -int rpng_load_image_argb_process_inflate_init(struct rpng_t *rpng, +int rpng_load_image_argb_process_inflate_init(rpng_t *rpng, uint32_t **data, unsigned *width, unsigned *height); #endif diff --git a/libretro-common/formats/png/rpng_nbio.c b/libretro-common/formats/png/rpng_nbio.c index b73da2d8ab..e70f4cdf03 100644 --- a/libretro-common/formats/png/rpng_nbio.c +++ b/libretro-common/formats/png/rpng_nbio.c @@ -66,7 +66,7 @@ static bool png_parse_ihdr(uint8_t *buf, return true; } -bool rpng_nbio_load_image_argb_iterate(struct rpng_t *rpng) +bool rpng_nbio_load_image_argb_iterate(rpng_t *rpng) { unsigned i; unsigned ret; @@ -165,7 +165,7 @@ error: return false; } -int rpng_nbio_load_image_argb_process(struct rpng_t *rpng, +int rpng_nbio_load_image_argb_process(rpng_t *rpng, uint32_t **data, unsigned *width, unsigned *height) { if (!rpng->process.initialized) @@ -188,7 +188,7 @@ int rpng_nbio_load_image_argb_process(struct rpng_t *rpng, return png_reverse_filter_iterate(rpng, data); } -void rpng_nbio_load_image_free(struct rpng_t *rpng) +void rpng_nbio_load_image_free(rpng_t *rpng) { if (!rpng) return; @@ -206,7 +206,7 @@ void rpng_nbio_load_image_free(struct rpng_t *rpng) free(rpng); } -bool rpng_nbio_load_image_argb_start(struct rpng_t *rpng) +bool rpng_nbio_load_image_argb_start(rpng_t *rpng) { unsigned i; char header[8] = {0}; @@ -225,7 +225,7 @@ bool rpng_nbio_load_image_argb_start(struct rpng_t *rpng) return true; } -bool rpng_is_valid(struct rpng_t *rpng) +bool rpng_is_valid(rpng_t *rpng) { if (!rpng) return false; @@ -239,7 +239,7 @@ bool rpng_is_valid(struct rpng_t *rpng) return false; } -bool rpng_set_buf_ptr(struct rpng_t *rpng, uint8_t *data) +bool rpng_set_buf_ptr(rpng_t *rpng, uint8_t *data) { if (!rpng) return false; @@ -249,9 +249,9 @@ bool rpng_set_buf_ptr(struct rpng_t *rpng, uint8_t *data) return true; } -struct rpng_t *rpng_alloc(void) +rpng_t *rpng_alloc(void) { - struct rpng_t *rpng = (struct rpng_t*)calloc(1, sizeof(struct rpng_t)); + rpng_t *rpng = (rpng_t*)calloc(1, sizeof(rpng_t)); if (!rpng) return NULL; return rpng; diff --git a/libretro-common/formats/png/rpng_test.c b/libretro-common/formats/png/rpng_test.c index 5c9a3a0221..ae8b8aa64a 100644 --- a/libretro-common/formats/png/rpng_test.c +++ b/libretro-common/formats/png/rpng_test.c @@ -44,7 +44,7 @@ static bool rpng_nbio_load_image_argb(const char *path, uint32_t **data, int retval; size_t file_len; bool ret = true; - struct rpng_t *rpng = NULL; + rpng_t *rpng = NULL; void *ptr = NULL; struct nbio_t* handle = (void*)nbio_open(path, NBIO_READ); diff --git a/libretro-common/include/formats/rpng.h b/libretro-common/include/formats/rpng.h index 9d8118867c..b61315bed3 100644 --- a/libretro-common/include/formats/rpng.h +++ b/libretro-common/include/formats/rpng.h @@ -33,27 +33,27 @@ extern "C" { #endif -struct rpng_t; +typedef struct rpng rpng_t; bool rpng_load_image_argb(const char *path, uint32_t **data, unsigned *width, unsigned *height); -struct rpng_t *rpng_nbio_load_image_argb_init(const char *path); +rpng_t *rpng_nbio_load_image_argb_init(const char *path); -bool rpng_is_valid(struct rpng_t *rpng); +bool rpng_is_valid(rpng_t *rpng); -bool rpng_set_buf_ptr(struct rpng_t *rpng, uint8_t *data); +bool rpng_set_buf_ptr(rpng_t *rpng, uint8_t *data); -struct rpng_t *rpng_alloc(void); +rpng_t *rpng_alloc(void); -void rpng_nbio_load_image_free(struct rpng_t *rpng); +void rpng_nbio_load_image_free(rpng_t *rpng); -bool rpng_nbio_load_image_argb_iterate(struct rpng_t *rpng); +bool rpng_nbio_load_image_argb_iterate(rpng_t *rpng); -int rpng_nbio_load_image_argb_process(struct rpng_t *rpng, +int rpng_nbio_load_image_argb_process(rpng_t *rpng, uint32_t **data, unsigned *width, unsigned *height); -bool rpng_nbio_load_image_argb_start(struct rpng_t *rpng); +bool rpng_nbio_load_image_argb_start(rpng_t *rpng); #ifdef HAVE_ZLIB_DEFLATE bool rpng_save_image_argb(const char *path, const uint32_t *data, diff --git a/tasks/task_file_transfer.c b/tasks/task_file_transfer.c index 8b2930075b..bbc023d093 100644 --- a/tasks/task_file_transfer.c +++ b/tasks/task_file_transfer.c @@ -56,7 +56,7 @@ typedef struct nbio_image_handle bool is_finished; transfer_cb_t cb; #ifdef HAVE_RPNG - struct rpng_t *handle; + rpng_t *handle; #endif unsigned processing_pos_increment; unsigned pos_increment;