]> granicus.if.org Git - vim/commitdiff
patch 7.4.2239 v7.4.2239
authorBram Moolenaar <Bram@vim.org>
Sun, 21 Aug 2016 20:39:35 +0000 (22:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 21 Aug 2016 20:39:35 +0000 (22:39 +0200)
Problem:    Warning for missing declaration of skip_vimgrep_pat(). (John
            Marriott)
Solution:   Move it to another file.

src/ex_cmds.c
src/proto/ex_cmds.pro
src/proto/quickfix.pro
src/quickfix.c
src/version.c

index e727ecc18646f78143c76f5b7b0e22e712280d30..5c79e959412e38b580b71609f9b3d0b2f65fdd5f 100644 (file)
@@ -8392,6 +8392,60 @@ ex_drop(exarg_T *eap)
 }
 #endif
 
+#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
+
 #if defined(FEAT_EVAL) || defined(PROTO)
 /*
  * List v:oldfiles in a nice way.
index 324608f33e5bfcf646b42ed6a1a43afd1e32f21a..63f25b50f45f107fcf2be3ed7c01605af88dbfb9 100644 (file)
@@ -65,5 +65,6 @@ char_u *get_sign_name(expand_T *xp, int idx);
 void set_context_in_sign_cmd(expand_T *xp, char_u *arg);
 void ex_smile(exarg_T *eap);
 void ex_drop(exarg_T *eap);
+char_u *skip_vimgrep_pat(char_u *p, char_u **s, int *flags);
 void ex_oldfiles(exarg_T *eap);
 /* vim: set ft=c : */
index 99f5edeefd30d72ad039f6774a7e39ad85b4b080..d48eb25326c44f1f61232119293182847e5194fd 100644 (file)
@@ -26,9 +26,8 @@ void ex_cc(exarg_T *eap);
 void ex_cnext(exarg_T *eap);
 void ex_cfile(exarg_T *eap);
 void ex_vimgrep(exarg_T *eap);
-char_u *skip_vimgrep_pat(char_u *p, char_u **s, int *flags);
-int get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict);
 int get_errorlist(win_T *wp, int qf_idx, list_T *list);
+int get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict);
 int set_errorlist(win_T *wp, list_T *list, int action, char_u *title, dict_T *what);
 void ex_cbuffer(exarg_T *eap);
 void ex_cexpr(exarg_T *eap);
index 1995c6272936c330cdbc9c15497a343919fb8707..f808da49950f751938bb1a9d372b9317c0a11522 100644 (file)
@@ -5155,57 +5155,3 @@ 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 0d3d4919678b39a97185e2e343b73d998a2572ba..1cd659f8619a15602c2388f58a476ab50110da8d 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2239,
 /**/
     2238,
 /**/