aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-02-17 08:19:21 +0000
committerKenichi Handa2000-02-17 08:19:21 +0000
commit4a09dee02e347478af9bd303808be810f57210a8 (patch)
treef878b5e8e9e53594be99b20189bc18955afaf306
parentbfc17d180a28684be8c2a5e084737d607460d532 (diff)
downloademacs-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.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c12
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 @@
12000-02-17 Kenichi Handa <handa@etl.go.jp> 12000-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
72000-02-17 Stefan Monnier <monnier@cs.yale.edu> 72000-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