diff options
| author | Kenichi Handa | 2010-10-12 21:52:05 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-10-12 21:52:05 +0900 |
| commit | ad1746f5db1b4c52da8d7bdc52359d6b0a5a5e24 (patch) | |
| tree | af9c1eedca07f1547eb9e3334d0ed0bb70b8b7d4 /src/coding.c | |
| parent | 1c8ca3e6d672ad2d413683e85ec8669ca2204955 (diff) | |
| download | emacs-ad1746f5db1b4c52da8d7bdc52359d6b0a5a5e24.tar.gz emacs-ad1746f5db1b4c52da8d7bdc52359d6b0a5a5e24.zip | |
Fix typos in comments
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/coding.c b/src/coding.c index 8e6642bb80d..137e72a0ba4 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -167,7 +167,7 @@ detect_coding_XXX (coding, detect_info) | |||
| 167 | 167 | ||
| 168 | while (1) | 168 | while (1) |
| 169 | { | 169 | { |
| 170 | /* Get one byte from the source. If the souce is exausted, jump | 170 | /* Get one byte from the source. If the source is exhausted, jump |
| 171 | to no_more_source:. */ | 171 | to no_more_source:. */ |
| 172 | ONE_MORE_BYTE (c); | 172 | ONE_MORE_BYTE (c); |
| 173 | 173 | ||
| @@ -181,7 +181,7 @@ detect_coding_XXX (coding, detect_info) | |||
| 181 | return 0; | 181 | return 0; |
| 182 | 182 | ||
| 183 | no_more_source: | 183 | no_more_source: |
| 184 | /* The source exausted successfully. */ | 184 | /* The source exhausted successfully. */ |
| 185 | detect_info->found |= found; | 185 | detect_info->found |= found; |
| 186 | return 1; | 186 | return 1; |
| 187 | } | 187 | } |
| @@ -537,7 +537,7 @@ enum iso_code_class_type | |||
| 537 | on output. */ | 537 | on output. */ |
| 538 | #define CODING_ISO_FLAG_DESIGNATE_AT_BOL 0x0400 | 538 | #define CODING_ISO_FLAG_DESIGNATE_AT_BOL 0x0400 |
| 539 | 539 | ||
| 540 | /* If set, do not encode unsafe charactes on output. */ | 540 | /* If set, do not encode unsafe characters on output. */ |
| 541 | #define CODING_ISO_FLAG_SAFE 0x0800 | 541 | #define CODING_ISO_FLAG_SAFE 0x0800 |
| 542 | 542 | ||
| 543 | /* If set, extra latin codes (128..159) are accepted as a valid code | 543 | /* If set, extra latin codes (128..159) are accepted as a valid code |
| @@ -693,7 +693,7 @@ enum coding_category | |||
| 693 | static Lisp_Object Vcoding_category_list; | 693 | static Lisp_Object Vcoding_category_list; |
| 694 | 694 | ||
| 695 | /* Table of coding categories (Lisp symbols). This variable is for | 695 | /* Table of coding categories (Lisp symbols). This variable is for |
| 696 | internal use oly. */ | 696 | internal use only. */ |
| 697 | static Lisp_Object Vcoding_category_table; | 697 | static Lisp_Object Vcoding_category_table; |
| 698 | 698 | ||
| 699 | /* Table of coding-categories ordered by priority. */ | 699 | /* Table of coding-categories ordered by priority. */ |
| @@ -825,7 +825,7 @@ static struct coding_system coding_categories[coding_category_max]; | |||
| 825 | } while (0) | 825 | } while (0) |
| 826 | 826 | ||
| 827 | 827 | ||
| 828 | /* Like EMIT_ONE_ASCII_BYTE byt store two bytes; C1 and C2. */ | 828 | /* Like EMIT_ONE_ASCII_BYTE but store two bytes; C1 and C2. */ |
| 829 | 829 | ||
| 830 | #define EMIT_TWO_ASCII_BYTES(c1, c2) \ | 830 | #define EMIT_TWO_ASCII_BYTES(c1, c2) \ |
| 831 | do { \ | 831 | do { \ |
| @@ -1241,7 +1241,7 @@ alloc_destination (coding, nbytes, dst) | |||
| 1241 | 1241 | ||
| 1242 | METHOD is one of enum composition_method. | 1242 | METHOD is one of enum composition_method. |
| 1243 | 1243 | ||
| 1244 | Optionnal COMPOSITION-COMPONENTS are characters and composition | 1244 | Optional COMPOSITION-COMPONENTS are characters and composition |
| 1245 | rules. | 1245 | rules. |
| 1246 | 1246 | ||
| 1247 | In the case of CODING_ANNOTATE_CHARSET_MASK, one element CHARSET-ID | 1247 | In the case of CODING_ANNOTATE_CHARSET_MASK, one element CHARSET-ID |
| @@ -1954,7 +1954,7 @@ encode_coding_utf_16 (coding) | |||
| 1954 | CHARS is 0xA0 plus a number of characters composed by this | 1954 | CHARS is 0xA0 plus a number of characters composed by this |
| 1955 | data, | 1955 | data, |
| 1956 | 1956 | ||
| 1957 | COMPONENTs are characters of multibye form or composition | 1957 | COMPONENTs are characters of multibyte form or composition |
| 1958 | rules encoded by two-byte of ASCII codes. | 1958 | rules encoded by two-byte of ASCII codes. |
| 1959 | 1959 | ||
| 1960 | In addition, for backward compatibility, the following formats are | 1960 | In addition, for backward compatibility, the following formats are |
| @@ -2455,8 +2455,8 @@ decode_coding_emacs_mule (coding) | |||
| 2455 | const unsigned char *src_end = coding->source + coding->src_bytes; | 2455 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 2456 | const unsigned char *src_base; | 2456 | const unsigned char *src_base; |
| 2457 | int *charbuf = coding->charbuf + coding->charbuf_used; | 2457 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 2458 | /* We may produce two annocations (charset and composition) in one | 2458 | /* We may produce two annotations (charset and composition) in one |
| 2459 | loop and one more charset annocation at the end. */ | 2459 | loop and one more charset annotation at the end. */ |
| 2460 | int *charbuf_end | 2460 | int *charbuf_end |
| 2461 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); | 2461 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); |
| 2462 | int consumed_chars = 0, consumed_chars_base; | 2462 | int consumed_chars = 0, consumed_chars_base; |
| @@ -2532,7 +2532,7 @@ decode_coding_emacs_mule (coding) | |||
| 2532 | /* emacs_mule_char can load a charset map from a file, which | 2532 | /* emacs_mule_char can load a charset map from a file, which |
| 2533 | allocates a large structure and might cause buffer text | 2533 | allocates a large structure and might cause buffer text |
| 2534 | to be relocated as result. Thus, we need to remember the | 2534 | to be relocated as result. Thus, we need to remember the |
| 2535 | original pointer to buffer text, and fixup all related | 2535 | original pointer to buffer text, and fix up all related |
| 2536 | pointers after the call. */ | 2536 | pointers after the call. */ |
| 2537 | const unsigned char *orig = coding->source; | 2537 | const unsigned char *orig = coding->source; |
| 2538 | EMACS_INT offset; | 2538 | EMACS_INT offset; |
| @@ -2559,7 +2559,7 @@ decode_coding_emacs_mule (coding) | |||
| 2559 | cmp_status->ncomps -= nchars; | 2559 | cmp_status->ncomps -= nchars; |
| 2560 | } | 2560 | } |
| 2561 | 2561 | ||
| 2562 | /* Now if C >= 0, we found a normally encoded characer, if C < | 2562 | /* Now if C >= 0, we found a normally encoded character, if C < |
| 2563 | 0, we found an old-style composition component character or | 2563 | 0, we found an old-style composition component character or |
| 2564 | rule. */ | 2564 | rule. */ |
| 2565 | 2565 | ||
| @@ -3072,7 +3072,7 @@ setup_iso_safe_charsets (attrs) | |||
| 3072 | 3072 | ||
| 3073 | 3073 | ||
| 3074 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". | 3074 | /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". |
| 3075 | Check if a text is encoded in one of ISO-2022 based codig systems. | 3075 | Check if a text is encoded in one of ISO-2022 based coding systems. |
| 3076 | If it is, return 1, else return 0. */ | 3076 | If it is, return 1, else return 0. */ |
| 3077 | 3077 | ||
| 3078 | static int | 3078 | static int |
| @@ -3484,7 +3484,7 @@ finish_composition (charbuf, cmp_status) | |||
| 3484 | return new_chars; | 3484 | return new_chars; |
| 3485 | } | 3485 | } |
| 3486 | 3486 | ||
| 3487 | /* If characers are under composition, finish the composition. */ | 3487 | /* If characters are under composition, finish the composition. */ |
| 3488 | #define MAYBE_FINISH_COMPOSITION() \ | 3488 | #define MAYBE_FINISH_COMPOSITION() \ |
| 3489 | do { \ | 3489 | do { \ |
| 3490 | if (cmp_status->state != COMPOSING_NO) \ | 3490 | if (cmp_status->state != COMPOSING_NO) \ |
| @@ -3591,8 +3591,8 @@ decode_coding_iso_2022 (coding) | |||
| 3591 | const unsigned char *src_end = coding->source + coding->src_bytes; | 3591 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 3592 | const unsigned char *src_base; | 3592 | const unsigned char *src_base; |
| 3593 | int *charbuf = coding->charbuf + coding->charbuf_used; | 3593 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 3594 | /* We may produce two annocations (charset and composition) in one | 3594 | /* We may produce two annotations (charset and composition) in one |
| 3595 | loop and one more charset annocation at the end. */ | 3595 | loop and one more charset annotation at the end. */ |
| 3596 | int *charbuf_end | 3596 | int *charbuf_end |
| 3597 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); | 3597 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); |
| 3598 | int consumed_chars = 0, consumed_chars_base; | 3598 | int consumed_chars = 0, consumed_chars_base; |
| @@ -3894,7 +3894,7 @@ decode_coding_iso_2022 (coding) | |||
| 3894 | goto invalid_code; | 3894 | goto invalid_code; |
| 3895 | /* For the moment, nested direction is not supported. | 3895 | /* For the moment, nested direction is not supported. |
| 3896 | So, `coding->mode & CODING_MODE_DIRECTION' zero means | 3896 | So, `coding->mode & CODING_MODE_DIRECTION' zero means |
| 3897 | left-to-right, and nozero means right-to-left. */ | 3897 | left-to-right, and nonzero means right-to-left. */ |
| 3898 | ONE_MORE_BYTE (c1); | 3898 | ONE_MORE_BYTE (c1); |
| 3899 | switch (c1) | 3899 | switch (c1) |
| 3900 | { | 3900 | { |
| @@ -4807,7 +4807,7 @@ decode_coding_sjis (coding) | |||
| 4807 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4807 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 4808 | const unsigned char *src_base; | 4808 | const unsigned char *src_base; |
| 4809 | int *charbuf = coding->charbuf + coding->charbuf_used; | 4809 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 4810 | /* We may produce one charset annocation in one loop and one more at | 4810 | /* We may produce one charset annotation in one loop and one more at |
| 4811 | the end. */ | 4811 | the end. */ |
| 4812 | int *charbuf_end | 4812 | int *charbuf_end |
| 4813 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 4813 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| @@ -4926,7 +4926,7 @@ decode_coding_big5 (coding) | |||
| 4926 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4926 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 4927 | const unsigned char *src_base; | 4927 | const unsigned char *src_base; |
| 4928 | int *charbuf = coding->charbuf + coding->charbuf_used; | 4928 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 4929 | /* We may produce one charset annocation in one loop and one more at | 4929 | /* We may produce one charset annotation in one loop and one more at |
| 4930 | the end. */ | 4930 | the end. */ |
| 4931 | int *charbuf_end | 4931 | int *charbuf_end |
| 4932 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 4932 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| @@ -5592,7 +5592,7 @@ decode_coding_charset (coding) | |||
| 5592 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5592 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 5593 | const unsigned char *src_base; | 5593 | const unsigned char *src_base; |
| 5594 | int *charbuf = coding->charbuf + coding->charbuf_used; | 5594 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 5595 | /* We may produce one charset annocation in one loop and one more at | 5595 | /* We may produce one charset annotation in one loop and one more at |
| 5596 | the end. */ | 5596 | the end. */ |
| 5597 | int *charbuf_end | 5597 | int *charbuf_end |
| 5598 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 5598 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| @@ -6203,14 +6203,14 @@ complement_process_encoding_system (coding_system) | |||
| 6203 | o coding-category-iso-7-else | 6203 | o coding-category-iso-7-else |
| 6204 | 6204 | ||
| 6205 | The category for a coding system which has the same code range | 6205 | The category for a coding system which has the same code range |
| 6206 | as ISO2022 of 7-bit environemnt but uses locking shift or | 6206 | as ISO2022 of 7-bit environment but uses locking shift or |
| 6207 | single shift functions. Assigned the coding-system (Lisp | 6207 | single shift functions. Assigned the coding-system (Lisp |
| 6208 | symbol) `iso-2022-7bit-lock' by default. | 6208 | symbol) `iso-2022-7bit-lock' by default. |
| 6209 | 6209 | ||
| 6210 | o coding-category-iso-8-else | 6210 | o coding-category-iso-8-else |
| 6211 | 6211 | ||
| 6212 | The category for a coding system which has the same code range | 6212 | The category for a coding system which has the same code range |
| 6213 | as ISO2022 of 8-bit environemnt but uses locking shift or | 6213 | as ISO2022 of 8-bit environment but uses locking shift or |
| 6214 | single shift functions. Assigned the coding-system (Lisp | 6214 | single shift functions. Assigned the coding-system (Lisp |
| 6215 | symbol) `iso-2022-8bit-ss2' by default. | 6215 | symbol) `iso-2022-8bit-ss2' by default. |
| 6216 | 6216 | ||
| @@ -7635,7 +7635,7 @@ static Lisp_Object Vcode_conversion_reused_workbuf; | |||
| 7635 | static int reused_workbuf_in_use; | 7635 | static int reused_workbuf_in_use; |
| 7636 | 7636 | ||
| 7637 | 7637 | ||
| 7638 | /* Return a working buffer of code convesion. MULTIBYTE specifies the | 7638 | /* Return a working buffer of code conversion. MULTIBYTE specifies the |
| 7639 | multibyteness of returning buffer. */ | 7639 | multibyteness of returning buffer. */ |
| 7640 | 7640 | ||
| 7641 | static Lisp_Object | 7641 | static Lisp_Object |
| @@ -8298,7 +8298,7 @@ function `define-coding-system'. */) | |||
| 8298 | 8298 | ||
| 8299 | /* Detect how the bytes at SRC of length SRC_BYTES are encoded. If | 8299 | /* Detect how the bytes at SRC of length SRC_BYTES are encoded. If |
| 8300 | HIGHEST is nonzero, return the coding system of the highest | 8300 | HIGHEST is nonzero, return the coding system of the highest |
| 8301 | priority among the detected coding systems. Otherwize return a | 8301 | priority among the detected coding systems. Otherwise return a |
| 8302 | list of detected coding systems sorted by their priorities. If | 8302 | list of detected coding systems sorted by their priorities. If |
| 8303 | MULTIBYTEP is nonzero, it is assumed that the bytes are in correct | 8303 | MULTIBYTEP is nonzero, it is assumed that the bytes are in correct |
| 8304 | multibyte form but contains only ASCII and eight-bit chars. | 8304 | multibyte form but contains only ASCII and eight-bit chars. |
| @@ -9423,7 +9423,7 @@ DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_intern | |||
| 9423 | setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); | 9423 | setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); |
| 9424 | /* We had better not send unsafe characters to terminal. */ | 9424 | /* We had better not send unsafe characters to terminal. */ |
| 9425 | terminal_coding->mode |= CODING_MODE_SAFE_ENCODING; | 9425 | terminal_coding->mode |= CODING_MODE_SAFE_ENCODING; |
| 9426 | /* Characer composition should be disabled. */ | 9426 | /* Character composition should be disabled. */ |
| 9427 | terminal_coding->common_flags &= ~CODING_ANNOTATE_COMPOSITION_MASK; | 9427 | terminal_coding->common_flags &= ~CODING_ANNOTATE_COMPOSITION_MASK; |
| 9428 | terminal_coding->src_multibyte = 1; | 9428 | terminal_coding->src_multibyte = 1; |
| 9429 | terminal_coding->dst_multibyte = 0; | 9429 | terminal_coding->dst_multibyte = 0; |
| @@ -9440,7 +9440,7 @@ DEFUN ("set-safe-terminal-coding-system-internal", | |||
| 9440 | CHECK_SYMBOL (coding_system); | 9440 | CHECK_SYMBOL (coding_system); |
| 9441 | setup_coding_system (Fcheck_coding_system (coding_system), | 9441 | setup_coding_system (Fcheck_coding_system (coding_system), |
| 9442 | &safe_terminal_coding); | 9442 | &safe_terminal_coding); |
| 9443 | /* Characer composition should be disabled. */ | 9443 | /* Character composition should be disabled. */ |
| 9444 | safe_terminal_coding.common_flags &= ~CODING_ANNOTATE_COMPOSITION_MASK; | 9444 | safe_terminal_coding.common_flags &= ~CODING_ANNOTATE_COMPOSITION_MASK; |
| 9445 | safe_terminal_coding.src_multibyte = 1; | 9445 | safe_terminal_coding.src_multibyte = 1; |
| 9446 | safe_terminal_coding.dst_multibyte = 0; | 9446 | safe_terminal_coding.dst_multibyte = 0; |
| @@ -9477,7 +9477,7 @@ DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_intern | |||
| 9477 | else | 9477 | else |
| 9478 | Fcheck_coding_system (coding_system); | 9478 | Fcheck_coding_system (coding_system); |
| 9479 | setup_coding_system (coding_system, TERMINAL_KEYBOARD_CODING (t)); | 9479 | setup_coding_system (coding_system, TERMINAL_KEYBOARD_CODING (t)); |
| 9480 | /* Characer composition should be disabled. */ | 9480 | /* Character composition should be disabled. */ |
| 9481 | TERMINAL_KEYBOARD_CODING (t)->common_flags | 9481 | TERMINAL_KEYBOARD_CODING (t)->common_flags |
| 9482 | &= ~CODING_ANNOTATE_COMPOSITION_MASK; | 9482 | &= ~CODING_ANNOTATE_COMPOSITION_MASK; |
| 9483 | return Qnil; | 9483 | return Qnil; |
| @@ -9854,7 +9854,7 @@ usage: (define-coding-system-internal ...) */) | |||
| 9854 | 9854 | ||
| 9855 | If Nth element is a list of charset IDs, N is the first byte | 9855 | If Nth element is a list of charset IDs, N is the first byte |
| 9856 | of one of them. The list is sorted by dimensions of the | 9856 | of one of them. The list is sorted by dimensions of the |
| 9857 | charsets. A charset of smaller dimension comes firtst. */ | 9857 | charsets. A charset of smaller dimension comes first. */ |
| 9858 | val = Fmake_vector (make_number (256), Qnil); | 9858 | val = Fmake_vector (make_number (256), Qnil); |
| 9859 | 9859 | ||
| 9860 | for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) | 9860 | for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) |