summaryrefslogtreecommitdiff
path: root/xkb/xkbfmisc.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-03-31 07:33:34 +0000
committerDaniel Stone <daniel@fooishbar.org>2006-03-31 07:33:34 +0000
commit7c44bb8c49656133eae675377edea55322d254ca (patch)
tree99969f4e7bc73de191a23f653eb2795215d6e0c4 /xkb/xkbfmisc.c
parent4c317bbc1259fa555dc5d5278226b21c42845c0c (diff)
Simplify XkbWriteXKBKeymapForNames a bit, and remove debug spew.
Diffstat (limited to 'xkb/xkbfmisc.c')
-rw-r--r--xkb/xkbfmisc.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index b2dd6e08f..3389ba88e 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -68,42 +68,26 @@ XkbWriteXKBKeymapForNames( FILE * file,
unsigned want,
unsigned need)
{
- unsigned complete = 0;
-
- if (names->keycodes) complete |= XkmKeyNamesMask;
- if (names->types) complete |= XkmTypesMask;
- if (names->compat) complete |= XkmCompatMapMask;
- if (names->symbols) complete |= XkmSymbolsMask;
- if (names->geometry) complete |= XkmGeometryMask;
-
- if (complete == 0)
+ if (!names || (!names->keycodes && !names->types && !names->compat &&
+ !names->symbols && !names->geometry))
return False;
- if (complete & XkmSymbolsMask)
- complete |= XkmKeyNamesMask | XkmTypesMask;
+ fprintf(file, "xkb_keymap \"%s\" {\n", names->keymap ? names->keymap :
+ "default");
- fprintf(file, "xkb_keymap \"%s\" {\n",names->keymap ? names->keymap :
- "default");
- ErrorF("xkb_keymap \"%s\" {\n",names->keymap ? names->keymap :
- "default");
-
- if (complete & XkmKeyNamesMask)
+ if (names->keycodes)
XkbWriteSectionFromName(file, "keycodes", names->keycodes);
-
- if (complete & XkmTypesMask)
+ if (names->types)
XkbWriteSectionFromName(file, "types", names->types);
-
- if (complete & XkmCompatMapMask)
+ if (names->compat)
XkbWriteSectionFromName(file, "compatibility", names->compat);
-
- if (complete & XkmSymbolsMask)
+ if (names->symbols)
XkbWriteSectionFromName(file, "symbols", names->symbols);
-
- if (complete & XkmGeometryMask)
+ if (names->geometry)
XkbWriteSectionFromName(file, "geometry", names->geometry);
fprintf(file,"};\n");
- ErrorF("};\n");
+
return True;
}