Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kubo/snzip
Browse files Browse the repository at this point in the history
  • Loading branch information
kubo committed Nov 23, 2013
2 parents 28c41ab + dcd2a1c commit 6cc2350
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions snzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ int main(int argc, char **argv)

if (optind == argc) {
trace("no arguments are set.\n");
if (isatty(1)) {
/* stdout is a terminal */
fprintf(stderr, "I won't write compressed data to a terminal.\n");
fprintf(stderr, "For help, type: '%s -h'.\n", progname);
return 1;
}

if (opt_uncompress) {
int skip_magic = 0;
Expand All @@ -280,6 +274,12 @@ int main(int argc, char **argv)
}
return fmt->uncompress(stdin, stdout, skip_magic);
} else {
if (isatty(1)) {
/* stdout is a terminal */
fprintf(stderr, "I won't write compressed data to a terminal.\n");
fprintf(stderr, "For help, type: '%s -h'.\n", progname);
return 1;
}
return fmt->compress(stdin, stdout, block_size);
}
}
Expand Down

0 comments on commit 6cc2350

Please sign in to comment.