aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-01-22 01:26:45 +0000
committerKenichi Handa1998-01-22 01:26:45 +0000
commitb0e3cf2b56c4cce7ad73384fb389a6a50a5c0bcc (patch)
treee2df9e5067a559cb8edefdfab76b46481c9c43c4 /src
parentc1f6608b5f607be7210ae5651866d6e1643b1ace (diff)
downloademacs-b0e3cf2b56c4cce7ad73384fb389a6a50a5c0bcc.tar.gz
emacs-b0e3cf2b56c4cce7ad73384fb389a6a50a5c0bcc.zip
(min_composite_char): New variable.
(Vcharacter_unification_table_vector): New variable. (syms_of_charset): Declare it as a Lisp symbol. Declare a Lisp variable min-composite-char. (unify_char): Delete unnecessary codes.
Diffstat (limited to 'src')
-rw-r--r--src/charset.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/charset.c b/src/charset.c
index dc06837b88a..64cf8034600 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -60,6 +60,8 @@ int charset_latin_jisx0201; /* JISX0201.Roman (Japanese Roman) */
60int charset_big5_1; /* Big5 Level 1 (Chinese Traditional) */ 60int charset_big5_1; /* Big5 Level 1 (Chinese Traditional) */
61int charset_big5_2; /* Big5 Level 2 (Chinese Traditional) */ 61int charset_big5_2; /* Big5 Level 2 (Chinese Traditional) */
62 62
63int min_composite_char;
64
63Lisp_Object Qcharset_table; 65Lisp_Object Qcharset_table;
64 66
65/* A char-table containing information of each character set. */ 67/* A char-table containing information of each character set. */
@@ -72,6 +74,10 @@ Lisp_Object Vcharset_symbol_table;
72/* A list of charset symbols ever defined. */ 74/* A list of charset symbols ever defined. */
73Lisp_Object Vcharset_list; 75Lisp_Object Vcharset_list;
74 76
77/* Vector of unification table ever defined.
78 An ID of a unification table is an index of this vector. */
79Lisp_Object Vcharacter_unification_table_vector;
80
75/* Tables used by macros BYTES_BY_CHAR_HEAD and WIDTH_BY_CHAR_HEAD. */ 81/* Tables used by macros BYTES_BY_CHAR_HEAD and WIDTH_BY_CHAR_HEAD. */
76int bytes_by_char_head[256]; 82int bytes_by_char_head[256];
77int width_by_char_head[256]; 83int width_by_char_head[256];
@@ -265,8 +271,6 @@ unify_char (table, c, charset, c1, c2)
265 if (dimension != CHARSET_DIMENSION (charset)) 271 if (dimension != CHARSET_DIMENSION (charset))
266 /* We can't make such a character because of dimension mismatch. */ 272 /* We can't make such a character because of dimension mismatch. */
267 return c; 273 return c;
268 if (!alt_c1) alt_c1 = c1;
269 if (!alt_c2) alt_c2 = c2;
270 return MAKE_CHAR (alt_charset, c1, c2); 274 return MAKE_CHAR (alt_charset, c1, c2);
271} 275}
272 276
@@ -444,7 +448,7 @@ get_new_private_charset_id (dimension, width)
444 if (width == 1) 448 if (width == 1)
445 from = LEADING_CODE_EXT_21, to = LEADING_CODE_EXT_22; 449 from = LEADING_CODE_EXT_21, to = LEADING_CODE_EXT_22;
446 else 450 else
447 from = LEADING_CODE_EXT_22, to = LEADING_CODE_EXT_MAX - 1; 451 from = LEADING_CODE_EXT_22, to = LEADING_CODE_EXT_MAX + 1;
448 } 452 }
449 453
450 for (charset = from; charset < to; charset++) 454 for (charset = from; charset < to; charset++)
@@ -1102,10 +1106,7 @@ DEFUN ("string", Fstring, Sstring, 1, MANY, 0,
1102 unsigned char *str; 1106 unsigned char *str;
1103 1107
1104 if (!INTEGERP (args[i])) 1108 if (!INTEGERP (args[i]))
1105 { 1109 CHECK_NUMBER (args[i], 0);
1106 free (buf);
1107 CHECK_NUMBER (args[i], 0);
1108 }
1109 c = XINT (args[i]); 1110 c = XINT (args[i]);
1110 len = CHAR_STRING (c, p, str); 1111 len = CHAR_STRING (c, p, str);
1111 if (p != str) 1112 if (p != str)
@@ -1668,6 +1669,12 @@ syms_of_charset ()
1668 "List of charsets ever defined."); 1669 "List of charsets ever defined.");
1669 Vcharset_list = Fcons (Qascii, Qnil); 1670 Vcharset_list = Fcons (Qascii, Qnil);
1670 1671
1672 DEFVAR_LISP ("character-unification-table-vector",
1673 &Vcharacter_unification_table_vector,
1674 "Vector of cons cell of a symbol and unification table ever defined.\n\
1675An ID of a unification table is an index of this vector.");
1676 Vcharacter_unification_table_vector = Fmake_vector (make_number (16), Qnil);
1677
1671 DEFVAR_INT ("leading-code-composition", &leading_code_composition, 1678 DEFVAR_INT ("leading-code-composition", &leading_code_composition,
1672 "Leading-code of composite characters."); 1679 "Leading-code of composite characters.");
1673 leading_code_composition = LEADING_CODE_COMPOSITION; 1680 leading_code_composition = LEADING_CODE_COMPOSITION;
@@ -1694,6 +1701,10 @@ This applies only when multibyte characters are enabled, and it serves\n\
1694to convert a Latin-1 or similar 8-bit character code to the corresponding\n\ 1701to convert a Latin-1 or similar 8-bit character code to the corresponding\n\
1695Emacs character code."); 1702Emacs character code.");
1696 nonascii_insert_offset = 0; 1703 nonascii_insert_offset = 0;
1704
1705 DEFVAR_INT ("min-composite-char", &min_composite_char,
1706 "Minimum character code of a composite character.");
1707 min_composite_char = MIN_CHAR_COMPOSITION;
1697} 1708}
1698 1709
1699#endif /* emacs */ 1710#endif /* emacs */