• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision6018c3787ab9cebcddd039702ddf3c7127651cde (tree)
l'heure2018-02-01 03:43:04
AuteurWaldemar Brodkorb <wbx@ucli...>
CommiterWaldemar Brodkorb

Message de Log

libiconv: fake EUC_JP support

A lot of packages use the same autoconf macro, fake EUC_JP to
succeed. Tested with wget,libcdio and gnupg.

Change Summary

Modification

--- a/libiconv/iconv.c
+++ b/libiconv/iconv.c
@@ -30,6 +30,7 @@
3030 #define LATIN_9 010
3131 #define TIS_620 011
3232 #define JIS_0201 012
33+#define EUC_JP 013
3334
3435 /* some programs like php need this */
3536 int _libiconv_version = _LIBICONV_VERSION;
@@ -51,12 +52,13 @@ static const unsigned char charsets[] =
5152 "\011" "ISO-8859-11""\0"
5253 "\011" "TIS-620" "\0"
5354 "\012" "JIS-0201" "\0"
55+ "\013" "EUC-JP" "\0"
5456 "\377";
5557
5658 /* separate identifiers for sbcs/dbcs/etc map type */
5759 #define UCS2_8BIT 000
5860 #define UCS3_8BIT 001
59-#define EUC 002
61+#define EUC_JP 002
6062 #define EUC_TW 003
6163 #define SHIFT_JIS 004
6264 #define BIG5 005
@@ -71,7 +73,7 @@ static const unsigned char charsets[] =
7173 static const unsigned short maplen[] = {
7274 [UCS2_8BIT] = 4+ 2* 128,
7375 [UCS3_8BIT] = 4+ 3* 128,
74- [EUC] = 4+ 2* 94*94,
76+ [EUC_JP] = 4+ 2* 94*94,
7577 [SHIFT_JIS] = 4+ 2* 94*94,
7678 [BIG5] = 4+ 2* 94*157,
7779 [GBK] = 4+ 2* 126*190,
@@ -345,7 +347,7 @@ size_t iconv(iconv_t cd, char **in, size_t *inb, char **out, size_t *outb)
345347 case UCS2_8BIT:
346348 c -= 0x80;
347349 break;
348- case EUC:
350+ case EUC_JP:
349351 if ((unsigned)c - 0xa1 >= 94) goto ilseq;
350352 if ((unsigned)in[0][1] - 0xa1 >= 94) goto ilseq;
351353 c = (c-0xa1)*94 + (in[0][1]-0xa1);