Commit d8f04cb7 d8f04cb71471e2fcd21611068fe6c1424a4ee1cc by Sergey Poznyakoff

(struct sieve_machine): New members: filename, logger, ticket, mu_debug.

1 parent 75559f96
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 20
21 #define SIEVE_CODE_INCR 128 21 #define SIEVE_CODE_INCR 128
22 22
23 typedef void (*sieve_instr_t) __P((sieve_machine_t *mach)); 23 typedef void (*sieve_instr_t) __P((sieve_machine_t mach));
24 24
25 typedef union { 25 typedef union {
26 sieve_instr_t instr; 26 sieve_instr_t instr;
...@@ -34,6 +34,7 @@ typedef union { ...@@ -34,6 +34,7 @@ typedef union {
34 34
35 struct sieve_machine { 35 struct sieve_machine {
36 /* Static data */ 36 /* Static data */
37 char *filename; /* Name of the source script */
37 list_t memory_pool; /* Pool of allocated memory objects */ 38 list_t memory_pool; /* Pool of allocated memory objects */
38 39
39 size_t progsize; /* Number of allocated program cells */ 40 size_t progsize; /* Number of allocated program cells */
...@@ -55,13 +56,16 @@ struct sieve_machine { ...@@ -55,13 +56,16 @@ struct sieve_machine {
55 sieve_parse_error_t parse_error_printer; 56 sieve_parse_error_t parse_error_printer;
56 sieve_printf_t error_printer; 57 sieve_printf_t error_printer;
57 sieve_printf_t debug_printer; 58 sieve_printf_t debug_printer;
59 sieve_action_log_t logger;
60
61 ticket_t ticket;
62 mu_debug_t mu_debug;
58 void *data; 63 void *data;
59 }; 64 };
60 65
61 extern char *sieve_filename; 66 extern char *sieve_filename;
62 extern int sieve_line_num; 67 extern int sieve_line_num;
63 extern int sieve_yydebug; 68 extern sieve_machine_t sieve_machine;
64 extern sieve_machine_t *sieve_machine;
65 extern int sieve_error_count; 69 extern int sieve_error_count;
66 70
67 void sieve_compile_error __P((const char *filename, int linenum, 71 void sieve_compile_error __P((const char *filename, int linenum,
...@@ -95,12 +99,14 @@ int sieve_code_number __P((long num)); ...@@ -95,12 +99,14 @@ int sieve_code_number __P((long num));
95 int sieve_code_test __P((sieve_register_t *reg, list_t arglist)); 99 int sieve_code_test __P((sieve_register_t *reg, list_t arglist));
96 int sieve_code_action __P((sieve_register_t *reg, list_t arglist)); 100 int sieve_code_action __P((sieve_register_t *reg, list_t arglist));
97 101
98 void instr_action __P((sieve_machine_t *mach)); 102 void instr_action __P((sieve_machine_t mach));
99 void instr_test __P((sieve_machine_t *mach)); 103 void instr_test __P((sieve_machine_t mach));
100 void instr_push __P((sieve_machine_t *mach)); 104 void instr_push __P((sieve_machine_t mach));
101 void instr_pop __P((sieve_machine_t *mach)); 105 void instr_pop __P((sieve_machine_t mach));
102 void instr_allof __P((sieve_machine_t *mach)); 106 void instr_allof __P((sieve_machine_t mach));
103 void instr_anyof __P((sieve_machine_t *mach)); 107 void instr_anyof __P((sieve_machine_t mach));
104 void instr_not __P((sieve_machine_t *mach)); 108 void instr_not __P((sieve_machine_t mach));
105 void instr_branch __P((sieve_machine_t *mach)); 109 void instr_branch __P((sieve_machine_t mach));
106 void instr_brz __P((sieve_machine_t *mach)); 110 void instr_brz __P((sieve_machine_t mach));
111
112 int sieve_mark_deleted __P((message_t msg, int deleted));
......