summaryrefslogtreecommitdiff
path: root/src/atom.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-12-17 21:14:54 -0500
committerKristian Høgsberg <krh@bitplanet.net>2011-01-29 14:10:22 -0500
commita63e82be2a63d82b5b3802ae40efae2538461512 (patch)
treead4e86c17f190f8705420cd9cf06426dd6ab55f4 /src/atom.c
parentb9b0011994c2887625cdb23633d67a8fefd6b7cb (diff)
downloadlibxkbcommon-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.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/atom.c b/src/atom.c
index fb3cae4..51352bb 100644
--- a/src/atom.c
+++ b/src/atom.c
@@ -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);
-}