| 815 | } |
| 816 | |
| 817 | char * |
| 818 | SDL_ulltoa(Uint64 value, char *string, int radix) |
| 819 | { |
| 820 | #if defined(HAVE__UI64TOA) |
| 821 | return _ui64toa(value, string, radix); |
| 822 | #else |
| 823 | char *bufp = string; |
| 824 | |
| 825 | if (value) { |
| 826 | while (value > 0) { |
| 827 | *bufp++ = ntoa_table[value % radix]; |
| 828 | value /= radix; |
| 829 | } |
| 830 | } else { |
| 831 | *bufp++ = '0'; |
| 832 | } |
| 833 | *bufp = '\0'; |
| 834 | |
| 835 | /* The numbers went into the string backwards. :) */ |
| 836 | SDL_strrev(string); |
| 837 | |
| 838 | return string; |
| 839 | #endif /* HAVE__UI64TOA */ |
| 840 | } |
| 841 | |
| 842 | int SDL_atoi(const char *string) |
| 843 | { |
no test coverage detected