# HG changeset patch # User Matti Hamalainen # Date 1675983802 -7200 # Node ID c9a6fe1164539bc305af17bad45da4ba28330dae # Parent 0abba6091bd1a218637b12de5751e48209f7a00f Invert some preprocessor conditions for clarity. diff -r 0abba6091bd1 -r c9a6fe116453 th_printf.c --- 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 diff -r 0abba6091bd1 -r c9a6fe116453 th_printf1.c --- 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 diff -r 0abba6091bd1 -r c9a6fe116453 th_string.h --- 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"