ctx_print(). _db_print_file() might be called recursively in the
stack and cause a coredump relating to varargs. This patch moves
the ctx_print() call into _db_print() and before we start processing
the varargs stuff.
/*
- * $Id: debug.cc,v 1.83 2001/06/29 21:16:42 wessels Exp $
+ * $Id: debug.cc,v 1.84 2001/12/17 18:01:54 wessels Exp $
*
* DEBUG: section 0 Debug Routines
* AUTHOR: Harvest Derived
#if STDC_HEADERS
va_list args2;
va_list args3;
+#else
+#define args2 args1
+#define args3 args1
+#endif
+ /* give a chance to context-based debugging to print current context */
+ if (!Ctx_Lock)
+ ctx_print();
+#if STDC_HEADERS
va_start(args1, format);
va_start(args2, format);
va_start(args3, format);
#else
-#define args2 args1
-#define args3 args1
format = va_arg(args1, const char *);
#endif
snprintf(f, BUFSIZ, "%s| %s",