mirror of
				https://git.code.sf.net/p/libpng/code.git
				synced 2025-07-10 18:04:09 +02:00 
			
		
		
		
	[libpng15] Fix 'setting' handling in options.awk and fixed palette_max API
This commit is contained in:
		
							parent
							
								
									10303740d1
								
							
						
					
					
						commit
						3b69793c6f
					
				
							
								
								
									
										1
									
								
								ANNOUNCE
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								ANNOUNCE
									
									
									
									
									
								
							@ -40,6 +40,7 @@ Version 1.5.15beta02 [February 5, 2013]
 | 
				
			|||||||
    be made to pnglibconf.mak
 | 
					    be made to pnglibconf.mak
 | 
				
			||||||
  Fix typo in Makefile.am, fix scripts/pnglibconf.mak and makefile.std
 | 
					  Fix typo in Makefile.am, fix scripts/pnglibconf.mak and makefile.std
 | 
				
			||||||
  Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.13
 | 
					  Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.13
 | 
				
			||||||
 | 
					  Fix 'setting' handling in options.awk and fixed palette_max API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								CHANGES
									
									
									
									
									
								
							@ -3997,6 +3997,7 @@ Version 1.5.15beta02 [February 5, 2013]
 | 
				
			|||||||
    be made to pnglibconf.mak
 | 
					    be made to pnglibconf.mak
 | 
				
			||||||
  Fix typo in Makefile.am, fix scripts/pnglibconf.mak and makefile.std
 | 
					  Fix typo in Makefile.am, fix scripts/pnglibconf.mak and makefile.std
 | 
				
			||||||
  Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.13
 | 
					  Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.13
 | 
				
			||||||
 | 
					  Fix 'setting' handling in options.awk and fixed palette_max API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ===========================================================================
 | 
					  ===========================================================================
 | 
				
			||||||
                       NOTICE November 17, 2012:
 | 
					                       NOTICE November 17, 2012:
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								png.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								png.h
									
									
									
									
									
								
							@ -2655,7 +2655,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
 | 
				
			|||||||
    defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
 | 
					    defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
 | 
				
			||||||
PNG_EXPORT(234, void, png_set_check_for_invalid_index, (png_structp png_ptr,
 | 
					PNG_EXPORT(234, void, png_set_check_for_invalid_index, (png_structp png_ptr,
 | 
				
			||||||
    int allowed));
 | 
					    int allowed));
 | 
				
			||||||
PNG_EXPORT(235, void, png_get_palette_max, (png_structp png_ptr,
 | 
					PNG_EXPORT(235, int, png_get_palette_max, (png_const_structp png_ptr,
 | 
				
			||||||
    png_const_infop info_ptr));
 | 
					    png_const_infop info_ptr));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								pngget.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								pngget.c
									
									
									
									
									
								
							@ -1129,7 +1129,7 @@ png_get_io_chunk_name (png_structp png_ptr)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
 | 
					#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
 | 
				
			||||||
int PNGAPI
 | 
					int PNGAPI
 | 
				
			||||||
png_get_max_palette_index(png_const_structp png_ptr, png_const_infop info_ptr)
 | 
					png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
   if (png_ptr != NULL && info_ptr != NULL)
 | 
					   if (png_ptr != NULL && info_ptr != NULL)
 | 
				
			||||||
      return png_ptr->num_palette_max;
 | 
					      return png_ptr->num_palette_max;
 | 
				
			||||||
@ -1138,5 +1138,4 @@ png_get_max_palette_index(png_const_structp png_ptr, png_const_infop info_ptr)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
 | 
					#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
 | 
				
			||||||
 | 
				
			|||||||
@ -48,6 +48,8 @@ BEGIN{
 | 
				
			|||||||
   dq="@'"                      # For a single double quote
 | 
					   dq="@'"                      # For a single double quote
 | 
				
			||||||
   start=" PNG_DFN \""          # Start stuff to output (can't contain a "!)
 | 
					   start=" PNG_DFN \""          # Start stuff to output (can't contain a "!)
 | 
				
			||||||
   end="\" "                    # End stuff to output
 | 
					   end="\" "                    # End stuff to output
 | 
				
			||||||
 | 
					   subs="@\" "                  # Substitute start (substitute a C macro)
 | 
				
			||||||
 | 
					   sube=" \"@"                  # Substitute end
 | 
				
			||||||
   comment=start "/*"           # Comment start
 | 
					   comment=start "/*"           # Comment start
 | 
				
			||||||
   cend="*/" end                # Comment end
 | 
					   cend="*/" end                # Comment end
 | 
				
			||||||
   def=start "#define PNG_"     # Arbitrary define
 | 
					   def=start "#define PNG_"     # Arbitrary define
 | 
				
			||||||
@ -497,10 +499,17 @@ END{
 | 
				
			|||||||
         # All the requirements have been processed, output
 | 
					         # All the requirements have been processed, output
 | 
				
			||||||
         # this setting.
 | 
					         # this setting.
 | 
				
			||||||
         if (deb) print "setting", i
 | 
					         if (deb) print "setting", i
 | 
				
			||||||
 | 
					         deflt = defaults[i]
 | 
				
			||||||
 | 
					         # A leading @ means leave it unquoted so the preprocessor
 | 
				
			||||||
 | 
					         # can substitute the build time value
 | 
				
			||||||
 | 
					         if (deflt ~ /^ @/)
 | 
				
			||||||
 | 
					            deflt = " " subs substr(deflt, 3) sube
 | 
				
			||||||
 | 
					         # Remove any spurious trailing spaces
 | 
				
			||||||
 | 
					         sub(/ *$/,"",deflt)
 | 
				
			||||||
         print "" >out
 | 
					         print "" >out
 | 
				
			||||||
         print "/* setting: ", i >out
 | 
					         print "/* setting: ", i >out
 | 
				
			||||||
         print " *   requires:" setting[i] >out
 | 
					         print " *   requires:" setting[i] >out
 | 
				
			||||||
         print " *   default: ", defaults[i], "*/" >out
 | 
					         print " *   default: ", defaults[i] defltinfo, "*/" >out
 | 
				
			||||||
         if (defaults[i] == "") { # no default, only check if defined
 | 
					         if (defaults[i] == "") { # no default, only check if defined
 | 
				
			||||||
            print "#ifdef PNG_" i >out
 | 
					            print "#ifdef PNG_" i >out
 | 
				
			||||||
         }
 | 
					         }
 | 
				
			||||||
@ -512,13 +521,14 @@ END{
 | 
				
			|||||||
         if (defaults[i] != "") { # default handling
 | 
					         if (defaults[i] != "") { # default handling
 | 
				
			||||||
            print "#ifdef PNG_" i >out
 | 
					            print "#ifdef PNG_" i >out
 | 
				
			||||||
         }
 | 
					         }
 | 
				
			||||||
         print def i, "PNG_" i end >out
 | 
					         # PNG_<i> is defined, so substitute the value:
 | 
				
			||||||
 | 
					         print def i, subs "PNG_" i sube end >out
 | 
				
			||||||
         if (defaults[i] != "") {
 | 
					         if (defaults[i] != "") {
 | 
				
			||||||
            print "#else /*default*/" >out
 | 
					            print "#else /*default*/" >out
 | 
				
			||||||
            # And add the default definition for the benefit
 | 
					            # And add the default definition for the benefit
 | 
				
			||||||
            # of later settings an options test:
 | 
					            # of later settings an options test:
 | 
				
			||||||
            print "# define PNG_" i defaults[i] >out
 | 
					            print "# define PNG_" i deflt >out
 | 
				
			||||||
            print def i defaults[i] end >out
 | 
					            print def i deflt end >out
 | 
				
			||||||
         }
 | 
					         }
 | 
				
			||||||
         print "#endif" >out
 | 
					         print "#endif" >out
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user