Lines Matching refs:fname_len
309 static void phar_do_404(phar_archive_data *phar, char *fname, size_t fname_len, char *f404, size_t … in phar_do_404() argument
336 static void phar_postprocess_ru_web(char *fname, size_t fname_len, char **entry, size_t *entry_len,… in phar_postprocess_ru_web() argument
343 pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), fname, fname_len); in phar_postprocess_ru_web()
346 pphar = zend_hash_str_find_ptr(&cached_phars, fname, fname_len); in phar_postprocess_ru_web()
438 size_t fname_len, arch_len, entry_len; in PHP_METHOD() local
453 fname_len = 0; in PHP_METHOD()
456 fname_len = ZSTR_LEN(zend_file_name); in PHP_METHOD()
461 if (memchr(fname, '\\', fname_len)) { in PHP_METHOD()
462 fname = do_alloca(fname_len + 1, fname_use_heap); in PHP_METHOD()
463 memcpy(fname, save_fname, fname_len); in PHP_METHOD()
464 fname[fname_len] = '\0'; in PHP_METHOD()
465 phar_unixify_path_separators(fname, fname_len); in PHP_METHOD()
469 …if (fname_len > 7 && !memcmp(fname, "phar://", 7) && SUCCESS == phar_split_fname(fname, fname_len,… in PHP_METHOD()
508 …e_map)) && NULL != (pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), fname, fname_len))) { in PHP_METHOD()
510 …_G(manifest_cached) && NULL != (pphar = zend_hash_str_find_ptr(&cached_phars, fname, fname_len))) { in PHP_METHOD()
550 size_t fname_len, index_php_len = 0; in PHP_METHOD() local
593 fname_len = ZSTR_LEN(zend_file_name); in PHP_METHOD()
596 if (memchr(fname, '\\', fname_len)) { in PHP_METHOD()
597 fname = estrndup(fname, fname_len); in PHP_METHOD()
598 phar_unixify_path_separators(fname, fname_len); in PHP_METHOD()
601 basename = zend_memrchr(fname, '/', fname_len); in PHP_METHOD()
663 pt = estrndup(testit, (pt - testit) + (fname_len - (basename - fname))); in PHP_METHOD()
675 entry_len -= (pt - path_info) + (fname_len - (basename - fname)); in PHP_METHOD()
676 entry = estrndup(pt + (fname_len - (basename - fname)), entry_len); in PHP_METHOD()
678 pt = estrndup(path_info, (pt - path_info) + (fname_len - (basename - fname))); in PHP_METHOD()
737 phar_postprocess_ru_web(fname, fname_len, &entry, &entry_len, &ru, &ru_len); in PHP_METHOD()
756 if (FAILURE == phar_get_archive(&phar, fname, fname_len, NULL, 0, NULL) || in PHP_METHOD()
758 phar_do_404(phar, fname, fname_len, f404, f404_len, entry, entry_len); in PHP_METHOD()
774 tmp = strstr(path_info, basename) + fname_len; in PHP_METHOD()
802 if (FAILURE == phar_get_archive(&phar, fname, fname_len, NULL, 0, NULL) || in PHP_METHOD()
804 phar_do_404(phar, fname, fname_len, f404, f404_len, entry, entry_len); in PHP_METHOD()
978 size_t fname_len, alias_len = 0; in PHP_METHOD() local
980 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s!", &fname, &fname_len, &alias, &alias_len) == FAIL… in PHP_METHOD()
986 …RETVAL_BOOL(phar_open_from_filename(fname, fname_len, alias, alias_len, REPORT_ERRORS, NULL, &erro… in PHP_METHOD()
1052 size_t fname_len; in PHP_METHOD() local
1057 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|b", &fname, &fname_len, &executable) == FAILURE) { in PHP_METHOD()
1062 …RETVAL_BOOL(phar_detect_phar_fname_ext(fname, fname_len, &ext_str, &ext_len, is_executable, 2, 1) … in PHP_METHOD()
1110 size_t fname_len, alias_len = 0; in PHP_METHOD() local
1124 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ls!l", &fname, &fname_len, &flags, &alias, &alias_le… in PHP_METHOD()
1128 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ls!", &fname, &fname_len, &flags, &alias, &alias_len… in PHP_METHOD()
1139 …if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, !is_data, … in PHP_METHOD()
1146 fname_len = arch_len; in PHP_METHOD()
1149 arch = estrndup(fname, fname_len); in PHP_METHOD()
1150 arch_len = fname_len; in PHP_METHOD()
1156 …if (phar_open_or_create_filename(fname, fname_len, alias, alias_len, is_data, REPORT_ERRORS, &phar… in PHP_METHOD()
1211 fname_len = spprintf(&fname, 0, "phar://%s%s", phar_data->fname, entry); in PHP_METHOD()
1214 fname_len = spprintf(&fname, 0, "phar://%s", phar_data->fname); in PHP_METHOD()
1217 ZVAL_STRINGL(&arg1, fname, fname_len); in PHP_METHOD()
1288 size_t fname_len; in PHP_METHOD() local
1292 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
1296 if (!fname_len) { in PHP_METHOD()
1301 if (FAILURE == phar_open_from_filename(fname, fname_len, NULL, 0, REPORT_ERRORS, &phar, &error)) { in PHP_METHOD()
1318 if (arch_len == fname_len && !memcmp(arch, fname, arch_len)) { in PHP_METHOD()
1338 fname = estrndup(phar->fname, phar->fname_len); in PHP_METHOD()
1393 size_t fname_len; in phar_build() local
1466 …fname_len = spprintf(&fname, 0, "%s%c%s", ZSTR_VAL(test_str), DEFAULT_SLASH, intern->u.dir.entry.d… in phar_build()
1479 fname_len = strlen(fname); in phar_build()
1496 fname_len = strlen(fname); in phar_build()
1508 fname_len = Z_STRLEN_P(value); in phar_build()
1524 …if (fname_len >= base_len && strncmp(fname, base, base_len) == 0 && ((ch = fname[base_len - IS_SLA… in phar_build()
1525 str_key_len = fname_len - base_len; in phar_build()
1630 …if (!(data = phar_get_or_create_entry_data(phar_obj->archive->fname, phar_obj->archive->fname_len,… in phar_build()
2063 oldpath = estrndup(phar->fname, phar->fname_len); in phar_rename_archive()
2064 if ((oldname = zend_memrchr(phar->fname, '/', phar->fname_len))) { in phar_rename_archive()
2108 phar->fname_len = new_len; in phar_rename_archive()
2110 phar->ext = newpath + phar->fname_len - strlen(ext) - 1; in phar_rename_archive()
2114 …est_cached) && NULL != (pphar = zend_hash_str_find_ptr(&cached_phars, newpath, phar->fname_len))) { in phar_rename_archive()
2120 …if (NULL != (pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), newpath, phar->fname_len)))… in phar_rename_archive()
2121 if (pphar->fname_len == phar->fname_len && !memcmp(pphar->fname, phar->fname, phar->fname_len)) { in phar_rename_archive()
2151 …if (SUCCESS != phar_detect_phar_fname_ext(newpath, phar->fname_len, (const char **) &(phar->ext), … in phar_rename_archive()
2166 zend_hash_str_update_ptr(&(PHAR_G(phar_alias_map)), newpath, phar->fname_len, phar); in phar_rename_archive()
2172 …if (SUCCESS != phar_detect_phar_fname_ext(newpath, phar->fname_len, (const char **) &(phar->ext), … in phar_rename_archive()
2183 …) && NULL == zend_hash_str_update_ptr(&(PHAR_G(phar_fname_map)), newpath, phar->fname_len, phar)) { in phar_rename_archive()
2192 zend_hash_str_del(&(PHAR_G(phar_fname_map)), newpath, phar->fname_len); in phar_rename_archive()
2215 ZVAL_STRINGL(&arg1, phar->fname, phar->fname_len); in phar_rename_archive()
2263 phar->fname_len = source->fname_len; in phar_convert_to_other()
2607 size_t fname_len; in PHP_METHOD() local
2611 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
2627 …L != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) { in PHP_METHOD()
2676 RETURN_STRINGL(phar_obj->archive->fname, phar_obj->archive->fname_len); in PHP_METHOD()
3510 size_t fname_len; in PHP_METHOD() local
3513 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
3519 if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) { in PHP_METHOD()
3520 …L != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) { in PHP_METHOD()
3527 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) { in PHP_METHOD()
3533 if (zend_hash_str_exists(&phar_obj->archive->virtual_dirs, fname, (uint32_t) fname_len)) { in PHP_METHOD()
3545 size_t fname_len; in PHP_METHOD() local
3550 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
3557 if (!(entry = phar_get_entry_info_dir(phar_obj->archive, fname, fname_len, 1, &error, 0))) { in PHP_METHOD()
3560 …if (fname_len == sizeof(".phar/stub.php")-1 && !memcmp(fname, ".phar/stub.php", sizeof(".phar/stub… in PHP_METHOD()
3565 …if (fname_len == sizeof(".phar/alias.txt")-1 && !memcmp(fname, ".phar/alias.txt", sizeof(".phar/al… in PHP_METHOD()
3570 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) { in PHP_METHOD()
3619 …if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, filename, filenam… in phar_add_file()
3689 …if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, dirname, dirname_… in phar_mkdir()
3722 size_t fname_len, cont_len; in PHP_METHOD() local
3725 …if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "pr", &fname, &fname_len, &… in PHP_METHOD()
3726 …&& zend_parse_parameters(ZEND_NUM_ARGS(), "ps", &fname, &fname_len, &cont_str, &cont_len) == FAILU… in PHP_METHOD()
3737 …if (fname_len == sizeof(".phar/stub.php")-1 && !memcmp(fname, ".phar/stub.php", sizeof(".phar/stub… in PHP_METHOD()
3742 …if (fname_len == sizeof(".phar/alias.txt")-1 && !memcmp(fname, ".phar/alias.txt", sizeof(".phar/al… in PHP_METHOD()
3747 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) { in PHP_METHOD()
3752 phar_add_file(&(phar_obj->archive), fname, fname_len, cont_str, cont_len, zresource); in PHP_METHOD()
3760 size_t fname_len; in PHP_METHOD() local
3763 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
3774 if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) { in PHP_METHOD()
3775 …L != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) { in PHP_METHOD()
3787 entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len); in PHP_METHOD()
3828 size_t fname_len, localname_len = 0; in PHP_METHOD() local
3832 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s!", &fname, &fname_len, &localname, &localname_len)… in PHP_METHOD()
3850 fname_len = localname_len; in PHP_METHOD()
3854 phar_add_file(&(phar_obj->archive), fname, fname_len, NULL, 0, &zresource); in PHP_METHOD()
4426 size_t fname_len; in PHP_METHOD() local
4433 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
4444 …if (fname_len < 7 || memcmp(fname, "phar://", 7) || phar_split_fname(fname, fname_len, &arch, &arc… in PHP_METHOD()
4477 ZVAL_STRINGL(&arg1, fname, fname_len); in PHP_METHOD()