1: /*	@(#)atol.c	2.1	SCCS id keyword	*/
   2: long
   3: atol(p)
   4: register char *p;
   5: {
   6:     long n;
   7:     register int f;
   8: 
   9:     n = 0;
  10:     f = 0;
  11:     for(;;p++) {
  12:         switch(*p) {
  13:         case ' ':
  14:         case '\t':
  15:             continue;
  16:         case '-':
  17:             f++;
  18:         case '+':
  19:             p++;
  20:         }
  21:         break;
  22:     }
  23:     while(*p >= '0' && *p <= '9')
  24:         n = n*10 + *p++ - '0';
  25:     return(f? -n: n);
  26: }
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 637
Valid CSS Valid XHTML 1.0 Strict