Lines Matching refs:myphar

212 	phar_archive_data *myphar, *actual;  in phar_parse_tarfile()  local
236 myphar = (phar_archive_data *) pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist)); in phar_parse_tarfile()
237 myphar->is_persistent = PHAR_G(persist); in phar_parse_tarfile()
239 zend_hash_init(&myphar->manifest, 2 + (totalsize >> 12), in phar_parse_tarfile()
240 zend_get_hash_value, destroy_phar_manifest_entry, (bool)myphar->is_persistent); in phar_parse_tarfile()
241 zend_hash_init(&myphar->mounted_dirs, 5, in phar_parse_tarfile()
242 zend_get_hash_value, NULL, (bool)myphar->is_persistent); in phar_parse_tarfile()
243 zend_hash_init(&myphar->virtual_dirs, 4 + (totalsize >> 11), in phar_parse_tarfile()
244 zend_get_hash_value, NULL, (bool)myphar->is_persistent); in phar_parse_tarfile()
245 myphar->is_tar = 1; in phar_parse_tarfile()
247 myphar->flags = compression; in phar_parse_tarfile()
251 entry.phar = myphar; in phar_parse_tarfile()
293 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
313 myphar->sig_flags = PHAR_GET_32(buf); in phar_parse_tarfile()
314 …y_signature(fp, php_stream_tell(fp) - size - 512, myphar->sig_flags, buf + 8, size - 8, fname, &my… in phar_parse_tarfile()
322 myphar->sig_len = sig_len; in phar_parse_tarfile()
333 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
345 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
374 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
377 entry.filename = pemalloc(entry.filename_len+1, myphar->is_persistent); in phar_parse_tarfile()
386 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
402 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
414 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
442 entry.filename = pestrndup(name, entry.filename_len, myphar->is_persistent); in phar_parse_tarfile()
453 entry.filename = pestrndup(hdr->name, i, myphar->is_persistent); in phar_parse_tarfile()
463 phar_add_virtual_dirs(myphar, entry.filename, entry.filename_len); in phar_parse_tarfile()
469 pefree(entry.filename, myphar->is_persistent); in phar_parse_tarfile()
471 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
481 entry.is_persistent = myphar->is_persistent; in phar_parse_tarfile()
498 if (!zend_hash_str_exists(&myphar->manifest, hdr->linkname, linkname_len)) { in phar_parse_tarfile()
504 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
513 …newentry = zend_hash_str_update_mem(&myphar->manifest, entry.filename, entry.filename_len, (void*)… in phar_parse_tarfile()
526 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
538 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
559 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
563 actual_alias = pestrndup(buf, size, myphar->is_persistent); in phar_parse_tarfile()
564 myphar->alias = actual_alias; in phar_parse_tarfile()
565 myphar->alias_len = size; in phar_parse_tarfile()
573 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
589 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
606 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
611 if (zend_hash_str_exists(&(myphar->manifest), ".phar/stub.php", sizeof(".phar/stub.php")-1)) { in phar_parse_tarfile()
612 myphar->is_data = 0; in phar_parse_tarfile()
614 myphar->is_data = 1; in phar_parse_tarfile()
618 if (!myphar->is_data && PHAR_G(require_hash) && !myphar->signature) { in phar_parse_tarfile()
620 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
627 myphar->fname = pestrndup(fname, fname_len, myphar->is_persistent); in phar_parse_tarfile()
629 phar_unixify_path_separators(myphar->fname, fname_len); in phar_parse_tarfile()
631 myphar->fname_len = fname_len; in phar_parse_tarfile()
632 myphar->fp = fp; in phar_parse_tarfile()
633 p = strrchr(myphar->fname, '/'); in phar_parse_tarfile()
636 myphar->ext = memchr(p, '.', (myphar->fname + fname_len) - p); in phar_parse_tarfile()
637 if (myphar->ext == p) { in phar_parse_tarfile()
638 myphar->ext = memchr(p + 1, '.', (myphar->fname + fname_len) - p - 1); in phar_parse_tarfile()
640 if (myphar->ext) { in phar_parse_tarfile()
641 myphar->ext_len = (myphar->fname + fname_len) - myphar->ext; in phar_parse_tarfile()
647 …== (actual = zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), myphar->fname, fname_len, myphar))) { in phar_parse_tarfile()
652 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
656 myphar = actual; in phar_parse_tarfile()
661 myphar->is_temporary_alias = 0; in phar_parse_tarfile()
663 …if (NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), actual_alias, myphar->alia… in phar_parse_tarfile()
664 if (SUCCESS != phar_free_alias(fd_ptr, actual_alias, myphar->alias_len)) { in phar_parse_tarfile()
668 zend_hash_str_del(&(PHAR_G(phar_fname_map)), myphar->fname, fname_len); in phar_parse_tarfile()
673 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), actual_alias, myphar->alias_len, myphar); in phar_parse_tarfile()
683 zend_hash_str_del(&(PHAR_G(phar_fname_map)), myphar->fname, fname_len); in phar_parse_tarfile()
687 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, myphar); in phar_parse_tarfile()
688 myphar->alias = pestrndup(alias, alias_len, myphar->is_persistent); in phar_parse_tarfile()
689 myphar->alias_len = alias_len; in phar_parse_tarfile()
691 myphar->alias = pestrndup(myphar->fname, fname_len, myphar->is_persistent); in phar_parse_tarfile()
692 myphar->alias_len = fname_len; in phar_parse_tarfile()
695 myphar->is_temporary_alias = 1; in phar_parse_tarfile()
699 *pphar = myphar; in phar_parse_tarfile()