This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] prefs.tcl


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.

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"
  	}
        }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]