mirror of
				https://git.code.sf.net/p/libpng/code.git
				synced 2025-07-10 18:04:09 +02:00 
			
		
		
		
	[libpng16] Fix some indentation.
This commit is contained in:
		
							parent
							
								
									c6f629ffdd
								
							
						
					
					
						commit
						f86720c6c0
					
				
							
								
								
									
										4
									
								
								png.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								png.c
									
									
									
									
									
								
							@ -766,13 +766,13 @@ png_get_copyright(png_const_structrp png_ptr)
 | 
				
			|||||||
#else
 | 
					#else
 | 
				
			||||||
#  ifdef __STDC__
 | 
					#  ifdef __STDC__
 | 
				
			||||||
   return PNG_STRING_NEWLINE \
 | 
					   return PNG_STRING_NEWLINE \
 | 
				
			||||||
     "libpng version 1.6.18beta08 - June 6, 2015" PNG_STRING_NEWLINE \
 | 
					      "libpng version 1.6.18beta08 - June 11, 2015" PNG_STRING_NEWLINE \
 | 
				
			||||||
      "Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
 | 
					      "Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
 | 
				
			||||||
      "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
 | 
					      "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
 | 
				
			||||||
      "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
 | 
					      "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
 | 
				
			||||||
      PNG_STRING_NEWLINE;
 | 
					      PNG_STRING_NEWLINE;
 | 
				
			||||||
#  else
 | 
					#  else
 | 
				
			||||||
      return "libpng version 1.6.18beta08 - June 6, 2015\
 | 
					   return "libpng version 1.6.18beta08 - June 11, 2015\
 | 
				
			||||||
      Copyright (c) 1998-2015 Glenn Randers-Pehrson\
 | 
					      Copyright (c) 1998-2015 Glenn Randers-Pehrson\
 | 
				
			||||||
      Copyright (c) 1996-1997 Andreas Dilger\
 | 
					      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.";
 | 
				
			||||||
 | 
				
			|||||||
@ -606,6 +606,7 @@ png_push_read_IDAT(png_structrp png_ptr)
 | 
				
			|||||||
      png_ptr->current_buffer_size -= save_size;
 | 
					      png_ptr->current_buffer_size -= save_size;
 | 
				
			||||||
      png_ptr->current_buffer_ptr += save_size;
 | 
					      png_ptr->current_buffer_ptr += save_size;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   if (png_ptr->idat_size == 0)
 | 
					   if (png_ptr->idat_size == 0)
 | 
				
			||||||
   {
 | 
					   {
 | 
				
			||||||
      PNG_PUSH_SAVE_BUFFER_IF_LT(4)
 | 
					      PNG_PUSH_SAVE_BUFFER_IF_LT(4)
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								pngrutil.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								pngrutil.c
									
									
									
									
									
								
							@ -1146,11 +1146,13 @@ png_handle_sBIT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 | 
				
			|||||||
      return;
 | 
					      return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   for (i=0; i<truelen; ++i)
 | 
					   for (i=0; i<truelen; ++i)
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
      if (buf[i] == 0 || buf[i] > sample_depth)
 | 
					      if (buf[i] == 0 || buf[i] > sample_depth)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
         png_chunk_benign_error(png_ptr, "invalid");
 | 
					         png_chunk_benign_error(png_ptr, "invalid");
 | 
				
			||||||
         return;
 | 
					         return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0)
 | 
					   if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0)
 | 
				
			||||||
   {
 | 
					   {
 | 
				
			||||||
@ -3812,15 +3814,15 @@ png_read_filter_row_paeth_1byte_pixel(png_row_infop row_info, png_bytep row,
 | 
				
			|||||||
      p = b - c;
 | 
					      p = b - c;
 | 
				
			||||||
      pc = a - c;
 | 
					      pc = a - c;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#     ifdef PNG_USE_ABS
 | 
					#ifdef PNG_USE_ABS
 | 
				
			||||||
      pa = abs(p);
 | 
					      pa = abs(p);
 | 
				
			||||||
      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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      /* Find the best predictor, the least of pa, pb, pc favoring the earlier
 | 
					      /* Find the best predictor, the least of pa, pb, pc favoring the earlier
 | 
				
			||||||
       * ones in the case of a tie.
 | 
					       * ones in the case of a tie.
 | 
				
			||||||
@ -3867,15 +3869,15 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
 | 
				
			|||||||
      p = b - c;
 | 
					      p = b - c;
 | 
				
			||||||
      pc = a - c;
 | 
					      pc = a - c;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#     ifdef PNG_USE_ABS
 | 
					#ifdef PNG_USE_ABS
 | 
				
			||||||
      pa = abs(p);
 | 
					      pa = abs(p);
 | 
				
			||||||
      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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (pb < pa) pa = pb, a = b;
 | 
					      if (pb < pa) pa = pb, a = b;
 | 
				
			||||||
      if (pc < pa) a = c;
 | 
					      if (pc < pa) a = c;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										32
									
								
								pngwrite.c
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								pngwrite.c
									
									
									
									
									
								
							@ -97,7 +97,8 @@ png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr)
 | 
				
			|||||||
      if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) != 0 && \
 | 
					      if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) != 0 && \
 | 
				
			||||||
          png_ptr->mng_features_permitted != 0)
 | 
					          png_ptr->mng_features_permitted != 0)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
      png_warning(png_ptr, "MNG features are not allowed in a PNG datastream");
 | 
					         png_warning(png_ptr,
 | 
				
			||||||
 | 
					             "MNG features are not allowed in a PNG datastream");
 | 
				
			||||||
         png_ptr->mng_features_permitted = 0;
 | 
					         png_ptr->mng_features_permitted = 0;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@ -117,15 +118,15 @@ png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr)
 | 
				
			|||||||
       * flag set, and if it does, writes the chunk.
 | 
					       * flag set, and if it does, writes the chunk.
 | 
				
			||||||
       *
 | 
					       *
 | 
				
			||||||
       * 1.6.0: COLORSPACE support controls the writing of these chunks too, and
 | 
					       * 1.6.0: COLORSPACE support controls the writing of these chunks too, and
 | 
				
			||||||
    * the chunks will be written if the WRITE routine is there and information
 | 
					       * the chunks will be written if the WRITE routine is there and
 | 
				
			||||||
    * is available in the COLORSPACE.  (See png_colorspace_sync_info in png.c
 | 
					       * information * is available in the COLORSPACE. (See
 | 
				
			||||||
    * for where the valid flags get set.)
 | 
					       * png_colorspace_sync_info in png.c for where the valid flags get set.)
 | 
				
			||||||
       *
 | 
					       *
 | 
				
			||||||
       * Under certain circumstances the colorspace can be invalidated without
 | 
					       * Under certain circumstances the colorspace can be invalidated without
 | 
				
			||||||
    * syncing the info_struct 'valid' flags; this happens if libpng detects and
 | 
					       * syncing the info_struct 'valid' flags; this happens if libpng detects
 | 
				
			||||||
    * error and calls png_error while the color space is being set, yet the
 | 
					       * an error and calls png_error while the color space is being set, yet
 | 
				
			||||||
    * application continues writing the PNG.  So check the 'invalid' flag here
 | 
					       * the * application continues writing the PNG.  So check the 'invalid'
 | 
				
			||||||
    * too.
 | 
					       * flag here too.
 | 
				
			||||||
       */
 | 
					       */
 | 
				
			||||||
#ifdef PNG_GAMMA_SUPPORTED
 | 
					#ifdef PNG_GAMMA_SUPPORTED
 | 
				
			||||||
#  ifdef PNG_WRITE_gAMA_SUPPORTED
 | 
					#  ifdef PNG_WRITE_gAMA_SUPPORTED
 | 
				
			||||||
@ -1451,7 +1452,7 @@ png_write_png(png_structrp png_ptr, png_inforp info_ptr,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
 | 
					#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
 | 
				
			||||||
#ifdef PNG_STDIO_SUPPORTED /* currently required for png_image_write_* */
 | 
					# ifdef PNG_STDIO_SUPPORTED /* currently required for png_image_write_* */
 | 
				
			||||||
/* Initialize the write structure - general purpose utility. */
 | 
					/* Initialize the write structure - general purpose utility. */
 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
png_image_write_init(png_imagep image)
 | 
					png_image_write_init(png_imagep image)
 | 
				
			||||||
@ -1534,10 +1535,11 @@ png_write_image_16bit(png_voidp argument)
 | 
				
			|||||||
         ++input_row; /* To point to the first component */
 | 
					         ++input_row; /* To point to the first component */
 | 
				
			||||||
         ++output_row;
 | 
					         ++output_row;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					 | 
				
			||||||
         else
 | 
					         else
 | 
				
			||||||
#     endif
 | 
					 | 
				
			||||||
            aindex = channels;
 | 
					            aindex = channels;
 | 
				
			||||||
 | 
					#     else
 | 
				
			||||||
 | 
					         aindex = channels;
 | 
				
			||||||
 | 
					#     endif
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   else
 | 
					   else
 | 
				
			||||||
@ -1619,7 +1621,7 @@ png_write_image_16bit(png_voidp argument)
 | 
				
			|||||||
 * calculation can be done to 15 bits of accuracy; however, the output needs to
 | 
					 * calculation can be done to 15 bits of accuracy; however, the output needs to
 | 
				
			||||||
 * be scaled in the range 0..255*65535, so include that scaling here.
 | 
					 * be scaled in the range 0..255*65535, so include that scaling here.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#define UNP_RECIPROCAL(alpha) ((((0xffff*0xff)<<7)+(alpha>>1))/alpha)
 | 
					#   define UNP_RECIPROCAL(alpha) ((((0xffff*0xff)<<7)+(alpha>>1))/alpha)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static png_byte
 | 
					static png_byte
 | 
				
			||||||
png_unpremultiply(png_uint_32 component, png_uint_32 alpha,
 | 
					png_unpremultiply(png_uint_32 component, png_uint_32 alpha,
 | 
				
			||||||
@ -2058,9 +2060,9 @@ png_image_write_main(png_voidp argument)
 | 
				
			|||||||
       * it about 50 times.  The speed-up in pngstest was about 10-20% of the
 | 
					       * it about 50 times.  The speed-up in pngstest was about 10-20% of the
 | 
				
			||||||
       * total (user) time on a heavily loaded system.
 | 
					       * total (user) time on a heavily loaded system.
 | 
				
			||||||
       */
 | 
					       */
 | 
				
			||||||
#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
 | 
					#   ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
 | 
				
			||||||
      png_set_compression_level(png_ptr, 3);
 | 
					      png_set_compression_level(png_ptr, 3);
 | 
				
			||||||
#endif
 | 
					#   endif
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   /* Check for the cases that currently require a pre-transform on the row
 | 
					   /* Check for the cases that currently require a pre-transform on the row
 | 
				
			||||||
@ -2223,6 +2225,6 @@ png_image_write_to_file(png_imagep image, const char *file_name,
 | 
				
			|||||||
   else
 | 
					   else
 | 
				
			||||||
      return 0;
 | 
					      return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif /* STDIO */
 | 
					# endif /* STDIO */
 | 
				
			||||||
#endif /* SIMPLIFIED_WRITE */
 | 
					#endif /* SIMPLIFIED_WRITE */
 | 
				
			||||||
#endif /* WRITE */
 | 
					#endif /* WRITE */
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user