if (old) {
if (new->merge == MERGE_REPLACE || new->merge == MERGE_OVERRIDE) {
if ((same_file && verbosity > 0) || verbosity > 9) {
- log_warn_with_code(info->ctx,
+ log_warn(info->ctx,
XKB_WARNING_CONFLICTING_KEY_TYPE_DEFINITIONS,
"Multiple definitions of the %s key type; "
"Earlier definition ignored\n",
{
KeyTypesInfo included;
+ if (!include)
+ return false;
+
InitKeyTypesInfo(&included, info->ctx, &info->mods);
included.name = include->stmt;
include->stmt = NULL;
xkb_mod_mask_t mods;
if (arrayNdx)
- log_warn(info->ctx,
+ log_warn(info->ctx, XKB_LOG_MESSAGE_NO_ID,
"The modifiers field of a key type is not an array; "
"Illegal array subscript ignored\n");
if (!ExprResolveModMask(info->ctx, value, MOD_BOTH, &info->mods, &mods)) {
- log_err_with_code(info->ctx,
+ log_err(info->ctx,
XKB_ERROR_UNSUPPORTED_MODIFIER_MASK,
"Key type mask field must be a modifier mask; "
"Key type definition ignored\n");
}
if (type->defined & TYPE_FIELD_MASK) {
- log_warn(info->ctx,
+ log_warn(info->ctx, XKB_LOG_MESSAGE_NO_ID,
"Multiple modifier mask definitions for key type %s; "
"Using %s, ignoring %s\n",
xkb_atom_text(info->ctx, type->name),
old = FindMatchingMapEntry(type, new->mods.mods);
if (old) {
if (report && old->level != new->level) {
- log_warn_with_code(info->ctx,
+ log_warn(info->ctx,
XKB_WARNING_CONFLICTING_KEY_TYPE_MAP_ENTRY,
"Multiple map entries for %s in %s; "
"Using %d, ignoring %d\n",
}
if (!ExprResolveLevel(info->ctx, value, &entry.level)) {
- log_err_with_code(info->ctx, XKB_ERROR_UNSUPPORTED_SHIFT_LEVEL,
+ log_err(info->ctx, XKB_ERROR_UNSUPPORTED_SHIFT_LEVEL,
"Level specifications in a key type must be integer; "
"Ignoring malformed level specification\n");
return false;
if (!ExprResolveModMask(info->ctx, value, MOD_BOTH, &info->mods,
&preserve_mods)) {
- log_err_with_code(info->ctx,
+ log_err(info->ctx,
XKB_ERROR_UNSUPPORTED_MODIFIER_MASK,
"Preserve value in a key type is not a modifier mask; "
"Ignoring preserve[%s] in type %s\n",
type, "level name", "integer");
if (!ExprResolveString(info->ctx, value, &level_name)) {
- log_err_with_code(info->ctx,
+ log_err(info->ctx,
XKB_ERROR_WRONG_FIELD_TYPE,
"Non-string name for level %d in key type %s; "
"Ignoring illegal level name definition\n",
type_field = TYPE_FIELD_LEVEL_NAME;
ok = SetLevelName(info, type, arrayNdx, value);
} else {
- log_err_with_code(info->ctx,
+ log_err(info->ctx,
XKB_ERROR_UNKNOWN_FIELD,
"Unknown field %s in key type %s; Definition ignored\n",
field, TypeTxt(info, type));
continue;
if (elem && istreq(elem, "type")) {
- log_err_with_code(info->ctx,
+ log_err(info->ctx,
XKB_ERROR_INVALID_SET_DEFAULT_STATEMENT,
"Support for changing the default type has been removed; "
"Statement ignored\n");
ok = HandleKeyTypeDef(info, (KeyTypeDef *) stmt, merge);
break;
case STMT_VAR:
- log_err_with_code(info->ctx,
+ log_err(info->ctx,
XKB_ERROR_WRONG_STATEMENT_TYPE,
"Support for changing the default type has been removed; "
"Statement ignored\n");
ok = HandleVModDef(info->ctx, &info->mods, (VModDef *) stmt, merge);
break;
default:
- log_err_with_code(info->ctx,
+ log_err(info->ctx,
XKB_ERROR_WRONG_STATEMENT_TYPE,
"Key type files may not include other declarations; "
"Ignoring %s\n", stmt_type_to_string(stmt->type));
info->errorCount++;
if (info->errorCount > 10) {
- log_err_with_code(info->ctx,
+ log_err(info->ctx,
XKB_ERROR_INVALID_SYNTAX,
"Abandoning keytypes file \"%s\"\n", file->name);
break;