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. */
| 1215 | return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. |
| 1216 | */ |
| 1217 | extern int ZEXPORT unzGoToNextFile (unzFile file) |
| 1218 | { |
| 1219 | unz64_s* s; |
| 1220 | int err; |
| 1221 | |
| 1222 | if (file==NULL) |
| 1223 | return UNZ_PARAMERROR; |
| 1224 | s=(unz64_s*)file; |
| 1225 | if (!s->current_file_ok) |
| 1226 | return UNZ_END_OF_LIST_OF_FILE; |
| 1227 | if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ |
| 1228 | if (s->num_file+1==s->gi.number_entry) |
| 1229 | return UNZ_END_OF_LIST_OF_FILE; |
| 1230 | |
| 1231 | s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + |
| 1232 | s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; |
| 1233 | s->num_file++; |
| 1234 | err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, |
| 1235 | &s->cur_file_info_internal, |
| 1236 | NULL,0,NULL,0,NULL,0); |
| 1237 | s->current_file_ok = (err == UNZ_OK); |
| 1238 | return err; |
| 1239 | } |
| 1240 | |
| 1241 | |
| 1242 | /* |
no test coverage detected