re_node_set *nodes;
const re_node_set *nodes;
transit_state_bkref (preg, nodes, mctx)    const regex_t *preg;    re_node_set *nodes;    re_match_context_t *mctx;{  reg_errcode_t err;  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;  int i;  int cur_str_idx = re_string_cur_idx (mctx->input);  for (i = 0; i < nodes->nelem; ++i)    {      int dest_str_idx, prev_nelem, bkc_idx;      int node_idx = nodes->elems[i];      unsigned int context;      re_token_t *node = dfa->nodes + node_idx;      re_node_set *new_dest_nodes;      /* Check whether `node' is a backreference or not.  */      if (node->type != OP_BACK_REF)	continue;      if (node->constraint)	{	  context = re_string_context_at (mctx->input, cur_str_idx,					  mctx->eflags, preg->newline_anchor);	  if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context))	    continue;	}      /* `node' is a backreference.	 Check the substring which the substring matched.  */      bkc_idx = mctx->nbkref_ents;      err = get_subexp (preg, mctx, node_idx, cur_str_idx);      if (BE (err != REG_NOERROR, 0))	goto free_return;      /* And add the epsilon closures (which is `new_dest_nodes') of	 the backreference to appropriate state_log.  */#ifdef DEBUG      assert (dfa->nexts[node_idx] != -1);#endif      for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)	{	  int subexp_len;	  re_dfastate_t *dest_state;	  struct re_backref_cache_entry *bkref_ent;	  bkref_ent = mctx->bkref_ents + bkc_idx;	  if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx)	    continue;	  subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from;	  new_dest_nodes = (subexp_len == 0			    ? dfa->eclosures + dfa->edests[node_idx].elems[0]			    : dfa->eclosures + dfa->nexts[node_idx]);	  dest_str_idx = (cur_str_idx + bkref_ent->subexp_to			  - bkref_ent->subexp_from);	  context = re_string_context_at (mctx->input, dest_str_idx - 1,					  mctx->eflags, preg->newline_anchor);	  dest_state = mctx->state_log[dest_str_idx];	  prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0			: mctx->state_log[cur_str_idx]->nodes.nelem);	  /* Add `new_dest_node' to state_log.  */	  if (dest_state == NULL)	    {	      mctx->state_log[dest_str_idx]		= re_acquire_state_context (&err, dfa, new_dest_nodes,					    context);	      if (BE (mctx->state_log[dest_str_idx] == NULL		      && err != REG_NOERROR, 0))		goto free_return;	    }	  else	    {	      re_node_set dest_nodes;	      err = re_node_set_init_union (&dest_nodes,					    dest_state->entrance_nodes,					    new_dest_nodes);	      if (BE (err != REG_NOERROR, 0))		{		  re_node_set_free (&dest_nodes);		  goto free_return;		}	      mctx->state_log[dest_str_idx]		= re_acquire_state_context (&err, dfa, &dest_nodes, context);	      re_node_set_free (&dest_nodes);	      if (BE (mctx->state_log[dest_str_idx] == NULL		      && err != REG_NOERROR, 0))		goto free_return;	    }	  /* We need to check recursively if the backreference can epsilon	     transit.  */	  if (subexp_len == 0	      && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem)	    {	      err = check_subexp_matching_top (dfa, mctx, new_dest_nodes,					       cur_str_idx);	      if (BE (err != REG_NOERROR, 0))		goto free_return;	      err = transit_state_bkref (preg, new_dest_nodes, mctx);	      if (BE (err != REG_NOERROR, 0))		goto free_return;	    }	}    }  err = REG_NOERROR; free_return:  return err;}