static void handle_child(item_t *i, void *arg) { node_t *node = arg; print_item(i); foreach_child(node, i, handle_child, node); }
static void handle_child(item_t *intf, void *arg) { node_t *node = arg; draw_item_list_entry(intf, node); foreach_child(node, intf, handle_child, node); }
static void print_list(item_t *i, node_t *node) { if (i->i_flags & ITEM_FLAG_IS_CHILD) return; print_item(i); foreach_child(node, i, handle_child, node); }
static void print_list(intf_t *i, node_t *node) { if (i->i_is_child) return; print_intf(i); foreach_child(node, i, handle_child, node); }
static void draw_item(node_t *node, item_t *intf) { if (!intf->i_name[0] || row >= (rows - 1) || (intf->i_flags & ITEM_FLAG_IS_CHILD)) return; draw_item_list_entry(intf, node); if (!(intf->i_flags & ITEM_FLAG_FOLDED)) foreach_child(node, intf, handle_child, node); }
static void draw_intf(node_t *node, intf_t *intf) { if (!intf->i_name[0] || row >= (rows - 1) || intf->i_is_child) return; draw_intf_list_entry(intf, node); if (!intf->i_folded) foreach_child(node, intf, handle_child, node); }