4 * hextoint - convert an ascii string in hex to an unsigned
5 * long, with error checking
9 #include "ntp_stdlib.h"
18 register const char *cp
;
27 if (!isxdigit((int)*cp
))
30 return 0; /* overflow */
32 if (*cp
<= '9') /* very ascii dependent */
35 u
+= *cp
++ - 'a' + 10;
37 u
+= *cp
++ - 'A' + 10;