]> git.eshelyaron.com Git - emacs.git/commitdiff
(decode_mode_spec_coding): Handle integer value in
authorKenichi Handa <handa@m17n.org>
Tue, 23 Mar 1999 12:29:30 +0000 (12:29 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 23 Mar 1999 12:29:30 +0000 (12:29 +0000)
eoltype correctly for backward compatibility.

src/xdisp.c

index db000c89b1686ad33936c72bd2fef99c87ff639b..2bc181bbab02995ab5d99e7c2ecf2e1a07c9120d 100644 (file)
@@ -4622,12 +4622,20 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
          eol_str = XSTRING (eoltype)->data;
          eol_str_len = XSTRING (eoltype)->size;
        }
+      else if (INTEGERP (eoltype)
+              && CHAR_VALID_P (XINT (eoltype), 0))
+       {
+         int c = XINT (eoltype);
+         unsigned char work[4];
+
+         eol_str_len = CHAR_STRING (XINT (eoltype), work, eol_str);
+       }
       else
        {
          eol_str = invalid_eol_type;
          eol_str_len = sizeof (invalid_eol_type) - 1;
        }
-      strcpy (buf, eol_str);
+      bcopy (eol_str, buf, eol_str_len);
       buf += eol_str_len;
     }