diff --git a/gencat/gencat.c b/gencat/gencat.c index 31bc32e..3d6bd73 100644 --- a/gencat/gencat.c +++ b/gencat/gencat.c @@ -93,7 +93,7 @@ int main(int argc, char **argv) } read_tree(file); fclose(file); - set_libs(tree, lookup_sym); + set_libs(tree); for (arg = argv+optind+1; *arg; arg++) { file = fopen(*arg, "r"); diff --git a/gencat/tree.c b/gencat/tree.c index 3a401aa..e74c21b 100644 --- a/gencat/tree.c +++ b/gencat/tree.c @@ -203,21 +203,19 @@ void read_desc(FILE *file) } -void set_libs(struct node *node, - const char *(*find_lib)(const char *sym, const struct name **names, - int *units)) +void set_libs(struct node *node) { while (node) { if (!node->child) { - node->lib = - find_lib(node->name, &node->names, &node->units); + node->lib = lookup_sym(node->name, + &node->names, &node->units); if (!node->lib) { fprintf(stderr, "symbol %s not found\n", node->name); exit(1); } } - set_libs(node->child, find_lib); + set_libs(node->child); node = node->next; } } diff --git a/gencat/tree.h b/gencat/tree.h index 23e04fc..1eb5146 100644 --- a/gencat/tree.h +++ b/gencat/tree.h @@ -39,9 +39,7 @@ extern struct node *tree; void read_tree(FILE *file); void read_desc(FILE *file); -void set_libs(struct node *node, - const char *(*find_lib)(const char *sym, const struct name **names, - int *units)); +void set_libs(struct node *node); void dump_tree(void); void dump_comp(void);