Lines Matching refs:p
550 skip_to_option_part(char_u *p) in skip_to_option_part() argument
552 if (*p == ',') in skip_to_option_part()
553 ++p; in skip_to_option_part()
554 while (*p == ' ') in skip_to_option_part()
555 ++p; in skip_to_option_part()
556 return p; in skip_to_option_part()
1208 char_u *p; in init_homedir() local
1211 p = vim_strchr(var + 1, '%'); in init_homedir()
1212 if (p != NULL) in init_homedir()
1214 vim_strncpy(NameBuff, var + 1, p - (var + 1)); in init_homedir()
1217 && STRLEN(exp) + STRLEN(p) < MAXPATHL) in init_homedir()
1219 vim_snprintf((char *)NameBuff, MAXPATHL, "%s%s", exp, p + 1); in init_homedir()
1303 char_u *p; in expand_env_save_opt() local
1305 p = alloc(MAXPATHL); in expand_env_save_opt()
1306 if (p != NULL) in expand_env_save_opt()
1307 expand_env_esc(src, p, MAXPATHL, FALSE, one, NULL); in expand_env_save_opt()
1308 return p; in expand_env_save_opt()
1529 char_u *p = vim_strsave(var); in expand_env_esc() local
1531 if (p != NULL) in expand_env_esc()
1535 var = p; in expand_env_esc()
1546 char_u *p = vim_strsave_escaped(var, (char_u *)" \t"); in expand_env_esc() local
1548 if (p != NULL) in expand_env_esc()
1552 var = p; in expand_env_esc()
1615 remove_tail(char_u *p, char_u *pend, char_u *name) in remove_tail() argument
1620 if (newend >= p in remove_tail()
1622 && (newend == p || after_pathsep(p, newend))) in remove_tail()
1634 char_u *p; in vim_version_dir() local
1638 p = concat_fnames(vimdir, (char_u *)VIM_VERSION_NODOT, TRUE); in vim_version_dir()
1639 if (p != NULL && mch_isdir(p)) in vim_version_dir()
1640 return p; in vim_version_dir()
1641 vim_free(p); in vim_version_dir()
1642 p = concat_fnames(vimdir, (char_u *)RUNTIME_DIRNAME, TRUE); in vim_version_dir()
1643 if (p != NULL && mch_isdir(p)) in vim_version_dir()
1644 return p; in vim_version_dir()
1645 vim_free(p); in vim_version_dir()
1659 char_u *p = NULL; in vim_getenv() local
1682 p = utf16_to_enc(wp, NULL); in vim_getenv()
1683 if (p == NULL) in vim_getenv()
1687 return p; in vim_getenv()
1690 p = mch_getenv(name); in vim_getenv()
1691 if (p != NULL && *p == NUL) // empty is the same as not set in vim_getenv()
1692 p = NULL; in vim_getenv()
1694 if (p != NULL) in vim_getenv()
1695 return p; in vim_getenv()
1737 p = vim_version_dir(q); in vim_getenv()
1739 if (p == NULL) in vim_getenv()
1740 p = q; in vim_getenv()
1744 p = mch_getenv((char_u *)"VIM"); in vim_getenv()
1745 if (p != NULL && *p == NUL) // empty is the same as not set in vim_getenv()
1746 p = NULL; in vim_getenv()
1747 if (p != NULL) in vim_getenv()
1749 p = vim_version_dir(p); in vim_getenv()
1750 if (p != NULL) in vim_getenv()
1753 p = mch_getenv((char_u *)"VIM"); in vim_getenv()
1763 if (p == NULL) in vim_getenv()
1766 p = p_hf; in vim_getenv()
1772 p = exe_name; in vim_getenv()
1774 if (p != NULL) in vim_getenv()
1777 pend = gettail(p); in vim_getenv()
1780 if (p == p_hf) in vim_getenv()
1781 pend = remove_tail(p, pend, (char_u *)"doc"); in vim_getenv()
1786 if (p == exe_name) in vim_getenv()
1791 pend1 = remove_tail(p, pend, (char_u *)"MacOS"); in vim_getenv()
1794 pnew = alloc(pend1 - p + 15); in vim_getenv()
1797 STRNCPY(pnew, p, (pend1 - p)); in vim_getenv()
1798 STRCPY(pnew + (pend1 - p), "Resources/vim"); in vim_getenv()
1799 p = pnew; in vim_getenv()
1800 pend = p + STRLEN(p); in vim_getenv()
1806 if (p == exe_name) in vim_getenv()
1807 pend = remove_tail(p, pend, (char_u *)"src"); in vim_getenv()
1813 pend = remove_tail(p, pend, (char_u *)RUNTIME_DIRNAME); in vim_getenv()
1814 pend = remove_tail(p, pend, (char_u *)VIM_VERSION_NODOT); in vim_getenv()
1818 if (pend > p && after_pathsep(p, pend)) in vim_getenv()
1822 if (p == exe_name || p == p_hf) in vim_getenv()
1825 p = vim_strnsave(p, pend - p); in vim_getenv()
1827 if (p != NULL && !mch_isdir(p)) in vim_getenv()
1828 VIM_CLEAR(p); in vim_getenv()
1833 if (vimruntime && (pend = vim_version_dir(p)) != NULL) in vim_getenv()
1835 vim_free(p); in vim_getenv()
1836 p = pend; in vim_getenv()
1847 if (p == NULL) in vim_getenv()
1852 p = default_vimruntime_dir; in vim_getenv()
1857 if (vimruntime && (p = vim_version_dir(default_vim_dir)) != NULL) in vim_getenv()
1861 p = default_vim_dir; in vim_getenv()
1872 if (p != NULL) in vim_getenv()
1876 vim_setenv((char_u *)"VIMRUNTIME", p); in vim_getenv()
1881 vim_setenv((char_u *)"VIM", p); in vim_getenv()
1885 return p; in vim_getenv()
2362 char_u *p; in get_cmd_output_as_rettv() local
2412 for (p = ml_get_buf(buf, lnum, FALSE); *p != NUL; ++p) in get_cmd_output_as_rettv()
2413 if (putc(*p == '\n' ? NUL : *p, fd) == EOF) in get_cmd_output_as_rettv()
2435 p = tv_get_string_buf_chk(&argvars[1], buf); in get_cmd_output_as_rettv()
2436 if (p == NULL) in get_cmd_output_as_rettv()
2441 len = STRLEN(p); in get_cmd_output_as_rettv()
2442 if (len > 0 && fwrite(p, len, 1, fd) != 1) in get_cmd_output_as_rettv()
2487 for (p = s; start < end; ++p, ++start) in get_cmd_output_as_rettv()
2488 *p = *start == NUL ? NL : *start; in get_cmd_output_as_rettv()
2489 *p = NUL; in get_cmd_output_as_rettv()
2585 char_u *p; in get_isolated_shell_name() local
2588 p = gettail(p_sh); in get_isolated_shell_name()
2589 p = vim_strnsave(p, skiptowhite(p) - p); in get_isolated_shell_name()
2591 p = skiptowhite(p_sh); in get_isolated_shell_name()
2592 if (*p == NUL) in get_isolated_shell_name()
2595 p = vim_strsave(gettail(p_sh)); in get_isolated_shell_name()
2603 for (p2 = p_sh; p2 < p; MB_PTR_ADV(p2)) in get_isolated_shell_name()
2606 p = vim_strnsave(p1, p - p1); in get_isolated_shell_name()
2609 return p; in get_isolated_shell_name()
2618 path_is_url(char_u *p) in path_is_url() argument
2620 if (STRNCMP(p, "://", (size_t)3) == 0) in path_is_url()
2622 else if (STRNCMP(p, ":\\\\", (size_t)3) == 0) in path_is_url()
2635 char_u *p; in path_with_url() local
2646 for (p = fname + 1; (isalpha(*p) || (*p == '-')); ++p) in path_with_url()
2650 if (p[-1] == '-') in path_with_url()
2654 return path_is_url(p); in path_with_url()