/* While we find nice hex chars, build an int. Return number of chars processed.  */
static int hexToInt(char **ptr, int *intValue)
/* While we find nice hex chars, build an int. Return number of chars processed.  */
static int hexToInt(char **ptr, int *intValue)
{
	int numChars = 0;
	int hexValue;
	*intValue = 0;
	while (**ptr) {
		hexValue = hex(**ptr);
		if (hexValue < 0)
			break;
		*intValue = (*intValue << 4) | hexValue;
		numChars++;
		(*ptr)++;
	}
	return (numChars);
}