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>
master
Ran Benita 2013-02-08 00:07:28 +02:00 committed by Daniel Stone
parent a4904ee1b7
commit dd81d5e0c0
3 changed files with 10 additions and 10 deletions

View File

@ -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));
}

View File

@ -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));
}

View File

@ -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);