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.
This commit is contained in:
David Bürgin
2015-04-26 11:13:31 +02:00
committed by Michael Reed
parent 8337cd957e
commit b6af1afee6
2 changed files with 10 additions and 12 deletions

View File

@@ -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 '/'. * 2. the short file name, when the pattern has a '/'.
* 3. the tail of the file name, when the pattern has no '/'. * 3. the tail of the file name, when the pattern has no '/'.
*/ */
if ( if (regmatch.regprog != NULL
(regmatch.regprog != NULL
&& ((allow_dirs && ((allow_dirs
&& (vim_regexec(&regmatch, fname, (colnr_T)0) && (vim_regexec(&regmatch, fname, (colnr_T)0)
|| (sfname != NULL || (sfname != NULL
&& vim_regexec(&regmatch, sfname, (colnr_T)0)))) && vim_regexec(&regmatch, sfname, (colnr_T)0))))
|| (!allow_dirs && vim_regexec(&regmatch, tail, (colnr_T)0))))) || (!allow_dirs && vim_regexec(&regmatch, tail, (colnr_T)0)))) {
result = true; result = true;
}
if (prog != NULL) { if (prog != NULL) {
*prog = regmatch.regprog; *prog = regmatch.regprog;
@@ -7233,11 +7233,9 @@ file_pat_to_reg_pat (
int no_bslash /* Don't use a backward slash as pathsep */ int no_bslash /* Don't use a backward slash as pathsep */
) )
{ {
size_t size;
char_u *endp; char_u *endp;
char_u *reg_pat; char_u *reg_pat;
char_u *p; char_u *p;
int i;
int nested = 0; int nested = 0;
int add_dollar = TRUE; int add_dollar = TRUE;
@@ -7246,7 +7244,7 @@ file_pat_to_reg_pat (
if (pat_end == NULL) if (pat_end == NULL)
pat_end = pat + STRLEN(pat); 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++) { for (p = pat; p < pat_end; p++) {
switch (*p) { switch (*p) {
@@ -7275,7 +7273,7 @@ file_pat_to_reg_pat (
} }
reg_pat = xmalloc(size + 1); reg_pat = xmalloc(size + 1);
i = 0; size_t i = 0;
if (pat[0] == '*') if (pat[0] == '*')
while (pat[0] == '*' && pat < pat_end - 1) while (pat[0] == '*' && pat < pat_end - 1)

View File

@@ -219,7 +219,7 @@ static int included_patches[] = {
567, 567,
566, 566,
565, 565,
//564, //564 NA
563, 563,
//562, //562,
561, 561,