diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-09-10 12:59:00 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-09-10 12:59:00 (GMT) |
commit | 905094585e2fc5ac330ef4c7fe754e7e4884a490 (patch) | |
tree | d53170a7b0dc4481499d400512536397f7a3a25e | |
parent | d1ed32ffcf622ff5726f978e7243ae775dcb70d5 (diff) | |
download | tcl-905094585e2fc5ac330ef4c7fe754e7e4884a490.zip tcl-905094585e2fc5ac330ef4c7fe754e7e4884a490.tar.gz tcl-905094585e2fc5ac330ef4c7fe754e7e4884a490.tar.bz2 |
* doc/regsub.n: [Bug 3063568]: Fix for gotcha in example due to Tcl's
special handling of backslash-newline. Makes example slightly less
pure, but more useful.
-rw-r--r-- | ChangeLog | 27 | ||||
-rw-r--r-- | doc/regsub.n | 13 |
2 files changed, 24 insertions, 16 deletions
@@ -1,21 +1,26 @@ +2010-09-10 Donal K. Fellows <dkf@users.sf.net> + + * doc/regsub.n: [Bug 3063568]: Fix for gotcha in example due to Tcl's + special handling of backslash-newline. Makes example slightly less + pure, but more useful. + 2010-09-09 Jan Nijtmans <nijtmans@users.sf.net> - * win/makefile.vc: mingw should always link with -ladvapi32 + * win/makefile.vc: Mingw should always link with -ladvapi32. * win/tcl.m4: * win/configure: (regenerated) - * win/tclWinInt.h: Remove ascii variant of tkWinPocs table, - * win/tclWin32Dll.c: it is no longer necessary. Fix CreateProcess - * win/tclWinPipe.c: signature and remove unused GetModuleFileName - and lstrcpy - * win/tclWinPort.h: mingw/cygwin fixes: <tchar.h> should always - be included, and fix conflict in various macro values: Always force - the same values as in VC++. + * win/tclWinInt.h: Remove ascii variant of tkWinPocs table, it is + * win/tclWin32Dll.c: no longer necessary. Fix CreateProcess signature + * win/tclWinPipe.c: and remove unused GetModuleFileName and lstrcpy. + * win/tclWinPort.h: Mingw/cygwin fixes: <tchar.h> should always be + included, and fix conflict in various macro values: Always force the + same values as in VC++. 2010-09-08 Don Porter <dgp@users.sourceforge.net> - * win/tclWinChan.c: #ifdef protections to permit builds with - * win/tclWinFCmd.c: mingw on amd64 systems. Thanks to "mescalinum" - for reporting and testing. [Bug 3059922] + * win/tclWinChan.c: [Bug 3059922]: #ifdef protections to permit + * win/tclWinFCmd.c: builds with mingw on amd64 systems. Thanks to + "mescalinum" for reporting and testing. 2010-09-08 Andreas Kupries <andreask@activestate.com> diff --git a/doc/regsub.n b/doc/regsub.n index 963b5f6..280692e 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.28 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.29 2010/09/10 12:59:01 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -172,15 +172,18 @@ Convert all non-ASCII and Tcl-significant characters into \eu escape sequences by using \fBregsub\fR and \fBsubst\fR in combination: .PP .CS -# This RE is just a character class for everything "bad" -set RE {[][{};#\e\e\e$\es\eu0080-\euffff]} +# This RE is just a character class for almost everything "bad" +set RE {[][{};#\e\e\e$ \er\et\eu0080-\euffff]} # We will substitute with a fragment of Tcl script in brackets set substitution {[format \e\e\e\eu%04x [scan "\e\e&" %c]]} # Now we apply the substitution to get a subst-string that -# will perform the computational parts of the conversion. -set quoted [subst [\fBregsub\fR -all $RE $string $substitution]] +# will perform the computational parts of the conversion. Note +# that newline is handled specially through \fBstring map\fR since +# backslash-newline is a special sequence. +set quoted [subst [string map {\en {\e\eu000a}} \e + [\fBregsub\fR -all $RE $string $substitution]]] .CE .SH "SEE ALSO" regexp(n), re_syntax(n), subst(n), string(n) |