]> granicus.if.org Git - onig/commitdiff
add ONIGERR_INVALID_CALLOUT_ARG
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 20 Feb 2018 05:13:24 +0000 (14:13 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 21 Feb 2018 04:22:59 +0000 (13:22 +0900)
src/oniguruma.h
src/regerror.c
src/regposix.c

index 114eb165a0cd0ded3d2ca739df53ebfb0d63d23d..eeae3dd23aa1800d7313c8d78e80cb466b2c67fb 100644 (file)
@@ -486,7 +486,7 @@ ONIG_EXTERN OnigSyntaxType*   OnigDefaultSyntax;
 #define ONIG_SYN_OP2_ESC_X_Y_GRAPHEME_CLUSTER   (1U<<26) /* \X \y \Y */
 #define ONIG_SYN_OP2_QMARK_PERL_SUBEXP_CALL     (1U<<27) /* (?R), (?&name)... */
 #define ONIG_SYN_OP2_QMARK_BRACE_CALLOUT_CODE   (1U<<28) /* (?{...}) (?{{...}}) */
-#define ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME      (1U<<29) /* (*NAME) (*NAME:...) */
+#define ONIG_SYN_OP2_ASTERISK_CALLOUT_NAME      (1U<<29) /* (*name) (*name(a,b)) */
 
 /* syntax (behavior) */
 #define ONIG_SYN_CONTEXT_INDEP_ANCHORS           (1U<<31) /* not implemented */
@@ -597,6 +597,7 @@ ONIG_EXTERN OnigSyntaxType*   OnigDefaultSyntax;
 #define ONIGERR_UNDEFINED_CALLOUT_NAME                       -229
 #define ONIGERR_INVALID_CALLOUT_BODY                         -230
 #define ONIGERR_INVALID_CALLOUT_TAG_NAME                     -231
+#define ONIGERR_INVALID_CALLOUT_ARG                          -232
 #define ONIGERR_INVALID_CODE_POINT_VALUE                     -400
 #define ONIGERR_INVALID_WIDE_CHAR_VALUE                      -400
 #define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE                      -401
index 8b7546656721fb8f514340cef0e401b922e150ed..650915c2449d64db6ecaeb9100cf396dff27103d 100644 (file)
@@ -186,6 +186,8 @@ onig_error_code_to_format(int code)
     p = "invalid callout body"; break;
   case ONIGERR_INVALID_CALLOUT_TAG_NAME:
     p = "invalid callout tag name"; break;
+  case ONIGERR_INVALID_CALLOUT_ARG:
+    p = "invalid callout arg"; break;
   case ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION:
     p = "not supported encoding combination"; break;
   case ONIGERR_INVALID_COMBINATION_OF_OPTIONS:
index b59668f9408920f6013cd4740478d0d3eee92b47..6648d971f63b2a823f5276642ebc09149b89b227 100644 (file)
@@ -124,6 +124,7 @@ onig2posix_error_code(int code)
     { 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 }
   };