summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-12-11 22:19:15 +0000
committerJim Blandy <jimb@codesourcery.com>2003-12-11 22:19:15 +0000
commit3c0b76af15b8c3fc6b3ac553b9a9d22cc3d29eac (patch)
treeea2fdb01fbcbe4693e06a265a973c637cb90d72c
parent97985cbf26f9ab6a4e76dc7577b61515bbbc60b8 (diff)
downloadgdb-3c0b76af15b8c3fc6b3ac553b9a9d22cc3d29eac.tar.gz
* library/prefs.tcl (pref_read): The section marker or the word
'option' must be the first thing on the line; they don't count if they appear in the middle of the line.
-rw-r--r--gdb/gdbtk/ChangeLog6
-rw-r--r--gdb/gdbtk/library/prefs.tcl4
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog
index a06e3ec4012..5724830d0aa 100644
--- a/gdb/gdbtk/ChangeLog
+++ b/gdb/gdbtk/ChangeLog
@@ -1,3 +1,9 @@
+2003-12-11 Jim Blandy <jimb@redhat.com>
+
+ * library/prefs.tcl (pref_read): The section marker or the word
+ 'option' must be the first thing on the line; they don't count if
+ they appear in the middle of the line.
+
2003-11-24 David Carlton <carlton@kealia.com>
* generic/gdbtk.c (target_is_native): Replace STREQ by strcmp.
diff --git a/gdb/gdbtk/library/prefs.tcl b/gdb/gdbtk/library/prefs.tcl
index b767c898a73..2241d49d0bd 100644
--- a/gdb/gdbtk/library/prefs.tcl
+++ b/gdb/gdbtk/library/prefs.tcl
@@ -88,11 +88,11 @@ proc pref_read {} {
;# empty line; ignore it
}
- {\[.*\]} {
+ {^[ \t\n]*\[.*\]} {
regexp {\[(.*)\]} $line match section
}
- {[ \t\n]*option.*} {
+ {^[ \t\n]*option.*} {
set line [string trimleft $line]
eval $line
}