patch 8.1.1979: code for handling file names is spread out
Problem: Code for handling file names is spread out.
Solution: Move code to new filepath.c file. Graduate FEAT_MODIFY_FNAME.
diff --git a/src/regexp.c b/src/regexp.c
index 4a47f1d..c21e0e6 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -7210,7 +7210,7 @@
static regsubmatch_T rsm; /* can only be used when can_f_submatch is TRUE */
#endif
-#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO)
+#ifdef FEAT_EVAL
/*
* Put the submatches in "argv[0]" which is a list passed into call_func() by
@@ -7254,6 +7254,7 @@
for (i = 0; i < 10; ++i)
vim_free(sl->sl_items[i].li_tv.vval.v_string);
}
+#endif
/*
* vim_regsub() - perform substitutions after a vim_regexec() or
@@ -7305,7 +7306,6 @@
return result;
}
-#endif
int
vim_regsub_multi(
@@ -8206,8 +8206,6 @@
return vim_regexec_string(rmp, line, col, FALSE);
}
-#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
- || defined(FIND_REPLACE_DIALOG) || defined(PROTO)
/*
* Like vim_regexec(), but consider a "\n" in "line" to be a line break.
* Note: "rmp->regprog" may be freed and changed.
@@ -8218,7 +8216,6 @@
{
return vim_regexec_string(rmp, line, col, TRUE);
}
-#endif
/*
* Match a regexp against multiple lines.