summaryrefslogtreecommitdiff
path: root/src/regposix.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-20 07:26:48 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-20 07:26:48 +0100
commit8309cf5867aabde511db492366cbbec39d45e0cb (patch)
treef456bb7bf59fb67a8d099eb4dca819e1c71a1d0e /src/regposix.c
parent2f7903e9688734698615db5889efa21ffaf59c4d (diff)
parent6c434f095b49a3c33c6e34f27f0bff906f162d85 (diff)
Merge branch 'feature/upstream' into develop
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);
}