/* Convert a character holding a hex digit to a number.  */
static unsigned int hex2int(unsigned char c)
/* Convert a character holding a hex digit to a number.  */
static unsigned int hex2int(unsigned char c)
{
	return isdigit(c) ? c - '0' : toupper(c) - 'A' + 10;
}