summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng/libpng-src/contrib/libtests
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-07-16 23:33:39 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-07-16 23:33:39 +0000
commitbb3faa4d6bfce9baecc84539f560d8e518228e04 (patch)
tree2a458af9d27cd5c42b4f8de471eaeabbb1fb1e1a /Build/source/libs/libpng/libpng-src/contrib/libtests
parent4712a2a4209de069ba87751cf2a4043fc459a8cf (diff)
libpng 1.6.35
git-svn-id: svn://tug.org/texlive/trunk@48212 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/libpng/libpng-src/contrib/libtests')
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c10
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/pngimage.c12
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c12
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/pngunknown.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c73
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/readpng.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/tarith.c6
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/timepng.c4
8 files changed, 60 insertions, 61 deletions
diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c
index 9dff0484605..e58a61d0234 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c
@@ -950,7 +950,7 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth,
int passes = 1;
# endif /* !WRITE_INTERLACING */
int pass;
- png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+ size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
row = malloc(rowbytes);
@@ -1094,7 +1094,7 @@ load_file(png_const_charp name, png_bytepp result)
return 0;
}
-static png_size_t
+static size_t
load_fake(png_charp param, png_bytepp profile)
{
char *endptr = NULL;
@@ -1164,7 +1164,7 @@ insert_iCCP(png_structp png_ptr, png_infop info_ptr, int nparams,
{
case '<':
{
- png_size_t filelen = load_file(params[1]+1, &profile);
+ size_t filelen = load_file(params[1]+1, &profile);
if (filelen > 0xfffffffc) /* Maximum profile length */
{
fprintf(stderr, "%s: file too long (%lu) for an ICC profile\n",
@@ -1179,7 +1179,7 @@ insert_iCCP(png_structp png_ptr, png_infop info_ptr, int nparams,
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
- png_size_t fake_len = load_fake(params[1], &profile);
+ size_t fake_len = load_fake(params[1], &profile);
if (fake_len > 0) /* else a simple parameter */
{
@@ -1274,7 +1274,7 @@ set_text(png_structp png_ptr, png_infop info_ptr, png_textp text,
case '5': case '6': case '7': case '8': case '9':
{
png_bytep data = NULL;
- png_size_t fake_len = load_fake(param, &data);
+ size_t fake_len = load_fake(param, &data);
if (fake_len > 0) /* else a simple parameter */
{
diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngimage.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngimage.c
index 9ae402cc4bb..998d58c5049 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngimage.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngimage.c
@@ -551,7 +551,7 @@ struct display
png_structp original_pp; /* used on the original read */
png_infop original_ip; /* set by the original read */
- png_size_t original_rowbytes; /* of the original rows: */
+ size_t original_rowbytes; /* of the original rows: */
png_bytepp original_rows; /* from the original read */
/* Original chunks valid */
@@ -807,7 +807,7 @@ display_cache_file(struct display *dp, const char *filename)
static void
buffer_read(struct display *dp, struct buffer *bp, png_bytep data,
- png_size_t size)
+ size_t size)
{
struct buffer_list *last = bp->current;
size_t read_count = bp->read_count;
@@ -855,7 +855,7 @@ buffer_read(struct display *dp, struct buffer *bp, png_bytep data,
}
static void PNGCBAPI
-read_function(png_structp pp, png_bytep data, png_size_t size)
+read_function(png_structp pp, png_bytep data, size_t size)
{
buffer_read(get_dp(pp), get_buffer(pp), data, size);
}
@@ -927,7 +927,7 @@ update_display(struct display *dp)
png_structp pp;
png_infop ip;
- /* Now perform the initial read with a 0 tranform. */
+ /* Now perform the initial read with a 0 transform. */
read_png(dp, &dp->original_file, "original read", 0/*no transform*/);
/* Move the result to the 'original' fields */
@@ -1267,7 +1267,7 @@ compare_read(struct display *dp, int applied_transforms)
#ifdef PNG_WRITE_PNG_SUPPORTED
static void
buffer_write(struct display *dp, struct buffer *buffer, png_bytep data,
- png_size_t size)
+ size_t size)
/* Generic write function used both from the write callback provided to
* libpng and from the generic read code.
*/
@@ -1311,7 +1311,7 @@ buffer_write(struct display *dp, struct buffer *buffer, png_bytep data,
}
static void PNGCBAPI
-write_function(png_structp pp, png_bytep data, png_size_t size)
+write_function(png_structp pp, png_bytep data, size_t size)
{
buffer_write(get_dp(pp), get_buffer(pp), data, size);
}
diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c
index ab450893017..74c8d100c88 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c
@@ -578,11 +578,11 @@ typedef struct
int stride_extra;
FILE *input_file;
png_voidp input_memory;
- png_size_t input_memory_size;
+ size_t input_memory_size;
png_bytep buffer;
ptrdiff_t stride;
- png_size_t bufsize;
- png_size_t allocsize;
+ size_t bufsize;
+ size_t allocsize;
char tmpfile_name[32];
png_uint_16 colormap[256*4];
}
@@ -665,7 +665,7 @@ static void initimage(Image *image, png_uint_32 opts, const char *file_name,
static void
allocbuffer(Image *image)
{
- png_size_t size = PNG_IMAGE_BUFFER_SIZE(image->image, image->stride);
+ size_t size = PNG_IMAGE_BUFFER_SIZE(image->image, image->stride);
if (size+32 > image->bufsize)
{
@@ -1142,7 +1142,7 @@ get_pixel(png_uint_32 format))(Pixel *p, png_const_voidp pb)
}
}
-/* Convertion between pixel formats. The code above effectively eliminates the
+/* Conversion between pixel formats. The code above effectively eliminates the
* component ordering changes leaving three basic changes:
*
* 1) Remove an alpha channel by pre-multiplication or compositing on a
@@ -2036,7 +2036,7 @@ typedef struct
/* Precalculated values: */
int in_opaque; /* Value of input alpha that is opaque */
int is_palette; /* Sample values come from the palette */
- int accumulate; /* Accumlate component errors (don't log) */
+ int accumulate; /* Accumulate component errors (don't log) */
int output_8bit; /* Output is 8-bit (else 16-bit) */
void (*in_gp)(Pixel*, png_const_voidp);
diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngunknown.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngunknown.c
index 12eab72584a..d9cc4488b80 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngunknown.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngunknown.c
@@ -85,7 +85,7 @@ typedef png_byte *png_const_bytep;
#define PNG_WRITE_16BIT_SUPPORTED
#define PNG_READ_16BIT_SUPPORTED
-/* This comes from pnglibconf.h afer 1.5: */
+/* This comes from pnglibconf.h after 1.5: */
#define PNG_FP_1 100000
#define PNG_GAMMA_THRESHOLD_FIXED\
((png_fixed_point)(PNG_GAMMA_THRESHOLD * PNG_FP_1))
diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c
index 4dc4f844765..e66f2fa61ad 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c
@@ -102,7 +102,7 @@ typedef png_byte *png_const_bytep;
#define PNG_WRITE_16BIT_SUPPORTED
#define PNG_READ_16BIT_SUPPORTED
-/* This comes from pnglibconf.h afer 1.5: */
+/* This comes from pnglibconf.h after 1.5: */
#define PNG_FP_1 100000
#define PNG_GAMMA_THRESHOLD_FIXED\
((png_fixed_point)(PNG_GAMMA_THRESHOLD * PNG_FP_1))
@@ -711,7 +711,7 @@ typedef struct png_store_file
unsigned int IDAT_bits; /* Number of bits in IDAT size */
png_uint_32 IDAT_size; /* Total size of IDAT data */
png_uint_32 id; /* must be correct (see FILEID) */
- png_size_t datacount; /* In this (the last) buffer */
+ size_t datacount; /* In this (the last) buffer */
png_store_buffer data; /* Last buffer in file */
int npalette; /* Number of entries in palette */
store_palette_entry* palette; /* May be NULL */
@@ -777,10 +777,10 @@ typedef struct png_store
png_infop piread;
png_store_file* current; /* Set when reading */
png_store_buffer* next; /* Set when reading */
- png_size_t readpos; /* Position in *next */
+ size_t readpos; /* Position in *next */
png_byte* image; /* Buffer for reading interlaced images */
- png_size_t cb_image; /* Size of this buffer */
- png_size_t cb_row; /* Row size of the image(s) */
+ size_t cb_image; /* Size of this buffer */
+ size_t cb_row; /* Row size of the image(s) */
uLong IDAT_crc;
png_uint_32 IDAT_len; /* Used when re-chunking IDAT chunks */
png_uint_32 IDAT_pos; /* Used when re-chunking IDAT chunks */
@@ -791,7 +791,7 @@ typedef struct png_store
png_store_file* saved;
png_structp pwrite; /* Used when writing a new file */
png_infop piwrite;
- png_size_t writepos; /* Position in .new */
+ size_t writepos; /* Position in .new */
char wname[FILE_NAME_SIZE];
png_store_buffer new; /* The end of the new PNG file being written. */
store_pool write_memory_pool;
@@ -1125,7 +1125,7 @@ static png_bytep
store_image_row(const png_store* ps, png_const_structp pp, int nImage,
png_uint_32 y)
{
- png_size_t coffset = (nImage * ps->image_h + y) * (ps->cb_row + 5) + 2;
+ size_t coffset = (nImage * ps->image_h + y) * (ps->cb_row + 5) + 2;
if (ps->image == NULL)
png_error(pp, "no allocated image");
@@ -1160,9 +1160,9 @@ store_image_free(png_store *ps, png_const_structp pp)
static void
store_ensure_image(png_store *ps, png_const_structp pp, int nImages,
- png_size_t cbRow, png_uint_32 cRows)
+ size_t cbRow, png_uint_32 cRows)
{
- png_size_t cb = nImages * cRows * (cbRow + 5);
+ size_t cb = nImages * cRows * (cbRow + 5);
if (ps->cb_image < cb)
{
@@ -1234,7 +1234,7 @@ store_image_check(const png_store* ps, png_const_structp pp, int iImage)
png_error(pp, "image overwrite");
else
{
- png_size_t cbRow = ps->cb_row;
+ size_t cbRow = ps->cb_row;
png_uint_32 rows = ps->image_h;
image += iImage * (cbRow+5) * ps->image_h;
@@ -1278,7 +1278,7 @@ valid_chunktype(png_uint_32 chunktype)
}
static void PNGCBAPI
-store_write(png_structp ppIn, png_bytep pb, png_size_t st)
+store_write(png_structp ppIn, png_bytep pb, size_t st)
{
png_const_structp pp = ppIn;
png_store *ps = voidcast(png_store*, png_get_io_ptr(pp));
@@ -1346,13 +1346,13 @@ store_write(png_structp ppIn, png_bytep pb, png_size_t st)
else /* chunkpos >= 8 */
{
- png_size_t cb = st;
+ size_t cb = st;
if (cb > STORE_BUFFER_SIZE - writepos)
cb = STORE_BUFFER_SIZE - writepos;
if (cb > chunklen - chunkpos/* bytes left in chunk*/)
- cb = (png_size_t)/*SAFE*/(chunklen - chunkpos);
+ cb = (size_t)/*SAFE*/(chunklen - chunkpos);
memcpy(ps->new.buffer + writepos, pb, cb);
chunkpos += (png_uint_32)/*SAFE*/cb;
@@ -1440,7 +1440,7 @@ store_read_buffer_next(png_store *ps)
* during progressive read, where the io_ptr is set internally by libpng.
*/
static void
-store_read_imp(png_store *ps, png_bytep pb, png_size_t st)
+store_read_imp(png_store *ps, png_bytep pb, size_t st)
{
if (ps->current == NULL || ps->next == NULL)
png_error(ps->pread, "store state damaged");
@@ -1463,14 +1463,13 @@ store_read_imp(png_store *ps, png_bytep pb, png_size_t st)
}
}
-static png_size_t
-store_read_chunk(png_store *ps, png_bytep pb, const png_size_t max,
- const png_size_t min)
+static size_t
+store_read_chunk(png_store *ps, png_bytep pb, size_t max, size_t min)
{
png_uint_32 chunklen = ps->chunklen;
png_uint_32 chunktype = ps->chunktype;
png_uint_32 chunkpos = ps->chunkpos;
- png_size_t st = max;
+ size_t st = max;
if (st > 0) do
{
@@ -1601,8 +1600,8 @@ store_read_chunk(png_store *ps, png_bytep pb, const png_size_t max,
store_read_imp(ps, pb, avail);
ps->IDAT_crc = crc32(ps->IDAT_crc, pb, avail);
- pb += (png_size_t)/*SAFE*/avail;
- st -= (png_size_t)/*SAFE*/avail;
+ pb += (size_t)/*SAFE*/avail;
+ st -= (size_t)/*SAFE*/avail;
chunkpos += (png_uint_32)/*SAFE*/avail;
IDAT_size -= (png_uint_32)/*SAFE*/avail;
IDAT_pos += (png_uint_32)/*SAFE*/avail;
@@ -1669,10 +1668,10 @@ store_read_chunk(png_store *ps, png_bytep pb, const png_size_t max,
else /* Return chunk bytes, including the CRC */
{
- png_size_t avail = st;
+ size_t avail = st;
if (avail > chunklen - chunkpos)
- avail = (png_size_t)/*SAFE*/(chunklen - chunkpos);
+ avail = (size_t)/*SAFE*/(chunklen - chunkpos);
store_read_imp(ps, pb, avail);
pb += avail;
@@ -1698,7 +1697,7 @@ store_read_chunk(png_store *ps, png_bytep pb, const png_size_t max,
}
static void PNGCBAPI
-store_read(png_structp ppIn, png_bytep pb, png_size_t st)
+store_read(png_structp ppIn, png_bytep pb, size_t st)
{
png_const_structp pp = ppIn;
png_store *ps = voidcast(png_store*, png_get_io_ptr(pp));
@@ -1724,7 +1723,7 @@ store_progressive_read(png_store *ps, png_structp pp, png_infop pi)
while (store_read_buffer_avail(ps) > 0)
{
static png_uint_32 noise = 2;
- png_size_t cb;
+ size_t cb;
png_byte buffer[512];
/* Generate 15 more bits of stuff: */
@@ -2991,7 +2990,7 @@ modifier_setbuffer(png_modifier *pm)
* png_struct.
*/
static void
-modifier_read_imp(png_modifier *pm, png_bytep pb, png_size_t st)
+modifier_read_imp(png_modifier *pm, png_bytep pb, size_t st)
{
while (st > 0)
{
@@ -3137,7 +3136,7 @@ modifier_read_imp(png_modifier *pm, png_bytep pb, png_size_t st)
*/
if (len+12 <= sizeof pm->buffer)
{
- png_size_t s = len+12-pm->buffer_count;
+ size_t s = len+12-pm->buffer_count;
store_read_chunk(&pm->this, pm->buffer+pm->buffer_count, s, s);
pm->buffer_count = len+12;
@@ -3196,7 +3195,7 @@ modifier_read_imp(png_modifier *pm, png_bytep pb, png_size_t st)
/* The callback: */
static void PNGCBAPI
-modifier_read(png_structp ppIn, png_bytep pb, png_size_t st)
+modifier_read(png_structp ppIn, png_bytep pb, size_t st)
{
png_const_structp pp = ppIn;
png_modifier *pm = voidcast(png_modifier*, png_get_io_ptr(pp));
@@ -3226,7 +3225,7 @@ modifier_progressive_read(png_modifier *pm, png_structp pp, png_infop pi)
for (;;)
{
static png_uint_32 noise = 1;
- png_size_t cb, cbAvail;
+ size_t cb, cbAvail;
png_byte buffer[512];
/* Generate 15 more bits of stuff: */
@@ -5001,7 +5000,7 @@ standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id,
dp->npalette = 0;
/* Preset the transparent color to black: */
memset(&dp->transparent, 0, sizeof dp->transparent);
- /* Preset the palette to full intensity/opaque througout: */
+ /* Preset the palette to full intensity/opaque throughout: */
memset(dp->palette, 0xff, sizeof dp->palette);
}
@@ -5270,7 +5269,7 @@ standard_info_part1(standard_display *dp, png_structp pp, png_infop pi)
*/
standard_palette_validate(dp, pp, pi);
- /* In any case always check for a tranparent color (notice that the
+ /* In any case always check for a transparent color (notice that the
* colour type 3 case must not give a successful return on the get_tRNS call
* with these arguments!)
*/
@@ -6780,7 +6779,7 @@ transform_image_validate(transform_display *dp, png_const_structp pp,
store_image_check(dp->this.ps, pp, 0);
/* Read the palette corresponding to the output if the output colour type
- * indicates a palette, othewise set out_palette to garbage.
+ * indicates a palette, otherwise set out_palette to garbage.
*/
if (out_ct == PNG_COLOR_TYPE_PALETTE)
{
@@ -7991,7 +7990,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this,
/* Now calculate the actual gray values. Although the error in the
* coefficients depends on whether they were specified on the command
* line (in which case truncation to 15 bits happened) or not (rounding
- * was used) the maxium error in an individual coefficient is always
+ * was used) the maximum error in an individual coefficient is always
* 2/32768, because even in the rounding case the requirement that
* coefficients add up to 32768 can cause a larger rounding error.
*
@@ -8207,7 +8206,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this,
that->bluef = that->greenf = that->redf = gray;
that->bluee = that->greene = that->rede = err;
- /* The sBIT is the minium of the three colour channel sBITs. */
+ /* The sBIT is the minimum of the three colour channel sBITs. */
if (that->red_sBIT > that->green_sBIT)
that->red_sBIT = that->green_sBIT;
if (that->red_sBIT > that->blue_sBIT)
@@ -9746,7 +9745,7 @@ gamma_component_validate(const char *name, const validate_info *vi,
*
* pngvalid calculations:
* input_sample: linear result; i linearized and composed, range 0..1
- * encoded_sample: encoded result; input_sample scaled to ouput bit depth
+ * encoded_sample: encoded result; input_sample scaled to output bit depth
*
* libpng calculations:
* output: linear result; od scaled to 0..1 and linearized
@@ -10183,10 +10182,10 @@ gamma_image_validate(gamma_display *dp, png_const_structp pp,
* Since the library must quantize the output to 8 or 16 bits there is
* a fundamental limit on the accuracy of the output of +/-.5 - this
* quantization limit is included in addition to the other limits
- * specified by the paramaters to the API. (Effectively, add .5
+ * specified by the parameters to the API. (Effectively, add .5
* everywhere.)
*
- * The behavior of the 'sbit' paramter is defined by section 12.5
+ * The behavior of the 'sbit' parameter is defined by section 12.5
* (sample depth scaling) of the PNG spec. That section forces the
* decoder to assume that the PNG values have been scaled if sBIT is
* present:
@@ -11729,7 +11728,7 @@ int main(int argc, char **argv)
/* Some default values (set the behavior for 'make check' here).
* These values simply control the maximum error permitted in the gamma
- * transformations. The practial limits for human perception are described
+ * transformations. The practical limits for human perception are described
* below (the setting for maxpc16), however for 8 bit encodings it isn't
* possible to meet the accepted capabilities of human vision - i.e. 8 bit
* images can never be good enough, regardless of encoding.
diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/readpng.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/readpng.c
index 3336d4e2180..60a2d46c56f 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/libtests/readpng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/readpng.c
@@ -60,7 +60,7 @@ read_png(FILE *fp)
png_read_info(png_ptr, info_ptr);
{
- png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+ size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
/* Failure to initialize these is harmless */
row = malloc(rowbytes);
diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/tarith.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/tarith.c
index cb17ffa7641..c95226f030a 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/libtests/tarith.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/tarith.c
@@ -108,7 +108,7 @@ int validation_ascii_to_fp(int count, int argc, char **argv)
do
{
- png_size_t index;
+ size_t index;
int state, failed = 0;
char buffer[64];
@@ -176,7 +176,7 @@ int validation_ascii_to_fp(int count, int argc, char **argv)
}
else if (PNG_FP_IS_POSITIVE(state) && !(test > 0))
{
- fprintf(stderr, "%g[%d] -> '%s' but postive value not so reported\n",
+ fprintf(stderr, "%g[%d] -> '%s' but positive value not so reported\n",
test, precision, buffer);
failed = 1;
assert(!PNG_FP_IS_NEGATIVE(state));
@@ -329,7 +329,7 @@ static int check_one_character(checkfp_command *co, checkfp_control c, int ch)
{
/* Test this character (ch) to ensure the parser does the correct thing.
*/
- png_size_t index = 0;
+ size_t index = 0;
const char test = (char)ch;
const int number_is_valid = png_check_fp_number(&test, 1, &c.state, &index);
const int character_accepted = (index == 1);
diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/timepng.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/timepng.c
index 3bcfde5a359..23d8b17b139 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/libtests/timepng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/timepng.c
@@ -65,7 +65,7 @@ typedef struct
} io_data;
static PNG_CALLBACK(void, read_and_copy,
- (png_structp png_ptr, png_bytep buffer, png_size_t cb))
+ (png_structp png_ptr, png_bytep buffer, size_t cb))
{
io_data *io = (io_data*)png_get_io_ptr(png_ptr);
@@ -100,7 +100,7 @@ static void read_by_row(png_structp png_ptr, png_infop info_ptr,
png_read_info(png_ptr, info_ptr);
{
- png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+ size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
row = voidcast(png_bytep,malloc(rowbytes));
display = voidcast(png_bytep,malloc(rowbytes));