changeset 369:f26290f8d35e

Rename some internal functions.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 29 Feb 2016 13:17:37 +0200
parents 51a04243a5f6
children f6b9991d76ed
files th_string.c
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Mon Feb 29 13:16:49 2016 +0200
+++ b/th_string.c	Mon Feb 29 13:17:37 2016 +0200
@@ -111,7 +111,7 @@
 //
 // Simple implementations of printf() type functions
 //
-static int th_printf_vput_pstr(th_printf_ctx *ctx, th_printf_vputch vputch, const char *str)
+static int th_vprintf_put_pstr(th_printf_ctx *ctx, th_printf_vputch vputch, const char *str)
 {
     while (*str)
     {
@@ -123,7 +123,7 @@
 }
 
 
-static int th_printf_vput_repch(th_printf_ctx *ctx, th_printf_vputch vputch, int count, const char ch)
+static int th_vprintf_put_repch(th_printf_ctx *ctx, th_printf_vputch vputch, int count, const char ch)
 {
     while (count-- > 0)
     {
@@ -139,7 +139,7 @@
     int f_width, const int f_flags)
 {
     if (f_width > 0 && (f_flags & TH_PF_LEFT) == 0)
-        return th_printf_vput_repch(ctx, vputch, f_width, ' ');
+        return th_vprintf_put_repch(ctx, vputch, f_width, ' ');
     else
         return 0;
 }
@@ -149,7 +149,7 @@
     int f_width, const int f_flags)
 {
     if (f_width > 0 && (f_flags & TH_PF_LEFT))
-        return th_printf_vput_repch(ctx, vputch, f_width, ' ');
+        return th_vprintf_put_repch(ctx, vputch, f_width, ' ');
     else
         return 0;
 }
@@ -167,7 +167,7 @@
 #include "th_printf1.c"
 
 
-static int th_printf_vput_int(th_printf_ctx *ctx, th_printf_vputch vputch,
+static int th_vprintf_put_int(th_printf_ctx *ctx, th_printf_vputch vputch,
     va_list ap, const int f_radix, int f_flags, int f_width, int f_prec,
     const BOOL f_unsig, char *(f_alt)(const int flags))
 {
@@ -222,10 +222,10 @@
     if (f_sign && (ret = vputch(ctx, f_sign)) == EOF)
         return ret;
 
-    if (f_altstr && (ret = th_printf_vput_pstr(ctx, vputch, f_altstr)) == EOF)
+    if (f_altstr && (ret = th_vprintf_put_pstr(ctx, vputch, f_altstr)) == EOF)
         return ret;
 
-    if (f_prec > 0 && (ret = th_printf_vput_repch(ctx, vputch, f_prec, '0')) == EOF)
+    if (f_prec > 0 && (ret = th_vprintf_put_repch(ctx, vputch, f_prec, '0')) == EOF)
         return ret;
 
     // Output the value
@@ -240,7 +240,7 @@
 }
 
 
-static int th_printf_vput_str(th_printf_ctx *ctx, th_printf_vputch vputch,
+static int th_vprintf_put_str(th_printf_ctx *ctx, th_printf_vputch vputch,
     const char *str, int f_flags, const int f_width, const int f_prec)
 {
     int nwidth, f_len, ret = 0;
@@ -391,14 +391,14 @@
                     break;
 
                 case 'o':
-                    if ((ret = th_printf_vput_int(ctx, vputch, ap, 8, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_oct)) == EOF)
+                    if ((ret = th_vprintf_put_int(ctx, vputch, ap, 8, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_oct)) == EOF)
                         goto out;
                     break;
 
                 case 'u':
                 case 'i':
                 case 'd':
-                    if ((ret = th_printf_vput_int(ctx, vputch, ap, 10, f_flags, f_width, f_prec, *fmt == 'u', NULL)) == EOF)
+                    if ((ret = th_vprintf_put_int(ctx, vputch, ap, 10, f_flags, f_width, f_prec, *fmt == 'u', NULL)) == EOF)
                         goto out;
                     break;
 
@@ -406,7 +406,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_hex)) == EOF)
+                    if ((ret = th_vprintf_put_int(ctx, vputch, ap, 16, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_hex)) == EOF)
                         goto out;
                     break;
 
@@ -417,7 +417,7 @@
                     f_flags |= TH_PF_LONGLONG;
 #endif
                     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)
+                    if ((ret = th_vprintf_put_int(ctx, vputch, ap, 16, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_hex)) == EOF)
                         goto out;
                     break;
 
@@ -432,7 +432,7 @@
 */
 
                 case 's':
-                    if ((ret = th_printf_vput_str(ctx, vputch, va_arg(ap, char *),
+                    if ((ret = th_vprintf_put_str(ctx, vputch, va_arg(ap, char *),
                         f_flags, f_width, f_prec)) == EOF)
                         goto out;
                     break;