Whether an edge of `types` (NULL-terminated) touches node `id`. */
| 1537 | |
| 1538 | /* Whether an edge of `types` (NULL-terminated) touches node `id`. */ |
| 1539 | static bool gbuf_node_touched(const cbm_gbuf_t *gb, int64_t id, const char *const *types) { |
| 1540 | for (int t = 0; types[t]; t++) { |
| 1541 | const cbm_gbuf_edge_t **edges = NULL; |
| 1542 | int count = 0; |
| 1543 | if ((cbm_gbuf_find_edges_by_target_type(gb, id, types[t], &edges, &count) == 0 && |
| 1544 | count > 0) || |
| 1545 | (cbm_gbuf_find_edges_by_source_type(gb, id, types[t], &edges, &count) == 0 && |
| 1546 | count > 0)) { |
| 1547 | return true; |
| 1548 | } |
| 1549 | } |
| 1550 | return false; |
| 1551 | } |
| 1552 | |
| 1553 | /* Delete the `label` nodes no edge of `types` (NULL-terminated) touches -- |
| 1554 | * with `fileless`, only those carrying no file; returns how many. */ |
no test coverage detected