~ubuntu-branches/ubuntu/breezy/findutils/breezy

« back to all changes in this revision

Viewing changes to intl/hash-string.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2003-10-26 13:44:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20031026134421-nrjr43wpcpd03m91
Tags: 4.1.20-3
Don't ship /usr/share/info/dir.gz, change Makefile.in to use install-info
test from new automake. The bug only applied to the autobuilt versions,
because I don't have /usr/sbin in $PATH, thanks to Santiago Vila.
(Closes: #217627)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Implements a string hashing function.
2
 
   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
 
1
/* Description of GNU message catalog format: string hashing function.
 
2
   Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software; you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
11
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
12
   GNU General Public License for more details.
13
13
 
14
 
   You should have received a copy of the GNU Library General Public
15
 
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
16
 
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
 
   Boston, MA 02111-1307, USA.  */
 
14
   You should have received a copy of the GNU General Public License
 
15
   along with this program; if not, write to the Free Software Foundation,
 
16
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
18
17
 
19
18
/* @@ end of prolog @@ */
20
19
 
33
32
/* Defines the so called `hashpjw' function by P.J. Weinberger
34
33
   [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
35
34
   1986, 1987 Bell Telephone Laboratories, Inc.]  */
36
 
static unsigned long hash_string PARAMS ((const char *__str_param));
 
35
static unsigned long int hash_string PARAMS ((const char *__str_param));
37
36
 
38
 
static inline unsigned long
 
37
static inline unsigned long int
39
38
hash_string (str_param)
40
39
     const char *str_param;
41
40
{
47
46
  while (*str != '\0')
48
47
    {
49
48
      hval <<= 4;
50
 
      hval += (unsigned long) *str++;
51
 
      g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
 
49
      hval += (unsigned long int) *str++;
 
50
      g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
52
51
      if (g != 0)
53
52
        {
54
53
          hval ^= g >> (HASHWORDBITS - 8);