changeset 373:22fb23dc8c9b

Rename functions s/th_printf_vput/th_vprintf_put/g.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 29 Feb 2016 15:49:07 +0200
parents 3d32a0c72dc7
children 1d8ae82304ec
files th_string.c th_string.h
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Mon Feb 29 15:26:55 2016 +0200
+++ b/th_string.c	Mon Feb 29 15:49:07 2016 +0200
@@ -111,7 +111,7 @@
 //
 // Simple implementations of printf() type functions
 //
-static int th_vprintf_put_pstr(th_printf_ctx *ctx, th_printf_vputch vputch, const char *str)
+static int th_vprintf_put_pstr(th_printf_ctx *ctx, th_vprintf_putch vputch, const char *str)
 {
     while (*str)
     {
@@ -123,7 +123,7 @@
 }
 
 
-static int th_vprintf_put_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_vprintf_putch vputch, int count, const char ch)
 {
     while (count-- > 0)
     {
@@ -135,7 +135,7 @@
 }
 
 
-static int th_printf_pad_pre(th_printf_ctx *ctx, th_printf_vputch vputch,
+static int th_printf_pad_pre(th_printf_ctx *ctx, th_vprintf_putch vputch,
     int f_width, const int f_flags)
 {
     if (f_width > 0 && (f_flags & TH_PF_LEFT) == 0)
@@ -145,7 +145,7 @@
 }
 
 
-static int th_printf_pad_post(th_printf_ctx *ctx, th_printf_vputch vputch,
+static int th_printf_pad_post(th_printf_ctx *ctx, th_vprintf_putch vputch,
     int f_width, const int f_flags)
 {
     if (f_width > 0 && (f_flags & TH_PF_LEFT))
@@ -167,7 +167,7 @@
 #include "th_printf1.c"
 
 
-static int th_vprintf_put_int(th_printf_ctx *ctx, th_printf_vputch vputch,
+static int th_vprintf_put_int(th_printf_ctx *ctx, th_vprintf_putch 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))
 {
@@ -250,7 +250,7 @@
 }
 
 
-static int th_vprintf_put_str(th_printf_ctx *ctx, th_printf_vputch vputch,
+static int th_vprintf_put_str(th_printf_ctx *ctx, th_vprintf_putch vputch,
     const char *str, int f_flags, const int f_width, const int f_prec)
 {
     int nwidth, f_len, ret = 0;
@@ -293,7 +293,7 @@
 }
 
 
-int th_vprintf_do(th_printf_ctx *ctx, th_printf_vputch vputch, const char *fmt, va_list ap)
+int th_vprintf_do(th_printf_ctx *ctx, th_vprintf_putch vputch, const char *fmt, va_list ap)
 {
     int ret = 0;
 
@@ -438,7 +438,7 @@
                 case 'F':
                     return -112;
 /*
-                    if ((ret = th_vput_float(ctx, vputch, va_arg(ap, double),
+                    if ((ret = th_vprintf_put_float(ctx, vputch, ap,
                         f_flags, f_width, f_prec)) == EOF)
                         goto out;
                     break;
--- a/th_string.h	Mon Feb 29 15:26:55 2016 +0200
+++ b/th_string.h	Mon Feb 29 15:49:07 2016 +0200
@@ -75,7 +75,7 @@
 } th_printf_ctx;
 
 
-typedef int (*th_printf_vputch)(th_printf_ctx *ctx, const char ch);
+typedef int (*th_vprintf_putch)(th_printf_ctx *ctx, const char ch);
 
 
 /* Normal NUL-terminated string functions
@@ -90,7 +90,7 @@
 char    *th_strrcasecmp(char *haystack, const char *needle);
 void    th_strip_ctrlchars(char *str);
 
-int     th_vprintf_do(th_printf_ctx *ctx, th_printf_vputch vputch, const char *fmt, va_list ap);
+int     th_vprintf_do(th_printf_ctx *ctx, th_vprintf_putch vputch, const char *fmt, va_list ap);
 int     th_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap);
 int     th_snprintf(char *buf, size_t size, const char *fmt, ...);
 int     th_vfprintf(FILE *fh, const char *fmt, va_list ap);