/* $Header:atoi.c 12.0$ */
/* $ACIS:atoi.c 12.0$ */
/* $Source: /ibm/acis/usr/src/lib/c2_ca/RCS/atoi.c,v $ */

#ifndef lint
static char *rcsid = "$Header:atoi.c 12.0$";
#endif

/* ascii to integer conversion (370 BELL compiler missing this!!) */
/*  (A poor version; ignores overflow and who knows what else) */
int atoi(c)
register char *c;
{
   register int i, sign;
   i = 0;
   sign = 1;
   if(*c == '-')  { c++; sign = -1;}
   while( *c>='0' && *c<='9' )
      i = i*10 + *c++ - '0';
   if (sign>0)  return i;
       else     return -i;
}
