summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-01-15 10:07:38 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-02-02 10:03:30 +1000
commitdb687f718f760ba254ab51994769db101dc9ca3a (patch)
tree485e4327b1d0759389d9de8d7cdb8f931073cc19 /xkb
parent0ea2b0bd02f8683998e8b9ebc2b96d606ce45f45 (diff)
xkb: sed True -> TRUE and False -> FALSE
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/XKBAlloc.c12
-rw-r--r--xkb/XKBGAlloc.c32
-rw-r--r--xkb/XKBMisc.c48
-rw-r--r--xkb/ddxBeep.c2
-rw-r--r--xkb/ddxList.c6
-rw-r--r--xkb/ddxLoad.c18
-rw-r--r--xkb/maprules.c86
-rw-r--r--xkb/xkb.c94
-rw-r--r--xkb/xkbAccessX.c30
-rw-r--r--xkb/xkbActions.c38
-rw-r--r--xkb/xkbEvents.c6
-rw-r--r--xkb/xkbInit.c30
-rw-r--r--xkb/xkbLEDs.c32
-rw-r--r--xkb/xkbUtils.c20
-rw-r--r--xkb/xkbfmisc.c38
-rw-r--r--xkb/xkbout.c68
-rw-r--r--xkb/xkbtext.c42
-rw-r--r--xkb/xkmread.c22
18 files changed, 312 insertions, 312 deletions
diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c
index 6464e9970..d40aa3345 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 0bab39a23..b01005dd0 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 c1a17c082..2bb4a2452 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 10a731724..6f74cb541 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 bf4931127..e212ea3b5 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 72aff2ac0..4ccdddaf0 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 ec6fe3f01..3467c4238 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 ec26d6e7c..29052bf13 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 0d8e4eb2d..be1dceea3 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 75f3c722e..2cdb6fcea 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 58f75b306..33741e9c6 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 3d0fb0014..4a3219e2a 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 3cf24e33f..8c28513ec 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 a214b75d7..5b317c977 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 804ef2080..103e609a9 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 53f68411a..68ede902f 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 324254dd3..9f49d59ff 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 3c2df03fe..a201731f3 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);