[devel] Always put whitespace before "?"
This commit is contained in:
parent
72cda2db72
commit
a565f0e234
12
pngget.c
12
pngget.c
@ -861,7 +861,7 @@ png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_byte PNGAPI
|
png_byte PNGAPI
|
||||||
png_get_rgb_to_gray_status (png_structp png_ptr)
|
png_get_rgb_to_gray_status (png_structp png_ptr)
|
||||||
{
|
{
|
||||||
return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0);
|
return (png_byte)(png_ptr ? png_ptr->rgb_to_gray_status : 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -869,7 +869,7 @@ png_get_rgb_to_gray_status (png_structp png_ptr)
|
|||||||
png_voidp PNGAPI
|
png_voidp PNGAPI
|
||||||
png_get_user_chunk_ptr(png_structp png_ptr)
|
png_get_user_chunk_ptr(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
return (png_ptr? png_ptr->user_chunk_ptr : NULL);
|
return (png_ptr ? png_ptr->user_chunk_ptr : NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -886,24 +886,24 @@ png_get_compression_buffer_size(png_structp png_ptr)
|
|||||||
png_uint_32 PNGAPI
|
png_uint_32 PNGAPI
|
||||||
png_get_user_width_max (png_structp png_ptr)
|
png_get_user_width_max (png_structp png_ptr)
|
||||||
{
|
{
|
||||||
return (png_ptr? png_ptr->user_width_max : 0);
|
return (png_ptr ? png_ptr->user_width_max : 0);
|
||||||
}
|
}
|
||||||
png_uint_32 PNGAPI
|
png_uint_32 PNGAPI
|
||||||
png_get_user_height_max (png_structp png_ptr)
|
png_get_user_height_max (png_structp png_ptr)
|
||||||
{
|
{
|
||||||
return (png_ptr? png_ptr->user_height_max : 0);
|
return (png_ptr ? png_ptr->user_height_max : 0);
|
||||||
}
|
}
|
||||||
/* This function was added to libpng 1.4.0 */
|
/* This function was added to libpng 1.4.0 */
|
||||||
png_uint_32 PNGAPI
|
png_uint_32 PNGAPI
|
||||||
png_get_chunk_cache_max (png_structp png_ptr)
|
png_get_chunk_cache_max (png_structp png_ptr)
|
||||||
{
|
{
|
||||||
return (png_ptr? png_ptr->user_chunk_cache_max : 0);
|
return (png_ptr ? png_ptr->user_chunk_cache_max : 0);
|
||||||
}
|
}
|
||||||
/* This function was added to libpng 1.4.1 */
|
/* This function was added to libpng 1.4.1 */
|
||||||
png_alloc_size_t PNGAPI
|
png_alloc_size_t PNGAPI
|
||||||
png_get_chunk_malloc_max (png_structp png_ptr)
|
png_get_chunk_malloc_max (png_structp png_ptr)
|
||||||
{
|
{
|
||||||
return (png_ptr? png_ptr->user_chunk_malloc_max : 0);
|
return (png_ptr ? png_ptr->user_chunk_malloc_max : 0);
|
||||||
}
|
}
|
||||||
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
||||||
|
|
||||||
|
12
pngrutil.c
12
pngrutil.c
@ -1228,7 +1228,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
new_palette.depth = *entry_start++;
|
new_palette.depth = *entry_start++;
|
||||||
entry_size = (new_palette.depth == 8? 6 : 10);
|
entry_size = (new_palette.depth == 8 ? 6 : 10);
|
||||||
data_length = (slength - (entry_start - (png_bytep)png_ptr->chunkdata));
|
data_length = (slength - (entry_start - (png_bytep)png_ptr->chunkdata));
|
||||||
|
|
||||||
/* Integrity-check the data length */
|
/* Integrity-check the data length */
|
||||||
@ -2994,9 +2994,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
|
|||||||
pb = abs(pc);
|
pb = abs(pc);
|
||||||
pc = abs(p + pc);
|
pc = abs(p + pc);
|
||||||
#else
|
#else
|
||||||
pa = p < 0? -p : p;
|
pa = p < 0 ? -p : p;
|
||||||
pb = pc < 0? -pc : pc;
|
pb = pc < 0 ? -pc : pc;
|
||||||
pc = (p + pc) < 0? -(p + pc) : p + pc;
|
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3008,7 +3008,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
|
|||||||
p = c;
|
p = c;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
p = (pa <= pb && pa <= pc)? a : (pb <= pc) ? b : c;
|
p = (pa <= pb && pa <= pc) ? a : (pb <= pc) ? b : c;
|
||||||
|
|
||||||
*rp = (png_byte)(((int)(*rp) + p) & 0xff);
|
*rp = (png_byte)(((int)(*rp) + p) & 0xff);
|
||||||
rp++;
|
rp++;
|
||||||
@ -3125,7 +3125,7 @@ png_read_finish_row(png_structp png_ptr)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ret != Z_OK)
|
if (ret != Z_OK)
|
||||||
png_error(png_ptr, png_ptr->zstream.msg? png_ptr->zstream.msg :
|
png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :
|
||||||
"Decompression Error");
|
"Decompression Error");
|
||||||
|
|
||||||
if (!(png_ptr->zstream.avail_out))
|
if (!(png_ptr->zstream.avail_out))
|
||||||
|
Loading…
Reference in New Issue
Block a user