| 1605 | return idx; /* Found. */ |
| 1606 | } |
| 1607 | return -1; /* Not found. */ |
| 1608 | } |
| 1609 | |
| 1610 | /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. |
| 1611 | Return the index of the new node, or -1 if insufficient storage is |
| 1612 | available. */ |
| 1613 | |
| 1614 | static int |
| 1615 | duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint) |
| 1616 | { |
| 1617 | int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); |
| 1618 | if (BE (dup_idx != -1, 1)) |
| 1619 | { |
| 1620 | dfa->nodes[dup_idx].constraint = constraint; |
| 1621 | dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; |
| 1622 | dfa->nodes[dup_idx].duplicated = 1; |
| 1623 | |
| 1624 | /* Store the index of the original node. */ |
no outgoing calls
no test coverage detected