[BusyBox-cvs] busybox/archival gzip.c,1.56,1.57

Glenn McGrath bug1 at busybox.net
Thu Nov 28 09:22:18 UTC 2002


Update of /var/cvs/busybox/archival
In directory winder:/tmp/cvs-serv21434/archival

Modified Files:
	gzip.c 
Log Message:
Use error_msg instead of printf(stderr


Index: gzip.c
===================================================================
RCS file: /var/cvs/busybox/archival/gzip.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- gzip.c	22 Aug 2002 19:15:26 -0000	1.56
+++ gzip.c	28 Nov 2002 09:22:14 -0000	1.57
@@ -354,8 +354,8 @@
 
 static void write_error_msg(void)
 {
-	fprintf(stderr, "\n");
-	perror("");
+	fputc('\n', stderr);
+	perror_msg("");
 	abort_gzip();
 }
 
@@ -977,12 +977,11 @@
 	/* check that the match is indeed a match */
 	if (memcmp((char *) window + match,
 			   (char *) window + start, length) != EQUAL) {
-		fprintf(stderr,
-				" start %d, match %d, length %d\n", start, match, length);
+		error_msg(" start %d, match %d, length %d", start, match, length);
 		error_msg("invalid match");
 	}
 	if (verbose > 1) {
-		fprintf(stderr, "\\[%d,%d]", start - match, length);
+		error_msg("\\[%d,%d]", start - match, length);
 		do {
 			putc(window[start++], stderr);
 		} while (--length != 0);
@@ -1656,7 +1655,7 @@
 
 #else							/* DEBUG */
 #  define send_code(c, tree) \
-     { if (verbose>1) fprintf(stderr,"\ncd %3d ",(c)); \
+     { if (verbose>1) error_msg("\ncd %3d ",(c)); \
        send_bits(tree[c].Code, tree[c].Len); }
 #endif
 
@@ -2036,7 +2035,7 @@
 		tree[n].Dad = tree[m].Dad = (ush) node;
 #ifdef DUMP_BL_TREE
 		if (tree == bl_tree) {
-			fprintf(stderr, "\nnode %d(%d), sons %d(%d) %d(%d)",
+			error_msg("\nnode %d(%d), sons %d(%d) %d(%d)",
 					node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
 		}
 #endif




More information about the busybox-cvs mailing list