| 274 | } |
| 275 | |
| 276 | static int sp_calls(sp_proj_t *p, const char *caller, const char *callee) { |
| 277 | return sp_count(p, |
| 278 | "SELECT COUNT(*) FROM edges e JOIN nodes s ON s.id=e.source_id " |
| 279 | "JOIN nodes t ON t.id=e.target_id WHERE e.project=?1 AND e.type='CALLS' " |
| 280 | "AND s.name=?2 AND t.name=?3", |
| 281 | caller, callee); |
| 282 | } |
| 283 | |
| 284 | /* Every SPAWNS edge as "caller>program|api" lines, sorted, into `out`. */ |
| 285 | static bool sp_edge_set(sp_proj_t *p, char *out, size_t n) { |