/src/pigeonhole/src/lib-sieve/sieve-binary.h
Line | Count | Source |
1 | | #ifndef SIEVE_BINARY_H |
2 | | #define SIEVE_BINARY_H |
3 | | |
4 | | #include "lib.h" |
5 | | |
6 | | #include "sieve-common.h" |
7 | | |
8 | | /* |
9 | | * Config |
10 | | */ |
11 | | |
12 | 0 | #define SIEVE_BINARY_VERSION_MAJOR 3 |
13 | 0 | #define SIEVE_BINARY_VERSION_MINOR 0 |
14 | | |
15 | 0 | #define SIEVE_BINARY_BASE_HEADER_SIZE 20 |
16 | | |
17 | | /* |
18 | | * Binary object |
19 | | */ |
20 | | |
21 | | struct sieve_binary; |
22 | | |
23 | | struct sieve_binary *sieve_binary_create_new(struct sieve_script *script); |
24 | | void sieve_binary_ref(struct sieve_binary *sbin); |
25 | | void sieve_binary_unref(struct sieve_binary **_sbin); |
26 | | |
27 | | void sieve_binary_close(struct sieve_binary **_sbin); |
28 | | |
29 | | /* |
30 | | * Resource usage |
31 | | */ |
32 | | |
33 | | void sieve_binary_get_resource_usage(struct sieve_binary *sbin, |
34 | | struct sieve_resource_usage *rusage_r); |
35 | | bool sieve_binary_record_resource_usage( |
36 | | struct sieve_binary *sbin, const struct sieve_resource_usage *rusage) |
37 | | ATTR_NULL(1); |
38 | | void sieve_binary_set_resource_usage(struct sieve_binary *sbin, |
39 | | const struct sieve_resource_usage *rusage); |
40 | | |
41 | | /* Apply persisted per-user rusage and limit flag from sieve-rusage file |
42 | | into the binary header. No-op when the storage has no per-user file. */ |
43 | | void sieve_binary_apply_persisted_rusage(struct sieve_binary *sbin); |
44 | | |
45 | | /* |
46 | | * Accessors |
47 | | */ |
48 | | |
49 | | pool_t sieve_binary_pool(struct sieve_binary *sbin); |
50 | | struct sieve_instance *sieve_binary_svinst(struct sieve_binary *sbin); |
51 | | const char *sieve_binary_path(struct sieve_binary *sbin); |
52 | | struct sieve_script *sieve_binary_script(struct sieve_binary *sbin); |
53 | | |
54 | | time_t sieve_binary_mtime(struct sieve_binary *sbin); |
55 | | const struct stat *sieve_binary_stat(struct sieve_binary *sbin); |
56 | | |
57 | | const char *sieve_binary_script_name(struct sieve_binary *sbin); |
58 | | const char *sieve_binary_script_location(struct sieve_binary *sbin); |
59 | | |
60 | | const char *sieve_binary_source(struct sieve_binary *sbin); |
61 | | bool sieve_binary_loaded(struct sieve_binary *sbin); |
62 | | bool sieve_binary_saved(struct sieve_binary *sbin); |
63 | | |
64 | | /* |
65 | | * Utility |
66 | | */ |
67 | | |
68 | | const char *sieve_binfile_from_name(const char *name); |
69 | | |
70 | | /* |
71 | | * Activation after code generation |
72 | | */ |
73 | | |
74 | | void sieve_binary_activate(struct sieve_binary *sbin); |
75 | | |
76 | | /* |
77 | | * Saving the binary |
78 | | */ |
79 | | |
80 | | int sieve_binary_save(struct sieve_binary *sbin, const char *path, bool update, |
81 | | mode_t save_mode, enum sieve_error *error_code_r); |
82 | | |
83 | | /* |
84 | | * Loading the binary |
85 | | */ |
86 | | |
87 | | int sieve_binary_open(struct sieve_instance *svinst, const char *path, |
88 | | struct sieve_script *script, struct sieve_binary **sbin_r, |
89 | | enum sieve_error *error_code_r); |
90 | | bool sieve_binary_up_to_date(struct sieve_binary *sbin, |
91 | | enum sieve_compile_flags cpflags); |
92 | | |
93 | | int sieve_binary_check_executable(struct sieve_binary *sbin, |
94 | | enum sieve_error *error_code_r, |
95 | | const char **client_error_r); |
96 | | |
97 | | /* |
98 | | * Block management |
99 | | */ |
100 | | |
101 | | enum sieve_binary_system_block { |
102 | | SBIN_SYSBLOCK_SCRIPT_DATA, |
103 | | SBIN_SYSBLOCK_EXTENSIONS, |
104 | | SBIN_SYSBLOCK_MAIN_PROGRAM, |
105 | | SBIN_SYSBLOCK_LAST |
106 | | }; |
107 | | |
108 | | struct sieve_binary_block *sieve_binary_block_create(struct sieve_binary *sbin); |
109 | | |
110 | | unsigned int sieve_binary_block_count(struct sieve_binary *sbin); |
111 | | |
112 | | struct sieve_binary_block * |
113 | | sieve_binary_block_get(struct sieve_binary *sbin, unsigned int id); |
114 | | |
115 | | void sieve_binary_block_clear(struct sieve_binary_block *sblock); |
116 | | |
117 | | size_t sieve_binary_block_get_size(const struct sieve_binary_block *sblock); |
118 | | |
119 | | struct sieve_binary * |
120 | | sieve_binary_block_get_binary(const struct sieve_binary_block *sblock); |
121 | | |
122 | | unsigned int sieve_binary_block_get_id(const struct sieve_binary_block *sblock); |
123 | | |
124 | | /* |
125 | | * Extension support |
126 | | */ |
127 | | |
128 | | struct sieve_binary_extension { |
129 | | const struct sieve_extension_def *extension; |
130 | | |
131 | | bool (*binary_pre_save)(const struct sieve_extension *ext, |
132 | | struct sieve_binary *sbin, void *context, |
133 | | enum sieve_error *error_code_r); |
134 | | bool (*binary_post_save)(const struct sieve_extension *ext, |
135 | | struct sieve_binary *sbin, void *context, |
136 | | enum sieve_error *error_code_r); |
137 | | bool (*binary_open)(const struct sieve_extension *ext, |
138 | | struct sieve_binary *sbin, void *context); |
139 | | |
140 | | void (*binary_free)(const struct sieve_extension *ext, |
141 | | struct sieve_binary *sbin, void *context); |
142 | | |
143 | | bool (*binary_up_to_date)(const struct sieve_extension *ext, |
144 | | struct sieve_binary *sbin, void *context, |
145 | | enum sieve_compile_flags cpflags); |
146 | | }; |
147 | | |
148 | | void sieve_binary_extension_set_context(struct sieve_binary *sbin, |
149 | | const struct sieve_extension *ext, |
150 | | void *context); |
151 | | const void * |
152 | | sieve_binary_extension_get_context(struct sieve_binary *sbin, |
153 | | const struct sieve_extension *ext); |
154 | | |
155 | | void sieve_binary_extension_set(struct sieve_binary *sbin, |
156 | | const struct sieve_extension *ext, |
157 | | const struct sieve_binary_extension *bext, |
158 | | void *context); |
159 | | |
160 | | struct sieve_binary_block * |
161 | | sieve_binary_extension_create_block(struct sieve_binary *sbin, |
162 | | const struct sieve_extension *ext); |
163 | | struct sieve_binary_block * |
164 | | sieve_binary_extension_get_block(struct sieve_binary *sbin, |
165 | | const struct sieve_extension *ext); |
166 | | |
167 | | int sieve_binary_extension_link(struct sieve_binary *sbin, |
168 | | const struct sieve_extension *ext); |
169 | | const struct sieve_extension * |
170 | | sieve_binary_extension_get_by_index(struct sieve_binary *sbin, int index); |
171 | | int sieve_binary_extension_get_index(struct sieve_binary *sbin, |
172 | | const struct sieve_extension *ext); |
173 | | int sieve_binary_extensions_count(struct sieve_binary *sbin); |
174 | | |
175 | | /* |
176 | | * Code emission |
177 | | */ |
178 | | |
179 | | /* Low-level emission functions */ |
180 | | |
181 | | sieve_size_t sieve_binary_emit_data(struct sieve_binary_block *sblock, |
182 | | const void *data, sieve_size_t size); |
183 | | sieve_size_t sieve_binary_emit_byte(struct sieve_binary_block *sblock, |
184 | | uint8_t byte); |
185 | | void sieve_binary_update_data(struct sieve_binary_block *sblock, |
186 | | sieve_size_t address, const void *data, |
187 | | sieve_size_t size); |
188 | | |
189 | | /* Offset emission functions */ |
190 | | |
191 | | sieve_size_t sieve_binary_emit_offset(struct sieve_binary_block *sblock, |
192 | | sieve_offset_t offset); |
193 | | void sieve_binary_resolve_offset(struct sieve_binary_block *sblock, |
194 | | sieve_size_t address); |
195 | | |
196 | | /* Literal emission functions */ |
197 | | |
198 | | sieve_size_t sieve_binary_emit_integer(struct sieve_binary_block *sblock, |
199 | | sieve_number_t integer); |
200 | | sieve_size_t sieve_binary_emit_string(struct sieve_binary_block *sblock, |
201 | | const string_t *str); |
202 | | sieve_size_t sieve_binary_emit_cstring(struct sieve_binary_block *sblock, |
203 | | const char *str); |
204 | | |
205 | | static inline sieve_size_t |
206 | | sieve_binary_emit_unsigned(struct sieve_binary_block *sblock, |
207 | | unsigned int count) |
208 | 0 | { |
209 | 0 | return sieve_binary_emit_integer(sblock, count); |
210 | 0 | } Unexecuted instantiation: testsuite-common.c:sieve_binary_emit_unsigned Unexecuted instantiation: testsuite-objects.c:sieve_binary_emit_unsigned Unexecuted instantiation: testsuite-substitutions.c:sieve_binary_emit_unsigned Unexecuted instantiation: testsuite-variables.c:sieve_binary_emit_unsigned Unexecuted instantiation: testsuite-script.c:sieve_binary_emit_unsigned Unexecuted instantiation: testsuite-binary.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-test.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-test-fail.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-test-config.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-test-result.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-test-message.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-test-mailbox.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-test-binary.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-test-imap-metadata.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-test-script-compile.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-test-script-run.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-test-multiscript.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-test-error.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-test-result-action.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-test-result-execute.c:sieve_binary_emit_unsigned Unexecuted instantiation: fuzzsuite.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-script.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-binary.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-binary-file.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-binary-code.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-generator.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-interpreter.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-runtime-trace.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-code-dumper.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-binary-dumper.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-objects.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-comparators.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-match-types.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-address-parts.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-match.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-commands.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-code.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-actions.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-truefalse.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-anyof.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-allof.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-if.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-fileinto.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-reject.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-data-script.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-file-script.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-include.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-body.c:sieve_binary_emit_unsigned Unexecuted instantiation: tst-body.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-variables-namespaces.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-variables.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-environment.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-date.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-ihave.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-editheader.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-duplicate.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-index.c:sieve_binary_emit_unsigned Unexecuted instantiation: tag-index.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-metadata.c:sieve_binary_emit_unsigned Unexecuted instantiation: tag-mime.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-debug.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-vnd-environment.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-binary-debug.c:sieve_binary_emit_unsigned Unexecuted instantiation: sieve-dict-script.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-global.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-include.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-include-binary.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-include-common.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-include-variables.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-set.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-variables-common.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-variables-dump.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-variables-modifiers.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-variables-operands.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-error.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-ihave-binary.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-addheader.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-break.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-extracttext.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-foreverypart.c:sieve_binary_emit_unsigned Unexecuted instantiation: cmd-debug-log.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-vnd-environment-items.c:sieve_binary_emit_unsigned Unexecuted instantiation: ext-vnd-environment-variables.c:sieve_binary_emit_unsigned |
211 | | |
212 | | /* Extension emission functions */ |
213 | | |
214 | | sieve_size_t sieve_binary_emit_extension(struct sieve_binary_block *sblock, |
215 | | const struct sieve_extension *ext, |
216 | | unsigned int offset); |
217 | | void sieve_binary_emit_extension_object( |
218 | | struct sieve_binary_block *sblock, |
219 | | const struct sieve_extension_objects *objs, unsigned int code); |
220 | | |
221 | | /* |
222 | | * Code retrieval |
223 | | */ |
224 | | |
225 | | /* Literals */ |
226 | | |
227 | | bool sieve_binary_read_byte(struct sieve_binary_block *sblock, |
228 | | sieve_size_t *address, unsigned int *byte_r) |
229 | | ATTR_NULL(3); |
230 | | bool sieve_binary_read_code(struct sieve_binary_block *sblock, |
231 | | sieve_size_t *address, signed int *code_r) |
232 | | ATTR_NULL(3); |
233 | | bool sieve_binary_read_offset(struct sieve_binary_block *sblock, |
234 | | sieve_size_t *address, sieve_offset_t *offset_r) |
235 | | ATTR_NULL(3); |
236 | | bool sieve_binary_read_integer(struct sieve_binary_block *sblock, |
237 | | sieve_size_t *address, sieve_number_t *int_r) |
238 | | ATTR_NULL(3); |
239 | | bool sieve_binary_read_string(struct sieve_binary_block *sblock, |
240 | | sieve_size_t *address, string_t **str_r) |
241 | | ATTR_NULL(3); |
242 | | |
243 | | static inline bool ATTR_NULL(3) |
244 | | sieve_binary_read_unsigned(struct sieve_binary_block *sblock, |
245 | | sieve_size_t *address, unsigned int *count_r) |
246 | 0 | { |
247 | 0 | sieve_number_t integer = 0; |
248 | |
|
249 | 0 | if (!sieve_binary_read_integer(sblock, address, &integer)) |
250 | 0 | return FALSE; |
251 | 0 | if (count_r != NULL) |
252 | 0 | *count_r = integer; |
253 | 0 | return TRUE; |
254 | 0 | } Unexecuted instantiation: testsuite-common.c:sieve_binary_read_unsigned Unexecuted instantiation: testsuite-objects.c:sieve_binary_read_unsigned Unexecuted instantiation: testsuite-substitutions.c:sieve_binary_read_unsigned Unexecuted instantiation: testsuite-variables.c:sieve_binary_read_unsigned Unexecuted instantiation: testsuite-script.c:sieve_binary_read_unsigned Unexecuted instantiation: testsuite-binary.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-test.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-test-fail.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-test-config.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-test-result.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-test-message.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-test-mailbox.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-test-binary.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-test-imap-metadata.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-test-script-compile.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-test-script-run.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-test-multiscript.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-test-error.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-test-result-action.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-test-result-execute.c:sieve_binary_read_unsigned Unexecuted instantiation: fuzzsuite.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-script.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-binary.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-binary-file.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-binary-code.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-generator.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-interpreter.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-runtime-trace.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-code-dumper.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-binary-dumper.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-objects.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-comparators.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-match-types.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-address-parts.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-match.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-commands.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-code.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-actions.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-truefalse.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-anyof.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-allof.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-if.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-fileinto.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-reject.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-data-script.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-file-script.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-include.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-body.c:sieve_binary_read_unsigned Unexecuted instantiation: tst-body.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-variables-namespaces.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-variables.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-environment.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-date.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-ihave.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-editheader.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-duplicate.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-index.c:sieve_binary_read_unsigned Unexecuted instantiation: tag-index.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-metadata.c:sieve_binary_read_unsigned Unexecuted instantiation: tag-mime.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-debug.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-vnd-environment.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-binary-debug.c:sieve_binary_read_unsigned Unexecuted instantiation: sieve-dict-script.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-global.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-include.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-include-binary.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-include-common.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-include-variables.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-set.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-variables-common.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-variables-dump.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-variables-modifiers.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-variables-operands.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-error.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-ihave-binary.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-addheader.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-break.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-extracttext.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-foreverypart.c:sieve_binary_read_unsigned Unexecuted instantiation: cmd-debug-log.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-vnd-environment-items.c:sieve_binary_read_unsigned Unexecuted instantiation: ext-vnd-environment-variables.c:sieve_binary_read_unsigned |
255 | | |
256 | | /* Extensions */ |
257 | | |
258 | | bool sieve_binary_read_extension(struct sieve_binary_block *sblock, |
259 | | sieve_size_t *address, unsigned int *offset_r, |
260 | | const struct sieve_extension **ext_r); |
261 | | const void * |
262 | | sieve_binary_read_extension_object(struct sieve_binary_block *sblock, |
263 | | sieve_size_t *address, |
264 | | const struct sieve_extension_objects *objs); |
265 | | |
266 | | /* |
267 | | * Debug info |
268 | | */ |
269 | | |
270 | | /* Writer */ |
271 | | |
272 | | struct sieve_binary_debug_writer; |
273 | | |
274 | | struct sieve_binary_debug_writer * |
275 | | sieve_binary_debug_writer_init(struct sieve_binary_block *sblock); |
276 | | void sieve_binary_debug_writer_deinit( |
277 | | struct sieve_binary_debug_writer **dwriter); |
278 | | |
279 | | void sieve_binary_debug_emit(struct sieve_binary_debug_writer *dwriter, |
280 | | sieve_size_t code_address, unsigned int code_line, |
281 | | unsigned int code_column); |
282 | | |
283 | | /* Reader */ |
284 | | |
285 | | struct sieve_binary_debug_reader * |
286 | | sieve_binary_debug_reader_init(struct sieve_binary_block *sblock); |
287 | | void sieve_binary_debug_reader_deinit( |
288 | | struct sieve_binary_debug_reader **dreader); |
289 | | |
290 | | void sieve_binary_debug_reader_reset(struct sieve_binary_debug_reader *dreader); |
291 | | |
292 | | unsigned int |
293 | | sieve_binary_debug_read_line(struct sieve_binary_debug_reader *dreader, |
294 | | sieve_size_t code_address); |
295 | | |
296 | | #endif |