aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/lcSjis.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/lcSjis.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/lcSjis.c')
-rw-r--r--nx-X11/lib/X11/lcSjis.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/nx-X11/lib/X11/lcSjis.c b/nx-X11/lib/X11/lcSjis.c
index 459156eb9..74dd033ec 100644
--- a/nx-X11/lib/X11/lcSjis.c
+++ b/nx-X11/lib/X11/lcSjis.c
@@ -154,7 +154,7 @@ sjis_mbstowcs(
wchar_t *outbufptr = (wchar_t *) *to;
wchar_t *outbuf_base = outbufptr;
- CodeSet *codesets = XLC_GENERIC(lcd, codeset_list);
+ CodeSet *codesets = XLC_GENERIC(lcd, codeset_list);
int codeset_num = XLC_GENERIC(lcd, codeset_num);
Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits);
@@ -321,7 +321,7 @@ sjis_wcstombs(
}
*outbufptr++ = (char)tmp;
- } while (length);
+ } while (length);
} /* end for */
@@ -390,7 +390,7 @@ wc_codeset(
return( codesets[0] );
#endif
}
-
+
static int
sjis_mbtocs(
@@ -419,7 +419,7 @@ sjis_mbtocs(
if (*from_left >= char_size && *to_left >= char_size) {
*dst++ = *src++;
- *dst++ = *src++;
+ *dst++ = *src++;
if (!VALID_MULTIBYTE((Uchar) *(src-1))) /* check 2nd byte */
unconv_num++;
sjis_to_jis((Uchar *)(dst-2), (Uchar *)(dst-1));
@@ -431,10 +431,10 @@ sjis_mbtocs(
return -1;
charset = *CS3->charset_list;
char_size = charset->char_size;
-
+
if (*from_left >= char_size && *to_left >= char_size) {
*dst++ = *src++;
- *dst++ = *src++;
+ *dst++ = *src++;
if (!VALID_MULTIBYTE((Uchar) *(src-1))) /* check 2nd byte */
unconv_num++;
sjis_to_jis((Uchar *)(dst-2), (Uchar *)(dst-1));
@@ -528,11 +528,11 @@ sjis_mbstocs(
*from_left = tmp_from_left;
*to = (XPointer) tmp_to;
*to_left = tmp_to_left;
- }
+ }
if (num_args > 0)
*((XlcCharSet *) args[0]) = charset;
-
+
return unconv_num;
}
@@ -660,7 +660,7 @@ sjis_cstombs(
if (num_args < 1)
return -1;
-
+
if (!(codeset = GetCodeSetFromCharSet(lcd, (XlcCharSet) args[0])))
return -1;
@@ -668,7 +668,7 @@ sjis_cstombs(
buf_len /= codeset->length;
if (csstr_len < buf_len)
buf_len = csstr_len;
-
+
cvt_length += buf_len * codeset->length;
if (bufptr) {
@@ -962,7 +962,7 @@ sjis_mbstocts(
unconv_num++;
break;
}
-
+
if (ctptr) {
strcpy(ctptr, ctdptr[cs_num]->ct_encoding);
ctptr += ctdptr[cs_num]->ct_encoding_len;
@@ -972,7 +972,7 @@ sjis_mbstocts(
clen = charset->length;
do {
*ctptr++ = *inbufptr++;
- } while (--clen);
+ } while (--clen);
if (charset->length >= 2) {
sjis_to_jis((Uchar *)(ctptr-2), (Uchar *)(ctptr-1));
@@ -1118,7 +1118,7 @@ sjis_wcstocts(
}
*ctptr++ = (char)tmp;
}
- } while (length);
+ } while (length);
} /* end for */
@@ -1297,7 +1297,7 @@ sjis_ctstowcs(
if (*from_left > *to_left)
*from_left = *to_left;
-
+
for (length = ctdata[Ascii].length; *from_left > 0; (*from_left) -= length )
{
ct_type = CT_STD;
@@ -1434,7 +1434,7 @@ create_conv(
conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;
-
+
conv->methods = methods;
conv->state = (XPointer) lcd;
return conv;