(uf,opt_extract_without_path,opt_overwrite,password)
| 473 | |
| 474 | |
| 475 | int do_extract(uf,opt_extract_without_path,opt_overwrite,password) |
| 476 | unzFile uf; |
| 477 | int opt_extract_without_path; |
| 478 | int opt_overwrite; |
| 479 | const char* password; |
| 480 | { |
| 481 | uLong i; |
| 482 | unz_global_info64 gi; |
| 483 | int err; |
| 484 | FILE* fout=NULL; |
| 485 | |
| 486 | err = unzGetGlobalInfo64(uf,&gi); |
| 487 | if (err!=UNZ_OK) |
| 488 | printf("error %d with zipfile in unzGetGlobalInfo \n",err); |
| 489 | |
| 490 | for (i=0;i<gi.number_entry;i++) |
| 491 | { |
| 492 | if (do_extract_currentfile(uf,&opt_extract_without_path, |
| 493 | &opt_overwrite, |
| 494 | password) != UNZ_OK) |
| 495 | break; |
| 496 | |
| 497 | if ((i+1)<gi.number_entry) |
| 498 | { |
| 499 | err = unzGoToNextFile(uf); |
| 500 | if (err!=UNZ_OK) |
| 501 | { |
| 502 | printf("error %d with zipfile in unzGoToNextFile\n",err); |
| 503 | break; |
| 504 | } |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | return 0; |
| 509 | } |
| 510 | |
| 511 | int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password) |
| 512 | unzFile uf; |
no test coverage detected