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.
 
 
 
 
 
 

12 lines
227 B

#include <stdio.h>
char * __ultoa_invert(unsigned long val, char *s, int base)
{
switch (base) {
case 8:
return s+sprintf(s, "%lo", val);
case 16:
return s+sprintf(s, "%lx", val);
}
return s+sprintf(s, "%lu", val);
}