[libpng10] Imported from libpng-1.0.13.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index c97e93f..81519c7 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,20 +1,49 @@
 
-Libpng 1.0.12beta1 - May 14, 2001
+Libpng 1.0.13 - April 15, 2002
 
 This is a public release of libpng, intended for use in production codes.
 
-Changes since the last public release (1.0.11):
+Changes since the last public release (1.2.1):
 
-  Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot)
-  Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h
-  Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings.
-  Bumped DLLNUM to 2.
-  Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
-  Eliminated the png_error about apps using png_read|write_init().  Instead,
-    libpng will reallocate the png_struct and info_struct if they are too small.
-    This achieves future binary compatibility for old applications written for
-    libpng-0.88 and earlier.
-  Modified png_create_struct so it passes user mem_ptr to user memory allocator.
+  Fixed a bug with reading the length of iCCP profiles (Larry Reeves).
+  Revised makefile.linux, makefile.gcmmx, and others to generate
+    libpng.a, libpngNN.so, libpng.so.NN, and libpngNN/png.h
+  Revised makefile.darwin to remove "-undefined suppress" option.
+  Added checks for gamma and chromaticity values over 21474.83, which exceed
+    the limit for PNG unsigned 32-bit integers when encoded.
+  Revised calls to png_create_read_struct() and png_create_write_struct()
+    for simpler debugging.
+  Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK)
+  Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths.
+  Check for invalid image dimensions in png_get_IHDR.
+  Added install-shared and install-static targets to all makefiles that make
+    shared libraries.
+  Always do gamma compensation when image is partially transparent.
+  Modified shared-library makefiles to install pkgconfig/libpngNN.pc.
+  Export (with PNGAPI) png_zalloc, png_zfree, and png_handle_as_unknown
+  Removed unused png_write_destroy_info prototype from png.h
+  Eliminated incorrect use of width_mmx from pnggccrd.c in pixel_bytes == 8 case
+  Stopped a double free of palette, hist, and trans when not using free_me.
+  Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64.
+  Compute background.gray and background_1.gray even when color_type is RGB
+    in case image gets reduced to gray later (Jason Summers).
+  Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library.
+  Added missing PNGAPI to several function definitions.
+  Check for invalid bit_depth or color_type in png_get_IHDR(), and
+    check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen).
+  Revised iTXt support to accept NULL for lang and lang_key.
+  Compute gamma for color components of background even when color_type is gray.
+  Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN
+  Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so
+  Prevent png_zalloc() from trying to memset memory that it failed to acquire.
+  Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate).
+  Ensure that the right function (user or default) is used to free the
+    png_struct after an error in png_create_read_struct_2().
+  Save the ebx register in pnggccrd.c (Sami Farin)
+  Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner).
+  Updated makefiles to put headers in include/libpng and remove old include/*.h.
+  Revised description of png_set_filter() in libpng.3/libpng.txt.
+  Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd
 
 Send comments/corrections/commendations to
 png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
diff --git a/CHANGES b/CHANGES
index e4b75f4..fc60d7e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,4 @@
+
 CHANGES - changes for libpng
 
 version 0.2
@@ -732,10 +733,11 @@
 version 1.0.7beta11 [May 7, 2000]
   Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes
     which are no longer used.
-  Eliminated the three new members of png_text when PNG_NO_iTXt_SUPPORTED
-    or PNG_LEGACY_SUPPORTED is defined.
-  Made PNG_NO_ITXT_SUPPORTED the default setting, to avoid memory overrun
-    when old applications fill the info_ptr->text structure directly.
+  Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is
+    defined or when neither PNG_READ_iTXt_SUPPORTED nor PNG_WRITE_iTXT_SUPPORTED
+    is defined.
+  Made PNG_NO_READ|WRITE_iTXt the default setting, to avoid memory
+    overrun when old applications fill the info_ptr->text structure directly.
   Added PNGAPI macro, and added it to the definitions of all exported functions.
   Relocated version macro definitions ahead of the includes of zlib.h and
     pngconf.h in png.h.
@@ -934,13 +936,138 @@
   Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot)
   Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h
   Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings.
-  Bumped DLLNUM to 2.
-  Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
   Eliminated the png_error about apps using png_read|write_init().  Instead,
     libpng will reallocate the png_struct and info_struct if they are too small.
-    This achieves future binary compatibility for old applications written for
+    This retains future binary compatibility for old applications written for
     libpng-0.88 and earlier.
+version 1.2.0beta1 [May 6, 2001]
+  Bumped DLLNUM to 2.
+  Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED
+    by default.
+  Added runtime selection of MMX features.
+  Added png_set_strip_error_numbers function and related macros.
+version 1.2.0beta2 [May 7, 2001]
+  Finished merging 1.2.0beta1 with version 1.0.11
+  Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
+version 1.2.0beta3 [May 17, 2001]
+  Enabled user memory function by default.
   Modified png_create_struct so it passes user mem_ptr to user memory allocator.
+  Increased png_mng_features flag from png_byte to png_uint_32.
+  Bumped shared-library (so-number) and dll-number to 3.
+version 1.2.0beta4 [June 23, 2001]
+  Check for missing profile length field in iCCP chunk and free chunk_data
+     in case of truncated iCCP chunk.
+  Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc
+  Bumped dll-number from 2 to 3 in makefile.cygwin
+  Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly
+     if user attempts to run it on an 8-bit display.
+  Updated contrib/gregbook
+  Use png_malloc instead of png_zalloc to allocate palette in pngset.c
+  Updated makefile.ibmc
+  Added some typecasts to eliminate gcc 3.0 warnings.  Changed prototypes
+     of png_write_oFFS width and height from png_uint_32 to png_int_32.
+  Updated example.c
+  Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
+version 1.2.0beta5 [August 8, 2001]
+  Revised contrib/gregbook
+  Revised makefile.gcmmx
+  Revised pnggccrd.c to conditionally compile some thread-unsafe code only
+     when PNG_THREAD_UNSAFE_OK is defined.
+  Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
+     value exceeding 2^bit_depth-1
+  Revised makefile.sgi and makefile.sggcc
+  Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
+  Removed restriction that do_invert_mono only operate on 1-bit opaque files
+version 1.2.0 [September 1, 2001]
+  Changed a png_warning() to png_debug() in pnggccrd.c
+  Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC().
+version 1.2.1beta1 [October 19, 2001]
+  Revised makefile.std in contrib/pngminus
+  Include background_1 in png_struct regardless of gamma support.
+  Revised makefile.netbsd and makefile.macosx, added makefile.darwin.
+  Revised example.c to provide more details about using row_callback().
+version 1.2.1beta2 [October 25, 2001]
+  Added type cast to each NULL appearing in a function call, except for
+    WINCE functions.
+  Added makefile.so9.
+version 1.2.1beta3 [October 27, 2001]
+  Removed type casts from all NULLs.
+  Simplified png_create_struct_2().
+version 1.2.1beta4 [November 7, 2001]
+  Revised png_create_info_struct() and png_creat_struct_2().
+  Added error message if png_write_info() was omitted.
+  Type cast NULLs appearing in function calls when _NO_PROTO or
+    PNG_TYPECAST_NULL is defined.
+version 1.2.1rc1 [November 24, 2001]
+  Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL
+    is defined.
+  Changed typecast of "size" argument to png_size_t in pngmem.c calls to
+    the user malloc_fn, to agree with the prototype in png.h
+  Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev)
+  Updated makefile.sgi to recognize LIBPATH and INCPATH.
+  Updated various makefiles so "make clean" does not remove previous major
+    version of the shared library.
+version 1.2.1rc2 [December 4, 2001]
+  Added a pop/push operation to pngvcrd.c, to preserve Eflag.
+  Always allocate 256-entry internal palette, hist, and trans arrays, to
+    avoid out-of-bounds memory reference caused by invalid PNG datastreams.
+  Added a check for prefix_length > data_length in iCCP chunk handler.
+version 1.2.1 [December 7, 2001]
+  None.
+version 1.2.2beta1 [February 22, 2002]
+  Fixed a bug with reading the length of iCCP profiles (Larry Reeves).
+  Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate
+    libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h
+  Revised makefile.darwin to remove "-undefined suppress" option.
+  Added checks for gamma and chromaticity values over 21474.83, which exceed
+    the limit for PNG unsigned 32-bit integers when encoded.
+  Revised calls to png_create_read_struct() and png_create_write_struct()
+    for simpler debugging.
+  Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK)
+version 1.2.2beta2 [February 23, 2002]
+  Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths.
+  Check for invalid image dimensions in png_get_IHDR.
+  Added missing "fi;" in the install target of the SGI makefiles.
+  Added install-static to all makefiles that make shared libraries.
+  Always do gamma compensation when image is partially transparent.
+version 1.2.2beta3 [March 7, 2002]
+  Compute background.gray and background_1.gray even when color_type is RGB
+    in case image gets reduced to gray later.
+  Modified shared-library makefiles to install pkgconfig/libpngNN.pc.
+  Export (with PNGAPI) png_zalloc, png_zfree, and png_handle_as_unknown
+  Removed unused png_write_destroy_info prototype from png.h
+  Eliminated incorrect use of width_mmx from pnggccrd.c in pixel_bytes == 8 case
+  Added install-shared target to all makefiles that make shared libraries.
+  Stopped a double free of palette, hist, and trans when not using free_me.
+  Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64.
+version 1.2.2beta4 [March 8, 2002]
+  Compute background.gray and background_1.gray even when color_type is RGB
+    in case image gets reduced to gray later (Jason Summers).
+  Relocated a misplaced /bin/rm in the "install-shared" makefile targets
+  Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library.
+version 1.2.2beta5 [March 26, 2002]
+  Added missing PNGAPI to several function definitions.
+  Check for invalid bit_depth or color_type in png_get_IHDR(), and
+    check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen).
+  Revised iTXt support to accept NULL for lang and lang_key.
+  Compute gamma for color components of background even when color_type is gray.
+  Changed "()" to "{}" in scripts/libpng.pc.in.
+  Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN
+  Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so
+version 1.2.2beta6 [March 31, 2002]
+version 1.0.13beta1 [March 31, 2002]
+  Prevent png_zalloc() from trying to memset memory that it failed to acquire.
+  Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate).
+  Ensure that the right function (user or default) is used to free the
+    png_struct after an error in png_create_read_struct_2().
+version 1.2.2rc1 [April 7, 2002]
+version 1.0.13rc1 [April 7, 2002]
+  Save the ebx register in pnggccrd.c (Sami Farin)
+  Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner).
+  Updated makefiles to put headers in include/libpng and remove old include/*.h.
+version 1.0.13 [April 15, 2002]
+  Revised description of png_set_filter() in libpng.3/libpng.txt.
+  Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd
 
 Send comments/corrections/commendations to
 png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
diff --git a/INSTALL b/INSTALL
index 58111cd..2070549 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 
-Installing libpng version 1.0.12beta1 - May 14, 2001
+Installing libpng version 1.0.13 - April 15, 2002
 
 Before installing libpng, you must first install zlib.  zlib
 can usually be found wherever you got libpng.  zlib can be
@@ -10,7 +10,7 @@
 version of zlib that's installed.
 
 You can rename the directories that you downloaded (they
-might be called "libpng-1.0.12beta1" or "lpng109" and "zlib-1.1.3"
+might be called "libpng-1.0.13" or "lpng109" and "zlib-1.1.3"
 or "zlib113") so that you have directories called "zlib" and "libpng".
 
 Your directory structure should look like this:
@@ -31,7 +31,8 @@
              beos
              borland
              msvc
-             wince
+             netware.txt
+             wince.txt
           scripts
              makefile.*
           pngtest.png
@@ -48,9 +49,12 @@
 endings) and zip (DOS style line endings) formats.
 
 If you are building libpng with MSVC, you can enter the libpng\msvc directory
-and follow the instructions in msvc\README.txt.  You can build libpng for
-WindowsCE by entering the libpng\wince directory and following the
-instructions in the README* files.
+and follow the instructions in msvc\README.txt.
+
+You can build libpng for WindowsCE by entering the downloading and installing
+the libpng\wince directory as instructed in the projects\wince.txt file, and
+then following the instructions in the README* files.  Similarly, you can
+build libpng for Netware as instructed in projects\netware.txt.
 
 Else enter the zlib directory and follow the instructions in zlib/README,
 then come back here and choose the appropriate makefile.sys in the scripts
@@ -60,8 +64,8 @@
 include
 
  makefile.std      =>  Generic UNIX makefile (cc, creates static libpng.a)
- makefile.linux    =>  Linux/ELF makefile (gcc, creates libpng.so.2.1.0.12beta1)
- makefile.gcmmx    =>  Linux/ELF makefile (gcc, creates libpng.so.2.1.0.12beta1,
+ makefile.linux    =>  Linux/ELF makefile (gcc, creates libpng10.so.0.1.0.13)
+ makefile.gcmmx    =>  Linux/ELF makefile (gcc, creates libpng10.so.0.1.0.13,
                        uses assembler code tuned for Intel MMX platform)
  makefile.gcc      =>  Generic makefile (gcc, creates static libpng.a)
  makefile.knr      =>  Archaic UNIX Makefile that converts files with
@@ -69,6 +73,7 @@
                        ftp://ftp.cs.wisc.edu/ghost)
  makefile.aix      =>  AIX makefile
  makefile.cygwin   =>  Cygwin/gcc makefile
+ makefile.darwin   =>  Darwin makefile
  makefile.dec      =>  DEC Alpha UNIX makefile
  makefile.hpgcc    =>  HPUX makefile using gcc
  makefile.hpux     =>  HPUX (10.20 and 11.00) makefile
@@ -77,10 +82,14 @@
  libpng.icc        =>  Project file for IBM VisualAge/C++ version 4.0 or later
  makefile.macosx   =>  MACOS X Makefile
  makefile.netbsd   =>  NetBSD/cc makefile, uses PNGGCCRD
+ makefile.openbsd  =>  OpenBSD makefile
  makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
- makefile.sggcc    =>  Silicon Graphics (gcc, creates libpng.so.2.1.0.12beta1)
+ makefile.sggcc    =>  Silicon Graphics (gcc, creates libpng10.so.0.1.0.13)
  makefile.sunos    =>  Sun makefile
- makefile.solaris  =>  Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.12beta1)
+ makefile.solaris  =>  Solaris 2.X makefile (gcc, creates libpng10.so.0.1.0.13)
+ makefile.so9      =>  Solaris 9 makefile (gcc, creates libpng10.so.0.1.0.13)
+ makefile.32sunu   =>  Sun Ultra 32-bit makefile
+ makefile.64sunu   =>  Sun Ultra 64-bit makefile
  makefile.sco      =>  For SCO OSr5  ELF and Unixware 7 with Native cc
  makefile.mips     =>  MIPS makefile
  makefile.acorn    =>  Acorn makefile
diff --git a/KNOWNBUG b/KNOWNBUG
index d596deb..40c98b6 100644
--- a/KNOWNBUG
+++ b/KNOWNBUG
@@ -1,7 +1,9 @@
 
-Known bugs in libpng-1.0.11
+Known bugs in libpng version 1.0.13
 
 1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
    reading interlaced PNG files, when assembler code is enabled.
 
-   STATUS: Under investigation.
+   STATUS: Under investigation.  The change to pnggccrd.c in libpng-1.2.1
+   fixed a problem under FreeBSD but not the problem with NetBSD.
+
diff --git a/LICENSE b/LICENSE
index e5e9b4a..9011bba 100644
--- a/LICENSE
+++ b/LICENSE
@@ -8,8 +8,8 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng versions 1.0.7, July 1, 2000, through 1.0.12beta1, May 14, 2001, are
-Copyright (c) 2000, 2001 Glenn Randers-Pehrson
+libpng versions 1.0.7, July 1, 2000, through 1.0.13, April 15, 2002, are
+Copyright (c) 2000-2002 Glenn Randers-Pehrson
 and are distributed according to the same disclaimer and license as libpng-1.0.6
 with the following individuals added to the list of Contributing Authors
 
@@ -73,11 +73,11 @@
 
 1. The origin of this source code must not be misrepresented.
 
-2. Altered versions must be plainly marked as such and
-   must not be misrepresented as being the original source.
+2. Altered versions must be plainly marked as such and must not
+   be misrepresented as being the original source.
 
-3. This Copyright notice may not be removed or altered from
-   any source or altered source distribution.
+3. This Copyright notice may not be removed or altered from any
+   source or altered source distribution.
 
 The Contributing Authors and Group 42, Inc. specifically permit, without
 fee, and encourage the use of this source code as a component to
@@ -99,4 +99,4 @@
 
 Glenn Randers-Pehrson
 randeg@alum.rpi.edu
-May 14, 2001
+April 15, 2002
diff --git a/README b/README
index 6c83f33..944c3f0 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng 1.0.12beta1 - May 14, 2001 (shared library 2.1)
+README for libpng 1.0.13 - April 15, 2002 (shared library 2.1)
 See the note about version numbers near the top of png.h
 
 See INSTALL for instructions on how to install libpng.
@@ -177,15 +177,19 @@
                             and zlib
        msvc             =>  Contains a Microsoft Visual C++ (MSVC) workspace
                             for building libpng and zlib
-       wince            =>  Contains a Microsoft Visual C++ (Windows CD Toolkit)
-                            workspace for building libpng and zlib on WindowsCE
+       netware.txt      =>  Contains instructions for downloading a set of
+                            project files for building libpng and zlib on
+                            Netware.
+       wince.txt        =>  Contains instructions for downloading a Microsoft
+                            Visual C++ (Windows CD Toolkit) workspace for
+                            building libpng and zlib on WindowsCE
       scripts       =>  Directory containing scripts for building libpng:
        descrip.mms      =>  VMS makefile for MMS or MMK
        makefile.std     =>  Generic UNIX makefile (cc, creates static libpng.a)
        makefile.linux   =>  Linux/ELF makefile
-                            (gcc, creates libpng.so.2.1.0.12beta1)
+                            (gcc, creates libpng10.so.0.1.0.13)
        makefile.gcmmx   =>  Linux/ELF makefile (gcc, creates
-                            libpng.so.2.1.0.12beta1, uses assembler code
+                            libpng10.so.0.1.0.13, uses assembler code
                             tuned for Intel MMX platform)
        makefile.gcc     =>  Generic makefile (gcc, creates static libpng.a)
        makefile.knr     =>  Archaic UNIX Makefile that converts files with
@@ -193,6 +197,7 @@
                             ftp://ftp.cs.wisc.edu/ghost)
        makefile.aix     =>  AIX makefile
        makefile.cygwin  =>  Cygwin/gcc makefile
+       makefile.darwin  =>  Darwin makefile
        makefile.dec     =>  DEC Alpha UNIX makefile
        makefile.hpgcc   =>  HPUX makefile using gcc
        makefile.hpux    =>  HPUX (10.20 and 11.00) makefile
@@ -201,11 +206,16 @@
        libpng.icc       =>  Project file, IBM VisualAge/C++ 4.0 or later
        makefile.macosx  =>  MACOS X Makefile
        makefile.netbsd  =>  NetBSD/cc makefile, uses PNGGCCRD
+       makefile.openbsd =>  OpenBSD makefile
        makefile.sgi     =>  Silicon Graphics IRIX (cc, creates static lib)
-       makefile.sggcc   =>  Silicon Graphics (gcc, creates libpng.so.2.1.0.12beta1)
+       makefile.sggcc   =>  Silicon Graphics (gcc, creates libpng10.so.0.1.0.13)
        makefile.sunos   =>  Sun makefile
        makefile.solaris =>  Solaris 2.X makefile
-                            (gcc, creates libpng.so.2.1.0.12beta1)
+                            (gcc, creates libpng10.so.0.1.0.13)
+       makefile.so9     =>  Solaris 9 makefile
+                            (gcc, creates libpng10.so.0.1.0.13)
+       makefile.32sunu  =>  Sun Ultra 32-bit makefile
+       makefile.64sunu  =>  Sun Ultra 64-bit makefile
        makefile.sco     =>  For SCO OSr5  ELF and Unixware 7 with Native cc
        makefile.mips    =>  MIPS makefile
        makefile.acorn   =>  Acorn makefile
diff --git a/Y2KINFO b/Y2KINFO
index 86b7213..67d4e7e 100644
--- a/Y2KINFO
+++ b/Y2KINFO
@@ -1,13 +1,13 @@
    Y2K compliance in libpng:
    =========================
 
-      May 14, 2001
+      April 15, 2002
 
       Since the PNG Development group is an ad-hoc body, we can't make
       an official declaration.
 
       This is your unofficial assurance that libpng from version 0.71 and
-      upward through 1.0.12beta1 are Y2K compliant.  It is my belief that earlier
+      upward through 1.0.13 are Y2K compliant.  It is my belief that earlier
       versions were also Y2K compliant.
 
       Libpng only has three year fields.  One is a 2-byte unsigned integer
diff --git a/configure b/configure
index 1d125c6..6fc27d0 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 echo "
-  There is no \"configure\" script for Libpng-1.0.12beta1.  Instead, please
+  There is no \"configure\" script for Libpng-1.0.13.  Instead, please
   copy the appropriate makefile for your system from the \"scripts\"
   directory.  Read the INSTALL file for more details.
 "
diff --git a/contrib/gregbook/LICENSE b/contrib/gregbook/LICENSE
index 5714772..175ebfd 100644
--- a/contrib/gregbook/LICENSE
+++ b/contrib/gregbook/LICENSE
@@ -1,6 +1,6 @@
   ---------------------------------------------------------------------------
 
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
+      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
 
       This software is provided "as is," without warranty of any kind,
       express or implied.  In no event shall the author or contributors
diff --git a/contrib/gregbook/Makefile.sgi b/contrib/gregbook/Makefile.sgi
index bba61fb..f824a96 100644
--- a/contrib/gregbook/Makefile.sgi
+++ b/contrib/gregbook/Makefile.sgi
@@ -1,6 +1,6 @@
 # Sample makefile for rpng-x / rpng2-x / wpng for SGI using cc and make.
 # Greg Roelofs
-# Last modified:  16 January 1000
+# Last modified:  7 March 2002
 #
 #	The programs built by this makefile are described in the book,
 #	"PNG:  The Definitive Guide," by Greg Roelofs (O'Reilly and
@@ -23,9 +23,9 @@
 
 # macros --------------------------------------------------------------------
 
-PNGINC = -I/usr/local/include
-PNGLIB = -L/usr/local/lib -lpng	# dynamically linked against libpng
-#PNGLIB = /usr/local/lib/libpng.a	# statically linked against libpng
+PNGINC = -I/usr/local/include/libpng10
+PNGLIB = -L/usr/local/lib -lpng10	  # dynamically linked against libpng
+#PNGLIB = /usr/local/lib/libpng10.a # statically linked against libpng
 # or:
 #PNGINC = -I../..
 #PNGLIB = -L../.. -lpng
diff --git a/contrib/gregbook/Makefile.unx b/contrib/gregbook/Makefile.unx
index 850ddce..89018ae 100644
--- a/contrib/gregbook/Makefile.unx
+++ b/contrib/gregbook/Makefile.unx
@@ -1,6 +1,6 @@
 # Sample makefile for rpng-x / rpng2-x / wpng using gcc and make.
 # Greg Roelofs
-# Last modified:  28 February 2000
+# Last modified:  7 March 2002
 #
 #	The programs built by this makefile are described in the book,
 #	"PNG:  The Definitive Guide," by Greg Roelofs (O'Reilly and
@@ -23,24 +23,24 @@
 
 # macros --------------------------------------------------------------------
 
-PNGINC = -I/usr/local/include
-#PNGLIB = -L/usr/local/lib -lpng	# dynamically linked against libpng
-PNGLIB = /usr/local/lib/libpng.a	# statically linked against libpng
+PNGINC = -I/usr/local/include/libpng10
+#PNGLIB = -L/usr/local/lib -lpng10 # dynamically linked against libpng
+PNGLIB = /usr/local/lib/libpng10.a # statically linked against libpng
 # or:
-#PNGINC = -I../..
-#PNGLIB = -L../.. -lpng
-#PNGLIB = ../../libpng.a
+#PNGINC = -I../libpng
+#PNGLIB = -L../libpng -lpng
+#PNGLIB = ../libpng/libpng.a
 
 ZINC = -I/usr/local/include
 #ZLIB = -L/usr/local/lib -lz		# dynamically linked against zlib
 ZLIB = /usr/local/lib/libz.a		# statically linked against zlib
 #ZINC = -I../zlib
 #ZLIB = -L../zlib -lz
-#ZLIB = ../../../zlib/libz.a
+#ZLIB = ../zlib/libz.a
 
-#XINC = -I/usr/include/X11		# old-style, stock X distributions
+#XINC = -I/usr/include			# old-style, stock X distributions
 #XLIB = -L/usr/lib/X11 -lX11
-#XINC = -I/usr/openwin/include    	# Sun workstations (OpenWindows)
+#XINC = -I/usr/openwin/include		# Sun workstations (OpenWindows)
 #XLIB = -L/usr/openwin/lib -lX11
 XINC = -I/usr/X11R6/include		# new X distributions (XFree86, etc.)
 XLIB = -L/usr/X11R6/lib -lX11
diff --git a/contrib/gregbook/Makefile.w32 b/contrib/gregbook/Makefile.w32
index 2a84022..62041cd 100644
--- a/contrib/gregbook/Makefile.w32
+++ b/contrib/gregbook/Makefile.w32
@@ -32,12 +32,12 @@
 
 # macros --------------------------------------------------------------------
 
-PNGPATH = ../..
+PNGPATH = ../libpng
 PNGINC = -I$(PNGPATH)
 #PNGLIB = $(PNGPATH)/pngdll.lib
 PNGLIB = $(PNGPATH)/libpng.lib
 
-ZPATH = ../../../zlib
+ZPATH = ../zlib
 ZINC = -I$(ZPATH)
 #ZLIB = $(ZPATH)/zlibdll.lib
 ZLIB = $(ZPATH)/zlibstat.lib
diff --git a/contrib/gregbook/README b/contrib/gregbook/README
index a8bbc28..c67045c 100644
--- a/contrib/gregbook/README
+++ b/contrib/gregbook/README
@@ -16,13 +16,12 @@
 The source code for all three demo programs currently compiles under
 Unix, OpenVMS, and 32-bit Windows.  (Special thanks to Martin Zinser,
 zinser@decus.de, for making the necessary changes for OpenVMS and for
-providing an appropriate build script.)  Build instructions can be
-found below.
+providing an appropriate build script.)  Build instructions can be found
+below.
 
 Files:
 
    README             this file
-   README.w32         additional Windows-specific information
    LICENSE            terms of distribution and reuse (BSD-like)
 
    Makefile.unx       Unix makefile
@@ -45,26 +44,27 @@
 
    toucan.png         transparent PNG for testing (by Stefan Schneider)
 
-Note that the programs are designed to be functional, but their primary
-purpose is to demonstrate how to use libpng to add PNG support to other
-programs.  As such, their user interfaces are crude and definitely not
-intended for everyday use.
+Note that, although the programs are designed to be functional, their
+primary purpose is to illustrate how to use libpng to add PNG support to
+other programs.  As such, their user interfaces are crude and definitely
+are not intended for everyday use.
 
-Please see http://www.cdrom.com/pub/png/pngbook.html for further infor-
+Please see http://www.libpng.org/pub/png/pngbook.html for further infor-
 mation and links to the latest version of the source code, and Chapters
 13-15 of the book for detailed discussion of the three programs.
 
 Greg Roelofs
-19 March 2000
+newt@pobox.com
+30 June 2001
 
 
 BUILD INSTRUCTIONS
 
- - Prerequisites:
+ - Prerequisites (in order of compilation):
 
-      - zlib		ftp://ftp.cdrom.com/pub/infozip/zlib/zlib.html
-      - libpng		http://www.cdrom.com/pub/png/pngcode.html
-      - pngbook		http://www.cdrom.com/pub/png/book/sources.html
+      - zlib		http://www.gzip.org/zlib/
+      - libpng		http://www.libpng.org/pub/png/libpng.html
+      - pngbook		http://www.libpng.org/pub/png/book/sources.html
 
      The pngbook demo programs are explicitly designed to demonstrate proper
      coding techniques for using the libpng reference library.  As a result,
@@ -128,11 +128,13 @@
 
      The result should be three executables:  rpng-win.exe, rpng2-win.exe,
      and wpng.exe.  Copy them somewhere in your PATH or run them from the
-     current folder.  Unlike the Unix versions, the two windowed programs
-     (rpng and rpng2) do not display a usage screen when invoked without
-     command-line arguments; see README.w32 for brief help or the book for
-     details.  Note that the programs use the Unix-style "-" character to
-     specify options, instead of the more common DOS/Windows "/" character.
+     current folder.  Like the Unix versions, the two windowed programs
+     (rpng and rpng2) now display a usage screen in a console window when
+     invoked without command-line arguments; this is new behavior as of
+     the June 2001 release.  Note that the programs use the Unix-style "-"
+     character to specify options, instead of the more common DOS/Windows
+     "/" character.  (For example:  "rpng2-win -bgpat 4 foo.png", not
+     "rpng2-win /bgpat 4 foo.png")
 
 
  - OpenVMS:
diff --git a/contrib/gregbook/README.w32 b/contrib/gregbook/README.w32
deleted file mode 100644
index 736c001..0000000
--- a/contrib/gregbook/README.w32
+++ /dev/null
@@ -1,53 +0,0 @@
-See the main README file for basic instructions on compiling and running
-the programs.  See http://www.cdrom.com/pub/png/pngbook.html for further
-information and links to the source code, and Chapters 13-15 of the book
-for detailed discussion of the three programs.
-
-Since the two viewers, rpng and rpng2, are both designed to write infor-
-mation to the console (i.e., a DOS-window command line) while displaying
-the image in a graphical window--and since I haven't yet figured out how
-to do that under Windows--here are the usage screens for the two programs:
-
-
-rpng-win 1.02 of 19 March 2000:  Simple PNG Viewer for Windows
-   Compiled with libpng 1.0.5; using libpng 1.0.5.
-   Compiled with zlib 1.1.3; using zlib 1.1.3.
-
-Usage:  rpng-win [-gamma exp] [-bgcolor bg] file.png
-    exp 	transfer-function exponent (``gamma'') of the display
-		  system in floating-point format (e.g., ``2.2''); equal
-		  to the product of the lookup-table exponent (varies)
-		  and the CRT exponent (usually 2.2); must be positive
-    bg  	desired background color in 7-character hex RGB format
-		  (e.g., ``#ff7f00'' for orange:  same as HTML colors);
-		  used with transparent images
-
-Press Q, Esc or mouse button 1 after image is displayed to quit.
-
-
-rpng2-win 1.04 of 19 March 2000:  Progressive PNG Viewer for Windows
-   Compiled with libpng 1.0.5; using libpng 1.0.5.
-   Compiled with zlib 1.1.3; using zlib 1.1.3.
-
-Usage:  rpng2-win [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing] file.png
-
-    exp 	transfer-function exponent (``gamma'') of the display
-		  system in floating-point format (e.g., ``2.2''); equal
-		  to the product of the lookup-table exponent (varies)
-		  and the CRT exponent (usually 2.2); must be positive
-    bg  	desired background color in 7-character hex RGB format
-		  (e.g., ``#ff7f00'' for orange:  same as HTML colors);
-		  used with transparent images; overrides -bgpat
-    pat 	desired background pattern number (1-16); used with
-		  transparent images; overrides -bgcolor
-    -timing	enables delay for every block read, to simulate modem
-		  download of image (~36 Kbps)
-
-Press Q, Esc or mouse button 1 after image is displayed to quit.
-
-
-The usage screen for the third (non-windowed) program, wpng, can be seen
-simply by invoking it without any parameters (``wpng'').
-
-Greg Roelofs
-19 March 2000
diff --git a/contrib/gregbook/makevms.com b/contrib/gregbook/makevms.com
index 373926b..bd37dc0 100644
--- a/contrib/gregbook/makevms.com
+++ b/contrib/gregbook/makevms.com
@@ -9,21 +9,22 @@
 $!
 $ zpath   = ""
 $ pngpath = ""
-$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]"
-$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]"
 $!
 $ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]"
 $ if f$search("[--]png.h").nes."" then pngpath = "[--]"
 $!
+$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]"
+$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]"
+$!
 $ if zpath .eqs. ""
 $ then
-$   write sys$output "Zlib include not found. Exiting..."
+$   write sys$output "zlib include not found. Exiting..."
 $   exit 2
 $ endif 
 $!
 $ if pngpath .eqs. ""
 $ then
-$   write sys$output "Libpng include not found. Exiting..."
+$   write sys$output "libpng include not found. Exiting..."
 $   exit 2
 $ endif 
 $!
diff --git a/contrib/gregbook/readpng.c b/contrib/gregbook/readpng.c
index dc948ee..b8e0904 100644
--- a/contrib/gregbook/readpng.c
+++ b/contrib/gregbook/readpng.c
@@ -239,7 +239,7 @@
         return NULL;
     }
 
-    Trace((stderr, "readpng_get_image:  rowbytes = %ld, height = %ld\n", rowbytes, height));
+    Trace((stderr, "readpng_get_image:  channels = %d, rowbytes = %ld, height = %ld\n", *pChannels, rowbytes, height));
 
 
     /* set the individual row_pointers to point at the correct offsets */
diff --git a/contrib/gregbook/readpng2.c b/contrib/gregbook/readpng2.c
index 498d967..87f1350 100644
--- a/contrib/gregbook/readpng2.c
+++ b/contrib/gregbook/readpng2.c
@@ -49,8 +49,77 @@
 
 void readpng2_version_info(void)
 {
-    fprintf(stderr, "   Compiled with libpng %s; using libpng %s.\n",
-      PNG_LIBPNG_VER_STRING, png_libpng_ver);
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
+    (defined(__i386__) || defined(_M_IX86)) && \
+    defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
+    /*
+     * WARNING:  This preprocessor approach means that the following code
+     *           cannot be used with a libpng DLL older than 1.2.0--the
+     *           compiled-in symbols for the new functions will not exist.
+     *           (Could use dlopen() and dlsym() on Unix and corresponding
+     *           calls for Windows, but not portable...)
+     */
+    {
+        int mmxsupport = png_mmx_support();
+        if (mmxsupport < 0)
+            fprintf(stderr, "   Compiled with libpng %s; using libpng %s "
+              "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver);
+        else {
+            int compilerID;
+            png_uint_32 mmx_mask = png_get_mmx_flagmask(
+              PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
+
+            fprintf(stderr, "   Compiled with libpng %s; using libpng %s "
+              "with MMX support\n   (%s version).", PNG_LIBPNG_VER_STRING,
+              png_libpng_ver, compilerID == 1? "MSVC++" :
+              (compilerID == 2? "GNU C" : "unknown"));
+            fprintf(stderr, "  Processor %s MMX instructions.\n",
+              mmxsupport? "supports" : "does not support");
+            if (mmxsupport > 0) {
+                int num_optims = 0;
+
+                fprintf(stderr,
+                  "      Potential MMX optimizations supported by libpng:\n");
+                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)
+                    ++num_optims;
+                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_UP)
+                    ++num_optims;
+                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)
+                    ++num_optims;
+                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)
+                    ++num_optims;
+                if (num_optims)
+                    fprintf(stderr,
+                      "         decoding %s row filters (reading)\n",
+                      (num_optims == 4)? "all non-trivial" : "some");
+                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) {
+                    fprintf(stderr, "         combining rows (reading)\n");
+                    ++num_optims;
+                }
+                if (mmx_mask & PNG_ASM_FLAG_MMX_READ_INTERLACE) {
+                    fprintf(stderr,
+                      "         expanding interlacing (reading)\n");
+                    ++num_optims;
+                }
+                mmx_mask &= ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
+                             | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
+                             | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
+                             | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
+                             | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
+                             | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
+                if (mmx_mask) {
+                    fprintf(stderr, "         other (unknown)\n");
+                    ++num_optims;
+                }
+                if (num_optims == 0)
+                    fprintf(stderr, "         (none)\n");
+            }
+        }
+    }
+#else
+    fprintf(stderr, "   Compiled with libpng %s; using libpng %s "
+      "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver);
+#endif
 
     fprintf(stderr, "   Compiled with zlib %s; using zlib %s.\n",
       ZLIB_VERSION, zlib_version);
@@ -111,6 +180,97 @@
     png_set_progressive_read_fn(png_ptr, mainprog_ptr,
       readpng2_info_callback, readpng2_row_callback, readpng2_end_callback);
 
+
+    /*
+     * may as well enable or disable MMX routines here, if supported;
+     *
+     * to enable all:  mask = png_get_mmx_flagmask (
+     *                   PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
+     *                 flags = png_get_asm_flags (png_ptr);
+     *                 flags |= mask;
+     *                 png_set_asm_flags (png_ptr, flags);
+     *
+     * to disable all:  mask = png_get_mmx_flagmask (
+     *                   PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
+     *                  flags = png_get_asm_flags (png_ptr);
+     *                  flags &= ~mask;
+     *                  png_set_asm_flags (png_ptr, flags);
+     */
+
+#if (defined(__i386__) || defined(_M_IX86)) && \
+    defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
+    /*
+     * WARNING:  This preprocessor approach means that the following code
+     *           cannot be used with a libpng DLL older than 1.2.0--the
+     *           compiled-in symbols for the new functions will not exist.
+     *           (Could use dlopen() and dlsym() on Unix and corresponding
+     *           calls for Windows, but not portable...)
+     */
+    {
+#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
+        png_uint_32 mmx_disable_mask = 0;
+        png_uint_32 asm_flags, mmx_mask;
+        int compilerID;
+
+        if (mainprog_ptr->nommxfilters)
+            mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
+                                | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
+                                | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
+                                | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
+        if (mainprog_ptr->nommxcombine)
+            mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_COMBINE_ROW;
+        if (mainprog_ptr->nommxinterlace)
+            mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_INTERLACE;
+        asm_flags = png_get_asm_flags(png_ptr);
+        png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
+
+
+        /* Now query libpng's asm settings, just for yuks.  Note that this
+         * differs from the querying of its *potential* MMX capabilities
+         * in readpng2_version_info(); this is true runtime verification. */
+
+        asm_flags = png_get_asm_flags(png_ptr);
+        mmx_mask = png_get_mmx_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE,
+          &compilerID);
+        if (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED)
+            fprintf(stderr,
+              "  MMX support (%s version) is compiled into libpng\n",
+              compilerID == 1? "MSVC++" :
+              (compilerID == 2? "GNU C" : "unknown"));
+        else
+            fprintf(stderr, "  MMX support is not compiled into libpng\n");
+        fprintf(stderr, "  MMX instructions are %ssupported by CPU\n",
+          (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)? "" : "not ");
+        fprintf(stderr, "  MMX read support for combining rows is %sabled\n",
+          (asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)? "en" : "dis");
+        fprintf(stderr,
+          "  MMX read support for expanding interlacing is %sabled\n",
+          (asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)? "en" : "dis");
+        fprintf(stderr, "  MMX read support for \"sub\" filter is %sabled\n",
+          (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "en" : "dis");
+        fprintf(stderr, "  MMX read support for \"up\" filter is %sabled\n",
+          (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "en" : "dis");
+        fprintf(stderr, "  MMX read support for \"avg\" filter is %sabled\n",
+          (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "en" : "dis");
+        fprintf(stderr, "  MMX read support for \"Paeth\" filter is %sabled\n",
+          (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "en" : "dis");
+        asm_flags &= (mmx_mask & ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
+                                  | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
+                                  | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
+                                  | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
+                                  | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
+                                  | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ));
+        if (asm_flags)
+            fprintf(stderr,
+              "  additional MMX support is also enabled (0x%02lx)\n",
+              asm_flags);
+#else  /* !PNG_ASSEMBLER_CODE_SUPPORTED */
+        fprintf(stderr, "  MMX querying is disabled in libpng.\n");
+#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
+    }
+#endif
+
+
     /* make sure we save our pointers for use in readpng2_decode_data() */
 
     mainprog_ptr->png_ptr = png_ptr;
diff --git a/contrib/gregbook/rpng-win.c b/contrib/gregbook/rpng-win.c
index 51e1974..b84a7fc 100644
--- a/contrib/gregbook/rpng-win.c
+++ b/contrib/gregbook/rpng-win.c
@@ -9,7 +9,6 @@
    with a little tweaking (or maybe not).
 
    to do:
-    - stdout/stderr don't work!  need message window (maybe scrollable?)
     - handle quoted command-line args (especially filenames with spaces)
     - have minimum window width:  oh well
     - use %.1023s to simplify truncation of title-bar string?
@@ -22,10 +21,11 @@
               match; switched to png_jmpbuf() macro
     - 1.02:  added extra set of parentheses to png_jmpbuf() macro; fixed
               command-line parsing bug
+    - 1.10:  enabled "message window"/console (thanks to David Geldreich)
 
   ---------------------------------------------------------------------------
 
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
+      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
 
       This software is provided "as is," without warranty of any kind,
       express or implied.  In no event shall the author or contributors
@@ -52,13 +52,14 @@
 
 #define PROGNAME  "rpng-win"
 #define LONGNAME  "Simple PNG Viewer for Windows"
-#define VERSION   "1.02 of 19 March 2000"
+#define VERSION   "1.20 of 28 May 2001"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
 #include <windows.h>
+#include <conio.h>      /* only for _getch() */
 
 /* #define DEBUG  :  this enables the Trace() macros */
 
@@ -128,7 +129,17 @@
     filename = (char *)NULL;
 
 
-    /* First set the default value for our display-system exponent, i.e.,
+    /* First reenable console output, which normally goes to the bit bucket
+     * for windowed apps.  Closing the console window will terminate the
+     * app.  Thanks to David.Geldreich@realviz.com for supplying the magical
+     * incantation. */
+
+    AllocConsole();
+    freopen("CONOUT$", "a", stderr);
+    freopen("CONOUT$", "a", stdout);
+
+
+    /* Next set the default value for our display-system exponent, i.e.,
      * the product of the CRT exponent and the exponent corresponding to
      * the frame-buffer's lookup table (LUT), if any.  This is not an
      * exhaustive list of LUT values (e.g., OpenStep has a lot of weird
@@ -272,20 +283,31 @@
     /* usage screen */
 
     if (error) {
-        fprintf(stderr, "\n%s %s:  %s\n", PROGNAME, VERSION, appname);
+        int ch;
+
+        fprintf(stderr, "\n%s %s:  %s\n\n", PROGNAME, VERSION, appname);
         readpng_version_info();
         fprintf(stderr, "\n"
-         "Usage:  %s [-gamma exp] [-bgcolor bg] file.png\n"
-         "    exp \ttransfer-function exponent (``gamma'') of the display\n"
-         "\t\t  system in floating-point format (e.g., ``%.1f''); equal\n"
-         "\t\t  to the product of the lookup-table exponent (varies)\n"
-         "\t\t  and the CRT exponent (usually 2.2); must be positive\n"
-         "    bg  \tdesired background color in 7-character hex RGB format\n"
-         "\t\t  (e.g., ``#ff7700'' for orange:  same as HTML colors);\n"
-         "\t\t  used with transparent images\n"
-         "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
-         "\n", PROGNAME, default_display_exponent);
+          "Usage:  %s [-gamma exp] [-bgcolor bg] file.png\n"
+          "    exp \ttransfer-function exponent (``gamma'') of the display\n"
+          "\t\t  system in floating-point format (e.g., ``%.1f''); equal\n"
+          "\t\t  to the product of the lookup-table exponent (varies)\n"
+          "\t\t  and the CRT exponent (usually 2.2); must be positive\n"
+          "    bg  \tdesired background color in 7-character hex RGB format\n"
+          "\t\t  (e.g., ``#ff7700'' for orange:  same as HTML colors);\n"
+          "\t\t  used with transparent images\n"
+          "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
+          "Press Q or Esc to quit this usage screen.\n"
+          "\n", PROGNAME, default_display_exponent);
+        do
+            ch = _getch();
+        while (ch != 'q' && ch != 'Q' && ch != 0x1B);
         exit(1);
+    } else {
+        fprintf(stderr, "\n%s %s:  %s\n", PROGNAME, VERSION, appname);
+        fprintf(stderr,
+          "\n   [console window:  closing this window will terminate %s]\n\n",
+          PROGNAME);
     }
 
 
diff --git a/contrib/gregbook/rpng-x.c b/contrib/gregbook/rpng-x.c
index aea975d..e787ef1 100644
--- a/contrib/gregbook/rpng-x.c
+++ b/contrib/gregbook/rpng-x.c
@@ -21,10 +21,12 @@
     - 1.10:  added support for non-default visuals; fixed X pixel-conversion
     - 1.11:  added extra set of parentheses to png_jmpbuf() macro; fixed
               command-line parsing bug
+    - 1.12:  fixed small X memory leak (thanks to Francois Petitjean)
+    - 1.13:  fixed XFreeGC() crash bug
 
   ---------------------------------------------------------------------------
 
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
+      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
 
       This software is provided "as is," without warranty of any kind,
       express or implied.  In no event shall the author or contributors
@@ -51,7 +53,7 @@
 
 #define PROGNAME  "rpng-x"
 #define LONGNAME  "Simple PNG Viewer for X"
-#define VERSION   "1.11 of 19 March 2000"
+#define VERSION   "1.13 of 16 August 2001"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -117,6 +119,7 @@
 static int have_nondefault_visual = FALSE;
 static int have_colormap = FALSE;
 static int have_window = FALSE;
+static int have_gc = FALSE;
 /*
 ulg numcolors=0, pixels[256];
 ush reds[256], greens[256], blues[256];
@@ -542,9 +545,20 @@
     XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0,
       size_hints, wm_hints, NULL);
 
+    /* various properties and hints no longer needed; free memory */
+    if (pWindowName)
+       XFree(pWindowName->value);
+    if (pIconName)
+       XFree(pIconName->value);
+    if (size_hints)
+        XFree(size_hints);
+    if (wm_hints)
+       XFree(wm_hints);
+
     XMapWindow(display, window);
 
     gc = XCreateGC(display, window, 0, &gcvalues);
+    have_gc = TRUE;
 
 /*---------------------------------------------------------------------------
     Fill window with the specified background color.
@@ -814,7 +828,8 @@
         ximage = NULL;
     }
 
-    XFreeGC(display, gc);
+    if (have_gc)
+        XFreeGC(display, gc);
 
     if (have_window)
         XDestroyWindow(display, window);
diff --git a/contrib/gregbook/rpng2-win.c b/contrib/gregbook/rpng2-win.c
index d6073ff..0c1a9d1 100644
--- a/contrib/gregbook/rpng2-win.c
+++ b/contrib/gregbook/rpng2-win.c
@@ -24,8 +24,9 @@
     - 1.03:  modified to allow abbreviated options
     - 1.04:  removed bogus extra argument from usage fprintf() [Glenn R-P?];
               fixed command-line parsing bug
-    - 1.10:  enabled "message window" (console), thanks to David Geldreich
+    - 1.10:  enabled "message window"/console (thanks to David Geldreich)
     - 1.20:  added runtime MMX-enabling/disabling and new -mmx* options
+    - 1.21:  made minor tweak to usage screen to fit within 25-line console
 
   ---------------------------------------------------------------------------
 
@@ -56,7 +57,7 @@
 
 #define PROGNAME  "rpng2-win"
 #define LONGNAME  "Progressive PNG Viewer for Windows"
-#define VERSION   "1.20 of 29 January 2001"
+#define VERSION   "1.21 of 29 June 2001"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -451,12 +452,13 @@
           "\t\t  combining rows, and expanding interlacing, respectively\n"
 #endif
           "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
-          "Press Q or Esc to quit this usage screen.\n"
-          "\n", PROGNAME,
+          "Press Q or Esc to quit this usage screen. ",
+          PROGNAME,
 #if (defined(__i386__) || defined(_M_IX86))
           strlen(PROGNAME), " ",
 #endif
           strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
+        fflush(stderr);
         do
             ch = _getch();
         while (ch != 'q' && ch != 'Q' && ch != 0x1B);
@@ -466,6 +468,7 @@
         fprintf(stderr,
           "\n   [console window:  closing this window will terminate %s]\n\n",
           PROGNAME);
+        fflush(stderr);
     }
 
 
diff --git a/contrib/gregbook/rpng2-x.c b/contrib/gregbook/rpng2-x.c
index 4f90ef0..1c61283 100644
--- a/contrib/gregbook/rpng2-x.c
+++ b/contrib/gregbook/rpng2-x.c
@@ -26,6 +26,8 @@
     - 1.11:  added -usleep option for demos; fixed command-line parsing bug
     - 1.12:  added -pause option for demos and testing
     - 1.20:  added runtime MMX-enabling/disabling and new -mmx* options
+    - 1.21:  fixed small X memory leak (thanks to Francois Petitjean)
+    - 1.22:  fixed XFreeGC() crash bug
 
   ---------------------------------------------------------------------------
 
@@ -56,7 +58,7 @@
 
 #define PROGNAME  "rpng2-x"
 #define LONGNAME  "Progressive PNG Viewer for X"
-#define VERSION   "1.20 of 29 January 2001"
+#define VERSION   "1.22 of 16 August 2001"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -227,6 +229,7 @@
 static int have_nondefault_visual = FALSE;
 static int have_colormap = FALSE;
 static int have_window = FALSE;
+static int have_gc = FALSE;
 
 
 
@@ -585,8 +588,15 @@
      * pattern */
 
     if (rpng2_x_create_window()) {
+
+        /* GRR TEMPORARY HACK:  this is fundamentally no different from cases
+         * above; libpng should longjmp() back to us when png_ptr goes away.
+         * If we/it segfault instead, seems like a libpng bug... */
+
+        /* we're here via libpng callback, so if window fails, clean and bail */
         readpng2_cleanup(&rpng2_info);
-        return;
+        rpng2_x_cleanup();
+        exit(2);
     }
 }
 
@@ -738,9 +748,20 @@
     XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0,
       size_hints, wm_hints, NULL);
 
+    /* various properties and hints no longer needed; free memory */
+    if (pWindowName)
+       XFree(pWindowName->value);
+    if (pIconName)
+       XFree(pIconName->value);
+    if (size_hints)
+        XFree(size_hints);
+    if (wm_hints)
+       XFree(wm_hints);
+
     XMapWindow(display, window);
 
     gc = XCreateGC(display, window, 0, &gcvalues);
+    have_gc = TRUE;
 
 /*---------------------------------------------------------------------------
     Allocate memory for the X- and display-specific version of the image.
@@ -1356,7 +1377,8 @@
         ximage = NULL;
     }
 
-    XFreeGC(display, gc);
+    if (have_gc)
+        XFreeGC(display, gc);
 
     if (have_window)
         XDestroyWindow(display, window);
diff --git a/contrib/gregbook/toucan.png b/contrib/gregbook/toucan.png
index 03960d4..26c932b 100644
--- a/contrib/gregbook/toucan.png
+++ b/contrib/gregbook/toucan.png
Binary files differ
diff --git a/contrib/msvctest/msvctest.dsp b/contrib/msvctest/msvctest.dsp
index ba39487..ea81cb0 100644
--- a/contrib/msvctest/msvctest.dsp
+++ b/contrib/msvctest/msvctest.dsp
@@ -54,7 +54,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng2.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng10.lib /nologo /subsystem:console /machine:I386
 # Begin Special Build Tool
 OutDir=.\dll
 SOURCE="$(InputPath)"
@@ -84,7 +84,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng2d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng10d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 # Begin Special Build Tool
 OutDir=.\dll_dbg
 SOURCE="$(InputPath)"
@@ -114,7 +114,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng2a.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng10a.lib /nologo /subsystem:console /machine:I386
 # Begin Special Build Tool
 OutDir=.\dll_asm
 SOURCE="$(InputPath)"
@@ -144,7 +144,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng2b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng10b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 # Begin Special Build Tool
 OutDir=.\dll_dbga
 SOURCE="$(InputPath)"
diff --git a/contrib/pngminus/makefile.std b/contrib/pngminus/makefile.std
index c98cd64..b33b022 100644
--- a/contrib/pngminus/makefile.std
+++ b/contrib/pngminus/makefile.std
@@ -1,26 +1,31 @@
 # Makefile for PngMinus (png2pnm and pnm2png)
 # Linux / Unix
 
-CC=cc -O
-LD=cc -O
-#CC=gcc -O
-#LD=gcc -O
-LB=ar
-RM=rm
-CP=cp
+#CC=cc
+CC=gcc
+LD=$(CC)
 
-PNGPATH = /usr/local
-PNGINC = $(PNGPATH)/include
-#PNGLIB = $(PNGPATH)/lib -lpng
-PNGLIB = $(PNGPATH)/lib/libpng.a
+RM=rm -f
 
-ZPATH = /usr/local
-ZINC = $(ZPATH)/include
-#ZLIB = $(ZPATH)/lib -lz
-ZLIB = $(ZPATH)/lib/libz.a
+#PNGPATH = /usr/local
+#PNGINC = -I$(PNGPATH)/include/libpng10
+#PNGLIB = -L$(PNGPATH)/lib -lpng10
+#PNGLIBS = $(PNGPATH)/lib/libpng10.a
+PNGINC = -I../..
+PNGLIB = -L../.. -lpng
+PNGLIBS = ../../libpng.a
 
-CCFLAGS=-I$(PNGINC) -I$(ZINC)
-LDFLAGS=-L$(PNGLIB) -L$(ZLIB)
+#ZPATH = /usr/local
+#ZINC = -I$(ZPATH)/include
+#ZLIB = -L$(ZPATH)/lib -lz
+#ZLIBS = $(ZPATH)/lib/libz.a
+ZINC = -I../../../zlib
+ZLIB = -L../../../zlib -lz
+ZLIBS = ../../../zlib/libz.a
+
+CFLAGS=-O3 $(PNGINC) $(ZINC)
+LDFLAGS=$(PNGLIB) $(ZLIB)
+LDFLAGSS=$(PNGLIBS) $(ZLIBS)
 C=.c
 O=.o
 L=.a
@@ -28,25 +33,33 @@
 
 # dependencies
 
-all: png2pnm$(E) pnm2png$(E)
+#all: png2pnm$(E) pnm2png$(E)
+all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E)
 
 png2pnm$(O): png2pnm$(C)
-	$(CC) -c $(CCFLAGS) png2pnm$(C)
+	$(CC) -c $(CFLAGS) png2pnm$(C)
 
 png2pnm$(E): png2pnm$(O)
-	$(LD) -o png2pnm$(E) png2pnm$(O) $(LDFLAGS) -lpng -lz -lm
+	$(LD) -o png2pnm$(E) png2pnm$(O) $(LDFLAGS) -lm
+
+png2pnm-static$(E): png2pnm$(O)
+	$(LD) -o png2pnm-static$(E) png2pnm$(O) $(LDFLAGSS) -lm
 
 pnm2png$(O): pnm2png$(C)
-	$(CC) -c $(CCFLAGS) pnm2png$(C)
+	$(CC) -c $(CFLAGS) pnm2png$(C)
 
 pnm2png$(E): pnm2png$(O)
-	$(LD) -o pnm2png$(E) pnm2png$(O) $(LDFLAGS) -lpng -lz -lm
+	$(LD) -o pnm2png$(E) pnm2png$(O) $(LDFLAGS) -lm
+
+pnm2png-static$(E): pnm2png$(O)
+	$(LD) -o pnm2png-static$(E) pnm2png$(O) $(LDFLAGSS) -lm
 
 clean:
 	$(RM) png2pnm$(O)
 	$(RM) pnm2png$(O)
 	$(RM) png2pnm$(E)
 	$(RM) pnm2png$(E)
+	$(RM) png2pnm-static$(E)
+	$(RM) pnm2png-static$(E)
 
 # End of makefile for png2pnm / pnm2png
-
diff --git a/contrib/pngminus/png2pnm.sh b/contrib/pngminus/png2pnm.sh
old mode 100755
new mode 100644
diff --git a/contrib/pngminus/pngminus.sh b/contrib/pngminus/pngminus.sh
old mode 100755
new mode 100644
diff --git a/contrib/pngminus/pnm2png.sh b/contrib/pngminus/pnm2png.sh
old mode 100755
new mode 100644
diff --git a/contrib/visupng/PngFile.c b/contrib/visupng/PngFile.c
index af8d81c..959afe9 100644
--- a/contrib/visupng/PngFile.c
+++ b/contrib/visupng/PngFile.c
@@ -370,14 +370,14 @@
         
         // clean up after the write, and free any memory allocated
         
-        png_destroy_write_struct(&png_ptr, &info_ptr);
+        png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
         
         // yepp, done
     }
 
     Catch (msg)
     {
-        png_destroy_write_struct(&png_ptr, &info_ptr);
+        png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
 
         if(ppbRowPointers)
             free (ppbRowPointers);
diff --git a/contrib/visupng/VisualPng.dsp b/contrib/visupng/VisualPng.dsp
index a88346f..24402ca 100644
--- a/contrib/visupng/VisualPng.dsp
+++ b/contrib/visupng/VisualPng.dsp
@@ -59,8 +59,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 libpng2.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
-# ADD LINK32 libpng2.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
+# ADD BASE LINK32 libpng10.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
+# ADD LINK32 libpng10.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
 # Begin Special Build Tool
 OutDir=.\dll
 SOURCE="$(InputPath)"
@@ -92,9 +92,9 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 libpng2.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
+# ADD BASE LINK32 libpng10.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
 # SUBTRACT BASE LINK32 /nodefaultlib
-# ADD LINK32 libpng2d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
+# ADD LINK32 libpng10d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
 # SUBTRACT LINK32 /nodefaultlib
 # Begin Special Build Tool
 OutDir=.\dll_dbg
@@ -128,7 +128,7 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 libpng2.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
+# ADD BASE LINK32 libpng10.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
 # ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\lib"
 # Begin Special Build Tool
 OutDir=.\lib
@@ -161,7 +161,7 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 libpng2d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
+# ADD BASE LINK32 libpng10d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
 # SUBTRACT BASE LINK32 /nodefaultlib
 # ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\lib_dbg"
 # SUBTRACT LINK32 /nodefaultlib
diff --git a/example.c b/example.c
index f0fe688..a72bedc 100644
--- a/example.c
+++ b/example.c
@@ -114,7 +114,7 @@
    if (info_ptr == NULL)
    {
       fclose(fp);
-      png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
+      png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
       return (ERROR);
    }
 
@@ -126,7 +126,7 @@
    if (setjmp(png_jmpbuf(png_ptr)))
    {
       /* Free all of the memory associated with the png_ptr and info_ptr */
-      png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+      png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
       fclose(fp);
       /* If we get here, we had a problem reading the file */
       return (ERROR);
@@ -157,7 +157,7 @@
     * adjustment), then you can read the entire image (including
     * pixels) into the info structure with this call:
     */
-   png_read_png(png_ptr, info_ptr, png_transforms, NULL);
+   png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
 #else
    /* OK, you're doing it the hard way, with the lower-level functions */
 
@@ -167,7 +167,7 @@
    png_read_info(png_ptr, info_ptr);
 
    png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
-       &interlace_type, NULL, NULL);
+       &interlace_type, int_p_NULL, int_p_NULL);
 
 /**** Set up the data transformations you want.  Note that these are all
  **** optional.  Only call them if you want/need them.  Many of the
@@ -194,17 +194,17 @@
 
    /* Expand paletted colors into true RGB triplets */
    if (color_type == PNG_COLOR_TYPE_PALETTE)
-      png_set_expand(png_ptr);
+      png_set_palette_rgb(png_ptr);
 
    /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-      png_set_expand(png_ptr);
+      png_set_gray_1_2_4_to_8(png_ptr);
 
    /* Expand paletted or RGB images with transparency to full alpha channels
     * so the data will be available as RGBA quartets.
     */
    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
-      png_set_expand(png_ptr);
+      png_set_tRNS_to_alpha(png_ptr);
 
    /* Set the background color to draw transparent and alpha images over.
     * It is possible to set the red, green, and blue components directly
@@ -277,7 +277,7 @@
          png_color std_color_cube[MAX_SCREEN_COLORS];
 
          png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
-            MAX_SCREEN_COLORS, NULL, 0);
+            MAX_SCREEN_COLORS, png_uint_16p_NULL, 0);
       }
       /* This reduces the image to the palette supplied in the file */
       else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette))
@@ -354,18 +354,18 @@
 #ifdef single /* Read the image a single row at a time */
       for (y = 0; y < height; y++)
       {
-         png_read_rows(png_ptr, &row_pointers[y], NULL, 1);
+         png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1);
       }
 
 #else no_single /* Read the image several rows at a time */
       for (y = 0; y < height; y += number_of_rows)
       {
 #ifdef sparkle /* Read the image using the "sparkle" effect. */
-         png_read_rows(png_ptr, &row_pointers[y], NULL, number_of_rows);
-
-         png_read_rows(png_ptr, NULL, row_pointers[y], number_of_rows);
+         png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL,
+            number_of_rows);
 #else no_sparkle /* Read the image using the "rectangle" effect */
-         png_read_rows(png_ptr, NULL, &row_pointers[y], number_of_rows);
+         png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y],
+            number_of_rows);
 #endif no_sparkle /* use only one of these two methods */
       }
 
@@ -382,7 +382,7 @@
    /* At this point you have read the entire image */
 
    /* clean up after the read, and free any memory allocated - REQUIRED */
-   png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+   png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
 
    /* close the file */
    fclose(fp);
@@ -415,13 +415,13 @@
 
    if (*info_ptr == NULL)
    {
-      png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL);
+      png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
       return (ERROR);
    }
 
    if (setjmp(png_jmpbuf((*png_ptr))))
    {
-      png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL);
+      png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
       return (ERROR);
    }
 
@@ -450,7 +450,7 @@
    if (setjmp(png_jmpbuf((*png_ptr))))
    {
       /* Free the png_ptr and info_ptr memory on error */
-      png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL);
+      png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
       return (ERROR);
    }
 
@@ -482,21 +482,47 @@
 row_callback(png_structp png_ptr, png_bytep new_row,
    png_uint_32 row_num, int pass)
 {
-/* this function is called for every row in the image.  If the
- * image is interlacing, and you turned on the interlace handler,
+/*
+ * This function is called for every row in the image.  If the
+ * image is interlaced, and you turned on the interlace handler,
  * this function will be called for every row in every pass.
- * Some of these rows will not be changed from the previous pass.
- * When the row is not changed, the new_row variable will be NULL.
+ *
+ * In this function you will receive a pointer to new row data from
+ * libpng called new_row that is to replace a corresponding row (of
+ * the same data format) in a buffer allocated by your application.
+ * 
+ * The new row data pointer new_row may be NULL, indicating there is
+ * no new data to be replaced (in cases of interlace loading).
+ * 
+ * If new_row is not NULL then you need to call
+ * png_progressive_combine_row() to replace the corresponding row as
+ * shown below:
+ */
+   /* Check if row_num is in bounds. */
+   if((row_num >= 0) && (row_num < height))
+   {
+     /* Get pointer to corresponding row in our
+      * PNG read buffer.
+      */
+     png_bytep old_row = ((png_bytep *)our_data)[row_num];
+
+     /* If both rows are allocated then copy the new row
+      * data to the corresponding row data.
+      */
+     if((old_row != NULL) && (new_row != NULL))
+     png_progressive_combine_row(png_ptr, old_row, new_row);
+   }
+/*
  * The rows and passes are called in order, so you don't really
  * need the row_num and pass, but I'm supplying them because it
  * may make your life easier.
  *
  * For the non-NULL rows of interlaced images, you must call
- * png_progressive_combine_row() passing in the row and the
- * old row.  You can call this function for NULL rows (it will
- * just return) and for non-interlaced images (it just does the
- * png_memcpy for you) if it will make the code easier.  Thus, you
- * can just do this for all cases:
+ * png_progressive_combine_row() passing in the new row and the
+ * old row, as demonstrated above.  You can call this function for
+ * NULL rows (it will just return) and for non-interlaced images
+ * (it just does the png_memcpy for you) if it will make the code
+ * easier.  Thus, you can just do this for all cases:
  */
 
    png_progressive_combine_row(png_ptr, old_row, new_row);
@@ -505,8 +531,8 @@
  * that the first pass (pass == 0 really) will completely cover
  * the old row, so the rows do not have to be initialized.  After
  * the first pass (and only for interlaced images), you will have
- * to pass the current row, and the function will combine the
- * old row and the new row.
+ * to pass the current row as new_row, and the function will combine
+ * the old row and the new row.
  */
 }
 
@@ -556,7 +582,7 @@
    if (info_ptr == NULL)
    {
       fclose(fp);
-      png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);
+      png_destroy_write_struct(&png_ptr,  png_infopp_NULL);
       return (ERROR);
    }
 
@@ -588,7 +614,7 @@
     * image info living info in the structure.  You could "|" many
     * PNG_TRANSFORM flags into the png_transforms integer here.
     */
-   png_write_png(png_ptr, info_ptr, png_transforms, NULL);
+   png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
 #else
    /* This is the hard way */
 
diff --git a/libpng.3 b/libpng.3
index e09809a..5019a72 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "May 14, 2001"
+.TH LIBPNG 3 "April 15, 2002"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
+libpng \- Portable Network Graphics (PNG) Reference Library 1.0.13
 .SH SYNOPSIS
 \fI\fB
 
@@ -302,7 +302,7 @@
 
 \fI\fB
 
-\fBvoid png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP
+\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
 
 \fI\fB
 
@@ -310,6 +310,14 @@
 
 \fI\fB
 
+\fBDEPRECATED: void png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBDEPRECATED: void png_info_init_2 (png_infopp \fP\fIptr_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
+
+\fI\fB
+
 \fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
 
 \fI\fB
@@ -334,7 +342,7 @@
 
 \fI\fB
 
-\fBvoid png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP
+\fBDEPRECATED: void png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP
 
 \fI\fB
 
@@ -362,7 +370,9 @@
 
 \fI\fB
 
-\fBDEPRECATED: void png_read_init_2 (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
+\fBDEPRECATED: void png_read_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
+
+\fI\fB
 
 \fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
 
@@ -692,10 +702,6 @@
 
 \fI\fB
 
-\fBvoid png_write_destroy_info (png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
 \fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
 
 \fI\fB
@@ -712,7 +718,7 @@
 
 \fI\fB
 
-\fBDEPRECATED: void png_write_init_2 (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
+\fBDEPRECATED: void png_write_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
 
 \fI\fB
 
@@ -736,6 +742,14 @@
 
 \fI\fB
 
+\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP
+
+\fI\fB
+
 .SH DESCRIPTION
 The
 .I libpng
@@ -747,10 +761,10 @@
 .SH LIBPNG.TXT
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.0.12beta1 - May 14, 2001
+ libpng version 1.0.13 - April 15, 2002
  Updated and distributed by Glenn Randers-Pehrson
  <randeg@alum.rpi.edu>
- Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ Copyright (c) 1998-2002 Glenn Randers-Pehrson
  For conditions of distribution and use, see copyright
  notice in png.h.
 
@@ -825,7 +839,9 @@
 instances of the structures.  Each thread should have its own
 png_struct and png_info instances, and thus its own image.
 Libpng does not protect itself against two threads using the
-same instance of a structure.
+same instance of a structure.  Note: thread safety may be defeated
+by use of some of the MMX assembler code in pnggccrd.c, which is only
+compiled when the user defines PNG_THREAD_UNSAFE_OK.
 
 
 .SH II. Structures
@@ -1322,7 +1338,7 @@
                  after decompression, 0 for tEXt/zTXt
     text_ptr[i].lang  - language of comment (empty
                          string for unknown).
-    text_ptr[i].translated_keyword  - keyword in UTF-8
+    text_ptr[i].lang_key  - keyword in UTF-8
                          (empty string for unknown).
     num_text       - number of comments (same as
                      num_comments; you can put NULL here
@@ -1537,7 +1553,7 @@
 convert the PNG pixel data back to the original bit depth of the image.
 This call reduces the pixels back down to the original bit depth:
 
-    png_color_16p sig_bit;
+    png_color_8p sig_bit;
 
     if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
         png_set_shift(png_ptr, sig_bit);
@@ -1549,17 +1565,18 @@
         color_type == PNG_COLOR_TYPE_RGB_ALPHA)
         png_set_bgr(png_ptr);
 
-PNG files store RGB pixels packed into 3 bytes. This code expands them
-into 4 bytes for windowing systems that need them in this format:
+PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them
+into 4 or 8 bytes for windowing systems that need them in this format:
 
-    if (bit_depth == 8 && color_type ==
-        PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr,
-        filler, PNG_FILLER_BEFORE);
+    if (color_type == PNG_COLOR_TYPE_RGB)
+        png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
 
 where "filler" is the 8 or 16-bit number to fill with, and the location is
 either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
 you want the filler before the RGB or after.  This transformation
-does not affect images that already have full alpha channels.
+does not affect images that already have full alpha channels.  To add an
+opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which
+will generate RGBA pixels.
 
 If you are reading an image with an alpha channel, and you need the
 data as ARGB instead of the normal PNG format RGBA:
@@ -1629,8 +1646,8 @@
 The calculation is done in a linear colorspace, if the image gamma
 is known.
 
-If you have a grayscale and you are using png_set_expand_depth() or
-png_set_expand() to change to
+If you have a grayscale and you are using png_set_expand_depth(),
+png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to
 a higher bit-depth, you must either supply the background color as a gray
 value at the original file bit-depth (need_expand = 1) or else supply the
 background color as an RGB triplet at the final, expanded bit depth
@@ -1749,7 +1766,13 @@
 The following code will reverse this (make black be one and white be
 zero):
 
-   if (bit_depth == 1 && color_type == PNG_COLOR_GRAY)
+   if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY)
+      png_set_invert_mono(png_ptr);
+
+This function can also be used to invert grayscale and gray-alpha images:
+
+   if (color_type == PNG_COLOR_TYPE_GRAY ||
+        color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
       png_set_invert_mono(png_ptr);
 
 PNG files store 16 bit pixels in network byte order (big-endian,
@@ -1994,8 +2017,7 @@
 responsibility for libpng-allocated data, the application must use
 png_free() to free it, and when the user transfers responsibility to libpng
 for data that the user has allocated, the user must have used png_malloc()
-or png_zalloc() to allocate it (the png_zalloc() function is the same
-as png_malloc() except that it also zeroes the newly-allocated memory).
+or png_zalloc() to allocate it.
 
 If you allocated your row_pointers in a single block, as suggested above in
 the description of the high level read interface, you must not transfer
@@ -2143,7 +2165,6 @@
 
  /* This function is called when each row of image
     data is complete */
-
  void
  row_callback(png_structp png_ptr, png_bytep new_row,
     png_uint_32 row_num, int pass)
@@ -3059,7 +3080,7 @@
 Your replacement memory functions must have prototypes as follows:
 
     png_voidp malloc_fn(png_structp png_ptr,
-       png_uint_32 size);
+       png_size_t size);
     void free_fn(png_structp png_ptr, png_voidp ptr);
 
 Your malloc_fn() can return NULL in case of failure.  The png_malloc()
@@ -3225,6 +3246,10 @@
 Another useful one is to reduce the memory level used by the library.
 The memory level defaults to 8, but it can be lowered if you are
 short on memory (running DOS, for example, where you only have 640K).
+Note that the memory level does have an effect on compression; among
+other things, lower levels will result in sections of incompressible
+data being emitted in smaller stored blocks, with a correspondingly
+larger relative overhead of up to 15% in the worst case.
 
     png_set_compression_mem_level(png_ptr, level);
 
@@ -3259,19 +3284,18 @@
 Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
 PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
 ORed together with '|' to specify one or more filters to use.
-These filters are described in more detail in the PNG specification.  If
-you intend to change the filter type during the course of writing
+These filters are described in more detail in the PNG specification.
+If you intend to change the filter type during the course of writing
 the image, you should start with flags set for all of the filters
 you intend to use so that libpng can initialize its internal
-structures appropriately for all of the filter types.
+structures appropriately for all of the filter types.  (Note that this
+means the first row must always be adaptively filtered, because libpng
+currently does not allocate the filter buffers until png_write_row()
+is called for the first time.)
 
     filters = PNG_FILTER_NONE | PNG_FILTER_SUB
               PNG_FILTER_UP | PNG_FILTER_AVE |
               PNG_FILTER_PAETH | PNG_ALL_FILTERS;
-    or
-    filters = one of PNG_FILTER_VALUE_NONE,
-              PNG_FILTER_VALUE_SUB, PNG_FILTER_VALUE_UP,
-              PNG_FILTER_VALUE_AVE, PNG_FILTER_VALUE_PAETH
 
     png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
        filters);
@@ -3283,16 +3307,16 @@
               in png_set_IHDR().
 
 It is also possible to influence how libpng chooses from among the
-available filters.  This is done in two ways - by telling it how
-important it is to keep the same filter for successive rows, and
-by telling it the relative computational costs of the filters.
+available filters.  This is done in one or both of two ways - by
+telling it how important it is to keep the same filter for successive
+rows, and by telling it the relative computational costs of the filters.
 
     double weights[3] = {1.5, 1.3, 1.1},
        costs[PNG_FILTER_VALUE_LAST] =
        {1.0, 1.3, 1.3, 1.5, 1.7};
 
-    png_set_filter_selection(png_ptr,
-       PNG_FILTER_SELECTION_WEIGHTED, 3,
+    png_set_filter_heuristics(png_ptr,
+       PNG_FILTER_HEURISTIC_WEIGHTED, 3,
        weights, costs);
 
 The weights are multiplying factors that indicate to libpng that the
@@ -3392,7 +3416,6 @@
 having level = 0 will be printed.  There aren't any such statements in
 this version of libpng, but if you insert some they will be printed.
 
-
 .SH VI.  MNG support
 
 The MNG specification (available at http://www.libpng.org/pub/mng) allows
@@ -3406,7 +3429,7 @@
         PNG_FLAG_MNG_EMPTY_PLTE
         PNG_FLAG_MNG_FILTER_64
         PNG_ALL_MNG_FEATURES
-   feature_set is a png_32_uint that is the logical AND of
+   feature_set is a png_byte that is the logical AND of
       your mask with the set of MNG features that is
       supported by the version of libpng that you are using.
 
@@ -3467,15 +3490,15 @@
 
    png_uint_32 application_vn = PNG_LIBPNG_VER;
 
-.SH VIII. Y2K Compliance in libpng
+.SH VII. Y2K Compliance in libpng
 
-May 14, 2001
+April 15, 2002
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
 
 This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.0.12beta1 are Y2K compliant.  It is my belief that earlier
+upward through 1.0.13 are Y2K compliant.  It is my belief that earlier
 versions were also Y2K compliant.
 
 Libpng only has three year fields.  One is a 2-byte unsigned integer that
@@ -3587,7 +3610,23 @@
  1.0.11beta1-3        1    10011  2.1.0.11beta1-3
  1.0.11rc1            1    10011  2.1.0.11rc1
  1.0.11               1    10011  2.1.0.11
- 1.0.12beta1          1    10012  2.1.0.12beta1
+ 1.0.12beta1-2        2    10012  2.1.0.12beta1-2
+ 1.0.12rc1            2    10012  2.1.0.12rc1
+ 1.0.12               2    10012  2.1.0.12
+ 1.1.0a-f             -    10100  2.1.1.0a-f abandoned
+ 1.2.0beta1-2         2    10200  2.1.2.0beta1-2
+ 1.2.0beta3-5         3    10200  3.1.2.0beta3-5
+ 1.2.0rc1             3    10200  3.1.2.0rc1
+ 1.2.0                3    10200  3.1.2.0
+ 1.2.1beta-4          3    10201  3.1.2.1beta1-4
+ 1.2.1rc1-2           3    10201  3.1.2.1rc1-2
+ 1.2.1                3    10201  3.1.2.1
+ 1.2.2beta1-6        12    10202  12.so.0.1.2.2beta1-6
+ 1.0.13beta1         10    10013  10.so.0.1.0.13beta1
+ 1.2.2rc1            12    10202  12.so.0.1.2.2rc1
+ 1.0.13rc1           10    10013  10.so.0.1.0.13rc1
+ 1.2.2               12    10202  12.so.0.1.2.2
+ 1.0.13              10    10013  10.so.0.1.0.13rc1
 
 Henceforth the source version will match the shared-library minor
 and patch numbers; the shared-library major version number will be
@@ -3645,7 +3684,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.0.12beta1 - May 14, 2001:
+Libpng version 1.0.13 - April 15, 2002:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
 
@@ -3662,8 +3701,8 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng versions 1.0.7, July 1, 2000, through  1.0.12beta1, May 14, 2001, are
-Copyright (c) 2000-2001 Glenn Randers-Pehrson, and are
+libpng versions 1.0.7, July 1, 2000, through 1.0.13, April 15, 2002, are
+Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.0.6
 with the following individuals added to the list of Contributing Authors
 
@@ -3754,7 +3793,7 @@
 
 Glenn Randers-Pehrson
 randeg@alum.rpi.edu
-May 14, 2001
+April 15, 2002
 
 .\" end of man page
 
diff --git a/libpng.txt b/libpng.txt
index b279116..075f2bb 100644
--- a/libpng.txt
+++ b/libpng.txt
@@ -1,9 +1,9 @@
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.0.12beta1 - May 14, 2001
+ libpng version 1.0.13 - April 15, 2002
  Updated and distributed by Glenn Randers-Pehrson
  <randeg@alum.rpi.edu>
- Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ Copyright (c) 1998-2002 Glenn Randers-Pehrson
  For conditions of distribution and use, see copyright
  notice in png.h.
 
@@ -78,7 +78,9 @@
 instances of the structures.  Each thread should have its own
 png_struct and png_info instances, and thus its own image.
 Libpng does not protect itself against two threads using the
-same instance of a structure.
+same instance of a structure.  Note: thread safety may be defeated
+by use of some of the MMX assembler code in pnggccrd.c, which is only
+compiled when the user defines PNG_THREAD_UNSAFE_OK.
 
 
 II. Structures
@@ -575,7 +577,7 @@
                  after decompression, 0 for tEXt/zTXt
     text_ptr[i].lang  - language of comment (empty
                          string for unknown).
-    text_ptr[i].translated_keyword  - keyword in UTF-8
+    text_ptr[i].lang_key  - keyword in UTF-8
                          (empty string for unknown).
     num_text       - number of comments (same as
                      num_comments; you can put NULL here
@@ -790,7 +792,7 @@
 convert the PNG pixel data back to the original bit depth of the image.
 This call reduces the pixels back down to the original bit depth:
 
-    png_color_16p sig_bit;
+    png_color_8p sig_bit;
 
     if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
         png_set_shift(png_ptr, sig_bit);
@@ -802,17 +804,18 @@
         color_type == PNG_COLOR_TYPE_RGB_ALPHA)
         png_set_bgr(png_ptr);
 
-PNG files store RGB pixels packed into 3 bytes. This code expands them
-into 4 bytes for windowing systems that need them in this format:
+PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them
+into 4 or 8 bytes for windowing systems that need them in this format:
 
-    if (bit_depth == 8 && color_type ==
-        PNG_COLOR_TYPE_RGB) png_set_filler(png_ptr,
-        filler, PNG_FILLER_BEFORE);
+    if (color_type == PNG_COLOR_TYPE_RGB)
+        png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
 
 where "filler" is the 8 or 16-bit number to fill with, and the location is
 either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
 you want the filler before the RGB or after.  This transformation
-does not affect images that already have full alpha channels.
+does not affect images that already have full alpha channels.  To add an
+opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which
+will generate RGBA pixels.
 
 If you are reading an image with an alpha channel, and you need the
 data as ARGB instead of the normal PNG format RGBA:
@@ -882,8 +885,8 @@
 The calculation is done in a linear colorspace, if the image gamma
 is known.
 
-If you have a grayscale and you are using png_set_expand_depth() or
-png_set_expand() to change to
+If you have a grayscale and you are using png_set_expand_depth(),
+png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to
 a higher bit-depth, you must either supply the background color as a gray
 value at the original file bit-depth (need_expand = 1) or else supply the
 background color as an RGB triplet at the final, expanded bit depth
@@ -1002,7 +1005,13 @@
 The following code will reverse this (make black be one and white be
 zero):
 
-   if (bit_depth == 1 && color_type == PNG_COLOR_GRAY)
+   if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY)
+      png_set_invert_mono(png_ptr);
+
+This function can also be used to invert grayscale and gray-alpha images:
+
+   if (color_type == PNG_COLOR_TYPE_GRAY ||
+        color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
       png_set_invert_mono(png_ptr);
 
 PNG files store 16 bit pixels in network byte order (big-endian,
@@ -1247,8 +1256,7 @@
 responsibility for libpng-allocated data, the application must use
 png_free() to free it, and when the user transfers responsibility to libpng
 for data that the user has allocated, the user must have used png_malloc()
-or png_zalloc() to allocate it (the png_zalloc() function is the same
-as png_malloc() except that it also zeroes the newly-allocated memory).
+or png_zalloc() to allocate it.
 
 If you allocated your row_pointers in a single block, as suggested above in
 the description of the high level read interface, you must not transfer
@@ -1396,7 +1404,6 @@
 
  /* This function is called when each row of image
     data is complete */
-
  void
  row_callback(png_structp png_ptr, png_bytep new_row,
     png_uint_32 row_num, int pass)
@@ -2312,7 +2319,7 @@
 Your replacement memory functions must have prototypes as follows:
 
     png_voidp malloc_fn(png_structp png_ptr,
-       png_uint_32 size);
+       png_size_t size);
     void free_fn(png_structp png_ptr, png_voidp ptr);
 
 Your malloc_fn() can return NULL in case of failure.  The png_malloc()
@@ -2478,6 +2485,10 @@
 Another useful one is to reduce the memory level used by the library.
 The memory level defaults to 8, but it can be lowered if you are
 short on memory (running DOS, for example, where you only have 640K).
+Note that the memory level does have an effect on compression; among
+other things, lower levels will result in sections of incompressible
+data being emitted in smaller stored blocks, with a correspondingly
+larger relative overhead of up to 15% in the worst case.
 
     png_set_compression_mem_level(png_ptr, level);
 
@@ -2512,19 +2523,18 @@
 Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
 PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
 ORed together with '|' to specify one or more filters to use.
-These filters are described in more detail in the PNG specification.  If
-you intend to change the filter type during the course of writing
+These filters are described in more detail in the PNG specification.
+If you intend to change the filter type during the course of writing
 the image, you should start with flags set for all of the filters
 you intend to use so that libpng can initialize its internal
-structures appropriately for all of the filter types.
+structures appropriately for all of the filter types.  (Note that this
+means the first row must always be adaptively filtered, because libpng
+currently does not allocate the filter buffers until png_write_row()
+is called for the first time.)
 
     filters = PNG_FILTER_NONE | PNG_FILTER_SUB
               PNG_FILTER_UP | PNG_FILTER_AVE |
               PNG_FILTER_PAETH | PNG_ALL_FILTERS;
-    or
-    filters = one of PNG_FILTER_VALUE_NONE,
-              PNG_FILTER_VALUE_SUB, PNG_FILTER_VALUE_UP,
-              PNG_FILTER_VALUE_AVE, PNG_FILTER_VALUE_PAETH
 
     png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
        filters);
@@ -2536,16 +2546,16 @@
               in png_set_IHDR().
 
 It is also possible to influence how libpng chooses from among the
-available filters.  This is done in two ways - by telling it how
-important it is to keep the same filter for successive rows, and
-by telling it the relative computational costs of the filters.
+available filters.  This is done in one or both of two ways - by
+telling it how important it is to keep the same filter for successive
+rows, and by telling it the relative computational costs of the filters.
 
     double weights[3] = {1.5, 1.3, 1.1},
        costs[PNG_FILTER_VALUE_LAST] =
        {1.0, 1.3, 1.3, 1.5, 1.7};
 
-    png_set_filter_selection(png_ptr,
-       PNG_FILTER_SELECTION_WEIGHTED, 3,
+    png_set_filter_heuristics(png_ptr,
+       PNG_FILTER_HEURISTIC_WEIGHTED, 3,
        weights, costs);
 
 The weights are multiplying factors that indicate to libpng that the
@@ -2645,7 +2655,6 @@
 having level = 0 will be printed.  There aren't any such statements in
 this version of libpng, but if you insert some they will be printed.
 
-
 VI.  MNG support
 
 The MNG specification (available at http://www.libpng.org/pub/mng) allows
@@ -2659,7 +2668,7 @@
         PNG_FLAG_MNG_EMPTY_PLTE
         PNG_FLAG_MNG_FILTER_64
         PNG_ALL_MNG_FEATURES
-   feature_set is a png_32_uint that is the logical AND of
+   feature_set is a png_byte that is the logical AND of
       your mask with the set of MNG features that is
       supported by the version of libpng that you are using.
 
@@ -2720,15 +2729,15 @@
 
    png_uint_32 application_vn = PNG_LIBPNG_VER;
 
-VIII. Y2K Compliance in libpng
+VII. Y2K Compliance in libpng
 
-May 14, 2001
+April 15, 2002
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
 
 This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.0.12beta1 are Y2K compliant.  It is my belief that earlier
+upward through 1.0.13 are Y2K compliant.  It is my belief that earlier
 versions were also Y2K compliant.
 
 Libpng only has three year fields.  One is a 2-byte unsigned integer that
diff --git a/libpngpf.3 b/libpngpf.3
index d612403..3234eb9 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "May 14, 2001"
+.TH LIBPNGPF 3 "April 15, 2002"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
+libpng \- Portable Network Graphics (PNG) Reference Library 1.0.13
 (private functions)
 .SH SYNOPSIS
 \fB#include <png.h>\fP
@@ -47,11 +47,11 @@
 
 \fI\fB
 
-\fBpng_voidp png_create_struct (int \fP\fItype\fP\fB, png_malloc_ptr \fImalloc_fn\fP\fB);\fP
+\fBpng_voidp png_create_struct (int \fItype\fP\fB);\fP
 
 \fI\fB
 
-\fBpng_voidp png_create_struct_2 (int \fItype\fP\fB);\fP
+\fBpng_voidp png_create_struct_2 (int \fP\fItype\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
 
 \fI\fB
 
@@ -63,7 +63,7 @@
 
 \fI\fB
 
-\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fP\fIfree_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
 
 \fI\fB
 
@@ -191,10 +191,6 @@
 
 \fI\fB
 
-\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
-
-\fI\fB
-
 \fBvoid png_handle_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
 
 \fI\fB
@@ -425,6 +421,8 @@
 
 \fBvoid png_write_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
 
+\fI\fB
+
 \fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP
 
 \fI\fB
@@ -529,17 +527,10 @@
 
 \fI\fB
 
-\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP
-
-\fI\fB
-
 .SH DESCRIPTION
 The functions listed above are used privately by libpng
-and are not recommended for use by applications.  They
+and are not recommended for use by applications.  They are
+not "exported" to applications using shared libraries.  They
 are listed alphabetically here as an aid to libpng maintainers.
 See png.h for more information on these functions.
 
diff --git a/png.5 b/png.5
index 588d96d..d61d281 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "May 14, 2001"
+.TH PNG 5 "April 15, 2002"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index 691807c..1d2aba1 100644
--- a/png.c
+++ b/png.c
@@ -1,8 +1,8 @@
 
 /* png.c - location for general purpose libpng functions
  *
- * libpng version 1.0.12beta1 - May 14, 2001
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * libpng version 1.0.13 - April 15, 2002
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -13,14 +13,14 @@
 #include "png.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_0_12beta1 Your_png_h_is_not_version_1_0_12beta1;
+typedef version_1_0_13 Your_png_h_is_not_version_1_0_13;
 
 /* Version information for C files.  This had better match the version
  * string defined in png.h.  */
 
 #ifdef PNG_USE_GLOBAL_ARRAYS
 /* png_libpng_ver was changed to a function in version 1.0.5c */
-const char png_libpng_ver[18] = "1.0.12beta1";
+const char png_libpng_ver[18] = "1.0.13";
 
 /* png_sig was changed to a function in version 1.0.5c */
 /* Place to hold the signature string for a PNG file. */
@@ -135,13 +135,22 @@
 }
 
 /* Function to allocate memory for zlib and clear it to 0. */
-voidpf /* PRIVATE */
+voidpf PNGAPI
 png_zalloc(voidpf png_ptr, uInt items, uInt size)
 {
    png_uint_32 num_bytes = (png_uint_32)items * size;
-   png_voidp ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
+   png_voidp ptr;
+   png_structp p=png_ptr;
+   png_uint_32 save_flags=p->flags;
+
+   p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
+   ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
+   p->flags=save_flags;
 
 #ifndef PNG_NO_ZALLOC_ZERO
+   if (ptr == NULL)
+       return ((voidpf)ptr);
+
    if (num_bytes > (png_uint_32)0x8000L)
    {
       png_memset(ptr, 0, (png_size_t)0x8000L);
@@ -157,7 +166,7 @@
 }
 
 /* function to free memory for zlib */
-void /* PRIVATE */
+void PNGAPI
 png_zfree(voidpf png_ptr, voidpf ptr)
 {
    png_free((png_structp)png_ptr, (png_voidp)ptr);
@@ -212,14 +221,13 @@
    png_debug(1, "in png_create_info_struct\n");
    if(png_ptr == NULL) return (NULL);
 #ifdef PNG_USER_MEM_SUPPORTED
-   if ((info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO,
-      png_ptr->malloc_fn, png_ptr->mem_ptr)) != NULL)
+   info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO,
+      png_ptr->malloc_fn, png_ptr->mem_ptr);
 #else
-   if ((info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO)) != NULL)
+   info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
 #endif
-   {
+   if (info_ptr != NULL)
       png_info_init_3(&info_ptr, sizeof(png_info));
-   }
 
    return (info_ptr);
 }
@@ -248,7 +256,7 @@
 #else
       png_destroy_struct((png_voidp)info_ptr);
 #endif
-      *info_ptr_ptr = (png_infop)NULL;
+      *info_ptr_ptr = NULL;
    }
 }
 
@@ -346,6 +354,9 @@
 {
     png_free(png_ptr, info_ptr->trans);
     info_ptr->valid &= ~PNG_INFO_tRNS;
+#ifndef PNG_FREE_ME_SUPPORTED
+    png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;
+#endif
     info_ptr->trans = NULL;
 }
 #endif
@@ -489,6 +500,9 @@
     png_free(png_ptr, info_ptr->hist);
     info_ptr->hist = NULL;
     info_ptr->valid &= ~PNG_INFO_hIST;
+#ifndef PNG_FREE_ME_SUPPORTED
+    png_ptr->flags &= ~PNG_FLAG_FREE_HIST;
+#endif
 }
 #endif
 
@@ -502,6 +516,9 @@
     png_zfree(png_ptr, info_ptr->palette);
     info_ptr->palette = NULL;
     info_ptr->valid &= ~PNG_INFO_PLTE;
+#ifndef PNG_FREE_ME_SUPPORTED
+    png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;
+#endif
     info_ptr->num_palette = 0;
 }
 
@@ -646,10 +663,10 @@
 png_get_copyright(png_structp png_ptr)
 {
    if (png_ptr != NULL || png_ptr == NULL)  /* silence compiler warning */
-   return ((png_charp) "\n libpng version 1.0.12beta1 - May 14, 2001\n\
-   Copyright (c) 1998-2001 Glenn Randers-Pehrson\n\
-   Copyright (c) 1996, 1997 Andreas Dilger\n\
-   Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
+   return ((png_charp) "\n libpng version 1.0.13 - April 15, 2002\n\
+   Copyright (c) 1998-2002 Glenn Randers-Pehrson\n\
+   Copyright (c) 1996-1997 Andreas Dilger\n\
+   Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
    return ((png_charp) "");
 }
 
@@ -664,8 +681,8 @@
 {
    /* Version of *.c files used when building libpng */
    if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
-      return((png_charp) "1.0.12beta1");
-   return((png_charp) "1.0.12beta1");
+      return((png_charp) "1.0.13");
+   return((png_charp) "1.0.13");
 }
 
 png_charp PNGAPI
@@ -687,7 +704,7 @@
 }
 
 #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-int /* PRIVATE */
+int PNGAPI
 png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
 {
    /* check chunk_name and return "keep" value if it's on the list, else 0 */
@@ -715,9 +732,59 @@
 png_access_version_number(void)
 {
    /* Version of *.c files used when building libpng */
-   return((png_uint_32) 10012L);
+   return((png_uint_32) 10013L);
 }
 
+
+#if !defined(PNG_1_0_X)
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
+    /* GRR:  could add this:   && defined(PNG_MMX_CODE_SUPPORTED) */
+/* this INTERNAL function was added to libpng 1.2.0 */
+void /* PRIVATE */
+png_init_mmx_flags (png_structp png_ptr)
+{
+    png_ptr->mmx_rowbytes_threshold = 0;
+    png_ptr->mmx_bitdepth_threshold = 0;
+
+#  if (defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD))
+
+    png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_COMPILED;
+
+    if (png_mmx_support()) {
+        png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
+#    ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
+                              | PNG_ASM_FLAG_MMX_READ_COMBINE_ROW
+#    endif
+#    ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE
+                              | PNG_ASM_FLAG_MMX_READ_INTERLACE
+#    endif
+#    ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
+                              ;
+#    else
+                              | PNG_ASM_FLAG_MMX_READ_FILTER_SUB
+                              | PNG_ASM_FLAG_MMX_READ_FILTER_UP
+                              | PNG_ASM_FLAG_MMX_READ_FILTER_AVG
+                              | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
+
+        png_ptr->mmx_rowbytes_threshold = PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT;
+        png_ptr->mmx_bitdepth_threshold = PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT;
+#    endif
+    } else {
+        png_ptr->asm_flags &= ~( PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
+                               | PNG_MMX_READ_FLAGS
+                               | PNG_MMX_WRITE_FLAGS );
+    }
+
+#  else /* !((PNGVCRD || PNGGCCRD) && PNG_ASSEMBLER_CODE_SUPPORTED)) */
+
+    /* clear all MMX flags; no support is compiled in */
+    png_ptr->asm_flags &= ~( PNG_MMX_FLAGS );
+
+#  endif /* ?(PNGVCRD || PNGGCCRD) */
+}
+
+#endif /* !(PNG_ASSEMBLER_CODE_SUPPORTED) */
+
 /* this function was added to libpng 1.2.0 */
 #if !defined(PNG_USE_PNGGCCRD) && \
     !(defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))
@@ -727,3 +794,4 @@
     return -1;
 }
 #endif
+#endif /* PNG_1_0_X */
diff --git a/png.h b/png.h
index 03a2bc1..8c6d6c8 100644
--- a/png.h
+++ b/png.h
@@ -1,15 +1,15 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.0.12beta1 - May 14, 2001
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * libpng version 1.0.13 - April 15, 2002
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
  * Authors and maintainers:
  *  libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
  *  libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- *  libpng versions 0.97, January 1998, through 1.0.12beta1 - May 14, 2001: Glenn
+ *  libpng versions 0.97, January 1998, through 1.0.13 - April 15, 2002: Glenn
  *  See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -70,10 +70,23 @@
  *    1.0.11beta1-3            1    10011  2.1.0.11beta1-3
  *    1.0.11rc1                1    10011  2.1.0.11rc1
  *    1.0.11                   1    10011  2.1.0.11
- *    1.0.12beta1              2    10012  2.1.0.11beta1
- *    1.1.0a-f                 1    10100  2.1.1.0a-f (branch abandoned)
+ *    1.0.12beta1-2            2    10012  2.1.0.12beta1-2
+ *    1.0.12rc1                2    10012  2.1.0.12rc1
+ *    1.0.12                   2    10012  2.1.0.12
+ *    1.1.0a-f                 -    10100  2.1.1.0a-f (branch abandoned)
  *    1.2.0beta1-2             2    10200  2.1.2.0beta1-2
- *    1.2.0beta3               3    10200  3.1.2.0beta3
+ *    1.2.0beta3-5             3    10200  3.1.2.0beta3-5
+ *    1.2.0rc1                 3    10200  3.1.2.0rc1
+ *    1.2.0                    3    10200  3.1.2.0
+ *    1.2.1beta1-4             3    10201  3.1.2.1beta1-4
+ *    1.2.1rc1-2               3    10201  3.1.2.1rc1-2
+ *    1.2.1                    3    10201  3.1.2.1
+ *    1.2.2beta1-6            12    10202  12.so.0.1.2.2beta1-6
+ *    1.0.13beta1             10    10013  10.so.0.1.0.13beta1
+ *    1.2.2rc1                12    10202  12.so.0.1.2.2rc1
+ *    1.0.13rc1               10    10013  10.so.0.1.0.13rc1
+ *    1.2.2                   12    10202  12.so.0.1.2.2
+ *    1.0.13                  10    10013  10.so.0.1.0.13
  *
  *    Henceforth the source version will match the shared-library major
  *    and minor numbers; the shared-library major version number will be
@@ -103,8 +116,8 @@
  * If you modify libpng you may insert additional notices immediately following
  * this sentence.
  *
- * libpng versions 1.0.7, July 1, 2000, through  1.0.12beta1, May 14, 2001, are
- * Copyright (c) 2000, 2001 Glenn Randers-Pehrson, and are
+ * libpng versions 1.0.7, July 1, 2000, through 1.0.13, April 15, 2002, are
+ * Copyright (c) 2000-2001 Glenn Randers-Pehrson, and are
  * distributed according to the same disclaimer and license as libpng-1.0.6
  * with the following individuals added to the list of Contributing Authors
  *
@@ -208,13 +221,13 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    May 14, 2001
+ *    April 15, 2002
  *
  *    Since the PNG Development group is an ad-hoc body, we can't make
  *    an official declaration.
  *
  *    This is your unofficial assurance that libpng from version 0.71 and
- *    upward through 1.0.12beta1 are Y2K compliant.  It is my belief that earlier
+ *    upward through 1.0.13 are Y2K compliant.  It is my belief that earlier
  *    versions were also Y2K compliant.
  *
  *    Libpng only has three year fields.  One is a 2-byte unsigned integer
@@ -270,19 +283,19 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.0.12beta1"
+#define PNG_LIBPNG_VER_STRING "1.0.13"
 
-#define PNG_LIBPNG_VER_SONUM   2
+#define PNG_LIBPNG_VER_SONUM   0
 #define PNG_LIBPNG_VER_DLLNUM  %DLLNUM%
 
 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
 #define PNG_LIBPNG_VER_MAJOR   1
 #define PNG_LIBPNG_VER_MINOR   0
-#define PNG_LIBPNG_VER_RELEASE 12
+#define PNG_LIBPNG_VER_RELEASE 13
 /* This should match the numeric part of the final component of
  * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
 
-#define PNG_LIBPNG_VER_BUILD  1
+#define PNG_LIBPNG_VER_BUILD  0
 
 #define PNG_LIBPNG_BUILD_ALPHA    1
 #define PNG_LIBPNG_BUILD_BETA     2
@@ -290,14 +303,14 @@
 #define PNG_LIBPNG_BUILD_STABLE   4
 #define PNG_LIBPNG_BUILD_TYPEMASK 7
 #define PNG_LIBPNG_BUILD_PATCH    8 /* Can be OR'ed with STABLE only */
-#define PNG_LIBPNG_BUILD_TYPE 2
+#define PNG_LIBPNG_BUILD_TYPE 4
 
 /* Careful here.  At one time, Guy wanted to use 082, but that would be octal.
  * We must not include leading zeros.
  * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
  * version 1.0.0 was mis-numbered 100 instead of 10000).  From
  * version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release */
-#define PNG_LIBPNG_VER 10012 /* 1.0.12 */
+#define PNG_LIBPNG_VER 10013 /* 1.0.13 */
 
 #ifndef PNG_VERSION_INFO_ONLY
 
@@ -318,6 +331,40 @@
  * which applications aren't expected to use directly.
  */
 
+#ifndef PNG_NO_TYPECAST_NULL
+#define int_p_NULL                (int *)NULL
+#define png_bytep_NULL            (png_bytep)NULL
+#define png_bytepp_NULL           (png_bytepp)NULL
+#define png_doublep_NULL          (png_doublep)NULL
+#define png_error_ptr_NULL        (png_error_ptr)NULL
+#define png_flush_ptr_NULL        (png_flush_ptr)NULL
+#define png_free_ptr_NULL         (png_free_ptr)NULL
+#define png_infopp_NULL           (png_infopp)NULL
+#define png_malloc_ptr_NULL       (png_malloc_ptr)NULL
+#define png_read_status_ptr_NULL  (png_read_status_ptr)NULL
+#define png_rw_ptr_NULL           (png_rw_ptr)NULL
+#define png_structp_NULL          (png_structp)NULL
+#define png_uint_16p_NULL         (png_uint_16p)NULL
+#define png_voidp_NULL            (png_voidp)NULL
+#define png_write_status_ptr_NULL (png_write_status_ptr)NULL
+#else
+#define int_p_NULL                NULL
+#define png_bytep_NULL            NULL
+#define png_bytepp_NULL           NULL
+#define png_doublep_NULL          NULL
+#define png_error_ptr_NULL        NULL
+#define png_flush_ptr_NULL        NULL
+#define png_free_ptr_NULL         NULL
+#define png_infopp_NULL           NULL
+#define png_malloc_ptr_NULL       NULL
+#define png_read_status_ptr_NULL  NULL
+#define png_rw_ptr_NULL           NULL
+#define png_structp_NULL          NULL
+#define png_uint_16p_NULL         NULL
+#define png_voidp_NULL            NULL
+#define png_write_status_ptr_NULL NULL
+#endif
+
 /* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
 #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
 /* Version information for C files, stored in png.c.  This had better match
@@ -1042,9 +1089,9 @@
    float background_gamma;
 #  endif
    png_color_16 background;   /* background color in screen gamma space */
-#  if defined(PNG_READ_GAMMA_SUPPORTED)
-     png_color_16 background_1; /* background normalized to gamma 1.0 */
-#  endif /* PNG_READ_GAMMA && PNG_bKGD_SUPPORTED */
+#if defined(PNG_READ_GAMMA_SUPPORTED)
+   png_color_16 background_1; /* background normalized to gamma 1.0 */
+#endif
 #endif /* PNG_bKGD_SUPPORTED */
 
 #if defined(PNG_WRITE_FLUSH_SUPPORTED)
@@ -1174,7 +1221,11 @@
     defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
     defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
 /* changed from png_byte to png_uint_32 at version 1.2.0 */
+#ifdef PNG_1_0_X
    png_byte mng_features_permitted;
+#else
+   png_uint_32 mng_features_permitted;
+#endif /* PNG_1_0_X */
 #endif
 
 /* New member added in libpng-1.0.7 */
@@ -1187,13 +1238,13 @@
    png_byte filter_type;
 #endif
 
-#if defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD)
+#if defined(PNG_1_0_X) || (defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD))
 /* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */
    png_uint_32 row_buf_size;
 #endif
 
 /* New members added in libpng-1.2.0 */
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
+#if !defined(PNG_1_0_X) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)
    png_byte     mmx_bitdepth_threshold;
    png_uint_32  mmx_rowbytes_threshold;
    png_uint_32  asm_flags;
@@ -1206,13 +1257,15 @@
    png_free_ptr free_fn;             /* function for freeing memory */
 #endif
 
+   png_bytep big_row_buf;         /* buffer to save current (unfiltered) row */
+
 };
 
 
-/* This prevents a compiler error in png_get_copyright() in png.c if png.c
-   and png.h are both at version 1.0.12beta1
+/* This prevents a compiler error in png.c if png.c and png.h are both at
+   version 1.0.13
  */
-typedef png_structp version_1_0_12beta1;
+typedef png_structp version_1_0_13;
 
 typedef png_struct FAR * FAR * png_structpp;
 
@@ -1520,9 +1573,6 @@
 extern PNG_EXPORT(void,png_destroy_write_struct)
    PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
 
-/* free any memory used in info_ptr struct (old method - NOT DLL EXPORTED) */
-extern void png_write_destroy_info PNGARG((png_infop info_ptr));
-
 /* free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
 extern void png_write_destroy PNGARG((png_structp png_ptr));
 
@@ -1767,6 +1817,13 @@
 /* frees a pointer allocated by png_malloc() */
 extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
 
+/* Function to allocate memory for zlib. */
+extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items,
+   uInt size));
+
+/* Function to free memory for zlib */
+extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr));
+
 /* Free data that was allocated internally */
 extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
    png_infop info_ptr, png_uint_32 free_me, int num));
@@ -2174,6 +2231,10 @@
 extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
    png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
 #endif
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
+   chunk_name));
+#endif
 
 /* Png_free_data() will turn off the "valid" flag for anything it frees.
    If you need to turn it off for a chunk that your application has freed,
@@ -2256,11 +2317,71 @@
    png_ptr, png_uint_32 mng_features_permitted));
 #endif
 
-/* png_mmx_support will be included unconditionally starting in version 1.2.0 */
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) || defined(PNG_USE_PNGGCCRD)
+/* Added to version 1.2.0 */
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
+#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED  0x01		/* not user-settable */
+#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU    0x02		/* not user-settable */
+#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  0x04
+#define PNG_ASM_FLAG_MMX_READ_INTERLACE    0x08
+#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB   0x10
+#define PNG_ASM_FLAG_MMX_READ_FILTER_UP    0x20
+#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG   0x40
+#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80
+#define PNG_ASM_FLAGS_INITIALIZED          0x80000000	/* not user-settable */
+
+#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
+                           | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
+                           | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
+                           | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
+                           | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
+                           | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )
+#define PNG_MMX_WRITE_FLAGS ( 0 )
+
+#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \
+                      | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU   \
+                      | PNG_MMX_READ_FLAGS                \
+                      | PNG_MMX_WRITE_FLAGS )
+
+#define PNG_SELECT_READ   1
+#define PNG_SELECT_WRITE  2
+
+
+#if !defined(PNG_1_0_X)
+/* pngget.c */
+extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask)
+   PNGARG((int flag_select, int *compilerID));
+
+/* pngget.c */
+extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask)
+   PNGARG((int flag_select));
+
+/* pngget.c */
+extern PNG_EXPORT(png_uint_32,png_get_asm_flags)
+   PNGARG((png_structp png_ptr));
+
+/* pngget.c */
+extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold)
+   PNGARG((png_structp png_ptr));
+
+/* pngget.c */
+extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold)
+   PNGARG((png_structp png_ptr));
+
+/* pngset.c */
+extern PNG_EXPORT(void,png_set_asm_flags)
+   PNGARG((png_structp png_ptr, png_uint_32 asm_flags));
+
+/* pngset.c */
+extern PNG_EXPORT(void,png_set_mmx_thresholds)
+   PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold,
+   png_uint_32 mmx_rowbytes_threshold));
+
+#endif /* PNG_1_0_X */
+#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
+
+#if !defined(PNG_1_0_X)
 /* png.c, pnggccrd.c, or pngvcrd.c */
 extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
 
 /* Strip the prepended error numbers ("#nnn ") from error and warning
  * messages before passing them to the error or warning handler. */
@@ -2268,11 +2389,12 @@
 extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
    png_ptr, png_uint_32 strip_mode));
 #endif
+#endif /* PNG_1_0_X */
 
 /* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
 
 #define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.0.12beta1 - May 14, 2001 (header)\n"
+   " libpng version 1.0.13 - April 15, 2002 (header)\n"
 
 #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
 /* With these routines we avoid an integer divide, which will be slower on
@@ -2397,6 +2519,7 @@
 #define PNG_FLAG_LIBRARY_MISMATCH         0x20000L
 #define PNG_FLAG_STRIP_ERROR_NUMBERS      0x40000L
 #define PNG_FLAG_STRIP_ERROR_TEXT         0x80000L
+#define PNG_FLAG_MALLOC_NULL_MEM_OK       0x100000L
 
 /* For use in png_set_keep_unknown, png_handle_as_unknown */
 #define HANDLE_CHUNK_AS_DEFAULT   0
@@ -2540,12 +2663,6 @@
 PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
    png_infop info_ptr));
 
-/* Function to allocate memory for zlib. */
-PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
-
-/* Function to free memory for zlib */
-PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
-
 /* Reset the CRC variable */
 PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
 
@@ -2592,7 +2709,7 @@
  */
 PNG_EXTERN void png_save_uint_32 PNGARG((png_bytep buf, png_uint_32 i));
 
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
+#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED)
 PNG_EXTERN void png_save_int_32 PNGARG((png_bytep buf, png_int_32 i));
 #endif
 
@@ -2710,7 +2827,7 @@
 
 #if defined(PNG_WRITE_oFFs_SUPPORTED)
 PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
-   png_uint_32 x_offset, png_uint_32 y_offset, int unit_type));
+   png_int_32 x_offset, png_int_32 y_offset, int unit_type));
 #endif
 
 #if defined(PNG_WRITE_pCAL_SUPPORTED)
@@ -2885,12 +3002,17 @@
 #endif
 
 #if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#if defined(PNG_READ_GAMMA_SUPPORTED)
 PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
    png_color_16p trans_values, png_color_16p background,
    png_color_16p background_1,
    png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
    png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
    png_uint_16pp gamma_16_to_1, int gamma_shift));
+#else
+PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
+   png_color_16p trans_values, png_color_16p background));
+#endif
 #endif
 
 #if defined(PNG_READ_GAMMA_SUPPORTED)
@@ -3003,11 +3125,6 @@
    png_uint_32 length));
 #endif
 
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-PNG_EXTERN int png_handle_as_unknown PNGARG((png_structp png_ptr, png_bytep
-   chunk_name));
-#endif
-
 PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
    png_infop info_ptr, png_uint_32 length));
 
@@ -3078,6 +3195,10 @@
    png_bytep row));
 #endif
 
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
+/* png.c */ /* PRIVATE */
+PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr));
+#endif
 /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
 
 #endif /* PNG_INTERNAL */
diff --git a/pngasmrd.h b/pngasmrd.h
index 728fec9..715e4ca 100644
--- a/pngasmrd.h
+++ b/pngasmrd.h
@@ -1,8 +1,8 @@
 /* pngasmrd.h - assembler version of utilities to read a PNG file
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 2001 Glenn Randers-Pehrson
+ * Copyright (c) 2002 Glenn Randers-Pehrson
  *
  */
 
diff --git a/pngconf.h b/pngconf.h
index 3515078..88e86a9 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,8 +1,8 @@
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  */
@@ -16,6 +16,8 @@
 #ifndef PNGCONF_H
 #define PNGCONF_H
 
+#define PNG_1_0_X
+
 /* This is the size of the compression buffer, and thus the size of
  * an IDAT chunk.  Make this whatever size you feel is best for your
  * machine.  One of these will be allocated per png_struct.  When this
@@ -47,13 +49,11 @@
 
 /* Enabled by default in 1.2.0.  You can disable this if you don't need to
    support PNGs that are embedded in MNG datastreams */
-/*
-#ifndef PNG_NO_MNG_FEATURES
+#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
 #  ifndef PNG_MNG_FEATURES_SUPPORTED
 #    define PNG_MNG_FEATURES_SUPPORTED
 #  endif
 #endif
-*/
 
 #ifndef PNG_NO_FLOATING_POINT_SUPPORTED
 #  ifndef PNG_FLOATING_POINT_SUPPORTED
@@ -204,6 +204,9 @@
 
 #ifdef _NO_PROTO
 #  define PNGARG(arglist) ()
+#  ifndef PNG_TYPECAST_NULL
+#     define PNG_TYPECAST_NULL
+#  endif
 #else
 #  define PNGARG(arglist) arglist
 #endif /* _NO_PROTO */
@@ -228,7 +231,7 @@
 #  include <sys/types.h>
 #endif
 
-#ifndef PNG_SETJMP_NOT_SUPPORTED
+#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
 #  define PNG_SETJMP_SUPPORTED
 #endif
 
@@ -401,10 +404,10 @@
  */
 
 #ifndef PNG_iTXt_SUPPORTED
-#  ifndef PNG_READ_iTXt_SUPPORTED
+#  if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
 #    define PNG_NO_READ_iTXt
 #  endif
-#  ifndef PNG_WRITE_iTXt_SUPPORTED
+#  if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
 #    define PNG_NO_WRITE_iTXt
 #  endif
 #endif
@@ -590,12 +593,11 @@
 #  define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
 #endif
 
-/* Will be enabled in libpng-1.2.0 */
-/*
+#ifndef PNG_1_0_X
 #ifndef PNG_NO_ERROR_NUMBERS
 #define PNG_ERROR_NUMBERS_SUPPORTED
 #endif
-*/
+#endif /* PNG_1_0_X */
 
 #ifndef PNG_NO_WRITE_FLUSH
 #  define PNG_WRITE_FLUSH_SUPPORTED
@@ -634,7 +636,6 @@
 
 /* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 
    even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
-/*
 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
 #  ifndef PNG_ASSEMBLER_CODE_SUPPORTED
 #    define PNG_ASSEMBLER_CODE_SUPPORTED
@@ -643,24 +644,18 @@
 #    define PNG_MMX_CODE_SUPPORTED
 #  endif
 #endif
-*/
-#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
-#  if defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD)
-#    ifndef PNG_ASSEMBLER_CODE_SUPPORTED
-#      define PNG_ASSEMBLER_CODE_SUPPORTED
-#    endif
-#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-#      define PNG_MMX_CODE_SUPPORTED
-#    endif
-#  endif
-#endif
 
-/* This will be enabled by default in libpng-1.2.0 */
-/*
+/* If you are sure that you don't need thread safety and you are compiling
+   with PNG_USE_PNGCCRD for an MMX application, you can define this for
+   faster execution.  See pnggccrd.c.
+#define PNG_THREAD_UNSAFE_OK
+*/
+
+#if !defined(PNG_1_0_X)
 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
 #  define PNG_USER_MEM_SUPPORTED
 #endif
-*/
+#endif /* PNG_1_0_X */
 
 /* These are currently experimental features, define them if you want */
 
@@ -671,9 +666,6 @@
 #    define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
 #  endif
 #endif
-#ifndef PNG_NO_ZALLOC_ZERO
-#  define PNG_ZALLOC_ZERO
-#endif
 */
 
 /* This is only for PowerPC big-endian and 680x0 systems */
@@ -743,8 +735,12 @@
 #  define PNG_iCCP_SUPPORTED
 #endif
 #ifndef PNG_NO_READ_iTXt
-#  define PNG_READ_iTXt_SUPPORTED
-#  define PNG_iTXt_SUPPORTED
+#  ifndef PNG_READ_iTXt_SUPPORTED
+#    define PNG_READ_iTXt_SUPPORTED
+#  endif
+#  ifndef PNG_iTXt_SUPPORTED
+#    define PNG_iTXt_SUPPORTED
+#  endif
 #endif
 #ifndef PNG_NO_READ_oFFs
 #  define PNG_READ_oFFs_SUPPORTED
@@ -859,7 +855,9 @@
 #  endif
 #endif
 #ifndef PNG_NO_WRITE_iTXt
-#  define PNG_WRITE_iTXt_SUPPORTED
+#  ifndef PNG_WRITE_iTXt_SUPPORTED
+#    define PNG_WRITE_iTXt_SUPPORTED
+#  endif
 #  ifndef PNG_iTXt_SUPPORTED
 #    define PNG_iTXt_SUPPORTED
 #  endif
diff --git a/pngerror.c b/pngerror.c
index 1e6602c..16837f7 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -1,9 +1,9 @@
 
 /* pngerror.c - stub functions for i/o and memory allocation
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -277,7 +277,7 @@
 
 
 #ifdef PNG_ERROR_NUMBERS_SUPPORTED
-void
+void PNGAPI
 png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
 {
    if(png_ptr != NULL)
@@ -287,4 +287,3 @@
    }
 }
 #endif
-
diff --git a/pnggccrd.c b/pnggccrd.c
index 557a943..b0e2312 100644
--- a/pnggccrd.c
+++ b/pnggccrd.c
@@ -6,9 +6,9 @@
  *     and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
  *     for Intel's performance analysis of the MMX vs. non-MMX code.
  *
- * libpng version 1.0.12beta1 - May 14, 2001
+ * libpng version 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * Copyright (c) 1998, Intel Corporation
  *
  * Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998.
@@ -203,9 +203,14 @@
  *     - "_ShiftRem.use = 40;"      should have been   "_ShiftRem.use = 48;"
  *     - "psllq _ShiftRem, %%mm2"   should have been   "psrlq _ShiftRem, %%mm2"
  *
+ * 20010101:
+ *  - added new png_init_mmx_flags() function (here only because it needs to
+ *     call mmxsupport(), which should probably become global png_mmxsupport());
+ *     modified other MMX routines to run conditionally (png_ptr->asm_flags)
+ *
  * 20010103:
  *  - renamed mmxsupport() to png_mmx_support(), with auto-set of mmx_supported,
- *     and made it public
+ *     and made it public; moved png_init_mmx_flags() to png.c as internal func
  *
  * 20010104:
  *  - removed dependency on png_read_filter_row_c() (C code already duplicated
@@ -215,6 +220,9 @@
  * 20010310:
  *  - fixed buffer-overrun bug in png_combine_row() C code (non-MMX)
  *
+ * 20020304:
+ *  - eliminated incorrect use of width_mmx in pixel_bytes == 8 case
+ *
  * STILL TO DO:
  *     - test png_do_read_interlace() 64-bit case (pixel_bytes == 8)
  *     - write MMX code for 48-bit case (pixel_bytes == 6)
@@ -226,15 +234,9 @@
  *     x pick one version of mmxsupport() and get rid of the other
  *     - add error messages to any remaining bogus default cases
  *     - enable pixel_depth == 8 cases in png_read_filter_row()? (test speed)
- *     - add support for runtime enable/disable/query of various MMX routines
+ *     x add support for runtime enable/disable/query of various MMX routines
  */
 
-/*
-#ifndef PNG_DEBUG
-#  define PNG_DEBUG 0
-#endif
-*/
-
 #define PNG_INTERNAL
 #include "png.h"
 
@@ -253,7 +255,6 @@
  * so define them without: */
 #if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__)
 #  define _mmx_supported  mmx_supported
-#  define _unmask         unmask
 #  define _const4         const4
 #  define _const6         const6
 #  define _mask8_0        mask8_0
@@ -272,9 +273,6 @@
 #  define _mask48_2       mask48_2
 #  define _mask48_1       mask48_1
 #  define _mask48_0       mask48_0
-#  define _FullLength     FullLength
-#  define _MMXLength      MMXLength
-#  define _dif            dif
 #  define _LBCarryMask    LBCarryMask
 #  define _HBClearMask    HBClearMask
 #  define _ActiveMask     ActiveMask
@@ -282,10 +280,16 @@
 #  define _ActiveMaskEnd  ActiveMaskEnd
 #  define _ShiftBpp       ShiftBpp
 #  define _ShiftRem       ShiftRem
+#ifdef PNG_THREAD_UNSAFE_OK
+#  define _unmask         unmask
+#  define _FullLength     FullLength
+#  define _MMXLength      MMXLength
+#  define _dif            dif
 #  define _patemp         patemp
 #  define _pbtemp         pbtemp
 #  define _pctemp         pctemp
 #endif
+#endif
 
 
 /* These constants are used in the inlined MMX assembly code.
@@ -297,7 +301,9 @@
  *  "more than 10 operands in `asm'" errors when %ebx is used to preload unmask
  *  in the non-PIC case, so we'll just use the global unconditionally now.
  */
+#ifdef PNG_THREAD_UNSAFE_OK
 static int _unmask;
+#endif
 
 static unsigned long long _mask8_0  = 0x0102040810204080LL;
 
@@ -326,15 +332,49 @@
 
 // These are used in the row-filter routines and should/would be local
 //  variables if not for gcc addressing limitations.
+// WARNING: Their presence probably defeats the thread safety of libpng.
 
+#ifdef PNG_THREAD_UNSAFE_OK
 static png_uint_32  _FullLength;
 static png_uint_32  _MMXLength;
 static int          _dif;
 static int          _patemp;	// temp variables for Paeth routine
 static int          _pbtemp;
 static int          _pctemp;
+#endif
+
+void /* PRIVATE */
+png_squelch_warnings(void)
+{
+#ifdef PNG_THREAD_UNSAFE_OK
+   _dif = _dif;
+   _patemp = _patemp;
+   _pbtemp = _pbtemp;
+   _pctemp = _pctemp;
+   _MMXLength = _MMXLength;
+#endif
+   _const4  = _const4;
+   _const6  = _const6;
+   _mask8_0  = _mask8_0;
+   _mask16_1 = _mask16_1;
+   _mask16_0 = _mask16_0;
+   _mask24_2 = _mask24_2;
+   _mask24_1 = _mask24_1;
+   _mask24_0 = _mask24_0;
+   _mask32_3 = _mask32_3;
+   _mask32_2 = _mask32_2;
+   _mask32_1 = _mask32_1;
+   _mask32_0 = _mask32_0;
+   _mask48_5 = _mask48_5;
+   _mask48_4 = _mask48_4;
+   _mask48_3 = _mask48_3;
+   _mask48_2 = _mask48_2;
+   _mask48_1 = _mask48_1;
+   _mask48_0 = _mask48_0;
+}
 #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
 
+
 static int _mmx_supported = 2;
 
 /*===========================================================================*/
@@ -370,9 +410,13 @@
 {
    png_debug(1, "in png_combine_row (pnggccrd.c)\n");
 
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
    if (_mmx_supported == 2) {
+       /* this should have happened in png_init_mmx_flags() already */
+       png_warning(png_ptr, "asm_flags may not have been initialized");
        png_mmx_support();
    }
+#endif
 
    if (mask == 0xff)
    {
@@ -555,8 +599,13 @@
             png_bytep srcptr;
             png_bytep dstptr;
 
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-            if ( _mmx_supported  )
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && _mmx_supported */ )
+#else
+            if (_mmx_supported)
+#endif
             {
                png_uint_32 len;
                int diff;
@@ -688,8 +737,13 @@
             png_bytep srcptr;
             png_bytep dstptr;
 
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-            if ( _mmx_supported )
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && _mmx_supported */ )
+#else
+            if (_mmx_supported)
+#endif
             {
                png_uint_32 len;
                int diff;
@@ -836,8 +890,13 @@
             png_bytep srcptr;
             png_bytep dstptr;
 
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-            if ( _mmx_supported )
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && _mmx_supported */ )
+#else
+            if (_mmx_supported)
+#endif
             {
                png_uint_32 len;
                int diff;
@@ -999,8 +1058,13 @@
             png_bytep srcptr;
             png_bytep dstptr;
 
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-            if ( _mmx_supported )
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && _mmx_supported */ )
+#else
+            if (_mmx_supported)
+#endif
             {
                png_uint_32 len;
                int diff;
@@ -1169,8 +1233,13 @@
             png_bytep srcptr;
             png_bytep dstptr;
 
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-            if ( _mmx_supported )
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && _mmx_supported */ )
+#else
+            if (_mmx_supported)
+#endif
             {
                png_uint_32 len;
                int diff;
@@ -1394,10 +1463,7 @@
          default: /* png_ptr->row_info.pixel_depth != 1,2,4,8,16,24,32,48,64 */
          {
             /* this should never happen */
-            fprintf(stderr,
-              "libpng internal error:  png_ptr->row_info.pixel_depth = %d\n",
-              png_ptr->row_info.pixel_depth);
-            fflush(stderr);
+            png_warning(png_ptr, "Invalid row_info.pixel_depth in pnggccrd");
             break;
          }
       } /* end switch (png_ptr->row_info.pixel_depth) */
@@ -1436,9 +1502,13 @@
 
    png_debug(1, "in png_do_read_interlace (pnggccrd.c)\n");
 
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
    if (_mmx_supported == 2) {
+       /* this should have happened in png_init_mmx_flags() already */
+       png_warning(png_ptr, "asm_flags may not have been initialized");
        png_mmx_support();
    }
+#endif
 
    if (row != NULL && row_info != NULL)
    {
@@ -1644,7 +1714,12 @@
             /* New code by Nirav Chhatrapati - Intel Corporation */
 
 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-            if ( _mmx_supported )
+#if !defined(PNG_1_0_X)
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)
+                /* && _mmx_supported */ )
+#else
+            if (_mmx_supported)
+#endif
             {
                //--------------------------------------------------------------
                if (pixel_bytes == 3)
@@ -2416,9 +2491,8 @@
                   {
                      // source is 8-byte RRGGBBAA
                      // dest is 32-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;
-                     if (width_mmx)
+                     // (recall that expansion is _in place_:  sptr and dp
+                     //  both point at locations within same row buffer)
                      {
                         int dummy_value_c;  // fix 'forbidden register spilled'
                         int dummy_value_S;
@@ -2457,9 +2531,6 @@
                   {
                      // source is 8-byte RRGGBBAA
                      // dest is 16-byte RRGGBBAA RRGGBBAA
-                     int width_mmx = ((width >> 1) << 1) ;
-                     width -= width_mmx;
-                     if (width_mmx)
                      {
                         int dummy_value_c;  // fix 'forbidden register spilled'
                         int dummy_value_S;
@@ -2589,12 +2660,12 @@
                      for (j = 0; j < png_pass_inc[pass]; j++)
                      {
 #ifdef PNG_DEBUG
-               if (dp < row || dp+3 > row+png_ptr->row_buf_size)
-                 {
-                  printf("dp out of bounds: row=%d, dp=%d, rp=%d\n",row, dp,
-                    row+png_ptr->row_buf_size);
-                  printf("row_buf=%d\n",png_ptr->row_buf_size);
-                 }
+                        if (dp < row || dp+3 > row+png_ptr->row_buf_size)
+                        {
+                           printf("dp out of bounds: row=%d, dp=%d, rp=%d\n",
+                             row, dp, row+png_ptr->row_buf_size);
+                           printf("row_buf=%d\n",png_ptr->row_buf_size);
+                        }
 #endif
                         png_memcpy(dp, v, 4);
                         dp -= 4;
@@ -2665,7 +2736,7 @@
 
 
 
-
+#if defined(PNG_HAVE_ASSEMBLER_READ_FILTER_ROW)
 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
 
 // These variables are utilized in the functions below.  They are declared
@@ -2678,8 +2749,7 @@
   _HBClearMask = {0x7f7f7f7f7f7f7f7fLL},
   _ActiveMask, _ActiveMask2, _ActiveMaskEnd, _ShiftBpp, _ShiftRem;
 
-
-
+#ifdef PNG_THREAD_UNSAFE_OK
 //===========================================================================//
 //                                                                           //
 //           P N G _ R E A D _ F I L T E R _ R O W _ M M X _ A V G           //
@@ -2802,53 +2872,76 @@
          "avg_3lp:                        \n\t"
             "movq (%%edi,%%ecx,), %%mm0   \n\t" // load mm0 with Avg(x)
             "movq %%mm5, %%mm3            \n\t"
-            "psrlq _ShiftRem, %%mm2       \n\t" // correct position Raw(x-bpp) data
+            "psrlq _ShiftRem, %%mm2       \n\t" // correct position Raw(x-bpp)
+                                                // data
             "movq (%%esi,%%ecx,), %%mm1   \n\t" // load mm1 with Prior(x)
             "movq %%mm7, %%mm6            \n\t"
             "pand %%mm1, %%mm3            \n\t" // get lsb for each prev_row byte
             "psrlq $1, %%mm1              \n\t" // divide prev_row bytes by 2
-            "pand  %%mm4, %%mm1           \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm0           \n\t" // add (Prev_row/2) to Avg for each byte
+            "pand  %%mm4, %%mm1           \n\t" // clear invalid bit 7 of each
+                                                // byte
+            "paddb %%mm1, %%mm0           \n\t" // add (Prev_row/2) to Avg for
+                                                // each byte
             // add 1st active group (Raw(x-bpp)/2) to average with LBCarry
-            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte where both
+            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting
+                                                // LBCarrys
+            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte
+                                                // where both
                                // lsb's were == 1 (only valid for active group)
             "psrlq $1, %%mm2              \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 1 bytes to add to Avg
-            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to Avg for each Active
+            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each
+                                                // byte
+            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                                // for each byte
+            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 1
+                                                // bytes to add to Avg
+            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to
+                                                // Avg for each Active
                                //  byte
             // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6       \n\t" // shift the mm6 mask to cover bytes 3-5
+            "psllq _ShiftBpp, %%mm6       \n\t" // shift the mm6 mask to cover
+                                                // bytes 3-5
             "movq %%mm0, %%mm2            \n\t" // mov updated Raws to mm2
             "psllq _ShiftBpp, %%mm2       \n\t" // shift data to pos. correctly
-            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte where both
+            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting
+                                                // LBCarrys
+            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte
+                                                // where both
                                // lsb's were == 1 (only valid for active group)
             "psrlq $1, %%mm2              \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 2 bytes to add to Avg
-            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to Avg for each Active
+            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each
+                                                // byte
+            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                                // for each byte
+            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 2
+                                                // bytes to add to Avg
+            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to
+                                                // Avg for each Active
                                //  byte
 
             // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6       \n\t" // shift mm6 mask to cover last two
+            "psllq _ShiftBpp, %%mm6       \n\t" // shift mm6 mask to cover last
+                                                // two
                                  // bytes
             "movq %%mm0, %%mm2            \n\t" // mov updated Raws to mm2
             "psllq _ShiftBpp, %%mm2       \n\t" // shift data to pos. correctly
                               // Data only needs to be shifted once here to
                               // get the correct x-bpp offset.
-            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte where both
+            "movq %%mm3, %%mm1            \n\t" // now use mm1 for getting
+                                                // LBCarrys
+            "pand %%mm2, %%mm1            \n\t" // get LBCarrys for each byte
+                                                // where both
                               // lsb's were == 1 (only valid for active group)
             "psrlq $1, %%mm2              \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 2 bytes to add to Avg
+            "pand  %%mm4, %%mm2           \n\t" // clear invalid bit 7 of each
+                                                // byte
+            "paddb %%mm1, %%mm2           \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                                // for each byte
+            "pand %%mm6, %%mm2            \n\t" // leave only Active Group 2
+                                                // bytes to add to Avg
             "addl $8, %%ecx               \n\t"
-            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to Avg for each Active
+            "paddb %%mm2, %%mm0           \n\t" // add (Raw/2) + LBCarrys to
+                                                // Avg for each Active
                                                 // byte
             // now ready to write back to memory
             "movq %%mm0, -8(%%edi,%%ecx,) \n\t"
@@ -2886,7 +2979,8 @@
             "movq _HBClearMask, %%mm4    \n\t"
 
             // re-init address pointers and offset
-            "movl _dif, %%ecx            \n\t" // ecx:  x = offset to alignment boundary
+            "movl _dif, %%ecx            \n\t" // ecx:  x = offset to
+                                               // alignment boundary
 
             // load _ActiveMask and clear all bytes except for 1st active group
             "movq _ActiveMask, %%mm7     \n\t"
@@ -2895,7 +2989,8 @@
 // preload  "movl prev_row, %%esi        \n\t" // esi:  Prior(x)
             "movq %%mm7, %%mm6           \n\t"
             "movq _LBCarryMask, %%mm5    \n\t"
-            "psllq _ShiftBpp, %%mm6      \n\t" // create mask for 2nd active group
+            "psllq _ShiftBpp, %%mm6      \n\t" // create mask for 2nd active
+                                               // group
 
             // prime the pump:  load the first Raw(x-bpp) data set
             "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes
@@ -2908,30 +3003,44 @@
             "movq %%mm5, %%mm3           \n\t"
             "pand %%mm1, %%mm3           \n\t" // get lsb for each prev_row byte
             "psrlq $1, %%mm1             \n\t" // divide prev_row bytes by 2
-            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for each byte
+            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for
+                                               // each byte
             // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte where both
+            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
+                                               // LBCarrys
+            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
+                                               // where both
                               // lsb's were == 1 (only valid for active group)
             "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm7, %%mm2           \n\t" // leave only Active Group 1 bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg for each Active
+            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                               // for each byte
+            "pand %%mm7, %%mm2           \n\t" // leave only Active Group 1
+                                               // bytes to add to Avg
+            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg
+                                               // for each Active
                               // byte
             // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry
             "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
             "psllq _ShiftBpp, %%mm2      \n\t" // shift data to pos. correctly
             "addl $8, %%ecx              \n\t"
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte where both
+            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
+                                               // LBCarrys
+            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
+                                               // where both
                               // lsb's were == 1 (only valid for active group)
             "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2 bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg for each Active
+            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                               // for each byte
+            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2
+                                               // bytes to add to Avg
+            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to
+                                               // Avg for each Active
                               // byte
             "cmpl _MMXLength, %%ecx      \n\t"
             // now ready to write back to memory
@@ -2965,7 +3074,8 @@
             // load _ActiveMask
             "movq _ActiveMask, %%mm7     \n\t"
             // re-init address pointers and offset
-            "movl _dif, %%ecx            \n\t" // ecx:  x = offset to alignment boundary
+            "movl _dif, %%ecx            \n\t" // ecx:  x = offset to alignment
+                                               // boundary
             "movq _LBCarryMask, %%mm5    \n\t"
 // preload  "movl row, %%edi             \n\t" // edi:  Avg(x)
             "movq _HBClearMask, %%mm4    \n\t"
@@ -2982,59 +3092,91 @@
             "movq %%mm5, %%mm3           \n\t"
             "pand %%mm1, %%mm3           \n\t" // get lsb for each prev_row byte
             "psrlq $1, %%mm1             \n\t" // divide prev_row bytes by 2
-            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each byte
+            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each
+                                               // byte
             "movq %%mm7, %%mm6           \n\t"
-            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for each byte
+            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for
+                                               // each byte
 
             // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte where both
-                                               // lsb's were == 1 (only valid for active group)
+            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
+                                               // LBCarrys
+            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
+                                               // where both
+                                               // lsb's were == 1 (only valid
+                                               // for active group)
             "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 1 bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg for each Active byte
+            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                               // for each byte
+            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 1
+                                               // bytes to add to Avg
+            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg
+                                               // for each Active byte
 
             // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover bytes 2 & 3
+            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover
+                                               // bytes 2 & 3
             "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
             "psllq _ShiftBpp, %%mm2      \n\t" // shift data to pos. correctly
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte where both
-                                               // lsb's were == 1 (only valid for active group)
+            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
+                                               // LBCarrys
+            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
+                                               // where both
+                                               // lsb's were == 1 (only valid
+                                               // for active group)
             "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2 bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg for each Active byte
+            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                               // for each byte
+            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2
+                                               // bytes to add to Avg
+            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to
+                                               // Avg for each Active byte
 
             // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover bytes 4 & 5
+            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover
+                                               // bytes 4 & 5
             "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
             "psllq _ShiftBpp, %%mm2      \n\t" // shift data to pos. correctly
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte where both
-                                               // lsb's were == 1 (only valid for active group)
+            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
+                                               // LBCarrys
+            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
+                                               // where both lsb's were == 1
+                                               // (only valid for active group)
             "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2 bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg for each Active byte
+            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                               // for each byte
+            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2
+                                               // bytes to add to Avg
+            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to
+                                               // Avg for each Active byte
 
             // add 4th active group (Raw(x-bpp)/2) to average with _LBCarry
-            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover bytes 6 & 7
+            "psllq _ShiftBpp, %%mm6      \n\t" // shift the mm6 mask to cover
+                                               // bytes 6 & 7
             "movq %%mm0, %%mm2           \n\t" // mov updated Raws to mm2
             "psllq _ShiftBpp, %%mm2      \n\t" // shift data to pos. correctly
             "addl $8, %%ecx              \n\t"
-            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting LBCarrys
-            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte where both
-                                               // lsb's were == 1 (only valid for active group)
+            "movq %%mm3, %%mm1           \n\t" // now use mm1 for getting
+                                               // LBCarrys
+            "pand %%mm2, %%mm1           \n\t" // get LBCarrys for each byte
+                                               // where both
+                                               // lsb's were == 1 (only valid
+                                               // for active group)
             "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2) for each byte
-            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2 bytes to add to Avg
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to Avg for each Active byte
+            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm1, %%mm2          \n\t" // add LBCarrys to (Raw(x-bpp)/2)
+                                               // for each byte
+            "pand %%mm6, %%mm2           \n\t" // leave only Active Group 2
+                                               // bytes to add to Avg
+            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) + LBCarrys to
+                                               // Avg for each Active byte
 
             "cmpl _MMXLength, %%ecx      \n\t"
             // now ready to write back to memory
@@ -3065,7 +3207,8 @@
 #ifdef __PIC__
             "pushl %%ebx                 \n\t" // save Global Offset Table index
 #endif
-            "movl _dif, %%ebx            \n\t" // ebx:  x = offset to alignment boundary
+            "movl _dif, %%ebx            \n\t" // ebx:  x = offset to alignment
+                                               // boundary
 // preload  "movl row, %%edi             \n\t" // edi:  Avg(x)
             "cmpl _FullLength, %%ebx     \n\t" // test if offset at end of array
             "jnb avg_1end                \n\t"
@@ -3084,7 +3227,8 @@
             "addw %%cx, %%ax             \n\t"
             "incl %%ebx                  \n\t"
             "shrw %%ax                   \n\t" // divide by 2
-            "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset inc ebx
+            "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset
+                                               // inc ebx
             "cmpl _FullLength, %%ebx     \n\t" // check if at end of array
             "movb %%al, -1(%%edi,%%ebx,) \n\t" // write back Raw(x);
                          // mov does not affect flags; -1 to offset inc ebx
@@ -3163,15 +3307,18 @@
       default:                  // bpp greater than 8 (!= 1,2,3,4,[5],6,[7],8)
       {
 
+#ifdef PNG_DEBUG
          // GRR:  PRINT ERROR HERE:  SHOULD NEVER BE REACHED
-         fprintf(stderr,
-           "libpng:  internal logic error (png_read_filter_row_mmx_avg())\n");
+        png_debug(1,
+        "Internal logic error in pnggccrd (png_read_filter_row_mmx_avg())\n");
+#endif
 
 #if 0
         __asm__ __volatile__ (
             "movq _LBCarryMask, %%mm5    \n\t"
             // re-init address pointers and offset
-            "movl _dif, %%ebx            \n\t" // ebx:  x = offset to alignment boundary
+            "movl _dif, %%ebx            \n\t" // ebx:  x = offset to
+                                               // alignment boundary
             "movl row, %%edi             \n\t" // edi:  Avg(x)
             "movq _HBClearMask, %%mm4    \n\t"
             "movl %%edi, %%edx           \n\t"
@@ -3184,15 +3331,20 @@
             "pand %%mm1, %%mm3           \n\t" // get lsb for each prev_row byte
             "movq (%%edx,%%ebx,), %%mm2  \n\t"
             "psrlq $1, %%mm1             \n\t" // divide prev_row bytes by 2
-            "pand %%mm2, %%mm3           \n\t" // get LBCarrys for each byte where both
-                                // lsb's were == 1
+            "pand %%mm2, %%mm3           \n\t" // get LBCarrys for each byte
+                                               // where both lsb's were == 1
             "psrlq $1, %%mm2             \n\t" // divide raw bytes by 2
-            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm3, %%mm0          \n\t" // add LBCarrys to Avg for each byte
-            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each byte
-            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for each byte
+            "pand  %%mm4, %%mm1          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm3, %%mm0          \n\t" // add LBCarrys to Avg for each
+                                               // byte
+            "pand  %%mm4, %%mm2          \n\t" // clear invalid bit 7 of each
+                                               // byte
+            "paddb %%mm1, %%mm0          \n\t" // add (Prev_row/2) to Avg for
+                                               // each byte
             "addl $8, %%ebx              \n\t"
-            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) to Avg for each byte
+            "paddb %%mm2, %%mm0          \n\t" // add (Raw/2) to Avg for each
+                                               // byte
             "cmpl _MMXLength, %%ebx      \n\t"
             "movq %%mm0, -8(%%edi,%%ebx,) \n\t"
             "jb avg_Alp                  \n\t"
@@ -3261,10 +3413,11 @@
    );
 
 } /* end png_read_filter_row_mmx_avg() */
+#endif
 
 
 
-
+#ifdef PNG_THREAD_UNSAFE_OK
 //===========================================================================//
 //                                                                           //
 //         P N G _ R E A D _ F I L T E R _ R O W _ M M X _ P A E T H         //
@@ -3310,9 +3463,11 @@
       "movl %%edi, _dif            \n\t" // take start of row
       "addl %%ebx, _dif            \n\t" // add bpp
       "xorl %%ecx, %%ecx           \n\t"
-      "addl $0xf, _dif             \n\t" // add 7 + 8 to incr past alignment boundary
+      "addl $0xf, _dif             \n\t" // add 7 + 8 to incr past alignment
+                                         // boundary
       "andl $0xfffffff8, _dif      \n\t" // mask to alignment boundary
-      "subl %%edi, _dif            \n\t" // subtract from start ==> value ebx at alignment
+      "subl %%edi, _dif            \n\t" // subtract from start ==> value ebx
+                                         // at alignment
       "jz paeth_go                 \n\t"
       // fix alignment
 
@@ -3430,12 +3585,14 @@
             // prime the pump:  load the first Raw(x-bpp) data set
             "movq -8(%%edi,%%ecx,), %%mm1 \n\t"
          "paeth_3lp:                     \n\t"
-            "psrlq _ShiftRem, %%mm1      \n\t" // shift last 3 bytes to 1st 3 bytes
+            "psrlq _ShiftRem, %%mm1      \n\t" // shift last 3 bytes to 1st
+                                               // 3 bytes
             "movq (%%esi,%%ecx,), %%mm2  \n\t" // load b=Prior(x)
             "punpcklbw %%mm0, %%mm1      \n\t" // unpack High bytes of a
             "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // prep c=Prior(x-bpp) bytes
             "punpcklbw %%mm0, %%mm2      \n\t" // unpack High bytes of b
-            "psrlq _ShiftRem, %%mm3      \n\t" // shift last 3 bytes to 1st 3 bytes
+            "psrlq _ShiftRem, %%mm3      \n\t" // shift last 3 bytes to 1st
+                                               // 3 bytes
             // pav = p - a = (a + b - c) - a = b - c
             "movq %%mm2, %%mm4           \n\t"
             "punpcklbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
@@ -3490,7 +3647,8 @@
             "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x)
             "punpcklbw %%mm0, %%mm3      \n\t" // unpack High bytes of c
             "movq %%mm7, (%%edi,%%ecx,)  \n\t" // write back updated value
-            "movq %%mm7, %%mm1           \n\t" // now mm1 will be used as Raw(x-bpp)
+            "movq %%mm7, %%mm1           \n\t" // now mm1 will be used as
+                                               // Raw(x-bpp)
             // now do Paeth for 2nd set of bytes (3-5)
             "psrlq _ShiftBpp, %%mm2      \n\t" // load b=Prior(x) step 2
             "punpcklbw %%mm0, %%mm1      \n\t" // unpack High bytes of a
@@ -3547,7 +3705,8 @@
             "movq %%mm2, %%mm3           \n\t" // load c=Prior(x-bpp) step 1
             "pand _ActiveMask, %%mm7     \n\t"
             "punpckhbw %%mm0, %%mm2      \n\t" // unpack High bytes of b
-            "psllq _ShiftBpp, %%mm7      \n\t" // shift bytes to 2nd group of 3 bytes
+            "psllq _ShiftBpp, %%mm7      \n\t" // shift bytes to 2nd group of
+                                               // 3 bytes
              // pav = p - a = (a + b - c) - a = b - c
             "movq %%mm2, %%mm4           \n\t"
             "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x)
@@ -3607,7 +3766,8 @@
             // step ecx to next set of 8 bytes and repeat loop til done
             "addl $8, %%ecx              \n\t"
             "pand _ActiveMaskEnd, %%mm1  \n\t"
-            "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with Raw(x)
+            "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with
+                                                 // Raw(x)
 
             "cmpl _MMXLength, %%ecx      \n\t"
             "pxor %%mm0, %%mm0           \n\t" // pxor does not affect flags
@@ -4307,10 +4467,12 @@
    );
 
 } /* end png_read_filter_row_mmx_paeth() */
+#endif
 
 
 
 
+#ifdef PNG_THREAD_UNSAFE_OK
 //===========================================================================//
 //                                                                           //
 //           P N G _ R E A D _ F I L T E R _ R O W _ M M X _ S U B           //
@@ -4729,6 +4891,7 @@
    );
 
 } // end of png_read_filter_row_mmx_sub()
+#endif
 
 
 
@@ -4755,6 +4918,9 @@
    __asm__ __volatile__ (
 //pre "movl row, %%edi              \n\t"
       // get # of bytes to alignment
+#ifdef __PIC__
+      "pushl %%ebx                  \n\t"
+#endif
       "movl %%edi, %%ecx            \n\t"
       "xorl %%ebx, %%ebx            \n\t"
       "addl $0x7, %%ecx             \n\t"
@@ -4854,6 +5020,9 @@
 
    "up_end:                         \n\t"
       "EMMS                         \n\t" // conversion of filtered row complete
+#ifdef __PIC__
+      "popl %%ebx                   \n\t"
+#endif
 
       : "=d" (dummy_value_d),   // 0      // output regs (dummy)
         "=S" (dummy_value_S),   // 1
@@ -4884,7 +5053,6 @@
 /*                                                                           */
 /*===========================================================================*/
 
-#if defined(PNG_HAVE_ASSEMBLER_READ_FILTER_ROW)
 
 /* Optimized png_read_filter_row routines */
 
@@ -4904,6 +5072,8 @@
 #define UseMMX_paeth  1   // GRR:  converted 20000828
 
    if (_mmx_supported == 2) {
+       /* this should have happened in png_init_mmx_flags() already */
+       png_warning(png_ptr, "asm_flags may not have been initialized");
        png_mmx_support();
    }
 #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
@@ -4914,13 +5084,37 @@
    {
       case 0: sprintf(filnm, "none");
          break;
-      case 1: sprintf(filnm, "sub-%s", "MMX");
+      case 1: sprintf(filnm, "sub-%s",
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : 
+#endif
+#endif
+"x86");
          break;
-      case 2: sprintf(filnm, "up-%s", "MMX");
+      case 2: sprintf(filnm, "up-%s",
+#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
+#if !defined(PNG_1_0_X)
+        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" :
+#endif
+#endif
+ "x86");
          break;
-      case 3: sprintf(filnm, "avg-%s", "MMX");
+      case 3: sprintf(filnm, "avg-%s",
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" :
+#endif
+#endif
+ "x86");
          break;
-      case 4: sprintf(filnm, "Paeth-%s", "MMX");
+      case 4: sprintf(filnm, "Paeth-%s",
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":
+#endif
+#endif
+"x86");
          break;
       default: sprintf(filnm, "unknw");
          break;
@@ -4938,10 +5132,14 @@
          break;
 
       case PNG_FILTER_VALUE_SUB:
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-         if ( _mmx_supported &&
-             (row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
-             (row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) &&
+#else
+         if (
+#endif
+             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
+             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
          {
             png_read_filter_row_mmx_sub(row_info, row);
          }
@@ -4964,9 +5162,13 @@
 
       case PNG_FILTER_VALUE_UP:
 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-         if ( _mmx_supported &&
-             (row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
-             (row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
+#if !defined(PNG_1_0_X)
+         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) &&
+#else
+         if (
+#endif
+             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
+             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
          {
             png_read_filter_row_mmx_up(row_info, row, prev_row);
          }
@@ -4987,10 +5189,14 @@
          break;
 
       case PNG_FILTER_VALUE_AVG:
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-         if ( _mmx_supported &&
-             (row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
-             (row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) &&
+#else
+         if (
+#endif
+             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
+             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
          {
             png_read_filter_row_mmx_avg(row_info, row, prev_row);
          }
@@ -5021,10 +5227,14 @@
          break;
 
       case PNG_FILTER_VALUE_PAETH:
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-         if ( _mmx_supported &&
-             (row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
-             (row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
+#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) &&
+#else
+         if (
+#endif
+             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
+             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
          {
             png_read_filter_row_mmx_paeth(row_info, row, prev_row);
          }
@@ -5130,6 +5340,8 @@
         "popfl                \n\t"  // restore modified value to Eflag reg
         "pushfl               \n\t"  // save Eflag to stack
         "popl %%eax           \n\t"  // get Eflag from stack
+        "pushl %%ecx          \n\t"  // save original Eflag to stack
+        "popfl                \n\t"  // restore original Eflag
         "xorl %%ecx, %%eax    \n\t"  // compare new Eflag with original Eflag
         "jz .NOT_SUPPORTED    \n\t"  // if same, CPUID instr. is not supported
 
@@ -5177,4 +5389,5 @@
     return _mmx_supported;
 }
 
+
 #endif /* PNG_USE_PNGGCCRD */
diff --git a/pngget.c b/pngget.c
index c5a6444..0b75c35 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,9 +1,9 @@
 
 /* pngget.c - retrieval of values from info struct
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  */
@@ -547,7 +547,11 @@
       *width = info_ptr->width;
       *height = info_ptr->height;
       *bit_depth = info_ptr->bit_depth;
+      if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16)
+        png_error(png_ptr, "Invalid bit depth");
       *color_type = info_ptr->color_type;
+      if (info_ptr->color_type > 6)
+        png_error(png_ptr, "Invalid color type");
       if (compression_type != NULL)
          *compression_type = info_ptr->compression_type;
       if (filter_type != NULL)
@@ -556,9 +560,7 @@
          *interlace_type = info_ptr->interlace_type;
 
       /* check for potential overflow of rowbytes */
-      if (*color_type == PNG_COLOR_TYPE_PALETTE)
-         channels = 1;
-      else if (*color_type & PNG_COLOR_MASK_COLOR)
+      if (*color_type & PNG_COLOR_MASK_COLOR)
          channels = 3;
       else
          channels = 1;
@@ -566,6 +568,10 @@
          channels++;
       pixel_depth = *bit_depth * channels;
       rowbytes_per_pixel = (pixel_depth + 7) >> 3;
+      if (width == 0 || *width > PNG_MAX_UINT)
+        png_error(png_ptr, "Invalid image width");
+      if (height == 0 || *height > PNG_MAX_UINT)
+        png_error(png_ptr, "Invalid image height");
       if ((*width > PNG_MAX_UINT/rowbytes_per_pixel))
       {
          png_warning(png_ptr,
@@ -827,6 +833,7 @@
 }
 
 
+#ifndef PNG_1_0_X
 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED
 /* this function was added to libpng 1.2.0 and should exist by default*/
 png_uint_32 PNGAPI
@@ -915,3 +922,4 @@
     return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L);
 }
 #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
+#endif /* PNG_1_0_X */
diff --git a/pngmem.c b/pngmem.c
index 3d086ba..6e46c0c 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,9 +1,9 @@
 
 /* pngmem.c - stub functions for memory allocation
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -27,7 +27,7 @@
 png_create_struct(int type)
 {
 #ifdef PNG_USER_MEM_SUPPORTED
-   return (png_create_struct_2(type, NULL, NULL));
+   return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
 }
 
 /* Alternate version of png_create_struct, for use with user-defined malloc. */
@@ -43,39 +43,30 @@
    else if (type == PNG_STRUCT_PNG)
      size = sizeof(png_struct);
    else
-     return ((png_voidp)NULL);
+     return (png_get_copyright());
 
 #ifdef PNG_USER_MEM_SUPPORTED
    if(malloc_fn != NULL)
    {
-      if (mem_ptr != NULL)
-      {
-         png_struct dummy_struct;
-         png_structp png_ptr = &dummy_struct;
-         png_ptr->mem_ptr=mem_ptr;
-         struct_ptr = (*(malloc_fn))(png_ptr, size);
-      }
-      else
-         struct_ptr = (*(malloc_fn))(NULL, size);
-      if (struct_ptr != NULL)
-         png_memset(struct_ptr, 0, size);
-      return (struct_ptr);
+      png_struct dummy_struct;
+      png_structp png_ptr = &dummy_struct;
+      png_ptr->mem_ptr=mem_ptr;
+      struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size);
    }
+   else
 #endif /* PNG_USER_MEM_SUPPORTED */
-   if ((struct_ptr = (png_voidp)farmalloc(size)) != NULL)
-   {
+      struct_ptr = (png_voidp)farmalloc(size));
+   if (struct_ptr != NULL)
       png_memset(struct_ptr, 0, size);
-   }
    return (struct_ptr);
 }
 
-
 /* Free memory allocated by a png_create_struct() call */
 void /* PRIVATE */
 png_destroy_struct(png_voidp struct_ptr)
 {
 #ifdef PNG_USER_MEM_SUPPORTED
-   png_destroy_struct_2(struct_ptr, (png_free_ptr)NULL, (png_voidp)NULL);
+   png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
 }
 
 /* Free memory allocated by a png_create_struct() call */
@@ -126,13 +117,13 @@
    png_voidp ret;
 #endif
    if (png_ptr == NULL || size == 0)
-      return ((png_voidp)NULL);
+      return (NULL);
 
 #ifdef PNG_USER_MEM_SUPPORTED
    if(png_ptr->malloc_fn != NULL)
    {
-       ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, size));
-       if (ret == NULL)
+       ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
+       if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
           png_error(png_ptr, "Out of memory!");
        return (ret);
    }
@@ -186,12 +177,22 @@
 
             if (table == NULL)
             {
-               png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
+               if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
+                  png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
+               else
+                  png_warning(png_ptr, "Out Of Memory.");
+               return (NULL);
             }
 
             if ((png_size_t)table & 0xfff0)
             {
-               png_error(png_ptr, "Farmalloc didn't return normalized pointer");
+               if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
+                  png_error(png_ptr,
+                    "Farmalloc didn't return normalized pointer");
+               else
+                  png_warning(png_ptr,
+                    "Farmalloc didn't return normalized pointer");
+               return (NULL);
             }
 
             png_ptr->offset_table = table;
@@ -200,7 +201,11 @@
 
             if (png_ptr->offset_table_ptr == NULL)
             {
-               png_error(png_ptr, "Out Of memory.");
+               if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
+                  png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */
+               else
+                  png_warning(png_ptr, "Out Of memory.");
+               return (NULL);
             }
 
             hptr = (png_byte huge *)table;
@@ -222,7 +227,13 @@
       }
 
       if (png_ptr->offset_table_count >= png_ptr->offset_table_number)
-         png_error(png_ptr, "Out of Memory.");
+      {
+         if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
+            png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */
+         else
+            png_warning(png_ptr, "Out of Memory.");
+         return (NULL);
+      }
 
       ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++];
    }
@@ -231,7 +242,10 @@
 
    if (ret == NULL)
    {
-      png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
+      if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
+         png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
+      else
+         png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */
    }
 
    return (ret);
@@ -297,7 +311,7 @@
 png_create_struct(int type)
 {
 #ifdef PNG_USER_MEM_SUPPORTED
-   return (png_create_struct_2(type, NULL, NULL));
+   return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
 }
 
 /* Allocate memory for a png_struct or a png_info.  The malloc and
@@ -315,20 +329,15 @@
    else if (type == PNG_STRUCT_PNG)
       size = sizeof(png_struct);
    else
-      return ((png_voidp)NULL);
+      return (NULL);
 
 #ifdef PNG_USER_MEM_SUPPORTED
    if(malloc_fn != NULL)
    {
-      if (mem_ptr != NULL)
-      {
-         png_struct dummy_struct;
-         png_structp png_ptr = &dummy_struct;
-         png_ptr->mem_ptr=mem_ptr;
-         struct_ptr = (*(malloc_fn))(png_ptr, size);
-      }
-      else
-         struct_ptr = (*(malloc_fn))(NULL, size);
+      png_struct dummy_struct;
+      png_structp png_ptr = &dummy_struct;
+      png_ptr->mem_ptr=mem_ptr;
+      struct_ptr = (*(malloc_fn))(png_ptr, size);
       if (struct_ptr != NULL)
          png_memset(struct_ptr, 0, size);
       return (struct_ptr);
@@ -357,7 +366,7 @@
 png_destroy_struct(png_voidp struct_ptr)
 {
 #ifdef PNG_USER_MEM_SUPPORTED
-   png_destroy_struct_2(struct_ptr, (png_free_ptr)NULL, (png_voidp)NULL);
+   png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
 }
 
 /* Free memory allocated by a png_create_struct() call */
@@ -402,20 +411,20 @@
 {
    png_voidp ret;
    if (png_ptr == NULL || size == 0)
-      return ((png_voidp)NULL);
+      return (NULL);
 
 #ifdef PNG_USER_MEM_SUPPORTED
    if(png_ptr->malloc_fn != NULL)
    {
        ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, size));
-       if (ret == NULL)
+       if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
           png_error(png_ptr, "Out of Memory!");
        return (ret);
    }
    else
        return (png_malloc_default(png_ptr, size));
 }
-png_voidp /* PRIVATE */
+png_voidp PNGAPI
 png_malloc_default(png_structp png_ptr, png_uint_32 size)
 {
    png_voidp ret;
@@ -423,7 +432,12 @@
 
 #ifdef PNG_MAX_MALLOC_64K
    if (size > (png_uint_32)65536L)
-      png_error(png_ptr, "Cannot Allocate > 64K");
+   {
+      if(png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
+         png_error(png_ptr, "Cannot Allocate > 64K");
+      else
+         return NULL;
+   }
 #endif
 
 #if defined(__TURBOC__) && !defined(__FLAT__)
@@ -436,7 +450,7 @@
 # endif
 #endif
 
-   if (ret == NULL)
+   if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
       png_error(png_ptr, "Out of Memory");
 
    return (ret);
@@ -458,7 +472,7 @@
    }
    else png_free_default(png_ptr, ptr);
 }
-void /* PRIVATE */
+void PNGAPI
 png_free_default(png_structp png_ptr, png_voidp ptr)
 {
    if (png_ptr == NULL || ptr == NULL)
@@ -479,7 +493,7 @@
 
 #endif /* Not Borland DOS special memory handler */
 
-png_voidp /* PRIVATE */
+png_voidp PNGAPI
 png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,
    png_uint_32 length)
 {
@@ -492,7 +506,7 @@
    return(png_memcpy (s1, s2, size));
 }
 
-png_voidp /* PRIVATE */
+png_voidp PNGAPI
 png_memset_check (png_structp png_ptr, png_voidp s1, int value,
    png_uint_32 length)
 {
diff --git a/pngpread.c b/pngpread.c
index 309fc28..be859da 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1,9 +1,9 @@
 
 /* pngpread.c - read a png file in push mode
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  */
@@ -240,6 +240,12 @@
        * header chunks, and we can start reading the image (or if this
        * is called after the image has been read - we have an error).
        */
+     if (!(png_ptr->mode & PNG_HAVE_IHDR))
+       png_error(png_ptr, "Missing IHDR before IDAT");
+     else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
+	      !(png_ptr->mode & PNG_HAVE_PLTE))
+       png_error(png_ptr, "Missing PLTE before IDAT");
+
       if (png_ptr->mode & PNG_HAVE_IDAT)
       {
          if (png_ptr->push_length == 0)
@@ -792,7 +798,7 @@
             {
                for (i = 0; i < 4 && png_ptr->pass == 2; i++)
                {
-                  png_push_have_row(png_ptr, NULL);
+                  png_push_have_row(png_ptr, png_bytep_NULL);
                   png_read_push_finish_row(png_ptr);
                }
             }
@@ -800,13 +806,13 @@
 	    {
 	        for (i = 0; i < 2 && png_ptr->pass == 4; i++)
                 {
-                   png_push_have_row(png_ptr, NULL);
+                   png_push_have_row(png_ptr, png_bytep_NULL);
                    png_read_push_finish_row(png_ptr);
                 }
             }
             if (png_ptr->pass == 6 && png_ptr->height <= 4)
             {
-                png_push_have_row(png_ptr, NULL);
+                png_push_have_row(png_ptr, png_bytep_NULL);
                 png_read_push_finish_row(png_ptr);
             }
             break;
@@ -823,7 +829,7 @@
             {
                for (i = 0; i < 4 && png_ptr->pass == 2; i++)
                {
-                  png_push_have_row(png_ptr, NULL);
+                  png_push_have_row(png_ptr, png_bytep_NULL);
                   png_read_push_finish_row(png_ptr);
                }
             }
@@ -839,14 +845,14 @@
             }
             for (i = 0; i < 4 && png_ptr->pass == 2; i++)
             {
-               png_push_have_row(png_ptr, NULL);
+               png_push_have_row(png_ptr, png_bytep_NULL);
                png_read_push_finish_row(png_ptr);
             }
             if (png_ptr->pass == 4) /* pass 3 might be empty */
             {
                for (i = 0; i < 2 && png_ptr->pass == 4; i++)
                {
-                  png_push_have_row(png_ptr, NULL);
+                  png_push_have_row(png_ptr, png_bytep_NULL);
                   png_read_push_finish_row(png_ptr);
                }
             }
@@ -864,7 +870,7 @@
             {
                for (i = 0; i < 2 && png_ptr->pass == 4; i++)
                {
-                  png_push_have_row(png_ptr, NULL);
+                  png_push_have_row(png_ptr, png_bytep_NULL);
                   png_read_push_finish_row(png_ptr);
                }
             }
@@ -880,12 +886,12 @@
             }
             for (i = 0; i < 2 && png_ptr->pass == 4; i++)
             {
-               png_push_have_row(png_ptr, NULL);
+               png_push_have_row(png_ptr, png_bytep_NULL);
                png_read_push_finish_row(png_ptr);
             }
             if (png_ptr->pass == 6) /* pass 5 might be empty */
             {
-               png_push_have_row(png_ptr, NULL);
+               png_push_have_row(png_ptr, png_bytep_NULL);
                png_read_push_finish_row(png_ptr);
             }
             break;
@@ -900,7 +906,7 @@
             }
             if (png_ptr->pass == 6) /* skip top generated row */
             {
-               png_push_have_row(png_ptr, NULL);
+               png_push_have_row(png_ptr, png_bytep_NULL);
                png_read_push_finish_row(png_ptr);
             }
             break;
@@ -911,7 +917,7 @@
             png_read_push_finish_row(png_ptr);
             if (png_ptr->pass != 6)
                break;
-            png_push_have_row(png_ptr, NULL);
+            png_push_have_row(png_ptr, png_bytep_NULL);
             png_read_push_finish_row(png_ptr);
          }
       }
@@ -1072,8 +1078,8 @@
       text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
       text_ptr->key = key;
 #ifdef PNG_iTXt_SUPPORTED
-      text_ptr->lang = (char *)NULL;
-      text_ptr->lang_key = (char *)NULL;
+      text_ptr->lang = NULL;
+      text_ptr->lang_key = NULL;
 #endif
       text_ptr->text = text;
 
@@ -1257,8 +1263,8 @@
       text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt;
       text_ptr->key = key;
 #ifdef PNG_iTXt_SUPPORTED
-      text_ptr->lang = (char *)NULL;
-      text_ptr->lang_key = (char *)NULL;
+      text_ptr->lang = NULL;
+      text_ptr->lang_key = NULL;
 #endif
       text_ptr->text = text;
 
@@ -1491,7 +1497,7 @@
    png_ptr->row_fn = row_fn;
    png_ptr->end_fn = end_fn;
 
-   png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer);
+   png_set_read_fn(png_ptr, progressive_ptr, (png_rw_ptr)png_push_fill_buffer);
 }
 
 png_voidp PNGAPI
@@ -1499,6 +1505,4 @@
 {
    return png_ptr->io_ptr;
 }
-
 #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
diff --git a/pngread.c b/pngread.c
index f4567c4..c3954e5 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,9 +1,9 @@
 
 /* pngread.c - read a PNG file
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -22,7 +22,7 @@
 
 #ifdef PNG_USER_MEM_SUPPORTED
    return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn,
-      warn_fn, NULL, NULL, NULL));
+      warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));
 }
 
 /* Alternate create PNG structure for reading, and allocate any memory needed. */
@@ -45,14 +45,19 @@
 
    png_debug(1, "in png_create_read_struct\n");
 #ifdef PNG_USER_MEM_SUPPORTED
-   if ((png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
-      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr)) == NULL)
+   png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
+      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
 #else
-   if ((png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG)) == NULL)
+   png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
 #endif
-   {
-      return (png_structp)NULL;
-   }
+   if (png_ptr == NULL)
+      return (NULL);
+
+#if !defined(PNG_1_0_X)
+#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
+   png_init_mmx_flags(png_ptr);   /* 1.2.0 addition */
+#endif
+#endif /* PNG_1_0_X */
 
 #ifdef PNG_SETJMP_SUPPORTED
 #ifdef USE_FAR_KEYWORD
@@ -63,8 +68,14 @@
    {
       png_free(png_ptr, png_ptr->zbuf);
       png_ptr->zbuf=NULL;
-      png_destroy_struct(png_ptr);
-      return (png_structp)NULL;
+#ifdef PNG_USER_MEM_SUPPORTED
+      png_destroy_struct_2((png_voidp)png_ptr, 
+			   (png_free_ptr)free_fn,
+			   (png_voidp)mem_ptr);
+#else
+      png_destroy_struct((png_voidp)png_ptr);
+#endif
+      return (NULL);
    }
 #ifdef USE_FAR_KEYWORD
    png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf));
@@ -95,23 +106,24 @@
          (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
          (user_png_ver[0] == '0' && user_png_ver[2] < '9'))
      {
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+        char msg[80];
+        if (user_png_ver)
+        {
+          sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
+             user_png_ver);
+          png_warning(png_ptr, msg);
+        }
+        sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
+           png_libpng_ver);
+        png_warning(png_ptr, msg);
+#endif
+#ifdef PNG_ERROR_NUMBERS_SUPPORTED
+        png_ptr->flags=0;
+#endif
         png_error(png_ptr,
            "Incompatible libpng version in application and library");
      }
-
-     /* Libpng 1.0.6 was not binary compatible, due to insertion of the
-        info_ptr->free_me member.  Libpng-1.0.1 and earlier were not
-        compatible due to insertion of the user transform function. Note
-        to maintainer: this test can be removed from version 1.2.0 and
-        beyond because the previous test would have already rejected it. */
-
-     if (user_png_ver[0] == '1' && user_png_ver[2] == '0' &&
-         (user_png_ver[4] <  '2' || user_png_ver[4] == '6') &&
-         user_png_ver[5] == '\0')
-     {
-        png_error(png_ptr,
-        "Application must be recompiled; versions <= 1.0.6 were incompatible");
-     }
    }
 
    /* initialize zbuf - compression buffer */
@@ -134,7 +146,7 @@
    png_ptr->zstream.next_out = png_ptr->zbuf;
    png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
 
-   png_set_read_fn(png_ptr, NULL, NULL);
+   png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL);
 
    return (png_ptr);
 }
@@ -147,7 +159,7 @@
 png_read_init(png_structp png_ptr)
 {
    /* We only come here via pre-1.0.7-compiled applications */
-   png_read_init_2(png_ptr, "1.0.0", 0, 0);
+   png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
 }
 
 #undef png_read_init_2
@@ -156,15 +168,37 @@
    png_size_t png_struct_size, png_size_t png_info_size)
 {
    /* We only come here via pre-1.0.12-compiled applications */
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+   if(sizeof(png_struct) > png_struct_size || sizeof(png_info) > png_info_size)
+   {
+      char msg[80];
+      png_ptr->warning_fn=NULL;
+      if (user_png_ver)
+      {
+        sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
+           user_png_ver);
+        png_warning(png_ptr, msg);
+      }
+      sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
+         png_libpng_ver);
+      png_warning(png_ptr, msg);
+   }
+#endif
    if(sizeof(png_struct) > png_struct_size)
      {
-       png_ptr->error_fn=(png_error_ptr)NULL;
+       png_ptr->error_fn=NULL;
+#ifdef PNG_ERROR_NUMBERS_SUPPORTED
+       png_ptr->flags=0;
+#endif
        png_error(png_ptr,
        "The png struct allocated by the application for reading is too small.");
      }
    if(sizeof(png_info) > png_info_size)
      {
-       png_ptr->error_fn=(png_error_ptr)NULL;
+       png_ptr->error_fn=NULL;
+#ifdef PNG_ERROR_NUMBERS_SUPPORTED
+       png_ptr->flags=0;
+#endif
        png_error(png_ptr,
          "The info struct allocated by application for reading is too small.");
      }
@@ -190,7 +224,7 @@
 #ifdef PNG_LEGACY_SUPPORTED
        png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
 #else
-       png_ptr->warning_fn=(png_error_ptr)NULL;
+       png_ptr->warning_fn=NULL;
        png_warning(png_ptr,
         "Application uses deprecated png_read_init() and should be recompiled.");
        break;
@@ -240,7 +274,7 @@
    png_ptr->zstream.next_out = png_ptr->zbuf;
    png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
 
-   png_set_read_fn(png_ptr, NULL, NULL);
+   png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL);
 }
 
 /* Read the information before the actual image data.  This has been
@@ -348,6 +382,9 @@
       png_debug2(0, "Reading %s chunk, length=%lu.\n", png_ptr->chunk_name,
          length);
 
+      if (length > PNG_MAX_UINT)
+         png_error(png_ptr, "Invalid chunk length.");
+
       /* This should be a binary subdivision search or a hash for
        * matching the chunk name rather than a linear search.
        */
@@ -631,6 +668,9 @@
             png_read_data(png_ptr, chunk_length, 4);
             png_ptr->idat_size = png_get_uint_32(chunk_length);
 
+            if (png_ptr->idat_size > PNG_MAX_UINT)
+              png_error(png_ptr, "Invalid chunk length.");
+
             png_reset_crc(png_ptr);
             png_crc_read(png_ptr, png_ptr->chunk_name, 4);
             if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
@@ -742,7 +782,7 @@
  * not called png_set_interlace_handling(), the display_row buffer will
  * be ignored, so pass NULL to it.
  *
- * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.12beta1
+ * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.13
  */
 
 void PNGAPI
@@ -769,14 +809,14 @@
       for (i = 0; i < num_rows; i++)
       {
          png_bytep rptr = *rp;
-         png_read_row(png_ptr, rptr, NULL);
+         png_read_row(png_ptr, rptr, png_bytep_NULL);
          rp++;
       }
    else if(dp != NULL)
       for (i = 0; i < num_rows; i++)
       {
          png_bytep dptr = *dp;
-         png_read_row(png_ptr, NULL, dptr);
+         png_read_row(png_ptr, png_bytep_NULL, dptr);
          dp++;
       }
 }
@@ -791,7 +831,7 @@
  * only call this function once.  If you desire to have an image for
  * each pass of a interlaced image, use png_read_rows() instead.
  *
- * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.12beta1
+ * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.13
  */
 void PNGAPI
 png_read_image(png_structp png_ptr, png_bytepp image)
@@ -821,7 +861,7 @@
       rp = image;
       for (i = 0; i < image_height; i++)
       {
-         png_read_row(png_ptr, *rp, NULL);
+         png_read_row(png_ptr, *rp, png_bytep_NULL);
          rp++;
       }
    }
@@ -909,6 +949,9 @@
 
       png_debug1(0, "Reading %s chunk.\n", png_ptr->chunk_name);
 
+      if (length > PNG_MAX_UINT)
+         png_error(png_ptr, "Invalid chunk length.");
+
       if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
          png_handle_IHDR(png_ptr, info_ptr, length);
       else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
@@ -1054,7 +1097,7 @@
 #else
       png_destroy_struct((png_voidp)info_ptr);
 #endif
-      *info_ptr_ptr = (png_infop)NULL;
+      *info_ptr_ptr = NULL;
    }
 
    if (end_info_ptr != NULL)
@@ -1068,7 +1111,7 @@
 #else
       png_destroy_struct((png_voidp)end_info_ptr);
 #endif
-      *end_info_ptr_ptr = (png_infop)NULL;
+      *end_info_ptr_ptr = NULL;
    }
 
    if (png_ptr != NULL)
@@ -1079,7 +1122,7 @@
 #else
       png_destroy_struct((png_voidp)png_ptr);
 #endif
-      *png_ptr_ptr = (png_structp)NULL;
+      *png_ptr_ptr = NULL;
    }
 }
 
@@ -1106,7 +1149,7 @@
       png_info_destroy(png_ptr, end_info_ptr);
 
    png_free(png_ptr, png_ptr->zbuf);
-   png_free(png_ptr, png_ptr->row_buf);
+   png_free(png_ptr, png_ptr->big_row_buf);
    png_free(png_ptr, png_ptr->prev_row);
 #if defined(PNG_READ_DITHER_SUPPORTED)
    png_free(png_ptr, png_ptr->palette_lookup);
diff --git a/pngrio.c b/pngrio.c
index 006d72e..9f0e9e3 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,9 +1,9 @@
 
 /* pngrio.c - functions for data input
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -140,7 +140,7 @@
    if (read_data_fn != NULL)
       png_ptr->read_data_fn = read_data_fn;
    else
-      png_ptr->read_data_fn = png_default_read_data;
+      png_ptr->read_data_fn = (png_rw_ptr)png_default_read_data;
 #else
    png_ptr->read_data_fn = read_data_fn;
 #endif
@@ -159,4 +159,3 @@
    png_ptr->output_flush_fn = NULL;
 #endif
 }
-
diff --git a/pngrtran.c b/pngrtran.c
index e2d46ff..c7a693c 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1,9 +1,9 @@
 
 /* pngrtran.c - transforms the data in a row for PNG readers
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -510,13 +510,19 @@
  * only do transformations on images where the file_gamma and screen_gamma
  * are not close reciprocals, otherwise it slows things down slightly, and
  * also needlessly introduces small errors.
+ *
+ * We will turn off gamma transformation later if no semitransparent entries
+ * are present in the tRNS array for palette images.  We can't do it here
+ * because we don't necessarily have the tRNS chunk yet.
  */
 void PNGAPI
 png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
 {
    png_debug(1, "in png_set_gamma\n");
-   if (fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD)
-      png_ptr->transformations |= PNG_GAMMA;
+   if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) ||
+       (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||
+       (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
+     png_ptr->transformations |= PNG_GAMMA;
    png_ptr->gamma = (float)file_gamma;
    png_ptr->screen_gamma = (float)scrn_gamma;
 }
@@ -692,23 +698,23 @@
          {
             case 1:
                png_ptr->background.gray *= (png_uint_16)0xff;
-               png_ptr->background.red = png_ptr->background.green =
-               png_ptr->background.blue = png_ptr->background.gray;
+               png_ptr->background.red = png_ptr->background.green
+                 =  png_ptr->background.blue = png_ptr->background.gray;
                break;
             case 2:
                png_ptr->background.gray *= (png_uint_16)0x55;
-               png_ptr->background.red = png_ptr->background.green =
-               png_ptr->background.blue = png_ptr->background.gray;
+               png_ptr->background.red = png_ptr->background.green
+                 = png_ptr->background.blue = png_ptr->background.gray;
                break;
             case 4:
                png_ptr->background.gray *= (png_uint_16)0x11;
-               png_ptr->background.red = png_ptr->background.green =
-               png_ptr->background.blue = png_ptr->background.gray;
+               png_ptr->background.red = png_ptr->background.green
+                 = png_ptr->background.blue = png_ptr->background.gray;
                break;
             case 8:
             case 16:
-               png_ptr->background.red = png_ptr->background.green =
-               png_ptr->background.blue = png_ptr->background.gray;
+               png_ptr->background.red = png_ptr->background.green
+                 = png_ptr->background.blue = png_ptr->background.gray;
                break;
          }
       }
@@ -742,10 +748,26 @@
    }
 #endif
 
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)
    png_ptr->background_1 = png_ptr->background;
 #endif
 #if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
+
+   if ((color_type == PNG_COLOR_TYPE_PALETTE && png_ptr->num_trans != 0)
+       && (fabs(png_ptr->screen_gamma * png_ptr->gamma - 1.0)
+         < PNG_GAMMA_THRESHOLD))
+   {
+    int i,k;
+    k=0;
+    for (i=0; i<png_ptr->num_trans; i++)
+    {
+      if (png_ptr->trans[i] != 0 && png_ptr->trans[i] != 0xff)
+        k=1; /* partial transparency is present */
+    }
+    if (k == 0)
+      png_ptr->transformations &= (~PNG_GAMMA);
+   }
+
    if (png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY))
    {
       png_build_gamma_table(png_ptr);
@@ -754,6 +776,8 @@
       {
          if (color_type == PNG_COLOR_TYPE_PALETTE)
          {
+           /* could skip if no transparency and 
+           */
             png_color back, back_1;
             png_colorp palette = png_ptr->palette;
             int num_palette = png_ptr->num_palette;
@@ -873,9 +897,16 @@
                   break;
             }
 
-            if (color_type & PNG_COLOR_MASK_COLOR)
+            png_ptr->background_1.gray = (png_uint_16)(pow(
+               (double)png_ptr->background.gray / m, g) * m + .5);
+            png_ptr->background.gray = (png_uint_16)(pow(
+               (double)png_ptr->background.gray / m, gs) * m + .5);
+
+            if ((png_ptr->background.red != png_ptr->background.green) ||
+                (png_ptr->background.red != png_ptr->background.blue) ||
+                (png_ptr->background.red != png_ptr->background.gray))
             {
-               /* RGB or RGBA */
+               /* RGB or RGBA with color background */
                png_ptr->background_1.red = (png_uint_16)(pow(
                   (double)png_ptr->background.red / m, g) * m + .5);
                png_ptr->background_1.green = (png_uint_16)(pow(
@@ -891,17 +922,17 @@
             }
             else
             {
-               /* GRAY or GRAY ALPHA */
-               png_ptr->background_1.gray = (png_uint_16)(pow(
-                  (double)png_ptr->background.gray / m, g) * m + .5);
-               png_ptr->background.gray = (png_uint_16)(pow(
-                  (double)png_ptr->background.gray / m, gs) * m + .5);
+               /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */
+               png_ptr->background_1.red = png_ptr->background_1.green
+                 = png_ptr->background_1.blue = png_ptr->background_1.gray;
+               png_ptr->background.red = png_ptr->background.green
+                 = png_ptr->background.blue = png_ptr->background.gray;
             }
          }
       }
       else
       /* transformation does not include PNG_BACKGROUND */
-#endif
+#endif /* PNG_READ_BACKGROUND_SUPPORTED */
       if (color_type == PNG_COLOR_TYPE_PALETTE)
       {
          png_colorp palette = png_ptr->palette;
@@ -919,7 +950,7 @@
 #if defined(PNG_READ_BACKGROUND_SUPPORTED)
    else
 #endif
-#endif
+#endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */
 #if defined(PNG_READ_BACKGROUND_SUPPORTED)
    /* No GAMMA transformation */
    if ((png_ptr->transformations & PNG_BACKGROUND) &&
@@ -952,7 +983,7 @@
          }
       }
    }
-#endif
+#endif /* PNG_READ_BACKGROUND_SUPPORTED */
 
 #if defined(PNG_READ_SHIFT_SUPPORTED)
    if ((png_ptr->transformations & PNG_SHIFT) &&
@@ -977,7 +1008,7 @@
          png_ptr->palette[i].blue >>= sb;
       }
    }
-#endif
+#endif  /* PNG_READ_SHIFT_SUPPORTED */
  }
 #if !defined(PNG_READ_GAMMA_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) \
  && !defined(PNG_READ_BACKGROUND_SUPPORTED)
@@ -1227,12 +1258,15 @@
       ((png_ptr->num_trans != 0 ) ||
       (png_ptr->color_type & PNG_COLOR_MASK_ALPHA)))
       png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         &(png_ptr->trans_values), &(png_ptr->background),
-         &(png_ptr->background_1),
+         &(png_ptr->trans_values), &(png_ptr->background)
+#if defined(PNG_READ_GAMMA_SUPPORTED)
+         , &(png_ptr->background_1),
          png_ptr->gamma_table, png_ptr->gamma_from_1,
          png_ptr->gamma_to_1, png_ptr->gamma_16_table,
          png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1,
-         png_ptr->gamma_shift);
+         png_ptr->gamma_shift
+#endif
+);
 #endif
 
 #if defined(PNG_READ_GAMMA_SUPPORTED)
@@ -2312,7 +2346,7 @@
  * paletted.  Most useful for gamma correction and simplification
  * of code.
  */
-void /* PRIVATE */
+void PNGAPI
 png_build_grayscale_palette(int bit_depth, png_colorp palette)
 {
    int num_palette;
@@ -2545,11 +2579,14 @@
  */
 void /* PRIVATE */
 png_do_background(png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background,
-   png_color_16p background_1,
+   png_color_16p trans_values, png_color_16p background
+#if defined(PNG_READ_GAMMA_SUPPORTED)
+   , png_color_16p background_1,
    png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
    png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
-   png_uint_16pp gamma_16_to_1, int gamma_shift)
+   png_uint_16pp gamma_16_to_1, int gamma_shift
+#endif
+   )
 {
    png_bytep sp, dp;
    png_uint_32 i;
@@ -2932,6 +2969,7 @@
                      {
                         *dp = *sp;
                      }
+#if defined(PNG_READ_GAMMA_SUPPORTED)
                      else if (a == 0)
                      {
                         *dp = (png_byte)background->gray;
@@ -2940,6 +2978,9 @@
                      {
                         png_composite(*dp, *sp, a, background_1->gray);
                      }
+#else
+                     *dp = (png_byte)background->gray;
+#endif
                   }
                }
             }
@@ -2963,12 +3004,17 @@
                         *dp = (png_byte)((v >> 8) & 0xff);
                         *(dp + 1) = (png_byte)(v & 0xff);
                      }
+#if defined(PNG_READ_GAMMA_SUPPORTED)
                      else if (a == 0)
+#else
+                     else
+#endif
                      {
                         /* background is already in screen gamma */
                         *dp = (png_byte)((background->gray >> 8) & 0xff);
                         *(dp + 1) = (png_byte)(background->gray & 0xff);
                      }
+#if defined(PNG_READ_GAMMA_SUPPORTED)
                      else
                      {
                         png_uint_16 g, v, w;
@@ -2979,6 +3025,7 @@
                         *dp = (png_byte)((w >> 8) & 0xff);
                         *(dp + 1) = (png_byte)(w & 0xff);
                      }
+#endif
                   }
                }
                else
@@ -2993,11 +3040,16 @@
                      {
                         png_memcpy(dp, sp, 2);
                      }
+#if defined(PNG_READ_GAMMA_SUPPORTED)
                      else if (a == 0)
+#else
+                     else
+#endif
                      {
                         *dp = (png_byte)((background->gray >> 8) & 0xff);
                         *(dp + 1) = (png_byte)(background->gray & 0xff);
                      }
+#if defined(PNG_READ_GAMMA_SUPPORTED)
                      else
                      {
                         png_uint_16 g, v;
@@ -3007,6 +3059,7 @@
                         *dp = (png_byte)((v >> 8) & 0xff);
                         *(dp + 1) = (png_byte)(v & 0xff);
                      }
+#endif
                   }
                }
             }
@@ -3128,17 +3181,17 @@
                         png_uint_16 v, w, x;
 
                         v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
-                        png_composite_16(w, v, a, background->red);
+                        png_composite_16(w, v, a, background_1->red);
                         x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];
                         *dp = (png_byte)((x >> 8) & 0xff);
                         *(dp + 1) = (png_byte)(x & 0xff);
                         v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
-                        png_composite_16(w, v, a, background->green);
+                        png_composite_16(w, v, a, background_1->green);
                         x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];
                         *(dp + 2) = (png_byte)((x >> 8) & 0xff);
                         *(dp + 3) = (png_byte)(x & 0xff);
                         v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];
-                        png_composite_16(w, v, a, background->blue);
+                        png_composite_16(w, v, a, background_1->blue);
                         x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8];
                         *(dp + 4) = (png_byte)((x >> 8) & 0xff);
                         *(dp + 5) = (png_byte)(x & 0xff);
diff --git a/pngrutil.c b/pngrutil.c
index 311f81e..1f3bab2 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,9 +1,9 @@
 
 /* pngrutil.c - utilities to read a PNG file
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -691,6 +691,8 @@
    png_fixed_point int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,
       int_y_green, int_x_blue, int_y_blue;
 
+   png_uint_32 uint_x, uint_y;
+
    png_debug(1, "in png_handle_cHRM\n");
 
    if (!(png_ptr->mode & PNG_HAVE_IHDR))
@@ -724,60 +726,69 @@
    }
 
    png_crc_read(png_ptr, buf, 4);
-   int_x_white = (png_fixed_point)png_get_uint_32(buf);
+   uint_x = png_get_uint_32(buf);
 
    png_crc_read(png_ptr, buf, 4);
-   int_y_white = (png_fixed_point)png_get_uint_32(buf);
+   uint_y = png_get_uint_32(buf);
 
-   if (int_x_white > 80000L || int_y_white > 80000L ||
-      int_x_white + int_y_white > 100000L)
+   if (uint_x > 80000L || uint_y > 80000L ||
+      uint_x + uint_y > 100000L)
    {
       png_warning(png_ptr, "Invalid cHRM white point");
       png_crc_finish(png_ptr, 24);
       return;
    }
+   int_x_white = (png_fixed_point)uint_x;
+   int_y_white = (png_fixed_point)uint_y;
 
    png_crc_read(png_ptr, buf, 4);
-   int_x_red = (png_fixed_point)png_get_uint_32(buf);
+   uint_x = png_get_uint_32(buf);
 
    png_crc_read(png_ptr, buf, 4);
-   int_y_red = (png_fixed_point)png_get_uint_32(buf);
+   uint_y = png_get_uint_32(buf);
 
-   if (int_x_red > 80000L || int_y_red > 80000L ||
-      int_x_red + int_y_red > 100000L)
+   if (uint_x > 80000L || uint_y > 80000L ||
+      uint_x + uint_y > 100000L)
    {
       png_warning(png_ptr, "Invalid cHRM red point");
       png_crc_finish(png_ptr, 16);
       return;
    }
+   int_x_red = (png_fixed_point)uint_x;
+   int_y_red = (png_fixed_point)uint_y;
 
    png_crc_read(png_ptr, buf, 4);
-   int_x_green = (png_fixed_point)png_get_uint_32(buf);
+   uint_x = png_get_uint_32(buf);
 
    png_crc_read(png_ptr, buf, 4);
-   int_y_green = (png_fixed_point)png_get_uint_32(buf);
+   uint_y = png_get_uint_32(buf);
 
-   if (int_x_green > 80000L || int_y_green > 80000L ||
-      int_x_green + int_y_green > 100000L)
+   if (uint_x > 80000L || uint_y > 80000L ||
+      uint_x + uint_y > 100000L)
    {
       png_warning(png_ptr, "Invalid cHRM green point");
       png_crc_finish(png_ptr, 8);
       return;
    }
+   int_x_green = (png_fixed_point)uint_x;
+   int_y_green = (png_fixed_point)uint_y;
 
    png_crc_read(png_ptr, buf, 4);
-   int_x_blue = (png_fixed_point)png_get_uint_32(buf);
+   uint_x = png_get_uint_32(buf);
 
    png_crc_read(png_ptr, buf, 4);
-   int_y_blue = (png_fixed_point)png_get_uint_32(buf);
+   uint_y = png_get_uint_32(buf);
 
-   if (int_x_blue > 80000L || int_y_blue > 80000L ||
-      int_x_blue + int_y_blue > 100000L)
+   if (uint_x > 80000L || uint_y > 80000L ||
+      uint_x + uint_y > 100000L)
    {
       png_warning(png_ptr, "Invalid cHRM blue point");
       png_crc_finish(png_ptr, 0);
       return;
    }
+   int_x_blue = (png_fixed_point)uint_x;
+   int_y_blue = (png_fixed_point)uint_y;
+
 #ifdef PNG_FLOATING_POINT_SUPPORTED
    white_x = (float)int_x_white / (float)100000.0;
    white_y = (float)int_y_white / (float)100000.0;
@@ -794,12 +805,12 @@
       {
       if (abs(int_x_white - 31270L) > 1000 ||
           abs(int_y_white - 32900L) > 1000 ||
-          abs(  int_x_red - 64000L) > 1000 ||
-          abs(  int_y_red - 33000L) > 1000 ||
+          abs(int_x_red   - 64000L) > 1000 ||
+          abs(int_y_red   - 33000L) > 1000 ||
           abs(int_x_green - 30000L) > 1000 ||
           abs(int_y_green - 60000L) > 1000 ||
-          abs( int_x_blue - 15000L) > 1000 ||
-          abs( int_y_blue -  6000L) > 1000)
+          abs(int_x_blue  - 15000L) > 1000 ||
+          abs(int_y_blue  -  6000L) > 1000)
          {
 
             png_warning(png_ptr,
@@ -895,17 +906,6 @@
       igamma=(int)(info_ptr->gamma * 100000.);
 #  endif
 #endif
-#if 0 && defined(PNG_cHRM_SUPPORTED) && !defined(PNG_FIXED_POINT_SUPPORTED)
-/* We need to define these here because they aren't in png.h */
-   png_fixed_point int_x_white;
-   png_fixed_point int_y_white;
-   png_fixed_point int_x_red;
-   png_fixed_point int_y_red;
-   png_fixed_point int_x_green;
-   png_fixed_point int_y_green;
-   png_fixed_point int_x_blue;
-   png_fixed_point int_y_blue;
-#endif
       if(igamma < 45000L || igamma > 46000L)
       {
          png_warning(png_ptr,
@@ -928,12 +928,12 @@
    if (info_ptr->valid & PNG_INFO_cHRM)
       if (abs(info_ptr->int_x_white - 31270L) > 1000 ||
           abs(info_ptr->int_y_white - 32900L) > 1000 ||
-          abs(  info_ptr->int_x_red - 64000L) > 1000 ||
-          abs(  info_ptr->int_y_red - 33000L) > 1000 ||
+          abs(info_ptr->int_x_red   - 64000L) > 1000 ||
+          abs(info_ptr->int_y_red   - 33000L) > 1000 ||
           abs(info_ptr->int_x_green - 30000L) > 1000 ||
           abs(info_ptr->int_y_green - 60000L) > 1000 ||
-          abs( info_ptr->int_x_blue - 15000L) > 1000 ||
-          abs( info_ptr->int_y_blue -  6000L) > 1000)
+          abs(info_ptr->int_x_blue  - 15000L) > 1000 ||
+          abs(info_ptr->int_y_blue  -  6000L) > 1000)
          {
             png_warning(png_ptr,
               "Ignoring incorrect cHRM value when sRGB is also present");
@@ -952,6 +952,7 @@
 {
    png_charp chunkdata;
    png_byte compression_type;
+   png_bytep pC;
    png_charp profile;
    png_uint_32 skip = 0;
    png_uint_32 profile_size = 0;
@@ -1029,17 +1030,26 @@
 
    profile_length = data_length - prefix_length;
 
+   if ( prefix_length > data_length || profile_length < 4)
+   {
+      png_free(png_ptr, chunkdata);
+      png_warning(png_ptr, "Profile size field missing from iCCP chunk");
+      return;
+   }
+
    /* Check the profile_size recorded in the first 32 bits of the ICC profile */
-   profile_size = ((*(chunkdata+prefix_length))<<24) |
-                  ((*(chunkdata+prefix_length+1))<<16) |
-                  ((*(chunkdata+prefix_length+2))<< 8) |
-                  ((*(chunkdata+prefix_length+3))    );
+   pC = (png_bytep)(chunkdata+prefix_length);
+   profile_size = ((*(pC  ))<<24) |
+                  ((*(pC+1))<<16) |
+                  ((*(pC+2))<< 8) |
+                  ((*(pC+3))    );
 
    if(profile_size < profile_length)
       profile_length = profile_size;
 
    if(profile_size > profile_length)
    {
+      png_free(png_ptr, chunkdata);
       png_warning(png_ptr, "Ignoring truncated iCCP profile.\n");
       return;
    }
@@ -2967,7 +2977,8 @@
    if (row_bytes > (png_uint_32)65536L)
       png_error(png_ptr, "This image requires a row greater than 64KB");
 #endif
-   png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, row_bytes);
+   png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes+64);
+   png_ptr->row_buf = png_ptr->big_row_buf+32;
 #if defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD)
    png_ptr->row_buf_size = row_bytes;
 #endif
diff --git a/pngset.c b/pngset.c
index 4fb6c0e..cc40bdc 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1,9 +1,9 @@
 
 /* pngset.c - storage of image information into info struct
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -40,6 +40,25 @@
    if (png_ptr == NULL || info_ptr == NULL)
       return;
 
+   if (white_x < 0.0 || white_y < 0.0 ||
+         red_x < 0.0 ||   red_y < 0.0 ||
+       green_x < 0.0 || green_y < 0.0 ||
+        blue_x < 0.0 ||  blue_y < 0.0)
+   {
+      png_warning(png_ptr,
+        "Ignoring attempt to set negative chromaticity value");
+      return;
+   }
+   if (white_x > 21474.83 || white_y > 21474.83 ||
+         red_x > 21474.83 ||   red_y > 21474.83 ||
+       green_x > 21474.83 || green_y > 21474.83 ||
+        blue_x > 21474.83 ||  blue_y > 21474.83)
+   {
+      png_warning(png_ptr,
+        "Ignoring attempt to set chromaticity value exceeding 21474.83");
+      return;
+   }
+
    info_ptr->x_white = (float)white_x;
    info_ptr->y_white = (float)white_y;
    info_ptr->x_red   = (float)red_x;
@@ -51,12 +70,12 @@
 #ifdef PNG_FIXED_POINT_SUPPORTED
    info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5);
    info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5);
-   info_ptr->int_x_red   = (png_fixed_point)(red_x*100000.+0.5);
-   info_ptr->int_y_red   = (png_fixed_point)(red_y*100000.+0.5);
+   info_ptr->int_x_red   = (png_fixed_point)(  red_x*100000.+0.5);
+   info_ptr->int_y_red   = (png_fixed_point)(  red_y*100000.+0.5);
    info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5);
    info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5);
-   info_ptr->int_x_blue  = (png_fixed_point)(blue_x*100000.+0.5);
-   info_ptr->int_y_blue  = (png_fixed_point)(blue_y*100000.+0.5);
+   info_ptr->int_x_blue  = (png_fixed_point)( blue_x*100000.+0.5);
+   info_ptr->int_y_blue  = (png_fixed_point)( blue_y*100000.+0.5);
 #endif
    info_ptr->valid |= PNG_INFO_cHRM;
 }
@@ -72,6 +91,24 @@
    if (png_ptr == NULL || info_ptr == NULL)
       return;
 
+   if (white_x < 0 || white_y < 0 ||
+         red_x < 0 ||   red_y < 0 ||
+       green_x < 0 || green_y < 0 ||
+        blue_x < 0 ||  blue_y < 0)
+   {
+      png_warning(png_ptr,
+        "Ignoring attempt to set negative chromaticity value");
+      return;
+   }
+   if (white_x > (double) PNG_MAX_UINT || white_y > (double) PNG_MAX_UINT ||
+         red_x > (double) PNG_MAX_UINT ||   red_y > (double) PNG_MAX_UINT ||
+       green_x > (double) PNG_MAX_UINT || green_y > (double) PNG_MAX_UINT ||
+        blue_x > (double) PNG_MAX_UINT ||  blue_y > (double) PNG_MAX_UINT)
+   {
+      png_warning(png_ptr,
+        "Ignoring attempt to set chromaticity value exceeding 21474.83");
+      return;
+   }
    info_ptr->int_x_white = white_x;
    info_ptr->int_y_white = white_y;
    info_ptr->int_x_red   = red_x;
@@ -83,12 +120,12 @@
 #ifdef PNG_FLOATING_POINT_SUPPORTED
    info_ptr->x_white = (float)(white_x/100000.);
    info_ptr->y_white = (float)(white_y/100000.);
-   info_ptr->x_red   = (float)(red_x/100000.);
-   info_ptr->y_red   = (float)(red_y/100000.);
+   info_ptr->x_red   = (float)(  red_x/100000.);
+   info_ptr->y_red   = (float)(  red_y/100000.);
    info_ptr->x_green = (float)(green_x/100000.);
    info_ptr->y_green = (float)(green_y/100000.);
-   info_ptr->x_blue  = (float)(blue_x/100000.);
-   info_ptr->y_blue  = (float)(blue_y/100000.);
+   info_ptr->x_blue  = (float)( blue_x/100000.);
+   info_ptr->y_blue  = (float)( blue_y/100000.);
 #endif
    info_ptr->valid |= PNG_INFO_cHRM;
 }
@@ -100,16 +137,25 @@
 void PNGAPI
 png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
 {
+   double gamma;
    png_debug1(1, "in %s storage function\n", "gAMA");
    if (png_ptr == NULL || info_ptr == NULL)
       return;
 
-   info_ptr->gamma = (float)file_gamma;
+   /* Check for overflow */
+   if (file_gamma > 21474.83)
+   {
+      png_warning(png_ptr, "Limiting gamma to 21474.83");
+      gamma=21474.83;
+   }
+   else
+      gamma=file_gamma;
+   info_ptr->gamma = (float)gamma;
 #ifdef PNG_FIXED_POINT_SUPPORTED
-   info_ptr->int_gamma = (int)(file_gamma*100000.+.5);
+   info_ptr->int_gamma = (int)(gamma*100000.+.5);
 #endif
    info_ptr->valid |= PNG_INFO_gAMA;
-   if(file_gamma == 0.0)
+   if(gamma == 0.0)
       png_warning(png_ptr, "Setting gamma=0");
 }
 #endif
@@ -117,18 +163,35 @@
 png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
    int_gamma)
 {
+   png_fixed_point gamma;
+
    png_debug1(1, "in %s storage function\n", "gAMA");
    if (png_ptr == NULL || info_ptr == NULL)
       return;
 
+   if (int_gamma > (png_fixed_point) PNG_MAX_UINT)
+   {
+     png_warning(png_ptr, "Limiting gamma to 21474.83");
+     gamma=PNG_MAX_UINT;
+   }
+   else
+   {
+     if (int_gamma < 0)
+     {
+       png_warning(png_ptr, "Setting negative gamma to zero");
+       gamma=0;
+     }
+     else
+       gamma=int_gamma;
+   }
 #ifdef PNG_FLOATING_POINT_SUPPORTED
-   info_ptr->gamma = (float)(int_gamma/100000.);
+   info_ptr->gamma = (float)(gamma/100000.);
 #endif
 #ifdef PNG_FIXED_POINT_SUPPORTED
-   info_ptr->int_gamma = int_gamma;
+   info_ptr->int_gamma = gamma;
 #endif
    info_ptr->valid |= PNG_INFO_gAMA;
-   if(int_gamma == 0)
+   if(gamma == 0)
       png_warning(png_ptr, "Setting gamma=0");
 }
 #endif
@@ -152,8 +215,9 @@
 #ifdef PNG_FREE_ME_SUPPORTED
    png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
 #endif
+   /* Changed from info->num_palette to 256 in version 1.2.1 */
    png_ptr->hist = (png_uint_16p)png_malloc(png_ptr,
-      (png_uint_32)(info_ptr->num_palette * sizeof (png_uint_16)));
+      (png_uint_32)(256 * sizeof (png_uint_16)));
 
    for (i = 0; i < info_ptr->num_palette; i++)
        png_ptr->hist[i] = hist[i];
@@ -241,9 +305,7 @@
    info_ptr->compression_type = (png_byte)compression_type;
    info_ptr->filter_type = (png_byte)filter_type;
    info_ptr->interlace_type = (png_byte)interlace_type;
-   if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-      info_ptr->channels = 1;
-   else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
+   if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
       info_ptr->channels = 3;
    else
       info_ptr->channels = 1;
@@ -410,8 +472,12 @@
 #ifdef PNG_FREE_ME_SUPPORTED
    png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);
 #endif
-   png_ptr->palette = (png_colorp)png_zalloc(png_ptr, (uInt)num_palette,
+   /* Changed in libpng-1.2.1 to allocate 256 instead of num_palette entries,
+      in case of an invalid PNG file that has too-large sample values. */
+   png_ptr->palette = (png_colorp)png_zalloc(png_ptr, (uInt)256,
       sizeof (png_color));
+   if (png_ptr->palette == NULL)
+      png_error(png_ptr, "Unable to malloc palette");
    png_memcpy(png_ptr->palette, palette, num_palette * sizeof (png_color));
    info_ptr->palette = png_ptr->palette;
    info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;
@@ -620,7 +686,7 @@
 #ifdef PNG_iTXt_SUPPORTED
       {
         /* set iTXt data */
-        if (text_ptr[i].key != NULL)
+        if (text_ptr[i].lang != NULL)
           lang_len = png_strlen(text_ptr[i].lang);
         else
           lang_len = 0;
@@ -676,8 +742,8 @@
 #endif
       {
 #ifdef PNG_iTXt_SUPPORTED
-         textp->lang=(png_charp)NULL;
-         textp->lang_key=(png_charp)NULL;
+         textp->lang=NULL;
+         textp->lang_key=NULL;
 #endif
          textp->text=textp->key + key_len + 1;
       }
@@ -740,9 +806,10 @@
 #ifdef PNG_FREE_ME_SUPPORTED
        png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
 #endif
+       /* Changed from num_trans to 256 in version 1.2.1 */
        png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr,
-           num_trans);
-       png_memcpy(info_ptr->trans, trans, num_trans);
+           (png_uint_32)256);
+       png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans);
 #ifdef PNG_FREE_ME_SUPPORTED
        info_ptr->free_me |= PNG_FREE_TRNS;
 #else
@@ -905,14 +972,17 @@
     if (chunk_list == NULL)
       return;
     old_num_chunks=png_ptr->num_chunk_list;
-    new_list=(png_bytep)png_malloc(png_ptr,5*(num_chunks+old_num_chunks));
+    new_list=(png_bytep)png_malloc(png_ptr,
+       (png_uint_32)(5*(num_chunks+old_num_chunks)));
     if(png_ptr->chunk_list != NULL)
     {
-       png_memcpy(new_list, png_ptr->chunk_list, 5*old_num_chunks);
+       png_memcpy(new_list, png_ptr->chunk_list,
+          (png_size_t)(5*old_num_chunks));
        png_free(png_ptr, png_ptr->chunk_list);
        png_ptr->chunk_list=NULL;
     }
-    png_memcpy(new_list+5*old_num_chunks, chunk_list, 5*num_chunks);
+    png_memcpy(new_list+5*old_num_chunks, chunk_list,
+       (png_size_t)(5*num_chunks));
     for (p=new_list+5*old_num_chunks+4, i=0; i<num_chunks; i++, p+=5)
        *p=(png_byte)keep;
     png_ptr->num_chunk_list=old_num_chunks+num_chunks;
@@ -970,6 +1040,7 @@
 }
 
 
+#ifndef PNG_1_0_X
 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED
 /* this function was added to libpng 1.2.0 and should always exist by default */
 void PNGAPI
@@ -1024,3 +1095,4 @@
     png_ptr->mmx_rowbytes_threshold = mmx_rowbytes_threshold;
 }
 #endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
+#endif /* ?PNG_1_0_X */
diff --git a/pngtest.c b/pngtest.c
index daaa6b8..0c53b7d 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1,9 +1,9 @@
 
 /* pngtest.c - a simple test program to test libpng
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -470,10 +470,8 @@
 static int total_allocation = 0;
 static int num_allocations = 0;
 
-extern PNG_EXPORT(png_voidp,png_debug_malloc) PNGARG((png_structp png_ptr,
-   png_uint_32 size));
-extern PNG_EXPORT(void,png_debug_free) PNGARG((png_structp png_ptr,
-   png_voidp ptr));
+png_voidp png_debug_malloc PNGARG((png_structp png_ptr, png_uint_32 size));
+void png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr));
 
 png_voidp
 png_debug_malloc(png_structp png_ptr, png_uint_32 size)
@@ -483,13 +481,13 @@
       png_debug_malloc directly, with png_ptr == NULL which is OK */
 
    if (size == 0)
-      return (png_voidp)(NULL);
+      return (NULL);
 
    /* This calls the library allocator twice, once to get the requested
       buffer and once to get a new free list entry. */
    {
       memory_infop pinfo = (memory_infop)png_malloc_default(png_ptr,
-         sizeof *pinfo);
+         (png_uint_32)sizeof *pinfo);
       pinfo->size = size;
       current_allocation += size;
       total_allocation += size;
@@ -503,7 +501,7 @@
       png_memset(pinfo->pointer, 0xdd, pinfo->size);
 #if PNG_DEBUG
       if(verbose)
-         printf("png_malloc %d bytes at %x\n",size,pinfo->pointer);
+         printf("png_malloc %lu bytes at %x\n",size,pinfo->pointer);
 #endif
       assert(pinfo->size != 12345678);
       return (png_voidp)(pinfo->pointer);
@@ -545,7 +543,7 @@
          }
          if (pinfo->next == NULL)
          {
-            fprintf(STDERR, "Pointer %x not found\n", ptr);
+            fprintf(STDERR, "Pointer %x not found\n", (unsigned int)ptr);
             break;
          }
          ppinfo = &pinfo->next;
@@ -596,7 +594,7 @@
 #endif
    char inbuf[256], outbuf[256];
 
-   row_buf = (png_bytep)NULL;
+   row_buf = NULL;
 
 #if defined(_WIN32_WCE)
    MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);
@@ -623,12 +621,12 @@
 
    png_debug(0, "Allocating read and write structures\n");
 #ifdef PNG_USER_MEM_SUPPORTED
-   read_ptr = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
-      (png_error_ptr)NULL, (png_error_ptr)NULL, (png_voidp)NULL,
+   read_ptr = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
+      png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL,
       (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);
 #else
-   read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
-      (png_error_ptr)NULL, (png_error_ptr)NULL);
+   read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
+      png_error_ptr_NULL, png_error_ptr_NULL);
 #endif
 #if defined(PNG_NO_STDIO)
    png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error,
@@ -636,12 +634,12 @@
 #endif
 #ifdef PNG_WRITE_SUPPORTED
 #ifdef PNG_USER_MEM_SUPPORTED
-   write_ptr = png_create_write_struct_2(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
-      (png_error_ptr)NULL, (png_error_ptr)NULL, (png_voidp)NULL,
+   write_ptr = png_create_write_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
+      png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL,
       (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);
 #else
-   write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
-      (png_error_ptr)NULL, (png_error_ptr)NULL);
+   write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
+      png_error_ptr_NULL, png_error_ptr_NULL);
 #endif
 #if defined(PNG_NO_STDIO)
    png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error,
@@ -729,9 +727,9 @@
    else
    {
 #ifdef PNG_WRITE_SUPPORTED
-      png_set_write_status_fn(write_ptr, NULL);
+      png_set_write_status_fn(write_ptr, png_write_status_ptr_NULL);
 #endif
-      png_set_read_status_fn(read_ptr, NULL);
+      png_set_read_status_fn(read_ptr, png_read_status_ptr_NULL);
    }
 
 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
@@ -750,10 +748,12 @@
 #define HANDLE_CHUNK_IF_SAFE      2
 #define HANDLE_CHUNK_ALWAYS       3
 #if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-   png_set_keep_unknown_chunks(read_ptr, HANDLE_CHUNK_ALWAYS, NULL, 0);
+   png_set_keep_unknown_chunks(read_ptr, HANDLE_CHUNK_ALWAYS,
+      png_bytep_NULL, 0);
 #endif
 #if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
-   png_set_keep_unknown_chunks(write_ptr, HANDLE_CHUNK_IF_SAFE, NULL, 0);
+   png_set_keep_unknown_chunks(write_ptr, HANDLE_CHUNK_IF_SAFE,
+      png_bytep_NULL, 0);
 #endif
 
    png_debug(0, "Reading info struct\n");
@@ -1058,7 +1058,7 @@
          png_debug2(0, "0x%08lx (%ld bytes)\n", (unsigned long)row_buf,
             png_get_rowbytes(read_ptr, read_info_ptr));
 #endif /* !SINGLE_ROWBUF_ALLOC */
-         png_read_rows(read_ptr, (png_bytepp)&row_buf, (png_bytepp)NULL, 1);
+         png_read_rows(read_ptr, (png_bytepp)&row_buf, png_bytepp_NULL, 1);
 
 #ifdef PNG_WRITE_SUPPORTED
 #ifdef PNGTEST_TIMING
@@ -1280,8 +1280,8 @@
    /* Show the version of libpng used in building the application */
    fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER,
       PNG_HEADER_VERSION_STRING);
-   fprintf(STDERR," sizeof(png_struct)=%d, sizeof(png_info)=%d\n",
-                    sizeof(png_struct), sizeof(png_info));
+   fprintf(STDERR," sizeof(png_struct)=%ld, sizeof(png_info)=%ld\n",
+                    (long)sizeof(png_struct), (long)sizeof(png_info));
 
    /* Do some consistency checking on the memory allocation settings, I'm
       not sure this matters, but it is nice to know, the first of these
@@ -1396,7 +1396,8 @@
                current_allocation);
             while (pinfo != NULL)
             {
-               fprintf(STDERR, " %d bytes at %x\n", pinfo->size, pinfo->pointer);
+               fprintf(STDERR, " %lu bytes at %x\n", pinfo->size, 
+                 (unsigned int) pinfo->pointer);
                pinfo = pinfo->next;
             }
          }
@@ -1470,8 +1471,8 @@
                 current_allocation);
              while (pinfo != NULL)
              {
-                fprintf(STDERR," %d bytes at %x\n",
-                   pinfo->size, pinfo->pointer);
+                fprintf(STDERR," %lu bytes at %x\n",
+                   pinfo->size, (unsigned int)pinfo->pointer);
                 pinfo = pinfo->next;
              }
           }
@@ -1511,4 +1512,4 @@
 }
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_0_12beta1 your_png_h_is_not_version_1_0_12beta1;
+typedef version_1_0_13 your_png_h_is_not_version_1_0_13;
diff --git a/pngtrans.c b/pngtrans.c
index 85d2755..63a6672 100644
--- a/pngtrans.c
+++ b/pngtrans.c
@@ -1,9 +1,9 @@
 
 /* pngtrans.c - transforms the data in a row (used by both readers and writers)
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  */
@@ -153,11 +153,14 @@
 png_do_invert(png_row_infop row_info, png_bytep row)
 {
    png_debug(1, "in png_do_invert\n");
-   if (row_info->bit_depth == 1 &&
+  /* This test removed from libpng version 1.0.13 and 1.2.0:
+   *   if (row_info->bit_depth == 1 &&
+   */
 #if defined(PNG_USELESS_TESTS_SUPPORTED)
-       row != NULL && row_info != NULL &&
+   if (row == NULL || row_info == NULL)
+     return;
 #endif
-       row_info->color_type == PNG_COLOR_TYPE_GRAY)
+   if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
    {
       png_bytep rp = row;
       png_uint_32 i;
@@ -169,6 +172,33 @@
          rp++;
       }
    }
+   else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
+      row_info->bit_depth == 8)
+   {
+      png_bytep rp = row;
+      png_uint_32 i;
+      png_uint_32 istop = row_info->rowbytes;
+
+      for (i = 0; i < istop; i+=2)
+      {
+         *rp = (png_byte)(~(*rp));
+         rp+=2;
+      }
+   }
+   else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
+      row_info->bit_depth == 16)
+   {
+      png_bytep rp = row;
+      png_uint_32 i;
+      png_uint_32 istop = row_info->rowbytes;
+
+      for (i = 0; i < istop; i+=4)
+      {
+         *rp = (png_byte)(~(*rp));
+         *(rp+1) = (png_byte)(~(*(rp+1)));
+         rp+=4;
+      }
+   }
 }
 #endif
 
@@ -608,4 +638,3 @@
    return (NULL);
 #endif
 }
-
diff --git a/pngvcrd.c b/pngvcrd.c
index 75cc9b5..2f343af 100644
--- a/pngvcrd.c
+++ b/pngvcrd.c
@@ -2,14 +2,14 @@
  *
  * For Intel x86 CPU and Microsoft Visual C++ compiler
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng version 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * Copyright (c) 1998, Intel Corporation
  *
  * Contributed by Nirav Chhatrapati, Intel Corporation, 1998
  * Interface to libpng contributed by Gilles Vollant, 1999
- * Debugging and cleanup by Greg Roelofs, 2000, 2001
+ *
  *
  * In png_do_read_interlace() in libpng versions 1.0.3a through 1.0.4d,
  * a sign error in the post-MMX cleanup code for each pixel_depth resulted
@@ -19,6 +19,8 @@
  *
  * [png_read_filter_row_mmx_avg() bpp == 2 bugfix, GRR 20000916]
  *
+ * [runtime MMX configuration, GRR 20010102]
+ *
  */
 
 #define PNG_INTERNAL
@@ -37,6 +39,7 @@
     push ebx          //CPUID will trash these
     push ecx
     push edx
+
     pushfd            //Save Eflag to stack
     pop eax           //Get Eflag from stack into eax
     mov ecx, eax      //Make another copy of Eflag in ecx
@@ -46,6 +49,8 @@
     popfd             //Restored modified value back to Eflag reg
     pushfd            //Save Eflag to stack
     pop eax           //Get Eflag from stack
+    push ecx          // save original Eflag to stack
+    popfd             // restore original Eflag
     xor eax, ecx      //Compare the new Eflag with the original Eflag
     jz NOT_SUPPORTED  //If the same, CPUID instruction is not supported,
                       //skip following instructions and jump to
@@ -110,6 +115,8 @@
    png_debug(1,"in png_combine_row_asm\n");
 
    if (mmx_supported == 2) {
+       /* this should have happened in png_init_mmx_flags() already */
+       png_warning(png_ptr, "asm_flags may not have been initialized");
        png_mmx_support();
    }
 
@@ -300,7 +307,8 @@
 
             __int64 mask0=0x0102040810204080;
 
-            if ( mmx_supported )
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && mmx_supported */ )
             {
                srcptr = png_ptr->row_buf + 1;
                dstptr = row;
@@ -382,8 +390,6 @@
                incr1 = (disp)*pixel_bytes;
                for (i = initial_val; i < final_val; i += incr1)
                {
-                  if (pixel_bytes > (png_size_t)(final_val-i))
-                    pixel_bytes = (png_size_t)(final_val-i);
                   png_memcpy(dstptr, srcptr, pixel_bytes);
                   srcptr += incr1;
                   dstptr += incr1;
@@ -402,7 +408,8 @@
             __int64 mask1=0x0101020204040808,
                     mask0=0x1010202040408080;
 
-            if ( mmx_supported )
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && mmx_supported */ )
             {
                srcptr = png_ptr->row_buf + 1;
                dstptr = row;
@@ -495,8 +502,6 @@
                incr1 = (disp)*pixel_bytes;
                for (i = initial_val; i < final_val; i += incr1)
                {
-                  if (pixel_bytes > (png_size_t)(final_val-i))
-                    pixel_bytes = (png_size_t)(final_val-i);
                   png_memcpy(dstptr, srcptr, pixel_bytes);
                   srcptr += incr1;
                   dstptr += incr1;
@@ -524,7 +529,8 @@
             len     = (png_ptr->width)&~7;
             diff = (png_ptr->width)&7;
 
-            if ( mmx_supported )
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && mmx_supported */ )
             {
                _asm
                {
@@ -627,8 +633,6 @@
                incr1 = (disp)*pixel_bytes;
                for (i = initial_val; i < final_val; i += incr1)
                {
-                  if (pixel_bytes > (png_size_t)(final_val-i))
-                    pixel_bytes = (png_size_t)(final_val-i);
                   png_memcpy(dstptr, srcptr, pixel_bytes);
                   srcptr += incr1;
                   dstptr += incr1;
@@ -657,7 +661,8 @@
             len     = (png_ptr->width)&~7;
             diff = (png_ptr->width)&7;
 
-            if ( mmx_supported )
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && mmx_supported */ )
             {
                _asm
                {
@@ -768,8 +773,6 @@
                incr1 = (disp)*pixel_bytes;
                for (i = initial_val; i < final_val; i += incr1)
                {
-                  if (pixel_bytes > (png_size_t)(final_val-i))
-                    pixel_bytes = (png_size_t)(final_val-i);
                   png_memcpy(dstptr, srcptr, pixel_bytes);
                   srcptr += incr1;
                   dstptr += incr1;
@@ -793,7 +796,8 @@
                     mask1=0x2020202040404040,
                     mask0=0x4040808080808080;
 
-            if ( mmx_supported )
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+                /* && mmx_supported */ )
             {
                srcptr = png_ptr->row_buf + 1;
                dstptr = row;
@@ -927,8 +931,6 @@
                incr1 = (disp)*pixel_bytes;
                for (i = initial_val; i < final_val; i += incr1)
                {
-                  if (pixel_bytes > (png_size_t)(final_val-i))
-                    pixel_bytes = (png_size_t)(final_val-i);
                   png_memcpy(dstptr, srcptr, pixel_bytes);
                   srcptr += incr1;
                   dstptr += incr1;
@@ -957,8 +959,6 @@
             incr1 = (disp)*pixel_bytes;
             for (i = initial_val; i < final_val; i += incr1)
             {
-               if (pixel_bytes > (png_size_t)(final_val-i))
-                 pixel_bytes = (png_size_t)(final_val-i);
                png_memcpy(dp, sptr, pixel_bytes);
                sptr += incr1;
                dp += incr1;
@@ -987,6 +987,8 @@
    png_debug(1,"in png_do_read_interlace\n");
 
    if (mmx_supported == 2) {
+       /* this should have happened in png_init_mmx_flags() already */
+       png_warning(png_ptr, "asm_flags may not have been initialized");
        png_mmx_support();
    }
 
@@ -1187,7 +1189,8 @@
             // NOTE:  there is NO MMX code for 48-bit and 64-bit images
 
             // use MMX routine if machine supports it
-            if ( mmx_supported )
+            if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)
+                /* && mmx_supported */ )
             {
                if (pixel_bytes == 3)
                {
@@ -1777,7 +1780,7 @@
             } /* end of mmx_supported */
 
             else /* MMX not supported:  use modified C code - takes advantage
-                  * of inlining of png_memcpy for a constant */
+                  * of inlining of memcpy for a constant */
             {
                if (pixel_bytes == 1)
                {
@@ -3649,6 +3652,8 @@
 #endif
 
    if (mmx_supported == 2) {
+       /* this should have happened in png_init_mmx_flags() already */
+       png_warning(png_ptr, "asm_flags may not have been initialized");
        png_mmx_support();
    }
 
@@ -3658,13 +3663,17 @@
    {
       case 0: sprintf(filnm, "none");
          break;
-      case 1: sprintf(filnm, "sub-%s", "MMX");
+      case 1: sprintf(filnm, "sub-%s",
+        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : "x86");
          break;
-      case 2: sprintf(filnm, "up-%s", "MMX");
+      case 2: sprintf(filnm, "up-%s",
+        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" : "x86");
          break;
-      case 3: sprintf(filnm, "avg-%s", "MMX");
+      case 3: sprintf(filnm, "avg-%s",
+        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" : "x86");
          break;
-      case 4: sprintf(filnm, "Paeth-%s", "MMX");
+      case 4: sprintf(filnm, "Paeth-%s",
+        (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":"x86");
          break;
       default: sprintf(filnm, "unknw");
          break;
@@ -3682,9 +3691,9 @@
 
       case PNG_FILTER_VALUE_SUB:
       {
-         if (
-             (row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
-             (row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
+         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) &&
+             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
+             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
          {
             png_read_filter_row_mmx_sub(row_info, row);
          }
@@ -3707,9 +3716,9 @@
 
       case PNG_FILTER_VALUE_UP:
       {
-         if (
-             (row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
-             (row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
+         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) &&
+             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
+             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
          {
             png_read_filter_row_mmx_up(row_info, row, prev_row);
          }
@@ -3731,9 +3740,9 @@
 
       case PNG_FILTER_VALUE_AVG:
       {
-         if (
-             (row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
-             (row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
+         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) &&
+             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
+             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
          {
             png_read_filter_row_mmx_avg(row_info, row, prev_row);
          }
@@ -3765,9 +3774,9 @@
 
       case PNG_FILTER_VALUE_PAETH:
       {
-         if (
-             (row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
-             (row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
+         if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) &&
+             (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
+             (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
          {
             png_read_filter_row_mmx_paeth(row_info, row, prev_row);
          }
diff --git a/pngwio.c b/pngwio.c
index 1b4e266..6ef97bb 100644
--- a/pngwio.c
+++ b/pngwio.c
@@ -1,9 +1,9 @@
 
 /* pngwio.c - functions for data output
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
@@ -171,7 +171,7 @@
    if (write_data_fn != NULL)
       png_ptr->write_data_fn = write_data_fn;
    else
-      png_ptr->write_data_fn = png_default_write_data;
+      png_ptr->write_data_fn = (png_rw_ptr)png_default_write_data;
 #else
    png_ptr->write_data_fn = write_data_fn;
 #endif
@@ -181,7 +181,7 @@
    if (output_flush_fn != NULL)
       png_ptr->output_flush_fn = output_flush_fn;
    else
-      png_ptr->output_flush_fn = png_default_flush;
+      png_ptr->output_flush_fn = (png_flush_ptr)png_default_flush;
 #else
    png_ptr->output_flush_fn = output_flush_fn;
 #endif
diff --git a/pngwrite.c b/pngwrite.c
index 86829c4..238ac0a 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -1,9 +1,9 @@
 
 /* pngwrite.c - general routines to write a PNG file
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  */
@@ -424,7 +424,7 @@
 {
 #ifdef PNG_USER_MEM_SUPPORTED
    return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn,
-      warn_fn, NULL, NULL, NULL));
+      warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));
 }
 
 /* Alternate initialize png_ptr structure, and allocate any memory needed */
@@ -443,14 +443,19 @@
    int i;
    png_debug(1, "in png_create_write_struct\n");
 #ifdef PNG_USER_MEM_SUPPORTED
-   if ((png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
-      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr)) == NULL)
+   png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
+      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
 #else
-   if ((png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG)) == NULL)
+   png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
 #endif /* PNG_USER_MEM_SUPPORTED */
-   {
-      return ((png_structp)NULL);
-   }
+   if (png_ptr == NULL)
+      return (NULL);
+
+#if !defined(PNG_1_0_X)
+#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
+   png_init_mmx_flags(png_ptr);   /* 1.2.0 addition */
+#endif
+#endif /* PNG_1_0_X */
 
 #ifdef PNG_SETJMP_SUPPORTED
 #ifdef USE_FAR_KEYWORD
@@ -462,7 +467,7 @@
       png_free(png_ptr, png_ptr->zbuf);
       png_ptr->zbuf=NULL;
       png_destroy_struct(png_ptr);
-      return ((png_structp)NULL);
+      return (NULL);
    }
 #ifdef USE_FAR_KEYWORD
    png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf));
@@ -492,23 +497,24 @@
          (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
          (user_png_ver[0] == '0' && user_png_ver[2] < '9'))
      {
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+        char msg[80];
+        if (user_png_ver)
+        {
+          sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
+             user_png_ver);
+          png_warning(png_ptr, msg);
+        }
+        sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
+           png_libpng_ver);
+        png_warning(png_ptr, msg);
+#endif
+#ifdef PNG_ERROR_NUMBERS_SUPPORTED
+        png_ptr->flags=0;
+#endif
         png_error(png_ptr,
            "Incompatible libpng version in application and library");
      }
-
-     /* Libpng 1.0.6 was not binary compatible, due to insertion of the
-        info_ptr->free_me member.  Libpng-1.0.1 and earlier were not
-        compatible due to insertion of the user transform function. Note
-        to maintainer: this test can be removed from version 1.2.0 and
-        beyond because the previous test would have already rejected it. */
-
-     if (user_png_ver[0] == '1' && user_png_ver[2] == '0' &&
-         (user_png_ver[4] <  '2' || user_png_ver[4] == '6') &&
-         user_png_ver[5] == '\0')
-     {
-        png_error(png_ptr,
-        "Application must be recompiled; versions <= 1.0.6 were incompatible");
-     }
    }
 
    /* initialize zbuf - compression buffer */
@@ -516,11 +522,12 @@
    png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
       (png_uint_32)png_ptr->zbuf_size);
 
-   png_set_write_fn(png_ptr, NULL, NULL, NULL);
+   png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL,
+      png_flush_ptr_NULL);
 
 #if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
    png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,
-      1, NULL, NULL);
+      1, png_doublep_NULL, png_doublep_NULL);
 #endif
 
    return ((png_structp)png_ptr);
@@ -532,7 +539,7 @@
 png_write_init(png_structp png_ptr)
 {
    /* We only come here via pre-1.0.7-compiled applications */
-   png_write_init_2(png_ptr, "1.0.0", 0, 0);
+   png_write_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
 }
 
 #undef png_write_init_2
@@ -541,17 +548,39 @@
    png_size_t png_struct_size, png_size_t png_info_size)
 {
    /* We only come here via pre-1.0.12-compiled applications */
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+   if(sizeof(png_struct) > png_struct_size || sizeof(png_info) > png_info_size)
+   {
+      char msg[80];
+      png_ptr->warning_fn=NULL;
+      if (user_png_ver)
+      {
+        sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
+           user_png_ver);
+        png_warning(png_ptr, msg);
+      }
+      sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
+         png_libpng_ver);
+      png_warning(png_ptr, msg);
+   }
+#endif
    if(sizeof(png_struct) > png_struct_size)
      {
-       png_ptr->error_fn=(png_error_ptr)NULL;
+       png_ptr->error_fn=NULL;
+#ifdef PNG_ERROR_NUMBERS_SUPPORTED
+       png_ptr->flags=0;
+#endif
        png_error(png_ptr,
-         "The png struct allocated by the application is too small.");
+       "The png struct allocated by the application for writing is too small.");
      }
    if(sizeof(png_info) > png_info_size)
      {
-       png_ptr->error_fn=(png_error_ptr)NULL;
+       png_ptr->error_fn=NULL;
+#ifdef PNG_ERROR_NUMBERS_SUPPORTED
+       png_ptr->flags=0;
+#endif
        png_error(png_ptr,
-         "The info struct allocated by the application is too small.");
+       "The info struct allocated by the application for writing is too small.");
      }
    png_write_init_3(&png_ptr, user_png_ver, png_struct_size);
 }
@@ -573,7 +602,7 @@
 #ifdef PNG_LEGACY_SUPPORTED
        png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
 #else
-       png_ptr->warning_fn=(png_error_ptr)NULL;
+       png_ptr->warning_fn=NULL;
        png_warning(png_ptr,
      "Application uses deprecated png_write_init() and should be recompiled.");
        break;
@@ -598,12 +627,19 @@
    /* reset all variables to 0 */
    png_memset(png_ptr, 0, sizeof (png_struct));
 
+#if !defined(PNG_1_0_X)
+#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
+   png_init_mmx_flags(png_ptr);   /* 1.2.0 addition */
+#endif
+#endif /* PNG_1_0_X */
+
 #ifdef PNG_SETJMP_SUPPORTED
    /* restore jump buffer */
    png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf));
 #endif
 
-   png_set_write_fn(png_ptr, NULL, NULL, NULL);
+   png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL,
+      png_flush_ptr_NULL);
 
    /* initialize zbuf - compression buffer */
    png_ptr->zbuf_size = PNG_ZBUF_SIZE;
@@ -612,7 +648,7 @@
 
 #if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
    png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,
-      1, NULL, NULL);
+      1, png_doublep_NULL, png_doublep_NULL);
 #endif
 }
 
@@ -674,6 +710,11 @@
    /* initialize transformations and other stuff if first time */
    if (png_ptr->row_number == 0 && png_ptr->pass == 0)
    {
+   /* make sure we wrote the header info */
+   if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
+      png_error(png_ptr,
+         "png_write_info was never called before png_write_row.");
+
    /* check for transforms that have been set but were defined out */
 #if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED)
    if (png_ptr->transformations & PNG_INVERT_MONO)
@@ -912,6 +953,7 @@
       png_ptr = *png_ptr_ptr;
 #ifdef PNG_USER_MEM_SUPPORTED
       free_fn = png_ptr->free_fn;
+      mem_ptr = png_ptr->mem_ptr;
 #endif
    }
 
@@ -937,7 +979,7 @@
 #else
       png_destroy_struct((png_voidp)info_ptr);
 #endif
-      *info_ptr_ptr = (png_infop)NULL;
+      *info_ptr_ptr = NULL;
    }
 
    if (png_ptr != NULL)
@@ -949,7 +991,7 @@
 #else
       png_destroy_struct((png_voidp)png_ptr);
 #endif
-      *png_ptr_ptr = (png_structp)NULL;
+      *png_ptr_ptr = NULL;
    }
 }
 
diff --git a/pngwtran.c b/pngwtran.c
index 8740b83..dd90031 100644
--- a/pngwtran.c
+++ b/pngwtran.c
@@ -1,9 +1,9 @@
 
 /* pngwtran.c - transforms the data in a row for PNG writers
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  */
diff --git a/pngwutil.c b/pngwutil.c
index ed964ce..9c65f95 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,9 +1,9 @@
 
 /* pngwutil.c - utilities to write a PNG file
  *
- * libpng 1.0.12beta1 - May 14, 2001
+ * libpng 1.0.13 - April 15, 2002
  * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2001 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2002 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  */
@@ -25,7 +25,7 @@
    buf[3] = (png_byte)(i & 0xff);
 }
 
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
+#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED)
 /* The png_save_int_32 function assumes integers are stored in two's
  * complement format.  If this isn't the case, then this routine needs to
  * be modified to write data in two's complement format.
@@ -332,7 +332,8 @@
    /* handle the no-compression case */
    if (comp->input)
    {
-       png_write_chunk_data(png_ptr, (png_bytep)comp->input, comp->input_len);
+       png_write_chunk_data(png_ptr, (png_bytep)comp->input,
+                            (png_size_t)comp->input_len);
        return;
    }
 
@@ -537,8 +538,7 @@
 
    png_debug(1, "in png_write_PLTE\n");
    if ((
-#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
-    defined(PNG_WRITE_EMPTY_PLTE_PERMITTED)
+#if defined(PNG_MNG_FEATURES_SUPPORTED)
         !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) &&
 #endif
         num_pal == 0) || num_pal > 256)
@@ -608,7 +608,8 @@
    PNG_IEND;
 #endif
    png_debug(1, "in png_write_IEND\n");
-   png_write_chunk(png_ptr, (png_bytep)png_IEND, NULL, (png_size_t)0);
+   png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL,
+     (png_size_t)0);
    png_ptr->mode |= PNG_HAVE_IEND;
 }
 
@@ -642,7 +643,7 @@
 
    png_debug(1, "in png_write_gAMA\n");
    /* file_gamma is saved in 1/100,000ths */
-   png_save_uint_32(buf, file_gamma);
+   png_save_uint_32(buf, (png_uint_32)file_gamma);
    png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);
 }
 #endif
@@ -764,7 +765,7 @@
            png_save_uint_16(entrybuf + 6, ep->alpha);
            png_save_uint_16(entrybuf + 8, ep->frequency);
        }
-       png_write_chunk_data(png_ptr, entrybuf, entry_size);
+       png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size);
    }
 #else
    ep=spalette->entries;
@@ -939,32 +940,32 @@
 #endif
       return;
    }
-   png_save_uint_32(buf, white_x);
-   png_save_uint_32(buf + 4, white_y);
+   png_save_uint_32(buf, (png_uint_32)white_x);
+   png_save_uint_32(buf + 4, (png_uint_32)white_y);
 
    if (red_x > 80000L || red_y > 80000L || red_x + red_y > 100000L)
    {
       png_warning(png_ptr, "Invalid cHRM fixed red point specified");
       return;
    }
-   png_save_uint_32(buf + 8, red_x);
-   png_save_uint_32(buf + 12, red_y);
+   png_save_uint_32(buf + 8, (png_uint_32)red_x);
+   png_save_uint_32(buf + 12, (png_uint_32)red_y);
 
    if (green_x > 80000L || green_y > 80000L || green_x + green_y > 100000L)
    {
       png_warning(png_ptr, "Invalid fixed cHRM green point specified");
       return;
    }
-   png_save_uint_32(buf + 16, green_x);
-   png_save_uint_32(buf + 20, green_y);
+   png_save_uint_32(buf + 16, (png_uint_32)green_x);
+   png_save_uint_32(buf + 20, (png_uint_32)green_y);
 
    if (blue_x > 80000L || blue_y > 80000L || blue_x + blue_y > 100000L)
    {
       png_warning(png_ptr, "Invalid fixed cHRM blue point specified");
       return;
    }
-   png_save_uint_32(buf + 24, blue_x);
-   png_save_uint_32(buf + 28, blue_y);
+   png_save_uint_32(buf + 24, (png_uint_32)blue_x);
+   png_save_uint_32(buf + 28, (png_uint_32)blue_y);
 
    png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32);
 }
@@ -996,6 +997,12 @@
    else if (color_type == PNG_COLOR_TYPE_GRAY)
    {
       /* one 16 bit value */
+      if(tran->gray >= (1 << png_ptr->bit_depth))
+      {
+         png_warning(png_ptr,
+           "Ignoring attempt to write tRNS chunk out-of-range for bit_depth");
+         return;
+      }
       png_save_uint_16(buf, tran->gray);
       png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2);
    }
@@ -1005,6 +1012,12 @@
       png_save_uint_16(buf, tran->red);
       png_save_uint_16(buf + 2, tran->green);
       png_save_uint_16(buf + 4, tran->blue);
+      if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
+         {
+            png_warning(png_ptr,
+              "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8");
+            return;
+         }
       png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6);
    }
    else
@@ -1028,8 +1041,7 @@
    if (color_type == PNG_COLOR_TYPE_PALETTE)
    {
       if (
-#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
-    defined(PNG_WRITE_EMPTY_PLTE_PERMITTED)
+#if defined(PNG_MNG_FEATURES_SUPPORTED)
           (png_ptr->num_palette ||
           (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) &&
 #endif
@@ -1046,10 +1058,22 @@
       png_save_uint_16(buf, back->red);
       png_save_uint_16(buf + 2, back->green);
       png_save_uint_16(buf + 4, back->blue);
+      if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
+         {
+            png_warning(png_ptr,
+              "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8");
+            return;
+         }
       png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6);
    }
    else
    {
+      if(back->gray >= (1 << png_ptr->bit_depth))
+      {
+         png_warning(png_ptr,
+           "Ignoring attempt to write bKGD chunk out-of-range for bit_depth");
+         return;
+      }
       png_save_uint_16(buf, back->gray);
       png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2);
    }
@@ -1325,22 +1349,28 @@
       png_warning(png_ptr, "Empty keyword in iTXt chunk");
       return;
    }
-   if (lang == NULL || (lang_len = png_check_keyword(png_ptr, lang,
-      &new_lang))==0)
+   if (lang == NULL || (lang_len = png_check_keyword(png_ptr, lang, &new_lang))==0)
    {
       png_warning(png_ptr, "Empty language field in iTXt chunk");
-      return;
+      new_lang = NULL;
+      lang_len = 0;      
    }
-   lang_key_len = png_strlen(lang_key);
-   text_len = png_strlen(text);
 
-   if (text == NULL || *text == '\0')
+   if (lang_key == NULL)
+     lang_key_len = 0;
+   else
+     lang_key_len = png_strlen(lang_key);
+
+   if (text == NULL)
       text_len = 0;
+   else
+     text_len = png_strlen(text);
 
    /* compute the compressed data; do it now for the length */
    text_len = png_text_compress(png_ptr, text, text_len, compression-2,
       &comp);
 
+
    /* make sure we include the compression flag, the compression byte,
     * and the NULs after the key, lang, and lang_key parts */
 
@@ -1370,23 +1400,22 @@
    cbuf[1] = 0;
    png_write_chunk_data(png_ptr, cbuf, 2);
 
-   png_write_chunk_data(png_ptr, (png_bytep)new_lang, lang_len + 1);
-   png_write_chunk_data(png_ptr, (png_bytep)lang_key, lang_key_len+1);
-   png_write_chunk_data(png_ptr, '\0', 1);
-
+   cbuf[0] = 0;
+   png_write_chunk_data(png_ptr, (new_lang ? (png_bytep)new_lang : cbuf), lang_len + 1);
+   png_write_chunk_data(png_ptr, (lang_key ? (png_bytep)lang_key : cbuf), lang_key_len + 1);
    png_write_compressed_data_out(png_ptr, &comp);
 
    png_write_chunk_end(png_ptr);
    png_free(png_ptr, new_key);
-   png_free(png_ptr, new_lang);
+   if (new_lang)
+     png_free(png_ptr, new_lang);
 }
 #endif
 
 #if defined(PNG_WRITE_oFFs_SUPPORTED)
 /* write the oFFs chunk */
 void /* PRIVATE */
-png_write_oFFs(png_structp png_ptr, png_uint_32 x_offset,
-   png_uint_32 y_offset,
+png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
    int unit_type)
 {
 #ifdef PNG_USE_LOCAL_ARRAYS
@@ -1398,8 +1427,8 @@
    if (unit_type >= PNG_OFFSET_LAST)
       png_warning(png_ptr, "Unrecognized unit type for oFFs chunk");
 
-   png_save_uint_32(buf, x_offset);
-   png_save_uint_32(buf + 4, y_offset);
+   png_save_int_32(buf, x_offset);
+   png_save_int_32(buf + 4, y_offset);
    buf[8] = (png_byte)unit_type;
 
    png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9);
diff --git a/projects/msvc/README.txt b/projects/msvc/README.txt
index b08db7d..c0436f5 100644
--- a/projects/msvc/README.txt
+++ b/projects/msvc/README.txt
@@ -1,5 +1,5 @@
 Microsoft Developer Studio Build File, Format Version 6.00 for
-libpng 1.0.12beta1 (May 14, 2001) and zlib
+libpng 1.0.13 (April 15, 2002) and zlib
 
 Copyright (C) 2000 Simon-Pierre Cadieux
 For conditions of distribution and use, see copyright notice in png.h
@@ -24,12 +24,12 @@
 This project will build the PNG Development Group's "official" versions of
 libpng and zlib libraries:
 
-   libpng2.dll          (default version, currently C code only)
-   libpng2.dll         (C + Assembler version)
-   libpng2.dll         (C + Assembler debug version)
-   libpng2.dll         (C code debug version)
-   libpng2[c,e-m].dll   (reserved for official versions) 
-   libpng2[n-z].dll     (available for private versions)
+   libpng10.dll          (default version, currently C code only)
+   libpng10.dll         (C + Assembler version)
+   libpng10.dll         (C + Assembler debug version)
+   libpng10.dll         (C code debug version)
+   libpng10[c,e-m].dll   (reserved for official versions) 
+   libpng10[n-z].dll     (available for private versions)
    zlib.dll             (default version, currently C code only)
    zlibd.dll            (debug version)
 
diff --git a/projects/msvc/libpng.dsp b/projects/msvc/libpng.dsp
index 82f66db..4b6dd03 100644
--- a/projects/msvc/libpng.dsp
+++ b/projects/msvc/libpng.dsp
@@ -56,7 +56,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng2.dll"
+# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng10.dll"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "libpng - Win32 DLL Debug"
@@ -84,7 +84,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbg\libpng2d.dll"
+# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbg\libpng10d.dll"
 
 !ELSEIF  "$(CFG)" == "libpng - Win32 DLL ASM"
 
@@ -111,7 +111,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_asm\libpng2a.dll"
+# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_asm\libpng10a.dll"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "libpng - Win32 DLL Debug ASM"
@@ -139,7 +139,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbga\libpng2b.dll"
+# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbga\libpng10b.dll"
 
 !ELSEIF  "$(CFG)" == "libpng - Win32 LIB"
 
diff --git a/projects/msvc/png.rc b/projects/msvc/png.rc
index b9ef2d6..9912471 100644
--- a/projects/msvc/png.rc
+++ b/projects/msvc/png.rc
@@ -81,7 +81,7 @@
       VALUE "FileDescription", "PNG image compression library\000"
       VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
       VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_MAJOR) DLLFNAME_POSTFIX " (Windows 32 bit)\000"
-      VALUE "LegalCopyright", "\251 1998-2000 Glenn Randers-Pehrson\000"
+      VALUE "LegalCopyright", "\251 1998-2002 Glenn Randers-Pehrson\000"
       VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_MAJOR) DLLFNAME_POSTFIX ".DLL\000"
 #ifdef PRIVATEBUILD
       VALUE "PrivateBuild", PRIVATEBUILD
diff --git a/projects/msvc/png32ms.def b/projects/msvc/png32ms.def
index 388fdad..52d2731 100644
--- a/projects/msvc/png32ms.def
+++ b/projects/msvc/png32ms.def
@@ -6,7 +6,7 @@
 DESCRIPTION "PNG image compression library for Windows"
 
 EXPORTS
-;Version 1.0.12beta1
+;Version 1.0.13
   png_build_grayscale_palette  @1
   png_check_sig        @2
   png_chunk_error      @3
@@ -191,7 +191,7 @@
   png_write_init_3    @176
   png_info_init_3 @177
   png_destroy_struct  @178
-; To be added at version 1.2.0
+; Added at version 1.2.0
 ; For use with PNG_USER_MEM_SUPPORTED
 ; png_destroy_struct_2  @179
 ; png_create_read_struct_2 @180
@@ -211,3 +211,10 @@
 ; png_init_mmx_flags  @192
 ; Strip error numbers
 ; png_set_strip_error_numbers @193
+; Added at version 1.2.2
+  png_handle_as_unknown @179
+  png_zalloc @180
+  png_zfree @181
+; png_handle_as_unknown @194
+; png_zalloc @195
+; png_zfree @196
diff --git a/projects/netware.txt b/projects/netware.txt
new file mode 100644
index 0000000..d693042
--- /dev/null
+++ b/projects/netware.txt
@@ -0,0 +1,6 @@
+A set of project files is available for Netware.  Get
+libpng-1.0.13-project-netware.zip from a libpng distribution
+site such as http://libpng.sourceforge.net
+
+Put the zip file in this directory (projects) and then run
+"unzip -a libpng-1.0.13-project-netware.zip"
diff --git a/projects/wince.txt b/projects/wince.txt
new file mode 100644
index 0000000..ad89533
--- /dev/null
+++ b/projects/wince.txt
@@ -0,0 +1,6 @@
+A set of project files is available for WinCE.  Get
+libpng-1.0.13-project-wince.zip from a libpng distribution
+site such as http://libpng.sourceforge.net
+
+Put the zip file in this directory (projects) and then run
+"unzip -a libpng-1.0.13-project-wince.zip"
diff --git a/projects/wince/READMEE.WCE b/projects/wince/READMEE.WCE
deleted file mode 100644
index c211cf1..0000000
--- a/projects/wince/READMEE.WCE
+++ /dev/null
@@ -1,43 +0,0 @@
-libpng for WindowsCE Rel.1.0
-============================
- Copyright (c) 2000 Glenn Randers-Pehrson
- Copyright (c) 2000 Tenik Co.,Ltd.
-
- Porting for WindowsCE by Tenik Co.,Ltd.(Kazuo Adachi)
-
-
-Introduction
-============
-This is libpng 1.0.12beta1 ported to WindowsCE 2.0 and 2.11.
-libpng 1.0.12beta1 is a PNG reference library.
-See README, a document of original libpng 1.0.12beta1.
-
-zlib for WindowsCE
-==================
-This library requires zlib for WindowsCE.  You can use the supplied
-zlib.diff and zlibce.def files to add WindowsCE support to libpng-1.1.3.
-
-Copyright notice
-================
-This software is provided 'as-is', without any express or implied
-warranty.  In no event will the authors be held liable for any damages
-arising from the use of this software.
-
-See README and LICENSE, documents of original libpng 1.0.12beta1, for conditions
-of use and distribution.
-
-Files
-=====
-
- READMEE.WCE - this file(in English)
- READMEJ.WCE - this file(in Japanese)
- png32ce.def - module definition file to make DLLs
-
-Sample programs(../../pngtest.c and ../../contrib/*) can build on WindowsCE
-2.11.  WindowsCE 2.0 and below do not support 'console' functions.
-
-Author
-======
-Tenik Co.,Ltd.
-Kazuo Adachi
-adachi@tenik.co.jp
diff --git a/projects/wince/READMEJ.WCE b/projects/wince/READMEJ.WCE
deleted file mode 100644
index 4a2e2c3..0000000
--- a/projects/wince/READMEJ.WCE
+++ /dev/null
@@ -1,44 +0,0 @@
-libpng for WindowsCE Rel.1.0
-============================
- Copyright (c) 2000 Glenn Randers-Pehrson
- Copyright (c) 2000 Tenik Co.,Ltd.
-
- Porting for WindowsCE by Tenik Co.,Ltd.(Kazuo Adachi)
-
-
-‚Í‚¶‚ß‚É
-========
-libpng for WindowsCE‚Í PNGŒ`Ž®‚̉摜ƒf[ƒ^ƒ‰ƒCƒuƒ‰ƒŠ libpng‚ÌWindowsCE
-”Å‚Å‚·Blibpng‚ɂ‚¢‚Ă̏ڂµ‚¢à–¾‚́A•t‘®‚Ì README ‚ð‚¨“Ç‚Ý‚­‚¾‚³‚¢B
-
-zlib for WindowsCE
-==================
-libpng‚ł́Aƒf[ƒ^ˆ³kƒ‰ƒCƒuƒ‰ƒŠ‚Æ‚µ‚Ä zlib‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·Blibpng‚ð
-—˜—p‚·‚邽‚߂ɂ́A•Ê“r zlib‚ð—pˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B
-
-‚È‚¨A‚±‚̃pƒbƒP[ƒW‚Å—˜—p‚Å‚«‚é zlib‚ÍŽ„‚̍쐬‚µ‚½ zlibce.dll‚Å‚·B
-
-Žg—pðŒ
-========
-‚±‚̃\ƒtƒgƒEƒFƒA‚Í–³•ÛØ‚Å‚·B‚±‚̃\ƒtƒgƒEƒFƒA‚ªŒ´ˆö‚Å—˜—pŽÒ‚ª”í‚邱‚Æ
-‚É‚È‚Á‚½‚¢‚©‚È‚é”íŠQ‚ɂ‚¢‚Ä‚àAìŽÒA”z•zŽÒA‚»‚Ì‘¼—˜—pŽÒˆÈŠO‚̐l•¨A
-’c‘̂ɐӔC‚ð‚Æ‚é‹`–±‚Í‚È‚¢‚à‚Ì‚Æ‚µ‚Ü‚·B
-
-‚»‚Ì‘¼A‚±‚̃\ƒtƒgƒEƒFƒA‚Ì—˜—pðŒ‚ɂ‚¢‚ẮAŒ´”Å‚Å‚ ‚é libpng 1.0.12beta1‚É
-€‹’‚·‚é‚à‚Ì‚Æ‚µ‚Ü‚·BÚ‚µ‚­‚́A•t‘®‚Ì README,LICENSE ‚ð‚¨“Ç‚Ý‚­‚¾‚³‚¢B
-
-Žû˜^“à—e
-========
-
- READMEJ.WCE - ‚±‚̃tƒ@ƒCƒ‹
- READMEE.WCE - ‚±‚̃tƒ@ƒCƒ‹(‰pŒê)
- png32ce.def - DLLì¬—p ’è‹`ƒtƒ@ƒCƒ‹
-
-•t‘®ƒTƒ“ƒvƒ‹EƒvƒƒOƒ‰ƒ€‚́AƒƒbƒZ[ƒWo—Í‚Ì“s‡ãAWindowsCE 2.11ˆÈ~
-‚Å‚Ì‚ÝŽg—p‰Â”\‚Å‚·B
-
-”z•zŽÒ
-======
-ƒeƒjƒbƒNŠ”Ž®‰ïŽÐ ŠJ”­•”
-‘«—§ ˜a—Y
-adachi@tenik.co.jp
diff --git a/projects/wince/READMEZE.WCE b/projects/wince/READMEZE.WCE
deleted file mode 100644
index b6064bd..0000000
--- a/projects/wince/READMEZE.WCE
+++ /dev/null
@@ -1,39 +0,0 @@
-zlib for WindowsCE Rel.1.0
-==========================
- (C) 1995-1998 Jean-loup Gailly and Mark Adler
- (C) 2000      Tenik Co.,Ltd.
-
- Porting for WindowsCE by Tenik Co.,Ltd.(Kazuo Adachi)
-
-
-Introduction
-============
-This is zlib 1.1.3 ported to WindowsCE 2.0 and 2.11.
-zlib 1.1.3 is a general purpose data compression library.
-See README, a document of original zlib 1.1.3.
-
-Copyright notice
-================
-This software is provided 'as-is', without any express or implied
-warranty.  In no event will the authors be held liable for any damages
-arising from the use of this software.
-
-See README, a document of original zlib 1.1.3, for conditions of use and
-distribution.
-
-Files
-=====
-
- READMEE.WCE - this file(in English)
- READMEJ.WCE - this file(in Japanese)
- zlibce.def  - module definition file to make DLLs
- zlibce.diff - patch file for source code
-
-Sample programs(minigzip.c and example.c) can build on WindowsCE 2.11.
-WindowsCE 2.0 and below is not support 'console' functions.
-
-Author
-======
-Tenik Co.,Ltd.
-Kazuo Adachi
-adachi@tenik.co.jp
diff --git a/projects/wince/READMEZJ.WCE b/projects/wince/READMEZJ.WCE
deleted file mode 100644
index 41f408f..0000000
--- a/projects/wince/READMEZJ.WCE
+++ /dev/null
@@ -1,41 +0,0 @@
-zlib for WindowsCE Rel.1.0
-==========================
- (C) 1995-1998 Jean-loup Gailly and Mark Adler
- (C) 2000      Tenik Co.,Ltd.
-
- Porting for WindowsCE by Tenik Co.,Ltd.(Kazuo Adachi)
-
-
-‚Í‚¶‚ß‚É
-========
-zlib for WindowsCE‚͔ėp‚̃f[ƒ^ˆ³kƒ‰ƒCƒuƒ‰ƒŠ zlib‚Ì WindowsCE”Å‚Å‚·B
-zlib‚ɂ‚¢‚Ă̏ڂµ‚¢à–¾‚́A•t‘®‚Ì README ‚ð‚¨“Ç‚Ý‚­‚¾‚³‚¢B
-
-Žg—pðŒ
-========
-‚±‚̃\ƒtƒgƒEƒFƒA‚Í–³•ÛØ‚Å‚·B‚±‚̃\ƒtƒgƒEƒFƒA‚ªŒ´ˆö‚Å—˜—pŽÒ‚ª”í‚邱‚Æ
-‚É‚È‚Á‚½‚¢‚©‚È‚é”íŠQ‚ɂ‚¢‚Ä‚àAìŽÒA”z•zŽÒA‚»‚Ì‘¼—˜—pŽÒˆÈŠO‚̐l•¨A
-’c‘̂ɐӔC‚ð‚Æ‚é‹`–±‚Í‚È‚¢‚à‚Ì‚Æ‚µ‚Ü‚·B
-
-‚»‚Ì‘¼A‚±‚̃\ƒtƒgƒEƒFƒA‚Ì—˜—pðŒ‚ɂ‚¢‚ẮAŒ´”Å‚Å‚ ‚é zlib 1.1.3‚É
-€‹’‚·‚é‚à‚Ì‚Æ‚µ‚Ü‚·BÚ‚µ‚­‚́A•t‘®‚Ì README ‚ð‚¨“Ç‚Ý‚­‚¾‚³‚¢B
-
-Žû˜^“à—e
-========
-
- READMEJ.WCE - ‚±‚̃tƒ@ƒCƒ‹
- READMEE.WCE - ‚±‚̃tƒ@ƒCƒ‹(‰pŒê)
- zlibce.diff - ƒ\[ƒXƒR[ƒh·•ªƒtƒ@ƒCƒ‹
- zlibce.def  - DLLì¬—p ’è‹`ƒtƒ@ƒCƒ‹
-
-Œ´”Å‚Ì zlib 1.1.3‚Ƃ̍őå‚̈Ⴂ‚́Agzio.c‚̃R[ƒh‚Å‚·BWindowsCE‚É‚Í
-stdio.h(open“™‚̊֐”)‚ª‘¶Ý‚µ‚È‚¢‚½‚߁A“ÆŽ©‚Ì gziowce.c‚ðì¬‚µ‚Ü‚µ‚½B
-
-minigzip.c‚Æ example.c‚Ì•t‘®ƒTƒ“ƒvƒ‹EƒvƒƒOƒ‰ƒ€‚́AƒƒbƒZ[ƒWo—Í‚Ì
-“s‡ãAWindowsCE 2.11ˆÈ~‚Å‚Ì‚ÝŽg—p‰Â”\‚Å‚·B
-
-”z•zŽÒ
-======
-ƒeƒjƒbƒNŠ”Ž®‰ïŽÐ ŠJ”­•”
-‘«—§ ˜a—Y
-adachi@tenik.co.jp
diff --git a/projects/wince/lpngce.dsp b/projects/wince/lpngce.dsp
deleted file mode 100644
index 7a24bcf..0000000
--- a/projects/wince/lpngce.dsp
+++ /dev/null
@@ -1,3731 +0,0 @@
-# Microsoft Developer Studio Project File - Name="lpngce" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (WCE x86em) Dynamic-Link Library" 0x7f02
-# TARGTYPE "Win32 (WCE SH3) Dynamic-Link Library" 0x8102
-# TARGTYPE "Win32 (WCE PPC) Dynamic-Link Library" 0x8402
-# TARGTYPE "Win32 (WCE x86) Dynamic-Link Library" 0x8302
-# TARGTYPE "Win32 (WCE MIPSFP) Dynamic-Link Library" 0x8702
-# TARGTYPE "Win32 (WCE ARM) Dynamic-Link Library" 0x8502
-# TARGTYPE "Win32 (WCE SH4) Dynamic-Link Library" 0x8602
-# TARGTYPE "Win32 (WCE MIPS) Dynamic-Link Library" 0x8202
-
-CFG=lpngce - Win32 (WCE MIPS) Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "lpngce.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "lpngce.mak" CFG="lpngce - Win32 (WCE MIPS) Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "lpngce - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE MIPS) Debug" (based on "Win32 (WCE MIPS) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE SH4) Release" (based on "Win32 (WCE SH4) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE SH4) Debug" (based on "Win32 (WCE SH4) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE SH3) Debug" (based on "Win32 (WCE SH3) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE MIPSFP) Release" (based on "Win32 (WCE MIPSFP) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE MIPSFP) Debug" (based on "Win32 (WCE MIPSFP) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE PPC) Release" (based on "Win32 (WCE PPC) Dynamic-Link Library")
-!MESSAGE "lpngce - Win32 (WCE PPC) Debug" (based on "Win32 (WCE PPC) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath "H/PC Ver. 2.00"
-# PROP WCE_FormatVersion "6.0"
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WMIPSRel"
-# PROP BASE Intermediate_Dir "WMIPSRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WMIPSRel"
-# PROP Intermediate_Dir "WMIPSRel"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /QMRWCE /c
-# ADD CPP /nologo /M$(CECrt) /W3 /O2 /I "..\..\..\zlib" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /QMRWCE /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WMIPSDbg"
-# PROP BASE Intermediate_Dir "WMIPSDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WMIPSDbg"
-# PROP Intermediate_Dir "WMIPSDbg"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /QMRWCE /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /QMRWCE /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCESH4Rel"
-# PROP BASE Intermediate_Dir "WCESH4Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCESH4Rel"
-# PROP Intermediate_Dir "WCESH4Rel"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /Qsh4 /MC /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /Qsh4 /MC /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCESH4Dbg"
-# PROP BASE Intermediate_Dir "WCESH4Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCESH4Dbg"
-# PROP Intermediate_Dir "WCESH4Dbg"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /Qsh4 /MC /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /Qsh4 /MC /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCESH3Rel"
-# PROP BASE Intermediate_Dir "WCESH3Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCESH3Rel"
-# PROP Intermediate_Dir "WCESH3Rel"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrt) /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCESH3Dbg"
-# PROP BASE Intermediate_Dir "WCESH3Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCESH3Dbg"
-# PROP Intermediate_Dir "WCESH3Dbg"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEARMRel"
-# PROP BASE Intermediate_Dir "WCEARMRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEARMRel"
-# PROP Intermediate_Dir "WCEARMRel"
-# PROP Target_Dir ""
-CPP=clarm.exe
-# ADD BASE CPP /nologo /MC /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /MC /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 coredll.lib commctrl.lib /nologo /dll /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 coredll.lib commctrl.lib /nologo /dll /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEARMDbg"
-# PROP BASE Intermediate_Dir "WCEARMDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEARMDbg"
-# PROP Intermediate_Dir "WCEARMDbg"
-# PROP Target_Dir ""
-CPP=clarm.exe
-# ADD BASE CPP /nologo /MC /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /MC /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 coredll.lib commctrl.lib /nologo /dll /debug /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 coredll.lib commctrl.lib /nologo /dll /debug /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WMIPSFPRel"
-# PROP BASE Intermediate_Dir "WMIPSFPRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WMIPSFPRel"
-# PROP Intermediate_Dir "WMIPSFPRel"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /QMFWCE /MC /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /QMFWCE /MC /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WMIPSFPDbg"
-# PROP BASE Intermediate_Dir "WMIPSFPDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WMIPSFPDbg"
-# PROP Intermediate_Dir "WMIPSFPDbg"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /QMFWCE /MC /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /QMFWCE /MC /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEX86Rel"
-# PROP BASE Intermediate_Dir "WCEX86Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEX86Rel"
-# PROP Intermediate_Dir "WCEX86Rel"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /W3 /O2 /D "x86" /D "_i386_" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "NDEBUG" /D "i_386_" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /Gs8192 /GF /c
-# ADD CPP /nologo /ML /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "x86" /D "_i386_" /D "_x86_" /D "NDEBUG" /D "i_386_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /Gs8192 /GF /c
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /dll /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /dll /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEX86Dbg"
-# PROP BASE Intermediate_Dir "WCEX86Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEX86Dbg"
-# PROP Intermediate_Dir "WCEX86Dbg"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MLd /W3 /Zi /Od /D "x86" /D "_i386_" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "DEBUG" /D "i_386_" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /Gs8192 /GF /c
-# ADD CPP /nologo /MLd /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "x86" /D "_i386_" /D "_x86_" /D "DEBUG" /D "i_386_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /Gs8192 /GF /c
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /dll /debug /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /dll /debug /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "x86emRel"
-# PROP BASE Intermediate_Dir "x86emRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "x86emRel"
-# PROP Intermediate_Dir "x86emRel"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /W3 /O2 /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "NDEBUG" /D "x86" /D "i486" /D "_x86_" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /ML /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "_UNICODE" /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "NDEBUG" /D "x86" /D "i486" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "NDEBUG"
-# ADD RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "x86emDbg"
-# PROP BASE Intermediate_Dir "x86emDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "x86emDbg"
-# PROP Intermediate_Dir "x86emDbg"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MLd /W3 /Gm /Zi /Od /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "_DEBUG" /D "x86" /D "i486" /D "_x86_" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /MLd /W3 /Gm /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "_UNICODE" /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "_DEBUG" /D "x86" /D "i486" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "_DEBUG" /d "x86" /d "i486" /d "_x86_"
-# ADD RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "_DEBUG" /d "x86" /d "i486" /d "_x86_"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /debug /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /debug /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEPPCRel"
-# PROP BASE Intermediate_Dir "WCEPPCRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEPPCRel"
-# PROP Intermediate_Dir "WCEPPCRel"
-# PROP Target_Dir ""
-CPP=clppc.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "PPC" /D "_PPC_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrt) /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "PPC" /D "_PPC_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEPPCDbg"
-# PROP BASE Intermediate_Dir "WCEPPCDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEPPCDbg"
-# PROP Intermediate_Dir "WCEPPCDbg"
-# PROP Target_Dir ""
-CPP=clppc.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "PPC" /D "_PPC_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "LPNGCE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "PPC" /D "_PPC_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ENDIF 
-
-# Begin Target
-
-# Name "lpngce - Win32 (WCE MIPS) Release"
-# Name "lpngce - Win32 (WCE MIPS) Debug"
-# Name "lpngce - Win32 (WCE SH4) Release"
-# Name "lpngce - Win32 (WCE SH4) Debug"
-# Name "lpngce - Win32 (WCE SH3) Release"
-# Name "lpngce - Win32 (WCE SH3) Debug"
-# Name "lpngce - Win32 (WCE ARM) Release"
-# Name "lpngce - Win32 (WCE ARM) Debug"
-# Name "lpngce - Win32 (WCE MIPSFP) Release"
-# Name "lpngce - Win32 (WCE MIPSFP) Debug"
-# Name "lpngce - Win32 (WCE x86) Release"
-# Name "lpngce - Win32 (WCE x86) Debug"
-# Name "lpngce - Win32 (WCE x86em) Release"
-# Name "lpngce - Win32 (WCE x86em) Debug"
-# Name "lpngce - Win32 (WCE PPC) Release"
-# Name "lpngce - Win32 (WCE PPC) Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\png.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNG_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNG_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNG_C=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNG_C=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\png32ce.def
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngerror.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGER=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGER=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pnggccrd.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGGC=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGGC=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGGC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngget.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGGE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGGE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGGE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGGE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngmem.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGME=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGME=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGME=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGME=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngpread.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGPR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGPR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngread.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGRE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGRE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGRE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrio.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGRI=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGRI=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGRI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrtran.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGRT=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGRT=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGRT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrutil.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGRU=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGRU=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGRU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGRU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngset.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGSE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGSE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGSE=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGSE=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngtrans.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGTR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGTR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGTR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngvcrd.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGVC=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGVC=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGVC=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGVC=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwio.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGWI=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGWI=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGWI=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWI=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwrite.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGWR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGWR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGWR=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWR=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwtran.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGWT=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGWT=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGWT=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWT=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwutil.c
-
-!IF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGWU=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGWU=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "lpngce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGWU=\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGWU=\
-	"..\..\alloc.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\png.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngconf.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/projects/wince/lpngce.dsw b/projects/wince/lpngce.dsw
deleted file mode 100644
index d3e48e3..0000000
--- a/projects/wince/lpngce.dsw
+++ /dev/null
@@ -1,44 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "lpngce"=.\lpngce.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name zlibce
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "zlibce"=.\zlibce.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/projects/wince/png32ce.def b/projects/wince/png32ce.def
deleted file mode 100644
index f97061f..0000000
--- a/projects/wince/png32ce.def
+++ /dev/null
@@ -1,212 +0,0 @@
-;------------------------------------------
-; LIBPNG module definition file for Windows
-;------------------------------------------
-
-LIBRARY lpngce
-
-EXPORTS
-;Version 1.0.12beta1
-  png_build_grayscale_palette  @1
-  png_check_sig        @2
-  png_chunk_error      @3
-  png_chunk_warning      @4
-;  png_convert_from_struct_tm   @5
-;  png_convert_from_time_t    @6
-  png_create_info_struct     @7
-  png_create_read_struct     @8
-  png_create_write_struct    @9
-  png_data_freer    @10
-  png_destroy_info_struct  @11
-  png_destroy_read_struct  @12
-  png_destroy_write_struct  @13
-  png_error    @14
-  png_free      @15
-  png_free_data    @16
-  png_get_IHDR    @17
-  png_get_PLTE    @18
-  png_get_bKGD    @19
-  png_get_bit_depth    @20
-  png_get_cHRM    @21
-  png_get_cHRM_fixed  @22
-  png_get_channels    @23
-  png_get_color_type  @24
-  png_get_compression_buffer_size  @25
-  png_get_compression_type  @26
-  png_get_copyright    @27
-  png_get_error_ptr    @28
-  png_get_filter_type  @29
-  png_get_gAMA    @30
-  png_get_gAMA_fixed  @31
-  png_get_hIST    @32
-  png_get_header_ver  @33
-  png_get_header_version  @34
-  png_get_iCCP    @35
-  png_get_image_height  @36
-  png_get_image_width  @37
-  png_get_interlace_type  @38
-  png_get_io_ptr    @39
-  png_get_libpng_ver  @40
-  png_get_oFFs    @41
-  png_get_pCAL    @42
-  png_get_pHYs    @43
-  png_get_pixel_aspect_ratio  @44
-  png_get_pixels_per_meter  @45
-  png_get_progressive_ptr  @46
-  png_get_rgb_to_gray_status  @47
-  png_get_rowbytes    @48
-  png_get_rows    @49
-  png_get_sBIT    @50
-  png_get_sCAL    @51
-  png_get_sPLT    @52
-  png_get_sRGB    @53
-  png_get_signature    @54
-  png_get_tIME    @55
-  png_get_tRNS    @56
-  png_get_text    @57
-  png_get_unknown_chunks  @58
-  png_get_user_chunk_ptr  @59
-  png_get_user_transform_ptr  @60
-  png_get_valid    @61
-  png_get_x_offset_microns  @62
-  png_get_x_offset_pixels  @63
-  png_get_x_pixels_per_meter  @64
-  png_get_y_offset_microns  @65
-  png_get_y_offset_pixels  @66
-  png_get_y_pixels_per_meter  @67
-  png_malloc    @68
-  png_memcpy_check    @69
-  png_memset_check    @70
-; png_permit_empty_plte is deprecated
-  png_permit_empty_plte  @71
-  png_process_data    @72
-  png_progressive_combine_row  @73
-  png_read_end    @74
-  png_read_image    @75
-  png_read_info    @76
-; png_read_init is deprecated
-  png_read_init    @77
-  png_read_png    @78
-  png_read_row    @79
-  png_read_rows    @80
-  png_read_update_info  @81
-  png_reset_zstream    @82
-  png_set_IHDR    @83
-  png_set_PLTE    @84
-  png_set_bKGD    @85
-  png_set_background  @86
-  png_set_bgr    @87
-  png_set_cHRM    @88
-  png_set_cHRM_fixed  @89
-  png_set_compression_buffer_size  @90
-  png_set_compression_level  @91
-  png_set_compression_mem_level  @92
-  png_set_compression_method  @93
-  png_set_compression_strategy  @94
-  png_set_compression_window_bits  @95
-  png_set_crc_action  @96
-  png_set_dither    @97
-  png_set_error_fn    @98
-  png_set_expand    @99
-  png_set_filler    @100
-  png_set_filter    @101
-  png_set_filter_heuristics  @102
-  png_set_flush    @103
-  png_set_gAMA    @104
-  png_set_gAMA_fixed  @105
-  png_set_gamma    @106
-  png_set_gray_1_2_4_to_8  @107
-  png_set_gray_to_rgb  @108
-  png_set_hIST    @109
-  png_set_iCCP    @110
-  png_set_interlace_handling  @111
-  png_set_invert_alpha  @112
-  png_set_invert_mono  @113
-  png_set_keep_unknown_chunks  @114
-  png_set_oFFs    @115
-  png_set_pCAL    @116
-  png_set_pHYs    @117
-  png_set_packing    @118
-  png_set_packswap    @119
-  png_set_palette_to_rgb  @120
-  png_set_progressive_read_fn  @121
-  png_set_read_fn    @122
-  png_set_read_status_fn  @123
-  png_set_read_user_chunk_fn  @124
-  png_set_read_user_transform_fn  @125
-  png_set_rgb_to_gray  @126
-  png_set_rgb_to_gray_fixed  @127
-  png_set_rows    @128
-  png_set_sBIT    @129
-  png_set_sCAL    @130
-  png_set_sPLT    @131
-  png_set_sRGB    @132
-  png_set_sRGB_gAMA_and_cHRM  @133
-  png_set_shift    @134
-  png_set_sig_bytes    @135
-  png_set_strip_16    @136
-  png_set_strip_alpha  @137
-  png_set_swap    @138
-  png_set_swap_alpha  @139
-  png_set_tIME    @140
-  png_set_tRNS    @141
-  png_set_tRNS_to_alpha  @142
-  png_set_text    @143
-  png_set_unknown_chunk_location  @144
-  png_set_unknown_chunks  @145
-  png_set_user_transform_info  @146
-  png_set_write_fn    @147
-  png_set_write_status_fn  @148
-  png_set_write_user_transform_fn  @149
-  png_sig_cmp    @150
-  png_start_read_image  @151
-  png_warning    @152
-  png_write_chunk    @153
-  png_write_chunk_data  @154
-  png_write_chunk_end  @155
-  png_write_chunk_start  @156
-  png_write_end    @157
-  png_write_flush    @158
-  png_write_image    @159
-  png_write_info    @160
-  png_write_info_before_PLTE  @161
-; png_write_init is deprecated
-  png_write_init    @162
-  png_write_png    @163
-  png_write_row    @164
-  png_write_rows    @165
-; png_read_init_2 and png_write_init_2 are deprecated.
-  png_read_init_2    @166
-  png_write_init_2    @167
-  png_access_version_number  @168
-;  png_sig_bytes    @169
-;  png_libpng_ver    @170
-  png_init_io    @171
-  png_convert_to_rfc1123     @172
-  png_set_invalid  @173
-; Added at version 1.0.12
-; For compatiblity with 1.0.7-1.0.11
-  png_info_init @174
-  png_read_init_3    @175
-  png_write_init_3    @176
-  png_info_init_3 @177
-  png_destroy_struct  @178
-; To be added at version 1.2.0
-; For use with PNG_USER_MEM_SUPPORTED
-; png_destroy_struct_2  @179
-; png_create_read_struct_2 @180
-; png_create_write_struct_2 @181
-; png_malloc_default @182
-; png_free_default @183
-; MNG features
-; png_permit_mng_features  @184
-; MMX support
-; png_mmx_support  @185
-; png_get_mmx_flagmask  @186
-; png_get_asm_flagmask  @187
-; png_get_asm_flags  @188
-; png_get_mmx_bitdepth_threshold  @189
-; png_get_mmx_rowbytes_threshold  @190
-; png_set_asm_flags  @191
-; png_init_mmx_flags  @192
-; Strip error numbers
-; png_set_strip_error_numbers @193
diff --git a/projects/wince/pngtest.dsp b/projects/wince/pngtest.dsp
deleted file mode 100644
index 5ade500..0000000
--- a/projects/wince/pngtest.dsp
+++ /dev/null
@@ -1,812 +0,0 @@
-# Microsoft Developer Studio Project File - Name="pngtest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (WCE x86) Application" 0x8301
-# TARGTYPE "Win32 (WCE ARM) Application" 0x8501
-# TARGTYPE "Win32 (WCE PPC) Application" 0x8401
-# TARGTYPE "Win32 (WCE x86em) Application" 0x7f01
-# TARGTYPE "Win32 (WCE SH3) Application" 0x8101
-# TARGTYPE "Win32 (WCE SH4) Application" 0x8601
-# TARGTYPE "Win32 (WCE MIPS) Application" 0x8201
-# TARGTYPE "Win32 (WCE MIPSFP) Application" 0x8701
-
-CFG=pngtest - Win32 (WCE MIPS) Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "pngtest.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "pngtest.mak" CFG="pngtest - Win32 (WCE MIPS) Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "pngtest - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Application")
-!MESSAGE "pngtest - Win32 (WCE MIPS) Debug" (based on "Win32 (WCE MIPS) Application")
-!MESSAGE "pngtest - Win32 (WCE SH4) Release" (based on "Win32 (WCE SH4) Application")
-!MESSAGE "pngtest - Win32 (WCE SH4) Debug" (based on "Win32 (WCE SH4) Application")
-!MESSAGE "pngtest - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Application")
-!MESSAGE "pngtest - Win32 (WCE SH3) Debug" (based on "Win32 (WCE SH3) Application")
-!MESSAGE "pngtest - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Application")
-!MESSAGE "pngtest - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Application")
-!MESSAGE "pngtest - Win32 (WCE MIPSFP) Release" (based on "Win32 (WCE MIPSFP) Application")
-!MESSAGE "pngtest - Win32 (WCE MIPSFP) Debug" (based on "Win32 (WCE MIPSFP) Application")
-!MESSAGE "pngtest - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Application")
-!MESSAGE "pngtest - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Application")
-!MESSAGE "pngtest - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Application")
-!MESSAGE "pngtest - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Application")
-!MESSAGE "pngtest - Win32 (WCE PPC) Release" (based on "Win32 (WCE PPC) Application")
-!MESSAGE "pngtest - Win32 (WCE PPC) Debug" (based on "Win32 (WCE PPC) Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath "H/PC Pro 2.11"
-# PROP WCE_FormatVersion "6.0"
-
-!IF  "$(CFG)" == "pngtest - Win32 (WCE MIPS) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WMIPSRel"
-# PROP BASE Intermediate_Dir "WMIPSRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WMIPSRel"
-# PROP Intermediate_Dir "WMIPSRel"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /QMRWCE /c
-# ADD CPP /nologo /M$(CECrt) /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /QMRWCE /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPS) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WMIPSDbg"
-# PROP BASE Intermediate_Dir "WMIPSDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WMIPSDbg"
-# PROP Intermediate_Dir "WMIPSDbg"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /QMRWCE /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /QMRWCE /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH4) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCESH4Rel"
-# PROP BASE Intermediate_Dir "WCESH4Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCESH4Rel"
-# PROP Intermediate_Dir "WCESH4Rel"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /Qsh4 /MC /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /Qsh4 /MC /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH4) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCESH4Dbg"
-# PROP BASE Intermediate_Dir "WCESH4Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCESH4Dbg"
-# PROP Intermediate_Dir "WCESH4Dbg"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /Qsh4 /MC /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /Qsh4 /MC /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /debug /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /debug /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH3) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCESH3Rel"
-# PROP BASE Intermediate_Dir "WCESH3Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCESH3Rel"
-# PROP Intermediate_Dir "WCESH3Rel"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /M$(CECrt) /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH3) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCESH3Dbg"
-# PROP BASE Intermediate_Dir "WCESH3Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCESH3Dbg"
-# PROP Intermediate_Dir "WCESH3Dbg"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /debug /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /debug /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE ARM) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEARMRel"
-# PROP BASE Intermediate_Dir "WCEARMRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEARMRel"
-# PROP Intermediate_Dir "WCEARMRel"
-# PROP Target_Dir ""
-CPP=clarm.exe
-# ADD BASE CPP /nologo /MC /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /MC /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 coredll.lib commctrl.lib /nologo /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 coredll.lib commctrl.lib /nologo /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE ARM) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEARMDbg"
-# PROP BASE Intermediate_Dir "WCEARMDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEARMDbg"
-# PROP Intermediate_Dir "WCEARMDbg"
-# PROP Target_Dir ""
-CPP=clarm.exe
-# ADD BASE CPP /nologo /MC /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /MC /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 coredll.lib commctrl.lib /nologo /debug /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 coredll.lib commctrl.lib /nologo /debug /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPSFP) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WMIPSFPRel"
-# PROP BASE Intermediate_Dir "WMIPSFPRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WMIPSFPRel"
-# PROP Intermediate_Dir "WMIPSFPRel"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /QMFWCE /MC /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /QMFWCE /MC /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPSFP) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WMIPSFPDbg"
-# PROP BASE Intermediate_Dir "WMIPSFPDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WMIPSFPDbg"
-# PROP Intermediate_Dir "WMIPSFPDbg"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /QMFWCE /MC /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /QMFWCE /MC /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEX86Rel"
-# PROP BASE Intermediate_Dir "WCEX86Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEX86Rel"
-# PROP Intermediate_Dir "WCEX86Rel"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /W3 /O2 /D "x86" /D "_i386_" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "NDEBUG" /D "i_386_" /D "_MBCS" /Gs8192 /GF /c
-# ADD CPP /nologo /ML /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "x86" /D "_i386_" /D "_x86_" /D "NDEBUG" /D "i_386_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /Gs8192 /GF /c
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEX86Dbg"
-# PROP BASE Intermediate_Dir "WCEX86Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEX86Dbg"
-# PROP Intermediate_Dir "WCEX86Dbg"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MLd /W3 /Zi /Od /D "x86" /D "_i386_" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "DEBUG" /D "i_386_" /D "_MBCS" /Gs8192 /GF /c
-# ADD CPP /nologo /MLd /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "x86" /D "_i386_" /D "_x86_" /D "DEBUG" /D "i_386_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /Gs8192 /GF /c
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /debug /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /debug /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86em) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "x86emRel"
-# PROP BASE Intermediate_Dir "x86emRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "x86emRel"
-# PROP Intermediate_Dir "x86emRel"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /W3 /O2 /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "NDEBUG" /D "x86" /D "i486" /D "_x86_" /D "_MBCS" /YX /c
-# ADD CPP /nologo /ML /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "_UNICODE" /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "NDEBUG" /D "x86" /D "i486" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "NDEBUG"
-# ADD RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /subsystem:windows /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /subsystem:windows /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86em) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "x86emDbg"
-# PROP BASE Intermediate_Dir "x86emDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "x86emDbg"
-# PROP Intermediate_Dir "x86emDbg"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MLd /W3 /Gm /Zi /Od /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "_DEBUG" /D "x86" /D "i486" /D "_x86_" /D "_MBCS" /YX /c
-# ADD CPP /nologo /MLd /W3 /Gm /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "_UNICODE" /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "_DEBUG" /D "x86" /D "i486" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "_DEBUG" /d "x86" /d "i486" /d "_x86_"
-# ADD RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "_DEBUG" /d "x86" /d "i486" /d "_x86_"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /subsystem:windows /debug /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /subsystem:windows /debug /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE PPC) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEPPCRel"
-# PROP BASE Intermediate_Dir "WCEPPCRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEPPCRel"
-# PROP Intermediate_Dir "WCEPPCRel"
-# PROP Target_Dir ""
-CPP=clppc.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "PPC" /D "_PPC_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /M$(CECrt) /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "PPC" /D "_PPC_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE PPC) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEPPCDbg"
-# PROP BASE Intermediate_Dir "WCEPPCDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEPPCDbg"
-# PROP Intermediate_Dir "WCEPPCDbg"
-# PROP Target_Dir ""
-CPP=clppc.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "PPC" /D "_PPC_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /YX /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "PPC" /D "_PPC_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "PNG_USE_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /debug /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /debug /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ENDIF 
-
-# Begin Target
-
-# Name "pngtest - Win32 (WCE MIPS) Release"
-# Name "pngtest - Win32 (WCE MIPS) Debug"
-# Name "pngtest - Win32 (WCE SH4) Release"
-# Name "pngtest - Win32 (WCE SH4) Debug"
-# Name "pngtest - Win32 (WCE SH3) Release"
-# Name "pngtest - Win32 (WCE SH3) Debug"
-# Name "pngtest - Win32 (WCE ARM) Release"
-# Name "pngtest - Win32 (WCE ARM) Debug"
-# Name "pngtest - Win32 (WCE MIPSFP) Release"
-# Name "pngtest - Win32 (WCE MIPSFP) Debug"
-# Name "pngtest - Win32 (WCE x86) Release"
-# Name "pngtest - Win32 (WCE x86) Debug"
-# Name "pngtest - Win32 (WCE x86em) Release"
-# Name "pngtest - Win32 (WCE x86em) Debug"
-# Name "pngtest - Win32 (WCE PPC) Release"
-# Name "pngtest - Win32 (WCE PPC) Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\pngtest.c
-
-!IF  "$(CFG)" == "pngtest - Win32 (WCE MIPS) Release"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH4) Release"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH4) Debug"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH3) Release"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH3) Debug"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE ARM) Release"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE ARM) Debug"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86) Release"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86) Debug"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86em) Release"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86em) Debug"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE PPC) Release"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE PPC) Debug"
-
-DEP_CPP_PNGTE=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\png.h"\
-	"..\..\pngconf.h"\
-	
-NODEP_CPP_PNGTE=\
-	"..\..\alloc.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\winmain.c
-
-!IF  "$(CFG)" == "pngtest - Win32 (WCE MIPS) Release"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPS) Debug"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH4) Release"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH4) Debug"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH3) Release"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE SH3) Debug"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE ARM) Release"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE ARM) Debug"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPSFP) Release"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE MIPSFP) Debug"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86) Release"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86) Debug"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86em) Release"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE x86em) Debug"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE PPC) Release"
-
-!ELSEIF  "$(CFG)" == "pngtest - Win32 (WCE PPC) Debug"
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/projects/wince/pngtest.dsw b/projects/wince/pngtest.dsw
deleted file mode 100644
index ffcd0d6..0000000
--- a/projects/wince/pngtest.dsw
+++ /dev/null
@@ -1,59 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "lpngce"=.\lpngce.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name zlibce
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "pngtest"=.\pngtest.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name lpngce
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "zlibce"=.\zlibce.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/projects/wince/winmain.c b/projects/wince/winmain.c
deleted file mode 100644
index 2c690e2..0000000
--- a/projects/wince/winmain.c
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/* winmain.c - a simple entry point for WindowsCE
- *
- * Copyright (c) 2000 Tenik Co.,Ltd.
- */
-
-#include <windows.h>
-#include <tchar.h>
-
-extern int main(int argc, char *argv[]);
-
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR lpszCmdLine, int nCmdShow)
-{
-#define SIZE_ARGV   (32)
-
-    TCHAR path[MAX_PATH];
-    LPTSTR file;
-    char prog[MAX_PATH];
-    int argc;
-    char *argv[SIZE_ARGV];
-    int size;
-    char *buff;
-    char *argp;
-    char *args;
-    char quote;
-
-    // get program name
-    argc = 0;
-    GetModuleFileName(GetCurrentProcess(), path, MAX_PATH);
-    file = _tcsrchr(path, TEXT('\\'));
-    if (NULL == file) {
-        file = path;
-    }
-    else {
-        file++;
-    }
-    WideCharToMultiByte(CP_ACP, 0, file, -1, prog, MAX_PATH, NULL, NULL);
-    argv[argc++] = prog;
-
-    // analyze parameters
-    size = WideCharToMultiByte(CP_ACP, 0, lpszCmdLine, -1, NULL, 0, NULL, NULL);
-    buff = (char *)malloc(size);
-    size = WideCharToMultiByte(CP_ACP, 0, lpszCmdLine, -1, buff, size, NULL, NULL);
-    quote = 0x00;
-    args = argp = buff;
-    if (argp && *argp && size) {
-        argv[argc++] = args;
-        while (*argp) {
-            if (quote) {
-                if (*argp == quote) {
-                    argp++;
-                    if (*argp != quote) {
-                        quote = 0x00;
-                    }
-                    else {
-                        *args++ = *argp++;
-                    }
-                }
-                else {
-                    *args++ = *argp++;
-                }
-            }
-            else {
-                if (*argp == ' ') {
-                    *args++ = *argp++ = '\0';
-                    while (*argp && *argp == ' ') {
-                        argp++;
-                    }
-                    if (*argp && argc < SIZE_ARGV) {
-                        argv[argc++] = args;
-                    }
-                }
-                else {
-                    if (*argp == '\"') {
-                        quote = *argp++;
-                    }
-                    else {
-                        *args++ = *argp++;
-                    }
-                }
-            }
-        }
-    }
-    *args = '\0';
-    return main(argc, argv);
-}
diff --git a/projects/wince/zlib.diff b/projects/wince/zlib.diff
deleted file mode 100644
index 66ed29f..0000000
--- a/projects/wince/zlib.diff
+++ /dev/null
@@ -1,2168 +0,0 @@
-diff -ac zlib113/deflate.c zlibwce/deflate.c
-*** zlib113/deflate.c	Fri Jul 10 01:06:12 1998
---- zlibwce/deflate.c	Thu May 25 16:42:18 2000
-***************
-*** 921,926 ****
---- 921,930 ----
-  #endif /* ASMV */
-  
-  #ifdef DEBUG
-+ #ifdef _WIN32_WCE
-+ /* Windows CE is not support DEBUG version's zlib */
-+ #  define check_match(s, start, match, length)
-+ #else
-  /* ===========================================================================
-   * Check that the match at match_start is indeed a match.
-   */
-***************
-*** 944,949 ****
---- 948,954 ----
-          do { putc(s->window[start++], stderr); } while (--length != 0);
-      }
-  }
-+ #endif
-  #else
-  #  define check_match(s, start, match, length)
-  #endif
-diff -ac zlib113/trees.c zlibwce/trees.c
-*** zlib113/trees.c	Thu Jul 09 01:32:58 1998
---- zlibwce/trees.c	Thu May 25 16:42:50 2000
-***************
-*** 168,176 ****
---- 168,182 ----
-     /* Send a code of the given tree. c and tree must not have side effects */
-  
-  #else /* DEBUG */
-+ #ifdef _WIN32_WCE
-+ /* Windows CE is not support DEBUG version's zlib */
-+ #  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
-+ 
-+ #else
-  #  define send_code(s, c, tree) \
-       { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
-         send_bits(s, tree[c].Code, tree[c].Len); }
-+ #endif
-  #endif
-  
-  /* ===========================================================================
-diff -ac zlib113/zconf.h zlibwce/zconf.h
-*** zlib113/zconf.h	Thu Jul 09 02:55:28 1998
---- zlibwce/zconf.h	Thu May 25 16:36:16 2000
-***************
-*** 96,101 ****
---- 96,106 ----
-  #  define NEED_DUMMY_RETURN
-  #endif
-  
-+ /* Windows CE is not have errno.h file: */
-+ #if defined(_WIN32_WCE)
-+ #  define NO_ERRNO_H
-+ #endif
-+ 
-  
-  /* Maximum value for memLevel in deflateInit2 */
-  #ifndef MAX_MEM_LEVEL
-***************
-*** 162,168 ****
-  
-  /* Compile with -DZLIB_DLL for Windows DLL support */
-  #if defined(ZLIB_DLL)
-! #  if defined(_WINDOWS) || defined(WINDOWS)
-  #    ifdef FAR
-  #      undef FAR
-  #    endif
---- 167,173 ----
-  
-  /* Compile with -DZLIB_DLL for Windows DLL support */
-  #if defined(ZLIB_DLL)
-! #  if defined(_WINDOWS) || defined(WINDOWS) || defined(_WIN32_WCE)
-  #    ifdef FAR
-  #      undef FAR
-  #    endif
-diff -ac zlib113/zutil.c zlibwce/zutil.c
-*** zlib113/zutil.c	Thu Jul 09 02:01:48 1998
---- zlibwce/zutil.c	Thu May 25 16:43:34 2000
-***************
-*** 32,37 ****
---- 32,40 ----
-  }
-  
-  #ifdef DEBUG
-+ #ifdef _WIN32_WCE
-+ /* Windows CE is not support DEBUG version's zlib */
-+ #else
-  
-  #  ifndef verbose
-  #    define verbose 0
-***************
-*** 45,50 ****
---- 48,54 ----
-      exit(1);
-  }
-  #endif
-+ #endif
-  
-  /* exported to allow conversion of error code to string for compress() and
-   * uncompress()
-***************
-*** 211,217 ****
---- 215,225 ----
-      unsigned size;
-  {
-      if (opaque) items += size - size; /* make compiler happy */
-+ #ifdef _WIN32_WCE
-+     return (voidpf)malloc(items * size);
-+ #else
-      return (voidpf)calloc(items, size);
-+ #endif
-  }
-  
-  void  zcfree (opaque, ptr)
-diff -ac zlib113/zutil.h zlibwce/zutil.h
-*** zlib113/zutil.h	Thu Jul 09 02:01:48 1998
---- zlibwce/zutil.h	Thu May 25 16:41:44 2000
-***************
-*** 16,22 ****
---- 16,26 ----
-  #include "zlib.h"
-  
-  #ifdef STDC
-+ #ifdef _WIN32_WCE
-+ #  include <malloc.h>
-+ #else
-  #  include <stddef.h>
-+ #endif
-  #  include <string.h>
-  #  include <stdlib.h>
-  #endif
-***************
-*** 188,193 ****
---- 192,206 ----
-  
-  /* Diagnostic functions */
-  #ifdef DEBUG
-+ #ifdef _WIN32_WCE
-+ /* Windows CE is not support DEBUG version's zlib */
-+ #  define Assert(cond,msg)
-+ #  define Trace(x)
-+ #  define Tracev(x)
-+ #  define Tracevv(x)
-+ #  define Tracec(c,x)
-+ #  define Tracecv(c,x)
-+ #else
-  #  include <stdio.h>
-     extern int z_verbose;
-     extern void z_error    OF((char *m));
-***************
-*** 197,202 ****
---- 210,216 ----
-  #  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-  #  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-  #  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-+ #endif
-  #else
-  #  define Assert(cond,msg)
-  #  define Trace(x)
-*** zlib113/gzio.c	Sat Jul  8 13:59:49 2000
---- zlibwce/gzio.c	Sat Jul  8 13:58:29 2000
-***************
-*** 1,5 ****
-! /* gzio.c -- IO on .gz files
-   * Copyright (C) 1995-1998 Jean-loup Gailly.
-   * For conditions of distribution and use, see copyright notice in zlib.h
-   *
-   * Compile this file with -DNO_DEFLATE to avoid the compression code.
---- 1,6 ----
-! /* gzio.c -- IO on .gz files for WindowsCE
-   * Copyright (C) 1995-1998 Jean-loup Gailly.
-+  * Copyright (C) 2000      Tenik Co.,Ltd.
-   * For conditions of distribution and use, see copyright notice in zlib.h
-   *
-   * Compile this file with -DNO_DEFLATE to avoid the compression code.
-***************
-*** 7,13 ****
-  
-  /* @(#) $Id$ */
-  
-! #include <stdio.h>
-  
-  #include "zutil.h"
-  
---- 8,14 ----
-  
-  /* @(#) $Id$ */
-  
-! #include <windows.h>
-  
-  #include "zutil.h"
-  
-***************
-*** 41,47 ****
-      z_stream stream;
-      int      z_err;   /* error code for last stream operation */
-      int      z_eof;   /* set if end of input file */
-!     FILE     *file;   /* .gz file */
-      Byte     *inbuf;  /* input buffer */
-      Byte     *outbuf; /* output buffer */
-      uLong    crc;     /* crc32 of uncompressed data */
---- 42,48 ----
-      z_stream stream;
-      int      z_err;   /* error code for last stream operation */
-      int      z_eof;   /* set if end of input file */
-!     HANDLE   file;    /* .gz file */
-      Byte     *inbuf;  /* input buffer */
-      Byte     *outbuf; /* output buffer */
-      uLong    crc;     /* crc32 of uncompressed data */
-***************
-*** 58,64 ****
-  local int    get_byte     OF((gz_stream *s));
-  local void   check_header OF((gz_stream *s));
-  local int    destroy      OF((gz_stream *s));
-! local void   putLong      OF((FILE *file, uLong x));
-  local uLong  getLong      OF((gz_stream *s));
-  
-  /* ===========================================================================
---- 59,65 ----
-  local int    get_byte     OF((gz_stream *s));
-  local void   check_header OF((gz_stream *s));
-  local int    destroy      OF((gz_stream *s));
-! local void   putLong      OF((HANDLE file, uLong x));
-  local uLong  getLong      OF((gz_stream *s));
-  
-  /* ===========================================================================
-***************
-*** 82,87 ****
---- 83,91 ----
-      gz_stream *s;
-      char fmode[80]; /* copy of mode, without the compression level */
-      char *m = fmode;
-+     char cbuff[10];
-+     DWORD size;
-+     TCHAR file[MAX_PATH];
-  
-      if (!path || !mode) return Z_NULL;
-  
-***************
-*** 94,100 ****
-      s->stream.next_in = s->inbuf = Z_NULL;
-      s->stream.next_out = s->outbuf = Z_NULL;
-      s->stream.avail_in = s->stream.avail_out = 0;
-!     s->file = NULL;
-      s->z_err = Z_OK;
-      s->z_eof = 0;
-      s->crc = crc32(0L, Z_NULL, 0);
---- 98,104 ----
-      s->stream.next_in = s->inbuf = Z_NULL;
-      s->stream.next_out = s->outbuf = Z_NULL;
-      s->stream.avail_in = s->stream.avail_out = 0;
-!     s->file = INVALID_HANDLE_VALUE;
-      s->z_err = Z_OK;
-      s->z_eof = 0;
-      s->crc = crc32(0L, Z_NULL, 0);
-***************
-*** 112,125 ****
-          if (*p == 'r') s->mode = 'r';
-          if (*p == 'w' || *p == 'a') s->mode = 'w';
-          if (*p >= '0' && *p <= '9') {
-! 	    level = *p - '0';
-! 	} else if (*p == 'f') {
-! 	  strategy = Z_FILTERED;
-! 	} else if (*p == 'h') {
-! 	  strategy = Z_HUFFMAN_ONLY;
-! 	} else {
-! 	    *m++ = *p; /* copy the mode */
-! 	}
-      } while (*p++ && m != fmode + sizeof(fmode));
-      if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-      
---- 116,129 ----
-          if (*p == 'r') s->mode = 'r';
-          if (*p == 'w' || *p == 'a') s->mode = 'w';
-          if (*p >= '0' && *p <= '9') {
-!             level = *p - '0';
-!         } else if (*p == 'f') {
-!           strategy = Z_FILTERED;
-!         } else if (*p == 'h') {
-!           strategy = Z_HUFFMAN_ONLY;
-!         } else {
-!             *m++ = *p; /* copy the mode */
-!         }
-      } while (*p++ && m != fmode + sizeof(fmode));
-      if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-      
-***************
-*** 152,177 ****
-      }
-      s->stream.avail_out = Z_BUFSIZE;
-  
-!     errno = 0;
-!     s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
-  
-!     if (s->file == NULL) {
-          return destroy(s), (gzFile)Z_NULL;
-      }
-      if (s->mode == 'w') {
-          /* Write a very simple .gz header:
-           */
-!         fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
-!              Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
-! 	s->startpos = 10L;
-! 	/* We use 10L instead of ftell(s->file) to because ftell causes an
-           * fflush on some systems. This version of the library doesn't use
-           * startpos anyway in write mode, so this initialization is not
-           * necessary.
-           */
-      } else {
-! 	check_header(s); /* skip the .gz header */
-! 	s->startpos = (ftell(s->file) - s->stream.avail_in);
-      }
-      
-      return (gzFile)s;
---- 156,195 ----
-      }
-      s->stream.avail_out = Z_BUFSIZE;
-  
-!     SetLastError(NO_ERROR);
-!     if ((HANDLE)fd == INVALID_HANDLE_VALUE) {
-!         MultiByteToWideChar(CP_ACP, 0, path, -1, file, MAX_PATH);
-!         s->file = CreateFile(file, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, 0, NULL);
-!     } else {
-!         s->file = (HANDLE)fd;
-!     }
-  
-!     if (s->file == INVALID_HANDLE_VALUE) {
-          return destroy(s), (gzFile)Z_NULL;
-      }
-      if (s->mode == 'w') {
-          /* Write a very simple .gz header:
-           */
-!         cbuff[0] = gz_magic[0];
-!         cbuff[1] = gz_magic[1];
-!         cbuff[2] = Z_DEFLATED;
-!         cbuff[3] = 0; /*flags*/
-!         cbuff[4] = 0;
-!         cbuff[5] = 0;
-!         cbuff[6] = 0;
-!         cbuff[7] = 0; /*time*/;
-!         cbuff[8] = 0; /*xflags*/;
-!         cbuff[9] = OS_CODE;
-!         WriteFile(s->file, cbuff, 10, &size, NULL);
-!         s->startpos = 10L;
-!         /* We use 10L instead of ftell(s->file) to because ftell causes an
-           * fflush on some systems. This version of the library doesn't use
-           * startpos anyway in write mode, so this initialization is not
-           * necessary.
-           */
-      } else {
-!         check_header(s); /* skip the .gz header */
-!         s->startpos = (SetFilePointer(s->file, 0, NULL, FILE_CURRENT) - s->stream.avail_in);
-      }
-      
-      return (gzFile)s;
-***************
-*** 197,205 ****
-  {
-      char name[20];
-  
-!     if (fd < 0) return (gzFile)Z_NULL;
-!     sprintf(name, "<fd:%d>", fd); /* for debugging */
-  
-      return gz_open (name, mode, fd);
-  }
-  
---- 215,225 ----
-  {
-      char name[20];
-  
-!     if ((HANDLE)fd == INVALID_HANDLE_VALUE)
-!         return (gzFile)Z_NULL;
-  
-+     strcpy(name, "<gzdopen>"); /* for debugging */
-+ 
-      return gz_open (name, mode, fd);
-  }
-  
-***************
-*** 212,217 ****
---- 232,238 ----
-      int strategy;
-  {
-      gz_stream *s = (gz_stream*)file;
-+     DWORD size;
-  
-      if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-  
-***************
-*** 218,228 ****
-      /* Make room to allow flushing */
-      if (s->stream.avail_out == 0) {
-  
-! 	s->stream.next_out = s->outbuf;
-! 	if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-! 	    s->z_err = Z_ERRNO;
-! 	}
-! 	s->stream.avail_out = Z_BUFSIZE;
-      }
-  
-      return deflateParams (&(s->stream), level, strategy);
---- 239,249 ----
-      /* Make room to allow flushing */
-      if (s->stream.avail_out == 0) {
-  
-!         s->stream.next_out = s->outbuf;
-!         if (!WriteFile(s->file, s->outbuf, Z_BUFSIZE, &size, NULL) || size != Z_BUFSIZE) {
-!             s->z_err = Z_ERRNO;
-!         }
-!         s->stream.avail_out = Z_BUFSIZE;
-      }
-  
-      return deflateParams (&(s->stream), level, strategy);
-***************
-*** 236,251 ****
-  local int get_byte(s)
-      gz_stream *s;
-  {
-!     if (s->z_eof) return EOF;
-      if (s->stream.avail_in == 0) {
-! 	errno = 0;
-! 	s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-! 	if (s->stream.avail_in == 0) {
-! 	    s->z_eof = 1;
-! 	    if (ferror(s->file)) s->z_err = Z_ERRNO;
-! 	    return EOF;
-! 	}
-! 	s->stream.next_in = s->inbuf;
-      }
-      s->stream.avail_in--;
-      return *(s->stream.next_in)++;
---- 257,273 ----
-  local int get_byte(s)
-      gz_stream *s;
-  {
-!     if (s->z_eof) return -1;
-      if (s->stream.avail_in == 0) {
-!         SetLastError(NO_ERROR);
-!         if (!ReadFile(s->file, s->inbuf, Z_BUFSIZE, &s->stream.avail_in, NULL)) {
-!             s->z_err = Z_ERRNO;
-!         }
-!         if (s->stream.avail_in == 0) {
-!             s->z_eof = 1;
-!             return -1;
-!         }
-!         s->stream.next_in = s->inbuf;
-      }
-      s->stream.avail_in--;
-      return *(s->stream.next_in)++;
-***************
-*** 270,291 ****
-  
-      /* Check the gzip magic header */
-      for (len = 0; len < 2; len++) {
-! 	c = get_byte(s);
-! 	if (c != gz_magic[len]) {
-! 	    if (len != 0) s->stream.avail_in++, s->stream.next_in--;
-! 	    if (c != EOF) {
-! 		s->stream.avail_in++, s->stream.next_in--;
-! 		s->transparent = 1;
-! 	    }
-! 	    s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END;
-! 	    return;
-! 	}
-      }
-      method = get_byte(s);
-      flags = get_byte(s);
-      if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
-! 	s->z_err = Z_DATA_ERROR;
-! 	return;
-      }
-  
-      /* Discard time, xflags and OS code: */
---- 292,313 ----
-  
-      /* Check the gzip magic header */
-      for (len = 0; len < 2; len++) {
-!         c = get_byte(s);
-!         if (c != gz_magic[len]) {
-!             if (len != 0) s->stream.avail_in++, s->stream.next_in--;
-!             if (c != -1) {
-!                 s->stream.avail_in++, s->stream.next_in--;
-!                 s->transparent = 1;
-!             }
-!             s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END;
-!             return;
-!         }
-      }
-      method = get_byte(s);
-      flags = get_byte(s);
-      if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
-!         s->z_err = Z_DATA_ERROR;
-!         return;
-      }
-  
-      /* Discard time, xflags and OS code: */
-***************
-*** 292,310 ****
-      for (len = 0; len < 6; len++) (void)get_byte(s);
-  
-      if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
-! 	len  =  (uInt)get_byte(s);
-! 	len += ((uInt)get_byte(s))<<8;
-! 	/* len is garbage if EOF but the loop below will quit anyway */
-! 	while (len-- != 0 && get_byte(s) != EOF) ;
-      }
-      if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
-! 	while ((c = get_byte(s)) != 0 && c != EOF) ;
-      }
-      if ((flags & COMMENT) != 0) {   /* skip the .gz file comment */
-! 	while ((c = get_byte(s)) != 0 && c != EOF) ;
-      }
-      if ((flags & HEAD_CRC) != 0) {  /* skip the header crc */
-! 	for (len = 0; len < 2; len++) (void)get_byte(s);
-      }
-      s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-  }
---- 314,332 ----
-      for (len = 0; len < 6; len++) (void)get_byte(s);
-  
-      if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
-!         len  =  (uInt)get_byte(s);
-!         len += ((uInt)get_byte(s))<<8;
-!         /* len is garbage if EOF but the loop below will quit anyway */
-!         while (len-- != 0 && get_byte(s) != -1) ;
-      }
-      if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
-!         while ((c = get_byte(s)) != 0 && c != -1) ;
-      }
-      if ((flags & COMMENT) != 0) {   /* skip the .gz file comment */
-!         while ((c = get_byte(s)) != 0 && c != -1) ;
-      }
-      if ((flags & HEAD_CRC) != 0) {  /* skip the header crc */
-!         for (len = 0; len < 2; len++) (void)get_byte(s);
-      }
-      s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-  }
-***************
-*** 323,343 ****
-      TRYFREE(s->msg);
-  
-      if (s->stream.state != NULL) {
-! 	if (s->mode == 'w') {
-  #ifdef NO_DEFLATE
-! 	    err = Z_STREAM_ERROR;
-  #else
-! 	    err = deflateEnd(&(s->stream));
-  #endif
-! 	} else if (s->mode == 'r') {
-! 	    err = inflateEnd(&(s->stream));
-! 	}
-!     }
-!     if (s->file != NULL && fclose(s->file)) {
-! #ifdef ESPIPE
-! 	if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */
-! #endif
-! 	    err = Z_ERRNO;
-      }
-      if (s->z_err < 0) err = s->z_err;
-  
---- 345,362 ----
-      TRYFREE(s->msg);
-  
-      if (s->stream.state != NULL) {
-!         if (s->mode == 'w') {
-  #ifdef NO_DEFLATE
-!             err = Z_STREAM_ERROR;
-  #else
-!             err = deflateEnd(&(s->stream));
-  #endif
-!         } else if (s->mode == 'r') {
-!             err = inflateEnd(&(s->stream));
-!         }
-!     }
-!     if (s->file != NULL && !CloseHandle(s->file)) {
-!         err = Z_ERRNO;
-      }
-      if (s->z_err < 0) err = s->z_err;
-  
-***************
-*** 360,365 ****
---- 379,385 ----
-      gz_stream *s = (gz_stream*)file;
-      Bytef *start = (Bytef*)buf; /* starting point for crc computation */
-      Byte  *next_out; /* == stream.next_out but not forced far (for MSDOS) */
-+     DWORD size;
-  
-      if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
-  
-***************
-*** 372,440 ****
-  
-      while (s->stream.avail_out != 0) {
-  
-! 	if (s->transparent) {
-! 	    /* Copy first the lookahead bytes: */
-! 	    uInt n = s->stream.avail_in;
-! 	    if (n > s->stream.avail_out) n = s->stream.avail_out;
-! 	    if (n > 0) {
-! 		zmemcpy(s->stream.next_out, s->stream.next_in, n);
-! 		next_out += n;
-! 		s->stream.next_out = next_out;
-! 		s->stream.next_in   += n;
-! 		s->stream.avail_out -= n;
-! 		s->stream.avail_in  -= n;
-! 	    }
-! 	    if (s->stream.avail_out > 0) {
-! 		s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out,
-! 					     s->file);
-! 	    }
-! 	    len -= s->stream.avail_out;
-! 	    s->stream.total_in  += (uLong)len;
-! 	    s->stream.total_out += (uLong)len;
-              if (len == 0) s->z_eof = 1;
-! 	    return (int)len;
-! 	}
-          if (s->stream.avail_in == 0 && !s->z_eof) {
-  
-!             errno = 0;
-!             s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-              if (s->stream.avail_in == 0) {
-                  s->z_eof = 1;
-- 		if (ferror(s->file)) {
-- 		    s->z_err = Z_ERRNO;
-- 		    break;
-- 		}
-              }
-              s->stream.next_in = s->inbuf;
-          }
-          s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
-  
-! 	if (s->z_err == Z_STREAM_END) {
-! 	    /* Check CRC and original size */
-! 	    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-! 	    start = s->stream.next_out;
-! 
-! 	    if (getLong(s) != s->crc) {
-! 		s->z_err = Z_DATA_ERROR;
-! 	    } else {
-! 	        (void)getLong(s);
-                  /* The uncompressed length returned by above getlong() may
-                   * be different from s->stream.total_out) in case of
-! 		 * concatenated .gz files. Check for such files:
-! 		 */
-! 		check_header(s);
-! 		if (s->z_err == Z_OK) {
-! 		    uLong total_in = s->stream.total_in;
-! 		    uLong total_out = s->stream.total_out;
-! 
-! 		    inflateReset(&(s->stream));
-! 		    s->stream.total_in = total_in;
-! 		    s->stream.total_out = total_out;
-! 		    s->crc = crc32(0L, Z_NULL, 0);
-! 		}
-! 	    }
-! 	}
-! 	if (s->z_err != Z_OK || s->z_eof) break;
-      }
-      s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-  
---- 392,461 ----
-  
-      while (s->stream.avail_out != 0) {
-  
-!         if (s->transparent) {
-!             /* Copy first the lookahead bytes: */
-!             uInt n = s->stream.avail_in;
-!             if (n > s->stream.avail_out) n = s->stream.avail_out;
-!             if (n > 0) {
-!                 zmemcpy(s->stream.next_out, s->stream.next_in, n);
-!                 next_out += n;
-!                 s->stream.next_out = next_out;
-!                 s->stream.next_in   += n;
-!                 s->stream.avail_out -= n;
-!                 s->stream.avail_in  -= n;
-!             }
-!             if (s->stream.avail_out > 0) {
-!                 if (ReadFile(s->file, next_out, s->stream.avail_out, &size, NULL)) {
-!                     s->stream.avail_out -= size;
-!                 }
-!             }
-!             len -= s->stream.avail_out;
-!             s->stream.total_in  += (uLong)len;
-!             s->stream.total_out += (uLong)len;
-              if (len == 0) s->z_eof = 1;
-!             return (int)len;
-!         }
-          if (s->stream.avail_in == 0 && !s->z_eof) {
-  
-!             SetLastError(NO_ERROR);
-!             if (!ReadFile(s->file, s->inbuf, Z_BUFSIZE, &s->stream.avail_in, NULL)) {
-!                 s->z_eof = 1;
-!                 s->z_err = Z_ERRNO;
-!                 break;
-!             }
-              if (s->stream.avail_in == 0) {
-                  s->z_eof = 1;
-              }
-              s->stream.next_in = s->inbuf;
-          }
-          s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
-  
-!         if (s->z_err == Z_STREAM_END) {
-!             /* Check CRC and original size */
-!             s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-!             start = s->stream.next_out;
-! 
-!             if (getLong(s) != s->crc) {
-!                 s->z_err = Z_DATA_ERROR;
-!             } else {
-!                 (void)getLong(s);
-                  /* The uncompressed length returned by above getlong() may
-                   * be different from s->stream.total_out) in case of
-!                  * concatenated .gz files. Check for such files:
-!                  */
-!                 check_header(s);
-!                 if (s->z_err == Z_OK) {
-!                     uLong total_in = s->stream.total_in;
-!                     uLong total_out = s->stream.total_out;
-! 
-!                     inflateReset(&(s->stream));
-!                     s->stream.total_in = total_in;
-!                     s->stream.total_out = total_out;
-!                     s->crc = crc32(0L, Z_NULL, 0);
-!                 }
-!             }
-!         }
-!         if (s->z_err != Z_OK || s->z_eof) break;
-      }
-      s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-  
-***************
-*** 489,494 ****
---- 510,516 ----
-      unsigned len;
-  {
-      gz_stream *s = (gz_stream*)file;
-+     DWORD size;
-  
-      if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-  
-***************
-*** 500,506 ****
-          if (s->stream.avail_out == 0) {
-  
-              s->stream.next_out = s->outbuf;
-!             if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-                  s->z_err = Z_ERRNO;
-                  break;
-              }
---- 522,528 ----
-          if (s->stream.avail_out == 0) {
-  
-              s->stream.next_out = s->outbuf;
-!             if (!WriteFile(s->file, s->outbuf, Z_BUFSIZE, &size, NULL) || size != Z_BUFSIZE) {
-                  s->z_err = Z_ERRNO;
-                  break;
-              }
-***************
-*** 527,540 ****
-      char buf[Z_PRINTF_BUFSIZE];
-      va_list va;
-      int len;
-  
-      va_start(va, format);
-! #ifdef HAS_vsnprintf
-!     (void)vsnprintf(buf, sizeof(buf), format, va);
-! #else
-!     (void)vsprintf(buf, format, va);
-! #endif
-      va_end(va);
-      len = strlen(buf); /* some *sprintf don't return the nb of bytes written */
-      if (len <= 0) return 0;
-  
---- 549,574 ----
-      char buf[Z_PRINTF_BUFSIZE];
-      va_list va;
-      int len;
-+     TCHAR form[Z_PRINTF_BUFSIZE];
-+     TCHAR tbuf[Z_PRINTF_BUFSIZE];
-+     int n;
-  
-      va_start(va, format);
-!     MultiByteToWideChar(CP_ACP, 0, format, -1, form, Z_PRINTF_BUFSIZE);
-!     len = lstrlen(form);
-!     for ( n = 0; n < len; n++ ) {
-!         if ( TEXT('%') == form[n] ) {
-!             n++;
-!             if ( TEXT('c') == form[n] ) {
-!                 form[n] = TEXT('C');
-!             } else if ( TEXT('s') == form[n] ) {
-!                 form[n] = TEXT('S');
-!             }
-!         }
-!     }
-!     (void)vswprintf(tbuf, form, va);
-      va_end(va);
-+     WideCharToMultiByte(CP_ACP, 0, tbuf, -1, buf, Z_PRINTF_BUFSIZE, NULL, NULL);
-      len = strlen(buf); /* some *sprintf don't return the nb of bytes written */
-      if (len <= 0) return 0;
-  
-***************
-*** 543,553 ****
-  #else /* not ANSI C */
-  
-  int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-! 	               a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
-      gzFile file;
-      const char *format;
-      int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-! 	a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
-  {
-      char buf[Z_PRINTF_BUFSIZE];
-      int len;
---- 577,587 ----
-  #else /* not ANSI C */
-  
-  int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-!                        a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
-      gzFile file;
-      const char *format;
-      int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-!         a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
-  {
-      char buf[Z_PRINTF_BUFSIZE];
-      int len;
-***************
-*** 554,563 ****
-  
-  #ifdef HAS_snprintf
-      snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-! 	     a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-  #else
-      sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-! 	    a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-  #endif
-      len = strlen(buf); /* old sprintf doesn't return the nb of bytes written */
-      if (len <= 0) return 0;
---- 588,597 ----
-  
-  #ifdef HAS_snprintf
-      snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-!              a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-  #else
-      sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-!             a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-  #endif
-      len = strlen(buf); /* old sprintf doesn't return the nb of bytes written */
-      if (len <= 0) return 0;
-***************
-*** 604,609 ****
---- 638,644 ----
-      uInt len;
-      int done = 0;
-      gz_stream *s = (gz_stream*)file;
-+     DWORD size;
-  
-      if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-  
-***************
-*** 613,619 ****
-          len = Z_BUFSIZE - s->stream.avail_out;
-  
-          if (len != 0) {
-!             if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
-                  s->z_err = Z_ERRNO;
-                  return Z_ERRNO;
-              }
---- 648,654 ----
-          len = Z_BUFSIZE - s->stream.avail_out;
-  
-          if (len != 0) {
-!             if (!WriteFile(s->file, s->outbuf, len, &size, NULL) || (uInt)size != len) {
-                  s->z_err = Z_ERRNO;
-                  return Z_ERRNO;
-              }
-***************
-*** 623,630 ****
-          if (done) break;
-          s->z_err = deflate(&(s->stream), flush);
-  
-! 	/* Ignore the second of two consecutive flushes: */
-! 	if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
-  
-          /* deflate has finished flushing only when it hasn't used up
-           * all the available space in the output buffer: 
---- 658,665 ----
-          if (done) break;
-          s->z_err = deflate(&(s->stream), flush);
-  
-!         /* Ignore the second of two consecutive flushes: */
-!         if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
-  
-          /* deflate has finished flushing only when it hasn't used up
-           * all the available space in the output buffer: 
-***************
-*** 644,650 ****
-      int err = do_flush (file, flush);
-  
-      if (err) return err;
-!     fflush(s->file);
-      return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-  }
-  #endif /* NO_DEFLATE */
---- 679,685 ----
-      int err = do_flush (file, flush);
-  
-      if (err) return err;
-! 
-      return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-  }
-  #endif /* NO_DEFLATE */
-***************
-*** 665,698 ****
-      gz_stream *s = (gz_stream*)file;
-  
-      if (s == NULL || whence == SEEK_END ||
-! 	s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {
-! 	return -1L;
-      }
-      
-      if (s->mode == 'w') {
-  #ifdef NO_DEFLATE
-! 	return -1L;
-  #else
-! 	if (whence == SEEK_SET) {
-! 	    offset -= s->stream.total_in;
-! 	}
-! 	if (offset < 0) return -1L;
-! 
-! 	/* At this point, offset is the number of zero bytes to write. */
-! 	if (s->inbuf == Z_NULL) {
-! 	    s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
-! 	    zmemzero(s->inbuf, Z_BUFSIZE);
-! 	}
-! 	while (offset > 0)  {
-! 	    uInt size = Z_BUFSIZE;
-! 	    if (offset < Z_BUFSIZE) size = (uInt)offset;
-! 
-! 	    size = gzwrite(file, s->inbuf, size);
-! 	    if (size == 0) return -1L;
-! 
-! 	    offset -= size;
-! 	}
-! 	return (z_off_t)s->stream.total_in;
-  #endif
-      }
-      /* Rest of function is for reading only */
---- 700,733 ----
-      gz_stream *s = (gz_stream*)file;
-  
-      if (s == NULL || whence == SEEK_END ||
-!         s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {
-!         return -1L;
-      }
-      
-      if (s->mode == 'w') {
-  #ifdef NO_DEFLATE
-!         return -1L;
-  #else
-!         if (whence == SEEK_SET) {
-!             offset -= s->stream.total_in;
-!         }
-!         if (offset < 0) return -1L;
-! 
-!         /* At this point, offset is the number of zero bytes to write. */
-!         if (s->inbuf == Z_NULL) {
-!             s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
-!             zmemzero(s->inbuf, Z_BUFSIZE);
-!         }
-!         while (offset > 0)  {
-!             uInt size = Z_BUFSIZE;
-!             if (offset < Z_BUFSIZE) size = (uInt)offset;
-! 
-!             size = gzwrite(file, s->inbuf, size);
-!             if (size == 0) return -1L;
-! 
-!             offset -= size;
-!         }
-!         return (z_off_t)s->stream.total_in;
-  #endif
-      }
-      /* Rest of function is for reading only */
-***************
-*** 699,736 ****
-  
-      /* compute absolute position */
-      if (whence == SEEK_CUR) {
-! 	offset += s->stream.total_out;
-      }
-      if (offset < 0) return -1L;
-  
-      if (s->transparent) {
-! 	/* map to fseek */
-! 	s->stream.avail_in = 0;
-! 	s->stream.next_in = s->inbuf;
-!         if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;
-  
-! 	s->stream.total_in = s->stream.total_out = (uLong)offset;
-! 	return offset;
-      }
-  
-      /* For a negative seek, rewind and use positive seek */
-      if ((uLong)offset >= s->stream.total_out) {
-! 	offset -= s->stream.total_out;
-      } else if (gzrewind(file) < 0) {
-! 	return -1L;
-      }
-      /* offset is now the number of bytes to skip. */
-  
-      if (offset != 0 && s->outbuf == Z_NULL) {
-! 	s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-      }
-      while (offset > 0)  {
-! 	int size = Z_BUFSIZE;
-! 	if (offset < Z_BUFSIZE) size = (int)offset;
-  
-! 	size = gzread(file, s->outbuf, (uInt)size);
-! 	if (size <= 0) return -1L;
-! 	offset -= size;
-      }
-      return (z_off_t)s->stream.total_out;
-  }
---- 734,771 ----
-  
-      /* compute absolute position */
-      if (whence == SEEK_CUR) {
-!         offset += s->stream.total_out;
-      }
-      if (offset < 0) return -1L;
-  
-      if (s->transparent) {
-!         /* map to fseek */
-!         s->stream.avail_in = 0;
-!         s->stream.next_in = s->inbuf;
-!         if (SetFilePointer(s->file, offset, NULL, FILE_BEGIN) == 0xFFFFFFFF) return -1L;
-  
-!         s->stream.total_in = s->stream.total_out = (uLong)offset;
-!         return offset;
-      }
-  
-      /* For a negative seek, rewind and use positive seek */
-      if ((uLong)offset >= s->stream.total_out) {
-!         offset -= s->stream.total_out;
-      } else if (gzrewind(file) < 0) {
-!         return -1L;
-      }
-      /* offset is now the number of bytes to skip. */
-  
-      if (offset != 0 && s->outbuf == Z_NULL) {
-!         s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-      }
-      while (offset > 0)  {
-!         int size = Z_BUFSIZE;
-!         if (offset < Z_BUFSIZE) size = (int)offset;
-  
-!         size = gzread(file, s->outbuf, (uInt)size);
-!         if (size <= 0) return -1L;
-!         offset -= size;
-      }
-      return (z_off_t)s->stream.total_out;
-  }
-***************
-*** 742,748 ****
-      gzFile file;
-  {
-      gz_stream *s = (gz_stream*)file;
-!     
-      if (s == NULL || s->mode != 'r') return -1;
-  
-      s->z_err = Z_OK;
---- 777,783 ----
-      gzFile file;
-  {
-      gz_stream *s = (gz_stream*)file;
-! 
-      if (s == NULL || s->mode != 'r') return -1;
-  
-      s->z_err = Z_OK;
-***************
-*** 750,763 ****
-      s->stream.avail_in = 0;
-      s->stream.next_in = s->inbuf;
-      s->crc = crc32(0L, Z_NULL, 0);
-! 	
-      if (s->startpos == 0) { /* not a compressed file */
-! 	rewind(s->file);
-! 	return 0;
-      }
-  
-      (void) inflateReset(&s->stream);
-!     return fseek(s->file, s->startpos, SEEK_SET);
-  }
-  
-  /* ===========================================================================
---- 785,798 ----
-      s->stream.avail_in = 0;
-      s->stream.next_in = s->inbuf;
-      s->crc = crc32(0L, Z_NULL, 0);
-!         
-      if (s->startpos == 0) { /* not a compressed file */
-!         SetFilePointer(s->file, 0, NULL, FILE_BEGIN);
-!         return 0;
-      }
-  
-      (void) inflateReset(&s->stream);
-!     return SetFilePointer(s->file, s->startpos, NULL, FILE_BEGIN);
-  }
-  
-  /* ===========================================================================
-***************
-*** 787,798 ****
-     Outputs a long in LSB order to the given file
-  */
-  local void putLong (file, x)
-!     FILE *file;
-      uLong x;
-  {
-      int n;
-      for (n = 0; n < 4; n++) {
-!         fputc((int)(x & 0xff), file);
-          x >>= 8;
-      }
-  }
---- 822,836 ----
-     Outputs a long in LSB order to the given file
-  */
-  local void putLong (file, x)
-!     HANDLE file;
-      uLong x;
-  {
-      int n;
-+     char ch[1];
-+     DWORD size;
-      for (n = 0; n < 4; n++) {
-!         ch[0] = (int)(x & 0xff);
-!         WriteFile(file, ch, 1, &size, NULL);
-          x >>= 8;
-      }
-  }
-***************
-*** 810,816 ****
-      x += ((uLong)get_byte(s))<<8;
-      x += ((uLong)get_byte(s))<<16;
-      c = get_byte(s);
-!     if (c == EOF) s->z_err = Z_DATA_ERROR;
-      x += ((uLong)c)<<24;
-      return x;
-  }
---- 848,854 ----
-      x += ((uLong)get_byte(s))<<8;
-      x += ((uLong)get_byte(s))<<16;
-      c = get_byte(s);
-!     if (c == -1) s->z_err = Z_DATA_ERROR;
-      x += ((uLong)c)<<24;
-      return x;
-  }
-***************
-*** 829,835 ****
-  
-      if (s->mode == 'w') {
-  #ifdef NO_DEFLATE
-! 	return Z_STREAM_ERROR;
-  #else
-          err = do_flush (file, Z_FINISH);
-          if (err != Z_OK) return destroy((gz_stream*)file);
---- 867,873 ----
-  
-      if (s->mode == 'w') {
-  #ifdef NO_DEFLATE
-!         return Z_STREAM_ERROR;
-  #else
-          err = do_flush (file, Z_FINISH);
-          if (err != Z_OK) return destroy((gz_stream*)file);
-***************
-*** 862,868 ****
-      *errnum = s->z_err;
-      if (*errnum == Z_OK) return (const char*)"";
-  
-!     m =  (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
-  
-      if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-  
---- 900,906 ----
-      *errnum = s->z_err;
-      if (*errnum == Z_OK) return (const char*)"";
-  
-!     m =  (char*)(*errnum == Z_ERRNO ? zstrerror(GetLastError()) : s->stream.msg);
-  
-      if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-  
-*** zlib113/minigzip.c	Sat Jul  8 13:59:49 2000
---- zlibwce/minigzip.c	Sat Jul  8 13:58:29 2000
-***************
-*** 1,5 ****
---- 1,6 ----
-  /* minigzip.c -- simulate gzip using the zlib compression library
-   * Copyright (C) 1995-1998 Jean-loup Gailly.
-+  * Copyright (C) 2000      Tenik Co.,Ltd.
-   * For conditions of distribution and use, see copyright notice in zlib.h 
-   */
-  
-***************
-*** 15,21 ****
---- 16,30 ----
-  
-  /* @(#) $Id$ */
-  
-+ #if defined(_WIN32_WCE)
-+ #if _WIN32_WCE < 211
-+ #error (f|w)printf functions is not support old WindowsCE.
-+ #endif
-+ #undef USE_MMAP
-+ #include <windows.h>
-+ #else
-  #include <stdio.h>
-+ #endif
-  #include "zlib.h"
-  
-  #ifdef STDC
-***************
-*** 31,37 ****
-  #  include <sys/stat.h>
-  #endif
-  
-! #if defined(MSDOS) || defined(OS2) || defined(WIN32)
-  #  include <fcntl.h>
-  #  include <io.h>
-  #  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
---- 40,46 ----
-  #  include <sys/stat.h>
-  #endif
-  
-! #if (defined(MSDOS) || defined(OS2) || defined(WIN32)) && !defined(_WIN32_WCE)
-  #  include <fcntl.h>
-  #  include <io.h>
-  #  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-***************
-*** 71,84 ****
-  #  define local
-  #endif
-  
-  char *prog;
-  
-  void error            OF((const char *msg));
-! void gz_compress      OF((FILE   *in, gzFile out));
-  #ifdef USE_MMAP
-! int  gz_compress_mmap OF((FILE   *in, gzFile out));
-  #endif
-! void gz_uncompress    OF((gzFile in, FILE   *out));
-  void file_compress    OF((char  *file, char *mode));
-  void file_uncompress  OF((char  *file));
-  int  main             OF((int argc, char *argv[]));
---- 80,103 ----
-  #  define local
-  #endif
-  
-+ #if defined(_WIN32_WCE)
-+ #undef  stderr
-+ #define stderr  stdout
-+ #define F_FILE  HANDLE
-+ #define F_NULL  INVALID_HANDLE_VALUE
-+ #else
-+ #define F_FILE  FILE*
-+ #define F_NULL  NULL
-+ #endif
-+ 
-  char *prog;
-  
-  void error            OF((const char *msg));
-! void gz_compress      OF((F_FILE in, gzFile out));
-  #ifdef USE_MMAP
-! int  gz_compress_mmap OF((F_FILE in, gzFile out));
-  #endif
-! void gz_uncompress    OF((gzFile in, F_FILE out));
-  void file_compress    OF((char  *file, char *mode));
-  void file_uncompress  OF((char  *file));
-  int  main             OF((int argc, char *argv[]));
-***************
-*** 93,104 ****
-      exit(1);
-  }
-  
-  /* ===========================================================================
-   * Compress input to output then close both files.
-   */
-  
-  void gz_compress(in, out)
-!     FILE   *in;
-      gzFile out;
-  {
-      local char buf[BUFLEN];
---- 112,160 ----
-      exit(1);
-  }
-  
-+ #if defined(_WIN32_WCE)
-+ void perror(msg)
-+     const char *msg;
-+ {
-+     DWORD dwError;
-+     LPVOID lpMsgBuf;
-+ 
-+     dwError = GetLastError();
-+     if ( FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-+         FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE |
-+         FORMAT_MESSAGE_IGNORE_INSERTS,
-+         NULL,
-+         dwError,
-+         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
-+         (LPTSTR) &lpMsgBuf,
-+         0,
-+         NULL) )
-+     {
-+         wprintf(TEXT("%S: %s\n"), msg, (LPTSTR)lpMsgBuf);
-+         LocalFree(lpMsgBuf);
-+     }
-+     else
-+     {
-+         wprintf(TEXT("%S: Error #%d\n"), msg, dwError);
-+     }
-+ }
-+ 
-+ int unlink(filename)
-+     const char *filename;
-+ {
-+     TCHAR path[MAX_PATH];
-+ 
-+     MultiByteToWideChar(CP_ACP, 0, filename, -1, path, MAX_PATH);
-+     return DeleteFile(path);
-+ }
-+ #endif
-+ 
-  /* ===========================================================================
-   * Compress input to output then close both files.
-   */
-  
-  void gz_compress(in, out)
-!     F_FILE in;
-      gzFile out;
-  {
-      local char buf[BUFLEN];
-***************
-*** 112,119 ****
---- 168,179 ----
-      if (gz_compress_mmap(in, out) == Z_OK) return;
-  #endif
-      for (;;) {
-+ #if defined(_WIN32_WCE)
-+         if (!ReadFile(in, buf, sizeof(buf), &len, NULL)) {
-+ #else
-          len = fread(buf, 1, sizeof(buf), in);
-          if (ferror(in)) {
-+ #endif
-              perror("fread");
-              exit(1);
-          }
-***************
-*** 121,127 ****
---- 181,191 ----
-  
-          if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err));
-      }
-+ #if defined(_WIN32_WCE)
-+     CloseHandle(in);
-+ #else
-      fclose(in);
-+ #endif
-      if (gzclose(out) != Z_OK) error("failed gzclose");
-  }
-  
-***************
-*** 131,137 ****
-   * if success, Z_ERRNO otherwise.
-   */
-  int gz_compress_mmap(in, out)
-!     FILE   *in;
-      gzFile out;
-  {
-      int len;
---- 195,201 ----
-   * if success, Z_ERRNO otherwise.
-   */
-  int gz_compress_mmap(in, out)
-!     F_FILE in;
-      gzFile out;
-  {
-      int len;
-***************
-*** 167,177 ****
-   */
-  void gz_uncompress(in, out)
-      gzFile in;
-!     FILE   *out;
-  {
-      local char buf[BUFLEN];
-      int len;
-      int err;
-  
-      for (;;) {
-          len = gzread(in, buf, sizeof(buf));
---- 231,244 ----
-   */
-  void gz_uncompress(in, out)
-      gzFile in;
-!     F_FILE out;
-  {
-      local char buf[BUFLEN];
-      int len;
-      int err;
-+ #if defined(_WIN32_WCE)
-+     int size;
-+ #endif
-  
-      for (;;) {
-          len = gzread(in, buf, sizeof(buf));
-***************
-*** 178,188 ****
-          if (len < 0) error (gzerror(in, &err));
-          if (len == 0) break;
-  
-          if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
-! 	    error("failed fwrite");
-! 	}
-      }
-      if (fclose(out)) error("failed fclose");
-  
-      if (gzclose(in) != Z_OK) error("failed gzclose");
-  }
---- 245,263 ----
-          if (len < 0) error (gzerror(in, &err));
-          if (len == 0) break;
-  
-+ #if defined(_WIN32_WCE)
-+         if (!WriteFile(out, buf, (unsigned)len, &size, NULL) || size != len) {
-+ #else
-          if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
-! #endif
-!             error("failed fwrite");
-!         }
-      }
-+ #if defined(_WIN32_WCE)
-+     if (!CloseHandle(out)) error("failed fclose");
-+ #else
-      if (fclose(out)) error("failed fclose");
-+ #endif
-  
-      if (gzclose(in) != Z_OK) error("failed gzclose");
-  }
-***************
-*** 197,215 ****
-      char  *mode;
-  {
-      local char outfile[MAX_NAME_LEN];
-!     FILE  *in;
-      gzFile out;
-  
-      strcpy(outfile, file);
-      strcat(outfile, GZ_SUFFIX);
-  
-      in = fopen(file, "rb");
-!     if (in == NULL) {
-          perror(file);
-          exit(1);
-      }
-      out = gzopen(outfile, mode);
-!     if (out == NULL) {
-          fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
-          exit(1);
-      }
---- 272,298 ----
-      char  *mode;
-  {
-      local char outfile[MAX_NAME_LEN];
-!     F_FILE in;
-      gzFile out;
-+ #if defined(_WIN32_WCE)
-+     TCHAR path[MAX_PATH];
-+ #endif
-  
-      strcpy(outfile, file);
-      strcat(outfile, GZ_SUFFIX);
-  
-+ #if defined(_WIN32_WCE)
-+     MultiByteToWideChar(CP_ACP, 0, file, -1, path, MAX_PATH);
-+     in = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
-+ #else
-      in = fopen(file, "rb");
-! #endif
-!     if (in == F_NULL) {
-          perror(file);
-          exit(1);
-      }
-      out = gzopen(outfile, mode);
-!     if (out == F_NULL) {
-          fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
-          exit(1);
-      }
-***************
-*** 227,235 ****
-  {
-      local char buf[MAX_NAME_LEN];
-      char *infile, *outfile;
-!     FILE  *out;
-      gzFile in;
-      int len = strlen(file);
-  
-      strcpy(buf, file);
-  
---- 310,321 ----
-  {
-      local char buf[MAX_NAME_LEN];
-      char *infile, *outfile;
-!     F_FILE out;
-      gzFile in;
-      int len = strlen(file);
-+ #if defined(_WIN32_WCE)
-+     TCHAR path[MAX_PATH];
-+ #endif
-  
-      strcpy(buf, file);
-  
-***************
-*** 243,254 ****
-          strcat(infile, GZ_SUFFIX);
-      }
-      in = gzopen(infile, "rb");
-!     if (in == NULL) {
-          fprintf(stderr, "%s: can't gzopen %s\n", prog, infile);
-          exit(1);
-      }
-      out = fopen(outfile, "wb");
-!     if (out == NULL) {
-          perror(file);
-          exit(1);
-      }
---- 329,345 ----
-          strcat(infile, GZ_SUFFIX);
-      }
-      in = gzopen(infile, "rb");
-!     if (in == F_NULL) {
-          fprintf(stderr, "%s: can't gzopen %s\n", prog, infile);
-          exit(1);
-      }
-+ #if defined(_WIN32_WCE)
-+     MultiByteToWideChar(CP_ACP, 0, outfile, -1, path, MAX_PATH);
-+     out = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
-+ #else
-      out = fopen(outfile, "wb");
-! #endif
-!     if (out == F_NULL) {
-          perror(file);
-          exit(1);
-      }
-***************
-*** 272,278 ****
---- 363,371 ----
-      char *argv[];
-  {
-      int uncompr = 0;
-+ #if !defined(_WIN32_WCE)
-      gzFile file;
-+ #endif
-      char outmode[20];
-  
-      strcpy(outmode, "wb6 ");
-***************
-*** 282,300 ****
-  
-      while (argc > 0) {
-        if (strcmp(*argv, "-d") == 0)
-! 	uncompr = 1;
-        else if (strcmp(*argv, "-f") == 0)
-! 	outmode[3] = 'f';
-        else if (strcmp(*argv, "-h") == 0)
-! 	outmode[3] = 'h';
-        else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' &&
-! 	       (*argv)[2] == 0)
-! 	outmode[2] = (*argv)[1];
-        else
-! 	break;
-        argc--, argv++;
-      }
-      if (argc == 0) {
-          SET_BINARY_MODE(stdin);
-          SET_BINARY_MODE(stdout);
-          if (uncompr) {
---- 375,400 ----
-  
-      while (argc > 0) {
-        if (strcmp(*argv, "-d") == 0)
-!         uncompr = 1;
-        else if (strcmp(*argv, "-f") == 0)
-!         outmode[3] = 'f';
-        else if (strcmp(*argv, "-h") == 0)
-!         outmode[3] = 'h';
-        else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' &&
-!                (*argv)[2] == 0)
-!         outmode[2] = (*argv)[1];
-        else
-!         break;
-        argc--, argv++;
-      }
-      if (argc == 0) {
-+ #if defined(_WIN32_WCE)
-+         wprintf(TEXT("Usage:  minigzip [-d] [-f] [-h] [-1 to -9] [files...]\n"));
-+         wprintf(TEXT("  -d : decompress\n"));
-+         wprintf(TEXT("  -f : compress with Z_FILTERED\n"));
-+         wprintf(TEXT("  -h : compress with Z_HUFFMAN_ONLY\n"));
-+         wprintf(TEXT("  -1 to -9 : compression level\n"));
-+ #else
-          SET_BINARY_MODE(stdin);
-          SET_BINARY_MODE(stdout);
-          if (uncompr) {
-***************
-*** 306,311 ****
---- 406,412 ----
-              if (file == NULL) error("can't gzdopen stdout");
-              gz_compress(stdin, file);
-          }
-+ #endif
-      } else {
-          do {
-              if (uncompr) {
-***************
-*** 318,320 ****
---- 419,457 ----
-      exit(0);
-      return 0; /* to avoid warning */
-  }
-+ 
-+ #if defined(_WIN32_WCE)
-+ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR lpszCmdLine, int nCmdShow)
-+ {
-+     #define SIZE_ARGV   (32)
-+     int argc;
-+     char *argv[SIZE_ARGV];
-+     int size;
-+     char *buff;
-+     char *argp;
-+ 
-+     size = WideCharToMultiByte(CP_ACP, 0, lpszCmdLine, -1, NULL, 0, NULL, NULL);
-+     buff = (char *)malloc(size);
-+     size = WideCharToMultiByte(CP_ACP, 0, lpszCmdLine, -1, buff, size, NULL, NULL);
-+     argp = buff;
-+     argc = 0;
-+     argv[argc++] = "minigzip.exe";
-+     if (*argp) {
-+         argv[argc++] = argp;
-+         while (*argp) {
-+             if (*argp == ' ') {
-+                 *argp++ = '\0';
-+                 while (*argp && *argp == ' ') {
-+                     argp++;
-+                 }
-+                 if (*argp && argc < SIZE_ARGV) {
-+                     argv[argc++] = argp;
-+                 }
-+             } else {
-+                 argp++;
-+             }
-+         }
-+     }
-+     return main(argc, argv);
-+ }
-+ #endif
-*** zlib113/example.c	Sat Jul  8 13:59:49 2000
---- zlibwce/example.c	Sat Jul  8 13:58:29 2000
-***************
-*** 1,11 ****
---- 1,19 ----
-  /* example.c -- usage example of the zlib compression library
-   * Copyright (C) 1995-1998 Jean-loup Gailly.
-+  * Copyright (C) 2000      Tenik Co.,Ltd.
-   * For conditions of distribution and use, see copyright notice in zlib.h 
-   */
-  
-  /* @(#) $Id$ */
-  
-+ #if defined(_WIN32_WCE)
-+ #if _WIN32_WCE < 211
-+ #error (f|w)printf functions is not support old WindowsCE.
-+ #endif
-+ #include <windows.h>
-+ #else
-  #include <stdio.h>
-+ #endif
-  #include "zlib.h"
-  
-  #ifdef STDC
-***************
-*** 21,26 ****
---- 29,43 ----
-  #  define TESTFILE "foo.gz"
-  #endif
-  
-+ #if defined(_WIN32_WCE)
-+ #define calloc(x,y) malloc((x)*(y))
-+ #undef  stderr
-+ #define stderr  stdout
-+ #define F_NULL  INVALID_HANDLE_VALUE
-+ #else
-+ #define F_NULL  NULL
-+ #endif
-+ 
-  #define CHECK_ERR(err, msg) { \
-      if (err != Z_OK) { \
-          fprintf(stderr, "%s error: %d\n", msg, err); \
-***************
-*** 37,58 ****
-  uLong dictId; /* Adler32 value of the dictionary */
-  
-  void test_compress      OF((Byte *compr, uLong comprLen,
-! 		            Byte *uncompr, uLong uncomprLen));
-  void test_gzio          OF((const char *out, const char *in, 
-! 		            Byte *uncompr, int uncomprLen));
-  void test_deflate       OF((Byte *compr, uLong comprLen));
-  void test_inflate       OF((Byte *compr, uLong comprLen,
-! 		            Byte *uncompr, uLong uncomprLen));
-  void test_large_deflate OF((Byte *compr, uLong comprLen,
-! 		            Byte *uncompr, uLong uncomprLen));
-  void test_large_inflate OF((Byte *compr, uLong comprLen,
-! 		            Byte *uncompr, uLong uncomprLen));
-  void test_flush         OF((Byte *compr, uLong *comprLen));
-  void test_sync          OF((Byte *compr, uLong comprLen,
-! 		            Byte *uncompr, uLong uncomprLen));
-  void test_dict_deflate  OF((Byte *compr, uLong comprLen));
-  void test_dict_inflate  OF((Byte *compr, uLong comprLen,
-! 		            Byte *uncompr, uLong uncomprLen));
-  int  main               OF((int argc, char *argv[]));
-  
-  /* ===========================================================================
---- 54,75 ----
-  uLong dictId; /* Adler32 value of the dictionary */
-  
-  void test_compress      OF((Byte *compr, uLong comprLen,
-!                             Byte *uncompr, uLong uncomprLen));
-  void test_gzio          OF((const char *out, const char *in, 
-!                             Byte *uncompr, int uncomprLen));
-  void test_deflate       OF((Byte *compr, uLong comprLen));
-  void test_inflate       OF((Byte *compr, uLong comprLen,
-!                             Byte *uncompr, uLong uncomprLen));
-  void test_large_deflate OF((Byte *compr, uLong comprLen,
-!                             Byte *uncompr, uLong uncomprLen));
-  void test_large_inflate OF((Byte *compr, uLong comprLen,
-!                             Byte *uncompr, uLong uncomprLen));
-  void test_flush         OF((Byte *compr, uLong *comprLen));
-  void test_sync          OF((Byte *compr, uLong comprLen,
-!                             Byte *uncompr, uLong uncomprLen));
-  void test_dict_deflate  OF((Byte *compr, uLong comprLen));
-  void test_dict_inflate  OF((Byte *compr, uLong comprLen,
-!                             Byte *uncompr, uLong uncomprLen));
-  int  main               OF((int argc, char *argv[]));
-  
-  /* ===========================================================================
-***************
-*** 75,81 ****
-  
-      if (strcmp((char*)uncompr, hello)) {
-          fprintf(stderr, "bad uncompress\n");
-! 	exit(1);
-      } else {
-          printf("uncompress(): %s\n", (char *)uncompr);
-      }
---- 92,98 ----
-  
-      if (strcmp((char*)uncompr, hello)) {
-          fprintf(stderr, "bad uncompress\n");
-!         exit(1);
-      } else {
-          printf("uncompress(): %s\n", (char *)uncompr);
-      }
-***************
-*** 96,102 ****
-      z_off_t pos;
-  
-      file = gzopen(out, "wb");
-!     if (file == NULL) {
-          fprintf(stderr, "gzopen error\n");
-          exit(1);
-      }
---- 113,119 ----
-      z_off_t pos;
-  
-      file = gzopen(out, "wb");
-!     if (file == F_NULL) {
-          fprintf(stderr, "gzopen error\n");
-          exit(1);
-      }
-***************
-*** 103,119 ****
-      gzputc(file, 'h');
-      if (gzputs(file, "ello") != 4) {
-          fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
-! 	exit(1);
-      }
-      if (gzprintf(file, ", %s!", "hello") != 8) {
-          fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
-! 	exit(1);
-      }
-      gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
-      gzclose(file);
-  
-      file = gzopen(in, "rb");
-!     if (file == NULL) {
-          fprintf(stderr, "gzopen error\n");
-      }
-      strcpy((char*)uncompr, "garbage");
---- 120,136 ----
-      gzputc(file, 'h');
-      if (gzputs(file, "ello") != 4) {
-          fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
-!         exit(1);
-      }
-      if (gzprintf(file, ", %s!", "hello") != 8) {
-          fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
-!         exit(1);
-      }
-      gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
-      gzclose(file);
-  
-      file = gzopen(in, "rb");
-!     if (file == F_NULL) {
-          fprintf(stderr, "gzopen error\n");
-      }
-      strcpy((char*)uncompr, "garbage");
-***************
-*** 121,131 ****
-      uncomprLen = gzread(file, uncompr, (unsigned)uncomprLen);
-      if (uncomprLen != len) {
-          fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
-! 	exit(1);
-      }
-      if (strcmp((char*)uncompr, hello)) {
-          fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
-! 	exit(1);
-      } else {
-          printf("gzread(): %s\n", (char *)uncompr);
-      }
---- 138,148 ----
-      uncomprLen = gzread(file, uncompr, (unsigned)uncomprLen);
-      if (uncomprLen != len) {
-          fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
-!         exit(1);
-      }
-      if (strcmp((char*)uncompr, hello)) {
-          fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
-!         exit(1);
-      } else {
-          printf("gzread(): %s\n", (char *)uncompr);
-      }
-***************
-*** 132,145 ****
-  
-      pos = gzseek(file, -8L, SEEK_CUR);
-      if (pos != 6 || gztell(file) != pos) {
-! 	fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
-! 		(long)pos, (long)gztell(file));
-! 	exit(1);
-      }
-  
-      if (gzgetc(file) != ' ') {
-! 	fprintf(stderr, "gzgetc error\n");
-! 	exit(1);
-      }
-  
-      gzgets(file, (char*)uncompr, uncomprLen);
---- 149,162 ----
-  
-      pos = gzseek(file, -8L, SEEK_CUR);
-      if (pos != 6 || gztell(file) != pos) {
-!         fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
-!                 (long)pos, (long)gztell(file));
-!         exit(1);
-      }
-  
-      if (gzgetc(file) != ' ') {
-!         fprintf(stderr, "gzgetc error\n");
-!         exit(1);
-      }
-  
-      gzgets(file, (char*)uncompr, uncomprLen);
-***************
-*** 146,156 ****
-      uncomprLen = strlen((char*)uncompr);
-      if (uncomprLen != 6) { /* "hello!" */
-          fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
-! 	exit(1);
-      }
-      if (strcmp((char*)uncompr, hello+7)) {
-          fprintf(stderr, "bad gzgets after gzseek\n");
-! 	exit(1);
-      } else {
-          printf("gzgets() after gzseek: %s\n", (char *)uncompr);
-      }
---- 163,173 ----
-      uncomprLen = strlen((char*)uncompr);
-      if (uncomprLen != 6) { /* "hello!" */
-          fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
-!         exit(1);
-      }
-      if (strcmp((char*)uncompr, hello+7)) {
-          fprintf(stderr, "bad gzgets after gzseek\n");
-!         exit(1);
-      } else {
-          printf("gzgets() after gzseek: %s\n", (char *)uncompr);
-      }
-***************
-*** 231,237 ****
-  
-      if (strcmp((char*)uncompr, hello)) {
-          fprintf(stderr, "bad inflate\n");
-! 	exit(1);
-      } else {
-          printf("inflate(): %s\n", (char *)uncompr);
-      }
---- 248,254 ----
-  
-      if (strcmp((char*)uncompr, hello)) {
-          fprintf(stderr, "bad inflate\n");
-!         exit(1);
-      } else {
-          printf("inflate(): %s\n", (char *)uncompr);
-      }
-***************
-*** 266,272 ****
-      CHECK_ERR(err, "deflate");
-      if (c_stream.avail_in != 0) {
-          fprintf(stderr, "deflate not greedy\n");
-! 	exit(1);
-      }
-  
-      /* Feed in already compressed data and switch to no compression: */
---- 283,289 ----
-      CHECK_ERR(err, "deflate");
-      if (c_stream.avail_in != 0) {
-          fprintf(stderr, "deflate not greedy\n");
-!         exit(1);
-      }
-  
-      /* Feed in already compressed data and switch to no compression: */
-***************
-*** 286,292 ****
-      err = deflate(&c_stream, Z_FINISH);
-      if (err != Z_STREAM_END) {
-          fprintf(stderr, "deflate should report Z_STREAM_END\n");
-! 	exit(1);
-      }
-      err = deflateEnd(&c_stream);
-      CHECK_ERR(err, "deflateEnd");
---- 303,309 ----
-      err = deflate(&c_stream, Z_FINISH);
-      if (err != Z_STREAM_END) {
-          fprintf(stderr, "deflate should report Z_STREAM_END\n");
-!         exit(1);
-      }
-      err = deflateEnd(&c_stream);
-      CHECK_ERR(err, "deflateEnd");
-***************
-*** 316,322 ****
-  
-      for (;;) {
-          d_stream.next_out = uncompr;            /* discard the output */
-! 	d_stream.avail_out = (uInt)uncomprLen;
-          err = inflate(&d_stream, Z_NO_FLUSH);
-          if (err == Z_STREAM_END) break;
-          CHECK_ERR(err, "large inflate");
---- 333,339 ----
-  
-      for (;;) {
-          d_stream.next_out = uncompr;            /* discard the output */
-!         d_stream.avail_out = (uInt)uncomprLen;
-          err = inflate(&d_stream, Z_NO_FLUSH);
-          if (err == Z_STREAM_END) break;
-          CHECK_ERR(err, "large inflate");
-***************
-*** 327,333 ****
-  
-      if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
-          fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
-! 	exit(1);
-      } else {
-          printf("large_inflate(): OK\n");
-      }
---- 344,350 ----
-  
-      if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
-          fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
-!         exit(1);
-      } else {
-          printf("large_inflate(): OK\n");
-      }
-***************
-*** 407,413 ****
-      if (err != Z_DATA_ERROR) {
-          fprintf(stderr, "inflate should report DATA_ERROR\n");
-          /* Because of incorrect adler32 */
-! 	exit(1);
-      }
-      err = inflateEnd(&d_stream);
-      CHECK_ERR(err, "inflateEnd");
---- 424,430 ----
-      if (err != Z_DATA_ERROR) {
-          fprintf(stderr, "inflate should report DATA_ERROR\n");
-          /* Because of incorrect adler32 */
-!         exit(1);
-      }
-      err = inflateEnd(&d_stream);
-      CHECK_ERR(err, "inflateEnd");
-***************
-*** 433,439 ****
-      CHECK_ERR(err, "deflateInit");
-  
-      err = deflateSetDictionary(&c_stream,
-! 			       (const Bytef*)dictionary, sizeof(dictionary));
-      CHECK_ERR(err, "deflateSetDictionary");
-  
-      dictId = c_stream.adler;
---- 450,456 ----
-      CHECK_ERR(err, "deflateInit");
-  
-      err = deflateSetDictionary(&c_stream,
-!                                (const Bytef*)dictionary, sizeof(dictionary));
-      CHECK_ERR(err, "deflateSetDictionary");
-  
-      dictId = c_stream.adler;
-***************
-*** 446,452 ****
-      err = deflate(&c_stream, Z_FINISH);
-      if (err != Z_STREAM_END) {
-          fprintf(stderr, "deflate should report Z_STREAM_END\n");
-! 	exit(1);
-      }
-      err = deflateEnd(&c_stream);
-      CHECK_ERR(err, "deflateEnd");
---- 463,469 ----
-      err = deflate(&c_stream, Z_FINISH);
-      if (err != Z_STREAM_END) {
-          fprintf(stderr, "deflate should report Z_STREAM_END\n");
-!         exit(1);
-      }
-      err = deflateEnd(&c_stream);
-      CHECK_ERR(err, "deflateEnd");
-***************
-*** 480,493 ****
-      for (;;) {
-          err = inflate(&d_stream, Z_NO_FLUSH);
-          if (err == Z_STREAM_END) break;
-! 	if (err == Z_NEED_DICT) {
-! 	    if (d_stream.adler != dictId) {
-! 		fprintf(stderr, "unexpected dictionary");
-! 		exit(1);
-! 	    }
-! 	    err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
-! 				       sizeof(dictionary));
-! 	}
-          CHECK_ERR(err, "inflate with dict");
-      }
-  
---- 497,510 ----
-      for (;;) {
-          err = inflate(&d_stream, Z_NO_FLUSH);
-          if (err == Z_STREAM_END) break;
-!         if (err == Z_NEED_DICT) {
-!             if (d_stream.adler != dictId) {
-!                 fprintf(stderr, "unexpected dictionary");
-!                 exit(1);
-!             }
-!             err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
-!                                        sizeof(dictionary));
-!         }
-          CHECK_ERR(err, "inflate with dict");
-      }
-  
-***************
-*** 496,502 ****
-  
-      if (strcmp((char*)uncompr, hello)) {
-          fprintf(stderr, "bad inflate with dict\n");
-! 	exit(1);
-      } else {
-          printf("inflate with dictionary: %s\n", (char *)uncompr);
-      }
---- 513,519 ----
-  
-      if (strcmp((char*)uncompr, hello)) {
-          fprintf(stderr, "bad inflate with dict\n");
-!         exit(1);
-      } else {
-          printf("inflate with dictionary: %s\n", (char *)uncompr);
-      }
-***************
-*** 530,542 ****
-       */
-      if (compr == Z_NULL || uncompr == Z_NULL) {
-          printf("out of memory\n");
-! 	exit(1);
-      }
-      test_compress(compr, comprLen, uncompr, uncomprLen);
-  
-      test_gzio((argc > 1 ? argv[1] : TESTFILE),
-                (argc > 2 ? argv[2] : TESTFILE),
-! 	      uncompr, (int)uncomprLen);
-  
-      test_deflate(compr, comprLen);
-      test_inflate(compr, comprLen, uncompr, uncomprLen);
---- 547,559 ----
-       */
-      if (compr == Z_NULL || uncompr == Z_NULL) {
-          printf("out of memory\n");
-!         exit(1);
-      }
-      test_compress(compr, comprLen, uncompr, uncomprLen);
-  
-      test_gzio((argc > 1 ? argv[1] : TESTFILE),
-                (argc > 2 ? argv[2] : TESTFILE),
-!               uncompr, (int)uncomprLen);
-  
-      test_deflate(compr, comprLen);
-      test_inflate(compr, comprLen, uncompr, uncomprLen);
-***************
-*** 554,556 ****
---- 571,609 ----
-      exit(0);
-      return 0; /* to avoid warning */
-  }
-+ 
-+ #if defined(_WIN32_WCE)
-+ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR lpszCmdLine, int nCmdShow)
-+ {
-+     #define SIZE_ARGV   (32)
-+     int argc;
-+     char *argv[SIZE_ARGV];
-+     int size;
-+     char *buff;
-+     char *argp;
-+ 
-+     size = WideCharToMultiByte(CP_ACP, 0, lpszCmdLine, -1, NULL, 0, NULL, NULL);
-+     buff = (char *)malloc(size);
-+     size = WideCharToMultiByte(CP_ACP, 0, lpszCmdLine, -1, buff, size, NULL, NULL);
-+     argp = buff;
-+     argc = 0;
-+     argv[argc++] = "example.exe";
-+     if (*argp) {
-+         argv[argc++] = argp;
-+         while (*argp) {
-+             if (*argp == ' ') {
-+                 *argp++ = '\0';
-+                 while (*argp && *argp == ' ') {
-+                     argp++;
-+                 }
-+                 if (*argp && argc < SIZE_ARGV) {
-+                     argv[argc++] = argp;
-+                 }
-+             } else {
-+                 argp++;
-+             }
-+         }
-+     }
-+     return main(argc, argv);
-+ }
-+ #endif
diff --git a/projects/wince/zlibce.def b/projects/wince/zlibce.def
deleted file mode 100644
index 353437c..0000000
--- a/projects/wince/zlibce.def
+++ /dev/null
@@ -1,44 +0,0 @@
-LIBRARY     zlibce.dll
-
-EXPORTS
-    adler32                        @1
-    compress                       @2
-    crc32                          @3
-    deflate                        @4
-    deflateCopy                    @5
-    deflateEnd                     @6
-    deflateInit2_                  @7
-    deflateInit_                   @8
-    deflateParams                  @9
-    deflateReset                   @10
-    deflateSetDictionary           @11
-    gzclose                        @12
-    gzdopen                        @13
-    gzerror                        @14
-    gzflush                        @15
-    gzopen                         @16
-    gzread                         @17
-    gzwrite                        @18
-    inflate                        @19
-    inflateEnd                     @20
-    inflateInit2_                  @21
-    inflateInit_                   @22
-    inflateReset                   @23
-    inflateSetDictionary           @24
-    inflateSync                    @25
-    uncompress                     @26
-    zlibVersion                    @27
-    gzprintf                       @28
-    gzputc                         @29
-    gzgetc                         @30
-    gzseek                         @31
-    gzrewind                       @32
-    gztell                         @33
-    gzeof                          @34
-    gzsetparams                    @35
-    zError                         @36
-    inflateSyncPoint               @37
-    get_crc_table                  @38
-    compress2                      @39
-    gzputs                         @40
-    gzgets                         @41
diff --git a/projects/wince/zlibce.dsp b/projects/wince/zlibce.dsp
deleted file mode 100644
index b2797ff..0000000
--- a/projects/wince/zlibce.dsp
+++ /dev/null
@@ -1,2832 +0,0 @@
-# Microsoft Developer Studio Project File - Name="zlibce" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (WCE x86em) Dynamic-Link Library" 0x7f02
-# TARGTYPE "Win32 (WCE SH3) Dynamic-Link Library" 0x8102
-# TARGTYPE "Win32 (WCE PPC) Dynamic-Link Library" 0x8402
-# TARGTYPE "Win32 (WCE x86) Dynamic-Link Library" 0x8302
-# TARGTYPE "Win32 (WCE MIPSFP) Dynamic-Link Library" 0x8702
-# TARGTYPE "Win32 (WCE ARM) Dynamic-Link Library" 0x8502
-# TARGTYPE "Win32 (WCE SH4) Dynamic-Link Library" 0x8602
-# TARGTYPE "Win32 (WCE MIPS) Dynamic-Link Library" 0x8202
-
-CFG=zlibce - Win32 (WCE MIPS) Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "zlibce.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "zlibce.mak" CFG="zlibce - Win32 (WCE MIPS) Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "zlibce - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE MIPS) Debug" (based on "Win32 (WCE MIPS) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE SH4) Release" (based on "Win32 (WCE SH4) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE SH4) Debug" (based on "Win32 (WCE SH4) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE SH3) Debug" (based on "Win32 (WCE SH3) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE MIPSFP) Release" (based on "Win32 (WCE MIPSFP) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE MIPSFP) Debug" (based on "Win32 (WCE MIPSFP) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE PPC) Release" (based on "Win32 (WCE PPC) Dynamic-Link Library")
-!MESSAGE "zlibce - Win32 (WCE PPC) Debug" (based on "Win32 (WCE PPC) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath "H/PC Ver. 2.00"
-# PROP WCE_FormatVersion "6.0"
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WMIPSRel"
-# PROP BASE Intermediate_Dir "WMIPSRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WMIPSRel"
-# PROP Intermediate_Dir "WMIPSRel"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /GX- /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /QMRWCE  /c
-# ADD CPP /nologo /M$(CECrt) /W3 /GX- /O2 /I "..\..\..\zlib" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /QMRWCE  /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WMIPSDbg"
-# PROP BASE Intermediate_Dir "WMIPSDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WMIPSDbg"
-# PROP Intermediate_Dir "WMIPSDbg"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /GX- /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /QMRWCE  /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /GX- /Zi /Od /I "..\..\..\zlib" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /QMRWCE  /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCESH4Rel"
-# PROP BASE Intermediate_Dir "WCESH4Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCESH4Rel"
-# PROP Intermediate_Dir "WCESH4Rel"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /Qsh4 /MC /W3 /GX- /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /Qsh4 /MC /W3 /GX- /O2 /I "..\..\..\zlib" /D "NDEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCESH4Dbg"
-# PROP BASE Intermediate_Dir "WCESH4Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCESH4Dbg"
-# PROP Intermediate_Dir "WCESH4Dbg"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /Qsh4 /MC /W3 /GX- /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /Qsh4 /MC /W3 /GX- /Zi /Od /I "..\..\..\zlib" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH4" /d "_SH4_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH4 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCESH3Rel"
-# PROP BASE Intermediate_Dir "WCESH3Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCESH3Rel"
-# PROP Intermediate_Dir "WCESH3Rel"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /GX- /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrt) /W3 /GX- /O2 /I "..\..\..\zlib" /D "NDEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCESH3Dbg"
-# PROP BASE Intermediate_Dir "WCESH3Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCESH3Dbg"
-# PROP Intermediate_Dir "WCESH3Dbg"
-# PROP Target_Dir ""
-CPP=shcl.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /GX- /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /GX- /Zi /Od /I "..\..\..\zlib" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEARMRel"
-# PROP BASE Intermediate_Dir "WCEARMRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEARMRel"
-# PROP Intermediate_Dir "WCEARMRel"
-# PROP Target_Dir ""
-CPP=clarm.exe
-# ADD BASE CPP /nologo /MC /W3 /GX- /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /MC /W3 /GX- /O2 /I "..\..\..\zlib" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 coredll.lib commctrl.lib /nologo /dll /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 coredll.lib commctrl.lib /nologo /dll /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEARMDbg"
-# PROP BASE Intermediate_Dir "WCEARMDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEARMDbg"
-# PROP Intermediate_Dir "WCEARMDbg"
-# PROP Target_Dir ""
-CPP=clarm.exe
-# ADD BASE CPP /nologo /MC /W3 /GX- /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /MC /W3 /GX- /Zi /Od /I "..\..\..\zlib" /D "DEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "ARM" /d "_ARM_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 coredll.lib commctrl.lib /nologo /dll /debug /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 coredll.lib commctrl.lib /nologo /dll /debug /machine:ARM /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WMIPSFPRel"
-# PROP BASE Intermediate_Dir "WMIPSFPRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WMIPSFPRel"
-# PROP Intermediate_Dir "WMIPSFPRel"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /QMFWCE /MC /W3 /GX- /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /QMFWCE /MC /W3 /GX- /O2 /I "..\..\..\zlib" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WMIPSFPDbg"
-# PROP BASE Intermediate_Dir "WMIPSFPDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WMIPSFPDbg"
-# PROP Intermediate_Dir "WMIPSFPDbg"
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /QMFWCE /MC /W3 /GX- /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /QMFWCE /MC /W3 /GX- /Zi /Od /I "..\..\..\zlib" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEX86Rel"
-# PROP BASE Intermediate_Dir "WCEX86Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEX86Rel"
-# PROP Intermediate_Dir "WCEX86Rel"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /W3 /GX- /O2 /D "x86" /D "_i386_" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "NDEBUG" /D "i_386_" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /Gs8192 /GF  /c
-# ADD CPP /nologo /ML /W3 /GX- /O2 /I "..\..\..\zlib" /D "x86" /D "_i386_" /D "_x86_" /D "NDEBUG" /D "i_386_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /Gs8192 /GF  /c
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /dll /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /dll /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEX86Dbg"
-# PROP BASE Intermediate_Dir "WCEX86Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEX86Dbg"
-# PROP Intermediate_Dir "WCEX86Dbg"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MLd /W3 /GX- /Zi /Od /D "x86" /D "_i386_" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "DEBUG" /D "i_386_" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /Gs8192 /GF  /c
-# ADD CPP /nologo /MLd /W3 /GX- /Zi /Od /I "..\..\..\zlib" /D "x86" /D "_i386_" /D "_x86_" /D "DEBUG" /D "i_386_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /Gs8192 /GF  /c
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "x86" /d "_i386_" /d "_x86_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /dll /debug /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /dll /debug /machine:IX86 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "x86emRel"
-# PROP BASE Intermediate_Dir "x86emRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "x86emRel"
-# PROP Intermediate_Dir "x86emRel"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /W3 /GX- /O2 /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "NDEBUG" /D "x86" /D "i486" /D "_x86_" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /ML /W3 /GX- /O2 /I "..\..\..\zlib" /D "_UNICODE" /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "NDEBUG" /D "x86" /D "i486" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "NDEBUG"
-# ADD RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "x86emDbg"
-# PROP BASE Intermediate_Dir "x86emDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "x86emDbg"
-# PROP Intermediate_Dir "x86emDbg"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MLd /W3 /Gm /GX- /Zi /Od /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "_DEBUG" /D "x86" /D "i486" /D "_x86_" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /MLd /W3 /Gm /GX- /Zi /Od /I "..\..\..\zlib" /D "_UNICODE" /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "_DEBUG" /D "x86" /D "i486" /D "_x86_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "_DEBUG" /d "x86" /d "i486" /d "_x86_"
-# ADD RSC /l 0x411 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "_DEBUG" /d "x86" /d "i486" /d "_x86_"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /debug /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /debug /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCEPPCRel"
-# PROP BASE Intermediate_Dir "WCEPPCRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "WCEPPCRel"
-# PROP Intermediate_Dir "WCEPPCRel"
-# PROP Target_Dir ""
-CPP=clppc.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /GX- /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "PPC" /D "_PPC_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrt) /W3 /GX- /O2 /I "..\..\..\zlib" /D "NDEBUG" /D "PPC" /D "_PPC_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCEPPCDbg"
-# PROP BASE Intermediate_Dir "WCEPPCDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "WCEPPCDbg"
-# PROP Intermediate_Dir "WCEPPCDbg"
-# PROP Target_Dir ""
-CPP=clppc.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /GX- /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "PPC" /D "_PPC_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ZLIBCE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrtDebug) /W3 /GX- /Zi /Od /I "..\..\..\zlib" /D "DEBUG" /D "PPC" /D "_PPC_" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "ZLIB_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x411 /r /d "ppc" /d "_ppc_" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:PPC /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ENDIF 
-
-# Begin Target
-
-# Name "zlibce - Win32 (WCE MIPS) Release"
-# Name "zlibce - Win32 (WCE MIPS) Debug"
-# Name "zlibce - Win32 (WCE SH4) Release"
-# Name "zlibce - Win32 (WCE SH4) Debug"
-# Name "zlibce - Win32 (WCE SH3) Release"
-# Name "zlibce - Win32 (WCE SH3) Debug"
-# Name "zlibce - Win32 (WCE ARM) Release"
-# Name "zlibce - Win32 (WCE ARM) Debug"
-# Name "zlibce - Win32 (WCE MIPSFP) Release"
-# Name "zlibce - Win32 (WCE MIPSFP) Debug"
-# Name "zlibce - Win32 (WCE x86) Release"
-# Name "zlibce - Win32 (WCE x86) Debug"
-# Name "zlibce - Win32 (WCE x86em) Release"
-# Name "zlibce - Win32 (WCE x86em) Debug"
-# Name "zlibce - Win32 (WCE PPC) Release"
-# Name "zlibce - Win32 (WCE PPC) Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\..\zlib\adler32.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_ADLER=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\compress.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_COMPR=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\crc32.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_CRC32=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\deflate.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_DEFLA=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\gzio.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_GZIO_C=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\infblock.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_INFBL=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\infcodes.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_INFCO=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\inffast.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_INFFA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inffast.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\inflate.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_INFLA=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\inftrees.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_INFTR=\
-	"..\..\..\zlib\inffixed.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\infutil.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_INFUT=\
-	"..\..\..\zlib\infblock.h"\
-	"..\..\..\zlib\infcodes.h"\
-	"..\..\..\zlib\inftrees.h"\
-	"..\..\..\zlib\infutil.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\trees.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_TREES=\
-	"..\..\..\zlib\deflate.h"\
-	"..\..\..\zlib\trees.h"\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\uncompr.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_UNCOM=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\zlibce.def
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\zutil.c
-
-!IF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Release"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPS) Debug"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Release"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH4) Debug"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Release"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE SH3) Debug"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Release"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE ARM) Debug"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Release"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE MIPSFP) Debug"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Release"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86) Debug"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Release"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE x86em) Debug"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Release"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ELSEIF  "$(CFG)" == "zlibce - Win32 (WCE PPC) Debug"
-
-DEP_CPP_ZUTIL=\
-	"..\..\..\zlib\zconf.h"\
-	"..\..\..\zlib\zlib.h"\
-	"..\..\..\zlib\zutil.h"\
-	
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\..\zlib\deflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\infblock.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\infcodes.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\inffast.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\inffixed.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\inftrees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\infutil.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\trees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\zlib.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\zlib\zutil.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
new file mode 100644
index 0000000..bcaa155
--- /dev/null
+++ b/scripts/libpng.pc.in
@@ -0,0 +1,11 @@
+
+prefix=@PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${exec_prefix}/include
+
+Name: libpng10
+Description: Loads and saves PNG files
+Version: 1.0.13
+Libs: -L${libdir} -lpng10
+Cflags: -I${includedir}/libpng10
diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu
new file mode 100644
index 0000000..eda3e8f
--- /dev/null
+++ b/scripts/makefile.32sunu
@@ -0,0 +1,147 @@
+# makefile for libpng on Solaris 2.x with gcc
+# Contributed by William L. Sebok, based on makefile.linux
+# Copyright (C) 2002 Glenn Randers-Pehrson
+# Copyright (C) 1998 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+# For conditions of distribution and use, see copyright notice in png.h
+
+CC=cc
+SUN_CC_FLAGS=-fast -xtarget=ultra
+SUN_LD_FLAGS=-fast -xtarget=ultra
+
+# where make install puts libpng.a, libpng10.so and libpng10/png.h
+prefix=/a
+
+# Where the zlib library and include files are located
+# Changing these to ../zlib poses a security risk.  If you want
+# to have zlib in an adjacent directory, specify the full path instead of "..".
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+
+ZLIBLIB=/usr/lib
+ZLIBINC=/usr/include
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+	-Wmissing-declarations -Wtraditional -Wcast-align \
+	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
+	# $(WARNMORE) -g -DPNG_DEBUG=5
+LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng10 -lz -lm
+
+#RANLIB=ranlib
+RANLIB=echo
+
+LIBNAME=libpng10
+PNGMAJ = 0
+PNGMIN = 1.0.13
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+	pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES:      .c .o .pic.o
+
+.c.pic.o:
+	$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
+
+all: libpng.a $(LIBNAME).so pngtest
+
+libpng.a: $(OBJS)
+	ar rc $@ $(OBJS)
+	$(RANLIB) $@
+
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
+
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
+
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
+	@case "`type ld`" in *ucb*) \
+	echo; \
+	echo '## WARNING:'; \
+	echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
+	echo '## and /usr/ucb/ld.  If they do, you need to adjust your PATH'; \
+	echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
+	echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
+	echo '## at all.  If it is, things are likely to break because of'; \
+	echo '## the libucb dependency that is created.'; \
+	echo; \
+	;; \
+	esac
+	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
+	 -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -lz
+
+pngtest: pngtest.o $(LIBNAME).so
+	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+	./pngtest
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm $(INCPATH)/libpng
+	ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+clean:
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+	chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h
+pngerror.o pngerror.pic.o: png.h pngconf.h
+pngrio.o pngrio.pic.o: png.h pngconf.h
+pngwio.o pngwio.pic.o: png.h pngconf.h
+pngmem.o pngmem.pic.o: png.h pngconf.h
+pngset.o pngset.pic.o: png.h pngconf.h
+pngget.o pngget.pic.o: png.h pngconf.h
+pngread.o pngread.pic.o: png.h pngconf.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h
+pngpread.o pngpread.pic.o: png.h pngconf.h
+
+pngtest.o: png.h pngconf.h
diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu
new file mode 100644
index 0000000..60b8f53
--- /dev/null
+++ b/scripts/makefile.64sunu
@@ -0,0 +1,147 @@
+# makefile for libpng on Solaris 2.x with gcc
+# Contributed by William L. Sebok, based on makefile.linux
+# Copyright (C) 2002 Glenn Randers-Pehrson
+# Copyright (C) 1998 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+# For conditions of distribution and use, see copyright notice in png.h
+
+CC=cc
+SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
+SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
+
+# where make install puts libpng.a, libpng10.so and libpng10/png.h
+prefix=/a
+
+# Where the zlib library and include files are located
+# Changing these to ../zlib poses a security risk.  If you want
+# to have zlib in an adjacent directory, specify the full path instead of "..".
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+
+ZLIBLIB=/usr/lib
+ZLIBINC=/usr/include
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+	-Wmissing-declarations -Wtraditional -Wcast-align \
+	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
+	# $(WARNMORE) -g -DPNG_DEBUG=5
+LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng10 -lz -lm
+
+#RANLIB=ranlib
+RANLIB=echo
+
+LIBNAME=libpng10
+PNGMAJ = 0
+PNGMIN = 1.0.13
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+	pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES:      .c .o .pic.o
+
+.c.pic.o:
+	$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
+
+all: libpng.a $(LIBNAME).so pngtest
+
+libpng.a: $(OBJS)
+	ar rc $@ $(OBJS)
+	$(RANLIB) $@
+
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
+
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
+
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
+	@case "`type ld`" in *ucb*) \
+	echo; \
+	echo '## WARNING:'; \
+	echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
+	echo '## and /usr/ucb/ld.  If they do, you need to adjust your PATH'; \
+	echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
+	echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
+	echo '## at all.  If it is, things are likely to break because of'; \
+	echo '## the libucb dependency that is created.'; \
+	echo; \
+	;; \
+	esac
+	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
+	 -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -lz
+
+pngtest: pngtest.o $(LIBNAME).so
+	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+	./pngtest
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm $(INCPATH)/libpng
+	ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+clean:
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+	chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h
+pngerror.o pngerror.pic.o: png.h pngconf.h
+pngrio.o pngrio.pic.o: png.h pngconf.h
+pngwio.o pngwio.pic.o: png.h pngconf.h
+pngmem.o pngmem.pic.o: png.h pngconf.h
+pngset.o pngset.pic.o: png.h pngconf.h
+pngget.o pngget.pic.o: png.h pngconf.h
+pngread.o pngread.pic.o: png.h pngconf.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h
+pngpread.o pngpread.pic.o: png.h pngconf.h
+
+pngtest.o: png.h pngconf.h
diff --git a/scripts/makefile.aix b/scripts/makefile.aix
index 38c44b5..bfbc53c 100644
--- a/scripts/makefile.aix
+++ b/scripts/makefile.aix
@@ -15,10 +15,10 @@
 RANLIB = ranlib
 RM = rm -f
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
+PNGMAJ = 0
+PNGMIN = 1.0.13
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 prefix=/usr/local
@@ -57,13 +57,16 @@
 
 install: libpng.a
 	-@if [ ! -d $(INCPATH)  ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/libpng  ]; then mkdir $(INCPATH)/libpng; fi
 	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-	cp png.h pngconf.h $(INCPATH)
-	chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@rm $(INCPATH)/png.h
+	-@rm $(INCPATH)/pngconf.h
+	cp png.h pngconf.h $(INCPATH)/libpng
+	chmod 644 $(INCPATH)/libpng/png.h $(INCPATH)/libpng/pngconf.h
 	cp libpng.a $(LIBPATH)
 
 clean:
-	/bin/rm -f *.o libpng.a libpng.so* pngtest pngout.png
+	/bin/rm -f *.o libpng.a pngtest pngout.png
 
 png$(O): png.h pngconf.h
 pngerror$(O): png.h pngconf.h
diff --git a/scripts/makefile.atari b/scripts/makefile.atari
index 2d14ff8..c51ad6e 100644
--- a/scripts/makefile.atari
+++ b/scripts/makefile.atari
@@ -26,8 +26,11 @@
 
 install: libpng.a
 	-@mkdir $(prefix)/include
+	-@mkdir $(prefix)/include/libpng
 	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
+	-@rm -f $(prefix)/include/png.h
+	-@rm -f $(prefix)/include/pngconf.h
+	cp png.h $(prefix)/include/libpng
+	cp pngconf.h $(prefix)/include/libpng
+	chmod 644 $(prefix)/include/libpng/png.h
+	chmod 644 $(prefix)/include/libpng/pngconf.h
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index 8811b57..d589a7c 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -1,5 +1,6 @@
 # makefile for libpng on BeOS x86 ELF with gcc
 # modified from makefile.linux by Sander Stoks
+# Copyright (C) 2002 Glenn Randers-Pehrson
 # Copyright (C) 1999 Greg Roelofs
 # Copyright (C) 1996, 1997 Andreas Dilger
 # For conditions of distribution and use, see copyright notice in png.h
@@ -10,10 +11,10 @@
 ZLIBLIB=/usr/local/lib
 ZLIBINC=/usr/local/include
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
+PNGMAJ = 0
+PNGMIN = 1.0.13
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 ALIGN=
@@ -29,15 +30,16 @@
 CFLAGS=-I$(ZLIBINC) -Wall -O1 -funroll-loops \
 	$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
 # LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
-LDFLAGS=-L. -Wl,-soname=libpng.so.$(PNGMAJ) -L$(ZLIBLIB) -lz -lm
+LDFLAGS=-L. -Wl,-soname=$(LIBNAME).so.$(PNGMAJ) -L$(ZLIBLIB) -lz -lm
 
 RANLIB=ranlib
 #RANLIB=echo
 
-# where make install puts libpng.a, libpng.so*, and png.h
+# where make install puts libpng.a, libpng10.so*, and png.h
 prefix=/usr/local
 INCPATH=$(prefix)/include
 LIBPATH=$(prefix)/lib
+LIBNAME=libpng10
 
 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
 	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
@@ -47,42 +49,70 @@
 
 .SUFFIXES:      .c .o
 
-all: libpng.a libpng.so pngtest
+all: libpng.a $(LIBNAME).so pngtest
 
 libpng.a: $(OBJS)
 	ar rc $@ $(OBJS)
 	$(RANLIB) $@
 
-libpng.so: libpng.so.$(PNGMAJ)
-	ln -sf libpng.so.$(PNGMAJ) libpng.so
-	cp libpng.so* /boot/home/config/lib
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
+	cp $(LIBNAME).so* /boot/home/config/lib
 
-libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
-	ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
 
-libpng.so.$(PNGVER): $(OBJSDLL)
-	$(CC) -L$(ZLIBLIB) -lz -nostart -Wl,-soname,libpng.so.$(PNGMAJ) -o
-libpng.so.$(PNGVER) \
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
+	$(CC) -L$(ZLIBLIB) -lz -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o
+$(LIBNAME).so.$(PNGVER) \
 	 $(OBJSDLL)
 
-pngtest: pngtest.o libpng.so
-	$(CC) -L$(ZLIBLIB) -lz -lpng -o pngtest pngtest.o
+pngtest: pngtest.o $(LIBNAME).so
+	$(CC) -L$(ZLIBLIB) -lz -lpng10 -o pngtest pngtest.o
 
 test: pngtest
 	./pngtest
 
-install: libpng.a libpng.so.$(PNGVER)
-	-@mkdir $(INCPATH) $(LIBPATH)
-	cp png.h pngconf.h $(INCPATH)
-	chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
-	cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
-	chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-	-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
-	(cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
-	 ln -sf libpng.so.$(PNGMAJ) libpng.so)
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
-	/bin/rm -f *.o libpng.a libpng.so* pngtest pngout.png
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
+	pngtest pngout.png
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin
index c88c984..1454bb1 100644
--- a/scripts/makefile.cygwin
+++ b/scripts/makefile.cygwin
@@ -12,6 +12,10 @@
 # $CFLAGS, and include pnggccrd.o in $OBJS, below.
 
 CC=gcc
+ifdef MINGW
+MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
+MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
+endif
 
 # where "make install" puts libpng.a, libpng.so*, png.h, and pngconf.h
 prefix=/usr
@@ -32,16 +36,13 @@
 
 #CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
 #        -fomit-frame-pointer  # $(WARNMORE) -g -DPNG_DEBUG=5
-CFLAGS=-I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
+CFLAGS=$(MINGW_CCFLAGS) -I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
 	-fomit-frame-pointer
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
-# have to change it.
-PNGMAJ = 2
-#PNGDLL = $2# msvc
-PNGDLL = 2# cygwin 1.0.12beta1
-PNGMIN = 1.0.12beta1
-PNGMIN_BASE = 1.0.12
+PNGMAJ = 0
+#PNGDLL = $10
+PNGMIN = 1.0.13
+PNGMIN_BASE = 1.0.13
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 SHAREDLIB=cygpng$(PNGDLL).dll
@@ -51,8 +52,8 @@
 LIBS=$(SHAREDLIB) $(STATLIB)
 EXE=.exe
 
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
-LDSHARED=gcc -shared -Wl,--enable-auto-image-base
+LDFLAGS=-L. $(MINGW_LDFLAGS) -L$(ZLIBLIB) -lpng -lz
+LDSFLAGS=-shared -L.  $(MINGW_LDFLAGS) -Wl,--enable-auto-image-base
 LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(SHAREDDEF)
 
 RANLIB=ranlib
@@ -112,7 +113,7 @@
 	sed -e 's/\([^;]*\);/;/' > $@
 
 $(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF)
-	$(LDSHARED) -o $@ $(LDEXTRA) $(OBJSDLL) -L. -L$(ZLIBLIB) -lz
+	$(CC) $(LDSFLAGS) -o $@ $(LDEXTRA) $(OBJSDLL) -L. -L$(ZLIBLIB) -lz
 
 pngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
 	$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
@@ -147,7 +148,10 @@
 	install -s -m 755 $(SHAREDLIB) $(BINPATH)
 
 install-headers:
-	-@if [ ! -d $(INCPATH)  ]; then mkdir -p $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)]; then mkdir -p $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/libpng  ]; then mkdir -p $(INCPATH)/libpng; fi
+	-@rm -f ${INCPATH)/png.h
+	-@rm -f ${INCPATH)/pngconf.h
 	install -m 644 png.h pngconf.h $(INCPATH)
 
 install-docs:
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
new file mode 100644
index 0000000..2cca991
--- /dev/null
+++ b/scripts/makefile.darwin
@@ -0,0 +1,134 @@
+# makefile for libpng on Darwin / Mac OS X
+# Copyright (C) 2002 Glenn Randers-Pehrson
+# Copyright (C) 2001 Christoph Pfisterer
+# derived from makefile.linux:
+#  Copyright (C) 1998, 1999 Greg Roelofs
+#  Copyright (C) 1996, 1997 Andreas Dilger
+# For conditions of distribution and use, see copyright notice in png.h
+
+# where "make install" puts libpng.a, libpng10.dylib, png.h and pngconf.h
+prefix=/usr/local
+
+# Where the zlib library and include files are located
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+CC=cc
+CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
+
+#RANLIB=echo
+RANLIB=ranlib
+
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
+# have to change it.
+PNGMAJ = 0
+PNGMIN = 1.0.13
+PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng10
+
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+	pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES:      .c .o .pic.o
+
+.c.pic.o:
+	$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
+
+all: libpng.a $(LIBNAME).dylib pngtest
+
+libpng.a: $(OBJS)
+	ar rc $@ $(OBJS)
+	$(RANLIB) $@
+
+$(LIBNAME).dylib: $(LIBNAME).$(PNGMAJ).dylib
+	ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib
+
+$(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib
+	ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib
+
+$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
+	$(CC) -dynamiclib \
+	 -install_name $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
+	 -current_version $(PNGMIN) -compatibility_version $(PNGMIN) \
+	 -o $(LIBNAME).$(PNGVER).dylib \
+	 $(OBJSDLL) -L$(ZLIBLIB) -lz
+
+pngtest: pngtest.o $(LIBNAME).dylib
+	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+	./pngtest
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).dylib
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.dylib
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).dylib
+	-@/bin/rm -f $(LIBPATH)/libpng.dylib
+	-@/bin/rm -f $(LIBPATH)/libpng.2.dylib
+	-@/bin/rm -f $(LIBPATH)/libpng.2.*.dylib
+	cp $(LIBNAME).$(PNGVER).dylib $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).$(PNGVER).dylib
+	(cd $(LIBPATH); \
+	ln -sf $(LIBNAME).$(PNGVER).dylib libpng.dylib; \
+	ln -sf $(LIBNAME).$(PNGVER).dylib libpng.2.dylib; \
+	ln -sf $(LIBNAME).$(PNGVER).dylib libpng.2.$(PNGMIN).dylib; \
+	ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \
+	ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
+
+clean:
+	rm -f *.o libpng.a $(LIBNAME).*dylib pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+	chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h
+pngerror.o pngerror.pic.o: png.h pngconf.h
+pngrio.o pngrio.pic.o: png.h pngconf.h
+pngwio.o pngwio.pic.o: png.h pngconf.h
+pngmem.o pngmem.pic.o: png.h pngconf.h
+pngset.o pngset.pic.o: png.h pngconf.h
+pngget.o pngget.pic.o: png.h pngconf.h
+pngread.o pngread.pic.o: png.h pngconf.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h
+pngpread.o pngpread.pic.o: png.h pngconf.h
+
+pngtest.o: png.h pngconf.h
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index 19893ca..c90993f 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -14,11 +14,12 @@
 ZLIBLIB=../zlib
 ZLIBINC=../zlib
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
+PNGMAJ = 0
+PNGMIN = 1.0.13
 PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng10
 
 CC=cc
 CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
@@ -31,19 +32,19 @@
 	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
 	pngwtran.o pngmem.o pngerror.o pngpread.o
 
-all: libpng.so libpng.a pngtest
+all: $(LIBNAME).so libpng.a pngtest
 
 libpng.a: $(OBJS)
 	ar rc $@  $(OBJS)
 	$(RANLIB) $@
 
-libpng.so: libpng.so.$(PNGMAJ)
-	ln -f -s libpng.so.$(PNGMAJ) libpng.so
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
 
-libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
-	ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
 
-libpng.so.$(PNGVER): $(OBJS)
+$(LIBNAME).so.$(PNGVER): $(OBJS)
 	$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) -lz -lm
 
 pngtest: pngtest.o libpng.a
@@ -52,23 +53,45 @@
 test: pngtest
 	./pngtest
 
-install: libpng.a libpng.so.$(PNGVER)
-	-@mkdir $(INCPATH)
-	-@mkdir $(LIBPATH)
-	cp png.h $(INCPATH)
-	cp pngconf.h $(INCPATH)
-	chmod 644 $(INCPATH)/png.h
-	chmod 644 $(INCPATH)/pngconf.h
-	cp libpng.a $(LIBPATH)
-	cp libpng.so.$(PNGVER) $(LIBPATH)
-	chmod 644 $(LIBPATH)/libpng.a
-	chmod 644 $(LIBPATH)/libpng.so.$(PNGVER)
-	-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
-	(cd $(LIBPATH); ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
-	 ln -f -s libpng.so.$(PNGMAJ) libpng.so)
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
-	rm -f *.o libpng.a pngtest pngout.png libpng.so*
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd
new file mode 100644
index 0000000..3423768
--- /dev/null
+++ b/scripts/makefile.freebsd
@@ -0,0 +1,93 @@
+# makefile for libpng under FreeBSD
+# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+# For conditions of distribution and use, see copyright notice in png.h
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+
+PNGMAJ= 5
+.if (${OBJFORMAT} == "elf")
+PNGVER= $(PNGMAJ)
+.else
+PNGMIN= 0
+PNGVER= $(PNGMAJ).$(PNGMIN)
+.endif
+
+CFLAGS+= -I. -DPNG_USE_PNGGCCRD
+.if (${MACHINE_ARCH} != "i386")
+CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
+.endif
+LDFLAGS+=-L. -lpng -lz -lm -static
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+	pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o
+
+.SUFFIXES: .c .so .o
+
+.c.so:
+	${CC} ${CFLAGS} -fPIC -DPIC -o $@ -c $<
+
+all: libpng.a libpng.so.${PNGVER} pngtest
+
+libpng.a: $(OBJS)
+	ar rc $@  $(OBJS)
+	$(RANLIB) $@
+
+libpng.so.${PNGVER}: $(OBJS:S/o$/so/g)
+.if (${OBJFORMAT} == "elf")
+	${CC} -shared -Wl,-x,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm
+.else
+	${CC} -shared -Wl,-x -o $@ $(OBJS:S/o$/so/g) -lz -lm
+.endif
+
+pngtest: pngtest.o libpng.a
+	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+	./pngtest
+
+install: libpng.a libpng.so.${PNGVER}
+	-@mkdir $(prefix)/include/libpng
+	${INSTALL} -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
+		png.h pngconf.h $(prefix)/include/libpng
+	ln -sf libpng/png.h $(prefix)/include/png.h
+	ln -sf libpng/pngconf.h $(prefix)/include/pngconf.h
+	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+		libpng.a libpng.so.${PNGVER} $(prefix)/lib
+	$(RANLIB) $(prefix)/lib/libpng.a
+	ln -sf libpng.so.${PNGVER} $(prefix)/lib/libpng.so
+	/sbin/ldconfig -R
+	${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+		libpng.3 libpngpf.3 $(prefix)/man/man3
+	${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+		png.5 $(prefix)/man/man5
+
+clean:
+	rm -f *.o libpng.a libpng.so libpng.so.${PNGVER} pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+	chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h
+pngerror.o: png.h pngconf.h
+pngrio.o: png.h pngconf.h
+pngwio.o: png.h pngconf.h
+pngmem.o: png.h pngconf.h
+pngset.o: png.h pngconf.h
+pngget.o: png.h pngconf.h
+pngread.o: png.h pngconf.h
+pngrtran.o: png.h pngconf.h
+pngrutil.o: png.h pngconf.h
+pngtest.o: png.h pngconf.h
+pngtrans.o: png.h pngconf.h
+pngwrite.o: png.h pngconf.h
+pngwtran.o: png.h pngconf.h
+pngwutil.o: png.h pngconf.h
+pngpread.o: png.h pngconf.h
+pnggccrd.o: png.h pngconf.h
+
diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx
index 3fd7559..b7bc007 100644
--- a/scripts/makefile.gcmmx
+++ b/scripts/makefile.gcmmx
@@ -1,17 +1,27 @@
-# makefile for libpng on Linux ELF with gcc using MMX assembler code
-# Copyright 1996-1997 Andreas Dilger
+# makefile for libpng.a and libpng10.so on Linux ELF with gcc using MMX
+# assembler code
+# Copyright 2002 Greg Roelofs and Glenn Randers-Pehrson
 # Copyright 1998-2001 Greg Roelofs
+# Copyright 1996-1997 Andreas Dilger
 # For conditions of distribution and use, see copyright notice in png.h
 
 # CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
 
+# WARNING: The assembler code in pnggccrd.c may not be thread safe.
+
 # NOTE:  When testing MMX performance on a multitasking system, make sure
 #        there are no floating-point programs (e.g., SETI@Home) running in
 #        the background!  Context switches between MMX and FPU are expensive.
 
+LIBNAME = libpng10
+PNGMAJ = 0
+PNGMIN = 1.0.13
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
 CC=gcc
 
-# where "make install" puts libpng.a, libpng.so*, png.h, and pngconf.h
+# where "make install" puts libpng.a, libpng10/libpng10.so*,
+# $(LIBNAME)/png.h and $(LIBNAME)/pngconf.h
 prefix=/usr/local
 
 # Where the zlib library and include files are located
@@ -30,30 +40,26 @@
 
 # for pgcc version 2.95.1, -O3 is buggy; don't use it.
 
+# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety
 ### for generic gcc:
-CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
+CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
+	-O3 $(ALIGN) -funroll-loops \
 	-fomit-frame-pointer  # $(WARNMORE) -g -DPNG_DEBUG=5
 ### for gcc 2.95.2 on 686:
-#CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
+#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
 #	-mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \
 #	$(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer 
 ### for gcc 2.7.2.3 on 486 and up:
-#CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
+#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
 #	-m486 -malign-double -ffast-math \
 #	$(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer 
 
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
+LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
 LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
 
 RANLIB=ranlib
 #RANLIB=echo
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
-# have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
 INCPATH=$(prefix)/include
 LIBPATH=$(prefix)/lib
 
@@ -68,67 +74,84 @@
 .c.pic.o:
 	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
 
-all: libpng.a libpng.so pngtest pngtest-static
+all: libpng.a $(LIBNAME).so pngtest pngtest-static
 
 pnggccrd.o:	pnggccrd.c png.h pngconf.h
-	@echo ""
-	@echo '    You can ignore the single "control reaches end of non-void function"'
-	@echo '    warning and multiple "<variable> defined but not used" warnings:'
-	@echo ""
 	$(CC) -c $(CFLAGS) -o $@ $*.c
-	@echo ""
 
 pnggccrd.pic.o:	pnggccrd.c png.h pngconf.h
-	@echo ""
-	@echo '    You can ignore the single "control reaches end of non-void function"'
-	@echo '    warning and multiple "<variable> defined but not used" warnings:'
-	@echo ""
 	$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
-	@echo ""
 
-libpng.a: $(OBJS)
+$(LIBNAME).a: $(OBJS)
 	ar rc $@ $(OBJS)
 	$(RANLIB) $@
 
-libpng.so: libpng.so.$(PNGMAJ)
-	ln -sf libpng.so.$(PNGMAJ) libpng.so
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
 
-libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
-	ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
 
-libpng.so.$(PNGVER): $(OBJSDLL)
-	$(CC) -shared -Wl,-soname,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
+	$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
 	 $(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
 
-pngtest: pngtest.o libpng.so
+pngtest: pngtest.o $(LIBNAME).so
 	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
 
-pngtest-static: pngtest.o libpng.a
+pngtest-static: pngtest.o $(LIBNAME).a
 	$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
 
 test: pngtest pngtest-static
 	@echo ""
-	@echo "   Testing dynamically linked version:"
+	@echo "   Running pngtest dynamically linked with libpng10.so:"
 	@echo ""
 	./pngtest
 	@echo ""
-	@echo "   Testing statically linked version:"
+	@echo "   Running pngtest statically linked with libpng.a:"
 	@echo ""
 	./pngtest-static
 
-install: libpng.a libpng.so.$(PNGVER)
-	-@if [ ! -d $(INCPATH)  ]; then mkdir $(INCPATH); fi
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
 	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-	cp png.h pngconf.h $(INCPATH)
-	chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
-	cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
-	chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-	-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
-	(cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
-	 ln -sf libpng.so.$(PNGMAJ) libpng.so)
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
-	/bin/rm -f *.o libpng.a libpng.so* pngtest pngout.png
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
+	pngtest pngout.png
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:
diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc
index 1002aff..57c7202 100644
--- a/scripts/makefile.hpgcc
+++ b/scripts/makefile.hpgcc
@@ -1,4 +1,5 @@
 # makefile for libpng on HP-UX using GCC
+# Copyright (C) 2002, Glenn Randers-Pehrson
 # Copyright (C) 2001, Laurent faillie
 # Copyright (C) 1998, 1999 Greg Roelofs
 # Copyright (C) 1996, 1997 Andreas Dilger
@@ -31,11 +32,12 @@
 RANLIB=ranlib
 #RANLIB=echo
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
+PNGMAJ = 0
+PNGMIN = 1.0.13
 PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng10
 
 INCPATH=$(prefix)/include
 LIBPATH=$(prefix)/lib
@@ -51,41 +53,69 @@
 .c.pic.o:
 	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
 
-all: libpng.a libpng.sl pngtest
+all: libpng.a $(LIBNAME).sl pngtest
 
 libpng.a: $(OBJS)
 	ar rc $@ $(OBJS)
 	$(RANLIB) $@
 
-libpng.sl: libpng.sl.$(PNGMAJ)
-	ln -f -s libpng.sl.$(PNGMAJ) libpng.sl
+$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
+	ln -f -s $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
 
-libpng.sl.$(PNGMAJ): libpng.sl.$(PNGVER)
-	ln -f -s libpng.sl.$(PNGVER) libpng.sl.$(PNGMAJ)
+$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
+	ln -f -s $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
 
-libpng.sl.$(PNGVER): $(OBJSDLL)
+$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
 	$(LD) -b -L$(ZLIBLIB) +s +b $(ZLIBLIB) \
 	+h libpng.sl.$(PNGMAJ) -o libpng.sl.$(PNGVER) $(OBJSDLL) -lz
 
-pngtest: pngtest.o libpng.sl
+pngtest: pngtest.o $(LIBNAME).sl
 	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
 
 test: pngtest
 	./pngtest
 
-install: libpng.a libpng.sl.$(PNGVER)
-	-@if [ ! -d $(INCPATH)  ]; then mkdir $(INCPATH); fi
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
 	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-	cp png.h pngconf.h $(INCPATH)
-	chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
-	cp libpng.a libpng.sl.$(PNGVER) $(LIBPATH)
-	chmod 755 $(LIBPATH)/libpng.sl.$(PNGVER)
-	-@/bin/rm -f $(LIBPATH)/libpng.sl.$(PNGMAJ) $(LIBPATH)/libpng.sl
-	(cd $(LIBPATH); ln -sf libpng.sl.$(PNGVER) libpng.sl.$(PNGMAJ); \
-	 ln -sf libpng.sl.$(PNGMAJ) libpng.sl)
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).sl.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).sl.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).sl
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).sl.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).sl.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.2; \
+	ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.2.$(PNGMIN); \
+	ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
+	ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
-	/bin/rm -f *.o libpng.a libpng.sl* pngtest pngout.png
+	/bin/rm -f *.o libpng.a $(SHAREDLIB).sl $(SHAREDLIB).sl.$(PNGMAJ)* \
+	pngtest pngout.png
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:
diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux
index bfd26c8..ce91b96 100644
--- a/scripts/makefile.hpux
+++ b/scripts/makefile.hpux
@@ -1,5 +1,5 @@
 # makefile for libpng, HPUX (10.20 and 11.00)
-# Copyright (C) 1999, 2000 Glenn Randers-Pehrson
+# Copyright (C) 1999-2002 Glenn Randers-Pehrson
 # Copyright (C) 1995 Guy Eric Schalnat, Group 42
 # contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
 # For conditions of distribution and use, see copyright notice in png.h
@@ -16,14 +16,17 @@
 
 RANLIB=ranlib
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
+PNGMAJ = 0
+PNGMIN = 1.0.13
 PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng10
 
-# where make install puts libpng.a and png.h
+# where make install puts libpng.a, libpng10.sl, and png.h
 prefix=/opt/libpng
+LIBPATH=$prefix/lib
+INCPATH=$prefix/include
 
 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
 	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
@@ -36,21 +39,22 @@
 .c.pic.o:
 	$(CC) -c $(CFLAGS) +z -o $@ $*.c
 
-all: libpng.a libpng.sl pngtest
+all: libpng.a $(LIBNAME).sl pngtest
 
 libpng.a: $(OBJS)
 	ar rc $@  $(OBJS)
 	$(RANLIB) $@
 
-libpng.sl: libpng.sl.$(PNGMAJ)
-	ln -f -s libpng.sl.$(PNGMAJ) libpng.sl
+$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
+	ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
 
-libpng.sl.$(PNGMAJ): libpng.sl.$(PNGVER)
-	ln -f -s libpng.sl.$(PNGVER) libpng.sl.$(PNGMAJ)
+$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
+	ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
 
-libpng.sl.$(PNGVER): $(OBJSDLL)
+$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
 	$(LD) -b -L$(ZLIBLIB) +s +b $(ZLIBLIB) \
-	+h libpng.sl.$(PNGMAJ) -o libpng.sl.$(PNGVER) $(OBJSDLL) -lz
+	+h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) \
+	$(OBJSDLL) -lz
 
 pngtest: pngtest.o libpng.a
 	$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
@@ -58,21 +62,46 @@
 test: pngtest
 	./pngtest
 
-install: libpng.a
-	-@mkdir $(prefix)/include
-	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
-	cp libpng.a libpng.sl.$(PNGVER) $(prefix)/lib
-	chmod 644 $(prefix)/lib/libpng.a
-	chmod 755 $(prefix)/lib/libpng.sl.$(PNGVER)
-	(cd $(prefix)/lib; ln -f -s libpng.sl.$(PNGVER) libpng.sl.$(PNGMAJ); \
-	ln -f -s libpng.sl.$(PNGMAJ) libpng.sl)
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).sl.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).sl.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).sl
+	-@/bin/rm -f $(LIBPATH)/libpng.sl
+	-@/bin/rm -f $(LIBPATH)/libpng.sl.2
+	-@/bin/rm -f $(LIBPATH)/libpng.sl.2.*
+	cp $(LIBNAME).sl.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).sl.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl; \
+	ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.2; \
+	ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.2.$(PNGMIN); \
+	ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
+	ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
-	rm -f *.o libpng.a libpng.sl* pngtest pngout.png
+	/bin/rm -f *.o libpng.a $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
+	pngtest pngout.png
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:
diff --git a/scripts/makefile.ibmc b/scripts/makefile.ibmc
index 0f596c2..f09a62c 100644
--- a/scripts/makefile.ibmc
+++ b/scripts/makefile.ibmc
@@ -5,7 +5,7 @@
 # Notes:
 #   Derived from makefile.std
 #   All modules are compiled in C mode
-#   Tested with IBM C 3.6.5 under Win32, expected to work under OS/2 too
+#   Tested under Win32, expected to work under OS/2
 #   Can be easily adapted for IBM VisualAge/C++ for AIX
 
 # Location of the zlib library and include files
@@ -18,7 +18,7 @@
 AR = ilib
 RM = del
 
-CFLAGS = -I$(ZLIBINC) -O2 -W3
+CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
 LDFLAGS =
 
 # File extensions
diff --git a/scripts/makefile.knr b/scripts/makefile.knr
index 09a74b6..4d7707b 100644
--- a/scripts/makefile.knr
+++ b/scripts/makefile.knr
@@ -47,11 +47,14 @@
 
 install: libpng.a
 	-@mkdir $(prefix)/include
+	-@mkdir $(prefix)/include/libpng
 	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
+	-@rm -f $(prefix)/include/png.h
+	-@rm -f $(prefix)/include/pngconf.h
+	cp png.h $(prefix)/include/libpng
+	cp pngconf.h $(prefix)/include/libpng
+	chmod 644 $(prefix)/include/libpng/png.h
+	chmod 644 $(prefix)/include/libpng/pngconf.h
 	cp libpng.a $(prefix)/lib
 	chmod 644 $(prefix)/lib/libpng.a
 
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index 5e8ba4c..67087b1 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -1,11 +1,17 @@
-# makefile for libpng on Linux ELF with gcc
-# Copyright (C) 1998, 1999 Greg Roelofs
+# makefile for libpng.a and libpng10.so on Linux ELF with gcc
+# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson
 # Copyright (C) 1996, 1997 Andreas Dilger
 # For conditions of distribution and use, see copyright notice in png.h
 
+LIBNAME = libpng10
+PNGMAJ = 0
+PNGMIN = 1.0.13
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
 CC=gcc
 
-# where "make install" puts libpng.a, libpng.so*, png.h and pngconf.h
+# where "make install" puts libpng.a, libpng10/libpng10.so*,
+# libpng10/png.h and libpng10/pngconf.h
 prefix=/usr/local
 
 # Where the zlib library and include files are located
@@ -26,17 +32,13 @@
 
 CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
 	$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
+
+LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
+LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
 
 RANLIB=ranlib
 #RANLIB=echo
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
-# have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
 INCPATH=$(prefix)/include
 LIBPATH=$(prefix)/lib
 
@@ -51,41 +53,80 @@
 .c.pic.o:
 	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
 
-all: libpng.a libpng.so pngtest
+all: libpng.a $(LIBNAME).so pngtest
 
 libpng.a: $(OBJS)
 	ar rc $@ $(OBJS)
 	$(RANLIB) $@
 
-libpng.so: libpng.so.$(PNGMAJ)
-	ln -sf libpng.so.$(PNGMAJ) libpng.so
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
 
-libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
-	ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
 
-libpng.so.$(PNGVER): $(OBJSDLL)
-	$(CC) -shared -Wl,-soname,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
-	 $(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
+	$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
+	-o $(LIBNAME).so.$(PNGVER) \
+	$(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
 
-pngtest: pngtest.o libpng.so
+pngtest: pngtest.o $(LIBNAME).so
 	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
 
-test: pngtest
-	./pngtest
+pngtest-static: pngtest.o $(LIBNAME).a
+	$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
 
-install: libpng.a libpng.so.$(PNGVER)
-	-@if [ ! -d $(INCPATH)  ]; then mkdir $(INCPATH); fi
+test: pngtest pngtest-static
+	@echo ""
+	@echo "   Running pngtest dynamically linked with libpng10.so:"
+	@echo ""
+	./pngtest
+	@echo ""
+	@echo "   Running pngtest statically linked with libpng.a:"
+	@echo ""
+	./pngtest-static
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
 	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-	cp png.h pngconf.h $(INCPATH)
-	chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
-	cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
-	chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-	-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
-	(cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
-	 ln -sf libpng.so.$(PNGMAJ) libpng.so)
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
+
 
 clean:
-	/bin/rm -f *.o libpng.a libpng.so* pngtest pngout.png
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNMAJ)* \
+	pngtest pngout.png
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:
diff --git a/scripts/makefile.macosx b/scripts/makefile.macosx
index 093ea77..fe3ef9f 100644
--- a/scripts/makefile.macosx
+++ b/scripts/makefile.macosx
@@ -1,5 +1,8 @@
 # makefile for libpng, MACOS X
+# Copyright (C) 2002 Glenn Randers-Pehrson
 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+# Modified by Karin Kosina <kyrah@sim.no> 20011010:
+# build shared library (*.dylib)
 # For conditions of distribution and use, see copyright notice in png.h
 
 # where make install puts libpng.a and png.h
@@ -12,8 +15,17 @@
 ZLIBINC=../zlib
 
 CC=cc
-CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
+CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
+LDSHARED=cc -lz -dynamiclib -compatibility_version $(VER) -current_version $(VER)
+
+PNGMAJ = 0
+PNGMIN = 1.0.13
+VER = $(PNGMAJ).$(PNGMIN)
+LIBNAME=libpng10
+SHAREDLIB_POSTFIX=dylib
+LIBPATH=$(prefix)/lib
+INCPATH=$(prefix)/include
 
 #RANLIB=echo
 RANLIB=ranlib
@@ -22,30 +34,71 @@
 	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
 	pngwtran.o pngmem.o pngerror.o pngpread.o
 
-all: libpng.a pngtest
+all: libpng.a pngtest shared
+
+shared: $(LIBNAME).$(VER).$(SHAREDLIB_POSTFIX)
 
 libpng.a: $(OBJS)
 	ar rc $@  $(OBJS)
 	$(RANLIB) $@
 
+$(LIBNAME).$(VER).$(SHAREDLIB_POSTFIX): $(OBJS)
+	$(LDSHARED) -o $@ $(OBJS)
+
 pngtest: pngtest.o libpng.a
 	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
 
 test: pngtest
 	./pngtest
 
-install: libpng.a
-	-@mkdir $(prefix)/include
-	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
-	cp libpng.a $(prefix)/lib
-	chmod 644 $(prefix)/lib/libpng.a
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.$(SHAREDLIB_POSTFIX)
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).$(SHAREDLIB_POSTFIX)
+	-@/bin/rm -f libpng.$(SHARED_POSTFIX)
+	-@/bin/rm -f libpng.2.$(SHARED_POSTFIX)
+	-@/bin/rm -f libpng.2.*.$(SHARED_POSTFIX)
+	cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
+	(cd $(LIBPATH); \
+	ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
+	libpng.$(SHARED_POSTFIX); \
+	ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
+	libpng.2.$(SHARED_POSTFIX); \
+	ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
+	libpng.2.$(PNGMIN).$(SHARED_POSTFIX); \
+	ln -sf $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \
+	$(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \
+	ln -sf $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \
+	$(LIBNAME).$(SHAREDLIB_POSTFIX))
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-shared
 
 clean:
-	rm -f *.o libpng.a pngtest pngout.png
+	rm -f *.o libpng.a pngtest pngout.png \
+	$(LIBNAME).$(VER).$(SHAREDLIB_POSTFIX) \
+	$(LIBNAME).$(SHAREDLIB_POSTFIX)
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:
diff --git a/scripts/makefile.mips b/scripts/makefile.mips
index 8db2627..602a2f9 100644
--- a/scripts/makefile.mips
+++ b/scripts/makefile.mips
@@ -31,11 +31,14 @@
 
 install: libpng.a
 	-@mkdir $(prefix)/include
+	-@mkdir $(prefix)/include/libpng
 	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
+	-@rm -f $(prefix)/include/png.h
+	-@rm -f $(prefix)/include/pngconf.h
+	cp png.h $(prefix)/include/libpng
+	cp pngconf.h $(prefix)/include/libpng
+	chmod 644 $(prefix)/include/libpng/png.h
+	chmod 644 $(prefix)/include/libpng/pngconf.h
 	cp libpng.a $(prefix)/lib
 	chmod 644 $(prefix)/lib/libpng.a
 
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
new file mode 100644
index 0000000..5816f97
--- /dev/null
+++ b/scripts/makefile.ne12bsd
@@ -0,0 +1,44 @@
+# makefile for libpng for NetBSD for the standard
+# make obj && make depend && make && make test
+# make includes && make install
+# Copyright (C) 2002 Patrick R.L. Welche
+# For conditions of distribution and use, see copyright notice in png.h
+
+# You should also run makefile.netbsd
+
+LOCALBASE?=/usr/local
+LIBDIR=	${LOCALBASE}/lib
+MANDIR= ${LOCALBASE}/man
+INCSDIR=${LOCALBASE}/include/libpng10
+
+LIB=	png10
+SHLIB_MAJOR=	0
+SHLIB_MINOR=	1.0.13
+SRCS=	pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
+		pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
+		pngwtran.c pngmem.c pngerror.c pngpread.c
+INCS=	png.h pngconf.h
+MAN=	libpng.3 libpngpf.3 png.5
+
+CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
+
+# something like this for mmx assembler, but it core dumps for me at the moment
+# .if ${MACHINE_ARCH} == "i386"
+#   CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
+#   MKLINT= no
+# .else
+    CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
+# .endif
+
+CLEANFILES+=pngtest.o pngtest
+
+pngtest.o:	pngtest.c
+	${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
+
+pngtest:	pngtest.o libpng.a
+	${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
+
+test:	pngtest
+	cd ${.CURDIR} && ${.OBJDIR}/pngtest
+
+.include <bsd.lib.mk>
diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd
index 719bc71..ab336f9 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -1,31 +1,33 @@
 # makefile for libpng for NetBSD for the standard
 # make obj && make depend && make && make test
 # make includes && make install
-# Copyright (C) 2001 Patrick R.L. Welche
+# Copyright (C) 2002 Patrick R.L. Welche
 # For conditions of distribution and use, see copyright notice in png.h
 
+# You should also run makefile.ne0bsd
+
 LOCALBASE?=/usr/local
 LIBDIR=	${LOCALBASE}/lib
 MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include
+INCSDIR=${LOCALBASE}/include/libpng
 
-LIB=png
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 1.0.12beta1
+LIB=	png
+SHLIB_MAJOR=	2
+SHLIB_MINOR=	1.0.13
 SRCS=	pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
-	pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
-	pngwtran.c pngmem.c pngerror.c pngpread.c
+		pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
+		pngwtran.c pngmem.c pngerror.c pngpread.c
 INCS=	png.h pngconf.h
 MAN=	libpng.3 libpngpf.3 png.5
 
 CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
 
-CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
 # something like this for mmx assembler, but it core dumps for me at the moment
 # .if ${MACHINE_ARCH} == "i386"
+#   CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
 #   MKLINT= no
 # .else
-#   CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
+    CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
 # .endif
 
 CLEANFILES+=pngtest.o pngtest
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
new file mode 100644
index 0000000..3839ce1
--- /dev/null
+++ b/scripts/makefile.openbsd
@@ -0,0 +1,70 @@
+# makefile for libpng
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+# For conditions of distribution and use, see copyright notice in png.h
+
+PREFIX?= /usr/local
+LIBDIR=	${PREFIX}/lib
+MANDIR= ${PREFIX}/man/cat
+
+SHLIB_MAJOR=	0
+SHLIB_MINOR=	1.0.13
+
+LIB=	png
+SRCS=	png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
+	pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
+	pngwio.c pngwrite.c pngwtran.c pngwutil.c
+
+HDRS=	png.h pngconf.h
+
+CFLAGS+= -Wall
+CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD
+
+NOPROFILE= Yes
+
+CLEANFILES+= pngtest.o pngtest
+
+MAN=	libpng.3 libpngpf.3 png.5
+DOCS=	ANNOUNCE CHANGES LICENSE README libpng.txt
+
+pngtest.o:	pngtest.c
+	${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
+
+pngtest:	pngtest.o
+	${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
+
+test:	pngtest
+	cd ${.OBJDIR} && env \
+		LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
+
+beforeinstall:
+	if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
+	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \
+	fi
+	if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
+	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
+	fi
+	if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
+	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
+	fi
+	if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
+	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
+	fi
+	if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
+	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
+	fi
+	if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
+	  ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
+	fi
+
+afterinstall:
+	@rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
+	@rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
+	@rm -f ${DESTDIR}${PREFIX}/include/png.h
+	@rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
+	@rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
+	${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
+		-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng
+	${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
+		-m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png
+
+.include <bsd.lib.mk>
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index f32f164..cd053cc 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -22,13 +22,14 @@
 #RANLIB=ranlib
 RANLIB=echo
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
+PNGMAJ = 0
+PNGMIN = 1.0.13
 PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng10
 
-INCPATH=$(prefix)/include
+INCPATH=$(prefix)/include/libpng
 LIBPATH=$(prefix)/lib
 
 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
@@ -42,40 +43,70 @@
 .c.pic.o:
 	$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
 
-all: libpng.a libpng.so pngtest
+all: libpng.a $(LIBNAME).so pngtest
 
 libpng.a: $(OBJS)
 	ar rc $@ $(OBJS)
 	$(RANLIB) $@
 
-libpng.so: libpng.so.$(PNGMAJ)
-	ln -f -s libpng.so.$(PNGMAJ) libpng.so
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
 
-libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
-	ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
 
-libpng.so.$(PNGVER): $(OBJSDLL)
-	$(CC) -G  -Wl,-h,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
+	$(CC) -G  -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
 	 $(OBJSDLL)
 
-pngtest: pngtest.o libpng.so
+pngtest: pngtest.o $(LIBNAME).so
 	LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
 
 test: pngtest
 	./pngtest
 
-install: libpng.a libpng.so.$(PNGVER)
-	-@mkdir $(INCPATH) $(LIBPATH)
-	cp png.h pngconf.h $(INCPATH)
-	chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
-	cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
-	chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-	-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
-	(cd $(LIBPATH); ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
-	 ln -f -s libpng.so.$(PNGMAJ) libpng.so)
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	-@/bin/rm -f $(INCPATH)/png.h
+	-@/bin/rm -f $(INCPATH)/pngconf.h
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
-	/bin/rm -f *.o libpng.a libpng.so* pngtest pngout.png
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index bea0449..452290f 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -1,4 +1,5 @@
 # makefile for libpng, SGI IRIX with gcc
+# Copyright (C) 2002 Glenn Randers-Pehrson
 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
 # For conditions of distribution and use, see copyright notice in png.h
 
@@ -11,18 +12,24 @@
 #ZLIBLIB=../zlib
 #ZLIBINC=../zlib
 
+# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
+# See "man abi".  zlib must be built with the same ABI.
+ABI=
+
 CC=gcc
 
 WARNMORE= # -g -DPNG_DEBUG=5
-CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
-# zlib must also be compiled with n32
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-LDSHARED=gcc -shared
+CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
+LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
+LDSHARED=CC $(ABI) -shared
 
-VER=1.0.12beta1
-LIBS=libpng.so.1.0.12beta1
-SHAREDLIB=libpng.so
-libdir=$(prefix)/lib32
+PNGMAJ = 0
+PNGMIN = 1.0.13
+PNGVER = $(PNGMAJ).$(PNGMIN)
+# See "man dso" for info about shared objects
+LIBS=libpng10.so.$(PNGMAJ).$(PNGVER)
+LIBNAME=libpng10
+LIBPATH=$(prefix)/lib32
 
 RANLIB=echo
 #RANLIB=ranlib
@@ -31,17 +38,17 @@
 	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
 	pngwtran.o pngmem.o pngerror.o pngpread.o
 
-all: libpng.a $(SHAREDLIB).$(VER) pngtest
+all: libpng.a $(LIBNAME).so.$(PNGVER) pngtest
 
 libpng.a: $(OBJS)
 	ar rc $@  $(OBJS)
 	$(RANLIB) $@
 
-$(SHAREDLIB).$(VER): $(OBJS)
+$(LIBNAME).so.$(PNGVER): $(OBJS)
 	$(LDSHARED) -o $@ $(OBJS)
-	rm -f $(SHAREDLIB) $(SHAREDLIB).1
-	ln -s $@ $(SHAREDLIB)
-	ln -s $@ $(SHAREDLIB).1
+	rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
+	ln -s $@ $(LIBNAME).so
+	ln -s $@ $(LIBNAME).so.$(PNGMAJ)
 
 pngtest: pngtest.o libpng.a
 	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
@@ -49,22 +56,43 @@
 test: pngtest
 	./pngtest
 
-install: libpng.a
-	-@mkdir $(prefix)/include
-	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
-	cp libpng.a $(prefix)/lib
-	chmod 644 $(prefix)/lib/libpng.a
-	cp $(SHAREDLIB).$(VER) $(libdir); chmod 755 $(SHAREDLIB).$(VER)
-	(cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
-	rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
-	ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
-	ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
-	(ldconfig || true)  >/dev/null 2>&1; \
-	fi)
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
 	rm -f *.o libpng.a pngtest pngout.png
diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi
index 4726d5d..251a036 100644
--- a/scripts/makefile.sgi
+++ b/scripts/makefile.sgi
@@ -1,13 +1,12 @@
-# makefile for libpng (.a and .so), SGI IRIX with 'cc'
-# Copyright (C) 2001 Glenn Randers-Pehrson
+# makefile for libpng.a and libpng10.so, SGI IRIX with 'cc'
+# Copyright (C) 2001-2002 Glenn Randers-Pehrson
 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
 # For conditions of distribution and use, see copyright notice in png.h
 
-# where make install puts libpng.a and png.h
+# where make install puts libpng.a, libpng10.so and libpng10/png.h
 prefix=/usr/local
 
 # Where the zlib library and include files are located
-# You can add the -n32 option; then zlib must also be compiled with -n32
 #ZLIBLIB=/usr/local/lib32
 #ZLIBINC=/usr/local/include
 #ZLIBLIB=/usr/local/lib
@@ -17,40 +16,48 @@
 
 CC=cc
 
-WARNMORE=-fullwarn
-# You can add the -n32 option; then zlib must also be compiled with -n32
-# Note: -KPIC is the default anyhow
-#CFLAGS=-I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5
-CFLAGS=-I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-LDSHARED=cc -shared
+# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
+# See "man abi".  zlib must be built with the same ABI.
+ABI=
 
-VER=1.0.12beta1
-SONUM=2
-SHAREDLIB=libpng.so
-libdir=$(prefix)
-#libdir=$(prefix)/lib32
+WARNMORE=-fullwarn
+# Note: -KPIC is the default anyhow
+#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5
+CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE
+LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng10 -lz -lm
+LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
+LDSHARED=cc $(ABI) -shared
+
+# See "man dso" for info about shared objects
+LIBNAME=libpng10
+PNGMAJ = 0
+PNGMIN = 1.0.13
+PNGVER = $(PNGMAJ).$(PNGMIN)
 
 RANLIB=echo
 #RANLIB=ranlib
 
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+#LIBPATH=$(prefix)/lib32
+
 OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
 	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
 	pngwtran.o pngmem.o pngerror.o pngpread.o
 
 all: libpng.a pngtest shared
 
-shared: $(SHAREDLIB).$(SONUM).$(VER)
+shared: $(LIBNAME).so.$(PNGMAJ).$(PNGVER)
 
 libpng.a: $(OBJS)
 	ar rc $@  $(OBJS)
 	$(RANLIB) $@
 
-$(SHAREDLIB).$(SONUM).$(VER): $(OBJS)
+$(LIBNAME).so.$(PNGVER): $(OBJS)
 	$(LDSHARED) -o $@ $(OBJS)
-	rm -f $(SHAREDLIB) $(SHAREDLIB).?
-	ln -s $@ $(SHAREDLIB)
-	ln -s $@ $(SHAREDLIB).$(SONUM)
+	rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
+	ln -s $@ $(LIBNAME).so
+	ln -s $@ $(LIBNAME).so.$(PNGMAJ)
 
 pngtest: pngtest.o libpng.a
 	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
@@ -58,26 +65,46 @@
 test: pngtest
 	./pngtest
 
-install: libpng.a
-	-@mkdir $(prefix)/include
-	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
-	cp libpng.a $(prefix)/lib
-	chmod 644 $(prefix)/lib/libpng.a
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
 
-install-shared: $(SHAREDLIB).$(SONUM).$(VER)
-	cp $(SHAREDLIB).$(SONUM).$(VER) $(libdir)
-	chmod 755 $(SHAREDLIB).$(SONUM).$(VER)
-	(cd $(libdir)
-	rm -f $(SHAREDLIB) $(SHAREDLIB).$(SONUM)
-	ln -s $(SHAREDLIB).$(SONUM).$(VER) $(SHAREDLIB).$(SONUM)
-	ln -s $(SHAREDLIB).$(SONUM) $(SHAREDLIB))
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
-	rm -f *.o libpng.a pngtest pngout.png $(SHAREDLIB).*
+	rm -f *.o libpng.a pngtest pngout.png $(LIBNAME).so \
+	$(LIBNAME).so.$(PNGMAJ)*
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:
diff --git a/scripts/makefile.so9 b/scripts/makefile.so9
new file mode 100644
index 0000000..c713f39
--- /dev/null
+++ b/scripts/makefile.so9
@@ -0,0 +1,153 @@
+# makefile for libpng on Solaris 9 (beta) with Forte cc
+# Updated by Chad Schrock for Solaris 9
+# Contributed by William L. Sebok, based on makefile.linux
+# Copyright (C) 1998-2001 Greg Roelofs
+# Copyright (C) 1996-1997 Andreas Dilger
+# For conditions of distribution and use, see copyright notice in png.h
+
+# gcc 2.95 doesn't work.
+CC=cc
+
+# Where make install puts libpng.a, libpng.so*, and png.h
+prefix=/usr/local
+
+# Where the zlib library and include files are located
+# Changing these to ../zlib poses a security risk.  If you want
+# to have zlib in an adjacent directory, specify the full path instead of "..".
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+#Use the preinstalled zlib that comes with Solaris 9:
+ZLIBLIB=/usr/lib
+ZLIBINC=/usr/include
+
+#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+	-Wmissing-declarations -Wtraditional -Wcast-align \
+	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+#CFLAGS=-I$(ZLIBINC) -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5
+CFLAGS=-I$(ZLIBINC) -O3
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm
+
+#RANLIB=ranlib
+RANLIB=echo
+
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
+# have to change it.
+PNGMAJ = 0
+PNGMIN = 1.0.13
+PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng10
+
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+	pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES:      .c .o .pic.o
+
+.c.pic.o:
+	$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
+
+all: libpng.a $(LIBNAME).so pngtest
+
+libpng.a: $(OBJS)
+	ar rc $@ $(OBJS)
+	$(RANLIB) $@
+
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
+
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
+
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
+	@case "`type ld`" in *ucb*) \
+	echo; \
+	echo '## WARNING:'; \
+	echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
+	echo '## and /usr/ucb/ld.  If they do, you need to adjust your PATH'; \
+	echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
+	echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
+	echo '## at all.  If it is, things are likely to break because of'; \
+	echo '## the libucb dependency that is created.'; \
+	echo; \
+	;; \
+	esac
+	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
+	 -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -lz
+
+pngtest: pngtest.o $(LIBNAME).so
+	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+	./pngtest
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
+
+clean:
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
+	pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+	chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h
+pngerror.o pngerror.pic.o: png.h pngconf.h
+pngrio.o pngrio.pic.o: png.h pngconf.h
+pngwio.o pngwio.pic.o: png.h pngconf.h
+pngmem.o pngmem.pic.o: png.h pngconf.h
+pngset.o pngset.pic.o: png.h pngconf.h
+pngget.o pngget.pic.o: png.h pngconf.h
+pngread.o pngread.pic.o: png.h pngconf.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h
+pngpread.o pngpread.pic.o: png.h pngconf.h
+
+pngtest.o: png.h pngconf.h
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index 93da477..d3a69ad 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -1,4 +1,5 @@
 # makefile for libpng on Solaris 2.x with gcc
+# Copyright (C) 2002 Glenn Randers-Pehrson
 # Contributed by William L. Sebok, based on makefile.linux
 # Copyright (C) 1998 Greg Roelofs
 # Copyright (C) 1996, 1997 Andreas Dilger
@@ -6,7 +7,7 @@
 
 CC=gcc
 
-# Where make install puts libpng.a, libpng.so*, and png.h
+# Where make install puts libpng.a, libpng10.so*, and png.h
 prefix=/usr/local
 
 # Where the zlib library and include files are located
@@ -28,11 +29,12 @@
 #RANLIB=ranlib
 RANLIB=echo
 
-# read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
+# read libpng.txt or png.h to see why PNGMAJ is 0.  You should not
 # have to change it.
-PNGMAJ = 2
-PNGMIN = 1.0.12beta1
+PNGMAJ = 0
+PNGMIN = 1.0.13
 PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng10
 
 INCPATH=$(prefix)/include
 LIBPATH=$(prefix)/lib
@@ -48,19 +50,19 @@
 .c.pic.o:
 	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
 
-all: libpng.a libpng.so pngtest
+all: libpng.a $(LIBNAME).so pngtest
 
 libpng.a: $(OBJS)
 	ar rc $@ $(OBJS)
 	$(RANLIB) $@
 
-libpng.so: libpng.so.$(PNGMAJ)
-	ln -f -s libpng.so.$(PNGMAJ) libpng.so
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
 
-libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
-	ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
 
-libpng.so.$(PNGVER): $(OBJSDLL)
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
 	@case "`type ld`" in *ucb*) \
 	echo; \
 	echo '## WARNING:'; \
@@ -73,27 +75,55 @@
 	echo; \
 	;; \
 	esac
-	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.$(PNGMAJ) \
-	 -o libpng.so.$(PNGVER) $(OBJSDLL) -lz
+	$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
+	 -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -lz
 
-pngtest: pngtest.o libpng.so
+pngtest: pngtest.o $(LIBNAME).so
 	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
 
 test: pngtest
 	./pngtest
 
-install: libpng.a libpng.so.$(PNGVER)
-	-@mkdir $(INCPATH) $(LIBPATH)
-	cp png.h pngconf.h $(INCPATH)
-	chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
-	cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
-	chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
-	-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
-	(cd $(LIBPATH); ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
-	 ln -f -s libpng.so.$(PNGMAJ) libpng.so)
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
+	-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
+	cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
+	chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
+	-@/bin/rm -f $(INCPATH)/libpng
+	ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	cp libpng.a $(LIBPATH)/$(LIBNAME).a
+	chmod 644 $(LIBPATH)/$(LIBNAME).a
+	-@/bin/rm -f $(LIBPATH)/libpng.a
+	ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER)
+	-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
+	-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
+	-@/bin/rm -f $(LIBPATH)/libpng.so
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2
+	-@/bin/rm -f $(LIBPATH)/libpng.so.2.*
+	cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
+	chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
+	(cd $(LIBPATH); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \
+	ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ))
+	-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+	cp libpng.pc $(LIBPATH)/pkgconfig/libpng10.pc
+	chmod 644 $(LIBPATH)/pkgconfig/libpng10.pc
+
+install: install-static install-shared
 
 clean:
-	/bin/rm -f *.o libpng.a libpng.so* pngtest pngout.png
+	/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
+	pngtest pngout.png
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:
diff --git a/scripts/makefile.std b/scripts/makefile.std
index 8247449..15e569a 100644
--- a/scripts/makefile.std
+++ b/scripts/makefile.std
@@ -36,11 +36,14 @@
 
 install: libpng.a
 	-@mkdir $(prefix)/include
+	-@mkdir $(prefix)/include/libpng
 	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
+	-@rm -f $(prefix)/include/png.h
+	-@rm -f $(prefix)/include/pngconf.h
+	cp png.h $(prefix)/include/libpng
+	cp pngconf.h $(prefix)/include/libpng
+	chmod 644 $(prefix)/include/libpng/png.h
+	chmod 644 $(prefix)/include/libpng/pngconf.h
 	cp libpng.a $(prefix)/lib
 	chmod 644 $(prefix)/lib/libpng.a
 
diff --git a/scripts/makefile.sunos b/scripts/makefile.sunos
index 2203931..cdce372 100644
--- a/scripts/makefile.sunos
+++ b/scripts/makefile.sunos
@@ -40,11 +40,14 @@
 
 install: libpng.a
 	-@mkdir $(prefix)/include
+	-@mkdir $(prefix)/include/libpng
 	-@mkdir $(prefix)/lib
-	cp png.h $(prefix)/include
-	cp pngconf.h $(prefix)/include
-	chmod 644 $(prefix)/include/png.h
-	chmod 644 $(prefix)/include/pngconf.h
+	-@rm -f $(prefix)/include/png.h
+	-@rm -f $(prefix)/include/pngconf.h
+	cp png.h $(prefix)/include/libpng
+	cp pngconf.h $(prefix)/include/libpng
+	chmod 644 $(prefix)/include/libpng/png.h
+	chmod 644 $(prefix)/include/libpng/pngconf.h
 	cp libpng.a $(prefix)/lib
 	chmod 644 $(prefix)/lib/libpng.a
 
diff --git a/scripts/pngdef.pas b/scripts/pngdef.pas
index 3e8c3bc..0fac3f4 100644
--- a/scripts/pngdef.pas
+++ b/scripts/pngdef.pas
@@ -1,14 +1,14 @@
 unit pngdef;
 
 // Caution: this file has fallen out of date since version 1.0.5.  Write to
-// png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu about bringing
-// it up to date.
+// png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu about volunteering
+// to it up to date.
 
 interface
 
 const
-  PNG_LIBPNG_VER_STRING = '1.0.12beta1';
-  PNG_LIBPNG_VER        =  10012;
+  PNG_LIBPNG_VER_STRING = '1.0.13';
+  PNG_LIBPNG_VER        =  10013;
 
 type
   png_uint_32 = Cardinal;
diff --git a/scripts/pngos2.def b/scripts/pngos2.def
index f096faf..a7be284 100644
--- a/scripts/pngos2.def
+++ b/scripts/pngos2.def
@@ -2,7 +2,7 @@
 ; PNG.LIB module definition file for OS/2
 ;----------------------------------------
 
-; Version 1.0.12beta1
+; Version 1.0.13
 
 LIBRARY		PNG
 DESCRIPTION	"PNG image compression library for OS/2"
@@ -184,11 +184,22 @@
   png_convert_to_rfc1123
   png_set_invalid
 
-;To be added at version 1.2.0
-; png_permit_mng_features
-
-;To be added at version 1.2.0
+; Added at version 1.2.0:
 ; png_mmx_support
+; png_permit_empty_plte
+; png_permit_mng_features
+; png_get_mmx_flagmask
+; png_get_asm_flagmask
+; png_get_asm_flags
+; png_get_mmx_bitdepth_threshold
+; png_get_mmx_rowbytes_threshold
+; png_set_asm_flags
+; png_init_mmx_flags
+
+; Added at version 1.2.2:
+  png_zalloc
+  png_zfree
+  png_handle_as_unknown
 
 ; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
   png_libpng_ver