diff options
| author | Kenichi Handa | 1999-12-15 00:11:56 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1999-12-15 00:11:56 +0000 |
| commit | 64a5094a4ac2a231f204e913d36314d4dca5dc7f (patch) | |
| tree | 72d4f08f8e65f4fb70ed13f3a7564a54abfe5959 /src | |
| parent | ce51c54c3fee569d6dd0857971cd42f47f0b718d (diff) | |
| download | emacs-64a5094a4ac2a231f204e913d36314d4dca5dc7f.tar.gz emacs-64a5094a4ac2a231f204e913d36314d4dca5dc7f.zip | |
(Flength): The length of char-table is MAX_CHAR.
(concat): Adjusted for the change of CHAR_STRING.
(Ffillarray): Adjusted for the change of CHAR_STRING.
(Fset_char_table_default): Delete codes for a composite character.
(hash_put): Return hash index.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 23 |
1 files changed, 10 insertions, 13 deletions
| @@ -139,9 +139,7 @@ To get the number of bytes, use `string-bytes'") | |||
| 139 | else if (VECTORP (sequence)) | 139 | else if (VECTORP (sequence)) |
| 140 | XSETFASTINT (val, XVECTOR (sequence)->size); | 140 | XSETFASTINT (val, XVECTOR (sequence)->size); |
| 141 | else if (CHAR_TABLE_P (sequence)) | 141 | else if (CHAR_TABLE_P (sequence)) |
| 142 | XSETFASTINT (val, (MIN_CHAR_COMPOSITION | 142 | XSETFASTINT (val, MAX_CHAR); |
| 143 | + (CHAR_FIELD2_MASK | CHAR_FIELD3_MASK) | ||
| 144 | - 1)); | ||
| 145 | else if (BOOL_VECTOR_P (sequence)) | 143 | else if (BOOL_VECTOR_P (sequence)) |
| 146 | XSETFASTINT (val, XBOOL_VECTOR (sequence)->size); | 144 | XSETFASTINT (val, XBOOL_VECTOR (sequence)->size); |
| 147 | else if (COMPILEDP (sequence)) | 145 | else if (COMPILEDP (sequence)) |
| @@ -823,14 +821,11 @@ concat (nargs, args, target_type, last_special) | |||
| 823 | we already decided to make a multibyte string. */ | 821 | we already decided to make a multibyte string. */ |
| 824 | { | 822 | { |
| 825 | int c = XINT (elt); | 823 | int c = XINT (elt); |
| 826 | unsigned char work[4], *str; | ||
| 827 | int i = CHAR_STRING (c, work, str); | ||
| 828 | |||
| 829 | /* P exists as a variable | 824 | /* P exists as a variable |
| 830 | to avoid a bug on the Masscomp C compiler. */ | 825 | to avoid a bug on the Masscomp C compiler. */ |
| 831 | unsigned char *p = & XSTRING (val)->data[toindex_byte]; | 826 | unsigned char *p = & XSTRING (val)->data[toindex_byte]; |
| 832 | bcopy (str, p, i); | 827 | |
| 833 | toindex_byte += i; | 828 | toindex_byte += CHAR_STRING (c, p); |
| 834 | toindex++; | 829 | toindex++; |
| 835 | } | 830 | } |
| 836 | } | 831 | } |
| @@ -1982,8 +1977,8 @@ ARRAY is a vector, string, char-table, or bool-vector.") | |||
| 1982 | size = XSTRING (array)->size; | 1977 | size = XSTRING (array)->size; |
| 1983 | if (STRING_MULTIBYTE (array)) | 1978 | if (STRING_MULTIBYTE (array)) |
| 1984 | { | 1979 | { |
| 1985 | unsigned char workbuf[4], *str; | 1980 | unsigned char str[MAX_MULTIBYTE_LENGTH]; |
| 1986 | int len = CHAR_STRING (charval, workbuf, str); | 1981 | int len = CHAR_STRING (charval, str); |
| 1987 | int size_byte = STRING_BYTES (XSTRING (array)); | 1982 | int size_byte = STRING_BYTES (XSTRING (array)); |
| 1988 | unsigned char *p1 = p, *endp = p + size_byte; | 1983 | unsigned char *p1 = p, *endp = p + size_byte; |
| 1989 | int i; | 1984 | int i; |
| @@ -2230,7 +2225,7 @@ See also the documentation of make-char.") | |||
| 2230 | 2225 | ||
| 2231 | /* Even if C is not a generic char, we had better behave as if a | 2226 | /* Even if C is not a generic char, we had better behave as if a |
| 2232 | generic char is specified. */ | 2227 | generic char is specified. */ |
| 2233 | if (charset == CHARSET_COMPOSITION || CHARSET_DIMENSION (charset) == 1) | 2228 | if (CHARSET_DIMENSION (charset) == 1) |
| 2234 | code1 = 0; | 2229 | code1 = 0; |
| 2235 | temp = XCHAR_TABLE (char_table)->contents[charset + 128]; | 2230 | temp = XCHAR_TABLE (char_table)->contents[charset + 128]; |
| 2236 | if (!code1) | 2231 | if (!code1) |
| @@ -3912,9 +3907,10 @@ hash_lookup (h, key, hash) | |||
| 3912 | 3907 | ||
| 3913 | 3908 | ||
| 3914 | /* Put an entry into hash table H that associates KEY with VALUE. | 3909 | /* Put an entry into hash table H that associates KEY with VALUE. |
| 3915 | HASH is a previously computed hash code of KEY. */ | 3910 | HASH is a previously computed hash code of KEY. |
| 3911 | Value is the index of the entry in H matching KEY. */ | ||
| 3916 | 3912 | ||
| 3917 | void | 3913 | int |
| 3918 | hash_put (h, key, value, hash) | 3914 | hash_put (h, key, value, hash) |
| 3919 | struct Lisp_Hash_Table *h; | 3915 | struct Lisp_Hash_Table *h; |
| 3920 | Lisp_Object key, value; | 3916 | Lisp_Object key, value; |
| @@ -3941,6 +3937,7 @@ hash_put (h, key, value, hash) | |||
| 3941 | start_of_bucket = hash % XVECTOR (h->index)->size; | 3937 | start_of_bucket = hash % XVECTOR (h->index)->size; |
| 3942 | HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket); | 3938 | HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket); |
| 3943 | HASH_INDEX (h, start_of_bucket) = make_number (i); | 3939 | HASH_INDEX (h, start_of_bucket) = make_number (i); |
| 3940 | return i; | ||
| 3944 | } | 3941 | } |
| 3945 | 3942 | ||
| 3946 | 3943 | ||