Mercurial > hg > th-libs
changeset 765:c9a6fe116453
Invert some preprocessor conditions for clarity.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 10 Feb 2023 01:03:22 +0200 |
parents | 0abba6091bd1 |
children | 6c06cf786789 |
files | th_printf.c th_printf1.c th_string.h |
diffstat | 3 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/th_printf.c Thu Feb 09 23:59:00 2023 +0200 +++ b/th_printf.c Fri Feb 10 01:03:22 2023 +0200 @@ -102,6 +102,7 @@ } +#define TH_VPRINTF_INTFMT_IMPL 1 #define TH_VPRINTF_INTFMT_NAME th_vprintf_buf_int #define TH_VPRINTF_INTFMT_TYPE_S int #define TH_VPRINTF_INTFMT_TYPE_U unsigned int
--- a/th_printf1.c Thu Feb 09 23:59:00 2023 +0200 +++ b/th_printf1.c Fri Feb 10 01:03:22 2023 +0200 @@ -10,7 +10,7 @@ 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_VPRINTF_INTFMT_HEADER +#ifndef TH_VPRINTF_INTFMT_IMPL ; #else { @@ -61,4 +61,3 @@ #undef TH_VPRINTF_INTFMT_SIGNED #undef TH_VPRINTF_INTFMT_TYPE_S #undef TH_VPRINTF_INTFMT_TYPE_U -#undef TH_VPRINTF_INTFMT_HEADER
--- a/th_string.h Thu Feb 09 23:59:00 2023 +0200 +++ b/th_string.h Fri Feb 10 01:03:22 2023 +0200 @@ -198,14 +198,12 @@ #define TH_VPRINTF_INTFMT_NAME th_vprintf_buf_int #define TH_VPRINTF_INTFMT_TYPE_S int #define TH_VPRINTF_INTFMT_TYPE_U unsigned int -#define TH_VPRINTF_INTFMT_HEADER 1 #include "th_printf1.c" #define TH_VPRINTF_INTFMT_NAME th_vprintf_buf_int64 #define TH_VPRINTF_INTFMT_TYPE_S int64_t #define TH_VPRINTF_INTFMT_TYPE_U uint64_t -#define TH_VPRINTF_INTFMT_HEADER 1 #include "th_printf1.c"