Mercurial > hg > th-libs
changeset 335:11d97063d6dd
Mostly cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 23 Feb 2016 14:59:07 +0200 |
parents | b90173719330 |
children | cda5a2aebbb6 |
files | th_string.c |
diffstat | 1 files changed, 4 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/th_string.c Tue Feb 23 13:52:12 2016 +0200 +++ b/th_string.c Tue Feb 23 14:59:07 2016 +0200 @@ -211,11 +211,6 @@ #include "th_printf1.c" -//#define TH_PFUNC_NAME th_printf_vput_size_t -//#define TH_PFUNC_TYPE_U size_t -//#include "th_printf1.c" - - static int th_printf_vput_str(th_printf_ctx *ctx, th_printf_vputch vputch, const char *str, int f_flags, const int f_width, const int f_prec) { @@ -230,24 +225,23 @@ f_len = strlen(str); if (f_prec >= 0 && f_len > f_prec) f_len = f_prec; - + nwidth = f_width - f_len; // Prefix padding? if ((ret = th_printf_pad_pre(ctx, vputch, nwidth, f_flags)) == EOF) - goto out; + return ret; while (*str && f_len--) { if ((ret = vputch(ctx, *str++)) == EOF) - goto out; + return ret; } // Postfix padding? if ((ret = th_printf_pad_post(ctx, vputch, nwidth, f_flags)) == EOF) - goto out; + return ret; -out: return ret; }