Rename public entry points to lowercase and underscore
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 2 Jul 2010 15:50:01 +0000 (11:50 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 2 Jul 2010 16:20:59 +0000 (12:20 -0400)
14 files changed:
include/X11/extensions/XKBcommon.h
src/atom.c
src/keysym.c
src/text.c
src/xkb.c
src/xkbcomp/expr.c
src/xkbcomp/listing.c
src/xkbcomp/parseutils.c
src/xkbcomp/xkbcomp.c
test/canonicalise.c
test/filecomp.c
test/namescomp.c
test/rulescomp.c
test/xkey.c

index 59a0dd4..b657501 100644 (file)
@@ -885,19 +885,19 @@ typedef uint32_t (*InternAtomFuncPtr)(const char *val);
 typedef const char *(*GetAtomValueFuncPtr)(uint32_t atom);
 
 _X_EXPORT extern void
-XkbcInitAtoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value);
+xkb_init_atoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value);
 
 _X_EXPORT extern struct xkb_desc *
-XkbcCompileKeymapFromRules(const XkbRMLVOSet *rmlvo);
+xkb_compile_keymap_from_rules(const XkbRMLVOSet *rmlvo);
 
 _X_EXPORT extern struct xkb_desc *
-XkbcCompileKeymapFromComponents(const struct xkb_component_names * ktcsg);
+xkb_compile_keymap_from_components(const struct xkb_component_names * ktcsg);
 
 _X_EXPORT extern struct xkb_desc *
-XkbcCompileKeymapFromFile(FILE *inputFile, const char *mapName);
+xkb_compile_keymap_from_file(FILE *inputFile, const char *mapName);
 
 _X_EXPORT extern struct xkb_component_list *
-XkbcListComponents(struct xkb_component_names * ptrns, int *maxMatch);
+xkb_list_components(struct xkb_component_names * ptrns, int *maxMatch);
 
 /*
  * Canonicalises component names by prepending the relevant component from
@@ -914,7 +914,7 @@ XkbcListComponents(struct xkb_component_names * ptrns, int *maxMatch);
  * free()d, and a new one allocated with malloc().
  */
 _X_EXPORT extern void
-XkbcCanonicaliseComponents(struct xkb_component_names * names,
+xkb_canonicalise_components(struct xkb_component_names * names,
                            const struct xkb_component_names * old);
 
 /*
@@ -922,21 +922,21 @@ XkbcCanonicaliseComponents(struct xkb_component_names * names,
  * as "Ua1b2", and other unknown keysyms as "0xabcd1234".
  *
  * The string returned may become invalidated after the next call to
- * XkbcKeysymToString: if you need to preserve it, then you must
+ * xkb_keysym_to_string: if you need to preserve it, then you must
  * duplicate it.
  *
  * This is uint32_t rather than KeySym, as KeySym changes size between
  * client and server (no, really).
  */
 _X_EXPORT extern char *
-XkbcKeysymToString(uint32_t ks);
+xkb_keysym_to_string(uint32_t ks);
 
 /*
- * See XkbcKeysymToString comments: this function will accept any string
+ * See xkb_keysym_to_string comments: this function will accept any string
  * from that function.
  */
 _X_EXPORT extern uint32_t
-XkbcStringToKeysym(const char *s);
+xkb_string_to_keysym(const char *s);
 
 _XFUNCPROTOEND
 
index 8aa3aa1..194768a 100644 (file)
@@ -96,7 +96,7 @@ InternAtomFuncPtr do_intern_atom = NULL;
 GetAtomValueFuncPtr do_get_atom_value = NULL;
 
 void
-XkbcInitAtoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value)
+xkb_init_atoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value)
 {
     if (intern && get_atom_value) {
         if (do_intern_atom && do_get_atom_value)
index 41e7a5e..9316fc1 100644 (file)
@@ -38,7 +38,7 @@ authorization from the authors.
 #include "ks_tables.h"
 
 char *
-XkbcKeysymToString(uint32_t ks)
+xkb_keysym_to_string(uint32_t ks)
 {
     int i, n, h, idx;
     const unsigned char *entry;
@@ -92,7 +92,7 @@ XkbcKeysymToString(uint32_t ks)
 }
 
 uint32_t
-XkbcStringToKeysym(const char *s)
+xkb_string_to_keysym(const char *s)
 {
     int i, n, h, c, idx;
     unsigned long sig = 0;
index 4c47d12..625f112 100644 (file)
@@ -282,7 +282,7 @@ XkbcActionTypeText(unsigned type)
 char *
 XkbcKeysymText(uint32_t sym)
 {
-    return XkbcKeysymToString(sym);
+    return xkb_keysym_to_string(sym);
 }
 
 char *
index 0cc30df..7294d79 100644 (file)
--- a/src/xkb.c
+++ b/src/xkb.c
@@ -82,7 +82,7 @@ XkbcCanonicaliseComponent(char *name, const char *old)
 }
 
 void
-XkbcCanonicaliseComponents(struct xkb_component_names * names,
+xkb_canonicalise_components(struct xkb_component_names * names,
                            const struct xkb_component_names * old)
 {
     names->keycodes = XkbcCanonicaliseComponent(names->keycodes,
index f08d040..1f255c5 100644 (file)
@@ -1055,7 +1055,7 @@ ExprResolveKeySym(ExprDef * expr,
     {
         const char *str;
         str = XkbcAtomText(expr->value.str);
-        if ((str != NULL) && ((sym = XkbcStringToKeysym(str)) != NoSymbol))
+        if ((str != NULL) && ((sym = xkb_string_to_keysym(str)) != NoSymbol))
         {
             val_rtrn->uval = sym;
             return True;
index e52f96e..c438e5a 100644 (file)
@@ -478,7 +478,7 @@ GenerateComponent(struct xkb_component_list * complist, unsigned type, char *hea
 /***====================================================================***/
 
 struct xkb_component_list *
-XkbcListComponents(struct xkb_component_names * ptrns, int *maxMatch)
+xkb_list_components(struct xkb_component_names * ptrns, int *maxMatch)
 {
     struct xkb_component_list * complist = NULL;
     int extra = 0;
index 575a1f8..33ec7a7 100644 (file)
@@ -636,7 +636,7 @@ LookupKeysym(char *str, uint32_t * sym_rtrn)
         *sym_rtrn = XK_VoidSymbol;
         return 1;
     }
-    sym = XkbcStringToKeysym(str);
+    sym = xkb_string_to_keysym(str);
     if (sym != NoSymbol)
     {
         *sym_rtrn = sym;
index 4761921..b68e2b7 100644 (file)
@@ -136,7 +136,7 @@ out:
 }
 
 struct xkb_desc *
-XkbcCompileKeymapFromRules(const XkbRMLVOSet *rmlvo)
+xkb_compile_keymap_from_rules(const XkbRMLVOSet *rmlvo)
 {
     XkbRF_VarDefsRec defs;
     struct xkb_component_names * names;
@@ -159,7 +159,7 @@ XkbcCompileKeymapFromRules(const XkbRMLVOSet *rmlvo)
         return NULL;
     }
 
-    xkb = XkbcCompileKeymapFromComponents(names);
+    xkb = xkb_compile_keymap_from_components(names);
 
     free(names->keymap);
     free(names->keycodes);
@@ -207,7 +207,7 @@ XkbChooseMap(XkbFile *file, const char *name)
 }
 
 struct xkb_desc *
-XkbcCompileKeymapFromComponents(const struct xkb_component_names * ktcsg)
+xkb_compile_keymap_from_components(const struct xkb_component_names * ktcsg)
 {
     XkbFile *file, *mapToUse;
     struct xkb_desc * xkb;
@@ -249,7 +249,7 @@ fail:
 }
 
 struct xkb_desc *
-XkbcCompileKeymapFromFile(FILE *inputFile, const char *mapName)
+xkb_compile_keymap_from_file(FILE *inputFile, const char *mapName)
 {
     XkbFile *file, *mapToUse;
     struct xkb_desc * xkb;
index 8691ef6..7ec81d2 100644 (file)
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
         old->types = strdup(argv[10]);
     }
 
-    XkbcCanonicaliseComponents(new, old);
+    xkb_canonicalise_components(new, old);
 
     printf("%s %s %s %s %s\n", new->keycodes, new->compat, new->geometry,
            new->symbols, new->types);
index d2b2d7b..0ff41f9 100644 (file)
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
         exit(1);
     }
 
-    xkb = XkbcCompileKeymapFromFile(file, name);
+    xkb = xkb_compile_keymap_from_file(file, name);
     fclose(file);
 
     if (!xkb) {
index 430e0a7..5f531cc 100644 (file)
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
     ktcsg.symbols = argv[4];
     ktcsg.geometry = argv[5];
 
-    xkb = XkbcCompileKeymapFromComponents(&ktcsg);
+    xkb = xkb_compile_keymap_from_components(&ktcsg);
 
     if (!xkb) {
         fprintf(stderr, "Failed to compile keymap\n");
index 2056adf..2395daf 100644 (file)
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
     rmlvo.variant = argv[4];
     rmlvo.options = argv[5];
 
-    xkb = XkbcCompileKeymapFromRules(&rmlvo);
+    xkb = xkb_compile_keymap_from_rules(&rmlvo);
 
     if (!xkb) {
         fprintf(stderr, "Failed to compile keymap\n");
index 834ebdb..9d7a08f 100644 (file)
@@ -6,7 +6,7 @@
 
 static void print_keysym(const char *s)
 {
-    KeySym ks = XkbcStringToKeysym(s);
+    KeySym ks = xkb_string_to_keysym(s);
     if (ks == NoSymbol)
         printf("NoSymbol\n");
     else
@@ -15,7 +15,7 @@ static void print_keysym(const char *s)
 
 static void print_string(KeySym ks)
 {
-    char *s = XkbcKeysymToString(ks);
+    char *s = xkb_keysym_to_string(ks);
     printf("%s\n", s ? s : "NULL");
 }