/[imapfilter]/imapfilter/parse.c
ViewVC logotype

Diff of /imapfilter/parse.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by lefcha, Sun Aug 3 17:40:10 2003 UTC revision 1.4.2.3 by lefcha, Sun Nov 23 22:52:54 2003 UTC
# Line 1  Line 1 
1  #include <stdio.h>  #include <stdio.h>
2  #include <stdlib.h>  #include <stdlib.h>
3  #include <string.h>  #include <string.h>
4  #include <limits.h>  #include <strings.h>
5  #include <errno.h>  #include <errno.h>
6  #include <sys/types.h>  #include <limits.h>
7  #include <sys/stat.h>  #include <sys/stat.h>
8  #include <fcntl.h>  #include <sys/types.h>          /* IEEE Std 1003.1-2001 non-conformance. */
9    #include <regex.h>
10    
11  #include "config.h"  #include "config.h"
12  #include "imapfilter.h"  #include "imapfilter.h"
# Line 141  parse_config(FILE * fd) Line 142  parse_config(FILE * fd)
142                  "[[:blank:]]*\n$",                  "[[:blank:]]*\n$",
143    
144                  "^[[:blank:]]*(SET[[:blank:]])?[[:blank:]]*(ERRORS|EXPUNGE|"                  "^[[:blank:]]*(SET[[:blank:]])?[[:blank:]]*(ERRORS|EXPUNGE|"
145                  "HEADERS|NAMESPACE|SUBSCRIBE)[[:blank:]]*=[[:blank:]]*"                  "HEADERS|NAMESPACE|PEEK|SUBSCRIBE)[[:blank:]]*=[[:blank:]]*"
146                  "(YES|NO)[[:blank:]]*\n$",                  "(YES|NO)[[:blank:]]*\n$",
147    
148                  "^[[:blank:]]*(SET[[:blank:]])?[[:blank:]]*(DAEMON|TIMEOUT)"                  "^[[:blank:]]*(SET[[:blank:]])?[[:blank:]]*(DAEMON|TIMEOUT)"
# Line 269  set_options(char *line, regmatch_t * m) Line 270  set_options(char *line, regmatch_t * m)
270                          options |= OPTION_NAMESPACE;                          options |= OPTION_NAMESPACE;
271                  else                  else
272                          options &= ~(OPTION_NAMESPACE);                          options &= ~(OPTION_NAMESPACE);
273            } else if (!strncasecmp(line + m[2].rm_so, "peek", 4)) {
274                    if (!strncasecmp(line + m[3].rm_so, "yes", 3))
275                            options |= OPTION_PEEK;
276                    else
277                            options &= ~(OPTION_PEEK);
278          } else if (!strncasecmp(line + m[2].rm_so, "subscribe", 9)) {          } else if (!strncasecmp(line + m[2].rm_so, "subscribe", 9)) {
279                  if (!strncasecmp(line + m[3].rm_so, "yes", 3))                  if (!strncasecmp(line + m[3].rm_so, "yes", 3))
280                          options |= OPTION_SUBSCRIBE;                          options |= OPTION_SUBSCRIBE;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.3

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26