Mercurial > emacs
comparison src/insdel.c @ 20835:f9fafa0336af
(copy_text): When copying from multibyte to unibyte, do
not alter ASCII characters.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 04 Feb 1998 11:23:28 +0000 |
parents | bd592c9c3ef6 |
children | 454423099620 |
comparison
equal
deleted
inserted
replaced
20834:95a80c1e06c3 | 20835:f9fafa0336af |
---|---|
572 /* Convert multibyte to single byte. */ | 572 /* Convert multibyte to single byte. */ |
573 while (bytes_left > 0) | 573 while (bytes_left > 0) |
574 { | 574 { |
575 int thislen, c; | 575 int thislen, c; |
576 c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen); | 576 c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen); |
577 *to_addr++ = (c & 0177) + 0200; | 577 *to_addr++ = SINGLE_BYTE_CHAR_P (c) ? c : (c & 0177) + 0200; |
578 from_addr += thislen; | 578 from_addr += thislen; |
579 bytes_left--; | 579 bytes_left--; |
580 nchars++; | 580 nchars++; |
581 } | 581 } |
582 return nchars; | 582 return nchars; |