Imported from libpng-1.0.8beta1.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index e98198b..6534e6f 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-Libpng 1.0.7 - July 1, 2000
+Libpng 1.0.8beta1 - July 8, 2000
 
 This is a public release of libpng, intended for use in production codes.
 
@@ -96,6 +96,14 @@
   Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros.
   Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks.
   Revised the definition of "trans_values" in libpng.3/libpng.txt
+  Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
+  Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
+     pngwutil.c.
+  Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h.
+  Removed unused "#include <assert.h>" from png.c
+  Added WindowsCE support.
+  Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment.
+
 
 Send comments/corrections/commendations to
 png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
diff --git a/CHANGES b/CHANGES
index ed64430..ee5d4bc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -797,6 +797,14 @@
   Fixed "DJBPP" typo in pnggccrd.c introduced in beta18.
 version 1.0.7 [July 1, 2000]
   Revised the definition of "trans_values" in libpng.3/libpng.txt
+version 1.0.8beta1 [July 8, 2000]
+  Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
+  Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
+     pngwutil.c.
+  Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h.
+  Removed unused "#include <assert.h>" from png.c
+  Added WindowsCE support.
+  Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment.
 
 Send comments/corrections/commendations to
 png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
diff --git a/INSTALL b/INSTALL
index 21ab07b..1a8f0a4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 
-Installing libpng version 1.0.7 - July 1, 2000
+Installing libpng version 1.0.8beta1 - July 8, 2000
 
 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.7" or "lpng107" and "zlib-1.1.3"
+might be called "libpng-1.0.8beta1" or "lpng107" and "zlib-1.1.3"
 or "zlib113") so that you have directories called "zlib" and "libpng".
 
 Your directory structure should look like this:
@@ -54,8 +54,8 @@
 include
 
  makefile.std      =>  Generic UNIX makefile (cc, creates static libpng.a)
- makefile.linux    =>  Linux/ELF makefile (gcc, creates libpng.so.2.1.0.7)
- makefile.gcmmx    =>  Linux/ELF makefile (gcc, creates libpng.so.2.1.0.7,
+ makefile.linux    =>  Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta1)
+ makefile.gcmmx    =>  Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta1,
                        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
@@ -67,9 +67,9 @@
  makefile.intel    =>  Intel C/C++ version 4.0 and later
  libpng.icc        =>  Project file for IBM VisualAge/C++ version 4.0 or later
  makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
- makefile.sggcc    =>  Silicon Graphics (gcc, creates libpng.so.2.1.0.7)
+ makefile.sggcc    =>  Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta1)
  makefile.sunos    =>  Sun makefile
- makefile.solaris  =>  Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.7)
+ makefile.solaris  =>  Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.8beta1)
  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 7a9ca86..3bf58c2 100644
--- a/KNOWNBUG
+++ b/KNOWNBUG
@@ -1,7 +1,48 @@
 
 Known bugs and suggested enhancements in libpng-1.0.7
 
-1. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
+1. July 2, 2000 -- BUG -- pnggccrd.c
+
+   Some programs compiled with PNG_USE_PNGGCCRD crash in pnggccrd.c.
+   Also, pnggccrd.c will not compile under gcc-2.95-2.
+
+   STATUS: Under investigation.  Experts on MMX assembler code are
+   invited to help with the debugging.  Note that pngvcrd.c works fine.
+
+2. July 3, 2000 -- BUG -- MEMORY LEAK
+
+   There is a memory leak in pngpread.c; it doesn't free "key".
+
+   STATUS: Fixed in libpng-1.0.8beta1, by adding.
+
+      png_free(png_ptr, text_ptr);
+
+   after lines 1221 and 1038 in pngpread.c
+
+3. July 3, 2000 -- BUG -- PNG_EXPORT_VAR
+
+   The definition of PNG_EXPORT_VAR, in pngconf.h, should be
+   #  define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
+
+   STATUS: Fixed in libpng-1.0.8beta1.
+
+4. July 3, 2000 -- BUG -- PNG_NO_STDIO
+
+   Several places in pngrutil.c and pngwutil.c, there are printf statements
+   inside PNG_NO_STDIO blocks (should be PNG_NO_CONSOLE_IO)
+
+   STATUS: Fixed in libpng-1.0.8beta1.
+
+5. July 3, 2000 -- ENHANCEMENT -- WindowsCE support
+
+   Libpng-1.0.7 does not support WindowsCE.
+
+   STATUS:  Libpng-1.0.8 and libpng-2.0.0 will support WindowsCE.  A
+   new typedef, png_file_p, will be added which is normally FILE * but
+   will be HANDLE if libpng is being built for WindowsCE.  Other patches
+   required for WindowsCE support have been provided and will be applied.
+
+6. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
 
    Loops need to be optimized everywhere
 
@@ -14,9 +55,9 @@
 
    STATUS: Under investigation, postponed until after
    libpng-1.1.0.  About 160 loops will be turned around
-   in libpng-1.1.Nn, for testing.
+   in libpng-2.0.x betaxx, for testing.
 
-2. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
+7. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
 
    libpng-1.0.5 and earlier transform colors to gamma=1.0 space for
    merging with background, and then back to the image's gamma.  The
@@ -28,14 +69,12 @@
 
    STATUS: under development.
 
-3. September 1999 -- ENHANCEMENT --
+8. September 1999 -- ENHANCEMENT --
 
    It should be possible to use libpng without floating-point aritmetic.
 
    STATUS: Under investigation, implementation postponed until after
-   libpng-1.0.7.  The application interface will change because replacements
-   for the png_set_gAMA(), png_set_cHRM(), and corresponding png_get_()
-   functions will be needed.
+   libpng-1.0.7.
 
    Much of this was completed in libpng-1.0.6, but gamma compensation
    is not yet done in fixed-point arithmetic.
diff --git a/LICENSE b/LICENSE
index d5d6023..23f3dfe 100644
--- a/LICENSE
+++ b/LICENSE
@@ -4,7 +4,7 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng version 1.0.7, July 1, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
+libpng version 1.0.8beta1, July 8, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
 Distributed according to the same disclaimer and license as libpng-1.0.6
 with the following individuals added to the list of Contributing Authors
 
@@ -94,4 +94,4 @@
 
 Glenn Randers-Pehrson
 randeg@alum.rpi.edu
-July 1, 2000
+July 8, 2000
diff --git a/README b/README
index ba3dce4..96d7a68 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng 1.0.7 - July 1, 2000 (shared library 2.1)
+README for libpng 1.0.8beta1 - July 8, 2000 (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.
@@ -176,9 +176,9 @@
        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.7)
+                            (gcc, creates libpng.so.2.1.0.8beta1)
        makefile.gcmmx   =>  Linux/ELF makefile (gcc, creates
-                            libpng.so.2.1.0.7, uses assembler code
+                            libpng.so.2.1.0.8beta1, 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
@@ -190,10 +190,10 @@
        makefile.intel   =>  Intel C/C++ version 4.0 and later
        libpng.icc       =>  Project file, IBM VisualAge/C++ 4.0 or later
        makefile.sgi     =>  Silicon Graphics IRIX (cc, creates static lib)
-       makefile.sggcc   =>  Silicon Graphics (gcc, creates libpng.so.2.1.0.7)
+       makefile.sggcc   =>  Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta1)
        makefile.sunos   =>  Sun makefile
        makefile.solaris =>  Solaris 2.X makefile
-                            (gcc, creates libpng.so.2.1.0.7)
+                            (gcc, creates libpng.so.2.1.0.8beta1)
        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 f35c132..b3a7317 100644
--- a/Y2KINFO
+++ b/Y2KINFO
@@ -1,13 +1,13 @@
    Y2K compliance in libpng:
    =========================
 
-      July 1, 2000
+      July 8, 2000
 
       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.7 are Y2K compliant.  It is my belief that earlier
+      upward through 1.0.8beta1 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 28a1985..c8b6c6f 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 echo "
-  There is no \"configure\" script for Libpng-1.0.7.  Instead, please
+  There is no \"configure\" script for Libpng-1.0.8beta1.  Instead, please
   copy the appropriate makefile for your system from the \"scripts\"
   directory.  Read the INSTALL file for more details.
 "
diff --git a/libpng.3 b/libpng.3
index 54a0a05..450bc32 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "July 1, 2000"
+.TH LIBPNG 3 "July 8, 2000"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7
+libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta1
 .SH SYNOPSIS
 \fI\fB
 
@@ -747,7 +747,7 @@
 .SH LIBPNG.TXT
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.0.7 - July 1, 2000
+ libpng version 1.0.8beta1 - July 8, 2000
  Updated and distributed by Glenn Randers-Pehrson
  <randeg@alum.rpi.edu>
  Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
@@ -3381,13 +3381,13 @@
 
 .SH VII. Y2K Compliance in libpng
 
-July 1, 2000
+July 8, 2000
 
 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.7 are Y2K compliant.  It is my belief that earlier
+upward through 1.0.8beta1 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
@@ -3528,7 +3528,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.0.7 - July 1, 2000:
+Libpng version 1.0.8beta1 - July 8, 2000:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
 
@@ -3541,7 +3541,7 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng version 1.0.7, July 1, 2000 is
+libpng version 1.0.8beta1, July 8, 2000 is
 Copyright (c) 2000 Glenn Randers-Pehrson
 Distributed according to the same disclaimer and license as libpng-1.0.6
 with the following individuals added to the list of Contributing Authors
@@ -3632,7 +3632,7 @@
 
 Glenn Randers-Pehrson
 randeg@alum.rpi.edu
-July 1, 2000
+July 8, 2000
 
 .\" end of man page
 
diff --git a/libpng.txt b/libpng.txt
index 0d67cd9..bd3dca8 100644
--- a/libpng.txt
+++ b/libpng.txt
@@ -1,6 +1,6 @@
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.0.7 - July 1, 2000
+ libpng version 1.0.8beta1 - July 8, 2000
  Updated and distributed by Glenn Randers-Pehrson
  <randeg@alum.rpi.edu>
  Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
@@ -2634,13 +2634,13 @@
 
 VII. Y2K Compliance in libpng
 
-July 1, 2000
+July 8, 2000
 
 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.7 are Y2K compliant.  It is my belief that earlier
+upward through 1.0.8beta1 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 bf60097..c423105 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "July 1, 2000"
+.TH LIBPNGPF 3 "July 8, 2000"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7
+libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta1
 (private functions)
 .SH SYNOPSIS
 \fB#include <png.h>\fP
diff --git a/msvc/README.txt b/msvc/README.txt
index ab85189..ed834df 100644
--- a/msvc/README.txt
+++ b/msvc/README.txt
@@ -1,5 +1,5 @@
 Microsoft Developer Studio Build File, Format Version 6.00 for
-libpng 1.0.7 (July 1, 2000) and zlib
+libpng 1.0.8beta1 (July 8, 2000) and zlib
 
 Copyright (C) 2000 Simon-Pierre Cadieux
 For conditions of distribution and use, see copyright notice in png.h
diff --git a/msvc/png32ms.def b/msvc/png32ms.def
index afa2642..d97cf29 100644
--- a/msvc/png32ms.def
+++ b/msvc/png32ms.def
@@ -6,7 +6,7 @@
 DESCRIPTION "PNG image compression library for Windows"
 
 EXPORTS
-;Version 1.0.7
+;Version 1.0.8beta1
   png_build_grayscale_palette  @1
   png_check_sig        @2
   png_chunk_error      @3
diff --git a/png.5 b/png.5
index 91387c9..eddf007 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "July 1, 2000"
+.TH PNG 5 "July 8, 2000"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index 00e4d37..f1dbc70 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
 
 /* png.c - location for general purpose libpng functions
  *
- * libpng version 1.0.7 - July 1, 2000
+ * libpng version 1.0.8beta1 - July 8, 2000
  * Copyright (c) 1998, 1999, 2000 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.)
@@ -10,18 +10,17 @@
 
 #define PNG_INTERNAL
 #define PNG_NO_EXTERN
-#include <assert.h>
 #include "png.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_0_7 Your_png_h_is_not_version_1_0_7;
+typedef version_1_0_8beta1 Your_png_h_is_not_version_1_0_8beta1;
 
 /* 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 */
-char png_libpng_ver[12] = "1.0.7";
+char png_libpng_ver[12] = "1.0.8beta1";
 
 /* png_sig was changed to a function in version 1.0.5c */
 /* Place to hold the signature string for a PNG file. */
@@ -548,7 +547,7 @@
  * necessarily available.
  */
 void PNGAPI
-png_init_io(png_structp png_ptr, FILE *fp)
+png_init_io(png_structp png_ptr, png_FILE_p fp)
 {
    png_debug(1, "in png_init_io\n");
    png_ptr->io_ptr = (png_voidp)fp;
@@ -572,6 +571,17 @@
          sizeof(char)));
    }
 
+#if defined(_WIN32_WCE)
+  {
+     wchar_t time_buf[29];
+     wsprintf(time_buf, TEXT("%d %S %d %02d:%02d:%02d +0000"),
+              ptime->day % 32, short_months[(ptime->month - 1) % 12],
+              ptime->year, ptime->hour % 24, ptime->minute % 60,
+              ptime->second % 61);
+     WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29,
+        NULL, NULL);
+  }
+#else
 #ifdef USE_FAR_KEYWORD
    {
       char near_time_buf[29];
@@ -588,6 +598,7 @@
                ptime->year, ptime->hour % 24, ptime->minute % 60,
                ptime->second % 61);
 #endif
+#endif /* _WIN32_WCE */
    return ((png_charp)png_ptr->time_buffer);
 }
 #endif /* PNG_TIME_RFC1123_SUPPORTED */
@@ -605,7 +616,7 @@
 png_get_copyright(png_structp png_ptr)
 {
    if (png_ptr != NULL || png_ptr == NULL)  /* silence compiler warning */
-   return ("\n libpng version 1.0.7 - July 1, 2000\n\
+   return ("\n libpng version 1.0.8beta1 - July 8, 2000\n\
    Copyright (c) 1998-2000 Glenn Randers-Pehrson\n\
    Copyright (c) 1996, 1997 Andreas Dilger\n\
    Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
@@ -623,8 +634,8 @@
 {
    /* Version of *.c files used when building libpng */
    if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
-      return("1.0.7");
-   return("1.0.7");
+      return("1.0.8beta1");
+   return("1.0.8beta1");
 }
 
 png_charp PNGAPI
@@ -673,5 +684,5 @@
 png_access_version_number(void)
 {
    /* Version of *.c files used when building libpng */
-   return((png_uint_32) 10007L);
+   return((png_uint_32) 10008L);
 }
diff --git a/png.h b/png.h
index cdf3e1b..72f2dcc 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.0.7 - July 1, 2000
+ * libpng version 1.0.8beta1 - July 8, 2000
  * Copyright (c) 1998, 1999, 2000 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.)
@@ -9,7 +9,7 @@
  * 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.7 - July 1, 2000: Glenn
+ *  libpng versions 0.97, January 1998, through 1.0.8beta1 - July 8, 2000: Glenn
  *  See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -81,7 +81,7 @@
  * If you modify libpng you may insert additional notices immediately following
  * this sentence.
  *
- * libpng version 1.0.7, July 1, 2000, is
+ * libpng version 1.0.8beta1, July 8, 2000, is
  * Copyright (c) 2000 Glenn Randers-Pehrson
  * Distributed according to the same disclaimer and license as libpng-1.0.6
  * with the following individuals added to the list of Contributing Authors
@@ -186,13 +186,13 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    July 1, 2000
+ *    July 8, 2000
  *
  *    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.7 are Y2K compliant.  It is my belief that earlier
+ *    upward through 1.0.8beta1 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
@@ -248,24 +248,24 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.0.7"
+#define PNG_LIBPNG_VER_STRING "1.0.8beta1"
 
 #define PNG_LIBPNG_VER_SONUM   2
 
 /* 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 7
+#define PNG_LIBPNG_VER_RELEASE 8
 /* This should match the numeric part of the final component of
  * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
-#define PNG_LIBPNG_VER_BUILD   0
+#define PNG_LIBPNG_VER_BUILD   1
 
 /* 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 10007 /* 1.0.7 */
+#define PNG_LIBPNG_VER 10008 /* 1.0.8 */
 
 /* Note to maintainer: update this number in scripts/pngdef.pas as well */
 
@@ -1147,9 +1147,9 @@
 };
 
 /* This prevents a compiler error in png_get_copyright() in png.c if png.c
-and png.h are both at * version 1.0.7
+and png.h are both at * version 1.0.8beta1
  */
-typedef png_structp version_1_0_7;
+typedef png_structp version_1_0_8beta1;
 
 typedef png_struct FAR * FAR * png_structpp;
 
@@ -1248,6 +1248,8 @@
    PNGARG((png_structp png_ptr, png_timep ptime));
 #endif
 
+#if !defined(_WIN32_WCE)
+/* "time.h" functions are not supported on WindowsCE */
 #if defined(PNG_WRITE_tIME_SUPPORTED)
 /* convert from a struct tm to png_time */
 extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
@@ -1257,6 +1259,7 @@
 extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
    time_t ttime));
 #endif /* PNG_WRITE_tIME_SUPPORTED */
+#endif /* _WIN32_WCE */
 
 #if defined(PNG_READ_EXPAND_SUPPORTED)
 /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
@@ -2168,7 +2171,7 @@
 extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
 
 #define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.0.7 - July 1, 2000 (header)\n"
+   " libpng version 1.0.8beta1 - July 8, 2000 (header)\n"
 
 #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
 /* With these routines we avoid an integer divide, which will be slower on
diff --git a/pngasmrd.h b/pngasmrd.h
index 64ddbbc..1da8a92 100644
--- a/pngasmrd.h
+++ b/pngasmrd.h
@@ -1,6 +1,6 @@
 /* pngasmrd.h - assembler version of utilities to read a PNG file
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1999, 2000 Glenn Randers-Pehrson
  *
diff --git a/pngconf.h b/pngconf.h
index 856ffe8..917ba13 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,6 +1,6 @@
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -62,6 +62,15 @@
  * #define PNG_NO_STDIO
  */
 
+#if defined(_WIN32_WCE)
+#include <windows.h>
+/* Console I/O functions are not supported on WindowsCE */
+#define PNG_NO_CONSOLE_IO
+#ifdef PNG_DEBUG
+#  undef PNG_DEBUG
+#endif
+#endif
+
 #ifdef PNG_BUILD_DLL
 #  ifndef PNG_CONSOLE_IO_SUPPORTED
 #    ifndef PNG_NO_CONSOLE_IO
@@ -80,7 +89,10 @@
 #      endif
 #    endif
 #  else
-#    include <stdio.h>
+#    if !defined(_WIN32_WCE)
+/* "stdio.h" functions are not supported on WindowsCE */
+#      include <stdio.h>
+#    endif
 #  endif
 
 /* This macro protects us against machines that don't have function
@@ -118,7 +130,7 @@
 #endif
 
 /* enough people need this for various reasons to include it here */
-#if !defined(MACOS) && !defined(RISCOS)
+#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
 #include <sys/types.h>
 #endif
 
@@ -799,7 +811,10 @@
 
 /* need the time information for reading tIME chunks */
 #if defined(PNG_tIME_SUPPORTED)
-#  include <time.h>
+#  if !defined(_WIN32_WCE)
+     /* "time.h" functions are not supported on WindowsCE */
+#    include <time.h>
+#  endif
 #endif
 
 /* Some typedefs to get us started.  These should be safe on most of the
@@ -896,6 +911,11 @@
 typedef PNG_CONST char  FAR * png_const_charp;
 typedef char            FAR * png_charp;
 typedef png_fixed_point FAR * png_fixed_point_p;
+#if defined(_WIN32_WCE)
+typedef HANDLE                png_FILE_p;
+#else
+typedef FILE                * png_FILE_p;
+#endif
 #ifdef PNG_FLOATING_POINT_SUPPORTED
 typedef double          FAR * png_doublep;
 #endif
@@ -1021,7 +1041,7 @@
 
 #ifdef PNG_USE_GLOBAL_ARRAYS
 #ifndef PNG_EXPORT_VAR
-#  define PNG_EXPORT_VAR(type) extern type
+#  define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
 #endif
 #endif
 
diff --git a/pngerror.c b/pngerror.c
index 0f950df..6f23382 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -1,7 +1,7 @@
 
 /* pngerror.c - stub functions for i/o and memory allocation
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pnggccrd.c b/pnggccrd.c
index 9edb898..bb574be 100644
--- a/pnggccrd.c
+++ b/pnggccrd.c
@@ -6,7 +6,7 @@
  *     and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
  *     for Intel's performance analysis of the MMX vs. non-MMX code.
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng version 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * Copyright (c) 1998, Intel Corporation
@@ -122,11 +122,33 @@
  *  - fixed up both versions of mmxsupport() (ORIG_THAT_USED_TO_CLOBBER_EBX
  *     macro determines which is used); original not yet tested.
  *
+ * 20000213:
+ *  - When compiling with gcc, be sure to use  -fomit-frame-pointer
+ *
  * 20000319:
  *  - fixed a register-name typo in png_do_read_interlace(), default (MMX) case,
  *     pass == 4 or 5, that caused visible corruption of interlaced images
  *
- *  - When compiling with gcc, be sure to use  -fomit-frame-pointer
+ * 20000623:
+ *  -  Various problems were reported with gcc 2.95.2 in the Cygwin environment,
+ *     many of the form "forbidden register 0 (ax) was spilled for class AREG."
+ *     This is explained at http://gcc.gnu.org/fom_serv/cache/23.html, and
+ *     Chuck Wilson supplied a patch involving dummy output registers.  See
+ *     http://sourceforge.net/bugs/?func=detailbug&bug_id=108741&group_id=5624
+ *     for the original (anonymous) SourceForge bug report.
+ *
+ * 20000706:
+ *  - Chuck Wilson passed along these remaining gcc 2.95.2 errors:
+ *       pnggccrd.c: In function `png_combine_row':
+ *       pnggccrd.c:525: more than 10 operands in `asm'
+ *       pnggccrd.c:669: more than 10 operands in `asm'
+ *       pnggccrd.c:828: more than 10 operands in `asm'
+ *       pnggccrd.c:994: more than 10 operands in `asm'
+ *       pnggccrd.c:1177: more than 10 operands in `asm'
+ *     They are all the same problem and can be worked around by using the
+ *     global _unmask variable unconditionally, not just in the -fPIC case.
+ *     Apparently earlier versions of gcc also have the problem with more than
+ *     10 operands; they just don't report it.  Much strangeness ensues, etc.
  */
 
 #define PNG_INTERNAL
@@ -174,9 +196,13 @@
 /* These constants are used in the inlined MMX assembly code.
    Ignore gcc's "At top level: defined but not used" warnings. */
 
-#ifdef __PIC__
-static int _unmask;     // not enough regs when compiling with -fPIC, so...
-#endif
+/* GRR 20000706:  originally _unmask was needed only when compiling with -fPIC,
+ *  since that case uses the %ebx register for indexing the Global Offset Table
+ *  and there were no other registers available.  But gcc 2.95 and later emit
+ *  "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.
+ */
+static int _unmask;
 
 static unsigned long long _mask8_0  = 0x0102040810204080LL;
 
@@ -430,23 +456,19 @@
             {
                png_uint_32 len;
                int diff;
-#ifndef __PIC__
-               int unmask = ~mask;
-#else
+               int dummy_value_a;   // fix 'forbidden register spilled' error
+               int dummy_value_d;
+               int dummy_value_c;
+               int dummy_value_S;
+               int dummy_value_D;
                _unmask = ~mask;            // global variable for -fPIC version
-#endif
                srcptr = png_ptr->row_buf + 1;
                dstptr = row;
                len  = png_ptr->width &~7;  // reduce to multiple of 8
                diff = png_ptr->width & 7;  // amount lost
 
-               __asm__ (
-#ifdef __PIC__
+               __asm__ __volatile__ (
                   "movd      _unmask, %%mm7  \n\t" // load bit pattern
-#else
-// preload        "movd      unmask, %%mm7   \n\t" // (unmask is in ebx)
-                  "movd      %%ebx, %%mm7    \n\t" // load bit pattern (unmask)
-#endif
                   "psubb     %%mm6, %%mm6    \n\t" // zero mm6
                   "punpcklbw %%mm7, %%mm7    \n\t"
                   "punpcklwd %%mm7, %%mm7    \n\t"
@@ -498,21 +520,22 @@
                 "end8:                       \n\t"
                   "EMMS                      \n\t"  // DONE
 
-                  :                                 // output regs (none)
+                  : "=a" (dummy_value_a),           // output regs (dummy)
+                    "=d" (dummy_value_d),
+                    "=c" (dummy_value_c),
+                    "=S" (dummy_value_S),
+                    "=D" (dummy_value_D)
 
-                  : "S" (srcptr),      // esi       // input regs
-                    "D" (dstptr),      // edi
-                    "a" (diff),        // eax
-#ifndef __PIC__
-                    "b" (unmask),      // ebx       // Global Offset Table idx
-#endif
-                    "c" (len),         // ecx
-                    "d" (mask)         // edx
+                  : "3" (srcptr),      // esi       // input regs
+                    "4" (dstptr),      // edi
+                    "0" (diff),        // eax
+// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
+                    "2" (len),         // ecx
+                    "1" (mask)         // edx
 
-                  : "%esi", "%edi", "%eax",         // clobber list
-                    "%ecx", "%edx"
+//                  :          // clobber list
 #if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  , "%mm0", "%mm4", "%mm6", "%mm7"
+                  : "%mm0", "%mm4", "%mm6", "%mm7"
 #endif
                );
             }
@@ -550,23 +573,19 @@
             {
                png_uint_32 len;
                int diff;
-#ifndef __PIC__
-               int unmask = ~mask;
-#else
+               int dummy_value_a;   // fix 'forbidden register spilled' error
+               int dummy_value_d;
+               int dummy_value_c;
+               int dummy_value_S;
+               int dummy_value_D;
                _unmask = ~mask;            // global variable for -fPIC version
-#endif
                srcptr = png_ptr->row_buf + 1;
                dstptr = row;
                len  = png_ptr->width &~7;  // reduce to multiple of 8
                diff = png_ptr->width & 7;  // amount lost
 
-               __asm__ (
-#ifdef __PIC__
+               __asm__ __volatile__ (
                   "movd      _unmask, %%mm7   \n\t" // load bit pattern
-#else
-// preload        "movd      unmask, %%mm7    \n\t" // (unmask is in ebx)
-                  "movd      %%ebx, %%mm7     \n\t" // load bit pattern (unmask)
-#endif
                   "psubb     %%mm6, %%mm6     \n\t" // zero mm6
                   "punpcklbw %%mm7, %%mm7     \n\t"
                   "punpcklwd %%mm7, %%mm7     \n\t"
@@ -633,21 +652,22 @@
                 "end16:                       \n\t"
                   "EMMS                       \n\t" // DONE
 
-                  :                                 // output regs (none)
+                  : "=a" (dummy_value_a),              // output regs (dummy)
+                    "=d" (dummy_value_d),
+                    "=c" (dummy_value_c),
+                    "=S" (dummy_value_S),
+                    "=D" (dummy_value_D)
 
-                  : "S" (srcptr),      // esi       // input regs
-                    "D" (dstptr),      // edi
-                    "a" (diff),        // eax
-#ifndef __PIC__
-                    "b" (unmask),      // ebx       // Global Offset Table idx
-#endif
-                    "c" (len),         // ecx
-                    "d" (mask)         // edx
+                  : "3" (srcptr),      // esi       // input regs
+                    "4" (dstptr),      // edi
+                    "0" (diff),        // eax
+// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
+                    "2" (len),         // ecx
+                    "1" (mask)         // edx
 
-                  : "%esi", "%edi", "%eax",         // clobber list
-                    "%ecx", "%edx"
+//                  :          // clobber list
 #if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  , "%mm0", "%mm1",
+                  : "%mm0", "%mm1",
                     "%mm4", "%mm5", "%mm6", "%mm7"
 #endif
                );
@@ -686,23 +706,19 @@
             {
                png_uint_32 len;
                int diff;
-#ifndef __PIC__
-               int unmask = ~mask;
-#else
+               int dummy_value_a;   // fix 'forbidden register spilled' error
+               int dummy_value_d;
+               int dummy_value_c;
+               int dummy_value_S;
+               int dummy_value_D;
                _unmask = ~mask;            // global variable for -fPIC version
-#endif
                srcptr = png_ptr->row_buf + 1;
                dstptr = row;
                len  = png_ptr->width &~7;  // reduce to multiple of 8
                diff = png_ptr->width & 7;  // amount lost
 
-               __asm__ (
-#ifdef __PIC__
+               __asm__ __volatile__ (
                   "movd      _unmask, %%mm7   \n\t" // load bit pattern
-#else
-// preload        "movd      unmask, %%mm7    \n\t" // (unmask is in ebx)
-                  "movd      %%ebx, %%mm7     \n\t" // load bit pattern (unmask)
-#endif
                   "psubb     %%mm6, %%mm6     \n\t" // zero mm6
                   "punpcklbw %%mm7, %%mm7     \n\t"
                   "punpcklwd %%mm7, %%mm7     \n\t"
@@ -784,21 +800,22 @@
                 "end24:                       \n\t"
                   "EMMS                       \n\t" // DONE
 
-                  :                                 // output regs (none)
+                  : "=a" (dummy_value_a),              // output regs (dummy)
+                    "=d" (dummy_value_d),
+                    "=c" (dummy_value_c),
+                    "=S" (dummy_value_S),
+                    "=D" (dummy_value_D)
 
-                  : "S" (srcptr),      // esi       // input regs
-                    "D" (dstptr),      // edi
-                    "a" (diff),        // eax
-#ifndef __PIC__
-                    "b" (unmask),      // ebx       // Global Offset Table idx
-#endif
-                    "c" (len),         // ecx
-                    "d" (mask)         // edx
+                  : "3" (srcptr),      // esi       // input regs
+                    "4" (dstptr),      // edi
+                    "0" (diff),        // eax
+// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
+                    "2" (len),         // ecx
+                    "1" (mask)         // edx
 
-                  : "%esi", "%edi", "%eax",         // clobber list
-                    "%ecx", "%edx"
+//                  :          // clobber list
 #if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  , "%mm0", "%mm1", "%mm2",
+                  : "%mm0", "%mm1", "%mm2",
                     "%mm4", "%mm5", "%mm6", "%mm7"
 #endif
                );
@@ -837,23 +854,19 @@
             {
                png_uint_32 len;
                int diff;
-#ifndef __PIC__
-               int unmask = ~mask;
-#else
+               int dummy_value_a;   // fix 'forbidden register spilled' error
+               int dummy_value_d;
+               int dummy_value_c;
+               int dummy_value_S;
+               int dummy_value_D;
                _unmask = ~mask;            // global variable for -fPIC version
-#endif
                srcptr = png_ptr->row_buf + 1;
                dstptr = row;
                len  = png_ptr->width &~7;  // reduce to multiple of 8
                diff = png_ptr->width & 7;  // amount lost
 
-               __asm__ (
-#ifdef __PIC__
+               __asm__ __volatile__ (
                   "movd      _unmask, %%mm7   \n\t" // load bit pattern
-#else
-// preload        "movd      unmask, %%mm7    \n\t" // (unmask is in ebx)
-                  "movd      %%ebx, %%mm7     \n\t" // load bit pattern (unmask)
-#endif
                   "psubb     %%mm6, %%mm6     \n\t" // zero mm6
                   "punpcklbw %%mm7, %%mm7     \n\t"
                   "punpcklwd %%mm7, %%mm7     \n\t"
@@ -942,21 +955,22 @@
                 "end32:                       \n\t"
                   "EMMS                       \n\t" // DONE
 
-                  :                                 // output regs (none)
+                  : "=a" (dummy_value_a),              // output regs (dummy)
+                    "=d" (dummy_value_d),
+                    "=c" (dummy_value_c),
+                    "=S" (dummy_value_S),
+                    "=D" (dummy_value_D)
 
-                  : "S" (srcptr),      // esi       // input regs
-                    "D" (dstptr),      // edi
-                    "a" (diff),        // eax
-#ifndef __PIC__
-                    "b" (unmask),      // ebx       // Global Offset Table idx
-#endif
-                    "c" (len),         // ecx
-                    "d" (mask)         // edx
+                  : "3" (srcptr),      // esi       // input regs
+                    "4" (dstptr),      // edi
+                    "0" (diff),        // eax
+// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
+                    "2" (len),         // ecx
+                    "1" (mask)         // edx
 
-                  : "%esi", "%edi", "%eax",         // clobber list
-                    "%ecx", "%edx"
+//                  :          // clobber list
 #if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  , "%mm0", "%mm1", "%mm2", "%mm3",
+                  : "%mm0", "%mm1", "%mm2", "%mm3",
                     "%mm4", "%mm5", "%mm6", "%mm7"
 #endif
                );
@@ -995,23 +1009,19 @@
             {
                png_uint_32 len;
                int diff;
-#ifndef __PIC__
-               int unmask = ~mask;
-#else
+               int dummy_value_a;   // fix 'forbidden register spilled' error
+               int dummy_value_d;
+               int dummy_value_c;
+               int dummy_value_S;
+               int dummy_value_D;
                _unmask = ~mask;            // global variable for -fPIC version
-#endif
                srcptr = png_ptr->row_buf + 1;
                dstptr = row;
                len  = png_ptr->width &~7;  // reduce to multiple of 8
                diff = png_ptr->width & 7;  // amount lost
 
-               __asm__ (
-#ifdef __PIC__
+               __asm__ __volatile__ (
                   "movd      _unmask, %%mm7   \n\t" // load bit pattern
-#else
-// preload        "movd      unmask, %%mm7    \n\t" // (unmask is in ebx)
-                  "movd      %%ebx, %%mm7     \n\t" // load bit pattern (unmask)
-#endif
                   "psubb     %%mm6, %%mm6     \n\t" // zero mm6
                   "punpcklbw %%mm7, %%mm7     \n\t"
                   "punpcklwd %%mm7, %%mm7     \n\t"
@@ -1117,21 +1127,22 @@
                 "end48:                       \n\t"
                   "EMMS                       \n\t" // DONE
 
-                  :                                 // output regs (none)
+                  : "=a" (dummy_value_a),              // output regs (dummy)
+                    "=d" (dummy_value_d),
+                    "=c" (dummy_value_c),
+                    "=S" (dummy_value_S),
+                    "=D" (dummy_value_D)
 
-                  : "S" (srcptr),      // esi       // input regs
-                    "D" (dstptr),      // edi
-                    "a" (diff),        // eax
-#ifndef __PIC__
-                    "b" (unmask),      // ebx       // Global Offset Table idx
-#endif
-                    "c" (len),         // ecx
-                    "d" (mask)         // edx
+                  : "3" (srcptr),      // esi       // input regs
+                    "4" (dstptr),      // edi
+                    "0" (diff),        // eax
+// was (unmask)     "b"    RESERVED    // ebx       // Global Offset Table idx
+                    "2" (len),         // ecx
+                    "1" (mask)         // edx
 
-                  : "%esi", "%edi", "%eax",         // clobber list
-                    "%ecx", "%edx"
+//                  :         // clobber list
 #if 0  /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
-                  , "%mm0", "%mm1", "%mm2", "%mm3",
+                  : "%mm0", "%mm1", "%mm2", "%mm3",
                     "%mm4", "%mm5", "%mm6", "%mm7"
 #endif
                );
@@ -1453,7 +1464,10 @@
                {
                   if (((pass == 0) || (pass == 1)) && width)
                   {
-                     __asm__ (
+                     int dummy_value_c;   // fix 'forbidden register spilled'
+                     int dummy_value_S;
+                     int dummy_value_D;
+                     __asm__ __volatile__ (
                         "subl $21, %%edi         \n\t"
                                      // (png_pass_inc[pass] - 1)*pixel_bytes
 
@@ -1482,22 +1496,27 @@
                         "jnz .loop3_pass0        \n\t"
                         "EMMS                    \n\t" // DONE
 
-                        :                              // output regs (none)
+                        : "=c" (dummy_value_c),           // output regs (dummy)
+                          "=S" (dummy_value_S),
+                          "=D" (dummy_value_D)
 
-                        : "S" (sptr),      // esi      // input regs
-                          "D" (dp),        // edi
-                          "c" (width)      // ecx
+                        : "1" (sptr),      // esi      // input regs
+                          "2" (dp),        // edi
+                          "0" (width)      // ecx
 // doesn't work           "i" (0x0000000000FFFFFFLL)   // %1 (a.k.a. _const4)
 
-                        : "%esi", "%edi", "%ecx"       // clobber list
+//                        :        // clobber list
 #if 0  /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                        , "%mm0", "%mm1", "%mm2", "%mm3", "%mm4"
+                        : "%mm0", "%mm1", "%mm2", "%mm3", "%mm4"
 #endif
                      );
                   }
                   else if (((pass == 2) || (pass == 3)) && width)
                   {
-                     __asm__ (
+                     int dummy_value_c;   // fix 'forbidden register spilled'
+                     int dummy_value_S;
+                     int dummy_value_D;
+                     __asm__ __volatile__ (
                         "subl $9, %%edi          \n\t"
                                      // (png_pass_inc[pass] - 1)*pixel_bytes
 
@@ -1520,15 +1539,17 @@
                         "jnz .loop3_pass2        \n\t"
                         "EMMS                    \n\t" // DONE
 
-                        :                              // output regs (none)
+                        : "=c" (dummy_value_c),           // output regs (dummy)
+                          "=S" (dummy_value_S),
+                          "=D" (dummy_value_D)
 
-                        : "S" (sptr),      // esi      // input regs
-                          "D" (dp),        // edi
-                          "c" (width)      // ecx
+                        : "1" (sptr),      // esi      // input regs
+                          "2" (dp),        // edi
+                          "0" (width)      // ecx
 
-                        : "%esi", "%edi", "%ecx"       // clobber list
+//                        :        // clobber list
 #if 0  /* %mm0, ..., %mm2 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                        , "%mm0", "%mm1", "%mm2"
+                        : "%mm0", "%mm1", "%mm2"
 #endif
                      );
                   }
@@ -1543,7 +1564,10 @@
                         // png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
                         // sptr points at last pixel in pre-expanded row
                         // dp points at last pixel position in expanded row
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $3, %%esi          \n\t"
                            "subl $9, %%edi          \n\t"
                                         // (png_pass_inc[pass] + 1)*pixel_bytes
@@ -1569,15 +1593,17 @@
                            "jnz .loop3_pass4        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0, ..., %mm3 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1", "%mm2", "%mm3"
+                           : "%mm0", "%mm1", "%mm2", "%mm3"
 #endif
                         );
                      }
@@ -1609,7 +1635,10 @@
                      width -= width_mmx;        // 0-3 pixels => 0-3 bytes
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $3, %%esi          \n\t"
                            "subl $31, %%edi         \n\t"
 
@@ -1636,15 +1665,17 @@
                            "jnz .loop1_pass0        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :       // clobber list
 #if 0  /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1", "%mm2", "%mm3", "%mm4"
+                           : "%mm0", "%mm1", "%mm2", "%mm3", "%mm4"
 #endif
                         );
                      }
@@ -1684,7 +1715,10 @@
                      width -= width_mmx;        // 0-3 pixels => 0-3 bytes
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $3, %%esi          \n\t"
                            "subl $15, %%edi         \n\t"
 
@@ -1702,15 +1736,17 @@
                            "jnz .loop1_pass2        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1"
+                           : "%mm0", "%mm1"
 #endif
                         );
                      }
@@ -1732,7 +1768,10 @@
                      width -= width_mmx;        // 0-3 pixels => 0-3 bytes
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $7, %%esi          \n\t"
                            "subl $15, %%edi         \n\t"
 
@@ -1749,15 +1788,17 @@
                            "jnz .loop1_pass4        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (none)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1"
+                           : "%mm0", "%mm1"
 #endif
                         );
                      }
@@ -1784,7 +1825,10 @@
                      width -= width_mmx;        // 0,1 pixels => 0,2 bytes
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $2, %%esi          \n\t"
                            "subl $30, %%edi         \n\t"
 
@@ -1804,15 +1848,17 @@
                            "jnz .loop2_pass0        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1"
+                           : "%mm0", "%mm1"
 #endif
                         );
                      }
@@ -1838,7 +1884,10 @@
                      width -= width_mmx;        // 0,1 pixels => 0,2 bytes
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $2, %%esi          \n\t"
                            "subl $14, %%edi         \n\t"
 
@@ -1856,15 +1905,17 @@
                            "jnz .loop2_pass2        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1"
+                           : "%mm0", "%mm1"
 #endif
                         );
                      }
@@ -1890,7 +1941,10 @@
                      width -= width_mmx;        // 0,1 pixels => 0,2 bytes
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $2, %%esi          \n\t"
                            "subl $6, %%edi          \n\t"
 
@@ -1904,15 +1958,17 @@
                            "jnz .loop2_pass4        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0"
+                           : "%mm0"
 #endif
                         );
                      }
@@ -1948,12 +2004,15 @@
  */
                      if (width_mmx)
                      {
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
 #ifdef GRR_DEBUG
                         FILE *junk = fopen("junk.4bytes", "wb");
                         if (junk)
                            fclose(junk);
 #endif /* GRR_DEBUG */
-                        __asm__ (
+                        __asm__ __volatile__ (
                            "subl $4, %%esi          \n\t"
                            "subl $60, %%edi         \n\t"
 
@@ -1976,15 +2035,17 @@
                            "jnz .loop4_pass0        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
+ 
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
-
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1"
+                           : "%mm0", "%mm1"
 #endif
                         );
                      }
@@ -2010,7 +2071,10 @@
                      width -= width_mmx;        // 0,1 pixels => 0,4 bytes
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $4, %%esi          \n\t"
                            "subl $28, %%edi         \n\t"
 
@@ -2029,15 +2093,17 @@
                            "jnz .loop4_pass2        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
+ 
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
-
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1"
+                           : "%mm0", "%mm1"
 #endif
                         );
                      }
@@ -2063,7 +2129,10 @@
                      width -= width_mmx;        // 0,1 pixels => 0,4 bytes
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $4, %%esi          \n\t"
                            "subl $12, %%edi         \n\t"
 
@@ -2080,15 +2149,17 @@
                            "jnz .loop4_pass4        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width_mmx)  // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width_mmx)  // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0", "%mm1"
+                           : "%mm0", "%mm1"
 #endif
                         );
                      }
@@ -2122,12 +2193,15 @@
                   {
                      // source is 8-byte RRGGBBAA
                      // dest is 64-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA ...
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
 #ifdef GRR_DEBUG
                         FILE *junk = fopen("junk.8bytes", "wb");
                         if (junk)
                             fclose(junk);
 #endif /* GRR_DEBUG */
-                        __asm__ (
+                        __asm__ __volatile__ (
                            "subl $56, %%edi         \n\t" // start of last block
 
                         ".loop8_pass0:              \n\t"
@@ -2146,15 +2220,17 @@
                            "jnz .loop8_pass0        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width)      // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width)      // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0"
+                           : "%mm0"
 #endif
                         );
                   }
@@ -2166,7 +2242,10 @@
                      width -= width_mmx;
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $24, %%edi         \n\t" // start of last block
 
                         ".loop8_pass2:              \n\t"
@@ -2181,15 +2260,17 @@
                            "jnz .loop8_pass2        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width)      // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width)      // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0"
+                           : "%mm0"
 #endif
                         );
                      }
@@ -2202,7 +2283,10 @@
                      width -= width_mmx;
                      if (width_mmx)
                      {
-                        __asm__ (
+                        int dummy_value_c;  // fix 'forbidden register spilled'
+                        int dummy_value_S;
+                        int dummy_value_D;
+                        __asm__ __volatile__ (
                            "subl $8, %%edi          \n\t" // start of last block
 
                         ".loop8_pass4:              \n\t"
@@ -2215,15 +2299,17 @@
                            "jnz .loop8_pass4        \n\t"
                            "EMMS                    \n\t" // DONE
 
-                           :                              // output regs (none)
+                           : "=c" (dummy_value_c),           // output regs (dummy)
+                             "=S" (dummy_value_S),
+                             "=D" (dummy_value_D)
 
-                           : "S" (sptr),      // esi      // input regs
-                             "D" (dp),        // edi
-                             "c" (width)      // ecx
+                           : "1" (sptr),      // esi      // input regs
+                             "2" (dp),        // edi
+                             "0" (width)      // ecx
 
-                           : "%esi", "%edi", "%ecx"       // clobber list
+//                           :        // clobber list
 #if 0  /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
-                           , "%mm0"
+                           : "%mm0"
 #endif
                         );
                      }
@@ -2408,11 +2494,14 @@
                             png_bytep prev_row)
 {
    int bpp;
+   int dummy_value_c;   // fix 'forbidden register 2 (cx) was spilled' error
+   int dummy_value_S;
+   int dummy_value_D;
 // int diff;  GRR: global now (shortened to dif/_dif)
 
    bpp = (row_info->pixel_depth + 7) >> 3;  // Get # bytes per pixel
    _FullLength  = row_info->rowbytes;        // # of bytes to filter
-   __asm__ (
+   __asm__ __volatile__ (
       // Init address pointers and offset
 //GRR "movl row, %%edi             \n\t" // edi ==> Avg(x)
       "xorl %%ebx, %%ebx           \n\t" // ebx ==> x
@@ -2467,14 +2556,16 @@
       "subl %%eax, %%ecx           \n\t" // drop over bytes from original length
       "movl %%ecx, _MMXLength      \n\t"
 
-      : // output regs/vars here, e.g., "=m" (_MMXLength) instead of final instr
+      : "=c" (dummy_value_c), // output regs/vars here, e.g., "=m" (_MMXLength) instead of final instr
+        "=S" (dummy_value_S),
+        "=D" (dummy_value_D)
 
-      : "S" (prev_row),  // esi          // input regs
-        "D" (row),       // edi
-        "c" (bpp)        // ecx
+      : "1" (prev_row),  // esi          // input regs
+        "2" (row),       // edi
+        "0" (bpp)        // ecx
 
-      : "%eax", "%ebx", "%ecx",          // clobber list
-        "%edx", "%edi", "%esi"
+      : "%eax", "%ebx",          // clobber list
+        "%edx"
 // GRR: INCLUDE "memory" as clobbered? (_dif, _MMXLength)     PROBABLY
    );
 
diff --git a/pngget.c b/pngget.c
index 66f24a3..6d9a2c8 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,7 +1,7 @@
 
 /* pngget.c - retrieval of values from info struct
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngmem.c b/pngmem.c
index d336afa..cadef85 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,7 +1,7 @@
 
 /* pngmem.c - stub functions for memory allocation
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngpread.c b/pngpread.c
index b44c890..83d9a34 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1,7 +1,7 @@
 
 /* pngpread.c - read a png file in push mode
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1036,6 +1036,7 @@
 
       png_set_text(png_ptr, info_ptr, text_ptr, 1);
 
+      png_free(png_ptr, key);
       png_free(png_ptr, text_ptr);
    }
 }
@@ -1219,6 +1220,7 @@
 
       png_set_text(png_ptr, info_ptr, text_ptr, 1);
 
+      png_free(png_ptr, key);
       png_free(png_ptr, text_ptr);
    }
 }
diff --git a/pngread.c b/pngread.c
index b46a0a7..f942a1b 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,7 +1,7 @@
 
 /* pngread.c - read a PNG file
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -697,7 +697,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.7
+ * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta1
  */
 
 void PNGAPI
@@ -746,7 +746,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.7
+ * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta1
  */
 void PNGAPI
 png_read_image(png_structp png_ptr, png_bytepp image)
diff --git a/pngrio.c b/pngrio.c
index ca46c80..dbbcb0b 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,7 +1,7 @@
 
 /* pngrio.c - functions for data input
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -48,7 +48,7 @@
     * instead of an int, which is what fread() actually returns.
     */
    check = (png_size_t)fread(data, (png_size_t)1, length,
-      (FILE *)png_ptr->io_ptr);
+      (png_FILE_p)png_ptr->io_ptr);
 
    if (check != length)
    {
@@ -69,11 +69,11 @@
 {
    int check;
    png_byte *n_data;
-   FILE *io_ptr;
+   png_FILE_p io_ptr;
 
    /* Check if data really is near. If so, use usual code. */
    n_data = (png_byte *)CVT_PTR_NOCHECK(data);
-   io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr);
+   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
    if ((png_bytep)n_data == data)
    {
       check = fread(n_data, 1, length, io_ptr);
diff --git a/pngrtran.c b/pngrtran.c
index 03ed2fa..9d9a2bd 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1,7 +1,7 @@
 
 /* pngrtran.c - transforms the data in a row for PNG readers
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1125,7 +1125,7 @@
 #if !defined(PNG_USELESS_TESTS_SUPPORTED)
    if (png_ptr->row_buf == NULL)
    {
-#if !defined(PNG_NO_STDIO)
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
       char msg[50];
 
       sprintf(msg, "NULL row buffer for row %ld, pass %d", png_ptr->row_number,
diff --git a/pngrutil.c b/pngrutil.c
index 1098ae2..d3e8e35 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
 
 /* pngrutil.c - utilities to read a PNG file
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -14,6 +14,30 @@
 #define PNG_INTERNAL
 #include "png.h"
 
+#if defined(_WIN32_WCE)
+/* strtod() function is not supported on WindowsCE */
+#  ifdef PNG_FLOATING_POINT_SUPPORTED
+__inline double strtod(const char *nptr, char **endptr)
+{
+   double result = 0;
+   int len;
+   wchar_t *str, *end;
+
+   len = MultiByteToWideChar(CP_ACP, 0, nptr, -1, NULL, 0);
+   str = (wchar_t *)malloc(len * sizeof(wchar_t));
+   if ( NULL != str )
+   {
+      MultiByteToWideChar(CP_ACP, 0, nptr, -1, str, len);
+      result = wcstod(str, &end);
+      len = WideCharToMultiByte(CP_ACP, 0, end, -1, NULL, 0, NULL, NULL);
+      *endptr = (char *)nptr + (strlen(nptr) - len + 1);
+      free(str);
+   }
+   return result;
+}
+#  endif
+#endif
+
 #ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
 /* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
 png_uint_32 /* PRIVATE */
@@ -225,11 +249,18 @@
       }
       if (ret != Z_STREAM_END)
       {
-#if !defined(PNG_NO_STDIO)
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
          char umsg[50];
 
-         sprintf(umsg,"Incomplete compressed datastream in %s chunk",
-             png_ptr->chunk_name);
+         if (ret == Z_BUF_ERROR)
+            sprintf(umsg,"Buffer error in compressed datastream in %s chunk",
+                png_ptr->chunk_name);
+         else if (ret == Z_DATA_ERROR)
+            sprintf(umsg,"Data error in compressed datastream in %s chunk",
+                png_ptr->chunk_name);
+         else
+            sprintf(umsg,"Incomplete compressed datastream in %s chunk",
+                png_ptr->chunk_name);
          png_warning(png_ptr, umsg);
 #else
          png_warning(png_ptr,
@@ -246,7 +277,7 @@
    }
    else /* if (comp_type != PNG_TEXT_COMPRESSION_zTXt) */
    {
-#if !defined(PNG_NO_STDIO)
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
       char umsg[50];
 
       sprintf(umsg, "Unknown zTXt compression type %d", comp_type);
@@ -585,7 +616,7 @@
       {
          png_warning(png_ptr,
            "Ignoring incorrect gAMA value when sRGB is also present");
-#ifndef PNG_NO_STDIO
+#ifndef PNG_NO_CONSOLE_IO
          fprintf(stderr, "gamma = (%d/100000)\n", (int)igamma);
 #endif
          return;
@@ -795,7 +826,7 @@
 
             png_warning(png_ptr,
               "Ignoring incorrect cHRM value when sRGB is also present");
-#ifndef PNG_NO_STDIO
+#ifndef PNG_NO_CONSOLE_IO
 #ifdef PNG_FLOATING_POINT_SUPPORTED
             fprintf(stderr,"wx=%f, wy=%f, rx=%f, ry=%f\n",
                white_x, white_y, red_x, red_y);
@@ -807,7 +838,7 @@
             fprintf(stderr,"gx=%ld, gy=%ld, bx=%ld, by=%ld\n",
                int_x_green, int_y_green, int_x_blue, int_y_blue);
 #endif
-#endif /* PNG_NO_STDIO */
+#endif /* PNG_NO_CONSOLE_IO */
          }
          png_crc_finish(png_ptr, 0);
          return;
@@ -901,7 +932,7 @@
       {
          png_warning(png_ptr,
            "Ignoring incorrect gAMA value when sRGB is also present");
-#ifndef PNG_NO_STDIO
+#ifndef PNG_NO_CONSOLE_IO
 #  ifdef PNG_FIXED_POINT_SUPPORTED
          fprintf(stderr,"incorrect gamma=(%d/100000)\n",(int)png_ptr->int_gamma);
 #  else
diff --git a/pngset.c b/pngset.c
index ff17941..31bd9d3 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1,7 +1,7 @@
 
 /* pngset.c - storage of image information into info struct
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngtest.c b/pngtest.c
index ea8729a..660ad4d 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1,7 +1,7 @@
 
 /* pngtest.c - a simple test program to test libpng
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -27,9 +27,27 @@
  * of files at once by typing "pngtest -m file1.png file2.png ..."
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
+#if defined(_WIN32_WCE)
+#  if _WIN32_WCE < 211
+     __error__ (f|w)printf functions are not supported on old WindowsCE.;
+#  endif
+#  include <windows.h>
+#  include <stdlib.h>
+#  define READFILE(file, data, length, check) \
+     ReadFile(file, data, length, &check,NULL)
+#  define WRITEFILE(file, data, length, check) \
+     WriteFile(file, data, length, &check, NULL);
+#  define FCLOSE(file) CloseHandle(file)
+#else
+#  include <stdio.h>
+#  include <stdlib.h>
+#  include <assert.h>
+#  define READFILE(file, data, length, check) \
+     check=(png_size_t)fread(data,(png_size_t)1,length,file)
+#  define WRITEFILE(file, data, length, check) \
+     check = (png_size_t)fwrite(data, (png_size_t)1, length, file);
+#  define FCLOSE(file) fclose(file)
+#endif
 
 /* Makes pngtest verbose so we can find problems (needs to be before png.h) */
 #ifndef PNG_DEBUG
@@ -239,8 +257,7 @@
    /* fread() returns 0 on error, so it is OK to store this in a png_size_t
     * instead of an int, which is what fread() actually returns.
     */
-   check = (png_size_t)fread(data, (png_size_t)1, length,
-      (FILE *)png_ptr->io_ptr);
+   READFILE((png_FILE_p)png_ptr->io_ptr, data, length, check);
 
    if (check != length)
    {
@@ -261,14 +278,14 @@
 {
    int check;
    png_byte *n_data;
-   FILE *io_ptr;
+   png_FILE_p io_ptr;
 
    /* Check if data really is near. If so, use usual code. */
    n_data = (png_byte *)CVT_PTR_NOCHECK(data);
-   io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr);
+   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
    if ((png_bytep)n_data == data)
    {
-      check = fread(n_data, 1, length, io_ptr);
+      READFILE(io_ptr, n_data, length, check);
    }
    else
    {
@@ -279,7 +296,7 @@
       do
       {
          read = MIN(NEAR_BUF_SIZE, remaining);
-         err = fread(buf, (png_size_t)1, read, io_ptr);
+         READFILE(io_ptr, buf, 1, err);
          png_memcpy(data, buf, read); /* copy far buffer to near buffer */
          if(err != read)
             break;
@@ -301,10 +318,12 @@
 static void
 pngtest_flush(png_structp png_ptr)
 {
-   FILE *io_ptr;
-   io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr));
+#if !defined(_WIN32_WCE)
+   png_FILE_p io_ptr;
+   io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
    if (io_ptr != NULL)
       fflush(io_ptr);
+#endif
 }
 #endif
 
@@ -318,7 +337,7 @@
 {
    png_uint_32 check;
 
-   check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr));
+   WRITEFILE((png_FILE_p)png_ptr->io_ptr,  data, 1, check);
    if (check != length)
    {
       png_error(png_ptr, "Write Error");
@@ -338,14 +357,14 @@
 {
    png_uint_32 check;
    png_byte *near_data;  /* Needs to be "png_byte *" instead of "png_bytep" */
-   FILE *io_ptr;
+   png_FILE_p io_ptr;
 
    /* Check if data really is near. If so, use usual code. */
    near_data = (png_byte *)CVT_PTR_NOCHECK(data);
-   io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr);
+   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
    if ((png_bytep)near_data == data)
    {
-      check = fwrite(near_data, 1, length, io_ptr);
+      WRITEFILE(io_ptr, near_data, 1, check);
    }
    else
    {
@@ -357,7 +376,7 @@
       {
          written = MIN(NEAR_BUF_SIZE, remaining);
          png_memcpy(buf, data, written); /* copy far buffer to near buffer */
-         err = fwrite(buf, 1, written, io_ptr);
+         WRITEFILE(io_ptr, written, 1, err);
          if (err != written)
             break;
          else
@@ -417,7 +436,7 @@
    by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. */
 typedef struct memory_information
 {
-   png_uint_32                    size;
+   png_uint_32               size;
    png_voidp                 pointer;
    struct memory_information FAR *next;
 } memory_information;
@@ -463,7 +482,7 @@
       if(verbose)
          printf("png_malloc %d bytes at %x\n",size,pinfo->pointer);
 #endif
-      assert(pinfo->size != 12345);
+      assert(pinfo->size != 12345678);
       return (png_voidp)(pinfo->pointer);
    }
 }
@@ -523,7 +542,8 @@
 int
 test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
 {
-   static FILE *fpin, *fpout;  /* "static" prevents setjmp corruption */
+   static png_FILE_p fpin;
+   static png_FILE_p fpout;  /* "static" prevents setjmp corruption */
    png_structp read_ptr, write_ptr;
    png_infop read_info_ptr, write_info_ptr, end_info_ptr, write_end_info_ptr;
    png_bytep row_buf;
@@ -1083,8 +1103,8 @@
    {
       png_size_t num_in, num_out;
 
-      num_in = fread(inbuf, 1, 1, fpin);
-      num_out = fread(outbuf, 1, 1, fpout);
+      READFILE(fpin, inbuf, 1, num_in);
+      READFILE(fpout, outbuf, 1, num_out);
 
       if (num_in != num_out)
       {
@@ -1392,4 +1412,4 @@
 }
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_0_7 your_png_h_is_not_version_1_0_7;
+typedef version_1_0_8beta1 your_png_h_is_not_version_1_0_8beta1;
diff --git a/pngtrans.c b/pngtrans.c
index 3cf4ca3..c5b18ba 100644
--- a/pngtrans.c
+++ b/pngtrans.c
@@ -1,7 +1,7 @@
 
 /* pngtrans.c - transforms the data in a row (used by both readers and writers)
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngvcrd.c b/pngvcrd.c
index 1d1594e..7a2f22c 100644
--- a/pngvcrd.c
+++ b/pngvcrd.c
@@ -2,7 +2,7 @@
  *
  * For Intel x86 CPU and Microsoft Visual C++ compiler
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * Copyright (c) 1998, Intel Corporation
@@ -3671,11 +3671,11 @@
 
 #ifdef PNG_DEBUG
    png_debug(1, "in png_read_filter_row\n");
-#if (UseMMX == 1)
+#  if (UseMMX == 1)
    png_debug1(0,"%s, ", "MMX");
-#else
+#  else
    png_debug1(0,"%s, ", "x86");
-#endif
+#  endif
    switch (filter)
    {
       case 0: sprintf(filnm, "None ");
diff --git a/pngwio.c b/pngwio.c
index 636d0ee..4e1bd16 100644
--- a/pngwio.c
+++ b/pngwio.c
@@ -1,7 +1,7 @@
 
 /* pngwio.c - functions for data output
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -44,7 +44,12 @@
 {
    png_uint_32 check;
 
-   check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr));
+#if defined(_WIN32_WCE)
+   if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
+      check = -1;
+#else
+   check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
+#endif
    if (check != length)
    {
       png_error(png_ptr, "Write Error");
@@ -64,11 +69,11 @@
 {
    png_uint_32 check;
    png_byte *near_data;  /* Needs to be "png_byte *" instead of "png_bytep" */
-   FILE *io_ptr;
+   png_FILE_p io_ptr;
 
    /* Check if data really is near. If so, use usual code. */
    near_data = (png_byte *)CVT_PTR_NOCHECK(data);
-   io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr);
+   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
    if ((png_bytep)near_data == data)
    {
       check = fwrite(near_data, 1, length, io_ptr);
@@ -117,10 +122,12 @@
 static void /* PRIVATE */
 png_default_flush(png_structp png_ptr)
 {
-   FILE *io_ptr;
-   io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr));
+#if !defined(_WIN32_WCE)
+   png_FILE_p io_ptr;
+   io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
    if (io_ptr != NULL)
       fflush(io_ptr);
+#endif
 }
 #endif
 #endif
diff --git a/pngwrite.c b/pngwrite.c
index 24fa20b..feca7f7 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -1,7 +1,7 @@
 
 /* pngwrite.c - general routines to write a PNG file
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -378,6 +378,8 @@
 }
 
 #if defined(PNG_WRITE_tIME_SUPPORTED)
+#if !defined(_WIN32_WCE)
+/* "time.h" functions are not supported on WindowsCE */
 void PNGAPI
 png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime)
 {
@@ -400,6 +402,7 @@
    png_convert_from_struct_tm(ptime, tbuf);
 }
 #endif
+#endif
 
 /* Initialize png_ptr structure, and allocate any memory needed */
 png_structp PNGAPI
diff --git a/pngwtran.c b/pngwtran.c
index 3e6f644..099bb0f 100644
--- a/pngwtran.c
+++ b/pngwtran.c
@@ -1,7 +1,7 @@
 
 /* pngwtran.c - transforms the data in a row for PNG writers
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwutil.c b/pngwutil.c
index a955ff9..6af3ee8 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,7 +1,7 @@
 
 /* pngwutil.c - utilities to write a PNG file
  *
- * libpng 1.0.7 - July 1, 2000
+ * libpng 1.0.8beta1 - July 8, 2000
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -172,7 +172,7 @@
 
    if (compression >= PNG_TEXT_COMPRESSION_LAST)
    {
-#if !defined(PNG_NO_STDIO)
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
       char msg[50];
       sprintf(msg, "Unknown compression type %d", compression);
       png_warning(png_ptr, msg);
@@ -837,8 +837,8 @@
        white_x + white_y > 1.0)
    {
       png_warning(png_ptr, "Invalid cHRM white point specified");
-#if !defined(PNG_NO_STDIO)
-      printf("white_x=%f, white_y=%f\n",white_x, white_y);
+#if !defined(PNG_NO_CONSOLE_IO)
+      fprintf(stderr,"white_x=%f, white_y=%f\n",white_x, white_y);
 #endif
       return;
    }
@@ -900,8 +900,8 @@
    if (white_x > 80000L || white_y > 80000L || white_x + white_y > 100000L)
    {
       png_warning(png_ptr, "Invalid fixed cHRM white point specified");
-#if !defined(PNG_NO_STDIO)
-      printf("white_x=%ld, white_y=%ld\n",white_x, white_y);
+#if !defined(PNG_NO_CONSOLE_IO)
+      fprintf(stderr,"white_x=%ld, white_y=%ld\n",white_x, white_y);
 #endif
       return;
    }
@@ -1088,7 +1088,7 @@
    {
       if (*kp < 0x20 || (*kp > 0x7E && (png_byte)*kp < 0xA1))
       {
-#if !defined(PNG_NO_STDIO)
+#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
          char msg[40];
 
          sprintf(msg, "invalid keyword character 0x%02X", *kp);
@@ -1441,8 +1441,19 @@
 
    png_debug(1, "in png_write_sCAL\n");
 
+#if defined(_WIN32_WCE)
+/* sprintf() function is not supported on WindowsCE */
+   {
+      wchar_t wc_buf[32];
+      swprintf(wc_buf, TEXT("%12.12e"), width);
+      WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, wbuf, 32, NULL, NULL);
+      swprintf(wc_buf, TEXT("%12.12e"), height);
+      WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, hbuf, 32, NULL, NULL);
+   }
+#else
    sprintf(wbuf, "%12.12e", width);
    sprintf(hbuf, "%12.12e", height);
+#endif
    total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
 
    png_debug1(3, "sCAL total length = %d\n", total_len);
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index eddb34c..c476ce8 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -31,7 +31,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
 # have to change it.
 PNGMAJ = 2
-PNGMIN = 1.0.7
+PNGMIN = 1.0.8beta1
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # where make install puts libpng.a, libpng.so*, and png.h
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index 54005ea..99004f6 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -14,7 +14,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
 # have to change it.
 PNGMAJ = 2
-PNGMIN = 1.0.7
+PNGMIN = 1.0.8beta1
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 CC=cc
diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx
index acec301..d244fbc 100644
--- a/scripts/makefile.gcmmx
+++ b/scripts/makefile.gcmmx
@@ -1,6 +1,6 @@
 # makefile for libpng on Linux ELF with gcc using MMX assembler code
-# Copyright (C) 1998-2000 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
+# Copyright 1996-1997 Andreas Dilger
+# Copyright 1998-2000 Greg Roelofs
 # For conditions of distribution and use, see copyright notice in png.h
 
 CC=gcc
@@ -34,7 +34,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
 # have to change it.
 PNGMAJ = 2
-PNGMIN = 1.0.7
+PNGMIN = 1.0.8beta1
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 INCPATH=$(prefix)/include
@@ -53,14 +53,14 @@
 
 all: libpng.a libpng.so pngtest
 
-pnggccrd.o:	png.h pngconf.h pngasmrd.h
+pnggccrd.o:	pnggccrd.c png.h pngconf.h pngasmrd.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
 
-pnggccrd.pic.o:	png.h pngconf.h pngasmrd.h
+pnggccrd.pic.o:	pnggccrd.c png.h pngconf.h pngasmrd.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:'
@@ -105,22 +105,20 @@
 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 png.c pngasmrd.h
+pngerror.o pngerror.pic.o:	png.h pngconf.h pngerror.c
+pngrio.o pngrio.pic.o:		png.h pngconf.h pngrio.c
+pngwio.o pngwio.pic.o:		png.h pngconf.h pngwio.c
+pngmem.o pngmem.pic.o:		png.h pngconf.h pngmem.c
+pngset.o pngset.pic.o:		png.h pngconf.h pngset.c
+pngget.o pngget.pic.o:		png.h pngconf.h pngget.c
+pngread.o pngread.pic.o:	png.h pngconf.h pngread.c
+pngrtran.o pngrtran.pic.o:	png.h pngconf.h pngrtran.c
+pngrutil.o pngrutil.pic.o:	png.h pngconf.h pngrutil.c pngasmrd.h
+pngtrans.o pngtrans.pic.o:	png.h pngconf.h pngtrans.c
+pngwrite.o pngwrite.pic.o:	png.h pngconf.h pngwrite.c
+pngwtran.o pngwtran.pic.o:	png.h pngconf.h pngwtran.c
+pngwutil.o pngwutil.pic.o:	png.h pngconf.h pngwutil.c
+pngpread.o pngpread.pic.o:	png.h pngconf.h pngpread.c
 
-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
+pngtest.o:			png.h pngconf.h pngtest.c
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index f005c5d..41073ad 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -34,7 +34,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
 # have to change it.
 PNGMAJ = 2
-PNGMIN = 1.0.7
+PNGMIN = 1.0.8beta1
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 INCPATH=$(prefix)/include
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index a8ea1ee..4623a79 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -25,7 +25,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
 # have to change it.
 PNGMAJ = 2
-PNGMIN = 1.0.7
+PNGMIN = 1.0.8beta1
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 INCPATH=$(prefix)/include
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index 82f442b..64d8053 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -19,8 +19,8 @@
 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
 LDSHARED=gcc -shared
 
-VER=1.0.7
-LIBS=libpng.so.1.0.7
+VER=1.0.8beta1
+LIBS=libpng.so.1.0.8beta1
 SHAREDLIB=libpng.so
 libdir=$(prefix)/lib32
 
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index 5fa530f..f8c591d 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -31,7 +31,7 @@
 # read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
 # have to change it.
 PNGMAJ = 2
-PNGMIN = 1.0.7
+PNGMIN = 1.0.8beta1
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 INCPATH=$(prefix)/include
diff --git a/scripts/pngdef.pas b/scripts/pngdef.pas
index 9f1f208..864223f 100644
--- a/scripts/pngdef.pas
+++ b/scripts/pngdef.pas
@@ -5,8 +5,8 @@
 interface
 
 const
-  PNG_LIBPNG_VER_STRING = '1.0.7';
-  PNG_LIBPNG_VER        =  10007;
+  PNG_LIBPNG_VER_STRING = '1.0.8beta1';
+  PNG_LIBPNG_VER        =  10008;
 
 type
   png_uint_32 = Cardinal;
diff --git a/wince/READMEE.WCE b/wince/READMEE.WCE
new file mode 100644
index 0000000..8e608fd
--- /dev/null
+++ b/wince/READMEE.WCE
@@ -0,0 +1,43 @@
+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.7 ported to WindowsCE 2.0 and 2.11.
+libpng 1.0.7 is a PNG reference library.
+See README, a document of original libpng 1.0.7.
+
+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.7, 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/wince/READMEJ.WCE b/wince/READMEJ.WCE
new file mode 100644
index 0000000..a24f731
--- /dev/null
+++ b/wince/READMEJ.WCE
@@ -0,0 +1,44 @@
+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.7‚É
+€‹’‚·‚é‚à‚Ì‚Æ‚µ‚Ü‚·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/wince/READMEZE.WCE b/wince/READMEZE.WCE
new file mode 100644
index 0000000..b6064bd
--- /dev/null
+++ b/wince/READMEZE.WCE
@@ -0,0 +1,39 @@
+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/wince/READMEZJ.WCE b/wince/READMEZJ.WCE
new file mode 100644
index 0000000..41f408f
--- /dev/null
+++ b/wince/READMEZJ.WCE
@@ -0,0 +1,41 @@
+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/wince/png32ce.def b/wince/png32ce.def
new file mode 100644
index 0000000..e0e739a
--- /dev/null
+++ b/wince/png32ce.def
@@ -0,0 +1,180 @@
+;------------------------------------------
+; LIBPNG module definition file for Windows
+;------------------------------------------
+
+LIBRARY lpngce
+
+EXPORTS
+;Version 1.0.7
+  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  @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    @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    @162
+  png_write_png    @163
+  png_write_row    @164
+  png_write_rows    @165
+  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
diff --git a/wince/zlibce.def b/wince/zlibce.def
new file mode 100644
index 0000000..353437c
--- /dev/null
+++ b/wince/zlibce.def
@@ -0,0 +1,44 @@
+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