summaryrefslogtreecommitdiff
path: root/src/regposix.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-20 06:14:49 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-20 06:14:49 +0100
commit10abcf77cc24dfae451d96310b4391dad35906ed (patch)
treeb9812ad2b1b038fd121f1031e9ff87978af0f5ff /src/regposix.c
parent98ab313fe496ae7c792db29c80bf6b23347484ff (diff)
New upstream version 6.8.1upstream/6.8.1
Diffstat (limited to 'src/regposix.c')
-rw-r--r--src/regposix.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/regposix.c b/src/regposix.c
index 0fdbcbb..895cf29 100644
--- a/src/regposix.c
+++ b/src/regposix.c
@@ -2,7 +2,7 @@
regposix.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2017 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2018 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -58,8 +58,10 @@ onig2posix_error_code(int code)
static const O2PERR o2p[] = {
{ ONIG_MISMATCH, REG_NOMATCH },
{ ONIG_NO_SUPPORT_CONFIG, REG_EONIG_INTERNAL },
+ { ONIG_ABORT, REG_EONIG_INTERNAL },
{ ONIGERR_MEMORY, REG_ESPACE },
{ ONIGERR_MATCH_STACK_LIMIT_OVER, REG_EONIG_INTERNAL },
+ { ONIGERR_RETRY_LIMIT_IN_MATCH_OVER, REG_EONIG_INTERNAL },
{ ONIGERR_TYPE_BUG, REG_EONIG_INTERNAL },
{ ONIGERR_PARSER_BUG, REG_EONIG_INTERNAL },
{ ONIGERR_STACK_BUG, REG_EONIG_INTERNAL },
@@ -117,6 +119,12 @@ onig2posix_error_code(int code)
{ ONIGERR_INVALID_IF_ELSE_SYNTAX, REG_BADPAT },
{ ONIGERR_INVALID_ABSENT_GROUP_PATTERN, REG_BADPAT },
{ ONIGERR_INVALID_ABSENT_GROUP_GENERATOR_PATTERN, REG_BADPAT },
+ { ONIGERR_INVALID_CALLOUT_PATTERN, REG_BADPAT },
+ { ONIGERR_INVALID_CALLOUT_NAME, REG_BADPAT },
+ { ONIGERR_UNDEFINED_CALLOUT_NAME, REG_BADPAT },
+ { ONIGERR_INVALID_CALLOUT_BODY, REG_BADPAT },
+ { ONIGERR_INVALID_CALLOUT_TAG_NAME, REG_BADPAT },
+ { ONIGERR_INVALID_CALLOUT_ARG, REG_BADPAT },
{ ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION, REG_EONIG_BADARG },
{ ONIGERR_LIBRARY_IS_NOT_INITIALIZED, REG_EONIG_INTERNAL }
};
@@ -260,8 +268,7 @@ reg_set_encoding(int mb_code)
break;
}
- onig_initialize(0, 0);
- onig_initialize_encoding(enc);
+ onig_initialize(&enc, 1);
onigenc_set_default_encoding(enc);
}