MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / unzGoToNextFile

Function unzGoToNextFile

common/minizip/unzip.c:1199–1221  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

1197 return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
1198*/
1199extern int ZEXPORT unzGoToNextFile (unzFile file)
1200{
1201 unz64_s* s;
1202 int err;
1203
1204 if (file==NULL)
1205 return UNZ_PARAMERROR;
1206 s=(unz64_s*)file;
1207 if (!s->current_file_ok)
1208 return UNZ_END_OF_LIST_OF_FILE;
1209 if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */
1210 if (s->num_file+1==s->gi.number_entry)
1211 return UNZ_END_OF_LIST_OF_FILE;
1212
1213 s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
1214 s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
1215 s->num_file++;
1216 err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
1217 &s->cur_file_info_internal,
1218 NULL,0,NULL,0,NULL,0);
1219 s->current_file_ok = (err == UNZ_OK);
1220 return err;
1221}
1222
1223
1224/*

Callers 3

unzLocateFileFunction · 0.85
do_listFunction · 0.85
do_extractFunction · 0.85

Tested by

no test coverage detected