aboutsummaryrefslogtreecommitdiff
path: root/sample/listcap.c
diff options
context:
space:
mode:
authorK.Kosako <kosako@sofnec.co.jp>2019-12-06 15:02:27 +0900
committerK.Kosako <kosako@sofnec.co.jp>2019-12-06 15:02:27 +0900
commit1e38260031f378dc3d650624118a843ada2f39bc (patch)
tree787e35d234da504d31e30c9f22bcaa78b80484f1 /sample/listcap.c
parent158cc766ce57b5e181b62127a5d01f90f349326c (diff)
downloadoniguruma-1e38260031f378dc3d650624118a843ada2f39bc.zip
oniguruma-1e38260031f378dc3d650624118a843ada2f39bc.tar.gz
oniguruma-1e38260031f378dc3d650624118a843ada2f39bc.tar.bz2
change initialization of use_encs[] for VisualStudio C compiler
Diffstat (limited to 'sample/listcap.c')
-rw-r--r--sample/listcap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sample/listcap.c b/sample/listcap.c
index f3107e6..c0d3014 100644
--- a/sample/listcap.c
+++ b/sample/listcap.c
@@ -84,6 +84,7 @@ extern int main(int argc, char* argv[])
{
int r;
OnigSyntaxType syn;
+ OnigEncoding use_encs[1];
static UChar* str1 = (UChar* )"((())())";
static UChar* pattern1
@@ -99,7 +100,7 @@ extern int main(int argc, char* argv[])
static UChar* pattern4
= (UChar* )"\\g<p>(?@<p>\\(\\g<s>\\)){0}(?@<s>(?:\\g<p>)*|a){0}";
- OnigEncoding use_encs[] = { ONIG_ENCODING_ASCII };
+ use_encs[0] = ONIG_ENCODING_ASCII;
onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
/* enable capture hostory */