From 5e01a4852b31d537307994248869caf38b4023cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 10 May 2016 05:12:17 +0200 Subject: Imported Upstream version 6.0.0 --- sample/posix.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sample/posix.c') diff --git a/sample/posix.c b/sample/posix.c index d24ee35..f4cbe37 100644 --- a/sample/posix.c +++ b/sample/posix.c @@ -38,6 +38,8 @@ extern int main(int argc, char* argv[]) regex_t reg; UChar* pattern; + reg_set_encoding(REG_POSIX_ENCODING_ASCII); + /* default syntax (ONIG_SYNTAX_RUBY) */ pattern = (UChar* )"^a+b{2,7}[c-f]?$|uuu"; r = regcomp(®, (char* )pattern, REG_EXTENDED); @@ -89,5 +91,6 @@ extern int main(int argc, char* argv[]) x(®, pattern, (UChar* )"a\nb\n"); regfree(®); + onig_end(); return 0; } -- cgit v1.2.3