Changeset 44 for cafu/trunk/ExtLibs/libpng/pngwio.c
- Timestamp:
- 02/15/10 11:56:43 (2 years ago)
- Files:
-
- 1 modified
-
cafu/trunk/ExtLibs/libpng/pngwio.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/ExtLibs/libpng/pngwio.c
r11 r44 2 2 /* pngwio.c - functions for data output 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 24 #ifdef PNG_WRITE_SUPPORTED … … 39 40 } 40 41 41 #if !defined(PNG_NO_STDIO)42 #ifdef PNG_STDIO_SUPPORTED 42 43 /* This is the function that does the actual writing of data. If you are 43 44 * not writing to a standard C stream, you should create a replacement … … 53 54 if (png_ptr == NULL) 54 55 return; 55 #if defined(_WIN32_WCE)56 #ifdef _WIN32_WCE 56 57 if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) 57 58 check = 0; … … 85 86 if ((png_bytep)near_data == data) 86 87 { 87 #if defined(_WIN32_WCE)88 #ifdef _WIN32_WCE 88 89 if ( !WriteFile(io_ptr, near_data, length, &check, NULL) ) 89 90 check = 0; … … 102 103 written = MIN(NEAR_BUF_SIZE, remaining); 103 104 png_memcpy(buf, data, written); /* Copy far buffer to near buffer */ 104 #if defined(_WIN32_WCE)105 #ifdef _WIN32_WCE 105 106 if ( !WriteFile(io_ptr, buf, written, &err, NULL) ) 106 107 err = 0; … … 130 131 * writing in any buffers. 131 132 */ 132 #if defined(PNG_WRITE_FLUSH_SUPPORTED)133 #ifdef PNG_WRITE_FLUSH_SUPPORTED 133 134 void /* PRIVATE */ 134 135 png_flush(png_structp png_ptr) … … 138 139 } 139 140 140 #if !defined(PNG_NO_STDIO)141 #ifdef PNG_STDIO_SUPPORTED 141 142 void PNGAPI 142 143 png_default_flush(png_structp png_ptr) 143 144 { 144 #if !defined(_WIN32_WCE)145 #ifndef _WIN32_WCE 145 146 png_FILE_p io_ptr; 146 147 #endif 147 148 if (png_ptr == NULL) 148 149 return; 149 #if !defined(_WIN32_WCE)150 #ifndef _WIN32_WCE 150 151 io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); 151 152 fflush(io_ptr); … … 193 194 png_ptr->io_ptr = io_ptr; 194 195 195 #if !defined(PNG_NO_STDIO)196 #ifdef PNG_STDIO_SUPPORTED 196 197 if (write_data_fn != NULL) 197 198 png_ptr->write_data_fn = write_data_fn; … … 203 204 #endif 204 205 205 #if defined(PNG_WRITE_FLUSH_SUPPORTED)206 #if !defined(PNG_NO_STDIO)206 #ifdef PNG_WRITE_FLUSH_SUPPORTED 207 #ifdef PNG_STDIO_SUPPORTED 207 208 if (output_flush_fn != NULL) 208 209 png_ptr->output_flush_fn = output_flush_fn; … … 226 227 } 227 228 228 #if defined(USE_FAR_KEYWORD)229 #if defined(_MSC_VER)229 #ifdef USE_FAR_KEYWORD 230 #ifdef _MSC_VER 230 231 void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check) 231 232 {
