diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-01-09 23:54:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:57 -0500 |
commit | 87c2ce3b9305b9b723faeedf6e32ef703ec9b33a (patch) | |
tree | b953aeb311ae08c4acdd96b2a765e8d24dc47cf8 /lib | |
parent | 3af13763d696468d31f71a798155b33f681f221f (diff) |
[PATCH] lib/zlib*: cleanups
This patch contains the following possible cleanups:
- #if 0 the following unused functions:
- zlib_deflate/deflate.c: zlib_deflateSetDictionary
- zlib_deflate/deflate.c: zlib_deflateParams
- zlib_deflate/deflate.c: zlib_deflateCopy
- zlib_inflate/infblock.c: zlib_inflate_set_dictionary
- zlib_inflate/infblock.c: zlib_inflate_blocks_sync_point
- zlib_inflate/inflate_sync.c: zlib_inflateSync
- zlib_inflate/inflate_sync.c: zlib_inflateSyncPoint
- remove the following unneeded EXPORT_SYMBOL's:
- zlib_deflate/deflate_syms.c: zlib_deflateCopy
- zlib_deflate/deflate_syms.c: zlib_deflateParams
- zlib_inflate/inflate_syms.c: zlib_inflateSync
- zlib_inflate/inflate_syms.c: zlib_inflateSyncPoint
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zlib_deflate/deflate.c | 6 | ||||
-rw-r--r-- | lib/zlib_deflate/deflate_syms.c | 2 | ||||
-rw-r--r-- | lib/zlib_inflate/infblock.c | 4 | ||||
-rw-r--r-- | lib/zlib_inflate/infblock.h | 4 | ||||
-rw-r--r-- | lib/zlib_inflate/inflate_syms.c | 2 | ||||
-rw-r--r-- | lib/zlib_inflate/inflate_sync.c | 4 |
6 files changed, 18 insertions, 4 deletions
diff --git a/lib/zlib_deflate/deflate.c b/lib/zlib_deflate/deflate.c index ad9a1bf4fc63..1653dd9bb01a 100644 --- a/lib/zlib_deflate/deflate.c +++ b/lib/zlib_deflate/deflate.c | |||
@@ -255,6 +255,7 @@ int zlib_deflateInit2_( | |||
255 | } | 255 | } |
256 | 256 | ||
257 | /* ========================================================================= */ | 257 | /* ========================================================================= */ |
258 | #if 0 | ||
258 | int zlib_deflateSetDictionary( | 259 | int zlib_deflateSetDictionary( |
259 | z_streamp strm, | 260 | z_streamp strm, |
260 | const Byte *dictionary, | 261 | const Byte *dictionary, |
@@ -297,6 +298,7 @@ int zlib_deflateSetDictionary( | |||
297 | if (hash_head) hash_head = 0; /* to make compiler happy */ | 298 | if (hash_head) hash_head = 0; /* to make compiler happy */ |
298 | return Z_OK; | 299 | return Z_OK; |
299 | } | 300 | } |
301 | #endif /* 0 */ | ||
300 | 302 | ||
301 | /* ========================================================================= */ | 303 | /* ========================================================================= */ |
302 | int zlib_deflateReset( | 304 | int zlib_deflateReset( |
@@ -330,6 +332,7 @@ int zlib_deflateReset( | |||
330 | } | 332 | } |
331 | 333 | ||
332 | /* ========================================================================= */ | 334 | /* ========================================================================= */ |
335 | #if 0 | ||
333 | int zlib_deflateParams( | 336 | int zlib_deflateParams( |
334 | z_streamp strm, | 337 | z_streamp strm, |
335 | int level, | 338 | int level, |
@@ -365,6 +368,7 @@ int zlib_deflateParams( | |||
365 | s->strategy = strategy; | 368 | s->strategy = strategy; |
366 | return err; | 369 | return err; |
367 | } | 370 | } |
371 | #endif /* 0 */ | ||
368 | 372 | ||
369 | /* ========================================================================= | 373 | /* ========================================================================= |
370 | * Put a short in the pending buffer. The 16-bit value is put in MSB order. | 374 | * Put a short in the pending buffer. The 16-bit value is put in MSB order. |
@@ -572,6 +576,7 @@ int zlib_deflateEnd( | |||
572 | /* ========================================================================= | 576 | /* ========================================================================= |
573 | * Copy the source state to the destination state. | 577 | * Copy the source state to the destination state. |
574 | */ | 578 | */ |
579 | #if 0 | ||
575 | int zlib_deflateCopy ( | 580 | int zlib_deflateCopy ( |
576 | z_streamp dest, | 581 | z_streamp dest, |
577 | z_streamp source | 582 | z_streamp source |
@@ -624,6 +629,7 @@ int zlib_deflateCopy ( | |||
624 | return Z_OK; | 629 | return Z_OK; |
625 | #endif | 630 | #endif |
626 | } | 631 | } |
632 | #endif /* 0 */ | ||
627 | 633 | ||
628 | /* =========================================================================== | 634 | /* =========================================================================== |
629 | * Read a new buffer from the current input stream, update the adler32 | 635 | * Read a new buffer from the current input stream, update the adler32 |
diff --git a/lib/zlib_deflate/deflate_syms.c b/lib/zlib_deflate/deflate_syms.c index 5985b28c8e30..767b573d1ef6 100644 --- a/lib/zlib_deflate/deflate_syms.c +++ b/lib/zlib_deflate/deflate_syms.c | |||
@@ -16,6 +16,4 @@ EXPORT_SYMBOL(zlib_deflateInit_); | |||
16 | EXPORT_SYMBOL(zlib_deflateInit2_); | 16 | EXPORT_SYMBOL(zlib_deflateInit2_); |
17 | EXPORT_SYMBOL(zlib_deflateEnd); | 17 | EXPORT_SYMBOL(zlib_deflateEnd); |
18 | EXPORT_SYMBOL(zlib_deflateReset); | 18 | EXPORT_SYMBOL(zlib_deflateReset); |
19 | EXPORT_SYMBOL(zlib_deflateCopy); | ||
20 | EXPORT_SYMBOL(zlib_deflateParams); | ||
21 | MODULE_LICENSE("GPL"); | 19 | MODULE_LICENSE("GPL"); |
diff --git a/lib/zlib_inflate/infblock.c b/lib/zlib_inflate/infblock.c index 50f21ca4ef7f..c16cdeff51aa 100644 --- a/lib/zlib_inflate/infblock.c +++ b/lib/zlib_inflate/infblock.c | |||
@@ -338,6 +338,7 @@ int zlib_inflate_blocks_free( | |||
338 | } | 338 | } |
339 | 339 | ||
340 | 340 | ||
341 | #if 0 | ||
341 | void zlib_inflate_set_dictionary( | 342 | void zlib_inflate_set_dictionary( |
342 | inflate_blocks_statef *s, | 343 | inflate_blocks_statef *s, |
343 | const Byte *d, | 344 | const Byte *d, |
@@ -347,15 +348,18 @@ void zlib_inflate_set_dictionary( | |||
347 | memcpy(s->window, d, n); | 348 | memcpy(s->window, d, n); |
348 | s->read = s->write = s->window + n; | 349 | s->read = s->write = s->window + n; |
349 | } | 350 | } |
351 | #endif /* 0 */ | ||
350 | 352 | ||
351 | 353 | ||
352 | /* Returns true if inflate is currently at the end of a block generated | 354 | /* Returns true if inflate is currently at the end of a block generated |
353 | * by Z_SYNC_FLUSH or Z_FULL_FLUSH. | 355 | * by Z_SYNC_FLUSH or Z_FULL_FLUSH. |
354 | * IN assertion: s != NULL | 356 | * IN assertion: s != NULL |
355 | */ | 357 | */ |
358 | #if 0 | ||
356 | int zlib_inflate_blocks_sync_point( | 359 | int zlib_inflate_blocks_sync_point( |
357 | inflate_blocks_statef *s | 360 | inflate_blocks_statef *s |
358 | ) | 361 | ) |
359 | { | 362 | { |
360 | return s->mode == LENS; | 363 | return s->mode == LENS; |
361 | } | 364 | } |
365 | #endif /* 0 */ | ||
diff --git a/lib/zlib_inflate/infblock.h b/lib/zlib_inflate/infblock.h index f5221ddf6054..ceee60b5107c 100644 --- a/lib/zlib_inflate/infblock.h +++ b/lib/zlib_inflate/infblock.h | |||
@@ -33,12 +33,16 @@ extern int zlib_inflate_blocks_free ( | |||
33 | inflate_blocks_statef *, | 33 | inflate_blocks_statef *, |
34 | z_streamp); | 34 | z_streamp); |
35 | 35 | ||
36 | #if 0 | ||
36 | extern void zlib_inflate_set_dictionary ( | 37 | extern void zlib_inflate_set_dictionary ( |
37 | inflate_blocks_statef *s, | 38 | inflate_blocks_statef *s, |
38 | const Byte *d, /* dictionary */ | 39 | const Byte *d, /* dictionary */ |
39 | uInt n); /* dictionary length */ | 40 | uInt n); /* dictionary length */ |
41 | #endif /* 0 */ | ||
40 | 42 | ||
43 | #if 0 | ||
41 | extern int zlib_inflate_blocks_sync_point ( | 44 | extern int zlib_inflate_blocks_sync_point ( |
42 | inflate_blocks_statef *s); | 45 | inflate_blocks_statef *s); |
46 | #endif /* 0 */ | ||
43 | 47 | ||
44 | #endif /* _INFBLOCK_H */ | 48 | #endif /* _INFBLOCK_H */ |
diff --git a/lib/zlib_inflate/inflate_syms.c b/lib/zlib_inflate/inflate_syms.c index aa1b08189121..ef49738f57ec 100644 --- a/lib/zlib_inflate/inflate_syms.c +++ b/lib/zlib_inflate/inflate_syms.c | |||
@@ -15,8 +15,6 @@ EXPORT_SYMBOL(zlib_inflate); | |||
15 | EXPORT_SYMBOL(zlib_inflateInit_); | 15 | EXPORT_SYMBOL(zlib_inflateInit_); |
16 | EXPORT_SYMBOL(zlib_inflateInit2_); | 16 | EXPORT_SYMBOL(zlib_inflateInit2_); |
17 | EXPORT_SYMBOL(zlib_inflateEnd); | 17 | EXPORT_SYMBOL(zlib_inflateEnd); |
18 | EXPORT_SYMBOL(zlib_inflateSync); | ||
19 | EXPORT_SYMBOL(zlib_inflateReset); | 18 | EXPORT_SYMBOL(zlib_inflateReset); |
20 | EXPORT_SYMBOL(zlib_inflateSyncPoint); | ||
21 | EXPORT_SYMBOL(zlib_inflateIncomp); | 19 | EXPORT_SYMBOL(zlib_inflateIncomp); |
22 | MODULE_LICENSE("GPL"); | 20 | MODULE_LICENSE("GPL"); |
diff --git a/lib/zlib_inflate/inflate_sync.c b/lib/zlib_inflate/inflate_sync.c index e07bdb21f55c..61411ff89d61 100644 --- a/lib/zlib_inflate/inflate_sync.c +++ b/lib/zlib_inflate/inflate_sync.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "infblock.h" | 7 | #include "infblock.h" |
8 | #include "infutil.h" | 8 | #include "infutil.h" |
9 | 9 | ||
10 | #if 0 | ||
10 | int zlib_inflateSync( | 11 | int zlib_inflateSync( |
11 | z_streamp z | 12 | z_streamp z |
12 | ) | 13 | ) |
@@ -57,6 +58,7 @@ int zlib_inflateSync( | |||
57 | z->state->mode = BLOCKS; | 58 | z->state->mode = BLOCKS; |
58 | return Z_OK; | 59 | return Z_OK; |
59 | } | 60 | } |
61 | #endif /* 0 */ | ||
60 | 62 | ||
61 | 63 | ||
62 | /* Returns true if inflate is currently at the end of a block generated | 64 | /* Returns true if inflate is currently at the end of a block generated |
@@ -66,6 +68,7 @@ int zlib_inflateSync( | |||
66 | * decompressing, PPP checks that at the end of input packet, inflate is | 68 | * decompressing, PPP checks that at the end of input packet, inflate is |
67 | * waiting for these length bytes. | 69 | * waiting for these length bytes. |
68 | */ | 70 | */ |
71 | #if 0 | ||
69 | int zlib_inflateSyncPoint( | 72 | int zlib_inflateSyncPoint( |
70 | z_streamp z | 73 | z_streamp z |
71 | ) | 74 | ) |
@@ -74,6 +77,7 @@ int zlib_inflateSyncPoint( | |||
74 | return Z_STREAM_ERROR; | 77 | return Z_STREAM_ERROR; |
75 | return zlib_inflate_blocks_sync_point(z->state->blocks); | 78 | return zlib_inflate_blocks_sync_point(z->state->blocks); |
76 | } | 79 | } |
80 | #endif /* 0 */ | ||
77 | 81 | ||
78 | /* | 82 | /* |
79 | * This subroutine adds the data at next_in/avail_in to the output history | 83 | * This subroutine adds the data at next_in/avail_in to the output history |