aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-01-01 14:38:17 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-01-01 14:38:17 -0500
commitf1344bc2198c4e433dedbc8b0662ba90cb5eaf1c (patch)
treef5d48caeb217459f82332555e852216569d30ecb /src/nvim/fileio.c
parentdf4ac79761162313de4e27a265044125062013cf (diff)
parent3fd62f961294d11fff5754a3c597e982b54ca74a (diff)
downloadrneovim-f1344bc2198c4e433dedbc8b0662ba90cb5eaf1c.tar.gz
rneovim-f1344bc2198c4e433dedbc8b0662ba90cb5eaf1c.tar.bz2
rneovim-f1344bc2198c4e433dedbc8b0662ba90cb5eaf1c.zip
Merge pull request #3903 from justinmk/vim-7.4.605
vim-patch:7.4.605
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 58269983c5..23292ff4ac 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -7096,26 +7096,23 @@ int match_file_list(char_u *list, char_u *sfname, char_u *ffname)
return FALSE;
}
-/*
- * Convert the given pattern "pat" which has shell style wildcards in it, into
- * a regular expression, and return the result in allocated memory. If there
- * is a directory path separator to be matched, then TRUE is put in
- * allow_dirs, otherwise FALSE is put there -- webb.
- * Handle backslashes before special characters, like "\*" and "\ ".
- *
- * Returns NULL on failure.
- */
-char_u *
-file_pat_to_reg_pat (
- char_u *pat,
- char_u *pat_end, /* first char after pattern or NULL */
- char *allow_dirs, /* Result passed back out in here */
- int no_bslash /* Don't use a backward slash as pathsep */
+/// Convert the given pattern "pat" which has shell style wildcards in it, into
+/// a regular expression, and return the result in allocated memory. If there
+/// is a directory path separator to be matched, then TRUE is put in
+/// allow_dirs, otherwise FALSE is put there -- webb.
+/// Handle backslashes before special characters, like "\*" and "\ ".
+///
+/// Returns NULL on failure.
+char_u * file_pat_to_reg_pat(
+ const char_u *pat,
+ const char_u *pat_end, // first char after pattern or NULL
+ char *allow_dirs, // Result passed back out in here
+ int no_bslash // Don't use a backward slash as pathsep
)
{
- char_u *endp;
+ const char_u *endp;
char_u *reg_pat;
- char_u *p;
+ const char_u *p;
int nested = 0;
int add_dollar = TRUE;