ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
st.h
Go to the documentation of this file.
1/*
2 * Revision Control Information
3 *
4 * /projects/hsis/CVS/utilities/st/st.h,v
5 * serdar
6 * 1.1
7 * 1993/07/29 01:00:21
8 *
9 */
10/* LINTLIBRARY */
11
12/* /projects/hsis/CVS/utilities/st/st.h,v 1.1 1993/07/29 01:00:21 serdar Exp */
13
14#ifndef ABC__misc__st__st_h
15#define ABC__misc__st__st_h
16#define st__INCLUDED
17
19
21
22
23/* These are potential duplicates. */
24#ifndef EXTERN
25# ifdef __cplusplus
26# ifdef ABC_NAMESPACE
27# define EXTERN extern
28# else
29# define EXTERN extern "C"
30# endif
31# else
32# define EXTERN extern
33# endif
34#endif
35
36#ifndef ARGS
37#define ARGS(protos) protos
38#endif
39
40
41typedef int (* st__compare_func_type)(const char*, const char*);
42typedef int (* st__hash_func_type)(const char*, int);
43
50
51typedef struct st__table st__table;
62
69
70#define st__is_member(table,key) st__lookup(table,key,(char **) 0)
71#define st__count(table) ((table)->num_entries)
72
74
75typedef enum st__retval (* st__PFSR)(char *, char *, char *);
76typedef int (* st__PFI)();
77
78extern st__table * st__init_table_with_params ( st__compare_func_type compare, st__hash_func_type hash, int size, int density, double grow_factor, int reorder_flag);
80extern void st__free_table ( st__table *);
81extern int st__lookup ( st__table *, const char *, char **);
82extern int st__lookup_int ( st__table *, char *, int *);
83extern int st__insert ( st__table *, const char *, char *);
84extern int st__add_direct ( st__table *, char *, char *);
85extern int st__find_or_add ( st__table *, char *, char ***);
86extern int st__find ( st__table *, char *, char ***);
87extern st__table * st__copy ( st__table *);
88extern int st__delete ( st__table *, const char **, char **);
89extern int st__delete_int ( st__table *, long *, char **);
90extern int st__foreach ( st__table *, st__PFSR, char *);
91extern int st__strhash (const char *, int);
92extern int st__numhash (const char *, int);
93extern int st__ptrhash (const char *, int);
94extern int st__numcmp (const char *, const char *);
95extern int st__ptrcmp (const char *, const char *);
97extern int st__gen ( st__generator *, const char **, char **);
98extern int st__gen_int ( st__generator *, const char **, long *);
99extern void st__free_gen ( st__generator *);
100
101
102#define st__DEFAULT_MAX_DENSITY 5
103#define st__DEFAULT_INIT_TABLE_SIZE 11
104#define st__DEFAULT_GROW_FACTOR 2.0
105#define st__DEFAULT_REORDER_FLAG 0
106
107#define st__foreach_item(table, gen, key, value) \
108 for(gen= st__init_gen(table); st__gen(gen,key,value) || ( st__free_gen(gen),0);)
109
110#define st__foreach_item_int(table, gen, key, value) \
111 for(gen= st__init_gen(table); st__gen_int(gen,key,value) || ( st__free_gen(gen),0);)
112
113#define st__OUT_OF_MEM -10000
114
115
116
118
119
120
121#endif /* st__INCLUDED */
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
int(* st__compare_func_type)(const char *, const char *)
Definition st.h:41
st__table * st__copy(st__table *)
Definition st.c:330
int st__foreach(st__table *, st__PFSR, char *)
int st__strhash(const char *, int)
Definition st.c:449
st__table * st__init_table_with_params(st__compare_func_type compare, st__hash_func_type hash, int size, int density, double grow_factor, int reorder_flag)
Definition st.c:41
int st__lookup(st__table *, const char *, char **)
Definition st.c:114
int st__ptrhash(const char *, int)
Definition st.c:467
int st__add_direct(st__table *, char *, char *)
Definition st.c:205
int st__find(st__table *, char *, char ***)
Definition st.c:264
int st__ptrcmp(const char *, const char *)
Definition st.c:479
int(* st__PFI)()
Definition st.h:76
st__generator * st__init_gen(st__table *)
Definition st.c:485
void st__free_table(st__table *)
Definition st.c:81
int(* st__hash_func_type)(const char *, int)
Definition st.h:42
int st__lookup_int(st__table *, char *, int *)
Definition st.c:134
int st__delete_int(st__table *, long *, char **)
Definition st.c:398
enum st__retval(* st__PFSR)(char *, char *, char *)
Definition st.h:75
st__retval
Definition st.h:73
@ st__DELETE
Definition st.h:73
@ st__CONTINUE
Definition st.h:73
@ st__STOP
Definition st.h:73
int st__numhash(const char *, int)
Definition st.c:461
int st__gen_int(st__generator *, const char **, long *)
Definition st.c:528
int st__insert(st__table *, const char *, char *)
Definition st.c:171
void st__free_gen(st__generator *)
Definition st.c:555
int st__gen(st__generator *, const char **, char **)
Definition st.c:501
int st__numcmp(const char *, const char *)
Definition st.c:473
int st__delete(st__table *, const char **, char **)
Definition st.c:375
st__table * st__init_table(st__compare_func_type, st__hash_func_type)
Definition st.c:72
int st__find_or_add(st__table *, char *, char ***)
Definition st.c:230
st__table_entry * entry
Definition st.h:66
st__table * table
Definition st.h:65
int index
Definition st.h:67
Definition st.h:45
char * key
Definition st.h:46
st__table_entry * next
Definition st.h:48
char * record
Definition st.h:47
Definition st.h:52
int reorder_flag
Definition st.h:58
int max_density
Definition st.h:57
int num_bins
Definition st.h:55
st__compare_func_type compare
Definition st.h:53
double grow_factor
Definition st.h:59
int num_entries
Definition st.h:56
st__table_entry ** bins
Definition st.h:60
st__hash_func_type hash
Definition st.h:54