[BACK]Return to strhash.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libintl

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libintl/strhash.c between version 1.2 and 1.3

version 1.2, 2005/04/27 09:50:26 version 1.3, 2007/09/25 08:19:09
Line 40  __RCSID("$NetBSD$");
Line 40  __RCSID("$NetBSD$");
  * string hash function by P.J.Weinberger.   * string hash function by P.J.Weinberger.
  * this implementation is derived from src/lib/libc/citrus/citrus_db_hash.c.   * this implementation is derived from src/lib/libc/citrus/citrus_db_hash.c.
  */   */
 u_int32_t  uint32_t
 /*ARGSUSED*/  /*ARGSUSED*/
 __intl_string_hash(const char *str)  __intl_string_hash(const char *str)
 {  {
         const u_int8_t *p;          const uint8_t *p;
         u_int32_t hash = 0, tmp;          uint32_t hash = 0, tmp;
   
         for (p = (const u_int8_t *)str; *p; p++) {          for (p = (const uint8_t *)str; *p; p++) {
                 hash <<= 4;                  hash <<= 4;
                 hash += *p;                  hash += *p;
                 tmp = hash & 0xF0000000;                  tmp = hash & 0xF0000000;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

CVSweb <webmaster@jp.NetBSD.org>