Searched refs:za (Results 1 - 25 of 71) 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.c47 zip_add(zip_t *za, const char *name, zip_source_t *source) argument
49 return zip_file_add(za, name, source, 0);
H A Dzip_add_dir.c42 zip_add_dir(zip_t *za, const char *name) argument
44 return zip_dir_add(za, name, 0);
H A Dzip_add_entry.c43 _zip_add_entry(zip_t *za) argument
47 if (za->nentry+1 >= za->nentry_alloc) {
49 zip_uint64_t nalloc = za->nentry_alloc + 16;
52 if (sizeof(struct zip_entry) * (size_t)za->nentry_alloc > realloc_size) {
53 zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
56 rentries = (zip_entry_t *)realloc(za->entry, sizeof(struct zip_entry) * (size_t)nalloc);
58 zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
61 za->entry = rentries;
62 za
[all...]
H A Dzip_delete.c39 zip_delete(zip_t *za, zip_uint64_t idx) argument
41 if (idx >= za->nentry) {
42 zip_error_set(&za->error, ZIP_ER_INVAL, 0);
46 if (ZIP_IS_RDONLY(za)) {
47 zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
53 if (_zip_unchange(za, idx, 1) != 0)
56 za->entry[idx].deleted = 1;
H A Dzip_discard.c45 zip_discard(zip_t *za) argument
49 if (za == NULL)
52 if (za->src) {
53 zip_source_close(za->src);
54 zip_source_free(za->src);
57 free(za->default_password);
58 _zip_string_free(za->comment_orig);
59 _zip_string_free(za->comment_changes);
61 if (za->entry) {
62 for (i=0; i<za
[all...]
H A Dzip_error_clear.c39 zip_error_clear(zip_t *za) argument
41 if (za == NULL)
44 _zip_error_clear(&za->error);
H A Dzip_error_get.c40 zip_error_get(zip_t *za, int *zep, int *sep) argument
42 _zip_error_get(&za->error, zep, sep);
47 zip_get_error(zip_t *za) argument
49 return &za->error;
H A Dzip_file_replace.c39 zip_file_replace(zip_t *za, zip_uint64_t idx, zip_source_t *source, zip_flags_t flags) argument
41 if (idx >= za->nentry || source == NULL) {
42 zip_error_set(&za->error, ZIP_ER_INVAL, 0);
46 if (_zip_file_replace(za, idx, NULL, source, flags) == -1)
57 _zip_file_replace(zip_t *za, zip_uint64_t idx, const char *name, zip_source_t *source, zip_flags_t flags) argument
61 if (ZIP_IS_RDONLY(za)) {
62 zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
66 za_nentry_prev = za->nentry;
71 i = _zip_name_locate(za, name, flags, NULL);
75 if ((i=_zip_add_entry(za)) <
[all...]
H A Dzip_fopen.c39 zip_fopen(zip_t *za, const char *fname, zip_flags_t flags) argument
43 if ((idx=zip_name_locate(za, fname, flags)) < 0)
46 return zip_fopen_index_encrypted(za, (zip_uint64_t)idx, flags, za->default_password);
H A Dzip_fopen_index_encrypted.c41 static zip_file_t *_zip_file_new(zip_t *za);
45 zip_fopen_index_encrypted(zip_t *za, zip_uint64_t index, zip_flags_t flags, argument
51 if ((src=_zip_source_zip_new(za, za, index, flags, 0, 0, password)) == NULL)
55 _zip_error_set_from_source(&za->error, src);
60 if ((zf=_zip_file_new(za)) == NULL) {
72 _zip_file_new(zip_t *za) argument
77 zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
81 zf->za = za;
[all...]
H A Dzip_get_archive_comment.c41 zip_get_archive_comment(zip_t *za, int *lenp, zip_flags_t flags) argument
47 if ((flags & ZIP_FL_UNCHANGED) || (za->comment_changes == NULL))
48 comment = za->comment_orig;
50 comment = za->comment_changes;
52 if ((str=_zip_string_get(comment, &len, flags, &za->error)) == NULL)
H A Dzip_get_archive_flag.c39 zip_get_archive_flag(zip_t *za, zip_flags_t flag, zip_flags_t flags) argument
43 fl = (flags & ZIP_FL_UNCHANGED) ? za->flags : za->ch_flags;
H A Dzip_get_num_entries.c39 zip_get_num_entries(zip_t *za, zip_flags_t flags) argument
43 if (za == NULL)
47 n = za->nentry;
48 while (n>0 && za->entry[n-1].orig == NULL)
52 return (zip_int64_t)za->nentry;
H A Dzip_get_num_files.c41 zip_get_num_files(zip_t *za) argument
43 if (za == NULL)
46 if (za->nentry > INT_MAX) {
47 zip_error_set(&za->error, ZIP_ER_OPNOTSUPP, 0);
51 return (int)za->nentry;
H A Dzip_new.c47 zip_t *za; local
49 za = (zip_t *)malloc(sizeof(struct zip));
50 if (!za) {
55 za->src = NULL;
56 za->open_flags = 0;
57 zip_error_init(&za->error);
58 za->flags = za->ch_flags = 0;
59 za->default_password = NULL;
60 za
[all...]
H A Dzip_rename.c42 zip_rename(zip_t *za, zip_uint64_t idx, const char *name) argument
44 return zip_file_rename(za, idx, name, 0);
H A Dzip_replace.c40 zip_replace(zip_t *za, zip_uint64_t idx, zip_source_t *source) argument
42 return zip_file_replace(za, idx, source, 0);
H A Dzip_set_archive_comment.c41 zip_set_archive_comment(zip_t *za, const char *comment, zip_uint16_t len) argument
45 if (ZIP_IS_RDONLY(za)) {
46 zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
51 zip_error_set(&za->error, ZIP_ER_INVAL, 0);
56 if ((cstr=_zip_string_new((const zip_uint8_t *)comment, len, ZIP_FL_ENC_GUESS, &za->error)) == NULL)
61 zip_error_set(&za->error, ZIP_ER_INVAL, 0);
68 _zip_string_free(za->comment_changes);
69 za->comment_changes = NULL;
71 if (((za->comment_orig && _zip_string_equal(za
[all...]
H A Dzip_set_archive_flag.c39 zip_set_archive_flag(zip_t *za, zip_flags_t flag, int value) argument
44 new_flags = za->ch_flags | flag;
46 new_flags = za->ch_flags & ~flag;
48 if (new_flags == za->ch_flags)
51 if (ZIP_IS_RDONLY(za)) {
52 zip_error_set(&za->error, ZIP_ER_RDONLY, 0);
57 && (za->ch_flags & ZIP_AFL_RDONLY) == 0) {
58 if (_zip_changed(za, NULL)) {
59 zip_error_set(&za->error, ZIP_ER_CHANGED, 0);
64 za
[all...]
H A Dzip_set_default_password.c42 zip_set_default_password(zip_t *za, const char *passwd) argument
44 if (za == NULL)
47 if (za->default_password)
48 free(za->default_password);
51 if ((za->default_password=strdup(passwd)) == NULL) {
52 zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
57 za->default_password = NULL;
H A Dzip_strerror.c39 zip_strerror(zip_t *za) argument
41 return zip_error_strerror(&za->error);
H A Dzip_unchange.c41 zip_unchange(zip_t *za, zip_uint64_t idx) argument
43 return _zip_unchange(za, idx, 0);
48 _zip_unchange(zip_t *za, zip_uint64_t idx, int allow_duplicates) argument
52 if (idx >= za->nentry) {
53 zip_error_set(&za->error, ZIP_ER_INVAL, 0);
57 if (!allow_duplicates && za->entry[idx].changes && (za->entry[idx].changes->changed & ZIP_DIRENT_FILENAME)) {
58 i = _zip_name_locate(za, _zip_get_name(za, idx, ZIP_FL_UNCHANGED, NULL), 0, NULL);
60 zip_error_set(&za
[all...]
H A Dzip_unchange_all.c41 zip_unchange_all(zip_t *za) argument
47 for (i=0; i<za->nentry; i++)
48 ret |= _zip_unchange(za, i, 1);
50 ret |= zip_unchange_archive(za);
H A Dzip_unchange_archive.c41 zip_unchange_archive(zip_t *za) argument
43 if (za->comment_changed) {
44 _zip_string_free(za->comment_changes);
45 za->comment_changes = NULL;
46 za->comment_changed = 0;
49 za->ch_flags = za->flags;

Completed in 33 milliseconds

123