From: kosako Date: Tue, 19 Apr 2016 07:05:20 +0000 (+0900) Subject: add error code ONIGERR_FAIL_TO_INITIALIZE X-Git-Tag: v6.0.0^2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db4dcd5860ba0faa1161c4d0235b69d4a07e0499;p=onig add error code ONIGERR_FAIL_TO_INITIALIZE --- diff --git a/src/oniguruma.h b/src/oniguruma.h index 5b8aeef..38dd9cc 100644 --- a/src/oniguruma.h +++ b/src/oniguruma.h @@ -539,6 +539,7 @@ ONIG_EXTERN OnigSyntaxType* OnigDefaultSyntax; #define ONIGERR_MATCH_STACK_LIMIT_OVER -15 #define ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED -21 #define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22 +#define ONIGERR_FAIL_TO_INITIALIZE -23 /* general error */ #define ONIGERR_INVALID_ARGUMENT -30 /* syntax error */ diff --git a/src/regerror.c b/src/regerror.c index a36c5bf..16009bb 100644 --- a/src/regerror.c +++ b/src/regerror.c @@ -68,6 +68,8 @@ onig_error_code_to_format(int code) p = "default multibyte-encoding is not setted"; break; case ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR: p = "can't convert to wide-char on specified multibyte-encoding"; break; + case ONIGERR_FAIL_TO_INITIALIZE: + p = "fail to initialize"; break; case ONIGERR_INVALID_ARGUMENT: p = "invalid argument"; break; case ONIGERR_END_PATTERN_AT_LEFT_BRACE: diff --git a/src/regposix.c b/src/regposix.c index b64590d..bbe52dc 100644 --- a/src/regposix.c +++ b/src/regposix.c @@ -67,6 +67,7 @@ onig2posix_error_code(int code) { ONIGERR_UNEXPECTED_BYTECODE, REG_EONIG_INTERNAL }, { ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED, REG_EONIG_BADARG }, { ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR, REG_EONIG_BADARG }, + { ONIGERR_FAIL_TO_INITIALIZE, REG_EONIG_INTERNAL }, { ONIGERR_INVALID_ARGUMENT, REG_EONIG_BADARG }, { ONIGERR_END_PATTERN_AT_LEFT_BRACE, REG_EBRACE }, { ONIGERR_END_PATTERN_AT_LEFT_BRACKET, REG_EBRACK },