Subversion Repositories shark

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
#include <string.h>
2
#include <kernel/kern.h>
3
 
4
#if 0
5
unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
6
{
7
        unsigned long result = 0,value;
8
 
9
        if (!base) {
10
                base = 10;
11
                if (*cp == '0') {
12
                        base = 8;
13
                        cp++;
14
                        if ((*cp == 'x') && isxdigit(cp[1])) {
15
                                cp++;
16
                                base = 16;
17
                        }
18
                }
19
        }
20
        while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
21
            ? toupper(*cp) : *cp)-'A'+10) < base) {
22
                result = result*base + value;
23
                cp++;
24
        }
25
        if (endp)
26
                *endp = (char *)cp;
27
        return result;
28
}
29
#endif
30
 
31
void panic_stub(void)
32
{
33
        cprintf("Panic: stub called!!!\n");
34
 
35
        sys_abort(200);                 /* Just a number... */
36
}
37