X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=gzip.c;h=38e1373e474edd30a0a71825b7281d8429948a9c;hb=4ee107046a0ffd91f6c60c787326a5e27b799f6d;hp=35b36031f4f3f9739c442578f7e308e7894eed53;hpb=dc84183747ce1703eb99685b5dbde1f65a143c06;p=debian%2Fgzip diff --git a/gzip.c b/gzip.c index 35b3603..38e1373 100644 --- a/gzip.c +++ b/gzip.c @@ -213,6 +213,7 @@ int ofd; /* output file descriptor */ unsigned insize; /* valid bytes in inbuf */ unsigned inptr; /* index of next byte to be processed in inbuf */ unsigned outcnt; /* bytes in output buffer */ +int rsync = 0; /* make ryncable chunks */ static int handled_sig[] = { @@ -270,7 +271,7 @@ static const struct option longopts[] = {"best", 0, 0, '9'}, /* compress better */ {"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */ {"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */ - + {"rsyncable", 0, 0, 'R'}, /* make rsync-friendly archive */ { 0, 0, 0, 0 } }; @@ -353,6 +354,7 @@ local void help() " -Z, --lzw produce output compatible with old compress", " -b, --bits=BITS max number of bits per code (implies -Z)", #endif + " --rsyncable Make rsync-friendly archive", "", "With no FILE, or when FILE is -, read standard input.", "", @@ -481,8 +483,11 @@ int main (int argc, char **argv) #else recursive = 1; #endif - break; - case 'S': + break; + case 'R': + rsync = 1; break; + + case 'S': #ifdef NO_MULTIPLE_DOTS if (*optarg == '.') optarg++; #endif