diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/coding.c b/src/coding.c index d344527b1d2..23ec2cb58b8 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -259,7 +259,7 @@ encode_coding_XXX (coding, source, destination, src_bytes, dst_bytes) | |||
| 259 | } while (0) | 259 | } while (0) |
| 260 | 260 | ||
| 261 | 261 | ||
| 262 | /* Produce a multibyte form of characater C to `dst'. Jump to | 262 | /* Produce a multibyte form of character C to `dst'. Jump to |
| 263 | `label_end_of_loop' if there's not enough space at `dst'. | 263 | `label_end_of_loop' if there's not enough space at `dst'. |
| 264 | 264 | ||
| 265 | If we are now in the middle of a composition sequence, the decoded | 265 | If we are now in the middle of a composition sequence, the decoded |
| @@ -461,7 +461,7 @@ char *coding_category_name[CODING_CATEGORY_IDX_MAX] = { | |||
| 461 | struct coding_system *coding_system_table[CODING_CATEGORY_IDX_MAX]; | 461 | struct coding_system *coding_system_table[CODING_CATEGORY_IDX_MAX]; |
| 462 | 462 | ||
| 463 | /* Table of coding category masks. Nth element is a mask for a coding | 463 | /* Table of coding category masks. Nth element is a mask for a coding |
| 464 | cateogry of which priority is Nth. */ | 464 | category of which priority is Nth. */ |
| 465 | static | 465 | static |
| 466 | int coding_priorities[CODING_CATEGORY_IDX_MAX]; | 466 | int coding_priorities[CODING_CATEGORY_IDX_MAX]; |
| 467 | 467 | ||
| @@ -569,7 +569,7 @@ coding_safe_chars (coding) | |||
| 569 | CHARS is 0x20 plus a number of characters composed by this | 569 | CHARS is 0x20 plus a number of characters composed by this |
| 570 | data, | 570 | data, |
| 571 | 571 | ||
| 572 | COMPONENTs are characters of multibye form or composition | 572 | COMPONENTs are characters of multibyte form or composition |
| 573 | rules encoded by two-byte of ASCII codes. | 573 | rules encoded by two-byte of ASCII codes. |
| 574 | 574 | ||
| 575 | In addition, for backward compatibility, the following formats are | 575 | In addition, for backward compatibility, the following formats are |
| @@ -677,7 +677,7 @@ detect_coding_emacs_mule (src, src_end, multibytep) | |||
| 677 | 677 | ||
| 678 | 678 | ||
| 679 | /* Get one byte from a data pointed by SRC and increment SRC. If SRC | 679 | /* Get one byte from a data pointed by SRC and increment SRC. If SRC |
| 680 | is not less than SRC_END, return -1 without inccrementing Src. */ | 680 | is not less than SRC_END, return -1 without incrementing Src. */ |
| 681 | 681 | ||
| 682 | #define SAFE_ONE_MORE_BYTE() (src >= src_end ? -1 : *src++) | 682 | #define SAFE_ONE_MORE_BYTE() (src >= src_end ? -1 : *src++) |
| 683 | 683 | ||
| @@ -774,7 +774,7 @@ decode_composition_emacs_mule (coding, src, src_end, | |||
| 774 | unsigned char *dst = *destination; | 774 | unsigned char *dst = *destination; |
| 775 | int method, data_len, nchars; | 775 | int method, data_len, nchars; |
| 776 | unsigned char *src_base = src++; | 776 | unsigned char *src_base = src++; |
| 777 | /* Store compoments of composition. */ | 777 | /* Store components of composition. */ |
| 778 | int component[COMPOSITION_DATA_MAX_BUNCH_LENGTH]; | 778 | int component[COMPOSITION_DATA_MAX_BUNCH_LENGTH]; |
| 779 | int ncomponent; | 779 | int ncomponent; |
| 780 | /* Store multibyte form of characters to be composed. This is for | 780 | /* Store multibyte form of characters to be composed. This is for |
| @@ -1137,7 +1137,7 @@ encode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes) | |||
| 1137 | is encoded using bytes less than 128. This may make the encoded | 1137 | is encoded using bytes less than 128. This may make the encoded |
| 1138 | text a little bit longer, but the text passes more easily through | 1138 | text a little bit longer, but the text passes more easily through |
| 1139 | several types of gateway, some of which strip off the MSB (Most | 1139 | several types of gateway, some of which strip off the MSB (Most |
| 1140 | Signigant Bit). | 1140 | Significant Bit). |
| 1141 | 1141 | ||
| 1142 | There are two kinds of character sets: control character sets and | 1142 | There are two kinds of character sets: control character sets and |
| 1143 | graphic character sets. The former contain control characters such | 1143 | graphic character sets. The former contain control characters such |
| @@ -1258,8 +1258,8 @@ encode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes) | |||
| 1258 | Now you may notice that there are a lot of ways of encoding the | 1258 | Now you may notice that there are a lot of ways of encoding the |
| 1259 | same multilingual text in ISO2022. Actually, there exist many | 1259 | same multilingual text in ISO2022. Actually, there exist many |
| 1260 | coding systems such as Compound Text (used in X11's inter client | 1260 | coding systems such as Compound Text (used in X11's inter client |
| 1261 | communication, ISO-2022-JP (used in Japanese internet), ISO-2022-KR | 1261 | communication, ISO-2022-JP (used in Japanese Internet), ISO-2022-KR |
| 1262 | (used in Korean internet), EUC (Extended UNIX Code, used in Asian | 1262 | (used in Korean Internet), EUC (Extended UNIX Code, used in Asian |
| 1263 | localized platforms), and all of these are variants of ISO2022. | 1263 | localized platforms), and all of these are variants of ISO2022. |
| 1264 | 1264 | ||
| 1265 | In addition to the above, Emacs handles two more kinds of escape | 1265 | In addition to the above, Emacs handles two more kinds of escape |
| @@ -1293,7 +1293,7 @@ encode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes) | |||
| 1293 | 1293 | ||
| 1294 | COMPOSITION_RELATIVE: | 1294 | COMPOSITION_RELATIVE: |
| 1295 | ESC 0 CHAR [ CHAR ] ESC 1 | 1295 | ESC 0 CHAR [ CHAR ] ESC 1 |
| 1296 | COMPOSITOIN_WITH_RULE: | 1296 | COMPOSITION_WITH_RULE: |
| 1297 | ESC 2 CHAR [ RULE CHAR ] ESC 1 | 1297 | ESC 2 CHAR [ RULE CHAR ] ESC 1 |
| 1298 | COMPOSITION_WITH_ALTCHARS: | 1298 | COMPOSITION_WITH_ALTCHARS: |
| 1299 | ESC 3 ALTCHAR [ ALTCHAR ] ESC 0 CHAR [ CHAR ] ESC 1 | 1299 | ESC 3 ALTCHAR [ ALTCHAR ] ESC 0 CHAR [ CHAR ] ESC 1 |
| @@ -1628,7 +1628,7 @@ coding_allocate_composition_data (coding, char_offset) | |||
| 1628 | that coding->cmp_data has enough space to store the \ | 1628 | that coding->cmp_data has enough space to store the \ |
| 1629 | information about the composition. If not, terminate the \ | 1629 | information about the composition. If not, terminate the \ |
| 1630 | current decoding loop, allocate one more memory block for \ | 1630 | current decoding loop, allocate one more memory block for \ |
| 1631 | coding->cmp_data in the calller, then start the decoding \ | 1631 | coding->cmp_data in the caller, then start the decoding \ |
| 1632 | loop again. We can't allocate memory here directly because \ | 1632 | loop again. We can't allocate memory here directly because \ |
| 1633 | it may cause buffer/string relocation. */ \ | 1633 | it may cause buffer/string relocation. */ \ |
| 1634 | if (!coding->cmp_data \ | 1634 | if (!coding->cmp_data \ |
| @@ -1660,7 +1660,7 @@ coding_allocate_composition_data (coding, char_offset) | |||
| 1660 | } \ | 1660 | } \ |
| 1661 | } while (0) | 1661 | } while (0) |
| 1662 | 1662 | ||
| 1663 | /* Handle compositoin end sequence ESC 1. */ | 1663 | /* Handle composition end sequence ESC 1. */ |
| 1664 | 1664 | ||
| 1665 | #define DECODE_COMPOSITION_END(c1) \ | 1665 | #define DECODE_COMPOSITION_END(c1) \ |
| 1666 | do { \ | 1666 | do { \ |
| @@ -1959,7 +1959,7 @@ decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) | |||
| 1959 | goto label_invalid_code; | 1959 | goto label_invalid_code; |
| 1960 | /* For the moment, nested direction is not supported. | 1960 | /* For the moment, nested direction is not supported. |
| 1961 | So, `coding->mode & CODING_MODE_DIRECTION' zero means | 1961 | So, `coding->mode & CODING_MODE_DIRECTION' zero means |
| 1962 | left-to-right, and nozero means right-to-left. */ | 1962 | left-to-right, and nonzero means right-to-left. */ |
| 1963 | ONE_MORE_BYTE (c1); | 1963 | ONE_MORE_BYTE (c1); |
| 1964 | switch (c1) | 1964 | switch (c1) |
| 1965 | { | 1965 | { |
| @@ -2046,7 +2046,7 @@ decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) | |||
| 2046 | It is not enough to say just "ISO2022" on encoding, we have to | 2046 | It is not enough to say just "ISO2022" on encoding, we have to |
| 2047 | specify more details. In Emacs, each ISO2022 coding system | 2047 | specify more details. In Emacs, each ISO2022 coding system |
| 2048 | variant has the following specifications: | 2048 | variant has the following specifications: |
| 2049 | 1. Initial designation to G0 thru G3. | 2049 | 1. Initial designation to G0 through G3. |
| 2050 | 2. Allows short-form designation? | 2050 | 2. Allows short-form designation? |
| 2051 | 3. ASCII should be designated to G0 before control characters? | 2051 | 3. ASCII should be designated to G0 before control characters? |
| 2052 | 4. ASCII should be designated to G0 at end of line? | 2052 | 4. ASCII should be designated to G0 at end of line? |
| @@ -2540,7 +2540,7 @@ encode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) | |||
| 2540 | /* COMPOSITION_WITH_ALTCHARS or COMPOSITION_WITH_RULE_ALTCHAR */ | 2540 | /* COMPOSITION_WITH_ALTCHARS or COMPOSITION_WITH_RULE_ALTCHAR */ |
| 2541 | if (coding->cmp_data_index == coding->cmp_data_start + data[0]) | 2541 | if (coding->cmp_data_index == coding->cmp_data_start + data[0]) |
| 2542 | /* We have consumed components of the composition. | 2542 | /* We have consumed components of the composition. |
| 2543 | What follows in SRC is the compositions's base | 2543 | What follows in SRC is the composition's base |
| 2544 | text. */ | 2544 | text. */ |
| 2545 | ENCODE_COMPOSITION_FAKE_START (coding); | 2545 | ENCODE_COMPOSITION_FAKE_START (coding); |
| 2546 | else | 2546 | else |
| @@ -3223,7 +3223,7 @@ decode_eol (coding, source, destination, src_bytes, dst_bytes) | |||
| 3223 | 3223 | ||
| 3224 | /* See "GENERAL NOTES about `encode_coding_XXX ()' functions". Encode | 3224 | /* See "GENERAL NOTES about `encode_coding_XXX ()' functions". Encode |
| 3225 | format of end-of-line according to `coding->eol_type'. It also | 3225 | format of end-of-line according to `coding->eol_type'. It also |
| 3226 | convert multibyte form 8-bit characers to unibyte if | 3226 | convert multibyte form 8-bit characters to unibyte if |
| 3227 | CODING->src_multibyte is nonzero. If `coding->mode & | 3227 | CODING->src_multibyte is nonzero. If `coding->mode & |
| 3228 | CODING_MODE_SELECTIVE_DISPLAY' is nonzero, code '\r' in source text | 3228 | CODING_MODE_SELECTIVE_DISPLAY' is nonzero, code '\r' in source text |
| 3229 | also means end-of-line. */ | 3229 | also means end-of-line. */ |
| @@ -3454,7 +3454,7 @@ setup_coding_system (coding_system, coding) | |||
| 3454 | `translation-table-for-decode', `translation-table-for-encode'. */ | 3454 | `translation-table-for-decode', `translation-table-for-encode'. */ |
| 3455 | plist = XVECTOR (coding_spec)->contents[3]; | 3455 | plist = XVECTOR (coding_spec)->contents[3]; |
| 3456 | /* Pre & post conversion functions should be disabled if | 3456 | /* Pre & post conversion functions should be disabled if |
| 3457 | inhibit_eol_conversion is nozero. This is the case that a code | 3457 | inhibit_eol_conversion is nonzero. This is the case that a code |
| 3458 | conversion function is called while those functions are running. */ | 3458 | conversion function is called while those functions are running. */ |
| 3459 | if (! inhibit_pre_post_conversion) | 3459 | if (! inhibit_pre_post_conversion) |
| 3460 | { | 3460 | { |
| @@ -3849,14 +3849,14 @@ setup_raw_text_coding_system (coding) | |||
| 3849 | o coding-category-iso-7-else | 3849 | o coding-category-iso-7-else |
| 3850 | 3850 | ||
| 3851 | The category for a coding system which has the same code range | 3851 | The category for a coding system which has the same code range |
| 3852 | as ISO2022 of 7-bit environemnt but uses locking shift or | 3852 | as ISO2022 of 7-bit environment but uses locking shift or |
| 3853 | single shift functions. Assigned the coding-system (Lisp | 3853 | single shift functions. Assigned the coding-system (Lisp |
| 3854 | symbol) `iso-2022-7bit-lock' by default. | 3854 | symbol) `iso-2022-7bit-lock' by default. |
| 3855 | 3855 | ||
| 3856 | o coding-category-iso-8-else | 3856 | o coding-category-iso-8-else |
| 3857 | 3857 | ||
| 3858 | The category for a coding system which has the same code range | 3858 | The category for a coding system which has the same code range |
| 3859 | as ISO2022 of 8-bit environemnt but uses locking shift or | 3859 | as ISO2022 of 8-bit environment but uses locking shift or |
| 3860 | single shift functions. Assigned the coding-system (Lisp | 3860 | single shift functions. Assigned the coding-system (Lisp |
| 3861 | symbol) `iso-2022-8bit-ss2' by default. | 3861 | symbol) `iso-2022-8bit-ss2' by default. |
| 3862 | 3862 | ||
| @@ -4682,7 +4682,7 @@ decode_coding (coding, source, destination, src_bytes, dst_bytes) | |||
| 4682 | { | 4682 | { |
| 4683 | detect_eol (coding, source, src_bytes); | 4683 | detect_eol (coding, source, src_bytes); |
| 4684 | /* We had better recover the original eol format if we | 4684 | /* We had better recover the original eol format if we |
| 4685 | encounter an inconsitent eol format while decoding. */ | 4685 | encounter an inconsistent eol format while decoding. */ |
| 4686 | coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; | 4686 | coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; |
| 4687 | } | 4687 | } |
| 4688 | 4688 | ||
| @@ -4976,7 +4976,7 @@ shrink_decoding_region (beg, end, coding, str) | |||
| 4976 | case CODING_CATEGORY_IDX_ISO_7: | 4976 | case CODING_CATEGORY_IDX_ISO_7: |
| 4977 | case CODING_CATEGORY_IDX_ISO_7_TIGHT: | 4977 | case CODING_CATEGORY_IDX_ISO_7_TIGHT: |
| 4978 | { | 4978 | { |
| 4979 | /* We can skip all charactes at the tail except for 8-bit | 4979 | /* We can skip all characters at the tail except for 8-bit |
| 4980 | codes and ESC and the following 2-byte at the tail. */ | 4980 | codes and ESC and the following 2-byte at the tail. */ |
| 4981 | unsigned char *eight_bit = NULL; | 4981 | unsigned char *eight_bit = NULL; |
| 4982 | 4982 | ||
| @@ -5065,7 +5065,7 @@ shrink_encoding_region (beg, end, coding, str) | |||
| 5065 | if (!NILP (CHAR_TABLE_REF (translation_table, i))) | 5065 | if (!NILP (CHAR_TABLE_REF (translation_table, i))) |
| 5066 | break; | 5066 | break; |
| 5067 | if (i < 128) | 5067 | if (i < 128) |
| 5068 | /* Some ASCII character should be tranlsated. We give up | 5068 | /* Some ASCII character should be translated. We give up |
| 5069 | shrinking. */ | 5069 | shrinking. */ |
| 5070 | return; | 5070 | return; |
| 5071 | } | 5071 | } |
| @@ -5231,7 +5231,7 @@ coding_save_composition (coding, from, to, obj) | |||
| 5231 | } | 5231 | } |
| 5232 | 5232 | ||
| 5233 | /* Reflect the saved information about compositions to OBJ. | 5233 | /* Reflect the saved information about compositions to OBJ. |
| 5234 | CODING->cmp_data points to a memory block for the informaiton. OBJ | 5234 | CODING->cmp_data points to a memory block for the information. OBJ |
| 5235 | is a buffer or a string, defaults to the current buffer. */ | 5235 | is a buffer or a string, defaults to the current buffer. */ |
| 5236 | 5236 | ||
| 5237 | void | 5237 | void |
| @@ -5290,7 +5290,7 @@ coding_restore_composition (coding, obj) | |||
| 5290 | replace_range (insdel.c) to know what we are doing. | 5290 | replace_range (insdel.c) to know what we are doing. |
| 5291 | 5291 | ||
| 5292 | If REPLACE is zero, it is assumed that the source text is unibyte. | 5292 | If REPLACE is zero, it is assumed that the source text is unibyte. |
| 5293 | Otherwize, it is assumed that the source text is multibyte. */ | 5293 | Otherwise, it is assumed that the source text is multibyte. */ |
| 5294 | 5294 | ||
| 5295 | int | 5295 | int |
| 5296 | code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) | 5296 | code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) |
| @@ -5369,7 +5369,7 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) | |||
| 5369 | if (coding->eol_type == CODING_EOL_UNDECIDED) | 5369 | if (coding->eol_type == CODING_EOL_UNDECIDED) |
| 5370 | coding->eol_type = CODING_EOL_LF; | 5370 | coding->eol_type = CODING_EOL_LF; |
| 5371 | /* We had better recover the original eol format if we | 5371 | /* We had better recover the original eol format if we |
| 5372 | encounter an inconsitent eol format while decoding. */ | 5372 | encounter an inconsistent eol format while decoding. */ |
| 5373 | coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; | 5373 | coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; |
| 5374 | } | 5374 | } |
| 5375 | } | 5375 | } |
| @@ -5459,7 +5459,7 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) | |||
| 5459 | len -= total_skip; len_byte -= total_skip; | 5459 | len -= total_skip; len_byte -= total_skip; |
| 5460 | } | 5460 | } |
| 5461 | 5461 | ||
| 5462 | /* For converion, we must put the gap before the text in addition to | 5462 | /* For conversion, we must put the gap before the text in addition to |
| 5463 | making the gap larger for efficient decoding. The required gap | 5463 | making the gap larger for efficient decoding. The required gap |
| 5464 | size starts from 2000 which is the magic number used in make_gap. | 5464 | size starts from 2000 which is the magic number used in make_gap. |
| 5465 | But, after one batch of conversion, it will be incremented if we | 5465 | But, after one batch of conversion, it will be incremented if we |
| @@ -5629,7 +5629,7 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) | |||
| 5629 | if (first) | 5629 | if (first) |
| 5630 | { | 5630 | { |
| 5631 | /* We have just done the first batch of conversion which was | 5631 | /* We have just done the first batch of conversion which was |
| 5632 | stoped because of insufficient gap. Let's reconsider the | 5632 | stopped because of insufficient gap. Let's reconsider the |
| 5633 | required gap size (i.e. SRT - DST) now. | 5633 | required gap size (i.e. SRT - DST) now. |
| 5634 | 5634 | ||
| 5635 | We have converted ORIG bytes (== coding->consumed) into | 5635 | We have converted ORIG bytes (== coding->consumed) into |
| @@ -5678,7 +5678,7 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) | |||
| 5678 | inserted_byte = str_to_multibyte (GPT_ADDR, GAP_SIZE, inserted_byte); | 5678 | inserted_byte = str_to_multibyte (GPT_ADDR, GAP_SIZE, inserted_byte); |
| 5679 | } | 5679 | } |
| 5680 | 5680 | ||
| 5681 | /* If we have shrinked the conversion area, adjust it now. */ | 5681 | /* If we shrank the conversion area, adjust it now. */ |
| 5682 | if (total_skip > 0) | 5682 | if (total_skip > 0) |
| 5683 | { | 5683 | { |
| 5684 | if (tail_skip > 0) | 5684 | if (tail_skip > 0) |
| @@ -5829,7 +5829,7 @@ decode_coding_string (str, coding, nocopy) | |||
| 5829 | if (coding->eol_type == CODING_EOL_UNDECIDED) | 5829 | if (coding->eol_type == CODING_EOL_UNDECIDED) |
| 5830 | coding->eol_type = CODING_EOL_LF; | 5830 | coding->eol_type = CODING_EOL_LF; |
| 5831 | /* We had better recover the original eol format if we | 5831 | /* We had better recover the original eol format if we |
| 5832 | encounter an inconsitent eol format while decoding. */ | 5832 | encounter an inconsistent eol format while decoding. */ |
| 5833 | coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; | 5833 | coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; |
| 5834 | } | 5834 | } |
| 5835 | } | 5835 | } |
| @@ -6495,7 +6495,7 @@ code_convert_string1 (string, coding_system, nocopy, encodep) | |||
| 6495 | DEFUN ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, | 6495 | DEFUN ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, |
| 6496 | 2, 3, 0, | 6496 | 2, 3, 0, |
| 6497 | "Decode STRING which is encoded in CODING-SYSTEM, and return the result.\n\ | 6497 | "Decode STRING which is encoded in CODING-SYSTEM, and return the result.\n\ |
| 6498 | Optional arg NOCOPY non-nil means it is ok to return STRING itself\n\ | 6498 | Optional arg NOCOPY non-nil means it is OK to return STRING itself\n\ |
| 6499 | if the decoding operation is trivial.\n\ | 6499 | if the decoding operation is trivial.\n\ |
| 6500 | This function sets `last-coding-system-used' to the precise coding system\n\ | 6500 | This function sets `last-coding-system-used' to the precise coding system\n\ |
| 6501 | used (which may be different from CODING-SYSTEM if CODING-SYSTEM is\n\ | 6501 | used (which may be different from CODING-SYSTEM if CODING-SYSTEM is\n\ |
| @@ -6509,7 +6509,7 @@ not fully specified.)") | |||
| 6509 | DEFUN ("encode-coding-string", Fencode_coding_string, Sencode_coding_string, | 6509 | DEFUN ("encode-coding-string", Fencode_coding_string, Sencode_coding_string, |
| 6510 | 2, 3, 0, | 6510 | 2, 3, 0, |
| 6511 | "Encode STRING to CODING-SYSTEM, and return the result.\n\ | 6511 | "Encode STRING to CODING-SYSTEM, and return the result.\n\ |
| 6512 | Optional arg NOCOPY non-nil means it is ok to return STRING itself\n\ | 6512 | Optional arg NOCOPY non-nil means it is OK to return STRING itself\n\ |
| 6513 | if the encoding operation is trivial.\n\ | 6513 | if the encoding operation is trivial.\n\ |
| 6514 | This function sets `last-coding-system-used' to the precise coding system\n\ | 6514 | This function sets `last-coding-system-used' to the precise coding system\n\ |
| 6515 | used (which may be different from CODING-SYSTEM if CODING-SYSTEM is\n\ | 6515 | used (which may be different from CODING-SYSTEM if CODING-SYSTEM is\n\ |
| @@ -6678,7 +6678,7 @@ DEFUN ("set-terminal-coding-system-internal", | |||
| 6678 | setup_coding_system (Fcheck_coding_system (coding_system), &terminal_coding); | 6678 | setup_coding_system (Fcheck_coding_system (coding_system), &terminal_coding); |
| 6679 | /* We had better not send unsafe characters to terminal. */ | 6679 | /* We had better not send unsafe characters to terminal. */ |
| 6680 | terminal_coding.flags |= CODING_FLAG_ISO_SAFE; | 6680 | terminal_coding.flags |= CODING_FLAG_ISO_SAFE; |
| 6681 | /* Characer composition should be disabled. */ | 6681 | /* Character composition should be disabled. */ |
| 6682 | terminal_coding.composing = COMPOSITION_DISABLED; | 6682 | terminal_coding.composing = COMPOSITION_DISABLED; |
| 6683 | /* Error notification should be suppressed. */ | 6683 | /* Error notification should be suppressed. */ |
| 6684 | terminal_coding.suppress_error = 1; | 6684 | terminal_coding.suppress_error = 1; |
| @@ -6696,7 +6696,7 @@ DEFUN ("set-safe-terminal-coding-system-internal", | |||
| 6696 | CHECK_SYMBOL (coding_system, 0); | 6696 | CHECK_SYMBOL (coding_system, 0); |
| 6697 | setup_coding_system (Fcheck_coding_system (coding_system), | 6697 | setup_coding_system (Fcheck_coding_system (coding_system), |
| 6698 | &safe_terminal_coding); | 6698 | &safe_terminal_coding); |
| 6699 | /* Characer composition should be disabled. */ | 6699 | /* Character composition should be disabled. */ |
| 6700 | safe_terminal_coding.composing = COMPOSITION_DISABLED; | 6700 | safe_terminal_coding.composing = COMPOSITION_DISABLED; |
| 6701 | /* Error notification should be suppressed. */ | 6701 | /* Error notification should be suppressed. */ |
| 6702 | terminal_coding.suppress_error = 1; | 6702 | terminal_coding.suppress_error = 1; |
| @@ -6721,7 +6721,7 @@ DEFUN ("set-keyboard-coding-system-internal", | |||
| 6721 | { | 6721 | { |
| 6722 | CHECK_SYMBOL (coding_system, 0); | 6722 | CHECK_SYMBOL (coding_system, 0); |
| 6723 | setup_coding_system (Fcheck_coding_system (coding_system), &keyboard_coding); | 6723 | setup_coding_system (Fcheck_coding_system (coding_system), &keyboard_coding); |
| 6724 | /* Characer composition should be disabled. */ | 6724 | /* Character composition should be disabled. */ |
| 6725 | keyboard_coding.composing = COMPOSITION_DISABLED; | 6725 | keyboard_coding.composing = COMPOSITION_DISABLED; |
| 6726 | return Qnil; | 6726 | return Qnil; |
| 6727 | } | 6727 | } |
| @@ -6777,14 +6777,14 @@ which is a list of all the arguments given to this function.") | |||
| 6777 | operation = args[0]; | 6777 | operation = args[0]; |
| 6778 | if (!SYMBOLP (operation) | 6778 | if (!SYMBOLP (operation) |
| 6779 | || !INTEGERP (target_idx = Fget (operation, Qtarget_idx))) | 6779 | || !INTEGERP (target_idx = Fget (operation, Qtarget_idx))) |
| 6780 | error ("Invalid first arguement"); | 6780 | error ("Invalid first argument"); |
| 6781 | if (nargs < 1 + XINT (target_idx)) | 6781 | if (nargs < 1 + XINT (target_idx)) |
| 6782 | error ("Too few arguments for operation: %s", | 6782 | error ("Too few arguments for operation: %s", |
| 6783 | XSYMBOL (operation)->name->data); | 6783 | XSYMBOL (operation)->name->data); |
| 6784 | target = args[XINT (target_idx) + 1]; | 6784 | target = args[XINT (target_idx) + 1]; |
| 6785 | if (!(STRINGP (target) | 6785 | if (!(STRINGP (target) |
| 6786 | || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) | 6786 | || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) |
| 6787 | error ("Invalid %dth argument", XINT (target_idx) + 1); | 6787 | error ("Invalid argument %d", XINT (target_idx) + 1); |
| 6788 | 6788 | ||
| 6789 | chain = ((EQ (operation, Qinsert_file_contents) | 6789 | chain = ((EQ (operation, Qinsert_file_contents) |
| 6790 | || EQ (operation, Qwrite_region)) | 6790 | || EQ (operation, Qwrite_region)) |
| @@ -7250,13 +7250,13 @@ See also the function `find-operation-coding-system'."); | |||
| 7250 | 7250 | ||
| 7251 | DEFVAR_LISP ("standard-translation-table-for-encode", | 7251 | DEFVAR_LISP ("standard-translation-table-for-encode", |
| 7252 | &Vstandard_translation_table_for_encode, | 7252 | &Vstandard_translation_table_for_encode, |
| 7253 | "Table for translationg characters while encoding."); | 7253 | "Table for translating characters while encoding."); |
| 7254 | Vstandard_translation_table_for_encode = Qnil; | 7254 | Vstandard_translation_table_for_encode = Qnil; |
| 7255 | 7255 | ||
| 7256 | DEFVAR_LISP ("charset-revision-table", &Vcharset_revision_alist, | 7256 | DEFVAR_LISP ("charset-revision-table", &Vcharset_revision_alist, |
| 7257 | "Alist of charsets vs revision numbers.\n\ | 7257 | "Alist of charsets vs revision numbers.\n\ |
| 7258 | While encoding, if a charset (car part of an element) is found,\n\ | 7258 | While encoding, if a charset (car part of an element) is found,\n\ |
| 7259 | designate it with the escape sequence identifing revision (cdr part of the element)."); | 7259 | designate it with the escape sequence identifying revision (cdr part of the element)."); |
| 7260 | Vcharset_revision_alist = Qnil; | 7260 | Vcharset_revision_alist = Qnil; |
| 7261 | 7261 | ||
| 7262 | DEFVAR_LISP ("default-process-coding-system", | 7262 | DEFVAR_LISP ("default-process-coding-system", |