/*
* Copyright (C) 2000-2002 Uwe Ohse, uwe@ohse.de
* This is free software, licensed under the terms of the GNU Lesser
* General Public License Version 2.1, of which a copy is stored at:
* http://www.ohse.de/uwe/licenses/LGPL-2.1
* Later versions may or may not apply, see
* http://www.ohse.de/uwe/licenses/
* for information after a newer version has been published.
*/
#include "strhashi.h"
#include "strhash.h"
uint32
strhash_hash(const char *buf, unsigned int len)
{
uint32 h=0;
unsigned int o=0;
while (o<len)
h=131*h + buf[o++];
return h;
}
syntax highlighted by Code2HTML, v. 0.9.1