From b6af1afee6eab0a430533efcbb8af6c6b1ffe585 Mon Sep 17 00:00:00 2001 From: David Bürgin <676c7473@gmail.com> Date: Sun, 26 Apr 2015 11:13:31 +0200 Subject: vim-patch:7.4.564 #2591 Problem: FEAT_OSFILETYPE is used even though it's never defined. Solution: Remove the code. (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-564 Not applicable, this code has already been removed in Neovim. Included some of the style tweaks. --- src/nvim/fileio.c | 20 +++++++++----------- src/nvim/version.c | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 44bed92133..98a2cb4076 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -7167,14 +7167,14 @@ static bool match_file_pat(char_u *pattern, regprog_T **prog, char_u *fname, * 2. the short file name, when the pattern has a '/'. * 3. the tail of the file name, when the pattern has no '/'. */ - if ( - (regmatch.regprog != NULL - && ((allow_dirs - && (vim_regexec(®match, fname, (colnr_T)0) - || (sfname != NULL - && vim_regexec(®match, sfname, (colnr_T)0)))) - || (!allow_dirs && vim_regexec(®match, tail, (colnr_T)0))))) + if (regmatch.regprog != NULL + && ((allow_dirs + && (vim_regexec(®match, fname, (colnr_T)0) + || (sfname != NULL + && vim_regexec(®match, sfname, (colnr_T)0)))) + || (!allow_dirs && vim_regexec(®match, tail, (colnr_T)0)))) { result = true; + } if (prog != NULL) { *prog = regmatch.regprog; @@ -7233,11 +7233,9 @@ file_pat_to_reg_pat ( int no_bslash /* Don't use a backward slash as pathsep */ ) { - size_t size; char_u *endp; char_u *reg_pat; char_u *p; - int i; int nested = 0; int add_dollar = TRUE; @@ -7246,7 +7244,7 @@ file_pat_to_reg_pat ( if (pat_end == NULL) pat_end = pat + STRLEN(pat); - size = 2; /* '^' at start, '$' at end */ + size_t size = 2; // '^' at start, '$' at end. for (p = pat; p < pat_end; p++) { switch (*p) { @@ -7275,7 +7273,7 @@ file_pat_to_reg_pat ( } reg_pat = xmalloc(size + 1); - i = 0; + size_t i = 0; if (pat[0] == '*') while (pat[0] == '*' && pat < pat_end - 1) diff --git a/src/nvim/version.c b/src/nvim/version.c index dc0454ffc1..2eb2d5c4ae 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -219,7 +219,7 @@ static int included_patches[] = { 567, 566, 565, - //564, + //564 NA 563, //562, 561, -- cgit