This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Patch: libgui debug code -vs- stderr
- To: Insight List <insight at sourceware dot cygnus dot com>
- Subject: Patch: libgui debug code -vs- stderr
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 27 Nov 2000 20:21:12 -0700
- Reply-To: tromey at cygnus dot com
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 <tromey@cygnus.com>
* 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+]