diff options
Diffstat (limited to 'contrib/minizip/miniunz.c')
-rw-r--r-- | contrib/minizip/miniunz.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c index 8e34bd9..f103815 100644 --- a/contrib/minizip/miniunz.c +++ b/contrib/minizip/miniunz.c | |||
@@ -81,7 +81,7 @@ | |||
81 | filename : the filename of the file where date/time must be modified | 81 | filename : the filename of the file where date/time must be modified |
82 | dosdate : the new date at the MSDos format (4 bytes) | 82 | dosdate : the new date at the MSDos format (4 bytes) |
83 | tmu_date : the SAME new date at the tm_unz format */ | 83 | tmu_date : the SAME new date at the tm_unz format */ |
84 | void change_file_date(filename,dosdate,tmu_date) | 84 | static void change_file_date(filename,dosdate,tmu_date) |
85 | const char *filename; | 85 | const char *filename; |
86 | uLong dosdate; | 86 | uLong dosdate; |
87 | tm_unz tmu_date; | 87 | tm_unz tmu_date; |
@@ -123,7 +123,7 @@ void change_file_date(filename,dosdate,tmu_date) | |||
123 | /* mymkdir and change_file_date are not 100 % portable | 123 | /* mymkdir and change_file_date are not 100 % portable |
124 | As I don't know well Unix, I wait feedback for the unix portion */ | 124 | As I don't know well Unix, I wait feedback for the unix portion */ |
125 | 125 | ||
126 | int mymkdir(dirname) | 126 | static int mymkdir(dirname) |
127 | const char* dirname; | 127 | const char* dirname; |
128 | { | 128 | { |
129 | int ret=0; | 129 | int ret=0; |
@@ -137,14 +137,14 @@ int mymkdir(dirname) | |||
137 | return ret; | 137 | return ret; |
138 | } | 138 | } |
139 | 139 | ||
140 | int makedir (newdir) | 140 | static int makedir (newdir) |
141 | const char *newdir; | 141 | const char *newdir; |
142 | { | 142 | { |
143 | char *buffer ; | 143 | char *buffer ; |
144 | char *p; | 144 | char *p; |
145 | int len = (int)strlen(newdir); | 145 | size_t len = strlen(newdir); |
146 | 146 | ||
147 | if (len <= 0) | 147 | if (len == 0) |
148 | return 0; | 148 | return 0; |
149 | 149 | ||
150 | buffer = (char*)malloc(len+1); | 150 | buffer = (char*)malloc(len+1); |
@@ -187,13 +187,13 @@ int makedir (newdir) | |||
187 | return 1; | 187 | return 1; |
188 | } | 188 | } |
189 | 189 | ||
190 | void do_banner() | 190 | static void do_banner() |
191 | { | 191 | { |
192 | printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n"); | 192 | printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n"); |
193 | printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); | 193 | printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); |
194 | } | 194 | } |
195 | 195 | ||
196 | void do_help() | 196 | static void do_help() |
197 | { | 197 | { |
198 | printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \ | 198 | printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \ |
199 | " -e Extract without pathname (junk paths)\n" \ | 199 | " -e Extract without pathname (junk paths)\n" \ |
@@ -205,7 +205,7 @@ void do_help() | |||
205 | " -p extract crypted file using password\n\n"); | 205 | " -p extract crypted file using password\n\n"); |
206 | } | 206 | } |
207 | 207 | ||
208 | void Display64BitsSize(ZPOS64_T n, int size_char) | 208 | static void Display64BitsSize(ZPOS64_T n, int size_char) |
209 | { | 209 | { |
210 | /* to avoid compatibility problem , we do here the conversion */ | 210 | /* to avoid compatibility problem , we do here the conversion */ |
211 | char number[21]; | 211 | char number[21]; |
@@ -233,7 +233,7 @@ void Display64BitsSize(ZPOS64_T n, int size_char) | |||
233 | printf("%s",&number[pos_string]); | 233 | printf("%s",&number[pos_string]); |
234 | } | 234 | } |
235 | 235 | ||
236 | int do_list(uf) | 236 | static int do_list(uf) |
237 | unzFile uf; | 237 | unzFile uf; |
238 | { | 238 | { |
239 | uLong i; | 239 | uLong i; |
@@ -311,7 +311,7 @@ int do_list(uf) | |||
311 | } | 311 | } |
312 | 312 | ||
313 | 313 | ||
314 | int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) | 314 | static int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) |
315 | unzFile uf; | 315 | unzFile uf; |
316 | const int* popt_extract_without_path; | 316 | const int* popt_extract_without_path; |
317 | int* popt_overwrite; | 317 | int* popt_overwrite; |
@@ -440,7 +440,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) | |||
440 | break; | 440 | break; |
441 | } | 441 | } |
442 | if (err>0) | 442 | if (err>0) |
443 | if (fwrite(buf,err,1,fout)!=1) | 443 | if (fwrite(buf,(unsigned)err,1,fout)!=1) |
444 | { | 444 | { |
445 | printf("error in writing extracted file\n"); | 445 | printf("error in writing extracted file\n"); |
446 | err=UNZ_ERRNO; | 446 | err=UNZ_ERRNO; |
@@ -473,7 +473,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) | |||
473 | } | 473 | } |
474 | 474 | ||
475 | 475 | ||
476 | int do_extract(uf,opt_extract_without_path,opt_overwrite,password) | 476 | static int do_extract(uf,opt_extract_without_path,opt_overwrite,password) |
477 | unzFile uf; | 477 | unzFile uf; |
478 | int opt_extract_without_path; | 478 | int opt_extract_without_path; |
479 | int opt_overwrite; | 479 | int opt_overwrite; |
@@ -508,7 +508,7 @@ int do_extract(uf,opt_extract_without_path,opt_overwrite,password) | |||
508 | return 0; | 508 | return 0; |
509 | } | 509 | } |
510 | 510 | ||
511 | int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password) | 511 | static int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password) |
512 | unzFile uf; | 512 | unzFile uf; |
513 | const char* filename; | 513 | const char* filename; |
514 | int opt_extract_without_path; | 514 | int opt_extract_without_path; |