1: /*	@(#)atoi.c	2.1	SCCS id keyword	*/
   2: atoi(p)
   3: register char *p;
   4: {
   5:     register int n;
   6:     register int f;
   7: 
   8:     n = 0;
   9:     f = 0;
  10:     for(;;p++) {
  11:         switch(*p) {
  12:         case ' ':
  13:         case '\t':
  14:             continue;
  15:         case '-':
  16:             f++;
  17:         case '+':
  18:             p++;
  19:         }
  20:         break;
  21:     }
  22:     while(*p >= '0' && *p <= '9')
  23:         n = n*10 + *p++ - '0';
  24:     return(f? -n: n);
  25: }

Defined functions

atoi defined in line 2; used 253 times
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 801
Valid CSS Valid XHTML 1.0 Strict