OSDN Git Service

2002-11-08 Martin M. Hunt <hunt@redhat.com>
authorhunt <hunt>
Fri, 8 Nov 2002 20:56:43 +0000 (20:56 +0000)
committerhunt <hunt>
Fri, 8 Nov 2002 20:56:43 +0000 (20:56 +0000)
* library/prefs.tcl (pref_save): Fix GDBtkInitVersion.
(pref_save): Check that value is not null before writing.

gdb/gdbtk/ChangeLog
gdb/gdbtk/library/prefs.tcl

index 7822399..ce63221 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2002-11-07  Martin M. Hunt  <hunt@redhat.com>
 
        * library/util.tcl (CygScrolledListbox): Delete.
index ec61d49..2f59794 100644 (file)
@@ -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"
        }
       }