MCPcopy Create free account
hub / github.com/aldostools/webMAN-MOD / convert

Function convert

printf.c:781–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779}
780
781static int
782convert(UINTMAX_T value, char *buf, size_t size, int base, int caps)
783{
784 const char *digits = caps ? "0123456789ABCDEF" : "0123456789abcdef";
785 size_t pos = 0;
786
787 /* We return an unterminated buffer with the digits in reverse order. */
788 do {
789 buf[pos++] = digits[value % base];
790 value /= base;
791 } while (value != 0 && pos < size);
792
793 return (int)pos;
794}
795
796int vsprintf(char *buf, const char *fmt, va_list args)
797{

Callers 1

fmtintFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected