Mercurial > emacs
comparison src/charset.h @ 21444:0cba6f211d7c
(MULTIBYTE_FORM_LENGTH): Don't check LEN here.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 09 Apr 1998 05:40:23 +0000 |
parents | 95aae2ff5fcd |
children | 90f77c401689 |
comparison
equal
deleted
inserted
replaced
21443:3cb2644c8dd2 | 21444:0cba6f211d7c |
---|---|
610 } \ | 610 } \ |
611 else | 611 else |
612 | 612 |
613 /* Return the length of the multi-byte form at string STR of length LEN. */ | 613 /* Return the length of the multi-byte form at string STR of length LEN. */ |
614 | 614 |
615 #define MULTIBYTE_FORM_LENGTH(str, len) \ | 615 #define MULTIBYTE_FORM_LENGTH(str, len) \ |
616 ((BYTES_BY_CHAR_HEAD (*(unsigned char *)(str)) == 1 \ | 616 (BYTES_BY_CHAR_HEAD (*(unsigned char *)(str)) == 1 \ |
617 || BYTES_BY_CHAR_HEAD (*(unsigned char *)(str)) > (len)) \ | 617 ? 1 \ |
618 ? 1 \ | |
619 : multibyte_form_length (str, len)) | 618 : multibyte_form_length (str, len)) |
620 | 619 |
621 /* Set C a (possibly multibyte) character at P. P points into a | 620 /* Set C a (possibly multibyte) character at P. P points into a |
622 string which is the virtual concatenation of STR1 (which ends at | 621 string which is the virtual concatenation of STR1 (which ends at |
623 END1) or STR2 (which ends at END2). */ | 622 END1) or STR2 (which ends at END2). */ |