Revert "Fix a memory leak in matcherrc rule parsing."
[claws.git] / src / matcher_parser_parse.y
index 906a623ebc18bb3d789157eafa435036122a9b7b..dd2aee702e0728372d8ffa31f73cfcf20225b860 100644 (file)
@@ -296,7 +296,7 @@ void matcher_parsererror(char *str)
        }
        cond = NULL;
        if (!disable_warnings)
-               g_warning("filtering parsing: %i: %s\n",
+               g_warning("filtering parsing: %i: %s",
                        matcher_parserlineno, str);
        error = 1;
 }
@@ -321,6 +321,7 @@ int matcher_parserwrap(void)
 %token MATCHER_AGE_GREATER  MATCHER_AGE_LOWER  MATCHER_NEWSGROUPS
 %token MATCHER_AGE_GREATER_HOURS  MATCHER_AGE_LOWER_HOURS
 %token MATCHER_NOT_NEWSGROUPS  MATCHER_INREPLYTO  MATCHER_NOT_INREPLYTO
+%token MATCHER_MESSAGEID MATCHER_NOT_MESSAGEID
 %token MATCHER_REFERENCES  MATCHER_NOT_REFERENCES  MATCHER_SCORE_GREATER
 %token MATCHER_SCORE_LOWER  MATCHER_HEADER  MATCHER_NOT_HEADER
 %token MATCHER_HEADERS_PART  MATCHER_NOT_HEADERS_PART  MATCHER_MESSAGE
@@ -991,6 +992,24 @@ MATCHER_ALL
        expr = $3;
        prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
 }
+| MATCHER_MESSAGEID match_type MATCHER_STRING
+{
+       gint criteria = 0;
+       gchar *expr = NULL;
+
+       criteria = MATCHCRITERIA_MESSAGEID;
+       expr = $3;
+       prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
+}
+| MATCHER_NOT_MESSAGEID match_type MATCHER_STRING
+{
+       gint criteria = 0;
+       gchar *expr = NULL;
+
+       criteria = MATCHCRITERIA_NOT_MESSAGEID;
+       expr = $3;
+       prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
+}
 | MATCHER_INREPLYTO match_type MATCHER_STRING
 {
        gint criteria = 0;