static void node_traverse (Node *node) { GSList *iter; g_return_if_fail (node != NULL); g_return_if_fail (IS_NODE (node)); if (node_is_visited (node)) return; node_set_visited (node, TRUE); for (iter = node->wires; iter; iter = iter->next) { Wire *wire = iter->data; wire_traverse (wire); } }
static void node_traverse (Node *node) { GSList *wires; g_return_if_fail (node != NULL); g_return_if_fail (IS_NODE (node)); if (node_is_visited (node)) return; node_set_visited (node, TRUE); for (wires = node->wires; wires; wires = wires->next) { Wire *wire = wires->data; wire_traverse (wire); } g_slist_free_full (wires, g_object_unref); }
static void mouse_over_wire_callback (WireItem *item, Sheet *sheet) { GList *iter; Wire *wire; NodeStore *store; if (sheet->state != SHEET_STATE_NONE) return; store = schematic_get_store (schematic_view_get_schematic_from_sheet (sheet)); node_store_node_foreach (store, (GHFunc *)node_foreach_reset, NULL); for (iter = store->wires; iter; iter = iter->next) { wire = iter->data; wire_set_visited (wire, FALSE); } wire = WIRE (sheet_item_get_data (SHEET_ITEM (item))); wire_traverse (wire); }
static void mouse_over_wire_cb (WireItem *item, SchematicView *sv) { GList *wires; Wire *wire; NodeStore *store; Sheet *sheet; sheet = schematic_view_get_sheet (sv); if (sheet->state != SHEET_STATE_NONE) return; store = schematic_get_store (schematic_view_get_schematic (sv)); node_store_node_foreach (store, (GHFunc *) node_foreach_reset, NULL); for (wires = store->wires; wires; wires = wires->next) { wire = wires->data; wire_set_visited (wire, FALSE); } wire = WIRE (sheet_item_get_data (SHEET_ITEM (item))); wire_traverse (wire); }