From 38d73aff677d73f62c89952f3137cfc21ffab1b8 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 7 Mar 1998 21:30:44 -0600 Subject: [PATCH] Imported from libpng-0.99n.tar --- libpng.3 | 2 +- png.h | 4 ++-- pngrutil.c | 2 +- pngtest.c | 20 ++++++++------------ pngwrite.c | 2 +- scripts/makefile.tc3 | 11 ++++------- scripts/makefile.wat | 2 +- 7 files changed, 18 insertions(+), 25 deletions(-) diff --git a/libpng.3 b/libpng.3 index b5269d72f..c22470012 100644 --- a/libpng.3 +++ b/libpng.3 @@ -2306,7 +2306,7 @@ the first widely used release: 0.97c 0.97 2.0.97 0.98 0.98 2.0.98 0.99 0.99 2.0.99 - 0.99a-g 0.99 2.0.99 + 0.99a-m 0.99 2.0.99 1.0 1.00 2.1.0 Henceforth the source version will match the shared-library minor diff --git a/png.h b/png.h index 13cb5a5b2..db2bac396 100644 --- a/png.h +++ b/png.h @@ -27,7 +27,7 @@ * 0.97c 0.97 2.0.97 * 0.98 0.98 2.0.98 * 0.99 0.99 2.0.99 - * 0.99a-i 0.99 2.0.99 + * 0.99a-m 0.99 2.0.99 * 1.00 1.00 2.1.0 * * Henceforth the source version will match the shared-library minor @@ -812,7 +812,7 @@ extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); #endif /* PNG_READ_PACK_SUPPORTED || PNG_WRITE_PACK_SUPPORTED */ -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPOR) +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); #endif /* PNG_READ_PACKSWAP_SUPPORTED || PNG_WRITE_PACKSWAP_SUPPOR */ diff --git a/pngrutil.c b/pngrutil.c index a21a03fd3..7bc0f18b6 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * libpng 0.99 + * libpng 1.00 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger diff --git a/pngtest.c b/pngtest.c index 8ca4012c1..e1a3ea077 100644 --- a/pngtest.c +++ b/pngtest.c @@ -79,8 +79,7 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) } -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) /* example of using user transform callback (we don't transform anything, but merely count the black pixels) */ @@ -166,7 +165,7 @@ count_black_pixels(png_structp png_ptr, png_row_infop row_info, png_bytep data) } } } -#endif /* PNG_READ|WRITE_USER_TRANSFORM_SUPPORTED */ +#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */ static int verbose = 0; static int wrote_question = 0; @@ -563,11 +562,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_set_read_status_fn(read_ptr, NULL); } -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - black_pixels=0; - png_set_write_user_transform_fn(write_ptr, count_black_pixels); -#endif +# if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + black_pixels=0; + png_set_write_user_transform_fn(write_ptr, count_black_pixels); +# endif png_debug(0, "Reading info struct\n"); png_read_info(read_ptr, read_info_ptr); @@ -949,8 +947,7 @@ main(int argc, char *argv[]) fprintf(STDERR, "Testing %s:",argv[i]); kerror = test_one_file(argv[i], outname); if (kerror == 0) -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) fprintf(STDERR, " PASS (%lu black pixels)\n",black_pixels); #else fprintf(STDERR, " PASS\n"); @@ -996,8 +993,7 @@ main(int argc, char *argv[]) if(kerror == 0) { if(verbose == 1 || i == 2) -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) fprintf(STDERR, " PASS (%lu black pixels)\n",black_pixels); #else fprintf(STDERR, " PASS\n"); diff --git a/pngwrite.c b/pngwrite.c index c8f7abdae..1a9232235 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -225,7 +225,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) png_charp png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) { - static const char short_months[12][4] = + static PNG_CONST char short_months[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/scripts/makefile.tc3 b/scripts/makefile.tc3 index 03da1849d..6f8f36667 100644 --- a/scripts/makefile.tc3 +++ b/scripts/makefile.tc3 @@ -14,15 +14,12 @@ O=.obj E=.exe # variables -OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) -pngwutil$(O) +OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O) -OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) -+pngerror$(O) -OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) -+pngwio$(O) +OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O) +OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) all: libpng.lib pngtest.exe @@ -82,4 +79,4 @@ libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) pngtest$(E): pngtest$(O) libpng.lib $(CC) $(LDFLAGS) pngtest.obj libpng.lib zlib.lib -# End of makefile for libpng \ No newline at end of file +# End of makefile for libpng diff --git a/scripts/makefile.wat b/scripts/makefile.wat index 9d41b2fe5..761aad5bf 100644 --- a/scripts/makefile.wat +++ b/scripts/makefile.wat @@ -9,7 +9,7 @@ # ------------- Watcom 10a+ ------------- MODEL=-mf -CFLAGS= $(MODEL) -fpi87 -fp5 -5r -oaeilmnrt -s -i=..\zlib +CFLAGS= $(MODEL) -fpi87 -fp5 -5r -oaeilmnrt -s -zp4 -i=..\zlib CC=wcc386 LD=wcl386 LIB=wlib -b -c