Mercurial > hg > th-libs
diff th_printf.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 | ccff3eb8dbb6 |
line wrap: on
line diff
--- a/th_printf.c Wed Jan 08 02:17:37 2020 +0200 +++ b/th_printf.c Wed Jan 08 02:25:04 2020 +0200 @@ -393,8 +393,7 @@ } -int th_vprintf_do(th_vprintf_ctx *ctx, th_vprintf_putch vputch, - th_vprintf_format vformat, const char *fmt, va_list ap) +int th_vprintf_do(th_vprintf_ctx *ctx, th_vprintf_putch vputch, const char *fmt, va_list ap) { int ret = 0; @@ -507,10 +506,11 @@ case 'j': case 'z': case 't': + // Unsupported for now return -202; } - ret = vformat(ctx, vputch, f_width, f_prec, f_flags, *fmt, ap); + ret = th_vprintf_do_format(ctx, vputch, f_width, f_prec, f_flags, *fmt, ap); if (ret == EOF) goto out; if (ret < 0)