diff options
| author | Kenichi Handa | 2000-02-17 08:19:21 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-02-17 08:19:21 +0000 |
| commit | 4a09dee02e347478af9bd303808be810f57210a8 (patch) | |
| tree | f878b5e8e9e53594be99b20189bc18955afaf306 /src | |
| parent | bfc17d180a28684be8c2a5e084737d607460d532 (diff) | |
| download | emacs-4a09dee02e347478af9bd303808be810f57210a8.tar.gz emacs-4a09dee02e347478af9bd303808be810f57210a8.zip | |
(decode_mode_spec_coding): Delete superfluous code.
Allocate sufficient memory for eol_str in the case that eoltype is
Lisp_Int.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 26bade582a5..1a9caae17e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | 2000-02-17 Kenichi Handa <handa@etl.go.jp> | 1 | 2000-02-17 Kenichi Handa <handa@etl.go.jp> |
| 2 | 2 | ||
| 3 | * xdisp.c (decode_mode_spec_coding): Delete superfluous code. | 3 | * xdisp.c (decode_mode_spec_coding): Delete superfluous code to |
| 4 | Allocate sufficient memory for eol_str in the case that eoltype is | 4 | avoid infinite error signaling. Allocate sufficient memory for |
| 5 | Lisp_Int. | 5 | eol_str in the case that eoltype is Lisp_Int. |
| 6 | 6 | ||
| 7 | 2000-02-17 Stefan Monnier <monnier@cs.yale.edu> | 7 | 2000-02-17 Stefan Monnier <monnier@cs.yale.edu> |
| 8 | 8 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index e0206ca7ad3..3a8b8b42e96 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11993,9 +11993,9 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) | |||
| 11993 | /* The EOL conversion we are using. */ | 11993 | /* The EOL conversion we are using. */ |
| 11994 | Lisp_Object eoltype; | 11994 | Lisp_Object eoltype; |
| 11995 | 11995 | ||
| 11996 | val = coding_system; | 11996 | val = Fget (coding_system, Qcoding_system); |
| 11997 | 11997 | ||
| 11998 | if (NILP (val)) /* Not yet decided. */ | 11998 | if (!VECTORP (val)) /* Not yet decided. */ |
| 11999 | { | 11999 | { |
| 12000 | if (multibyte) | 12000 | if (multibyte) |
| 12001 | *buf++ = '-'; | 12001 | *buf++ = '-'; |
| @@ -12009,13 +12009,6 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) | |||
| 12009 | 12009 | ||
| 12010 | eolvalue = Fget (coding_system, Qeol_type); | 12010 | eolvalue = Fget (coding_system, Qeol_type); |
| 12011 | 12011 | ||
| 12012 | while (!NILP (val) && SYMBOLP (val)) | ||
| 12013 | { | ||
| 12014 | val = Fget (val, Qcoding_system); | ||
| 12015 | if (NILP (eolvalue)) | ||
| 12016 | eolvalue = Fget (val, Qeol_type); | ||
| 12017 | } | ||
| 12018 | |||
| 12019 | if (multibyte) | 12012 | if (multibyte) |
| 12020 | *buf++ = XFASTINT (XVECTOR (val)->contents[1]); | 12013 | *buf++ = XFASTINT (XVECTOR (val)->contents[1]); |
| 12021 | 12014 | ||
| @@ -12046,6 +12039,7 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) | |||
| 12046 | else if (INTEGERP (eoltype) | 12039 | else if (INTEGERP (eoltype) |
| 12047 | && CHAR_VALID_P (XINT (eoltype), 0)) | 12040 | && CHAR_VALID_P (XINT (eoltype), 0)) |
| 12048 | { | 12041 | { |
| 12042 | eol_str = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH); | ||
| 12049 | eol_str_len = CHAR_STRING (XINT (eoltype), eol_str); | 12043 | eol_str_len = CHAR_STRING (XINT (eoltype), eol_str); |
| 12050 | } | 12044 | } |
| 12051 | else | 12045 | else |