Relocate misplaced #endif directives in pngwrite.c

having to do with sCAL chunk handling
This commit is contained in:
Glenn Randers-Pehrson 2009-05-16 08:40:25 -05:00
parent 7a63d75a83
commit ba05bddf92
3 changed files with 17 additions and 11 deletions

View File

@ -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 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. 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 Updated some of the makefiles in the scripts directory (merged with
those in libpng-1.4.0beta57). those in libpng-1.4.0beta57).
version 1.2.37beta02 [May 15, 2009] version 1.2.37beta02 [May 16, 2009]
Fixed typo in libpng documentation: AVE filter should be AVG filter. 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 Send comments/corrections/commendations to png-mng-implement at lists.sf.net

View File

@ -2376,8 +2376,9 @@ version 1.2.37beta01 [May 14, 2009]
Updated some of the makefiles in the scripts directory (merged with Updated some of the makefiles in the scripts directory (merged with
those in libpng-1.4.0beta57). those in libpng-1.4.0beta57).
version 1.2.37beta02 [May 15, 2009] version 1.2.37beta02 [May 16, 2009]
Fixed typo in libpng documentation: AVE filter should be AVG filter. 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 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -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_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,
info_ptr->pcal_units, info_ptr->pcal_params); info_ptr->pcal_units, info_ptr->pcal_params);
#endif #endif
#if defined(PNG_WRITE_sCAL_SUPPORTED)
#if defined(PNG_sCAL_SUPPORTED)
if (info_ptr->valid & PNG_INFO_sCAL) if (info_ptr->valid & PNG_INFO_sCAL)
#if defined(PNG_WRITE_sCAL_SUPPORTED)
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) #if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
png_write_sCAL(png_ptr, (int)info_ptr->scal_unit, png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,
info_ptr->scal_pixel_width, info_ptr->scal_pixel_height); info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);
#else #else /* !FLOATING_POINT */
#ifdef PNG_FIXED_POINT_SUPPORTED #ifdef PNG_FIXED_POINT_SUPPORTED
png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit, png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit,
info_ptr->scal_s_width, info_ptr->scal_s_height); 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_warning(png_ptr,
"png_write_sCAL not supported; sCAL chunk not written."); "png_write_sCAL not supported; sCAL chunk not written.");
#endif #endif /* WRITE_sCAL */
#endif #endif /* sCAL */
#endif
#if defined(PNG_WRITE_pHYs_SUPPORTED) #if defined(PNG_WRITE_pHYs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_pHYs) if (info_ptr->valid & PNG_INFO_pHYs)
png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit,