diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-05-10 05:12:17 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-05-10 05:12:17 +0200 |
commit | 5e01a4852b31d537307994248869caf38b4023cc (patch) | |
tree | 769c60020afcb58437477f348dca58fb0c789f64 /sample/syntax.c | |
parent | 766e109fd638ef1eac33717b52e04a351da46483 (diff) |
Imported Upstream version 6.0.0upstream/6.0.0
Diffstat (limited to 'sample/syntax.c')
-rw-r--r-- | sample/syntax.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sample/syntax.c b/sample/syntax.c index 7cc353f..6bf27c5 100644 --- a/sample/syntax.c +++ b/sample/syntax.c @@ -51,7 +51,6 @@ extern int exec(OnigSyntaxType* syntax, onig_region_free(region, 1 /* 1:free self, 0:free contents only */); onig_free(reg); - onig_end(); return 0; } @@ -59,6 +58,9 @@ extern int main(int argc, char* argv[]) { int r; + OnigEncoding use_encs[] = { ONIG_ENCODING_ASCII }; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + r = exec(ONIG_SYNTAX_PERL, "\\p{XDigit}\\P{XDigit}\\p{^XDigit}\\P{^XDigit}\\p{XDigit}", "bgh3a"); |