286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286N/A * This code is free software; you can redistribute it and/or modify it 286N/A * under the terms of the GNU General Public License version 2 only, as 286N/A * published by the Free Software Foundation. Oracle designates this 286N/A * particular file as subject to the "Classpath" exception as provided 286N/A * by Oracle in the LICENSE file that accompanied this code. 286N/A * This code is distributed in the hope that it will be useful, but WITHOUT 286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 286N/A * version 2 for more details (a copy is included in the LICENSE file that 286N/A * accompanied this code). 286N/A * You should have received a copy of the GNU General Public License version 286N/A * 2 along with this work; if not, write to the Free Software Foundation, 286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 286N/A * This file is available under and governed by the GNU General Public 286N/A * License version 2 only, as published by the Free Software Foundation. 286N/A * However, the following notice accompanied the original version of this 286N/A * file and, per its terms, should not be removed: 286N/A * Last changed in libpng 1.5.0 [January 6, 2011] 286N/A * Copyright (c) 1998-2011 Glenn Randers-Pehrson 286N/A * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 286N/A * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) 286N/A * This code is released under the libpng license. 286N/A * For conditions of distribution and use, see the disclaimer 286N/A * This file provides a location for all output. Users who need 286N/A * special handling are expected to write functions that have the same 286N/A * arguments as these and perform similar functions, but that possibly 286N/A * use different output methods. Note that you shouldn't change these 286N/A * functions, but rather write replacement functions and then change 286N/A * them at run time with png_set_write_fn(...). 286N/A/* Write the data to whatever output you are using. The default routine 286N/A * writes to a file pointer. Note that this routine sometimes gets called 286N/A * with very small lengths, so you should implement some kind of simple 286N/A * buffering if you are using unbuffered writes. This should never be asked 286N/A * to write more than 64K on a 16 bit machine. 286N/A /* NOTE: write_data_fn must not change the buffer! */ 286N/A/* This is the function that does the actual writing of data. If you are 286N/A * not writing to a standard C stream, you should create a replacement 286N/A * write_data function and use it at run time with png_set_write_fn(), rather 286N/A * than changing the library. 286N/A/* This is the model-independent version. Since the standard I/O library 286N/A * can't handle far buffers in the medium and small models, we have to copy 286N/A /* Check if data really is near. If so, use usual code. */ 286N/A/* This function is called to output any data pending writing (normally 286N/A * to disk). After png_flush is called, there should be no data pending 286N/A * writing in any buffers. 286N/A/* This function allows the application to supply new output functions for 286N/A * libpng if standard C streams aren't being used. 286N/A * This function takes as its arguments: 286N/A * png_ptr - pointer to a png output data structure 286N/A * io_ptr - pointer to user supplied structure containing info about 524N/A * the output functions. May be NULL. 286N/A * write_data_fn - pointer to a new output function that takes as its 286N/A * arguments a pointer to a png_struct, a pointer to 286N/A * data to be written, and a 32-bit unsigned int that is 286N/A * the number of bytes to be written. The new write 286N/A * function should call png_error(png_ptr, "Error msg") 286N/A * to exit and output any fatal error messages. May be 286N/A * NULL, in which case libpng's default function will 286N/A * flush_data_fn - pointer to a new flush function that takes as its 286N/A * arguments a pointer to a png_struct. After a call to 286N/A * the flush function, there should be no data in any buffers 286N/A * or pending transmission. If the output method doesn't do 286N/A * any buffering of output, a function prototype must still be 286N/A * supplied although it doesn't have to do anything. If 286N/A * PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile 286N/A * time, output_flush_fn will be ignored, although it must be 286N/A * supplied for compatibility. May be NULL, in which case 286N/A * libpng's default function will be used, if 286N/A * PNG_WRITE_FLUSH_SUPPORTED is defined. This is not 286N/A * a good idea if io_ptr does not point to a standard 286N/A#
endif /* PNG_WRITE_FLUSH_SUPPORTED */ 286N/A /* It is an error to read while writing a png file */ 286N/A "Can't set both read_data_fn and write_data_fn in the" 286N/A#
endif /* PNG_WRITE_SUPPORTED */