1: #if defined(LIBC_SCCS) && !defined(lint)
   2: static char sccsid[] = "@(#)atoi.c	5.2 (Berkeley) 3/9/86";
   3: #endif LIBC_SCCS and not lint
   4: 
   5: atoi(p)
   6: register char *p;
   7: {
   8:     register int n;
   9:     register int f;
  10: 
  11:     n = 0;
  12:     f = 0;
  13:     for(;;p++) {
  14:         switch(*p) {
  15:         case ' ':
  16:         case '\t':
  17:             continue;
  18:         case '-':
  19:             f++;
  20:         case '+':
  21:             p++;
  22:         }
  23:         break;
  24:     }
  25:     while(*p >= '0' && *p <= '9')
  26:         n = n*10 + *p++ - '0';
  27:     return(f? -n: n);
  28: }

Defined functions

atoi defined in line 5; used 722 times

Defined variables

sccsid defined in line 2; never used
Last modified: 1986-03-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1337
Valid CSS Valid XHTML 1.0 Strict