diff options
| author | Stefan Monnier | 2002-11-02 08:16:57 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-11-02 08:16:57 +0000 |
| commit | ea9d458bec46144ae3a4443e9b0aecbd00a1460b (patch) | |
| tree | 43bbb80e51a1942061af51a90eef796ed44cdcfc /src | |
| parent | 18a9f9681592fac043c8f4781729d0aefff4e3fb (diff) | |
| download | emacs-ea9d458bec46144ae3a4443e9b0aecbd00a1460b.tar.gz emacs-ea9d458bec46144ae3a4443e9b0aecbd00a1460b.zip | |
(decode_coding_emacs_mule, decode_coding_iso2022)
(decode_coding_sjis_big5, decode_eol): Allow lone \r in DOS EOL.
Diffstat (limited to 'src')
| -rw-r--r-- | src/coding.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/coding.c b/src/coding.c index 3fa383ad7be..7239c9f9c76 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Coding system handler (conversion, detection, and etc). | 1 | /* Coding system handler (conversion, detection, and etc). |
| 2 | Copyright (C) 1995, 1997, 1998, 2002 Electrotechnical Laboratory, JAPAN. | 2 | Copyright (C) 1995, 1997, 1998, 2002 Electrotechnical Laboratory, JAPAN. |
| 3 | Licensed to the Free Software Foundation. | 3 | Licensed to the Free Software Foundation. |
| 4 | Copyright (C) 2001 Free Software Foundation, Inc. | 4 | Copyright (C) 2001,2002 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -942,11 +942,6 @@ decode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes) | |||
| 942 | ONE_MORE_BYTE (c); | 942 | ONE_MORE_BYTE (c); |
| 943 | if (c != '\n') | 943 | if (c != '\n') |
| 944 | { | 944 | { |
| 945 | if (coding->mode & CODING_MODE_INHIBIT_INCONSISTENT_EOL) | ||
| 946 | { | ||
| 947 | coding->result = CODING_FINISH_INCONSISTENT_EOL; | ||
| 948 | goto label_end_of_loop; | ||
| 949 | } | ||
| 950 | src--; | 945 | src--; |
| 951 | c = '\r'; | 946 | c = '\r'; |
| 952 | } | 947 | } |
| @@ -1830,11 +1825,6 @@ decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) | |||
| 1830 | ONE_MORE_BYTE (c1); | 1825 | ONE_MORE_BYTE (c1); |
| 1831 | if (c1 != ISO_CODE_LF) | 1826 | if (c1 != ISO_CODE_LF) |
| 1832 | { | 1827 | { |
| 1833 | if (coding->mode & CODING_MODE_INHIBIT_INCONSISTENT_EOL) | ||
| 1834 | { | ||
| 1835 | coding->result = CODING_FINISH_INCONSISTENT_EOL; | ||
| 1836 | goto label_end_of_loop; | ||
| 1837 | } | ||
| 1838 | src--; | 1828 | src--; |
| 1839 | c1 = '\r'; | 1829 | c1 = '\r'; |
| 1840 | } | 1830 | } |
| @@ -2928,12 +2918,6 @@ decode_coding_sjis_big5 (coding, source, destination, | |||
| 2928 | ONE_MORE_BYTE (c2); | 2918 | ONE_MORE_BYTE (c2); |
| 2929 | if (c2 == '\n') | 2919 | if (c2 == '\n') |
| 2930 | c1 = c2; | 2920 | c1 = c2; |
| 2931 | else if (coding->mode | ||
| 2932 | & CODING_MODE_INHIBIT_INCONSISTENT_EOL) | ||
| 2933 | { | ||
| 2934 | coding->result = CODING_FINISH_INCONSISTENT_EOL; | ||
| 2935 | goto label_end_of_loop; | ||
| 2936 | } | ||
| 2937 | else | 2921 | else |
| 2938 | /* To process C2 again, SRC is subtracted by 1. */ | 2922 | /* To process C2 again, SRC is subtracted by 1. */ |
| 2939 | src--; | 2923 | src--; |
| @@ -3179,11 +3163,6 @@ decode_eol (coding, source, destination, src_bytes, dst_bytes) | |||
| 3179 | ONE_MORE_BYTE (c); | 3163 | ONE_MORE_BYTE (c); |
| 3180 | if (c != '\n') | 3164 | if (c != '\n') |
| 3181 | { | 3165 | { |
| 3182 | if (coding->mode & CODING_MODE_INHIBIT_INCONSISTENT_EOL) | ||
| 3183 | { | ||
| 3184 | coding->result = CODING_FINISH_INCONSISTENT_EOL; | ||
| 3185 | goto label_end_of_loop; | ||
| 3186 | } | ||
| 3187 | src--; | 3166 | src--; |
| 3188 | c = '\r'; | 3167 | c = '\r'; |
| 3189 | } | 3168 | } |