if (MB_CUR_MAX == 1
if (dfa->mb_cur_max == 1
check_matching (preg, mctx, fl_search, fl_longest_match)    const regex_t *preg;    re_match_context_t *mctx;    int fl_search, fl_longest_match;{  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;  reg_errcode_t err;  int match = 0;  int match_last = -1;  int cur_str_idx = re_string_cur_idx (mctx->input);  re_dfastate_t *cur_state;  cur_state = acquire_init_state_context (&err, preg, mctx, cur_str_idx);  /* An initial state must not be NULL(invalid state).  */  if (BE (cur_state == NULL, 0))    return -2;  if (mctx->state_log != NULL)    mctx->state_log[cur_str_idx] = cur_state;  /* Check OP_OPEN_SUBEXP in the initial state in case that we use them     later.  E.g. Processing back references.  */  if (dfa->nbackref)    {      err = check_subexp_matching_top (dfa, mctx, &cur_state->nodes, 0);      if (BE (err != REG_NOERROR, 0))	return err;    }  if (cur_state->has_backref)    {      err = transit_state_bkref (preg, &cur_state->nodes, mctx);      if (BE (err != REG_NOERROR, 0))	return err;    }  /* If the RE accepts NULL string.  */  if (cur_state->halt)    {      if (!cur_state->has_constraint	  || check_halt_state_context (preg, cur_state, mctx, cur_str_idx))	{	  if (!fl_longest_match)	    return cur_str_idx;	  else	    {	      match_last = cur_str_idx;	      match = 1;	    }	}    }  while (!re_string_eoi (mctx->input))    {      cur_state = transit_state (&err, preg, mctx, cur_state,				 fl_search && !match);      if (cur_state == NULL) /* Reached at the invalid state or an error.  */	{	  cur_str_idx = re_string_cur_idx (mctx->input);	  if (BE (err != REG_NOERROR, 0))	    return -2;	  if (fl_search && !match)	    {	      /* Restart from initial state, since we are searching		 the point from where matching start.  */#ifdef RE_ENABLE_I18N	      if (MB_CUR_MAX == 1		  || re_string_first_byte (mctx->input, cur_str_idx))#endif /* RE_ENABLE_I18N */		cur_state = acquire_init_state_context (&err, preg, mctx,							cur_str_idx);	      if (BE (cur_state == NULL && err != REG_NOERROR, 0))		return -2;	      if (mctx->state_log != NULL)		mctx->state_log[cur_str_idx] = cur_state;	    }	  else if (!fl_longest_match && match)	    break;	  else /* (fl_longest_match && match) || (!fl_search && !match)  */	    {	      if (mctx->state_log == NULL)		break;	      else		{		  int max = mctx->state_log_top;		  for (; cur_str_idx <= max; ++cur_str_idx)		    if (mctx->state_log[cur_str_idx] != NULL)		      break;		  if (cur_str_idx > max)		    break;		}	    }	}      if (cur_state != NULL && cur_state->halt)	{	  /* Reached at a halt state.	     Check the halt state can satisfy the current context.  */	  if (!cur_state->has_constraint	      || check_halt_state_context (preg, cur_state, mctx,					   re_string_cur_idx (mctx->input)))	    {	      /* We found an appropriate halt state.  */	      match_last = re_string_cur_idx (mctx->input);	      match = 1;	      if (!fl_longest_match)		break;	    }	}   }  return match_last;}