aboutsummaryrefslogtreecommitdiffstats
path: root/intl/hash-string.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-07-27 15:12:00 +0000
committerWerner Koch <[email protected]>2004-07-27 15:12:00 +0000
commit5d4fb5734727e493fa8119f0d2d0f21ebc7452a7 (patch)
treea2f907826fed2c350c048db21fc0c8d8e2850fc2 /intl/hash-string.h
parent* keylist.c (list_keyblock_print): Always use the new listing format where (diff)
downloadgnupg-5d4fb5734727e493fa8119f0d2d0f21ebc7452a7.tar.gz
gnupg-5d4fb5734727e493fa8119f0d2d0f21ebc7452a7.zip
* configure.ac (AM_GNU_GETTEXT_VERSION): New.
(min_automake_version): New. * LINGUAS: Added all languages we supported in 1.2.5. Copied all po files from 1.2.5. * autogen.sh: Updated to the modern version, grepping the required tool versions from configure.ac.
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)
{