]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge remote-tracking branch 'ttimo/master'
authorRudolf Polzer <divverent@alientrap.org>
Thu, 12 Apr 2012 13:32:57 +0000 (15:32 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 12 Apr 2012 13:32:57 +0000 (15:32 +0200)
Conflicts:
plugins/imagepng/plugin.cpp
radiant/gtkdlgs.cpp
radiant/radiant.ico
tools/quake3/q3map2/image.c

1  2 
plugins/imagepng/plugin.cpp
tools/quake3/q3map2/image.c

index e46b70651d3b0515be7ba1ca91aaa1dc397874fd,784500f882240807b7f869dd30182b408f68cb83..bf0874165c71dbbbfd8294970d2589063ac77826
@@@ -38,8 -103,8 +38,8 @@@ void user_warning_fn( png_structp png_p
  }
  
  void user_error_fn( png_structp png_ptr, png_const_charp error_msg ){
 -      g_FuncTable.m_pfnSysPrintf( "libpng error: %s\n", error_msg );
 +      globalErrorStream() << "libpng error: " << error_msg << "\n";
-       longjmp( png_jmpbuf( png_ptr ), 0 );
+       longjmp( png_jmpbuf(png_ptr), 0 );
  }
  
  void user_read_data( png_structp png_ptr, png_bytep data, png_uint_32 length ){
@@@ -82,12 -153,16 +82,12 @@@ Image* LoadPNGBuff( unsigned char* fbuf
        }
  
        // configure the read function
 -      png_set_read_fn( png_ptr, ( void * ) & p_fbuffer, ( png_rw_ptr ) & user_read_data );
 +      png_set_read_fn( png_ptr, ( png_voidp ) & p_fbuffer, ( png_rw_ptr ) & user_read_data );
  
-       if ( setjmp( png_jmpbuf( png_ptr ) ) ) {
+       if ( setjmp( png_jmpbuf(png_ptr) ) ) {
                png_destroy_read_struct( &png_ptr, &info_ptr,
                                                                 &end_info );
 -              if ( *pic ) {
 -                      g_free( *pic );
 -                      free( row_pointers );
 -              }
 -              return;
 +              return 0;
        }
  
        png_read_info( png_ptr, info_ptr );
index bb6a52563206a2e65bc92ae1551e05611e8d25c3,d3b43633cb50fd917faaed6fa427fdb359d9c882..ad78212450f0c5fed4beafc65fb2720c1ae6ad7c
@@@ -123,12 -123,11 +123,12 @@@ void PNGReadData( png_struct *png, png_
  static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, int *height ){
        png_struct  *png;
        png_info    *info, *end;
 -      pngBuffer_t     *pb = (pngBuffer_t*) png_get_io_ptr( png );
 -      int i, bitDepth, colorType, channels;
 -      png_uint_32 w, h;
 +      pngBuffer_t pb;
++      //pngBuffer_t     *pb = (pngBuffer_t*) png_get_io_ptr( png );
 +      int bitDepth, colorType;
 +      png_uint_32 w, h, i;
        byte        **rowPointers;
  
        /* dummy check */
        if ( buffer == NULL || size <= 0 || pixels == NULL || width == NULL || height == NULL ) {
                return;