26 #define HASH_SIZE 103123
27 #define TRF_HASH_SIZE 103123
41 tab[0]->
key = (
char *)strdup(
"len_of_hash_table_(c) oliver_strunk 1.3.93");
46 unsigned int i, len, x;
49 for (i=0; i<len; i++) {
57 if (table && table[0]) {
58 long size = table[0]->
data;
62 for (hn = hhn = table[i]; hn; hn = hn->
next) {
63 if (strcmp(key, hn->
key)) {
80 long end = table[0]->
data;
81 for (
long i=0; i<end; i++) {
83 for (hn = table[i]; hn; hn=hnn) {
94 long size = table[0]->
data;
99 for (hn=table[i]; hn; hn=hn->
next) {
101 if (strcmp(key, hn->
key) == 0) {
107 hn->
key = (
char *)strdup(key);
118 if (table && table[0]) {
119 long size = table[0]->
data;
122 if (strcmp(key, hn->key) == 0)
return hn->data;
134 return "Object is (NULp)";
136 if (object->mh.parent) {
138 return "Object already linked";
142 return "Parent is (NULp)";
144 if (father->key != object->mh.key) {
146 return "Parent key doesn't match Object key";
148 if (object->mh.ident) {
149 if (strlen(object->mh.ident) <= 0) {
151 return "Too short ident";
156 return "Object already in list";
167 object->next =
object->previous =
NULp;
168 if (!father->first) {
170 father->first = object;
171 father->last = object;
175 object->previous = father->last;
176 father->last->next = object;
177 father->last = object;
179 object->mh.parent =
father;
186 dllpublic_ext *
father = (dllpublic_ext *)object->mh.parent;
190 return "Object not linked";
195 if (father->cnt <= 0) {
197 return "Parent count is 0";
199 if (object->previous) {
200 if (object->previous->next !=
object) {
202 return "Fatal Error: Object is a copy, not original";
204 object->previous->next =
object->next;
207 father->first =
object->next;
210 object->next->previous =
object->previous;
213 father->last =
object->previous;
215 object->mh.parent =
NULp;
216 object->previous =
NULp;
230 if (!parent->hash)
return 0;
231 if (!ident)
return 0;
261 for (ts = trf_sp[i]; ts; ts = ts->
next) {
262 if (ts->
old == old) {
268 for (tds = ts->
dests; tds; tds = ntds) {
269 *tds->
dest = new_item;
278 ts->
next = trf_sp[i];
291 for (ts = trf_sp[i]; ts; ts = ts->
next) {
292 if (ts->
old == old) { fts = ts;
break; }
296 ts->
next = trf_sp[i];
321 for (ts = trf_sp[i]; ts; ts = nts) {
328 for (tds = ts->
dests; tds; tds = ntds) {
const char * aisc_unlink(dllheader_ext *object)
long aisc_find_lib(dllpublic_ext *parent, char *ident)
static aisc_hash_node ** aisc_init_hash(int size)
static GB_ERROR tab(GBL_command_arguments *args, bool pretab)
static int trf_hash(long p)
static int aisc_hash(const char *key, int size)
void trf_create(long old, long new_item)
void trf_commit(int errors)
void trf_link(long old, long *dest)
struct trf_dest_struct * dests
static void aisc_insert_hash(aisc_hash_node **table, char *key, long data)
struct trf_dest_struct * next
void GBK_terminate(const char *error) __ATTR__NORETURN
static void aisc_free_key(aisc_hash_node **table, char *key)
GB_write_int const char GB_write_autoconv_string WRITE_SKELETON(write_pointer, GBDATA *,"%p", GB_write_pointer) char *AW_awa if)(!gb_var) return strdup("")
long aisc_read_hash(aisc_hash_node **table, const char *key)
static struct trf_struct ** trf_sp
const char * aisc_link(dllpublic_ext *father, dllheader_ext *object)
static void aisc_free_hash(aisc_hash_node **table)