diff options
author | Ran Benita <ran234@gmail.com> | 2013-02-08 00:07:28 +0200 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2013-03-18 22:20:02 +0000 |
commit | dd81d5e0c00e8d80f62b29a1c67752e84215f354 (patch) | |
tree | 13d096045a825ee9b9915ba6f8c950d27d2d2487 | |
parent | a4904ee1b7d9c03deab0b0c651ba448bfb7307c2 (diff) |
Change some log functions to take ctx instead of keymap
They don't need the keymap, only the context.
Signed-off-by: Ran Benita <ran234@gmail.com>
-rw-r--r-- | src/xkbcomp/compat.c | 6 | ||||
-rw-r--r-- | src/xkbcomp/types.c | 2 | ||||
-rw-r--r-- | src/xkbcomp/xkbcomp-priv.h | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c index d77dee2..4361abe 100644 --- a/src/xkbcomp/compat.c +++ b/src/xkbcomp/compat.c @@ -287,7 +287,7 @@ siText(SymInterpInfo *si, CompatInfo *info) static inline bool ReportSINotArray(CompatInfo *info, SymInterpInfo *si, const char *field) { - return ReportNotArray(info->keymap, "symbol interpretation", field, + return ReportNotArray(info->keymap->ctx, "symbol interpretation", field, siText(si, info)); } @@ -311,7 +311,7 @@ ReportLedBadType(CompatInfo *info, LedInfo *ledi, const char *field, static inline bool ReportLedNotArray(CompatInfo *info, LedInfo *ledi, const char *field) { - return ReportNotArray(info->keymap, "indicator map", field, + return ReportNotArray(info->keymap->ctx, "indicator map", field, xkb_atom_text(info->keymap->ctx, ledi->led.name)); } @@ -688,7 +688,7 @@ SetInterpField(CompatInfo *info, SymInterpInfo *si, const char *field, si->defined |= SI_FIELD_LEVEL_ONE_ONLY; } else { - return ReportBadField(keymap, "symbol interpretation", field, + return ReportBadField(keymap->ctx, "symbol interpretation", field, siText(si, info)); } diff --git a/src/xkbcomp/types.c b/src/xkbcomp/types.c index 6518482..b1666fa 100644 --- a/src/xkbcomp/types.c +++ b/src/xkbcomp/types.c @@ -187,7 +187,7 @@ static inline bool ReportTypeShouldBeArray(KeyTypesInfo *info, KeyTypeInfo *type, const char *field) { - return ReportShouldBeArray(info->keymap, "key type", field, + return ReportShouldBeArray(info->keymap->ctx, "key type", field, TypeTxt(info, type)); } diff --git a/src/xkbcomp/xkbcomp-priv.h b/src/xkbcomp/xkbcomp-priv.h index 8b6f0f8..97f8e21 100644 --- a/src/xkbcomp/xkbcomp-priv.h +++ b/src/xkbcomp/xkbcomp-priv.h @@ -78,10 +78,10 @@ LookupKeysym(const char *str, xkb_keysym_t *sym_rtrn); /***====================================================================***/ static inline bool -ReportNotArray(struct xkb_keymap *keymap, const char *type, const char *field, +ReportNotArray(struct xkb_context *ctx, const char *type, const char *field, const char *name) { - log_err(keymap->ctx, + log_err(ctx, "The %s %s field is not an array; " "Ignoring illegal assignment in %s\n", type, field, name); @@ -89,10 +89,10 @@ ReportNotArray(struct xkb_keymap *keymap, const char *type, const char *field, } static inline bool -ReportShouldBeArray(struct xkb_keymap *keymap, const char *type, +ReportShouldBeArray(struct xkb_context *ctx, const char *type, const char *field, const char *name) { - log_err(keymap->ctx, + log_err(ctx, "Missing subscript for %s %s; " "Ignoring illegal assignment in %s\n", type, field, name); @@ -110,10 +110,10 @@ ReportBadType(struct xkb_context *ctx, const char *type, const char *field, } static inline bool -ReportBadField(struct xkb_keymap *keymap, const char *type, const char *field, +ReportBadField(struct xkb_context *ctx, const char *type, const char *field, const char *name) { - log_err(keymap->ctx, + log_err(ctx, "Unknown %s field %s in %s; " "Ignoring assignment to unknown field in %s\n", type, field, name, name); |