22 |
#define FIELD_NAME_MAX 64 |
#define FIELD_NAME_MAX 64 |
23 |
#define FIELD_BODY_MAX 512 |
#define FIELD_BODY_MAX 512 |
24 |
|
|
25 |
/* Size of buffer that holds the results of the searching and matching |
/* |
26 |
of filters. */ |
* Size of buffer that holds the results of the searching and matching |
27 |
|
* of filters. |
28 |
|
*/ |
29 |
#define SEARCH_RESULTS_MAX 512 |
#define SEARCH_RESULTS_MAX 512 |
30 |
|
|
31 |
/* Every how many filter entries found in the configuration file will |
/* |
32 |
be space in memory will be allocated. */ |
* Every how many filter entries found in the configuration file will |
33 |
|
* be space in memory will be allocated. |
34 |
|
*/ |
35 |
#define FILTER_ENTRIES_MAX 8 |
#define FILTER_ENTRIES_MAX 8 |
36 |
|
|
37 |
#define min(A, B) ((A) < (B) ? (A) : (B)) |
#define min(A, B) ((A) < (B) ? (A) : (B)) |
49 |
/* A header filter entry. */ |
/* A header filter entry. */ |
50 |
typedef struct { |
typedef struct { |
51 |
char name[FIELD_NAME_MAX]; /* Header field name. */ |
char name[FIELD_NAME_MAX]; /* Header field name. */ |
52 |
int explicit; /* If field name one of FROM, TO, CC, BCC, |
int custom; /* If field name one of FROM, TO, |
53 |
SUBJECT then zero. */ |
CC, BCC, SUBJECT then zero. */ |
54 |
char body[FIELD_BODY_MAX]; /* Header field body. */ |
char body[FIELD_BODY_MAX]; /* Header field body. */ |
55 |
} filter_entry; |
} filter_entry; |
56 |
|
|
57 |
|
|
58 |
void apply_filters(void); |
void apply_filters(void); |
59 |
|
void usage(void); |