long
atol(str)
register char *str;
{	int	positive = 1;
	register int d;
	long	n = 0;

	while (*str == ' ' || *str == '\t')
		str++;
	if (*str == '+')
		str++;
	else if (*str == '-')
		positive = 0, str++;

	while ((d = *str++ - '0') >= 0 && d <= 9)
		n = 10 * n + d;
	return positive ? n : -n;
}



