diff th_string.c @ 451:db45d6d2e576

Expose some of the internal vprintf() implementation helper functions.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 25 Oct 2017 22:20:21 +0300
parents 051226a06f70
children efd33accdc81
line wrap: on
line diff
--- a/th_string.c	Wed Oct 25 22:13:09 2017 +0300
+++ b/th_string.c	Wed Oct 25 22:20:21 2017 +0300
@@ -198,7 +198,7 @@
 #endif
 
 
-static int th_vprintf_put_int_format(th_vprintf_ctx *ctx, th_vprintf_putch vputch,
+int th_vprintf_put_int_format(th_vprintf_ctx *ctx, th_vprintf_putch vputch,
     char *buf, int f_flags, int f_width, int f_prec, int f_len, int vret,
     BOOL f_neg, BOOL f_unsig, char *(f_alt)(const char *buf, const size_t blen, const int vret, const int flags))
 {
@@ -295,7 +295,7 @@
 }
 
 
-static int th_vprintf_put_int(th_vprintf_ctx *ctx, th_vprintf_putch vputch,
+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 char *buf, const size_t blen, const int vret, const int flags))
 {
@@ -321,7 +321,7 @@
 }
 
 
-static int th_vprintf_put_str(th_vprintf_ctx *ctx, th_vprintf_putch vputch,
+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;
@@ -352,7 +352,7 @@
 
 
 #ifdef WIP_FLOAT_SUPPORT
-static int th_vprintf_put_float(th_vprintf_ctx *ctx, th_vprintf_putch vputch,
+int th_vprintf_put_float(th_vprintf_ctx *ctx, th_vprintf_putch vputch,
     va_list ap, int f_flags, int f_width, int f_prec)
 {
     double pval = va_arg(ap, double);   // This needs to be double for type promotion to occur
@@ -373,7 +373,7 @@
 #endif
 
 
-static char * th_vprintf_altfmt_oct(const char *buf, const size_t len, const int vret, const int flags)
+char * th_vprintf_altfmt_oct(const char *buf, const size_t len, const int vret, const int flags)
 {
     (void) vret;
     (void) flags;
@@ -382,7 +382,7 @@
 }
 
 
-static char * th_vprintf_altfmt_hex(const char *buf, const size_t len, const int vret, const int flags)
+char * th_vprintf_altfmt_hex(const char *buf, const size_t len, const int vret, const int flags)
 {
     (void) buf;
     (void) vret;