1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
$NetBSD: patch-aa,v 1.8 2008/10/26 09:19:16 adam Exp $
--- pngcrush.c.orig 2008-08-25 21:00:08.000000000 +0200
+++ pngcrush.c
@@ -632,9 +632,6 @@ void png_crc_read(png_structp png_ptr, p
int png_crc_error(png_structp png_ptr);
int png_crc_finish(png_structp png_ptr, png_uint_32 skip);
-png_uint_32 png_get_uint_31(png_structp png_ptr, png_bytep buf);
-png_uint_32 png_get_uint_32(png_bytep buf);
-void png_save_uint_32(png_bytep buf, png_uint_32 i);
#ifdef PNG_USER_MEM_SUPPORTED
png_voidp png_debug_malloc(png_structp png_ptr, png_uint_32 size);
@@ -670,38 +667,6 @@ void print_usage(int retval);
* ============================================================
*/
-#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
-/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
-png_uint_32 /* PRIVATE */
-png_get_uint_32(png_bytep buf)
-{
- png_uint_32 i = ((png_uint_32)(*buf) << 24) +
- ((png_uint_32)(*(buf + 1)) << 16) +
- ((png_uint_32)(*(buf + 2)) << 8) +
- (png_uint_32)(*(buf + 3));
-
- return (i);
-}
-#else
-# define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
-#endif
-png_uint_32 /* PRIVATE */
-png_get_uint_31(png_structp png_ptr, png_bytep buf)
-{
- png_uint_32 i = png_get_uint_32(buf);
- if (i > PNG_UINT_31_MAX)
- png_error(png_ptr, "PNG unsigned integer out of range.\n");
- return (i);
-}
-void /* PRIVATE */
-png_save_uint_32(png_bytep buf, png_uint_32 i)
-{
- buf[0] = (png_byte)((i >> 24) & 0xff);
- buf[1] = (png_byte)((i >> 16) & 0xff);
- buf[2] = (png_byte)((i >> 8) & 0xff);
- buf[3] = (png_byte)(i & 0xff);
-}
-
/* Reset the CRC variable to 32 bits of 1's. Care must be taken
* in case CRC is > 32 bits to leave the top bits 0.
*/
@@ -2821,7 +2786,7 @@ int main(int argc, char *argv[])
#if !defined(PNG_cHRM_SUPPORTED) || !defined(PNG_hIST_SUPPORTED) || \
!defined(PNG_iCCP_SUPPORTED) || !defined(PNG_sCAL_SUPPORTED) || \
!defined(PNG_pCAL_SUPPORTED) || !defined(PNG_sPLT_SUPPORTED) || \
- !defined(PNG_tIME_SUPPORTED)
+ !defined(PNG_tIME_SUPPORTED) || !defined(PNG_sTER_SUPPORTED)
png_byte chunk_name[5];
chunk_name[4] = '\0';
#endif
|