Mercurial > emacs
comparison src/fns.c @ 25709:ba4e2a641663
(SXHASH_COMBINE): Add missing parentheses.
(Fchar_table_range, Fset_char_table_default, mapcar1,
Fyes_or_no_p, sweep_weak_hash_tables): Remove unused variable(s).
| author | Gerd Moellmann <gerd@gnu.org> |
|---|---|
| date | Tue, 14 Sep 1999 13:09:25 +0000 |
| parents | 0e71134aaba2 |
| children | b7aa6ac26872 |
comparison
equal
deleted
inserted
replaced
| 25708:a6aabf050a60 | 25709:ba4e2a641663 |
|---|---|
| 1991 a vector which identifies a character set or a row of a character set,\n\ | 1991 a vector which identifies a character set or a row of a character set,\n\ |
| 1992 a character set name, or a character code.") | 1992 a character set name, or a character code.") |
| 1993 (char_table, range) | 1993 (char_table, range) |
| 1994 Lisp_Object char_table, range; | 1994 Lisp_Object char_table, range; |
| 1995 { | 1995 { |
| 1996 int i; | |
| 1997 | |
| 1998 CHECK_CHAR_TABLE (char_table, 0); | 1996 CHECK_CHAR_TABLE (char_table, 0); |
| 1999 | 1997 |
| 2000 if (EQ (range, Qnil)) | 1998 if (EQ (range, Qnil)) |
| 2001 return XCHAR_TABLE (char_table)->defalt; | 1999 return XCHAR_TABLE (char_table)->defalt; |
| 2002 else if (INTEGERP (range)) | 2000 else if (INTEGERP (range)) |
| 2091 The generic character specifies the group of characters.\n\ | 2089 The generic character specifies the group of characters.\n\ |
| 2092 See also the documentation of make-char.") | 2090 See also the documentation of make-char.") |
| 2093 (char_table, ch, value) | 2091 (char_table, ch, value) |
| 2094 Lisp_Object char_table, ch, value; | 2092 Lisp_Object char_table, ch, value; |
| 2095 { | 2093 { |
| 2096 int c, i, charset, code1, code2; | 2094 int c, charset, code1, code2; |
| 2097 Lisp_Object temp; | 2095 Lisp_Object temp; |
| 2098 | 2096 |
| 2099 CHECK_CHAR_TABLE (char_table, 0); | 2097 CHECK_CHAR_TABLE (char_table, 0); |
| 2100 CHECK_NUMBER (ch, 1); | 2098 CHECK_NUMBER (ch, 1); |
| 2101 | 2099 |
| 2354 } | 2352 } |
| 2355 } | 2353 } |
| 2356 else if (STRINGP (seq)) | 2354 else if (STRINGP (seq)) |
| 2357 { | 2355 { |
| 2358 /* Multi-byte string. */ | 2356 /* Multi-byte string. */ |
| 2359 int len_byte = STRING_BYTES (XSTRING (seq)); | |
| 2360 int i_byte; | 2357 int i_byte; |
| 2361 | 2358 |
| 2362 for (i = 0, i_byte = 0; i < leni;) | 2359 for (i = 0, i_byte = 0; i < leni;) |
| 2363 { | 2360 { |
| 2364 int c; | 2361 int c; |
| 2587 Lisp_Object prompt; | 2584 Lisp_Object prompt; |
| 2588 { | 2585 { |
| 2589 register Lisp_Object ans; | 2586 register Lisp_Object ans; |
| 2590 Lisp_Object args[2]; | 2587 Lisp_Object args[2]; |
| 2591 struct gcpro gcpro1; | 2588 struct gcpro gcpro1; |
| 2592 Lisp_Object menu; | |
| 2593 | 2589 |
| 2594 CHECK_STRING (prompt, 0); | 2590 CHECK_STRING (prompt, 0); |
| 2595 | 2591 |
| 2596 #ifdef HAVE_MENUS | 2592 #ifdef HAVE_MENUS |
| 2597 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) | 2593 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) |
| 3932 int bucket, n; | 3928 int bucket, n; |
| 3933 | 3929 |
| 3934 n = XVECTOR (h->index)->size & ~ARRAY_MARK_FLAG; | 3930 n = XVECTOR (h->index)->size & ~ARRAY_MARK_FLAG; |
| 3935 for (bucket = 0; bucket < n; ++bucket) | 3931 for (bucket = 0; bucket < n; ++bucket) |
| 3936 { | 3932 { |
| 3937 Lisp_Object idx, key, value, prev, next; | 3933 Lisp_Object idx, prev; |
| 3938 | 3934 |
| 3939 /* Follow collision chain, removing entries that | 3935 /* Follow collision chain, removing entries that |
| 3940 don't survive this garbage collection. */ | 3936 don't survive this garbage collection. */ |
| 3941 idx = HASH_INDEX (h, bucket); | 3937 idx = HASH_INDEX (h, bucket); |
| 3942 prev = Qnil; | 3938 prev = Qnil; |
| 4015 #define SXHASH_MAX_LEN 7 | 4011 #define SXHASH_MAX_LEN 7 |
| 4016 | 4012 |
| 4017 /* Combine two integers X and Y for hashing. */ | 4013 /* Combine two integers X and Y for hashing. */ |
| 4018 | 4014 |
| 4019 #define SXHASH_COMBINE(X, Y) \ | 4015 #define SXHASH_COMBINE(X, Y) \ |
| 4020 ((((unsigned)(X) << 4) + ((unsigned)(X) >> 24) & 0x0fffffff) \ | 4016 ((((unsigned)(X) << 4) + (((unsigned)(X) >> 24) & 0x0fffffff)) \ |
| 4021 + (unsigned)(Y)) | 4017 + (unsigned)(Y)) |
| 4022 | 4018 |
| 4023 | 4019 |
| 4024 /* Return a hash for string PTR which has length LEN. */ | 4020 /* Return a hash for string PTR which has length LEN. */ |
| 4025 | 4021 |
