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, (zend_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, (zend_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, (zend_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()
284 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
304 myphar->sig_flags = PHAR_GET_32(buf); in phar_parse_tarfile()
305 …e(fp, php_stream_tell(fp) - size - 512, myphar->sig_flags, buf + 8, size - 8, fname, &myphar->sign… in phar_parse_tarfile()
323 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
335 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
364 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
367 entry.filename = pemalloc(entry.filename_len+1, myphar->is_persistent); in phar_parse_tarfile()
376 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
392 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
404 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
432 entry.filename = pestrndup(name, entry.filename_len, myphar->is_persistent); in phar_parse_tarfile()
443 entry.filename = pestrndup(hdr->name, i, myphar->is_persistent); in phar_parse_tarfile()
453 phar_add_virtual_dirs(myphar, entry.filename, entry.filename_len); in phar_parse_tarfile()
459 pefree(entry.filename, myphar->is_persistent); in phar_parse_tarfile()
461 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
470 entry.is_persistent = myphar->is_persistent; in phar_parse_tarfile()
487 if (!zend_hash_str_exists(&myphar->manifest, hdr->linkname, linkname_len)) { in phar_parse_tarfile()
493 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
502 …newentry = zend_hash_str_update_mem(&myphar->manifest, entry.filename, entry.filename_len, (void*)… in phar_parse_tarfile()
515 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
527 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
548 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
552 actual_alias = pestrndup(buf, size, myphar->is_persistent); in phar_parse_tarfile()
553 myphar->alias = actual_alias; in phar_parse_tarfile()
554 myphar->alias_len = size; in phar_parse_tarfile()
562 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
578 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
590 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
595 if (zend_hash_str_exists(&(myphar->manifest), ".phar/stub.php", sizeof(".phar/stub.php")-1)) { in phar_parse_tarfile()
596 myphar->is_data = 0; in phar_parse_tarfile()
598 myphar->is_data = 1; in phar_parse_tarfile()
602 if (!myphar->is_data && PHAR_G(require_hash) && !myphar->signature) { in phar_parse_tarfile()
604 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
611 myphar->fname = pestrndup(fname, fname_len, myphar->is_persistent); in phar_parse_tarfile()
613 phar_unixify_path_separators(myphar->fname, fname_len); in phar_parse_tarfile()
615 myphar->fname_len = fname_len; in phar_parse_tarfile()
616 myphar->fp = fp; in phar_parse_tarfile()
617 p = strrchr(myphar->fname, '/'); in phar_parse_tarfile()
620 myphar->ext = memchr(p, '.', (myphar->fname + fname_len) - p); in phar_parse_tarfile()
621 if (myphar->ext == p) { in phar_parse_tarfile()
622 myphar->ext = memchr(p + 1, '.', (myphar->fname + fname_len) - p - 1); in phar_parse_tarfile()
624 if (myphar->ext) { in phar_parse_tarfile()
625 myphar->ext_len = (myphar->fname + fname_len) - myphar->ext; in phar_parse_tarfile()
631 …== (actual = zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), myphar->fname, fname_len, myphar))) { in phar_parse_tarfile()
636 phar_destroy_phar_data(myphar); in phar_parse_tarfile()
640 myphar = actual; in phar_parse_tarfile()
645 myphar->is_temporary_alias = 0; in phar_parse_tarfile()
647 …if (NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), actual_alias, myphar->alia… in phar_parse_tarfile()
648 if (SUCCESS != phar_free_alias(fd_ptr, actual_alias, myphar->alias_len)) { in phar_parse_tarfile()
652 zend_hash_str_del(&(PHAR_G(phar_fname_map)), myphar->fname, fname_len); in phar_parse_tarfile()
657 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), actual_alias, myphar->alias_len, myphar); in phar_parse_tarfile()
667 zend_hash_str_del(&(PHAR_G(phar_fname_map)), myphar->fname, fname_len); in phar_parse_tarfile()
671 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, myphar); in phar_parse_tarfile()
672 myphar->alias = pestrndup(alias, alias_len, myphar->is_persistent); in phar_parse_tarfile()
673 myphar->alias_len = alias_len; in phar_parse_tarfile()
675 myphar->alias = pestrndup(myphar->fname, fname_len, myphar->is_persistent); in phar_parse_tarfile()
676 myphar->alias_len = fname_len; in phar_parse_tarfile()
679 myphar->is_temporary_alias = 1; in phar_parse_tarfile()
683 *pphar = myphar; in phar_parse_tarfile()