diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-05-23 16:08:48 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-05-23 16:08:48 +0000 |
commit | d2bb119edfd3891d0f543603c1c460d4da2a6a8b (patch) | |
tree | 12bd581f332cfb39296c198c1304e6750d20364d /src/pcre2_context.c | |
parent | 9868f55dc8e6e322febf7d6c366c1ea413be2807 (diff) | |
download | pcre2-d2bb119edfd3891d0f543603c1c460d4da2a6a8b.tar.gz |
More experimental convert code evolution.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@799 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_context.c')
-rw-r--r-- | src/pcre2_context.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/pcre2_context.c b/src/pcre2_context.c index 965c509..65e59fa 100644 --- a/src/pcre2_context.c +++ b/src/pcre2_context.c @@ -189,15 +189,17 @@ return mcontext; } -/* A default covert context is set up to save having to initialize at run time +/* A default convert context is set up to save having to initialize at run time when no context is supplied to the convert function. */ const pcre2_convert_context PRIV(default_convert_context) = { { default_malloc, default_free, NULL }, /* Default memory handling */ #ifdef _WIN32 - CHAR_BACKSLASH /* Default path separator */ -#else /* is OS dependent */ - CHAR_SLASH /* Not Windows */ + CHAR_BACKSLASH, /* Default path separator */ + CHAR_GRAVE_ACCENT /* Default escape character */ +#else /* Not Windows */ + CHAR_SLASH, /* Default path separator */ + CHAR_BACKSLASH /* Default escape character */ #endif }; @@ -454,6 +456,14 @@ ccontext->glob_separator = separator; return 0; } +PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION +pcre2_set_glob_escape(pcre2_convert_context *ccontext, uint32_t escape) +{ +if (escape > 255 || (escape != 0 && !ispunct(escape))) + return PCRE2_ERROR_BADDATA; +ccontext->glob_escape = escape; +return 0; +} /* End of pcre2_context.c */ |