From mboxrd@z Thu Jan 1 00:00:00 1970 From: Syd Polk To: tromey@cygnus.com Cc: Insight List Subject: Re: Patch: libgui debug code -vs- stderr Date: Tue, 28 Nov 2000 08:32:00 -0000 Message-id: <3A237B08.C623A47D@redhat.com> References: <87u28seq8n.fsf@creche.cygnus.com> X-SW-Source: 2000-q4/msg00287.html Approved. Tom Tromey wrote: > > 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+]