diff options
author | Ashish SHUKLA <ashish@FreeBSD.org> | 2011-09-08 06:16:32 +0000 |
---|---|---|
committer | Ashish SHUKLA <ashish@FreeBSD.org> | 2011-09-08 06:16:32 +0000 |
commit | 87e44003c4fc4ec0e07331c0c2eacb8ede8baa48 (patch) | |
tree | 0737d7dbf4ccbdac7d13ae4970418127ed86a911 /editors/emacs-devel/files | |
parent | c69dfe552ea7974fab7f0094d7b52344d4355831 (diff) |
Notes
Diffstat (limited to 'editors/emacs-devel/files')
-rw-r--r-- | editors/emacs-devel/files/patch-src_coding.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/editors/emacs-devel/files/patch-src_coding.c b/editors/emacs-devel/files/patch-src_coding.c new file mode 100644 index 000000000000..05c5cc1a6eab --- /dev/null +++ b/editors/emacs-devel/files/patch-src_coding.c @@ -0,0 +1,51 @@ + +$FreeBSD$ + +--- src/coding.c.orig ++++ src/coding.c +@@ -3717,8 +3717,20 @@ + else + charset = CHARSET_FROM_ID (charset_id_2); + ONE_MORE_BYTE (c1); +- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) +- goto invalid_code; ++ /* ++ * <ESC>N sequence is recognized as SS2 in some ISO2022 ++ * encodings. As a workaround, mark invalid only if ++ * <ESC>N + GR in a 7-bit encoding or <ESC>N + GL in an 8-bit ++ * encoding. ++ */ ++ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { ++ if (c1 < 0x20 || c1 >= 0x80) ++ goto invalid_code; ++ } ++ else { ++ if (c1 < 0xA0) ++ goto invalid_code; ++ } + break; + + case 'O': /* invocation of single-shift-3 */ +@@ -3731,8 +3743,20 @@ + else + charset = CHARSET_FROM_ID (charset_id_3); + ONE_MORE_BYTE (c1); +- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) +- goto invalid_code; ++ /* ++ * <ESC>O sequence by arrow keys is recognized as SS3 in ++ * some ISO2022 encodings. As a workaround, mark invalid only if ++ * <ESC>O + GR in a 7-bit encoding or <ESC>O + GL in an 8-bit ++ * encoding. ++ */ ++ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { ++ if (c1 < 0x20 || c1 >= 0x80) ++ goto invalid_code; ++ } ++ else { ++ if (c1 < 0xA0) ++ goto invalid_code; ++ } + break; + + case '0': case '2': case '3': case '4': /* start composition */ |