1
/* Copyright (c) 2002-2009 Dovecot Sieve authors, see the included COPYING file
5
#include "sieve-validator.h"
6
#include "sieve-generator.h"
7
#include "sieve-binary.h"
9
#include "sieve-commands.h"
10
#include "sieve-code.h"
11
#include "sieve-interpreter.h"
14
* True/False test command
17
static bool tst_false_generate
18
(const struct sieve_codegen_env *cgenv, struct sieve_command_context *cmd,
19
struct sieve_jumplist *jumps, bool jump_true);
20
static bool tst_true_generate
21
(const struct sieve_codegen_env *cgenv, struct sieve_command_context *cmd,
22
struct sieve_jumplist *jumps, bool jump_true);
24
const struct sieve_command tst_false = {
28
NULL, NULL, NULL, NULL,
32
const struct sieve_command tst_true = {
36
NULL, NULL, NULL, NULL,
40
static bool tst_false_generate
41
(const struct sieve_codegen_env *cgenv,
42
struct sieve_command_context *cmd ATTR_UNUSED,
43
struct sieve_jumplist *jumps, bool jump_true)
46
sieve_operation_emit_code(cgenv->sbin, &sieve_jmp_operation);
47
sieve_jumplist_add(jumps, sieve_binary_emit_offset(cgenv->sbin, 0));
53
static bool tst_true_generate
54
(const struct sieve_codegen_env *cgenv,
55
struct sieve_command_context *cmd ATTR_UNUSED,
56
struct sieve_jumplist *jumps, bool jump_true)
59
sieve_operation_emit_code(cgenv->sbin, &sieve_jmp_operation);
60
sieve_jumplist_add(jumps, sieve_binary_emit_offset(cgenv->sbin, 0));