From 02fec4701cee79f875c1d02b8b4aee09380dbcb8 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 4 Jan 2001 20:04:45 +0000 Subject: integrate dietlibc/stdio per default for cdrom and disk only installs --- mdk-stage1/dietlibc/lib/strtoull.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 mdk-stage1/dietlibc/lib/strtoull.c (limited to 'mdk-stage1/dietlibc/lib/strtoull.c') diff --git a/mdk-stage1/dietlibc/lib/strtoull.c b/mdk-stage1/dietlibc/lib/strtoull.c new file mode 100644 index 000000000..64f095f60 --- /dev/null +++ b/mdk-stage1/dietlibc/lib/strtoull.c @@ -0,0 +1,39 @@ +#include + +static char *num="0123456789abcdefghijklmnopqrstuvwxyz"; + +unsigned long long int strtoull(const char *nptr, char **endptr, int base) +{ + long long int v=0; + int a=1,i; + + while(isspace(*nptr)) nptr++; + + if (*nptr == '+') { nptr++; } + if (!base) + { + if (*nptr=='0') + { + base=8; + if ((*(nptr+1)=='x')||(*(nptr+1)=='X')) base=16; + } + else + base=10; + } + while((a)&&(*nptr)) + { + a=0; + for (i=0;(!a)&&(i