|
|
1.1 root 1: long
2: atol(p)
3: register char *p;
4: {
5: long n;
6: register int f;
7:
8: n = 0;
9: f = 0;
10: for(;;p++) {
11: switch(*p) {
12: case ' ':
13: case '\t':
14: continue;
15: case '-':
16: f++;
17: case '+':
18: p++;
19: }
20: break;
21: }
22: while(*p >= '0' && *p <= '9')
23: n = n*10 + *p++ - '0';
24: return(f? -n: n);
25: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.