1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Mon Dec 24 09:45:45 2007 Martin Duerst <duerst@it.aoyama.ac.jp>

* transcode.c, transcode_data_one_byte.c, transcode_data_japanese.c:
	  added rb_ prefix to external data symbols.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2007-12-24 00:47:21 +00:00
parent 888a89153a
commit 9c7718ac6b
4 changed files with 101 additions and 96 deletions

View file

@ -1,3 +1,8 @@
Mon Dec 24 09:45:45 2007 Martin Duerst <duerst@it.aoyama.ac.jp>
* transcode.c, transcode_data_one_byte.c, transcode_data_japanese.c:
added rb_ prefix to external data symbols.
Mon Dec 24 06:36:00 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
Mon Dec 24 05:32:22 2007 Yukihiro Matsumoto <matz@ruby-lang.org>

View file

@ -24,41 +24,41 @@ VALUE rb_str_shared_replace(VALUE, VALUE);
*/
/* extern declarations, should use some include file here */
extern const BYTE_LOOKUP from_ISO_8859_1;
extern const BYTE_LOOKUP from_ISO_8859_2;
extern const BYTE_LOOKUP from_ISO_8859_3;
extern const BYTE_LOOKUP from_ISO_8859_4;
extern const BYTE_LOOKUP from_ISO_8859_5;
extern const BYTE_LOOKUP from_ISO_8859_6;
extern const BYTE_LOOKUP from_ISO_8859_7;
extern const BYTE_LOOKUP from_ISO_8859_8;
extern const BYTE_LOOKUP from_ISO_8859_9;
extern const BYTE_LOOKUP from_ISO_8859_10;
extern const BYTE_LOOKUP from_ISO_8859_11;
extern const BYTE_LOOKUP from_ISO_8859_13;
extern const BYTE_LOOKUP from_ISO_8859_14;
extern const BYTE_LOOKUP from_ISO_8859_15;
extern const BYTE_LOOKUP rb_from_ISO_8859_1;
extern const BYTE_LOOKUP rb_from_ISO_8859_2;
extern const BYTE_LOOKUP rb_from_ISO_8859_3;
extern const BYTE_LOOKUP rb_from_ISO_8859_4;
extern const BYTE_LOOKUP rb_from_ISO_8859_5;
extern const BYTE_LOOKUP rb_from_ISO_8859_6;
extern const BYTE_LOOKUP rb_from_ISO_8859_7;
extern const BYTE_LOOKUP rb_from_ISO_8859_8;
extern const BYTE_LOOKUP rb_from_ISO_8859_9;
extern const BYTE_LOOKUP rb_from_ISO_8859_10;
extern const BYTE_LOOKUP rb_from_ISO_8859_11;
extern const BYTE_LOOKUP rb_from_ISO_8859_13;
extern const BYTE_LOOKUP rb_from_ISO_8859_14;
extern const BYTE_LOOKUP rb_from_ISO_8859_15;
extern const BYTE_LOOKUP to_ISO_8859_1;
extern const BYTE_LOOKUP to_ISO_8859_2;
extern const BYTE_LOOKUP to_ISO_8859_3;
extern const BYTE_LOOKUP to_ISO_8859_4;
extern const BYTE_LOOKUP to_ISO_8859_5;
extern const BYTE_LOOKUP to_ISO_8859_6;
extern const BYTE_LOOKUP to_ISO_8859_7;
extern const BYTE_LOOKUP to_ISO_8859_8;
extern const BYTE_LOOKUP to_ISO_8859_9;
extern const BYTE_LOOKUP to_ISO_8859_10;
extern const BYTE_LOOKUP to_ISO_8859_11;
extern const BYTE_LOOKUP to_ISO_8859_13;
extern const BYTE_LOOKUP to_ISO_8859_14;
extern const BYTE_LOOKUP to_ISO_8859_15;
extern const BYTE_LOOKUP rb_to_ISO_8859_1;
extern const BYTE_LOOKUP rb_to_ISO_8859_2;
extern const BYTE_LOOKUP rb_to_ISO_8859_3;
extern const BYTE_LOOKUP rb_to_ISO_8859_4;
extern const BYTE_LOOKUP rb_to_ISO_8859_5;
extern const BYTE_LOOKUP rb_to_ISO_8859_6;
extern const BYTE_LOOKUP rb_to_ISO_8859_7;
extern const BYTE_LOOKUP rb_to_ISO_8859_8;
extern const BYTE_LOOKUP rb_to_ISO_8859_9;
extern const BYTE_LOOKUP rb_to_ISO_8859_10;
extern const BYTE_LOOKUP rb_to_ISO_8859_11;
extern const BYTE_LOOKUP rb_to_ISO_8859_13;
extern const BYTE_LOOKUP rb_to_ISO_8859_14;
extern const BYTE_LOOKUP rb_to_ISO_8859_15;
extern const BYTE_LOOKUP from_SHIFT_JIS;
extern const BYTE_LOOKUP from_EUC_JP;
extern const BYTE_LOOKUP rb_from_SHIFT_JIS;
extern const BYTE_LOOKUP rb_from_EUC_JP;
extern const BYTE_LOOKUP to_SHIFT_JIS;
extern const BYTE_LOOKUP to_EUC_JP;
extern const BYTE_LOOKUP rb_to_SHIFT_JIS;
extern const BYTE_LOOKUP rb_to_EUC_JP;
/* declarations probably need to go into separate header file, e.g. transcode.h */
@ -102,39 +102,39 @@ register_transcoder(const char *from_e, const char *to_e,
static void
init_transcoder_table(void)
{
register_transcoder("ISO-8859-1", "UTF-8", &from_ISO_8859_1, 2, 0);
register_transcoder("ISO-8859-2", "UTF-8", &from_ISO_8859_2, 2, 0);
register_transcoder("ISO-8859-3", "UTF-8", &from_ISO_8859_3, 2, 0);
register_transcoder("ISO-8859-4", "UTF-8", &from_ISO_8859_4, 2, 0);
register_transcoder("ISO-8859-5", "UTF-8", &from_ISO_8859_5, 3, 0);
register_transcoder("ISO-8859-6", "UTF-8", &from_ISO_8859_6, 2, 0);
register_transcoder("ISO-8859-7", "UTF-8", &from_ISO_8859_7, 3, 0);
register_transcoder("ISO-8859-8", "UTF-8", &from_ISO_8859_8, 3, 0);
register_transcoder("ISO-8859-9", "UTF-8", &from_ISO_8859_9, 2, 0);
register_transcoder("ISO-8859-10", "UTF-8", &from_ISO_8859_10, 3, 0);
register_transcoder("ISO-8859-11", "UTF-8", &from_ISO_8859_11, 3, 0);
register_transcoder("ISO-8859-13", "UTF-8", &from_ISO_8859_13, 3, 0);
register_transcoder("ISO-8859-14", "UTF-8", &from_ISO_8859_14, 3, 0);
register_transcoder("ISO-8859-15", "UTF-8", &from_ISO_8859_15, 3, 0);
register_transcoder("UTF-8", "ISO-8859-1", &to_ISO_8859_1, 1, 1);
register_transcoder("UTF-8", "ISO-8859-2", &to_ISO_8859_2, 1, 1);
register_transcoder("UTF-8", "ISO-8859-3", &to_ISO_8859_3, 1, 1);
register_transcoder("UTF-8", "ISO-8859-4", &to_ISO_8859_4, 1, 1);
register_transcoder("UTF-8", "ISO-8859-5", &to_ISO_8859_5, 1, 1);
register_transcoder("UTF-8", "ISO-8859-6", &to_ISO_8859_6, 1, 1);
register_transcoder("UTF-8", "ISO-8859-7", &to_ISO_8859_7, 1, 1);
register_transcoder("UTF-8", "ISO-8859-8", &to_ISO_8859_8, 1, 1);
register_transcoder("UTF-8", "ISO-8859-9", &to_ISO_8859_9, 1, 1);
register_transcoder("UTF-8", "ISO-8859-10", &to_ISO_8859_10, 1, 1);
register_transcoder("UTF-8", "ISO-8859-11", &to_ISO_8859_11, 1, 1);
register_transcoder("UTF-8", "ISO-8859-13", &to_ISO_8859_13, 1, 1);
register_transcoder("UTF-8", "ISO-8859-14", &to_ISO_8859_14, 1, 1);
register_transcoder("UTF-8", "ISO-8859-15", &to_ISO_8859_15, 1, 1);
register_transcoder("ISO-8859-1", "UTF-8", &rb_from_ISO_8859_1, 2, 0);
register_transcoder("ISO-8859-2", "UTF-8", &rb_from_ISO_8859_2, 2, 0);
register_transcoder("ISO-8859-3", "UTF-8", &rb_from_ISO_8859_3, 2, 0);
register_transcoder("ISO-8859-4", "UTF-8", &rb_from_ISO_8859_4, 2, 0);
register_transcoder("ISO-8859-5", "UTF-8", &rb_from_ISO_8859_5, 3, 0);
register_transcoder("ISO-8859-6", "UTF-8", &rb_from_ISO_8859_6, 2, 0);
register_transcoder("ISO-8859-7", "UTF-8", &rb_from_ISO_8859_7, 3, 0);
register_transcoder("ISO-8859-8", "UTF-8", &rb_from_ISO_8859_8, 3, 0);
register_transcoder("ISO-8859-9", "UTF-8", &rb_from_ISO_8859_9, 2, 0);
register_transcoder("ISO-8859-10", "UTF-8", &rb_from_ISO_8859_10, 3, 0);
register_transcoder("ISO-8859-11", "UTF-8", &rb_from_ISO_8859_11, 3, 0);
register_transcoder("ISO-8859-13", "UTF-8", &rb_from_ISO_8859_13, 3, 0);
register_transcoder("ISO-8859-14", "UTF-8", &rb_from_ISO_8859_14, 3, 0);
register_transcoder("ISO-8859-15", "UTF-8", &rb_from_ISO_8859_15, 3, 0);
register_transcoder("UTF-8", "ISO-8859-1", &rb_to_ISO_8859_1, 1, 1);
register_transcoder("UTF-8", "ISO-8859-2", &rb_to_ISO_8859_2, 1, 1);
register_transcoder("UTF-8", "ISO-8859-3", &rb_to_ISO_8859_3, 1, 1);
register_transcoder("UTF-8", "ISO-8859-4", &rb_to_ISO_8859_4, 1, 1);
register_transcoder("UTF-8", "ISO-8859-5", &rb_to_ISO_8859_5, 1, 1);
register_transcoder("UTF-8", "ISO-8859-6", &rb_to_ISO_8859_6, 1, 1);
register_transcoder("UTF-8", "ISO-8859-7", &rb_to_ISO_8859_7, 1, 1);
register_transcoder("UTF-8", "ISO-8859-8", &rb_to_ISO_8859_8, 1, 1);
register_transcoder("UTF-8", "ISO-8859-9", &rb_to_ISO_8859_9, 1, 1);
register_transcoder("UTF-8", "ISO-8859-10", &rb_to_ISO_8859_10, 1, 1);
register_transcoder("UTF-8", "ISO-8859-11", &rb_to_ISO_8859_11, 1, 1);
register_transcoder("UTF-8", "ISO-8859-13", &rb_to_ISO_8859_13, 1, 1);
register_transcoder("UTF-8", "ISO-8859-14", &rb_to_ISO_8859_14, 1, 1);
register_transcoder("UTF-8", "ISO-8859-15", &rb_to_ISO_8859_15, 1, 1);
register_transcoder("SHIFT_JIS", "UTF-8", &from_SHIFT_JIS, 3, 0);
register_transcoder("EUC-JP", "UTF-8", &from_EUC_JP, 3, 0);
register_transcoder("UTF-8", "SHIFT_JIS", &to_SHIFT_JIS, 2, 1);
register_transcoder("UTF-8", "EUC-JP", &to_EUC_JP, 2, 1);
register_transcoder("SHIFT_JIS", "UTF-8", &rb_from_SHIFT_JIS, 3, 0);
register_transcoder("EUC-JP", "UTF-8", &rb_from_EUC_JP, 3, 0);
register_transcoder("UTF-8", "SHIFT_JIS", &rb_to_SHIFT_JIS, 2, 1);
register_transcoder("UTF-8", "EUC-JP", &rb_to_EUC_JP, 2, 1);
register_transcoder(NULL, NULL, NULL, 0, 0);
}

View file

@ -4419,7 +4419,7 @@ from_SHIFT_JIS_infos[108] = {
&from_SHIFT_JIS_FC, UNDEF,
};
const BYTE_LOOKUP
from_SHIFT_JIS = {
rb_from_SHIFT_JIS = {
from_SHIFT_JIS_offsets,
from_SHIFT_JIS_infos
};
@ -13344,7 +13344,7 @@ to_SHIFT_JIS_infos[17] = {
UNDEF,
};
const BYTE_LOOKUP
to_SHIFT_JIS = {
rb_to_SHIFT_JIS = {
to_SHIFT_JIS_offsets,
to_SHIFT_JIS_infos
};
@ -18113,7 +18113,7 @@ from_EUC_JP_infos[85] = {
UNDEF,
};
const BYTE_LOOKUP
from_EUC_JP = {
rb_from_EUC_JP = {
from_EUC_JP_offsets,
from_EUC_JP_infos
};
@ -23613,7 +23613,7 @@ to_EUC_JP_infos[17] = {
UNDEF,
};
const BYTE_LOOKUP
to_EUC_JP = {
rb_to_EUC_JP = {
to_SHIFT_JIS_offsets,
to_EUC_JP_infos
};

View file

@ -66,7 +66,7 @@ from_ISO_8859_1_infos[129] = {
o2(0xC3,0xBF),
};
const BYTE_LOOKUP
from_ISO_8859_1 = {
rb_from_ISO_8859_1 = {
from_ISO_8859_1_offsets,
from_ISO_8859_1_infos
};
@ -159,7 +159,7 @@ to_ISO_8859_1_infos[4] = {
&to_ISO_8859_1_C3, UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_1 = {
rb_to_ISO_8859_1 = {
to_ISO_8859_1_offsets,
to_ISO_8859_1_infos
};
@ -201,7 +201,7 @@ from_ISO_8859_2_infos[129] = {
o2(0xCB,0x99),
};
const BYTE_LOOKUP
from_ISO_8859_2 = {
rb_from_ISO_8859_2 = {
from_ISO_8859_1_offsets,
from_ISO_8859_2_infos
};
@ -352,7 +352,7 @@ to_ISO_8859_2_infos[7] = {
UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_2 = {
rb_to_ISO_8859_2 = {
to_ISO_8859_2_offsets,
to_ISO_8859_2_infos
};
@ -411,7 +411,7 @@ from_ISO_8859_3_infos[123] = {
o2(0xC5,0x9D), o2(0xCB,0x99), UNDEF,
};
const BYTE_LOOKUP
from_ISO_8859_3 = {
rb_from_ISO_8859_3 = {
from_ISO_8859_3_offsets,
from_ISO_8859_3_infos
};
@ -537,7 +537,7 @@ to_ISO_8859_3_infos[7] = {
UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_3 = {
rb_to_ISO_8859_3 = {
to_ISO_8859_2_offsets,
to_ISO_8859_3_infos
};
@ -579,7 +579,7 @@ from_ISO_8859_4_infos[129] = {
o2(0xCB,0x99),
};
const BYTE_LOOKUP
from_ISO_8859_4 = {
rb_from_ISO_8859_4 = {
from_ISO_8859_1_offsets,
from_ISO_8859_4_infos
};
@ -709,7 +709,7 @@ to_ISO_8859_4_infos[7] = {
UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_4 = {
rb_to_ISO_8859_4 = {
to_ISO_8859_2_offsets,
to_ISO_8859_4_infos
};
@ -783,7 +783,7 @@ from_ISO_8859_5_infos[129] = {
o2(0xD1,0x9F),
};
const BYTE_LOOKUP
from_ISO_8859_5 = {
rb_from_ISO_8859_5 = {
from_ISO_8859_1_offsets,
from_ISO_8859_5_infos
};
@ -929,7 +929,7 @@ to_ISO_8859_5_infos[6] = {
&to_ISO_8859_5_E2, UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_5 = {
rb_to_ISO_8859_5 = {
to_ISO_8859_5_offsets,
to_ISO_8859_5_infos
};
@ -979,7 +979,7 @@ from_ISO_8859_6_infos[85] = {
UNDEF,
};
const BYTE_LOOKUP
from_ISO_8859_6 = {
rb_from_ISO_8859_6 = {
from_ISO_8859_6_offsets,
from_ISO_8859_6_infos
};
@ -1080,7 +1080,7 @@ to_ISO_8859_6_infos[5] = {
UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_6 = {
rb_to_ISO_8859_6 = {
to_ISO_8859_6_offsets,
to_ISO_8859_6_infos
};
@ -1172,7 +1172,7 @@ from_ISO_8859_7_infos[127] = {
UNDEF,
};
const BYTE_LOOKUP
from_ISO_8859_7 = {
rb_from_ISO_8859_7 = {
from_ISO_8859_7_offsets,
from_ISO_8859_7_infos
};
@ -1353,7 +1353,7 @@ to_ISO_8859_7_infos[7] = {
UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_7 = {
rb_to_ISO_8859_7 = {
to_ISO_8859_7_offsets,
to_ISO_8859_7_infos
};
@ -1428,7 +1428,7 @@ from_ISO_8859_8_infos[94] = {
o3(0xE2,0x80,0x8F), UNDEF,
};
const BYTE_LOOKUP
from_ISO_8859_8 = {
rb_from_ISO_8859_8 = {
from_ISO_8859_8_offsets,
from_ISO_8859_8_infos
};
@ -1568,7 +1568,7 @@ to_ISO_8859_8_infos[6] = {
&to_ISO_8859_8_E2, UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_8 = {
rb_to_ISO_8859_8 = {
to_ISO_8859_8_offsets,
to_ISO_8859_8_infos
};
@ -1610,7 +1610,7 @@ from_ISO_8859_9_infos[129] = {
o2(0xC3,0xBF),
};
const BYTE_LOOKUP
from_ISO_8859_9 = {
rb_from_ISO_8859_9 = {
from_ISO_8859_1_offsets,
from_ISO_8859_9_infos
};
@ -1707,7 +1707,7 @@ to_ISO_8859_9_infos[6] = {
&to_ISO_8859_9_C5, UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_9 = {
rb_to_ISO_8859_9 = {
to_ISO_8859_9_offsets,
to_ISO_8859_9_infos
};
@ -1781,7 +1781,7 @@ from_ISO_8859_10_infos[129] = {
o2(0xC4,0xB8),
};
const BYTE_LOOKUP
from_ISO_8859_10 = {
rb_from_ISO_8859_10 = {
from_ISO_8859_1_offsets,
from_ISO_8859_10_infos
};
@ -1933,7 +1933,7 @@ to_ISO_8859_10_infos[7] = {
UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_10 = {
rb_to_ISO_8859_10 = {
to_ISO_8859_10_offsets,
to_ISO_8859_10_infos
};
@ -2022,7 +2022,7 @@ from_ISO_8859_11_infos[122] = {
o3(0xE0,0xB9,0x9B), UNDEF,
};
const BYTE_LOOKUP
from_ISO_8859_11 = {
rb_from_ISO_8859_11 = {
from_ISO_8859_11_offsets,
from_ISO_8859_11_infos
};
@ -2150,7 +2150,7 @@ to_ISO_8859_11_infos[4] = {
&to_ISO_8859_11_E0, UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_11 = {
rb_to_ISO_8859_11 = {
to_ISO_8859_11_offsets,
to_ISO_8859_11_infos
};
@ -2224,7 +2224,7 @@ from_ISO_8859_13_infos[129] = {
o3(0xE2,0x80,0x99),
};
const BYTE_LOOKUP
from_ISO_8859_13 = {
rb_from_ISO_8859_13 = {
from_ISO_8859_1_offsets,
from_ISO_8859_13_infos
};
@ -2363,7 +2363,7 @@ to_ISO_8859_13_infos[7] = {
UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_13 = {
rb_to_ISO_8859_13 = {
to_ISO_8859_10_offsets,
to_ISO_8859_13_infos
};
@ -2437,7 +2437,7 @@ from_ISO_8859_14_infos[129] = {
o2(0xC3,0xBF),
};
const BYTE_LOOKUP
from_ISO_8859_14 = {
rb_from_ISO_8859_14 = {
from_ISO_8859_1_offsets,
from_ISO_8859_14_infos
};
@ -2653,7 +2653,7 @@ to_ISO_8859_14_infos[7] = {
UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_14 = {
rb_to_ISO_8859_14 = {
to_ISO_8859_14_offsets,
to_ISO_8859_14_infos
};
@ -2727,7 +2727,7 @@ from_ISO_8859_15_infos[129] = {
o2(0xC3,0xBF),
};
const BYTE_LOOKUP
from_ISO_8859_15 = {
rb_from_ISO_8859_15 = {
from_ISO_8859_1_offsets,
from_ISO_8859_15_infos
};
@ -2841,7 +2841,7 @@ to_ISO_8859_15_infos[6] = {
&to_ISO_8859_15_E2, UNDEF,
};
const BYTE_LOOKUP
to_ISO_8859_15 = {
rb_to_ISO_8859_15 = {
to_ISO_8859_15_offsets,
to_ISO_8859_15_infos
};