Lines Matching refs:za

39 zip_file_extra_field_delete(zip_t *za, zip_uint64_t idx, zip_uint16_t ef_idx, zip_flags_t flags)  in zip_file_extra_field_delete()  argument
44 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_delete()
49 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_delete()
53 if (_zip_get_dirent(za, idx, 0, NULL) == NULL) in zip_file_extra_field_delete()
56 if (ZIP_IS_RDONLY(za)) { in zip_file_extra_field_delete()
57 zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_file_extra_field_delete()
61 if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) in zip_file_extra_field_delete()
64 de = za->entry[idx].changes; in zip_file_extra_field_delete()
72 zip_file_extra_field_delete_by_id(zip_t *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_t ef_… in zip_file_extra_field_delete_by_id() argument
77 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_delete_by_id()
82 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_delete_by_id()
86 if (_zip_get_dirent(za, idx, 0, NULL) == NULL) in zip_file_extra_field_delete_by_id()
89 if (ZIP_IS_RDONLY(za)) { in zip_file_extra_field_delete_by_id()
90 zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_file_extra_field_delete_by_id()
94 if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) in zip_file_extra_field_delete_by_id()
97 de = za->entry[idx].changes; in zip_file_extra_field_delete_by_id()
105 zip_file_extra_field_get(zip_t *za, zip_uint64_t idx, zip_uint16_t ef_idx, zip_uint16_t *idp, zip_u… in zip_file_extra_field_get() argument
114 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_get()
118 if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) in zip_file_extra_field_get()
122 if (_zip_read_local_ef(za, idx) < 0) in zip_file_extra_field_get()
144 zip_error_set(&za->error, ZIP_ER_NOENT, 0); in zip_file_extra_field_get()
151 zip_file_extra_field_get_by_id(zip_t *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_t ef_idx… in zip_file_extra_field_get_by_id() argument
156 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_get_by_id()
160 if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) in zip_file_extra_field_get_by_id()
164 if (_zip_read_local_ef(za, idx) < 0) in zip_file_extra_field_get_by_id()
167 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()
172 zip_file_extra_fields_count(zip_t *za, zip_uint64_t idx, zip_flags_t flags) in zip_file_extra_fields_count() argument
179 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_fields_count()
183 if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) in zip_file_extra_fields_count()
187 if (_zip_read_local_ef(za, idx) < 0) in zip_file_extra_fields_count()
200 zip_file_extra_fields_count_by_id(zip_t *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_flags_t flag… in zip_file_extra_fields_count_by_id() argument
207 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_fields_count_by_id()
211 if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) in zip_file_extra_fields_count_by_id()
215 if (_zip_read_local_ef(za, idx) < 0) in zip_file_extra_fields_count_by_id()
228 zip_file_extra_field_set(zip_t *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_t ef_idx, cons… in zip_file_extra_field_set() argument
236 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_set()
240 if (_zip_get_dirent(za, idx, 0, NULL) == NULL) in zip_file_extra_field_set()
243 if (ZIP_IS_RDONLY(za)) { in zip_file_extra_field_set()
244 zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_file_extra_field_set()
249 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_set()
253 if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) in zip_file_extra_field_set()
256 de = za->entry[idx].changes; in zip_file_extra_field_set()
275 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_set()
294 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_file_extra_field_set()
299 zip_error_set(&za->error, ZIP_ER_MEMORY, 0); in zip_file_extra_field_set()
332 _zip_file_extra_field_prepare_for_change(zip_t *za, zip_uint64_t idx) in _zip_file_extra_field_prepare_for_change() argument
336 if (idx >= za->nentry) { in _zip_file_extra_field_prepare_for_change()
337 zip_error_set(&za->error, ZIP_ER_INVAL, 0); in _zip_file_extra_field_prepare_for_change()
341 e = za->entry+idx; in _zip_file_extra_field_prepare_for_change()
347 if (_zip_read_local_ef(za, idx) < 0) in _zip_file_extra_field_prepare_for_change()
353 zip_error_set(&za->error, ZIP_ER_MEMORY, 0); in _zip_file_extra_field_prepare_for_change()
359 if ((e->changes->extra_fields=_zip_ef_clone(e->orig->extra_fields, &za->error)) == NULL) in _zip_file_extra_field_prepare_for_change()