summaryrefslogtreecommitdiff
path: root/src/charset.h
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-03-18 23:31:34 +0000
committerKenichi Handa <handa@m17n.org>1997-03-18 23:31:34 +0000
commit1f43a18599c47c88d4150eda61ce26d6c546459d (patch)
treed932e48bb8a2e5c7a237f8d3004b53e8bea7db5b /src/charset.h
parent23e25f56eb5843b981d1b0199c6773c48bda6036 (diff)
downloademacs-1f43a18599c47c88d4150eda61ce26d6c546459d.tar.gz
(MAX_CHARSET): Definition changed to the actual
maximum valid charset. (MAX_CHAR): New macro.
Diffstat (limited to 'src/charset.h')
-rw-r--r--src/charset.h13
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. */
#define MIN_CHARSET_PRIVATE_DIMENSION1 LEADING_CODE_EXT_11
#define MIN_CHARSET_PRIVATE_DIMENSION2 LEADING_CODE_EXT_21
+/* Maximum value of overall charset identification number. */
+#define MAX_CHARSET 0xFE
+
/* Definition of special charsets. */
#define CHARSET_ASCII 0
#define CHARSET_COMPOSITION 0x80
@@ -370,11 +373,11 @@ extern Lisp_Object Vcharset_symbol_table;
#define CHARSET_VALID_P(charset) \
((charset) == 0 \
|| ((charset) >= 0x80 && (charset) <= MAX_CHARSET_OFFICIAL_DIMENSION2) \
- || ((charset) >= MIN_CHARSET_PRIVATE_DIMENSION1 && (charset) < MAX_CHARSET))
+ || ((charset) >= MIN_CHARSET_PRIVATE_DIMENSION1 && (charset) <= MAX_CHARSET))
/* 1 if CHARSET is already defined, else 0. */
#define CHARSET_DEFINED_P(charset) \
- (((charset) >= 0) && ((charset) < MAX_CHARSET) \
+ (((charset) >= 0) && ((charset) <= MAX_CHARSET) \
&& !NILP (CHARSET_TABLE_ENTRY (charset)))
/* Since the information CHARSET-BYTES and CHARSET-WIDTH of
@@ -494,8 +497,6 @@ extern int width_by_char_head[256];
? c1 = *(str), charset = CHARSET_ASCII \
: charset)
-#define MAX_CHARSET 0xFF
-
/* Mapping table from ISO2022's charset (specified by DIMENSION,
CHARS, and FINAL_CHAR) to Emacs' charset. Should be accessed by
macro ISO_CHARSET_TABLE (DIMENSION, CHARS, FINAL_CHAR). */
@@ -650,5 +651,7 @@ extern int n_cmpchars;
/* This is the maximum length of multi-byte form. */
#define MAX_LENGTH_OF_MULTI_BYTE_FORM (MAX_COMPONENT_COUNT * 6)
-#endif /* _CHARSET_H */
+/* Maximum character code currently used. */
+#define MAX_CHAR (MIN_CHAR_COMPOSITION + n_cmpchars)
+#endif /* _CHARSET_H */