From 795854e54681f86fe66d8dcf8b09e44b9f726a62 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Fri, 31 Jul 2020 08:39:09 +1000 Subject: jimregexp: rename local regex functions Avoid possible problems with when linking by renaming local regex to jim_regcomp, jim_regexec, etc. Fixes: #163 Signed-off-by: Steve Bennett --- jimregexp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'jimregexp.c') diff --git a/jimregexp.c b/jimregexp.c index e04d3a4..e66fabe 100644 --- a/jimregexp.c +++ b/jimregexp.c @@ -231,7 +231,7 @@ static int str_int_len(const int *seq) * Beware that the optimization-preparation code in here knows about some * of the structure of the compiled regexp. */ -int regcomp(regex_t *preg, const char *exp, int cflags) +int jim_regcomp(regex_t *preg, const char *exp, int cflags) { int scan; int longest; @@ -1114,7 +1114,7 @@ static int regrepeat(regex_t *preg, int p, int max); /* - regexec - match a regexp against a string */ -int regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) +int jim_regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) { const char *s; int scan; @@ -1869,7 +1869,7 @@ static const char *regprop( int op ) } #endif /* JIM_BOOTSTRAP */ -size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) +size_t jim_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) { static const char *error_strings[] = { "success", @@ -1905,7 +1905,7 @@ size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_s return snprintf(errbuf, errbuf_size, "%s", err); } -void regfree(regex_t *preg) +void jim_regfree(regex_t *preg) { free(preg->program); } -- cgit v1.1