aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-07-17 01:12:36 +0000
committerEric Andersen <andersen@codepoet.org>2001-07-17 01:12:36 +0000
commit044228d5ecb9b79397f9fc915d046cf4538281e2 (patch)
tree4c43e4947b0196d807249f8f6e1c9c679b6bbcde /libbb
parent51ded05b3bf4df6f126420d39a40d27ea0728aa9 (diff)
downloadbusybox-w32-044228d5ecb9b79397f9fc915d046cf4538281e2.tar.gz
busybox-w32-044228d5ecb9b79397f9fc915d046cf4538281e2.tar.bz2
busybox-w32-044228d5ecb9b79397f9fc915d046cf4538281e2.zip
This is vodz' latest patch. Sorry it took so long...
1) ping cleanup (compile fix from this patch already applied). 2) traceroute call not spare ntohl() now (and reduce size); 3) Fix for functions not declared static in insmod, ash, vi and mount. 4) a more simple API cmdedit :)) 5) adds "stopped jobs" warning to ash on Ctrl-D and fixes "ignoreeof" option 6) reduce exporting library function index->strchr (traceroute), bzero->memset (syslogd)
Diffstat (limited to 'libbb')
-rw-r--r--libbb/unzip.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/libbb/unzip.c b/libbb/unzip.c
index 359957196..ee746216d 100644
--- a/libbb/unzip.c
+++ b/libbb/unzip.c
@@ -67,7 +67,7 @@ static char *license_msg[] = {
67#include <string.h> 67#include <string.h>
68#include "libbb.h" 68#include "libbb.h"
69 69
70FILE *in_file, *out_file; 70static FILE *in_file, *out_file;
71 71
72/* these are freed by gz_close */ 72/* these are freed by gz_close */
73static unsigned char *window; 73static unsigned char *window;
@@ -91,9 +91,9 @@ static const int N_MAX = 288; /* maximum number of codes in any set */
91static long bytes_out; /* number of output bytes */ 91static long bytes_out; /* number of output bytes */
92static unsigned long outcnt; /* bytes in output buffer */ 92static unsigned long outcnt; /* bytes in output buffer */
93 93
94unsigned hufts; /* track memory usage */ 94static unsigned hufts; /* track memory usage */
95unsigned long bb; /* bit buffer */ 95static unsigned long bb; /* bit buffer */
96unsigned bk; /* bits in bit buffer */ 96static unsigned bk; /* bits in bit buffer */
97 97
98typedef struct huft_s { 98typedef struct huft_s {
99 unsigned char e; /* number of extra bits or operation */ 99 unsigned char e; /* number of extra bits or operation */
@@ -104,7 +104,7 @@ typedef struct huft_s {
104 } v; 104 } v;
105} huft_t; 105} huft_t;
106 106
107unsigned short mask_bits[] = { 107static const unsigned short mask_bits[] = {
108 0x0000, 108 0x0000,
109 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 109 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
110 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff 110 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
@@ -154,7 +154,7 @@ static void make_crc_table()
154 * Write the output window window[0..outcnt-1] and update crc and bytes_out. 154 * Write the output window window[0..outcnt-1] and update crc and bytes_out.
155 * (Used for the decompressed data only.) 155 * (Used for the decompressed data only.)
156 */ 156 */
157void flush_window() 157static void flush_window(void)
158{ 158{
159 int n; 159 int n;
160 160
@@ -1021,10 +1021,6 @@ extern void gz_close(int gunzip_pid)
1021 if (waitpid(gunzip_pid, NULL, 0) == -1) { 1021 if (waitpid(gunzip_pid, NULL, 0) == -1) {
1022 printf("Couldnt wait ?"); 1022 printf("Couldnt wait ?");
1023 } 1023 }
1024 if (window) {
1025 free(window); 1024 free(window);
1026 }
1027 if (crc_table) {
1028 free(crc_table); 1025 free(crc_table);
1029 }
1030} 1026}