kernel/util.c
/*
 * Converts int to ascii (hence itoa)
 */
Converts int to ascii (hence itoa)
Converts int to ascii ( hence itoa )
void itoa(int n, char str[]) {
  int i, sign;
  if ((sign = n) < 0) {
    n = -n;
  }
  i = 0;
  do {
    str[i++] = n % 10 + '0';
  } while ((n /= 10) > 0);
  if (sign < 0) {
    str[i++] = '-';
  }
  str[i] = '\0';
}
void itoa ( int n , char str [ ] ) { int i , sign ; if ( ( sign = n ) < 0 ) { n = - n ; } i = 0 ; do { str [ i ++ ] = n % 10 + ' ' ; } while ( ( n /= 10 ) > 0 ) ; if ( sign < 0 ) { str [ i ++ ] = ' ' ; } str [ i ] = ' \0 ' ; }
Converts int to ascii (hence itoa)
Converts int to ascii ( hence itoa )