From 6f9fa656730b61384908e8ddbd11825eae3a92b9 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 18 Jul 2019 19:45:29 -0400 Subject: Don't use libpng's pointer typedefs Pointers should be as obvious as possible. --- (limited to 'src') diff --git a/src/font.c b/src/font.c index d333189..4db93ab 100644 --- a/src/font.c +++ b/src/font.c @@ -116,7 +116,7 @@ font_get_height(const struct font *font) void font_render(const struct font *font, png_const_colorp fg, png_const_colorp bg, - unsigned char ch, png_bytepp rows, int row, int col) + unsigned char ch, png_byte **rows, int row, int col) { size_t y; size_t r; diff --git a/src/font.h b/src/font.h index 4cd7da1..5461459 100644 --- a/src/font.h +++ b/src/font.h @@ -45,6 +45,6 @@ font_get_height(const struct font *font) __attribute__((pure)); void font_render(const struct font *font, png_const_colorp fg, png_const_colorp bg, - unsigned char ch, png_bytepp rows, int row, int col); + unsigned char ch, png_byte **rows, int row, int col); #endif /* FONT_H_ */ diff --git a/src/image.c b/src/image.c index 626ffa7..a794d16 100644 --- a/src/image.c +++ b/src/image.c @@ -87,7 +87,7 @@ image_render(struct image *image, const struct text *text, { size_t width; size_t height; - png_bytepp rows; + png_byte **rows; size_t i; assert(image); diff --git a/src/text.c b/src/text.c index b288043..358aee7 100644 --- a/src/text.c +++ b/src/text.c @@ -150,7 +150,7 @@ text_set_height(struct text *text, size_t height) } void -text_render(const struct text *text, const struct font *font, png_bytepp rows) +text_render(const struct text *text, const struct font *font, png_byte **rows) { unsigned char *string_start; unsigned char *string; diff --git a/src/text.h b/src/text.h index a76e14e..900b7bd 100644 --- a/src/text.h +++ b/src/text.h @@ -46,7 +46,7 @@ size_t text_set_height(struct text *text, size_t height); void -text_render(const struct text *text, const struct font *font, png_bytepp rows); +text_render(const struct text *text, const struct font *font, png_byte **rows); struct text * text_destroy(struct text **text_p); -- cgit v0.9.1