Return true if A has every label in B. */
| 390 | |
| 391 | /* Return true if A has every label in B. */ |
| 392 | static int |
| 393 | hasevery (register struct tree const *a, register struct tree const *b) |
| 394 | { |
| 395 | if (!b) |
| 396 | return 1; |
| 397 | if (!hasevery(a, b->llink)) |
| 398 | return 0; |
| 399 | if (!hasevery(a, b->rlink)) |
| 400 | return 0; |
| 401 | while (a && b->label != a->label) |
| 402 | if (b->label < a->label) |
| 403 | a = a->llink; |
| 404 | else |
| 405 | a = a->rlink; |
| 406 | return !!a; |
| 407 | } |
| 408 | |
| 409 | /* Compute a vector, indexed by character code, of the trie nodes |
| 410 | referenced from the given tree. */ |