Searched defs:za (Results 1 - 25 of 48) sorted by relevance

12

/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_file_get_offset.c49 /* _zip_file_get_offset(za, ze):
52 On error, fills in za->error and returns 0.
56 _zip_file_get_offset(struct zip *za, int idx)
61 offset = za->cdir->entry[idx].offset;
63 if (fseeko(za->zp, offset, SEEK_SET) != 0) {
64 _zip_error_set(&za->error, ZIP_ER_SEEK, errno);
68 if (_zip_dirent_read(&de, za->zp, NULL, NULL, 1, &za->error) != 0)
54 _zip_file_get_offset(struct zip *za, int idx) 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_name.c43 zip_get_name(struct zip *za, zip_uint64_t idx, int flags)
45 return _zip_get_name(za, idx, flags, &za->error);
52 _zip_get_name(struct zip *za, zip_uint64_t idx, int flags,
55 if (idx >= za->nentry) {
61 if (za->entry[idx].state == ZIP_ST_DELETED) {
65 if (za->entry[idx].ch_filename)
66 return za->entry[idx].ch_filename;
69 if (za->cdir == NULL || idx >= za
41 zip_get_name(struct zip *za, zip_uint64_t idx, int flags) argument
49 _zip_get_name(struct zip *za, zip_uint64_t idx, int flags, struct zip_error *error) argument
[all...]
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_set_archive_comment.c45 zip_set_archive_comment(struct zip *za, const char *comment, int len)
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 ((tmpcom=(char *)_zip_memdup(comment, len, &za->error)) == NULL)
67 free(za->ch_comment);
68 za->ch_comment = tmpcom;
69 za->ch_comment_len = len;
43 zip_set_archive_comment(struct zip *za, const char *comment, int len) argument
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_source_file.c46 zip_source_file(struct zip *za, const char *fname, zip_uint64_t start,
49 if (za == NULL)
53 _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
57 return _zip_source_file_or_p(za, fname, NULL, start, len, 1, NULL);
44 zip_source_file(struct zip *za, const char *fname, zip_uint64_t start, zip_int64_t len) 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_all.c45 zip_unchange_all(struct zip *za)
50 for (i=0; i<za->nentry; i++)
51 ret |= _zip_unchange(za, i, 1);
53 ret |= zip_unchange_archive(za);
43 zip_unchange_all(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 26 milliseconds

12