diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/xkb/xkbtext.c | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
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) |