Commit b5025fea b5025fea376e643bee34f266425c0b787637099b by Sergey Poznyakoff

(sieve_require): Handle "comparator-" prefix in require statements.

1 parent 0093f3b1
......@@ -43,11 +43,24 @@ 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) ... */
if (strncmp (s, "comparator-", 11) == 0)
{
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)
{
......@@ -58,6 +71,7 @@ sieve_require (list_t slist)
}
reg->required = 1;
}
}
iterator_destroy (&itr);
}
......