| 65 | return q->head >= q->tail; |
| 66 | } |
| 67 | static void queue_free(Queue *q) { |
| 68 | free(q->data); |
| 69 | } |
| 70 | |
| 71 | // Phase 1: Build trie (goto function) from patterns. Returns state count. |
| 72 | static int ac_build_trie(CBMAutomaton *ac, const char **patterns, const int *lengths, int count) { |