]> granicus.if.org Git - vim/commitdiff
patch 7.4.2234 v7.4.2234
authorBram Moolenaar <Bram@vim.org>
Sun, 21 Aug 2016 13:00:03 +0000 (15:00 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 21 Aug 2016 13:00:03 +0000 (15:00 +0200)
Problem:    Can't build with +eval but without +quickfix. (John Marriott)
Solution:   Move skip_vimgrep_pat() to separate #ifdef block.

src/quickfix.c
src/version.c

index 2fa6ed98a93b68cfec934198a5722080908b7618..1995c6272936c330cdbc9c15497a343919fb8707 100644 (file)
@@ -4318,58 +4318,6 @@ theend:
     vim_regfree(regmatch.regprog);
 }
 
-/*
- * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
- * Put the start of the pattern in "*s", unless "s" is NULL.
- * If "flags" is not NULL put the flags in it: VGR_GLOBAL, VGR_NOJUMP.
- * If "s" is not NULL terminate the pattern with a NUL.
- * Return a pointer to the char just past the pattern plus flags.
- */
-    char_u *
-skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
-{
-    int                c;
-
-    if (vim_isIDc(*p))
-    {
-       /* ":vimgrep pattern fname" */
-       if (s != NULL)
-           *s = p;
-       p = skiptowhite(p);
-       if (s != NULL && *p != NUL)
-           *p++ = NUL;
-    }
-    else
-    {
-       /* ":vimgrep /pattern/[g][j] fname" */
-       if (s != NULL)
-           *s = p + 1;
-       c = *p;
-       p = skip_regexp(p + 1, c, TRUE, NULL);
-       if (*p != c)
-           return NULL;
-
-       /* Truncate the pattern. */
-       if (s != NULL)
-           *p = NUL;
-       ++p;
-
-       /* Find the flags */
-       while (*p == 'g' || *p == 'j')
-       {
-           if (flags != NULL)
-           {
-               if (*p == 'g')
-                   *flags |= VGR_GLOBAL;
-               else
-                   *flags |= VGR_NOJUMP;
-           }
-           ++p;
-       }
-    }
-    return p;
-}
-
 /*
  * Restore current working directory to "dirname_start" if they differ, taking
  * into account whether it is set locally or globally.
@@ -5207,3 +5155,57 @@ ex_helpgrep(exarg_T *eap)
 }
 
 #endif /* FEAT_QUICKFIX */
+
+#if defined(FEAT_QUICKFIX) || defined(FEAT_EVAL) || defined(PROTO)
+/*
+ * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
+ * Put the start of the pattern in "*s", unless "s" is NULL.
+ * If "flags" is not NULL put the flags in it: VGR_GLOBAL, VGR_NOJUMP.
+ * If "s" is not NULL terminate the pattern with a NUL.
+ * Return a pointer to the char just past the pattern plus flags.
+ */
+    char_u *
+skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
+{
+    int                c;
+
+    if (vim_isIDc(*p))
+    {
+       /* ":vimgrep pattern fname" */
+       if (s != NULL)
+           *s = p;
+       p = skiptowhite(p);
+       if (s != NULL && *p != NUL)
+           *p++ = NUL;
+    }
+    else
+    {
+       /* ":vimgrep /pattern/[g][j] fname" */
+       if (s != NULL)
+           *s = p + 1;
+       c = *p;
+       p = skip_regexp(p + 1, c, TRUE, NULL);
+       if (*p != c)
+           return NULL;
+
+       /* Truncate the pattern. */
+       if (s != NULL)
+           *p = NUL;
+       ++p;
+
+       /* Find the flags */
+       while (*p == 'g' || *p == 'j')
+       {
+           if (flags != NULL)
+           {
+               if (*p == 'g')
+                   *flags |= VGR_GLOBAL;
+               else
+                   *flags |= VGR_NOJUMP;
+           }
+           ++p;
+       }
+    }
+    return p;
+}
+#endif
index 0ab89edd8fcf18cff698bd6a53f253ddf7a4c205..e9ce5971ea3b3a422c6a2db0ad41bd67851cf4f8 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2234,
 /**/
     2233,
 /**/