diff options
author | David Robillard <d@drobilla.net> | 2021-01-01 18:02:52 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-01-01 18:59:14 +0100 |
commit | e359b144ba32139a8d62d34e9c10cdf494b8360b (patch) | |
tree | 8b74109140994c6a25adaa42ff774630a91a5c5e /src/sord_validate.c | |
parent | 87aca493cd6ad0ffc49a896c9f8342d52ad6aa96 (diff) | |
download | sord-e359b144ba32139a8d62d34e9c10cdf494b8360b.tar.gz sord-e359b144ba32139a8d62d34e9c10cdf494b8360b.tar.bz2 sord-e359b144ba32139a8d62d34e9c10cdf494b8360b.zip |
Remove the need for a generated configuration header
Diffstat (limited to 'src/sord_validate.c')
-rw-r--r-- | src/sord_validate.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sord_validate.c b/src/sord_validate.c index 0acb0a4..fffc6a1 100644 --- a/src/sord_validate.c +++ b/src/sord_validate.c @@ -1,5 +1,5 @@ /* - Copyright 2012-2017 David Robillard <http://drobilla.net> + Copyright 2012-2021 David Robillard <http://drobilla.net> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -21,9 +21,10 @@ #include "sord/sord.h" #include "sord_config.h" -#ifdef HAVE_PCRE +#if USE_PCRE # include <pcre.h> #endif + #ifdef _WIN32 # include <windows.h> #endif @@ -190,7 +191,7 @@ is_descendant_of(SordModel* model, static bool regexp_match(const uint8_t* pat, const char* str) { -#ifdef HAVE_PCRE +#if USE_PCRE // Append a $ to the pattern so we only match if the entire string matches const size_t len = strlen((const char*)pat); char* const regx = (char*)malloc(len + 2); @@ -211,7 +212,7 @@ regexp_match(const uint8_t* pat, const char* str) const bool ret = pcre_exec(re, NULL, str, strlen(str), 0, 0, NULL, 0) >= 0; pcre_free(re); return ret; -#endif // HAVE_PCRE +#endif // USE_PCRE return true; } @@ -785,7 +786,7 @@ main(int argc, char** argv) URI(xsd, pattern); URI(xsd, string); -#ifndef HAVE_PCRE +#if !USE_PCRE fprintf(stderr, "warning: Built without PCRE, datatypes not checked.\n"); #endif |