m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/src/Attic/m4.c,v [branch-1_4]


From: Eric Blake
Subject: Changes to m4/src/Attic/m4.c,v [branch-1_4]
Date: Mon, 22 Oct 2007 17:34:23 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      07/10/22 17:34:22

Index: src/m4.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/m4.c,v
retrieving revision 1.1.1.1.2.51
retrieving revision 1.1.1.1.2.52
diff -u -b -r1.1.1.1.2.51 -r1.1.1.1.2.52
--- src/m4.c    22 Oct 2007 16:38:33 -0000      1.1.1.1.2.51
+++ src/m4.c    22 Oct 2007 17:34:22 -0000      1.1.1.1.2.52
@@ -318,6 +318,10 @@
 #define OPTSTRING "-B:D:EF:GH:I:L:N:PQR:S:T:U:d::eil:o:st:"
 #endif
 
+#ifdef DEBUG_REGEX
+FILE *trace_file;
+#endif /* DEBUG_REGEX */
+
 int
 main (int argc, char *const *argv, char *const *envp)
 {
@@ -338,6 +342,16 @@
   retcode = EXIT_SUCCESS;
   atexit (close_stdin);
 
+#ifdef DEBUG_REGEX
+  {
+    const char *name = getenv ("M4_TRACE_FILE");
+    if (name)
+      trace_file = fopen (name, "a");
+    if (trace_file)
+      fputs ("m4:\n", trace_file);
+  }
+#endif /* DEBUG_REGEX */
+
   include_init ();
   debug_init ();
 #ifdef USE_STACKOVF
@@ -591,5 +605,9 @@
     }
   output_exit ();
   free_regex ();
+#ifdef DEBUG_REGEX
+  if (trace_file)
+    fclose (trace_file);
+#endif /* DEBUG_REGEX */
   exit (retcode);
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]