]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/hash.c
Implement IRC commands SERVICE, SERVLIST, and SQUERY as dummy functions
[ngircd-alex.git] / src / ngircd / hash.c
index 820c8f684adcd1ebf85969718b6c277d78850aa6..d9aa79bb1f1b93478a9f1dd7c0e135ac7ed62408 100644 (file)
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: hash.c,v 1.9 2002/12/26 16:25:43 alex Exp $";
+static char UNUSED id[] = "$Id: hash.c,v 1.13 2006/10/06 21:23:47 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
 #include <string.h>
 
 #include "defines.h"
-#include "log.h"
 #include "tool.h"
 
 #include "exp.h"
 #include "hash.h"
 
 
-LOCAL UINT32 jenkins_hash PARAMS(( register UINT8 *k, register UINT32 length, register UINT32 initval ));
+static UINT32 jenkins_hash PARAMS(( register UINT8 *k, register UINT32 length, register UINT32 initval ));
 
 
 GLOBAL UINT32
-Hash( CHAR *String )
+Hash( const char *String )
 {
        /* Hash-Wert ueber String berechnen */
 
-       CHAR buffer[LINE_LEN];
+       char buffer[LINE_LEN];
 
        strlcpy( buffer, String, sizeof( buffer ));
        return jenkins_hash( (UINT8 *)ngt_LowerStr( buffer ), strlen( buffer ), 42 );
@@ -73,7 +72,7 @@ Hash( CHAR *String )
 } /* mix */
 
 
-LOCAL UINT32
+static UINT32
 jenkins_hash( register UINT8 *k, register UINT32 length, register UINT32 initval )
 {
        /* k: the key
@@ -100,7 +99,7 @@ jenkins_hash( register UINT8 *k, register UINT32 length, register UINT32 initval
 
        /* handle the last 11 bytes */
        c += length;
-       switch( (INT)len )      /* all the case statements fall through */
+       switch( (int)len )      /* all the case statements fall through */
        {
                case 11: c+=((UINT32)k[10]<<24);
                case 10: c+=((UINT32)k[9]<<16);