public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Update prefs regexps
@ 2001-09-27  7:47 Keith Seitz
  0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2001-09-27  7:47 UTC (permalink / raw)
  To: Insight Maling List

Hi,

With the new Tcl8.3 upgrade, preferences were broken. I've been using this
patch for a little while now, so I think it is correct.

If anyone runs into any more problems with this, please speak up.
Keith

ChangeLog
2001-09-27  Keith Seitz  <keiths@redhat.com>

        * library/prefs.tcl (escape_value): Update to work
        with Tcl's new and old syntax.

Patch
Index: library/prefs.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/prefs.tcl,v
retrieving revision 1.12
diff -u -p -r1.12 prefs.tcl
--- prefs.tcl	2001/08/22 21:11:16	1.12
+++ prefs.tcl	2001/09/27 14:45:50
@@ -217,7 +217,12 @@ proc escape_value {val} {
   # We use a URL-style quoting.  We encode `=', `%', the `[]'
   # characters and newlines.  We use a cute trick here: we regsub in
   # command expressions which we then expand using subst.
-  regsub -all -- "(\[\]\[=%\n\])" $val \
+  if {[info tclversion] >= 8.1} {
+    set expr {([\[\]=%\n])}
+  } else {
+    set expr "(\[\]\[=%\n\])"
+  }
+  regsub -all -- $expr $val \
     {[format "%%%02x" [scan {\1} %c x; set x]]} newval
   return [subst -nobackslashes -novariables $newval]
 }



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-09-27  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-27  7:47 [PATCH] Update prefs regexps Keith Seitz

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).