X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fhash.h;h=ee5be5bab15aa0e7e1abe5ce2961be7687a62457;hb=953f6acfa20ec275ec39a552dfac8124bd93ebdf;hp=8d9029515a7661b9294c2aef04b4049e37570787;hpb=378cc40b38293ffc7298c6a7ed3cd740ad79be52;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/hash.h b/x2p/hash.h index 8d90295..ee5be5b 100644 --- a/x2p/hash.h +++ b/x2p/hash.h @@ -1,15 +1,16 @@ -/* $Header: hash.h,v 2.0 88/06/05 00:15:52 root Exp $ +/* hash.h * - * $Log: hash.h,v $ - * Revision 2.0 88/06/05 00:15:52 root - * Baseline version 2.0. - * + * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2005 + * by Larry Wall and others + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. */ #define FILLPCT 60 /* don't make greater than 99 */ #ifdef DOINIT -char coeff[] = { +EXTERN_C char const coeff[] = { 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, @@ -19,7 +20,7 @@ char coeff[] = { 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1, 61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1}; #else -extern char coeff[]; +EXTERN_C const char coeff[]; #endif typedef struct hentry HENT; @@ -39,11 +40,8 @@ struct htbl { HENT *tbl_eiter; /* current entry of iterator */ }; -STR *hfetch(); -bool hstore(); -bool hdelete(); -HASH *hnew(); -int hiterinit(); -HENT *hiternext(); -char *hiterkey(); -STR *hiterval(); +STR * hfetch ( HASH *tb, char *key ); +int hiterinit ( HASH *tb ); +HASH * hnew ( void ); +void hsplit ( HASH *tb ); +bool hstore ( HASH *tb, char *key, STR *val );