Lines Matching refs:zde
158 _zip_dirent_finalize(struct zip_dirent *zde) in _zip_dirent_finalize() argument
160 if (zde->filename_len > 0) { in _zip_dirent_finalize()
161 free(zde->filename); in _zip_dirent_finalize()
163 zde->filename = NULL; in _zip_dirent_finalize()
164 if (zde->extrafield_len > 0) { in _zip_dirent_finalize()
165 free(zde->extrafield); in _zip_dirent_finalize()
167 zde->extrafield = NULL; in _zip_dirent_finalize()
168 if (zde->comment_len > 0) { in _zip_dirent_finalize()
169 free(zde->comment); in _zip_dirent_finalize()
171 zde->comment = NULL; in _zip_dirent_finalize()
220 _zip_dirent_read(struct zip_dirent *zde, FILE *fp, in _zip_dirent_read() argument
262 zde->version_madeby = _zip_read2(&cur); in _zip_dirent_read()
264 zde->version_madeby = 0; in _zip_dirent_read()
265 zde->version_needed = _zip_read2(&cur); in _zip_dirent_read()
266 zde->bitflags = _zip_read2(&cur); in _zip_dirent_read()
267 zde->comp_method = _zip_read2(&cur); in _zip_dirent_read()
272 zde->last_mod = _zip_d2u_time(dostime, dosdate); in _zip_dirent_read()
274 zde->crc = _zip_read4(&cur); in _zip_dirent_read()
275 zde->comp_size = _zip_read4(&cur); in _zip_dirent_read()
276 zde->uncomp_size = _zip_read4(&cur); in _zip_dirent_read()
278 zde->filename_len = _zip_read2(&cur); in _zip_dirent_read()
279 zde->extrafield_len = _zip_read2(&cur); in _zip_dirent_read()
282 zde->comment_len = 0; in _zip_dirent_read()
283 zde->disk_number = 0; in _zip_dirent_read()
284 zde->int_attrib = 0; in _zip_dirent_read()
285 zde->ext_attrib = 0; in _zip_dirent_read()
286 zde->offset = 0; in _zip_dirent_read()
288 zde->comment_len = _zip_read2(&cur); in _zip_dirent_read()
289 zde->disk_number = _zip_read2(&cur); in _zip_dirent_read()
290 zde->int_attrib = _zip_read2(&cur); in _zip_dirent_read()
291 zde->ext_attrib = _zip_read4(&cur); in _zip_dirent_read()
292 zde->offset = _zip_read4(&cur); in _zip_dirent_read()
295 zde->filename = NULL; in _zip_dirent_read()
296 zde->extrafield = NULL; in _zip_dirent_read()
297 zde->comment = NULL; in _zip_dirent_read()
299 size += zde->filename_len+zde->extrafield_len+zde->comment_len; in _zip_dirent_read()
307 if (zde->filename_len) { in _zip_dirent_read()
308 zde->filename = _zip_readstr(&cur, zde->filename_len, 1, error); in _zip_dirent_read()
309 if (!zde->filename) in _zip_dirent_read()
313 if (zde->extrafield_len) { in _zip_dirent_read()
314 zde->extrafield = _zip_readstr(&cur, zde->extrafield_len, 0, in _zip_dirent_read()
316 if (!zde->extrafield) in _zip_dirent_read()
320 if (zde->comment_len) { in _zip_dirent_read()
321 zde->comment = _zip_readstr(&cur, zde->comment_len, 0, error); in _zip_dirent_read()
322 if (!zde->comment) in _zip_dirent_read()
327 if (zde->filename_len) { in _zip_dirent_read()
328 zde->filename = _zip_readfpstr(fp, zde->filename_len, 1, error); in _zip_dirent_read()
329 if (!zde->filename) in _zip_dirent_read()
333 if (zde->extrafield_len) { in _zip_dirent_read()
334 zde->extrafield = _zip_readfpstr(fp, zde->extrafield_len, 0, in _zip_dirent_read()
336 if (!zde->extrafield) in _zip_dirent_read()
340 if (zde->comment_len) { in _zip_dirent_read()
341 zde->comment = _zip_readfpstr(fp, zde->comment_len, 0, error); in _zip_dirent_read()
342 if (!zde->comment) in _zip_dirent_read()
425 _zip_dirent_write(struct zip_dirent *zde, FILE *fp, int localp, in _zip_dirent_write() argument
433 _zip_write2(zde->version_madeby, fp); in _zip_dirent_write()
434 _zip_write2(zde->version_needed, fp); in _zip_dirent_write()
435 _zip_write2(zde->bitflags, fp); in _zip_dirent_write()
436 _zip_write2(zde->comp_method, fp); in _zip_dirent_write()
438 _zip_u2d_time(zde->last_mod, &dostime, &dosdate); in _zip_dirent_write()
442 _zip_write4(zde->crc, fp); in _zip_dirent_write()
443 _zip_write4(zde->comp_size, fp); in _zip_dirent_write()
444 _zip_write4(zde->uncomp_size, fp); in _zip_dirent_write()
446 _zip_write2(zde->filename_len, fp); in _zip_dirent_write()
447 _zip_write2(zde->extrafield_len, fp); in _zip_dirent_write()
450 _zip_write2(zde->comment_len, fp); in _zip_dirent_write()
451 _zip_write2(zde->disk_number, fp); in _zip_dirent_write()
452 _zip_write2(zde->int_attrib, fp); in _zip_dirent_write()
453 _zip_write4(zde->ext_attrib, fp); in _zip_dirent_write()
454 _zip_write4(zde->offset, fp); in _zip_dirent_write()
457 if (zde->filename_len) in _zip_dirent_write()
458 fwrite(zde->filename, 1, zde->filename_len, fp); in _zip_dirent_write()
460 if (zde->extrafield_len) in _zip_dirent_write()
461 fwrite(zde->extrafield, 1, zde->extrafield_len, fp); in _zip_dirent_write()
464 if (zde->comment_len) in _zip_dirent_write()
465 fwrite(zde->comment, 1, zde->comment_len, fp); in _zip_dirent_write()