Mercurial > hg > th-libs
diff th_printf1.c @ 661:7f1efa37288b
Rename TH_PFUNC_* macros to TH_VPRINTF_INTFMT_*
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 27 Jan 2020 06:09:57 +0200 |
parents | 3a852e9f70a6 |
children | 4ca6a3b30fe8 |
line wrap: on
line diff
--- a/th_printf1.c Mon Jan 27 06:02:22 2020 +0200 +++ b/th_printf1.c Mon Jan 27 06:09:57 2020 +0200 @@ -7,10 +7,10 @@ */ -int TH_PFUNC_NAME (char *buf, const int len, int *pos, - TH_PFUNC_TYPE_S pval, const int f_radix, const BOOL f_upcase, +int TH_VPRINTF_INTFMT_NAME (char *buf, const int len, int *pos, + TH_VPRINTF_INTFMT_TYPE_S pval, const int f_radix, const BOOL f_upcase, const BOOL f_unsig, BOOL *f_neg) -#ifdef TH_PFUNC_HEADER +#ifdef TH_VPRINTF_INTFMT_HEADER ; #else { @@ -27,7 +27,7 @@ *f_neg = FALSE; // Render the value to a string in buf (reversed) - TH_PFUNC_TYPE_U val = pval; + TH_VPRINTF_INTFMT_TYPE_U val = pval; // Special case for value of 0. This would seem like a // dirty kludge, but allows us to handle NULL ptr (nul) @@ -39,7 +39,7 @@ *pos = 0; do { - TH_PFUNC_TYPE_U digit = val % f_radix; + TH_VPRINTF_INTFMT_TYPE_U digit = val % f_radix; if (digit < 10) buf[*pos] = '0' + digit; @@ -57,8 +57,8 @@ #endif -#undef TH_PFUNC_NAME -#undef TH_PFUNC_SIGNED -#undef TH_PFUNC_TYPE_S -#undef TH_PFUNC_TYPE_U -#undef TH_PFUNC_HEADER +#undef TH_VPRINTF_INTFMT_NAME +#undef TH_VPRINTF_INTFMT_SIGNED +#undef TH_VPRINTF_INTFMT_TYPE_S +#undef TH_VPRINTF_INTFMT_TYPE_U +#undef TH_VPRINTF_INTFMT_HEADER