1 /* $XConsortium: itoa.c /main/3 1995/11/08 09:52:04 rswiston $ */
2 /* From example in Kernighan and Ritchie, The C Programming Language,
20 char *m_itoa(n, s) /* convert n to characters in s */
27 if ( (sign = n) < 0 ) /* record sign */
29 do { /* generate digits in reverse order */
30 *p++ = (char) (n % 10 + '0') ;
31 } while (( n/= 10) > 0);
45 for (i=0, j=strlen(s)-1; i < j ; i++, j--) {