home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / kn / sockcommon / itoa.c < prev    next >
Encoding:
Text File  |  2001-05-12  |  178 b   |  16 lines

  1.  
  2. /* 
  3. **    render integer to string in decimal notation
  4. */
  5.  
  6. char *kn_itoa(int i, char *d)
  7. {
  8.     if (i > 9)
  9.     {
  10.         d = kn_itoa(i / 10, d);
  11.     }
  12.     *d++ = 48 + (i % 10);
  13.     *d = 0;
  14.     return d;
  15. }
  16.