diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2015-12-26 20:12:24 -0500 | 
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-01 14:26:32 -0500 | 
| commit | 3fd62f961294d11fff5754a3c597e982b54ca74a (patch) | |
| tree | c02ae5c2f393f5019071fb441b1e19b121ab731a /src/nvim/fileio.c | |
| parent | 76bf21de26340a93005deea0c2f846edc6fc3743 (diff) | |
| download | rneovim-3fd62f961294d11fff5754a3c597e982b54ca74a.tar.gz rneovim-3fd62f961294d11fff5754a3c597e982b54ca74a.tar.bz2 rneovim-3fd62f961294d11fff5754a3c597e982b54ca74a.zip | |
file_pat_to_reg_pat, buflist_findpat: const params
file_pat_to_reg_pat() and buflist_findpat() do not modify the data of
these parameters.
Diffstat (limited to 'src/nvim/fileio.c')
| -rw-r--r-- | src/nvim/fileio.c | 31 | 
1 files changed, 14 insertions, 17 deletions
| diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 1a6c85abaa..687e06a5b6 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; | 
