diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2010-10-23 13:20:18 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2010-10-23 13:20:18 -0500 |
commit | 33893095b58eb657e1ac05e3c4aee5a20bf19b07 (patch) | |
tree | 12235541da5e9a093d248f53467d1dee5301388c /pngrio.c | |
parent | 5c5f593ffb442219d4e0d0fb82ed900ffb89756f (diff) |
[devel] Used a consistent structure for the pngget.c functions.
added some whitespace in pngrio.c and pngrutil.c
Diffstat (limited to 'pngrio.c')
-rw-r--r-- | pngrio.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -103,10 +103,13 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) read = MIN(NEAR_BUF_SIZE, remaining); err = fread(buf, 1, read, io_ptr); png_memcpy(data, buf, read); /* copy far buffer to near buffer */ + if (err != read) break; + else check += err; + data += read; remaining -= read; } @@ -123,9 +126,12 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) * for libpng if standard C streams aren't being used. * * This function takes as its arguments: + * * png_ptr - pointer to a png input data structure + * * io_ptr - pointer to user supplied structure containing info about * the input functions. May be NULL. + * * read_data_fn - pointer to a new input function that takes as its * arguments a pointer to a png_struct, a pointer to * a location where input data can be stored, and a 32-bit |