summaryrefslogtreecommitdiff
path: root/libmu_sieve
diff options
context:
space:
mode:
Diffstat (limited to 'libmu_sieve')
-rw-r--r--libmu_sieve/comparator.c3
-rw-r--r--libmu_sieve/mem.c7
-rw-r--r--libmu_sieve/sieve-priv.h16
-rw-r--r--libmu_sieve/sieve.y4
-rw-r--r--libmu_sieve/util.c5
5 files changed, 5 insertions, 30 deletions
diff --git a/libmu_sieve/comparator.c b/libmu_sieve/comparator.c
index a0d5836d3..44dd05bbf 100644
--- a/libmu_sieve/comparator.c
+++ b/libmu_sieve/comparator.c
@@ -217,7 +217,6 @@ mu_sieve_match_part_checker (mu_sieve_machine_t mach)
{
mu_sieve_value_t *val;
char *str;
- size_t count;
if (compname && strcmp (compname, "i;ascii-numeric"))
{
@@ -247,7 +246,7 @@ mu_sieve_match_part_checker (mu_sieve_machine_t mach)
return 1;
}
str = mu_sieve_string_raw (mach, &val->v.list, 0)->orig;
- count = strtoul (str, &str, 10);
+ str = mu_str_skip_class (str, MU_CTYPE_DIGIT);
if (*str)
{
mu_diag_at_locus (MU_LOG_ERROR, &mach->locus,
diff --git a/libmu_sieve/mem.c b/libmu_sieve/mem.c
index 25dc26c5b..3c39a3d10 100644
--- a/libmu_sieve/mem.c
+++ b/libmu_sieve/mem.c
@@ -181,13 +181,6 @@ mu_sieve_reclaim_default (void *p)
free (p);
}
-void
-mu_sieve_reclaim_list (void *p)
-{
- mu_list_t list = p;
- mu_list_destroy (&list);
-}
-
void
mu_sieve_reclaim_value (void *p)
{
diff --git a/libmu_sieve/sieve-priv.h b/libmu_sieve/sieve-priv.h
index 7ae2fdf5a..c1ebb15ce 100644
--- a/libmu_sieve/sieve-priv.h
+++ b/libmu_sieve/sieve-priv.h
@@ -29,7 +29,6 @@ typedef union
mu_sieve_handler_t handler;
mu_sieve_value_t *val;
mu_sieve_comparator_t comp;
- mu_list_t list;
long number;
size_t pc;
size_t line;
@@ -69,10 +68,10 @@ struct mu_sieve_machine
/* Symbol space: */
mu_opool_t string_pool; /* String constants */
+ mu_list_t source_list; /* Source names (for diagnostics) */
mu_list_t test_list; /* Tests */
mu_list_t action_list; /* Actions */
mu_list_t comp_list; /* Comparators */
- mu_list_t source_list; /* Source names (for diagnostics) */
mu_sieve_string_t *stringspace;
size_t stringcount;
@@ -86,7 +85,7 @@ struct mu_sieve_machine
sieve_op_t *prog; /* Compiled program */
/* Runtime data */
- enum mu_sieve_state state;
+ enum mu_sieve_state state; /* Machine state */
size_t pc; /* Current program counter */
long reg; /* Numeric register */
mu_list_t stack; /* Runtime stack */
@@ -144,8 +143,6 @@ struct mu_sieve_node
struct mu_locus_range locus;
union
{
- mu_sieve_value_t *value;
- mu_list_t list;
struct mu_sieve_node *node;
struct
{
@@ -176,9 +173,6 @@ extern mu_sieve_machine_t mu_sieve_machine;
void mu_i_sv_code (struct mu_sieve_machine *mach, sieve_op_t op);
-void mu_i_sv_compile_error (struct mu_sieve_machine *mach,
- const char *fmt, ...) MU_PRINTFLIKE(2,3);
-
int mu_i_sv_locus (struct mu_sieve_machine *mach, struct mu_locus_range *lr);
void mu_i_sv_code_action (struct mu_sieve_machine *mach,
struct mu_sieve_node *node);
@@ -203,9 +197,6 @@ void mu_i_sv_register_standard_actions (mu_sieve_machine_t mach);
void mu_i_sv_register_standard_tests (mu_sieve_machine_t mach);
void mu_i_sv_register_standard_comparators (mu_sieve_machine_t mach);
-void mu_i_sv_print_value_list (mu_list_t list, mu_stream_t str);
-void mu_i_sv_print_tag_list (mu_list_t list, mu_stream_t str);
-
void mu_i_sv_error (mu_sieve_machine_t mach);
void mu_i_sv_debug (mu_sieve_machine_t mach, size_t pc, const char *fmt, ...)
@@ -214,7 +205,8 @@ void mu_i_sv_debug_command (mu_sieve_machine_t mach, size_t pc,
char const *what);
void mu_i_sv_trace (mu_sieve_machine_t mach, const char *what);
-void mu_i_sv_valf (mu_sieve_machine_t mach, mu_stream_t str, mu_sieve_value_t *val);
+void mu_i_sv_valf (mu_sieve_machine_t mach, mu_stream_t str,
+ mu_sieve_value_t *val);
typedef int (*mu_i_sv_interp_t) (char const *, size_t, char **, void *);
diff --git a/libmu_sieve/sieve.y b/libmu_sieve/sieve.y
index a76b3de91..0a54736e3 100644
--- a/libmu_sieve/sieve.y
+++ b/libmu_sieve/sieve.y
@@ -547,10 +547,6 @@ mu_i_sv_valf (mu_sieve_machine_t mach, mu_stream_t str, mu_sieve_value_t *val)
mu_stream_printf (str, ":%s", val->v.string);
break;
- case SVT_IDENT:
- mu_stream_printf (str, "%s", val->v.string);
- break;
-
default:
abort ();
}
diff --git a/libmu_sieve/util.c b/libmu_sieve/util.c
index 9e46bda95..6716682b3 100644
--- a/libmu_sieve/util.c
+++ b/libmu_sieve/util.c
@@ -59,7 +59,6 @@ mu_sieve_value_create (mu_sieve_machine_t mach, mu_sieve_data_type type,
break;
case SVT_TAG:
- case SVT_IDENT:
val->v.string = data;
break;
@@ -142,7 +141,6 @@ mu_sieve_value_get (mu_sieve_machine_t mach, mu_sieve_value_t *val,
break;
case SVT_TAG:
- case SVT_IDENT:
*(char**) ret = val->v.string;
break;
@@ -237,9 +235,6 @@ mu_sieve_type_str (mu_sieve_data_type type)
case SVT_TAG:
return "tag";
- case SVT_IDENT:
- return "ident";
-
}
return "unknown";

Return to:

Send suggestions and report system problems to the System administrator.