From: Eli Zaretskii Date: Sat, 25 Mar 2006 17:58:37 +0000 (+0000) Subject: (print_output_debug_flag): New global variable. X-Git-Tag: emacs-pretest-22.0.90~3428 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=945b01119fd383fd35b5d10d8d406d0ddaeec0ec;p=emacs.git (print_output_debug_flag): New global variable. (Fexternal_debugging_output) [WINDOWSNT]: Don't call OutputDebugString if print_output_debug_flag is zero. --- diff --git a/src/print.c b/src/print.c index 622101f2c53..3a286361a8c 100644 --- a/src/print.c +++ b/src/print.c @@ -182,6 +182,9 @@ static int max_print; void print_interval (); +/* GDB resets this to zero on W32 to disable OutputDebugString calls. */ +int print_output_debug_flag = 1; + /* Low level output routines for characters and strings */ @@ -909,10 +912,11 @@ to make it write to the debugging output. */) #ifdef WINDOWSNT /* Send the output to a debugger (nothing happens if there isn't one). */ - { - char buf[2] = {(char) XINT (character), '\0'}; - OutputDebugString (buf); - } + if (print_output_debug_flag) + { + char buf[2] = {(char) XINT (character), '\0'}; + OutputDebugString (buf); + } #endif return character;