From 877f8247feaad5fb5eb70be17eec577f8cf9fd06 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Fri, 8 Jan 2016 20:49:39 +0100
Subject: [PATCH] lib-sieve: Cleaned up byte code operand and operation
 definitions using newer C99 syntax.

---
 src/lib-sieve/cmd-discard.c                   |  9 ++-
 src/lib-sieve/cmd-keep.c                      |  9 ++-
 src/lib-sieve/cmd-redirect.c                  |  9 ++-
 src/lib-sieve/cmd-stop.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/tst-body.c         |  9 ++-
 .../ext-cmp-i-ascii-numeric.c                 |  9 ++-
 src/lib-sieve/plugins/copy/ext-copy.c         |  9 ++-
 src/lib-sieve/plugins/date/tst-date.c         | 20 +++---
 .../plugins/duplicate/tst-duplicate.c         |  8 +--
 .../plugins/editheader/cmd-addheader.c        | 10 +--
 .../plugins/editheader/cmd-deleteheader.c     | 10 +--
 src/lib-sieve/plugins/enotify/cmd-notify.c    | 10 +--
 .../enotify/tst-notify-method-capability.c    | 10 +--
 .../plugins/enotify/tst-valid-notify-method.c | 10 +--
 .../plugins/enotify/vmodf-encodeurl.c         |  9 ++-
 .../plugins/environment/tst-environment.c     |  9 ++-
 src/lib-sieve/plugins/ihave/cmd-error.c       |  9 ++-
 src/lib-sieve/plugins/imap4flags/cmd-flag.c   | 30 ++++-----
 .../imap4flags/ext-imap4flags-common.h        |  8 +--
 src/lib-sieve/plugins/imap4flags/tag-flags.c  |  9 ++-
 .../plugins/imap4flags/tst-hasflag.c          | 10 +--
 src/lib-sieve/plugins/include/cmd-global.c    | 10 +--
 src/lib-sieve/plugins/include/cmd-include.c   | 10 +--
 src/lib-sieve/plugins/include/cmd-return.c    |  9 ++-
 src/lib-sieve/plugins/index/tag-index.c       |  9 ++-
 .../plugins/mailbox/tag-mailbox-create.c      |  9 ++-
 .../plugins/mailbox/tst-mailboxexists.c       |  9 ++-
 src/lib-sieve/plugins/metadata/tst-metadata.c | 20 +++---
 .../plugins/metadata/tst-metadataexists.c     | 20 +++---
 src/lib-sieve/plugins/mime/cmd-break.c        | 10 +--
 src/lib-sieve/plugins/mime/cmd-foreverypart.c | 20 +++---
 src/lib-sieve/plugins/mime/tag-mime.c         |  9 ++-
 src/lib-sieve/plugins/notify/cmd-denotify.c   | 10 +--
 src/lib-sieve/plugins/notify/cmd-notify.c     | 10 +--
 .../plugins/regex/ext-regex-common.c          | 11 ++--
 .../relational/ext-relational-common.c        | 17 +++--
 .../plugins/spamvirustest/tst-spamvirustest.c | 19 +++---
 .../plugins/subaddress/ext-subaddress.c       |  8 +--
 src/lib-sieve/plugins/vacation/cmd-vacation.c |  9 ++-
 src/lib-sieve/plugins/variables/cmd-set.c     | 10 +--
 .../variables/ext-variables-modifiers.c       | 10 +--
 .../variables/ext-variables-namespaces.c      | 10 +--
 .../variables/ext-variables-operands.c        | 20 +++---
 src/lib-sieve/plugins/variables/tst-string.c  | 10 +--
 .../plugins/vnd.dovecot/debug/cmd-debug-log.c |  9 ++-
 .../ext-vnd-environment-variables.c           |  9 ++-
 src/lib-sieve/sieve-address-parts.c           |  8 +--
 src/lib-sieve/sieve-code.c                    | 65 +++++++++----------
 src/lib-sieve/sieve-comparators.c             |  9 ++-
 src/lib-sieve/sieve-match-types.c             |  9 ++-
 src/lib-sieve/tst-address.c                   |  9 ++-
 src/lib-sieve/tst-exists.c                    |  9 ++-
 src/lib-sieve/tst-header.c                    |  9 ++-
 src/lib-sieve/tst-size.c                      | 18 +++--
 src/plugins/sieve-extprograms/cmd-execute.c   |  8 +--
 src/plugins/sieve-extprograms/cmd-filter.c    |  8 +--
 src/plugins/sieve-extprograms/cmd-pipe.c      |  7 +-
 src/testsuite/cmd-test-binary.c               | 20 +++---
 src/testsuite/cmd-test-config.c               | 30 ++++-----
 src/testsuite/cmd-test-fail.c                 | 10 +--
 src/testsuite/cmd-test-imap-metadata.c        | 10 +--
 src/testsuite/cmd-test-mailbox.c              | 20 +++---
 src/testsuite/cmd-test-message.c              | 30 ++++-----
 src/testsuite/cmd-test-result.c               | 18 +++--
 src/testsuite/cmd-test-set.c                  | 10 +--
 src/testsuite/cmd-test.c                      | 19 +++---
 src/testsuite/testsuite-objects.c             | 10 +--
 src/testsuite/testsuite-substitutions.c       | 10 +--
 src/testsuite/testsuite-variables.c           | 10 +--
 src/testsuite/tst-test-error.c                | 10 +--
 src/testsuite/tst-test-multiscript.c          | 10 +--
 src/testsuite/tst-test-result-action.c        | 10 +--
 src/testsuite/tst-test-result-execute.c       |  9 ++-
 src/testsuite/tst-test-script-compile.c       | 10 +--
 src/testsuite/tst-test-script-run.c           | 10 +--
 78 files changed, 465 insertions(+), 507 deletions(-)

diff --git a/src/lib-sieve/cmd-discard.c b/src/lib-sieve/cmd-discard.c
index b193ee552..3b81c3771 100644
--- a/src/lib-sieve/cmd-discard.c
+++ b/src/lib-sieve/cmd-discard.c
@@ -45,11 +45,10 @@ static int cmd_discard_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def cmd_discard_operation = {
-	"DISCARD",
-	NULL,
-	SIEVE_OPERATION_DISCARD,
-	cmd_discard_operation_dump,
-	cmd_discard_operation_execute
+	.mnemonic = "DISCARD",
+	.code = SIEVE_OPERATION_DISCARD,
+	.dump = cmd_discard_operation_dump,
+	.execute = cmd_discard_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/cmd-keep.c b/src/lib-sieve/cmd-keep.c
index 03a9248d2..85c13d3c7 100644
--- a/src/lib-sieve/cmd-keep.c
+++ b/src/lib-sieve/cmd-keep.c
@@ -44,11 +44,10 @@ static int cmd_keep_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def cmd_keep_operation = {
-	"KEEP",
-	NULL,
-	SIEVE_OPERATION_KEEP,
-	cmd_keep_operation_dump,
-	cmd_keep_operation_execute
+	.mnemonic = "KEEP",
+	.code = SIEVE_OPERATION_KEEP,
+	.dump = cmd_keep_operation_dump,
+	.execute = cmd_keep_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/cmd-redirect.c b/src/lib-sieve/cmd-redirect.c
index 7b9a12e0d..4336737d9 100644
--- a/src/lib-sieve/cmd-redirect.c
+++ b/src/lib-sieve/cmd-redirect.c
@@ -68,11 +68,10 @@ static int cmd_redirect_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def cmd_redirect_operation = {
-	"REDIRECT",
-	NULL,
-	SIEVE_OPERATION_REDIRECT,
-	cmd_redirect_operation_dump,
-	cmd_redirect_operation_execute
+	.mnemonic = "REDIRECT",
+	.code = SIEVE_OPERATION_REDIRECT,
+	.dump = cmd_redirect_operation_dump,
+	.execute = cmd_redirect_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/cmd-stop.c b/src/lib-sieve/cmd-stop.c
index feb049b56..a2409c67a 100644
--- a/src/lib-sieve/cmd-stop.c
+++ b/src/lib-sieve/cmd-stop.c
@@ -39,11 +39,9 @@ static int opc_stop_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def cmd_stop_operation = {
-	"STOP",
-	NULL,
-	SIEVE_OPERATION_STOP,
-	NULL,
-	opc_stop_execute
+	.mnemonic = "STOP",
+	.code = SIEVE_OPERATION_STOP,
+	.execute = opc_stop_execute
 };
 
 /*
diff --git a/src/lib-sieve/ext-envelope.c b/src/lib-sieve/ext-envelope.c
index e1912d00f..694b8622a 100644
--- a/src/lib-sieve/ext-envelope.c
+++ b/src/lib-sieve/ext-envelope.c
@@ -100,11 +100,10 @@ static int ext_envelope_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def envelope_operation = {
-	"ENVELOPE",
-	&envelope_extension,
-	0,
-	ext_envelope_operation_dump,
-	ext_envelope_operation_execute
+	.mnemonic = "ENVELOPE",
+	.ext_def = &envelope_extension,
+	.dump = ext_envelope_operation_dump,
+	.execute = ext_envelope_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/ext-fileinto.c b/src/lib-sieve/ext-fileinto.c
index 69b5e4f4c..03e817e3b 100644
--- a/src/lib-sieve/ext-fileinto.c
+++ b/src/lib-sieve/ext-fileinto.c
@@ -91,11 +91,10 @@ static int ext_fileinto_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def fileinto_operation = {
-	"FILEINTO",
-	&fileinto_extension,
-	0,
-	ext_fileinto_operation_dump,
-	ext_fileinto_operation_execute
+	.mnemonic = "FILEINTO",
+	.ext_def = &fileinto_extension,
+	.dump = ext_fileinto_operation_dump,
+	.execute = ext_fileinto_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/ext-reject.c b/src/lib-sieve/ext-reject.c
index ac78ac8c3..c0bf34423 100644
--- a/src/lib-sieve/ext-reject.c
+++ b/src/lib-sieve/ext-reject.c
@@ -149,21 +149,19 @@ static int ext_reject_operation_execute
 /* Reject operation */
 
 static const struct sieve_operation_def reject_operation = {
-	"REJECT",
-	&reject_extension,
-	0,
-	ext_reject_operation_dump,
-	ext_reject_operation_execute
+	.mnemonic = "REJECT",
+	.ext_def = &reject_extension,
+	.dump = ext_reject_operation_dump,
+	.execute = ext_reject_operation_execute
 };
 
 /* EReject operation */
 
 static const struct sieve_operation_def ereject_operation = {
-	"EREJECT",
-	&ereject_extension,
-	0,
-	ext_reject_operation_dump,
-	ext_reject_operation_execute
+	.mnemonic = "EREJECT",
+	.ext_def = &ereject_extension,
+	.dump = ext_reject_operation_dump,
+	.execute = ext_reject_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/body/tst-body.c b/src/lib-sieve/plugins/body/tst-body.c
index 1bbb42005..68ad17528 100644
--- a/src/lib-sieve/plugins/body/tst-body.c
+++ b/src/lib-sieve/plugins/body/tst-body.c
@@ -56,11 +56,10 @@ static int ext_body_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def body_operation = {
-	"body",
-	&body_extension,
-	0,
-	ext_body_operation_dump,
-	ext_body_operation_execute
+	.mnemonic = "body",
+	.ext_def = &body_extension,
+	.dump = ext_body_operation_dump,
+	.execute = ext_body_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c b/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
index 163d829bd..0eb91bf39 100644
--- a/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
+++ b/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
@@ -58,11 +58,10 @@ static const struct sieve_extension_objects ext_comparators =
 	SIEVE_EXT_DEFINE_COMPARATOR(i_ascii_numeric_comparator);
 
 static const struct sieve_operand_def my_comparator_operand = {
-	"comparator-i;ascii-numeric",
-	&comparator_i_ascii_numeric_extension,
-	0,
-	&sieve_comparator_operand_class,
-	&ext_comparators
+	.name = "comparator-i;ascii-numeric",
+	.ext_def = &comparator_i_ascii_numeric_extension,
+	.class = &sieve_comparator_operand_class,
+	.interface = &ext_comparators
 };
 
 /*
diff --git a/src/lib-sieve/plugins/copy/ext-copy.c b/src/lib-sieve/plugins/copy/ext-copy.c
index 35f18ce69..3ab85b0e2 100644
--- a/src/lib-sieve/plugins/copy/ext-copy.c
+++ b/src/lib-sieve/plugins/copy/ext-copy.c
@@ -105,11 +105,10 @@ static const struct sieve_extension_objects ext_side_effects =
 	SIEVE_EXT_DEFINE_SIDE_EFFECT(copy_side_effect);
 
 static const struct sieve_operand_def copy_side_effect_operand = {
-	"copy operand",
-	&copy_extension,
-	0,
-	&sieve_side_effect_operand_class,
-	&ext_side_effects
+	.name = "copy operand",
+	.ext_def = &copy_extension,
+	.class = &sieve_side_effect_operand_class,
+	.interface = &ext_side_effects
 };
 
 /*
diff --git a/src/lib-sieve/plugins/date/tst-date.c b/src/lib-sieve/plugins/date/tst-date.c
index a3ce8521d..7bdd3d160 100644
--- a/src/lib-sieve/plugins/date/tst-date.c
+++ b/src/lib-sieve/plugins/date/tst-date.c
@@ -115,19 +115,19 @@ static int tst_date_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def date_operation = {
-	"DATE",
-	&date_extension,
-	EXT_DATE_OPERATION_DATE,
-	tst_date_operation_dump,
-	tst_date_operation_execute
+	.mnemonic = "DATE",
+	.ext_def = &date_extension,
+	.code = EXT_DATE_OPERATION_DATE,
+	.dump = tst_date_operation_dump,
+	.execute = tst_date_operation_execute
 };
 
 const struct sieve_operation_def currentdate_operation = {
-	"CURRENTDATE",
-	&date_extension,
-	EXT_DATE_OPERATION_CURRENTDATE,
-	tst_date_operation_dump,
-	tst_date_operation_execute
+	.mnemonic = "CURRENTDATE",
+	.ext_def = &date_extension,
+	.code = EXT_DATE_OPERATION_CURRENTDATE,
+	.dump = tst_date_operation_dump,
+	.execute = tst_date_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/duplicate/tst-duplicate.c b/src/lib-sieve/plugins/duplicate/tst-duplicate.c
index ae85862fd..97e299ab3 100644
--- a/src/lib-sieve/plugins/duplicate/tst-duplicate.c
+++ b/src/lib-sieve/plugins/duplicate/tst-duplicate.c
@@ -102,10 +102,10 @@ static int tst_duplicate_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def tst_duplicate_operation = {
-	"DUPLICATE", &duplicate_extension,
-	0,
-	tst_duplicate_operation_dump,
-	tst_duplicate_operation_execute
+	.mnemonic = "DUPLICATE",
+	.ext_def = &duplicate_extension,
+	.dump = tst_duplicate_operation_dump,
+	.execute = tst_duplicate_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/editheader/cmd-addheader.c b/src/lib-sieve/plugins/editheader/cmd-addheader.c
index 26fdda625..9122fd0ca 100644
--- a/src/lib-sieve/plugins/editheader/cmd-addheader.c
+++ b/src/lib-sieve/plugins/editheader/cmd-addheader.c
@@ -75,11 +75,11 @@ static int cmd_addheader_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def addheader_operation = {
-	"ADDHEADER",
-	&editheader_extension,
-	EXT_EDITHEADER_OPERATION_ADDHEADER,
-	cmd_addheader_operation_dump,
-	cmd_addheader_operation_execute
+	.mnemonic = "ADDHEADER",
+	.ext_def = &editheader_extension,
+	.code = EXT_EDITHEADER_OPERATION_ADDHEADER,
+	.dump = cmd_addheader_operation_dump,
+	.execute = cmd_addheader_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/editheader/cmd-deleteheader.c b/src/lib-sieve/plugins/editheader/cmd-deleteheader.c
index 3700c4acd..4a86b5950 100644
--- a/src/lib-sieve/plugins/editheader/cmd-deleteheader.c
+++ b/src/lib-sieve/plugins/editheader/cmd-deleteheader.c
@@ -94,11 +94,11 @@ static int cmd_deleteheader_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def deleteheader_operation = {
-	"DELETEHEADER",
-	&editheader_extension,
-	EXT_EDITHEADER_OPERATION_DELETEHEADER,
-	cmd_deleteheader_operation_dump,
-	cmd_deleteheader_operation_execute
+	.mnemonic = "DELETEHEADER",
+	.ext_def = &editheader_extension,
+	.code = EXT_EDITHEADER_OPERATION_DELETEHEADER,
+	.dump = cmd_deleteheader_operation_dump,
+	.execute = cmd_deleteheader_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/enotify/cmd-notify.c b/src/lib-sieve/plugins/enotify/cmd-notify.c
index 9018a9329..e43dff38b 100644
--- a/src/lib-sieve/plugins/enotify/cmd-notify.c
+++ b/src/lib-sieve/plugins/enotify/cmd-notify.c
@@ -109,11 +109,11 @@ static int cmd_notify_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def notify_operation = {
-	"NOTIFY",
-	&enotify_extension,
-	EXT_ENOTIFY_OPERATION_NOTIFY,
-	cmd_notify_operation_dump,
-	cmd_notify_operation_execute
+	.mnemonic = "NOTIFY",
+	.ext_def = &enotify_extension,
+	.code = EXT_ENOTIFY_OPERATION_NOTIFY,
+	.dump = cmd_notify_operation_dump,
+	.execute = cmd_notify_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/enotify/tst-notify-method-capability.c b/src/lib-sieve/plugins/enotify/tst-notify-method-capability.c
index 9229b6763..3f0b45eae 100644
--- a/src/lib-sieve/plugins/enotify/tst-notify-method-capability.c
+++ b/src/lib-sieve/plugins/enotify/tst-notify-method-capability.c
@@ -55,11 +55,11 @@ static int tst_notifymc_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def notify_method_capability_operation = {
-	"NOTIFY_METHOD_CAPABILITY",
-	&enotify_extension,
-	EXT_ENOTIFY_OPERATION_NOTIFY_METHOD_CAPABILITY,
-	tst_notifymc_operation_dump,
-	tst_notifymc_operation_execute
+	.mnemonic = "NOTIFY_METHOD_CAPABILITY",
+	.ext_def = &enotify_extension,
+	.code = EXT_ENOTIFY_OPERATION_NOTIFY_METHOD_CAPABILITY,
+	.dump = tst_notifymc_operation_dump,
+	.execute = tst_notifymc_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/enotify/tst-valid-notify-method.c b/src/lib-sieve/plugins/enotify/tst-valid-notify-method.c
index d526f61ed..6c70522be 100644
--- a/src/lib-sieve/plugins/enotify/tst-valid-notify-method.c
+++ b/src/lib-sieve/plugins/enotify/tst-valid-notify-method.c
@@ -48,11 +48,11 @@ static int tst_vnotifym_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def valid_notify_method_operation = {
-	"VALID_NOTIFY_METHOD",
-	&enotify_extension,
-	EXT_ENOTIFY_OPERATION_VALID_NOTIFY_METHOD,
-	tst_vnotifym_operation_dump,
-	tst_vnotifym_operation_execute
+	.mnemonic = "VALID_NOTIFY_METHOD",
+	.ext_def = &enotify_extension,
+	.code = EXT_ENOTIFY_OPERATION_VALID_NOTIFY_METHOD,
+	.dump = tst_vnotifym_operation_dump,
+	.execute = tst_vnotifym_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/enotify/vmodf-encodeurl.c b/src/lib-sieve/plugins/enotify/vmodf-encodeurl.c
index 5ccdbd798..1e8ccf7cf 100644
--- a/src/lib-sieve/plugins/enotify/vmodf-encodeurl.c
+++ b/src/lib-sieve/plugins/enotify/vmodf-encodeurl.c
@@ -31,11 +31,10 @@ static const struct sieve_extension_objects ext_enotify_modifiers =
 	SIEVE_VARIABLES_DEFINE_MODIFIER(encodeurl_modifier);
 
 const struct sieve_operand_def encodeurl_operand = {
-	"modifier",
-	&enotify_extension,
-	0,
-	&sieve_variables_modifier_operand_class,
-	&ext_enotify_modifiers
+	.name = "modifier",
+	.ext_def = &enotify_extension,
+	.class = &sieve_variables_modifier_operand_class,
+	.interface = &ext_enotify_modifiers
 };
 
 /*
diff --git a/src/lib-sieve/plugins/environment/tst-environment.c b/src/lib-sieve/plugins/environment/tst-environment.c
index a3dd0b58e..fabf863a9 100644
--- a/src/lib-sieve/plugins/environment/tst-environment.c
+++ b/src/lib-sieve/plugins/environment/tst-environment.c
@@ -53,11 +53,10 @@ static int tst_environment_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def tst_environment_operation = {
-	"ENVIRONMENT",
-	&environment_extension,
-	0,
-	tst_environment_operation_dump,
-	tst_environment_operation_execute
+	.mnemonic = "ENVIRONMENT",
+	.ext_def = &environment_extension,
+	.dump = tst_environment_operation_dump,
+	.execute = tst_environment_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/ihave/cmd-error.c b/src/lib-sieve/plugins/ihave/cmd-error.c
index 5a5d7f28d..d368722c6 100644
--- a/src/lib-sieve/plugins/ihave/cmd-error.c
+++ b/src/lib-sieve/plugins/ihave/cmd-error.c
@@ -49,11 +49,10 @@ static int cmd_error_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def error_operation = {
-	"ERROR",
-	&ihave_extension,
-	0,
-	cmd_error_operation_dump,
-	cmd_error_operation_execute
+	.mnemonic = "ERROR",
+	.ext_def = &ihave_extension,
+	.dump = cmd_error_operation_dump,
+	.execute = cmd_error_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/imap4flags/cmd-flag.c b/src/lib-sieve/plugins/imap4flags/cmd-flag.c
index 2bef52688..da60c970e 100644
--- a/src/lib-sieve/plugins/imap4flags/cmd-flag.c
+++ b/src/lib-sieve/plugins/imap4flags/cmd-flag.c
@@ -88,31 +88,31 @@ static int cmd_flag_operation_execute
 /* Setflag operation */
 
 const struct sieve_operation_def setflag_operation = {
-	"SETFLAG",
-	&imap4flags_extension,
-	ext_imap4flags_OPERATION_SETFLAG,
-	cmd_flag_operation_dump,
-	cmd_flag_operation_execute
+	.mnemonic = "SETFLAG",
+	.ext_def = &imap4flags_extension,
+	.code = EXT_IMAP4FLAGS_OPERATION_SETFLAG,
+	.dump = cmd_flag_operation_dump,
+	.execute = cmd_flag_operation_execute
 };
 
 /* Addflag operation */
 
 const struct sieve_operation_def addflag_operation = {
-	"ADDFLAG",
-	&imap4flags_extension,
-	ext_imap4flags_OPERATION_ADDFLAG,
-	cmd_flag_operation_dump,
-	cmd_flag_operation_execute
+	.mnemonic = "ADDFLAG",
+	.ext_def = &imap4flags_extension,
+	.code = EXT_IMAP4FLAGS_OPERATION_ADDFLAG,
+	.dump = cmd_flag_operation_dump,
+	.execute = cmd_flag_operation_execute
 };
 
 /* Removeflag operation */
 
 const struct sieve_operation_def removeflag_operation = {
-	"REMOVEFLAG",
-	&imap4flags_extension,
-	ext_imap4flags_OPERATION_REMOVEFLAG,
-	cmd_flag_operation_dump,
-	cmd_flag_operation_execute
+	.mnemonic = "REMOVEFLAG",
+	.ext_def = &imap4flags_extension,
+	.code = EXT_IMAP4FLAGS_OPERATION_REMOVEFLAG,
+	.dump = cmd_flag_operation_dump,
+	.execute = cmd_flag_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/imap4flags/ext-imap4flags-common.h b/src/lib-sieve/plugins/imap4flags/ext-imap4flags-common.h
index 8d7685ed0..645045d9e 100644
--- a/src/lib-sieve/plugins/imap4flags/ext-imap4flags-common.h
+++ b/src/lib-sieve/plugins/imap4flags/ext-imap4flags-common.h
@@ -36,10 +36,10 @@ extern const struct sieve_operand_def flags_side_effect_operand;
  */
 
 enum ext_imap4flags_opcode {
-	ext_imap4flags_OPERATION_SETFLAG,
-	ext_imap4flags_OPERATION_ADDFLAG,
-	ext_imap4flags_OPERATION_REMOVEFLAG,
-	ext_imap4flags_OPERATION_HASFLAG
+	EXT_IMAP4FLAGS_OPERATION_SETFLAG,
+	EXT_IMAP4FLAGS_OPERATION_ADDFLAG,
+	EXT_IMAP4FLAGS_OPERATION_REMOVEFLAG,
+	EXT_IMAP4FLAGS_OPERATION_HASFLAG
 };
 
 extern const struct sieve_operation_def setflag_operation;
diff --git a/src/lib-sieve/plugins/imap4flags/tag-flags.c b/src/lib-sieve/plugins/imap4flags/tag-flags.c
index 1e7ebf875..195644952 100644
--- a/src/lib-sieve/plugins/imap4flags/tag-flags.c
+++ b/src/lib-sieve/plugins/imap4flags/tag-flags.c
@@ -91,11 +91,10 @@ static const struct sieve_extension_objects ext_side_effects =
 	SIEVE_EXT_DEFINE_SIDE_EFFECT(flags_side_effect);
 
 const struct sieve_operand_def flags_side_effect_operand = {
-	"flags operand",
-	&imap4flags_extension,
-	0,
-	&sieve_side_effect_operand_class,
-	&ext_side_effects
+	.name = "flags operand",
+	.ext_def = &imap4flags_extension,
+	.class = &sieve_side_effect_operand_class,
+	.interface = &ext_side_effects
 };
 
 /*
diff --git a/src/lib-sieve/plugins/imap4flags/tst-hasflag.c b/src/lib-sieve/plugins/imap4flags/tst-hasflag.c
index 9867394a2..8b022c67b 100644
--- a/src/lib-sieve/plugins/imap4flags/tst-hasflag.c
+++ b/src/lib-sieve/plugins/imap4flags/tst-hasflag.c
@@ -54,11 +54,11 @@ static int tst_hasflag_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def hasflag_operation = {
-	"HASFLAG",
-	&imap4flags_extension,
-	ext_imap4flags_OPERATION_HASFLAG,
-	tst_hasflag_operation_dump,
-	tst_hasflag_operation_execute
+	.mnemonic = "HASFLAG",
+	.ext_def = &imap4flags_extension,
+	.code = EXT_IMAP4FLAGS_OPERATION_HASFLAG,
+	.dump = tst_hasflag_operation_dump,
+	.execute = tst_hasflag_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/include/cmd-global.c b/src/lib-sieve/plugins/include/cmd-global.c
index 3c28492ac..3752bf0d7 100644
--- a/src/lib-sieve/plugins/include/cmd-global.c
+++ b/src/lib-sieve/plugins/include/cmd-global.c
@@ -85,11 +85,11 @@ static int opc_global_execute
 /* Global operation */
 
 const struct sieve_operation_def global_operation = {
-	"global",
-	&include_extension,
-	EXT_INCLUDE_OPERATION_GLOBAL,
-	opc_global_dump,
-	opc_global_execute
+	.mnemonic = "GLOBAL",
+	.ext_def = &include_extension,
+	.code = EXT_INCLUDE_OPERATION_GLOBAL,
+	.dump = opc_global_dump,
+	.execute = opc_global_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/include/cmd-include.c b/src/lib-sieve/plugins/include/cmd-include.c
index cbb0039db..6a1f5692f 100644
--- a/src/lib-sieve/plugins/include/cmd-include.c
+++ b/src/lib-sieve/plugins/include/cmd-include.c
@@ -63,11 +63,11 @@ static int opc_include_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def include_operation = {
-	"include",
-	&include_extension,
-	EXT_INCLUDE_OPERATION_INCLUDE,
-	opc_include_dump,
-	opc_include_execute
+	.mnemonic = "include",
+	.ext_def = &include_extension,
+	.code = EXT_INCLUDE_OPERATION_INCLUDE,
+	.dump = opc_include_dump,
+	.execute = opc_include_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/include/cmd-return.c b/src/lib-sieve/plugins/include/cmd-return.c
index 5e64f3616..cc505bfe6 100644
--- a/src/lib-sieve/plugins/include/cmd-return.c
+++ b/src/lib-sieve/plugins/include/cmd-return.c
@@ -39,11 +39,10 @@ static int opc_return_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def return_operation = {
-	"return",
-	&include_extension,
-	EXT_INCLUDE_OPERATION_RETURN,
-	NULL,
-	opc_return_execute
+	.mnemonic = "RETURN",
+	.ext_def = &include_extension,
+	.code = EXT_INCLUDE_OPERATION_RETURN,
+	.execute = opc_return_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/index/tag-index.c b/src/lib-sieve/plugins/index/tag-index.c
index cfce44f4a..267c523ef 100644
--- a/src/lib-sieve/plugins/index/tag-index.c
+++ b/src/lib-sieve/plugins/index/tag-index.c
@@ -76,11 +76,10 @@ static const struct sieve_extension_objects ext_header_overrides =
 	SIEVE_EXT_DEFINE_MESSAGE_OVERRIDE(index_header_override);
 
 const struct sieve_operand_def index_operand = {
-	"index operand",
-	&index_extension,
-	0,
-	&sieve_message_override_operand_class,
-	&ext_header_overrides
+	.name = "index operand",
+	.ext_def = &index_extension,
+	.class = &sieve_message_override_operand_class,
+	.interface = &ext_header_overrides
 };
 
 /*
diff --git a/src/lib-sieve/plugins/mailbox/tag-mailbox-create.c b/src/lib-sieve/plugins/mailbox/tag-mailbox-create.c
index e6cc0118c..bb0406dfa 100644
--- a/src/lib-sieve/plugins/mailbox/tag-mailbox-create.c
+++ b/src/lib-sieve/plugins/mailbox/tag-mailbox-create.c
@@ -61,11 +61,10 @@ static const struct sieve_extension_objects ext_side_effects =
 	SIEVE_EXT_DEFINE_SIDE_EFFECT(mailbox_create_side_effect);
 
 const struct sieve_operand_def mailbox_create_operand = {
-	"create operand",
-	&mailbox_extension,
-	0,
-	&sieve_side_effect_operand_class,
-	&ext_side_effects
+	.name = "create operand",
+	.ext_def = &mailbox_extension,
+	.class = &sieve_side_effect_operand_class,
+	.interface = &ext_side_effects
 };
 
 /*
diff --git a/src/lib-sieve/plugins/mailbox/tst-mailboxexists.c b/src/lib-sieve/plugins/mailbox/tst-mailboxexists.c
index d7763ce53..9aa3a9281 100644
--- a/src/lib-sieve/plugins/mailbox/tst-mailboxexists.c
+++ b/src/lib-sieve/plugins/mailbox/tst-mailboxexists.c
@@ -52,11 +52,10 @@ static int tst_mailboxexists_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def mailboxexists_operation = {
-	"MAILBOXEXISTS",
-	&mailbox_extension,
-	0,
-	tst_mailboxexists_operation_dump,
-	tst_mailboxexists_operation_execute
+	.mnemonic = "MAILBOXEXISTS",
+	.ext_def = &mailbox_extension,
+	.dump = tst_mailboxexists_operation_dump,
+	.execute = tst_mailboxexists_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/metadata/tst-metadata.c b/src/lib-sieve/plugins/metadata/tst-metadata.c
index 2d9e813f0..93d857b8f 100644
--- a/src/lib-sieve/plugins/metadata/tst-metadata.c
+++ b/src/lib-sieve/plugins/metadata/tst-metadata.c
@@ -90,21 +90,21 @@ static int tst_metadata_operation_execute
 /* Metadata operation */
 
 const struct sieve_operation_def metadata_operation = {
-	"METADATA",
-	&mboxmetadata_extension,
-	EXT_METADATA_OPERATION_METADATA,
-	tst_metadata_operation_dump,
-	tst_metadata_operation_execute
+	.mnemonic = "METADATA",
+	.ext_def = &mboxmetadata_extension,
+	.code = EXT_METADATA_OPERATION_METADATA,
+	.dump = tst_metadata_operation_dump,
+	.execute = tst_metadata_operation_execute
 };
 
 /* Servermetadata operation */
 
 const struct sieve_operation_def servermetadata_operation = {
-	"SERVERMETADATA",
-	&servermetadata_extension,
-	EXT_METADATA_OPERATION_METADATA,
-	tst_metadata_operation_dump,
-	tst_metadata_operation_execute
+	.mnemonic = "SERVERMETADATA",
+	.ext_def = &servermetadata_extension,
+	.code = EXT_METADATA_OPERATION_METADATA,
+	.dump = tst_metadata_operation_dump,
+	.execute = tst_metadata_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/metadata/tst-metadataexists.c b/src/lib-sieve/plugins/metadata/tst-metadataexists.c
index 0469fdbb2..918ccc7f4 100644
--- a/src/lib-sieve/plugins/metadata/tst-metadataexists.c
+++ b/src/lib-sieve/plugins/metadata/tst-metadataexists.c
@@ -83,21 +83,21 @@ static int tst_metadataexists_operation_execute
 /* Metadata operation */
 
 const struct sieve_operation_def metadataexists_operation = {
-	"METADATAEXISTS",
-	&mboxmetadata_extension,
-	EXT_METADATA_OPERATION_METADATAEXISTS,
-	tst_metadataexists_operation_dump,
-	tst_metadataexists_operation_execute
+	.mnemonic = "METADATAEXISTS",
+	.ext_def = &mboxmetadata_extension,
+	.code = EXT_METADATA_OPERATION_METADATAEXISTS,
+	.dump = tst_metadataexists_operation_dump,
+	.execute = tst_metadataexists_operation_execute
 };
 
 /* Mailboxexists operation */
 
 const struct sieve_operation_def servermetadataexists_operation = {
-	"SERVERMETADATAEXISTS",
-	&servermetadata_extension,
-	EXT_METADATA_OPERATION_METADATAEXISTS,
-	tst_metadataexists_operation_dump,
-	tst_metadataexists_operation_execute
+	.mnemonic = "SERVERMETADATAEXISTS",
+	.ext_def = &servermetadata_extension,
+	.code = EXT_METADATA_OPERATION_METADATAEXISTS,
+	.dump = tst_metadataexists_operation_dump,
+	.execute = tst_metadataexists_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/mime/cmd-break.c b/src/lib-sieve/plugins/mime/cmd-break.c
index 762ecd6a4..8d9a08e57 100644
--- a/src/lib-sieve/plugins/mime/cmd-break.c
+++ b/src/lib-sieve/plugins/mime/cmd-break.c
@@ -73,11 +73,11 @@ static int cmd_break_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def break_operation = {
-	"break",
-	&foreverypart_extension,
-	EXT_FOREVERYPART_OPERATION_BREAK,
-	cmd_break_operation_dump,
-	cmd_break_operation_execute
+	.mnemonic = "BREAK",
+	.ext_def = &foreverypart_extension,
+	.code = EXT_FOREVERYPART_OPERATION_BREAK,
+	.dump = cmd_break_operation_dump,
+	.execute = cmd_break_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/mime/cmd-foreverypart.c b/src/lib-sieve/plugins/mime/cmd-foreverypart.c
index 52f522ae7..9d1d1dae5 100644
--- a/src/lib-sieve/plugins/mime/cmd-foreverypart.c
+++ b/src/lib-sieve/plugins/mime/cmd-foreverypart.c
@@ -75,11 +75,11 @@ static int cmd_foreverypart_begin_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def foreverypart_begin_operation = {
-	"FOREVERYPART_BEGIN",
-	&foreverypart_extension,
-	EXT_FOREVERYPART_OPERATION_FOREVERYPART_BEGIN,
-	cmd_foreverypart_begin_operation_dump,
-	cmd_foreverypart_begin_operation_execute
+	.mnemonic = "FOREVERYPART_BEGIN",
+	.ext_def = &foreverypart_extension,
+	.code = EXT_FOREVERYPART_OPERATION_FOREVERYPART_BEGIN,
+	.dump = cmd_foreverypart_begin_operation_dump,
+	.execute = cmd_foreverypart_begin_operation_execute
 };
 
 static bool cmd_foreverypart_end_operation_dump
@@ -88,11 +88,11 @@ static int cmd_foreverypart_end_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def foreverypart_end_operation = {
-	"FOREVERYPART_END",
-	&foreverypart_extension,
-	EXT_FOREVERYPART_OPERATION_FOREVERYPART_END,
-	cmd_foreverypart_end_operation_dump,
-	cmd_foreverypart_end_operation_execute
+	.mnemonic = "FOREVERYPART_END",
+	.ext_def = &foreverypart_extension,
+	.code = EXT_FOREVERYPART_OPERATION_FOREVERYPART_END,
+	.dump = cmd_foreverypart_end_operation_dump,
+	.execute = cmd_foreverypart_end_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/mime/tag-mime.c b/src/lib-sieve/plugins/mime/tag-mime.c
index f485d0eb0..aacd1e5f9 100644
--- a/src/lib-sieve/plugins/mime/tag-mime.c
+++ b/src/lib-sieve/plugins/mime/tag-mime.c
@@ -97,11 +97,10 @@ static const struct sieve_extension_objects ext_header_overrides =
 	SIEVE_EXT_DEFINE_MESSAGE_OVERRIDE(mime_header_override);
 
 const struct sieve_operand_def mime_operand = {
-	"mime operand",
-	&mime_extension,
-	0,
-	&sieve_message_override_operand_class,
-	&ext_header_overrides
+	.name = "mime operand",
+	.ext_def = &mime_extension,
+	.class = &sieve_message_override_operand_class,
+	.interface = &ext_header_overrides
 };
 
 /*
diff --git a/src/lib-sieve/plugins/notify/cmd-denotify.c b/src/lib-sieve/plugins/notify/cmd-denotify.c
index a1acbb6bb..7da0b8e2e 100644
--- a/src/lib-sieve/plugins/notify/cmd-denotify.c
+++ b/src/lib-sieve/plugins/notify/cmd-denotify.c
@@ -91,11 +91,11 @@ static int cmd_denotify_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def denotify_operation = {
-	"DENOTIFY",
-	&notify_extension,
-	EXT_NOTIFY_OPERATION_DENOTIFY,
-	cmd_denotify_operation_dump,
-	cmd_denotify_operation_execute
+	.mnemonic = "DENOTIFY",
+	.ext_def = &notify_extension,
+	.code = EXT_NOTIFY_OPERATION_DENOTIFY,
+	.dump = cmd_denotify_operation_dump,
+	.execute = cmd_denotify_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/notify/cmd-notify.c b/src/lib-sieve/plugins/notify/cmd-notify.c
index fdcbac4ab..5f1dfabe6 100644
--- a/src/lib-sieve/plugins/notify/cmd-notify.c
+++ b/src/lib-sieve/plugins/notify/cmd-notify.c
@@ -109,11 +109,11 @@ static int cmd_notify_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def notify_old_operation = {
-	"NOTIFY",
-	&notify_extension,
-	EXT_NOTIFY_OPERATION_NOTIFY,
-	cmd_notify_operation_dump,
-	cmd_notify_operation_execute
+	.mnemonic = "NOTIFY",
+	.ext_def = &notify_extension,
+	.code = EXT_NOTIFY_OPERATION_NOTIFY,
+	.dump = cmd_notify_operation_dump,
+	.execute = cmd_notify_operation_execute
 };
 
 /* Codes for optional operands */
diff --git a/src/lib-sieve/plugins/regex/ext-regex-common.c b/src/lib-sieve/plugins/regex/ext-regex-common.c
index 315c10ca4..118aaae21 100644
--- a/src/lib-sieve/plugins/regex/ext-regex-common.c
+++ b/src/lib-sieve/plugins/regex/ext-regex-common.c
@@ -11,13 +11,12 @@
  */
 
 static const struct sieve_extension_objects ext_match_types =
-    SIEVE_EXT_DEFINE_MATCH_TYPE(regex_match_type);
+	SIEVE_EXT_DEFINE_MATCH_TYPE(regex_match_type);
 
 const struct sieve_operand_def regex_match_type_operand = {
-    "regex match",
-    &regex_extension,
-    0,
-    &sieve_match_type_operand_class,
-    &ext_match_types
+	.name = "regex match",
+	.ext_def = &regex_extension,
+	.class = &sieve_match_type_operand_class,
+	.interface = &ext_match_types
 };
 
diff --git a/src/lib-sieve/plugins/relational/ext-relational-common.c b/src/lib-sieve/plugins/relational/ext-relational-common.c
index 9112bb533..d1cecbcc9 100644
--- a/src/lib-sieve/plugins/relational/ext-relational-common.c
+++ b/src/lib-sieve/plugins/relational/ext-relational-common.c
@@ -147,20 +147,19 @@ bool mcht_relational_validate
  */
 
 const struct sieve_match_type_def *rel_match_types[] = {
-    &rel_match_value_gt, &rel_match_value_ge, &rel_match_value_lt,
-    &rel_match_value_le, &rel_match_value_eq, &rel_match_value_ne,
-    &rel_match_count_gt, &rel_match_count_ge, &rel_match_count_lt,
-    &rel_match_count_le, &rel_match_count_eq, &rel_match_count_ne
+	&rel_match_value_gt, &rel_match_value_ge, &rel_match_value_lt,
+	&rel_match_value_le, &rel_match_value_eq, &rel_match_value_ne,
+	&rel_match_count_gt, &rel_match_count_ge, &rel_match_count_lt,
+	&rel_match_count_le, &rel_match_count_eq, &rel_match_count_ne
 };
 
 static const struct sieve_extension_objects ext_match_types =
 	SIEVE_EXT_DEFINE_MATCH_TYPES(rel_match_types);
 
 const struct sieve_operand_def rel_match_type_operand = {
-    "relational match",
-    &relational_extension,
-    0,
-    &sieve_match_type_operand_class,
-    &ext_match_types
+	.name = "relational match",
+	.ext_def = &relational_extension,
+	.class = &sieve_match_type_operand_class,
+	.interface = &ext_match_types
 };
 
diff --git a/src/lib-sieve/plugins/spamvirustest/tst-spamvirustest.c b/src/lib-sieve/plugins/spamvirustest/tst-spamvirustest.c
index 5f923e0a4..482056371 100644
--- a/src/lib-sieve/plugins/spamvirustest/tst-spamvirustest.c
+++ b/src/lib-sieve/plugins/spamvirustest/tst-spamvirustest.c
@@ -90,22 +90,19 @@ static int tst_spamvirustest_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def spamtest_operation = {
-	"SPAMTEST",
-	&spamtest_extension,
-	0,
-	tst_spamvirustest_operation_dump,
-	tst_spamvirustest_operation_execute
+	.mnemonic = "SPAMTEST",
+	.ext_def = &spamtest_extension,
+	.dump = tst_spamvirustest_operation_dump,
+	.execute = tst_spamvirustest_operation_execute
 };
 
 const struct sieve_operation_def virustest_operation = {
-	"VIRUSTEST",
-	&virustest_extension,
-	0,
-	tst_spamvirustest_operation_dump,
-	tst_spamvirustest_operation_execute
+	.mnemonic = "VIRUSTEST",
+	.ext_def = &virustest_extension,
+	.dump = tst_spamvirustest_operation_dump,
+	.execute = tst_spamvirustest_operation_execute
 };
 
-
 /*
  * Optional operands
  */
diff --git a/src/lib-sieve/plugins/subaddress/ext-subaddress.c b/src/lib-sieve/plugins/subaddress/ext-subaddress.c
index d0c19a18c..2b73e4d10 100644
--- a/src/lib-sieve/plugins/subaddress/ext-subaddress.c
+++ b/src/lib-sieve/plugins/subaddress/ext-subaddress.c
@@ -180,9 +180,9 @@ static const struct sieve_extension_objects ext_address_parts =
 	SIEVE_EXT_DEFINE_ADDRESS_PARTS(ext_subaddress_parts);
 
 static struct sieve_operand_def subaddress_operand = {
-	"address-part",
-	&subaddress_extension, 0,
-	&sieve_address_part_operand_class,
-	&ext_address_parts
+	.name = "address-part",
+	.ext_def = &subaddress_extension,
+	.class = &sieve_address_part_operand_class,
+	.interface = &ext_address_parts
 };
 
diff --git a/src/lib-sieve/plugins/vacation/cmd-vacation.c b/src/lib-sieve/plugins/vacation/cmd-vacation.c
index 92f70dc49..9d0dd0b6a 100644
--- a/src/lib-sieve/plugins/vacation/cmd-vacation.c
+++ b/src/lib-sieve/plugins/vacation/cmd-vacation.c
@@ -154,11 +154,10 @@ static int ext_vacation_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def vacation_operation = {
-	"VACATION",
-	&vacation_extension,
-	0,
-	ext_vacation_operation_dump,
-	ext_vacation_operation_execute
+	.mnemonic = "VACATION",
+	.ext_def = &vacation_extension,
+	.dump = ext_vacation_operation_dump,
+	.execute = ext_vacation_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/variables/cmd-set.c b/src/lib-sieve/plugins/variables/cmd-set.c
index 72ada5af6..eaf9ab1a2 100644
--- a/src/lib-sieve/plugins/variables/cmd-set.c
+++ b/src/lib-sieve/plugins/variables/cmd-set.c
@@ -62,11 +62,11 @@ static int cmd_set_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def cmd_set_operation = {
-	"SET",
-	&variables_extension,
-	EXT_VARIABLES_OPERATION_SET,
-	cmd_set_operation_dump,
-	cmd_set_operation_execute
+	.mnemonic = "SET",
+	.ext_def = &variables_extension,
+	.code = EXT_VARIABLES_OPERATION_SET,
+	.dump = cmd_set_operation_dump,
+	.execute = cmd_set_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/variables/ext-variables-modifiers.c b/src/lib-sieve/plugins/variables/ext-variables-modifiers.c
index 63d5b5ec6..ca920fe16 100644
--- a/src/lib-sieve/plugins/variables/ext-variables-modifiers.c
+++ b/src/lib-sieve/plugins/variables/ext-variables-modifiers.c
@@ -123,11 +123,11 @@ static const struct sieve_extension_objects core_modifiers =
 	SIEVE_VARIABLES_DEFINE_MODIFIERS(ext_variables_core_modifiers);
 
 const struct sieve_operand_def modifier_operand = {
-	"modifier",
-	&variables_extension,
-	EXT_VARIABLES_OPERAND_MODIFIER,
-	&sieve_variables_modifier_operand_class,
-	&core_modifiers
+	.name = "modifier",
+	.ext_def = &variables_extension,
+	.code = EXT_VARIABLES_OPERAND_MODIFIER,
+	.class = &sieve_variables_modifier_operand_class,
+	.interface = &core_modifiers
 };
 
 /*
diff --git a/src/lib-sieve/plugins/variables/ext-variables-namespaces.c b/src/lib-sieve/plugins/variables/ext-variables-namespaces.c
index 96d1d383f..0416e244d 100644
--- a/src/lib-sieve/plugins/variables/ext-variables-namespaces.c
+++ b/src/lib-sieve/plugins/variables/ext-variables-namespaces.c
@@ -169,11 +169,11 @@ static const struct sieve_opr_string_interface namespace_variable_interface = {
 };
 
 const struct sieve_operand_def namespace_variable_operand = {
-	"namespace",
-	&variables_extension,
-	EXT_VARIABLES_OPERAND_NAMESPACE_VARIABLE,
-	&string_class,
-	&namespace_variable_interface
+	.name = "namespace",
+	.ext_def = &variables_extension,
+	.code = EXT_VARIABLES_OPERAND_NAMESPACE_VARIABLE,
+	.class = &string_class,
+	.interface = &namespace_variable_interface
 };
 
 void sieve_variables_opr_namespace_variable_emit
diff --git a/src/lib-sieve/plugins/variables/ext-variables-operands.c b/src/lib-sieve/plugins/variables/ext-variables-operands.c
index 281658250..9b53f5f23 100644
--- a/src/lib-sieve/plugins/variables/ext-variables-operands.c
+++ b/src/lib-sieve/plugins/variables/ext-variables-operands.c
@@ -41,11 +41,11 @@ const struct sieve_opr_string_interface variable_interface = {
 };
 
 const struct sieve_operand_def variable_operand = {
-	"variable",
-	&variables_extension,
-	EXT_VARIABLES_OPERAND_VARIABLE,
-	&string_class,
-	&variable_interface
+	.name = "variable",
+	.ext_def = &variables_extension,
+	.code = EXT_VARIABLES_OPERAND_VARIABLE,
+	.class = &string_class,
+	.interface = &variable_interface
 };
 
 void sieve_variables_opr_variable_emit
@@ -213,11 +213,11 @@ const struct sieve_opr_string_interface match_value_interface = {
 };
 
 const struct sieve_operand_def match_value_operand = {
-	"match-value",
-	&variables_extension,
-	EXT_VARIABLES_OPERAND_MATCH_VALUE,
-	&string_class,
-	&match_value_interface
+	.name = "match-value",
+	.ext_def = &variables_extension,
+	.code = EXT_VARIABLES_OPERAND_MATCH_VALUE,
+	.class = &string_class,
+	.interface = &match_value_interface
 };
 
 void sieve_variables_opr_match_value_emit
diff --git a/src/lib-sieve/plugins/variables/tst-string.c b/src/lib-sieve/plugins/variables/tst-string.c
index 7aaf23c08..d9492a3aa 100644
--- a/src/lib-sieve/plugins/variables/tst-string.c
+++ b/src/lib-sieve/plugins/variables/tst-string.c
@@ -53,11 +53,11 @@ static int tst_string_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def tst_string_operation = {
-	"STRING",
-	&variables_extension,
-	EXT_VARIABLES_OPERATION_STRING,
-	tst_string_operation_dump,
-	tst_string_operation_execute
+	.mnemonic = "STRING",
+	.ext_def = &variables_extension,
+	.code = EXT_VARIABLES_OPERATION_STRING,
+	.dump = tst_string_operation_dump,
+	.execute = tst_string_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/vnd.dovecot/debug/cmd-debug-log.c b/src/lib-sieve/plugins/vnd.dovecot/debug/cmd-debug-log.c
index 7ee38650d..19e2c9547 100644
--- a/src/lib-sieve/plugins/vnd.dovecot/debug/cmd-debug-log.c
+++ b/src/lib-sieve/plugins/vnd.dovecot/debug/cmd-debug-log.c
@@ -49,11 +49,10 @@ static int cmd_debug_log_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def debug_log_operation = {
-	"debug_log",
-	&vnd_debug_extension,
-	0,
-	cmd_debug_log_operation_dump,
-	cmd_debug_log_operation_execute
+	.mnemonic = "DEBUG_LOG",
+	.ext_def = &vnd_debug_extension,
+	.dump = cmd_debug_log_operation_dump,
+	.execute = cmd_debug_log_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/vnd.dovecot/environment/ext-vnd-environment-variables.c b/src/lib-sieve/plugins/vnd.dovecot/environment/ext-vnd-environment-variables.c
index dec2f78f6..5a32ae128 100644
--- a/src/lib-sieve/plugins/vnd.dovecot/environment/ext-vnd-environment-variables.c
+++ b/src/lib-sieve/plugins/vnd.dovecot/environment/ext-vnd-environment-variables.c
@@ -189,11 +189,10 @@ static const struct sieve_extension_objects environment_namespaces =
 	SIEVE_VARIABLES_DEFINE_NAMESPACE(environment_namespace);
 
 const struct sieve_operand_def environment_namespace_operand = {
-	"env-namespace",
-	&vnd_environment_extension,
-	0,
-	&sieve_variables_namespace_operand_class,
-	&environment_namespaces
+	.name = "env-namespace",
+	.ext_def = &vnd_environment_extension,
+	.class = &sieve_variables_namespace_operand_class,
+	.interface = &environment_namespaces
 };
 
 void ext_environment_variables_init
diff --git a/src/lib-sieve/sieve-address-parts.c b/src/lib-sieve/sieve-address-parts.c
index d6ed1394a..357d5e79a 100644
--- a/src/lib-sieve/sieve-address-parts.c
+++ b/src/lib-sieve/sieve-address-parts.c
@@ -215,10 +215,10 @@ static const struct sieve_extension_objects core_address_parts =
 	SIEVE_EXT_DEFINE_MATCH_TYPES(sieve_core_address_parts);
 
 const struct sieve_operand_def address_part_operand = {
-	"address-part",
-	NULL, SIEVE_OPERAND_ADDRESS_PART,
-	&sieve_address_part_operand_class,
-	&core_address_parts
+	.name = "address-part",
+	.code = SIEVE_OPERAND_ADDRESS_PART,
+	.class = &sieve_address_part_operand_class,
+	.interface = &core_address_parts
 };
 
 /*
diff --git a/src/lib-sieve/sieve-code.c b/src/lib-sieve/sieve-code.c
index 7ad1c8916..3452d9855 100644
--- a/src/lib-sieve/sieve-code.c
+++ b/src/lib-sieve/sieve-code.c
@@ -264,9 +264,9 @@ const struct sieve_operand_class omitted_class =
 	{ "OMITTED" };
 
 const struct sieve_operand_def omitted_operand = {
-	"@OMITTED",
-	NULL, SIEVE_OPERAND_OPTIONAL,
-	&omitted_class, NULL
+	.name = "@OMITTED",
+	.code = SIEVE_OPERAND_OPTIONAL,
+	.class = &omitted_class
 };
 
 /* Number */
@@ -287,10 +287,10 @@ const struct sieve_operand_class number_class =
 	{ "number" };
 
 const struct sieve_operand_def number_operand = {
-	"@number",
-	NULL, SIEVE_OPERAND_NUMBER,
-	&number_class,
-	&number_interface
+	.name = "@number",
+	.code = SIEVE_OPERAND_NUMBER,
+	.class = &number_class,
+	.interface = &number_interface
 };
 
 /* String */
@@ -311,10 +311,10 @@ const struct sieve_operand_class string_class =
 	{ "string" };
 
 const struct sieve_operand_def string_operand = {
-	"@string",
-	NULL, SIEVE_OPERAND_STRING,
-	&string_class,
-	&string_interface
+	.name = "@string",
+	.code = SIEVE_OPERAND_STRING,
+	.class = &string_class,
+	.interface = &string_interface
 };
 
 /* String List */
@@ -335,10 +335,10 @@ const struct sieve_operand_class stringlist_class =
 	{ "string-list" };
 
 const struct sieve_operand_def stringlist_operand =	{
-	"@string-list",
-	NULL, SIEVE_OPERAND_STRING_LIST,
-	&stringlist_class,
-	&stringlist_interface
+	.name = "@string-list",
+	.code = SIEVE_OPERAND_STRING_LIST,
+	.class = &stringlist_class,
+	.interface = &stringlist_interface
 };
 
 /* Catenated String */
@@ -356,10 +356,10 @@ const struct sieve_opr_string_interface catenated_string_interface = {
 };
 
 const struct sieve_operand_def catenated_string_operand = {
-	"@catenated-string",
-	NULL, SIEVE_OPERAND_CATENATED_STRING,
-	&string_class,
-	&catenated_string_interface
+	.name = "@catenated-string",
+	.code = SIEVE_OPERAND_CATENATED_STRING,
+	.class = &string_class,
+	.interface = &catenated_string_interface
 };
 
 /*
@@ -1009,27 +1009,24 @@ static int opc_jmpfalse_execute
 /* Operation objects defined in this file */
 
 const struct sieve_operation_def sieve_jmp_operation = {
-	"JMP",
-	NULL,
-	SIEVE_OPERATION_JMP,
-	opc_jmp_dump,
-	opc_jmp_execute
+	.mnemonic = "JMP",
+	.code = SIEVE_OPERATION_JMP,
+	.dump = opc_jmp_dump,
+	.execute = opc_jmp_execute
 };
 
 const struct sieve_operation_def sieve_jmptrue_operation = {
-	"JMPTRUE",
-	NULL,
-	SIEVE_OPERATION_JMPTRUE,
-	opc_jmp_dump,
-	opc_jmptrue_execute
+	.mnemonic = "JMPTRUE",
+	.code = SIEVE_OPERATION_JMPTRUE,
+	.dump = opc_jmp_dump,
+	.execute = opc_jmptrue_execute
 };
 
 const struct sieve_operation_def sieve_jmpfalse_operation = {
-	"JMPFALSE",
-	NULL,
-	SIEVE_OPERATION_JMPFALSE,
-	opc_jmp_dump,
-	opc_jmpfalse_execute
+	.mnemonic = "JMPFALSE",
+	.code = SIEVE_OPERATION_JMPFALSE,
+	.dump = opc_jmp_dump,
+	.execute = opc_jmpfalse_execute
 };
 
 /* Operation objects defined in other files */
diff --git a/src/lib-sieve/sieve-comparators.c b/src/lib-sieve/sieve-comparators.c
index 3245502c5..abac48e2d 100644
--- a/src/lib-sieve/sieve-comparators.c
+++ b/src/lib-sieve/sieve-comparators.c
@@ -237,11 +237,10 @@ static const struct sieve_extension_objects core_comparators =
 	SIEVE_EXT_DEFINE_COMPARATORS(sieve_core_comparators);
 
 const struct sieve_operand_def comparator_operand = {
-	"comparator",
-	NULL,
-	SIEVE_OPERAND_COMPARATOR,
-	&sieve_comparator_operand_class,
-	&core_comparators
+	.name = "comparator",
+	.code = SIEVE_OPERAND_COMPARATOR,
+	.class = &sieve_comparator_operand_class,
+	.interface = &core_comparators
 };
 
 /*
diff --git a/src/lib-sieve/sieve-match-types.c b/src/lib-sieve/sieve-match-types.c
index d3311663c..d9ceb977a 100644
--- a/src/lib-sieve/sieve-match-types.c
+++ b/src/lib-sieve/sieve-match-types.c
@@ -536,11 +536,10 @@ static const struct sieve_extension_objects core_match_types =
 	SIEVE_EXT_DEFINE_MATCH_TYPES(sieve_core_match_types);
 
 const struct sieve_operand_def match_type_operand = {
-	"match-type",
-	NULL,
-	SIEVE_OPERAND_MATCH_TYPE,
-	&sieve_match_type_operand_class,
-	&core_match_types
+	.name = "match-type",
+	.code = SIEVE_OPERAND_MATCH_TYPE,
+	.class = &sieve_match_type_operand_class,
+	.interface = &core_match_types
 };
 
 /*
diff --git a/src/lib-sieve/tst-address.c b/src/lib-sieve/tst-address.c
index 93ac31160..71cff370d 100644
--- a/src/lib-sieve/tst-address.c
+++ b/src/lib-sieve/tst-address.c
@@ -59,11 +59,10 @@ static int tst_address_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def tst_address_operation = {
-	"ADDRESS",
-	NULL,
-	SIEVE_OPERATION_ADDRESS,
-	tst_address_operation_dump,
-	tst_address_operation_execute
+	.mnemonic = "ADDRESS",
+	.code = SIEVE_OPERATION_ADDRESS,
+	.dump = tst_address_operation_dump,
+	.execute = tst_address_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/tst-exists.c b/src/lib-sieve/tst-exists.c
index faa54dcab..a5892f288 100644
--- a/src/lib-sieve/tst-exists.c
+++ b/src/lib-sieve/tst-exists.c
@@ -47,11 +47,10 @@ static int tst_exists_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def tst_exists_operation = {
-	"EXISTS",
-	NULL,
-	SIEVE_OPERATION_EXISTS,
-	tst_exists_operation_dump,
-	tst_exists_operation_execute
+	.mnemonic = "EXISTS",
+	.code = SIEVE_OPERATION_EXISTS,
+	.dump = tst_exists_operation_dump,
+	.execute = tst_exists_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/tst-header.c b/src/lib-sieve/tst-header.c
index 3803ac821..64b991c43 100644
--- a/src/lib-sieve/tst-header.c
+++ b/src/lib-sieve/tst-header.c
@@ -54,11 +54,10 @@ static int tst_header_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def tst_header_operation = {
-	"HEADER",
-	NULL,
-	SIEVE_OPERATION_HEADER,
-	tst_header_operation_dump,
-	tst_header_operation_execute
+	.mnemonic = "HEADER",
+	.code = SIEVE_OPERATION_HEADER,
+	.dump = tst_header_operation_dump,
+	.execute = tst_header_operation_execute
 };
 
 /*
diff --git a/src/lib-sieve/tst-size.c b/src/lib-sieve/tst-size.c
index 5dea2b95c..9e1eff20f 100644
--- a/src/lib-sieve/tst-size.c
+++ b/src/lib-sieve/tst-size.c
@@ -53,19 +53,17 @@ static int tst_size_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def tst_size_over_operation = {
-	"SIZE-OVER",
-	NULL,
-	SIEVE_OPERATION_SIZE_OVER,
-	tst_size_operation_dump,
-	tst_size_operation_execute
+	.mnemonic = "SIZE-OVER",
+	.code = SIEVE_OPERATION_SIZE_OVER,
+	.dump = tst_size_operation_dump,
+	.execute = tst_size_operation_execute
 };
 
 const struct sieve_operation_def tst_size_under_operation = {
-	"SIZE-UNDER",
-	NULL,
-	SIEVE_OPERATION_SIZE_UNDER,
-	tst_size_operation_dump,
-	tst_size_operation_execute
+	.mnemonic = "SIZE-UNDER",
+	.code = SIEVE_OPERATION_SIZE_UNDER,
+	.dump = tst_size_operation_dump,
+	.execute = tst_size_operation_execute
 };
 
 /*
diff --git a/src/plugins/sieve-extprograms/cmd-execute.c b/src/plugins/sieve-extprograms/cmd-execute.c
index 0691bed24..6c1fb6daf 100644
--- a/src/plugins/sieve-extprograms/cmd-execute.c
+++ b/src/plugins/sieve-extprograms/cmd-execute.c
@@ -98,10 +98,10 @@ static int cmd_execute_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def cmd_execute_operation = { 
-	"EXECUTE", &vnd_execute_extension, 
-	0,
-	cmd_execute_operation_dump, 
-	cmd_execute_operation_execute
+	.mnemonic = "EXECUTE",
+	.ext_def = &vnd_execute_extension, 
+	.dump = cmd_execute_operation_dump, 
+	.execute = cmd_execute_operation_execute
 };
 
 /* Codes for optional operands */
diff --git a/src/plugins/sieve-extprograms/cmd-filter.c b/src/plugins/sieve-extprograms/cmd-filter.c
index 54e991f1c..306cad8ab 100644
--- a/src/plugins/sieve-extprograms/cmd-filter.c
+++ b/src/plugins/sieve-extprograms/cmd-filter.c
@@ -61,10 +61,10 @@ static int cmd_filter_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def cmd_filter_operation = { 
-	"FILTER", &vnd_filter_extension, 
-	0,
-	cmd_filter_operation_dump, 
-	cmd_filter_operation_execute
+	.mnemonic = "FILTER",
+	.ext_def = &vnd_filter_extension, 
+	.dump = cmd_filter_operation_dump, 
+	.execute = cmd_filter_operation_execute
 };
 
 /*
diff --git a/src/plugins/sieve-extprograms/cmd-pipe.c b/src/plugins/sieve-extprograms/cmd-pipe.c
index 14857e102..491a0c2a3 100644
--- a/src/plugins/sieve-extprograms/cmd-pipe.c
+++ b/src/plugins/sieve-extprograms/cmd-pipe.c
@@ -65,9 +65,10 @@ static int cmd_pipe_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def cmd_pipe_operation = { 
-	"PIPE", &vnd_pipe_extension, 0,
-	cmd_pipe_operation_dump, 
-	cmd_pipe_operation_execute
+	.mnemonic = "PIPE",
+	.ext_def = &vnd_pipe_extension,
+	.dump = cmd_pipe_operation_dump, 
+	.execute = cmd_pipe_operation_execute
 };
 
 /* Codes for optional operands */
diff --git a/src/testsuite/cmd-test-binary.c b/src/testsuite/cmd-test-binary.c
index 2f42fcd97..104226a12 100644
--- a/src/testsuite/cmd-test-binary.c
+++ b/src/testsuite/cmd-test-binary.c
@@ -69,21 +69,21 @@ static int cmd_test_binary_operation_execute
 /* test_binary_create operation */
 
 const struct sieve_operation_def test_binary_load_operation = {
-	"TEST_BINARY_LOAD",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_BINARY_LOAD,
-	cmd_test_binary_operation_dump,
-	cmd_test_binary_operation_execute
+	.mnemonic = "TEST_BINARY_LOAD",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_BINARY_LOAD,
+	.dump = cmd_test_binary_operation_dump,
+	.execute = cmd_test_binary_operation_execute
 };
 
 /* test_binary_delete operation */
 
 const struct sieve_operation_def test_binary_save_operation = {
-	"TEST_BINARY_SAVE",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_BINARY_SAVE,
-	cmd_test_binary_operation_dump,
-	cmd_test_binary_operation_execute
+	.mnemonic = "TEST_BINARY_SAVE",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_BINARY_SAVE,
+	.dump = cmd_test_binary_operation_dump,
+	.execute = cmd_test_binary_operation_execute
 };
 
 /*
diff --git a/src/testsuite/cmd-test-config.c b/src/testsuite/cmd-test-config.c
index c3219d5b1..b8aa7f4e0 100644
--- a/src/testsuite/cmd-test-config.c
+++ b/src/testsuite/cmd-test-config.c
@@ -119,11 +119,11 @@ static int cmd_test_config_set_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_config_set_operation = {
-	"TEST_CONFIG_SET",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_CONFIG_SET,
-	cmd_test_config_set_operation_dump,
-	cmd_test_config_set_operation_execute
+	.mnemonic = "TEST_CONFIG_SET",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_CONFIG_SET,
+	.dump = cmd_test_config_set_operation_dump,
+	.execute = cmd_test_config_set_operation_execute
 };
 
 /* Test_config_unset operation */
@@ -134,11 +134,11 @@ static int cmd_test_config_unset_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_config_unset_operation = {
-	"TEST_CONFIG_UNSET",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_CONFIG_UNSET,
-	cmd_test_config_unset_operation_dump,
-	cmd_test_config_unset_operation_execute
+	.mnemonic = "TEST_CONFIG_UNSET",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_CONFIG_UNSET,
+	.dump = cmd_test_config_unset_operation_dump,
+	.execute = cmd_test_config_unset_operation_execute
 };
 
 /* Test_config_read operation */
@@ -149,11 +149,11 @@ static int cmd_test_config_reload_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_config_reload_operation = {
-	"TEST_CONFIG_RELOAD",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_CONFIG_RELOAD,
-	cmd_test_config_reload_operation_dump,
-	cmd_test_config_reload_operation_execute
+	.mnemonic = "TEST_CONFIG_RELOAD",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_CONFIG_RELOAD,
+	.dump = cmd_test_config_reload_operation_dump,
+	.execute = cmd_test_config_reload_operation_execute
 };
 
 /*
diff --git a/src/testsuite/cmd-test-fail.c b/src/testsuite/cmd-test-fail.c
index 52695852f..4c3a2d78c 100644
--- a/src/testsuite/cmd-test-fail.c
+++ b/src/testsuite/cmd-test-fail.c
@@ -45,11 +45,11 @@ static int cmd_test_fail_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_fail_operation = {
-	"TEST_FAIL",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_FAIL,
-	cmd_test_fail_operation_dump,
-	cmd_test_fail_operation_execute
+	.mnemonic = "TEST_FAIL",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_FAIL,
+	.dump = cmd_test_fail_operation_dump,
+	.execute = cmd_test_fail_operation_execute
 };
 
 /*
diff --git a/src/testsuite/cmd-test-imap-metadata.c b/src/testsuite/cmd-test-imap-metadata.c
index 309d5c4e1..ad0a8f013 100644
--- a/src/testsuite/cmd-test-imap-metadata.c
+++ b/src/testsuite/cmd-test-imap-metadata.c
@@ -69,11 +69,11 @@ static int cmd_test_imap_metadata_operation_execute
 /* Test_mailbox_create operation */
 
 const struct sieve_operation_def test_imap_metadata_set_operation = {
-	"TEST_IMAP_METADATA_SET",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_IMAP_METADATA_SET,
-	cmd_test_imap_metadata_operation_dump,
-	cmd_test_imap_metadata_operation_execute
+	.mnemonic = "TEST_IMAP_METADATA_SET",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_IMAP_METADATA_SET,
+	.dump = cmd_test_imap_metadata_operation_dump,
+	.execute = cmd_test_imap_metadata_operation_execute
 };
 
 /* Codes for optional arguments */
diff --git a/src/testsuite/cmd-test-mailbox.c b/src/testsuite/cmd-test-mailbox.c
index f392f4549..48db0e41f 100644
--- a/src/testsuite/cmd-test-mailbox.c
+++ b/src/testsuite/cmd-test-mailbox.c
@@ -68,21 +68,21 @@ static int cmd_test_mailbox_operation_execute
 /* Test_mailbox_create operation */
 
 const struct sieve_operation_def test_mailbox_create_operation = {
-	"TEST_MAILBOX_CREATE",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_MAILBOX_CREATE,
-	cmd_test_mailbox_operation_dump,
-	cmd_test_mailbox_operation_execute
+	.mnemonic = "TEST_MAILBOX_CREATE",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_MAILBOX_CREATE,
+	.dump = cmd_test_mailbox_operation_dump,
+	.execute = cmd_test_mailbox_operation_execute
 };
 
 /* Test_mailbox_delete operation */
 
 const struct sieve_operation_def test_mailbox_delete_operation = {
-	"TEST_MAILBOX_DELETE",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_MAILBOX_DELETE,
-	cmd_test_mailbox_operation_dump,
-	cmd_test_mailbox_operation_execute
+	.mnemonic = "TEST_MAILBOX_DELETE",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_MAILBOX_DELETE,
+	.dump = cmd_test_mailbox_operation_dump,
+	.execute = cmd_test_mailbox_operation_execute
 };
 
 /*
diff --git a/src/testsuite/cmd-test-message.c b/src/testsuite/cmd-test-message.c
index 2f6ce2518..2ed75bc35 100644
--- a/src/testsuite/cmd-test-message.c
+++ b/src/testsuite/cmd-test-message.c
@@ -80,11 +80,11 @@ static int cmd_test_message_smtp_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_message_smtp_operation = {
-	"TEST_MESSAGE_SMTP",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_MESSAGE_SMTP,
-	cmd_test_message_smtp_operation_dump,
-	cmd_test_message_smtp_operation_execute
+	.mnemonic = "TEST_MESSAGE_SMTP",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_MESSAGE_SMTP,
+	.dump = cmd_test_message_smtp_operation_dump,
+	.execute = cmd_test_message_smtp_operation_execute
 };
 
 /* Test_message_mailbox operation */
@@ -95,11 +95,11 @@ static int cmd_test_message_mailbox_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_message_mailbox_operation = {
-	"TEST_MESSAGE_MAILBOX",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_MESSAGE_MAILBOX,
-	cmd_test_message_mailbox_operation_dump,
-	cmd_test_message_mailbox_operation_execute
+	.mnemonic = "TEST_MESSAGE_MAILBOX",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_MESSAGE_MAILBOX,
+	.dump = cmd_test_message_mailbox_operation_dump,
+	.execute = cmd_test_message_mailbox_operation_execute
 };
 
 /* Test_message_print operation */
@@ -110,11 +110,11 @@ static int cmd_test_message_print_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_message_print_operation = {
-	"TEST_MESSAGE_PRINT",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_MESSAGE_PRINT,
-	cmd_test_message_print_operation_dump,
-	cmd_test_message_print_operation_execute
+	.mnemonic = "TEST_MESSAGE_PRINT",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_MESSAGE_PRINT,
+	.dump = cmd_test_message_print_operation_dump,
+	.execute = cmd_test_message_print_operation_execute
 };
 
 /*
diff --git a/src/testsuite/cmd-test-result.c b/src/testsuite/cmd-test-result.c
index 3bfdfaa57..cc3721c2d 100644
--- a/src/testsuite/cmd-test-result.c
+++ b/src/testsuite/cmd-test-result.c
@@ -65,11 +65,10 @@ static int cmd_test_result_reset_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_result_reset_operation = {
-	"TEST_RESULT_RESET",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_RESULT_RESET,
-	NULL,
-	cmd_test_result_reset_operation_execute
+	.mnemonic = "TEST_RESULT_RESET",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_RESULT_RESET,
+	.execute = cmd_test_result_reset_operation_execute
 };
 
 /* test_result_print */
@@ -78,11 +77,10 @@ static int cmd_test_result_print_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_result_print_operation = {
-	"TEST_RESULT_PRINT",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_RESULT_PRINT,
-	NULL,
-	cmd_test_result_print_operation_execute
+	.mnemonic = "TEST_RESULT_PRINT",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_RESULT_PRINT,
+	.execute = cmd_test_result_print_operation_execute
 };
 
 /*
diff --git a/src/testsuite/cmd-test-set.c b/src/testsuite/cmd-test-set.c
index d1eccc724..7aa8a9313 100644
--- a/src/testsuite/cmd-test-set.c
+++ b/src/testsuite/cmd-test-set.c
@@ -55,11 +55,11 @@ static int cmd_test_set_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_set_operation = {
-	"TEST_SET",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_SET,
-	cmd_test_set_operation_dump,
-	cmd_test_set_operation_execute
+	.mnemonic = "TEST_SET",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_SET,
+	.dump = cmd_test_set_operation_dump,
+	.execute = cmd_test_set_operation_execute
 };
 
 /*
diff --git a/src/testsuite/cmd-test.c b/src/testsuite/cmd-test.c
index e5d96bf1c..c148bf100 100644
--- a/src/testsuite/cmd-test.c
+++ b/src/testsuite/cmd-test.c
@@ -47,11 +47,11 @@ static int cmd_test_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_operation = {
-	"TEST",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST,
-	cmd_test_operation_dump,
-	cmd_test_operation_execute
+	.mnemonic = "TEST",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST,
+	.dump = cmd_test_operation_dump,
+	.execute = cmd_test_operation_execute
 };
 
 /* Test_finish operation */
@@ -60,11 +60,10 @@ static int cmd_test_finish_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_finish_operation = {
-	"TEST-FINISH",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_FINISH,
-	NULL,
-	cmd_test_finish_operation_execute
+	.mnemonic = "TEST-FINISH",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_FINISH,
+	.execute = cmd_test_finish_operation_execute
 };
 
 /*
diff --git a/src/testsuite/testsuite-objects.c b/src/testsuite/testsuite-objects.c
index 7254873c1..5f403418b 100644
--- a/src/testsuite/testsuite-objects.c
+++ b/src/testsuite/testsuite-objects.c
@@ -102,11 +102,11 @@ static const struct sieve_extension_objects core_testsuite_objects =
 	SIEVE_EXT_DEFINE_OBJECTS(testsuite_core_objects);
 
 const struct sieve_operand_def testsuite_object_operand = {
-	"testsuite-object",
-	&testsuite_extension,
-	TESTSUITE_OPERAND_OBJECT,
-	&sieve_testsuite_object_operand_class,
-	&core_testsuite_objects
+	.name = "testsuite-object",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERAND_OBJECT,
+	.class = &sieve_testsuite_object_operand_class,
+	.interface = &core_testsuite_objects
 };
 
 static void testsuite_object_emit
diff --git a/src/testsuite/testsuite-substitutions.c b/src/testsuite/testsuite-substitutions.c
index 1619a7e9c..e3c768aeb 100644
--- a/src/testsuite/testsuite-substitutions.c
+++ b/src/testsuite/testsuite-substitutions.c
@@ -147,11 +147,11 @@ const struct sieve_opr_string_interface testsuite_substitution_interface = {
 };
 
 const struct sieve_operand_def testsuite_substitution_operand = {
-	"test-substitution",
-	&testsuite_extension,
-	TESTSUITE_OPERAND_SUBSTITUTION,
-	&string_class,
-	&testsuite_substitution_interface
+	.name = "test-substitution",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERAND_SUBSTITUTION,
+	.class = &string_class,
+	.interface = &testsuite_substitution_interface
 };
 
 void testsuite_opr_substitution_emit
diff --git a/src/testsuite/testsuite-variables.c b/src/testsuite/testsuite-variables.c
index 1413cd458..04a41fed2 100644
--- a/src/testsuite/testsuite-variables.c
+++ b/src/testsuite/testsuite-variables.c
@@ -166,11 +166,11 @@ static const struct sieve_extension_objects testsuite_namespaces =
 	SIEVE_VARIABLES_DEFINE_NAMESPACE(testsuite_namespace);
 
 const struct sieve_operand_def testsuite_namespace_operand = {
-	"testsuite-namespace",
-	&testsuite_extension,
-	TESTSUITE_OPERAND_NAMESPACE,
-	&sieve_variables_namespace_operand_class,
-	&testsuite_namespaces
+	.name = "testsuite-namespace",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERAND_NAMESPACE,
+	.class =  &sieve_variables_namespace_operand_class,
+	.interface = &testsuite_namespaces
 };
 
 void testsuite_variables_init
diff --git a/src/testsuite/tst-test-error.c b/src/testsuite/tst-test-error.c
index ba4918fc4..69a83c7f3 100644
--- a/src/testsuite/tst-test-error.c
+++ b/src/testsuite/tst-test-error.c
@@ -55,11 +55,11 @@ static int tst_test_error_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_error_operation = {
-	"TEST_ERROR",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_ERROR,
-	tst_test_error_operation_dump,
-	tst_test_error_operation_execute
+	.mnemonic = "TEST_ERROR",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_ERROR,
+	.dump = tst_test_error_operation_dump,
+	.execute = tst_test_error_operation_execute
 };
 
 /*
diff --git a/src/testsuite/tst-test-multiscript.c b/src/testsuite/tst-test-multiscript.c
index d8b9bfeef..6f093311a 100644
--- a/src/testsuite/tst-test-multiscript.c
+++ b/src/testsuite/tst-test-multiscript.c
@@ -49,11 +49,11 @@ static int tst_test_multiscript_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_multiscript_operation = {
-	"TEST_MULTISCRIPT",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_MULTISCRIPT,
-	tst_test_multiscript_operation_dump,
-	tst_test_multiscript_operation_execute
+	.mnemonic = "TEST_MULTISCRIPT",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_MULTISCRIPT,
+	.dump = tst_test_multiscript_operation_dump,
+	.execute = tst_test_multiscript_operation_execute
 };
 
 /*
diff --git a/src/testsuite/tst-test-result-action.c b/src/testsuite/tst-test-result-action.c
index a7cce73f4..a40726400 100644
--- a/src/testsuite/tst-test-result-action.c
+++ b/src/testsuite/tst-test-result-action.c
@@ -58,11 +58,11 @@ static int tst_test_result_action_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_result_action_operation = {
-	"TEST_RESULT_ACTION",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_RESULT_ACTION,
-	tst_test_result_action_operation_dump,
-	tst_test_result_action_operation_execute
+	.mnemonic = "TEST_RESULT_ACTION",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_RESULT_ACTION,
+	.dump = tst_test_result_action_operation_dump,
+	.execute = tst_test_result_action_operation_execute
 };
 
 /*
diff --git a/src/testsuite/tst-test-result-execute.c b/src/testsuite/tst-test-result-execute.c
index 2e5bb231d..56c5a7096 100644
--- a/src/testsuite/tst-test-result-execute.c
+++ b/src/testsuite/tst-test-result-execute.c
@@ -43,11 +43,10 @@ static int tst_test_result_execute_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_result_execute_operation = {
-	"TEST_RESULT_EXECUTE",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_RESULT_EXECUTE,
-	NULL,
-	tst_test_result_execute_operation_execute
+	.mnemonic = "TEST_RESULT_EXECUTE",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_RESULT_EXECUTE,
+	.execute = tst_test_result_execute_operation_execute
 };
 
 /*
diff --git a/src/testsuite/tst-test-script-compile.c b/src/testsuite/tst-test-script-compile.c
index 57f9a6955..5837653c1 100644
--- a/src/testsuite/tst-test-script-compile.c
+++ b/src/testsuite/tst-test-script-compile.c
@@ -48,11 +48,11 @@ static int tst_test_script_compile_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_script_compile_operation = {
-	"TEST_SCRIPT_COMPILE",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_SCRIPT_COMPILE,
-	tst_test_script_compile_operation_dump,
-	tst_test_script_compile_operation_execute
+	.mnemonic = "TEST_SCRIPT_COMPILE",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_SCRIPT_COMPILE,
+	.dump = tst_test_script_compile_operation_dump,
+	.execute = tst_test_script_compile_operation_execute
 };
 
 /*
diff --git a/src/testsuite/tst-test-script-run.c b/src/testsuite/tst-test-script-run.c
index d3f0bb54a..0aa592da9 100644
--- a/src/testsuite/tst-test-script-run.c
+++ b/src/testsuite/tst-test-script-run.c
@@ -50,11 +50,11 @@ static int tst_test_script_run_operation_execute
 	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 const struct sieve_operation_def test_script_run_operation = {
-	"test_script_run",
-	&testsuite_extension,
-	TESTSUITE_OPERATION_TEST_SCRIPT_RUN,
-	tst_test_script_run_operation_dump,
-	tst_test_script_run_operation_execute
+	.mnemonic = "TEST_SCRIPT_RUN",
+	.ext_def = &testsuite_extension,
+	.code = TESTSUITE_OPERATION_TEST_SCRIPT_RUN,
+	.dump = tst_test_script_run_operation_dump,
+	.execute = tst_test_script_run_operation_execute
 };
 
 /*
-- 
GitLab