diff options
| author | Kenichi Handa | 1998-05-22 09:45:34 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-05-22 09:45:34 +0000 |
| commit | f967223b11108117aadc260ad3cd7e92499e9d53 (patch) | |
| tree | 81e41a0b483375caf5e0b52998c35cb631abacd9 /src | |
| parent | 537efd8df043427dfa36392683f95d1f4e89ea46 (diff) | |
| download | emacs-f967223b11108117aadc260ad3cd7e92499e9d53.tar.gz emacs-f967223b11108117aadc260ad3cd7e92499e9d53.zip | |
Change term "character translation table" to "translation table".
Diffstat (limited to 'src')
| -rw-r--r-- | src/ccl.c | 8 | ||||
| -rw-r--r-- | src/coding.c | 92 | ||||
| -rw-r--r-- | src/coding.h | 8 |
3 files changed, 50 insertions, 58 deletions
| @@ -442,8 +442,7 @@ Lisp_Object Vccl_program_table; | |||
| 442 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ | 442 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ |
| 443 | 443 | ||
| 444 | /* Translate a character whose code point is reg[rrr] and the charset | 444 | /* Translate a character whose code point is reg[rrr] and the charset |
| 445 | ID is reg[RRR] by a character translation table whose ID is | 445 | ID is reg[RRR] by a translation table whose ID is reg[Rrr]. |
| 446 | reg[Rrr]. | ||
| 447 | 446 | ||
| 448 | A translated character is set in reg[rrr] (code point) and reg[RRR] | 447 | A translated character is set in reg[rrr] (code point) and reg[RRR] |
| 449 | (charset ID). */ | 448 | (charset ID). */ |
| @@ -452,8 +451,7 @@ Lisp_Object Vccl_program_table; | |||
| 452 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ | 451 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX */ |
| 453 | 452 | ||
| 454 | /* Translate a character whose code point is reg[rrr] and the charset | 453 | /* Translate a character whose code point is reg[rrr] and the charset |
| 455 | ID is reg[RRR] by a character translation table whose ID is | 454 | ID is reg[RRR] by a translation table whose ID is ARGUMENT. |
| 456 | ARGUMENT. | ||
| 457 | 455 | ||
| 458 | A translated character is set in reg[rrr] (code point) and reg[RRR] | 456 | A translated character is set in reg[rrr] (code point) and reg[RRR] |
| 459 | (charset ID). */ | 457 | (charset ID). */ |
| @@ -1633,7 +1631,7 @@ resolve_symbol_ccl_program (ccl) | |||
| 1633 | if (EQ(result, ccl)) | 1631 | if (EQ(result, ccl)) |
| 1634 | result = Fcopy_sequence (ccl); | 1632 | result = Fcopy_sequence (ccl); |
| 1635 | 1633 | ||
| 1636 | prop = Fget (contents, Qcharacter_translation_table_id); | 1634 | prop = Fget (contents, Qtranslation_table_id); |
| 1637 | if (NUMBERP (prop)) | 1635 | if (NUMBERP (prop)) |
| 1638 | { | 1636 | { |
| 1639 | XVECTOR (result)->contents[i] = prop; | 1637 | XVECTOR (result)->contents[i] = prop; |
diff --git a/src/coding.c b/src/coding.c index 29477c75e5b..e2c86bb3a26 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -367,18 +367,18 @@ char *coding_category_name[CODING_CATEGORY_IDX_MAX] = { | |||
| 367 | categories. */ | 367 | categories. */ |
| 368 | struct coding_system *coding_system_table[CODING_CATEGORY_IDX_MAX]; | 368 | struct coding_system *coding_system_table[CODING_CATEGORY_IDX_MAX]; |
| 369 | 369 | ||
| 370 | /* Flag to tell if we look up character translation table on character | 370 | /* Flag to tell if we look up translation table on character code |
| 371 | code conversion. */ | 371 | conversion. */ |
| 372 | Lisp_Object Venable_character_translation; | 372 | Lisp_Object Venable_character_translation; |
| 373 | /* Standard character translation table to look up on decoding (reading). */ | 373 | /* Standard translation table to look up on decoding (reading). */ |
| 374 | Lisp_Object Vstandard_character_translation_table_for_decode; | 374 | Lisp_Object Vstandard_translation_table_for_decode; |
| 375 | /* Standard character translation table to look up on encoding (writing). */ | 375 | /* Standard translation table to look up on encoding (writing). */ |
| 376 | Lisp_Object Vstandard_character_translation_table_for_encode; | 376 | Lisp_Object Vstandard_translation_table_for_encode; |
| 377 | 377 | ||
| 378 | Lisp_Object Qcharacter_translation_table; | 378 | Lisp_Object Qtranslation_table; |
| 379 | Lisp_Object Qcharacter_translation_table_id; | 379 | Lisp_Object Qtranslation_table_id; |
| 380 | Lisp_Object Qcharacter_translation_table_for_decode; | 380 | Lisp_Object Qtranslation_table_for_decode; |
| 381 | Lisp_Object Qcharacter_translation_table_for_encode; | 381 | Lisp_Object Qtranslation_table_for_encode; |
| 382 | 382 | ||
| 383 | /* Alist of charsets vs revision number. */ | 383 | /* Alist of charsets vs revision number. */ |
| 384 | Lisp_Object Vcharset_revision_alist; | 384 | Lisp_Object Vcharset_revision_alist; |
| @@ -1010,11 +1010,11 @@ decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) | |||
| 1010 | int charset0 = CODING_SPEC_ISO_PLANE_CHARSET (coding, 0); | 1010 | int charset0 = CODING_SPEC_ISO_PLANE_CHARSET (coding, 0); |
| 1011 | int charset1 = CODING_SPEC_ISO_PLANE_CHARSET (coding, 1); | 1011 | int charset1 = CODING_SPEC_ISO_PLANE_CHARSET (coding, 1); |
| 1012 | Lisp_Object translation_table | 1012 | Lisp_Object translation_table |
| 1013 | = coding->character_translation_table_for_decode; | 1013 | = coding->translation_table_for_decode; |
| 1014 | int result = CODING_FINISH_NORMAL; | 1014 | int result = CODING_FINISH_NORMAL; |
| 1015 | 1015 | ||
| 1016 | if (!NILP (Venable_character_translation) && NILP (translation_table)) | 1016 | if (!NILP (Venable_character_translation) && NILP (translation_table)) |
| 1017 | translation_table = Vstandard_character_translation_table_for_decode; | 1017 | translation_table = Vstandard_translation_table_for_decode; |
| 1018 | 1018 | ||
| 1019 | coding->produced_char = 0; | 1019 | coding->produced_char = 0; |
| 1020 | coding->fake_multibyte = 0; | 1020 | coding->fake_multibyte = 0; |
| @@ -1758,11 +1758,11 @@ encode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) | |||
| 1758 | head of loop. */ | 1758 | head of loop. */ |
| 1759 | unsigned char *adjusted_dst_end = dst_end - 19; | 1759 | unsigned char *adjusted_dst_end = dst_end - 19; |
| 1760 | Lisp_Object translation_table | 1760 | Lisp_Object translation_table |
| 1761 | = coding->character_translation_table_for_encode; | 1761 | = coding->translation_table_for_encode; |
| 1762 | int result = CODING_FINISH_NORMAL; | 1762 | int result = CODING_FINISH_NORMAL; |
| 1763 | 1763 | ||
| 1764 | if (!NILP (Venable_character_translation) && NILP (translation_table)) | 1764 | if (!NILP (Venable_character_translation) && NILP (translation_table)) |
| 1765 | translation_table = Vstandard_character_translation_table_for_encode; | 1765 | translation_table = Vstandard_translation_table_for_encode; |
| 1766 | 1766 | ||
| 1767 | coding->consumed_char = 0; | 1767 | coding->consumed_char = 0; |
| 1768 | coding->fake_multibyte = 0; | 1768 | coding->fake_multibyte = 0; |
| @@ -2175,11 +2175,11 @@ decode_coding_sjis_big5 (coding, source, destination, | |||
| 2175 | head of loop. */ | 2175 | head of loop. */ |
| 2176 | unsigned char *adjusted_dst_end = dst_end - 3; | 2176 | unsigned char *adjusted_dst_end = dst_end - 3; |
| 2177 | Lisp_Object translation_table | 2177 | Lisp_Object translation_table |
| 2178 | = coding->character_translation_table_for_decode; | 2178 | = coding->translation_table_for_decode; |
| 2179 | int result = CODING_FINISH_NORMAL; | 2179 | int result = CODING_FINISH_NORMAL; |
| 2180 | 2180 | ||
| 2181 | if (!NILP (Venable_character_translation) && NILP (translation_table)) | 2181 | if (!NILP (Venable_character_translation) && NILP (translation_table)) |
| 2182 | translation_table = Vstandard_character_translation_table_for_decode; | 2182 | translation_table = Vstandard_translation_table_for_decode; |
| 2183 | 2183 | ||
| 2184 | coding->produced_char = 0; | 2184 | coding->produced_char = 0; |
| 2185 | coding->fake_multibyte = 0; | 2185 | coding->fake_multibyte = 0; |
| @@ -2364,11 +2364,11 @@ encode_coding_sjis_big5 (coding, source, destination, | |||
| 2364 | head of loop. */ | 2364 | head of loop. */ |
| 2365 | unsigned char *adjusted_dst_end = dst_end - 1; | 2365 | unsigned char *adjusted_dst_end = dst_end - 1; |
| 2366 | Lisp_Object translation_table | 2366 | Lisp_Object translation_table |
| 2367 | = coding->character_translation_table_for_encode; | 2367 | = coding->translation_table_for_encode; |
| 2368 | int result = CODING_FINISH_NORMAL; | 2368 | int result = CODING_FINISH_NORMAL; |
| 2369 | 2369 | ||
| 2370 | if (!NILP (Venable_character_translation) && NILP (translation_table)) | 2370 | if (!NILP (Venable_character_translation) && NILP (translation_table)) |
| 2371 | translation_table = Vstandard_character_translation_table_for_encode; | 2371 | translation_table = Vstandard_translation_table_for_encode; |
| 2372 | 2372 | ||
| 2373 | coding->consumed_char = 0; | 2373 | coding->consumed_char = 0; |
| 2374 | coding->fake_multibyte = 0; | 2374 | coding->fake_multibyte = 0; |
| @@ -2816,26 +2816,23 @@ setup_coding_system (coding_system, coding) | |||
| 2816 | 2816 | ||
| 2817 | /* Initialize remaining fields. */ | 2817 | /* Initialize remaining fields. */ |
| 2818 | coding->composing = 0; | 2818 | coding->composing = 0; |
| 2819 | coding->character_translation_table_for_decode = Qnil; | 2819 | coding->translation_table_for_decode = Qnil; |
| 2820 | coding->character_translation_table_for_encode = Qnil; | 2820 | coding->translation_table_for_encode = Qnil; |
| 2821 | 2821 | ||
| 2822 | /* Get values of coding system properties: | 2822 | /* Get values of coding system properties: |
| 2823 | `post-read-conversion', `pre-write-conversion', | 2823 | `post-read-conversion', `pre-write-conversion', |
| 2824 | `character-translation-table-for-decode', | 2824 | `translation-table-for-decode', `translation-table-for-encode'. */ |
| 2825 | `character-translation-table-for-encode'. */ | ||
| 2826 | plist = XVECTOR (coding_spec)->contents[3]; | 2825 | plist = XVECTOR (coding_spec)->contents[3]; |
| 2827 | coding->post_read_conversion = Fplist_get (plist, Qpost_read_conversion); | 2826 | coding->post_read_conversion = Fplist_get (plist, Qpost_read_conversion); |
| 2828 | coding->pre_write_conversion = Fplist_get (plist, Qpre_write_conversion); | 2827 | coding->pre_write_conversion = Fplist_get (plist, Qpre_write_conversion); |
| 2829 | val = Fplist_get (plist, Qcharacter_translation_table_for_decode); | 2828 | val = Fplist_get (plist, Qtranslation_table_for_decode); |
| 2830 | if (SYMBOLP (val)) | 2829 | if (SYMBOLP (val)) |
| 2831 | val = Fget (val, Qcharacter_translation_table_for_decode); | 2830 | val = Fget (val, Qtranslation_table_for_decode); |
| 2832 | coding->character_translation_table_for_decode | 2831 | coding->translation_table_for_decode = CHAR_TABLE_P (val) ? val : Qnil; |
| 2833 | = CHAR_TABLE_P (val) ? val : Qnil; | 2832 | val = Fplist_get (plist, Qtranslation_table_for_encode); |
| 2834 | val = Fplist_get (plist, Qcharacter_translation_table_for_encode); | ||
| 2835 | if (SYMBOLP (val)) | 2833 | if (SYMBOLP (val)) |
| 2836 | val = Fget (val, Qcharacter_translation_table_for_encode); | 2834 | val = Fget (val, Qtranslation_table_for_encode); |
| 2837 | coding->character_translation_table_for_encode | 2835 | coding->translation_table_for_encode = CHAR_TABLE_P (val) ? val : Qnil; |
| 2838 | = CHAR_TABLE_P (val) ? val : Qnil; | ||
| 2839 | val = Fplist_get (plist, Qcoding_category); | 2836 | val = Fplist_get (plist, Qcoding_category); |
| 2840 | if (!NILP (val)) | 2837 | if (!NILP (val)) |
| 2841 | { | 2838 | { |
| @@ -5140,21 +5137,18 @@ syms_of_coding () | |||
| 5140 | } | 5137 | } |
| 5141 | } | 5138 | } |
| 5142 | 5139 | ||
| 5143 | Qcharacter_translation_table = intern ("character-translation-table"); | 5140 | Qtranslation_table = intern ("translation-table"); |
| 5144 | staticpro (&Qcharacter_translation_table); | 5141 | staticpro (&Qtranslation_table); |
| 5145 | Fput (Qcharacter_translation_table, Qchar_table_extra_slots, | 5142 | Fput (Qtranslation_table, Qchar_table_extra_slots, make_number (0)); |
| 5146 | make_number (0)); | ||
| 5147 | 5143 | ||
| 5148 | Qcharacter_translation_table_id = intern ("character-translation-table-id"); | 5144 | Qtranslation_table_id = intern ("translation-table-id"); |
| 5149 | staticpro (&Qcharacter_translation_table_id); | 5145 | staticpro (&Qtranslation_table_id); |
| 5150 | 5146 | ||
| 5151 | Qcharacter_translation_table_for_decode | 5147 | Qtranslation_table_for_decode = intern ("translation-table-for-decode"); |
| 5152 | = intern ("character-translation-table-for-decode"); | 5148 | staticpro (&Qtranslation_table_for_decode); |
| 5153 | staticpro (&Qcharacter_translation_table_for_decode); | ||
| 5154 | 5149 | ||
| 5155 | Qcharacter_translation_table_for_encode | 5150 | Qtranslation_table_for_encode = intern ("translation-table-for-encode"); |
| 5156 | = intern ("character-translation-table-for-encode"); | 5151 | staticpro (&Qtranslation_table_for_encode); |
| 5157 | staticpro (&Qcharacter_translation_table_for_encode); | ||
| 5158 | 5152 | ||
| 5159 | Qsafe_charsets = intern ("safe-charsets"); | 5153 | Qsafe_charsets = intern ("safe-charsets"); |
| 5160 | staticpro (&Qsafe_charsets); | 5154 | staticpro (&Qsafe_charsets); |
| @@ -5312,18 +5306,18 @@ See also the function `find-operation-coding-system'."); | |||
| 5312 | eol_mnemonic_undecided = ':'; | 5306 | eol_mnemonic_undecided = ':'; |
| 5313 | 5307 | ||
| 5314 | DEFVAR_LISP ("enable-character-translation", &Venable_character_translation, | 5308 | DEFVAR_LISP ("enable-character-translation", &Venable_character_translation, |
| 5315 | "Non-nil means ISO 2022 encoder/decoder do character translation."); | 5309 | "*Non-nil enables character translation while encoding and decoding."); |
| 5316 | Venable_character_translation = Qt; | 5310 | Venable_character_translation = Qt; |
| 5317 | 5311 | ||
| 5318 | DEFVAR_LISP ("standard-character-translation-table-for-decode", | 5312 | DEFVAR_LISP ("standard-translation-table-for-decode", |
| 5319 | &Vstandard_character_translation_table_for_decode, | 5313 | &Vstandard_translation_table_for_decode, |
| 5320 | "Table for translating characters while decoding."); | 5314 | "Table for translating characters while decoding."); |
| 5321 | Vstandard_character_translation_table_for_decode = Qnil; | 5315 | Vstandard_translation_table_for_decode = Qnil; |
| 5322 | 5316 | ||
| 5323 | DEFVAR_LISP ("standard-character-translation-table-for-encode", | 5317 | DEFVAR_LISP ("standard-translation-table-for-encode", |
| 5324 | &Vstandard_character_translation_table_for_encode, | 5318 | &Vstandard_translation_table_for_encode, |
| 5325 | "Table for translationg characters while encoding."); | 5319 | "Table for translationg characters while encoding."); |
| 5326 | Vstandard_character_translation_table_for_encode = Qnil; | 5320 | Vstandard_translation_table_for_encode = Qnil; |
| 5327 | 5321 | ||
| 5328 | DEFVAR_LISP ("charset-revision-table", &Vcharset_revision_alist, | 5322 | DEFVAR_LISP ("charset-revision-table", &Vcharset_revision_alist, |
| 5329 | "Alist of charsets vs revision numbers.\n\ | 5323 | "Alist of charsets vs revision numbers.\n\ |
diff --git a/src/coding.h b/src/coding.h index 103f623b377..5fa42643ca0 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -375,8 +375,8 @@ struct coding_system | |||
| 375 | Lisp_Object pre_write_conversion; | 375 | Lisp_Object pre_write_conversion; |
| 376 | 376 | ||
| 377 | /* Character translation tables to look up, or nil. */ | 377 | /* Character translation tables to look up, or nil. */ |
| 378 | Lisp_Object character_translation_table_for_decode; | 378 | Lisp_Object translation_table_for_decode; |
| 379 | Lisp_Object character_translation_table_for_encode; | 379 | Lisp_Object translation_table_for_encode; |
| 380 | }; | 380 | }; |
| 381 | 381 | ||
| 382 | #define CODING_REQUIRE_FLUSHING_MASK 1 | 382 | #define CODING_REQUIRE_FLUSHING_MASK 1 |
| @@ -530,8 +530,8 @@ extern Lisp_Object Qraw_text; | |||
| 530 | extern Lisp_Object Qbuffer_file_coding_system; | 530 | extern Lisp_Object Qbuffer_file_coding_system; |
| 531 | extern Lisp_Object Vcoding_category_list; | 531 | extern Lisp_Object Vcoding_category_list; |
| 532 | 532 | ||
| 533 | extern Lisp_Object Qcharacter_translation_table; | 533 | extern Lisp_Object Qtranslation_table; |
| 534 | extern Lisp_Object Qcharacter_translation_table_id; | 534 | extern Lisp_Object Qtranslation_table_id; |
| 535 | 535 | ||
| 536 | /* Mnemonic character to indicate each type of end-of-line. */ | 536 | /* Mnemonic character to indicate each type of end-of-line. */ |
| 537 | extern int eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac; | 537 | extern int eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac; |