2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 /* $Id: atol.c,v 1.5 1994/06/24 11:53:23 ceriel Exp $ */
9 /* We do not use strtol here for backwards compatibility in behaviour on
13 atol(register const char *nptr)
18 while (isspace(*nptr)) nptr++;
19 if (*nptr == '+') nptr++;
20 else if (*nptr == '-') {
24 while (isdigit(*nptr)) {
26 total += (*nptr++ - '0');
28 return minus ? -total : total;