Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
| 3404 | // return UNZ_OK if there is no problem |
| 3405 | // return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. |
| 3406 | int unzGoToNextFile (unzFile file) |
| 3407 | { |
| 3408 | unz_s* s; |
| 3409 | int err; |
| 3410 | |
| 3411 | if (file==NULL) |
| 3412 | return UNZ_PARAMERROR; |
| 3413 | s=(unz_s*)file; |
| 3414 | if (!s->current_file_ok) |
| 3415 | return UNZ_END_OF_LIST_OF_FILE; |
| 3416 | if (s->num_file+1==s->gi.number_entry) |
| 3417 | return UNZ_END_OF_LIST_OF_FILE; |
| 3418 | |
| 3419 | s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + |
| 3420 | s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; |
| 3421 | s->num_file++; |
| 3422 | err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, |
| 3423 | &s->cur_file_info_internal, |
| 3424 | NULL,0,NULL,0,NULL,0); |
| 3425 | s->current_file_ok = (err == UNZ_OK); |
| 3426 | return err; |
| 3427 | } |
| 3428 | |
| 3429 | |
| 3430 | // Try locate the file szFileName in the zipfile. |
no test coverage detected