X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fhash-pjw.h;h=5847a25280cf58d7f3569079a2e16c816f93e01d;hb=0451b1d84d734d0cbdd64a506ded848a842a5dc6;hp=efcda115aebbd99d96a1f279338b08fd175fe2f5;hpb=7aabcfc8f8c6964a2ca12c6c6765eb48fe24575c;p=gnulib.git diff --git a/lib/hash-pjw.h b/lib/hash-pjw.h index efcda115a..5847a2528 100644 --- a/lib/hash-pjw.h +++ b/lib/hash-pjw.h @@ -1,5 +1,5 @@ /* hash-pjw.h -- declaration for a simple hash function - Copyright 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,5 +16,10 @@ If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -unsigned int -hash_pjw (const void *x, unsigned int tablesize); +#include + +/* Compute a hash code for a NUL-terminated string starting at X, + and return the hash code modulo TABLESIZE. + The result is platform dependent: it depends on the size of the 'size_t' + type and on the signedness of the 'char' type. */ +extern size_t hash_pjw (void const *x, size_t tablesize);