comparison src/mule-charset.c @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 95016f13131a
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
72 static int composite_char_row_next; 72 static int composite_char_row_next;
73 static int composite_char_col_next; 73 static int composite_char_col_next;
74 74
75 #endif /* ENABLE_COMPOSITE_CHARS */ 75 #endif /* ENABLE_COMPOSITE_CHARS */
76 76
77 /* Table of charsets indexed by leading byte. */ 77 struct charset_lookup *chlook;
78 Lisp_Object charset_by_leading_byte[128]; 78
79 79 static const struct lrecord_description charset_lookup_description_1[] = {
80 /* Table of charsets indexed by type/final-byte/direction. */ 80 { XD_LISP_OBJECT, offsetof(struct charset_lookup, charset_by_leading_byte), 128+4*128*2 },
81 Lisp_Object charset_by_attributes[4][128][2]; 81 { XD_END }
82 };
83
84 static const struct struct_description charset_lookup_description = {
85 sizeof(struct charset_lookup),
86 charset_lookup_description_1
87 };
82 88
83 /* Table of number of bytes in the string representation of a character 89 /* Table of number of bytes in the string representation of a character
84 indexed by the first byte of that representation. 90 indexed by the first byte of that representation.
85 91
86 rep_bytes_by_first_byte(c) is more efficient than the equivalent 92 rep_bytes_by_first_byte(c) is more efficient than the equivalent
393 /************************************************************************/ 399 /************************************************************************/
394 /* charset object */ 400 /* charset object */
395 /************************************************************************/ 401 /************************************************************************/
396 402
397 static Lisp_Object 403 static Lisp_Object
398 mark_charset (Lisp_Object obj, void (*markobj) (Lisp_Object)) 404 mark_charset (Lisp_Object obj)
399 { 405 {
400 struct Lisp_Charset *cs = XCHARSET (obj); 406 struct Lisp_Charset *cs = XCHARSET (obj);
401 407
402 markobj (cs->short_name); 408 mark_object (cs->short_name);
403 markobj (cs->long_name); 409 mark_object (cs->long_name);
404 markobj (cs->doc_string); 410 mark_object (cs->doc_string);
405 markobj (cs->registry); 411 mark_object (cs->registry);
406 markobj (cs->ccl_program); 412 mark_object (cs->ccl_program);
407 return cs->name; 413 return cs->name;
408 } 414 }
409 415
410 static void 416 static void
411 print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) 417 print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
486 if (final) 492 if (final)
487 { 493 {
488 /* some charsets do not have final characters. This includes 494 /* some charsets do not have final characters. This includes
489 ASCII, Control-1, Composite, and the two faux private 495 ASCII, Control-1, Composite, and the two faux private
490 charsets. */ 496 charsets. */
491 assert (NILP (charset_by_attributes[type][final][direction])); 497 assert (NILP (chlook->charset_by_attributes[type][final][direction]));
492 charset_by_attributes[type][final][direction] = obj; 498 chlook->charset_by_attributes[type][final][direction] = obj;
493 } 499 }
494 500
495 assert (NILP (charset_by_leading_byte[id - 128])); 501 assert (NILP (chlook->charset_by_leading_byte[id - 128]));
496 charset_by_leading_byte[id - 128] = obj; 502 chlook->charset_by_leading_byte[id - 128] = obj;
497 if (id < 0xA0) 503 if (id < 0xA0)
498 /* official leading byte */ 504 /* official leading byte */
499 rep_bytes_by_first_byte[id] = rep_bytes; 505 rep_bytes_by_first_byte[id] = rep_bytes;
500 506
501 /* Some charsets are "faux" and don't have names or really exist at 507 /* Some charsets are "faux" and don't have names or really exist at
1292 void 1298 void
1293 vars_of_mule_charset (void) 1299 vars_of_mule_charset (void)
1294 { 1300 {
1295 int i, j, k; 1301 int i, j, k;
1296 1302
1303 chlook = xnew (struct charset_lookup);
1304 dumpstruct (&chlook, &charset_lookup_description);
1305
1297 /* Table of charsets indexed by leading byte. */ 1306 /* Table of charsets indexed by leading byte. */
1298 for (i = 0; i < countof (charset_by_leading_byte); i++) 1307 for (i = 0; i < countof (chlook->charset_by_leading_byte); i++)
1299 charset_by_leading_byte[i] = Qnil; 1308 chlook->charset_by_leading_byte[i] = Qnil;
1300 1309
1301 /* Table of charsets indexed by type/final-byte/direction. */ 1310 /* Table of charsets indexed by type/final-byte/direction. */
1302 for (i = 0; i < countof (charset_by_attributes); i++) 1311 for (i = 0; i < countof (chlook->charset_by_attributes); i++)
1303 for (j = 0; j < countof (charset_by_attributes[0]); j++) 1312 for (j = 0; j < countof (chlook->charset_by_attributes[0]); j++)
1304 for (k = 0; k < countof (charset_by_attributes[0][0]); k++) 1313 for (k = 0; k < countof (chlook->charset_by_attributes[0][0]); k++)
1305 charset_by_attributes[i][j][k] = Qnil; 1314 chlook->charset_by_attributes[i][j][k] = Qnil;
1306 1315
1307 next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1; 1316 next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
1308 next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2; 1317 next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2;
1309 } 1318 }
1310 1319
1316 make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ); 1325 make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ);
1317 1326
1318 /* Predefined character sets. We store them into variables for 1327 /* Predefined character sets. We store them into variables for
1319 ease of access. */ 1328 ease of access. */
1320 1329
1330 staticpro (&Vcharset_ascii);
1321 Vcharset_ascii = 1331 Vcharset_ascii =
1322 make_charset (LEADING_BYTE_ASCII, Qascii, 1, 1332 make_charset (LEADING_BYTE_ASCII, Qascii, 1,
1323 CHARSET_TYPE_94, 1, 0, 'B', 1333 CHARSET_TYPE_94, 1, 0, 'B',
1324 CHARSET_LEFT_TO_RIGHT, 1334 CHARSET_LEFT_TO_RIGHT,
1325 build_string ("ASCII"), 1335 build_string ("ASCII"),
1326 build_string ("ASCII)"), 1336 build_string ("ASCII)"),
1327 build_string ("ASCII (ISO646 IRV)"), 1337 build_string ("ASCII (ISO646 IRV)"),
1328 build_string ("\\(iso8859-[0-9]*\\|-ascii\\)")); 1338 build_string ("\\(iso8859-[0-9]*\\|-ascii\\)"));
1339 staticpro (&Vcharset_control_1);
1329 Vcharset_control_1 = 1340 Vcharset_control_1 =
1330 make_charset (LEADING_BYTE_CONTROL_1, Qcontrol_1, 2, 1341 make_charset (LEADING_BYTE_CONTROL_1, Qcontrol_1, 2,
1331 CHARSET_TYPE_94, 1, 1, 0, 1342 CHARSET_TYPE_94, 1, 1, 0,
1332 CHARSET_LEFT_TO_RIGHT, 1343 CHARSET_LEFT_TO_RIGHT,
1333 build_string ("C1"), 1344 build_string ("C1"),
1334 build_string ("Control characters"), 1345 build_string ("Control characters"),
1335 build_string ("Control characters 128-191"), 1346 build_string ("Control characters 128-191"),
1336 build_string ("")); 1347 build_string (""));
1348 staticpro (&Vcharset_latin_iso8859_1);
1337 Vcharset_latin_iso8859_1 = 1349 Vcharset_latin_iso8859_1 =
1338 make_charset (LEADING_BYTE_LATIN_ISO8859_1, Qlatin_iso8859_1, 2, 1350 make_charset (LEADING_BYTE_LATIN_ISO8859_1, Qlatin_iso8859_1, 2,
1339 CHARSET_TYPE_96, 1, 1, 'A', 1351 CHARSET_TYPE_96, 1, 1, 'A',
1340 CHARSET_LEFT_TO_RIGHT, 1352 CHARSET_LEFT_TO_RIGHT,
1341 build_string ("Latin-1"), 1353 build_string ("Latin-1"),
1342 build_string ("ISO8859-1 (Latin-1)"), 1354 build_string ("ISO8859-1 (Latin-1)"),
1343 build_string ("ISO8859-1 (Latin-1)"), 1355 build_string ("ISO8859-1 (Latin-1)"),
1344 build_string ("iso8859-1")); 1356 build_string ("iso8859-1"));
1357 staticpro (&Vcharset_latin_iso8859_2);
1345 Vcharset_latin_iso8859_2 = 1358 Vcharset_latin_iso8859_2 =
1346 make_charset (LEADING_BYTE_LATIN_ISO8859_2, Qlatin_iso8859_2, 2, 1359 make_charset (LEADING_BYTE_LATIN_ISO8859_2, Qlatin_iso8859_2, 2,
1347 CHARSET_TYPE_96, 1, 1, 'B', 1360 CHARSET_TYPE_96, 1, 1, 'B',
1348 CHARSET_LEFT_TO_RIGHT, 1361 CHARSET_LEFT_TO_RIGHT,
1349 build_string ("Latin-2"), 1362 build_string ("Latin-2"),
1350 build_string ("ISO8859-2 (Latin-2)"), 1363 build_string ("ISO8859-2 (Latin-2)"),
1351 build_string ("ISO8859-2 (Latin-2)"), 1364 build_string ("ISO8859-2 (Latin-2)"),
1352 build_string ("iso8859-2")); 1365 build_string ("iso8859-2"));
1366 staticpro (&Vcharset_latin_iso8859_3);
1353 Vcharset_latin_iso8859_3 = 1367 Vcharset_latin_iso8859_3 =
1354 make_charset (LEADING_BYTE_LATIN_ISO8859_3, Qlatin_iso8859_3, 2, 1368 make_charset (LEADING_BYTE_LATIN_ISO8859_3, Qlatin_iso8859_3, 2,
1355 CHARSET_TYPE_96, 1, 1, 'C', 1369 CHARSET_TYPE_96, 1, 1, 'C',
1356 CHARSET_LEFT_TO_RIGHT, 1370 CHARSET_LEFT_TO_RIGHT,
1357 build_string ("Latin-3"), 1371 build_string ("Latin-3"),
1358 build_string ("ISO8859-3 (Latin-3)"), 1372 build_string ("ISO8859-3 (Latin-3)"),
1359 build_string ("ISO8859-3 (Latin-3)"), 1373 build_string ("ISO8859-3 (Latin-3)"),
1360 build_string ("iso8859-3")); 1374 build_string ("iso8859-3"));
1375 staticpro (&Vcharset_latin_iso8859_4);
1361 Vcharset_latin_iso8859_4 = 1376 Vcharset_latin_iso8859_4 =
1362 make_charset (LEADING_BYTE_LATIN_ISO8859_4, Qlatin_iso8859_4, 2, 1377 make_charset (LEADING_BYTE_LATIN_ISO8859_4, Qlatin_iso8859_4, 2,
1363 CHARSET_TYPE_96, 1, 1, 'D', 1378 CHARSET_TYPE_96, 1, 1, 'D',
1364 CHARSET_LEFT_TO_RIGHT, 1379 CHARSET_LEFT_TO_RIGHT,
1365 build_string ("Latin-4"), 1380 build_string ("Latin-4"),
1366 build_string ("ISO8859-4 (Latin-4)"), 1381 build_string ("ISO8859-4 (Latin-4)"),
1367 build_string ("ISO8859-4 (Latin-4)"), 1382 build_string ("ISO8859-4 (Latin-4)"),
1368 build_string ("iso8859-4")); 1383 build_string ("iso8859-4"));
1384 staticpro (&Vcharset_thai_tis620);
1369 Vcharset_thai_tis620 = 1385 Vcharset_thai_tis620 =
1370 make_charset (LEADING_BYTE_THAI_TIS620, Qthai_tis620, 2, 1386 make_charset (LEADING_BYTE_THAI_TIS620, Qthai_tis620, 2,
1371 CHARSET_TYPE_96, 1, 1, 'T', 1387 CHARSET_TYPE_96, 1, 1, 'T',
1372 CHARSET_LEFT_TO_RIGHT, 1388 CHARSET_LEFT_TO_RIGHT,
1373 build_string ("TIS620"), 1389 build_string ("TIS620"),
1374 build_string ("TIS620 (Thai)"), 1390 build_string ("TIS620 (Thai)"),
1375 build_string ("TIS620.2529 (Thai)"), 1391 build_string ("TIS620.2529 (Thai)"),
1376 build_string ("tis620")); 1392 build_string ("tis620"));
1393 staticpro (&Vcharset_greek_iso8859_7);
1377 Vcharset_greek_iso8859_7 = 1394 Vcharset_greek_iso8859_7 =
1378 make_charset (LEADING_BYTE_GREEK_ISO8859_7, Qgreek_iso8859_7, 2, 1395 make_charset (LEADING_BYTE_GREEK_ISO8859_7, Qgreek_iso8859_7, 2,
1379 CHARSET_TYPE_96, 1, 1, 'F', 1396 CHARSET_TYPE_96, 1, 1, 'F',
1380 CHARSET_LEFT_TO_RIGHT, 1397 CHARSET_LEFT_TO_RIGHT,
1381 build_string ("ISO8859-7"), 1398 build_string ("ISO8859-7"),
1382 build_string ("ISO8859-7 (Greek)"), 1399 build_string ("ISO8859-7 (Greek)"),
1383 build_string ("ISO8859-7 (Greek)"), 1400 build_string ("ISO8859-7 (Greek)"),
1384 build_string ("iso8859-7")); 1401 build_string ("iso8859-7"));
1402 staticpro (&Vcharset_arabic_iso8859_6);
1385 Vcharset_arabic_iso8859_6 = 1403 Vcharset_arabic_iso8859_6 =
1386 make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6, 2, 1404 make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6, 2,
1387 CHARSET_TYPE_96, 1, 1, 'G', 1405 CHARSET_TYPE_96, 1, 1, 'G',
1388 CHARSET_RIGHT_TO_LEFT, 1406 CHARSET_RIGHT_TO_LEFT,
1389 build_string ("ISO8859-6"), 1407 build_string ("ISO8859-6"),
1390 build_string ("ISO8859-6 (Arabic)"), 1408 build_string ("ISO8859-6 (Arabic)"),
1391 build_string ("ISO8859-6 (Arabic)"), 1409 build_string ("ISO8859-6 (Arabic)"),
1392 build_string ("iso8859-6")); 1410 build_string ("iso8859-6"));
1411 staticpro (&Vcharset_hebrew_iso8859_8);
1393 Vcharset_hebrew_iso8859_8 = 1412 Vcharset_hebrew_iso8859_8 =
1394 make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8, 2, 1413 make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8, 2,
1395 CHARSET_TYPE_96, 1, 1, 'H', 1414 CHARSET_TYPE_96, 1, 1, 'H',
1396 CHARSET_RIGHT_TO_LEFT, 1415 CHARSET_RIGHT_TO_LEFT,
1397 build_string ("ISO8859-8"), 1416 build_string ("ISO8859-8"),
1398 build_string ("ISO8859-8 (Hebrew)"), 1417 build_string ("ISO8859-8 (Hebrew)"),
1399 build_string ("ISO8859-8 (Hebrew)"), 1418 build_string ("ISO8859-8 (Hebrew)"),
1400 build_string ("iso8859-8")); 1419 build_string ("iso8859-8"));
1420 staticpro (&Vcharset_katakana_jisx0201);
1401 Vcharset_katakana_jisx0201 = 1421 Vcharset_katakana_jisx0201 =
1402 make_charset (LEADING_BYTE_KATAKANA_JISX0201, Qkatakana_jisx0201, 2, 1422 make_charset (LEADING_BYTE_KATAKANA_JISX0201, Qkatakana_jisx0201, 2,
1403 CHARSET_TYPE_94, 1, 1, 'I', 1423 CHARSET_TYPE_94, 1, 1, 'I',
1404 CHARSET_LEFT_TO_RIGHT, 1424 CHARSET_LEFT_TO_RIGHT,
1405 build_string ("JISX0201 Kana"), 1425 build_string ("JISX0201 Kana"),
1406 build_string ("JISX0201.1976 (Japanese Kana)"), 1426 build_string ("JISX0201.1976 (Japanese Kana)"),
1407 build_string ("JISX0201.1976 Japanese Kana"), 1427 build_string ("JISX0201.1976 Japanese Kana"),
1408 build_string ("jisx0201.1976")); 1428 build_string ("jisx0201.1976"));
1429 staticpro (&Vcharset_latin_jisx0201);
1409 Vcharset_latin_jisx0201 = 1430 Vcharset_latin_jisx0201 =
1410 make_charset (LEADING_BYTE_LATIN_JISX0201, Qlatin_jisx0201, 2, 1431 make_charset (LEADING_BYTE_LATIN_JISX0201, Qlatin_jisx0201, 2,
1411 CHARSET_TYPE_94, 1, 0, 'J', 1432 CHARSET_TYPE_94, 1, 0, 'J',
1412 CHARSET_LEFT_TO_RIGHT, 1433 CHARSET_LEFT_TO_RIGHT,
1413 build_string ("JISX0201 Roman"), 1434 build_string ("JISX0201 Roman"),
1414 build_string ("JISX0201.1976 (Japanese Roman)"), 1435 build_string ("JISX0201.1976 (Japanese Roman)"),
1415 build_string ("JISX0201.1976 Japanese Roman"), 1436 build_string ("JISX0201.1976 Japanese Roman"),
1416 build_string ("jisx0201.1976")); 1437 build_string ("jisx0201.1976"));
1438 staticpro (&Vcharset_cyrillic_iso8859_5);
1417 Vcharset_cyrillic_iso8859_5 = 1439 Vcharset_cyrillic_iso8859_5 =
1418 make_charset (LEADING_BYTE_CYRILLIC_ISO8859_5, Qcyrillic_iso8859_5, 2, 1440 make_charset (LEADING_BYTE_CYRILLIC_ISO8859_5, Qcyrillic_iso8859_5, 2,
1419 CHARSET_TYPE_96, 1, 1, 'L', 1441 CHARSET_TYPE_96, 1, 1, 'L',
1420 CHARSET_LEFT_TO_RIGHT, 1442 CHARSET_LEFT_TO_RIGHT,
1421 build_string ("ISO8859-5"), 1443 build_string ("ISO8859-5"),
1422 build_string ("ISO8859-5 (Cyrillic)"), 1444 build_string ("ISO8859-5 (Cyrillic)"),
1423 build_string ("ISO8859-5 (Cyrillic)"), 1445 build_string ("ISO8859-5 (Cyrillic)"),
1424 build_string ("iso8859-5")); 1446 build_string ("iso8859-5"));
1447 staticpro (&Vcharset_latin_iso8859_9);
1425 Vcharset_latin_iso8859_9 = 1448 Vcharset_latin_iso8859_9 =
1426 make_charset (LEADING_BYTE_LATIN_ISO8859_9, Qlatin_iso8859_9, 2, 1449 make_charset (LEADING_BYTE_LATIN_ISO8859_9, Qlatin_iso8859_9, 2,
1427 CHARSET_TYPE_96, 1, 1, 'M', 1450 CHARSET_TYPE_96, 1, 1, 'M',
1428 CHARSET_LEFT_TO_RIGHT, 1451 CHARSET_LEFT_TO_RIGHT,
1429 build_string ("Latin-5"), 1452 build_string ("Latin-5"),
1430 build_string ("ISO8859-9 (Latin-5)"), 1453 build_string ("ISO8859-9 (Latin-5)"),
1431 build_string ("ISO8859-9 (Latin-5)"), 1454 build_string ("ISO8859-9 (Latin-5)"),
1432 build_string ("iso8859-9")); 1455 build_string ("iso8859-9"));
1456 staticpro (&Vcharset_japanese_jisx0208_1978);
1433 Vcharset_japanese_jisx0208_1978 = 1457 Vcharset_japanese_jisx0208_1978 =
1434 make_charset (LEADING_BYTE_JAPANESE_JISX0208_1978, Qjapanese_jisx0208_1978, 3, 1458 make_charset (LEADING_BYTE_JAPANESE_JISX0208_1978, Qjapanese_jisx0208_1978, 3,
1435 CHARSET_TYPE_94X94, 2, 0, '@', 1459 CHARSET_TYPE_94X94, 2, 0, '@',
1436 CHARSET_LEFT_TO_RIGHT, 1460 CHARSET_LEFT_TO_RIGHT,
1437 build_string ("JISX0208.1978"), 1461 build_string ("JISX0208.1978"),
1438 build_string ("JISX0208.1978 (Japanese)"), 1462 build_string ("JISX0208.1978 (Japanese)"),
1439 build_string 1463 build_string
1440 ("JISX0208.1978 Japanese Kanji (so called \"old JIS\")"), 1464 ("JISX0208.1978 Japanese Kanji (so called \"old JIS\")"),
1441 build_string ("\\(jisx0208\\|jisc6226\\)\\.1978")); 1465 build_string ("\\(jisx0208\\|jisc6226\\)\\.1978"));
1466 staticpro (&Vcharset_chinese_gb2312);
1442 Vcharset_chinese_gb2312 = 1467 Vcharset_chinese_gb2312 =
1443 make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312, 3, 1468 make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312, 3,
1444 CHARSET_TYPE_94X94, 2, 0, 'A', 1469 CHARSET_TYPE_94X94, 2, 0, 'A',
1445 CHARSET_LEFT_TO_RIGHT, 1470 CHARSET_LEFT_TO_RIGHT,
1446 build_string ("GB2312"), 1471 build_string ("GB2312"),
1447 build_string ("GB2312)"), 1472 build_string ("GB2312)"),
1448 build_string ("GB2312 Chinese simplified"), 1473 build_string ("GB2312 Chinese simplified"),
1449 build_string ("gb2312")); 1474 build_string ("gb2312"));
1475 staticpro (&Vcharset_japanese_jisx0208);
1450 Vcharset_japanese_jisx0208 = 1476 Vcharset_japanese_jisx0208 =
1451 make_charset (LEADING_BYTE_JAPANESE_JISX0208, Qjapanese_jisx0208, 3, 1477 make_charset (LEADING_BYTE_JAPANESE_JISX0208, Qjapanese_jisx0208, 3,
1452 CHARSET_TYPE_94X94, 2, 0, 'B', 1478 CHARSET_TYPE_94X94, 2, 0, 'B',
1453 CHARSET_LEFT_TO_RIGHT, 1479 CHARSET_LEFT_TO_RIGHT,
1454 build_string ("JISX0208"), 1480 build_string ("JISX0208"),
1455 build_string ("JISX0208.1983/1990 (Japanese)"), 1481 build_string ("JISX0208.1983/1990 (Japanese)"),
1456 build_string ("JISX0208.1983/1990 Japanese Kanji"), 1482 build_string ("JISX0208.1983/1990 Japanese Kanji"),
1457 build_string ("jisx0208.19\\(83\\|90\\)")); 1483 build_string ("jisx0208.19\\(83\\|90\\)"));
1484 staticpro (&Vcharset_korean_ksc5601);
1458 Vcharset_korean_ksc5601 = 1485 Vcharset_korean_ksc5601 =
1459 make_charset (LEADING_BYTE_KOREAN_KSC5601, Qkorean_ksc5601, 3, 1486 make_charset (LEADING_BYTE_KOREAN_KSC5601, Qkorean_ksc5601, 3,
1460 CHARSET_TYPE_94X94, 2, 0, 'C', 1487 CHARSET_TYPE_94X94, 2, 0, 'C',
1461 CHARSET_LEFT_TO_RIGHT, 1488 CHARSET_LEFT_TO_RIGHT,
1462 build_string ("KSC5601"), 1489 build_string ("KSC5601"),
1463 build_string ("KSC5601 (Korean"), 1490 build_string ("KSC5601 (Korean"),
1464 build_string ("KSC5601 Korean Hangul and Hanja"), 1491 build_string ("KSC5601 Korean Hangul and Hanja"),
1465 build_string ("ksc5601")); 1492 build_string ("ksc5601"));
1493 staticpro (&Vcharset_japanese_jisx0212);
1466 Vcharset_japanese_jisx0212 = 1494 Vcharset_japanese_jisx0212 =
1467 make_charset (LEADING_BYTE_JAPANESE_JISX0212, Qjapanese_jisx0212, 3, 1495 make_charset (LEADING_BYTE_JAPANESE_JISX0212, Qjapanese_jisx0212, 3,
1468 CHARSET_TYPE_94X94, 2, 0, 'D', 1496 CHARSET_TYPE_94X94, 2, 0, 'D',
1469 CHARSET_LEFT_TO_RIGHT, 1497 CHARSET_LEFT_TO_RIGHT,
1470 build_string ("JISX0212"), 1498 build_string ("JISX0212"),
1471 build_string ("JISX0212 (Japanese)"), 1499 build_string ("JISX0212 (Japanese)"),
1472 build_string ("JISX0212 Japanese Supplement"), 1500 build_string ("JISX0212 Japanese Supplement"),
1473 build_string ("jisx0212")); 1501 build_string ("jisx0212"));
1474 1502
1475 #define CHINESE_CNS_PLANE_RE(n) "cns11643[.-]\\(.*[.-]\\)?" n "$" 1503 #define CHINESE_CNS_PLANE_RE(n) "cns11643[.-]\\(.*[.-]\\)?" n "$"
1504 staticpro (&Vcharset_chinese_cns11643_1);
1476 Vcharset_chinese_cns11643_1 = 1505 Vcharset_chinese_cns11643_1 =
1477 make_charset (LEADING_BYTE_CHINESE_CNS11643_1, Qchinese_cns11643_1, 3, 1506 make_charset (LEADING_BYTE_CHINESE_CNS11643_1, Qchinese_cns11643_1, 3,
1478 CHARSET_TYPE_94X94, 2, 0, 'G', 1507 CHARSET_TYPE_94X94, 2, 0, 'G',
1479 CHARSET_LEFT_TO_RIGHT, 1508 CHARSET_LEFT_TO_RIGHT,
1480 build_string ("CNS11643-1"), 1509 build_string ("CNS11643-1"),
1481 build_string ("CNS11643-1 (Chinese traditional)"), 1510 build_string ("CNS11643-1 (Chinese traditional)"),
1482 build_string 1511 build_string
1483 ("CNS 11643 Plane 1 Chinese traditional"), 1512 ("CNS 11643 Plane 1 Chinese traditional"),
1484 build_string (CHINESE_CNS_PLANE_RE("1"))); 1513 build_string (CHINESE_CNS_PLANE_RE("1")));
1514 staticpro (&Vcharset_chinese_cns11643_2);
1485 Vcharset_chinese_cns11643_2 = 1515 Vcharset_chinese_cns11643_2 =
1486 make_charset (LEADING_BYTE_CHINESE_CNS11643_2, Qchinese_cns11643_2, 3, 1516 make_charset (LEADING_BYTE_CHINESE_CNS11643_2, Qchinese_cns11643_2, 3,
1487 CHARSET_TYPE_94X94, 2, 0, 'H', 1517 CHARSET_TYPE_94X94, 2, 0, 'H',
1488 CHARSET_LEFT_TO_RIGHT, 1518 CHARSET_LEFT_TO_RIGHT,
1489 build_string ("CNS11643-2"), 1519 build_string ("CNS11643-2"),
1490 build_string ("CNS11643-2 (Chinese traditional)"), 1520 build_string ("CNS11643-2 (Chinese traditional)"),
1491 build_string 1521 build_string
1492 ("CNS 11643 Plane 2 Chinese traditional"), 1522 ("CNS 11643 Plane 2 Chinese traditional"),
1493 build_string (CHINESE_CNS_PLANE_RE("2"))); 1523 build_string (CHINESE_CNS_PLANE_RE("2")));
1524 staticpro (&Vcharset_chinese_big5_1);
1494 Vcharset_chinese_big5_1 = 1525 Vcharset_chinese_big5_1 =
1495 make_charset (LEADING_BYTE_CHINESE_BIG5_1, Qchinese_big5_1, 3, 1526 make_charset (LEADING_BYTE_CHINESE_BIG5_1, Qchinese_big5_1, 3,
1496 CHARSET_TYPE_94X94, 2, 0, '0', 1527 CHARSET_TYPE_94X94, 2, 0, '0',
1497 CHARSET_LEFT_TO_RIGHT, 1528 CHARSET_LEFT_TO_RIGHT,
1498 build_string ("Big5"), 1529 build_string ("Big5"),
1499 build_string ("Big5 (Level-1)"), 1530 build_string ("Big5 (Level-1)"),
1500 build_string 1531 build_string
1501 ("Big5 Level-1 Chinese traditional"), 1532 ("Big5 Level-1 Chinese traditional"),
1502 build_string ("big5")); 1533 build_string ("big5"));
1534 staticpro (&Vcharset_chinese_big5_2);
1503 Vcharset_chinese_big5_2 = 1535 Vcharset_chinese_big5_2 =
1504 make_charset (LEADING_BYTE_CHINESE_BIG5_2, Qchinese_big5_2, 3, 1536 make_charset (LEADING_BYTE_CHINESE_BIG5_2, Qchinese_big5_2, 3,
1505 CHARSET_TYPE_94X94, 2, 0, '1', 1537 CHARSET_TYPE_94X94, 2, 0, '1',
1506 CHARSET_LEFT_TO_RIGHT, 1538 CHARSET_LEFT_TO_RIGHT,
1507 build_string ("Big5"), 1539 build_string ("Big5"),
1513 1545
1514 #ifdef ENABLE_COMPOSITE_CHARS 1546 #ifdef ENABLE_COMPOSITE_CHARS
1515 /* #### For simplicity, we put composite chars into a 96x96 charset. 1547 /* #### For simplicity, we put composite chars into a 96x96 charset.
1516 This is going to lead to problems because you can run out of 1548 This is going to lead to problems because you can run out of
1517 room, esp. as we don't yet recycle numbers. */ 1549 room, esp. as we don't yet recycle numbers. */
1550 staticpro (&Vcharset_composite);
1518 Vcharset_composite = 1551 Vcharset_composite =
1519 make_charset (LEADING_BYTE_COMPOSITE, Qcomposite, 3, 1552 make_charset (LEADING_BYTE_COMPOSITE, Qcomposite, 3,
1520 CHARSET_TYPE_96X96, 2, 0, 0, 1553 CHARSET_TYPE_96X96, 2, 0, 0,
1521 CHARSET_LEFT_TO_RIGHT, 1554 CHARSET_LEFT_TO_RIGHT,
1522 build_string ("Composite"), 1555 build_string ("Composite"),
1523 build_string ("Composite characters"), 1556 build_string ("Composite characters"),
1524 build_string ("Composite characters"), 1557 build_string ("Composite characters"),
1525 build_string ("")); 1558 build_string (""));
1526 1559
1560 /* #### not dumped properly */
1527 composite_char_row_next = 32; 1561 composite_char_row_next = 32;
1528 composite_char_col_next = 32; 1562 composite_char_col_next = 32;
1529 1563
1530 Vcomposite_char_string2char_hash_table = 1564 Vcomposite_char_string2char_hash_table =
1531 make_lisp_hash_table (500, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL); 1565 make_lisp_hash_table (500, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);