From 09e94a651dd8b9f205eeb626d59e3e468f2ceb7aee2a87299cc6869b2e8f1952 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sat, 2 Aug 2025 02:12:52 -0400 Subject: [PATCH] PNG code uses setjmp/longjmp. Leaving it alone for now. --- src/dpng.hh | 3 ++- src/gif.cc | 3 --- src/png.cc | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/dpng.hh b/src/dpng.hh index 0f35287..cd19f21 100644 --- a/src/dpng.hh +++ b/src/dpng.hh @@ -11,8 +11,9 @@ extern "C" { #include "image.hh" #include "cache.hh" +struct DilloPng; -void *a_Png_new(DilloImage *Image, DilloUrl *url, int version); +DilloPng *a_Png_new(DilloImage *Image, DilloUrl *url, int version); void a_Png_callback(int Op, CacheClient_t *Client); const char *a_Png_version(void); diff --git a/src/gif.cc b/src/gif.cc index bf9ab40..d691153 100644 --- a/src/gif.cc +++ b/src/gif.cc @@ -85,8 +85,6 @@ struct DilloGif { - ~DilloGif(); - DilloImage *Image; DilloUrl *url; int version; @@ -182,7 +180,6 @@ DilloGif *a_Gif_new(DilloImage *Image, DilloUrl *url, int version) /** * Free the gif-decoding data structure. */ -DilloGif::~DilloGif() {} /** * This function is a cache client, it receives data from the cache diff --git a/src/png.cc b/src/png.cc index d52cacb..3ef0948 100644 --- a/src/png.cc +++ b/src/png.cc @@ -62,7 +62,7 @@ static char *prog_state_name[] = * png_ptr and into_ptr so the FSM is very simple - much simpler than the * ones for XBM and PNM are. */ -typedef struct { +struct DilloPng { DilloImage *Image; /**< Image meta data */ DilloUrl *url; /**< Primary Key for the dicache */ int version; /**< Secondary Key for the dicache */ @@ -97,7 +97,7 @@ typedef struct { uchar_t *linebuf; /**< o/p raster data */ -} DilloPng; +}; #define DATASIZE (png->ipbufsize - png->ipbufstart) @@ -446,7 +446,7 @@ const char *a_Png_version(void) /** * Create the image state data that must be kept between calls */ -void *a_Png_new(DilloImage *Image, DilloUrl *url, int version) +DilloPng *a_Png_new(DilloImage *Image, DilloUrl *url, int version) { DilloPng *png = dNew0(DilloPng, 1); _MSG("a_Png_new: png=%p\n", png); @@ -470,7 +470,7 @@ void *a_Png_new(DilloImage *Image, DilloUrl *url, int version) #else /* ENABLE_PNG */ -void *a_Png_new() { return 0; } +DilloPng *a_Png_new() { return 0; } void a_Png_callback() { return; } const char *a_Png_version(void) { return 0; }