comparison src/xdisp.c @ 24511:6dbea1df5686

(decode_mode_spec_coding): Handle integer value in eoltype correctly for backward compatibility.
author Kenichi Handa <handa@m17n.org>
date Tue, 23 Mar 1999 12:29:30 +0000
parents 2612f75bdd2a
children 7bc142e9e59f
comparison
equal deleted inserted replaced
24510:3aeaac397061 24511:6dbea1df5686
4620 if (STRINGP (eoltype)) 4620 if (STRINGP (eoltype))
4621 { 4621 {
4622 eol_str = XSTRING (eoltype)->data; 4622 eol_str = XSTRING (eoltype)->data;
4623 eol_str_len = XSTRING (eoltype)->size; 4623 eol_str_len = XSTRING (eoltype)->size;
4624 } 4624 }
4625 else if (INTEGERP (eoltype)
4626 && CHAR_VALID_P (XINT (eoltype), 0))
4627 {
4628 int c = XINT (eoltype);
4629 unsigned char work[4];
4630
4631 eol_str_len = CHAR_STRING (XINT (eoltype), work, eol_str);
4632 }
4625 else 4633 else
4626 { 4634 {
4627 eol_str = invalid_eol_type; 4635 eol_str = invalid_eol_type;
4628 eol_str_len = sizeof (invalid_eol_type) - 1; 4636 eol_str_len = sizeof (invalid_eol_type) - 1;
4629 } 4637 }
4630 strcpy (buf, eol_str); 4638 bcopy (eol_str, buf, eol_str_len);
4631 buf += eol_str_len; 4639 buf += eol_str_len;
4632 } 4640 }
4633 4641
4634 return buf; 4642 return buf;
4635 } 4643 }