changeset 351:b040dc0f77cf

Rename internal helper functions th_printf_altfmt_{x,o} to th_printf_altfmt_{hex,oct}
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 25 Feb 2016 09:06:13 +0200
parents 19d4b3a1a37c
children 75b20d9bef64
files th_string.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;