Changeset 95239 in vbox for trunk/src/libs/zlib-1.2.12/contrib/minizip/miniunz.c
- Timestamp:
- Jun 9, 2022 9:09:44 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151769
- Location:
- trunk/src/libs/zlib-1.2.12
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/zlib-1.2.12
- Property svn:mergeinfo
-
old new 20 20 /branches/dsen/gui3/src/libs/zlib-1.2.11:79645-79692 21 21 /trunk/src/src/libs/zlib-1.2.11:92342 22 /vendor/zlib/1.2.12:151751 23 /vendor/zlib/current:150724-151750
-
- Property svn:mergeinfo
-
trunk/src/libs/zlib-1.2.12/contrib/minizip/miniunz.c
r76163 r95239 46 46 #include <errno.h> 47 47 #include <fcntl.h> 48 #include <sys/stat.h> 48 49 49 50 #ifdef _WIN32 … … 81 82 dosdate : the new date at the MSDos format (4 bytes) 82 83 tmu_date : the SAME new date at the tm_unz format */ 83 void change_file_date(filename,dosdate,tmu_date)84 static void change_file_date(filename,dosdate,tmu_date) 84 85 const char *filename; 85 86 uLong dosdate; … … 98 99 CloseHandle(hFile); 99 100 #else 100 #ifdef unix || __APPLE__ 101 #if defined(unix) || defined(__APPLE__) 102 (void)dosdate; 101 103 struct utimbuf ut; 102 104 struct tm newdate; … … 122 124 As I don't know well Unix, I wait feedback for the unix portion */ 123 125 124 int mymkdir(dirname)126 static int mymkdir(dirname) 125 127 const char* dirname; 126 128 { … … 136 138 } 137 139 138 int makedir (newdir)139 c har *newdir;140 static int makedir (newdir) 141 const char *newdir; 140 142 { 141 143 char *buffer ; 142 144 char *p; 143 int len = (int)strlen(newdir);144 145 if (len <= 0)145 size_t len = strlen(newdir); 146 147 if (len == 0) 146 148 return 0; 147 149 … … 186 188 } 187 189 188 void do_banner()190 static void do_banner() 189 191 { 190 192 printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n"); … … 192 194 } 193 195 194 void do_help()196 static void do_help() 195 197 { 196 198 printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \ … … 204 206 } 205 207 206 void Display64BitsSize(ZPOS64_T n, int size_char)208 static void Display64BitsSize(ZPOS64_T n, int size_char) 207 209 { 208 210 /* to avoid compatibility problem , we do here the conversion */ … … 232 234 } 233 235 234 int do_list(uf)236 static int do_list(uf) 235 237 unzFile uf; 236 238 { … … 310 312 311 313 312 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) 313 315 unzFile uf; 314 316 const int* popt_extract_without_path; … … 325 327 326 328 unz_file_info64 file_info; 327 uLong ratio=0;328 329 err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0); 329 330 … … 440 441 } 441 442 if (err>0) 442 if (fwrite(buf, err,1,fout)!=1)443 if (fwrite(buf,(unsigned)err,1,fout)!=1) 443 444 { 444 445 printf("error in writing extracted file\n"); … … 473 474 474 475 475 int do_extract(uf,opt_extract_without_path,opt_overwrite,password)476 static int do_extract(uf,opt_extract_without_path,opt_overwrite,password) 476 477 unzFile uf; 477 478 int opt_extract_without_path; … … 482 483 unz_global_info64 gi; 483 484 int err; 484 FILE* fout=NULL;485 485 486 486 err = unzGetGlobalInfo64(uf,&gi); … … 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 512 unzFile uf; 513 513 const char* filename; … … 516 516 const char* password; 517 517 { 518 int err = UNZ_OK;519 518 if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK) 520 519 {
Note:
See TracChangeset
for help on using the changeset viewer.