dovecot-2.2-pigeonhole: lib-sieve: Changed the way Sieve extensi...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Tue Sep 18 15:02:19 EEST 2012
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/a80af8740468
changeset: 1663:a80af8740468
user: Stephan Bosch <stephan at rename-it.nl>
date: Tue Sep 18 14:02:12 2012 +0200
description:
lib-sieve: Changed the way Sieve extensions are defined to a more compact format.
diffstat:
src/lib-sieve/ext-encoded-character.c | 8 +-
src/lib-sieve/ext-envelope.c | 9 +-
src/lib-sieve/ext-fileinto.c | 9 +-
src/lib-sieve/ext-reject.c | 18 +---
src/lib-sieve/plugins/body/ext-body.c | 9 +-
src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c | 7 +-
src/lib-sieve/plugins/copy/ext-copy.c | 7 +-
src/lib-sieve/plugins/date/ext-date.c | 12 +--
src/lib-sieve/plugins/editheader/ext-editheader.c | 12 +-
src/lib-sieve/plugins/enotify/ext-enotify.c | 9 +-
src/lib-sieve/plugins/environment/ext-environment.c | 12 +-
src/lib-sieve/plugins/ihave/ext-ihave.c | 14 +--
src/lib-sieve/plugins/imap4flags/ext-imap4flags.c | 9 +-
src/lib-sieve/plugins/imap4flags/ext-imapflags.c | 13 +--
src/lib-sieve/plugins/include/ext-include.c | 21 ++---
src/lib-sieve/plugins/mailbox/ext-mailbox.c | 6 +-
src/lib-sieve/plugins/notify/ext-notify.c | 10 +-
src/lib-sieve/plugins/regex/ext-regex.c | 7 +-
src/lib-sieve/plugins/relational/ext-relational.c | 7 +-
src/lib-sieve/plugins/spamvirustest/ext-spamvirustest.c | 36 ++++-----
src/lib-sieve/plugins/subaddress/ext-subaddress.c | 10 +-
src/lib-sieve/plugins/vacation/ext-vacation-seconds.c | 10 +-
src/lib-sieve/plugins/vacation/ext-vacation.c | 12 +-
src/lib-sieve/plugins/variables/ext-variables.c | 12 +-
src/lib-sieve/plugins/vnd.dovecot/debug/ext-debug.c | 10 +-
src/lib-sieve/plugins/vnd.dovecot/duplicate/ext-duplicate.c | 12 +-
src/lib-sieve/sieve-address-parts.c | 8 +-
src/lib-sieve/sieve-comparators.c | 8 +-
src/lib-sieve/sieve-extensions.c | 10 +--
src/lib-sieve/sieve-extensions.h | 28 ++++---
src/lib-sieve/sieve-match-types.c | 8 +-
src/testsuite/ext-testsuite.c | 12 +-
32 files changed, 139 insertions(+), 236 deletions(-)
diffs (truncated from 726 to 300 lines):
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/ext-encoded-character.c
--- a/src/lib-sieve/ext-encoded-character.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/ext-encoded-character.c Tue Sep 18 14:02:12 2012 +0200
@@ -28,12 +28,8 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
struct sieve_extension_def encoded_character_extension = {
- "encoded-character",
- NULL, NULL,
- ext_encoded_character_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_NO_OPERATIONS,
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "encoded-character",
+ .validator_load = ext_encoded_character_validator_load,
};
/*
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/ext-envelope.c
--- a/src/lib-sieve/ext-envelope.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/ext-envelope.c Tue Sep 18 14:02:12 2012 +0200
@@ -48,12 +48,9 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
const struct sieve_extension_def envelope_extension = {
- "envelope",
- NULL, NULL,
- ext_envelope_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_OPERATION(envelope_operation),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "envelope",
+ .validator_load = ext_envelope_validator_load,
+ SIEVE_EXT_DEFINE_OPERATION(envelope_operation)
};
static bool ext_envelope_validator_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/ext-fileinto.c
--- a/src/lib-sieve/ext-fileinto.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/ext-fileinto.c Tue Sep 18 14:02:12 2012 +0200
@@ -44,12 +44,9 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
const struct sieve_extension_def fileinto_extension = {
- "fileinto",
- NULL, NULL,
- ext_fileinto_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_OPERATION(fileinto_operation),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "fileinto",
+ .validator_load = ext_fileinto_validator_load,
+ SIEVE_EXT_DEFINE_OPERATION(fileinto_operation)
};
static bool ext_fileinto_validator_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/ext-reject.c
--- a/src/lib-sieve/ext-reject.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/ext-reject.c Tue Sep 18 14:02:12 2012 +0200
@@ -56,12 +56,9 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
const struct sieve_extension_def reject_extension = {
- "reject",
- NULL, NULL,
- ext_reject_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_OPERATION(reject_operation),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "reject",
+ .validator_load = ext_reject_validator_load,
+ SIEVE_EXT_DEFINE_OPERATION(reject_operation)
};
static bool ext_reject_validator_load
@@ -79,12 +76,9 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
const struct sieve_extension_def ereject_extension = {
- "ereject",
- NULL, NULL,
- ext_ereject_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_OPERATION(ereject_operation),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "ereject",
+ .validator_load = ext_ereject_validator_load,
+ SIEVE_EXT_DEFINE_OPERATION(ereject_operation)
};
static bool ext_ereject_validator_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/body/ext-body.c
--- a/src/lib-sieve/plugins/body/ext-body.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/body/ext-body.c Tue Sep 18 14:02:12 2012 +0200
@@ -53,12 +53,9 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
const struct sieve_extension_def body_extension = {
- "body",
- NULL, NULL,
- ext_body_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_OPERATION(body_operation),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "body",
+ .validator_load = ext_body_validator_load,
+ SIEVE_EXT_DEFINE_OPERATION(body_operation)
};
static bool ext_body_validator_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
--- a/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c Tue Sep 18 14:02:12 2012 +0200
@@ -38,11 +38,8 @@
(const struct sieve_extension *ext, struct sieve_validator *validator);
const struct sieve_extension_def comparator_i_ascii_numeric_extension = {
- "comparator-i;ascii-numeric",
- NULL, NULL,
- ext_cmp_i_ascii_numeric_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_NO_OPERATIONS,
+ .name = "comparator-i;ascii-numeric",
+ .validator_load = ext_cmp_i_ascii_numeric_validator_load,
SIEVE_EXT_DEFINE_OPERAND(my_comparator_operand)
};
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/copy/ext-copy.c
--- a/src/lib-sieve/plugins/copy/ext-copy.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/copy/ext-copy.c Tue Sep 18 14:02:12 2012 +0200
@@ -39,11 +39,8 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
const struct sieve_extension_def copy_extension = {
- "copy",
- NULL, NULL,
- ext_copy_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_NO_OPERATIONS,
+ .name = "copy",
+ .validator_load = ext_copy_validator_load,
SIEVE_EXT_DEFINE_OPERAND(copy_side_effect_operand)
};
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/date/ext-date.c
--- a/src/lib-sieve/plugins/date/ext-date.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/date/ext-date.c Tue Sep 18 14:02:12 2012 +0200
@@ -43,14 +43,10 @@
};
const struct sieve_extension_def date_extension = {
- "date",
- NULL, NULL,
- ext_date_validator_load,
- NULL,
- ext_date_interpreter_load,
- NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_OPERATIONS(ext_date_operations),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "date",
+ .validator_load = ext_date_validator_load,
+ .interpreter_load = ext_date_interpreter_load,
+ SIEVE_EXT_DEFINE_OPERATIONS(ext_date_operations)
};
static bool ext_date_validator_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/editheader/ext-editheader.c
--- a/src/lib-sieve/plugins/editheader/ext-editheader.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/editheader/ext-editheader.c Tue Sep 18 14:02:12 2012 +0200
@@ -45,13 +45,11 @@
(const struct sieve_extension *ext, struct sieve_validator *validator);
const struct sieve_extension_def editheader_extension = {
- "editheader",
- ext_editheader_load,
- ext_editheader_unload,
- ext_editheader_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_OPERATIONS(editheader_operations),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "editheader",
+ .load = ext_editheader_load,
+ .unload = ext_editheader_unload,
+ .validator_load = ext_editheader_validator_load,
+ SIEVE_EXT_DEFINE_OPERATIONS(editheader_operations)
};
static bool ext_editheader_validator_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/enotify/ext-enotify.c
--- a/src/lib-sieve/plugins/enotify/ext-enotify.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/enotify/ext-enotify.c Tue Sep 18 14:02:12 2012 +0200
@@ -46,11 +46,10 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
const struct sieve_extension_def enotify_extension = {
- "enotify",
- ext_enotify_load,
- ext_enotify_unload,
- ext_enotify_validator_load,
- NULL, NULL, NULL, NULL, NULL,
+ .name = "enotify",
+ .load = ext_enotify_load,
+ .unload = ext_enotify_unload,
+ .validator_load = ext_enotify_validator_load,
SIEVE_EXT_DEFINE_OPERATIONS(ext_enotify_operations),
SIEVE_EXT_DEFINE_OPERAND(encodeurl_operand)
};
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/environment/ext-environment.c
--- a/src/lib-sieve/plugins/environment/ext-environment.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/environment/ext-environment.c Tue Sep 18 14:02:12 2012 +0200
@@ -32,13 +32,11 @@
(const struct sieve_extension *ext, struct sieve_validator *valdtr);
const struct sieve_extension_def environment_extension = {
- "environment",
- ext_environment_init,
- ext_environment_deinit,
- ext_environment_validator_load,
- NULL, NULL, NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_OPERATION(tst_environment_operation),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "environment",
+ .load = ext_environment_init,
+ .unload = ext_environment_deinit,
+ .validator_load = ext_environment_validator_load,
+ SIEVE_EXT_DEFINE_OPERATION(tst_environment_operation)
};
static bool ext_environment_validator_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/ihave/ext-ihave.c
--- a/src/lib-sieve/plugins/ihave/ext-ihave.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/ihave/ext-ihave.c Tue Sep 18 14:02:12 2012 +0200
@@ -34,15 +34,11 @@
const struct sieve_extension_def ihave_extension = {
"ihave",
- NULL, NULL,
- ext_ihave_validator_load,
- ext_ihave_generator_load,
- NULL,
- ext_ihave_binary_load,
- ext_ihave_binary_dump,
- NULL,
- SIEVE_EXT_DEFINE_OPERATION(error_operation),
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .validator_load = ext_ihave_validator_load,
+ .generator_load = ext_ihave_generator_load,
+ .binary_load = ext_ihave_binary_load,
+ .binary_dump = ext_ihave_binary_dump,
+ SIEVE_EXT_DEFINE_OPERATION(error_operation)
};
static bool ext_ihave_validator_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/imap4flags/ext-imap4flags.c
--- a/src/lib-sieve/plugins/imap4flags/ext-imap4flags.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/imap4flags/ext-imap4flags.c Tue Sep 18 14:02:12 2012 +0200
@@ -49,12 +49,9 @@
sieve_size_t *address);
const struct sieve_extension_def imap4flags_extension = {
- "imap4flags",
- NULL, NULL,
- ext_imap4flags_validator_load,
- NULL,
- ext_imap4flags_interpreter_load,
- NULL, NULL, NULL,
+ .name = "imap4flags",
+ .validator_load = ext_imap4flags_validator_load,
+ .interpreter_load = ext_imap4flags_interpreter_load,
SIEVE_EXT_DEFINE_OPERATIONS(imap4flags_operations),
SIEVE_EXT_DEFINE_OPERAND(flags_side_effect_operand)
};
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/imap4flags/ext-imapflags.c
--- a/src/lib-sieve/plugins/imap4flags/ext-imapflags.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/imap4flags/ext-imapflags.c Tue Sep 18 14:02:12 2012 +0200
@@ -77,15 +77,10 @@
sieve_size_t *address);
const struct sieve_extension_def imapflags_extension = {
- "imapflags",
- ext_imapflags_load,
- NULL,
- ext_imapflags_validator_load,
- NULL,
- ext_imapflags_interpreter_load,
- NULL, NULL, NULL,
- SIEVE_EXT_DEFINE_NO_OPERATIONS,
- SIEVE_EXT_DEFINE_NO_OPERANDS
+ .name = "imapflags",
+ .load = ext_imapflags_load,
+ .validator_load = ext_imapflags_validator_load,
+ .interpreter_load = ext_imapflags_interpreter_load
};
static bool ext_imapflags_load
diff -r fb47824079c7 -r a80af8740468 src/lib-sieve/plugins/include/ext-include.c
--- a/src/lib-sieve/plugins/include/ext-include.c Tue Sep 18 12:10:53 2012 +0200
+++ b/src/lib-sieve/plugins/include/ext-include.c Tue Sep 18 14:02:12 2012 +0200
@@ -63,17 +63,16 @@
/* Extension objects */
More information about the dovecot-cvs
mailing list