summaryrefslogtreecommitdiff
path: root/src/atom.c
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2012-03-24 12:33:28 +0200
committerDaniel Stone <daniel@fooishbar.org>2012-03-27 14:16:11 +0100
commitd3908b631c531aa3721d91297badad1c85e3c4f1 (patch)
treeceeadf6ff3a9738e8e122aa096aa0cc7bb55f196 /src/atom.c
parent2165e16ed925616f2e3760ae9b41a8a076b22f5e (diff)
downloadxorg-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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/atom.c b/src/atom.c
index 40c2153..f39ba45 100644
--- a/src/atom.c
+++ b/src/atom.c
@@ -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;
}