mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.4.0beta49.tar
This commit is contained in:
11
pngwio.c
11
pngwio.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* Last changed in libpng 1.4.0 [February 14, 2009]
|
||||
* Last changed in libpng 1.4.0 [February 28, 2009]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -119,7 +119,7 @@ png_default_flush(png_structp png_ptr)
|
||||
png_FILE_p io_ptr;
|
||||
if (png_ptr == NULL) return;
|
||||
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
|
||||
if (io_ptr != NULL && fileno(io_ptr) != -1)
|
||||
if (io_ptr != NULL && png_fileno(io_ptr) != -1)
|
||||
fflush(io_ptr);
|
||||
}
|
||||
#endif
|
||||
@@ -137,7 +137,9 @@ png_default_flush(png_structp png_ptr)
|
||||
data to be written, and a 32-bit unsigned int that is
|
||||
the number of bytes to be written. The new write
|
||||
function should call png_error(png_ptr, "Error msg")
|
||||
to exit and output any fatal error messages.
|
||||
to exit and output any fatal error messages. May be
|
||||
NULL, in which case libpng's default function will
|
||||
be used.
|
||||
flush_data_fn - pointer to a new flush function that takes as its
|
||||
arguments a pointer to a png_struct. After a call to
|
||||
the flush function, there should be no data in any buffers
|
||||
@@ -146,7 +148,8 @@ png_default_flush(png_structp png_ptr)
|
||||
supplied although it doesn't have to do anything. If
|
||||
PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
|
||||
time, output_flush_fn will be ignored, although it must be
|
||||
supplied for compatibility. */
|
||||
supplied for compatibility. May be NULL, in which case
|
||||
libpng's default function will be used. */
|
||||
void PNGAPI
|
||||
png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
|
||||
png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
|
||||
|
||||
Reference in New Issue
Block a user