Mercurial > emacs
comparison src/charset.h @ 20151:82ca32c55fa3
(CHAR_VALID_P): Renamed from VALID_CHAR_P, new
argument GENERICP. Call char_valid_p for a non-ASCII character.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 23 Oct 1997 12:01:50 +0000 |
parents | 1defeafe575b |
children | 7ba68c0e1bee |
comparison
equal
deleted
inserted
replaced
20150:402b6e5f4b58 | 20151:82ca32c55fa3 |
---|---|
460 #define MAKE_CHAR(charset, c1, c2) \ | 460 #define MAKE_CHAR(charset, c1, c2) \ |
461 ((charset) == CHARSET_ASCII \ | 461 ((charset) == CHARSET_ASCII \ |
462 ? (c1) \ | 462 ? (c1) \ |
463 : MAKE_NON_ASCII_CHAR ((charset), (c1) & 0x7F, (c2) & 0x7F)) | 463 : MAKE_NON_ASCII_CHAR ((charset), (c1) & 0x7F, (c2) & 0x7F)) |
464 | 464 |
465 /* 1 if C is in the range of possible character code Emacs can have. */ | 465 /* If GENERICP is nonzero, return nonzero iff C is a valid normal or |
466 #define VALID_CHAR_P(c) \ | 466 generic character. If GENERICP is zero, return nonzero iff C is a |
467 ((c) >= 0 \ | 467 valid normal character. */ |
468 && (SINGLE_BYTE_CHAR_P (c) \ | 468 #define CHAR_VALID_P(c, genericp) \ |
469 || ((c) < MIN_CHAR_COMPOSITION \ | 469 ((c) >= 0 \ |
470 ? ((c) & CHAR_FIELD1_MASK \ | 470 && (SINGLE_BYTE_CHAR_P (c) || char_valid_p (c, genericp))) |
471 ? (CHAR_FIELD2 (c) >= 32 && CHAR_FIELD3 (c) >= 32) \ | |
472 : (CHAR_FIELD2 (c) >= 16 && CHAR_FIELD3 (c) >= 32)) \ | |
473 : (c) < MIN_CHAR_COMPOSITION + n_cmpchars))) | |
474 | 471 |
475 /* The charset of non-ASCII character C is stored in CHARSET, and the | 472 /* The charset of non-ASCII character C is stored in CHARSET, and the |
476 position-codes of C are stored in C1 and C2. | 473 position-codes of C are stored in C1 and C2. |
477 We store -1 in C2 if the character is just 2 bytes. | 474 We store -1 in C2 if the character is just 2 bytes. |
478 | 475 |