From ba05bddf927fa672b9ba0cd78c7d6be86f811387 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 16 May 2009 08:40:25 -0500 Subject: [PATCH] Relocate misplaced #endif directives in pngwrite.c having to do with sCAL chunk handling --- ANNOUNCE | 7 ++++--- CHANGES | 5 +++-- pngwrite.c | 16 ++++++++++------ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 7424b0a0..a808920d 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.2.37beta02 - May 15, 2009 +Libpng 1.2.37beta02 - May 16, 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,8 +51,9 @@ version 1.2.37beta01 [May 14, 2009] Updated some of the makefiles in the scripts directory (merged with those in libpng-1.4.0beta57). -version 1.2.37beta02 [May 15, 2009] - Fixed typo in libpng documentation: AVE filter should be AVG filter. +version 1.2.37beta02 [May 16, 2009] + Fixed typo in libpng documentation (FILTER_AVE should be FILTER_AVG) + Relocated misplaced #endif in pngwrite.c, sCAL chunk handler. Send comments/corrections/commendations to png-mng-implement at lists.sf.net diff --git a/CHANGES b/CHANGES index 09a7f501..7a8b7338 100644 --- a/CHANGES +++ b/CHANGES @@ -2376,8 +2376,9 @@ version 1.2.37beta01 [May 14, 2009] Updated some of the makefiles in the scripts directory (merged with those in libpng-1.4.0beta57). -version 1.2.37beta02 [May 15, 2009] - Fixed typo in libpng documentation: AVE filter should be AVG filter. +version 1.2.37beta02 [May 16, 2009] + Fixed typo in libpng documentation (FILTER_AVE should be FILTER_AVG) + Relocated misplaced #endif in pngwrite.c, sCAL chunk handler. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngwrite.c b/pngwrite.c index 8d95788a..add81266 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -179,21 +179,25 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, info_ptr->pcal_units, info_ptr->pcal_params); #endif -#if defined(PNG_WRITE_sCAL_SUPPORTED) + +#if defined(PNG_sCAL_SUPPORTED) if (info_ptr->valid & PNG_INFO_sCAL) +#if defined(PNG_WRITE_sCAL_SUPPORTED) #if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) png_write_sCAL(png_ptr, (int)info_ptr->scal_unit, info_ptr->scal_pixel_width, info_ptr->scal_pixel_height); -#else +#else /* !FLOATING_POINT */ #ifdef PNG_FIXED_POINT_SUPPORTED png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit, info_ptr->scal_s_width, info_ptr->scal_s_height); -#else +#endif /* FIXED_POINT */ +#endif /* FLOATING_POINT */ +#else /* !WRITE_sCAL */ png_warning(png_ptr, "png_write_sCAL not supported; sCAL chunk not written."); -#endif -#endif -#endif +#endif /* WRITE_sCAL */ +#endif /* sCAL */ + #if defined(PNG_WRITE_pHYs_SUPPORTED) if (info_ptr->valid & PNG_INFO_pHYs) png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit,