diff options
Diffstat (limited to 'src/nbdebug.c')
-rw-r--r-- | src/nbdebug.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/nbdebug.c b/src/nbdebug.c index daf87a856..7c7564558 100644 --- a/src/nbdebug.c +++ b/src/nbdebug.c @@ -94,7 +94,6 @@ nbdebug_log_init( } else { nb_dlevel = NB_TRACE; /* default level */ } - /* XSetErrorHandler(errorHandler); */ } } /* end nbdebug_log_init */ @@ -126,7 +125,7 @@ nbdbg( { va_list ap; - if (nb_debug != NULL) { + if (nb_debug != NULL && nb_dlevel & NB_TRACE) { va_start(ap, fmt); vfprintf(nb_debug, fmt, ap); va_end(ap); @@ -136,6 +135,23 @@ nbdbg( } /* end nbdbg */ +void +nbprt( + char *fmt, + ...) +{ + va_list ap; + + if (nb_debug != NULL && nb_dlevel & NB_PRINT) { + va_start(ap, fmt); + vfprintf(nb_debug, fmt, ap); + va_end(ap); + fflush(nb_debug); + } + +} /* end nbprt */ + + static int lookup( char *file) |