summaryrefslogtreecommitdiff
path: root/sample/posix.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-05-10 05:12:17 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-05-10 05:12:17 +0200
commit5e01a4852b31d537307994248869caf38b4023cc (patch)
tree769c60020afcb58437477f348dca58fb0c789f64 /sample/posix.c
parent766e109fd638ef1eac33717b52e04a351da46483 (diff)
Imported Upstream version 6.0.0upstream/6.0.0
Diffstat (limited to 'sample/posix.c')
-rw-r--r--sample/posix.c3
1 files changed, 3 insertions, 0 deletions
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(&reg, (char* )pattern, REG_EXTENDED);
@@ -89,5 +91,6 @@ extern int main(int argc, char* argv[])
x(&reg, pattern, (UChar* )"a\nb\n");
regfree(&reg);
+ onig_end();
return 0;
}