diff options
-rw-r--r-- | src/atom.c | 12 | ||||
-rw-r--r-- | src/map.c | 1 | ||||
-rw-r--r-- | src/maprules.c | 5 | ||||
-rw-r--r-- | src/misc.c | 8 | ||||
-rw-r--r-- | src/xkballoc.h | 2 | ||||
-rw-r--r-- | src/xkbcomp/action.c | 2 | ||||
-rw-r--r-- | src/xkbcomp/expr.c | 3 | ||||
-rw-r--r-- | src/xkbcomp/keycodes.c | 2 | ||||
-rw-r--r-- | src/xkbcomp/keytypes.c | 6 | ||||
-rw-r--r-- | src/xkbcomp/symbols.c | 27 | ||||
-rw-r--r-- | src/xkbcomp/xkbcomp.h | 3 | ||||
-rw-r--r-- | src/xkbcomp/xkbparse.y | 8 | ||||
-rw-r--r-- | src/xkbmisc.h | 3 | ||||
-rw-r--r-- | src/xkbrules.h | 3 | ||||
-rw-r--r-- | test/filecomp.c | 2 | ||||
-rw-r--r-- | test/namescomp.c | 2 | ||||
-rw-r--r-- | test/rulescomp.c | 1 | ||||
-rw-r--r-- | test/state.c | 2 |
18 files changed, 39 insertions, 53 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; } @@ -57,7 +57,6 @@ #include "xkbcommon/xkbcommon.h" #include "XKBcommonint.h" #include "xkballoc.h" -#include <X11/X.h> /** * Returns the total number of modifiers active in the keymap. diff --git a/src/maprules.c b/src/maprules.c index ecac8ae..1537ab8 100644 --- a/src/maprules.c +++ b/src/maprules.c @@ -40,11 +40,6 @@ #define XOS_USE_NO_LOCKING #include <X11/Xos_r.h> -#include <X11/Xproto.h> -#include <X11/X.h> -#include <X11/Xos.h> -#include <X11/Xfuncs.h> - #ifdef DEBUG #define PR_DEBUG(s) fprintf(stderr,s) #define PR_DEBUG1(s,a) fprintf(stderr,s,a) @@ -60,25 +60,25 @@ static struct xkb_key_type canonicalTypes[XkbNumRequiredTypes] = { 1, /* num_levels */ 0, /* map_count */ NULL, NULL, - None, NULL + NULL, NULL }, { { ShiftMask, ShiftMask, 0 }, 2, /* num_levels */ mapSize(map2Level), /* map_count */ map2Level, NULL, - None, NULL + NULL, NULL }, { { ShiftMask|LockMask, ShiftMask|LockMask, 0 }, 2, /* num_levels */ mapSize(mapAlpha), /* map_count */ mapAlpha, preAlpha, - None, NULL + NULL, NULL }, { { ShiftMask, ShiftMask, NL_VMOD_MASK }, 2, /* num_levels */ mapSize(mapKeypad), /* map_count */ mapKeypad, NULL, - None, NULL + NULL, NULL } }; diff --git a/src/xkballoc.h b/src/xkballoc.h index 2839eda..2e0a23e 100644 --- a/src/xkballoc.h +++ b/src/xkballoc.h @@ -27,8 +27,8 @@ authorization from the authors. #ifndef _XKBALLOC_H_ #define _XKBALLOC_H_ -#include <X11/X.h> #include <X11/Xdefs.h> +#include <X11/X.h> #include "xkbcommon/xkbcommon.h" #include "XKBcommonint.h" diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c index d0e2f0f..eca1d6d 100644 --- a/src/xkbcomp/action.c +++ b/src/xkbcomp/action.c @@ -24,6 +24,8 @@ ********************************************************/ +#include <X11/X.h> + #include "xkbcomp.h" #include "xkbmisc.h" #include "expr.h" diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c index cd35494..75c59ad 100644 --- a/src/xkbcomp/expr.c +++ b/src/xkbcomp/expr.c @@ -30,6 +30,7 @@ #include "vmod.h" #include <ctype.h> +#include <X11/X.h> /***====================================================================***/ @@ -169,7 +170,7 @@ SimpleLookup(const void * priv, xkb_atom_t field, unsigned type, const LookupEntry *entry; const char *str; - if ((priv == NULL) || (field == None) || (type != TypeInt)) + if ((priv == NULL) || (field == XKB_ATOM_NONE) || (type != TypeInt)) { return False; } diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c index f03d7dd..bfe7d13 100644 --- a/src/xkbcomp/keycodes.c +++ b/src/xkbcomp/keycodes.c @@ -141,7 +141,7 @@ InitIndicatorNameInfo(IndicatorNameInfo * ii, KeyNamesInfo * info) ii->defs.fileID = info->fileID; ii->defs.next = NULL; ii->ndx = 0; - ii->name = None; + ii->name = XKB_ATOM_NONE; ii->virtual = False; } diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c index 00dc139..0a03afc 100644 --- a/src/xkbcomp/keytypes.c +++ b/src/xkbcomp/keytypes.c @@ -121,7 +121,7 @@ InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_desc * xkb, KeyTypesInfo * from info->dflt.defs.fileID = 0; info->dflt.defs.merge = MergeOverride; info->dflt.defs.next = NULL; - info->dflt.name = None; + info->dflt.name = XKB_ATOM_NONE; info->dflt.mask = 0; info->dflt.vmask = 0; info->dflt.groupInfo = False; @@ -758,7 +758,7 @@ AddLevelName(KeyTypeInfo * type, } return True; } - else if (type->lvlNames[level] != None) + else if (type->lvlNames[level] != XKB_ATOM_NONE) { if (warningLevel > 0) { @@ -984,7 +984,7 @@ HandleKeyTypeDef(KeyTypeDef * def, } for (i = 0; i < info->dflt.szNames; i++) { - if ((i < type.numLevels) && (info->dflt.lvlNames[i] != None)) + if ((i < type.numLevels) && (info->dflt.lvlNames[i] != XKB_ATOM_NONE)) { AddLevelName(&type, i, info->dflt.lvlNames[i], False, False); } diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c index 35210e8..ddb7afb 100644 --- a/src/xkbcomp/symbols.c +++ b/src/xkbcomp/symbols.c @@ -93,11 +93,11 @@ InitKeyInfo(KeyInfo * info) for (i = 0; i < XkbNumKbdGroups; i++) { info->numLevels[i] = 0; - info->types[i] = None; + info->types[i] = XKB_ATOM_NONE; info->syms[i] = NULL; info->acts[i] = NULL; } - info->dfltType = None; + info->dfltType = XKB_ATOM_NONE; info->behavior.type = XkbKB_Default; info->behavior.data = 0; info->vmodmap = 0; @@ -122,13 +122,13 @@ FreeKeyInfo(KeyInfo * info) for (i = 0; i < XkbNumKbdGroups; i++) { info->numLevels[i] = 0; - info->types[i] = None; + info->types[i] = XKB_ATOM_NONE; free(info->syms[i]); info->syms[i] = NULL; free(info->acts[i]); info->acts[i] = NULL; } - info->dfltType = None; + info->dfltType = XKB_ATOM_NONE; info->behavior.type = XkbKB_Default; info->behavior.data = 0; info->vmodmap = 0; @@ -242,7 +242,7 @@ InitSymbolsInfo(SymbolsInfo * info, struct xkb_desc * xkb) info->keys = uTypedCalloc(SYMBOLS_INIT_SIZE, KeyInfo); info->modMap = NULL; for (i = 0; i < XkbNumKbdGroups; i++) - info->groupNames[i] = None; + info->groupNames[i] = XKB_ATOM_NONE; InitKeyInfo(&info->dflt); InitVModInfo(&info->vmods, xkb); info->action = NULL; @@ -507,9 +507,9 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from) MergeKeyGroups(info, into, from, (unsigned) i); } } - if (from->types[i] != None) + if (from->types[i] != XKB_ATOM_NONE) { - if ((into->types[i] != None) && (report) && + if ((into->types[i] != XKB_ATOM_NONE) && report && (into->types[i] != from->types[i])) { xkb_atom_t use, ignore; @@ -532,7 +532,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from) XkbcAtomText(ignore)); } if ((from->defs.merge != MergeAugment) - || (into->types[i] == None)) + || (into->types[i] == XKB_ATOM_NONE)) { into->types[i] = from->types[i]; } @@ -703,9 +703,10 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from, } for (i = 0; i < XkbNumKbdGroups; i++) { - if (from->groupNames[i] != None) + if (from->groupNames[i] != XKB_ATOM_NONE) { - if ((merge != MergeAugment) || (into->groupNames[i] == None)) + if ((merge != MergeAugment) || + (into->groupNames[i] == XKB_ATOM_NONE)) into->groupNames[i] = from->groupNames[i]; } } @@ -1773,9 +1774,9 @@ CopySymbolsDef(struct xkb_desc * xkb, KeyInfo *key, int start_from) haveActions = True; autoType = False; /* Assign the type to the key, if it is missing. */ - if (key->types[i] == None) + if (key->types[i] == XKB_ATOM_NONE) { - if (key->dfltType != None) + if (key->dfltType != XKB_ATOM_NONE) key->types[i] = key->dfltType; else if (FindAutomaticType(key->numLevels[i], key->syms[i], &key->types[i], &autoType)) @@ -2016,7 +2017,7 @@ CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge) ApplyAliases(xkb, &info.aliases); for (i = 0; i < XkbNumKbdGroups; i++) { - if (info.groupNames[i] != None) + if (info.groupNames[i] != XKB_ATOM_NONE) { free(UNCONSTIFY(xkb->names->groups[i])); xkb->names->groups[i] = XkbcAtomGetString(info.groupNames[i]); diff --git a/src/xkbcomp/xkbcomp.h b/src/xkbcomp/xkbcomp.h index 3c98a4e..baab968 100644 --- a/src/xkbcomp/xkbcomp.h +++ b/src/xkbcomp/xkbcomp.h @@ -27,9 +27,6 @@ #ifndef XKBCOMP_H #define XKBCOMP_H 1 -#include <X11/X.h> -#include <X11/Xdefs.h> - #include "utils.h" #include "xkbcommon/xkbcommon.h" diff --git a/src/xkbcomp/xkbparse.y b/src/xkbcomp/xkbparse.y index 13e5628..9db7ee5 100644 --- a/src/xkbcomp/xkbparse.y +++ b/src/xkbcomp/xkbparse.y @@ -569,11 +569,11 @@ Element : ACTION_TOK | SHAPE { $$= xkb_intern_atom("shape"); } | ROW - { $$= None; } + { $$= XKB_ATOM_NONE; } | SECTION - { $$= None; } + { $$= XKB_ATOM_NONE; } | TEXT - { $$= None; } + { $$= XKB_ATOM_NONE; } ; OptMergeMode : MergeMode { $$= $1; } @@ -658,7 +658,7 @@ Lhs : FieldSpec { ExprDef *expr; expr= ExprCreate(ExprArrayRef,TypeUnknown); - expr->value.array.element= None; + expr->value.array.element= XKB_ATOM_NONE; expr->value.array.field= $1; expr->value.array.entry= $3; $$= expr; diff --git a/src/xkbmisc.h b/src/xkbmisc.h index 1d74ef5..7167aa0 100644 --- a/src/xkbmisc.h +++ b/src/xkbmisc.h @@ -27,13 +27,14 @@ authorization from the authors. #ifndef _XKBMISC_H_ #define _XKBMISC_H_ -#include <X11/X.h> #include <X11/Xdefs.h> #include "xkbcommon/xkbcommon.h" #include "XKBcommonint.h" typedef uint32_t xkb_atom_t; +#define XKB_ATOM_NONE 0 + /***====================================================================***/ extern Bool diff --git a/src/xkbrules.h b/src/xkbrules.h index a69e8b9..e57b056 100644 --- a/src/xkbrules.h +++ b/src/xkbrules.h @@ -27,12 +27,9 @@ authorization from the authors. #ifndef _XKBRULES_H_ #define _XKBRULES_H_ -#include <stdio.h> -#include <X11/X.h> #include <X11/Xdefs.h> #include "xkbcommon/xkbcommon.h" - /* From filecommon */ #define XkbXKMFile 0 diff --git a/test/filecomp.c b/test/filecomp.c index e5538af..370c4b2 100644 --- a/test/filecomp.c +++ b/test/filecomp.c @@ -32,8 +32,6 @@ authorization from the authors. #include <string.h> #include <errno.h> #include <fcntl.h> -#include <X11/X.h> -#include <X11/Xdefs.h> #include "xkbcommon/xkbcommon.h" #include "utils.h" diff --git a/test/namescomp.c b/test/namescomp.c index 95dcecc..bd81447 100644 --- a/test/namescomp.c +++ b/test/namescomp.c @@ -26,8 +26,6 @@ authorization from the authors. #include <stdlib.h> #include <stdio.h> -#include <X11/X.h> -#include <X11/Xdefs.h> #include "xkbcommon/xkbcommon.h" #include "utils.h" diff --git a/test/rulescomp.c b/test/rulescomp.c index 0a84c94..c761a49 100644 --- a/test/rulescomp.c +++ b/test/rulescomp.c @@ -26,7 +26,6 @@ authorization from the authors. #include <stdlib.h> #include <stdio.h> -#include <X11/X.h> #include <X11/Xdefs.h> #include "xkbcommon/xkbcommon.h" #include "utils.h" diff --git a/test/state.c b/test/state.c index 476ee18..5c6d1f5 100644 --- a/test/state.c +++ b/test/state.c @@ -26,8 +26,6 @@ #include <assert.h> #include <stdio.h> #include <stdlib.h> -#include <X11/X.h> -#include <X11/Xdefs.h> #include <X11/keysym.h> #include <linux/input.h> #include "xkbcommon/xkbcommon.h" |