summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-04-12 14:13:30 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-04-12 14:13:30 (GMT)
commit781516818778cd47593957e9c4cb64c3929eae76 (patch)
tree8d82cd7e525a3d0358f46dd04686251e34c027f6
parent809b18e610719f228c73c92b916874348ac05902 (diff)
downloadtcl-781516818778cd47593957e9c4cb64c3929eae76.zip
tcl-781516818778cd47593957e9c4cb64c3929eae76.tar.gz
tcl-781516818778cd47593957e9c4cb64c3929eae76.tar.bz2
Fix [1376892]
-rw-r--r--ChangeLog116
-rw-r--r--generic/regc_locale.c87
2 files changed, 143 insertions, 60 deletions
diff --git a/ChangeLog b/ChangeLog
index ca3886e..911f6b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,13 @@
+2006-04-12 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
+
+ * generic/regc_locale.c (cclass): Redefined the meaning of [:print:]
+ to be exactly UNICODE letters, numbers, punctuation, symbols and
+ spaces (*not* whitespace). [Bug 1376892]
+
2006-04-11 Don Porter <dgp@users.sourceforge.net>
- * generic/tclTrace.c: Stop some interference between enter traces
- * tests/trace.test: and enterstep traces. [Bug 1458266]
+ * generic/tclTrace.c: Stop some interference between enter traces
+ * tests/trace.test: and enterstep traces. [Bug 1458266]
2006-04-07 Don Porter <dgp@users.sourceforge.net>
@@ -12,15 +18,15 @@
2006-04-06 Jeff Hobbs <jeffh@ActiveState.com>
- * generic/tclRegexp.c (FinalizeRegexp): full reset data to
- indicate readiness for reinitialization.
+ * generic/tclRegexp.c (FinalizeRegexp): full reset data to indicate
+ readiness for reinitialization.
2006-04-06 Don Porter <dgp@users.sourceforge.net>
* generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): It seems
* tests/indexObj.test: there are extensions that rely on the prior
* doc/GetIndex.3: behavior that the empty string cannot succeed
- as a unique prefix matcher, so I'm restoring Donal Fellow's solution.
+ as a unique prefix matcher, so I'm restoring Donal Fellows's solution.
Added mention of this detail to the documentation. [Bug 1464039]
* tests/compExpr-old.test: Updated testmathfunctions constraint
@@ -32,8 +38,8 @@
* tests/indexObj.test: Corrected other test errors revealed by
* tests/upvar.test: testing outside the tcltest application.
- * generic/tclPathObj.c: Revised fix for the [Bug 1379287] family
- of path normalization bugs.
+ * generic/tclPathObj.c: Revised fix for the [Bug 1379287] family of
+ path normalization bugs.
2006-04-06 Daniel Steffen <das@users.sourceforge.net>
@@ -59,8 +65,8 @@
2006-04-05 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
* generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): Allow empty
- strings to be matched by the Tcl_GetIndexFromObj machinery, in
- the same manner as any other key. [Bug 1464039]
+ strings to be matched by the Tcl_GetIndexFromObj machinery, in the
+ same manner as any other key. [Bug 1464039]
2006-04-03 Andreas Kupries <andreask@activestate.com>
@@ -71,9 +77,9 @@
is OK, and the panic is as a precaution if someone twiddled the
BUFFER_PADDING into uselessness.
- * generic/tclIO.c (ReadChars): [Bug 1462248]. Temporarily suppress
- the use of TCL_ENCODING_END set when EOF was reached while the buffer
- we are converting is not truly the last buffer in the queue. Together
+ * generic/tclIO.c (ReadChars): [Bug 1462248]. Temporarily suppress the
+ use of TCL_ENCODING_END set when EOF was reached while the buffer we
+ are converting is not truly the last buffer in the queue. Together
with the Utf bug below it was possible to completely wreck the buffer
data structures, eventually crashing Tcl.
@@ -98,14 +104,14 @@
* generic/tclPathObj.c: More fixes for path normalization when /../
* tests/fileSystem.test: tries to go beyond root.[Bug 1379287]
- * generic/tclExecute.c: Revised INST_MOD implementation to do
+ * generic/tclExecute.c: Revised INST_MOD implementation to do
calculations in native types as much as possible, moving to mp_ints
only when necessary.
2006-03-28 Jeff Hobbs <jeffh@ActiveState.com>
- * win/tclWinPipe.c (TclpCreateProcess): change panics to Tcl
- errors and do proper refcounting of noe objPtr. [bug 1194429]
+ * win/tclWinPipe.c (TclpCreateProcess): change panics to Tcl errors
+ and do proper refcounting of noe objPtr. [bug 1194429]
* unix/tcl.m4, win/tcl.m4: []-quote AC_DEFUN functions.
@@ -128,74 +134,66 @@
2006-03-27 Pat Thoyts <patthoyts@users.sourceforge.net>
- * win/tclWinTest.c: Fixes for bug #1456373 (mingw-gcc issue)
+ * win/tclWinTest.c: Fixes for [Bug 1456373] (mingw-gcc issue)
2006-03-27 Andreas Kupries <andreask@activestate.com>
- * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made it
- * generic/tcl.h: the version where the "truncateProc"
- * generic/tclIO.c: is defined at, and moved all channel
- * generic/tclIOGT.c: drivers of Tcl to v5.
- * generic/tclIORChan.c:
- * unix/tclUnixChan.c:
- * unix/tclUnixPipe.c:
- * win/tclWinChan.c:
- * win/tclWinConsole.c:
- * win/tclWinPipe.c:
- * win/tclWinSerial.c:
- * win/tclWinSock.c:
+ * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made it the
+ * generic/tcl.h: version where the "truncateProc" is defined at,
+ * generic/tclIO.c: and moved all channel drivers of Tcl to v5.
+ * generic/tclIOGT.c, generic/tclIORChan.c, unix/tclUnixChan.c:
+ * unix/tclUnixPipe.c, win/tclWinChan.c, win/tclWinConsole.c:
+ * win/tclWinPipe.c, win/tclWinSerial.c, win/tclWinSock.c:
2006-03-27 Don Porter <dgp@users.sourceforge.net>
- * generic/tclExecute.c: Merge INST_MOD computation in with the
+ * generic/tclExecute.c: Merge INST_MOD computation in with the
INST_?SHIFT instructions, which also operate only on two integral
- values. Also corrected flaw that made INST_BITNOT of wide values
- require mp_int calculations. Also corrected type that missed
- optimized handling of the tclBooleanType by the TclGetBooleanFromObj
- macro.
+ values. Also corrected flaw that made INST_BITNOT of wide values
+ require mp_int calculations. Also corrected type that missed optimized
+ handling of the tclBooleanType by the TclGetBooleanFromObj macro.
* changes: Updates for another RC.
2006-03-25 Don Porter <dgp@users.sourceforge.net>
- * generic/tclExecute.c: Corrections to INST_EXPON detection of
+ * generic/tclExecute.c: Corrections to INST_EXPON detection of
overflow to use mp_int calculations.
2006-03-24 Kevin Kenny <kennykb@acm.org>
- * generic/tclExecute.c (TclExecuteByteCode): Added a couple
- of missing casts to 'int' that were affecting compilablity
- on VC6.
-
+ * generic/tclExecute.c (TclExecuteByteCode): Added a couple of missing
+ casts to 'int' that were affecting compilablity on VC6.
+
2006-03-24 Don Porter <dgp@users.sourceforge.net>
- * generic/tclEncoding.c: Reverted latest change [Bug 506653] since
- it reportedly killed test performance on Windows.
+ * generic/tclEncoding.c: Reverted latest change [Bug 506653] since it
+ reportedly killed test performance on Windows.
- * generic/tclExecute.c: Revised INST_EXPON implementation to do
+ * generic/tclExecute.c: Revised INST_EXPON implementation to do
calculations in native types as much as possible, moving to mp_ints
only when necessary.
2006-03-23 Don Porter <dgp@users.sourceforge.net>
- * generic/tclExecute.c: Merged INST_EXPON handling in with the other
+ * generic/tclExecute.c: Merged INST_EXPON handling in with the other
binary operators that operate on all number types (INST_ADD, etc.).
- * tests/env.test: With case preserved (see 2006-03-21 commit)
- be sure to do case-insensitive filtering. [Bug 1457065]
+ * tests/env.test: With case preserved (see 2006-03-21 commit) be sure
+ to do case-insensitive filtering. [Bug 1457065]
2006-03-23 Reinhard Max <max@suse.de>
- * unix/tcl.spec: Cleaned up and completed the spec file.
- An RPM can now be built from the tcl source
- distribution with "rpmbuild -tb <tarball>".
+ * unix/tcl.spec: Cleaned up and completed the spec file. An RPM can
+ now be built from the tcl source distribution with "rpmbuild -tb
+ <tarball>".
2006-03-22 Reinhard Max <max@suse.de>
- * tests/stack.test: Run the stack tests in subshells, so that they
- are reported as failed tests rather than bugs in the test suite if
- the recursion causes a segfault.
-
+ * tests/stack.test: Run the stack tests in subshells, so that they are
+ reported as failed tests rather than bugs in the test suite if the
+ recursion causes a segfault.
+
2006-03-21 Don Porter <dgp@users.sourceforge.net>
* changes: Updates for another RC.
@@ -207,13 +205,13 @@
2006-03-21 Daniel Steffen <das@users.sourceforge.net>
- * generic/tclInt.decls: implement globbing for HFS creator & type
- * macosx/tclMacOSXFCmd.c: codes and 'hidden' flag, as documented in
- * tests/macOSXFCmd.test: glob.n; objectified OSType handling in [glob]
- * unix/tclUnixFile.c: and [file attributes]; fix globbing for hidden
- files with pattern==NULL arg. [Bug 823329]
+ * generic/tclInt.decls: implement globbing for HFS creator & type
+ * macosx/tclMacOSXFCmd.c:codes and 'hidden' flag, as documented in
+ * tests/macOSXFCmd.test: glob.n; objectified OSType handling in [glob]
+ * unix/tclUnixFile.c: and [file attributes]; fix globbing for hidden
+ files with pattern==NULL arg. [Bug 823329]
* generic/tclIntPlatDecls.h:
- * generic/tclStubInit.c: make genstubs
+ * generic/tclStubInit.c: make genstubs
2006-03-20 Andreas Kupries <andreask@activestate.com>
@@ -355,7 +353,7 @@
2006-03-10 Zoran Vasiljevic <vasiljevic@users.sourceforge.net>
- -- Summary of changes fixing Tcl Bug #1437595 --
+ -- Summary of changes fixing [Bug 1437595] --
* generic/tclEvent.c: Cosmetic touches and identation
* generic/tclInt.h: Added TclpFinalizeSockets() call.
@@ -1047,7 +1045,7 @@
2005-11-20 Joe English <jenglish@users.sourceforge.net>
* generic/tclStubLib.c: Don't set tclStubsPtr to 0 when
- Tcl_PkgRequireEx() fails [Fix for #1091431 "Tcl_InitStubs failure
+ Tcl_PkgRequireEx() fails [Fix for [Bug 1091431] "Tcl_InitStubs failure
crashes wish"]
2005-11-18 Miguel Sofer <msofer@users.sf.net>
diff --git a/generic/regc_locale.c b/generic/regc_locale.c
index 9652028..1b573d8 100644
--- a/generic/regc_locale.c
+++ b/generic/regc_locale.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: regc_locale.c,v 1.12 2005/11/09 16:36:14 dkf Exp $
+ * RCS: @(#) $Id: regc_locale.c,v 1.13 2006/04/12 14:13:30 dkf Exp $
*/
/* ASCII character-name table */
@@ -531,6 +531,80 @@ static chr graphCharTable[] = {
#define NUM_GRAPH_CHAR (sizeof(graphCharTable)/sizeof(chr))
/*
+ * Unicode: unicode print characters including space, i.e. all Letters (class
+ * L*), Numbers (N*), Punctuation (P*), Symbols (S*) and Spaces (Zs).
+ */
+
+static crange printRangeTable[] = {
+ {0x0020, 0x007E}, {0x00A0, 0x01F5}, {0x01FA, 0x0217}, {0x0250, 0x02A8},
+ {0x02B0, 0x02DE}, {0x02E0, 0x02E9}, {0x0374, 0x0375}, {0x0384, 0x038A},
+ {0x038E, 0x03A1}, {0x03A3, 0x03CE}, {0x03D0, 0x03D6}, {0x03E2, 0x03F3},
+ {0x0401, 0x040C}, {0x040E, 0x044F}, {0x0451, 0x045C}, {0x045E, 0x0482},
+ {0x0490, 0x04C4}, {0x04C7, 0x04C8}, {0x04CB, 0x04CC}, {0x04D0, 0x04EB},
+ {0x04EE, 0x04F5}, {0x04F8, 0x04F9}, {0x0531, 0x0556}, {0x0559, 0x055F},
+ {0x0561, 0x0587}, {0x05D0, 0x05EA}, {0x05F0, 0x05F4}, {0x0621, 0x063A},
+ {0x0640, 0x064A}, {0x0660, 0x066D}, {0x0671, 0x06B7}, {0x06BA, 0x06BE},
+ {0x06C0, 0x06CE}, {0x06D0, 0x06D5}, {0x06E5, 0x06E6}, {0x06F0, 0x06F9},
+ {0x0905, 0x0939}, {0x0958, 0x0961}, {0x0964, 0x0970}, {0x0985, 0x098C},
+ {0x098F, 0x0990}, {0x0993, 0x09A8}, {0x09AA, 0x09B0}, {0x09B6, 0x09B9},
+ {0x09DC, 0x09DD}, {0x09DF, 0x09E1}, {0x09E6, 0x09FA}, {0x0A05, 0x0A0A},
+ {0x0A0F, 0x0A10}, {0x0A13, 0x0A28}, {0x0A2A, 0x0A30}, {0x0A32, 0x0A33},
+ {0x0A35, 0x0A36}, {0x0A38, 0x0A39}, {0x0A59, 0x0A5C}, {0x0A66, 0x0A6F},
+ {0x0A72, 0x0A74}, {0x0A85, 0x0A8B}, {0x0A8F, 0x0A91}, {0x0A93, 0x0AA8},
+ {0x0AAA, 0x0AB0}, {0x0AB2, 0x0AB3}, {0x0AB5, 0x0AB9}, {0x0AE6, 0x0AEF},
+ {0x0B05, 0x0B0C}, {0x0B0F, 0x0B10}, {0x0B13, 0x0B28}, {0x0B2A, 0x0B30},
+ {0x0B32, 0x0B33}, {0x0B36, 0x0B39}, {0x0B5C, 0x0B5D}, {0x0B5F, 0x0B61},
+ {0x0B66, 0x0B70}, {0x0B85, 0x0B8A}, {0x0B8E, 0x0B90}, {0x0B92, 0x0B95},
+ {0x0B99, 0x0B9A}, {0x0B9E, 0x0B9F}, {0x0BA3, 0x0BA4}, {0x0BA8, 0x0BAA},
+ {0x0BAE, 0x0BB5}, {0x0BB7, 0x0BB9}, {0x0BE7, 0x0BF2}, {0x0C05, 0x0C0C},
+ {0x0C0E, 0x0C10}, {0x0C12, 0x0C28}, {0x0C2A, 0x0C33}, {0x0C35, 0x0C39},
+ {0x0C60, 0x0C61}, {0x0C66, 0x0C6F}, {0x0C85, 0x0C8C}, {0x0C8E, 0x0C90},
+ {0x0C92, 0x0CA8}, {0x0CAA, 0x0CB3}, {0x0CB5, 0x0CB9}, {0x0CE0, 0x0CE1},
+ {0x0CE6, 0x0CEF}, {0x0D05, 0x0D0C}, {0x0D0E, 0x0D10}, {0x0D12, 0x0D28},
+ {0x0D2A, 0x0D39}, {0x0D60, 0x0D61}, {0x0D66, 0x0D6F}, {0x0E3F, 0x0E46},
+ {0x0E4F, 0x0E5B}, {0x0E99, 0x0E9F}, {0x0EA1, 0x0EA3}, {0x0EAA, 0x0EAB},
+ {0x0EAD, 0x0EB0}, {0x0EB2, 0x0EB3}, {0x0EC0, 0x0EC4}, {0x0ED0, 0x0ED9},
+ {0x0EDC, 0x0EDD}, {0x0F00, 0x0F17}, {0x0F1A, 0x0F34}, {0x0F3A, 0x0F3D},
+ {0x0F40, 0x0F47}, {0x0F49, 0x0F69}, {0x0F88, 0x0F8B}, {0x10A0, 0x10C5},
+ {0x10D0, 0x10F6}, {0x1100, 0x1159}, {0x115F, 0x11A2}, {0x11A8, 0x11F9},
+ {0x1E00, 0x1E9B}, {0x1EA0, 0x1EF9}, {0x1F00, 0x1F15}, {0x1F18, 0x1F1D},
+ {0x1F20, 0x1F45}, {0x1F48, 0x1F4D}, {0x1F50, 0x1F57}, {0x1F5F, 0x1F7D},
+ {0x1F80, 0x1FB4}, {0x1FB6, 0x1FC4}, {0x1FC6, 0x1FD3}, {0x1FD6, 0x1FDB},
+ {0x1FDD, 0x1FEF}, {0x1FF2, 0x1FF4}, {0x1FF6, 0x1FFE}, {0x2000, 0x200B},
+ {0x2010, 0x2027}, {0x2030, 0x2046}, {0x2074, 0x208E}, {0x20A0, 0x20AC},
+ {0x2100, 0x2138}, {0x2153, 0x2182}, {0x2190, 0x21EA}, {0x2200, 0x22F1},
+ {0x2302, 0x237A}, {0x2400, 0x2424}, {0x2440, 0x244A}, {0x2460, 0x24EA},
+ {0x2500, 0x2595}, {0x25A0, 0x25EF}, {0x2600, 0x2613}, {0x261A, 0x266F},
+ {0x2701, 0x2704}, {0x2706, 0x2709}, {0x270C, 0x2727}, {0x2729, 0x274B},
+ {0x274F, 0x2752}, {0x2758, 0x275E}, {0x2761, 0x2767}, {0x2776, 0x2794},
+ {0x2798, 0x27AF}, {0x27B1, 0x27BE}, {0x3000, 0x3029}, {0x3030, 0x3037},
+ {0x3041, 0x3094}, {0x309B, 0x309E}, {0x30A1, 0x30FE}, {0x3105, 0x312C},
+ {0x3131, 0x318E}, {0x3190, 0x319F}, {0x3200, 0x321C}, {0x3220, 0x3243},
+ {0x3260, 0x327B}, {0x327F, 0x32B0}, {0x32C0, 0x32CB}, {0x32D0, 0x32FE},
+ {0x3300, 0x3376}, {0x337B, 0x33DD}, {0x33E0, 0x33FE}, {0x4E00, 0x9FA5},
+ {0xAC00, 0xD7A3}, {0xF900, 0xFA2D}, {0xFB00, 0xFB06}, {0xFB13, 0xFB17},
+ {0xFB1F, 0xFB36}, {0xFB38, 0xFB3C}, {0xFB40, 0xFB41}, {0xFB43, 0xFB44},
+ {0xFB46, 0xFBB1}, {0xFBD3, 0xFD3F}, {0xFD50, 0xFD8F}, {0xFD92, 0xFDC7},
+ {0xFDF0, 0xFDFB}, {0xFE30, 0xFE44}, {0xFE49, 0xFE52}, {0xFE54, 0xFE66},
+ {0xFE68, 0xFE6B}, {0xFE70, 0xFE72}, {0xFE76, 0xFEFC}, {0xFF01, 0xFF5E},
+ {0xFF61, 0xFFBE}, {0xFFC2, 0xFFC7}, {0xFFCA, 0xFFCF}, {0xFFD2, 0xFFD7},
+ {0xFFDA, 0xFFDC}, {0xFFE0, 0xFFE6}, {0xFFE8, 0xFFEE}, {0xFFFC, 0xFFFD}
+};
+
+#define NUM_PRINT_RANGE (sizeof(printRangeTable)/sizeof(crange))
+
+static chr printCharTable[] = {
+ 0x037A, 0x037E, 0x038C, 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0589, 0x05BE,
+ 0x05C0, 0x05C3, 0x060C, 0x061B, 0x061F, 0x06E9, 0x093D, 0x0950, 0x09B2,
+ 0x0A5E, 0x0A8D, 0x0ABD, 0x0AD0, 0x0AE0, 0x0B3D, 0x0B9C, 0x0CDE, 0x0E01,
+ 0x0E32, 0x0E81, 0x0E84, 0x0E87, 0x0E8A, 0x0E8D, 0x0E94, 0x0EA5, 0x0EA7,
+ 0x0EBD, 0x0EC6, 0x0F36, 0x0F38, 0x0F85, 0x10FB, 0x1F59, 0x1F5B, 0x1F5D,
+ 0x2070, 0x2300, 0x274D, 0x2756, 0x303F, 0xFB3E, 0xFE74
+};
+
+#define NUM_PRINT_CHAR (sizeof(printCharTable)/sizeof(chr))
+
+/*
* End of auto-generated Unicode character ranges declarations.
*/
@@ -815,6 +889,17 @@ cclass(
switch((enum classes) index) {
case CC_PRINT:
+ cv = getcvec(v, NUM_PRINT_CHAR, NUM_PRINT_RANGE, 0);
+ if (cv) {
+ for (i=0 ; i<NUM_PRINT_CHAR ; i++) {
+ addchr(cv, printCharTable[i]);
+ }
+ for (i=0 ; i<NUM_PRINT_RANGE ; i++) {
+ addrange(cv, printRangeTable[i].start,
+ printRangeTable[i].end);
+ }
+ }
+ break;
case CC_ALNUM:
cv = getcvec(v, NUM_ALPHA_CHAR, NUM_DIGIT_RANGE + NUM_ALPHA_RANGE, 0);
if (cv) {