summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-16 12:17:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-16 12:17:59 (GMT)
commit7a5d64437977cc14b7b79e336b3b2a20785348e5 (patch)
tree7a98c5e25eb278af7eb4c7fa58ab73d819c2c739 /unix
parent41d3c8f67e62fe307c46c91e5a42b71e39c59334 (diff)
downloadtk-7a5d64437977cc14b7b79e336b3b2a20785348e5.zip
tk-7a5d64437977cc14b7b79e336b3b2a20785348e5.tar.gz
tk-7a5d64437977cc14b7b79e336b3b2a20785348e5.tar.bz2
Rename TkUtfToUniChar32 to TkUtfToUniChar2, and various simplifications needing less #ifdef's
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixFont.c5
-rw-r--r--unix/tkUnixRFont.c12
2 files changed, 1 insertions, 16 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index b10fddd..681d1d1 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -35,13 +35,8 @@ static const char *const encodingList[] = {
* family": the foundry, face name, and charset.
*/
-#if TCL_UTF_MAX > 3
#define FONTMAP_SHIFT 12
#define FONTMAP_PAGES (1 << (21 - FONTMAP_SHIFT))
-#else
-#define FONTMAP_SHIFT 10
-#define FONTMAP_PAGES (1 << (sizeof(Tcl_UniChar)*8 - FONTMAP_SHIFT))
-#endif
#define FONTMAP_BITSPERPAGE (1 << FONTMAP_SHIFT)
typedef struct FontFamily {
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index ee87657..0ea1ec6 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -54,12 +54,6 @@ typedef struct ThreadSpecificData {
Region clipRegion; /* The clipping region, or None. */
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
-
-#if TCL_UTF_MAX == 4
-#define UtfToUniChar(src, chPtr) TkUtfToUniChar32(src, chPtr)
-#else
-#define UtfToUniChar(src, chPtr) Tcl_UtfToUniChar(src, chPtr)
-#endif
/*
* Package initialization:
@@ -674,13 +668,9 @@ Tk_MeasureChars(
curByte = 0;
sawNonSpace = 0;
while (numBytes > 0) {
-#if TCL_UTF_MAX == 4
int unichar;
-#else
- Tcl_UniChar unichar;
-#endif
- clen = UtfToUniChar(source, &unichar);
+ clen = TkUtfToUniChar2(source, &unichar);
c = (FcChar32) unichar;
if (clen <= 0) {