]> granicus.if.org Git - neomutt/commitdiff
standardise naming in Pattern
authorRichard Russon <rich@flatcap.org>
Fri, 18 Jan 2019 02:09:51 +0000 (02:09 +0000)
committerRichard Russon <rich@flatcap.org>
Fri, 8 Feb 2019 17:03:33 +0000 (17:03 +0000)
pattern.c
pattern.h

index 7eb6542e02356ab3edd66eee888d3a76dd490341..5ba304fdb6b12e7312452411202ae9afe592d1d6 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -223,7 +223,7 @@ static bool eat_regex(struct Pattern *pat, struct Buffer *s, struct Buffer *err)
   }
   else if (pat->groupmatch)
   {
-    pat->p.g = mutt_pattern_group(buf.data);
+    pat->p.group = mutt_pattern_group(buf.data);
     FREE(&buf.data);
   }
   else
@@ -1071,7 +1071,7 @@ static int patmatch(const struct Pattern *pat, const char *buf)
   else if (pat->stringmatch)
     return pat->ign_case ? !strcasestr(buf, pat->p.str) : !strstr(buf, pat->p.str);
   else if (pat->groupmatch)
-    return !mutt_group_match(pat->p.g, buf);
+    return !mutt_group_match(pat->p.group, buf);
   else
     return regexec(pat->p.regex, buf, 0, NULL, 0);
 }
@@ -1351,7 +1351,7 @@ void mutt_pattern_free(struct Pattern **pat)
     else if (tmp->stringmatch)
       FREE(&tmp->p.str);
     else if (tmp->groupmatch)
-      tmp->p.g = NULL;
+      tmp->p.group = NULL;
     else if (tmp->p.regex)
     {
       regfree(tmp->p.regex);
index a29c898c4b83f02df2ebb6c48760be1831a548fc..fdd5e5d4d682c30aee6a3139f2fe6bbbd306d0a2 100644 (file)
--- a/pattern.h
+++ b/pattern.h
@@ -57,7 +57,7 @@ struct Pattern
   struct Pattern *child; /**< arguments to logical op */
   union {
     regex_t *regex;
-    struct Group *g;
+    struct Group *group;
     char *str;
     struct ListHead multi_cases;
   } p;