Index: filterelement.c
===================================================================
--- filterelement.c	(revision 4542047a899dadba958a360ac1cb146c7b5a41dd)
+++ filterelement.c	(revision 41c9a9675faf455c3c6adfbc629faf55ddbfe10f)
@@ -1,7 +1,7 @@
 #include "owl.h"
 
-static const char * owl_filterelement_get_field(const owl_message *m, const char * field)
-{
-  const char *match;
+static char * owl_filterelement_get_field(owl_message *m, char * field)
+{
+  char *match;
   if (!strcasecmp(field, "class")) {
     match=owl_message_get_class(m);
@@ -48,23 +48,23 @@
 }
 
-static int owl_filterelement_match_false(const owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_false(owl_filterelement *fe, owl_message *m)
 {
   return 0;
 }
 
-static int owl_filterelement_match_true(const owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_true(owl_filterelement *fe, owl_message *m)
 {
   return 1;
 }
 
-static int owl_filterelement_match_re(const owl_filterelement *fe, const owl_message *m)
-{
-  const char * val = owl_filterelement_get_field(m, fe->field);
+static int owl_filterelement_match_re(owl_filterelement *fe, owl_message *m)
+{
+  char * val = owl_filterelement_get_field(m, fe->field);
   return !owl_regex_compare(&(fe->re), val, NULL, NULL);
 }
 
-static int owl_filterelement_match_filter(const owl_filterelement *fe, const owl_message *m)
-{
-  const owl_filter *subfilter;
+static int owl_filterelement_match_filter(owl_filterelement *fe, owl_message *m)
+{
+  owl_filter *subfilter;
   subfilter=owl_global_get_filter(&g, fe->field);
   if (!subfilter) {
@@ -77,8 +77,7 @@
 }
 
-static int owl_filterelement_match_perl(const owl_filterelement *fe, const owl_message *m)
-{
-  const char *subname;
-  char *perlrv;
+static int owl_filterelement_match_perl(owl_filterelement *fe, owl_message *m)
+{
+  char *subname, *perlrv;
   int   tf=0;
 
@@ -97,5 +96,5 @@
 }
 
-static int owl_filterelement_match_group(const owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_group(owl_filterelement *fe, owl_message *m)
 {
   return owl_filterelement_match(fe->left, m);
@@ -106,5 +105,5 @@
 */
 
-static int owl_filterelement_match_and(const owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_and(owl_filterelement *fe, owl_message *m)
 {
   return owl_filterelement_match(fe->left, m) &&
@@ -112,5 +111,5 @@
 }
 
-static int owl_filterelement_match_or(const owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_or(owl_filterelement *fe, owl_message *m)
 {
   return owl_filterelement_match(fe->left, m) ||
@@ -118,5 +117,5 @@
 }
 
-static int owl_filterelement_match_not(const owl_filterelement *fe, const owl_message *m)
+static int owl_filterelement_match_not(owl_filterelement *fe, owl_message *m)
 {
   return !owl_filterelement_match(fe->left, m);
@@ -125,17 +124,17 @@
 /* Print methods */
 
-static void owl_filterelement_print_true(const owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_true(owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "true");
 }
 
-static void owl_filterelement_print_false(const owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_false(owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "false");
 }
 
-static void owl_filterelement_print_re(const owl_filterelement *fe, GString *buf)
-{
-  const char *re, *q;
+static void owl_filterelement_print_re(owl_filterelement *fe, GString *buf)
+{
+  char *re, *q;
   g_string_append(buf, fe->field);
   g_string_append(buf, " ");
@@ -148,5 +147,5 @@
 }
 
-static void owl_filterelement_print_filter(const owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_filter(owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "filter ");
@@ -154,5 +153,5 @@
 }
 
-static void owl_filterelement_print_perl(const owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_perl(owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "perl ");
@@ -160,5 +159,5 @@
 }
 
-static void owl_filterelement_print_group(const owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_group(owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, "( ");
@@ -167,5 +166,5 @@
 }
 
-static void owl_filterelement_print_or(const owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_or(owl_filterelement *fe, GString *buf)
 {
   owl_filterelement_print(fe->left, buf);
@@ -174,5 +173,5 @@
 }
 
-static void owl_filterelement_print_and(const owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_and(owl_filterelement *fe, GString *buf)
 {
   owl_filterelement_print(fe->left, buf);
@@ -181,5 +180,5 @@
 }
 
-static void owl_filterelement_print_not(const owl_filterelement *fe, GString *buf)
+static void owl_filterelement_print_not(owl_filterelement *fe, GString *buf)
 {
   g_string_append(buf, " not ");
@@ -212,5 +211,5 @@
 }
 
-int owl_filterelement_create_re(owl_filterelement *fe, const char *field, const char *re)
+int owl_filterelement_create_re(owl_filterelement *fe, char *field, char *re)
 {
   owl_filterelement_create(fe);
@@ -226,5 +225,5 @@
 }
 
-void owl_filterelement_create_filter(owl_filterelement *fe, const char *name)
+void owl_filterelement_create_filter(owl_filterelement *fe, char *name)
 {
   owl_filterelement_create(fe);
@@ -234,5 +233,5 @@
 }
 
-void owl_filterelement_create_perl(owl_filterelement *fe, const char *name)
+void owl_filterelement_create_perl(owl_filterelement *fe, char *name)
 {
   owl_filterelement_create(fe);
@@ -276,5 +275,5 @@
 }
 
-int owl_filterelement_match(const owl_filterelement *fe, const owl_message *m)
+int owl_filterelement_match(owl_filterelement *fe, owl_message *m)
 {
   if(!fe) return 0;
@@ -286,5 +285,5 @@
 static int fe_visited  = 1;
 
-int owl_filterelement_is_toodeep(const owl_filter *f, const owl_filterelement *fe)
+int owl_filterelement_is_toodeep(owl_filter *f, owl_filterelement *fe)
 {
   int rv;
@@ -300,8 +299,8 @@
 }
 
-int _owl_filterelement_is_toodeep(const owl_filterelement *fe, owl_dict *seen)
+int _owl_filterelement_is_toodeep(owl_filterelement *fe, owl_dict *seen)
 {
   int rv = 0;
-  const owl_filter *f;
+  owl_filter *f;
 
   if(fe->match_message == owl_filterelement_match_filter) {
@@ -338,5 +337,5 @@
 }
 
-void owl_filterelement_print(const owl_filterelement *fe, GString *buf)
+void owl_filterelement_print(owl_filterelement *fe, GString *buf)
 {
   if(!fe || !fe->print_elt) return;
