hash-string.h 1.4 KB

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