FreeBSD/sys/boot/arm/at91/libat91/strcvt.c
/*
 * .KB_C_FN_DEFINITION_START
 * unsigned p_ASCIIToHex(char *)
 *  This global function set the unsigned value equal to the converted
 * hex number passed as a string.  No error checking is performed; the
 * string must be valid hex value, point at the start of string, and be
 * NULL-terminated.
 * .KB_C_FN_DEFINITION_END
 */
.KB_C_FN_DEFINITION_START
unsigned p_ASCIIToHex(char *)
This global function set the unsigned value equal to the converted
hex number passed as a string.  No error checking is performed; the
string must be valid hex value, point at the start of string, and be
NULL-terminated.
. KB_C_FN_DEFINITION_START unsigned p_ASCIIToHex ( char * ) This global function set the unsigned value equal to the converted hex number passed as a string . No error checking is performed ; the string must be valid hex value point at the start of string and be NULL - terminated .
unsigned
p_ASCIIToHex(const char *buf)
{
	unsigned	lValue = 0;
	if ((*buf == '0') && ((buf[1] == 'x') || (buf[1] == 'X')))
		buf += 2;
	while (*buf) {
		lValue <<= 4;
		lValue += p_HexCharValue(*buf++);
	}
	return (lValue);
}
unsigned p_ASCIIToHex ( const char * buf ) { unsigned lValue = 0 ; if ( ( * buf == ' ' ) && ( ( buf [ 1 ] == ' ' ) || ( buf [ 1 ] == ' ' ) ) ) buf += 2 ; while ( * buf ) { lValue <<= 4 ; lValue += p_HexCharValue ( * buf ++ ) ; } return ( lValue ) ; }
.KB_C_FN_DEFINITION_START
 unsigned p_ASCIIToHex(char *)
  This global function set the unsigned value equal to the converted
 hex number passed as a string.
. KB_C_FN_DEFINITION_START unsigned p_ASCIIToHex ( char * ) This global function set the unsigned value equal to the converted hex number passed as a string .