Index: filterelement.c
===================================================================
--- filterelement.c	(revision c08c70a8ae70f559969b32d12b418a460bfa0f61)
+++ filterelement.c	(revision bd6510805afc68729b1b7f55c103a5ecbdd146f3)
@@ -48,15 +48,15 @@
 }
 
-static int owl_filterelement_match_false(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_false(const owl_filterelement *fe, const owl_message *m)
 {
   return 0;
 }
 
-static int owl_filterelement_match_true(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_true(const owl_filterelement *fe, const owl_message *m)
 {
   return 1;
 }
 
-static int owl_filterelement_match_re(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_re(const owl_filterelement *fe, const owl_message *m)
 {
   const char * val = owl_filterelement_get_field(m, fe->field);
@@ -64,5 +64,5 @@
 }
 
-static int owl_filterelement_match_filter(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_filter(const owl_filterelement *fe, const owl_message *m)
 {
   owl_filter *subfilter;
@@ -77,5 +77,5 @@
 }
 
-static int owl_filterelement_match_perl(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_perl(const owl_filterelement *fe, const owl_message *m)
 {
   const char *subname;
@@ -97,5 +97,5 @@
 }
 
-static int owl_filterelement_match_group(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_group(const owl_filterelement *fe, const owl_message *m)
 {
   return owl_filterelement_match(fe->left, m);
@@ -106,5 +106,5 @@
 */
 
-static int owl_filterelement_match_and(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_and(const owl_filterelement *fe, const owl_message *m)
 {
   return owl_filterelement_match(fe->left, m) &&
@@ -112,5 +112,5 @@
 }
 
-static int owl_filterelement_match_or(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_or(const owl_filterelement *fe, const owl_message *m)
 {
   return owl_filterelement_match(fe->left, m) ||
@@ -118,5 +118,5 @@
 }
 
-static int owl_filterelement_match_not(owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_not(const owl_filterelement *fe, const owl_message *m)
 {
   return !owl_filterelement_match(fe->left, m);
@@ -125,15 +125,15 @@
 /* Print methods */
 
-static void owl_filterelement_print_true(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_true(const owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "true");
 }
 
-static void owl_filterelement_print_false(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_false(const owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "false");
 }
 
-static void owl_filterelement_print_re(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_re(const owl_filterelement *fe, GString *buf)
 {
   const char *re, *q;
@@ -148,5 +148,5 @@
 }
 
-static void owl_filterelement_print_filter(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_filter(const owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "filter ");
@@ -154,5 +154,5 @@
 }
 
-static void owl_filterelement_print_perl(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_perl(const owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "perl ");
@@ -160,5 +160,5 @@
 }
 
-static void owl_filterelement_print_group(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_group(const owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "( ");
@@ -167,5 +167,5 @@
 }
 
-static void owl_filterelement_print_or(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_or(const owl_filterelement *fe, GString *buf)
 {
   owl_filterelement_print(fe->left, buf);
@@ -174,5 +174,5 @@
 }
 
-static void owl_filterelement_print_and(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_and(const owl_filterelement *fe, GString *buf)
 {
   owl_filterelement_print(fe->left, buf);
@@ -181,5 +181,5 @@
 }
 
-static void owl_filterelement_print_not(owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_not(const owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, " not ");
@@ -276,5 +276,5 @@
 }
 
-int owl_filterelement_match(owl_filterelement *fe, const owl_message *m)
+int owl_filterelement_match(const owl_filterelement *fe, const owl_message *m)
 {
   if(!fe) return 0;
@@ -286,5 +286,5 @@
 static int fe_visited  = 1;
 
-int owl_filterelement_is_toodeep(owl_filter *f, owl_filterelement *fe)
+int owl_filterelement_is_toodeep(owl_filter *f, const owl_filterelement *fe)
 {
   int rv;
@@ -300,5 +300,5 @@
 }
 
-int _owl_filterelement_is_toodeep(owl_filterelement *fe, owl_dict *seen)
+int _owl_filterelement_is_toodeep(const owl_filterelement *fe, owl_dict *seen)
 {
   int rv = 0;
@@ -338,5 +338,5 @@
 }
 
-void owl_filterelement_print(owl_filterelement *fe, GString *buf)
+void owl_filterelement_print(const owl_filterelement *fe, GString *buf)
 {
   if(!fe || !fe->print_elt) return;
Index: owl.h
===================================================================
--- owl.h	(revision 1fdab04add46db7904e33a62483ae31245b79763)
+++ owl.h	(revision bd6510805afc68729b1b7f55c103a5ecbdd146f3)
@@ -398,7 +398,7 @@
 
 typedef struct _owl_filterelement {
-  int (*match_message)(struct _owl_filterelement *fe, const owl_message *m);
+  int (*match_message)(const struct _owl_filterelement *fe, const owl_message *m);
   /* Append a string representation of the filterelement onto buf*/
-  void (*print_elt)(struct _owl_filterelement *fe, GString *buf);
+  void (*print_elt)(const struct _owl_filterelement *fe, GString *buf);
   /* Operands for and,or,not*/
   struct _owl_filterelement *left, *right;
