DragonFly BSD
DragonFly submit List (threaded) for 2004-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: GNU gzip replacement


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Sat, 31 Jan 2004 19:49:05 +0100

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;


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]