Mercurial > emacs
changeset 19319:9ea3c87ea61d
Comment changes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 12 Aug 1997 16:11:31 +0000 |
parents | 42c1854d17fb |
children | 2e448d41aa55 |
files | src/charset.h |
diffstat | 1 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/charset.h Tue Aug 12 16:11:03 1997 +0000 +++ b/src/charset.h Tue Aug 12 16:11:31 1997 +0000 @@ -472,9 +472,12 @@ : (CHAR_FIELD2 (c) >= 16 && CHAR_FIELD3 (c) >= 32)) \ : (c) < MIN_CHAR_COMPOSITION + n_cmpchars))) -/* The charset of non-ASCII character C is set to CHARSET, and the - position-codes of C are set to C1 and C2. C2 of DIMENSION1 character - is -1. */ +/* The charset of non-ASCII character C is stored in CHARSET, and the + position-codes of C are stored in C1 and C2. + We store -1 in C2 if the character is just 2 bytes. + + Do not use this macro for an ASCII character. */ + #define SPLIT_NON_ASCII_CHAR(c, charset, c1, c2) \ ((c) < MIN_CHAR_OFFICIAL_DIMENSION2 \ ? (charset = CHAR_FIELD2 (c) + 0x70, \ @@ -487,19 +490,23 @@ c1 = CHAR_FIELD2 (c), \ c2 = CHAR_FIELD3 (c))) -/* The charset of character C is set to CHARSET, and the - position-codes of C are set to C1 and C2. C2 of DIMENSION1 character - is -1. */ +/* The charset of character C is stored in CHARSET, and the + position-codes of C are stored in C1 and C2. + We store -1 in C2 if the character is just 2 bytes. */ + #define SPLIT_CHAR(c, charset, c1, c2) \ (SINGLE_BYTE_CHAR_P (c) \ ? charset = CHARSET_ASCII, c1 = (c), c2 = -1 \ : SPLIT_NON_ASCII_CHAR (c, charset, c1, c2)) -/* The charset of the character at STR is set to CHARSET, and the - position-codes are set to C1 and C2. C2 of DIMENSION1 character is -1. +/* The charset of the character at STR is stored in CHARSET, and the + position-codes are stored in C1 and C2. + We store -1 in C2 if the character is just 2 bytes. + If the character is a composite character, the upper 7-bit and lower 7-bit of CMPCHAR-ID are set in C1 and C2 respectively. No range checking. */ + #define SPLIT_STRING(str, len, charset, c1, c2) \ ((BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) < 2 \ || BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) > len \