diff options
author | Ran Benita <ran234@gmail.com> | 2012-03-24 12:33:28 +0200 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2012-03-27 14:16:11 +0100 |
commit | d3908b631c531aa3721d91297badad1c85e3c4f1 (patch) | |
tree | ceeadf6ff3a9738e8e122aa096aa0cc7bb55f196 /src/atom.c | |
parent | 2165e16ed925616f2e3760ae9b41a8a076b22f5e (diff) | |
download | xorg-lib-libxkbcommon-d3908b631c531aa3721d91297badad1c85e3c4f1.tar.gz |
Define our own None atom value
Since we define our own xkb_atom_t type, it makes sense not to use the
X11/X.h None value. This way we can also remove a lot of X11 includes.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/atom.c')
-rw-r--r-- | src/atom.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -88,7 +88,7 @@ typedef struct _Node { #define BAD_RESOURCE 0xe0000000 -static xkb_atom_t lastAtom = None; +static xkb_atom_t lastAtom = XKB_ATOM_NONE; static NodePtr atomRoot = NULL; static unsigned long tableLength; static NodePtr *nodeTable = NULL; @@ -98,7 +98,7 @@ XkbcAtomText(xkb_atom_t atom) { NodePtr node; - if ((atom == None) || (atom > lastAtom)) + if ((atom == XKB_ATOM_NONE) || (atom > lastAtom)) return NULL; if (!(node = nodeTable[atom])) return NULL; @@ -123,7 +123,7 @@ xkb_intern_atom(const char *string) int makeit = True; if (!string) - return None; + return XKB_ATOM_NONE; len = strlen(string); np = &atomRoot; @@ -181,7 +181,7 @@ xkb_intern_atom(const char *string) return BAD_RESOURCE; } tableLength = newLength; - table[None] = NULL; + table[XKB_ATOM_NONE] = NULL; nodeTable = table; } @@ -195,7 +195,7 @@ xkb_intern_atom(const char *string) return nd->a; } else - return None; + return XKB_ATOM_NONE; } static void @@ -218,5 +218,5 @@ XkbcFreeAllAtoms(void) atomRoot = NULL; free(nodeTable); nodeTable = NULL; - lastAtom = None; + lastAtom = XKB_ATOM_NONE; } |