cee6618792c15a9a45c1d12da3032a8e5b16cde6
[idzebra-moved-to-github.git] / include / set.h
1 /*
2  * Copyright (C) 1994-1997, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: set.h,v $
7  * Revision 1.2  1997-09-05 15:30:05  adam
8  * Changed prototype for chr_map_input - added const.
9  * Added support for C++, headers uses extern "C" for public definitions.
10  *
11  * Revision 1.1  1994/09/26 10:17:44  adam
12  * Dfa-module header files.
13  *
14  */
15 #ifndef SET_H
16 #define SET_H
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 typedef struct SetElement_  {
23     struct SetElement_ *next;
24     int value;
25 } SetElement, *Set;
26
27 typedef struct {
28     Set  alloclist;
29     Set  freelist;
30     long used;
31     int  chunk;
32 } *SetType;
33
34 SetType  mk_SetType   (int chunk);
35 int      inf_SetType  (SetType st, long *used, long *allocated);
36 SetType  rm_SetType   (SetType st);
37 Set      mk_Set       (SetType st);
38 Set      add_Set      (SetType st, Set s, int value);
39 Set      merge_Set    (SetType st, Set s1, Set s2);
40 Set      union_Set    (SetType st, Set s1, Set s2);
41 Set      rm_Set       (SetType st, Set s);
42 Set      cp_Set       (SetType st, Set s);
43 void     pr_Set       (SetType st, Set s);
44 unsigned hash_Set     (SetType st, Set s);
45 int      eq_Set       (SetType s, Set s1, Set s2);
46
47 #ifdef __cplusplus
48 }
49 #endif
50
51 #endif
52