Imported from libpng-1.2.0beta2.tar
diff --git a/pngread.c b/pngread.c index 1634494..904e5f0 100644 --- a/pngread.c +++ b/pngread.c
@@ -1,7 +1,7 @@ /* pngread.c - read a PNG file * - * libpng 1.2.0beta1 - May 6, 2001 + * libpng 1.2.0beta2 - May 7, 2001 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2001 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -53,7 +53,6 @@ { return (png_structp)NULL; } - #ifdef PNG_ASSEMBLER_CODE_SUPPORTED png_init_mmx_flags(png_ptr); /* 1.2.0 addition */ #endif @@ -723,7 +722,7 @@ * not called png_set_interlace_handling(), the display_row buffer will * be ignored, so pass NULL to it. * - * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta1 + * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta2 */ void PNGAPI @@ -772,7 +771,7 @@ * only call this function once. If you desire to have an image for * each pass of a interlaced image, use png_read_rows() instead. * - * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta1 + * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta2 */ void PNGAPI png_read_image(png_structp png_ptr, png_bytepp image) @@ -1060,7 +1059,7 @@ } /* free all memory used by the read (old method) */ -void PNGAPI +void /* PRIVATE */ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr) { #ifdef PNG_SETJMP_SUPPORTED @@ -1313,7 +1312,7 @@ /* Optional call to gamma correct and add the background to the palette * and update info structure. REQUIRED if you are expecting libpng to - * update the palette for you (ie you selected such a transform above). + * update the palette for you (i.e., you selected such a transform above). */ png_read_update_info(png_ptr, info_ptr); @@ -1325,13 +1324,15 @@ if(info_ptr->row_pointers == NULL) { info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr, - info_ptr->height * sizeof(png_bytep)); + info_ptr->height * sizeof(png_bytep)); #ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_ROWS; #endif for (row = 0; row < (int)info_ptr->height; row++) - info_ptr->row_pointers[row] = png_malloc(png_ptr, + { + info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); + } } png_read_image(png_ptr, info_ptr->row_pointers); @@ -1340,7 +1341,7 @@ /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ png_read_end(png_ptr, info_ptr); - if(transforms == 0 || params == (voidp)NULL) + if(transforms == 0 || params == NULL) /* quiet compiler warnings */ return; }