Lines Matching refs:entry
118 _zip_dirent_init(&cd->entry[i]); in zip_close()
149 if (za->entry[i].state == ZIP_ST_DELETED) in zip_close()
170 if (ZIP_ENTRY_DATA_CHANGED(za->entry+i) || new_torrentzip) { in zip_close()
176 memcpy(cd->entry+j, &de, sizeof(cd->entry[j])); in zip_close()
179 if (za->entry[i].ch_filename == NULL) { in zip_close()
180 if (za->entry[i].state == ZIP_ST_ADDED) { in zip_close()
183 cd->entry[j].filename = "-"; in zip_close()
184 cd->entry[j].filename_len = 1; in zip_close()
187 de.filename = strdup(za->cdir->entry[i].filename); in zip_close()
189 cd->entry[j].filename = za->cdir->entry[i].filename; in zip_close()
190 cd->entry[j].filename_len = de.filename_len; in zip_close()
196 if ((NULL == za->zp) || (fseeko(za->zp, za->cdir->entry[i].offset, SEEK_SET) != 0)) { in zip_close()
206 memcpy(cd->entry+j, za->cdir->entry+i, sizeof(cd->entry[j])); in zip_close()
208 de.crc = za->cdir->entry[i].crc; in zip_close()
209 de.comp_size = za->cdir->entry[i].comp_size; in zip_close()
210 de.uncomp_size = za->cdir->entry[i].uncomp_size; in zip_close()
212 cd->entry[j].bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR; in zip_close()
216 if (za->entry[i].ch_filename) { in zip_close()
218 if ((de.filename=strdup(za->entry[i].ch_filename)) == NULL) { in zip_close()
223 cd->entry[j].filename = za->entry[i].ch_filename; in zip_close()
224 cd->entry[j].filename_len = de.filename_len; in zip_close()
227 if (za->entry[i].ch_extra_len != -1) { in zip_close()
229 if ((de.extrafield=malloc(za->entry[i].ch_extra_len)) == NULL) { in zip_close()
233 memcpy(de.extrafield, za->entry[i].ch_extra, za->entry[i].ch_extra_len); in zip_close()
234 de.extrafield_len = za->entry[i].ch_extra_len; in zip_close()
244 && za->entry[i].ch_comment_len != -1) { in zip_close()
246 cd->entry[j].comment = za->entry[i].ch_comment; in zip_close()
247 cd->entry[j].comment_len = za->entry[i].ch_comment_len; in zip_close()
250 cd->entry[j].offset = ftello(out); in zip_close()
252 if (ZIP_ENTRY_DATA_CHANGED(za->entry+i) || new_torrentzip) { in zip_close()
256 if (!ZIP_ENTRY_DATA_CHANGED(za->entry+i)) { in zip_close()
264 if (add_data(za, zs ? zs : za->entry[i].source, &de, out) < 0) { in zip_close()
273 cd->entry[j].last_mod = de.last_mod; in zip_close()
274 cd->entry[j].comp_method = de.comp_method; in zip_close()
275 cd->entry[j].comp_size = de.comp_size; in zip_close()
276 cd->entry[j].uncomp_size = de.uncomp_size; in zip_close()
277 cd->entry[j].crc = de.crc; in zip_close()
285 if (copy_data(za->zp, cd->entry[j].comp_size, out, in zip_close()
584 if ((za->entry[i].state != ZIP_ST_UNCHANGED) in _zip_changed()
585 || (za->entry[i].ch_extra_len != -1) in _zip_changed()
586 || (za->entry[i].ch_comment_len != -1)) in _zip_changed()
588 if (za->entry[i].state != ZIP_ST_DELETED) in _zip_changed()