From da30286e1350d14b554f9cf1bc0e8ecc12104f1a Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Thu, 1 Jun 2017 17:31:26 +0900 Subject: [PATCH] output bytecode adress in ONIG_DEBUG_MATCH --- src/regexec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/regexec.c b/src/regexec.c index 5bee2d1..7c6d303 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -1353,7 +1353,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, else { xmemcpy(bp, "\"", 1); bp += 1; } *bp = 0; fputs((char* )buf, stderr); + for (i = 0; i < 20 - (bp - buf); i++) fputc(' ', stderr); + fprintf(stderr, "%4d: ", (int )(p - reg->p)); onig_print_compiled_byte_code(stderr, p, NULL, reg->p, encode); fprintf(stderr, "\n"); } -- 2.40.0