[master]  Removed three direct references to read_info_ptr members

in pngtest.c that were detected by the new PNG_DEPSTRUCT macro.
diff --git a/ANNOUNCE b/ANNOUNCE
index b03fdaa..3de0a2a 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-Libpng 1.2.41beta15 - November 9, 2009
+Libpng 1.2.41beta16 - November 9, 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.
@@ -9,36 +9,36 @@
 Source files with LF line endings (for Unix/Linux) and with a
 "configure" script
 
-   libpng-1.2.41beta15.tar.xz (LZMA-compressed, recommended)
-   libpng-1.2.41beta15.tar.gz
-   libpng-1.2.41beta15.tar.bz2
+   libpng-1.2.41beta16.tar.xz (LZMA-compressed, recommended)
+   libpng-1.2.41beta16.tar.gz
+   libpng-1.2.41beta16.tar.bz2
 
 Source files with LF line endings (for Unix/Linux) without the
 "configure" script
 
-   libpng-1.2.41beta15-no-config.tar.xz (LZMA-compressed, recommended)
-   libpng-1.2.41beta15-no-config.tar.gz
-   libpng-1.2.41beta15-no-config.tar.bz2
+   libpng-1.2.41beta16-no-config.tar.xz (LZMA-compressed, recommended)
+   libpng-1.2.41beta16-no-config.tar.gz
+   libpng-1.2.41beta16-no-config.tar.bz2
 
 Source files with CRLF line endings (for Windows), without the
 "configure" script
 
-   lp1241b15.zip
-   lp1241b15.7z
-   lp1241b15.tar.bz2
+   lp1241b16.zip
+   lp1241b16.7z
+   lp1241b16.tar.bz2
 
 Project files
 
-   libpng-1.2.41beta15-project-netware.zip
-   libpng-1.2.41beta15-project-wince.zip
+   libpng-1.2.41beta16-project-netware.zip
+   libpng-1.2.41beta16-project-wince.zip
 
 Other information:
 
-   libpng-1.2.41beta15-README.txt
-   libpng-1.2.41beta15-KNOWNBUGS.txt
-   libpng-1.2.41beta15-LICENSE.txt
-   libpng-1.2.41beta15-Y2K-compliance.txt
-   libpng-1.2.41beta15-[previous version]-diff.txt
+   libpng-1.2.41beta16-README.txt
+   libpng-1.2.41beta16-KNOWNBUGS.txt
+   libpng-1.2.41beta16-LICENSE.txt
+   libpng-1.2.41beta16-Y2K-compliance.txt
+   libpng-1.2.41beta16-[previous version]-diff.txt
 
 Changes since the last public release (1.2.40):
 
@@ -127,7 +127,7 @@
   Retained png_calloc() from 1.2.41beta08 but as a non-exported function,
     and removed reference to png_calloc from scripts/*.def
 
-version 1.2.41beta15 [November 9, 2009]
+version 1.2.41beta15 [November 8, 2009]
   Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
     PNG_ALLOCATED macros to detect deprecated direct access to the
     png_struct or info_struct members and other deprecated usage in
@@ -137,10 +137,11 @@
     functions while building libpng.  They need to be tested, especially
     those using compilers other than gcc.
   Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
+
+version 1.2.41beta16 [November 9, 2009]
   Removed three direct references to read_info_ptr members in pngtest.c
     that were detected by the new PNG_DEPSTRUCT macro.
 
-
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 
 (subscription required; visit
diff --git a/CHANGES b/CHANGES
index 478d0ef..6e942a3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2558,7 +2558,7 @@
   Retained png_calloc() from 1.2.41beta08 but as a non-exported function,
     and removed reference to png_calloc from scripts/*.def
 
-version 1.2.41beta15 [November 9, 2009]
+version 1.2.41beta15 [November 8, 2009]
   Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
     PNG_ALLOCATED macros to detect deprecated direct access to the
     png_struct or info_struct members and other deprecated usage in
@@ -2568,6 +2568,8 @@
     functions while building libpng.  They need to be tested, especially
     those using compilers other than gcc.
   Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
+
+version 1.2.41beta16 [November 9, 2009]
   Removed three direct references to read_info_ptr members in pngtest.c
     that were detected by the new PNG_DEPSTRUCT macro.
 
diff --git a/pngtest.c b/pngtest.c
index 22b302d..87c9cc3 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1112,11 +1112,11 @@
       if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans,
          &trans_values))
       {
-         int sample_max = (1 << read_info_ptr->bit_depth);
+         int sample_max = (1 << bit_depth);
          /* libpng doesn't reject a tRNS chunk with out-of-range samples */
-         if (!((read_info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
+         if (!((color_type == PNG_COLOR_TYPE_GRAY &&
              (int)trans_values->gray > sample_max) ||
-             (read_info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
+             (color_type == PNG_COLOR_TYPE_RGB &&
              ((int)trans_values->red > sample_max ||
              (int)trans_values->green > sample_max ||
              (int)trans_values->blue > sample_max))))
@@ -1689,4 +1689,4 @@
 }
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_41beta15 your_png_h_is_not_version_1_2_41beta15;
+typedef version_1_2_41beta16 your_png_h_is_not_version_1_2_41beta16;