ftp.nice.ch/pub/next/unix/mail/mh.6.7.s.tar.gz#/mh/sbr/atooi.c

This is atooi.c in view mode; [Download] [Up]

/* atooi.c - octal version of atoi() */


int atooi(cp)
register char *cp;
{
    register int    i,
                    base;

    i = 0;
    base = 8;
    while (*cp >= '0' && *cp <= '7') {
	i *= base;
	i += *cp++ - '0';
    }

    return i;
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.