4 * Copyright (c) 2002 DecisionSoft Ltd.
5 * Paul Warren (pdw) Fri Oct 25 10:21:00 2002
13 #include <sys/types.h>
19 static const char rcsid[] = "$Id: screenfilter.c,v 1.3 2002/11/04 12:27:35 chris Exp $";
21 extern options_t options ;
25 int screen_filter_set(char* s) {
28 if(options.screenfilter != NULL) {
29 xfree(options.screenfilter);
30 options.screenfilter = NULL;
34 r = regcomp(&preg, s, REG_ICASE|REG_EXTENDED);
37 options.screenfilter = s;
46 int screen_filter_match(char *s) {
48 if(options.screenfilter == NULL) {
52 r = regexec(&preg, s, 0, NULL, 0);
61 #endif /* HAVE_REGCOMP */