Lines Matching refs:za
41 zip_file_extra_field_delete(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_idx, zip_flags_t flag… in zip_file_extra_field_delete() argument
46 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_delete()
51 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_delete()
55 if (_zip_get_dirent(za, idx, 0, NULL) == NULL) in zip_file_extra_field_delete()
58 if (ZIP_IS_RDONLY(za)) { in zip_file_extra_field_delete()
59 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_file_extra_field_delete()
63 if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) in zip_file_extra_field_delete()
66 de = za->entry[idx].changes; in zip_file_extra_field_delete()
75 zip_file_extra_field_delete_by_id(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_… in zip_file_extra_field_delete_by_id() argument
80 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_delete_by_id()
85 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_delete_by_id()
89 if (_zip_get_dirent(za, idx, 0, NULL) == NULL) in zip_file_extra_field_delete_by_id()
92 if (ZIP_IS_RDONLY(za)) { in zip_file_extra_field_delete_by_id()
93 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_file_extra_field_delete_by_id()
97 if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) in zip_file_extra_field_delete_by_id()
100 de = za->entry[idx].changes; in zip_file_extra_field_delete_by_id()
109 zip_file_extra_field_get(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_idx, zip_uint16_t *idp, … in zip_file_extra_field_get() argument
118 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_get()
122 if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) in zip_file_extra_field_get()
126 if (_zip_read_local_ef(za, idx) < 0) in zip_file_extra_field_get()
148 _zip_error_set(&za->error, ZIP_ER_NOENT, 0); in zip_file_extra_field_get()
156 zip_file_extra_field_get_by_id(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_t e… in zip_file_extra_field_get_by_id() argument
161 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_get_by_id()
165 if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) in zip_file_extra_field_get_by_id()
169 if (_zip_read_local_ef(za, idx) < 0) in zip_file_extra_field_get_by_id()
172 return _zip_ef_get_by_id(de->extra_fields, lenp, ef_id, ef_idx, flags, &za->error); in zip_file_extra_field_get_by_id()
178 zip_file_extra_fields_count(struct zip *za, zip_uint64_t idx, zip_flags_t flags) in zip_file_extra_fields_count() argument
185 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_fields_count()
189 if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) in zip_file_extra_fields_count()
193 if (_zip_read_local_ef(za, idx) < 0) in zip_file_extra_fields_count()
207 zip_file_extra_fields_count_by_id(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_flags_t… in zip_file_extra_fields_count_by_id() argument
214 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_fields_count_by_id()
218 if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) in zip_file_extra_fields_count_by_id()
222 if (_zip_read_local_ef(za, idx) < 0) in zip_file_extra_fields_count_by_id()
236 zip_file_extra_field_set(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_t ef_idx,… in zip_file_extra_field_set() argument
244 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_set()
248 if (_zip_get_dirent(za, idx, 0, NULL) == NULL) in zip_file_extra_field_set()
251 if (ZIP_IS_RDONLY(za)) { in zip_file_extra_field_set()
252 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_file_extra_field_set()
257 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_set()
261 if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) in zip_file_extra_field_set()
264 de = za->entry[idx].changes; in zip_file_extra_field_set()
283 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_set()
302 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_set()
307 _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); in zip_file_extra_field_set()
340 _zip_file_extra_field_prepare_for_change(struct zip *za, zip_uint64_t idx) in _zip_file_extra_field_prepare_for_change() argument
344 if (idx >= za->nentry) { in _zip_file_extra_field_prepare_for_change()
345 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in _zip_file_extra_field_prepare_for_change()
349 e = za->entry+idx; in _zip_file_extra_field_prepare_for_change()
355 if (_zip_read_local_ef(za, idx) < 0) in _zip_file_extra_field_prepare_for_change()
361 _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); in _zip_file_extra_field_prepare_for_change()
367 if ((e->changes->extra_fields=_zip_ef_clone(e->orig->extra_fields, &za->error)) == NULL) in _zip_file_extra_field_prepare_for_change()