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/simple.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sample/simple.c') diff --git a/sample/simple.c b/sample/simple.c index 948a542..e570a30 100644 --- a/sample/simple.c +++ b/sample/simple.c @@ -16,6 +16,9 @@ extern int main(int argc, char* argv[]) static UChar* pattern = (UChar* )"a(.*)b|[e-f]+"; static UChar* str = (UChar* )"zzzzaffffffffb"; + OnigEncoding use_encs[] = { ONIG_ENCODING_ASCII }; + onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0])); + r = onig_new(®, pattern, pattern + strlen((char* )pattern), ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo); if (r != ONIG_NORMAL) { -- cgit v1.2.3