[PATCH 2/9] bootwrapper: Add strtoull().
Milton Miller
miltonm at bga.com
Fri Aug 31 01:52:22 EST 2007
On Thu Aug 30 02:46:38 EST 2007, Scott Wood wrote:
> + if (*ptr >= '0' && *ptr <= '9' && *ptr < '0' + base)
> + digit = *ptr - '0';
> + else if (*ptr >= 'A' && *ptr < 'A' + base - 10)
> + digit = *ptr - 'A' + 10;
> + else if (*ptr >= 'a' && *ptr < 'z' + base - 10)
> + digit = *ptr - 'a' + 10;
> + else
> + break;
'z' should also be 'a' like the 'A' case.
Should we add <= 'Z' like we do '9', or do we not care about bases >
36? (It really breaks above base 42).
milton
More information about the Linuxppc-dev
mailing list