Logo Search packages:      
Sourcecode: ucspi-unix version File versions  Download package

utoa.c

const char* utoa(unsigned long i)
{
#define LONGLEN (sizeof(unsigned long)*4)
  static char buf[LONGLEN];
  char* ptr = buf + LONGLEN;
  if(!i)
    return "0";
  *--ptr = 0;
  while(i) {
    *--ptr = (i % 10) + '0';
    i /= 10;
  }
  return ptr;
}

Generated by  Doxygen 1.6.0   Back to index