PNG code uses setjmp/longjmp. Leaving it alone for now.

This commit is contained in:
2025-08-02 02:12:52 -04:00
parent bd11b90200
commit 09e94a651d
3 changed files with 6 additions and 8 deletions

View File

@ -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);

View File

@ -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

View File

@ -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; }