Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

13 lines
352 B

  1. #include "fmt.h"
  2. size_t fmt_ulonglong(char *dest,unsigned long long int i) {
  3. register unsigned long len;
  4. unsigned long long tmp,len2;
  5. /* first count the number of bytes needed */
  6. for (len=1, tmp=i; tmp>9; ++len) tmp/=10;
  7. if (dest)
  8. for (tmp=i, dest+=len, len2=len+1; --len2; tmp/=10)
  9. *--dest = (char)((tmp%10)+'0');
  10. return len;
  11. }