From 3f74067565d4661d231679303e9906d3afe2fc3f Mon Sep 17 00:00:00 2001 From: Scott Prager Date: Fri, 19 Sep 2014 19:34:47 -0400 Subject: Un-mch mch_has_(exp_)wildcard(). Merge mch_has_wildcard() and mch_has_exp_wildcar() with their upstream equivalents for Windows and replace the "mch_" suffix with "path_". --- src/nvim/os_unix.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'src/nvim/os_unix.c') diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 8e4569033a..82a43499b4 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -719,47 +719,12 @@ static void save_patterns(int num_pat, char_u **pat, int *num_file, *num_file = num_pat; } -/* - * Return TRUE if the string "p" contains a wildcard that mch_expandpath() can - * expand. - */ -int mch_has_exp_wildcard(char_u *p) -{ - for (; *p; mb_ptr_adv(p)) { - if (*p == '\\' && p[1] != NUL) - ++p; - else if (vim_strchr((char_u *) - "*?[{'" - , *p) != NULL) - return TRUE; - } - return FALSE; -} - -/* - * Return TRUE if the string "p" contains a wildcard. - * Don't recognize '~' at the end as a wildcard. - */ -int mch_has_wildcard(char_u *p) -{ - for (; *p; mb_ptr_adv(p)) { - if (*p == '\\' && p[1] != NUL) - ++p; - else if (vim_strchr((char_u *) - "*?[{`'$" - , *p) != NULL - || (*p == '~' && p[1] != NUL)) - return TRUE; - } - return FALSE; -} - static int have_wildcard(int num, char_u **file) { int i; for (i = 0; i < num; i++) - if (mch_has_wildcard(file[i])) + if (path_has_wildcard(file[i])) return 1; return 0; } -- cgit