aboutsummaryrefslogtreecommitdiffstats
path: root/lib/decompress_bunzip2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/decompress_bunzip2.c')
-rw-r--r--lib/decompress_bunzip2.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c
index 31c5f7675fbf..8290e0bef7ea 100644
--- a/lib/decompress_bunzip2.c
+++ b/lib/decompress_bunzip2.c
@@ -92,8 +92,8 @@ struct bunzip_data {
92 /* State for interrupting output loop */ 92 /* State for interrupting output loop */
93 int writeCopies, writePos, writeRunCountdown, writeCount, writeCurrent; 93 int writeCopies, writePos, writeRunCountdown, writeCount, writeCurrent;
94 /* I/O tracking data (file handles, buffers, positions, etc.) */ 94 /* I/O tracking data (file handles, buffers, positions, etc.) */
95 int (*fill)(void*, unsigned int); 95 long (*fill)(void*, unsigned long);
96 int inbufCount, inbufPos /*, outbufPos*/; 96 long inbufCount, inbufPos /*, outbufPos*/;
97 unsigned char *inbuf /*,*outbuf*/; 97 unsigned char *inbuf /*,*outbuf*/;
98 unsigned int inbufBitCount, inbufBits; 98 unsigned int inbufBitCount, inbufBits;
99 /* The CRC values stored in the block header and calculated from the 99 /* The CRC values stored in the block header and calculated from the
@@ -617,7 +617,7 @@ decode_next_byte:
617 goto decode_next_byte; 617 goto decode_next_byte;
618} 618}
619 619
620static int INIT nofill(void *buf, unsigned int len) 620static long INIT nofill(void *buf, unsigned long len)
621{ 621{
622 return -1; 622 return -1;
623} 623}
@@ -625,8 +625,8 @@ static int INIT nofill(void *buf, unsigned int len)
625/* Allocate the structure, read file header. If in_fd ==-1, inbuf must contain 625/* Allocate the structure, read file header. If in_fd ==-1, inbuf must contain
626 a complete bunzip file (len bytes long). If in_fd!=-1, inbuf and len are 626 a complete bunzip file (len bytes long). If in_fd!=-1, inbuf and len are
627 ignored, and data is read from file handle into temporary buffer. */ 627 ignored, and data is read from file handle into temporary buffer. */
628static int INIT start_bunzip(struct bunzip_data **bdp, void *inbuf, int len, 628static int INIT start_bunzip(struct bunzip_data **bdp, void *inbuf, long len,
629 int (*fill)(void*, unsigned int)) 629 long (*fill)(void*, unsigned long))
630{ 630{
631 struct bunzip_data *bd; 631 struct bunzip_data *bd;
632 unsigned int i, j, c; 632 unsigned int i, j, c;
@@ -675,11 +675,11 @@ static int INIT start_bunzip(struct bunzip_data **bdp, void *inbuf, int len,
675 675
676/* Example usage: decompress src_fd to dst_fd. (Stops at end of bzip2 data, 676/* Example usage: decompress src_fd to dst_fd. (Stops at end of bzip2 data,
677 not end of file.) */ 677 not end of file.) */
678STATIC int INIT bunzip2(unsigned char *buf, int len, 678STATIC int INIT bunzip2(unsigned char *buf, long len,
679 int(*fill)(void*, unsigned int), 679 long (*fill)(void*, unsigned long),
680 int(*flush)(void*, unsigned int), 680 long (*flush)(void*, unsigned long),
681 unsigned char *outbuf, 681 unsigned char *outbuf,
682 int *pos, 682 long *pos,
683 void(*error)(char *x)) 683 void(*error)(char *x))
684{ 684{
685 struct bunzip_data *bd; 685 struct bunzip_data *bd;
@@ -743,11 +743,11 @@ exit_0:
743} 743}
744 744
745#ifdef PREBOOT 745#ifdef PREBOOT
746STATIC int INIT decompress(unsigned char *buf, int len, 746STATIC int INIT decompress(unsigned char *buf, long len,
747 int(*fill)(void*, unsigned int), 747 long (*fill)(void*, unsigned long),
748 int(*flush)(void*, unsigned int), 748 long (*flush)(void*, unsigned long),
749 unsigned char *outbuf, 749 unsigned char *outbuf,
750 int *pos, 750 long *pos,
751 void(*error)(char *x)) 751 void(*error)(char *x))
752{ 752{
753 return bunzip2(buf, len - 4, fill, flush, outbuf, pos, error); 753 return bunzip2(buf, len - 4, fill, flush, outbuf, pos, error);