# HG changeset patch # User Matti Hamalainen # Date 1456383973 -7200 # Node ID b040dc0f77cfe848fad6715f0f735832cbda7803 # Parent 19d4b3a1a37cf32f007dbd33aa8cf8b70a7d7c61 Rename internal helper functions th_printf_altfmt_{x,o} to th_printf_altfmt_{hex,oct} diff -r 19d4b3a1a37c -r b040dc0f77cf th_string.c --- a/th_string.c Thu Feb 25 08:54:40 2016 +0200 +++ b/th_string.c Thu Feb 25 09:06:13 2016 +0200 @@ -275,14 +275,14 @@ } -static char * th_printf_altfmt_o(const int flags) +static char * th_printf_altfmt_oct(const int flags) { (void) flags; return "0"; } -static char * th_printf_altfmt_x(const int flags) +static char * th_printf_altfmt_hex(const int flags) { return (flags & TH_PF_UPCASE) ? "0X" : "0x"; } @@ -396,7 +396,7 @@ break; case 'o': - if ((ret = th_printf_vput_int(ctx, vputch, ap, 8, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_o)) == EOF) + if ((ret = th_printf_vput_int(ctx, vputch, ap, 8, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_oct)) == EOF) goto out; break; @@ -411,7 +411,7 @@ case 'X': if (*fmt == 'X') f_flags |= TH_PF_UPCASE; - if ((ret = th_printf_vput_int(ctx, vputch, ap, 16, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_x)) == EOF) + 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; @@ -424,7 +424,7 @@ f_prec = 8*2; #endif // f_flags |= TH_PF_ZERO; - if ((ret = th_printf_vput_int(ctx, vputch, ap, 16, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_x)) == EOF) + 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;