Lines Matching refs:intern

451 #define ZIP_FROM_OBJECT(intern, object) \  argument
454 intern = obj->za; \
455 if (!intern) { \
1031 ze_zip_object * intern = php_zip_fetch_object(object); in php_zip_object_free_storage() local
1034 if (!intern) { in php_zip_object_free_storage()
1037 if (intern->za) { in php_zip_object_free_storage()
1038 if (zip_close(intern->za) != 0) { in php_zip_object_free_storage()
1039 … php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context: %s", zip_strerror(intern->za)); in php_zip_object_free_storage()
1040 zip_discard(intern->za); in php_zip_object_free_storage()
1044 if (intern->buffers_cnt>0) { in php_zip_object_free_storage()
1045 for (i=0; i<intern->buffers_cnt; i++) { in php_zip_object_free_storage()
1046 efree(intern->buffers[i]); in php_zip_object_free_storage()
1048 efree(intern->buffers); in php_zip_object_free_storage()
1053 _php_zip_progress_callback_free(intern); in php_zip_object_free_storage()
1058 _php_zip_cancel_callback_free(intern); in php_zip_object_free_storage()
1061 intern->za = NULL; in php_zip_object_free_storage()
1062 zend_object_std_dtor(&intern->zo); in php_zip_object_free_storage()
1064 if (intern->filename) { in php_zip_object_free_storage()
1065 efree(intern->filename); in php_zip_object_free_storage()
1072 ze_zip_object *intern; in php_zip_object_new() local
1074 intern = zend_object_alloc(sizeof(ze_zip_object), class_type); in php_zip_object_new()
1075 intern->prop_handler = &zip_prop_handlers; in php_zip_object_new()
1076 zend_object_std_init(&intern->zo, class_type); in php_zip_object_new()
1077 object_properties_init(&intern->zo, class_type); in php_zip_object_new()
1078 intern->zo.handlers = &zip_object_handlers; in php_zip_object_new()
1079 intern->last_id = -1; in php_zip_object_new()
1081 return &intern->zo; in php_zip_object_new()
1432 struct zip *intern; local
1493 intern = zip_open(resolved_path, flags, &err);
1494 if (!intern || err) {
1500 ze_obj->za = intern;
1508 struct zip *intern; local
1517 ZIP_FROM_OBJECT(intern, self);
1523 int res = zip_set_default_password(intern, (const char *)password);
1535 struct zip *intern; local
1544 ZIP_FROM_OBJECT(intern, self);
1548 err = zip_close(intern);
1550 php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
1553 zip_error_get(intern, &ze_obj->err_zip, &ze_obj->err_sys);
1558 ziperr = zip_get_error(intern);
1564 zip_discard(intern);
1589 struct zip *intern; local
1597 ZIP_FROM_OBJECT(intern, self);
1599 num = zip_get_num_entries(intern, 0);
1670 struct zip *intern; local
1682 ZIP_FROM_OBJECT(intern, self);
1697 if ((Z_ZIP_P(self)->last_id = zip_dir_add(intern, (const char *)s, flags)) == -1) {
1700 zip_error_clear(intern);
1907 struct zip *intern; local
1922 ZIP_FROM_OBJECT(intern, self);
1936 zs = zip_source_buffer(intern, ze_obj->buffers[pos], ZSTR_LEN(buffer), 0);
1942 ze_obj->last_id = zip_file_add(intern, name, zs, flags);
1947 zip_error_clear(intern);
1956 struct zip *intern; local
1966 ZIP_FROM_OBJECT(intern, self);
1968 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(name), ZSTR_LEN(name), flags, sb);
1977 struct zip *intern; local
1988 ZIP_FROM_OBJECT(intern, self);
1990 if (zip_stat_index(intern, index, flags, &sb) != 0) {
2000 struct zip *intern; local
2010 ZIP_FROM_OBJECT(intern, self);
2016 idx = (zend_long)zip_name_locate(intern, (const char *)ZSTR_VAL(name), flags);
2029 struct zip *intern; local
2039 ZIP_FROM_OBJECT(intern, self);
2041 name = zip_get_name(intern, (int) index, flags);
2054 struct zip *intern; local
2063 ZIP_FROM_OBJECT(intern, self);
2070 if (zip_set_archive_comment(intern, (const char *)comment, comment_len)) {
2081 struct zip *intern; local
2091 ZIP_FROM_OBJECT(intern, self);
2093 comment = zip_get_archive_comment(intern, &comment_len, (int)flags);
2104 struct zip *intern; local
2120 ZIP_FROM_OBJECT(intern, self);
2127 idx = zip_name_locate(intern, name, 0);
2131 PHP_ZIP_SET_FILE_COMMENT(intern, idx, comment, comment_len);
2138 struct zip *intern; local
2150 ZIP_FROM_OBJECT(intern, self);
2157 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2158 PHP_ZIP_SET_FILE_COMMENT(intern, index, comment, comment_len);
2168 struct zip *intern; local
2180 ZIP_FROM_OBJECT(intern, self);
2187 idx = zip_name_locate(intern, name, 0);
2192 if (zip_file_set_external_attributes(intern, idx, (zip_flags_t)flags,
2203 struct zip *intern; local
2213 ZIP_FROM_OBJECT(intern, self);
2215 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2216 if (zip_file_set_external_attributes(intern, (zip_uint64_t)index,
2227 struct zip *intern; local
2241 ZIP_FROM_OBJECT(intern, self);
2248 idx = zip_name_locate(intern, name, 0);
2253 if (zip_file_get_external_attributes(intern, idx,
2266 struct zip *intern; local
2278 ZIP_FROM_OBJECT(intern, self);
2280 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2281 if (zip_file_get_external_attributes(intern, (zip_uint64_t)index,
2296 struct zip *intern; local
2308 ZIP_FROM_OBJECT(intern, self);
2315 idx = zip_name_locate(intern, name, 0);
2321 if (zip_file_set_encryption(intern, idx, (zip_uint16_t)method, password)) {
2331 struct zip *intern; local
2342 ZIP_FROM_OBJECT(intern, self);
2344 if (zip_file_set_encryption(intern, index, (zip_uint16_t)method, password)) {
2355 struct zip *intern; local
2369 ZIP_FROM_OBJECT(intern, self);
2376 idx = zip_name_locate(intern, name, 0);
2382 comment = zip_file_get_comment(intern, idx, &comment_len, (zip_flags_t)flags);
2390 struct zip *intern; local
2402 ZIP_FROM_OBJECT(intern, self);
2404 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2405 comment = zip_file_get_comment(intern, index, &comment_len, (zip_flags_t)flags);
2413 struct zip *intern; local
2425 ZIP_FROM_OBJECT(intern, this);
2432 idx = zip_name_locate(intern, name, 0);
2438 if (zip_set_file_compression(intern, (zip_uint64_t)idx,
2449 struct zip *intern; local
2459 ZIP_FROM_OBJECT(intern, this);
2461 if (zip_set_file_compression(intern, (zip_uint64_t)index,
2473 struct zip *intern; local
2485 ZIP_FROM_OBJECT(intern, this);
2492 idx = zip_name_locate(intern, name, 0);
2498 if (zip_file_set_mtime(intern, (zip_uint64_t)idx,
2509 struct zip *intern; local
2519 ZIP_FROM_OBJECT(intern, this);
2521 if (zip_file_set_mtime(intern, (zip_uint64_t)index,
2533 struct zip *intern; local
2541 ZIP_FROM_OBJECT(intern, self);
2547 if (zip_delete(intern, index) < 0) {
2558 struct zip *intern; local
2568 ZIP_FROM_OBJECT(intern, self);
2574 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2575 if (zip_delete(intern, sb.index)) {
2585 struct zip *intern; local
2599 ZIP_FROM_OBJECT(intern, self);
2606 if (zip_file_rename(intern, index, (const char *)new_name, 0) != 0) {
2617 struct zip *intern; local
2627 ZIP_FROM_OBJECT(intern, self);
2634 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2636 if (zip_file_rename(intern, sb.index, (const char *)new_name, 0)) {
2647 struct zip *intern; local
2655 ZIP_FROM_OBJECT(intern, self);
2661 if (zip_unchange(intern, index) != 0) {
2672 struct zip *intern; local
2682 ZIP_FROM_OBJECT(intern, self);
2688 PHP_ZIP_STAT_PATH(intern, name, name_len, 0, sb);
2690 if (zip_unchange(intern, sb.index) != 0) {
2701 struct zip *intern; local
2708 ZIP_FROM_OBJECT(intern, self);
2710 if (zip_unchange_all(intern) != 0) {
2721 struct zip *intern; local
2728 ZIP_FROM_OBJECT(intern, self);
2730 if (zip_unchange_archive(intern) != 0) {
2746 struct zip *intern; local
2763 ZIP_FROM_OBJECT(intern, self);
2779 if (!php_zip_extract_file(intern, pathto, ZSTR_VAL(files_str), ZSTR_LEN(files_str))) {
2794 if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file))) {
2803 zip_int64_t i, filecount = zip_get_num_entries(intern, 0);
2811 char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED);
2812 if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file))) {
2824 struct zip *intern; local
2844 ZIP_FROM_OBJECT(intern, self);
2846 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
2852 ZIP_FROM_OBJECT(intern, self);
2854 PHP_ZIP_STAT_INDEX(intern, index, 0, sb);
2865 zf = zip_fopen_index(intern, index, flags);
2867 zf = zip_fopen(intern, ZSTR_VAL(filename), flags);
2904 struct zip *intern; local
2930 ZIP_FROM_OBJECT(intern, self);
2933 PHP_ZIP_STAT_PATH(intern, ZSTR_VAL(filename), ZSTR_LEN(filename), flags, sb);
2935 PHP_ZIP_STAT_INDEX(intern, index, flags, sb);
2938 stream = php_stream_zip_open(intern, &sb, mode, flags STREAMS_CC);
2981 struct zip *intern; local
2992 ZIP_FROM_OBJECT(intern, self);
3001 …if (zip_register_progress_callback_with_state(intern, rate, _php_zip_progress_callback, _php_zip_p…
3028 struct zip *intern; local
3037 ZIP_FROM_OBJECT(intern, self);
3046 …if (zip_register_cancel_callback_with_state(intern, _php_zip_cancel_callback, _php_zip_cancel_call…