Index: trunk/src/conf.c =================================================================== --- trunk/src/conf.c (revision 2435) +++ trunk/src/conf.c (revision 2436) @@ -874,17 +874,12 @@ conf_update(NULL); } -static int keyeq(char *a, char *b) -{ - return !strcmp(a, b); -} - void conf_reg_field_(void *value, int array_size, conf_native_type_t type, const char *path, const char *desc, conf_flag_t flags) { conf_native_t *node; if (conf_fields == NULL) { - conf_fields = htsp_alloc(strhash, keyeq); + conf_fields = htsp_alloc(strhash, strkeyeq); assert(conf_fields != NULL); } assert(array_size >= 1); Index: trunk/src/conf_hid.c =================================================================== --- trunk/src/conf_hid.c (revision 2435) +++ trunk/src/conf_hid.c (revision 2436) @@ -31,15 +31,10 @@ static int conf_hid_id_next = 0; static htpp_t *conf_hid_ids = NULL; -static int keyeq(void *a, void *b) { - return a == b; -} - - static void conf_hid_init(void) { if (conf_hid_ids == NULL) - conf_hid_ids = htpp_alloc(ptrhash, keyeq); + conf_hid_ids = htpp_alloc(ptrhash, ptrkeyeq); } void conf_hid_uninit(void) Index: trunk/src/hid_actions.c =================================================================== --- trunk/src/hid_actions.c (revision 2435) +++ trunk/src/hid_actions.c (revision 2436) @@ -32,17 +32,6 @@ static htsp_t *all_actions = NULL; const HID_Action *current_action = NULL; -static int keyeq(char *a, char *b) -{ - return !strcmp(a, b); -} - -static unsigned int keyhash(char *key) -{ - return strhash(key); -} - - static const char *check_action_name(const char *s) { while (*s) @@ -62,7 +51,7 @@ hid_cookie_action_t *ca; if (all_actions == NULL) - all_actions = htsp_alloc(keyhash, keyeq); + all_actions = htsp_alloc(strhash, strkeyeq); for (i = 0; i < n; i++) { if (check_action_name(a[i].name)) { Index: trunk/src/hid_cfg_input.c =================================================================== --- trunk/src/hid_cfg_input.c (revision 2435) +++ trunk/src/hid_cfg_input.c (revision 2436) @@ -92,8 +92,6 @@ } } - -static int keyeq_int(htip_key_t a, htip_key_t b) { return a == b; } static unsigned int keyhash_int(htip_key_t a) { return murmurhash32(a & 0xFFFF); } /************************** MOUSE ***************************/ @@ -115,7 +113,7 @@ } if (mouse->mouse_mask == NULL) - mouse->mouse_mask = htip_alloc(keyhash_int, keyeq_int); + mouse->mouse_mask = htip_alloc(keyhash_int, htip_keyeq); else htip_clear(mouse->mouse_mask); @@ -170,7 +168,7 @@ /************************** KEYBOARD ***************************/ int hid_cfg_keys_init(hid_cfg_keys_t *km) { - htip_init(&km->keys, keyhash_int, keyeq_int); + htip_init(&km->keys, keyhash_int, htip_keyeq); return 0; } @@ -207,7 +205,7 @@ /* new node on this level */ ns = calloc(sizeof(hid_cfg_keyseq_t), 1); if (!terminal) - htip_init(&ns->seq_next, keyhash_int, keyeq_int); + htip_init(&ns->seq_next, keyhash_int, htip_keyeq); htip_set(phash, addr.hash, ns); return ns; } Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 2435) +++ trunk/src/plug_footprint.c (revision 2436) @@ -67,11 +67,6 @@ static htsp_t *fp_tags = NULL; -static int keyeq(char *a, char *b) -{ - return !strcmp(a, b); -} - const void *fp_tag(const char *tag, int alloc) { htsp_entry_t *e; @@ -78,7 +73,7 @@ static char *counter = NULL; if (fp_tags == NULL) - fp_tags = htsp_alloc(strhash, keyeq); + fp_tags = htsp_alloc(strhash, strkeyeq); e = htsp_getentry(fp_tags, (char *) tag); if ((e == NULL) && alloc) { htsp_set(fp_tags, strdup(tag), (void *) counter); Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 2435) +++ trunk/src/rats_patch.c (revision 2436) @@ -291,12 +291,6 @@ return NULL; } - -static int keyeq(char *a, char *b) -{ - return !strcmp(a, b); -} - int rats_patch_fexport(PCBTypePtr pcb, FILE * f, int fmt_pcb) { rats_patch_line_t *n; @@ -317,7 +311,7 @@ if (!fmt_pcb) { htsp_t *seen; - seen = htsp_alloc(strhash, keyeq); + seen = htsp_alloc(strhash, strkeyeq); /* have to print net_info lines */ for (n = pcb->NetlistPatches; n != NULL; n = n->next) { Index: trunk/src_plugins/hid_gtk/gui-config.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-config.c (revision 2435) +++ trunk/src_plugins/hid_gtk/gui-config.c (revision 2436) @@ -1906,13 +1906,6 @@ } } - - -static int keyeq(char *a, char *b) -{ - return !strcmp(a, b); -} - static GtkTreeIter *config_tree_auto_mkdirp(GtkTreeStore *model, GtkTreeIter *main_parent, htsp_t *dirs, char *path) { char *basename; @@ -1958,7 +1951,7 @@ int num_paths, n; /* remember the parent for each dir */ - dirs = htsp_alloc(strhash, keyeq); + dirs = htsp_alloc(strhash, strkeyeq); /* alpha sort keys for the more consistend UI */ for (e = htsp_first(conf_fields), num_paths = 0; e; e = htsp_next(conf_fields, e)) Index: trunk/src_plugins/mincut/pcb-mincut/load.c =================================================================== --- trunk/src_plugins/mincut/pcb-mincut/load.c (revision 2435) +++ trunk/src_plugins/mincut/pcb-mincut/load.c (revision 2436) @@ -51,17 +51,6 @@ return hash; } -static int keyeq(char *a, char *b) { - char *pa = (char *)a; - char *pb = (char *)b; - - for (; *pa == *pb; pa++, pb++) - if (*pa == '\0') - return 1; - return 0; -} - - gr_t *load(FILE *f) { int lineno; @@ -197,7 +186,7 @@ } } - name2node = htsi_alloc(keyhash, keyeq); + name2node = htsi_alloc(keyhash, strkeyeq); node2name[0] = strdup("(S)"); htsi_set(name2node, node2name[0], 0); node2name[1] = strdup("(T)"); htsi_set(name2node, node2name[1], 1); num_nodes = 2;