Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix extreme option parsing, fixes issue #12

  • Loading branch information...
commit 7cb4483962d02a18ad30791d4102144cc0ce0f5e 1 parent c1d6c1c
@vasi authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 pixz.c
View
5 pixz.c
@@ -55,6 +55,7 @@ int main(int argc, char **argv) {
uint32_t level = LZMA_PRESET_DEFAULT;
bool tar = true;
bool keep_input = false;
+ bool extreme = false;
pixz_op_t op = OP_WRITE;
char *ipath = NULL, *opath = NULL;
@@ -72,7 +73,7 @@ int main(int argc, char **argv) {
case 't': tar = false; break;
case 'k': keep_input = true; break;
case 'h': usage(NULL); break;
- case 'e': level |= LZMA_PRESET_EXTREME; break;
+ case 'e': extreme = true; break;
case 'f':
optdbl = strtod(optarg, &optend);
if (*optend || optdbl <= 0)
@@ -133,6 +134,8 @@ int main(int argc, char **argv) {
case OP_WRITE:
if (isatty(fileno(gOutFile)) == 1)
usage("Refusing to output to a TTY");
+ if (extreme)
+ level |= LZMA_PRESET_EXTREME;
pixz_write(tar, level);
break;
case OP_READ: pixz_read(tar, 0, NULL); break;
Please sign in to comment.
Something went wrong with that request. Please try again.