1 diff -c -r bmp2png-1.62.orig/png2bmp.c bmp2png-1.62/png2bmp.c
2 *** bmp2png-1.62.orig/png2bmp.c 2005-09-03 18:00:00.000000000 +0200
3 --- bmp2png-1.62/png2bmp.c 2008-12-31 10:20:00.000000000 +0100
7 static int skip_macbinary(png_structp png_ptr)
9 ! void png_read_data(png_structp, png_bytep, png_size_t);
10 enum { PNG_BYTES_TO_CHECK = 8, MACBIN_SIZE = 128 }; /* ^ in pngrio.c */
11 png_byte buf[MACBIN_SIZE];
14 ! png_read_data(png_ptr, buf, PNG_BYTES_TO_CHECK);
15 if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK) == 0)
16 return PNG_BYTES_TO_CHECK;
18 ! png_read_data(png_ptr, buf, MACBIN_SIZE);
19 sig = buf + MACBIN_SIZE - PNG_BYTES_TO_CHECK;
20 if (png_sig_cmp(sig, 0, PNG_BYTES_TO_CHECK) == 0)
21 return PNG_BYTES_TO_CHECK;
24 static int skip_macbinary(png_structp png_ptr)
26 ! void png_read_data(png_structp, png_bytep);
27 enum { PNG_BYTES_TO_CHECK = 8, MACBIN_SIZE = 128 }; /* ^ in pngrio.c */
28 png_byte buf[MACBIN_SIZE];
31 ! png_read_image(png_ptr, buf);
32 if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK) == 0)
33 return PNG_BYTES_TO_CHECK;
35 ! png_read_image(png_ptr, buf);
36 sig = buf + MACBIN_SIZE - PNG_BYTES_TO_CHECK;
37 if (png_sig_cmp(sig, 0, PNG_BYTES_TO_CHECK) == 0)
38 return PNG_BYTES_TO_CHECK;