cp, valid_table[cls1].name,
buf, valid_table[cls1].name,
ctype_finish (struct localedef_t *locale, struct charset_t *charset){  /* See POSIX.2, table 2-6 for the meaning of the following table.  */#define NCLASS 12  static const struct  {    const char *name;    const char allow[NCLASS];  }  valid_table[NCLASS] =  {    /* The order is important.  See token.h for more information.       M = Always, D = Default, - = Permitted, X = Mutually exclusive  */    { "upper",  "--MX-XDDXXX-" },    { "lower",  "--MX-XDDXXX-" },    { "alpha",  "---X-XDDXXX-" },    { "digit",  "XXX--XDDXXX-" },    { "xdigit", "-----XDDXXX-" },    { "space",  "XXXXX------X" },    { "print",  "---------X--" },    { "graph",  "---------X--" },    { "blank",  "XXXXXM-----X" },    { "cntrl",  "XXXXX-XX--XX" },    { "punct",  "XXXXX-DD-X-X" },    { "alnum",  "-----XDDXXX-" }  };  size_t cnt;  int cls1, cls2;  unsigned int space_value;  struct locale_ctype_t *ctype = locale->categories[LC_CTYPE].ctype;  /* Set default value for classes not specified.  */  set_class_defaults (ctype, charset);  /* Check according to table.  */  for (cnt = 0; cnt < ctype->class_collection_max; ++cnt)    {      unsigned long int tmp;      tmp = ctype->class_collection[cnt];      if (tmp == 0)	continue;      for (cls1 = 0; cls1 < NCLASS; ++cls1)	if ((tmp & (1 << cls1)) != 0)	  for (cls2 = 0; cls2 < NCLASS; ++cls2)	    if (valid_table[cls1].allow[cls2] != '-')	      {		int eq = (tmp & (1 << cls2)) != 0;		switch (valid_table[cls1].allow[cls2])		  {		  case 'M':		    if (!eq)		      {			char buf[17];			char *cp = buf;			unsigned int value;			value = ctype->charnames[cnt];			if ((value & 0xff000000) != 0)			  cp += sprintf (cp, "\\%o", (value >> 24) & 0xff);			if ((value & 0xffff0000) != 0)			  cp += sprintf (cp, "\\%o", (value >> 16) & 0xff);			if ((value & 0xffffff00) != 0)			  cp += sprintf (cp, "\\%o", (value >> 8) & 0xff);			sprintf (cp, "\\%o", value & 0xff);			if (!be_quiet)			  error (0, 0, _("\character %s'%s' in class `%s' must be in class `%s'"), value > 256 ? "L" : "",				 cp, valid_table[cls1].name,				 valid_table[cls2].name);		      }		    break;		  case 'X':		    if (eq)		      {			char buf[17];			char *cp = buf;			unsigned int value;			value = ctype->charnames[cnt];			if ((value & 0xff000000) != 0)			  cp += sprintf (cp, "\\%o", value >> 24);			if ((value & 0xffff0000) != 0)			  cp += sprintf (cp, "\\%o", (value >> 16) & 0xff);			if ((value & 0xffffff00) != 0)			  cp += sprintf (cp, "\\%o", (value >> 8) & 0xff);			sprintf (cp, "\\%o", value & 0xff);			if (!be_quiet)			  error (0, 0, _("\character %s'%s' in class `%s' must not be in class `%s'"),				 value > 256 ? "L" : "", cp,				 valid_table[cls1].name,				 valid_table[cls2].name);		      }		    break;		  case 'D':		    ctype->class_collection[cnt] |= 1 << cls2;		    break;		  default:		    error (5, 0, _("internal error in %s, line %u"),			   __FUNCTION__, __LINE__);                  }              }    }  /* ... and now test <SP> as a special case.  */  space_value = charset_find_value (&charset->char_table, "SP", 2);  if ((wchar_t) space_value == ILLEGAL_CHAR_VALUE)    space_value = charset_find_value (&charset->char_table, "space", 5);  if ((wchar_t) space_value == ILLEGAL_CHAR_VALUE)    {      if (!be_quiet)	error (0, 0, _("character <SP> not defined in character map"));    }  else if (((cnt = BITPOS (tok_space),	     (ELEM (ctype, class_collection, , space_value)	      & BIT (tok_space)) == 0)	    || (cnt = BITPOS (tok_blank),		(ELEM (ctype, class_collection, , space_value)		 & BIT (tok_blank)) == 0)))    {      if (!be_quiet)	error (0, 0, _("<SP> character not in class `%s'"),	       valid_table[cnt].name);    }  else if (((cnt = BITPOS (tok_punct),	     (ELEM (ctype, class_collection, , space_value)	      & BIT (tok_punct)) != 0)	    || (cnt = BITPOS (tok_graph),		(ELEM (ctype, class_collection, , space_value)		 & BIT (tok_graph))		!= 0)))    {      if (!be_quiet)	error (0, 0, _("<SP> character must not be in class `%s'"),	       valid_table[cnt].name);    }  else    ELEM (ctype, class_collection, , space_value) |= BIT (tok_print);  /* Now that the tests are done make sure the name array contains all     characters which are handled in the WIDTH section of the     character set definition file.  */  if (charset->width_rules != NULL)    for (cnt = 0; cnt < charset->nwidth_rules; ++cnt)      {	size_t inner;	for (inner = charset->width_rules[cnt].from;	     inner <= charset->width_rules[cnt].to; ++inner)	  (void) find_idx (ctype, NULL, NULL, NULL, inner);      }}