diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-12-17 21:14:54 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-01-29 14:10:22 -0500 |
commit | a63e82be2a63d82b5b3802ae40efae2538461512 (patch) | |
tree | ad4e86c17f190f8705420cd9cf06426dd6ab55f4 /src/atom.c | |
parent | b9b0011994c2887625cdb23633d67a8fefd6b7cb (diff) | |
download | libxkbcommon-a63e82be2a63d82b5b3802ae40efae2538461512.tar.gz libxkbcommon-a63e82be2a63d82b5b3802ae40efae2538461512.tar.bz2 libxkbcommon-a63e82be2a63d82b5b3802ae40efae2538461512.zip |
Rename XkbcInternAtom() to xkb_intern_atom() and export
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Diffstat (limited to 'src/atom.c')
-rw-r--r-- | src/atom.c | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -129,14 +129,22 @@ XkbcAtomGetString(uint32_t atom) return ret ? strdup(ret) : NULL; } -static uint32_t -_XkbcMakeAtom(const char *string, unsigned len, Bool makeit) +uint32_t +xkb_intern_atom(const char *string) { NodePtr *np; unsigned i; int comp; unsigned int fp = 0; + unsigned len; + int makeit = True; + + if (!string) + return None; + if (do_intern_atom) + return do_intern_atom(string); + len = strlen(string); np = &atomRoot; for (i = 0; i < (len + 1) / 2; i++) { fp = fp * 27 + string[i]; @@ -208,13 +216,3 @@ _XkbcMakeAtom(const char *string, unsigned len, Bool makeit) else return None; } - -uint32_t -XkbcInternAtom(const char *name, Bool onlyIfExists) -{ - if (!name) - return None; - if (do_intern_atom) - return do_intern_atom(name); - return _XkbcMakeAtom(name, strlen(name), !onlyIfExists); -} |