[Xquartz-changes] xserver: Branch 'master' - 6 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Wed Feb 10 13:44:00 PST 2010


 dix/devices.c            |   44 ++-
 dix/getevents.c          |    2 
 hw/xfree86/parser/scan.c |   16 -
 include/xkbsrv.h         |    5 
 xkb/XKBAlloc.c           |   12 
 xkb/XKBGAlloc.c          |   32 +-
 xkb/XKBMisc.c            |   48 +--
 xkb/XKM_file_format.txt  |  684 +++++++++++++++++++++++++++++++++++++++++++++++
 xkb/ddxBeep.c            |    2 
 xkb/ddxList.c            |    6 
 xkb/ddxLoad.c            |   18 -
 xkb/maprules.c           |   86 ++---
 xkb/xkb.c                |   94 +++---
 xkb/xkbAccessX.c         |   30 +-
 xkb/xkbActions.c         |   38 +-
 xkb/xkbEvents.c          |    6 
 xkb/xkbInit.c            |   30 +-
 xkb/xkbLEDs.c            |   32 +-
 xkb/xkbUtils.c           |   20 -
 xkb/xkbfmisc.c           |   38 +-
 xkb/xkbout.c             |   68 ++--
 xkb/xkbtext.c            |   42 +-
 xkb/xkmread.c            |   28 +
 23 files changed, 1044 insertions(+), 337 deletions(-)

New commits:
commit 6ba97d9559d5fe03a99f84bd8e49f250b8d5193e
Author: Oliver McFadden <oliver.mcfadden at nokia.com>
Date:   Tue Feb 2 16:40:56 2010 +0200

    parser: corrected xf86getBoolValue to use case insensitive compare
    
    commit c6e8637e29e0ca11dfb35c02da7ca6002ac8c597 introduced this
    regression; it can cause existing config files to be parsed incorrectly.
    
    Acked-by: Julien Cristau <jcristau at debian.org>
    Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
    Signed-off-by: Oliver McFadden <oliver.mcfadden at nokia.com>

diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index b80fbfb..d25ada4 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -1195,21 +1195,21 @@ xf86getBoolValue(Bool *val, const char *str)
 	if (*str == '\0') {
 		*val = TRUE;
 	} else {
-		if (strcmp(str, "1") == 0)
+		if (xf86nameCompare(str, "1") == 0)
 			*val = TRUE;
-		else if (strcmp(str, "on") == 0)
+		else if (xf86nameCompare(str, "on") == 0)
 			*val = TRUE;
-		else if (strcmp(str, "true") == 0)
+		else if (xf86nameCompare(str, "true") == 0)
 			*val = TRUE;
-		else if (strcmp(str, "yes") == 0)
+		else if (xf86nameCompare(str, "yes") == 0)
 			*val = TRUE;
-		else if (strcmp(str, "0") == 0)
+		else if (xf86nameCompare(str, "0") == 0)
 			*val = FALSE;
-		else if (strcmp(str, "off") == 0)
+		else if (xf86nameCompare(str, "off") == 0)
 			*val = FALSE;
-		else if (strcmp(str, "false") == 0)
+		else if (xf86nameCompare(str, "false") == 0)
 			*val = FALSE;
-		else if (strcmp(str, "no") == 0)
+		else if (xf86nameCompare(str, "no") == 0)
 			*val = FALSE;
 		else
 			return FALSE;
commit db687f718f760ba254ab51994769db101dc9ca3a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Jan 15 10:07:38 2010 +1000

    xkb: sed True -> TRUE and False -> FALSE
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>

diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index c309465..278ff76 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -309,11 +309,6 @@ extern	_X_EXPORT int	DeviceButtonPress,DeviceButtonRelease;
 
 #define	Status		int
 
-#ifndef True
-#define	True	TRUE
-#define	False	FALSE
-#endif
-
 extern _X_EXPORT void XkbUseMsg(
     void
 );
diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c
index 6464e99..d40aa33 100644
--- a/xkb/XKBAlloc.c
+++ b/xkb/XKBAlloc.c
@@ -315,22 +315,22 @@ XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll)
     if (freeAll)
 	which= XkbAllComponentsMask;
     if (which&XkbClientMapMask)
-	XkbFreeClientMap(xkb,XkbAllClientInfoMask,True);
+	XkbFreeClientMap(xkb,XkbAllClientInfoMask,TRUE);
     if (which&XkbServerMapMask)
-	XkbFreeServerMap(xkb,XkbAllServerInfoMask,True);
+	XkbFreeServerMap(xkb,XkbAllServerInfoMask,TRUE);
     if (which&XkbCompatMapMask)
-	XkbFreeCompatMap(xkb,XkbAllCompatMask,True);
+	XkbFreeCompatMap(xkb,XkbAllCompatMask,TRUE);
     if (which&XkbIndicatorMapMask)
 	XkbFreeIndicatorMaps(xkb);
     if (which&XkbNamesMask)
-	XkbFreeNames(xkb,XkbAllNamesMask,True);
+	XkbFreeNames(xkb,XkbAllNamesMask,TRUE);
     if ((which&XkbGeometryMask) && (xkb->geom!=NULL)) {
-	XkbFreeGeometry(xkb->geom,XkbGeomAllMask,True);
+	XkbFreeGeometry(xkb->geom,XkbGeomAllMask,TRUE);
         /* PERHAPS BONGHITS etc */
         xkb->geom = NULL;
     }
     if (which&XkbControlsMask)
-	XkbFreeControls(xkb,XkbAllControlsMask,True);
+	XkbFreeControls(xkb,XkbAllControlsMask,TRUE);
     if (freeAll)
 	xfree(xkb);
     return;
diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
index 0bab39a..b01005d 100644
--- a/xkb/XKBGAlloc.c
+++ b/xkb/XKBGAlloc.c
@@ -218,7 +218,7 @@ _XkbClearOutline(char *outline_in)
 XkbOutlinePtr	outline= (XkbOutlinePtr)outline_in;
 
     if (outline->points!=NULL)
-	XkbFreeGeomPoints(outline,0,outline->num_points,True);
+	XkbFreeGeomPoints(outline,0,outline->num_points,TRUE);
     return;
 }
 
@@ -241,7 +241,7 @@ _XkbClearShape(char *shape_in)
 XkbShapePtr	shape= (XkbShapePtr)shape_in;
 
     if (shape->outlines)
-	XkbFreeGeomOutlines(shape,0,shape->num_outlines,True);
+	XkbFreeGeomOutlines(shape,0,shape->num_outlines,TRUE);
     return;
 }
 
@@ -275,7 +275,7 @@ _XkbClearOverlayRow(char *row_in)
 XkbOverlayRowPtr	row= (XkbOverlayRowPtr)row_in;
 
     if (row->keys!=NULL)
-	XkbFreeGeomOverlayKeys(row,0,row->num_keys,True);
+	XkbFreeGeomOverlayKeys(row,0,row->num_keys,TRUE);
     return;
 }
 
@@ -297,7 +297,7 @@ _XkbClearOverlay(char *overlay_in)
 XkbOverlayPtr	overlay= (XkbOverlayPtr)overlay_in;
 
     if (overlay->rows!=NULL)
-	XkbFreeGeomOverlayRows(overlay,0,overlay->num_rows,True);
+	XkbFreeGeomOverlayRows(overlay,0,overlay->num_rows,TRUE);
     return;
 }
 
@@ -331,7 +331,7 @@ _XkbClearRow(char *row_in)
 XkbRowPtr	row= (XkbRowPtr)row_in;
 
     if (row->keys!=NULL)
-	XkbFreeGeomKeys(row,0,row->num_keys,True);
+	XkbFreeGeomKeys(row,0,row->num_keys,TRUE);
     return;
 }
 
@@ -352,9 +352,9 @@ _XkbClearSection(char *section_in)
 XkbSectionPtr	section= (XkbSectionPtr)section_in;
 
     if (section->rows!=NULL)
-	XkbFreeGeomRows(section,0,section->num_rows,True);
+	XkbFreeGeomRows(section,0,section->num_rows,TRUE);
     if (section->doodads!=NULL) {
-	XkbFreeGeomDoodads(section->doodads,section->num_doodads,True);
+	XkbFreeGeomDoodads(section->doodads,section->num_doodads,TRUE);
 	section->doodads= NULL;
     }
     return;
@@ -426,20 +426,20 @@ XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap)
     if (freeMap)
 	which= XkbGeomAllMask;
     if ((which&XkbGeomPropertiesMask)&&(geom->properties!=NULL))
-	XkbFreeGeomProperties(geom,0,geom->num_properties,True);
+	XkbFreeGeomProperties(geom,0,geom->num_properties,TRUE);
     if ((which&XkbGeomColorsMask)&&(geom->colors!=NULL))
-	XkbFreeGeomColors(geom,0,geom->num_colors,True);
+	XkbFreeGeomColors(geom,0,geom->num_colors,TRUE);
     if ((which&XkbGeomShapesMask)&&(geom->shapes!=NULL))
-	XkbFreeGeomShapes(geom,0,geom->num_shapes,True);
+	XkbFreeGeomShapes(geom,0,geom->num_shapes,TRUE);
     if ((which&XkbGeomSectionsMask)&&(geom->sections!=NULL))
-	XkbFreeGeomSections(geom,0,geom->num_sections,True);
+	XkbFreeGeomSections(geom,0,geom->num_sections,TRUE);
     if ((which&XkbGeomDoodadsMask)&&(geom->doodads!= NULL)) {
-	XkbFreeGeomDoodads(geom->doodads,geom->num_doodads,True);
+	XkbFreeGeomDoodads(geom->doodads,geom->num_doodads,TRUE);
 	geom->doodads= NULL;
 	geom->num_doodads= geom->sz_doodads= 0;
     }
     if ((which&XkbGeomKeyAliasesMask)&&(geom->key_aliases!=NULL))
-	XkbFreeGeomKeyAliases(geom,0,geom->num_key_aliases,True);
+	XkbFreeGeomKeyAliases(geom,0,geom->num_key_aliases,TRUE);
     if (freeMap) {
 	if (geom->label_font!=NULL) {
 	    xfree(geom->label_font);
@@ -646,7 +646,7 @@ Status		rtrn;
     }
     return Success;
 BAIL:
-    XkbFreeGeometry(geom,XkbGeomAllMask,True);
+    XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
     xkb->geom= NULL;
     return rtrn;
 }
@@ -919,9 +919,9 @@ Bool		found;
     if (row->row_under>=section->num_rows)
 	return NULL;
     row_under= &section->rows[row->row_under];
-    for (i=0,found=False;i<row_under->num_keys;i++) {
+    for (i=0,found=FALSE;i<row_under->num_keys;i++) {
 	if (strncmp(under,row_under->keys[i].name.name,XkbKeyNameLength)==0) {
-	    found= True;
+	    found= TRUE;
 	    break;
 	}
     }
diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c
index c1a17c0..2bb4a24 100644
--- a/xkb/XKBMisc.c
+++ b/xkb/XKBMisc.c
@@ -187,7 +187,7 @@ BOOL		replicated = FALSE;
 	if (syms[0]==NoSymbol) {
 	    register int n;
 	    Bool	found;
-	    for (n=1,found=False;(!found)&&(n<nSyms[i]);n++) {
+	    for (n=1,found=FALSE;(!found)&&(n<nSyms[i]);n++) {
 		found= (syms[n]!=NoSymbol);
 	    }
 	    if (!found)
@@ -227,27 +227,27 @@ BOOL		replicated = FALSE;
      * the core replication.
      */
     if (nGroups>1) {
-	Bool sameType,allOneLevel, canonical = True;
+	Bool sameType,allOneLevel, canonical = TRUE;
 	allOneLevel= (xkb->map->types[types_inout[0]].num_levels==1);
-	for (i=1,sameType=True;(allOneLevel||sameType)&&(i<nGroups);i++) {
+	for (i=1,sameType=TRUE;(allOneLevel||sameType)&&(i<nGroups);i++) {
 	    sameType=(sameType&&(types_inout[i]==types_inout[XkbGroup1Index]));
 	    if (allOneLevel)
 		allOneLevel= (xkb->map->types[types_inout[i]].num_levels==1);
 	    if (types_inout[i] > XkbLastRequiredType)
-		canonical = False;
+		canonical = FALSE;
 	}
 	if (((sameType) || canonical)&&
 	    (!(protected&(XkbExplicitKeyTypesMask&~XkbExplicitKeyType1Mask)))){
 	    register int s;
 	    Bool	identical;
-	    for (i=1,identical=True;identical&&(i<nGroups);i++) {
+	    for (i=1,identical=TRUE;identical&&(i<nGroups);i++) {
 		KeySym *syms;
                 if (nSyms[i] != nSyms[XkbGroup1Index])
-                    identical = False;
+                    identical = FALSE;
 		syms= &xkb_syms_rtrn[XKB_OFFSET(i,0)];
 		for (s=0;identical&&(s<nSyms[i]);s++) {
 		    if (syms[s]!=xkb_syms_rtrn[s])
-			identical= False;
+			identical= FALSE;
 		}
 	    }
 	    if (identical)
@@ -374,16 +374,16 @@ unsigned		changed,tmp;
     if ((!xkb)||(!xkb->map)||(!xkb->map->key_sym_map)||
     			(!xkb->compat)||(!xkb->compat->sym_interpret)||
 			(key<xkb->min_key_code)||(key>xkb->max_key_code)) {
-	return False;
+	return FALSE;
     }
     if (((!xkb->server)||(!xkb->server->key_acts))&&
 		(XkbAllocServerMap(xkb,XkbAllServerInfoMask,0)!=Success)) {
-	return False;
+	return FALSE;
     }
     changed= 0;	/* keeps track of what has changed in _this_ call */
     explicit= xkb->server->explicit[key];
     if (explicit&XkbExplicitInterpretMask) /* nothing to do */
-	return True;
+	return TRUE;
     mods= (xkb->map->modmap?xkb->map->modmap[key]:0);
     nSyms= XkbKeyNumSyms(xkb,key);
     syms= XkbKeySymsPtr(xkb,key);
@@ -423,7 +423,7 @@ unsigned		changed,tmp;
 	if (!pActs) {
             if (nSyms > IBUF_SIZE)
                 xfree(interps);
-	    return False;
+	    return FALSE;
         }
 	new_vmodmask= 0;
 	for (n=0;n<nSyms;n++) {
@@ -508,7 +508,7 @@ unsigned		changed,tmp;
     }
     if (interps!=ibuf)
 	xfree(interps);
-    return True;
+    return TRUE;
 }
 
 Status
@@ -642,19 +642,19 @@ register int i,bit;
 register unsigned mask;
 
     if (xkb==NULL)
-	return False;
+	return FALSE;
     if (virtual_mask==0) {
 	*mask_rtrn= 0;
-	return True;
+	return TRUE;
     }
     if (xkb->server==NULL)
-	return False;
+	return FALSE;
     for (i=mask=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
 	if (virtual_mask&bit)
 	    mask|= xkb->server->vmods[i];
     }
     *mask_rtrn= mask;
-    return True;
+    return TRUE;
 }
 
 /***====================================================================***/
@@ -670,7 +670,7 @@ unsigned int	tmp;
 		XkbVirtualModsToReal(xkb,tmp,&tmp);
 		act->mods.mask= act->mods.real_mods;
 		act->mods.mask|= tmp;
-		return True;
+		return TRUE;
 	    }
 	    break;
 	case XkbSA_ISOLock:
@@ -678,11 +678,11 @@ unsigned int	tmp;
 		XkbVirtualModsToReal(xkb,tmp,&tmp);
 		act->iso.mask= act->iso.real_mods;
 		act->iso.mask|= tmp;
-		return True;
+		return TRUE;
 	    }
 	    break;
     }
-    return False;
+    return FALSE;
 }
 
 static void
@@ -740,7 +740,7 @@ register int	i;
 unsigned int	checkState = 0;
 
     if ((!xkb) || (!xkb->map) || (changed==0))
-	return False;
+	return FALSE;
     for (i=0;i<xkb->map->num_types;i++) {
 	if (xkb->map->types[i].mods.vmods & changed)
 	XkbUpdateKeyTypeVirtualMods(xkb,&xkb->map->types[i],changed,changes);
@@ -753,7 +753,7 @@ unsigned int	checkState = 0;
 	    xkb->ctrls->internal.mask= newMask;
 	    if (changes) {
 		changes->ctrls.changed_ctrls|= XkbInternalModsMask;
-		checkState= True;
+		checkState= TRUE;
 	    }
 	}
     }
@@ -765,7 +765,7 @@ unsigned int	checkState = 0;
 	    xkb->ctrls->ignore_lock.mask= newMask;
 	    if (changes) {
 		changes->ctrls.changed_ctrls|= XkbIgnoreLockModsMask;
-		checkState= True;
+		checkState= TRUE;
 	    }
 	}
     }
@@ -781,7 +781,7 @@ unsigned int	checkState = 0;
 		    map->mods.mask= newMask;
 		    if (changes) {
 			changes->indicators.map_changes|= (1<<i);
-			checkState= True;
+			checkState= TRUE;
 		    }
 		}
 	    }
@@ -798,7 +798,7 @@ unsigned int	checkState = 0;
 		compat->groups[i].mask= newMask;
 		if (changes) {
 		    changes->compat.changed_groups|= (1<<i);
-		    checkState= True;
+		    checkState= TRUE;
 		}
 	    }
 	}
diff --git a/xkb/ddxBeep.c b/xkb/ddxBeep.c
index 10a7317..6f74cb5 100644
--- a/xkb/ddxBeep.c
+++ b/xkb/ddxBeep.c
@@ -89,7 +89,7 @@ static  char 	doesPitch = 1;
 #define	STICKY_UNLOCK	"AX_StickyUnlock"
 #define	BOUNCE_REJECT	"AX_BounceKeyReject"
 
-#define	MAKE_ATOM(a)	MakeAtom(a,sizeof(a)-1,True)
+#define	MAKE_ATOM(a)	MakeAtom(a,sizeof(a)-1,TRUE)
 
 static void
 _XkbDDXBeepInitAtoms(void)
diff --git a/xkb/ddxList.c b/xkb/ddxList.c
index bf49311..e212ea3 100644
--- a/xkb/ddxList.c
+++ b/xkb/ddxList.c
@@ -148,7 +148,7 @@ char	tmpname[PATH_MAX];
     }
 
     in= NULL;
-    haveDir= True;
+    haveDir= TRUE;
 #ifdef WIN32
     strcpy(tmpname, Win32TempDir());
     strcat(tmpname, "\\xkb_XXXXXX");
@@ -160,7 +160,7 @@ char	tmpname[PATH_MAX];
 	    in= fopen(buf,"r");
 	}
 	if (!in) {
-	    haveDir= False;
+	    haveDir= FALSE;
 	    buf = Xprintf(
 		"'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg,
                 XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long)
@@ -175,7 +175,7 @@ char	tmpname[PATH_MAX];
 	    in= fopen(buf,"r");
 	}
 	if (!in) {
-	    haveDir= False;
+	    haveDir= FALSE;
 	    buf = Xprintf(
 		"xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg,
                 componentDirs[what],(long)
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index 72aff2a..4ccddda 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -266,7 +266,7 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
 	    }
             if (buf != NULL)
                 xfree (buf);
-	    return True;
+	    return TRUE;
 	}
 	else
 	    LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
@@ -286,7 +286,7 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
 	nameRtrn[0]= '\0';
     if (buf != NULL)
         xfree (buf);
-    return False;
+    return FALSE;
 }
 
 static FILE *
@@ -386,38 +386,38 @@ Bool		complete;
 XkbRF_RulesPtr	rules;
 
     if (!rules_name)
-	return False;
+	return FALSE;
 
     if (strlen(XkbBaseDirectory) + strlen(rules_name) + 8 > PATH_MAX) {
         LogMessage(X_ERROR, "XKB: Rules name is too long\n");
-        return False;
+        return FALSE;
     }
     sprintf(buf,"%s/rules/%s", XkbBaseDirectory, rules_name);
 
     file = fopen(buf, "r");
     if (!file) {
         LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", buf);
-	return False;
+	return FALSE;
     }
 
     rules = XkbRF_Create();
     if (!rules) {
         LogMessage(X_ERROR, "XKB: Couldn't create rules struct\n");
 	fclose(file);
-	return False;
+	return FALSE;
     }
 
     if (!XkbRF_LoadRules(file, rules)) {
         LogMessage(X_ERROR, "XKB: Couldn't parse rules file %s\n", rules_name);
 	fclose(file);
-	XkbRF_Free(rules,True);
-	return False;
+	XkbRF_Free(rules,TRUE);
+	return FALSE;
     }
 
     memset(names, 0, sizeof(*names));
     complete = XkbRF_GetComponents(rules,defs,names);
     fclose(file);
-    XkbRF_Free(rules, True);
+    XkbRF_Free(rules, TRUE);
 
     if (!complete)
         LogMessage(X_ERROR, "XKB: Rules returned no components\n");
diff --git a/xkb/maprules.c b/xkb/maprules.c
index ec6fe3f..3467c42 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -113,15 +113,15 @@ GetInputLine(FILE *file,InputLine *line,Bool checkbang)
 int	ch;
 Bool	endOfFile,spacePending,slashPending,inComment;
 
-     endOfFile= False;
+     endOfFile= FALSE;
      while ((!endOfFile)&&(line->num_line==0)) {
-	spacePending= slashPending= inComment= False;
+	spacePending= slashPending= inComment= FALSE;
 	while (((ch=getc(file))!='\n')&&(ch!=EOF)) {
 	    if (ch=='\\') {
 		if ((ch=getc(file))==EOF)
 		    break;
 		if (ch=='\n') {
-		    inComment= False;
+		    inComment= FALSE;
 		    ch= ' ';
 		    line->line_num++;
 		}
@@ -130,21 +130,21 @@ Bool	endOfFile,spacePending,slashPending,inComment;
 		continue;
 	    if (ch=='/') {
 		if (slashPending) {
-		    inComment= True;
-		    slashPending= False;
+		    inComment= TRUE;
+		    slashPending= FALSE;
 		}
 		else {
-		    slashPending= True;
+		    slashPending= TRUE;
 		}
 		continue;
 	    }
 	    else if (slashPending) {
 		if (spacePending) {
 		    ADD_CHAR(line,' ');
-		    spacePending= False;
+		    spacePending= FALSE;
 		}
 		ADD_CHAR(line,'/');
-		slashPending= False;
+		slashPending= FALSE;
 	    }
 	    if (isspace(ch)) {
 		while (isspace(ch)&&(ch!='\n')&&(ch!=EOF)) {
@@ -153,13 +153,13 @@ Bool	endOfFile,spacePending,slashPending,inComment;
 		if (ch==EOF)
 		    break;
 		if ((ch!='\n')&&(line->num_line>0))
-		    spacePending= True;
+		    spacePending= TRUE;
 		ungetc(ch,file);
 	    }
 	    else {
 		if (spacePending) {
 		    ADD_CHAR(line,' ');
-		    spacePending= False;
+		    spacePending= FALSE;
 		}
 		if (checkbang && ch=='!') {
 		    if (line->num_line!=0) {
@@ -175,13 +175,13 @@ Bool	endOfFile,spacePending,slashPending,inComment;
 	    }
 	}
 	if (ch==EOF)
-	     endOfFile= True;
+	     endOfFile= TRUE;
 /*	else line->num_line++;*/
      }
      if ((line->num_line==0)&&(endOfFile))
-	return False;
+	return FALSE;
       ADD_CHAR(line,'\0');
-      return True;
+      return TRUE;
 }
 
 /***====================================================================***/
@@ -273,7 +273,7 @@ Bool		found;
    bzero((char *)remap,sizeof(RemapSpec));
    remap->number = len;
    while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) {
-	found= False;
+	found= FALSE;
 	str= NULL;
 	if (strcmp(tok,"=")==0)
 	    continue;
@@ -294,7 +294,7 @@ Bool		found;
                 } else {
 		    ndx = 0;
                 }
-		found= True;
+		found= TRUE;
 		if (present&(1<<i)) {
 		    if ((i == LAYOUT && l_ndx_present&(1<<ndx)) ||
 			(i == VARIANT && v_ndx_present&(1<<ndx)) ) {
@@ -358,9 +358,9 @@ int	want_len= strlen(wanted);
 	    len= strlen(str);
 	}
 	if ((len==want_len)&&(strncmp(wanted,str,len)==0))
-	    return True;
+	    return TRUE;
     }
-    return False;
+    return FALSE;
 }
 
 /***====================================================================***/
@@ -375,7 +375,7 @@ char *		str,*tok;
 register int	nread, i;
 FileSpec	tmp;
 _Xstrtokparams	strtok_buf;
-Bool 		append = False;
+Bool 		append = FALSE;
 
     if (line->line[0]=='!') {
         if (line->line[1] == '$' ||
@@ -383,14 +383,14 @@ Bool 		append = False;
             char *gname = strchr(line->line, '$');
             char *words = strchr(gname, ' ');
             if(!words)
-                return False;
+                return FALSE;
             *words++ = '\0';
             for (; *words; words++) {
                 if (*words != '=' && *words != ' ')
                     break;
             }
             if (*words == '\0')
-                return False;
+                return FALSE;
             group->name = _XkbDupString(gname);
             group->words = _XkbDupString(words);
             for (i = 1, words = group->words; *words; words++) {
@@ -400,17 +400,17 @@ Bool 		append = False;
                  }
             }
             group->number = i;
-            return True;
+            return TRUE;
         } else {
 	    SetUpRemap(line,remap);
-	    return False;
+	    return FALSE;
         }
     }
 
     if (remap->num_remap==0) {
 	DebugF("Must have a mapping before first line of data\n");
 	DebugF("Illegal line of data ignored\n");
-	return False;
+	return FALSE;
     }
     bzero((char *)&tmp,sizeof(FileSpec));
     str= line->line;
@@ -427,12 +427,12 @@ Bool 		append = False;
 	}
 	tmp.name[remap->remap[nread].word]= tok;
 	if (*tok == '+' || *tok == '|')
-	    append = True;
+	    append = TRUE;
     }
     if (nread<remap->num_remap) {
 	DebugF("Too few words on a line: %s\n", line->line);
 	DebugF("line ignored\n");
-	return False;
+	return FALSE;
     }
 
     rule->flags= 0;
@@ -463,7 +463,7 @@ Bool 		append = False;
 	        rule->variant_num = remap->remap[i].index;
         }
     }
-    return True;
+    return TRUE;
 }
 
 static char *
@@ -508,7 +508,7 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
            int i;
            mdefs->layout[1] = _XkbDupString(defs->layout);
 	   if (mdefs->layout[1] == NULL)
-	      return False;
+	      return FALSE;
            squeeze_spaces(mdefs->layout[1]);
            p = mdefs->layout[1];
            for (i = 2; i <= XkbNumKbdGroups; i++) {
@@ -532,7 +532,7 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
            int i;
            mdefs->variant[1] = _XkbDupString(defs->variant);
 	   if (mdefs->variant[1] == NULL)
-	      return False;
+	      return FALSE;
            squeeze_spaces(mdefs->variant[1]);
            p = mdefs->variant[1];
            for (i = 2; i <= XkbNumKbdGroups; i++) {
@@ -547,7 +547,7 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
               *p = '\0';
        }
    }
-   return True;
+   return TRUE;
 }
 
 static void
@@ -599,13 +599,13 @@ CheckGroup(	XkbRF_RulesPtr          rules,
        }
    }
    if (i == rules->num_groups)
-       return False;
+       return FALSE;
    for (i = 0, p = group->words; i < group->number; i++, p += strlen(p)+1) {
        if (! strcmp(p, name)) {
-           return True;
+           return TRUE;
        }
    }
-   return False;
+   return FALSE;
 }
 
 static int
@@ -614,13 +614,13 @@ XkbRF_CheckApplyRule(	XkbRF_RulePtr 		rule,
 			XkbComponentNamesPtr	names,
 			XkbRF_RulesPtr          rules)
 {
-    Bool pending = False;
+    Bool pending = FALSE;
 
     if (rule->model != NULL) {
         if(mdefs->model == NULL)
             return 0;
         if (strcmp(rule->model, "*") == 0) {
-            pending = True;
+            pending = TRUE;
         } else {
             if (rule->model[0] == '$') {
                if (!CheckGroup(rules, rule->model, mdefs->model))
@@ -643,7 +643,7 @@ XkbRF_CheckApplyRule(	XkbRF_RulePtr 		rule,
 	   *mdefs->layout[rule->layout_num] == '\0')
 	    return 0;
         if (strcmp(rule->layout, "*") == 0) {
-            pending = True;
+            pending = TRUE;
         } else {
             if (rule->layout[0] == '$') {
                if (!CheckGroup(rules, rule->layout,
@@ -660,7 +660,7 @@ XkbRF_CheckApplyRule(	XkbRF_RulePtr 		rule,
 	    *mdefs->variant[rule->variant_num] == '\0')
 	    return 0;
         if (strcmp(rule->variant, "*") == 0) {
-            pending = True;
+            pending = TRUE;
         } else {
             if (rule->variant[0] == '$') {
                if (!CheckGroup(rules, rule->variant,
@@ -911,11 +911,11 @@ XkbRF_RuleRec	trule,*rule;
 XkbRF_GroupRec  tgroup,*group;
 
     if (!(rules && file))
-	return False;
+	return FALSE;
     bzero((char *)&remap,sizeof(RemapSpec));
     bzero((char *)&tgroup,sizeof(XkbRF_GroupRec));
     InitInputLine(&line);
-    while (GetInputLine(file,&line,True)) {
+    while (GetInputLine(file,&line,TRUE)) {
 	if (CheckLine(&line,&remap,&trule,&tgroup)) {
             if (tgroup.number) {
 	        if ((group= XkbRF_AddGroup(rules))!=NULL) {
@@ -932,7 +932,7 @@ XkbRF_GroupRec  tgroup,*group;
 	line.num_line= 0;
     }
     FreeInputLine(&line);
-    return True;
+    return TRUE;
 }
 
 Bool
@@ -943,15 +943,15 @@ char		buf[PATH_MAX];
 Bool		ok;
 
     if ((!base)||(!rules))
-	return False;
+	return FALSE;
     if (locale) {
 	if (strlen(base)+strlen(locale)+2 > PATH_MAX)
-	    return False;
+	    return FALSE;
 	sprintf(buf,"%s-%s", base, locale);
     }
     else {
 	if (strlen(base)+1 > PATH_MAX)
-	    return False;
+	    return FALSE;
 	strcpy(buf,base);
     }
 
@@ -961,7 +961,7 @@ Bool		ok;
 	file= fopen(buf, "r");
     }
     if (!file)
-	return False;
+	return FALSE;
     ok= XkbRF_LoadRules(file,rules);
     fclose(file);
     return ok;
diff --git a/xkb/xkb.c b/xkb/xkb.c
index ec26d6e..29052bf 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -637,10 +637,10 @@ ProcXkbLatchLockState(ClientPtr client)
                 sn.requestMinor = X_kbLatchLockState;
                 sn.changed = changed;
                 XkbSendStateNotify(tmpd, &sn);
-                changed = XkbIndicatorsToUpdate(tmpd, changed, False);
+                changed = XkbIndicatorsToUpdate(tmpd, changed, FALSE);
                 if (changed) {
                     XkbSetCauseXkbReq(&cause, X_kbLatchLockState, client);
-                    XkbUpdateIndicators(tmpd, changed, True, NULL, &cause);
+                    XkbUpdateIndicators(tmpd, changed, TRUE, NULL, &cause);
 	        }
             }
         }
@@ -922,7 +922,7 @@ ProcXkbSetControls(ClientPtr client)
             *ctrl= new;
             XkbDDXChangeControls(tmpd, &old, ctrl);
 
-            if (XkbComputeControlsNotify(tmpd, &old, ctrl, &cn, False)) {
+            if (XkbComputeControlsNotify(tmpd, &old, ctrl, &cn, FALSE)) {
                 cn.keycode = 0;
                 cn.eventType = 0;
                 cn.requestMajor = XkbReqCode;
@@ -932,13 +932,13 @@ ProcXkbSetControls(ClientPtr client)
 
             sli = XkbFindSrvLedInfo(tmpd, XkbDfltXIClass, XkbDfltXIId, 0);
             if (sli)
-                XkbUpdateIndicators(tmpd, sli->usesControls, True, NULL,
+                XkbUpdateIndicators(tmpd, sli->usesControls, TRUE, NULL,
                                     &cause);
 
             /* If sticky keys were disabled, clear all locks and latches */
             if ((old.enabled_ctrls & XkbStickyKeysMask) &&
                 !(ctrl->enabled_ctrls & XkbStickyKeysMask))
-                XkbClearAllLatchesAndLocks(tmpd, xkbi, True, &cause);
+                XkbClearAllLatchesAndLocks(tmpd, xkbi, TRUE, &cause);
         }
     }
 
@@ -2115,7 +2115,7 @@ unsigned		first,last;
 	cn.requestMinor= X_kbSetMap;
 	old= *xkb->ctrls;
 	xkb->ctrls->num_groups= s;
-	if (XkbComputeControlsNotify(dev,&old,xkb->ctrls,&cn,False))
+	if (XkbComputeControlsNotify(dev,&old,xkb->ctrls,&cn,FALSE))
 	    XkbSendControlsNotify(dev,&cn);
     }
     return (char *)wire;
@@ -2439,7 +2439,7 @@ _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char *values)
 
     XkbSetCauseXkbReq(&cause,X_kbSetMap,client);
     bzero(&change, sizeof(change));
-    sentNKN = False;
+    sentNKN = FALSE;
     if ((xkb->min_key_code!=req->minKeyCode)||
         (xkb->max_key_code!=req->maxKeyCode)) {
 	Status			status;
@@ -2457,7 +2457,7 @@ _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char *values)
 	nkn.requestMinor = X_kbSetMap;
 	nkn.changed = XkbNKN_KeycodesMask;
 	XkbSendNewKeyboardNotify(dev,&nkn);
-	sentNKN = True;
+	sentNKN = TRUE;
     }
 
     if (req->present&XkbKeyTypesMask) {
@@ -2727,7 +2727,7 @@ ProcXkbGetCompatMap(ClientPtr client)
 
 /**
  * Apply the given request on the given device.
- * If dryRun is True, then value checks are performed, but the device isn't
+ * If dryRun is TRUE, then value checks are performed, but the device isn't
  * modified.
  */
 static int
@@ -3218,7 +3218,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
     rep.deviceID = dev->id;
     rep.indicator= stuff->indicator;
     if (map!=NULL) {
-	rep.found= 		True;
+	rep.found= 		TRUE;
 	rep.on=			((sli->effectiveState&(1<<i))!=0);
 	rep.realIndicator=	((sli->physIndicators&(1<<i))!=0);
 	rep.ndx= 		i;
@@ -3230,12 +3230,12 @@ ProcXkbGetNamedIndicator(ClientPtr client)
 	rep.realMods= 		map->mods.real_mods;
 	rep.virtualMods= 	map->mods.vmods;
 	rep.ctrls= 		map->ctrls;
-	rep.supported= 		True;
+	rep.supported= 		TRUE;
     }
     else  {
-	rep.found= 		False;
-	rep.on= 		False;
-	rep.realIndicator= 	False;
+	rep.found= 		FALSE;
+	rep.on= 		FALSE;
+	rep.realIndicator= 	FALSE;
 	rep.ndx= 		XkbNoIndicator;
 	rep.flags= 		0;
 	rep.whichGroups= 	0;
@@ -3245,7 +3245,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
 	rep.realMods= 		0;
 	rep.virtualMods= 	0;
 	rep.ctrls= 		0;
-	rep.supported= 		True;
+	rep.supported= 		TRUE;
     }
     if ( client->swapped ) {
 	register int n;
@@ -3291,7 +3291,7 @@ _XkbFindNamedIndicatorMap(XkbSrvLedInfoPtr sli, Atom indicator,
 }
 
 /**
- * Creates an indicator map on the device. If dryRun is True, it only checks
+ * Creates an indicator map on the device. If dryRun is TRUE, it only checks
  * if creation is possible, but doesn't actually create it.
  */
 static int
@@ -3863,8 +3863,8 @@ const char *	str;
     str= NameForAtom(name);
     if ((strcmp(str,"ONE_LEVEL")==0)||(strcmp(str,"TWO_LEVEL")==0)||
 	(strcmp(str,"ALPHABETIC")==0)||(strcmp(str,"KEYPAD")==0))
-	return False;
-    return True;
+	return FALSE;
+    return TRUE;
 }
 
 /**
@@ -4703,7 +4703,7 @@ int	len;
 	len+= XkbSizeGeomDoodads(geom->num_doodads,geom->doodads);
 	len+= XkbSizeGeomKeyAliases(geom);
 	rep->length= len/4;
-	rep->found= True;
+	rep->found= TRUE;
 	rep->name= geom->name;
 	rep->widthMM= geom->width_mm;
 	rep->heightMM= geom->height_mm;
@@ -4718,7 +4718,7 @@ int	len;
     }
     else {
 	rep->length= 0;
-	rep->found= False;
+	rep->found= FALSE;
 	rep->name= name;
 	rep->widthMM= rep->heightMM= 0;
 	rep->nProperties= rep->nColors= rep->nShapes= 0;
@@ -4786,7 +4786,7 @@ XkbSendGeometry(	ClientPtr		client,
     if (start!=NULL)
 	xfree((char *)start);
     if (freeGeom)
-	XkbFreeGeometry(geom,XkbGeomAllMask,True);
+	XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
     return client->noClientException;
 }
 
@@ -5280,14 +5280,14 @@ _XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq *stuff)
     geom->width_mm= stuff->widthMM;
     geom->height_mm= stuff->heightMM;
     if ((status= _CheckSetGeom(geom,stuff,client))!=Success) {
-        XkbFreeGeometry(geom,XkbGeomAllMask,True);
+        XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
         xkb->geom= old;
         return status;
     }
     new_name= (xkb->names->geometry!=geom->name);
     xkb->names->geometry= geom->name;
     if (old)
-        XkbFreeGeometry(old,XkbGeomAllMask,True);
+        XkbFreeGeometry(old,XkbGeomAllMask,TRUE);
     if (new_name) {
         xkbNamesNotify	nn;
         bzero(&nn,sizeof(xkbNamesNotify));
@@ -5499,11 +5499,11 @@ ProcXkbListComponents(ClientPtr client)
     str= (unsigned char *)&stuff[1];
     bzero(&list,sizeof(XkbSrvListInfoRec));
     list.maxRtrn= stuff->maxNames;
-    list.pattern[_XkbListKeycodes]= GetComponentSpec(&str,False,&status);
-    list.pattern[_XkbListTypes]= GetComponentSpec(&str,False,&status);
-    list.pattern[_XkbListCompat]= GetComponentSpec(&str,False,&status);
-    list.pattern[_XkbListSymbols]= GetComponentSpec(&str,False,&status);
-    list.pattern[_XkbListGeometry]= GetComponentSpec(&str,False,&status);
+    list.pattern[_XkbListKeycodes]= GetComponentSpec(&str,FALSE,&status);
+    list.pattern[_XkbListTypes]= GetComponentSpec(&str,FALSE,&status);
+    list.pattern[_XkbListCompat]= GetComponentSpec(&str,FALSE,&status);
+    list.pattern[_XkbListSymbols]= GetComponentSpec(&str,FALSE,&status);
+    list.pattern[_XkbListGeometry]= GetComponentSpec(&str,FALSE,&status);
     if (status!=Success)
 	return status;
     len= str-((unsigned char *)stuff);
@@ -5587,13 +5587,13 @@ ProcXkbGetKbdByName(ClientPtr client)
     xkb = dev->key->xkbInfo->desc;
     status= Success;
     str= (unsigned char *)&stuff[1];
-    if (GetComponentSpec(&str,True,&status)) /* keymap, unsupported */
+    if (GetComponentSpec(&str,TRUE,&status)) /* keymap, unsupported */
         return BadMatch;
-    names.keycodes= GetComponentSpec(&str,True,&status);
-    names.types= GetComponentSpec(&str,True,&status);
-    names.compat= GetComponentSpec(&str,True,&status);
-    names.symbols= GetComponentSpec(&str,True,&status);
-    names.geometry= GetComponentSpec(&str,True,&status);
+    names.keycodes= GetComponentSpec(&str,TRUE,&status);
+    names.types= GetComponentSpec(&str,TRUE,&status);
+    names.compat= GetComponentSpec(&str,TRUE,&status);
+    names.symbols= GetComponentSpec(&str,TRUE,&status);
+    names.geometry= GetComponentSpec(&str,TRUE,&status);
     if (status!=Success)
 	return status;
     len= str-((unsigned char *)stuff);
@@ -5619,7 +5619,7 @@ ProcXkbGetKbdByName(ClientPtr client)
     geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0));
     if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) {
         names.geometry= _XkbDupString("%");
-        geom_changed= False;
+        geom_changed= FALSE;
     }
 
     bzero(mapFile,PATH_MAX);
@@ -5629,10 +5629,10 @@ ProcXkbGetKbdByName(ClientPtr client)
     rep.length = 0;
     rep.minKeyCode = xkb->min_key_code;
     rep.maxKeyCode = xkb->max_key_code;
-    rep.loaded=	False;
-    fwant= XkbConvertGetByNameComponents(True,stuff->want)|XkmVirtualModsMask;
-    fneed= XkbConvertGetByNameComponents(True,stuff->need);
-    rep.reported= XkbConvertGetByNameComponents(False,fwant|fneed);
+    rep.loaded=	FALSE;
+    fwant= XkbConvertGetByNameComponents(TRUE,stuff->want)|XkmVirtualModsMask;
+    fneed= XkbConvertGetByNameComponents(TRUE,stuff->need);
+    rep.reported= XkbConvertGetByNameComponents(FALSE,fwant|fneed);
     if (stuff->load) {
 	fneed|= XkmKeymapRequired;
 	fwant|= XkmKeymapLegal;
@@ -5645,7 +5645,7 @@ ProcXkbGetKbdByName(ClientPtr client)
     /* We pass dev in here so we can get the old names out if needed. */
     rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&new,
                                         mapFile,PATH_MAX);
-    rep.newKeyboard= False;
+    rep.newKeyboard= FALSE;
     rep.pad1= rep.pad2= rep.pad3= rep.pad4= 0;
 
     stuff->want|= stuff->need;
@@ -5653,7 +5653,7 @@ ProcXkbGetKbdByName(ClientPtr client)
 	rep.reported= 0;
     else {
 	if (stuff->load)
-	    rep.loaded= True;
+	    rep.loaded= TRUE;
 	if (stuff->load || 
 		((rep.reported&XkbGBN_SymbolsMask) && (new->compat))) {
 	    XkbChangesRec changes;
@@ -5789,7 +5789,7 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    grep.deviceID= dev->id;
 	    grep.sequenceNumber= client->sequence;
 	    grep.length= 0;
-	    grep.found= True;
+	    grep.found= TRUE;
 	    grep.pad= 0;
 	    grep.widthMM= grep.heightMM= 0;
 	    grep.nProperties= grep.nColors= grep.nShapes= 0;
@@ -5818,7 +5818,7 @@ ProcXkbGetKbdByName(ClientPtr client)
     if (reported&(XkbGBN_KeyNamesMask|XkbGBN_OtherNamesMask))
 	XkbSendNames(client,new,&nrep);
     if (reported&XkbGBN_GeometryMask)
-	XkbSendGeometry(client,new->geom,&grep,False);
+	XkbSendGeometry(client,new->geom,&grep,FALSE);
     if (rep.loaded) {
 	XkbDescPtr		old_xkb;
 	xkbNewKeyboardNotify 	nkn;
@@ -5883,7 +5883,7 @@ ProcXkbGetKbdByName(ClientPtr client)
 	}
     }
     if ((new!=NULL)&&(new!=xkb)) {
-	XkbFreeKeyboard(new,XkbAllComponentsMask,True);
+	XkbFreeKeyboard(new,XkbAllComponentsMask,TRUE);
 	new= NULL;
     }
     if (names.keycodes)	{ xfree(names.keycodes); names.keycodes= NULL; }
@@ -5944,10 +5944,10 @@ Bool			classOk;
 	    return XkbKeyboardErrorCode;
 	}
     }
-    classOk= False;
+    classOk= FALSE;
     if ((dev->kbdfeed)&&((class==KbdFeedbackClass)||(class==XkbAllXIClasses))) {
 	KbdFeedbackPtr kf;
-	classOk= True;
+	classOk= TRUE;
 	for (kf= dev->kbdfeed;(kf);kf=kf->next) {
 	    if ((id!=XkbAllXIIds)&&(id!=XkbDfltXIId)&&(id!=kf->ctrl.id))
 		continue;
@@ -5962,7 +5962,7 @@ Bool			classOk;
     }
     if ((dev->leds)&&((class==LedFeedbackClass)||(class==XkbAllXIClasses))) {
 	LedFeedbackPtr lf;
-	classOk= True;
+	classOk= TRUE;
 	for (lf= dev->leds;(lf);lf=lf->next) {
 	    if ((id!=XkbAllXIIds)&&(id!=XkbDfltXIId)&&(id!=lf->ctrl.id))
 		continue;
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 0d8e4eb..be1dcee 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -161,14 +161,14 @@ XkbSrvLedInfoPtr	sli;
 
     old= *ctrls;
     ctrls->enabled_ctrls |= (KRGControl&XkbAX_KRGMask);
-    if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,False))
+    if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
 	XkbSendControlsNotify(dev,pCN);
     cause.kc=		pCN->keycode;
     cause.event=	pCN->eventType;
     cause.mjr=		pCN->requestMajor;
     cause.mnr=		pCN->requestMinor;
     sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
-    XkbUpdateIndicators(dev,sli->usesControls,True,NULL,&cause);
+    XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
     if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask))
 	XkbDDXAccessXBeep(dev,_BEEP_FEATURE_ON,KRGControl);
     return;
@@ -193,14 +193,14 @@ XkbSrvLedInfoPtr	sli;
 
     old = *ctrls;
     ctrls->enabled_ctrls &= ~XkbAX_KRGMask;
-    if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,False))
+    if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
 	XkbSendControlsNotify(dev,pCN);
     cause.kc=		pCN->keycode;
     cause.event=	pCN->eventType;
     cause.mjr=		pCN->requestMajor;
     cause.mnr=		pCN->requestMinor;
     sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
-    XkbUpdateIndicators(dev,sli->usesControls,True,NULL,&cause);
+    XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
     if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
 	unsigned changes= old.enabled_ctrls^ctrls->enabled_ctrls;
 	XkbDDXAccessXBeep(dev,_BEEP_FEATURE_OFF,changes);
@@ -228,14 +228,14 @@ XkbSrvLedInfoPtr	sli;
     old = *ctrls;
     ctrls->enabled_ctrls |= XkbStickyKeysMask;
     xkbi->shiftKeyCount = 0;
-    if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,False)) 
+    if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
 	XkbSendControlsNotify(dev,pCN);
     cause.kc=		pCN->keycode;
     cause.event=	pCN->eventType;
     cause.mjr=		pCN->requestMajor;
     cause.mnr=		pCN->requestMinor;
     sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
-    XkbUpdateIndicators(dev,sli->usesControls,True,NULL,&cause);
+    XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
     if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
 	XkbDDXAccessXBeep(dev,_BEEP_FEATURE_ON,XkbStickyKeysMask);
     }
@@ -262,7 +262,7 @@ XkbSrvLedInfoPtr	sli;
     old = *ctrls;
     ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
     xkbi->shiftKeyCount = 0;
-    if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,False))
+    if (XkbComputeControlsNotify(dev,&old,ctrls,pCN,FALSE))
 	XkbSendControlsNotify(dev,pCN);
 
     cause.kc=		pCN->keycode;
@@ -270,12 +270,12 @@ XkbSrvLedInfoPtr	sli;
     cause.mjr=		pCN->requestMajor;
     cause.mnr=		pCN->requestMinor;
     sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
-    XkbUpdateIndicators(dev,sli->usesControls,True,NULL,&cause);
+    XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
     if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask)) {
 	XkbDDXAccessXBeep(dev,_BEEP_FEATURE_OFF,XkbStickyKeysMask);
     }
 #ifndef NO_CLEAR_LATCHES_FOR_STICKY_KEYS_OFF
-    XkbClearAllLatchesAndLocks(dev,xkbi,False,&cause);
+    XkbClearAllLatchesAndLocks(dev,xkbi,FALSE,&cause);
 #endif
     return;
 } /* AccessXStickyKeysTurnOff */
@@ -311,7 +311,7 @@ XkbSrvInfoPtr	xkbi = dev->key->xkbInfo;
     if (xkbi->repeatKey == 0)
 	return 0;
 
-    AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, True);
+    AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, TRUE);
 
     return xkbi->desc->ctrls->repeat_interval;
 }
@@ -346,7 +346,7 @@ XkbControlsPtr	ctrls;
 	XkbSendAccessXNotify(keybd,&ev);
 	if (XkbAX_NeedFeedback(ctrls,XkbAX_SKAcceptFBMask))
 	    XkbDDXAccessXBeep(keybd,_BEEP_SLOW_ACCEPT,XkbSlowKeysMask);
-	AccessXKeyboardEvent(keybd, ET_KeyPress,xkbi->slowKey,False);
+	AccessXKeyboardEvent(keybd, ET_KeyPress,xkbi->slowKey,FALSE);
 	/* check for magic sequences */
 	if ((ctrls->enabled_ctrls&XkbAccessXKeysMask) &&
 	    ((sym[0]==XK_Shift_R)||(sym[0]==XK_Shift_L)))
@@ -405,7 +405,7 @@ XkbSrvLedInfoPtr	sli;
 	ctrls->ax_options&= ~ctrls->axt_opts_mask;
 	ctrls->ax_options|= (ctrls->axt_opts_values&ctrls->axt_opts_mask);
     }
-    if (XkbComputeControlsNotify(dev,&old,ctrls,&cn,False)) {
+    if (XkbComputeControlsNotify(dev,&old,ctrls,&cn,FALSE)) {
 	cn.keycode = 0;
 	cn.eventType = 0;
 	cn.requestMajor = 0;
@@ -414,7 +414,7 @@ XkbSrvLedInfoPtr	sli;
     }
     XkbSetCauseUnknown(&cause);
     sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
-    XkbUpdateIndicators(dev,sli->usesControls,True,NULL,&cause);
+    XkbUpdateIndicators(dev,sli->usesControls,TRUE,NULL,&cause);
     if (ctrls->ax_options!=old.ax_options) {
 	unsigned set,cleared,bell;
 	set= ctrls->ax_options&(~old.ax_options);
@@ -751,11 +751,11 @@ DeviceEvent     *event = &ev->device_event;
 	XkbComputeDerivedState(xkbi);
 	changed |= XkbStateChangedFlags(&oldState,&xkbi->state);
 	if (changed&sli->usedComponents) {
-	    changed_leds= XkbIndicatorsToUpdate(dev,changed,False);
+	    changed_leds= XkbIndicatorsToUpdate(dev,changed,FALSE);
 	    if (changed_leds) {
 		XkbEventCauseRec	cause;
 		XkbSetCauseKey(&cause,(event->detail.key & 0x7), event->type);
-		XkbUpdateIndicators(dev,changed_leds,True,NULL,&cause);
+		XkbUpdateIndicators(dev,changed_leds,TRUE,NULL,&cause);
 	    }
 	}
     }
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 75f3c72..2cdb6fc 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -603,7 +603,7 @@ _XkbFilterPointerBtn(	XkbSrvInfoPtr	xkbi,
 		    }
 		    if (XkbComputeControlsNotify(xkbi->device,
 						&old,xkbi->desc->ctrls,
-						&cn,False)) {
+						&cn,FALSE)) {
 			cn.keycode = keycode;
                         /* XXX: what about DeviceKeyPress? */
 			cn.eventType = KeyPress;
@@ -668,7 +668,7 @@ XkbEventCauseRec	cause;
 	    XkbSrvLedInfoPtr	sli;
 
 	    ctrls->enabled_ctrls|= change;
-	    if (XkbComputeControlsNotify(kbd,&old,ctrls,&cn,False)) {
+	    if (XkbComputeControlsNotify(kbd,&old,ctrls,&cn,FALSE)) {
 		cn.keycode = keycode;
                 /* XXX: what about DeviceKeyPress? */
 		cn.eventType = KeyPress;
@@ -682,10 +682,10 @@ XkbEventCauseRec	cause;
 	    /* If sticky keys were disabled, clear all locks and latches */
 	    if ((old.enabled_ctrls&XkbStickyKeysMask)&&
 		(!(ctrls->enabled_ctrls&XkbStickyKeysMask))) {
-		XkbClearAllLatchesAndLocks(kbd,xkbi,False,&cause);
+		XkbClearAllLatchesAndLocks(kbd,xkbi,FALSE,&cause);
     	    }
 	    sli= XkbFindSrvLedInfo(kbd,XkbDfltXIClass,XkbDfltXIId,0);
-	    XkbUpdateIndicators(kbd,sli->usesControls,True,NULL,&cause);
+	    XkbUpdateIndicators(kbd,sli->usesControls,TRUE,NULL,&cause);
 	    if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask))
 		XkbDDXAccessXBeep(kbd,_BEEP_FEATURE_ON,change);
 	}
@@ -697,7 +697,7 @@ XkbEventCauseRec	cause;
 	    XkbSrvLedInfoPtr	sli;
 
 	    ctrls->enabled_ctrls&= ~change;
-	    if (XkbComputeControlsNotify(kbd,&old,ctrls,&cn,False)) {
+	    if (XkbComputeControlsNotify(kbd,&old,ctrls,&cn,FALSE)) {
 		cn.keycode = keycode;
 		cn.eventType = KeyRelease;
 		cn.requestMajor = 0;
@@ -709,10 +709,10 @@ XkbEventCauseRec	cause;
 	    /* If sticky keys were disabled, clear all locks and latches */
 	    if ((old.enabled_ctrls&XkbStickyKeysMask)&&
 		(!(ctrls->enabled_ctrls&XkbStickyKeysMask))) {
-		XkbClearAllLatchesAndLocks(kbd,xkbi,False,&cause);
+		XkbClearAllLatchesAndLocks(kbd,xkbi,FALSE,&cause);
     	    }
 	    sli= XkbFindSrvLedInfo(kbd,XkbDfltXIClass,XkbDfltXIId,0);
-	    XkbUpdateIndicators(kbd,sli->usesControls,True,NULL,&cause);
+	    XkbUpdateIndicators(kbd,sli->usesControls,TRUE,NULL,&cause);
 	    if (XkbAX_NeedFeedback(ctrls,XkbAX_FeatureFBMask))
 		XkbDDXAccessXBeep(kbd,_BEEP_FEATURE_OFF,change);
 	}
@@ -964,7 +964,7 @@ int		button;
 		if ((pAction->devbtn.flags&XkbSA_LockNoLock)||
 		    BitIsOn(dev->button->down, button))
 		    return 0;
-		XkbDDXFakeDeviceButton(dev,True,button);
+		XkbDDXFakeDeviceButton(dev,TRUE,button);
 		filter->upAction.type= XkbSA_NoAction;
 		break;
 	    case XkbSA_DeviceBtn:
@@ -972,12 +972,12 @@ int		button;
 		    int nClicks,i;
 		    nClicks= pAction->btn.count;
 		    for (i=0;i<nClicks;i++) {
-			XkbDDXFakeDeviceButton(dev,True,button);
-			XkbDDXFakeDeviceButton(dev,False,button);
+			XkbDDXFakeDeviceButton(dev,TRUE,button);
+			XkbDDXFakeDeviceButton(dev,FALSE,button);
 		    }
 		    filter->upAction.type= XkbSA_NoAction;
 		}
-		else XkbDDXFakeDeviceButton(dev,True,button);
+		else XkbDDXFakeDeviceButton(dev,TRUE,button);
 		break;
 	}
     }
@@ -996,10 +996,10 @@ int		button;
 		if ((filter->upAction.devbtn.flags&XkbSA_LockNoUnlock)||
 		    !BitIsOn(dev->button->down, button))
 		    return 0;
-		XkbDDXFakeDeviceButton(dev,False,button);
+		XkbDDXFakeDeviceButton(dev,FALSE,button);
 		break;
 	    case XkbSA_DeviceBtn:
-		XkbDDXFakeDeviceButton(dev,False,button);
+		XkbDDXFakeDeviceButton(dev,FALSE,button);
 		break;
 	}
 	filter->active = 0;
@@ -1072,9 +1072,9 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
     if ((xkbi->flags&_XkbStateNotifyInProgress)==0) {
 	xkbi->prev_state = xkbi->state;
 	xkbi->flags|= _XkbStateNotifyInProgress;
-	genStateNotify= True;
+	genStateNotify= TRUE;
     }
-    else genStateNotify= False;
+    else genStateNotify= FALSE;
 
     xkbi->clearMods = xkbi->setMods = 0;
     xkbi->groupChange = 0;
@@ -1213,11 +1213,11 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
 	}
 	xkbi->flags&= ~_XkbStateNotifyInProgress;
     }
-    changed= XkbIndicatorsToUpdate(dev,changed,False);
+    changed= XkbIndicatorsToUpdate(dev,changed,FALSE);
     if (changed) {
 	XkbEventCauseRec	cause;
 	XkbSetCauseKey(&cause, key, event->type);
-	XkbUpdateIndicators(dev,changed,False,NULL,&cause);
+	XkbUpdateIndicators(dev,changed,FALSE,NULL,&cause);
     }
     return;
 }
@@ -1308,9 +1308,9 @@ xkbStateNotify	sn;
 	sn.requestMinor= 	cause->mnr;
 	sn.changed= XkbStateChangedFlags(&os,&xkbi->state);
 	XkbSendStateNotify(dev,&sn);
-	changed= XkbIndicatorsToUpdate(dev,sn.changed,False);
+	changed= XkbIndicatorsToUpdate(dev,sn.changed,FALSE);
 	if (changed) {
-	    XkbUpdateIndicators(dev,changed,True,NULL,cause);
+	    XkbUpdateIndicators(dev,changed,TRUE,NULL,cause);
 	}
     }
     return;
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
index 58f75b3..33741e9 100644
--- a/xkb/xkbEvents.c
+++ b/xkb/xkbEvents.c
@@ -1073,7 +1073,7 @@ Bool		found;
 unsigned long	autoCtrls,autoValues;
 ClientPtr	client = NULL;
 
-    found= False;
+    found= FALSE;
 
     if (!dev->key || !dev->key->xkbInfo)
         return found;
@@ -1087,7 +1087,7 @@ ClientPtr	client = NULL;
 	    autoValues= interest->autoCtrlValues;
 	    client= interest->client;
 	    xfree(interest);
-	    found= True;
+	    found= TRUE;
 	}
 	while ((!found)&&(interest->next)) {
 	    if (interest->next->resource==id) {
@@ -1097,7 +1097,7 @@ ClientPtr	client = NULL;
 		autoValues= victim->autoCtrlValues;
 		client= victim->client;
 		xfree(victim);
-		found= True;
+		found= TRUE;
 	    }
 	    interest = interest->next;
 	}
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 3d0fb00..4a3219e 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -84,7 +84,7 @@ typedef struct	_SrvXkmInfo {
 /***====================================================================***/
 
 #ifndef XKB_DFLT_RULES_PROP
-#define	XKB_DFLT_RULES_PROP	True
+#define	XKB_DFLT_RULES_PROP	TRUE
 #endif
 
 char	*		XkbBaseDirectory=	XKB_BASE_DIRECTORY;
@@ -165,20 +165,20 @@ char *			pval;
     len+= (XkbVariantUsed?strlen(XkbVariantUsed):0);
     len+= (XkbOptionsUsed?strlen(XkbOptionsUsed):0);
     if (len<1)
-	return True;
+	return TRUE;
 
     len+= 5; /* trailing NULs */
 
     name= MakeAtom(_XKB_RF_NAMES_PROP_ATOM,strlen(_XKB_RF_NAMES_PROP_ATOM),1);
     if (name==None) {
 	ErrorF("[xkb] Atom error: %s not created\n",_XKB_RF_NAMES_PROP_ATOM);
-	return True;
+	return TRUE;
     }
     pval= (char*) xalloc(len);
     if (!pval) {
 	ErrorF("[xkb] Allocation error: %s proprerty not created\n",
 						_XKB_RF_NAMES_PROP_ATOM);
-	return True;
+	return TRUE;
     }
     out= 0;
     if (XkbRulesUsed) {
@@ -211,9 +211,9 @@ char *			pval;
 								out,len);
     }
     dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8,
-			    PropModeReplace, len, pval, True);
+			    PropModeReplace, len, pval, TRUE);
     xfree(pval);
-    return True;
+    return TRUE;
 }
 
 static void
@@ -284,7 +284,7 @@ XkbDeleteRulesDflts(void)
     xfree(XkbOptionsDflt);
     XkbOptionsDflt = NULL;
 
-    XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, True);
+    XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE);
     xkb_cached_map = NULL;
 }
 
@@ -312,17 +312,17 @@ static Bool
 XkbInitKeyTypes(XkbDescPtr xkb)
 {
     if (xkb->defined & XkmTypesMask)
-        return True;
+        return TRUE;
 
     initTypeNames(NULL);
     if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_dflt_types)!=Success)
-	return False;
+	return FALSE;
     if (XkbCopyKeyTypes(dflt_types,xkb->map->types,num_dflt_types)!=
     								 Success) {
-	return False;
+	return FALSE;
     }
     xkb->map->size_types= xkb->map->num_types= num_dflt_types;
-    return True;
+    return TRUE;
 }
 
 static void
@@ -341,7 +341,7 @@ register int 	i;
 XkbCompatMapPtr	compat;
 
     if (xkb->defined & XkmCompatMapMask)
-        return True;
+        return TRUE;
 
     if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_dfltSI)!=Success)
 	return BadAlloc;
@@ -518,7 +518,7 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
     dev->key = xcalloc(1, sizeof(*dev->key));
     if (!dev->key) {
         ErrorF("XKB: Failed to allocate key class\n");
-        return False;
+        return FALSE;
     }
     dev->key->sourceid = dev->id;
 
@@ -536,7 +536,7 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
     dev->key->xkbInfo = xkbi;
 
     if (xkb_cached_map && !XkbCompareUsedRMLVO(rmlvo)) {
-        XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, True);
+        XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE);
         xkb_cached_map = NULL;
     }
 
@@ -674,7 +674,7 @@ XkbFreeInfo(XkbSrvInfoPtr xkbi)
 	xkbi->beepTimer= NULL;
     }
     if (xkbi->desc) {
-	XkbFreeKeyboard(xkbi->desc,XkbAllComponentsMask,True);
+	XkbFreeKeyboard(xkbi->desc,XkbAllComponentsMask,TRUE);
 	xkbi->desc= NULL;
     }
     xfree(xkbi);
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index 3cf24e3..8c28513 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -103,8 +103,8 @@ Bool		ctrlChange,stateChange;
 XkbStatePtr	state;
 
     if ((map->flags&XkbIM_NoExplicit)||((map->flags&XkbIM_LEDDrivesKB)==0))
-	return False;
-    ctrlChange= stateChange= False;
+	return FALSE;
+    ctrlChange= stateChange= FALSE;
     if (map->ctrls) {
 	XkbControlsPtr	ctrls= xkbi->desc->ctrls;
 	unsigned 	old;
@@ -115,7 +115,7 @@ XkbStatePtr	state;
 	if (old!=ctrls->enabled_ctrls) {
 	    change->ctrls.changed_ctrls= XkbControlsEnabledMask;
 	    change->ctrls.enabled_ctrls_changes= old^ctrls->enabled_ctrls;
-	    ctrlChange= True;
+	    ctrlChange= TRUE;
 	}
     }
     state= &xkbi->state;
@@ -133,7 +133,7 @@ XkbStatePtr	state;
 	    if (map->which_groups&XkbIM_UseLatched)
 		XkbLatchGroup(xkbi->device,0); /* unlatch group */
 	    state->locked_group= i;
-	    stateChange= True;
+	    stateChange= TRUE;
 	}
 	else if (map->which_groups&(XkbIM_UseLatched|XkbIM_UseEffective)) {
 	    for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
@@ -142,7 +142,7 @@ XkbStatePtr	state;
 	    }
 	    state->locked_group= 0;
 	    XkbLatchGroup(xkbi->device,i);
-	    stateChange= True;
+	    stateChange= TRUE;
 	}
     }
     if ((map->mods.mask)&&((map->which_mods&(~XkbIM_UseBase))!=0)) {
@@ -152,7 +152,7 @@ XkbStatePtr	state;
 	    if (on)	state->locked_mods|= map->mods.mask;
 	    else	state->locked_mods&= ~map->mods.mask;
 	    if (state->locked_mods!=old)
-		stateChange= True;
+		stateChange= TRUE;
 	}
 	if (map->which_mods&(XkbIM_UseLatched|XkbIM_UseEffective)) {
 	    register unsigned long newmods;
@@ -162,7 +162,7 @@ XkbStatePtr	state;
 	    if (newmods!=state->locked_mods) {
 		newmods&= map->mods.mask;
 		XkbLatchModifiers(xkbi->device,map->mods.mask,newmods);
-		stateChange= True;
+		stateChange= TRUE;
 	    }
 	}
     }
@@ -186,7 +186,7 @@ ComputeAutoState(	XkbIndicatorMapPtr	map,
 Bool 			on;
 CARD8 			mods,group;
 
-    on= False;
+    on= FALSE;
     mods= group= 0;
     if (map->which_mods&XkbIM_UseAnyMods) {
 	if (map->which_mods&XkbIM_UseBase)
@@ -371,7 +371,7 @@ unsigned 			side_affected;
 
     side_affected= 0;
     if (changes.state_changes!=0)
-	side_affected|= XkbIndicatorsToUpdate(dev,changes.state_changes,False);
+	side_affected|= XkbIndicatorsToUpdate(dev,changes.state_changes,FALSE);
     if (changes.ctrls.enabled_ctrls_changes)
 	side_affected|= sli->usesControls;
 
@@ -402,7 +402,7 @@ unsigned 			side_affected;
 	 * required to report the necessary changes, otherwise it simply
 	 * notes the indicators with changed state.
 	 *
-	 * If 'check_edevs' is True, this function also checks the indicator
+	 * If 'check_edevs' is TRUE, this function also checks the indicator
 	 * maps for any open extension devices that have them, and updates
 	 * the state of any extension device indicators as necessary.
 	 */
@@ -522,7 +522,7 @@ Bool			checkAccel;
 Bool			checkNames;
 
     sli= NULL;
-    checkAccel= checkNames= False;
+    checkAccel= checkNames= FALSE;
     if ((kf!=NULL)&&(kf->xkb_sli==NULL)) {
 	kf->xkb_sli= sli= xcalloc(1, sizeof(XkbSrvLedInfoRec));
 	if (sli==NULL)
@@ -545,7 +545,7 @@ Bool			checkNames;
 	    sli->physIndicators=	xkb->indicators->phys_indicators;
 	    sli->names=			xkb->names->indicators;
 	    sli->maps=			xkb->indicators->maps;
-	    checkNames= checkAccel=	True;
+	    checkNames= checkAccel=	TRUE;
 	}
 	else {
 	    sli->physIndicators=	XkbAllIndicatorsMask;
@@ -558,11 +558,11 @@ Bool			checkNames;
 	xkb= dev->key->xkbInfo->desc;
 	sli->physIndicators=	xkb->indicators->phys_indicators;
 	if (xkb->names->indicators!=sli->names) {
-	    checkNames= True;
+	    checkNames= TRUE;
 	    sli->names= xkb->names->indicators;
 	}
 	if (xkb->indicators->maps!=sli->maps) {
-	    checkAccel= True;
+	    checkAccel= TRUE;
 	    sli->maps= xkb->indicators->maps;
 	}
     }
@@ -920,7 +920,7 @@ Bool				kb_changed;
 	bzero((char *)changes,sizeof(XkbChangesRec));
     }
 
-    kb_changed= False;
+    kb_changed= FALSE;
     affected= changed_leds;
     oldState= sli->effectiveState;
     for (i=0,bit=1;(i<XkbNumIndicators)&&(affected);i++,bit<<=1) {
@@ -935,7 +935,7 @@ Bool				kb_changed;
 	if (map->flags&XkbIM_LEDDrivesKB) {
 	    Bool on= ((sli->explicitState&bit)!=0);
 	    if (XkbApplyLEDChangeToKeyboard(xkbi,map,on,changes))
-		kb_changed= True;
+		kb_changed= TRUE;
 	}
     }
     sli->effectiveState= (sli->autoState|sli->explicitState);
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index a214b75..5b317c9 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -529,7 +529,7 @@ XkbSetRepeatKeys(DeviceIntPtr pXDev,int key,int onoff)
 		pXDev->kbdfeed->ctrl.autoRepeats[key/8];
 	}
 	
-	if (XkbComputeControlsNotify(pXDev,&old,ctrls,&cn,True))
+	if (XkbComputeControlsNotify(pXDev,&old,ctrls,&cn,TRUE))
 	    XkbSendControlsNotify(pXDev,&cn);
     }
     return;
@@ -726,7 +726,7 @@ XkbCheckSecondaryEffects(	XkbSrvInfoPtr		xkbi,
 	XkbComputeDerivedState(xkbi);
     }
     if (which&XkbIndicatorStateNotifyMask)
-	XkbUpdateIndicators(xkbi->device,XkbAllIndicatorsMask,True,changes,
+	XkbUpdateIndicators(xkbi->device,XkbAllIndicatorsMask,TRUE,changes,
 									cause);
     return;
 }
@@ -749,7 +749,7 @@ XkbSrvLedInfoPtr	sli;
     ctrls->enabled_ctrls&= ~change;
     ctrls->enabled_ctrls|= (change&newValues);
     if (old==ctrls->enabled_ctrls)
-	return False;
+	return FALSE;
     if (cause!=NULL) {
 	xkbControlsNotify cn;
 	cn.numGroups= ctrls->num_groups;
@@ -774,8 +774,8 @@ XkbSrvLedInfoPtr	sli;
 	else changes->ctrls.changed_ctrls&= ~XkbControlsEnabledMask;
     }
     sli= XkbFindSrvLedInfo(xkbi->device,XkbDfltXIClass,XkbDfltXIId,0);
-    XkbUpdateIndicators(xkbi->device,sli->usesControls,True,changes,cause);
-    return True;
+    XkbUpdateIndicators(xkbi->device,sli->usesControls,TRUE,changes,cause);
+    return TRUE;
 }
 
 /***====================================================================***/
@@ -1152,7 +1152,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst)
     }
     else {
         if (dst->map)
-            XkbFreeClientMap(dst, XkbAllClientInfoMask, True);
+            XkbFreeClientMap(dst, XkbAllClientInfoMask, TRUE);
     }
 
     return TRUE;
@@ -1288,7 +1288,7 @@ _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst)
     }
     else {
         if (dst->server)
-            XkbFreeServerMap(dst, XkbAllServerInfoMask, True);
+            XkbFreeServerMap(dst, XkbAllServerInfoMask, TRUE);
     }
 
     return TRUE;
@@ -1389,7 +1389,7 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst)
     }
     else {
         if (dst->names)
-            XkbFreeNames(dst, XkbAllNamesMask, True);
+            XkbFreeNames(dst, XkbAllNamesMask, TRUE);
     }
 
     return TRUE;
@@ -1441,7 +1441,7 @@ _XkbCopyCompat(XkbDescPtr src, XkbDescPtr dst)
     }
     else {
         if (dst->compat)
-            XkbFreeCompatMap(dst, XkbAllCompatMask, True);
+            XkbFreeCompatMap(dst, XkbAllCompatMask, TRUE);
     }
 
     return TRUE;
@@ -1977,7 +1977,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
     {
         if (dst->geom) {
             /* I LOVE THE DIFFERENT CALL SIGNATURE.  REALLY, I DO. */
-            XkbFreeGeometry(dst->geom, XkbGeomAllMask, True);
+            XkbFreeGeometry(dst->geom, XkbGeomAllMask, TRUE);
             dst->geom = NULL;
         }
     }
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 804ef20..103e609 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -137,7 +137,7 @@ static Bool
 XkbWriteSectionFromName(FILE *file,char *sectionName,char *name)
 {
     fprintf(file,"    xkb_%-20s { include \"%s\" };\n",sectionName,name);
-    return True;
+    return TRUE;
 }
 
 #define	NEED_DESC(n) ((!n)||((n)[0]=='+')||((n)[0]=='|')||(strchr((n),'%')))
@@ -181,7 +181,7 @@ unsigned	wantNames,wantConfig,wantDflts;
 	want|= XkmKeyNamesMask|XkmTypesMask;
 
     if (want==0)
-	return False;
+	return FALSE;
 
     if (xkb) {
         old_names = xkb->names;
@@ -258,7 +258,7 @@ unsigned	wantNames,wantConfig,wantDflts;
 	}
 	if (wantNames&XkmSymbolsMask) {
 	    if (old_names->symbols==None)
-		return False;
+		return FALSE;
 	    tmp= NameForAtom(old_names->symbols);
 	    names->symbols= _XkbDupString(tmp);
 	    complete|= XkmSymbolsMask; 
@@ -273,7 +273,7 @@ unsigned	wantNames,wantConfig,wantDflts;
 	}
 	if (wantNames&XkmGeometryMask) {
 	    if (old_names->geometry==None)
-		return False;
+		return FALSE;
 	    tmp= NameForAtom(old_names->geometry);
 	    names->geometry= _XkbDupString(tmp);
 	    complete|= XkmGeometryMask; 
@@ -285,9 +285,9 @@ unsigned	wantNames,wantConfig,wantDflts;
     else if (complete&(XkmSymbolsMask|XkmTypesMask))
 	complete|= XkmVirtualModsMask;
     if (need & (~complete))
-	return False;
+	return FALSE;
     if ((complete&XkmSymbolsMask)&&((XkmKeyNamesMask|XkmTypesMask)&(~complete)))
-	return False;
+	return FALSE;
 
     multi_section= 1;
     if (((complete&XkmKeymapRequired)==XkmKeymapRequired)&&
@@ -306,44 +306,44 @@ unsigned	wantNames,wantConfig,wantDflts;
 	multi_section= 0;
     }
     else {
-	return False;
+	return FALSE;
     }
 
     wantNames= complete&(~(wantConfig|wantDflts));
     if (wantConfig&XkmKeyNamesMask)
-	XkbWriteXKBKeycodes(file,xkb,False,False,_AddIncl,names->keycodes);
+	XkbWriteXKBKeycodes(file,xkb,FALSE,FALSE,_AddIncl,names->keycodes);
     else if (wantDflts&XkmKeyNamesMask)
 	fprintf(stderr,"Default symbols not implemented yet!\n");
     else if (wantNames&XkmKeyNamesMask)
 	XkbWriteSectionFromName(file,"keycodes",names->keycodes);
 
     if (wantConfig&XkmTypesMask)
-	XkbWriteXKBKeyTypes(file,xkb,False,False,_AddIncl,names->types);
+	XkbWriteXKBKeyTypes(file,xkb,FALSE,FALSE,_AddIncl,names->types);
     else if (wantDflts&XkmTypesMask)
 	fprintf(stderr,"Default types not implemented yet!\n");
     else if (wantNames&XkmTypesMask)
 	XkbWriteSectionFromName(file,"types",names->types);
 
     if (wantConfig&XkmCompatMapMask)
-	XkbWriteXKBCompatMap(file,xkb,False,False,_AddIncl,names->compat);
+	XkbWriteXKBCompatMap(file,xkb,FALSE,FALSE,_AddIncl,names->compat);
     else if (wantDflts&XkmCompatMapMask)
 	fprintf(stderr,"Default interps not implemented yet!\n");
     else if (wantNames&XkmCompatMapMask)
 	XkbWriteSectionFromName(file,"compatibility",names->compat);
 
     if (wantConfig&XkmSymbolsMask)
-	XkbWriteXKBSymbols(file,xkb,False,False,_AddIncl,names->symbols);
+	XkbWriteXKBSymbols(file,xkb,FALSE,FALSE,_AddIncl,names->symbols);
     else if (wantNames&XkmSymbolsMask)
 	XkbWriteSectionFromName(file,"symbols",names->symbols);
 
     if (wantConfig&XkmGeometryMask)
-	XkbWriteXKBGeometry(file,xkb,False,False,_AddIncl,names->geometry);
+	XkbWriteXKBGeometry(file,xkb,FALSE,FALSE,_AddIncl,names->geometry);
     else if (wantNames&XkmGeometryMask)
 	XkbWriteSectionFromName(file,"geometry",names->geometry);
 
     if (multi_section)
 	fprintf(file,"};\n");
-    return True;
+    return TRUE;
 }
 
 /***====================================================================***/
@@ -366,7 +366,7 @@ register int	i;
 	a= xkb->geom->key_aliases;
 	for (i=0;i<xkb->geom->num_key_aliases;i++,a++) {
 	    if (strncmp(name,a->alias,XkbKeyNameLength)==0)
-		return XkbFindKeycodeByName(xkb,a->real,False);
+		return XkbFindKeycodeByName(xkb,a->real,FALSE);
 	}
     }
     if (xkb->names && xkb->names->key_aliases) {
@@ -374,7 +374,7 @@ register int	i;
 	a= xkb->names->key_aliases;
 	for (i=0;i<xkb->names->num_key_aliases;i++,a++) {
 	    if (strncmp(name,a->alias,XkbKeyNameLength)==0)
-		return XkbFindKeycodeByName(xkb,a->real,False);
+		return XkbFindKeycodeByName(xkb,a->real,FALSE);
 	}
     }
     return 0;
@@ -420,19 +420,19 @@ XkbNameMatchesPattern(char *name,char *ptrn)
 		ptrn++;
 		continue;
 	    }
-	    return False;
+	    return FALSE;
 	}
 	if (ptrn[0]=='?') {
 	    if (UNMATCHABLE(name[0]))
-		return False;
+		return FALSE;
 	}
 	else if (ptrn[0]=='*') {
 	    if ((!UNMATCHABLE(name[0]))&&XkbNameMatchesPattern(name+1,ptrn))
-		return True;
+		return TRUE;
 	    return XkbNameMatchesPattern(name,ptrn+1);
 	}
 	else if (ptrn[0]!=name[0])
-	    return False;
+	    return FALSE;
 	name++;
 	ptrn++;
     }
diff --git a/xkb/xkbout.c b/xkb/xkbout.c
index 53f6841..68ede90 100644
--- a/xkb/xkbout.c
+++ b/xkb/xkbout.c
@@ -58,7 +58,7 @@ register int 	i,nMods;
 Atom *		vmodNames;
 
     if (xkb==NULL)
-	return False;
+	return FALSE;
     if (xkb->names!=NULL)
 	 vmodNames= xkb->names->vmods;
     else vmodNames= NULL;
@@ -84,7 +84,7 @@ Atom *		vmodNames;
     }
     if (nMods>0)
 	fprintf(file,";\n\n");
-    return True;
+    return TRUE;
 }
 
 /***====================================================================***/
@@ -93,7 +93,7 @@ static Bool
 WriteXKBAction(FILE *file,XkbDescPtr xkb,XkbAnyAction *action)
 {
     fprintf(file,"%s",XkbActionText(xkb,(XkbAction *)action,XkbXKBFile));
-    return True;
+    return TRUE;
 }
 
 /***====================================================================***/
@@ -112,7 +112,7 @@ char *			alternate;
 
     if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) {
 	_XkbLibError(_XkbErrMissingNames,"XkbWriteXKBKeycodes",0);
-	return False;
+	return FALSE;
     }
     kcName= xkb->names->keycodes;
     if (kcName!=None)
@@ -123,7 +123,7 @@ char *			alternate;
     fprintf(file,"    maximum = %d;\n",xkb->max_key_code);
     for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
 	if (xkb->names->keys[i].name[0]!='\0') {
-	    if (XkbFindKeycodeByName(xkb,xkb->names->keys[i].name,True)!=i)
+	    if (XkbFindKeycodeByName(xkb,xkb->names->keys[i].name,TRUE)!=i)
 		 alternate= "alternate ";
 	    else alternate= "";
 	    fprintf(file,"    %s%6s = %d;\n",alternate,
@@ -155,7 +155,7 @@ char *			alternate;
     if (addOn)
 	(*addOn)(file,xkb,topLevel,showImplicit,XkmKeyNamesIndex,priv);
     fprintf(file,"};\n\n");
-    return True;
+    return TRUE;
 }
 
 Bool
@@ -172,7 +172,7 @@ XkbKTMapEntryPtr	entry;
 
     if ((!xkb)||(!xkb->map)||(!xkb->map->types)) {
 	_XkbLibError(_XkbErrMissingTypes,"XkbWriteXKBKeyTypes",0);
-	return False;
+	return FALSE;
     }
     if (xkb->map->num_types<XkbNumRequiredTypes) {
 	_XkbLibError(_XkbErrMissingReqTypes,"XkbWriteXKBKeyTypes",0);
@@ -221,7 +221,7 @@ XkbKTMapEntryPtr	entry;
     if (addOn)
 	(*addOn)(file,xkb,topLevel,showImplicit,XkmTypesIndex,priv);
     fprintf(file,"};\n\n");
-    return True;
+    return TRUE;
 }
 
 static Bool
@@ -260,9 +260,9 @@ WriteXKBIndicatorMap(	FILE *			file,
 			XkbControlsMaskText(led->ctrls,XkbXKBFile));
     }
     if (addOn)
-	(*addOn)(file,xkb,False,True,XkmIndicatorsIndex,priv);
+	(*addOn)(file,xkb,FALSE,TRUE,XkmIndicatorsIndex,priv);
     fprintf(file,"    };\n");
-    return True;
+    return TRUE;
 }
 
 Bool
@@ -278,7 +278,7 @@ XkbSymInterpretPtr	interp;
 
     if ((!xkb)||(!xkb->compat)||(!xkb->compat->sym_interpret)) {
 	_XkbLibError(_XkbErrMissingCompatMap,"XkbWriteXKBCompatMap",0);
-	return False;
+	return FALSE;
     }
     if ((xkb->names==NULL)||(xkb->names->compat==None))
 	 fprintf(file,"xkb_compatibility {\n\n");
@@ -288,8 +288,8 @@ XkbSymInterpretPtr	interp;
 			(showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE));
 
     fprintf(file,"    interpret.useModMapMods= AnyLevel;\n");
-    fprintf(file,"    interpret.repeat= False;\n");
-    fprintf(file,"    interpret.locking= False;\n");
+    fprintf(file,"    interpret.repeat= FALSE;\n");
+    fprintf(file,"    interpret.locking= FALSE;\n");
     interp= xkb->compat->sym_interpret;
     for (i=0;i<xkb->compat->num_si;i++,interp++) {
 	fprintf(file,"    interpret %s+%s(%s) {\n",	
@@ -304,9 +304,9 @@ XkbSymInterpretPtr	interp;
 	if (interp->match&XkbSI_LevelOneOnly)
 	    fprintf(file,"        useModMapMods=level1;\n");
 	if (interp->flags&XkbSI_LockingKey)
-	    fprintf(file,"        locking= True;\n");
+	    fprintf(file,"        locking= TRUE;\n");
 	if (interp->flags&XkbSI_AutoRepeat)
-	    fprintf(file,"        repeat= True;\n");
+	    fprintf(file,"        repeat= TRUE;\n");
 	fprintf(file,"        action= ");
 	WriteXKBAction(file,xkb,&interp->act);
 	fprintf(file,";\n");
@@ -337,7 +337,7 @@ XkbSymInterpretPtr	interp;
     if (addOn)
 	(*addOn)(file,xkb,topLevel,showImplicit,XkmCompatMapIndex,priv);
     fprintf(file,"};\n\n");
-    return True;
+    return TRUE;
 }
 
 Bool
@@ -357,11 +357,11 @@ Bool			showActions;
     srv= xkb->server;
     if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) {
 	_XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
-	return False;
+	return FALSE;
     }
     if ((!xkb->names)||(!xkb->names->keys)) {
 	_XkbLibError(_XkbErrMissingNames,"XkbWriteXKBSymbols",0);
-	return False;
+	return FALSE;
     }
     if ((xkb->names==NULL)||(xkb->names->symbols==None))
 	 fprintf(file,"xkb_symbols {\n\n");
@@ -380,9 +380,9 @@ Bool			showActions;
 	Bool	simple;
 	if ((int)XkbKeyNumSyms(xkb,i)<1)
 	    continue;
-	if (XkbFindKeycodeByName(xkb,xkb->names->keys[i].name,True)!=i)
+	if (XkbFindKeycodeByName(xkb,xkb->names->keys[i].name,TRUE)!=i)
 	    continue;
-	simple= True;
+	simple= TRUE;
 	fprintf(file,"    key %6s {",
 			XkbKeyNameText(xkb->names->keys[i].name,XkbXKBFile));
 	if (srv->explicit) {
@@ -394,11 +394,11 @@ Bool			showActions;
 
 		if ((srv->explicit[i]&XkbExplicitKeyTypesMask)==0)
 		    comment= "//";
-		multi= False;
+		multi= FALSE;
 		typeNdx= XkbKeyKeyTypeIndex(xkb,i,0);
 		for (g=1;(g<XkbKeyNumGroups(xkb,i))&&(!multi);g++) {
 		    if (XkbKeyKeyTypeIndex(xkb,i,g)!=typeNdx)
-			multi= True;
+			multi= TRUE;
 		}
 		if (multi) {
 		    for (g=0;g<XkbKeyNumGroups(xkb,i);g++) {
@@ -421,14 +421,14 @@ Bool			showActions;
 				XkbAtomText(map->types[typeNdx].name,
 			    	XkbXKBFile));
 		}
-		simple= False;
+		simple= FALSE;
 	    }
 	    if (((srv->explicit[i]&XkbExplicitAutoRepeatMask)!=0)&&
 		    					  (xkb->ctrls!=NULL)) {
 		if (xkb->ctrls->per_key_repeat[i/8]&(1<<(i%8)))
 		     fprintf(file,"\n        repeat= Yes,");
 		else fprintf(file,"\n        repeat= No,");
-		simple= False;
+		simple= FALSE;
 	    }
 	    if ((xkb->server!=NULL)&&(xkb->server->vmodmap!=NULL)&&
 					(xkb->server->vmodmap[i]!=0)) {
@@ -460,7 +460,7 @@ Bool			showActions;
 	    type= srv->behaviors[i].type&XkbKB_OpMask;
 
 	    if (type!=XkbKB_Default) {
-		simple= False;
+		simple= FALSE;
 		fprintf(file,"\n        %s,",
 			XkbBehaviorText(xkb,&srv->behaviors[i],XkbXKBFile));
 	    }
@@ -468,10 +468,10 @@ Bool			showActions;
 	if ((srv->explicit==NULL) || showImplicit ||
 	    ((srv->explicit[i]&XkbExplicitInterpretMask)!=0))
 	     showActions= XkbKeyHasActions(xkb,i);
-	else showActions= False;
+	else showActions= FALSE;
 	
 	if (((unsigned)XkbKeyNumGroups(xkb,i)>1)||showActions)
-	    simple= False;
+	    simple= FALSE;
 	if (simple) {
 	    KeySym *syms;
 	    unsigned s;
@@ -535,7 +535,7 @@ Bool			showActions;
     if (addOn)
 	(*addOn)(file,xkb,topLevel,showImplicit,XkmSymbolsIndex,priv);
     fprintf(file,"};\n\n");
-    return True;
+    return TRUE;
 }
 
 static Bool
@@ -575,7 +575,7 @@ char *		iStr;
 				  XkbGeomFPText(pt->y,XkbXKBFile));
     }
     fprintf(file," }");
-    return True;
+    return TRUE;
 }
 
 static Bool
@@ -665,7 +665,7 @@ XkbColorPtr	color;
 	    break;
     }
     fprintf(file,"%s};\n",i_str);
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -700,7 +700,7 @@ XkbOverlayKeyPtr	key;
 	}
     }
     fprintf(file,"\n%s};\n",i_str);
-    return True;
+    return TRUE;
 }
 
 static Bool
@@ -788,7 +788,7 @@ int		dfltKeyColor = 0;
     }
     fprintf(file,"    }; // End of \"%s\" section\n\n",
 				XkbAtomText(s->name,XkbXKBFile));
-    return True;
+    return TRUE;
 }
 
 Bool
@@ -804,7 +804,7 @@ XkbGeometryPtr		geom;
 
     if ((!xkb)||(!xkb->geom)) {
 	_XkbLibError(_XkbErrMissingGeometry,"XkbWriteXKBGeometry",0);
- 	return False;
+	return FALSE;
     }
     geom= xkb->geom;
     if (geom->name==None)
@@ -891,5 +891,5 @@ XkbGeometryPtr		geom;
     if (addOn)
 	(*addOn)(file,xkb,topLevel,showImplicit,XkmGeometryIndex,priv);
     fprintf(file,"};\n\n");
-    return True;
+    return TRUE;
 }
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index 324254d..9f49d59 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -527,9 +527,9 @@ Bool	ok;
     }
     else if (format==XkbXKMFile)
 	return str;
-    for (ok= True,len=0,in=str;*in!='\0';in++,len++) {
+    for (ok= TRUE,len=0,in=str;*in!='\0';in++,len++) {
 	if (!isprint(*in)) {
-	    ok= False;
+	    ok= FALSE;
 	    switch (*in) {
 		case '\n': case '\t': case '\v':
 		case '\b': case '\r': case '\f':
@@ -661,18 +661,18 @@ register int len;
 	if (len<((*pLeft)-3)) {
 	    strcat(to,from);
 	    *pLeft-= len;
-	    return True;
+	    return TRUE;
 	}
     }
     *pLeft= -1;
-    return False;
+    return FALSE;
 }
 
 /*ARGSUSED*/
 static Bool
 CopyNoActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int*sz)
 {
-    return True;
+    return TRUE;
 }
 
 static Bool
@@ -694,12 +694,12 @@ unsigned	tmp;
     }
     else TryCopyStr(buf,"none",sz);
     if (act->type==XkbSA_LockMods)
-	return True;
+	return TRUE;
     if (act->flags&XkbSA_ClearLocks)
 	TryCopyStr(buf,",clearLocks",sz);
     if (act->flags&XkbSA_LatchToLock)
 	TryCopyStr(buf,",latchToLock",sz);
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -719,12 +719,12 @@ char			tbuf[32];
     else sprintf(tbuf,"+%d",XkbSAGroup(act));
     TryCopyStr(buf,tbuf,sz);
     if (act->type==XkbSA_LockGroup)
-	return True;
+	return TRUE;
     if (act->flags&XkbSA_ClearLocks)
 	TryCopyStr(buf,",clearLocks",sz);
     if (act->flags&XkbSA_LatchToLock)
 	TryCopyStr(buf,",latchToLock",sz);
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -749,7 +749,7 @@ char		tbuf[32];
     TryCopyStr(buf,tbuf,sz);
     if (act->flags&XkbSA_NoAcceleration)
 	TryCopyStr(buf,",!accel",sz);
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -783,7 +783,7 @@ char			tbuf[32];
 	}
 	TryCopyStr(buf,tbuf,sz);
     }
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -802,7 +802,7 @@ char			tbuf[32];
 	else sprintf(tbuf,"+%d",XkbSAPtrDfltValue(act));
 	TryCopyStr(buf,tbuf,sz);
     }
-    return True;
+    return TRUE;
 }
 
 static Bool
@@ -863,7 +863,7 @@ char		tbuf[64];
 	    nOut++;
 	}
     }
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -882,7 +882,7 @@ char			tbuf[32];
     if (act->flags&XkbSA_SwitchApplication)
 	 TryCopyStr(buf,",!same",sz);
     else TryCopyStr(buf,",same",sz);
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -969,7 +969,7 @@ char			tbuf[32];
 	    nOut++;
 	}
     }
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -997,7 +997,7 @@ char			tbuf[32];
     sprintf(tbuf,",data[3]=0x%02x",act->message[3]); TryCopyStr(buf,tbuf,sz);
     sprintf(tbuf,",data[4]=0x%02x",act->message[4]); TryCopyStr(buf,tbuf,sz);
     sprintf(tbuf,",data[5]=0x%02x",act->message[5]); TryCopyStr(buf,tbuf,sz);
-    return True;
+    return TRUE;
 }
 
 static Bool
@@ -1022,7 +1022,7 @@ unsigned		vmods,vmods_mask;
     else sprintf(tbuf,"key=%d",kc);
     TryCopyStr(buf,tbuf,sz);
     if ((act->mods_mask==0)&&(vmods_mask==0))
-	return True;
+	return TRUE;
     if ((act->mods_mask==XkbAllModifiersMask)&&
 	(vmods_mask==XkbAllVirtualModsMask)) {
 	tmp= XkbVModMaskText(xkb,act->mods,vmods,XkbXKBFile);
@@ -1043,7 +1043,7 @@ unsigned		vmods,vmods_mask;
 	    TryCopyStr(buf,tmp,sz);
 	}
     }
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -1076,7 +1076,7 @@ char			tbuf[32];
 	}
 	TryCopyStr(buf,tbuf,sz);
     }
-    return True;
+    return TRUE;
 }
 
 /*ARGSUSED*/
@@ -1095,7 +1095,7 @@ char		tbuf[32];
     sprintf(tbuf,",data[4]=0x%02x",act->data[4]); TryCopyStr(buf,tbuf,sz);
     sprintf(tbuf,",data[5]=0x%02x",act->data[5]); TryCopyStr(buf,tbuf,sz);
     sprintf(tbuf,",data[6]=0x%02x",act->data[6]); TryCopyStr(buf,tbuf,sz);
-    return True;
+    return TRUE;
 }
 
 typedef	Bool	(*actionCopy)(
@@ -1173,7 +1173,7 @@ char	buf[256],*tmp;
 	permanent=((behavior->type&XkbKB_Permanent)!=0);
 
 	if (type==XkbKB_Lock) {
-	    sprintf(buf,"lock= %s",(permanent?"Permanent":"True"));
+	    sprintf(buf,"lock= %s",(permanent?"Permanent":"TRUE"));
 	}
 	else if (type==XkbKB_RadioGroup) {
 	    int 	g;
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 3c2df03..a201731 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -195,7 +195,7 @@ int		nRead=0;
 	char name[100];
 	if (named&bit) {
 	    if (nRead+=XkmGetCountedString(file,name,100)) {
-		xkb->names->vmods[i]= XkbInternAtom(name,False);
+		xkb->names->vmods[i]= XkbInternAtom(name,FALSE);
 		if (changes)
 		    changes->names.changed_vmods|= bit;
 	    }
@@ -240,7 +240,7 @@ XkbKeyNamePtr	pN;
 	return -1;
     }
     if (name[0]!='\0') {
-	xkb->names->keycodes= XkbInternAtom(name,False);
+	xkb->names->keycodes= XkbInternAtom(name,FALSE);
     }
 
     for (pN=&xkb->names->keys[minKC],i=minKC;i<=(int)maxKC;i++,pN++) {
@@ -294,7 +294,7 @@ char 			buf[100];
 	    _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeyTypes",0);
 	    return -1;
         }
-	xkb->names->types= XkbInternAtom(buf,False);
+	xkb->names->types= XkbInternAtom(buf,FALSE);
     }
     num_types= XkmGetCARD16(file,&nRead);
     nRead+= XkmSkipPadding(file,2);
@@ -349,7 +349,7 @@ char 			buf[100];
 	   return -1;
 	}
 	if (buf[0]!='\0') {
-	     type->name= XkbInternAtom(buf,False);
+	     type->name= XkbInternAtom(buf,FALSE);
 	}
 	else type->name= None;
 
@@ -430,7 +430,7 @@ XkbAction               *act;
 	    _XkbLibError(_XkbErrBadAlloc,"ReadXkmCompatMap",0);
 	    return -1;
 	}
-	xkb->names->compat= XkbInternAtom(name,False);
+	xkb->names->compat= XkbInternAtom(name,FALSE);
     }
     num_si= XkmGetCARD16(file,&nRead);
     groups= XkmGetCARD8(file,&nRead);
@@ -603,7 +603,7 @@ int			nRead=0;
 	}
 	nRead+= tmp;
 	if (buf[0]!='\0')
-	     name= XkbInternAtom(buf,False);
+	     name= XkbInternAtom(buf,FALSE);
 	else name= None;
 	if ((tmp=fread(&wire,SIZEOF(xkmIndicatorMapDesc),1,file))<1) {
 	    _XkbLibError(_XkbErrBadLength,"ReadXkmIndicators",0);
@@ -822,7 +822,7 @@ int		nRead=0;
     nRead+= XkmGetCountedString(file,buf,100);
     tmp= fread(&doodadWire,SIZEOF(xkmDoodadDesc),1,file);
     nRead+= SIZEOF(xkmDoodadDesc)*tmp;
-    doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(buf,False));
+    doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(buf,FALSE));
     if (!doodad)
 	return nRead;
     doodad->any.type= doodadWire.any.type;
@@ -882,7 +882,7 @@ register int		r;
     nRead+= XkmGetCountedString(file,buf,100);
     tmp= fread(&olWire,SIZEOF(xkmOverlayDesc),1,file);
     nRead+= tmp*SIZEOF(xkmOverlayDesc);
-    ol= XkbAddGeomOverlay(section,XkbInternAtom(buf,False),
+    ol= XkbAddGeomOverlay(section,XkbInternAtom(buf,FALSE),
     							olWire.num_rows);
     if (!ol)
 	return nRead;
@@ -920,7 +920,7 @@ char		buf[100];
 Atom		nameAtom;
 
     nRead+= XkmGetCountedString(file,buf,100);
-    nameAtom= XkbInternAtom(buf,False);
+    nameAtom= XkbInternAtom(buf,FALSE);
     tmp= fread(&sectionWire,SIZEOF(xkmSectionDesc),1,file);
     nRead+= SIZEOF(xkmSectionDesc)*tmp;
     section= XkbAddGeomSection(geom,nameAtom,sectionWire.num_rows,
@@ -1014,7 +1014,7 @@ XkbGeometrySizesRec	sizes;
 	return nRead;
     }
     geom= xkb->geom;
-    geom->name= XkbInternAtom(buf,False);
+    geom->name= XkbInternAtom(buf,FALSE);
     geom->width_mm= wireGeom.width_mm;
     geom->height_mm= wireGeom.height_mm;
     nRead+= XkmGetCountedString(file,buf,100);
@@ -1050,7 +1050,7 @@ XkbGeometrySizesRec	sizes;
 	    XkbOutlinePtr	ol;
 	    xkmOutlineDesc	olWire;
 	    nRead+= XkmGetCountedString(file,buf,100);
-	    nameAtom= XkbInternAtom(buf,False);
+	    nameAtom= XkbInternAtom(buf,FALSE);
 	    tmp= fread(&shapeWire,SIZEOF(xkmShapeDesc),1,file);
 	    nRead+= tmp*SIZEOF(xkmShapeDesc);
 	    shape= XkbAddGeomShape(geom,nameAtom,shapeWire.num_outlines);
commit 0ea2b0bd02f8683998e8b9ebc2b96d606ce45f45
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Dec 18 20:07:30 2009 +1000

    xkb: Add XKM file format description.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Acked-by: Dan Nicholson <dbn.lists at gmail.com>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>

diff --git a/xkb/XKM_file_format.txt b/xkb/XKM_file_format.txt
new file mode 100644
index 0000000..0ba28ee
--- /dev/null
+++ b/xkb/XKM_file_format.txt
@@ -0,0 +1,684 @@
+                        XKM File Format Description
+                                Version 15
+
+1. Introduction
+
+The XKM file format is the exchange format for XKB keyboard descriptions
+between the server and xkbcomp. Usually, the server forks off xkbcomp,
+xkbcomp compiles the XKM format from the given parameters.
+The resulting XKM file is put into a directory readable by the server and
+then parsed.
+
+The XKM format is little more than a binary dump of various XKB-specific
+structures and hence tied to the ABI of the server.
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+1.1 About this file format description
+
+This description was produced by analyzing the XKM parsing code. Parts of
+the file description present in the original format specification may be
+missing. This description thus cannot be a reference document for XKM
+implementations.
+
+No description of the meaning of the various fields is given here. Refer to
+the XKB protocol specification for more details.
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+2. Notations used in this document
+
+Notation for structures:
+
+┌───
+  Name of struct
+	name of field:		type or fixed value of field
+	name of field:		type or fixed value of field
+└───
+
+Data types are identical to those used in the X Protocol specification
+except where noted otherwise. Structs specific to XKM are prefixed with XKM,
+defines specific to the XKB protocol specification are prefixed with Xkb and
+their value is equivalent to that in the protocol specification.
+
+Multiple instances of a given type are denoted in the following form:
+	name of field:		LISTofFIELDTYPE
+
+Length specifiers for such fields are usually prefixed with num_. For
+example, a struct containing a num_foo of 8 and a 'foo' field contains 8
+structures of type 'foo'.
+
+Variable length padding is specified as pad(x), where x is the length of the
+data to be padded out to a multiple of 4 bytes. For example, given an x of
+10, pad(x) would be the remaining 2 bytes to pad the whole struct to 12
+bytes.
+
+A special notation is a variable content struct. In this case, the contents
+of the struct depend on the value of one or more specific fields.
+┌───
+  Name of struct
+	field:			type or fixed value of field
+	field:			type or fixed value of field
+	───
+	field ⇒ value 1
+	⇒
+		specific field:		type
+		specific field:		type
+	───
+        field ⇒ value 2
+	⇒
+		specific field:		type
+		specific field:		type
+└───
+This notation denotes that if field is of value 1, this struct contains the
+specific fields listed underneath value 1.
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+3. XKM Format
+
+The XKM format is a binary format with structs usually being padded to a
+multiple of 4 bytes. No provisions for endianess are provided, the parser is
+left to guess the endianess of the XKM file.
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+3.1 Common data types
+
+┌───
+  XKMCountedString
+	count:			CARD16
+	string:			count * CHAR
+	pad:			pad(count + 2)
+└───
+
+XKMCountedString is used for user-readable identifiers. Prime example are
+the level names and the section names ("complete", "evdev(inet)", etc.)
+
+┌───
+  XKMGroupBits:		CARD8
+	group1			0x1
+	group2			0x2
+	group3			0x4
+	group4			0x8
+└───
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+3.2 Header and Table of Contents
+
+┌───
+  XKMHeader
+	version:		CARD8
+	identifier1:		'm'
+	identifier2:		'k'
+	idenfifier3:		'x'
+└───
+
+The XKM file format has a 4 byte header identifying the file and the XKM
+version. The header is followed by the table of contents indicating the
+sections present in this file.
+
+┌───
+  XKMFileInfo
+	type:			CARD8
+	min_keycode:		CARD8
+	max_keycode:		CARD8
+	num_sectioninfo:	CARD8
+	present:		CARD16
+	pad:			CARD16
+	sectioninfo:		LISTofXKMSectionInfo
+└───
+
+min_keycode and max_keycode specify the keycode range for this keyboard
+descriptions. The core protocol requires min_keycode always be equal to or
+greater than 8.
+
+┌───
+  XKMSectionInfo
+	type:			CARD16
+		XkmTypesIndex		0
+		XkmCompatMapIndex	1
+		XkmSymbolsIndex		2
+		XkmIndicatorsIndex	3
+		XkmKeyNamesIndex	4
+		XkmGeometryIndex	5
+		XkmVirtualModsIndex	6
+	format:			CARD16
+	size:			CARD16
+	offset:			CARD16
+└───
+
+Describes the section found in a chunk of a file. This struct is found
+_twice_ in the file per section, once as part of the XKMFileInfo, once at
+the beginning of the actual section (see offset).
+The type specifies the type of the section, the section is to be parsed
+according to this type.
+Size and offset specify the size in bytes and the offset into the file in
+bytes, respectively.
+
+3.3 Sections
+
+Each section resides at the offset specified in the XKMFileInfo sectioninfo.
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+3.3.1 XKMTypes
+
+An XKMTypes section describes the key types defined in a layout. Roughly
+speaking, a key type defines how many levels a given key has and which
+modifiers change to a particular level.
+
+┌───
+  XKMTypesSection
+	section_info:		XKMSectionInfo
+	name:			XKMCountedString
+	num_types:		CARD16
+	pad:			CARD16
+	types:			LISTofXKMKeyType
+└───
+
+┌───
+  XKMKeyType
+	real_mods:		CARD8
+	num_levels:		CARD8
+	virt_mods:		CARD16
+	num_map_entries: 	CARD8
+	num_level_names: 	CARD8
+	perserve:	 	CARD8
+	pad:			CARD8
+	map_entries:		LISTofXKMKTMapEntry
+	name:			XKMCountedString
+	mods:			LISTofXKMModsDesc
+	level_names:		LISXTofXKMCountedString
+└───
+
+The num_map_entries specifies the number of structs in both map_entries and mods. mods is only present if preserve is TRUE.
+
+┌───
+  XKMKTMapEntry
+	level:			CARD8
+	real_mods:		CARD8
+	virt_mods:		CARD16
+└───
+
+┌───
+  XKMModsDesc
+	real_mods:		CARD8
+	pad:			CARD8
+	virt_mods:		CARD16
+└───
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+3.3.2 XKMCompatMap
+
+An XKMCompatMap section describes the actions a keyboard may trigger. This
+ranges from the TerminateServer action to simple modifier bits.
+
+┌───
+  XKMCompatMap
+	section_info:		XKMSectionInfo
+	name:			XKMCountedString
+	num_si:			CARD16
+	group_mask:		XKMGroupBits
+	pad:			CARD8
+	si:			LISTofXKMSymInterpreterDesc
+	groups:			LISTofXKMModsDesc
+└───
+
+One XKMModsDesc is present for each bit set in group_mask.
+
+┌───
+  XKMSymInterpretDesc
+	sym:			CARD32
+	mods:			CARD8
+	match:			CARD8
+	virtual_mod:		CARD8
+	flags:			CARD8
+	action_type:		CARD8
+	action_data:		XKMActionData
+└───
+
+Where the action is 7 bytes of CARD8 whose content is determined by
+action_type.
+
+┌───
+  XKMActionData:
+	pad0:			CARD8
+	pad1:			CARD16
+	pad2:			CARD32
+	───
+        action_type ⇒ XkbSA_SetMods ||
+        action_type ⇒ XkbSA_LatchMods ||
+        action_type ⇒ XkbSA_LockMods
+	⇒
+		flags:			CARD8
+		mask:			CARD8
+		real_mods:		CARD8
+		vmods1:			CARD8
+		vmods2:			CARD8
+		pad:			CARD16
+	───
+        action_type ⇒ XkbSA_SetGroup ||
+        action_type ⇒ XkbSA_LatchGroup ||
+        action_type ⇒ XkbSA_LockGroup
+	⇒
+		flags:			CARD8
+		group_XXX:		CARD8
+		pad0:			CARD8
+		pad1:			CARD32
+	───
+        action_type ⇒ XkbSA_MovePtr
+	⇒
+		flags:			CARD8
+		high_XXX:		CARD8
+		low_XXX:		CARD8
+		high_YYY:		CARD8
+		low_YYY:		CARD8
+		pad:			CARD16
+	───
+        action_type ⇒ XkbSA_PtrBtn ||
+        action_type ⇒ XkbSA_LockPtrBtn
+	⇒
+		flags:			CARD8
+		count:			CARD8
+		button:			CARD8
+		pad:			CARD32
+	───
+        action_type ⇒ XkbSA_DeviceBtn ||
+        action_type ⇒ XkbSA_LockLockPtrBtn
+	⇒
+		flags:			CARD8
+		count:			CARD8
+		button:			CARD8
+		device:			CARD8
+		pad0:			CARD8
+		pad1:			CARD16
+	───
+        action_type ⇒ XkbSA_SetPtrDflt
+	⇒
+		flags:			CARD8
+		affect:			CARD8
+		valueXXX:		CARD8
+		pad0:			CARD32
+	───
+        action_type ⇒ XkbSA_ISOLock
+	⇒
+		flags:			CARD8
+		mask:			CARD8
+		real_mods:		CARD8
+		group_XXX:		CARD8
+		affect:			CARD8
+		vmods1:			CARD8
+		vmods1:			CARD8
+	───
+        action_type ⇒ XkbSA_SwitchScreen
+	⇒
+		flags:			CARD8
+		screenXXX:		CARD8
+		pad0:			CARD8
+		pad1:			CARD32
+	───
+        action_type ⇒ XkbSA_SetControls ||
+        action_type ⇒ XkbSA_LockControls
+	⇒
+		flags:			CARD8
+		ctrls3:			CARD8
+		ctrls2:			CARD8
+		ctrls1:			CARD8
+		ctrls0:			CARD8
+		pad:			CARD16
+	───
+        action_type ⇒ XkbSA_RedirectKey
+	⇒
+		new_key:		CARD8
+		mods_mask:		CARD8
+		mods:			CARD8
+		vmods_mask0:		CARD8
+		vmods_mask1:		CARD8
+		vmods0:			CARD8
+		vmods1:			CARD8
+	───
+        action_type ⇒ XkbSA_DeviceValuator
+	⇒
+		device:		CARD8
+		v1_what:		CARD8
+		v1_idx:			CARD8
+		v1_value:		CARD8
+		v2_what:		CARD8
+		v2_idx:			CARD8
+		v2_value:		CARD8
+		pad:			CARD8
+	───
+        action_type ⇒ XkbSA_XFree86Private ||
+        action_type ⇒ XkbSA_Terminate
+	⇒
+		pad0:			CARD8
+		pad1:			CARD16
+		pad2:			CARD32
+	───
+        action_type ⇒ XkbSA_ActionMessage
+	⇒
+		press_msg:		BOOL
+		release_msg:		BOOL
+		gen_event:		BOOL
+		message:		4 * CHAR
+└───
+
+Note: XkbSA_ActionMessage is currently unsupported and the contents are
+ignored.
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+3.3.3 XkmSymbols
+
+The symbols in a keymap define the actual keysyms each key may produce.
+
+┌───
+  XKMSymbols
+	section_info:		XKMSectionInfo
+	name:			XKMCountedString
+	min_keycode:		CARD8
+	max_keycode:		CARD8
+	group_names_mask:	XKMGroupBits
+	num_vmod_maps:		CARD8
+	group_names:		LISTofXKMCountedString
+	keysyms:		XKMKeysymMapDesc
+	vmod_maps:		XKMVModMapDesc
+└───
+One group_name is present for each bit set in group_names_mask.
+The number of keysyms present is max_keycode - min_keycode + 1.
+
+┌───
+  XKMKeysymMapDesc
+	width:			CARD8
+	num_groups:		CARD8
+	modifier_map:		CARD8
+	flags:			CARD8
+	names:			LISTofXKMCountedString
+	syms:			LISTofCARD32
+	behavior:		XKMBehaviorDesc
+└───
+
+Presence of names is conditional on the XkmKeyHasTypes flag. The number of
+strings is equal to the number of group bits in group_names_mask in the
+preceeding XKMSymbols section.
+The number of elements in syms is equal to width * num_groups.
+Presence of behavior is conditional on the XkmKeyHasBehavior flag.
+
+┌───
+  XKMKeyBehaviorDesc
+	type:			CARD8
+	data:			CARD8
+	pad:			CARD16
+└───
+
+┌───
+  XKMVModMapDesc
+	key:			CARD8
+	pad:			CARD8
+	vmods:			CARD16
+└───
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+3.3.4 XKMIndicators
+
+┌───
+  XKMIndicators
+	section_info:		XKMSectionInfo
+	name:			XKMCountedString
+	num_indicators:		CARD8
+	pad0:			CARD8
+	pad1:			CARD16
+	indicators:		LISTofXKMIndicatorMapDesc
+└───
+
+┌───
+  XKMIndicatorMapDesc
+	name:			XKMCountedString
+	indicator:		CARD8
+	flags:			CARD8
+	which_mods:		CARD8
+	real_mods:		CARD8
+	vmods:			CARD16
+	which_groups:		CARD8
+	groups:			CARD8
+	ctrls:			CARD32
+└───
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+3.3.5 XKMKeyNames
+
+┌───
+  XKMKeyNames
+	section_info:		XKMSectionInfo
+	name:			XKMCountedString
+	min_keycode:		CARD8
+	max_keycode:		CARD8
+	num_aliases:		CARD8
+	pad:			CARD8
+	keynames:		LISTofXKMKeyname
+	aliases:		LISTofXKMKeyAlias
+└───
+
+keynames contains max_keycode - min_keycode + 1 entries.
+
+┌───
+  XkmKeyname
+	name:			4 * CHAR8
+└───
+
+┌───
+  XkmKeyAlias
+	real:			XkmKeyname
+	alias:			XkmKeyname
+└───
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+3.3.5 XKMGeometry
+
+┌───
+  XKMGeometry
+	section_info:		XKMSectionInfo
+	name:			XKMCountedString
+	width_mm:		CARD16
+	height_mm:		CARD16
+	base_color_ndx:		CARD8
+	label_color_ndx:	CARD8
+	num_properties:		CARD16
+	num_colors:		CARD16
+	num_shapes:		CARD16
+	num_sections:		CARD16
+	num_doodads:		CARD16
+	num_key_aliases:	CARD16
+	pad:			CARD16
+	label_font:		XKMCountedString
+	properties:		LISTofXKMGeomProperty
+	colors:			LISTofXKMCountedString
+	shapes:			LISTofXKMGeomShape
+	sections:		LISTofXKMGeomSection
+	doodads:		LISTofXKMGeomDoodad
+	key_aliases:		LISTofXKMKeyAlias
+└───
+
+┌───
+  XKMGeomProperty
+	name:			XKMCountedString
+	value:			XKMCountedString
+
+└───
+
+┌───
+  XKMGeomShape
+	name:			XKMCountedString
+	num_outlines:		CARD8
+	primary_idx:		CARD8
+	approx_idx:		CARD8
+	pad:			CARD8
+	outlines:		LISTofXKMOutlineDesc
+└───
+
+┌───
+  XKMOutlineDesc
+	num_points:		CARD8
+	corner_radius:		CARD8
+	pad:			CARD16
+	points:			LISTofXKMPointDesc
+└───
+
+┌───
+  XKMPointDesc
+	x:			INT16
+	y:			INT16
+└───
+
+┌───
+  XKMGeomSection
+	name:			XKMCountedString
+	top:			INT16
+	left:			INT16
+	width:			CARD16
+	height:			CARD16
+	angle:			INT16
+	priority:		CARD8
+	num_rows:		CARD8
+	num_doodads:		CARD8
+	num_overlays:		CARD8
+	pad:			CARD16
+	rows:			LISTofXKMRowDesc
+	doodads:		LISTofXKMGeomDoodad
+	overlays:		LISTofXKMGeomOverlay
+└───
+
+┌───
+  XKMRowDesc
+	top:			INT16
+	left:			INT16
+	num_keys:		CARD8
+	vertical:		BOOL
+	pad:			CARD16
+	keys:			XKMKeyDesc
+└───
+
+┌───
+  XKMKeyDesc
+	name:			XKMKeyname
+	gap:			INT16
+	shape_idx:		CARD8
+	color_idx:		CARD8
+└───
+
+┌───
+  XKMGeomDoodad
+	name:			XKMCountedString
+	type:			CARD8
+	priority:		CARD8
+	top:			INT16
+	left:			INT16
+	pad1:			CARD16
+	pad2:			CARD32
+	pad3:			CARD32
+	───
+        type ⇒ XkbOutlineDoodad ||
+        type ⇒ XkbSolideDoodad
+	⇒
+		type:			CARD8
+		priority:		CARD8
+		top:			INT16
+		left:			INT16
+		angle:			INT16
+		color_idx:		CARD8
+		shape_idx:		CARD8
+		pad0:			CARD16
+		pad1:			CARD32
+	───
+        type ⇒ XkbTextDoodad
+	⇒
+		type:			CARD8
+		priority:		CARD8
+		top:			INT16
+		left:			INT16
+		angle:			INT16
+		width:			CARD16
+		height:			CARD16
+		color_idx:		CARD8
+		pad0:			CARD8
+		pad1:			CARD16
+		text:			XKMCountedString
+		font:			XKMCountedString
+	───
+        type ⇒ XkbIndicatorDoodad
+	⇒
+		type:			CARD8
+		priority:		CARD8
+		top:			INT16
+		left:			INT16
+		shape_idx:		CARD8
+		on_color_idx:		CARD8
+		off_color_idx:		CARD8
+		pad0:			CARD8
+		pad1:			CARD16
+		pad2:			CARD32
+	───
+        type ⇒ XkbLogoDoodad
+	⇒
+		type:			CARD8
+		priority:		CARD8
+		top:			INT16
+		left:			INT16
+		angle:			INT16
+		color_idx:		CARD8
+		shape_idx:		CARD8
+		pad0:			CARD16
+		pad1:			CARD32
+		logo_name:		XKMCountedString
+└───
+
+WARNING: XKMGeomDoodad has variable length depending on the type.
+NOTE: The current server implementation does not use all fields of all
+structures.
+
+┌───
+  XKMOverlayDesc
+	name:			XKMCountedString
+	num_rows:		CARD8
+	pad0:			CARD8
+	pad1:			CARD16
+	rows:			LISTofXKMOverlayRowDesc
+└───
+
+┌───
+  XKMOverlayRowDesc
+	name:			XKMCountedString
+	row_under:		CARD8
+	num_keys:		CARD8
+	pad:			CARD16
+	keys:			LISTofXKMOverlayKeyDesc
+└───
+
+┌───
+  XKMOverlayKeyDesc
+	over:			XKMKeyname
+	under:			XKMKeyname
+└───
+
+                              ❧❧❧❧❧❧❧❧❧❧❧
+
+3.3.6 XKMVirtualMods
+
+┌───
+  XKMOverlayRowDesc
+	section_info:		XKMSectionInfo
+	name:			XKMCountedString
+	bound_mask:		SETofVMODBITS
+	named_mask:		SETofVMODBITS
+	vmods:			LISTofCARD8
+	pad:			pad(vmods)
+	names:			LISTofXKMCountedString
+└───
+
+	VMODBITS:		CARD16
+
+Number of elements in vmods is equal to the number of bits set in
+bound_mask. The padding completes vmods to a multiple of 4 byte units.
+Number of elements in names is equal to the number of bits set in
+named_mask.
commit 08b22c7faf97217ea4d497eec6624fc3dd916d9b
Author: Oldřich Jedlička <oldium.pro at seznam.cz>
Date:   Sun Jan 17 17:59:03 2010 +0100

    Allow driver to call DeleteInputDeviceRequest during UnInit
    
    When the input driver (like xf86-input-wacom) removes it's devices
    during a call to UnInit, the CloseDownDevices() cannot handle it. The
    "next" variable can become a pointer to freed memory.
    
    The patch introduces order-independent device freeing mechanism by
    remembering the already freed device ids. The devices can reorder any
    time during freeing. No device will be double-freed - if the removing
    failed for any reason; some implementations of DeleteInputDeviceRequest
    don't free the devices already.
    
    Signed-off-by: Oldřich Jedlička <oldium.pro at seznam.cz>
    Reviewed-by: Simon Thum <simon.thum at gmx.de>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/devices.c b/dix/devices.c
index 92b95ed..b002150 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -877,13 +877,43 @@ CloseDevice(DeviceIntPtr dev)
 }
 
 /**
+ * Shut down all devices of one list and free all resources.
+ */
+static
+void
+CloseDeviceList(DeviceIntPtr *listHead)
+{
+    /* Used to mark devices that we tried to free */
+    Bool freedIds[MAXDEVICES];
+    DeviceIntPtr dev;
+    int i;
+
+    if (listHead == NULL)
+        return;
+
+    for (i = 0; i < MAXDEVICES; i++)
+        freedIds[i] = FALSE;
+
+    dev = *listHead;
+    while (dev != NULL)
+    {
+        freedIds[dev->id] = TRUE;
+        DeleteInputDeviceRequest(dev);
+
+        dev = *listHead;
+        while (dev != NULL && freedIds[dev->id])
+            dev = dev->next;
+    }
+}
+
+/**
  * Shut down all devices, free all resources, etc.
  * Only useful if you're shutting down the server!
  */
 void
 CloseDownDevices(void)
 {
-    DeviceIntPtr dev, next;
+    DeviceIntPtr dev;
 
     /* Float all SDs before closing them. Note that at this point resources
      * (e.g. cursors) have been freed already, so we can't just call
@@ -896,16 +926,8 @@ CloseDownDevices(void)
             dev->u.master = NULL;
     }
 
-    for (dev = inputInfo.devices; dev; dev = next)
-    {
-	next = dev->next;
-        DeleteInputDeviceRequest(dev);
-    }
-    for (dev = inputInfo.off_devices; dev; dev = next)
-    {
-	next = dev->next;
-        DeleteInputDeviceRequest(dev);
-    }
+    CloseDeviceList(&inputInfo.devices);
+    CloseDeviceList(&inputInfo.off_devices);
 
     CloseDevice(inputInfo.pointer);
     CloseDevice(inputInfo.keyboard);
commit b91cec26de367f75388e620772747b08eee34294
Author: Horst Wente <horst.wente at acm.org>
Date:   Wed Dec 30 19:35:20 2009 +0100

    xkb: make ctrl+alt+keypad + / ctrl+alt+keypad - work again (#25743)
    
    Video mode switching via keypad keys did not work
    
    Signed-off-by: Horst Wente <horst.wente at acm.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 6623d1b..3c2df03 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -531,7 +531,13 @@ XkbAction               *act;
             act->devval.v2_ndx = wire.actionData[5];
             act->devval.v2_what = wire.actionData[6];
             break;
+
         case XkbSA_XFree86Private:
+            /* copy the kind of action */
+            strncpy((char*)act->any.data, (char*)wire.actionData,
+                    XkbAnyActionDataSize);
+            break ;
+
         case XkbSA_Terminate:
             /* no args, kinda (note: untrue for xfree86). */
             break;
commit 993e78d6c433f65bd8a87890a6bb6da480b2cdc4
Author: Oldřich Jedlička <oldium.pro at seznam.cz>
Date:   Tue Jan 12 19:15:06 2010 +0100

    Fix typo in updateSlaveDeviceCoords
    
    The index [0] for the second valuator looks bogus; fix it.
    
    Signed-off-by: Oldřich Jedlička <oldium.pro at seznam.cz>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/getevents.c b/dix/getevents.c
index bfde2e9..82bb77b 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -296,7 +296,7 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
                         &pDev->last.remainder[0], NULL, pDev->valuator->axes + 0, scr->width);
     if(pDev->valuator->numAxes > 1)
         pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1], pDev->last.remainder[1],
-                        &pDev->last.remainder[0], NULL, pDev->valuator->axes + 1, scr->height);
+                        &pDev->last.remainder[1], NULL, pDev->valuator->axes + 1, scr->height);
 
     /* calculate the other axis as well based on info from the old
      * slave-device. If the old slave had less axes than this one,


More information about the Xquartz-changes mailing list