Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / sbr / atooi.c
1 /* atooi.c - octal version of atoi() */
2
3
4 int atooi(cp)
5 register char *cp;
6 {
7     register int    i,
8                     base;
9
10     i = 0;
11     base = 8;
12     while (*cp >= '0' && *cp <= '7') {
13         i *= base;
14         i += *cp++ - '0';
15     }
16
17     return i;
18 }