X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fhash.h;h=9f9c6d5ff99e27816b9b186c35613cf380c03b35;hb=57c348a981665d6305f7f38920ab85e57a77ae65;hp=14d2069362d5b15bd832f69786f5125e852329c5;hpb=fe14fcc35f78a371a174a1d14256c2f35ae4262b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/hash.h b/x2p/hash.h index 14d2069..9f9c6d5 100644 --- a/x2p/hash.h +++ b/x2p/hash.h @@ -1,20 +1,16 @@ -/* $Header: hash.h,v 4.0 91/03/20 01:57:53 lwall Locked $ +/* hash.h * - * Copyright (c) 1989, Larry Wall + * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2005 + * by Larry Wall and others * - * You may distribute under the terms of the GNU General Public License - * as specified in the README file that comes with the perl 3.0 kit. - * - * $Log: hash.h,v $ - * Revision 4.0 91/03/20 01:57:53 lwall - * 4.0 baseline. - * + * 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[] = { +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, @@ -24,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 const char coeff[]; #endif typedef struct hentry HENT; @@ -44,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 );