diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-20 21:49:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-20 21:49:13 +0200 |
commit | 7fcff1f781f3ccfd62af8ed62c697046f92b37e1 (patch) | |
tree | 6ca90a0660bf2e5fb29f82d7e8c58819298bd124 /src/regexp.c | |
parent | ca12d7c00486b37e70872bec7b141d7f3a0b73a5 (diff) | |
download | vim-7fcff1f781f3ccfd62af8ed62c697046f92b37e1.zip |
updated for version 7.3.978
Problem: Regexp debug logs don't have a good name.
Solution: Use clear names and make it possible to write logs for the old and
new engines separately. (Taro Muraoka)
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/regexp.c b/src/regexp.c index a1f71ab97..60765d728 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -51,6 +51,8 @@ # define BT_REGEXP_DUMP /* save the debugging data to a file instead of displaying it */ # define BT_REGEXP_LOG +# define BT_REGEXP_DEBUG_LOG +# define BT_REGEXP_DEBUG_LOG_NAME "bt_regexp_debug.log" #endif /* @@ -7828,11 +7830,11 @@ vim_regcomp(expr_arg, re_flags) if (prog == NULL) /* error compiling regexp with initial engine */ { -#ifdef DEBUG +#ifdef BT_REGEXP_DEBUG_LOG if (regexp_engine != BACKTRACKING_ENGINE) /* debugging log for NFA */ { FILE *f; - f = fopen("debug.log", "a"); + f = fopen(BT_REGEXP_DEBUG_LOG_NAME, "a"); if (f) { if (!syntax_error) @@ -7842,7 +7844,8 @@ vim_regcomp(expr_arg, re_flags) fclose(f); } else - EMSG("(NFA) Could not open \"debug.log\" to write !!!"); + EMSG2("(NFA) Could not open \"%s\" to write !!!", + BT_REGEXP_DEBUG_LOG_NAME); /* if (syntax_error) EMSG("NFA Regexp: Syntax Error !"); |