gzip, gunzip: accept -n option

This commit is contained in:
Eric Biggers 2016-10-23 13:54:53 -07:00
parent 5cc0fc2bbd
commit 8be0bbfabb

View File

@ -47,7 +47,7 @@ struct options {
const tchar *suffix;
};
static const tchar *const optstring = T("1::2::3::4::5::6::7::8::9::cdfhkS:V");
static const tchar *const optstring = T("1::2::3::4::5::6::7::8::9::cdfhknS:V");
static void
show_usage(FILE *fp)
@ -530,6 +530,14 @@ tmain(int argc, tchar *argv[])
case 'k':
options.keep = true;
break;
case 'n':
/*
* -n means don't save or restore the original filename
* in the gzip header. Currently this implementation
* already behaves this way by default, so accept the
* option as a no-op.
*/
break;
case 'S':
options.suffix = toptarg;
if (options.suffix[0] == T('\0')) {