Searched refs:za (Results 1 - 25 of 52) sorted by relevance

123

/PHP_5_3/ext/zip/examples/
H A Ddir.php6 $za = new ZipArchive(); variable
8 $za->open('test_with_comment.zip');
9 print_r($za);
10 var_dump($za);
11 echo "numFiles: " . $za->numFiles . "\n";
12 echo "status: " . $za->status . "\n";
13 echo "statusSys: " . $za->statusSys . "\n";
14 echo "filename: " . $za->filename . "\n";
15 echo "comment: " . $za->comment . "\n";
17 for ($i=0; $i<$za
[all...]
/PHP_5_3/ext/zip/lib/
H A Dzip_delete.c43 zip_delete(struct zip *za, zip_uint64_t idx)
45 if (idx >= za->nentry) {
46 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
50 if (ZIP_IS_RDONLY(za)) {
51 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
57 if (_zip_unchange(za, idx, 1) != 0)
60 za->entry[idx].state = ZIP_ST_DELETED;
41 zip_delete(struct zip *za, zip_uint64_t idx) argument
H A Dzip_entry_new.c45 _zip_entry_new(struct zip *za)
48 if (!za) {
55 if (za->nentry+1 >= za->nentry_alloc) {
57 za->nentry_alloc += 16;
58 rentries = (struct zip_entry *)realloc(za->entry,
60 * za->nentry_alloc);
62 _zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
65 za->entry = rentries;
67 ze = za
43 _zip_entry_new(struct zip *za) argument
[all...]
H A Dzip_error_clear.c43 zip_error_clear(struct zip *za)
45 _zip_error_clear(&za->error);
41 zip_error_clear(struct zip *za) argument
H A Dzip_error_get.c43 zip_error_get(struct zip *za, int *zep, int *sep)
45 _zip_error_get(&za->error, zep, sep);
41 zip_error_get(struct zip *za, int *zep, int *sep) argument
H A Dzip_fopen.c43 zip_fopen(struct zip *za, const char *fname, int flags)
47 if ((idx=zip_name_locate(za, fname, flags)) < 0)
50 return zip_fopen_index_encrypted(za, idx, flags, za->default_password);
41 zip_fopen(struct zip *za, const char *fname, int flags) argument
H A Dzip_fopen_encrypted.c43 zip_fopen_encrypted(struct zip *za, const char *fname, int flags,
48 if ((idx=zip_name_locate(za, fname, flags)) < 0)
51 return zip_fopen_index_encrypted(za, idx, flags, password);
41 zip_fopen_encrypted(struct zip *za, const char *fname, int flags, const char *password) argument
H A Dzip_fopen_index.c47 zip_fopen_index(struct zip *za, zip_uint64_t fileno, int flags)
49 return zip_fopen_index_encrypted(za, fileno, flags, za->default_password);
45 zip_fopen_index(struct zip *za, zip_uint64_t fileno, int flags) argument
H A Dzip_free.c49 _zip_free(struct zip *za)
53 if (za == NULL)
56 if (za->zn)
57 free(za->zn);
59 if (za->zp)
60 fclose(za->zp);
62 free(za->default_password);
63 _zip_cdir_free(za->cdir);
64 free(za->ch_comment);
66 if (za
47 _zip_free(struct zip *za) argument
[all...]
H A Dzip_get_archive_comment.c43 zip_get_archive_comment(struct zip *za, int *lenp, int flags)
46 || (za->ch_comment_len == -1)) {
47 if (za->cdir) {
49 *lenp = za->cdir->comment_len;
50 return za->cdir->comment;
60 *lenp = za->ch_comment_len;
61 return za->ch_comment;
41 zip_get_archive_comment(struct zip *za, int *lenp, int flags) argument
H A Dzip_get_archive_flag.c43 zip_get_archive_flag(struct zip *za, int flag, int flags)
47 fl = (flags & ZIP_FL_UNCHANGED) ? za->flags : za->ch_flags;
41 zip_get_archive_flag(struct zip *za, int flag, int flags) argument
H A Dzip_get_file_comment.c43 zip_get_file_comment(struct zip *za, zip_uint64_t idx, int *lenp, int flags)
45 if (idx >= za->nentry) {
46 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
51 || (za->entry[idx].ch_comment_len == -1)) {
53 *lenp = za->cdir->entry[idx].comment_len;
54 return za->cdir->entry[idx].comment;
58 *lenp = za->entry[idx].ch_comment_len;
59 return za->entry[idx].ch_comment;
41 zip_get_file_comment(struct zip *za, zip_uint64_t idx, int *lenp, int flags) argument
H A Dzip_get_file_extra.c41 zip_get_file_extra(struct zip *za, zip_uint64_t idx, int *lenp, int flags) argument
43 if (idx >= za->nentry) {
44 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
49 || (za->entry[idx].ch_extra_len == -1)) {
51 *lenp = za->cdir->entry[idx].extrafield_len;
52 return za->cdir->entry[idx].extrafield;
56 *lenp = za->entry[idx].ch_extra_len;
57 return za->entry[idx].ch_extra;
H A Dzip_get_num_entries.c43 zip_get_num_entries(struct zip *za, int flags)
45 if (za == NULL)
49 if (za->cdir == NULL)
51 return za->cdir->nentry;
53 return za->nentry;
H A Dzip_get_num_files.c43 zip_get_num_files(struct zip *za)
45 if (za == NULL)
48 return za->nentry;
41 zip_get_num_files(struct zip *za) argument
H A Dzip_new.c51 struct zip *za;
53 za = (struct zip *)malloc(sizeof(struct zip));
54 if (!za) {
59 za->zn = NULL;
60 za->zp = NULL;
61 _zip_error_init(&za->error);
62 za->cdir = NULL;
63 za->ch_comment = NULL;
64 za->ch_comment_len = -1;
65 za
49 struct zip *za; local
[all...]
H A Dzip_rename.c45 zip_rename(struct zip *za, zip_uint64_t idx, const char *name)
50 if (idx >= za->nentry || name[0] == '\0') {
51 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
55 if (ZIP_IS_RDONLY(za)) {
56 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
60 if ((old_name=zip_get_name(za, idx, 0)) == NULL)
67 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
71 return _zip_set_name(za, idx, name);
43 zip_rename(struct zip *za, zip_uint64_t idx, const char *name) argument
H A Dzip_replace.c43 zip_replace(struct zip *za, zip_uint64_t idx, struct zip_source *source)
45 if (idx >= za->nentry || source == NULL) {
46 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
50 if (_zip_replace(za, idx, NULL, source) == -1)
63 _zip_replace(struct zip *za, zip_uint64_t idx, const char *name,
66 if (ZIP_IS_RDONLY(za)) {
67 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
72 if (_zip_entry_new(za) == NULL)
75 idx = za->nentry - 1;
78 _zip_unchange_data(za
41 zip_replace(struct zip *za, zip_uint64_t idx, struct zip_source *source) argument
60 _zip_replace(struct zip *za, zip_uint64_t idx, const char *name, struct zip_source *source) argument
[all...]
H A Dzip_set_archive_flag.c43 zip_set_archive_flag(struct zip *za, int flag, int value)
48 new_flags = za->ch_flags | flag;
50 new_flags = za->ch_flags & ~flag;
52 if (new_flags == za->ch_flags)
55 if (ZIP_IS_RDONLY(za)) {
56 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
61 && (za->ch_flags & ZIP_AFL_RDONLY) == 0) {
62 if (_zip_changed(za, NULL)) {
63 _zip_error_set(&za->error, ZIP_ER_CHANGED, 0);
68 za
41 zip_set_archive_flag(struct zip *za, int flag, int value) argument
[all...]
H A Dzip_set_default_password.c46 zip_set_default_password(struct zip *za, const char *passwd)
48 if (za == NULL)
51 if (za->default_password)
52 free(za->default_password);
55 if ((za->default_password=strdup(passwd)) == NULL) {
56 _zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
61 za->default_password = NULL;
44 zip_set_default_password(struct zip *za, const char *passwd) argument
H A Dzip_set_file_comment.c45 zip_set_file_comment(struct zip *za, zip_uint64_t idx,
50 if (idx >= za->nentry
53 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
57 if (ZIP_IS_RDONLY(za)) {
58 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
63 if ((tmpcom=(char *)_zip_memdup(comment, len, &za->error)) == NULL)
69 free(za->entry[idx].ch_comment);
70 za->entry[idx].ch_comment = tmpcom;
71 za->entry[idx].ch_comment_len = len;
43 zip_set_file_comment(struct zip *za, zip_uint64_t idx, const char *comment, int len) argument
H A Dzip_set_file_extra.c43 zip_set_file_extra(struct zip *za, zip_uint64_t idx, argument
48 if (idx >= za->nentry
51 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
55 if (ZIP_IS_RDONLY(za)) {
56 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
61 if ((tmpext=(char *)_zip_memdup(extra, len, &za->error)) == NULL)
67 free(za->entry[idx].ch_extra);
68 za->entry[idx].ch_extra = tmpext;
69 za->entry[idx].ch_extra_len = len;
H A Dzip_stat.c43 zip_stat(struct zip *za, const char *fname, int flags, struct zip_stat *st)
47 if ((idx=zip_name_locate(za, fname, flags)) < 0)
50 return zip_stat_index(za, idx, flags, st);
41 zip_stat(struct zip *za, const char *fname, int flags, struct zip_stat *st) argument
H A Dzip_strerror.c42 zip_strerror(struct zip *za)
44 return _zip_error_strerror(&za->error);
40 zip_strerror(struct zip *za) argument
H A Dzip_unchange_archive.c45 zip_unchange_archive(struct zip *za)
47 free(za->ch_comment);
48 za->ch_comment = NULL;
49 za->ch_comment_len = -1;
51 za->ch_flags = za->flags;
43 zip_unchange_archive(struct zip *za) argument

Completed in 17 milliseconds

123