summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-02-03 19:22:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-02-03 19:22:19 (GMT)
commitc8f626a51dd7139e69c1c685e6431046e548bad0 (patch)
treeb7364b344b03b3b47c830f315b046a566fbf755e
parentd9bac150627c28d4fab62f85a2696cc87911946d (diff)
parent098b03f8f4259f1767486350c21f5b7e11a6e06b (diff)
downloadtk-c8f626a51dd7139e69c1c685e6431046e548bad0.zip
tk-c8f626a51dd7139e69c1c685e6431046e548bad0.tar.gz
tk-c8f626a51dd7139e69c1c685e6431046e548bad0.tar.bz2
merge 8.5
-rw-r--r--generic/tkOption.c13
-rw-r--r--macosx/tkMacOSXButton.c4
-rw-r--r--macosx/tkMacOSXInit.c2
-rw-r--r--macosx/tkMacOSXPrivate.h3
-rw-r--r--macosx/ttkMacOSXTheme.c2
-rwxr-xr-xtests/option.file318
-rw-r--r--tests/option.test11
7 files changed, 12 insertions, 41 deletions
diff --git a/generic/tkOption.c b/generic/tkOption.c
index 17989f8..95b140d 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.c
@@ -1086,7 +1086,7 @@ ReadOptionFile(
char *buffer;
int result, bufferSize;
Tcl_Channel chan;
- Tcl_DString newName, optString;
+ Tcl_DString newName;
/*
* Prevent file system access in a safe interpreter.
@@ -1136,16 +1136,7 @@ ReadOptionFile(
}
Tcl_Close(NULL, chan);
buffer[bufferSize] = 0;
- if ((bufferSize>2) && !memcmp(buffer, "\357\273\277", 3)) {
- /* File starts with UTF-8 BOM */
- result = AddFromString(interp, tkwin, buffer+3, priority);
- } else {
- Tcl_DStringInit(&optString);
- Tcl_ExternalToUtfDString(NULL, buffer, bufferSize, &optString);
- result = AddFromString(interp, tkwin, Tcl_DStringValue(&optString),
- priority);
- Tcl_DStringFree(&optString);
- }
+ result = AddFromString(interp, tkwin, buffer, priority);
ckfree(buffer);
return result;
}
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index adb78c6..35f4ab5 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -289,10 +289,10 @@ TkpComputeButtonGeometry(
if ( butPtr->indicatorOn ) {
switch (butPtr->type) {
case TYPE_RADIO_BUTTON:
- GetThemeMetric(kThemeMetricRadioButtonWidth, &butPtr->indicatorDiameter);
+ GetThemeMetric(kThemeMetricRadioButtonWidth, (SInt32 *)&butPtr->indicatorDiameter);
break;
case TYPE_CHECK_BUTTON:
- GetThemeMetric(kThemeMetricCheckBoxWidth, &butPtr->indicatorDiameter);
+ GetThemeMetric(kThemeMetricCheckBoxWidth, (SInt32 *)&butPtr->indicatorDiameter);
break;
default:
break;
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 26eb3f5..8e353b4 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -59,9 +59,7 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
@end
@implementation TKApplication
-#ifndef __clang__
@synthesize poolProtected = _poolProtected;
-#endif
@end
@implementation TKApplication(TKInit)
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index e635020..d892f4e 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -274,6 +274,9 @@ VISIBILITY_HIDDEN
NSArray *_defaultHelpMenuItems;
NSWindow *_windowWithMouse;
NSAutoreleasePool *_mainPool;
+#ifdef __i386__
+ BOOL _poolProtected;
+#endif
}
@property BOOL poolProtected;
@end
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 87ec4c2..1997370 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -299,7 +299,7 @@ static void TabElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
- *heightPtr = GetThemeMetric(kThemeMetricLargeTabHeight, heightPtr);
+ GetThemeMetric(kThemeMetricLargeTabHeight, (SInt32 *)heightPtr);
*paddingPtr = Ttk_MakePadding(0, 0, 0, 2);
}
diff --git a/tests/option.file3 b/tests/option.file3
deleted file mode 100755
index 87f41ae..0000000
--- a/tests/option.file3
+++ /dev/null
@@ -1,18 +0,0 @@
-! This file is a sample option (resource) database used to test
-! Tk's option-handling capabilities.
-
-! Comment line \
- with a backslash-newline sequence embedded in it.
-
-*x1: blue
- tktest.x2 : green
-*\
-x3 \
- : pur\
-ple
-*x 4: brówn
-# More comments, this time delimited by hash-marks.
- # Comment-line with space.
-*x6:
-*x9: \ \ \\\101\n
-# comment line as last line of file.
diff --git a/tests/option.test b/tests/option.test
index 4668771..1bfcb7c 100644
--- a/tests/option.test
+++ b/tests/option.test
@@ -187,7 +187,6 @@ test option-14.12 {error conditions} {
set option1 [file join [testsDirectory] option.file1]
set option2 [file join [testsDirectory] option.file2]
-set option3 [file join [testsDirectory] option.file3]
test option-15.1 {database files} {
list [catch {option read non-existent} msg] $msg
@@ -208,18 +207,16 @@ test option-15.9 {database files} {option get . x3 color} burgundy
test option-15.10 {database files} {
list [catch {option read $option2} msg] $msg
} {1 {missing colon on line 2}}
-option read $option3
-test option-15.11 {database files} {option get . {x 4} color} br\xf3wn
test option-16.1 {ReadOptionFile} {
- set option4 [makeFile {} option.file3]
- set file [open $option4 w]
+ set option3 [makeFile {} option.file3]
+ set file [open $option3 w]
fconfigure $file -translation crlf
puts $file "*x7: true\n*x8: false"
close $file
- option read $option4 userDefault
+ option read $option3 userDefault
set result [list [option get . x7 color] [option get . x8 color]]
- removeFile $option4
+ removeFile $option3
set result
} {true false}