summaryrefslogtreecommitdiff
path: root/gdb/gdbtk/library/prefs.tcl
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>2002-11-08 20:56:44 +0000
committerMartin Hunt <hunt@redhat.com>2002-11-08 20:56:44 +0000
commit59dedb8ed2abf669e1a269eed1f7a053594345bb (patch)
tree6803a4f0937a40d1c5e432b7f00dac3b4932731e /gdb/gdbtk/library/prefs.tcl
parentdef0f7d60674d8bcb1274db8f6f97c062a40c0a7 (diff)
downloadgdb-59dedb8ed2abf669e1a269eed1f7a053594345bb.tar.gz
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.
Diffstat (limited to 'gdb/gdbtk/library/prefs.tcl')
-rw-r--r--gdb/gdbtk/library/prefs.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdbtk/library/prefs.tcl b/gdb/gdbtk/library/prefs.tcl
index ec61d495574..2f597940b9c 100644
--- a/gdb/gdbtk/library/prefs.tcl
+++ b/gdb/gdbtk/library/prefs.tcl
@@ -160,7 +160,7 @@ proc pref_save {{win {}}} {
}
puts $fd "\# GDBtk Init file"
- puts $fd "{# GDBtkInitVersion: 1}"
+ puts $fd {# GDBtkInitVersion: 1}
set plist [pref list]
# write out global options
@@ -188,8 +188,8 @@ proc pref_save {{win {}}} {
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]]
+ set v [escape_value [pref get $var]]
+ if {$x != "" && $v != ""} {
puts $fd "\t$x=$v"
}
}