[Commits] matcher.c 1.75.2.72 1.75.2.73 matcher.h 1.39.2.20 1.39.2.21 prefs_matcher.c 1.43.2.94 1.43.2.95

colin at claws-mail.org colin at claws-mail.org
Wed Sep 5 17:38:38 CEST 2012


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv17460/src

Modified Files:
      Tag: gtk2
	matcher.c matcher.h prefs_matcher.c 
Log Message:
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

Index: matcher.h
===================================================================
RCS file: /home/claws-mail/claws/src/matcher.h,v
retrieving revision 1.39.2.20
retrieving revision 1.39.2.21
diff -u -d -r1.39.2.20 -r1.39.2.21
--- matcher.h	27 May 2012 17:30:52 -0000	1.39.2.20
+++ matcher.h	5 Sep 2012 15:38:36 -0000	1.39.2.21
@@ -153,20 +153,12 @@
 					 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);

Index: matcher.c
===================================================================
RCS file: /home/claws-mail/claws/src/matcher.c,v
retrieving revision 1.75.2.72
retrieving revision 1.75.2.73
diff -u -d -r1.75.2.72 -r1.75.2.73
--- matcher.c	7 Jul 2012 07:09:28 -0000	1.75.2.72
+++ matcher.c	5 Sep 2012 15:38:36 -0000	1.75.2.73
@@ -273,41 +273,6 @@
 }
 
 /*!
- *\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 @@
  *
  *\return	gboolean TRUE if a match
  */
-gboolean matcherprop_match(MatcherProp *prop, 
-			   MsgInfo *info)
+static gboolean matcherprop_match(MatcherProp *prop, 
+				  MsgInfo *info)
 {
 	time_t t;
 

Index: prefs_matcher.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_matcher.c,v
retrieving revision 1.43.2.94
retrieving revision 1.43.2.95
diff -u -d -r1.43.2.94 -r1.43.2.95
--- prefs_matcher.c	7 Jul 2012 07:09:29 -0000	1.43.2.94
+++ prefs_matcher.c	5 Sep 2012 15:38:36 -0000	1.43.2.95
@@ -1592,7 +1592,7 @@
 		break;
 	}
 
-	matcherprop = matcherprop_new_create(criteria, header, matchtype,
+	matcherprop = matcherprop_new(criteria, header, matchtype,
 				      expr, value);
 
 	return matcherprop;



More information about the Commits mailing list