From c29a0f17728ac66f5e659321fc15aa379af68abe Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 19 Mar 2007 11:50:47 +0000 Subject: Fixed bug in regsub example. --- ChangeLog | 45 +++++++++++++++++++++++++-------------------- doc/regsub.n | 6 ++---- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b24e79..9d4e1c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,22 +1,27 @@ +2007-03-19 Donal K. Fellows + + * doc/regsub.n: Corrected example so that it doesn't recommend + potentially unsafe practice. Many thanks to Konstantin Kushnir + for reporting this. + 2007-03-17 Kevin Kenny - * win/tclWinReg.c (GetKeyNames): Size the buffer for enumerating - key names correctly, so that Unicode names exceeding 127 chars - can be retrieved without crashing. [Bug 1682211] - * tests/registry.test (registry-4.9): Added test case for the - above bug. - + * win/tclWinReg.c (GetKeyNames): Size the buffer for enumerating key + names correctly, so that Unicode names exceeding 127 chars can be + retrieved without crashing. [Bug 1682211] + * tests/registry.test (registry-4.9): Added test case for the above + bug. + 2007-03-15 Mo DeJong - * generic/tclIOUtil.c (Tcl_Stat): Reimplement workaround - to avoid gcc warning by using local variables. When - the macro argument is of type long long instead - of long, the incorrect warning is not generated. + * generic/tclIOUtil.c (Tcl_Stat): Reimplement workaround to avoid gcc + warning by using local variables. When the macro argument is of type + long long instead of long, the incorrect warning is not generated. 2007-03-15 Mo DeJong - * win/Makefile.in: Fully qualify LIBRARY_DIR so - that `make test` does not depend on working dir. + * win/Makefile.in: Fully qualify LIBRARY_DIR so that `make test` does + not depend on working dir. 2007-03-15 Mo DeJong @@ -24,25 +29,25 @@ 2007-03-12 Don Porter - * generic/tclExecute.c (INST_FOREACH_STEP4): Make private copy - * tests/foreach.test (foreach-10.1): of value list to be assigned - to variables so that shimmering of that list doesn't lead to invalid - pointers. [Bug 1671087] + * generic/tclExecute.c (INST_FOREACH_STEP4): Make private copy of + * tests/foreach.test (foreach-10.1): value list to be assigned to + variables so that shimmering of that list doesn't lead to invalid + pointers. [Bug 1671087] * generic/tclEvent.c (HandleBgErrors): Make efficient private copy * tests/event.test (event-5.3): of the command prefix for the interp's - background error handling command to avoid panics due to pointers - to memory invalid after shimmering. [Bug 1670155] + background error handling command to avoid panics due to pointers to + memory invalid after shimmering. [Bug 1670155] * generic/tclNamesp.c (NsEnsembleImplementationCmd): Make efficient * tests/namespace.test (namespace-42.8): private copy of the command prefix as we invoke the command appropriate to a particular subcommand of a particular ensemble to avoid panic due to shimmering - of the List intrep. [Bug 1670091] + of the List intrep. [Bug 1670091] * generic/tclVar.c (TclArraySet): Make efficient private copy of * tests/var.test (var-17.1): the "list" argument to [array set] to - avoid crash due to shimmering invalidating pointers. [Bug 1669489]. + avoid crash due to shimmering invalidating pointers. [Bug 1669489] 2007-03-12 Donal K. Fellows diff --git a/doc/regsub.n b/doc/regsub.n index 333c776..30fd5b1 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.16 2007/02/18 18:42:55 dkf Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.17 2007/03/19 11:50:50 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -128,7 +128,7 @@ Convert all non-ASCII and Tcl-significant characters into \eu escape sequences by using \fBregsub\fR and \fBsubst\fR in combination: .CS # This RE is just a character class for everything "bad" -set RE {[][{}\e$\es\eu0100-\euffff]} +set RE {[][{};#\e\e\e$\es\eu0100-\euffff]} # We will substitute with a fragment of Tcl script in brackets set substitution {[format \e\e\e\eu%04x [scan "\e\e&" %c]]} @@ -143,7 +143,5 @@ regexp(n), re_syntax(n), subst(n), .VS 8.5 string(n) .VE - - .SH KEYWORDS match, pattern, regular expression, substitute -- cgit v0.12