summaryrefslogtreecommitdiffstats
path: root/intl/hash-string.h
diff options
context:
space:
mode:
Diffstat (limited to 'intl/hash-string.h')
-rw-r--r--intl/hash-string.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/intl/hash-string.h b/intl/hash-string.h
index b267a8778..093e3b1c1 100644
--- a/intl/hash-string.h
+++ b/intl/hash-string.h
@@ -1,5 +1,5 @@
/* Description of GNU message catalog format: string hashing function.
- Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
@@ -18,14 +18,6 @@
/* @@ 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
@@ -33,11 +25,8 @@
/* 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.] */
-static unsigned long int hash_string PARAMS ((const char *__str_param));
-
static inline unsigned long int
-hash_string (str_param)
- const char *str_param;
+hash_string (const char *str_param)
{
unsigned long int hval, g;
const char *str = str_param;
@@ -47,7 +36,7 @@ hash_string (str_param)
while (*str != '\0')
{
hval <<= 4;
- hval += (unsigned long int) *str++;
+ hval += (unsigned char) *str++;
g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
if (g != 0)
{