commit 99a41b1dcebca640606855b47c55ab32b7768944
parent f41b2776f7e203e86681e3dc4b1f8db2048ad201
Author: Colin Leroy <colin@colino.net>
Date: Wed, 5 Sep 2012 15:38:36 +0000
2012-09-05 [colin] 3.8.1cvs44
* src/matcher.c
* src/matcher.h
* src/prefs_matcher.c
Drop matcherprop_new_create, which is just a copy of
matcherprop_new, and staticalize what can be
Diffstat:
6 files changed, 13 insertions(+), 47 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,11 @@
+2012-09-05 [colin] 3.8.1cvs44
+
+ * src/matcher.c
+ * src/matcher.h
+ * src/prefs_matcher.c
+ Drop matcherprop_new_create, which is just a copy of
+ matcherprop_new, and staticalize what can be
+
2012-09-05 [colin] 3.8.1cvs43
* src/plugins/pgpcore/select-keys.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -4418,3 +4418,4 @@
( cvs diff -u -r 1.1.2.72 -r 1.1.2.73 src/plugins/pgpcore/sgpgme.c; ) > 3.8.1cvs41.patchset
( cvs diff -u -r 1.9.2.79 -r 1.9.2.80 src/gtk/gtkaspell.c; ) > 3.8.1cvs42.patchset
( cvs diff -u -r 1.1.2.31 -r 1.1.2.32 src/plugins/pgpcore/select-keys.c; ) > 3.8.1cvs43.patchset
+( cvs diff -u -r 1.75.2.72 -r 1.75.2.73 src/matcher.c; cvs diff -u -r 1.39.2.20 -r 1.39.2.21 src/matcher.h; cvs diff -u -r 1.43.2.94 -r 1.43.2.95 src/prefs_matcher.c; ) > 3.8.1cvs44.patchset
diff --git a/configure.ac b/configure.ac
@@ -12,7 +12,7 @@ MINOR_VERSION=8
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=43
+EXTRA_VERSION=44
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/matcher.c b/src/matcher.c
@@ -273,41 +273,6 @@ MatcherProp *matcherprop_new(gint criteria, const gchar *header,
}
/*!
- *\brief Allocate a structure for a filtering / scoring
- * "condition" (a matcher structure)
- * Same as matcherprop_new, except it doesn't change the expr's
- * case.
- *
- *\param criteria Criteria ID (MATCHCRITERIA_XXXX)
- *\param header Header string (if criteria is MATCHCRITERIA_HEADER
- or MATCHCRITERIA_FOUND_IN_ADDRESSBOOK)
- *\param matchtype Type of action (MATCHTYPE_XXX)
- *\param expr String value or expression to check
- *\param value Integer value to check
- *
- *\return MatcherProp * Pointer to newly allocated structure
- */
-MatcherProp *matcherprop_new_create(gint criteria, const gchar *header,
- gint matchtype, const gchar *expr,
- int value)
-{
- MatcherProp *prop;
-
- prop = g_new0(MatcherProp, 1);
- prop->criteria = criteria;
- prop->header = header != NULL ? g_strdup(header) : NULL;
-
- prop->expr = expr != NULL ? g_strdup(expr) : NULL;
-
- prop->matchtype = matchtype;
- prop->preg = NULL;
- prop->value = value;
- prop->error = 0;
-
- return prop;
-}
-
-/*!
*\brief Free a matcher structure
*
*\param prop Pointer to matcher structure allocated with
@@ -742,8 +707,8 @@ static gboolean matcherprop_match_test(const MatcherProp *prop,
*
*\return gboolean TRUE if a match
*/
-gboolean matcherprop_match(MatcherProp *prop,
- MsgInfo *info)
+static gboolean matcherprop_match(MatcherProp *prop,
+ MsgInfo *info)
{
time_t t;
diff --git a/src/matcher.h b/src/matcher.h
@@ -153,20 +153,12 @@ MatcherProp *matcherprop_new (gint criteria,
gint matchtype,
const gchar *expr,
int value);
-MatcherProp *matcherprop_new_create (gint criteria,
- const gchar *header,
- gint matchtype,
- const gchar *expr,
- int value);
void matcherprop_free (MatcherProp *prop);
MatcherProp *matcherprop_parse (gchar **str);
MatcherProp *matcherprop_copy (const MatcherProp *src);
-gboolean matcherprop_match (MatcherProp *prop,
- MsgInfo *info);
-
MatcherList * matcherlist_new (GSList *matchers,
gboolean bool_and);
void matcherlist_free (MatcherList *cond);
diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
@@ -1592,7 +1592,7 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
break;
}
- matcherprop = matcherprop_new_create(criteria, header, matchtype,
+ matcherprop = matcherprop_new(criteria, header, matchtype,
expr, value);
return matcherprop;