Mercurial > hg > th-libs
changeset 358:a224327ad94e
More work.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 25 Feb 2016 10:58:48 +0200 |
parents | 77201824790c |
children | 9ca9ef4e3656 |
files | th_string.c |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/th_string.c Thu Feb 25 09:49:53 2016 +0200 +++ b/th_string.c Thu Feb 25 10:58:48 2016 +0200 @@ -191,7 +191,6 @@ return ret; f_altstr = ret != 0 && (f_flags & TH_PF_ALT) && f_alt != NULL ? f_alt(f_flags) : NULL; - if (f_flags & TH_PF_ALT) f_width = 0; // Are we using a sign prefix? f_sign = f_unsig ? 0 : ((f_flags & TH_PF_SIGN) ? @@ -236,8 +235,6 @@ { int nwidth, f_len, ret = 0; - f_flags &= ~TH_PF_ZERO; - // Check for null strings if (str == NULL) str = "(null)"; @@ -409,12 +406,10 @@ case 'p': #if (TH_PTRSIZE == 32) f_flags = TH_PF_LONG; - f_prec = 4*2; #elif (TH_PTRSIZE == 64) f_flags = TH_PF_LONGLONG; - f_prec = 8*2; #endif -// f_flags |= TH_PF_ZERO; + f_flags |= TH_PF_ALT; if ((ret = th_printf_vput_int(ctx, vputch, ap, 16, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_hex)) == EOF) goto out; break;