int new_idx;
build_charclass_op (dfa, trans, class_name, extra, not, err)     re_dfa_t *dfa;     RE_TRANSLATE_TYPE trans;     const unsigned char *class_name;     const unsigned char *extra;     int not;     reg_errcode_t *err;{  re_bitset_ptr_t sbcset;#ifdef RE_ENABLE_I18N  re_charset_t *mbcset;  int alloc = 0;#else /* not RE_ENABLE_I18N */  int non_match = 0;#endif /* not RE_ENABLE_I18N */  reg_errcode_t ret;  re_token_t br_token;  bin_tree_t *tree;  int new_idx;  sbcset = (re_bitset_ptr_t) calloc (sizeof (unsigned int), BITSET_UINTS);#ifdef RE_ENABLE_I18N  mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);#endif /* RE_ENABLE_I18N */#ifdef RE_ENABLE_I18N  if (BE (sbcset == NULL || mbcset == NULL, 0))#else /* not RE_ENABLE_I18N */  if (BE (sbcset == NULL, 0))#endif /* not RE_ENABLE_I18N */    {      *err = REG_ESPACE;      return NULL;    }  if (not)    {#ifdef RE_ENABLE_I18N      int i;      /*      if (syntax & RE_HAT_LISTS_NOT_NEWLINE)	bitset_set(cset->sbcset, '\0');      */      mbcset->non_match = 1;      if (dfa->mb_cur_max > 1)	for (i = 0; i < SBC_MAX; ++i)	  if (__btowc (i) == WEOF)	    bitset_set (sbcset, i);#else /* not RE_ENABLE_I18N */      non_match = 1;#endif /* not RE_ENABLE_I18N */    }  /* We don't care the syntax in this case.  */  ret = build_charclass (trans, sbcset,#ifdef RE_ENABLE_I18N			 mbcset, &alloc,#endif /* RE_ENABLE_I18N */			 class_name, 0);  if (BE (ret != REG_NOERROR, 0))    {      re_free (sbcset);#ifdef RE_ENABLE_I18N      free_charset (mbcset);#endif /* RE_ENABLE_I18N */      *err = ret;      return NULL;    }  /* \w match '_' also.  */  for (; *extra; extra++)    bitset_set (sbcset, *extra);  /* If it is non-matching list.  */#ifdef RE_ENABLE_I18N  if (mbcset->non_match)#else /* not RE_ENABLE_I18N */  if (non_match)#endif /* not RE_ENABLE_I18N */    bitset_not (sbcset);  /* Build a tree for simple bracket.  */  br_token.type = SIMPLE_BRACKET;  br_token.opr.sbcset = sbcset;  new_idx = re_dfa_add_node (dfa, br_token, 0);  tree = create_tree (NULL, NULL, 0, new_idx);  if (BE (new_idx == -1 || tree == NULL, 0))    goto build_word_op_espace;#ifdef RE_ENABLE_I18N  if (dfa->mb_cur_max > 1)    {      re_token_t alt_token;      bin_tree_t *mbc_tree;      /* Build a tree for complex bracket.  */      br_token.type = COMPLEX_BRACKET;      br_token.opr.mbcset = mbcset;      dfa->has_mb_node = 1;      new_idx = re_dfa_add_node (dfa, br_token, 0);      mbc_tree = create_tree (NULL, NULL, 0, new_idx);      if (BE (new_idx == -1 || mbc_tree == NULL, 0))	goto build_word_op_espace;      /* Then join them by ALT node.  */      alt_token.type = OP_ALT;      new_idx = re_dfa_add_node (dfa, alt_token, 0);      tree = create_tree (tree, mbc_tree, 0, new_idx);      if (BE (new_idx != -1 && mbc_tree != NULL, 1))	return tree;    }  else    {      free_charset (mbcset);      return tree;    }#else /* not RE_ENABLE_I18N */  return tree;#endif /* not RE_ENABLE_I18N */ build_word_op_espace:  re_free (sbcset);#ifdef RE_ENABLE_I18N  free_charset (mbcset);#endif /* RE_ENABLE_I18N */  *err = REG_ESPACE;  return NULL;}