lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /* Description of GNU message catalog format: string hashing function. |
| 2 | Copyright (C) 1995-2015 Free Software Foundation, Inc. |
| 3 | |
| 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as published by |
| 6 | the Free Software Foundation; either version 2.1 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU Lesser General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 16 | |
| 17 | /* @@ end of prolog @@ */ |
| 18 | |
| 19 | /* We assume to have `unsigned long int' value with at least 32 bits. */ |
| 20 | #define HASHWORDBITS 32 |
| 21 | |
| 22 | |
| 23 | #ifndef _LIBC |
| 24 | # ifdef IN_LIBINTL |
| 25 | # define __hash_string libintl_hash_string |
| 26 | # else |
| 27 | # define __hash_string hash_string |
| 28 | # endif |
| 29 | #endif |
| 30 | |
| 31 | /* Defines the so called `hashpjw' function by P.J. Weinberger |
| 32 | [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, |
| 33 | 1986, 1987 Bell Telephone Laboratories, Inc.] */ |
| 34 | extern unsigned long int __hash_string (const char *str_param); |