Name of regexp debug log files are very general.

  NFA Engine: list.log
  BT Engine: debug.log

I change those as self describing, like this:

  NFA Engine: list.log -> nfa_regexp_debug.log
  BT Engine: debug.log -> bt_regexp_debug.log

Please check attached patch.

I also added two flags to control output of those regexp debug logs
 separately from DEBUG flag.

  NFA_REGEXP_DEBUG_LOG
  BT_REGEXP_DEBUG_LOG


Best.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent f91821dec803253588e268a1a56296224d065d8a
diff -r f91821dec803 -r 1ca6ebea38f8 src/regexp.c
--- a/src/regexp.c	Mon May 20 13:55:21 2013 +0200
+++ b/src/regexp.c	Mon May 20 21:57:50 2013 +0900
@@ -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 @@
 
     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 @@
 		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 !");
diff -r f91821dec803 -r 1ca6ebea38f8 src/regexp_nfa.c
--- a/src/regexp_nfa.c	Mon May 20 13:55:21 2013 +0200
+++ b/src/regexp_nfa.c	Mon May 20 21:57:50 2013 +0900
@@ -9,6 +9,8 @@
 /* Comment this out to disable log files. They can get pretty big */
 # define ENABLE_LOG
 # define LOG_NAME "log_nfarun.log"
+# define NFA_REGEXP_DEBUG_LOG
+# define NFA_REGEXP_DEBUG_LOG_NAME	"nfa_regexp_debug.log"
 #endif
 
 /* Upper limit allowed for {m,n} repetitions handled by NFA */
@@ -2849,12 +2851,12 @@
     int		*listids = NULL;
     int		j = 0;
     int		len = 0;
-#ifdef DEBUG
-    FILE	*debug = fopen("list.log", "a");
+#ifdef NFA_REGEXP_DEBUG_LOG
+    FILE	*debug = fopen(NFA_REGEXP_DEBUG_LOG_NAME, "a");
 
     if (debug == NULL)
     {
-	EMSG(_("(NFA) COULD NOT OPEN list.log !"));
+	EMSG2(_("(NFA) COULD NOT OPEN %s !"), NFA_REGEXP_DEBUG_LOG_NAME);
 	return FALSE;
     }
 #endif
@@ -2950,7 +2952,7 @@
 	fprintf(log_fd, "\n");
 #endif
 
-#ifdef DEBUG
+#ifdef NFA_REGEXP_DEBUG_LOG
 	fprintf(debug, "\n-------------------\n");
 #endif
 
@@ -2966,7 +2968,7 @@
 	    else
 		t = &thislist->t[i];
 
-#ifdef DEBUG
+#ifdef NFA_REGEXP_DEBUG_LOG
 	    nfa_set_code(t->state->c);
 	    fprintf(debug, "%s, ", code);
 #endif
@@ -3436,7 +3438,7 @@
     if (listids != NULL)
 	vim_free(listids);
 #undef ADD_POS_NEG_STATE
-#ifdef DEBUG
+#ifdef NFA_REGEXP_DEBUG_LOG
     fclose(debug);
 #endif
 

Raspunde prin e-mail lui