]> granicus.if.org Git - onig/commitdiff
use (*SUCCESS) in callout.c
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 9 Feb 2018 00:44:44 +0000 (09:44 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 9 Feb 2018 00:44:44 +0000 (09:44 +0900)
sample/callout.c

index 2682d1894000f2f686827a1538a807879b3a57b3..d01e0525eec02eecd5d09eb41679784c06706774 100644 (file)
@@ -27,7 +27,7 @@ callout_body(OnigCalloutArgs* args, void* user_data)
 
   if (args->id > 0) {
     UChar* name = onig_get_callout_name_from_id(args->id);
-    fprintf(stdout, "id: %d: name: %s\n", args->id, name);
+    fprintf(stdout, "name: %s\n", name);
   }
   fprintf(stdout,
           "%s %s: content: \"%s\", start: \"%s\", current: \"%s\"\n",
@@ -159,6 +159,7 @@ extern int main(int argc, char* argv[])
 
   // callout of name
   test("\\A(*FOO)abc", "abc");
+  test("abc(*SUCCESS)", "abcabc");
   test("abc(?:(*FAIL)|$)", "abcabc");
   test("abc(?:(*ABORT)|$)", "abcabc");
   test("ab(*FOO+:foo will be fail.)(*FAIL)", "abc");