summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-01-24 13:11:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-01-24 13:11:15 (GMT)
commit73ae354d31d0f8f9e87e0d0c52d58b258afedd5d (patch)
treec3c17430408a52852268b540ef1543cbaabaee15 /generic/tclUtf.c
parentb96fd52bcba33e8f663042cd073454aa954723a8 (diff)
parent7fa090fbeed5a9719ed0b2d2d09d3447e2b3406e (diff)
downloadtcl-73ae354d31d0f8f9e87e0d0c52d58b258afedd5d.zip
tcl-73ae354d31d0f8f9e87e0d0c52d58b258afedd5d.tar.gz
tcl-73ae354d31d0f8f9e87e0d0c52d58b258afedd5d.tar.bz2
merge to bugfix branch
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index ff1f120..83900e9 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -1125,10 +1125,9 @@ Tcl_UniCharToUpper(
int info = GetUniCharInfo(ch);
if (GetCaseType(info) & 0x04) {
- return (Tcl_UniChar) (ch - GetDelta(info));
- } else {
- return ch;
+ ch -= GetDelta(info);
}
+ return (Tcl_UniChar) ch;
}
/*
@@ -1154,10 +1153,9 @@ Tcl_UniCharToLower(
int info = GetUniCharInfo(ch);
if (GetCaseType(info) & 0x02) {
- return (Tcl_UniChar) (ch + GetDelta(info));
- } else {
- return ch;
+ ch += GetDelta(info);
}
+ return (Tcl_UniChar) ch;
}
/*
@@ -1188,12 +1186,11 @@ Tcl_UniCharToTitle(
* Subtract or add one depending on the original case.
*/
- return (Tcl_UniChar) (ch + ((mode & 0x4) ? -1 : 1));
+ ch += ((mode & 0x4) ? -1 : 1);
} else if (mode == 0x4) {
- return (Tcl_UniChar) (ch - GetDelta(info));
- } else {
- return ch;
+ ch -= GetDelta(info);
}
+ return (Tcl_UniChar) ch;
}
/*