diff -u old/libpng-1.0.2/png.c new/libpng-1.0.2/png.c --- old/libpng-1.0.2/png.c Sun Jun 14 21:43:31 1998 +++ new/libpng-1.0.2/png.c Sat Jun 27 13:44:05 1998 @@ -72,7 +72,7 @@ /* Mask to determine which pixels to overwrite while displaying */ int FARDATA png_pass_dsp_mask[] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; - +#ifndef DEAD /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another * stream we can set num_bytes = 8 so that libpng will not attempt to read @@ -87,7 +87,7 @@ png_ptr->sig_bytes = num_bytes < 0 ? 0 : num_bytes; } - +#endif /* DEAD */ /* Checks whether the supplied bytes match the PNG signature. We allow * checking less than the full 8-byte signature so that those apps that * already read the first few bytes of a file to determine the file type @@ -112,7 +112,7 @@ return ((int)(png_memcmp(&sig[start], &png_sig[start], num_to_check))); } - +#ifndef DEAD /* (Obsolete) function to check signature bytes. It does not allow one * to check a partial signature. This function will be removed in the * future - use png_sig_cmp(). @@ -149,7 +149,7 @@ { png_free((png_structp)png_ptr, (png_voidp)ptr); } - +#endif /* Reset the CRC variable to 32 bits of 1's. Care must be taken * in case CRC is > 32 bits to leave the top bits 0. */ diff -u old/libpng-1.0.2/png.h new/libpng-1.0.2/png.h --- old/libpng-1.0.2/png.h Sun Jun 14 21:43:31 1998 +++ new/libpng-1.0.2/png.h Sat Jun 27 13:44:05 1998 @@ -1199,9 +1199,14 @@ int check)); #endif /* USE_FAR_KEYWORD */ +#ifndef DEAD /* Fatal error in PNG image of libpng - can't continue */ extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, png_const_charp error)); +#else +extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, + png_const_charp error)) __attribute__ ((noreturn)); +#endif /* DEAD */ /* The same, but the chunk name is prepended to the error string. */ extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, @@ -2133,6 +2138,11 @@ #ifdef __cplusplus } #endif + +#ifdef DEAD +#define png_memset_check(a,b,c,d) png_memset(b,c,d) +#define png_memcpy_check(a,b,c,d) png_memcpy(b,c,d) +#endif /* DEAD */ /* do not put anything past this line */ #endif /* _PNG_H */ diff -u old/libpng-1.0.2/pngconf.h new/libpng-1.0.2/pngconf.h --- old/libpng-1.0.2/pngconf.h Sun Jun 14 21:43:31 1998 +++ new/libpng-1.0.2/pngconf.h Sat Aug 29 23:04:28 1998 @@ -54,6 +54,10 @@ * #define PNG_NO_STDIO */ +#ifdef DEAD +#define PNG_NO_STDIO +#endif /* DEAD */ + #ifndef PNG_NO_STDIO #include #endif @@ -111,9 +115,19 @@ #endif #endif /* __linux__ */ +#ifdef __regargs +#define setjmp __stdargs setjmp +#define longjmp __stdargs longjmp +#endif + /* include setjmp.h for error handling */ #include +#ifdef __regargs +#undef longjmp +#undef setjmp +#endif + #ifdef __linux__ #ifdef _PNG_SAVE_BSD_SOURCE #define _BSD_SOURCE @@ -234,6 +248,77 @@ */ /* Any transformations you will not be using can be undef'ed here */ + +#ifdef DEAD + +//#define PNG_NO_READ_EXPAND +//#define PNG_NO_READ_SHIFT +//#define PNG_NO_READ_PACK +#define PNG_NO_READ_BGR +#define PNG_NO_READ_SWAP +#define PNG_NO_READ_PACKSWAP +//#define PNG_NO_READ_INVERT +#define PNG_NO_READ_DITHER +//#define PNG_NO_READ_BACKGROUND +//#define PNG_NO_READ_16_TO_8 +#define PNG_NO_READ_FILLER +//#define PNG_NO_READ_GAMMA +#define PNG_NO_READ_GRAY_TO_RGB +#define PNG_NO_READ_SWAP_ALPHA +//#define PNG_NO_READ_INVERT_ALPHA +#define PNG_NO_READ_STRIP_ALPHA +#define PNG_NO_READ_USER_TRANSFORM +#define PNG_NO_PROGRESSIVE_READ +//#define PNG_NO_READ_COMPOSITED_NODIV + +//#define PNG_NO_WRITE_SHIFT +//#define PNG_NO_WRITE_PACK +#define PNG_NO_WRITE_BGR +#define PNG_NO_WRITE_SWAP +#define PNG_NO_WRITE_PACKSWAP +//#define PNG_NO_WRITE_INVERT +#define PNG_NO_WRITE_FILLER +#define PNG_NO_WRITE_SWAP_ALPHA +//#define PNG_NO_WRITE_INVERT_ALPHA +#define PNG_NO_WRITE_USER_TRANSFORM +#define PNG_NO_WRITE_WEIGHTED_FILTER +#define PNG_NO_WRITE_FLUSH + +//#define PNG_NO_READ_bKGD +//#define PNG_NO_READ_cHRM +//#define PNG_NO_READ_gAMA +#define PNG_NO_READ_hIST +//#define PNG_NO_READ_oFFs +//#define PNG_NO_READ_pCAL +//#define PNG_NO_READ_pHYs +#define PNG_NO_READ_sBIT +//#define PNG_NO_READ_sRGB +#define PNG_NO_READ_tEXt +#define PNG_NO_READ_tIME +//#define PNG_NO_READ_tRNS +#define PNG_NO_READ_zTXt +//#define PNG_NO_READ_OPT_PLTE + +//#define PNG_NO_WRITE_bKGD +//#define PNG_NO_WRITE_cHRM +//#define PNG_NO_WRITE_gAMA +#define PNG_NO_WRITE_hIST +//#define PNG_NO_WRITE_oFFs +//#define PNG_NO_WRITE_pCAL +//#define PNG_NO_WRITE_pHYs +#define PNG_NO_WRITE_sBIT +//#define PNG_NO_WRITE_sRGB +#define PNG_NO_WRITE_tEXt +#define PNG_NO_WRITE_tIME +//#define PNG_NO_WRITE_tRNS +#define PNG_NO_WRITE_zTXt + +#define PNG_NO_EASY_ACCESS +//#define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +//#define PNG_USER_MEM_SUPPORTED +#define PNG_READ_BIG_ENDIAN_SUPPORTED + +#endif /* DEAD */ /* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS diff -u old/libpng-1.0.2/pngread.c new/libpng-1.0.2/pngread.c --- old/libpng-1.0.2/pngread.c Sun Jun 14 21:43:31 1998 +++ new/libpng-1.0.2/pngread.c Sat Jun 27 13:44:05 1998 @@ -103,7 +103,7 @@ return (png_ptr); } - +#ifndef DEAD /* Initialize PNG structure for reading, and allocate any memory needed. This interface is deprecated in favour of the png_create_read_struct(), and it will eventually disappear. */ @@ -144,7 +144,7 @@ png_set_read_fn(png_ptr, NULL, NULL); } - +#endif /* DEAD */ /* Read the information before the actual image data. This has been * changed in v0.90 to allow reading a file that already has the magic * bytes read from the stream. You can tell libpng how many bytes have @@ -508,7 +508,7 @@ if (png_ptr->read_row_fn != NULL) (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); } - +#ifndef DEAD /* Read one or more rows of image data. If the image is interlaced, * and png_set_interlace_handling() has been called, the rows need to * contain the contents of the rows from the previous pass. If the @@ -605,7 +605,7 @@ } } } - +#endif /* DEAD */ /* Read the end of the PNG file. Will not read past the end of the * file, will verify the end is accurate, and will read any comments * or time information at the end of the file, if info is not NULL. diff -u old/libpng-1.0.2/pngrtran.c new/libpng-1.0.2/pngrtran.c --- old/libpng-1.0.2/pngrtran.c Sun Jun 14 21:43:31 1998 +++ new/libpng-1.0.2/pngrtran.c Wed Jul 1 22:17:01 1998 @@ -15,7 +15,7 @@ #define PNG_INTERNAL #include "png.h" - +#ifndef DEAD /* Set the action on getting a CRC error for an ancillary or critical chunk. */ void png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) @@ -68,7 +68,7 @@ break; } } - +#endif /* DEAD */ #if defined(PNG_READ_BACKGROUND_SUPPORTED) /* handle alpha and tRNS via a background color */ void