diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2016-08-27 02:13:27 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-10 22:52:31 +0200 |
commit | 1baa27d098d5282cb942455f3f4a642ed21924d6 (patch) | |
tree | 847d62c0697667b143603e106348d90de24bb246 /nx-X11/lib/X11/lcSjis.c | |
parent | da3e7fd287d4d6c4e080fc230a567862431a565d (diff) | |
download | nx-libs-1baa27d098d5282cb942455f3f4a642ed21924d6.tar.gz nx-libs-1baa27d098d5282cb942455f3f4a642ed21924d6.tar.bz2 nx-libs-1baa27d098d5282cb942455f3f4a642ed21924d6.zip |
update files from modules dir of libX11 1.3.4
Diffstat (limited to 'nx-X11/lib/X11/lcSjis.c')
-rw-r--r-- | nx-X11/lib/X11/lcSjis.c | 30 |
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; |