Mercurial > hg > th-libs
diff th_string.c @ 568:2fbe42d957c4
Actually, partially revert the previous commit and unbreak the API. Leave
the format specifier code in a separate function tho, it's cleaner.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 08 Jan 2020 02:25:04 +0200 |
parents | b75f42ca08ef |
children | 390c66af09cf |
line wrap: on
line diff
--- a/th_string.c Wed Jan 08 02:17:37 2020 +0200 +++ b/th_string.c Wed Jan 08 02:25:04 2020 +0200 @@ -157,7 +157,7 @@ ctx.pos = 0; ctx.ipos = 0; - ret = th_vprintf_do(&ctx, th_pbuf_vputch, th_vprintf_do_format, fmt, ap); + ret = th_vprintf_do(&ctx, th_pbuf_vputch, fmt, ap); if (ctx.pos < size) buf[ctx.pos] = 0; @@ -205,7 +205,7 @@ ctx.pos = 0; ctx.ipos = 0; - return th_vprintf_do(&ctx, th_stdio_vputch, th_vprintf_do_format, fmt, ap); + return th_vprintf_do(&ctx, th_stdio_vputch, fmt, ap); #else return vfprintf(fh, fmt, ap); #endif @@ -226,7 +226,7 @@ ctx.pos = 0; ctx.ipos = 0; - ret = th_vprintf_do(&ctx, th_stdio_vputch, th_vprintf_do_format, fmt, ap); + ret = th_vprintf_do(&ctx, th_stdio_vputch, fmt, ap); #else ret = fprintf(fh, fmt, ap); #endif @@ -263,7 +263,7 @@ // Get size va_copy(ap, args); ctx.pos = 0; - th_vprintf_do(&ctx, th_pbuf_alloc_vputch1, th_vprintf_do_format, fmt, ap); + th_vprintf_do(&ctx, th_pbuf_alloc_vputch1, fmt, ap); va_end(ap); // Allocate memory @@ -273,7 +273,7 @@ va_copy(ap, args); ctx.pos = 0; - th_vprintf_do(&ctx, th_pbuf_alloc_vputch2, th_vprintf_do_format, fmt, ap); + th_vprintf_do(&ctx, th_pbuf_alloc_vputch2, fmt, ap); va_end(ap); ctx.buf[ctx.pos] = 0;