aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/imConv.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-12 08:32:04 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-12 08:32:04 +0200
commit051d521f6e20761ba6831cecd91883da960fa931 (patch)
treeb28abba7818115d2fed80eb360a79a0f9183948e /nx-X11/lib/X11/imConv.c
parent6dce607bad8711dd06a5a7b69ad1930386b4123b (diff)
parentb8de7bf654929c823080b211aeac56cd213f5a32 (diff)
downloadnx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.gz
nx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.bz2
nx-libs-051d521f6e20761ba6831cecd91883da960fa931.zip
Merge branch 'uli42-pr/upgrade_libX11' into 3.6.x
Attributes GH PR #214: https://github.com/ArcticaProject/nx-libs/pull/214 Fixes ArcticaProject/nx-libs#157.
Diffstat (limited to 'nx-X11/lib/X11/imConv.c')
-rw-r--r--nx-X11/lib/X11/imConv.c69
1 files changed, 34 insertions, 35 deletions
diff --git a/nx-X11/lib/X11/imConv.c b/nx-X11/lib/X11/imConv.c
index 1f3d6006f..c3c1974de 100644
--- a/nx-X11/lib/X11/imConv.c
+++ b/nx-X11/lib/X11/imConv.c
@@ -1,4 +1,3 @@
-/* $TOG: imConv.c /main/20 1998/06/17 15:46:41 kaleb $ */
/******************************************************************
Copyright 1991, 1992 by Fuji Xerox Co.,Ltd.
@@ -44,9 +43,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XlcPubI.h"
#ifdef XKB
-/*
- * rather than just call _XLookupString (i.e. the pre-XKB XLookupString)
- * do this because with XKB the event may have some funky modifiers that
+/*
+ * rather than just call _XLookupString (i.e. the pre-XKB XLookupString)
+ * do this because with XKB the event may have some funky modifiers that
* _XLookupString doesn't grok.
*/
#include "XKBlib.h"
@@ -65,11 +64,11 @@ typedef int (*ucstocsConvProc)(
);
struct SubstRec {
- char* encoding_name;
- char* charset_name;
+ const char encoding_name[8];
+ const char charset_name[12];
};
-static struct SubstRec SubstTable[] = {
+static const struct SubstRec SubstTable[] = {
{"STRING", "ISO8859-1"},
{"TIS620", "TIS620-0"},
{"UTF-8", "ISO10646-1"}
@@ -105,7 +104,7 @@ _XimGetLocaleCode (
* locale
*/
/*ARGSUSED*/
-int
+int
_XimGetCharCode (
XPointer ucs_conv,
KeySym keysym,
@@ -144,7 +143,7 @@ static int lookup_string(
{
int ret;
unsigned ctrls = XkbGetXlibControls (event->display);
- XkbSetXlibControls (event->display,
+ XkbSetXlibControls (event->display,
XkbLC_ForceLatin1Lookup, XkbLC_ForceLatin1Lookup);
ret = XLookupString(event, (char *)buffer, nbytes, keysym, status);
XkbSetXlibControls (event->display,
@@ -156,13 +155,13 @@ static int lookup_string(
#define BUF_SIZE (20)
int
-_XimLookupMBText(ic, event, buffer, nbytes, keysym, status)
- Xic ic;
- XKeyEvent* event;
- char* buffer;
- int nbytes;
- KeySym* keysym;
- XComposeStatus* status;
+_XimLookupMBText(
+ Xic ic,
+ XKeyEvent* event,
+ char* buffer,
+ int nbytes,
+ KeySym* keysym,
+ XComposeStatus* status)
{
int count;
KeySym symbol;
@@ -181,11 +180,11 @@ _XimLookupMBText(ic, event, buffer, nbytes, keysym, status)
memcpy(look, (char *)buffer,count);
look[count] = '\0';
if ((count = im->methods->ctstombs(ic->core.im,
- (char*) look, count,
+ (char*) look, count,
buffer, nbytes, &dummy)) < 0) {
count = 0;
}
- } else if ((count == 0) ||
+ } else if ((count == 0) ||
(count == 1 && (symbol > 0x7f && symbol < 0xff00))) {
XPointer from = (XPointer) &ucs4;
@@ -227,13 +226,13 @@ _XimLookupMBText(ic, event, buffer, nbytes, keysym, status)
}
int
-_XimLookupWCText(ic, event, buffer, nbytes, keysym, status)
- Xic ic;
- XKeyEvent* event;
- wchar_t* buffer;
- int nbytes;
- KeySym* keysym;
- XComposeStatus* status;
+_XimLookupWCText(
+ Xic ic,
+ XKeyEvent* event,
+ wchar_t* buffer,
+ int nbytes,
+ KeySym* keysym,
+ XComposeStatus* status)
{
int count;
KeySym symbol;
@@ -250,7 +249,7 @@ _XimLookupWCText(ic, event, buffer, nbytes, keysym, status)
if (count > 1) {
if ((count = im->methods->ctstowcs(ic->core.im,
- (char*) look, count,
+ (char*) look, count,
buffer, nbytes, &dummy)) < 0) {
count = 0;
}
@@ -299,13 +298,13 @@ _XimLookupWCText(ic, event, buffer, nbytes, keysym, status)
}
int
-_XimLookupUTF8Text(ic, event, buffer, nbytes, keysym, status)
- Xic ic;
- XKeyEvent* event;
- char* buffer;
- int nbytes;
- KeySym* keysym;
- XComposeStatus* status;
+_XimLookupUTF8Text(
+ Xic ic,
+ XKeyEvent* event,
+ char* buffer,
+ int nbytes,
+ KeySym* keysym,
+ XComposeStatus* status)
{
int count;
KeySym symbol;
@@ -324,11 +323,11 @@ _XimLookupUTF8Text(ic, event, buffer, nbytes, keysym, status)
memcpy(look, (char *)buffer,count);
look[count] = '\0';
if ((count = im->methods->ctstoutf8(ic->core.im,
- (char*) look, count,
+ (char*) look, count,
buffer, nbytes, &dummy)) < 0) {
count = 0;
}
- } else if ((count == 0) ||
+ } else if ((count == 0) ||
(count == 1 && (symbol > 0x7f && symbol < 0xff00))) {
XPointer from = (XPointer) &ucs4;