mirror of
https://github.com/vasi/pixz
synced 2024-10-30 15:21:41 +00:00
Add -V flag to print application version
Signed-off-by: Igor Shishkin <me@teran.ru>
This commit is contained in:
parent
0829c7315c
commit
631c916068
@ -44,6 +44,7 @@ static void usage(const char *msg) {
|
||||
" -t Don't assume input is in tar format\n"
|
||||
" -k Keep original input (do not remove it)\n"
|
||||
" -c ignored\n"
|
||||
" -V Print version and exit\n"
|
||||
" -h Print this help\n"
|
||||
"\n"
|
||||
"pixz %s\n"
|
||||
@ -56,6 +57,11 @@ static void usage(const char *msg) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void version() {
|
||||
fprintf(stderr, "pixz %s\n", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
uint32_t level = LZMA_PRESET_DEFAULT;
|
||||
bool tar = true;
|
||||
@ -80,6 +86,7 @@ int main(int argc, char **argv) {
|
||||
case 'k': keep_input = true; break;
|
||||
case 'h': usage(NULL); break;
|
||||
case 'e': extreme = true; break;
|
||||
case 'V': version(); break;
|
||||
case 'f':
|
||||
optdbl = strtod(optarg, &optend);
|
||||
if (*optend || optdbl <= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user