- inc = IncludeCreate(ctx, kkctgs->keycodes, MERGE_DEFAULT);
- keycodes = CreateXKBFile(ctx, FILE_TYPE_KEYCODES, NULL,
- (ParseCommon *) inc, 0);
-
- inc = IncludeCreate(ctx, kkctgs->types, MERGE_DEFAULT);
- types = CreateXKBFile(ctx, FILE_TYPE_TYPES, NULL,
- (ParseCommon *) inc, 0);
- AppendStmt(&keycodes->common, &types->common);
-
- inc = IncludeCreate(ctx, kkctgs->compat, MERGE_DEFAULT);
- compat = CreateXKBFile(ctx, FILE_TYPE_COMPAT, NULL,
- (ParseCommon *) inc, 0);
- AppendStmt(&keycodes->common, &compat->common);
-
- inc = IncludeCreate(ctx, kkctgs->symbols, MERGE_DEFAULT);
- symbols = CreateXKBFile(ctx, FILE_TYPE_SYMBOLS, NULL,
- (ParseCommon *) inc, 0);
- AppendStmt(&keycodes->common, &symbols->common);
-
- free(kkctgs->keycodes);
- free(kkctgs->types);
- free(kkctgs->compat);
- free(kkctgs->symbols);
- free(kkctgs);
-
- return CreateXKBFile(ctx, FILE_TYPE_KEYMAP, strdup(""),
- &keycodes->common, 0);
-}
-
-static struct xkb_keymap *
-new_keymap(struct xkb_context *ctx)
-{
- struct xkb_keymap *keymap;
-
- keymap = calloc(1, sizeof(*keymap));
- if (!keymap)
- return NULL;
-
- keymap->refcnt = 1;
- keymap->ctx = xkb_context_ref(ctx);