diff options
author | Matt Kraai <kraai@debian.org> | 2000-11-08 06:52:57 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-11-08 06:52:57 +0000 |
commit | 7918e1fd549adbcf1df30f73914104436504d5e5 (patch) | |
tree | 2e6db6a2924c6cf805c0ccd0f827c8bf35b21ee9 | |
parent | d8ad76cb31ff7c4b2d97cc66eafc4297f5cea7d7 (diff) | |
download | busybox-w32-7918e1fd549adbcf1df30f73914104436504d5e5.tar.gz busybox-w32-7918e1fd549adbcf1df30f73914104436504d5e5.tar.bz2 busybox-w32-7918e1fd549adbcf1df30f73914104436504d5e5.zip |
Move flush_outbuf to the file in which it is used, and by doing so fix a
nasty error dealing with two different variables with the same name.
-rw-r--r-- | archival/gunzip.c | 15 | ||||
-rw-r--r-- | archival/gzip.c | 14 | ||||
-rw-r--r-- | gunzip.c | 15 | ||||
-rw-r--r-- | gzip.c | 14 |
4 files changed, 28 insertions, 30 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index 1ff3c40fb..70b25bdb0 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c | |||
@@ -1176,21 +1176,6 @@ void clear_bufs(void) | |||
1176 | bytes_in = bytes_out = 0L; | 1176 | bytes_in = bytes_out = 0L; |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | /* =========================================================================== | ||
1180 | * Write the output buffer outbuf[0..outcnt-1] and update bytes_out. | ||
1181 | * (used for the compressed data only) | ||
1182 | */ | ||
1183 | void flush_outbuf() | ||
1184 | { | ||
1185 | if (outcnt == 0) | ||
1186 | return; | ||
1187 | |||
1188 | if (!test_mode) | ||
1189 | write_buf(ofd, (char *) outbuf, outcnt); | ||
1190 | bytes_out += (ulg) outcnt; | ||
1191 | outcnt = 0; | ||
1192 | } | ||
1193 | |||
1194 | /* ======================================================================== */ | 1179 | /* ======================================================================== */ |
1195 | int gunzip_main(int argc, char **argv) | 1180 | int gunzip_main(int argc, char **argv) |
1196 | { | 1181 | { |
diff --git a/archival/gzip.c b/archival/gzip.c index add94d0d7..2e147b1ca 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -3380,3 +3380,17 @@ unsigned size; | |||
3380 | isize += (ulg) len; | 3380 | isize += (ulg) len; |
3381 | return (int) len; | 3381 | return (int) len; |
3382 | } | 3382 | } |
3383 | |||
3384 | /* =========================================================================== | ||
3385 | * Write the output buffer outbuf[0..outcnt-1] and update bytes_out. | ||
3386 | * (used for the compressed data only) | ||
3387 | */ | ||
3388 | void flush_outbuf() | ||
3389 | { | ||
3390 | if (outcnt == 0) | ||
3391 | return; | ||
3392 | |||
3393 | write_buf(ofd, (char *) outbuf, outcnt); | ||
3394 | bytes_out += (ulg) outcnt; | ||
3395 | outcnt = 0; | ||
3396 | } | ||
@@ -1176,21 +1176,6 @@ void clear_bufs(void) | |||
1176 | bytes_in = bytes_out = 0L; | 1176 | bytes_in = bytes_out = 0L; |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | /* =========================================================================== | ||
1180 | * Write the output buffer outbuf[0..outcnt-1] and update bytes_out. | ||
1181 | * (used for the compressed data only) | ||
1182 | */ | ||
1183 | void flush_outbuf() | ||
1184 | { | ||
1185 | if (outcnt == 0) | ||
1186 | return; | ||
1187 | |||
1188 | if (!test_mode) | ||
1189 | write_buf(ofd, (char *) outbuf, outcnt); | ||
1190 | bytes_out += (ulg) outcnt; | ||
1191 | outcnt = 0; | ||
1192 | } | ||
1193 | |||
1194 | /* ======================================================================== */ | 1179 | /* ======================================================================== */ |
1195 | int gunzip_main(int argc, char **argv) | 1180 | int gunzip_main(int argc, char **argv) |
1196 | { | 1181 | { |
@@ -3380,3 +3380,17 @@ unsigned size; | |||
3380 | isize += (ulg) len; | 3380 | isize += (ulg) len; |
3381 | return (int) len; | 3381 | return (int) len; |
3382 | } | 3382 | } |
3383 | |||
3384 | /* =========================================================================== | ||
3385 | * Write the output buffer outbuf[0..outcnt-1] and update bytes_out. | ||
3386 | * (used for the compressed data only) | ||
3387 | */ | ||
3388 | void flush_outbuf() | ||
3389 | { | ||
3390 | if (outcnt == 0) | ||
3391 | return; | ||
3392 | |||
3393 | write_buf(ofd, (char *) outbuf, outcnt); | ||
3394 | bytes_out += (ulg) outcnt; | ||
3395 | outcnt = 0; | ||
3396 | } | ||