]> diplodocus.org Git - nmh/blob - docs/historical/SRI-NOSC/subs.dir/atooi.c
expect this commit to be force-replaced periodically
[nmh] / docs / historical / SRI-NOSC / subs.dir / atooi.c
1 atooi(str)
2 {
3 register char *cp;
4 register int i, base;
5
6 base = 10;
7 i = 0;
8 cp = str;
9 if(*cp == '0')
10 base = 8;
11 while(*cp >= '0' && *cp <= '9') {
12 i =* base;
13 i =+ *cp++ - '0';
14 }
15 return(i);
16 }