~ubuntu-branches/ubuntu/oneiric/libpng/oneiric

« back to all changes in this revision

Viewing changes to pngwio.c

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2009-05-22 09:11:26 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090522091126-ackh8fu2581nwuyg
Tags: 1.2.36-1
* New upstream release 
* Standards-Version is 3.8.1
* debhelper compat is 7
* Run dh_prep instead of dh_clean -k

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/* pngwio.c - functions for data output
3
3
 *
4
 
 * Last changed in libpng 1.2.35 [February 14, 2009]
 
4
 * Last changed in libpng 1.2.36 [May 7, 2009]
5
5
 * For conditions of distribution and use, see copyright notice in png.h
6
6
 * Copyright (c) 1998-2009 Glenn Randers-Pehrson
7
7
 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
137
137
   if (png_ptr == NULL) return;
138
138
#if !defined(_WIN32_WCE)
139
139
   io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
140
 
   if (io_ptr != NULL && fileno(io_ptr) != -1)
141
 
      fflush(io_ptr);
 
140
   fflush(io_ptr);
142
141
#endif
143
142
}
144
143
#endif
156
155
                   data to be written, and a 32-bit unsigned int that is
157
156
                   the number of bytes to be written.  The new write
158
157
                   function should call png_error(png_ptr, "Error msg")
159
 
                   to exit and output any fatal error messages.
 
158
                   to exit and output any fatal error messages.  May be
 
159
                   NULL, in which case libpng's default function will
 
160
                   be used.
160
161
   flush_data_fn - pointer to a new flush function that takes as its
161
162
                   arguments a pointer to a png_struct.  After a call to
162
163
                   the flush function, there should be no data in any buffers
165
166
                   supplied although it doesn't have to do anything.  If
166
167
                   PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
167
168
                   time, output_flush_fn will be ignored, although it must be
168
 
                   supplied for compatibility. */
 
169
                   supplied for compatibility.  May be NULL, in which case
 
170
                   libpng's default function will be used, if
 
171
                   PNG_WRITE_FLUSH_SUPPORTED is defined.  This is not
 
172
                   a good idea if io_ptr does not point to a standard
 
173
                   *FILE structure. */
169
174
void PNGAPI
170
175
png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
171
176
   png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)