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

123

/PHP_TRUNK/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_TRUNK/ext/zip/lib/
H A Dzip_add.c49 zip_add(struct zip *za, const char *name, struct zip_source *source) argument
51 return zip_file_add(za, name, source, 0);
H A Dzip_add_entry.c45 _zip_add_entry(struct zip *za) argument
49 if (za->nentry+1 >= za->nentry_alloc) {
51 zip_uint64_t nalloc = za->nentry_alloc + 16;
53 rentries = (struct zip_entry *)realloc(za->entry, sizeof(struct zip_entry) * (size_t)nalloc);
55 _zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
58 za->entry = rentries;
59 za->nentry_alloc = nalloc;
62 idx = za->nentry++;
64 _zip_entry_init(za
[all...]
H A Dzip_delete.c41 zip_delete(struct zip *za, zip_uint64_t idx) argument
43 if (idx >= za->nentry) {
44 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
48 if (ZIP_IS_RDONLY(za)) {
49 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
55 if (_zip_unchange(za, idx, 1) != 0)
58 za->entry[idx].deleted = 1;
H A Dzip_discard.c47 zip_discard(struct zip *za) argument
51 if (za == NULL)
54 if (za->zn)
55 free(za->zn);
57 if (za->zp)
58 fclose(za->zp);
60 free(za->default_password);
61 _zip_string_free(za->comment_orig);
62 _zip_string_free(za->comment_changes);
64 if (za
[all...]
H A Dzip_error_clear.c41 zip_error_clear(struct zip *za) argument
43 if (za == NULL)
46 _zip_error_clear(&za->error);
H A Dzip_error_get.c41 zip_error_get(struct zip *za, int *zep, int *sep) argument
43 _zip_error_get(&za->error, zep, sep);
H A Dzip_file_replace.c41 zip_file_replace(struct zip *za, zip_uint64_t idx, struct zip_source *source, zip_flags_t flags) argument
43 if (idx >= za->nentry || source == NULL) {
44 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
48 if (_zip_file_replace(za, idx, NULL, source, flags) == -1)
60 _zip_file_replace(struct zip *za, zip_uint64_t idx, const char *name, struct zip_source *source, zip_flags_t flags) argument
64 if (ZIP_IS_RDONLY(za)) {
65 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
69 za_nentry_prev = za->nentry;
74 i = _zip_name_locate(za, name, flags, NULL);
78 if ((i=_zip_add_entry(za)) <
[all...]
H A Dzip_fopen.c41 zip_fopen(struct zip *za, const char *fname, zip_flags_t flags) argument
45 if ((idx=zip_name_locate(za, fname, flags)) < 0)
48 return zip_fopen_index_encrypted(za, (zip_uint64_t)idx, flags, za->default_password);
H A Dzip_get_archive_flag.c41 zip_get_archive_flag(struct zip *za, zip_flags_t flag, zip_flags_t flags) argument
45 fl = (flags & ZIP_FL_UNCHANGED) ? za->flags : za->ch_flags;
H A Dzip_get_num_entries.c41 zip_get_num_entries(struct zip *za, zip_flags_t flags) argument
45 if (za == NULL)
49 n = za->nentry;
50 while (n>0 && za->entry[n-1].orig == NULL)
54 return (zip_int64_t)za->nentry;
H A Dzip_get_num_files.c42 zip_get_num_files(struct zip *za) argument
44 if (za == NULL)
48 return (int)za->nentry;
H A Dzip_new.c49 struct zip *za; local
51 za = (struct zip *)malloc(sizeof(struct zip));
52 if (!za) {
57 za->zn = NULL;
58 za->zp = NULL;
59 za->open_flags = 0;
60 _zip_error_init(&za->error);
61 za->flags = za->ch_flags = 0;
62 za
[all...]
H A Dzip_rename.c44 zip_rename(struct zip *za, zip_uint64_t idx, const char *name) argument
46 return zip_file_rename(za, idx, name, 0);
H A Dzip_replace.c42 zip_replace(struct zip *za, zip_uint64_t idx, struct zip_source *source) argument
44 return zip_file_replace(za, idx, source, 0);
H A Dzip_set_archive_flag.c41 zip_set_archive_flag(struct zip *za, zip_flags_t flag, int value) argument
46 new_flags = za->ch_flags | flag;
48 new_flags = za->ch_flags & ~flag;
50 if (new_flags == za->ch_flags)
53 if (ZIP_IS_RDONLY(za)) {
54 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
59 && (za->ch_flags & ZIP_AFL_RDONLY) == 0) {
60 if (_zip_changed(za, NULL)) {
61 _zip_error_set(&za->error, ZIP_ER_CHANGED, 0);
66 za
[all...]
H A Dzip_set_default_password.c44 zip_set_default_password(struct zip *za, const char *passwd) argument
46 if (za == NULL)
49 if (za->default_password)
50 free(za->default_password);
53 if ((za->default_password=strdup(passwd)) == NULL) {
54 _zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
59 za->default_password = NULL;
H A Dzip_source_file.c44 zip_source_file(struct zip *za, const char *fname, zip_uint64_t start, argument
47 if (za == NULL)
51 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
55 return _zip_source_file_or_p(za, fname, NULL, start, len, 1, NULL);
H A Dzip_strerror.c41 zip_strerror(struct zip *za) argument
43 return _zip_error_strerror(&za->error);
H A Dzip_unchange.c43 zip_unchange(struct zip *za, zip_uint64_t idx) argument
45 return _zip_unchange(za, idx, 0);
51 _zip_unchange(struct zip *za, zip_uint64_t idx, int allow_duplicates) argument
55 if (idx >= za->nentry) {
56 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
60 if (!allow_duplicates && za->entry[idx].changes && (za->entry[idx].changes->changed & ZIP_DIRENT_FILENAME)) {
61 i = _zip_name_locate(za, _zip_get_name(za, idx, ZIP_FL_UNCHANGED, NULL), 0, NULL);
63 _zip_error_set(&za
[all...]
H A Dzip_unchange_all.c43 zip_unchange_all(struct zip *za) argument
49 for (i=0; i<za->nentry; i++)
50 ret |= _zip_unchange(za, i, 1);
52 ret |= zip_unchange_archive(za);
H A Dzip_unchange_archive.c43 zip_unchange_archive(struct zip *za) argument
45 if (za->comment_changed) {
46 _zip_string_free(za->comment_changes);
47 za->comment_changes = NULL;
48 za->comment_changed = 0;
51 za->ch_flags = za->flags;
H A Dzip_add_dir.c44 zip_add_dir(struct zip *za, const char *name) argument
46 return zip_dir_add(za, name, 0);
H A Dzip_fopen_index_encrypted.c42 static struct zip_file *_zip_file_new(struct zip *za);
47 zip_fopen_index_encrypted(struct zip *za, zip_uint64_t index, zip_flags_t flags, argument
53 if ((src=_zip_source_zip_new(za, za, index, flags, 0, 0, password)) == NULL)
57 _zip_error_set_from_source(&za->error, src);
62 if ((zf=_zip_file_new(za)) == NULL) {
75 _zip_file_new(struct zip *za) argument
80 _zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
84 if (za->nfile+1 >= za
[all...]
H A Dzip_set_archive_comment.c43 zip_set_archive_comment(struct zip *za, const char *comment, zip_uint16_t len) argument
47 if (ZIP_IS_RDONLY(za)) {
48 _zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
53 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
58 if ((cstr=_zip_string_new((const zip_uint8_t *)comment, len, ZIP_FL_ENC_GUESS, &za->error)) == NULL)
63 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
70 _zip_string_free(za->comment_changes);
71 za->comment_changes = NULL;
73 if (((za->comment_orig && _zip_string_equal(za
[all...]

Completed in 43 milliseconds

123