diff options
Diffstat (limited to 'libX11/modules/im')
-rw-r--r-- | libX11/modules/im/ximcp/imLcLkup.c | 4 | ||||
-rw-r--r-- | libX11/modules/im/ximcp/imTrans.c | 1 | ||||
-rw-r--r-- | libX11/modules/im/ximcp/makefile | 35 |
3 files changed, 39 insertions, 1 deletions
diff --git a/libX11/modules/im/ximcp/imLcLkup.c b/libX11/modules/im/ximcp/imLcLkup.c index 80e4cfef1..22850a964 100644 --- a/libX11/modules/im/ximcp/imLcLkup.c +++ b/libX11/modules/im/ximcp/imLcLkup.c @@ -61,10 +61,11 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes, ||(ic->private.local.brl_committed != 0))) { if (ic->private.local.brl_committed != 0) { /* Braille Event */ unsigned char pattern = ic->private.local.brl_committed; - char mb[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)]; + char *mb=malloc(XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)); ret = _Xlcwctomb(ic->core.im->core.lcd, mb, BRL_UC_ROW | pattern); if(ret > bytes) { if(status) *status = XBufferOverflow; + free(mb); return(ret); } if(keysym) { @@ -73,6 +74,7 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes, } else if(status) *status = XLookupChars; memcpy(buffer, mb, ret); + free(mb); } else { /* Composed Event */ ret = strlen(&mb[b[ic->private.local.composed].mb]); if(ret > bytes) { diff --git a/libX11/modules/im/ximcp/imTrans.c b/libX11/modules/im/ximcp/imTrans.c index 7673279c6..d6c5fc6ad 100644 --- a/libX11/modules/im/ximcp/imTrans.c +++ b/libX11/modules/im/ximcp/imTrans.c @@ -56,6 +56,7 @@ PERFORMANCE OF THIS SOFTWARE. #include <X11/Xatom.h>
#include <X11/Xmd.h>
#include "Xlibint.h"
+#include <X11/Xwindows.h>
#include <X11/Xtrans/Xtrans.h>
#include "Xlcint.h"
#include "Ximint.h"
diff --git a/libX11/modules/im/ximcp/makefile b/libX11/modules/im/ximcp/makefile new file mode 100644 index 000000000..c1c40a1c7 --- /dev/null +++ b/libX11/modules/im/ximcp/makefile @@ -0,0 +1,35 @@ +DEFINES += XIM_t TRANS_CLIENT + +LIBRARY=libximcp + +CSRCS = \ + imCallbk.c \ + imDefFlt.c \ + imDefIc.c \ + imDefIm.c \ + imDefLkup.c \ + imDispch.c \ + imEvToWire.c \ + imExten.c \ + imImSw.c \ + imInsClbk.c \ + imInt.c \ + imLcFlt.c \ + imLcGIc.c \ + imLcIc.c \ + imLcIm.c \ + imLcLkup.c \ + imLcPrs.c \ + imLcSIc.c \ + imRmAttr.c \ + imRm.c \ + imThaiFlt.c \ + imThaiIc.c \ + imThaiIm.c \ + imTrans.c \ + imTransR.c \ + imTrX.c + +DEFINES += XKB_IN_SERVER +INCLUDES += ..\..\..\include\X11 ..\..\..\src\xlibi18n + |