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

Diff of /imapfilter/match.c

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

revision 1.1.2.2 by lefcha, Sun Nov 23 22:51:16 2003 UTC revision 1.9 by lefcha, Sat Feb 14 19:14:43 2004 UTC
# Line 7  Line 7 
7  #include "filter.h"  #include "filter.h"
8    
9    
10  extern conn_t connpri, connaux;  extern options_t opts;
11  extern char charset[CHARSET_LEN];  extern connection_t connpri, connaux;
12    
13    
14  int match_filter(filter_t * filter, char **mesgs);  int match_filter(filter_t * filter, char **mesgs);
# Line 52  apply_filters(char *mbox, filter_t ** fi Line 52  apply_filters(char *mbox, filter_t ** fi
52    
53    
54  /*  /*
55   * Generate the search request by the masks of the filter and try to   * Generate the search request by the masks of the filter and try to match the
56   * match the generated filter.   * generated filter.
57   */   */
58  int  int
59  match_filter(filter_t * filter, char **mesgs)  match_filter(filter_t * filter, char **mesgs)
# Line 67  match_filter(filter_t * filter, char **m Line 67  match_filter(filter_t * filter, char **m
67                  search = generate_filter_and(filter->masks, filter->masknum,                  search = generate_filter_and(filter->masks, filter->masknum,
68                      filter->masklen);                      filter->masklen);
69    
70          search_response(&connpri, imap_search(&connpri, charset, search),          response_search(&connpri, imap_search(&connpri, opts.charset, search),
71              mesgs);              mesgs);
72    
73          xfree(search);          xfree(search);
# Line 80  match_filter(filter_t * filter, char **m Line 80  match_filter(filter_t * filter, char **m
80    
81    
82  /*  /*
83   * Generate the filter search command from the masks, assuming that   * Generate the filter search command from the masks, assuming that masks are
84   * masks are AND-ed.   * AND-ed.
85   */   */
86  char *  char *
87  generate_filter_and(mask_t * mask, unsigned int masknum,  generate_filter_and(mask_t * mask, unsigned int masknum,
# Line 157  generate_filter_and(mask_t * mask, unsig Line 157  generate_filter_and(mask_t * mask, unsig
157    
158    
159  /*  /*
160   * Generate the filter search command from the masks, assuming that   * Generate the filter search command from the masks, assuming that masks are
161   * masks are OR-ed.   * OR-ed.
162   */   */
163  char *  char *
164  generate_filter_or(mask_t * mask, unsigned int masknum,  generate_filter_or(mask_t * mask, unsigned int masknum,
# Line 234  normalize_mask(char *body) Line 234  normalize_mask(char *body)
234          static char nb[MASK_BODY_LEN];          static char nb[MASK_BODY_LEN];
235    
236    
237          if (strstr(body, "OLDER") ||          if (strstr(body, "OLDER") || strstr(body, "NEWER")) {
             strstr(body, "NEWER")) {  
238                  xstrncpy(nb, body, MASK_BODY_LEN - 1);                  xstrncpy(nb, body, MASK_BODY_LEN - 1);
239                  convert_date(nb);                  convert_date(nb);
240    
# Line 287  convert_date(char *body) Line 286  convert_date(char *body)
286  void  void
287  empty_fifo(mask_t ** mfifo)  empty_fifo(mask_t ** mfifo)
288  {  {
289    
290          mfifo[0] = NULL;          mfifo[0] = NULL;
291    
292          queue_fifo(NULL, NULL);          queue_fifo(NULL, NULL);

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.9

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26