diff options
| author | root | 2013-08-12 12:27:22 +0200 |
|---|---|---|
| committer | root | 2013-08-12 12:27:22 +0200 |
| commit | c39e73975f7371a6458cd63967d39ba77a1e871a (patch) | |
| tree | 145fb3d8489ecd65ac6b1887e17a204bff751286 /src/coding.c | |
| parent | 2427b15992fe47646a2bf2b55891f1e482dedaa0 (diff) | |
| parent | 6edea0a595d292c4d3f1a7e862195be07c874e40 (diff) | |
| download | emacs-c39e73975f7371a6458cd63967d39ba77a1e871a.tar.gz emacs-c39e73975f7371a6458cd63967d39ba77a1e871a.zip | |
merge from trunk
Conflicts:
src/Makefile.in
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c index 385a22a188d..5b637627763 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -493,6 +493,8 @@ enum iso_code_class_type | |||
| 493 | 493 | ||
| 494 | #define CODING_ISO_FLAG_USE_OLDJIS 0x10000 | 494 | #define CODING_ISO_FLAG_USE_OLDJIS 0x10000 |
| 495 | 495 | ||
| 496 | #define CODING_ISO_FLAG_LEVEL_4 0x20000 | ||
| 497 | |||
| 496 | #define CODING_ISO_FLAG_FULL_SUPPORT 0x100000 | 498 | #define CODING_ISO_FLAG_FULL_SUPPORT 0x100000 |
| 497 | 499 | ||
| 498 | /* A character to be produced on output if encoding of the original | 500 | /* A character to be produced on output if encoding of the original |
| @@ -3772,7 +3774,10 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3772 | else | 3774 | else |
| 3773 | charset = CHARSET_FROM_ID (charset_id_2); | 3775 | charset = CHARSET_FROM_ID (charset_id_2); |
| 3774 | ONE_MORE_BYTE (c1); | 3776 | ONE_MORE_BYTE (c1); |
| 3775 | if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) | 3777 | if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0) |
| 3778 | || (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) | ||
| 3779 | && ((CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_LEVEL_4) | ||
| 3780 | ? c1 >= 0x80 : c1 < 0x80))) | ||
| 3776 | goto invalid_code; | 3781 | goto invalid_code; |
| 3777 | break; | 3782 | break; |
| 3778 | 3783 | ||
| @@ -3786,7 +3791,10 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3786 | else | 3791 | else |
| 3787 | charset = CHARSET_FROM_ID (charset_id_3); | 3792 | charset = CHARSET_FROM_ID (charset_id_3); |
| 3788 | ONE_MORE_BYTE (c1); | 3793 | ONE_MORE_BYTE (c1); |
| 3789 | if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) | 3794 | if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0) |
| 3795 | || (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) | ||
| 3796 | && ((CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_LEVEL_4) | ||
| 3797 | ? c1 >= 0x80 : c1 < 0x80))) | ||
| 3790 | goto invalid_code; | 3798 | goto invalid_code; |
| 3791 | break; | 3799 | break; |
| 3792 | 3800 | ||
| @@ -7489,7 +7497,7 @@ handle_composition_annotation (ptrdiff_t pos, ptrdiff_t limit, | |||
| 7489 | /* We found a composition. Store the corresponding | 7497 | /* We found a composition. Store the corresponding |
| 7490 | annotation data in BUF. */ | 7498 | annotation data in BUF. */ |
| 7491 | int *head = buf; | 7499 | int *head = buf; |
| 7492 | enum composition_method method = COMPOSITION_METHOD (prop); | 7500 | enum composition_method method = composition_method (prop); |
| 7493 | int nchars = COMPOSITION_LENGTH (prop); | 7501 | int nchars = COMPOSITION_LENGTH (prop); |
| 7494 | 7502 | ||
| 7495 | ADD_COMPOSITION_DATA (buf, nchars, 0, method); | 7503 | ADD_COMPOSITION_DATA (buf, nchars, 0, method); |