X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=intl%2Fhash-string.h;h=093e3b1c1036c2972d51a323a8c358aaecc0a840;hb=3b93cd91237a112453f367e56b724517ca0a8e04;hp=ccb7acca65895a915d775d682edaa1dc8aaaedb7;hpb=adc0c1371870ca34cf1f692e3a261fc8829a8eae;p=lyx.git diff --git a/intl/hash-string.h b/intl/hash-string.h index ccb7acca65..093e3b1c10 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__ -# 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) {