Changeset 43 for vendor/libpng/pngrio.c
- Timestamp:
- 02/15/10 11:37:15 (2 years ago)
- Files:
-
- 1 modified
-
vendor/libpng/pngrio.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vendor/libpng/pngrio.c
r11 r43 2 2 /* pngrio.c - functions for data input 3 3 * 4 * Last changed in libpng 1.2. 37 [June 4, 2009]4 * Last changed in libpng 1.2.41 [December 3, 2009] 5 5 * Copyright (c) 1998-2009 Glenn Randers-Pehrson 6 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) … … 20 20 21 21 #define PNG_INTERNAL 22 #define PNG_NO_PEDANTIC_WARNINGS 22 23 #include "png.h" 23 #if defined(PNG_READ_SUPPORTED)24 #ifdef PNG_READ_SUPPORTED 24 25 25 26 /* Read the data from whatever input you are using. The default routine … … 33 34 { 34 35 png_debug1(4, "reading %d bytes", (int)length); 36 35 37 if (png_ptr->read_data_fn != NULL) 36 38 (*(png_ptr->read_data_fn))(png_ptr, data, length); … … 39 41 } 40 42 41 #if !defined(PNG_NO_STDIO)43 #ifdef PNG_STDIO_SUPPORTED 42 44 /* This is the function that does the actual reading of data. If you are 43 45 * not reading from a standard C stream, you should create a replacement … … 56 58 * instead of an int, which is what fread() actually returns. 57 59 */ 58 #if defined(_WIN32_WCE)60 #ifdef _WIN32_WCE 59 61 if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) 60 62 check = 0; … … 90 92 if ((png_bytep)n_data == data) 91 93 { 92 #if defined(_WIN32_WCE)94 #ifdef _WIN32_WCE 93 95 if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) 94 96 check = 0; … … 106 108 { 107 109 read = MIN(NEAR_BUF_SIZE, remaining); 108 #if defined(_WIN32_WCE)110 #ifdef _WIN32_WCE 109 111 if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) ) 110 112 err = 0; … … 152 154 png_ptr->io_ptr = io_ptr; 153 155 154 #if !defined(PNG_NO_STDIO)156 #ifdef PNG_STDIO_SUPPORTED 155 157 if (read_data_fn != NULL) 156 158 png_ptr->read_data_fn = read_data_fn; … … 171 173 } 172 174 173 #if defined(PNG_WRITE_FLUSH_SUPPORTED)175 #ifdef PNG_WRITE_FLUSH_SUPPORTED 174 176 png_ptr->output_flush_fn = NULL; 175 177 #endif
