Skip to content
Snippets Groups Projects
Commit aa1e0640 authored by Stephan Bosch's avatar Stephan Bosch Committed by Karl Fleischmann
Browse files

lib-sieve: plugins: include: Reformat ext-include.c.

parent 6d1be239
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.