aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/lcCT.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/lcCT.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/lcCT.c')
-rw-r--r--nx-X11/lib/X11/lcCT.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/nx-X11/lib/X11/lcCT.c b/nx-X11/lib/X11/lcCT.c
index 7e8335f87..d7fbb74cb 100644
--- a/nx-X11/lib/X11/lcCT.c
+++ b/nx-X11/lib/X11/lcCT.c
@@ -51,11 +51,11 @@
* Static representation of a character set that can be used in Compound Text.
*/
typedef struct _CTDataRec {
- const char *name;
- const char *ct_sequence; /* Compound Text encoding, ESC sequence */
+ const char name[19];
+ const char ct_sequence[5]; /* Compound Text encoding, ESC sequence */
} CTDataRec, *CTData;
-static CTDataRec default_ct_data[] =
+static const CTDataRec default_ct_data[] =
{
/* */
/* X11 registry name MIME name ISO-IR ESC sequence */
@@ -123,6 +123,8 @@ static CTDataRec default_ct_data[] =
#endif
/* For use by utf8 -> ctext */
{ "BIG5-0:GLGR", "\033%/2"},
+ { "BIG5HKSCS-0:GLGR", "\033%/2"},
+ { "GBK-0:GLGR", "\033%/2"},
/* used by Emacs, but not backed by ISO-IR */
{ "BIG5-E0:GL", "\033$(0" },
{ "BIG5-E0:GR", "\033$)0" },
@@ -317,7 +319,7 @@ _XlcParseCharSet(
const char *ptr = charset->ct_sequence;
int length;
int char_size;
-
+
if (*ptr == '\0')
return False;
@@ -749,7 +751,7 @@ cttocs(
or stop the current run. */
if (charset) {
if (charset != ch_charset)
- break;
+ break;
} else {
state->charset = charset = ch_charset;
}
@@ -789,7 +791,7 @@ cttocs(
or stop the current run. */
if (charset) {
if (charset != state->charset)
- break;
+ break;
} else {
charset = state->charset;
}
@@ -1095,7 +1097,7 @@ strtocs(
while (side == (*((unsigned char *) src) & 0x80) && length-- > 0)
*dst++ = *src++;
-
+
*from_left -= src - (const char *) *from;
*from = (XPointer) src;
*to_left -= dst - (char *) *to;
@@ -1131,7 +1133,7 @@ cstostr(
|| !((XlcCharSet) args[0] == state->GL_charset
|| (XlcCharSet) args[0] == state->GR_charset))
return -1;
-
+
csptr = *((const char **) from);
string_ptr = *((char **) to);
csstr_len = *from_left;
@@ -1260,10 +1262,10 @@ open_cstostr(
/* =========================== Initialization =========================== */
Bool
-_XlcInitCTInfo()
+_XlcInitCTInfo(void)
{
if (ct_list == NULL) {
- CTData ct_data;
+ const CTDataRec *ct_data;
int num;
XlcCharSet charset;