Redo sieve debugging support
Instead of keeping individual debug flags for each Sieve machine, use global debugging mechanism, category "sieve". The following levels are defined: trace1 - print parse tree before optimization trace2 - print parse tree after optimization trace3 - print parser traces trace4 - print tests and actions being executed trace8 - print disassembled code, don't run trace9 - print each Sieve instruction being executed * include/mailutils/sieve.h (mu_sieve_get_debug_level) (mu_sieve_set_debug_level): Remove. (mu_sieve_is_dry_run,mu_sieve_set_dry_run * lib/script.c (mu_script_debug_flags): Redo. * lib/sieve.c (sieve_init): Remove call to obsoleted mu_sieve_set_debug_level. * examples/numaddr.c: Use mu_sieve_trace * libmu_sieve/extensions/list.c: Likewise. * libmu_sieve/extensions/moderator.c: Likewise. * libmu_sieve/extensions/pipe.c: Likewise. * libmu_sieve/extensions/spamd.c: Likewise. * libmu_sieve/extensions/timestamp.c: Likewise. * libmu_sieve/extensions/vacation.c: Likewise. * libmu_sieve/tests.c: Likewise. * libmu_sieve/runtime.c (INSTR_DEBUG,INSTR_DISASS): Rewrite. (mu_sieve_get_debug_level): Remove. (mu_sieve_is_dry_run_: Rewrite. (mu_sieve_set_dry_run): New function. (mu_sieve_disass): Rewrite. * libmu_sieve/sieve-priv.h (mu_sieve_machine) <debug_level>: Remove. <dry_run>: New field. * libmu_sieve/sieve.y (mu_sieve_set_debug_level): Remove. * libmu_sieve/util.c (mu_sieve_trace): New function. * sieve/sieve.c: Rewrite support for --dry-run and --debug. * sieve/tests/ext.at: Use --libdir-prefix instead of -L
Showing
17 changed files
with
90 additions
and
91 deletions
-
Please register or sign in to post a comment