--- pngcheck-2.3.0.CHANGELOG 2007-07-07 23:23:54.000000000 -0700 +++ CHANGELOG 2010-05-04 09:02:29.000000000 -0700 @@ -218,3 +218,7 @@ * method; fixed non-verbose-mode IDAT/PLTE message * 20070707 GRR: released version 2.3.0 * ---------------------- + * 20070709 GRR: tweaked color definitions slightly to work better on terminals + * with white/light backgrounds + * 20070712 GRR: added Makefile.mingw32 + * 20100504 GRR: fixed DHDR (pre-MNG-1.0) bug identified by Winfried --- /dev/null 2016-01-07 23:56:34.494165774 -0800 +++ Makefile.mingw32 2007-07-12 19:10:26.000000000 -0700 @@ -0,0 +1,71 @@ +# Sample makefile for pngcheck using mingw32-gcc (native or cross) and make. +# Greg Roelofs +# Last modified: 12 July 2007 +# +# Invoke this makefile from a DOS-prompt window via: +# +# make -f Makefile.mingw32 +# +# This makefile assumes zlib has already been built or downloaded and is in +# a subdirectory at the same level as the current subdirectory (as indicated +# by the ZPATH macro below). Edit as appropriate. +# +# Note that the names of the dynamic and static zlib libraries used below may +# change in later releases of the library. This makefile builds statically +# linked executables, but that can be changed by uncommenting the appropriate +# ZLIB line. + + +# macros -------------------------------------------------------------------- + +#ZPATH = ../zlib +ZPATH = ../zlib-win32 +ZINC = -I$(ZPATH) +#ZLIB = $(ZPATH)/libzdll.a # link dynamically against DLL +ZLIB = $(ZPATH)/libz.a # link statically + +INCS = $(ZINC) +LIBS = $(ZLIB) + +#CC = gcc +CC = i386-mingw32msvc-gcc # e.g., Linux -> Win32 cross-compilation +LD = $(CC) +RM = rm -f +CFLAGS = -O -Wall $(INCS) $(MINGW_CCFLAGS) -DUSE_ZLIB +# [note that -Wall is a gcc-specific compilation flag ("most warnings on")] +LDFLAGS = $(MINGW_LDFLAGS) +O = .o +E = .exe + +PROG = pngcheck +PROG2 = pngsplit +PROG3 = png-fix-IDAT-windowsize + +EXES = $(PROG)$(E) $(PROG2)$(E) $(PROG3)$(E) + + +# implicit make rules ------------------------------------------------------- + +.c$(O): + $(CC) -c $(CFLAGS) $< + + +# dependencies -------------------------------------------------------------- + +all: $(EXES) + +$(PROG)$(E): $(PROG).c + $(CC) $(CFLAGS) -o $@ $(PROG).c $(LIBS) + +# both of these require zlib, too (for crc32() function) +$(PROG2)$(E): gpl/$(PROG2).c + $(CC) $(CFLAGS) -o $@ gpl/$(PROG2).c $(LIBS) + +$(PROG3)$(E): gpl/$(PROG3).c + $(CC) $(CFLAGS) -o $@ gpl/$(PROG3).c $(LIBS) + + +# maintenance --------------------------------------------------------------- + +clean: + $(RM) $(EXES) --- pngcheck-2.3.0.c 2007-07-07 23:23:31.000000000 -0700 +++ pngcheck-2.4.0-beta.c 2013-04-06 20:30:35.000000000 -0700 @@ -69,7 +69,7 @@ * - fix tEXt chunk: small buffers or lots of text => truncation * (see pngcheck-1.99.4-test.c.dif) * - fix iCCP, sPLT chunks: small buffers or large chunks => truncation? - * - update existing MNG support to version 1.0 (already done?) + * - update existing MNG support to version 1.0 (DHDR bug just fixed 2010!) * - add JNG restrictions to bKGD * - allow top-level ancillary PNGs in MNG (i.e., subsequent ones may be NULL) * * add MNG profile report based on actual chunks found @@ -212,19 +212,19 @@ /* GRR 20070704: borrowed from GRR from/mailx hack */ #define COLOR_NORMAL "\033[0m" -#define COLOR_RED_BOLD "\033[01;31m" +#define COLOR_RED_BOLD "\033[40;31;1m" #define COLOR_RED "\033[40;31m" -#define COLOR_GREEN_BOLD "\033[01;32m" +#define COLOR_GREEN_BOLD "\033[40;32;1m" #define COLOR_GREEN "\033[40;32m" -#define COLOR_YELLOW_BOLD "\033[01;33m" +#define COLOR_YELLOW_BOLD "\033[40;33;1m" #define COLOR_YELLOW "\033[40;33m" /* chunk names */ -#define COLOR_BLUE_BOLD "\033[01;34m" +#define COLOR_BLUE_BOLD "\033[40;34;1m" #define COLOR_BLUE "\033[40;34m" -#define COLOR_MAGENTA_BOLD "\033[01;35m" +#define COLOR_MAGENTA_BOLD "\033[40;35;1m" #define COLOR_MAGENTA "\033[40;35m" -#define COLOR_CYAN_BOLD "\033[01;36m" +#define COLOR_CYAN_BOLD "\033[40;36;1m" #define COLOR_CYAN "\033[40;36m" -#define COLOR_WHITE_BOLD "\033[01;37m" /* filenames, filter seps */ +#define COLOR_WHITE_BOLD "\033[40;37;1m" /* filenames, filter seps */ #define COLOR_WHITE "\033[40;37m" #define isASCIIalpha(x) (ascii_alpha_table[x] & 0x1) @@ -3261,7 +3373,7 @@ (dtype < sizeof(delta_type)/sizeof(char *))? delta_type[dtype] : inv); if (sz > 4) { - if (dtype == 5) { + if (dtype == 7) { printf("%s invalid %slength for delta type %d\n", verbose? ":":fname, verbose? "":"DHDR ", dtype); set_err(kMinorError); @@ -3269,7 +3381,7 @@ printf(" block width = %lu, block height = %lu\n", LG(buffer+4), LG(buffer+8)); if (sz > 12) { - if (dtype == 0 || dtype == 5) { + if (dtype == 0) { printf("%s invalid %slength for delta type %d\n", verbose? ":":fname, verbose? "":"DHDR ", dtype); set_err(kMinorError);