test("abc(?:(*FAIL)|$)", "abcabc");
test("abc(?:(*ABORT)|$)", "abcabc");
test("ab(*foo+:will be fail.)(*FAIL)", "abc");
+ test("abc(d|(*ERROR:-999))", "abc");
onig_end();
return 0;
return ONIG_CALLOUT_SUCCESS;
}
+extern int
+onig_builtin_error(OnigCalloutArgs* args, void* user_data ARG_UNUSED)
+{
+ long n;
+
+ if (args->content != 0 && args->content_end > args->content) {
+ n = strtol((char* )args->content, 0, 10);
+ }
+ else {
+ n = ONIG_CALLOUT_FAIL;
+ }
+
+ return (int )n;
+}
+
#endif /* USE_CALLOUT */
extern int
B1(FAIL, fail);
B1(SUCCESS, success);
B1(ABORT, abort);
+ B1(ERROR, error);
return ONIG_NORMAL;
#endif /* USE_CALLOUT */