From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Tromey To: Insight List Subject: Patch: libgui debug code -vs- stderr Date: Mon, 27 Nov 2000 19:11:00 -0000 Message-id: <87u28seq8n.fsf@creche.cygnus.com> X-SW-Source: 2000-q4/msg00284.html This patch changes the libui debug::logfile procedure to also recognize `stderr' as special. With this patch you can use `stderr' in GDBTK_DEBUGFILE and have it work. Ok to commit? 2000-11-27 Tom Tromey * library/debug.tcl (logfile): Also recognize stderr. Tom Index: library/debug.tcl =================================================================== RCS file: /cvs/src/src/libgui/library/debug.tcl,v retrieving revision 1.2 diff -u -r1.2 debug.tcl --- debug.tcl 2000/07/06 22:48:59 1.2 +++ debug.tcl 2000/11/28 03:07:31 @@ -40,13 +40,13 @@ proc logfile {file} { variable logfile - if {$logfile != "" && $logfile != "stdout"} { + if {$logfile != "" && $logfile != "stdout" && $logfile != "stderr"} { catch {close $logfile} } if {$file == ""} { set logfile "" - } elseif {$file == "stdout"} { + } elseif {$file == "stdout" || $file == "stderr"} { set logfile $file } else { set logfile [open $file w+]