(sieve_require): Handle "comparator-" prefix in require statements.
Showing
1 changed file
with
16 additions
and
2 deletions
... | @@ -43,11 +43,24 @@ sieve_require (list_t slist) | ... | @@ -43,11 +43,24 @@ sieve_require (list_t slist) |
43 | for (iterator_first (itr); !iterator_is_done (itr); iterator_next (itr)) | 43 | for (iterator_first (itr); !iterator_is_done (itr); iterator_next (itr)) |
44 | { | 44 | { |
45 | char *s; | 45 | char *s; |
46 | sieve_register_t *reg; | ||
47 | 46 | ||
48 | iterator_current (itr, (void **)&s); | 47 | iterator_current (itr, (void **)&s); |
49 | 48 | ||
50 | /* FIXME: if (strncmp (s, "comparator-", 11) ... */ | 49 | if (strncmp (s, "comparator-", 11) == 0) |
50 | { | ||
51 | if (sieve_require_comparator (s + 11)) | ||
52 | { | ||
53 | sieve_compile_error (sieve_filename, sieve_line_num, | ||
54 | "source for the required comparator %s is not available", | ||
55 | s + 11); | ||
56 | } | ||
57 | } | ||
58 | else if (strncmp (s, "test-", 5) == 0) /* GNU extension */ | ||
59 | { | ||
60 | } | ||
61 | else | ||
62 | { | ||
63 | sieve_register_t *reg; | ||
51 | reg = sieve_action_lookup (s); | 64 | reg = sieve_action_lookup (s); |
52 | if (!reg) | 65 | if (!reg) |
53 | { | 66 | { |
... | @@ -58,6 +71,7 @@ sieve_require (list_t slist) | ... | @@ -58,6 +71,7 @@ sieve_require (list_t slist) |
58 | } | 71 | } |
59 | reg->required = 1; | 72 | reg->required = 1; |
60 | } | 73 | } |
74 | } | ||
61 | iterator_destroy (&itr); | 75 | iterator_destroy (&itr); |
62 | } | 76 | } |
63 | 77 | ... | ... |
-
Please register or sign in to post a comment