From c11f05e064ea2676cfc8c644bd95c878db3a9130 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Mon, 10 Feb 2014 11:16:37 +0200 Subject: [PATCH] rules: print full path in error messages There can be multiple include paths. But it's nicer in any case. This also makes scanner_error actually use log_err instead of log_warn - oops. Signed-off-by: Ran Benita --- src/xkbcomp/rules.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xkbcomp/rules.c b/src/xkbcomp/rules.c index 6418ac8..a38b101 100644 --- a/src/xkbcomp/rules.c +++ b/src/xkbcomp/rules.c @@ -72,11 +72,11 @@ enum rules_token { /* C99 is stupid. Just use the 1 variant when there are no args. */ #define scanner_error1(scanner, msg) \ - log_warn((scanner)->ctx, "rules/%s:%u:%u: %s\n", \ + log_warn((scanner)->ctx, "%s:%u:%u: %s\n", \ (scanner)->file_name, \ (scanner)->token_line, (scanner)->token_column, msg) #define scanner_error(scanner, fmt, ...) \ - log_warn((scanner)->ctx, "rules/%s:%u:%u: " fmt "\n", \ + log_err((scanner)->ctx, "%s:%u:%u: " fmt "\n", \ (scanner)->file_name, \ (scanner)->token_line, (scanner)->token_column, __VA_ARGS__) @@ -1010,7 +1010,7 @@ xkb_components_from_rules(struct xkb_context *ctx, } matcher = matcher_new(ctx, rmlvo); - ret = matcher_match(matcher, string, size, rmlvo->rules, out); + ret = matcher_match(matcher, string, size, path, out); if (!ret) log_err(ctx, "No components returned from XKB rules \"%s\"\n", path); matcher_free(matcher); -- 2.7.4