Mercurial > hg > th-libs
diff th_printf1.c @ 453:efd33accdc81
Break backwards compatibility by renaming BOOL, TRUE and FALSE to lowercase.
Introduce optional but default use of stdbool.h.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 02 Jan 2018 22:56:03 +0200 |
parents | db45d6d2e576 |
children | 347bfd3e017e |
line wrap: on
line diff
--- a/th_printf1.c Wed Oct 25 22:32:07 2017 +0300 +++ b/th_printf1.c Tue Jan 02 22:56:03 2018 +0200 @@ -8,8 +8,8 @@ int TH_PFUNC_NAME (char *buf, const int len, int *pos, - TH_PFUNC_TYPE_S pval, const int f_radix, const BOOL f_upcase, - const BOOL f_unsig, BOOL *f_neg) + TH_PFUNC_TYPE_S pval, const int f_radix, const bool f_upcase, + const bool f_unsig, bool *f_neg) #ifdef TH_PFUNC_HEADER ; #else @@ -20,11 +20,11 @@ // Check for negative value if (!f_unsig && pval < 0) { - *f_neg = TRUE; + *f_neg = true; pval = -pval; } else - *f_neg = FALSE; + *f_neg = false; // Render the value to a string in buf (reversed) TH_PFUNC_TYPE_U val = pval;