summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-11-28 09:22:14 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-11-28 09:22:14 +0000
commitd211214d42e1a2a8899510223674f0122b6c1ca7 (patch)
tree10f02af0bae108b5cca7732854cb37177ca73d8a /archival
parentfedbfe40595c8f503b38382b4e882f93e7ec1e40 (diff)
downloadbusybox-w32-d211214d42e1a2a8899510223674f0122b6c1ca7.tar.gz
busybox-w32-d211214d42e1a2a8899510223674f0122b6c1ca7.tar.bz2
busybox-w32-d211214d42e1a2a8899510223674f0122b6c1ca7.zip
Use error_msg instead of printf(stderr
Diffstat (limited to 'archival')
-rw-r--r--archival/gzip.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 3e7a65a86..da931579f 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -354,8 +354,8 @@ static void clear_bufs(void)
354 354
355static void write_error_msg(void) 355static void write_error_msg(void)
356{ 356{
357 fprintf(stderr, "\n"); 357 fputc('\n', stderr);
358 perror(""); 358 perror_msg("");
359 abort_gzip(); 359 abort_gzip();
360} 360}
361 361
@@ -977,12 +977,11 @@ static void check_match(IPos start, IPos match, int length)
977 /* check that the match is indeed a match */ 977 /* check that the match is indeed a match */
978 if (memcmp((char *) window + match, 978 if (memcmp((char *) window + match,
979 (char *) window + start, length) != EQUAL) { 979 (char *) window + start, length) != EQUAL) {
980 fprintf(stderr, 980 error_msg(" start %d, match %d, length %d", start, match, length);
981 " start %d, match %d, length %d\n", start, match, length);
982 error_msg("invalid match"); 981 error_msg("invalid match");
983 } 982 }
984 if (verbose > 1) { 983 if (verbose > 1) {
985 fprintf(stderr, "\\[%d,%d]", start - match, length); 984 error_msg("\\[%d,%d]", start - match, length);
986 do { 985 do {
987 putc(window[start++], stderr); 986 putc(window[start++], stderr);
988 } while (--length != 0); 987 } while (--length != 0);
@@ -1656,7 +1655,7 @@ static void set_file_type(void);
1656 1655
1657#else /* DEBUG */ 1656#else /* DEBUG */
1658# define send_code(c, tree) \ 1657# define send_code(c, tree) \
1659 { if (verbose>1) fprintf(stderr,"\ncd %3d ",(c)); \ 1658 { if (verbose>1) error_msg("\ncd %3d ",(c)); \
1660 send_bits(tree[c].Code, tree[c].Len); } 1659 send_bits(tree[c].Code, tree[c].Len); }
1661#endif 1660#endif
1662 1661
@@ -2036,7 +2035,7 @@ static void build_tree(tree_desc * desc)
2036 tree[n].Dad = tree[m].Dad = (ush) node; 2035 tree[n].Dad = tree[m].Dad = (ush) node;
2037#ifdef DUMP_BL_TREE 2036#ifdef DUMP_BL_TREE
2038 if (tree == bl_tree) { 2037 if (tree == bl_tree) {
2039 fprintf(stderr, "\nnode %d(%d), sons %d(%d) %d(%d)", 2038 error_msg("\nnode %d(%d), sons %d(%d) %d(%d)",
2040 node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); 2039 node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
2041 } 2040 }
2042#endif 2041#endif