64 |
* total written bytes so far otherwise |
* total written bytes so far otherwise |
65 |
*/ |
*/ |
66 |
static |
static |
67 |
USE_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, void *wbuf) |
IF_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, void *wbuf) |
68 |
{ |
{ |
69 |
int n, n2, ret; |
int n, n2, ret; |
70 |
|
|
98 |
if (rlen && strm->avail_in == 0) |
if (rlen && strm->avail_in == 0) |
99 |
break; |
break; |
100 |
} |
} |
101 |
return 0 USE_DESKTOP( + strm->total_out ); |
return 0 IF_DESKTOP( + strm->total_out ); |
102 |
} |
} |
103 |
|
|
104 |
static |
static |
105 |
USE_DESKTOP(long long) int compressStream(unpack_info_t *info UNUSED_PARAM) |
IF_DESKTOP(long long) int compressStream(unpack_info_t *info UNUSED_PARAM) |
106 |
{ |
{ |
107 |
USE_DESKTOP(long long) int total; |
IF_DESKTOP(long long) int total; |
108 |
ssize_t count; |
ssize_t count; |
109 |
bz_stream bzs; /* it's small */ |
bz_stream bzs; /* it's small */ |
110 |
#define strm (&bzs) |
#define strm (&bzs) |
163 |
|
|
164 |
opt_complementary = "s2"; /* -s means -2 (compatibility) */ |
opt_complementary = "s2"; /* -s means -2 (compatibility) */ |
165 |
/* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */ |
/* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */ |
166 |
opt = getopt32(argv, "cfv" USE_BUNZIP2("dt") "123456789qzs"); |
opt = getopt32(argv, "cfv" IF_BUNZIP2("dt") "123456789qzs"); |
167 |
#if ENABLE_BUNZIP2 /* bunzip2_main may not be visible... */ |
#if ENABLE_BUNZIP2 /* bunzip2_main may not be visible... */ |
168 |
if (opt & 0x18) // -d and/or -t |
if (opt & 0x18) // -d and/or -t |
169 |
return bunzip2_main(argc, argv); |
return bunzip2_main(argc, argv); |