From aa1e0640f5384695ffec4b2f604dab6a8a8c6d91 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@open-xchange.com>
Date: Mon, 12 Oct 2020 20:52:32 +0200
Subject: [PATCH] lib-sieve: plugins: include: Reformat ext-include.c.

---
 src/lib-sieve/plugins/include/ext-include.c | 52 ++++++++++++---------
 1 file changed, 30 insertions(+), 22 deletions(-)

diff --git a/src/lib-sieve/plugins/include/ext-include.c b/src/lib-sieve/plugins/include/ext-include.c
index 0a3868784..0c22467c2 100644
--- a/src/lib-sieve/plugins/include/ext-include.c
+++ b/src/lib-sieve/plugins/include/ext-include.c
@@ -12,8 +12,8 @@
  */
 
 /* FIXME: Current include implementation does not allow for parts of the script
- * to be located in external binaries; all included scripts are recompiled and
- * the resulting byte code is imported into the main binary in separate blocks.
+   to be located in external binaries; all included scripts are recompiled and
+   the resulting byte code is imported into the main binary in separate blocks.
  */
 
 #include "lib.h"
@@ -40,7 +40,7 @@
 static const struct sieve_operation_def *ext_include_operations[] = {
 	&include_operation,
 	&return_operation,
-	&global_operation
+	&global_operation,
 };
 
 /*
@@ -49,15 +49,19 @@ static const struct sieve_operation_def *ext_include_operations[] = {
 
 /* Forward declaration */
 
-static bool ext_include_validator_load
-	(const struct sieve_extension *ext, struct sieve_validator *validator);
-static bool ext_include_generator_load
-	(const struct sieve_extension *ext, const struct sieve_codegen_env *cgenv);
-static bool ext_include_interpreter_load
-	(const struct sieve_extension *ext, const struct sieve_runtime_env *renv,
-		sieve_size_t *address);
-static bool ext_include_binary_load
-	(const struct sieve_extension *ext, struct sieve_binary *binary);
+static bool
+ext_include_validator_load(const struct sieve_extension *ext,
+			   struct sieve_validator *validator);
+static bool
+ext_include_generator_load(const struct sieve_extension *ext,
+			   const struct sieve_codegen_env *cgenv);
+static bool
+ext_include_interpreter_load(const struct sieve_extension *ext,
+			     const struct sieve_runtime_env *renv,
+			     sieve_size_t *address);
+static bool
+ext_include_binary_load(const struct sieve_extension *ext,
+			struct sieve_binary *binary);
 
 /* Extension objects */
 
@@ -74,11 +78,12 @@ const struct sieve_extension_def include_extension = {
 	.binary_dump = ext_include_binary_dump,
 	.code_dump = ext_include_code_dump,
 
-	SIEVE_EXT_DEFINE_OPERATIONS(ext_include_operations)
+	SIEVE_EXT_DEFINE_OPERATIONS(ext_include_operations),
 };
 
-static bool ext_include_validator_load
-(const struct sieve_extension *ext, struct sieve_validator *valdtr)
+static bool
+ext_include_validator_load(const struct sieve_extension *ext,
+			   struct sieve_validator *valdtr)
 {
 	/* Register new commands */
 	sieve_validator_register_command(valdtr, ext, &cmd_include);
@@ -95,25 +100,28 @@ static bool ext_include_validator_load
 	return TRUE;
 }
 
-static bool ext_include_generator_load
-(const struct sieve_extension *ext, const struct sieve_codegen_env *cgenv)
+static bool
+ext_include_generator_load(const struct sieve_extension *ext,
+			   const struct sieve_codegen_env *cgenv)
 {
 	ext_include_register_generator_context(ext, cgenv);
 
 	return TRUE;
 }
 
-static bool ext_include_interpreter_load
-(const struct sieve_extension *ext, const struct sieve_runtime_env *renv,
-	sieve_size_t *address ATTR_UNUSED)
+static bool
+ext_include_interpreter_load(const struct sieve_extension *ext,
+			     const struct sieve_runtime_env *renv,
+			     sieve_size_t *address ATTR_UNUSED)
 {
 	ext_include_interpreter_context_init(ext, renv->interp);
 
 	return TRUE;
 }
 
-static bool ext_include_binary_load
-(const struct sieve_extension *ext, struct sieve_binary *sbin)
+static bool
+ext_include_binary_load(const struct sieve_extension *ext,
+			struct sieve_binary *sbin)
 {
 	(void)ext_include_binary_get_context(ext, sbin);
 
-- 
GitLab