summaryrefslogtreecommitdiff
path: root/libsieve
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-11-14 14:47:32 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-11-14 14:47:32 +0000
commitb5025fea376e643bee34f266425c0b787637099b (patch)
treee23f315fa9a795d368f6cf8124e10c1633370cb1 /libsieve
parent0093f3b17f4f6715bd95e98e9a10e366755298e7 (diff)
downloadmailutils-b5025fea376e643bee34f266425c0b787637099b.tar.gz
mailutils-b5025fea376e643bee34f266425c0b787637099b.tar.bz2
(sieve_require): Handle "comparator-" prefix in require statements.
Diffstat (limited to 'libsieve')
-rw-r--r--libsieve/require.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/libsieve/require.c b/libsieve/require.c
index 44a192dbd..b090b676d 100644
--- a/libsieve/require.c
+++ b/libsieve/require.c
@@ -43,20 +43,34 @@ sieve_require (list_t slist)
for (iterator_first (itr); !iterator_is_done (itr); iterator_next (itr))
{
char *s;
- sieve_register_t *reg;
iterator_current (itr, (void **)&s);
- /* FIXME: if (strncmp (s, "comparator-", 11) ... */
- reg = sieve_action_lookup (s);
- if (!reg)
+ if (strncmp (s, "comparator-", 11) == 0)
{
- sieve_compile_error (sieve_filename, sieve_line_num,
- "source for the required action %s is not available",
- s);
- break;
+ if (sieve_require_comparator (s + 11))
+ {
+ sieve_compile_error (sieve_filename, sieve_line_num,
+ "source for the required comparator %s is not available",
+ s + 11);
+ }
+ }
+ else if (strncmp (s, "test-", 5) == 0) /* GNU extension */
+ {
+ }
+ else
+ {
+ sieve_register_t *reg;
+ reg = sieve_action_lookup (s);
+ if (!reg)
+ {
+ sieve_compile_error (sieve_filename, sieve_line_num,
+ "source for the required action %s is not available",
+ s);
+ break;
+ }
+ reg->required = 1;
}
- reg->required = 1;
}
iterator_destroy (&itr);
}

Return to:

Send suggestions and report system problems to the System administrator.