View | Details | Raw Unified | Return to bug 159665 | Differences between
and this patch

Collapse All | Expand All

(-)ctm.1 2011-08-10 17:06:01.000000000 -0500 (-1 / +4 lines)
Lines 52-59 Link Here
52
You can pass a CTM delta on stdin, or you can give the
52
You can pass a CTM delta on stdin, or you can give the
53
filename as an argument.
53
filename as an argument.
54
If you do the latter, you make life a lot
54
If you do the latter, you make life a lot
55
easier for your self, since the program can accept gzip'ed files and
55
easier for your self, since the program can accept gzip'ed,
56
bzip2'ed, or xz'ed files and
56
since it will not have to make a temporary copy of your file.
57
since it will not have to make a temporary copy of your file.
58
(If you pass it an xz'ed file, and xz is not part of your base system,
59
you will have to install xz from the ports.)
57
You can
60
You can
58
specify multiple deltas at one time, they will be processed one at a
61
specify multiple deltas at one time, they will be processed one at a
59
time.
62
time.
(-)ctm.c (+16 lines)
Lines 211-216 Link Here
211
	strcat(p,filename);
211
	strcat(p,filename);
212
	f = popen(p,"r");
212
	f = popen(p,"r");
213
	if(!f) { warn("%s", p); return Exit_Garbage; }
213
	if(!f) { warn("%s", p); return Exit_Garbage; }
214
    } else if(p && !strcmp(p,".bz2")) {
215
	p = alloca(20 + strlen(filename));
216
	strcpy(p,"bzcat < ");
217
	strcat(p,filename);
218
	f = popen(p,"r");
219
	if(!f) { warn("%s", p); return Exit_Garbage; }
220
    } else if(p && !strcmp(p,".xz")) {
221
	if (system("which -s xz") != 0) {
222
	    fprintf(stderr, "xz is not installed.  You can install it from ports.\n");
223
	    return Exit_Garbage;
224
	}
225
	p = alloca(20 + strlen(filename));
226
	strcpy(p,"xz -dc < ");
227
	strcat(p,filename);
228
	f = popen(p,"r");
229
	if(!f) { warn("%s", p); return Exit_Garbage; }
214
    } else {
230
    } else {
215
	p = 0;
231
	p = 0;
216
	f = fopen(filename,"r");
232
	f = fopen(filename,"r");

Return to bug 159665