summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-07-24 18:29:37 +0000
committerBram Moolenaar <Bram@vim.org>2008-07-24 18:29:37 +0000
commit7693ec6e8a32787136081a66e0c6e4a620369173 (patch)
treeb5977784113e192df1685e4868e6f97ada517737 /src/misc2.c
parent4bfa60812d090257a7e2e89846ffdf4fb7994606 (diff)
downloadvim-git-7693ec6e8a32787136081a66e0c6e4a620369173.tar.gz
updated for version 7.2b-018v7.2b.018
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 6895955c3..bc9091f08 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1257,6 +1257,17 @@ vim_strsave_escaped_ext(string, esc_chars, cc, bsl)
return escaped_string;
}
+#if !defined(BACKSLASH_IN_FILENAME) || defined(FEAT_EVAL) || defined(PROTO)
+/*
+ * Return TRUE when 'shell' has "csh" in the tail.
+ */
+ int
+csh_like_shell()
+{
+ return (strstr((char *)gettail(p_sh), "csh") != NULL);
+}
+#endif
+
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Escape "string" for use as a shell argument with system().
@@ -1283,7 +1294,7 @@ vim_strsave_shellescape(string, do_special)
* the like we must not put a backslash before it, it will be taken
* literally. If do_special is set the '!' will be escaped twice.
* Csh also needs to have "\n" escaped twice when do_special is set. */
- csh_like = (strstr((char *)gettail(p_sh), "csh") != NULL);
+ csh_like = csh_like_shell();
/* First count the number of extra bytes required. */
length = (unsigned)STRLEN(string) + 3; /* two quotes and a trailing NUL */