1: /* m_atoi.c - parse a string representation of a message number */
   2: 
   3: #include "../h/mh.h"
   4: 
   5: 
   6: m_atoi (str)
   7: register char *str;
   8: {
   9:     register int    i;
  10:     register char  *cp;
  11: 
  12:     i = 0;
  13:     cp = str;
  14:     while (*cp) {
  15:     if (*cp < '0' || *cp > '9')
  16:         return 0;
  17:     i *= 10;
  18:     i += *cp++ - '0';
  19:     }
  20: 
  21:     return i;
  22: }

Defined functions

m_atoi defined in line 6; used 6 times
Last modified: 1985-11-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 803
Valid CSS Valid XHTML 1.0 Strict