Changeset 43 for vendor/libpng/pngrio.c

Show
Ignore:
Timestamp:
02/15/10 11:37:15 (2 years ago)
Author:
Carsten
Message:

Upgraded vendor/libpng from 1.2.40 to 1.2.42.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vendor/libpng/pngrio.c

    r11 r43  
    22/* pngrio.c - functions for data input 
    33 * 
    4  * Last changed in libpng 1.2.37 [June 4, 2009] 
     4 * Last changed in libpng 1.2.41 [December 3, 2009] 
    55 * Copyright (c) 1998-2009 Glenn Randers-Pehrson 
    66 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 
     
    2020 
    2121#define PNG_INTERNAL 
     22#define PNG_NO_PEDANTIC_WARNINGS 
    2223#include "png.h" 
    23 #if defined(PNG_READ_SUPPORTED) 
     24#ifdef PNG_READ_SUPPORTED 
    2425 
    2526/* Read the data from whatever input you are using.  The default routine 
     
    3334{ 
    3435   png_debug1(4, "reading %d bytes", (int)length); 
     36  
    3537   if (png_ptr->read_data_fn != NULL) 
    3638      (*(png_ptr->read_data_fn))(png_ptr, data, length); 
     
    3941} 
    4042 
    41 #if !defined(PNG_NO_STDIO) 
     43#ifdef PNG_STDIO_SUPPORTED 
    4244/* This is the function that does the actual reading of data.  If you are 
    4345 * not reading from a standard C stream, you should create a replacement 
     
    5658    * instead of an int, which is what fread() actually returns. 
    5759    */ 
    58 #if defined(_WIN32_WCE) 
     60#ifdef _WIN32_WCE 
    5961   if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) 
    6062      check = 0; 
     
    9092   if ((png_bytep)n_data == data) 
    9193   { 
    92 #if defined(_WIN32_WCE) 
     94#ifdef _WIN32_WCE 
    9395      if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) 
    9496         check = 0; 
     
    106108      { 
    107109         read = MIN(NEAR_BUF_SIZE, remaining); 
    108 #if defined(_WIN32_WCE) 
     110#ifdef _WIN32_WCE 
    109111         if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) ) 
    110112            err = 0; 
     
    152154   png_ptr->io_ptr = io_ptr; 
    153155 
    154 #if !defined(PNG_NO_STDIO) 
     156#ifdef PNG_STDIO_SUPPORTED 
    155157   if (read_data_fn != NULL) 
    156158      png_ptr->read_data_fn = read_data_fn; 
     
    171173   } 
    172174 
    173 #if defined(PNG_WRITE_FLUSH_SUPPORTED) 
     175#ifdef PNG_WRITE_FLUSH_SUPPORTED 
    174176   png_ptr->output_flush_fn = NULL; 
    175177#endif