diff options
author | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
commit | a915739887477b28d924ecc8417ee107d125bd6c (patch) | |
tree | c02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/xkb/xkbtext.c | |
parent | 6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff) | |
download | vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2 vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip |
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/xkb/xkbtext.c')
-rw-r--r-- | xorg-server/xkb/xkbtext.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/xorg-server/xkb/xkbtext.c b/xorg-server/xkb/xkbtext.c index d08c91589..95ad01378 100644 --- a/xorg-server/xkb/xkbtext.c +++ b/xorg-server/xkb/xkbtext.c @@ -35,8 +35,8 @@ #include <X11/Xos.h> #include <X11/X.h> -#define NEED_EVENTS #include <X11/Xproto.h> +#include <X11/extensions/XKMformat.h> #include "misc.h" #include "inputstr.h" #include "dix.h" @@ -71,16 +71,17 @@ char *rtrn; char * XkbAtomText(Atom atm,unsigned format) { +const char *atmstr; char *rtrn,*tmp; - tmp= XkbAtomGetString(atm); - if (tmp!=NULL) { + atmstr = XkbAtomGetString(atm); + if (atmstr != NULL) { int len; - len= strlen(tmp)+1; + len= strlen(atmstr)+1; if (len>BUFFER_SIZE) len= BUFFER_SIZE-2; rtrn= tbGetBuffer(len); - strncpy(rtrn,tmp,len); + strncpy(rtrn,atmstr,len); rtrn[len]= '\0'; } else { @@ -105,7 +106,8 @@ XkbVModIndexText(XkbDescPtr xkb,unsigned ndx,unsigned format) { register int len; register Atom *vmodNames; -char *rtrn,*tmp; +char *rtrn; +const char *tmp; char numBuf[20]; if (xkb && xkb->names) @@ -117,8 +119,10 @@ char numBuf[20]; tmp= "illegal"; else if (vmodNames&&(vmodNames[ndx]!=None)) tmp= XkbAtomGetString(vmodNames[ndx]); - if (tmp==NULL) - sprintf(tmp=numBuf,"%d",ndx); + if (tmp==NULL) { + sprintf(numBuf,"%d",ndx); + tmp = numBuf; + } len= strlen(tmp)+1; if (format==XkbCFile) |