* [patch] prefs.tcl
@ 2002-11-08 12:58 Martin M. Hunt
0 siblings, 0 replies; only message in thread
From: Martin M. Hunt @ 2002-11-08 12:58 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
Fix some accidental breakage from previous change and check that values
are not null when writing.
2002-11-08 Martin M. Hunt <hunt@redhat.com>
* library/prefs.tcl (pref_save): Fix GDBtkInitVersion.
(pref_save): Check that value is not null before writing.
[-- Attachment #2: p --]
[-- Type: text/x-patch, Size: 1234 bytes --]
Index: prefs.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/prefs.tcl,v
retrieving revision 1.19
diff -p -r1.19 prefs.tcl
*** prefs.tcl 6 Nov 2002 20:45:54 -0000 1.19
--- prefs.tcl 8 Nov 2002 20:54:43 -0000
*************** proc pref_save {{win {}}} {
*** 160,166 ****
}
puts $fd "\# GDBtk Init file"
! puts $fd "{# GDBtkInitVersion: 1}"
set plist [pref list]
# write out global options
--- 160,166 ----
}
puts $fd "\# GDBtk Init file"
! puts $fd {# GDBtkInitVersion: 1}
set plist [pref list]
# write out global options
*************** proc pref_save {{win {}}} {
*** 188,195 ****
if {[lindex $t 0] == "gdb"
&& [string compare [join [lreplace $t 0 1] /] ""] == 0} {
set x [lindex $t 1]
! if {$x != ""} {
! set v [escape_value [pref get $var]]
puts $fd "\t$x=$v"
}
}
--- 188,195 ----
if {[lindex $t 0] == "gdb"
&& [string compare [join [lreplace $t 0 1] /] ""] == 0} {
set x [lindex $t 1]
! set v [escape_value [pref get $var]]
! if {$x != "" && $v != ""} {
puts $fd "\t$x=$v"
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-11-08 20:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-08 12:58 [patch] prefs.tcl Martin M. Hunt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).