summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-05-07 07:40:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-05-07 07:40:58 (GMT)
commit5500074eff2f8cd05b593f4dcac0aecd23e00b94 (patch)
tree55f2e48693bb2fa2e2e32f930d689e83cb01fbe6 /generic
parent215b091d17a465decdc7abfdb701588f31db8714 (diff)
downloadtcl-5500074eff2f8cd05b593f4dcac0aecd23e00b94.zip
tcl-5500074eff2f8cd05b593f4dcac0aecd23e00b94.tar.gz
tcl-5500074eff2f8cd05b593f4dcac0aecd23e00b94.tar.bz2
Remove some tip389 restrictions in test-cases, which are no longer necessary.
Eliminate gcc compiler warnings when compiling with -DTCL_UTF_MAX=6 Other code clean-up and comment improvements. No change in functionality.
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h6
-rw-r--r--generic/tclCmdMZ.c14
-rw-r--r--generic/tclUtf.c4
3 files changed, 12 insertions, 12 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index c3e0f9d..6dd0ea0 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2146,9 +2146,9 @@ typedef struct Tcl_EncodingType {
/*
* The maximum number of bytes that are necessary to represent a single
- * Unicode character in UTF-8. The valid values should be 3, 4 or 6
- * (or perhaps 1 if we want to support a non-unicode enabled core). If 3 or
- * 4, then Tcl_UniChar must be 2-bytes in size (UCS-2) (the default). If 6,
+ * Unicode character in UTF-8. The valid values are 4 and 6
+ * (or perhaps 1 if we want to support a non-unicode enabled core). If 4,
+ * then Tcl_UniChar must be 2-bytes in size (UCS-2) (the default). If 6,
* then Tcl_UniChar must be 4-bytes in size (UCS-4). At this time UCS-2 mode
* is the default and recommended mode. UCS-4 is experimental and not
* recommended. It works for the core, but most extensions expect UCS-2.
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 6aaf1de..7c979bb 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -597,9 +597,9 @@ Tcl_RegsubObjCmd(
* slightly modified version of the one pair STR_MAP code.
*/
- int slen, nocase;
+ int slen, nocase, wsrclc;
int (*strCmpFn)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long);
- Tcl_UniChar *p, wsrclc;
+ Tcl_UniChar *p;
numMatches = 0;
nocase = (cflags & TCL_REG_NOCASE);
@@ -2001,8 +2001,8 @@ StringMapCmd(
* larger strings.
*/
- int mapLen;
- Tcl_UniChar *mapString, u2lc;
+ int mapLen, u2lc;
+ Tcl_UniChar *mapString;
ustring2 = Tcl_GetUnicodeFromObj(mapElemv[0], &length2);
p = ustring1;
@@ -2033,8 +2033,8 @@ StringMapCmd(
}
}
} else {
- Tcl_UniChar **mapStrings, *u2lc = NULL;
- int *mapLens;
+ Tcl_UniChar **mapStrings;
+ int *mapLens, *u2lc = NULL;
/*
* Precompute pointers to the unicode string and length. This saves us
@@ -2046,7 +2046,7 @@ StringMapCmd(
mapStrings = TclStackAlloc(interp, mapElemc*2*sizeof(Tcl_UniChar *));
mapLens = TclStackAlloc(interp, mapElemc * 2 * sizeof(int));
if (nocase) {
- u2lc = TclStackAlloc(interp, mapElemc * sizeof(Tcl_UniChar));
+ u2lc = TclStackAlloc(interp, mapElemc * sizeof(int));
}
for (index = 0; index < mapElemc; index++) {
mapStrings[index] = Tcl_GetUnicodeFromObj(mapElemv[index],
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 1d73a7a..693e210 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -1034,8 +1034,8 @@ Tcl_UtfToTitle(
lowChar = (((lowChar & 0x3ff) << 10) | (ch & 0x3ff)) + 0x10000;
}
#endif
- /* Special exception for Gregorian characters, which don't have titlecase */
- if ((lowChar < 0x1C90) || (lowChar >= 0x1CC0)) {
+ /* Special exception for Georgian Asomtavruli chars, no titlecase. */
+ if ((unsigned)(lowChar - 0x1C90) >= 0x30) {
lowChar = Tcl_UniCharToLower(lowChar);
}