summaryrefslogtreecommitdiffstats
path: root/src/misc/st/st.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-09-29 17:11:03 -0400
committerAlan Mishchenko <alanmi@berkeley.edu>2012-09-29 17:11:03 -0400
commit71bdfae94122fff6f245c47721d284f78c286164 (patch)
treec63b5c3eb3fc06d565f32a31d2f82ba273bdafaf /src/misc/st/st.h
parent5cf9d6ddd7fb5a22731f4d61cc984abc48e3f930 (diff)
downloadabc-71bdfae94122fff6f245c47721d284f78c286164.tar.gz
abc-71bdfae94122fff6f245c47721d284f78c286164.tar.bz2
abc-71bdfae94122fff6f245c47721d284f78c286164.zip
Replacing 'st_table' by 'st__table' to resolve linker problems.
Diffstat (limited to 'src/misc/st/st.h')
-rw-r--r--src/misc/st/st.h104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/misc/st/st.h b/src/misc/st/st.h
index 2cdebcec..07c6ef3b 100644
--- a/src/misc/st/st.h
+++ b/src/misc/st/st.h
@@ -13,7 +13,7 @@
#ifndef ABC__misc__st__st_h
#define ABC__misc__st__st_h
-#define ST_INCLUDED
+#define st__INCLUDED
#include "misc/util/abc_global.h"
@@ -38,79 +38,79 @@ ABC_NAMESPACE_HEADER_START
#endif
-typedef int (*st_compare_func_type)(const char*, const char*);
-typedef int (*st_hash_func_type)(const char*, int);
+typedef int (* st__compare_func_type)(const char*, const char*);
+typedef int (* st__hash_func_type)(const char*, int);
-typedef struct st_table_entry st_table_entry;
-struct st_table_entry {
+typedef struct st__table_entry st__table_entry;
+struct st__table_entry {
char *key;
char *record;
- st_table_entry *next;
+ st__table_entry *next;
};
-typedef struct st_table st_table;
-struct st_table {
- st_compare_func_type compare;
- st_hash_func_type hash;
+typedef struct st__table st__table;
+struct st__table {
+ st__compare_func_type compare;
+ st__hash_func_type hash;
int num_bins;
int num_entries;
int max_density;
int reorder_flag;
double grow_factor;
- st_table_entry **bins;
+ st__table_entry **bins;
};
-typedef struct st_generator st_generator;
-struct st_generator {
- st_table *table;
- st_table_entry *entry;
+typedef struct st__generator st__generator;
+struct st__generator {
+ st__table *table;
+ st__table_entry *entry;
int index;
};
-#define st_is_member(table,key) st_lookup(table,key,(char **) 0)
-#define st_count(table) ((table)->num_entries)
+#define st__is_member(table,key) st__lookup(table,key,(char **) 0)
+#define st__count(table) ((table)->num_entries)
-enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE};
+enum st__retval { st__CONTINUE, st__STOP, st__DELETE};
-typedef enum st_retval (*ST_PFSR)(char *, char *, char *);
-typedef int (*ST_PFI)();
+typedef enum st__retval (* st__PFSR)(char *, char *, char *);
+typedef int (* st__PFI)();
-extern 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);
-extern st_table *st_init_table (st_compare_func_type, st_hash_func_type);
-extern void st_free_table (st_table *);
-extern int st_lookup (st_table *, const char *, char **);
-extern int st_lookup_int (st_table *, char *, int *);
-extern int st_insert (st_table *, const char *, char *);
-extern int st_add_direct (st_table *, char *, char *);
-extern int st_find_or_add (st_table *, char *, char ***);
-extern int st_find (st_table *, char *, char ***);
-extern st_table *st_copy (st_table *);
-extern int st_delete (st_table *, const char **, char **);
-extern int st_delete_int (st_table *, long *, char **);
-extern int st_foreach (st_table *, ST_PFSR, char *);
-extern int st_strhash (const char *, int);
-extern int st_numhash (const char *, int);
-extern int st_ptrhash (const char *, int);
-extern int st_numcmp (const char *, const char *);
-extern int st_ptrcmp (const char *, const char *);
-extern st_generator *st_init_gen (st_table *);
-extern int st_gen (st_generator *, const char **, char **);
-extern int st_gen_int (st_generator *, const char **, long *);
-extern void st_free_gen (st_generator *);
+extern 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);
+extern st__table * st__init_table ( st__compare_func_type, st__hash_func_type);
+extern void st__free_table ( st__table *);
+extern int st__lookup ( st__table *, const char *, char **);
+extern int st__lookup_int ( st__table *, char *, int *);
+extern int st__insert ( st__table *, const char *, char *);
+extern int st__add_direct ( st__table *, char *, char *);
+extern int st__find_or_add ( st__table *, char *, char ***);
+extern int st__find ( st__table *, char *, char ***);
+extern st__table * st__copy ( st__table *);
+extern int st__delete ( st__table *, const char **, char **);
+extern int st__delete_int ( st__table *, long *, char **);
+extern int st__foreach ( st__table *, st__PFSR, char *);
+extern int st__strhash (const char *, int);
+extern int st__numhash (const char *, int);
+extern int st__ptrhash (const char *, int);
+extern int st__numcmp (const char *, const char *);
+extern int st__ptrcmp (const char *, const char *);
+extern st__generator * st__init_gen ( st__table *);
+extern int st__gen ( st__generator *, const char **, char **);
+extern int st__gen_int ( st__generator *, const char **, long *);
+extern void st__free_gen ( st__generator *);
-#define ST_DEFAULT_MAX_DENSITY 5
-#define ST_DEFAULT_INIT_TABLE_SIZE 11
-#define ST_DEFAULT_GROW_FACTOR 2.0
-#define ST_DEFAULT_REORDER_FLAG 0
+#define st__DEFAULT_MAX_DENSITY 5
+#define st__DEFAULT_INIT_TABLE_SIZE 11
+#define st__DEFAULT_GROW_FACTOR 2.0
+#define st__DEFAULT_REORDER_FLAG 0
-#define st_foreach_item(table, gen, key, value) \
- for(gen=st_init_gen(table); st_gen(gen,key,value) || (st_free_gen(gen),0);)
+#define st__foreach_item(table, gen, key, value) \
+ for(gen= st__init_gen(table); st__gen(gen,key,value) || ( st__free_gen(gen),0);)
-#define st_foreach_item_int(table, gen, key, value) \
- for(gen=st_init_gen(table); st_gen_int(gen,key,value) || (st_free_gen(gen),0);)
+#define st__foreach_item_int(table, gen, key, value) \
+ for(gen= st__init_gen(table); st__gen_int(gen,key,value) || ( st__free_gen(gen),0);)
-#define ST_OUT_OF_MEM -10000
+#define st__OUT_OF_MEM -10000
@@ -118,4 +118,4 @@ ABC_NAMESPACE_HEADER_END
-#endif /* ST_INCLUDED */
+#endif /* st__INCLUDED */