public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@cygnus.com>
To: Insight Maling List <insight@sources.redhat.com>
Subject: [PATCH] Update prefs regexps
Date: Thu, 27 Sep 2001 07:47:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.33.0109270745540.3079-100000@makita.cygnus.com> (raw)

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



                 reply	other threads:[~2001-09-27  7:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.33.0109270745540.3079-100000@makita.cygnus.com \
    --to=keiths@cygnus.com \
    --cc=insight@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).