Lines Matching refs:intern

373 #define ZIP_FROM_OBJECT(intern, object) \  argument
376 intern = obj->za; \
377 if (!intern) { \
1032 ze_zip_object * intern = php_zip_fetch_object(object); in php_zip_object_free_storage() local
1035 if (!intern) { in php_zip_object_free_storage()
1038 if (intern->za) { in php_zip_object_free_storage()
1039 if (zip_close(intern->za) != 0) { in php_zip_object_free_storage()
1043 … php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context: %s", zip_strerror(intern->za)); in php_zip_object_free_storage()
1044 zip_discard(intern->za); in php_zip_object_free_storage()
1049 if (intern->buffers_cnt>0) { in php_zip_object_free_storage()
1050 for (i=0; i<intern->buffers_cnt; i++) { in php_zip_object_free_storage()
1051 efree(intern->buffers[i]); in php_zip_object_free_storage()
1053 efree(intern->buffers); in php_zip_object_free_storage()
1056 intern->za = NULL; in php_zip_object_free_storage()
1057 zend_object_std_dtor(&intern->zo); in php_zip_object_free_storage()
1059 if (intern->filename) { in php_zip_object_free_storage()
1060 efree(intern->filename); in php_zip_object_free_storage()
1067 ze_zip_object *intern; in php_zip_object_new() local
1069 intern = zend_object_alloc(sizeof(ze_zip_object), class_type); in php_zip_object_new()
1070 intern->prop_handler = &zip_prop_handlers; in php_zip_object_new()
1071 zend_object_std_init(&intern->zo, class_type); in php_zip_object_new()
1072 object_properties_init(&intern->zo, class_type); in php_zip_object_new()
1073 intern->zo.handlers = &zip_object_handlers; in php_zip_object_new()
1075 return &intern->zo; in php_zip_object_new()
1436 struct zip *intern; local
1494 intern = zip_open(resolved_path, flags, &err);
1495 if (!intern || err) {
1501 ze_obj->za = intern;
1510 struct zip *intern; local
1515 ZIP_FROM_OBJECT(intern, self);
1524 int res = zip_set_default_password(intern, (const char *)password);
1538 struct zip *intern; local
1543 ZIP_FROM_OBJECT(intern, self);
1547 if ((err = zip_close(intern))) {
1551 php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
1552 zip_discard(intern);
1573 struct zip *intern; local
1577 ZIP_FROM_OBJECT(intern, self);
1579 num = zip_get_num_entries(intern, 0);
1588 struct zip *intern; local
1597 ZIP_FROM_OBJECT(intern, self);
1600 zip_error_get(intern, &zep, &syp);
1605 err = zip_get_error(intern);
1616 struct zip *intern; local
1624 ZIP_FROM_OBJECT(intern, self);
1644 idx = zip_stat(intern, s, 0, &sb);
1648 if (zip_dir_add(intern, (const char *)s, 0) == -1) {
1651 zip_error_clear(intern);
1664 struct zip *intern; local
1676 ZIP_FROM_OBJECT(intern, self);
1755 if (php_zip_add_file(intern, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file),
1789 struct zip *intern; local
1796 ZIP_FROM_OBJECT(intern, self);
1813 if (php_zip_add_file(intern, ZSTR_VAL(filename), ZSTR_LEN(filename),
1826 struct zip *intern; local
1836 ZIP_FROM_OBJECT(intern, self);
1855 zs = zip_source_buffer(intern, ze_obj->buffers[pos], ZSTR_LEN(buffer), 0);
1861 cur_idx = zip_name_locate(intern, (const char *)name, 0);
1864 if (zip_delete(intern, cur_idx) == -1) {
1870 if (zip_file_add(intern, name, zs, 0) == -1) {
1874 zip_error_clear(intern);
1884 struct zip *intern; local
1890 ZIP_FROM_OBJECT(intern, self);
1896 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(name), ZSTR_LEN(name), flags, sb);
1906 struct zip *intern; local
1912 ZIP_FROM_OBJECT(intern, self);
1919 if (zip_stat_index(intern, index, flags, &sb) != 0) {
1930 struct zip *intern; local
1936 ZIP_FROM_OBJECT(intern, self);
1946 idx = (zend_long)zip_name_locate(intern, (const char *)ZSTR_VAL(name), flags);
1960 struct zip *intern; local
1965 ZIP_FROM_OBJECT(intern, self);
1972 name = zip_get_name(intern, (int) index, flags);
1986 struct zip *intern; local
1991 ZIP_FROM_OBJECT(intern, self);
2002 if (zip_set_archive_comment(intern, (const char *)comment, comment_len)) {
2014 struct zip *intern; local
2020 ZIP_FROM_OBJECT(intern, self);
2026 comment = zip_get_archive_comment(intern, &comment_len, (int)flags);
2038 struct zip *intern; local
2044 ZIP_FROM_OBJECT(intern, self);
2060 idx = zip_name_locate(intern, name, 0);
2064 PHP_ZIP_SET_FILE_COMMENT(intern, idx, comment, comment_len);
2072 struct zip *intern; local
2079 ZIP_FROM_OBJECT(intern, self);
2091 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2092 PHP_ZIP_SET_FILE_COMMENT(intern, index, comment, comment_len);
2103 struct zip *intern; local
2110 ZIP_FROM_OBJECT(intern, self);
2121 idx = zip_name_locate(intern, name, 0);
2125 if (zip_file_set_external_attributes(intern, idx, (zip_flags_t)flags,
2137 struct zip *intern; local
2142 ZIP_FROM_OBJECT(intern, self);
2149 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2150 if (zip_file_set_external_attributes(intern, (zip_uint64_t)index,
2162 struct zip *intern; local
2171 ZIP_FROM_OBJECT(intern, self);
2182 idx = zip_name_locate(intern, name, 0);
2186 if (zip_file_get_external_attributes(intern, idx,
2200 struct zip *intern; local
2207 ZIP_FROM_OBJECT(intern, self);
2214 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2215 if (zip_file_get_external_attributes(intern, (zip_uint64_t)index,
2231 struct zip *intern; local
2238 ZIP_FROM_OBJECT(intern, self);
2249 idx = zip_name_locate(intern, name, 0);
2254 if (zip_file_set_encryption(intern, idx, (zip_uint16_t)method, password)) {
2265 struct zip *intern; local
2271 ZIP_FROM_OBJECT(intern, self);
2278 if (zip_file_set_encryption(intern, index, (zip_uint16_t)method, password)) {
2290 struct zip *intern; local
2299 ZIP_FROM_OBJECT(intern, self);
2310 idx = zip_name_locate(intern, name, 0);
2315 comment = zip_file_get_comment(intern, idx, &comment_len, (zip_flags_t)flags);
2324 struct zip *intern; local
2331 ZIP_FROM_OBJECT(intern, self);
2338 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2339 comment = zip_file_get_comment(intern, index, &comment_len, (zip_flags_t)flags);
2348 struct zip *intern; local
2355 ZIP_FROM_OBJECT(intern, this);
2366 idx = zip_name_locate(intern, name, 0);
2371 if (zip_set_file_compression(intern, (zip_uint64_t)idx,
2383 struct zip *intern; local
2388 ZIP_FROM_OBJECT(intern, this);
2395 if (zip_set_file_compression(intern, (zip_uint64_t)index,
2407 struct zip *intern; local
2411 ZIP_FROM_OBJECT(intern, self);
2421 if (zip_delete(intern, index) < 0) {
2433 struct zip *intern; local
2439 ZIP_FROM_OBJECT(intern, self);
2448 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2449 if (zip_delete(intern, sb.index)) {
2460 struct zip *intern; local
2467 ZIP_FROM_OBJECT(intern, self);
2481 if (zip_file_rename(intern, index, (const char *)new_name, 0) != 0) {
2492 struct zip *intern; local
2498 ZIP_FROM_OBJECT(intern, self);
2509 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2511 if (zip_file_rename(intern, sb.index, (const char *)new_name, 0)) {
2522 struct zip *intern; local
2526 ZIP_FROM_OBJECT(intern, self);
2536 if (zip_unchange(intern, index) != 0) {
2548 struct zip *intern; local
2554 ZIP_FROM_OBJECT(intern, self);
2564 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2566 if (zip_unchange(intern, sb.index) != 0) {
2578 struct zip *intern; local
2581 ZIP_FROM_OBJECT(intern, self);
2583 if (zip_unchange_all(intern) != 0) {
2595 struct zip *intern; local
2598 ZIP_FROM_OBJECT(intern, self);
2600 if (zip_unchange_archive(intern) != 0) {
2617 struct zip *intern; local
2641 ZIP_FROM_OBJECT(intern, self);
2647 if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_files), Z_STRLEN_P(zval_files))) {
2663 if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file))) {
2678 zip_int64_t i, filecount = zip_get_num_entries(intern, 0);
2686 char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED);
2687 if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file))) {
2698 struct zip *intern; local
2713 ZIP_FROM_OBJECT(intern, self);
2719 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
2724 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2735 zf = zip_fopen_index(intern, index, flags);
2737 zf = zip_fopen(intern, ZSTR_VAL(filename), flags);
2778 struct zip *intern; local
2786 ZIP_FROM_OBJECT(intern, self);
2792 if (zip_stat(intern, ZSTR_VAL(filename), 0, &sb) != 0) {