Imported from libpng-1.2.37beta02.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index 5e4f637..1ee15b4 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-Libpng 1.2.37beta02 - May 18, 2009
+Libpng 1.2.37beta02 - May 19, 2009
 
 This is not intended to be a public release.  It will be replaced
 within a few weeks by a public version or by another test version.
@@ -51,11 +51,13 @@
   Updated some of the makefiles in the scripts directory (merged with
     those in libpng-1.4.0beta57).
 
-version 1.2.37beta02 [May 18, 2009]
+version 1.2.37beta02 [May 19, 2009]
   Fixed typo in libpng documentation (FILTER_AVE should be FILTER_AVG)
   Relocated misplaced #endif in pngwrite.c, sCAL chunk handler.
   Conditionally compile png_read_finish_row() which is not used by
     progressive readers.
+  Added contrib/pngminim/preader to demonstrate building minimal progressive
+    decoder, based on contrib/gregbook with embedded libpng and zlib.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 
diff --git a/CHANGES b/CHANGES
index 89f28d5..653dcd9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2376,11 +2376,13 @@
   Updated some of the makefiles in the scripts directory (merged with
     those in libpng-1.4.0beta57).
 
-version 1.2.37beta02 [May 18, 2009]
+version 1.2.37beta02 [May 19, 2009]
   Fixed typo in libpng documentation (FILTER_AVE should be FILTER_AVG)
   Relocated misplaced #endif in pngwrite.c, sCAL chunk handler.
   Conditionally compile png_read_finish_row() which is not used by
     progressive readers.
+  Added contrib/pngminim/preader to demonstrate building minimal progressive
+    decoder, based on contrib/gregbook with embedded libpng and zlib.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/INSTALL b/INSTALL
index c0d4fee..27e8689 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 
-Installing libpng version 1.2.37beta02 - May 15, 2009
+Installing libpng version 1.2.37beta02 - May 19, 2009
 
 On Unix/Linux and similar systems, you can simply type
 
diff --git a/LICENSE b/LICENSE
index cfe0d18..06a935e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -8,7 +8,7 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng versions 1.2.6, August 15, 2004, through 1.2.37beta02, May 15, 2009, are
+libpng versions 1.2.6, August 15, 2004, through 1.2.37beta02, May 19, 2009, are
 Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
@@ -106,4 +106,4 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-May 15, 2009
+May 19, 2009
diff --git a/README b/README
index 38f51f9..45aa9cf 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.2.37beta02 - May 15, 2009 (shared library 12.0)
+README for libpng version 1.2.37beta02 - May 19, 2009 (shared library 12.0)
 See the note about version numbers near the top of png.h
 
 See INSTALL for instructions on how to install libpng.
diff --git a/Y2KINFO b/Y2KINFO
index e147f89..29de0cf 100644
--- a/Y2KINFO
+++ b/Y2KINFO
@@ -1,7 +1,7 @@
    Y2K compliance in libpng:
    =========================
 
-      May 15, 2009
+      May 19, 2009
 
       Since the PNG Development group is an ad-hoc body, we can't make
       an official declaration.
diff --git a/example.c b/example.c
index 912a0a9..72d0646 100644
--- a/example.c
+++ b/example.c
@@ -2,7 +2,7 @@
 #if 0 /* in case someone actually tries to compile this */
 
 /* example.c - an example of using libpng
- * Last changed in libpng 1.2.37 [May 15, 2009]
+ * Last changed in libpng 1.2.37 [May 19, 2009]
  * This file has been placed in the public domain by the authors.
  * Maintained 1998-2009 Glenn Randers-Pehrson
  * Maintained 1996, 1997 Andreas Dilger)
diff --git a/libpng-1.2.37beta02.txt b/libpng-1.2.37beta02.txt
index 04d31bc..46260f5 100644
--- a/libpng-1.2.37beta02.txt
+++ b/libpng-1.2.37beta02.txt
@@ -1,6 +1,6 @@
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.2.37beta02 - May 15, 2009
+ libpng version 1.2.37beta02 - May 19, 2009
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -9,7 +9,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.2.37beta02 - May 15, 2009
+ libpng versions 0.97, January 1998, through 1.2.37beta02 - May 19, 2009
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2009 Glenn Randers-Pehrson
 
@@ -1723,7 +1723,7 @@
        PNG_FILTER_NONE  | PNG_FILTER_VALUE_NONE |
        PNG_FILTER_SUB   | PNG_FILTER_VALUE_SUB  |
        PNG_FILTER_UP    | PNG_FILTER_VALUE_UP   |
-       PNG_FILTER_AVG   | PNG_FILTER_VALUE_AVG  |
+       PNG_FILTER_AVE   | PNG_FILTER_VALUE_AVE  |
        PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
        PNG_ALL_FILTERS);
 
@@ -2687,7 +2687,7 @@
 is called for the first time.)
 
     filters = PNG_FILTER_NONE | PNG_FILTER_SUB
-              PNG_FILTER_UP | PNG_FILTER_AVG |
+              PNG_FILTER_UP | PNG_FILTER_AVE |
               PNG_FILTER_PAETH | PNG_ALL_FILTERS;
 
     png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
@@ -2947,7 +2947,7 @@
 IX.  (Omitted)
 X. Y2K Compliance in libpng
 
-May 15, 2009
+May 19, 2009
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
diff --git a/libpng.3 b/libpng.3
index 4341344..44470a2 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,4 +1,4 @@
-.TH LIBPNG 3 "May 15, 2009"
+.TH LIBPNG 3 "May 19, 2009"
 .SH NAME
 libpng \- Portable Network Graphics (PNG) Reference Library 1.2.37beta02
 .SH SYNOPSIS
@@ -821,7 +821,7 @@
 .SH LIBPNG.TXT
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.2.37beta02 - May 15, 2009
+ libpng version 1.2.37beta02 - May 19, 2009
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -830,7 +830,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.2.37beta02 - May 15, 2009
+ libpng versions 0.97, January 1998, through 1.2.37beta02 - May 19, 2009
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2009 Glenn Randers-Pehrson
 
@@ -3768,7 +3768,7 @@
 .SH IX.  (Omitted)
 .SH X. Y2K Compliance in libpng
 
-May 15, 2009
+May 19, 2009
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
@@ -4096,7 +4096,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.2.37beta02 - May 15, 2009:
+Libpng version 1.2.37beta02 - May 19, 2009:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 
@@ -4117,7 +4117,7 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng versions 1.2.6, August 15, 2004, through 1.2.37beta02, May 15, 2009, are
+libpng versions 1.2.6, August 15, 2004, through 1.2.37beta02, May 19, 2009, are
 Copyright (c) 2004,2006-2008 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
@@ -4216,7 +4216,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-May 15, 2009
+May 19, 2009
 
 .\" end of man page
 
diff --git a/libpngpf.3 b/libpngpf.3
index 6c108e6..ef3c957 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,4 +1,4 @@
-.TH LIBPNGPF 3 "May 15, 2009"
+.TH LIBPNGPF 3 "May 19, 2009"
 .SH NAME
 libpng \- Portable Network Graphics (PNG) Reference Library 1.2.37beta02
 (private functions)
diff --git a/png.5 b/png.5
index de9f49f..853dfa6 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "May 15, 2009"
+.TH PNG 5 "May 19, 2009"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index e114e07..10bb231 100644
--- a/png.c
+++ b/png.c
@@ -694,7 +694,7 @@
 png_get_copyright(png_structp png_ptr)
 {
    png_ptr = png_ptr;  /* silence compiler warning about unused png_ptr */
-   return ((png_charp) "\n libpng version 1.2.37beta02 - May 15, 2009\n\
+   return ((png_charp) "\n libpng version 1.2.37beta02 - May 19, 2009\n\
    Copyright (c) 1998-2008 Glenn Randers-Pehrson\n\
    Copyright (c) 1996-1997 Andreas Dilger\n\
    Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
diff --git a/png.h b/png.h
index 3e7dde9..d29cf04 100644
--- a/png.h
+++ b/png.h
@@ -1,6 +1,6 @@
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.2.37beta02 - May 18, 2009
+ * libpng version 1.2.37beta02 - May 19, 2009
  * Copyright (c) 1998-2009 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.)
@@ -8,7 +8,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.2.37beta02 - May 18, 2009: Glenn
+ *  libpng versions 0.97, January 1998, through 1.2.37beta02 - May 19, 2009: Glenn
  *  See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -256,7 +256,7 @@
  * If you modify libpng you may insert additional notices immediately following
  * this sentence.
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.2.37beta02, May 18, 2009, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.2.37beta02, May 19, 2009, are
  * Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
  * distributed according to the same disclaimer and license as libpng-1.2.5
  * with the following individual added to the list of Contributing Authors:
@@ -368,7 +368,7 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    May 18, 2009
+ *    May 19, 2009
  *
  *    Since the PNG Development group is an ad-hoc body, we can't make
  *    an official declaration.
@@ -432,7 +432,7 @@
 /* Version information for png.h - this should match the version in png.c */
 #define PNG_LIBPNG_VER_STRING "1.2.37beta02"
 #define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.2.37beta02 - May 18, 2009\n"
+   " libpng version 1.2.37beta02 - May 19, 2009\n"
 
 #define PNG_LIBPNG_VER_SONUM   0
 #define PNG_LIBPNG_VER_DLLNUM  13
diff --git a/pngconf.h b/pngconf.h
index e6f3ed1..2b23f2f 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.2.37beta02 - May 15, 2009
+ * libpng version 1.2.37beta02 - May 19, 2009
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngpread.c b/pngpread.c
index 3c62dad..067eb63 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1,7 +1,7 @@
 
 /* pngpread.c - read a png file in push mode
  *
- * Last changed in libpng 1.2.37 [May 18, 2009]
+ * Last changed in libpng 1.2.37 [May 19, 2009]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngrutil.c b/pngrutil.c
index 060d3a6..1dc7317 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
 
 /* pngrutil.c - utilities to read a PNG file
  *
- * Last changed in libpng 1.2.37 [May 18, 2009]
+ * Last changed in libpng 1.2.37 [May 19, 2009]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)