(instr_action,instr_test): Update mach->identifier.
Showing
1 changed file
with
12 additions
and
2 deletions
... | @@ -88,22 +88,26 @@ instr_run (sieve_machine_t mach) | ... | @@ -88,22 +88,26 @@ instr_run (sieve_machine_t mach) |
88 | void | 88 | void |
89 | instr_action (sieve_machine_t mach) | 89 | instr_action (sieve_machine_t mach) |
90 | { | 90 | { |
91 | mach->identifier = SIEVE_ARG (mach, 3, string); | ||
91 | if (INSTR_DEBUG (mach)) | 92 | if (INSTR_DEBUG (mach)) |
92 | sieve_debug (mach, "%4lu: ACTION: %s\n", | 93 | sieve_debug (mach, "%4lu: ACTION: %s\n", |
93 | (unsigned long) (mach->pc - 1), | 94 | (unsigned long) (mach->pc - 1), |
94 | SIEVE_ARG (mach, 3, string)); | 95 | mach->identifier); |
95 | mach->action_count++; | 96 | mach->action_count++; |
96 | instr_run (mach); | 97 | instr_run (mach); |
98 | mach->identifier = NULL; | ||
97 | } | 99 | } |
98 | 100 | ||
99 | void | 101 | void |
100 | instr_test (sieve_machine_t mach) | 102 | instr_test (sieve_machine_t mach) |
101 | { | 103 | { |
104 | mach->identifier = SIEVE_ARG (mach, 3, string); | ||
102 | if (INSTR_DEBUG (mach)) | 105 | if (INSTR_DEBUG (mach)) |
103 | sieve_debug (mach, "%4lu: TEST: %s\n", | 106 | sieve_debug (mach, "%4lu: TEST: %s\n", |
104 | (unsigned long) (mach->pc - 1), | 107 | (unsigned long) (mach->pc - 1), |
105 | SIEVE_ARG (mach, 3, string)); | 108 | mach->identifier); |
106 | mach->reg = instr_run (mach); | 109 | mach->reg = instr_run (mach); |
110 | mach->identifier = NULL; | ||
107 | } | 111 | } |
108 | 112 | ||
109 | void | 113 | void |
... | @@ -254,6 +258,12 @@ sieve_get_debug_level (sieve_machine_t mach) | ... | @@ -254,6 +258,12 @@ sieve_get_debug_level (sieve_machine_t mach) |
254 | return mach->debug_level; | 258 | return mach->debug_level; |
255 | } | 259 | } |
256 | 260 | ||
261 | const char * | ||
262 | sieve_get_identifier (sieve_machine_t mach) | ||
263 | { | ||
264 | return mach->identifier; | ||
265 | } | ||
266 | |||
257 | int | 267 | int |
258 | sieve_is_dry_run (sieve_machine_t mach) | 268 | sieve_is_dry_run (sieve_machine_t mach) |
259 | { | 269 | { | ... | ... |
-
Please register or sign in to post a comment