Changes in filter.c [cdc6ff1:f34dd65]
Legend:
- Unmodified
- Added
- Removed
-
filter.c
rcdc6ff1 rf34dd65 3 3 4 4 static const char fileIdent[] = "$Id$"; 5 6 #define OWL_FILTER_MAXRECURSE 207 5 8 6 int owl_filter_init_fromstring(owl_filter *f, char *name, char *string) … … 20 18 { 21 19 f->name=owl_strdup(name); 22 f->polarity=0;23 20 f->fgcolor=OWL_COLOR_DEFAULT; 24 21 f->bgcolor=OWL_COLOR_DEFAULT; … … 50 47 /* Now check for recursion. */ 51 48 if (owl_filter_is_toodeep(f)) { 52 owl_function_error("Filter loop or exceeds recursion depth");49 owl_function_error("Filter loop!"); 53 50 owl_filter_free(f); 54 51 return(-1); … … 159 156 } 160 157 161 void owl_filter_set_polarity_match(owl_filter *f)162 {163 f->polarity=0;164 }165 166 void owl_filter_set_polarity_unmatch(owl_filter *f)167 {168 f->polarity=1;169 }170 171 158 void owl_filter_set_fgcolor(owl_filter *f, int color) 172 159 { … … 207 194 if(!f->root) return 0; 208 195 ret = owl_filterelement_match(f->root, m); 209 if(f->polarity) ret = !ret;210 196 return ret; 211 197 } … … 313 299 int numfailed=0; 314 300 owl_message m; 315 owl_filter f1, f2, f3, f4 ;301 owl_filter f1, f2, f3, f4, f5; 316 302 317 303 owl_list_create(&(g.filterlist)); … … 365 351 FAIL_UNLESS("mutual recursion", owl_filter_init_fromstring(&f4, "f4", "filter f3")); 366 352 353 /* support referencing a filter several times */ 354 FAIL_UNLESS("DAG", !owl_filter_init_fromstring(&f5, "dag", "filter f1 or filter f1")); 355 367 356 return 0; 368 357 }
Note: See TracChangeset
for help on using the changeset viewer.