initial commit
[jalview.git] / forester / archive / RIO / others / hmmer / squid / gki.h
1 /*****************************************************************
2  * HMMER - Biological sequence analysis with profile HMMs
3  * Copyright (C) 1992-1999 Washington University School of Medicine
4  * All Rights Reserved
5  * 
6  *     This source code is distributed under the terms of the
7  *     GNU General Public License. See the files COPYING and LICENSE
8  *     for details.
9  *****************************************************************/
10
11 #ifndef SQUID_GKI_INCLUDED
12 #define SQUID_GKI_INCLUDED
13
14 /* gki.h
15  * SRE, Sat May  1 15:07:22 1999
16  * 
17  * Declarations of structures, functions for generic key index
18  * module: emulation of Perl hashes. See gki.c.
19  * 
20  * RCS $Id: gki.h,v 1.1.1.1 2005/03/22 08:34:18 cmzmasek Exp $
21  */
22
23 /* gki_elem:
24  *    key, array index pairs are kept in linked list structures.
25  */
26 struct gki_elem {
27   char            *key;
28   int              idx;
29   struct gki_elem *nxt;
30 };
31
32 /* gki:
33  *    a dynamically resized hash structure; 
34  *    contains a hash table and associated data
35  */
36 typedef struct {
37   struct gki_elem **table;
38   
39   int primelevel;
40   int nhash;
41   int nkeys;
42 } GKI;
43
44 GKI *GKIInit(void);
45 void GKIFree(GKI *hash);
46 int  GKIHashValue(GKI *hash, char *key);
47 int  GKIStoreKey(GKI *hash, char *key);
48 int  GKIKeyIndex(GKI *hash, char *key);
49 void GKIStatus(GKI *hash);
50
51 #endif /* SQUID_GKI_INCLUDED */