1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2013-05-20 21:49:13 +02:00
parent ca12d7c004
commit 7fcff1f781
3 changed files with 16 additions and 9 deletions

View File

@@ -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 !");