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