Em 07-02-2016 07:39, Wayne Blaszczyk escreveu:
> On Sun, 2016-02-07 at 21:10 +1100, Wayne Blaszczyk wrote:
>> On Sat, 2016-02-06 at 21:04 -0300, Fernando de Oliveira wrote:
>>> Em 06-02-2016 19:38, Ken Moffat escreveu:
>>>> On Sun, Feb 07, 2016 at 08:53:40AM +1100, Wayne Blaszczyk wrote:
>>>>> Hi,
>>>>>
>>>>> The patch command should have -p1 rather than -p0.
>>>>>
>>>>>
>>>>> Regards,
>>>>> Wayne.
>>>>
>>>> Hi Wayne,
>>>>
>>>> it's an upstream patch created in the top-level directory, it
>>>> won't
>>>> apply with -p1.
>>>>
>>>> ĸen
>>>>
>>>
>>> Thanks, ĸen.
>>>
>>> Sorry for the other post.
>>>
>>> Only now I have read yours.
>>>
>>> Thanks again.
>>>
> 
> 
> Actually, I've read the ticket. I still don't understand why there are
> two sources for this patch and why is one better than the other?
> I notice that Arch is still using http://downloads.sourceforge.net/libp
> ng-apng/libpng-1.6.21-apng.patch.gz .
> 
> 
> Wayne.
> 

Same as you, I don't understand.

Main differences are the use of p0 where we used p1, before, and the
availability of the new one almost simultaneously with libpng, while the
old one often delays, sometimes by almost one week.

One difference between them is to modify a License file, while the other
includes the same txt in another file png.h.

Other differences are different names for the same thing:

{{{
-      "libpng version 1.6.21 - January 15, 2016" PNG_STRING_NEWLINE \
+      "libpng version 1.6.21+apng - January 15, 2016" PNG_STRING_NEWLINE \
}}}

and the form of the code used to do the same thing:

{{{
-        (info_ptr->valid & PNG_INFO_fcTL) &&
+        (info_ptr->valid & PNG_INFO_fcTL) != 0 &&
}}}

Attaching the diff between the *codes* (not the patches) generated by
individually applying the one and the other.

-- 
[]s,
Fernando, aka Sísifo
diff -Naur libpng-1.6.21.old/LICENSE libpng-1.6.21.new/LICENSE
--- libpng-1.6.21.old/LICENSE	2016-01-15 12:52:12.000000000 -0300
+++ libpng-1.6.21.new/LICENSE	2016-02-07 08:21:29.270369749 -0300
@@ -8,6 +8,12 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
+This modified version of libpng code adds animated PNG support and is
+released under the libpng license described below. The modifications are
+Copyright (c) 2006-2007 Andrew Smith, Copyright (c) 2008-2015 Max Stepin,
+and are delimited by "#ifdef PNG_APNG_SUPPORTED / #endif" directives
+surrounding them in the modified libpng source files.
+
 This code is released under the libpng license.
 
 libpng versions 1.0.7, July 1, 2000, through 1.6.21, January 15, 2016, are
diff -Naur libpng-1.6.21.old/png.c libpng-1.6.21.new/png.c
--- libpng-1.6.21.old/png.c	2016-01-15 12:52:12.000000000 -0300
+++ libpng-1.6.21.new/png.c	2016-02-07 08:21:29.274369659 -0300
@@ -775,17 +775,21 @@
 #else
 #  ifdef __STDC__
    return PNG_STRING_NEWLINE \
-      "libpng version 1.6.21 - January 15, 2016" PNG_STRING_NEWLINE \
+      "libpng version 1.6.21+apng - January 15, 2016" PNG_STRING_NEWLINE \
       "Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson" \
       PNG_STRING_NEWLINE \
       "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
       "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
-      PNG_STRING_NEWLINE;
+      PNG_STRING_NEWLINE \
+      "Portions Copyright (c) 2006-2007 Andrew Smith" PNG_STRING_NEWLINE \
+      "Portions Copyright (c) 2008-2015 Max Stepin" PNG_STRING_NEWLINE ;
 #  else
-   return "libpng version 1.6.21 - January 15, 2016\
+   return "libpng version 1.6.21+apng - January 15, 2016\
       Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson\
       Copyright (c) 1996-1997 Andreas Dilger\
-      Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
+      Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\
+      Portions Copyright (c) 2006-2007 Andrew Smith\
+      Portions Copyright (c) 2008-2015 Max Stepin";
 #  endif
 #endif
 }
diff -Naur libpng-1.6.21.old/pngget.c libpng-1.6.21.new/pngget.c
--- libpng-1.6.21.old/pngget.c	2016-02-07 08:21:48.494938488 -0300
+++ libpng-1.6.21.new/pngget.c	2016-02-07 08:21:29.272369704 -0300
@@ -1224,7 +1224,7 @@
     png_debug1(1, "in %s retrieval function", "acTL");
 
     if (png_ptr != NULL && info_ptr != NULL &&
-        (info_ptr->valid & PNG_INFO_acTL) &&
+        (info_ptr->valid & PNG_INFO_acTL) != 0 &&
         num_frames != NULL && num_plays != NULL)
     {
         *num_frames = info_ptr->num_frames;
@@ -1265,7 +1265,7 @@
     png_debug1(1, "in %s retrieval function", "fcTL");
 
     if (png_ptr != NULL && info_ptr != NULL &&
-        (info_ptr->valid & PNG_INFO_fcTL) &&
+        (info_ptr->valid & PNG_INFO_fcTL) != 0 &&
         width != NULL && height != NULL &&
         x_offset != NULL && y_offset != NULL &&
         delay_num != NULL && delay_den != NULL &&
@@ -1377,5 +1377,5 @@
 
     return 0;
 }
-#endif /* PNG_APNG_SUPPORTED */
+#endif /* APNG */
 #endif /* READ || WRITE */
diff -Naur libpng-1.6.21.old/png.h libpng-1.6.21.new/png.h
--- libpng-1.6.21.old/png.h	2016-02-07 08:21:48.493938511 -0300
+++ libpng-1.6.21.new/png.h	2016-02-07 08:21:29.275369637 -0300
@@ -23,6 +23,12 @@
  * If you modify libpng you may insert additional notices immediately following
  * this sentence.
  *
+ * This modified version of libpng code adds animated PNG support and is
+ * released under the libpng license described below. The modifications are
+ * Copyright (c) 2006-2007 Andrew Smith, Copyright (c) 2008-2015 Max Stepin,
+ * and are delimited by "#ifdef PNG_APNG_SUPPORTED / #endif" directives
+ * surrounding them in the modified libpng source files.
+ *
  * This code is released under the libpng license.
  *
  * libpng versions 1.0.7, July 1, 2000, through 1.6.21, January 15, 2016, are
@@ -282,9 +288,9 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.21"
+#define PNG_LIBPNG_VER_STRING "1.6.21+apng"
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.6.21 - January 15, 2016\n"
+     " libpng version 1.6.21+apng - January 15, 2016\n"
 
 #define PNG_LIBPNG_VER_SONUM   16
 #define PNG_LIBPNG_VER_DLLNUM  16
@@ -443,7 +449,7 @@
 /* blend_op flags from inside fcTL */
 #define PNG_BLEND_OP_SOURCE        0x00
 #define PNG_BLEND_OP_OVER          0x01
-#endif /* PNG_APNG_SUPPORTED */
+#endif /* APNG */
 
 /* This triggers a compiler error in png.c, if png.c and png.h
  * do not agree upon the version number.
@@ -766,11 +772,11 @@
 #define PNG_INFO_sCAL 0x4000   /* ESR, 1.0.6 */
 #if INT_MAX >= 0x8000 /* else this might break */
 #define PNG_INFO_IDAT 0x8000   /* ESR, 1.0.6 */
+#endif
 #ifdef PNG_APNG_SUPPORTED
 #define PNG_INFO_acTL 0x10000
 #define PNG_INFO_fcTL 0x20000
 #endif
-#endif
 
 /* This is used for the transformation routines, as some of them
  * change these values for the row.  It also should enable using
@@ -3132,6 +3138,7 @@
 /*******************************************************************************
  *  END OF HARDWARE AND SOFTWARE OPTIONS
  ******************************************************************************/
+
 #ifdef PNG_APNG_SUPPORTED
 PNG_EXPORT(245, png_uint_32, png_get_acTL, (png_structp png_ptr,
    png_infop info_ptr, png_uint_32 *num_frames, png_uint_32 *num_plays));
@@ -3185,8 +3192,8 @@
 PNG_EXPORT(262, void, png_set_progressive_frame_fn, (png_structp png_ptr,
    png_progressive_frame_ptr frame_info_fn,
    png_progressive_frame_ptr frame_end_fn));
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-#endif /* PNG_READ_APNG_SUPPORTED */
+#endif /* PROGRESSIVE_READ */
+#endif /* READ_APNG */
 
 #ifdef PNG_WRITE_APNG_SUPPORTED
 PNG_EXPORT(263, void, png_write_frame_head, (png_structp png_ptr,
@@ -3198,8 +3205,8 @@
 
 PNG_EXPORT(264, void, png_write_frame_tail, (png_structp png_ptr,
    png_infop info_ptr));
-#endif /* PNG_WRITE_APNG_SUPPORTED */
-#endif /* PNG_APNG_SUPPORTED */
+#endif /* WRITE_APNG */
+#endif /* APNG */
 
 /* Maintainer: Put new public prototypes here ^, in libpng.3, in project
  * defs, and in scripts/symbols.def.
@@ -3213,7 +3220,7 @@
   PNG_EXPORT_LAST_ORDINAL(264);
 #else
   PNG_EXPORT_LAST_ORDINAL(244);
-#endif /* PNG_APNG_SUPPORTED */
+#endif /* APNG */
 #endif
 
 #ifdef __cplusplus
diff -Naur libpng-1.6.21.old/pngpread.c libpng-1.6.21.new/pngpread.c
--- libpng-1.6.21.old/pngpread.c	2016-02-07 08:21:48.495938466 -0300
+++ libpng-1.6.21.new/pngpread.c	2016-02-07 08:21:29.277369592 -0300
@@ -201,42 +201,29 @@
       if (chunk_name == png_IDAT)
       {
          /* Discard trailing IDATs for the first frame */
-         if (png_ptr->mode & PNG_HAVE_fcTL || png_ptr->num_frames_read > 1)
+         if ((png_ptr->mode & PNG_HAVE_fcTL) != 0 ||
+             png_ptr->num_frames_read > 1)
             png_error(png_ptr, "out of place IDAT");
 
-         if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-         {
-            png_push_save_buffer(png_ptr);
-            return;
-         }
-
+         PNG_PUSH_SAVE_BUFFER_IF_FULL
+         png_crc_finish(png_ptr, png_ptr->push_length);
          png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-         return;
       }
+
       else if (chunk_name == png_fdAT)
       {
-         if (png_ptr->buffer_size < 4)
-         {
-            png_push_save_buffer(png_ptr);
-            return;
-         }
-
+         PNG_PUSH_SAVE_BUFFER_IF_LT(4)
          png_ensure_sequence_number(png_ptr, 4);
 
-         if (!(png_ptr->mode & PNG_HAVE_fcTL))
+         if ((png_ptr->mode & PNG_HAVE_fcTL) == 0)
          {
             /* Discard trailing fdATs for frames other than the first */
             if (png_ptr->num_frames_read < 2)
                png_error(png_ptr, "out of place fdAT");
 
-            if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-            {
-               png_push_save_buffer(png_ptr);
-               return;
-            }
-
+            PNG_PUSH_SAVE_BUFFER_IF_FULL
+            png_crc_finish(png_ptr, png_ptr->push_length);
             png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-            return;
          }
 
          else
@@ -245,25 +232,18 @@
             png_ptr->idat_size = png_ptr->push_length - 4;
             png_ptr->mode |= PNG_HAVE_IDAT;
             png_ptr->process_mode = PNG_READ_IDAT_MODE;
-
-            return;
          }
       }
 
       else if (chunk_name == png_fcTL)
       {
-         if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-         {
-            png_push_save_buffer(png_ptr);
-            return;
-         }
-
+         PNG_PUSH_SAVE_BUFFER_IF_FULL
          png_read_reset(png_ptr);
          png_ptr->mode &= ~PNG_HAVE_fcTL;
 
          png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length);
 
-         if (!(png_ptr->mode & PNG_HAVE_fcTL))
+         if ((png_ptr->mode & PNG_HAVE_fcTL) == 0)
             png_error(png_ptr, "missing required fcTL chunk");
 
          png_read_reinit(png_ptr, info_ptr);
@@ -273,26 +253,29 @@
             (*(png_ptr->frame_info_fn))(png_ptr, png_ptr->num_frames_read);
 
          png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
+      }
 
-         return;
+      else if (chunk_name == png_IEND)
+      {
+         PNG_PUSH_SAVE_BUFFER_IF_FULL
+         png_warning(png_ptr, "Number of actual frames fewer than expected");
+         png_crc_finish(png_ptr, png_ptr->push_length);
+         png_ptr->process_mode = PNG_READ_DONE_MODE;
+         png_push_have_end(png_ptr, info_ptr);
       }
 
       else
       {
-         if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-         {
-            png_push_save_buffer(png_ptr);
-            return;
-         }
+         PNG_PUSH_SAVE_BUFFER_IF_FULL
          png_warning(png_ptr, "Skipped (ignored) a chunk "
                               "between APNG chunks");
+         png_crc_finish(png_ptr, png_ptr->push_length);
          png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-         return;
       }
 
       return;
    }
-#endif /* PNG_READ_APNG_SUPPORTED */
+#endif /* READ_APNG */
 
    if (chunk_name == png_IDAT)
    {
@@ -506,31 +489,21 @@
       png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);
    }
 #endif
+
 #ifdef PNG_READ_APNG_SUPPORTED
    else if (chunk_name == png_acTL)
    {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
+      PNG_PUSH_SAVE_BUFFER_IF_FULL
       png_handle_acTL(png_ptr, info_ptr, png_ptr->push_length);
    }
 
    else if (chunk_name == png_fcTL)
    {
-      if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-      {
-         png_push_save_buffer(png_ptr);
-         return;
-      }
-
+      PNG_PUSH_SAVE_BUFFER_IF_FULL
       png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length);
    }
 
-#endif /* PNG_READ_APNG_SUPPORTED */
-
+#endif /* READ_APNG */
    else
    {
       PNG_PUSH_SAVE_BUFFER_IF_FULL
@@ -675,7 +648,7 @@
 #ifdef PNG_READ_APNG_SUPPORTED
       if (png_ptr->chunk_name != png_fdAT && png_ptr->num_frames_read > 0)
       {
-          if (png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)
+          if ((png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED) != 0)
           {
               png_ptr->process_mode = PNG_READ_CHUNK_MODE;
               if (png_ptr->frame_end_fn != NULL)
@@ -687,11 +660,7 @@
           {
               if (png_ptr->chunk_name == png_IEND)
                   png_error(png_ptr, "Not enough image data");
-              if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-              {
-                 png_push_save_buffer(png_ptr);
-                 return;
-              }
+              PNG_PUSH_SAVE_BUFFER_IF_FULL
               png_warning(png_ptr, "Skipping (ignoring) a chunk between "
                                    "APNG chunks");
               png_crc_finish(png_ptr, png_ptr->push_length);
@@ -805,10 +774,11 @@
 
 #ifdef PNG_READ_APNG_SUPPORTED
    /* If the app is not APNG-aware, decode only the first frame */
-   if (!(png_ptr->apng_flags & PNG_APNG_APP) && png_ptr->num_frames_read > 0)
+   if ((png_ptr->apng_flags & PNG_APNG_APP) == 0 &&
+      png_ptr->num_frames_read > 0)
    {
-     png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED;
-     return;
+      png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED;
+      return;
    }
 #endif
 
diff -Naur libpng-1.6.21.old/pngpriv.h libpng-1.6.21.new/pngpriv.h
--- libpng-1.6.21.old/pngpriv.h	2016-02-07 08:21:48.495938466 -0300
+++ libpng-1.6.21.new/pngpriv.h	2016-02-07 08:21:29.276369615 -0300
@@ -1455,50 +1455,32 @@
 
 #endif /* PROGRESSIVE_READ */
 
-/* Added at libpng version 1.6.0 */
-#ifdef PNG_GAMMA_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_colorspace_set_gamma,(png_const_structrp png_ptr,
-    png_colorspacerp colorspace, png_fixed_point gAMA), PNG_EMPTY);
-   /* Set the colorspace gamma with a value provided by the application or by
-    * the gAMA chunk on read.  The value will override anything set by an ICC
-    * profile.
-    */
-
-PNG_INTERNAL_FUNCTION(void,png_colorspace_sync_info,(png_const_structrp png_ptr,
-    png_inforp info_ptr), PNG_EMPTY);
-    /* Synchronize the info 'valid' flags with the colorspace */
-
-PNG_INTERNAL_FUNCTION(void,png_colorspace_sync,(png_const_structrp png_ptr,
-    png_inforp info_ptr), PNG_EMPTY);
-    /* Copy the png_struct colorspace to the info_struct and call the above to
-     * synchronize the flags.  Checks for NULL info_ptr and does nothing.
-     */
-#endif
-
 #ifdef PNG_APNG_SUPPORTED
 PNG_INTERNAL_FUNCTION(void,png_ensure_fcTL_is_valid,(png_structp png_ptr,
    png_uint_32 width, png_uint_32 height,
    png_uint_32 x_offset, png_uint_32 y_offset,
    png_uint_16 delay_num, png_uint_16 delay_den,
-   png_byte dispose_op, png_byte blend_op), PNG_EMPTY);
+   png_byte dispose_op, png_byte blend_op),PNG_EMPTY);
 
 #ifdef PNG_READ_APNG_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_handle_acTL,(png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_handle_fcTL,(png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_handle_fdAT,(png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length),PNG_EMPTY);
-PNG_INTERNAL_FUNCTION(void,png_have_info,(png_structp png_ptr, png_infop info_ptr),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_handle_acTL,(png_structp png_ptr,
+   png_infop info_ptr, png_uint_32 length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_handle_fcTL,(png_structp png_ptr,
+   png_infop info_ptr, png_uint_32 length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_handle_fdAT,(png_structp png_ptr,
+   png_infop info_ptr, png_uint_32 length),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_have_info,(png_structp png_ptr,
+   png_infop info_ptr),PNG_EMPTY);
 PNG_INTERNAL_FUNCTION(void,png_ensure_sequence_number,(png_structp png_ptr,
    png_uint_32 length),PNG_EMPTY);
 PNG_INTERNAL_FUNCTION(void,png_read_reset,(png_structp png_ptr),PNG_EMPTY);
 PNG_INTERNAL_FUNCTION(void,png_read_reinit,(png_structp png_ptr,
    png_infop info_ptr),PNG_EMPTY);
 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_INTERNAL_FUNCTION(void,png_progressive_read_reset,(png_structp png_ptr),PNG_EMPTY);
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-#endif /* PNG_READ_APNG_SUPPORTED */
+PNG_INTERNAL_FUNCTION(void,png_progressive_read_reset,(png_structp png_ptr),
+   PNG_EMPTY);
+#endif /* PROGRESSIVE_READ */
+#endif /* READ_APNG */
 
 #ifdef PNG_WRITE_APNG_SUPPORTED
 PNG_INTERNAL_FUNCTION(void,png_write_acTL,(png_structp png_ptr,
@@ -1513,8 +1495,28 @@
 PNG_INTERNAL_FUNCTION(void,png_write_reset,(png_structp png_ptr),PNG_EMPTY);
 PNG_INTERNAL_FUNCTION(void,png_write_reinit,(png_structp png_ptr,
    png_infop info_ptr, png_uint_32 width, png_uint_32 height),PNG_EMPTY);
-#endif /* PNG_WRITE_APNG_SUPPORTED */
-#endif /* PNG_APNG_SUPPORTED */
+#endif /* WRITE_APNG */
+#endif /* APNG */
+
+/* Added at libpng version 1.6.0 */
+#ifdef PNG_GAMMA_SUPPORTED
+PNG_INTERNAL_FUNCTION(void,png_colorspace_set_gamma,(png_const_structrp png_ptr,
+    png_colorspacerp colorspace, png_fixed_point gAMA), PNG_EMPTY);
+   /* Set the colorspace gamma with a value provided by the application or by
+    * the gAMA chunk on read.  The value will override anything set by an ICC
+    * profile.
+    */
+
+PNG_INTERNAL_FUNCTION(void,png_colorspace_sync_info,(png_const_structrp png_ptr,
+    png_inforp info_ptr), PNG_EMPTY);
+    /* Synchronize the info 'valid' flags with the colorspace */
+
+PNG_INTERNAL_FUNCTION(void,png_colorspace_sync,(png_const_structrp png_ptr,
+    png_inforp info_ptr), PNG_EMPTY);
+    /* Copy the png_struct colorspace to the info_struct and call the above to
+     * synchronize the flags.  Checks for NULL info_ptr and does nothing.
+     */
+#endif
 
 /* Added at libpng version 1.4.0 */
 #ifdef PNG_COLORSPACE_SUPPORTED
diff -Naur libpng-1.6.21.old/pngread.c libpng-1.6.21.new/pngread.c
--- libpng-1.6.21.old/pngread.c	2016-02-07 08:21:48.496938443 -0300
+++ libpng-1.6.21.new/pngread.c	2016-02-07 08:21:29.271369727 -0300
@@ -276,7 +276,7 @@
 
     png_debug(0, "Reading frame head");
 
-    if (!(png_ptr->mode & PNG_HAVE_acTL))
+    if ((png_ptr->mode & PNG_HAVE_acTL) == 0)
         png_error(png_ptr, "attempt to png_read_frame_head() but "
                            "no acTL present");
 
@@ -296,7 +296,7 @@
         if (png_ptr->chunk_name == png_IDAT)
         {
             /* discard trailing IDATs for the first frame */
-            if (have_chunk_after_DAT || png_ptr->num_frames_read > 1)
+            if (have_chunk_after_DAT != 0 || png_ptr->num_frames_read > 1)
                 png_error(png_ptr, "png_read_frame_head(): out of place IDAT");
             png_crc_finish(png_ptr, length);
         }
@@ -312,7 +312,7 @@
             png_ensure_sequence_number(png_ptr, length);
 
             /* discard trailing fdATs for frames other than the first */
-            if (!have_chunk_after_DAT && png_ptr->num_frames_read > 1)
+            if (have_chunk_after_DAT == 0 && png_ptr->num_frames_read > 1)
                 png_crc_finish(png_ptr, length - 4);
             else if(png_ptr->mode & PNG_HAVE_fcTL)
             {
@@ -332,7 +332,7 @@
         }
     }
 }
-#endif /* PNG_READ_APNG_SUPPORTED */
+#endif /* READ_APNG */
 
 /* Optional call to update the users info_ptr structure */
 void PNGAPI
diff -Naur libpng-1.6.21.old/pngrutil.c libpng-1.6.21.new/pngrutil.c
--- libpng-1.6.21.old/pngrutil.c	2016-02-07 08:21:48.497938421 -0300
+++ libpng-1.6.21.new/pngrutil.c	2016-02-07 08:21:29.278369570 -0300
@@ -2771,17 +2771,17 @@
 
     png_debug(1, "in png_handle_acTL");
 
-    if (!(png_ptr->mode & PNG_HAVE_IHDR))
+    if ((png_ptr->mode & PNG_HAVE_IHDR) == 0)
     {
         png_error(png_ptr, "Missing IHDR before acTL");
     }
-    else if (png_ptr->mode & PNG_HAVE_IDAT)
+    else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0)
     {
         png_warning(png_ptr, "Invalid acTL after IDAT skipped");
         png_crc_finish(png_ptr, length);
         return;
     }
-    else if (png_ptr->mode & PNG_HAVE_acTL)
+    else if ((png_ptr->mode & PNG_HAVE_acTL) != 0)
     {
         png_warning(png_ptr, "Duplicate acTL skipped");
         png_crc_finish(png_ptr, length);
@@ -2802,7 +2802,7 @@
 
     /* the set function will do error checking on num_frames */
     didSet = png_set_acTL(png_ptr, info_ptr, num_frames, num_plays);
-    if(didSet)
+    if (didSet != 0)
         png_ptr->mode |= PNG_HAVE_acTL;
 }
 
@@ -2823,11 +2823,11 @@
 
     png_ensure_sequence_number(png_ptr, length);
 
-    if (!(png_ptr->mode & PNG_HAVE_IHDR))
+    if ((png_ptr->mode & PNG_HAVE_IHDR) == 0)
     {
         png_error(png_ptr, "Missing IHDR before fcTL");
     }
-    else if (png_ptr->mode & PNG_HAVE_IDAT)
+    else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0)
     {
         /* for any frames other then the first this message may be misleading,
         * but correct. PNG_HAVE_IDAT is unset before the frame head is read
@@ -2836,7 +2836,7 @@
         png_crc_finish(png_ptr, length-4);
         return;
     }
-    else if (png_ptr->mode & PNG_HAVE_fcTL)
+    else if ((png_ptr->mode & PNG_HAVE_fcTL) != 0)
     {
         png_warning(png_ptr, "Duplicate fcTL within one frame skipped");
         png_crc_finish(png_ptr, length-4);
@@ -2891,7 +2891,8 @@
 void /* PRIVATE */
 png_have_info(png_structp png_ptr, png_infop info_ptr)
 {
-    if((info_ptr->valid & PNG_INFO_acTL) && !(info_ptr->valid & PNG_INFO_fcTL))
+    if ((info_ptr->valid & PNG_INFO_acTL) != 0 &&
+        (info_ptr->valid & PNG_INFO_fcTL) == 0)
     {
         png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN;
         info_ptr->num_frames++;
@@ -2931,7 +2932,7 @@
 
     png_ptr->next_seq_num++;
 }
-#endif /* PNG_READ_APNG_SUPPORTED */
+#endif /* READ_APNG */
 
 #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
 /* Utility function for png_handle_unknown; set up png_ptr::unknown_chunk */
@@ -4191,6 +4192,7 @@
       {
          uInt avail_in;
          png_bytep buffer;
+
 #ifdef PNG_READ_APNG_SUPPORTED
          png_uint_32 bytes_to_skip = 0;
 
@@ -4234,7 +4236,8 @@
             if (png_ptr->chunk_name != png_IDAT)
                png_error(png_ptr, "Not enough image data");
          }
-#endif /* PNG_READ_APNG_SUPPORTED */
+#endif /* READ_APNG */
+
          avail_in = png_ptr->IDAT_read_size;
 
          if (avail_in > png_ptr->idat_size)
@@ -4760,7 +4763,7 @@
     png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width);
     png_ptr->info_rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth,
         png_ptr->width);
-    if (png_ptr->prev_row)
+    if (png_ptr->prev_row != NULL)
         memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
 }
 
@@ -4770,23 +4773,23 @@
 png_progressive_read_reset(png_structp png_ptr)
 {
 #ifdef PNG_READ_INTERLACING_SUPPORTED
-   /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
+    /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
 
-   /* Start of interlace block */
-    const int png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
+    /* Start of interlace block */
+    static PNG_CONST png_byte png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
 
     /* Offset to next interlace block */
-    const int png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
+    static PNG_CONST png_byte png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
 
     /* Start of interlace block in the y direction */
-    const int png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
+    static PNG_CONST png_byte png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
 
     /* Offset to next interlace block in the y direction */
-    const int png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
+    static PNG_CONST png_byte png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
 
-    if (png_ptr->interlaced)
+    if (png_ptr->interlaced != 0)
     {
-        if (!(png_ptr->transformations & PNG_INTERLACE))
+        if ((png_ptr->transformations & PNG_INTERLACE) == 0)
             png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
                                 png_pass_ystart[0]) / png_pass_yinc[0];
         else
@@ -4798,7 +4801,7 @@
                            png_pass_inc[png_ptr->pass];
     }
     else
-#endif /* PNG_READ_INTERLACING_SUPPORTED */
+#endif /* READ_INTERLACING */
     {
         png_ptr->num_rows = png_ptr->height;
         png_ptr->iwidth = png_ptr->width;
@@ -4812,6 +4815,6 @@
     png_ptr->zstream.avail_out = (uInt)PNG_ROWBYTES(png_ptr->pixel_depth,
         png_ptr->iwidth) + 1;
 }
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-#endif /* PNG_READ_APNG_SUPPORTED */
+#endif /* PROGRESSIVE_READ */
+#endif /* READ_APNG */
 #endif /* READ */
diff -Naur libpng-1.6.21.old/pngset.c libpng-1.6.21.new/pngset.c
--- libpng-1.6.21.old/pngset.c	2016-02-07 08:21:48.497938421 -0300
+++ libpng-1.6.21.new/pngset.c	2016-02-07 08:21:29.278369570 -0300
@@ -1128,8 +1128,7 @@
     if (num_plays > PNG_UINT_31_MAX)
     {
         png_warning(png_ptr,
-                    "Ignoring attempt to set acTL with num_plays "
-                    "> 2^31-1");
+                    "Ignoring attempt to set acTL with num_plays > 2^31-1");
         return (0);
     }
 
@@ -1164,8 +1163,8 @@
 
     if (blend_op == PNG_BLEND_OP_OVER)
     {
-        if (!(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) &&
-            !(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
+        if ((png_ptr->color_type & PNG_COLOR_MASK_ALPHA) == 0 &&
+            png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) == 0)
         {
           png_warning(png_ptr, "PNG_BLEND_OP_OVER is meaningless "
                                "and wasteful for opaque images, ignored");
@@ -1204,7 +1203,7 @@
         png_error(png_ptr, "invalid y_offset in fcTL (> 2^31-1)");
     if (width + x_offset > png_ptr->first_frame_width ||
         height + y_offset > png_ptr->first_frame_height)
-        png_error(png_ptr, "dimensions of a frame are greater than"
+        png_error(png_ptr, "dimensions of a frame are greater than "
                            "the ones in IHDR");
 
     if (dispose_op != PNG_DISPOSE_OP_NONE &&
@@ -1229,7 +1228,7 @@
     if (png_ptr == NULL)
         return 0;
 
-    if (is_hidden)
+    if (is_hidden != 0)
         png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN;
     else
         png_ptr->apng_flags &= ~PNG_FIRST_FRAME_HIDDEN;
@@ -1238,7 +1237,7 @@
 
     return 1;
 }
-#endif /* PNG_APNG_SUPPORTED */
+#endif /* APNG */
 
 #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
 static png_byte
diff -Naur libpng-1.6.21.old/pngstruct.h libpng-1.6.21.new/pngstruct.h
--- libpng-1.6.21.old/pngstruct.h	2016-02-07 08:21:48.497938421 -0300
+++ libpng-1.6.21.new/pngstruct.h	2016-02-07 08:21:29.277369592 -0300
@@ -422,7 +422,7 @@
    png_uint_32 num_frames_to_write;
    png_uint_32 num_frames_written;
 #endif
-#endif /* PNG_APNG_SUPPORTED */
+#endif /* APNG */
 
 /* New members added in libpng-1.2.0 */
 
diff -Naur libpng-1.6.21.old/pngtest.c libpng-1.6.21.new/pngtest.c
--- libpng-1.6.21.old/pngtest.c	2016-02-07 08:21:48.498938398 -0300
+++ libpng-1.6.21.new/pngtest.c	2016-01-15 12:52:12.000000000 -0300
@@ -874,10 +874,6 @@
    volatile int num_passes;
    int pass;
    int bit_depth, color_type;
-#ifdef PNG_APNG_SUPPORTED
-   png_uint_32 num_frames;
-   png_uint_32 num_plays;
-#endif
 
    row_buf = NULL;
    error_parameters.file_name = inname;
@@ -1351,22 +1347,6 @@
       }
    }
 #endif
-
-#ifdef PNG_APNG_SUPPORTED
-   if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL))
-   {
-      if (png_get_acTL(read_ptr, read_info_ptr, &num_frames, &num_plays))
-      {
-         png_byte is_hidden;
-         pngtest_debug2("Handling acTL chunks (frames %ld, plays %ld)",
-                    num_frames, num_plays);
-         png_set_acTL(write_ptr, write_info_ptr, num_frames, num_plays);
-         is_hidden = png_get_first_frame_is_hidden(read_ptr, read_info_ptr);
-         png_set_first_frame_is_hidden(write_ptr, write_info_ptr, is_hidden);
-      }
-   }
-#endif
-
 #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
    {
       png_unknown_chunkp unknowns;
@@ -1438,110 +1418,6 @@
    t_misc += (t_stop - t_start);
    t_start = t_stop;
 #endif
-#ifdef PNG_APNG_SUPPORTED
-   if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL))
-   {
-      png_uint_32 frame;
-      for (frame = 0; frame < num_frames; frame++)
-      {
-         png_uint_32 frame_width;
-         png_uint_32 frame_height;
-         png_uint_32 x_offset;
-         png_uint_32 y_offset;
-         png_uint_16 delay_num;
-         png_uint_16 delay_den;
-         png_byte dispose_op;
-         png_byte blend_op;
-         png_read_frame_head(read_ptr, read_info_ptr);
-         if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_fcTL))
-         {
-            png_get_next_frame_fcTL(read_ptr, read_info_ptr,
-                                    &frame_width, &frame_height,
-                                    &x_offset, &y_offset,
-                                    &delay_num, &delay_den,
-                                    &dispose_op, &blend_op);
-         }
-         else
-         {
-            frame_width = width;
-            frame_height = height;
-            x_offset = 0;
-            y_offset = 0;
-            delay_num = 1;
-            delay_den = 1;
-            dispose_op = PNG_DISPOSE_OP_NONE;
-            blend_op = PNG_BLEND_OP_SOURCE;
-         }
-#ifdef PNG_WRITE_APNG_SUPPORTED
-         png_write_frame_head(write_ptr, write_info_ptr, (png_bytepp)&row_buf,
-                              frame_width, frame_height,
-                              x_offset, y_offset,
-                              delay_num, delay_den,
-                              dispose_op, blend_op);
-#endif
-         for (pass = 0; pass < num_passes; pass++)
-         {
-#           ifdef calc_pass_height
-               png_uint_32 pass_height;
-
-               if (num_passes == 7) /* interlaced */
-               {
-                  if (PNG_PASS_COLS(frame_width, pass) > 0)
-                     pass_height = PNG_PASS_ROWS(frame_height, pass);
-
-                  else
-                     pass_height = 0;
-               }
-
-               else /* not interlaced */
-                  pass_height = frame_height;
-#           else
-#              define pass_height frame_height
-#           endif
-
-            pngtest_debug1("Writing row data for pass %d", pass);
-            for (y = 0; y < pass_height; y++)
-            {
-#ifndef SINGLE_ROWBUF_ALLOC
-               pngtest_debug2("Allocating row buffer (pass %d, y = %u)...", pass, y);
-
-               row_buf = (png_bytep)png_malloc(read_ptr,
-                  png_get_rowbytes(read_ptr, read_info_ptr));
-
-               pngtest_debug2("\t0x%08lx (%lu bytes)", (unsigned long)row_buf,
-                  (unsigned long)png_get_rowbytes(read_ptr, read_info_ptr));
-
-#endif /* !SINGLE_ROWBUF_ALLOC */
-               png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1);
-
-#ifdef PNG_WRITE_SUPPORTED
-#ifdef PNGTEST_TIMING
-               t_stop = (float)clock();
-               t_decode += (t_stop - t_start);
-               t_start = t_stop;
-#endif
-               png_write_rows(write_ptr, (png_bytepp)&row_buf, 1);
-#ifdef PNGTEST_TIMING
-               t_stop = (float)clock();
-               t_encode += (t_stop - t_start);
-               t_start = t_stop;
-#endif
-#endif /* PNG_WRITE_SUPPORTED */
-
-#ifndef SINGLE_ROWBUF_ALLOC
-               pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y);
-               png_free(read_ptr, row_buf);
-               row_buf = NULL;
-#endif /* !SINGLE_ROWBUF_ALLOC */
-            }
-         }
-#ifdef PNG_WRITE_APNG_SUPPORTED
-         png_write_frame_tail(write_ptr, write_info_ptr);
-#endif
-      }
-   }
-   else
-#endif
    for (pass = 0; pass < num_passes; pass++)
    {
 #     ifdef calc_pass_height
diff -Naur libpng-1.6.21.old/pngwrite.c libpng-1.6.21.new/pngwrite.c
--- libpng-1.6.21.old/pngwrite.c	2016-02-07 08:21:48.498938398 -0300
+++ libpng-1.6.21.new/pngwrite.c	2016-02-07 08:21:29.277369592 -0300
@@ -129,8 +129,8 @@
        * flag here too.
        */
 #ifdef PNG_WRITE_APNG_SUPPORTED
-      if (info_ptr->valid & PNG_INFO_acTL)
-         png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays);
+   if ((info_ptr->valid & PNG_INFO_acTL) != 0)
+      png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays);
 #endif
 #ifdef PNG_GAMMA_SUPPORTED
 #  ifdef PNG_WRITE_gAMA_SUPPORTED
@@ -364,16 +364,16 @@
    if ((png_ptr->mode & PNG_HAVE_IDAT) == 0)
       png_error(png_ptr, "No IDATs written into file");
 
-#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
-   if (png_ptr->num_palette_max > png_ptr->num_palette)
-      png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
-#endif
-
 #ifdef PNG_WRITE_APNG_SUPPORTED
    if (png_ptr->num_frames_written != png_ptr->num_frames_to_write)
       png_error(png_ptr, "Not enough frames written");
 #endif
 
+#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
+   if (png_ptr->num_palette_max > png_ptr->num_palette)
+      png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
+#endif
+
    /* See if user wants us to write information chunks */
    if (info_ptr != NULL)
    {
@@ -1459,43 +1459,6 @@
 }
 #endif
 
-#ifdef PNG_WRITE_APNG_SUPPORTED
-void PNGAPI
-png_write_frame_head(png_structp png_ptr, png_infop info_ptr,
-    png_bytepp row_pointers, png_uint_32 width, png_uint_32 height,
-    png_uint_32 x_offset, png_uint_32 y_offset,
-    png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-    png_byte blend_op)
-{
-    png_debug(1, "in png_write_frame_head");
-
-    /* there is a chance this has been set after png_write_info was called,
-    * so it would be set but not written. is there a way to be sure? */
-    if (!(info_ptr->valid & PNG_INFO_acTL))
-        png_error(png_ptr, "png_write_frame_head(): acTL not set");
-
-    png_write_reset(png_ptr);
-
-    png_write_reinit(png_ptr, info_ptr, width, height);
-
-    if ( !(png_ptr->num_frames_written == 0 &&
-           (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) ) )
-        png_write_fcTL(png_ptr, width, height, x_offset, y_offset,
-                       delay_num, delay_den, dispose_op, blend_op);
-
-    PNG_UNUSED(row_pointers)
-}
-
-void PNGAPI
-png_write_frame_tail(png_structp png_ptr, png_infop info_ptr)
-{
-    png_debug(1, "in png_write_frame_tail");
-
-    png_ptr->num_frames_written++;
-
-    PNG_UNUSED(info_ptr)
-}
-#endif /* PNG_WRITE_APNG_SUPPORTED */
 
 #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
 # ifdef PNG_STDIO_SUPPORTED /* currently required for png_image_write_* */
@@ -2273,4 +2236,42 @@
 }
 # endif /* STDIO */
 #endif /* SIMPLIFIED_WRITE */
+
+#ifdef PNG_WRITE_APNG_SUPPORTED
+void PNGAPI
+png_write_frame_head(png_structp png_ptr, png_infop info_ptr,
+    png_bytepp row_pointers, png_uint_32 width, png_uint_32 height,
+    png_uint_32 x_offset, png_uint_32 y_offset,
+    png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
+    png_byte blend_op)
+{
+    png_debug(1, "in png_write_frame_head");
+
+    /* there is a chance this has been set after png_write_info was called,
+    * so it would be set but not written. is there a way to be sure? */
+    if ((info_ptr->valid & PNG_INFO_acTL) == 0)
+        png_error(png_ptr, "png_write_frame_head(): acTL not set");
+
+    png_write_reset(png_ptr);
+
+    png_write_reinit(png_ptr, info_ptr, width, height);
+
+    if ((png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) == 0 ||
+        png_ptr->num_frames_written != 0)
+        png_write_fcTL(png_ptr, width, height, x_offset, y_offset,
+                       delay_num, delay_den, dispose_op, blend_op);
+
+    PNG_UNUSED(row_pointers)
+}
+
+void PNGAPI
+png_write_frame_tail(png_structp png_ptr, png_infop info_ptr)
+{
+    png_debug(1, "in png_write_frame_tail");
+
+    png_ptr->num_frames_written++;
+
+    PNG_UNUSED(info_ptr)
+}
+#endif /* WRITE_APNG */
 #endif /* WRITE */
diff -Naur libpng-1.6.21.old/pngwutil.c libpng-1.6.21.new/pngwutil.c
--- libpng-1.6.21.old/pngwutil.c	2016-02-07 08:21:48.499938376 -0300
+++ libpng-1.6.21.new/pngwutil.c	2016-02-07 08:21:29.279369547 -0300
@@ -1003,14 +1003,15 @@
                optimize_cmf(data, png_image_size(png_ptr));
 #endif
 
-#        ifdef PNG_WRITE_APNG_SUPPORTED
-            if (png_ptr->num_frames_written == 0)
-#        endif
+#ifdef PNG_WRITE_APNG_SUPPORTED
+         if (png_ptr->num_frames_written == 0)
+#endif
          png_write_complete_chunk(png_ptr, png_IDAT, data, size);
-#        ifdef PNG_WRITE_APNG_SUPPORTED
-            else
-               png_write_fdAT(png_ptr, data, size);
-#        endif /* PNG_WRITE_APNG_SUPPORTED */
+#ifdef PNG_WRITE_APNG_SUPPORTED
+         else
+            png_write_fdAT(png_ptr, data, size);
+#endif /* WRITE_APNG */
+
          png_ptr->mode |= PNG_HAVE_IDAT;
 
          png_ptr->zstream.next_out = data;
@@ -1056,14 +1057,14 @@
             optimize_cmf(data, png_image_size(png_ptr));
 #endif
 
-#        ifdef PNG_WRITE_APNG_SUPPORTED
-            if (png_ptr->num_frames_written == 0)
-#        endif
+#ifdef PNG_WRITE_APNG_SUPPORTED
+         if (png_ptr->num_frames_written == 0)
+#endif
          png_write_complete_chunk(png_ptr, png_IDAT, data, size);
-#        ifdef PNG_WRITE_APNG_SUPPORTED
-            else
-               png_write_fdAT(png_ptr, data, size);
-#        endif /* PNG_WRITE_APNG_SUPPORTED */
+#ifdef PNG_WRITE_APNG_SUPPORTED
+         else
+            png_write_fdAT(png_ptr, data, size);
+#endif /* WRITE_APNG */
 
          png_ptr->zstream.avail_out = 0;
          png_ptr->zstream.next_out = NULL;
@@ -1888,7 +1889,7 @@
 
     png_ptr->num_frames_to_write = num_frames;
 
-    if (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN)
+    if ((png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) != 0)
         num_frames--;
 
     png_save_uint_32(buf, num_frames);
@@ -1951,7 +1952,7 @@
 
     png_ptr->next_seq_num++;
 }
-#endif /* PNG_WRITE_APNG_SUPPORTED */
+#endif /* WRITE_APNG */
 
 /* Initializes the row writing capability of libpng */
 void /* PRIVATE */
@@ -2739,7 +2740,7 @@
                            "don't match the ones in IHDR");
     if (width > png_ptr->first_frame_width ||
         height > png_ptr->first_frame_height)
-        png_error(png_ptr, "width and/or height for a frame greater than"
+        png_error(png_ptr, "width and/or height for a frame greater than "
                            "the ones in IHDR");
 
     png_set_IHDR(png_ptr, info_ptr, width, height,
@@ -2752,5 +2753,5 @@
     png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width);
     png_ptr->usr_width = png_ptr->width;
 }
-#endif /* PNG_WRITE_APNG_SUPPORTED */
+#endif /* WRITE_APNG */
 #endif /* WRITE */
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to