summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2014-02-10 11:16:37 +0200
committerRan Benita <ran234@gmail.com>2014-02-10 12:26:40 +0200
commitc11f05e064ea2676cfc8c644bd95c878db3a9130 (patch)
tree8f6310631c81134eac403a3cf4d20eb1f3709377
parent537564cb10e7a187e5702b1b315241033763657f (diff)
downloadlibxkbcommon-c11f05e064ea2676cfc8c644bd95c878db3a9130.tar.gz
libxkbcommon-c11f05e064ea2676cfc8c644bd95c878db3a9130.tar.bz2
libxkbcommon-c11f05e064ea2676cfc8c644bd95c878db3a9130.zip
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 <ran234@gmail.com>
-rw-r--r--src/xkbcomp/rules.c6
1 files 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);