# HG changeset patch # User Matti Hamalainen # Date 1456232347 -7200 # Node ID 11d97063d6ddb183c83a41318faab13fac4d40fa # Parent b90173719330865f66bfe1f281e987f33c2e6388 Mostly cosmetics. diff -r b90173719330 -r 11d97063d6dd th_string.c --- 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; }