home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_01_04 / 1n04038a < prev    next >
Text File  |  1990-07-25  |  221b  |  21 lines

  1.  
  2. Listing 1
  3.  
  4. #include <ctype.h>
  5.  
  6. int atoi(const char s[i])
  7.     {
  8.     int i = 0;
  9.  
  10.     while (isspace(s[i]))
  11.         ++i;
  12.     if (s[i] == '+' || s[i] == '-')
  13.         ++i;
  14.     while (isdigit(s[i]))
  15.         ++i;
  16.     return 0;
  17.     }
  18.  
  19. ----------
  20.  
  21.