From 218c8873395c56407601ba36654920a39b0e0692 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 20 Nov 2006 22:35:12 +0000 Subject: [PATCH] Began fleshing out the Sieve script generator. Actions, final actions, and the generation of conditional braces are done. Still need to write the code that generates the conditional statements themeselves. Warning: don't try to run this code on a production system. In the current state it will generate scripts with syntax errors. --- webcit/sieve.c | 170 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 132 insertions(+), 38 deletions(-) diff --git a/webcit/sieve.c b/webcit/sieve.c index 89c5c56ac..f9cc56b09 100644 --- a/webcit/sieve.c +++ b/webcit/sieve.c @@ -192,6 +192,90 @@ void display_sieve(void) +/** + * \brief Helper function for output_sieve_rule() to output strings with quotes escaped + */ +void osr_sanitize(char *str) { + int i; + + if (str == NULL) return; + for (i=0; i