/usr/include/cudd/st.h is in libpolybori-dev 0.5~rc1-2.1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | /**CHeaderFile*****************************************************************
FileName [st.h]
PackageName [st]
Synopsis [Symbol table package.]
Description [The st library provides functions to create, maintain,
and query symbol tables.]
SeeAlso []
Author []
Copyright []
Revision [$Id: st.h,v 1.4 2008/07/08 21:41:15 alexanderdreyer Exp $]
******************************************************************************/
#ifndef ST_INCLUDED
#define ST_INCLUDED
/*---------------------------------------------------------------------------*/
/* Nested includes */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/*---------------------------------------------------------------------------*/
/* Constant declarations */
/*---------------------------------------------------------------------------*/
#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_OUT_OF_MEM -10000
/*---------------------------------------------------------------------------*/
/* Stucture declarations */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Type declarations */
/*---------------------------------------------------------------------------*/
typedef struct st_table_entry st_table_entry;
struct st_table_entry {
char *key;
char *record;
st_table_entry *next;
};
typedef struct st_table st_table;
struct st_table {
int (*compare)(const char *, const char *);
int (*hash)(char *, int);
int num_bins;
int num_entries;
int max_density;
int reorder_flag;
double grow_factor;
st_table_entry **bins;
};
typedef struct st_generator st_generator;
struct st_generator {
st_table *table;
st_table_entry *entry;
int index;
};
enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE};
typedef enum st_retval (*ST_PFSR)(char *, char *, char *);
typedef int (*ST_PFICPCP)(const char *, const char *); /* type for comparison function */
typedef int (*ST_PFICPI)(char *, int); /* type for hash function */
/*---------------------------------------------------------------------------*/
/* Variable declarations */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Macro declarations */
/*---------------------------------------------------------------------------*/
/**Macro***********************************************************************
Synopsis [Checks whethere `key' is in `table'.]
Description [Returns 1 if there is an entry under `key' in `table', 0
otherwise.]
SideEffects [None]
SeeAlso [st_lookup]
******************************************************************************/
#define st_is_member(table,key) st_lookup(table,key,(char **) 0)
/**Macro***********************************************************************
Synopsis [Returns the number of entries in the table `table'.]
Description [Returns the number of entries in the table `table'.]
SideEffects [None]
SeeAlso []
******************************************************************************/
#define st_count(table) ((table)->num_entries)
/**Macro***********************************************************************
Synopsis [Iteration macro.]
Description [An iteration macro which loops over all the entries in
`table', setting `key' to point to the key and `value' to the
associated value (if it is not nil). `gen' is a generator variable
used internally. Sample usage:
<pre>
char *key, *value;
</pre>
<pre>
st_generator *gen;
</pre>
<pre>
st_foreach_item(table, gen, &key, &value) {
</pre>
<pre>
process_item(value);
</pre>
<pre>
}
</pre>
]
SideEffects [None]
SeeAlso [st_foreach_item_int st_foreach]
******************************************************************************/
#define st_foreach_item(table, gen, key, value) \
for(gen=st_init_gen(table); st_gen(gen,key,value) || (st_free_gen(gen),0);)
/**Macro***********************************************************************
Synopsis [Iteration macro.]
Description [An iteration macro which loops over all the entries in
`table', setting `key' to point to the key and `value' to the
associated value (if it is not nil). `value' is assumed to be a
pointer to an integer. `gen' is a generator variable used
internally. Sample usage:
<pre>
char *key;
</pre>
<pre>
int value;
</pre>
<pre>
st_generator *gen;
</pre>
<pre>
st_foreach_item_int(table, gen, &key, &value) {
</pre>
<pre>
process_item(value);
</pre>
<pre>
}
</pre>
]
SideEffects [None]
SeeAlso [st_foreach_item st_foreach]
******************************************************************************/
#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);)
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
/* Function prototypes */
/*---------------------------------------------------------------------------*/
extern st_table *st_init_table_with_params (ST_PFICPCP, ST_PFICPI, int, int, double, int);
extern st_table *st_init_table (ST_PFICPCP, ST_PFICPI);
extern void st_free_table (st_table *);
extern int st_lookup (st_table *, void *, void *);
extern int st_lookup_int (st_table *, void *, int *);
extern int st_insert (st_table *, void *, void *);
extern int st_add_direct (st_table *, void *, void *);
extern int st_find_or_add (st_table *, void *, void *);
extern int st_find (st_table *, void *, void *);
extern st_table *st_copy (st_table *);
extern int st_delete (st_table *, void *, void *);
extern int st_delete_int (st_table *, void *, int *);
extern int st_foreach (st_table *, ST_PFSR, char *);
extern int st_strhash (char *, int);
extern int st_numhash (char *, int);
extern int st_ptrhash (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 *, void *, void *);
extern int st_gen_int (st_generator *, void *, int *);
extern void st_free_gen (st_generator *);
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
} /* end of extern "C" */
#endif
#endif /* ST_INCLUDED */
|