A literal source that names something below the context votes for each * candidate context it exists under. */
| 1288 | /* A literal source that names something below the context votes for each |
| 1289 | * candidate context it exists under. */ |
| 1290 | static void dk_ctx_vote(dk_t *d, const char *src, void *ud) { |
| 1291 | dk_ctx_vote_t *v = ud; |
| 1292 | const char *n = dk_glob(src) ? NULL : dk_in_ctx(d, "", src); |
| 1293 | for (int i = 0; n && n[0] && i < v->ncand; i++) { |
| 1294 | const char *p = dk_in_ctx(d, v->cands[i], src); |
| 1295 | v->hits[i] += p && dk_exists(d, p); |
| 1296 | } |
| 1297 | } |
| 1298 | |
| 1299 | typedef struct { |
| 1300 | const char *ctx; |