| 739 | } |
| 740 | |
| 741 | static bool tf_same_dir(const char *p, const char *q) { |
| 742 | const char *ps = strrchr(p, '/'); |
| 743 | const char *qs = strrchr(q, '/'); |
| 744 | size_t pl = ps ? (size_t)(ps - p) : 0; |
| 745 | size_t ql = qs ? (size_t)(qs - q) : 0; |
| 746 | return pl == ql && strncmp(p, q, pl) == 0; |
| 747 | } |
| 748 | |
| 749 | /* One reference edge; 1 when made. */ |
| 750 | static int tf_ref_edge(tf_mod_t *m, int64_t src, int64_t tgt, const char *type, const char *ref, |