Coverage Report

Created: 2026-06-15 06:45

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/pigeonhole/src/lib-sieve/plugins/environment/ext-environment.c
Line
Count
Source
1
/* Copyright (c) 2002-2018 Pigeonhole authors, see the included COPYING file
2
 */
3
4
/* Extension variables
5
 * -------------------
6
 *
7
 * Authors: Stephan Bosch
8
 * Specification: RFC 5183
9
 * Implementation: full
10
 * Status: testing
11
 *
12
 */
13
14
#include "lib.h"
15
#include "str.h"
16
#include "unichar.h"
17
18
#include "sieve-extensions.h"
19
#include "sieve-commands.h"
20
#include "sieve-binary.h"
21
#include "sieve-interpreter.h"
22
23
#include "sieve-validator.h"
24
25
#include "ext-environment-common.h"
26
27
/*
28
 * Extension
29
 */
30
31
static bool ext_environment_validator_load
32
  (const struct sieve_extension *ext, struct sieve_validator *valdtr);
33
static bool ext_environment_interpreter_load
34
(const struct sieve_extension *ext,
35
  const struct sieve_runtime_env *renv, sieve_size_t *address);
36
37
const struct sieve_extension_def environment_extension = {
38
  .name = "environment",
39
  .validator_load = ext_environment_validator_load,
40
  .interpreter_load = ext_environment_interpreter_load,
41
  SIEVE_EXT_DEFINE_OPERATION(tst_environment_operation)
42
};
43
44
static bool ext_environment_validator_load
45
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
46
0
{
47
0
  sieve_validator_register_command(valdtr, ext, &tst_environment);
48
0
  return TRUE;
49
0
}
50
51
static bool ext_environment_interpreter_load
52
(const struct sieve_extension *ext,
53
  const struct sieve_runtime_env *renv,
54
  sieve_size_t *address ATTR_UNUSED)
55
0
{
56
0
  ext_environment_interpreter_init(ext, renv->interp);
57
0
  return TRUE;
58
0
}
59