changeset 27721:c2a9f4621f9a

(decode_mode_spec_coding): Delete superfluous code. Allocate sufficient memory for eol_str in the case that eoltype is Lisp_Int.
author Kenichi Handa <handa@m17n.org>
date Thu, 17 Feb 2000 08:16:19 +0000
parents c727b02df258
children 167c401fd1e7
files src/xdisp.c
diffstat 1 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Thu Feb 17 08:15:20 2000 +0000
+++ b/src/xdisp.c	Thu Feb 17 08:16:19 2000 +0000
@@ -11993,9 +11993,9 @@
   /* The EOL conversion we are using.  */
   Lisp_Object eoltype;
 
-  val = coding_system;
-
-  if (NILP (val))		/* Not yet decided.  */
+  val = Fget (coding_system, Qcoding_system);
+
+  if (!VECTORP (val))		/* Not yet decided.  */
     {
       if (multibyte)
 	*buf++ = '-';
@@ -12009,13 +12009,6 @@
 
       eolvalue = Fget (coding_system, Qeol_type);
 
-      while (!NILP (val) && SYMBOLP (val))
-	{
-	  val = Fget (val, Qcoding_system);
-	  if (NILP (eolvalue))
-	    eolvalue = Fget (val, Qeol_type);
-	}
-
       if (multibyte)
 	*buf++ = XFASTINT (XVECTOR (val)->contents[1]);
 
@@ -12046,6 +12039,7 @@
       else if (INTEGERP (eoltype)
 	       && CHAR_VALID_P (XINT (eoltype), 0))
 	{
+	  eol_str = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH);
 	  eol_str_len = CHAR_STRING (XINT (eoltype), eol_str);
 	}
       else