Lines Matching refs:cd

80     struct zip_cdir *cd;  in zip_close()  local
112 if ((cd=_zip_cdir_new(survivors, &za->error)) == NULL) { in zip_close()
118 _zip_dirent_init(&cd->entry[i]); in zip_close()
122 cd->comment = _zip_memdup(TORRENT_SIG "XXXXXXXX", in zip_close()
125 if (cd->comment == NULL) { in zip_close()
126 _zip_cdir_free(cd); in zip_close()
130 cd->comment_len = TORRENT_SIG_LEN + TORRENT_CRC_LEN; in zip_close()
133 if (_zip_cdir_set_comment(cd, za) == -1) { in zip_close()
134 _zip_cdir_free(cd); in zip_close()
141 _zip_cdir_free(cd); in zip_close()
176 memcpy(cd->entry+j, &de, sizeof(cd->entry[j])); in zip_close()
183 cd->entry[j].filename = "-"; in zip_close()
184 cd->entry[j].filename_len = 1; 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()
206 memcpy(cd->entry+j, za->cdir->entry+i, sizeof(cd->entry[j])); in zip_close()
212 cd->entry[j].bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR; 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()
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()
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()
298 if (write_cdir(za, cd, out) < 0) in zip_close()
303 cd->nentry = 0; in zip_close()
304 _zip_cdir_free(cd); in zip_close()
511 write_cdir(struct zip *za, struct zip_cdir *cd, FILE *out) in write_cdir() argument
517 if (_zip_cdir_write(cd, out, &za->error) < 0) in write_cdir()
528 if (_zip_filerange_crc(out, cd->offset, cd->size, &crc, &za->error) < 0) in write_cdir()