diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2019-07-12 09:18:14 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2019-07-12 09:18:14 +0200 |
commit | e25c754918ae26e8b9e68a47bc1af36248e91800 (patch) | |
tree | d21952fcb2767620c25d4d5b412b8c4829ca96bc /sample/syntax.c | |
parent | 70de057dbb5ea79536834e156f534279347f96f3 (diff) |
New upstream version 6.9.2upstream/6.9.2
Diffstat (limited to 'sample/syntax.c')
-rw-r--r-- | sample/syntax.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sample/syntax.c b/sample/syntax.c index 02af2ea..e292079 100644 --- a/sample/syntax.c +++ b/sample/syntax.c @@ -5,8 +5,7 @@ #include <string.h> #include "oniguruma.h" -extern int exec(OnigSyntaxType* syntax, - char* apattern, char* astr) +extern int exec(OnigSyntaxType* syntax, char* apattern, char* astr) { int r; unsigned char *start, *range, *end; @@ -17,7 +16,7 @@ extern int exec(OnigSyntaxType* syntax, UChar* str = (UChar* )astr; r = onig_new(®, pattern, pattern + strlen((char* )pattern), - ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, syntax, &einfo); + ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, syntax, &einfo); if (r != ONIG_NORMAL) { char s[ONIG_MAX_ERROR_MESSAGE_LEN]; onig_error_code_to_str((UChar* )s, r, &einfo); @@ -62,11 +61,10 @@ extern int main(int argc, char* argv[]) 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"); + "\\p{XDigit}\\P{XDigit}\\p{^XDigit}\\P{^XDigit}\\p{XDigit}", + "bgh3a"); - r = exec(ONIG_SYNTAX_JAVA, - "\\p{XDigit}\\P{XDigit}[a-c&&b-g]", "bgc"); + r = exec(ONIG_SYNTAX_JAVA, "\\p{XDigit}\\P{XDigit}[a-c&&b-g]", "bgc"); r = exec(ONIG_SYNTAX_ASIS, "abc def* e+ g?ddd[a-rvvv] (vv){3,7}hv\\dvv(?:aczui ss)\\W\\w$", |