From 5db9dc9292d30a3672b691e4a8a6cd49daa47b71 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 30 Mar 2016 13:25:10 +0200 Subject: src: store parser location for handle and position specifiers Store the parser location structure for handle and position IDs so we can use this information from the evaluation step, to provide better error reporting. Signed-off-by: Pablo Neira Ayuso Acked-by: Arturo Borrero Gonzalez --- src/rule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index 0ed77941..b7f4a07f 100644 --- a/src/rule.c +++ b/src/rule.c @@ -44,9 +44,9 @@ void handle_merge(struct handle *dst, const struct handle *src) dst->chain = xstrdup(src->chain); if (dst->set == NULL && src->set != NULL) dst->set = xstrdup(src->set); - if (dst->handle == 0) + if (dst->handle.id == 0) dst->handle = src->handle; - if (dst->position == 0) + if (dst->position.id == 0) dst->position = src->position; } @@ -393,7 +393,7 @@ void rule_print(const struct rule *rule) printf(" comment \"%s\"", rule->comment); if (handle_output > 0) - printf(" # handle %" PRIu64, rule->handle.handle); + printf(" # handle %" PRIu64, rule->handle.handle.id); } struct scope *scope_init(struct scope *scope, const struct scope *parent) -- cgit v1.2.3