Annotation of 43BSD/contrib/mh/sbr/atooi.c, revision 1.1

1.1     ! root        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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.