changeset 374:1d8ae82304ec

Rename s/th_printf_ctx/th_vprintf_cts/g.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 29 Feb 2016 16:12:10 +0200
parents 22fb23dc8c9b
children 04a273cce4fa
files th_string.c th_string.h
diffstat 2 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Mon Feb 29 15:49:07 2016 +0200
+++ b/th_string.c	Mon Feb 29 16:12:10 2016 +0200
@@ -111,7 +111,7 @@
 //
 // Simple implementations of printf() type functions
 //
-static int th_vprintf_put_pstr(th_printf_ctx *ctx, th_vprintf_putch vputch, const char *str)
+static int th_vprintf_put_pstr(th_vprintf_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_vprintf_putch vputch, int count, const char ch)
+static int th_vprintf_put_repch(th_vprintf_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_vprintf_putch vputch,
+static int th_printf_pad_pre(th_vprintf_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_vprintf_putch vputch,
+static int th_printf_pad_post(th_vprintf_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_vprintf_putch vputch,
+static int th_vprintf_put_int(th_vprintf_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_vprintf_putch vputch,
+static int th_vprintf_put_str(th_vprintf_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_vprintf_putch vputch, const char *fmt, va_list ap)
+int th_vprintf_do(th_vprintf_ctx *ctx, th_vprintf_putch vputch, const char *fmt, va_list ap)
 {
     int ret = 0;
 
@@ -466,7 +466,7 @@
 
 
 #ifdef TH_USE_INTERNAL_SPRINTF
-static int th_pbuf_vputch(th_printf_ctx *ctx, const char ch)
+static int th_pbuf_vputch(th_vprintf_ctx *ctx, const char ch)
 {
     if (ctx->pos < ctx->size)
         ctx->buf[ctx->pos] = ch;
@@ -477,7 +477,7 @@
 }
 
 
-static int th_stdio_vputch(th_printf_ctx *ctx, const char ch)
+static int th_stdio_vputch(th_vprintf_ctx *ctx, const char ch)
 {
     ctx->pos++;
     ctx->ipos++;
@@ -490,7 +490,7 @@
 {
 #ifdef TH_USE_INTERNAL_SPRINTF
     int ret;
-    th_printf_ctx ctx;
+    th_vprintf_ctx ctx;
     ctx.buf = buf;
     ctx.size = size;
     ctx.pos = 0;
@@ -529,7 +529,7 @@
 int th_vfprintf(FILE *fh, const char *fmt, va_list ap)
 {
 #ifdef TH_USE_INTERNAL_SPRINTF
-    th_printf_ctx ctx;
+    th_vprintf_ctx ctx;
     ctx.data = (void *) fh;
     ctx.pos = 0;
     ctx.ipos = 0;
@@ -545,7 +545,7 @@
 {
     int ret;
 #ifdef TH_USE_INTERNAL_SPRINTF
-    th_printf_ctx ctx;
+    th_vprintf_ctx ctx;
 #endif
     va_list ap;
     va_start(ap, fmt);
--- a/th_string.h	Mon Feb 29 15:49:07 2016 +0200
+++ b/th_string.h	Mon Feb 29 16:12:10 2016 +0200
@@ -72,10 +72,10 @@
     size_t size, pos;
     int ipos;
     void *data;
-} th_printf_ctx;
+} th_vprintf_ctx;
 
 
-typedef int (*th_vprintf_putch)(th_printf_ctx *ctx, const char ch);
+typedef int (*th_vprintf_putch)(th_vprintf_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_vprintf_putch vputch, const char *fmt, va_list ap);
+int     th_vprintf_do(th_vprintf_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);