Mercurial > emacs
comparison src/insdel.c @ 100761:e55e55a286f4
(copy_text): To convert a non-ASCII char to unibyte,
just get the low 8-bit of the code.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 30 Dec 2008 01:48:18 +0000 |
parents | 8971ddf55736 |
children | e038c1a8307c |
comparison
equal
deleted
inserted
replaced
100760:c8c3813f6b68 | 100761:e55e55a286f4 |
---|---|
653 | 653 |
654 while (bytes_left > 0) | 654 while (bytes_left > 0) |
655 { | 655 { |
656 int thislen, c; | 656 int thislen, c; |
657 c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen); | 657 c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen); |
658 if (!ASCII_CHAR_P (c)) | 658 if (! ASCII_CHAR_P (c)) |
659 c = multibyte_char_to_unibyte (c, tbl); | 659 c &= 0xFF; |
660 *to_addr++ = c; | 660 *to_addr++ = c; |
661 from_addr += thislen; | 661 from_addr += thislen; |
662 bytes_left -= thislen; | 662 bytes_left -= thislen; |
663 nchars++; | 663 nchars++; |
664 } | 664 } |