diff options
| author | Kenichi Handa | 1998-01-22 01:26:45 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-01-22 01:26:45 +0000 |
| commit | c1f6608b5f607be7210ae5651866d6e1643b1ace (patch) | |
| tree | 422bad1eaab7bc57ac4d90ffa791e58890139a7e /src | |
| parent | d46c5b12512d9b56b35b1e9bafd6e51535270f77 (diff) | |
| download | emacs-c1f6608b5f607be7210ae5651866d6e1643b1ace.tar.gz emacs-c1f6608b5f607be7210ae5651866d6e1643b1ace.zip | |
(BCOPY_SHORT): New macro.
(MAX_CHAR_COMPOSITION): New macro.
(CHAR_CHARSET): Check more strictly.
(CODING_FLAG_ISO_DESIGNATION): New macro.
(Vcharacter_unification_table_vector): Extern it.
(UNIFICATION_ID_TABLE): New macro.
Diffstat (limited to 'src')
| -rw-r--r-- | src/charset.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/charset.h b/src/charset.h index f8bc1363b7b..b4c3e08c53e 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -244,6 +244,7 @@ extern int charset_big5_2; /* Big5 Level 2 (Chinese Traditional) */ | |||
| 244 | ((MIN_CHARSET_PRIVATE_DIMENSION2 - 0xE0) << 14) | 244 | ((MIN_CHARSET_PRIVATE_DIMENSION2 - 0xE0) << 14) |
| 245 | #define MIN_CHAR_COMPOSITION \ | 245 | #define MIN_CHAR_COMPOSITION \ |
| 246 | (0x1F << 14) | 246 | (0x1F << 14) |
| 247 | #define MAX_CHAR_COMPOSITION GLYPH_MASK_CHAR | ||
| 247 | 248 | ||
| 248 | /* 1 if C is an ASCII character, else 0. */ | 249 | /* 1 if C is an ASCII character, else 0. */ |
| 249 | #define SINGLE_BYTE_CHAR_P(c) ((c) < 0x100) | 250 | #define SINGLE_BYTE_CHAR_P(c) ((c) < 0x100) |
| @@ -404,7 +405,9 @@ extern int width_by_char_head[256]; | |||
| 404 | ? CHAR_FIELD1 (c) + 0x8F \ | 405 | ? CHAR_FIELD1 (c) + 0x8F \ |
| 405 | : ((c) < MIN_CHAR_COMPOSITION \ | 406 | : ((c) < MIN_CHAR_COMPOSITION \ |
| 406 | ? CHAR_FIELD1 (c) + 0xE0 \ | 407 | ? CHAR_FIELD1 (c) + 0xE0 \ |
| 407 | : CHARSET_COMPOSITION)))) | 408 | : ((c) <= MAX_CHAR_COMPOSITION \ |
| 409 | ? CHARSET_COMPOSITION \ | ||
| 410 | : CHARSET_ASCII))))) | ||
| 408 | 411 | ||
| 409 | /* Return charset at the place pointed by P. */ | 412 | /* Return charset at the place pointed by P. */ |
| 410 | #define CHARSET_AT(p) \ | 413 | #define CHARSET_AT(p) \ |
| @@ -763,4 +766,19 @@ extern int cmpchar_component P_ ((unsigned int, unsigned int)); | |||
| 763 | extern int find_charset_in_str P_ ((unsigned char *, int, int *, Lisp_Object)); | 766 | extern int find_charset_in_str P_ ((unsigned char *, int, int *, Lisp_Object)); |
| 764 | extern int strwidth P_ ((unsigned char *, int)); | 767 | extern int strwidth P_ ((unsigned char *, int)); |
| 765 | 768 | ||
| 769 | extern Lisp_Object Vcharacter_unification_table_vector; | ||
| 770 | #define UNIFICATION_ID_TABLE(id) \ | ||
| 771 | (XCONS(XVECTOR(Vcharacter_unification_table_vector)->contents[(id)])->cdr) | ||
| 772 | |||
| 773 | /* Copy LEN bytes from FROM to TO. This macro should be used only | ||
| 774 | when a caller knows that LEN is short and the obvious copy loop is | ||
| 775 | faster than calling bcopy which has some overhead. */ | ||
| 776 | |||
| 777 | #define BCOPY_SHORT(from, to, len) \ | ||
| 778 | do { \ | ||
| 779 | int i = len; \ | ||
| 780 | unsigined char *from_p = from, *to_p = to; \ | ||
| 781 | while (i--) *from_p++ = *to_p++; \ | ||
| 782 | } while (0) | ||
| 783 | |||
| 766 | #endif /* _CHARSET_H */ | 784 | #endif /* _CHARSET_H */ |