int *equiv_class_alloc;
build_equiv_class (mbcset, sbcset, equiv_class_alloc, name)     re_charset_t *mbcset;     re_bitset_ptr_t sbcset;     int *equiv_class_alloc;     const unsigned char *name;{#ifdef _LIBC  uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);  if (nrules != 0)    {      const int32_t *table, *indirect;      const unsigned char *weights, *extra, *cp;      unsigned char char_buf[2];      int32_t idx1, idx2;      unsigned int ch;      size_t len;      /* This #include defines a local function!  */# include <locale/weight.h>      /* Calculate the index for equivalence class.  */      cp = name;      table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);      weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE,					       _NL_COLLATE_WEIGHTMB);      extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE,                                                   _NL_COLLATE_EXTRAMB);      indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,                                                _NL_COLLATE_INDIRECTMB);      idx1 = findidx (&cp);      if (BE (idx1 == 0 || cp < name + strlen (name), 0))        /* This isn't a valid character.  */        return REG_ECOLLATE;      /* Build single byte matcing table for this equivalence class.  */      char_buf[1] = '\0';      len = weights[idx1];      for (ch = 0; ch < SBC_MAX; ++ch)        {          char_buf[0] = ch;          cp = char_buf;          idx2 = findidx (&cp);/*          idx2 = table[ch];*/          if (idx2 == 0)            /* This isn't a valid character.  */            continue;          if (len == weights[idx2])            {              int cnt = 0;              while (cnt <= len &&                     weights[idx1 + 1 + cnt] == weights[idx2 + 1 + cnt])                ++cnt;              if (cnt > len)                bitset_set (sbcset, ch);            }        }      /* Check whether the array has enough space.  */      if (*equiv_class_alloc == mbcset->nequiv_classes)        {          /* Not enough, realloc it.  */          /* +1 in case of mbcset->nequiv_classes is 0.  */          *equiv_class_alloc = 2 * mbcset->nequiv_classes + 1;          /* Use realloc since the array is NULL if *alloc == 0.  */          mbcset->equiv_classes = re_realloc (mbcset->equiv_classes, int32_t,                                              *equiv_class_alloc);          if (BE (mbcset->equiv_classes == NULL, 0))            return REG_ESPACE;        }      mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1;    }  else#endif    {      if (BE (strlen (name) != 1, 0))        return REG_ECOLLATE;      bitset_set (sbcset, name[0]);    }  return REG_NOERROR;}