2 * hextoint - convert an ascii string in hex to an unsigned
3 * long, with error checking
7 #include "ntp_stdlib.h"
16 register const char *cp;
25 if (!isxdigit((int)*cp))
28 return 0; /* overflow */
30 if (*cp <= '9') /* very ascii dependent */
33 u += *cp++ - 'a' + 10;
35 u += *cp++ - 'A' + 10;