keymap-dump: use SITextMatch
text.c has the exact same function. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
20bef734d8
commit
d53fcf53f8
|
@ -449,40 +449,6 @@ write_indicator_map(struct xkb_keymap *keymap, struct buf *buf, int num)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
|
||||||
get_interp_match_text(uint8_t type)
|
|
||||||
{
|
|
||||||
static char ret[16];
|
|
||||||
|
|
||||||
switch (type & XkbSI_OpMask) {
|
|
||||||
case XkbSI_NoneOf:
|
|
||||||
sprintf(ret, "NoneOf");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case XkbSI_AnyOfOrNone:
|
|
||||||
sprintf(ret, "AnyOfOrNone");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case XkbSI_AnyOf:
|
|
||||||
sprintf(ret, "AnyOf");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case XkbSI_AllOf:
|
|
||||||
sprintf(ret, "AllOf");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case XkbSI_Exactly:
|
|
||||||
sprintf(ret, "Exactly");
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
sprintf(ret, "0x%x", type & XkbSI_OpMask);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
write_action(struct xkb_keymap *keymap, struct buf *buf,
|
write_action(struct xkb_keymap *keymap, struct buf *buf,
|
||||||
union xkb_action *action, const char *prefix, const char *suffix)
|
union xkb_action *action, const char *prefix, const char *suffix)
|
||||||
|
@ -687,7 +653,7 @@ write_compat(struct xkb_keymap *keymap, struct buf *buf)
|
||||||
|
|
||||||
write_buf(buf, "\t\tinterpret %s+%s(%s) {\n",
|
write_buf(buf, "\t\tinterpret %s+%s(%s) {\n",
|
||||||
keysym_name,
|
keysym_name,
|
||||||
get_interp_match_text(interp->match),
|
SIMatchText(interp->match),
|
||||||
get_mod_mask_text(keymap, interp->mods, 0));
|
get_mod_mask_text(keymap, interp->mods, 0));
|
||||||
|
|
||||||
if (interp->virtual_mod != XkbNoModifier) {
|
if (interp->virtual_mod != XkbNoModifier) {
|
||||||
|
|
Loading…
Reference in New Issue