Lines Matching refs:fname_len
313 static void phar_do_404(phar_archive_data *phar, char *fname, size_t fname_len, char *f404, size_t … in phar_do_404() argument
340 static void phar_postprocess_ru_web(char *fname, size_t fname_len, char **entry, size_t *entry_len,… in phar_postprocess_ru_web() argument
347 pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), fname, fname_len); in phar_postprocess_ru_web()
350 pphar = zend_hash_str_find_ptr(&cached_phars, fname, fname_len); in phar_postprocess_ru_web()
401 size_t fname_len, arch_len, entry_len; in PHP_METHOD() local
409 fname_len = strlen(fname); in PHP_METHOD()
411 …if (fname_len > 7 && !memcmp(fname, "phar://", 7) && SUCCESS == phar_split_fname(fname, fname_len,… in PHP_METHOD()
438 size_t fname_len, arch_len, entry_len; in PHP_METHOD() local
447 fname_len = strlen(fname); in PHP_METHOD()
450 phar_unixify_path_separators(fname, fname_len); in PHP_METHOD()
453 …if (fname_len > 7 && !memcmp(fname, "phar://", 7) && SUCCESS == phar_split_fname(fname, fname_len,… in PHP_METHOD()
500 …e_map)) && NULL != (pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), fname, fname_len))) { in PHP_METHOD()
502 …_G(manifest_cached) && NULL != (pphar = zend_hash_str_find_ptr(&cached_phars, fname, fname_len))) { in PHP_METHOD()
533 size_t fname_len, index_php_len = 0; in PHP_METHOD() local
546 fname_len = strlen(fname); in PHP_METHOD()
573 fname = estrndup(fname, fname_len); in PHP_METHOD()
574 phar_unixify_path_separators(fname, fname_len); in PHP_METHOD()
576 basename = zend_memrchr(fname, '/', fname_len); in PHP_METHOD()
637 pt = estrndup(testit, (pt - testit) + (fname_len - (basename - fname))); in PHP_METHOD()
649 entry_len -= (pt - path_info) + (fname_len - (basename - fname)); in PHP_METHOD()
650 entry = estrndup(pt + (fname_len - (basename - fname)), entry_len); in PHP_METHOD()
652 pt = estrndup(path_info, (pt - path_info) + (fname_len - (basename - fname))); in PHP_METHOD()
730 phar_postprocess_ru_web(fname, fname_len, &entry, &entry_len, &ru, &ru_len); in PHP_METHOD()
749 if (FAILURE == phar_get_archive(&phar, fname, fname_len, NULL, 0, NULL) || in PHP_METHOD()
751 phar_do_404(phar, fname, fname_len, f404, f404_len, entry, entry_len); in PHP_METHOD()
767 tmp = strstr(path_info, basename) + fname_len; in PHP_METHOD()
795 if (FAILURE == phar_get_archive(&phar, fname, fname_len, NULL, 0, NULL) || in PHP_METHOD()
797 phar_do_404(phar, fname, fname_len, f404, f404_len, entry, entry_len); in PHP_METHOD()
980 size_t fname_len, alias_len = 0; in PHP_METHOD() local
982 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s!", &fname, &fname_len, &alias, &alias_len) == FAIL… in PHP_METHOD()
988 …RETVAL_BOOL(phar_open_from_filename(fname, fname_len, alias, alias_len, REPORT_ERRORS, NULL, &erro… in PHP_METHOD()
1058 size_t fname_len; in PHP_METHOD() local
1063 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|b", &fname, &fname_len, &executable) == FAILURE) { in PHP_METHOD()
1068 …RETVAL_BOOL(phar_detect_phar_fname_ext(fname, fname_len, &ext_str, &ext_len, is_executable, 2, 1) … in PHP_METHOD()
1117 size_t fname_len, alias_len = 0; in PHP_METHOD() local
1131 …if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p|ls!l", &fname, &fname_len, &flags, &alias, &al… in PHP_METHOD()
1135 …if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p|ls!", &fname, &fname_len, &flags, &alias, &ali… in PHP_METHOD()
1146 …if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, !is_data, … in PHP_METHOD()
1153 fname_len = arch_len; in PHP_METHOD()
1156 arch = estrndup(fname, fname_len); in PHP_METHOD()
1157 arch_len = fname_len; in PHP_METHOD()
1163 …if (phar_open_or_create_filename(fname, fname_len, alias, alias_len, is_data, REPORT_ERRORS, &phar… in PHP_METHOD()
1218 fname_len = spprintf(&fname, 0, "phar://%s%s", phar_data->fname, entry); in PHP_METHOD()
1221 fname_len = spprintf(&fname, 0, "phar://%s", phar_data->fname); in PHP_METHOD()
1224 ZVAL_STRINGL(&arg1, fname, fname_len); in PHP_METHOD()
1299 size_t fname_len; in PHP_METHOD() local
1303 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
1307 if (!fname_len) { in PHP_METHOD()
1312 if (FAILURE == phar_open_from_filename(fname, fname_len, NULL, 0, REPORT_ERRORS, &phar, &error)) { in PHP_METHOD()
1326 if ((size_t)arch_len == fname_len && !memcmp(arch, fname, arch_len)) { in PHP_METHOD()
1346 fname = estrndup(phar->fname, phar->fname_len); in PHP_METHOD()
1400 size_t fname_len; in phar_build() local
1474 fname_len = spprintf(&fname, 0, "%s%c%s", test, DEFAULT_SLASH, intern->u.dir.entry.d_name); in phar_build()
1475 php_stat(fname, fname_len, FS_IS_DIR, &dummy); in phar_build()
1488 fname_len = strlen(fname); in phar_build()
1504 fname_len = strlen(fname); in phar_build()
1516 fname_len = Z_STRLEN_P(value); in phar_build()
1532 …if (fname_len >= base_len && strncmp(fname, base, base_len) == 0 && ((ch = fname[base_len - IS_SLA… in phar_build()
1533 str_key_len = fname_len - base_len; in phar_build()
1638 …if (!(data = phar_get_or_create_entry_data(phar_obj->archive->fname, phar_obj->archive->fname_len,… in phar_build()
2088 oldpath = estrndup(phar->fname, phar->fname_len); in phar_rename_archive()
2089 if ((oldname = zend_memrchr(phar->fname, '/', phar->fname_len))) { in phar_rename_archive()
2133 phar->fname_len = new_len; in phar_rename_archive()
2135 phar->ext = newpath + phar->fname_len - strlen(ext) - 1; in phar_rename_archive()
2139 …est_cached) && NULL != (pphar = zend_hash_str_find_ptr(&cached_phars, newpath, phar->fname_len))) { in phar_rename_archive()
2145 …if (NULL != (pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), newpath, phar->fname_len)))… in phar_rename_archive()
2146 if (pphar->fname_len == phar->fname_len && !memcmp(pphar->fname, phar->fname, phar->fname_len)) { in phar_rename_archive()
2174 …if (SUCCESS != phar_detect_phar_fname_ext(newpath, phar->fname_len, (const char **) &(phar->ext), … in phar_rename_archive()
2189 zend_hash_str_update_ptr(&(PHAR_G(phar_alias_map)), newpath, phar->fname_len, phar); in phar_rename_archive()
2195 …if (SUCCESS != phar_detect_phar_fname_ext(newpath, phar->fname_len, (const char **) &(phar->ext), … in phar_rename_archive()
2206 …) && NULL == zend_hash_str_update_ptr(&(PHAR_G(phar_fname_map)), newpath, phar->fname_len, phar)) { in phar_rename_archive()
2215 zend_hash_str_del(&(PHAR_G(phar_fname_map)), newpath, phar->fname_len); in phar_rename_archive()
2238 ZVAL_STRINGL(&arg1, phar->fname, phar->fname_len); in phar_rename_archive()
2286 phar->fname_len = source->fname_len; in phar_convert_to_other()
2625 size_t fname_len; in PHP_METHOD() local
2636 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
2644 if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) { in PHP_METHOD()
2645 …L != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) { in PHP_METHOD()
2698 RETURN_STRINGL(phar_obj->archive->fname, phar_obj->archive->fname_len); in PHP_METHOD()
3544 size_t fname_len; in PHP_METHOD() local
3549 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
3553 if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) { in PHP_METHOD()
3554 …L != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) { in PHP_METHOD()
3561 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) { in PHP_METHOD()
3567 if (zend_hash_str_exists(&phar_obj->archive->virtual_dirs, fname, (uint32_t) fname_len)) { in PHP_METHOD()
3581 size_t fname_len; in PHP_METHOD() local
3587 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
3592 if (!(entry = phar_get_entry_info_dir(phar_obj->archive, fname, fname_len, 1, &error, 0))) { in PHP_METHOD()
3595 …if (fname_len == sizeof(".phar/stub.php")-1 && !memcmp(fname, ".phar/stub.php", sizeof(".phar/stub… in PHP_METHOD()
3600 …if (fname_len == sizeof(".phar/alias.txt")-1 && !memcmp(fname, ".phar/alias.txt", sizeof(".phar/al… in PHP_METHOD()
3605 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) { in PHP_METHOD()
3642 …if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, filename, filenam… in phar_add_file()
3705 …if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, dirname, dirname_… in phar_mkdir()
3740 size_t fname_len, cont_len; in PHP_METHOD() local
3749 …if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "pr", &fname, &fname_len, &… in PHP_METHOD()
3750 …&& zend_parse_parameters(ZEND_NUM_ARGS(), "ps", &fname, &fname_len, &cont_str, &cont_len) == FAILU… in PHP_METHOD()
3753 …if (fname_len == sizeof(".phar/stub.php")-1 && !memcmp(fname, ".phar/stub.php", sizeof(".phar/stub… in PHP_METHOD()
3758 …if (fname_len == sizeof(".phar/alias.txt")-1 && !memcmp(fname, ".phar/alias.txt", sizeof(".phar/al… in PHP_METHOD()
3763 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) { in PHP_METHOD()
3768 phar_add_file(&(phar_obj->archive), fname, fname_len, cont_str, cont_len, zresource); in PHP_METHOD()
3778 size_t fname_len; in PHP_METHOD() local
3787 if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
3791 if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) { in PHP_METHOD()
3792 …L != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) { in PHP_METHOD()
3804 entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len); in PHP_METHOD()
3853 size_t fname_len, localname_len = 0; in PHP_METHOD() local
3859 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s", &fname, &fname_len, &localname, &localname_len) … in PHP_METHOD()
3875 fname_len = localname_len; in PHP_METHOD()
3879 phar_add_file(&(phar_obj->archive), fname, fname_len, NULL, 0, &zresource); in PHP_METHOD()
4444 size_t fname_len; in PHP_METHOD() local
4451 if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) { in PHP_METHOD()
4462 …if (fname_len < 7 || memcmp(fname, "phar://", 7) || phar_split_fname(fname, fname_len, &arch, &arc… in PHP_METHOD()
4495 ZVAL_STRINGL(&arg1, fname, fname_len); in PHP_METHOD()