aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/xkb.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xkb/xkb.c')
-rw-r--r--xorg-server/xkb/xkb.c120
1 files changed, 60 insertions, 60 deletions
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c
index 666d50f8e..3c337b63e 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -194,7 +194,7 @@ ProcXkbUseExtension(ClientPtr client)
swaps(&rep.serverMinor, n);
}
WriteToClient(client,SIZEOF(xkbUseExtensionReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -219,7 +219,7 @@ ProcXkbSelectEvents(ClientPtr client)
client->mapNotifyMask|= (stuff->affectMap&stuff->map);
}
if ((stuff->affectWhich&(~XkbMapNotifyMask))==0)
- return client->noClientException;
+ return Success;
masks = XkbFindClientResource((DevicePtr)dev,client);
if (!masks){
@@ -343,7 +343,7 @@ ProcXkbSelectEvents(ClientPtr client)
ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n",dataLeft);
return BadLength;
}
- return client->noClientException;
+ return Success;
}
return BadAlloc;
}
@@ -578,7 +578,7 @@ ProcXkbGetState(ClientPtr client)
swaps(&rep.ptrBtnState,n);
}
WriteToClient(client, SIZEOF(xkbGetStateReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -646,7 +646,7 @@ ProcXkbLatchLockState(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -722,7 +722,7 @@ ProcXkbGetControls(ClientPtr client)
swaps(&rep.axOptions, n);
}
WriteToClient(client, SIZEOF(xkbGetControlsReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
int
@@ -942,7 +942,7 @@ ProcXkbSetControls(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -1365,7 +1365,7 @@ unsigned i,len;
char *desc,*start;
len= (rep->length*4)-(SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply));
- start= desc= xcalloc(1, len);
+ start= desc= calloc(1, len);
if (!start)
return BadAlloc;
if ( rep->nTypes>0 )
@@ -1405,8 +1405,8 @@ char *desc,*start;
}
WriteToClient(client, (i=SIZEOF(xkbGetMapReply)), (char *)rep);
WriteToClient(client, len, start);
- xfree((char *)start);
- return client->noClientException;
+ free((char *)start);
+ return Success;
}
int
@@ -2186,8 +2186,8 @@ unsigned first,last;
if (maxRG>(int)xkbi->nRadioGroups) {
int sz = maxRG*sizeof(XkbRadioGroupRec);
if (xkbi->radioGroups)
- xkbi->radioGroups= xrealloc(xkbi->radioGroups,sz);
- else xkbi->radioGroups= xcalloc(1, sz);
+ xkbi->radioGroups= realloc(xkbi->radioGroups,sz);
+ else xkbi->radioGroups= calloc(1, sz);
if (xkbi->radioGroups) {
if (xkbi->nRadioGroups)
bzero(&xkbi->radioGroups[xkbi->nRadioGroups],
@@ -2594,7 +2594,7 @@ ProcXkbSetMap(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -2629,7 +2629,7 @@ int size;
size= rep->length*4;
if (size>0) {
- data = xalloc(size);
+ data = malloc(size);
if (data) {
register unsigned i,bit;
xkbModsWireDesc * grp;
@@ -2680,9 +2680,9 @@ int size;
WriteToClient(client, SIZEOF(xkbGetCompatMapReply), (char *)rep);
if (data) {
WriteToClient(client, size, data);
- xfree((char *)data);
+ free((char *)data);
}
- return client->noClientException;
+ return Success;
}
int
@@ -2777,7 +2777,7 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
XkbSymInterpretPtr sym;
if ((unsigned)(req->firstSI+req->nSI)>compat->num_si) {
compat->num_si= req->firstSI+req->nSI;
- compat->sym_interpret= xrealloc(compat->sym_interpret,
+ compat->sym_interpret= realloc(compat->sym_interpret,
compat->num_si * sizeof(XkbSymInterpretRec));
if (!compat->sym_interpret) {
compat->num_si= 0;
@@ -2923,7 +2923,7 @@ ProcXkbSetCompatMap(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -2960,7 +2960,7 @@ ProcXkbGetIndicatorState(ClientPtr client)
swapl(&rep.state,i);
}
WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -2995,7 +2995,7 @@ register unsigned bit;
length = rep->length*4;
if (length>0) {
CARD8 *to;
- to= map= xalloc(length);
+ to= map= malloc(length);
if (map) {
xkbIndicatorMapWireDesc *wire = (xkbIndicatorMapWireDesc *)to;
for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
@@ -3034,9 +3034,9 @@ register unsigned bit;
WriteToClient(client, SIZEOF(xkbGetIndicatorMapReply), (char *)rep);
if (map) {
WriteToClient(client, length, (char *)map);
- xfree((char *)map);
+ free((char *)map);
}
- return client->noClientException;
+ return Success;
}
int
@@ -3130,7 +3130,7 @@ ProcXkbSetIndicatorMap(ClientPtr client)
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
if (stuff->which==0)
- return client->noClientException;
+ return Success;
for (nIndicators=i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
if (stuff->which&bit)
@@ -3257,7 +3257,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
}
WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
@@ -3467,7 +3467,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -3632,7 +3632,7 @@ register int n;
swapl(&rep->indicators,n);
}
- start = desc = xalloc(length);
+ start = desc = malloc(length);
if ( !start )
return BadAlloc;
if (xkb->names) {
@@ -3756,8 +3756,8 @@ register int n;
}
WriteToClient(client, SIZEOF(xkbGetNamesReply), (char *)rep);
WriteToClient(client, length, start);
- xfree((char *)start);
- return client->noClientException;
+ free((char *)start);
+ return Success;
}
int
@@ -4118,7 +4118,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff)
tmp+= stuff->nKeyAliases*2;
}
else if (names->key_aliases!=NULL) {
- xfree(names->key_aliases);
+ free(names->key_aliases);
names->key_aliases= NULL;
names->num_key_aliases= 0;
}
@@ -4137,7 +4137,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff)
tmp+= stuff->nRadioGroups;
}
else if (names->radio_groups) {
- xfree(names->radio_groups);
+ free(names->radio_groups);
names->radio_groups= NULL;
names->num_rg= 0;
}
@@ -4286,7 +4286,7 @@ ProcXkbSetNames(ClientPtr client)
/* everything is okay -- update names */
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -4740,7 +4740,7 @@ XkbSendGeometry( ClientPtr client,
if (geom!=NULL) {
len= rep->length*4;
- start= desc= xalloc(len);
+ start= desc= malloc(len);
if (!start)
return BadAlloc;
desc= XkbWriteCountedString(desc,geom->label_font,client->swapped);
@@ -4784,10 +4784,10 @@ XkbSendGeometry( ClientPtr client,
if (len>0)
WriteToClient(client, len, start);
if (start!=NULL)
- xfree((char *)start);
+ free((char *)start);
if (freeGeom)
XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
- return client->noClientException;
+ return Success;
}
int
@@ -4834,7 +4834,7 @@ CARD16 len,*plen;
swaps(plen,n);
}
len= *plen;
- str= xalloc(len+1);
+ str= malloc(len+1);
if (str) {
memcpy(str,&wire[2],len);
str[len]= '\0';
@@ -5182,16 +5182,16 @@ char * wire;
return BadAlloc;
val= _GetCountedString(&wire,client->swapped);
if (!val) {
- xfree(name);
+ free(name);
return BadAlloc;
}
if (XkbAddGeomProperty(geom,name,val)==NULL) {
- xfree(name);
- xfree(val);
+ free(name);
+ free(val);
return BadAlloc;
}
- xfree(name);
- xfree(val);
+ free(name);
+ free(val);
}
if (req->nColors<2) {
@@ -5218,10 +5218,10 @@ char * wire;
if (!name)
return BadAlloc;
if (!XkbAddGeomColor(geom,name,geom->num_colors)) {
- xfree(name);
+ free(name);
return BadAlloc;
}
- xfree(name);
+ free(name);
}
if (req->nColors!=geom->num_colors) {
client->errorValue= _XkbErrCode3(0x05,req->nColors,geom->num_colors);
@@ -5414,7 +5414,7 @@ ProcXkbPerClientFlags(ClientPtr client)
swapl(&rep.autoCtrlValues,n);
}
WriteToClient(client,SIZEOF(xkbPerClientFlagsReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -5449,7 +5449,7 @@ unsigned char *wire,*str,*tmp,*legal;
wire= *pWire;
len= (*(unsigned char *)wire++);
if (len>0) {
- str= xcalloc(1, len+1);
+ str= calloc(1, len+1);
if (str) {
tmp= str;
for (i=0;i<len;i++) {
@@ -5460,7 +5460,7 @@ unsigned char *wire,*str,*tmp,*legal;
if (tmp!=str)
*tmp++= '\0';
else {
- xfree(str);
+ free(str);
str= NULL;
}
}
@@ -5511,7 +5511,7 @@ ProcXkbListComponents(ClientPtr client)
return BadLength;
if ((status=XkbDDXList(dev,&list,client))!=Success) {
if (list.pool) {
- xfree(list.pool);
+ free(list.pool);
list.pool= NULL;
}
return status;
@@ -5545,10 +5545,10 @@ ProcXkbListComponents(ClientPtr client)
WriteToClient(client,SIZEOF(xkbListComponentsReply),(char *)&rep);
if (list.nPool && list.pool) {
WriteToClient(client,XkbPaddedSize(list.nPool), (char *)list.pool);
- xfree(list.pool);
+ free(list.pool);
list.pool= NULL;
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -5888,12 +5888,12 @@ ProcXkbGetKbdByName(ClientPtr client)
XkbFreeKeyboard(new,XkbAllComponentsMask,TRUE);
new= NULL;
}
- if (names.keycodes) { xfree(names.keycodes); names.keycodes= NULL; }
- if (names.types) { xfree(names.types); names.types= NULL; }
- if (names.compat) { xfree(names.compat); names.compat= NULL; }
- if (names.symbols) { xfree(names.symbols); names.symbols= NULL; }
- if (names.geometry) { xfree(names.geometry); names.geometry= NULL; }
- return client->noClientException;
+ if (names.keycodes) { free(names.keycodes); names.keycodes= NULL; }
+ if (names.types) { free(names.types); names.types= NULL; }
+ if (names.compat) { free(names.compat); names.compat= NULL; }
+ if (names.symbols) { free(names.symbols); names.symbols= NULL; }
+ if (names.geometry) { free(names.geometry); names.geometry= NULL; }
+ return Success;
}
/***====================================================================***/
@@ -6207,12 +6207,12 @@ char * str;
}
WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep);
- str= xalloc(nameLen);
+ str= malloc(nameLen);
if (!str)
return BadAlloc;
XkbWriteCountedString(str,dev->name,client->swapped);
WriteToClient(client,nameLen,str);
- xfree(str);
+ free(str);
length-= nameLen;
if (rep.nBtnsRtrn>0) {
@@ -6233,7 +6233,7 @@ char * str;
ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length);
return BadLength;
}
- return client->noClientException;
+ return Success;
}
static char *
@@ -6461,7 +6461,7 @@ _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
nBtns= dev->button->numButtons;
acts= dev->button->xkb_acts;
if (acts==NULL) {
- acts= xcalloc(nBtns, sizeof(XkbAction));
+ acts= calloc(nBtns, sizeof(XkbAction));
if (!acts)
return BadAlloc;
dev->button->xkb_acts= acts;
@@ -6558,7 +6558,7 @@ ProcXkbSetDeviceInfo(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -6621,7 +6621,7 @@ int rc;
swapl(&rep.supportedCtrls, n);
}
WriteToClient(client,SIZEOF(xkbSetDebuggingFlagsReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/