Home
last modified time | relevance | path

Searched refs:za (Results 1 – 25 of 59) sorted by last modified time

123

/PHP-5.5/ext/zip/tests/
H A Dpecl12414.phpt12 $za = new ZipArchive();
13 $res =$za->open($zipname);
15 $finfo=$za->statName($filename);
19 $contents=$za->getFromName($filename);
30 $za->close();
H A Dbug14962.phpt14 $za = new ZipArchive;
15 $za->open($dir . '/__14962.zip', ZIPARCHIVE::CREATE);
16 $za->addFromString($file, '1234');
17 $za->close();
22 $za = new ZipArchive;
23 $za->open($dir . '/__14962.zip');
24 $za->extractTo($dir, NULL);
25 $za->close();
/PHP-5.5/ext/zip/
H A Dzip_stream.c20 struct zip *za; member
78 if (self->za) { in php_zip_ops_close()
79 zip_close(self->za); in php_zip_ops_close()
80 self->za = NULL; in php_zip_ops_close()
108 struct zip *za; in php_zip_ops_stat() local
145 if (za) { in php_zip_ops_stat()
151 zip_close(za); in php_zip_ops_stat()
250 struct zip *za; in php_stream_zip_opener() local
290 if (za) { in php_stream_zip_opener()
295 self->za = za; in php_stream_zip_opener()
[all …]
H A Dphp_zip.c329 if (za->error.str) { in php_zip_add_file()
418 intern = obj->za; \
480 if (za) { in php_zipobj_get_zip_comment()
1068 if (intern->za) { in php_zip_object_free_storage()
1072 intern->za = NULL; in php_zip_object_free_storage()
1082 intern->za = NULL; in php_zip_object_free_storage()
1113 intern->za = NULL; in php_zip_object_new()
1149 if (zip_int->za) { in php_zip_free_dir()
1531 if (ze_obj->za) { in ZIPARCHIVE_METHOD()
1536 ze_obj->za = NULL; in ZIPARCHIVE_METHOD()
[all …]
H A Dphp_zip.h57 struct zip *za; member
76 struct zip *za; member
/PHP-5.5/ext/zip/lib/
H A Dzip_file_get_offset.c54 _zip_file_get_offset(struct zip *za, int idx) in _zip_file_get_offset() argument
59 offset = za->cdir->entry[idx].offset; in _zip_file_get_offset()
61 if (fseeko(za->zp, offset, SEEK_SET) != 0) { in _zip_file_get_offset()
62 _zip_error_set(&za->error, ZIP_ER_SEEK, errno); in _zip_file_get_offset()
66 if (_zip_dirent_read(&de, za->zp, NULL, NULL, 1, &za->error) != 0) in _zip_file_get_offset()
H A Dzip_fopen.c41 zip_fopen(struct zip *za, const char *fname, int flags) in zip_fopen() argument
45 if ((idx=zip_name_locate(za, fname, flags)) < 0) in zip_fopen()
48 return zip_fopen_index_encrypted(za, idx, flags, za->default_password); in zip_fopen()
H A Dzip_fopen_encrypted.c41 zip_fopen_encrypted(struct zip *za, const char *fname, int flags, in zip_fopen_encrypted() argument
46 if ((idx=zip_name_locate(za, fname, flags)) < 0) in zip_fopen_encrypted()
49 return zip_fopen_index_encrypted(za, idx, flags, password); in zip_fopen_encrypted()
H A Dzip_fopen_index.c45 zip_fopen_index(struct zip *za, zip_uint64_t fileno, int flags) in zip_fopen_index() argument
47 return zip_fopen_index_encrypted(za, fileno, flags, za->default_password); in zip_fopen_index()
H A Dzip_fopen_index_encrypted.c57 if (fileno >= za->nentry) { in zip_fopen_index_encrypted()
112 if ((src=_zip_source_file_or_p(za, NULL, za->zp, start, st.comp_size, in zip_fopen_index_encrypted()
125 if ((s2=comp_impl(za, src, za->cdir->entry[fileno].comp_method, in zip_fopen_index_encrypted()
150 zf = _zip_file_new(za); in zip_fopen_index_encrypted()
160 _zip_file_new(struct zip *za) in _zip_file_new() argument
170 if (za->nfile >= za->nfile_alloc-1) { in _zip_file_new()
171 n = za->nfile_alloc + 10; in _zip_file_new()
179 za->nfile_alloc = n; in _zip_file_new()
180 za->file = file; in _zip_file_new()
183 za->file[za->nfile++] = zf; in _zip_file_new()
[all …]
H A Dzip_free.c47 _zip_free(struct zip *za) in _zip_free() argument
51 if (za == NULL) in _zip_free()
54 if (za->zn) in _zip_free()
55 free(za->zn); in _zip_free()
57 if (za->zp) in _zip_free()
58 fclose(za->zp); in _zip_free()
64 if (za->entry) { in _zip_free()
68 free(za->entry); in _zip_free()
74 za->file[i]->za = NULL; in _zip_free()
78 free(za->file); in _zip_free()
[all …]
H A Dzip_get_archive_comment.c41 zip_get_archive_comment(struct zip *za, int *lenp, int flags) in zip_get_archive_comment() argument
44 || (za->ch_comment_len == -1)) { in zip_get_archive_comment()
45 if (za->cdir) { in zip_get_archive_comment()
47 *lenp = za->cdir->comment_len; in zip_get_archive_comment()
48 return za->cdir->comment; in zip_get_archive_comment()
58 *lenp = za->ch_comment_len; in zip_get_archive_comment()
59 return za->ch_comment; in zip_get_archive_comment()
H A Dzip_get_archive_flag.c41 zip_get_archive_flag(struct zip *za, int flag, int flags) in zip_get_archive_flag() argument
45 fl = (flags & ZIP_FL_UNCHANGED) ? za->flags : za->ch_flags; in zip_get_archive_flag()
H A Dzip_get_file_comment.c41 zip_get_file_comment(struct zip *za, zip_uint64_t idx, int *lenp, int flags) in zip_get_file_comment() argument
43 if (idx >= za->nentry) { in zip_get_file_comment()
44 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_get_file_comment()
49 || (za->entry[idx].ch_comment_len == -1)) { in zip_get_file_comment()
51 *lenp = za->cdir->entry[idx].comment_len; in zip_get_file_comment()
52 return za->cdir->entry[idx].comment; in zip_get_file_comment()
56 *lenp = za->entry[idx].ch_comment_len; in zip_get_file_comment()
57 return za->entry[idx].ch_comment; in zip_get_file_comment()
H A Dzip_get_file_extra.c41 zip_get_file_extra(struct zip *za, zip_uint64_t idx, int *lenp, int flags) in zip_get_file_extra() argument
43 if (idx >= za->nentry) { in zip_get_file_extra()
44 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_get_file_extra()
49 || (za->entry[idx].ch_extra_len == -1)) { in zip_get_file_extra()
51 *lenp = za->cdir->entry[idx].extrafield_len; in zip_get_file_extra()
52 return za->cdir->entry[idx].extrafield; in zip_get_file_extra()
56 *lenp = za->entry[idx].ch_extra_len; in zip_get_file_extra()
57 return za->entry[idx].ch_extra; in zip_get_file_extra()
H A Dzip_get_name.c41 zip_get_name(struct zip *za, zip_uint64_t idx, int flags) in zip_get_name() argument
43 return _zip_get_name(za, idx, flags, &za->error); in zip_get_name()
49 _zip_get_name(struct zip *za, zip_uint64_t idx, int flags, in _zip_get_name() argument
52 if (idx >= za->nentry) { in _zip_get_name()
58 if (za->entry[idx].state == ZIP_ST_DELETED) { in _zip_get_name()
62 if (za->entry[idx].ch_filename) in _zip_get_name()
63 return za->entry[idx].ch_filename; in _zip_get_name()
66 if (za->cdir == NULL || idx >= za->cdir->nentry) { in _zip_get_name()
71 return za->cdir->entry[idx].filename; in _zip_get_name()
H A Dzip_get_num_entries.c41 zip_get_num_entries(struct zip *za, int flags) in zip_get_num_entries() argument
43 if (za == NULL) in zip_get_num_entries()
47 if (za->cdir == NULL) in zip_get_num_entries()
49 return za->cdir->nentry; in zip_get_num_entries()
51 return za->nentry; in zip_get_num_entries()
H A Dzip_get_num_files.c41 zip_get_num_files(struct zip *za) in zip_get_num_files() argument
43 if (za == NULL) in zip_get_num_files()
46 return za->nentry; in zip_get_num_files()
H A Dzip_name_locate.c43 zip_name_locate(struct zip *za, const char *fname, int flags) in zip_name_locate() argument
45 return _zip_name_locate(za, fname, flags, &za->error); in zip_name_locate()
51 _zip_name_locate(struct zip *za, const char *fname, int flags, in _zip_name_locate() argument
58 if (za == NULL) in _zip_name_locate()
66 if ((flags & ZIP_FL_UNCHANGED) && za->cdir == NULL) { in _zip_name_locate()
73 n = (flags & ZIP_FL_UNCHANGED) ? za->cdir->nentry : za->nentry; in _zip_name_locate()
76 fn = za->cdir->entry[i].filename; in _zip_name_locate()
78 fn = _zip_get_name(za, i, flags, error); in _zip_name_locate()
H A Dzip_new.c49 struct zip *za; in _zip_new() local
52 if (!za) { in _zip_new()
57 za->zn = NULL; in _zip_new()
58 za->zp = NULL; in _zip_new()
60 za->cdir = NULL; in _zip_new()
63 za->nentry = za->nentry_alloc = 0; in _zip_new()
64 za->entry = NULL; in _zip_new()
65 za->nfile = za->nfile_alloc = 0; in _zip_new()
66 za->file = NULL; in _zip_new()
67 za->flags = za->ch_flags = 0; in _zip_new()
[all …]
H A Dzip_open.c109 za->zp = fp; in _zip_open()
110 return za; in _zip_open()
126 za->zp = fp; in _zip_open()
131 _zip_free(za); in _zip_open()
138 za->ch_flags = za->flags; in _zip_open()
140 return za; in _zip_open()
360 if (za->zp == NULL || za->cdir == NULL) in _zip_check_torrentzip()
374 if (_zip_filerange_crc(za->zp, za->cdir->offset, za->cdir->size, in _zip_check_torrentzip()
466 za->zn = NULL; in _zip_allocate_new()
469 if (!za->zn) { in _zip_allocate_new()
[all …]
H A Dzip_rename.c43 zip_rename(struct zip *za, zip_uint64_t idx, const char *name) in zip_rename() argument
48 if (idx >= za->nentry || name[0] == '\0') { in zip_rename()
49 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_rename()
53 if (ZIP_IS_RDONLY(za)) { in zip_rename()
54 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_rename()
58 if ((old_name=zip_get_name(za, idx, 0)) == NULL) in zip_rename()
65 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_rename()
69 return _zip_set_name(za, idx, name); in zip_rename()
H A Dzip_replace.c43 if (idx >= za->nentry || source == NULL) { in zip_replace()
44 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_replace()
48 if (_zip_replace(za, idx, NULL, source) == -1) in zip_replace()
63 if (ZIP_IS_RDONLY(za)) { in _zip_replace()
64 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in _zip_replace()
69 if (_zip_entry_new(za) == NULL) in _zip_replace()
72 idx = za->nentry - 1; in _zip_replace()
75 _zip_unchange_data(za->entry+idx); in _zip_replace()
77 if (name && _zip_set_name(za, idx, name) != 0) in _zip_replace()
80 za->entry[idx].state = ((za->cdir == NULL || idx >= za->cdir->nentry) in _zip_replace()
[all …]
H A Dzip_set_archive_comment.c43 zip_set_archive_comment(struct zip *za, const char *comment, int len) in zip_set_archive_comment() argument
49 _zip_error_set(&za->error, ZIP_ER_INVAL, 0); in zip_set_archive_comment()
53 if (ZIP_IS_RDONLY(za)) { in zip_set_archive_comment()
54 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_set_archive_comment()
59 if ((tmpcom=(char *)_zip_memdup(comment, len, &za->error)) == NULL) in zip_set_archive_comment()
65 free(za->ch_comment); in zip_set_archive_comment()
66 za->ch_comment = tmpcom; in zip_set_archive_comment()
67 za->ch_comment_len = len; in zip_set_archive_comment()
H A Dzip_set_archive_flag.c41 zip_set_archive_flag(struct zip *za, int flag, int value) in zip_set_archive_flag() argument
46 new_flags = za->ch_flags | flag; in zip_set_archive_flag()
48 new_flags = za->ch_flags & ~flag; in zip_set_archive_flag()
50 if (new_flags == za->ch_flags) in zip_set_archive_flag()
53 if (ZIP_IS_RDONLY(za)) { in zip_set_archive_flag()
54 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); in zip_set_archive_flag()
59 && (za->ch_flags & ZIP_AFL_RDONLY) == 0) { in zip_set_archive_flag()
60 if (_zip_changed(za, NULL)) { in zip_set_archive_flag()
61 _zip_error_set(&za->error, ZIP_ER_CHANGED, 0); in zip_set_archive_flag()
66 za->ch_flags = new_flags; in zip_set_archive_flag()

Completed in 103 milliseconds

123