Lines Matching refs:intern

467 #define ZIP_FROM_OBJECT(intern, object) \  argument
470 intern = obj->za; \
471 if (!intern) { \
1047 ze_zip_object * intern = php_zip_fetch_object(object); in php_zip_object_free_storage() local
1050 if (!intern) { in php_zip_object_free_storage()
1053 if (intern->za) { in php_zip_object_free_storage()
1054 if (zip_close(intern->za) != 0) { in php_zip_object_free_storage()
1055 … php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context: %s", zip_strerror(intern->za)); in php_zip_object_free_storage()
1056 zip_discard(intern->za); in php_zip_object_free_storage()
1060 if (intern->buffers_cnt>0) { in php_zip_object_free_storage()
1061 for (i=0; i<intern->buffers_cnt; i++) { in php_zip_object_free_storage()
1062 efree(intern->buffers[i]); in php_zip_object_free_storage()
1064 efree(intern->buffers); in php_zip_object_free_storage()
1069 _php_zip_progress_callback_free(intern); in php_zip_object_free_storage()
1074 _php_zip_cancel_callback_free(intern); in php_zip_object_free_storage()
1077 intern->za = NULL; in php_zip_object_free_storage()
1078 zend_object_std_dtor(&intern->zo); in php_zip_object_free_storage()
1080 if (intern->filename) { in php_zip_object_free_storage()
1081 efree(intern->filename); in php_zip_object_free_storage()
1088 ze_zip_object *intern; in php_zip_object_new() local
1090 intern = zend_object_alloc(sizeof(ze_zip_object), class_type); in php_zip_object_new()
1091 intern->prop_handler = &zip_prop_handlers; in php_zip_object_new()
1092 zend_object_std_init(&intern->zo, class_type); in php_zip_object_new()
1093 object_properties_init(&intern->zo, class_type); in php_zip_object_new()
1094 intern->last_id = -1; in php_zip_object_new()
1096 return &intern->zo; in php_zip_object_new()
1447 struct zip *intern; local
1508 intern = zip_open(resolved_path, flags, &err);
1509 if (!intern || err) {
1515 ze_obj->za = intern;
1523 struct zip *intern; local
1532 ZIP_FROM_OBJECT(intern, self);
1538 int res = zip_set_default_password(intern, (const char *)password);
1550 struct zip *intern; local
1559 ZIP_FROM_OBJECT(intern, self);
1563 err = zip_close(intern);
1565 php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
1568 zip_error_get(intern, &ze_obj->err_zip, &ze_obj->err_sys);
1573 ziperr = zip_get_error(intern);
1579 zip_discard(intern);
1604 struct zip *intern; local
1612 ZIP_FROM_OBJECT(intern, self);
1614 num = zip_get_num_entries(intern, 0);
1685 struct zip *intern; local
1697 ZIP_FROM_OBJECT(intern, self);
1712 if ((Z_ZIP_P(self)->last_id = zip_dir_add(intern, (const char *)s, flags)) == -1) {
1715 zip_error_clear(intern);
1922 struct zip *intern; local
1937 ZIP_FROM_OBJECT(intern, self);
1951 zs = zip_source_buffer(intern, ze_obj->buffers[pos], ZSTR_LEN(buffer), 0);
1957 ze_obj->last_id = zip_file_add(intern, name, zs, flags);
1962 zip_error_clear(intern);
1971 struct zip *intern; local
1981 ZIP_FROM_OBJECT(intern, self);
1983 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(name), ZSTR_LEN(name), flags, sb);
1992 struct zip *intern; local
2003 ZIP_FROM_OBJECT(intern, self);
2005 if (zip_stat_index(intern, index, flags, &sb) != 0) {
2015 struct zip *intern; local
2025 ZIP_FROM_OBJECT(intern, self);
2031 idx = (zend_long)zip_name_locate(intern, (const char *)ZSTR_VAL(name), flags);
2044 struct zip *intern; local
2054 ZIP_FROM_OBJECT(intern, self);
2056 name = zip_get_name(intern, (int) index, flags);
2069 struct zip *intern; local
2078 ZIP_FROM_OBJECT(intern, self);
2085 if (zip_set_archive_comment(intern, (const char *)comment, comment_len)) {
2096 struct zip *intern; local
2106 ZIP_FROM_OBJECT(intern, self);
2108 comment = zip_get_archive_comment(intern, &comment_len, (int)flags);
2118 struct zip *intern; local
2126 ZIP_FROM_OBJECT(intern, self);
2128 if (zip_set_archive_flag(intern, flag, (int)value)) {
2137 struct zip *intern; local
2145 ZIP_FROM_OBJECT(intern, self);
2147 RETURN_LONG(zip_get_archive_flag(intern, flag, flags));
2153 struct zip *intern; local
2169 ZIP_FROM_OBJECT(intern, self);
2176 idx = zip_name_locate(intern, name, 0);
2180 PHP_ZIP_SET_FILE_COMMENT(intern, idx, comment, comment_len);
2187 struct zip *intern; local
2199 ZIP_FROM_OBJECT(intern, self);
2206 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2207 PHP_ZIP_SET_FILE_COMMENT(intern, index, comment, comment_len);
2217 struct zip *intern; local
2229 ZIP_FROM_OBJECT(intern, self);
2236 idx = zip_name_locate(intern, name, 0);
2241 if (zip_file_set_external_attributes(intern, idx, (zip_flags_t)flags,
2252 struct zip *intern; local
2262 ZIP_FROM_OBJECT(intern, self);
2264 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2265 if (zip_file_set_external_attributes(intern, (zip_uint64_t)index,
2276 struct zip *intern; local
2290 ZIP_FROM_OBJECT(intern, self);
2297 idx = zip_name_locate(intern, name, 0);
2302 if (zip_file_get_external_attributes(intern, idx,
2315 struct zip *intern; local
2327 ZIP_FROM_OBJECT(intern, self);
2329 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2330 if (zip_file_get_external_attributes(intern, (zip_uint64_t)index,
2345 struct zip *intern; local
2357 ZIP_FROM_OBJECT(intern, self);
2364 idx = zip_name_locate(intern, name, 0);
2370 if (zip_file_set_encryption(intern, idx, (zip_uint16_t)method, password)) {
2380 struct zip *intern; local
2391 ZIP_FROM_OBJECT(intern, self);
2393 if (zip_file_set_encryption(intern, index, (zip_uint16_t)method, password)) {
2404 struct zip *intern; local
2418 ZIP_FROM_OBJECT(intern, self);
2425 idx = zip_name_locate(intern, name, 0);
2431 comment = zip_file_get_comment(intern, idx, &comment_len, (zip_flags_t)flags);
2439 struct zip *intern; local
2451 ZIP_FROM_OBJECT(intern, self);
2453 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2454 comment = zip_file_get_comment(intern, index, &comment_len, (zip_flags_t)flags);
2462 struct zip *intern; local
2474 ZIP_FROM_OBJECT(intern, this);
2481 idx = zip_name_locate(intern, name, 0);
2487 if (zip_set_file_compression(intern, (zip_uint64_t)idx,
2498 struct zip *intern; local
2508 ZIP_FROM_OBJECT(intern, this);
2510 if (zip_set_file_compression(intern, (zip_uint64_t)index,
2522 struct zip *intern; local
2534 ZIP_FROM_OBJECT(intern, this);
2541 idx = zip_name_locate(intern, name, 0);
2547 if (zip_file_set_mtime(intern, (zip_uint64_t)idx,
2558 struct zip *intern; local
2568 ZIP_FROM_OBJECT(intern, this);
2570 if (zip_file_set_mtime(intern, (zip_uint64_t)index,
2582 struct zip *intern; local
2590 ZIP_FROM_OBJECT(intern, self);
2596 if (zip_delete(intern, index) < 0) {
2607 struct zip *intern; local
2617 ZIP_FROM_OBJECT(intern, self);
2623 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2624 if (zip_delete(intern, sb.index)) {
2634 struct zip *intern; local
2648 ZIP_FROM_OBJECT(intern, self);
2655 if (zip_file_rename(intern, index, (const char *)new_name, 0) != 0) {
2666 struct zip *intern; local
2676 ZIP_FROM_OBJECT(intern, self);
2683 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2685 if (zip_file_rename(intern, sb.index, (const char *)new_name, 0)) {
2696 struct zip *intern; local
2704 ZIP_FROM_OBJECT(intern, self);
2710 if (zip_unchange(intern, index) != 0) {
2721 struct zip *intern; local
2731 ZIP_FROM_OBJECT(intern, self);
2737 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2739 if (zip_unchange(intern, sb.index) != 0) {
2750 struct zip *intern; local
2757 ZIP_FROM_OBJECT(intern, self);
2759 if (zip_unchange_all(intern) != 0) {
2770 struct zip *intern; local
2777 ZIP_FROM_OBJECT(intern, self);
2779 if (zip_unchange_archive(intern) != 0) {
2795 struct zip *intern; local
2812 ZIP_FROM_OBJECT(intern, self);
2828 if (!php_zip_extract_file(intern, pathto, ZSTR_VAL(files_str), ZSTR_LEN(files_str), -1)) {
2843 if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file), -1)) {
2852 zip_int64_t i, filecount = zip_get_num_entries(intern, 0);
2860 const char *file = zip_get_name(intern, i, ZIP_FL_UNCHANGED);
2861 if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file), i)) {
2873 struct zip *intern; local
2893 ZIP_FROM_OBJECT(intern, self);
2895 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
2901 ZIP_FROM_OBJECT(intern, self);
2903 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2914 zf = zip_fopen_index(intern, index, flags);
2916 zf = zip_fopen(intern, ZSTR_VAL(filename), flags);
2953 struct zip *intern; local
2979 ZIP_FROM_OBJECT(intern, self);
2982 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
2984 PHP_ZIP_STAT_INDEX(intern, index, flags, sb);
2987 stream = php_stream_zip_open(intern, &sb, mode, flags STREAMS_CC);
3030 struct zip *intern; local
3041 ZIP_FROM_OBJECT(intern, self);
3050 …if (zip_register_progress_callback_with_state(intern, rate, _php_zip_progress_callback, _php_zip_p…
3077 struct zip *intern; local
3086 ZIP_FROM_OBJECT(intern, self);
3095 …if (zip_register_cancel_callback_with_state(intern, _php_zip_cancel_callback, _php_zip_cancel_call…