12#define ULONG_MAX 0xFFFFFFFF
49 return ch ==
'\r' || ch ==
'\n' || ch ==
' ' || ch ==
'\t' || ch ==
'\v' || ch ==
'\f';
68 if ((Base < 0) || (Base == 1) || (Base > 36)) {
73 while (__isspace (*Nptr)) {
81 }
else if (*Nptr ==
'+') {
86 if ((Nptr[0] ==
'0') && ((Nptr[1] ==
'x') || (Nptr[1] ==
'X')) && ((Base == 0) || (Base == 16))) {
90 }
else if ((Nptr[0] ==
'0') && ((Nptr[1] ==
'b') || (Nptr[1] ==
'B')) && ((Base == 0) || (Base == 2))) {
94 }
else if ((Nptr[0] ==
'0') && ((Base == 0) || (Base == 8))) {
108 unsigned long NewVal;
113 if ((C >=
'0') && (C <=
'9')) {
115 }
else if ((C >=
'a') && (C <=
'z')) {
116 Digit = C -
'a' + 10;
117 }
else if ((C >=
'A') && (C <=
'Z')) {
118 Digit = C -
'A' + 10;
121 if ((Digit == -1) || (Digit >= Base)) {
124 *EndPtr = (
char *)Nptr;
130 NewVal = Val * Base + Digit;