return (build_part_graph(main_part));
}
+int transfer_main(t_catalog *part_catalog, t_vec *nodes, t_vec *mosfets)
+{
+ t_part *main_part;
+
+ main_part = access_catalog(part_catalog, "main");
+ if (!main_part)
+ return (1);
+ *nodes = main_part->nodes;
+ *mosfets = main_part->mosfets;
+ ft_vec_init(&main_part->nodes, sizeof(t_node));
+ ft_vec_init(&main_part->mosfets, sizeof(t_mosfet));
+ return (0);
+}
+
int construct_new_graph(t_parse_tree_node *parse_tree, __attribute__((unused)) t_vec *nodes, __attribute__((unused)) t_vec *mosfets)
{
t_catalog part_catalog;
extract_used_names(&part_catalog, parse_tree);
rebind_names_to_parts(&part_catalog);
build_main_graph(&part_catalog);
- //transfer_main(&part_catalog, nodes, mosfets);
+ transfer_main(&part_catalog, nodes, mosfets);
free_catalog(&part_catalog);
return (0);
}