diff options
| author | Kenichi Handa | 1997-03-18 23:31:34 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-03-18 23:31:34 +0000 |
| commit | 03e66c53e14945e49e33f6526083710bad158f46 (patch) | |
| tree | b1bbc202ee29cb2ff354a7f6289de744fc0dec40 /src | |
| parent | 3a6cf6bde3c11108b5fb454d228d530a86ffa348 (diff) | |
| download | emacs-03e66c53e14945e49e33f6526083710bad158f46.tar.gz emacs-03e66c53e14945e49e33f6526083710bad158f46.zip | |
(MAX_CHARSET): Definition changed to the actual
maximum valid charset.
(MAX_CHAR): New macro.
Diffstat (limited to 'src')
| -rw-r--r-- | src/charset.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/charset.h b/src/charset.h index c7c4baecdab..0dee3d2ed84 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -118,6 +118,9 @@ Boston, MA 02111-1307, USA. */ | |||
| 118 | #define MIN_CHARSET_PRIVATE_DIMENSION1 LEADING_CODE_EXT_11 | 118 | #define MIN_CHARSET_PRIVATE_DIMENSION1 LEADING_CODE_EXT_11 |
| 119 | #define MIN_CHARSET_PRIVATE_DIMENSION2 LEADING_CODE_EXT_21 | 119 | #define MIN_CHARSET_PRIVATE_DIMENSION2 LEADING_CODE_EXT_21 |
| 120 | 120 | ||
| 121 | /* Maximum value of overall charset identification number. */ | ||
| 122 | #define MAX_CHARSET 0xFE | ||
| 123 | |||
| 121 | /* Definition of special charsets. */ | 124 | /* Definition of special charsets. */ |
| 122 | #define CHARSET_ASCII 0 | 125 | #define CHARSET_ASCII 0 |
| 123 | #define CHARSET_COMPOSITION 0x80 | 126 | #define CHARSET_COMPOSITION 0x80 |
| @@ -370,11 +373,11 @@ extern Lisp_Object Vcharset_symbol_table; | |||
| 370 | #define CHARSET_VALID_P(charset) \ | 373 | #define CHARSET_VALID_P(charset) \ |
| 371 | ((charset) == 0 \ | 374 | ((charset) == 0 \ |
| 372 | || ((charset) >= 0x80 && (charset) <= MAX_CHARSET_OFFICIAL_DIMENSION2) \ | 375 | || ((charset) >= 0x80 && (charset) <= MAX_CHARSET_OFFICIAL_DIMENSION2) \ |
| 373 | || ((charset) >= MIN_CHARSET_PRIVATE_DIMENSION1 && (charset) < MAX_CHARSET)) | 376 | || ((charset) >= MIN_CHARSET_PRIVATE_DIMENSION1 && (charset) <= MAX_CHARSET)) |
| 374 | 377 | ||
| 375 | /* 1 if CHARSET is already defined, else 0. */ | 378 | /* 1 if CHARSET is already defined, else 0. */ |
| 376 | #define CHARSET_DEFINED_P(charset) \ | 379 | #define CHARSET_DEFINED_P(charset) \ |
| 377 | (((charset) >= 0) && ((charset) < MAX_CHARSET) \ | 380 | (((charset) >= 0) && ((charset) <= MAX_CHARSET) \ |
| 378 | && !NILP (CHARSET_TABLE_ENTRY (charset))) | 381 | && !NILP (CHARSET_TABLE_ENTRY (charset))) |
| 379 | 382 | ||
| 380 | /* Since the information CHARSET-BYTES and CHARSET-WIDTH of | 383 | /* Since the information CHARSET-BYTES and CHARSET-WIDTH of |
| @@ -494,8 +497,6 @@ extern int width_by_char_head[256]; | |||
| 494 | ? c1 = *(str), charset = CHARSET_ASCII \ | 497 | ? c1 = *(str), charset = CHARSET_ASCII \ |
| 495 | : charset) | 498 | : charset) |
| 496 | 499 | ||
| 497 | #define MAX_CHARSET 0xFF | ||
| 498 | |||
| 499 | /* Mapping table from ISO2022's charset (specified by DIMENSION, | 500 | /* Mapping table from ISO2022's charset (specified by DIMENSION, |
| 500 | CHARS, and FINAL_CHAR) to Emacs' charset. Should be accessed by | 501 | CHARS, and FINAL_CHAR) to Emacs' charset. Should be accessed by |
| 501 | macro ISO_CHARSET_TABLE (DIMENSION, CHARS, FINAL_CHAR). */ | 502 | macro ISO_CHARSET_TABLE (DIMENSION, CHARS, FINAL_CHAR). */ |
| @@ -650,5 +651,7 @@ extern int n_cmpchars; | |||
| 650 | /* This is the maximum length of multi-byte form. */ | 651 | /* This is the maximum length of multi-byte form. */ |
| 651 | #define MAX_LENGTH_OF_MULTI_BYTE_FORM (MAX_COMPONENT_COUNT * 6) | 652 | #define MAX_LENGTH_OF_MULTI_BYTE_FORM (MAX_COMPONENT_COUNT * 6) |
| 652 | 653 | ||
| 653 | #endif /* _CHARSET_H */ | 654 | /* Maximum character code currently used. */ |
| 655 | #define MAX_CHAR (MIN_CHAR_COMPOSITION + n_cmpchars) | ||
| 654 | 656 | ||
| 657 | #endif /* _CHARSET_H */ | ||