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. */
| 1189 | return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. |
| 1190 | */ |
| 1191 | extern int ZEXPORT unzGoToNextFile(unzFile file) |
| 1192 | { |
| 1193 | unz64_s* s; |
| 1194 | int err; |
| 1195 | |
| 1196 | if (file == NULL) |
| 1197 | return UNZ_PARAMERROR; |
| 1198 | s = (unz64_s*)file; |
| 1199 | if (!s->current_file_ok) |
| 1200 | return UNZ_END_OF_LIST_OF_FILE; |
| 1201 | if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ |
| 1202 | if (s->num_file + 1 == s->gi.number_entry) |
| 1203 | return UNZ_END_OF_LIST_OF_FILE; |
| 1204 | |
| 1205 | s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + |
| 1206 | s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment; |
| 1207 | s->num_file++; |
| 1208 | err = unz64local_GetCurrentFileInfoInternal(file, &s->cur_file_info, |
| 1209 | &s->cur_file_info_internal, |
| 1210 | NULL, 0,NULL, 0,NULL, 0); |
| 1211 | s->current_file_ok = (err == UNZ_OK); |
| 1212 | return err; |
| 1213 | } |
| 1214 | |
| 1215 | |
| 1216 | /* |
no test coverage detected