GNU gzip replacement

Joerg Sonnenberger joerg at britannica.bec.de
Sat Jan 31 10:50:21 PST 2004


Small bugfix, I introduced the bug while removing __progname, which
is undocumented.

Joerg
diff -u compress.orig/main.c compress/main.c
--- compress.orig/main.c	Sat Jan 31 17:25:24 2004
+++ compress/main.c	Sat Jan 31 19:41:24 2004
@@ -131,8 +131,8 @@
 
 	bits = oflag = 0;
 	nosave = -1;
-	progname = argv[0];
-	p = argv[0];
+	progname = basename(argv[0]);
+	p = progname;
 	if (p[0] == 'g') {
 		method = M_DEFLATE;
 		bits = 6;




More information about the Submit mailing list