Imported from libpng-1.4.0beta7.tar
diff --git a/pngset.c b/pngset.c
index 1ee8b43..a23b1c3 100644
--- a/pngset.c
+++ b/pngset.c
@@ -394,7 +394,8 @@
return;
length = png_strlen(purpose) + 1;
- png_debug1(3, "allocating purpose for info (%lu bytes)\n", length);
+ png_debug1(3, "allocating purpose for info (%lu bytes)\n",
+ (unsigned long) length);
info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_purpose == NULL)
{
@@ -410,7 +411,8 @@
info_ptr->pcal_nparams = (png_byte)nparams;
length = png_strlen(units) + 1;
- png_debug1(3, "allocating units for info (%lu bytes)\n", length);
+ png_debug1(3, "allocating units for info (%lu bytes)\n",
+ (unsigned long)length);
info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_units == NULL)
{
@@ -432,7 +434,8 @@
for (i = 0; i < nparams; i++)
{
length = png_strlen(params[i]) + 1;
- png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i, length);
+ png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i,
+ (unsigned long) length);
info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_params[i] == NULL)
{
@@ -832,7 +835,8 @@
if (textp->key == NULL)
return(1);
png_debug2(2, "Allocated %lu bytes at %x in png_set_text\n",
- (png_uint_32)(key_len + lang_len + lang_key_len + text_length + 4),
+ (unsigned long)(png_uint_32)(key_len + lang_len + lang_key_len
+ + text_length + 4),
(int)textp->key);
png_memcpy(textp->key, text_ptr[i].key,
@@ -1246,4 +1250,17 @@
}
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
+
+#if defined(PNG_BENIGN_ERRORS_SUPPORTED)
+void PNGAPI
+png_set_benign_errors(png_structp png_ptr, int allowed)
+{
+ png_debug(1, "in png_set_benign_errors\n");
+ if (allowed)
+ png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;
+ else
+ png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;
+}
+#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
+
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */