bytebuffer_offset++;
*current += 8;
}
- return(bitbuffer);
+ return bitbuffer;
}
/*
if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0) {
if (i == 1) {
- bb_error_msg_and_die("Incomplete literal tree");
+ bb_error_msg_and_die("incomplete literal tree");
huft_free(tl);
}
return i; /* incomplete code set */
free(bytebuffer);
}
-int inflate_unzip(int in, int out)
+USE_DESKTOP(long long) int
+inflate_unzip(int in, int out)
{
+ USE_DESKTOP(long long total = 0;)
ssize_t nwrote;
typedef void (*sig_type) (int);
bb_perror_msg("write");
return -1;
}
+ USE_DESKTOP(total += nwrote;)
if (ret == 0) break;
}
gunzip_bb >>= 8;
gunzip_bk -= 8;
}
- return 0;
+ return USE_DESKTOP(total) + 0;
}
-int inflate_gunzip(int in, int out)
+USE_DESKTOP(long long) int
+inflate_gunzip(int in, int out)
{
uint32_t stored_crc = 0;
unsigned int count;
+ USE_DESKTOP(long long total = )inflate_unzip(in, out);
- inflate_unzip(in, out);
+ USE_DESKTOP(if (total < 0) return total;)
/* top up the input buffer with the rest of the trailer */
count = bytebuffer_size - bytebuffer_offset;
return -1;
}
- return 0;
+ return USE_DESKTOP(total) + 0;
}