diff options
author | Aaron Lehmann <aaronl@vitelius.com> | 2002-06-23 22:13:22 +0000 |
---|---|---|
committer | Aaron Lehmann <aaronl@vitelius.com> | 2002-06-23 22:13:22 +0000 |
commit | 9031481ac34212cb81dd97035a1891418605d5ee (patch) | |
tree | da962d7594f6f9b3a5682835dc4d6f26f219bf3d | |
parent | ed119939003cb9a24614b8bd388d9157bd161aac (diff) | |
download | busybox-w32-9031481ac34212cb81dd97035a1891418605d5ee.tar.gz busybox-w32-9031481ac34212cb81dd97035a1891418605d5ee.tar.bz2 busybox-w32-9031481ac34212cb81dd97035a1891418605d5ee.zip |
inline many functions that are only called once. saves about 300 bytes
on i386. also staticify most functions.
-rw-r--r-- | archival/bunzip2.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c index fd639a4e8..356895b32 100644 --- a/archival/bunzip2.c +++ b/archival/bunzip2.c | |||
@@ -320,7 +320,7 @@ const unsigned int BZ2_crc32Table[256] = { | |||
320 | 0xbcb4666dL, 0xb8757bdaL, 0xb5365d03L, 0xb1f740b4L | 320 | 0xbcb4666dL, 0xb8757bdaL, 0xb5365d03L, 0xb1f740b4L |
321 | }; | 321 | }; |
322 | 322 | ||
323 | void bz_rand_udp_mask(DState *s) | 323 | static void bz_rand_udp_mask(DState *s) |
324 | { | 324 | { |
325 | if (s->rNToGo == 0) { | 325 | if (s->rNToGo == 0) { |
326 | s->rNToGo = BZ2_rNums[s->rTPos]; | 326 | s->rNToGo = BZ2_rNums[s->rTPos]; |
@@ -342,7 +342,7 @@ static unsigned char myfeof(FILE *f) | |||
342 | return(FALSE); | 342 | return(FALSE); |
343 | } | 343 | } |
344 | 344 | ||
345 | void BZ2_hbCreateDecodeTables(int *limit, int *base, int *perm, unsigned char *length, int minLen, int maxLen, int alphaSize ) | 345 | static void BZ2_hbCreateDecodeTables(int *limit, int *base, int *perm, unsigned char *length, int minLen, int maxLen, int alphaSize ) |
346 | { | 346 | { |
347 | int pp, i, j, vec; | 347 | int pp, i, j, vec; |
348 | 348 | ||
@@ -403,7 +403,7 @@ static int get_bits(DState *s, int *vvv, char nnn) | |||
403 | return(TRUE); | 403 | return(TRUE); |
404 | } | 404 | } |
405 | 405 | ||
406 | int bz_get_fast(DState *s) | 406 | static int bz_get_fast(DState *s) |
407 | { | 407 | { |
408 | int cccc; | 408 | int cccc; |
409 | s->tPos = s->tt[s->tPos]; | 409 | s->tPos = s->tt[s->tPos]; |
@@ -413,7 +413,7 @@ int bz_get_fast(DState *s) | |||
413 | } | 413 | } |
414 | 414 | ||
415 | /*---------------------------------------------------*/ | 415 | /*---------------------------------------------------*/ |
416 | int BZ2_decompress(DState *s) | 416 | static inline int BZ2_decompress(DState *s) |
417 | { | 417 | { |
418 | int uc = 0; | 418 | int uc = 0; |
419 | int retVal; | 419 | int retVal; |
@@ -1295,7 +1295,7 @@ save_state_and_return: | |||
1295 | } | 1295 | } |
1296 | 1296 | ||
1297 | //int BZ2_bzDecompressInit(bz_stream* strm, int verbosity_level, int small) | 1297 | //int BZ2_bzDecompressInit(bz_stream* strm, int verbosity_level, int small) |
1298 | int BZ2_bzDecompressInit(bz_stream* strm) | 1298 | static inline int BZ2_bzDecompressInit(bz_stream* strm) |
1299 | { | 1299 | { |
1300 | DState* s; | 1300 | DState* s; |
1301 | 1301 | ||
@@ -1315,7 +1315,7 @@ int BZ2_bzDecompressInit(bz_stream* strm) | |||
1315 | return BZ_OK; | 1315 | return BZ_OK; |
1316 | } | 1316 | } |
1317 | 1317 | ||
1318 | void bz_seterr(int eee, int *bzerror, bzFile **bzf) | 1318 | static void bz_seterr(int eee, int *bzerror, bzFile **bzf) |
1319 | { | 1319 | { |
1320 | if (bzerror != NULL) { | 1320 | if (bzerror != NULL) { |
1321 | *bzerror = eee; | 1321 | *bzerror = eee; |
@@ -1549,7 +1549,7 @@ return_notr: | |||
1549 | /* end save */ | 1549 | /* end save */ |
1550 | } | 1550 | } |
1551 | } | 1551 | } |
1552 | 1552 | static inline | |
1553 | int BZ2_bzDecompress(bz_stream *strm) | 1553 | int BZ2_bzDecompress(bz_stream *strm) |
1554 | { | 1554 | { |
1555 | DState* s; | 1555 | DState* s; |
@@ -1590,7 +1590,7 @@ int BZ2_bzDecompress(bz_stream *strm) | |||
1590 | return(0); /*NOTREACHED*/ | 1590 | return(0); /*NOTREACHED*/ |
1591 | } | 1591 | } |
1592 | 1592 | ||
1593 | int BZ2_bzRead(int *bzerror, void *b, void *buf, int len) | 1593 | static inline int BZ2_bzRead(int *bzerror, void *b, void *buf, int len) |
1594 | { | 1594 | { |
1595 | int n, ret; | 1595 | int n, ret; |
1596 | bzFile *bzf = (bzFile*)b; | 1596 | bzFile *bzf = (bzFile*)b; |
@@ -1646,7 +1646,7 @@ int BZ2_bzRead(int *bzerror, void *b, void *buf, int len) | |||
1646 | return(0); /*not reached*/ | 1646 | return(0); /*not reached*/ |
1647 | } | 1647 | } |
1648 | 1648 | ||
1649 | void *BZ2_bzReadOpen(int *bzerror, FILE *f, void *unused, int nUnused) | 1649 | static inline void *BZ2_bzReadOpen(int *bzerror, FILE *f, void *unused, int nUnused) |
1650 | { | 1650 | { |
1651 | bzFile *bzf = xmalloc(sizeof(bzFile)); | 1651 | bzFile *bzf = xmalloc(sizeof(bzFile)); |
1652 | int ret; | 1652 | int ret; |
@@ -1676,7 +1676,7 @@ void *BZ2_bzReadOpen(int *bzerror, FILE *f, void *unused, int nUnused) | |||
1676 | return bzf; | 1676 | return bzf; |
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | static unsigned char uncompressStream(FILE *zStream, FILE *stream) | 1679 | static inline unsigned char uncompressStream(FILE *zStream, FILE *stream) |
1680 | { | 1680 | { |
1681 | unsigned char unused[BZ_MAX_UNUSED]; | 1681 | unsigned char unused[BZ_MAX_UNUSED]; |
1682 | unsigned char *unusedTmp; | 1682 | unsigned char *unusedTmp; |