Mercurial > hg > th-libs
changeset 614:afcaf5e38f56
Disable regex stuff from normal builds.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 16 Jan 2020 18:45:41 +0200 |
parents | 2e3b81ae8c8a |
children | b87395754c8d |
files | Makefile.gen tests.c th_regex.c |
diffstat | 3 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.gen Thu Jan 16 16:01:27 2020 +0200 +++ b/Makefile.gen Thu Jan 16 18:45:41 2020 +0200 @@ -8,7 +8,7 @@ CFLAGS += -DTH_USE_INTERNAL_SPRINTF=1 CFLAGS += -DTH_PRINTF_DEBUG=1 CFLAGS += -DTH_USE_OPT_ARG=1 -CFLAGS += -DTH_EXPERIMENTAL_REGEX=1 +#CFLAGS += -DTH_EXPERIMENTAL_REGEX=1 THLIBS = ./
--- a/tests.c Thu Jan 16 16:01:27 2020 +0200 +++ b/tests.c Thu Jan 16 18:45:41 2020 +0200 @@ -561,6 +561,8 @@ } +#ifdef TH_EXPERIMENTAL_REGEX + typedef struct { th_regex_char *str; @@ -617,6 +619,8 @@ th_regex_free(reg); } +#endif + int main(int argc, char *argv[]) { @@ -871,6 +875,7 @@ // // Regular expressions // +#ifdef TH_EXPERIMENTAL_REGEX if (test_set_start("Regular expressions")) { th_regex_ctx *reg = NULL; @@ -935,6 +940,7 @@ test_regex_list(tlist, "zoo.*?bar"); } } +#endif // // Print summary and exit
--- a/th_regex.c Thu Jan 16 16:01:27 2020 +0200 +++ b/th_regex.c Thu Jan 16 18:45:41 2020 +0200 @@ -5,10 +5,8 @@ * * Please read file 'COPYING' for information on license and distribution. */ -#ifdef TH_EXPERIMENTAL_REGEX #include "th_util.h" #include "th_regex.h" -//#include "th_datastruct.h" //#define DBG_RE_COMPILE 1 @@ -31,6 +29,7 @@ # define DBG_RE_PRINT_MATCH(...) do { } while (0) #endif +#ifdef TH_EXPERIMENTAL_REGEX enum {