diff options
| author | Kenichi Handa | 2000-10-10 02:00:52 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-10-10 02:00:52 +0000 |
| commit | e10ae834bc2faf1ab859f72cb1f867db1f489cad (patch) | |
| tree | 020a7b1f5d7819ce26f827bc6e274a8e58fccc93 /src | |
| parent | caff31d41e1742043403ab69bc68027ecd3120d0 (diff) | |
| download | emacs-e10ae834bc2faf1ab859f72cb1f867db1f489cad.tar.gz emacs-e10ae834bc2faf1ab859f72cb1f867db1f489cad.zip | |
(CHAR_STRING): Optimized for single byte characters.
Diffstat (limited to 'src')
| -rw-r--r-- | src/charset.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/charset.h b/src/charset.h index 83b31abf1f6..b8ee0af40f7 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -524,9 +524,11 @@ extern int iso_charset_table[2][2][128]; | |||
| 524 | advance. Returns the length of the multi-byte form. If C is an | 524 | advance. Returns the length of the multi-byte form. If C is an |
| 525 | invalid character code, signal an error. */ | 525 | invalid character code, signal an error. */ |
| 526 | 526 | ||
| 527 | #define CHAR_STRING(c, str) \ | 527 | #define CHAR_STRING(c, str) \ |
| 528 | (ASCII_BYTE_P (c) \ | 528 | (SINGLE_BYTE_CHAR_P (c) \ |
| 529 | ? (*(str) = (unsigned char)(c), 1) \ | 529 | ? ((ASCII_BYTE_P (c) || c >= 0xA0) \ |
| 530 | ? (*(str) = (unsigned char)(c), 1) \ | ||
| 531 | : (*(str) = LEADING_CODE_8_BIT_CONTROL, *((str)+ 1) = c + 0x20, 2)) \ | ||
| 530 | : char_to_string (c, (unsigned char *) str)) | 532 | : char_to_string (c, (unsigned char *) str)) |
| 531 | 533 | ||
| 532 | /* Return a character code of the character of which multi-byte form | 534 | /* Return a character code of the character of which multi-byte form |