summaryrefslogtreecommitdiff
path: root/src/text.c
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2012-06-29 17:05:33 +0300
committerRan Benita <ran234@gmail.com>2012-07-01 00:51:56 +0300
commit48b4d30aa39a0d41490b8099576909fda73d3a75 (patch)
treef580ec980e31eacd5d404cc0b9fff28194f1189d /src/text.c
parent8f257397af28b1107c2a93da55ee74f7b7e8bd1f (diff)
Use enum for file types
enums are nice for some type safety and readability. This one also removes the distinction between file type mask / file type index and some naming consistency. Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/text.c b/src/text.c
index 2ca411b..d30c4b7 100644
--- a/src/text.c
+++ b/src/text.c
@@ -186,19 +186,21 @@ XkbcModMaskText(unsigned mask, bool cFormat)
}
const char *
-XkbcConfigText(unsigned config)
+XkbcFileTypeText(enum xkb_file_type type)
{
- switch (config) {
- case XkmKeymapFile:
+ switch (type) {
+ case FILE_TYPE_KEYMAP:
return "Keymap";
- case XkmTypesIndex:
+ case FILE_TYPE_TYPES:
return "Types";
- case XkmCompatMapIndex:
+ case FILE_TYPE_COMPAT:
return "CompatMap";
- case XkmSymbolsIndex:
+ case FILE_TYPE_SYMBOLS:
return "Symbols";
- case XkmKeyNamesIndex:
+ case FILE_TYPE_KEYCODES:
return "KeyNames";
+ case FILE_TYPE_RULES:
+ return "Rules";
default:
return "unknown";
}