mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 13:30:06 +00:00
38 lines
1.4 KiB
C
38 lines
1.4 KiB
C
/* Implements a string hashing function.
|
|
Copyright (C) 1995-2014 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library; if not, see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
/* @@ end of prolog @@ */
|
|
|
|
#ifndef PARAMS
|
|
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
|
# define PARAMS(Args) Args
|
|
# else
|
|
# define PARAMS(Args) ()
|
|
# endif
|
|
#endif
|
|
|
|
/* We assume to have `unsigned long int' value with at least 32 bits. */
|
|
#define HASHWORDBITS 32
|
|
|
|
|
|
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
|
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
|
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
|
extern unsigned long int __hash_string PARAMS ((const char *__str_param))
|
|
attribute_hidden;
|