X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fsuffix.c;h=cf8056cf9518a3f436dfdee2b73030b5de80b37f;hb=2c06a80918019471876956eef4ef22f05c9e0571;hp=23868c914f8577edb9081c99bcc3275753f1e87b;hpb=bffe1074aab0bd180b6b522f07f951f73ef59191;p=chaz%2Ftar diff --git a/src/suffix.c b/src/suffix.c index 23868c9..cf8056c 100644 --- a/src/suffix.c +++ b/src/suffix.c @@ -1,5 +1,5 @@ /* This file is part of GNU tar. - Copyright (C) 2007, 2009 Free Software Foundation, Inc. + Copyright 2007, 2009, 2013 Free Software Foundation, Inc. Written by Sergey Poznyakoff. @@ -27,7 +27,7 @@ struct compression_suffix }; static struct compression_suffix compression_suffixes[] = { -#define __CAT2__(a,b) a ## b +#define __CAT2__(a,b) a ## b #define S(s,p) #s, sizeof (#s) - 1, __CAT2__(p,_PROGRAM) { S(gz, GZIP) }, { S(tgz, GZIP) }, @@ -43,6 +43,7 @@ static struct compression_suffix compression_suffixes[] = { { S(tlz, LZMA) }, { S(lzo, LZOP) }, { S(xz, XZ) }, + { S(txz, XZ) }, /* Slackware */ #undef S #undef __CAT2__ }; @@ -54,7 +55,7 @@ static const char * find_compression_program (const char *name, const char *defprog) { char *suf = strrchr (name, '.'); - + if (suf) { int i; @@ -74,10 +75,9 @@ find_compression_program (const char *name, const char *defprog) } void -set_comression_program_by_suffix (const char *name, const char *defprog) +set_compression_program_by_suffix (const char *name, const char *defprog) { const char *program = find_compression_program (name, defprog); if (program) use_compress_program_option = program; } -