hash-string.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* Description of GNU message catalog format: string hashing function.
  2. Copyright (C) 1995-2019 Free Software Foundation, Inc.
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 2.1 of the License, or
  6. (at your option) 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
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. /* @@ end of prolog @@ */
  14. /* We assume to have `unsigned long int' value with at least 32 bits. */
  15. #define HASHWORDBITS 32
  16. #ifndef _LIBC
  17. # ifdef IN_LIBINTL
  18. # define __hash_string libintl_hash_string
  19. # else
  20. # define __hash_string hash_string
  21. # endif
  22. #endif
  23. /* Defines the so called `hashpjw' function by P.J. Weinberger
  24. [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
  25. 1986, 1987 Bell Telephone Laboratories, Inc.] */
  26. extern unsigned long int __hash_string (const char *str_param)
  27. attribute_hidden;