summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/linux-build.yml4
-rw-r--r--.github/workflows/onefiledist.yml41
-rw-r--r--.github/workflows/win-build.yml5
-rw-r--r--generic/tkButton.c8
-rw-r--r--generic/tkCanvLine.c2
-rw-r--r--generic/tkCanvPoly.c2
-rw-r--r--generic/tkCanvas.c8
-rw-r--r--generic/tkClipboard.c8
-rw-r--r--generic/tkCmds.c6
-rw-r--r--generic/tkImgSVGnano.c7
-rw-r--r--generic/tkInt.h1
-rw-r--r--generic/tkMenu.c2
-rw-r--r--generic/tkMenubutton.c3
-rw-r--r--generic/tkPkgConfig.c3
-rw-r--r--generic/tkPointer.c2
-rw-r--r--generic/tkTextDisp.c18
-rw-r--r--generic/tkWindow.c2
-rw-r--r--library/ttk/notebook.tcl8
-rw-r--r--macosx/GNUmakefile4
-rw-r--r--macosx/tkMacOSXBitmap.c4
-rw-r--r--macosx/tkMacOSXButton.c12
-rw-r--r--macosx/tkMacOSXClipboard.c8
-rw-r--r--macosx/tkMacOSXColor.h2
-rw-r--r--macosx/tkMacOSXCursor.c2
-rw-r--r--macosx/tkMacOSXDefault.h3
-rw-r--r--macosx/tkMacOSXDialog.c29
-rw-r--r--macosx/tkMacOSXDraw.c52
-rw-r--r--macosx/tkMacOSXEmbed.c12
-rw-r--r--macosx/tkMacOSXFont.c2
-rw-r--r--macosx/tkMacOSXImage.c10
-rw-r--r--macosx/tkMacOSXKeyEvent.c10
-rw-r--r--macosx/tkMacOSXKeyboard.c40
-rw-r--r--macosx/tkMacOSXKeysyms.h2
-rw-r--r--macosx/tkMacOSXMenu.c8
-rw-r--r--macosx/tkMacOSXMenubutton.c12
-rw-r--r--macosx/tkMacOSXMouseEvent.c6
-rw-r--r--macosx/tkMacOSXNotify.c2
-rw-r--r--macosx/tkMacOSXPrivate.h4
-rw-r--r--macosx/tkMacOSXScrlbr.c12
-rw-r--r--macosx/tkMacOSXSubwindows.c6
-rw-r--r--macosx/tkMacOSXSysTray.c6
-rw-r--r--macosx/tkMacOSXTest.c2
-rw-r--r--macosx/tkMacOSXWm.c22
-rw-r--r--macosx/ttkMacOSXTheme.c24
-rw-r--r--tests/canvas.test16
-rw-r--r--tests/event.test30
-rw-r--r--tests/pkgconfig.test9
-rw-r--r--unix/Makefile.in80
-rwxr-xr-xunix/configure278
-rw-r--r--unix/configure.ac45
-rw-r--r--unix/tcl.m499
-rw-r--r--unix/tkAppInit.c3
-rw-r--r--unix/tkConfig.h.in3
-rw-r--r--unix/tkUnixDefault.h3
-rw-r--r--win/Makefile.in93
-rwxr-xr-xwin/configure218
-rw-r--r--win/configure.ac48
-rw-r--r--win/makefile.vc7
-rw-r--r--win/rules.vc12
-rw-r--r--win/tcl.m412
-rw-r--r--win/tkWinDefault.h3
-rw-r--r--win/tkWinPointer.c5
62 files changed, 1084 insertions, 306 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
index fd8741d..b5198e0 100644
--- a/.github/workflows/linux-build.yml
+++ b/.github/workflows/linux-build.yml
@@ -37,7 +37,7 @@ jobs:
sudo apt-get install tcl8.6-dev libxss-dev
mkdir "$HOME/install dir"
touch tk/doc/man.macros tk/generic/tkStubInit.c
- echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV
+ echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" --disable-zipfs >> $GITHUB_ENV
echo "CC=$COMPILER" >> $GITHUB_ENV
echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV
echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV
@@ -121,7 +121,7 @@ jobs:
sudo apt-get install tcl8.6-dev libxss-dev xvfb
mkdir "$HOME/install dir"
touch tk/doc/man.macros tk/generic/tkStubInit.c
- echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV
+ echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6 --disable-zipfs" >> $GITHUB_ENV
echo "CC=$COMPILER" >> $GITHUB_ENV
working-directory: "."
env:
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml
index c0a221e..2454aea 100644
--- a/.github/workflows/onefiledist.yml
+++ b/.github/workflows/onefiledist.yml
@@ -24,7 +24,6 @@ jobs:
- name: Setup Environment
run: |
sudo apt-get install libxss-dev
- mkdir -p install/1dist.vfs
touch tcl/generic/tclStubInit.c tcl/generic/tclOOStubInit.c
touch tk/generic/tkStubInit.c
echo "INST_DIR=$(cd install;pwd)" >> $GITHUB_ENV
@@ -36,7 +35,7 @@ jobs:
working-directory: tcl/unix
- name: Build & Install Tcl
run: |
- make binaries libraries tclzipfile install
+ make binaries libraries install
make shell SCRIPT="$VER_PATH $GITHUB_ENV"
working-directory: tcl/unix
- name: Configure Tk
@@ -48,15 +47,9 @@ jobs:
make binaries libraries install
working-directory: tk/unix
# TODO: need the Tk version separately for distro naming below
- - name: Pack Tk Library Files into Library Zip
- run: |
- unzip ../lib/libtcl*.zip
- cp -a ../lib/tk[0-9]* .
- zip -r ../1dist.zip .
- working-directory: ${{ env.INST_DIR }}/1dist.vfs
- name: Package
run: |
- cat ../tk/unix/wish 1dist.zip >> ${BUILD_NAME}
+ cp bin/wish8.7 ${BUILD_NAME}
chmod +x ${BUILD_NAME}
tar -cf ${BUILD_NAME}.tar ${BUILD_NAME}
working-directory: ${{ env.INST_DIR }}
@@ -70,7 +63,7 @@ jobs:
- name: Describe Installation Zip Contents
if: ${{ always() }}
run: |
- unzip -l 1dist.zip || true
+ unzip -l wish${{ env.TCL_PATCHLEVEL }}_unofficial || true
working-directory: ${{ env.INST_DIR }}
macos:
name: macOS
@@ -100,12 +93,13 @@ jobs:
path: create-dmg
- name: Setup Environment
run: |
- mkdir -p install/1dist.vfs install/contents
+ mkdir -p install/contents
touch tcl/generic/tclStubInit.c tcl/generic/tclOOStubInit.c
touch tk/generic/tkStubInit.c
echo "INST_DIR=$(cd install;pwd)" >> $GITHUB_ENV
echo "VER_PATH=$(cd tcl/tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV
+ echo "CFLAGS=-arch x86_64 -arch arm64e" >> $GITHUB_ENV
working-directory: "."
- name: Configure Tcl
run: |
@@ -113,7 +107,7 @@ jobs:
working-directory: tcl/unix
- name: Build & Install Tcl
run: |
- make binaries libraries tclzipfile install
+ make binaries libraries install
make shell SCRIPT="$VER_PATH $GITHUB_ENV"
working-directory: tcl/unix
- name: Configure Tk
@@ -126,15 +120,9 @@ jobs:
make binaries libraries install
working-directory: tk/unix
# TODO: need the Tk version separately for distro naming below
- - name: Pack Tk Library Files into Library Zip
- run: |
- unzip ../lib/libtcl*.zip
- cp -a ../lib/tk[0-9]* .
- zip -r ../1dist.zip .
- working-directory: ${{ env.INST_DIR }}/1dist.vfs
- name: Package
run: |
- cat ../tk/unix/wish 1dist.zip >> contents/${BUILD_NAME}
+ cp ../tk/unix/wish contents/${BUILD_NAME}
chmod +x contents/${BUILD_NAME}
cat > contents/README.txt <<EOF
This is a single-file executable developer preview of Tcl/Tk $TCL_PATCHLEVEL
@@ -180,9 +168,10 @@ jobs:
repository: tcltk/tcl
ref: core-8-branch
path: tcl
+ - name: Install MSYS2, Make, Zip
+ run: choco install -y msys2 make zip
- name: Setup Environment
run: |
- mkdir -p install/1dist
mkdir -p install/combined
touch tcl/generic/tclStubInit.c tcl/generic/tclOOStubInit.c
touch tk/generic/tkStubInit.c
@@ -195,9 +184,7 @@ jobs:
working-directory: tcl/win
- name: Build & Install Tcl
run: |
- make binaries libraries tclzipfile install
- echo "ZIP_BIN=`pwd`/minizip.exe" >> $GITHUB_ENV
- echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
+ make binaries libraries install
$INST_DIR/bin/tclsh* $VER_PATH $GITHUB_ENV
working-directory: tcl/win
- name: Configure Tk
@@ -210,15 +197,9 @@ jobs:
echo "TK_BIN=`pwd`/`echo wish*.exe`" >> $GITHUB_ENV
working-directory: tk/win
# TODO: need the Tk version separately for distro naming below
- - name: Pack Tk Library Files into Library Zip
- run: |
- unzip $TCL_ZIP
- cp -R ../lib/tk[0-9]* .
- $ZIP_BIN -o -r ../1dist.zip *
- working-directory: install/1dist
- name: Package
run: |
- cat ${TK_BIN} 1dist.zip > combined/${BUILD_NAME}.exe
+ cp ${TK_BIN} combined/${BUILD_NAME}.exe
working-directory: install
env:
BUILD_NAME: wish${{ env.TCL_PATCHLEVEL }}_unofficial
diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml
index fa956c6..539b05c 100644
--- a/.github/workflows/win-build.yml
+++ b/.github/workflows/win-build.yml
@@ -95,7 +95,6 @@ jobs:
- "no"
- "mem"
- "all"
- # Using powershell means we need to explicitly stop on failure
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -105,8 +104,8 @@ jobs:
repository: tcltk/tcl
ref: core-8-6-branch
path: tcl
- - name: Install MSYS2, Make
- run: choco install -y msys2 make
+ - name: Install MSYS2, Make, Zip
+ run: choco install -y msys2 make zip
- name: Prepare
run: |
touch tkStubInit.c
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 04c9d78..03496bb 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -144,7 +144,7 @@ static const Tk_OptionSpec labelOptionSpecs[] = {
DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), TCL_INDEX_NONE,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkButton, underline), 0, 0, 0},
+ TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0},
{TK_OPTION_STRING, "-width", "width", "Width",
DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_INDEX_NONE, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
@@ -245,7 +245,7 @@ static const Tk_OptionSpec buttonOptionSpecs[] = {
DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), TCL_INDEX_NONE,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkButton, underline), 0, 0, 0},
+ TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0},
{TK_OPTION_STRING, "-width", "width", "Width",
DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_INDEX_NONE, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
@@ -355,7 +355,7 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = {
{TK_OPTION_STRING, "-tristatevalue", "tristateValue", "TristateValue",
DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), TCL_INDEX_NONE, 0, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkButton, underline), 0, 0, 0},
+ TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0},
{TK_OPTION_STRING, "-variable", "variable", "Variable",
DEF_CHECKBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), TCL_INDEX_NONE,
TK_OPTION_NULL_OK, 0, 0},
@@ -465,7 +465,7 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = {
{TK_OPTION_STRING, "-tristatevalue", "tristateValue", "TristateValue",
DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), TCL_INDEX_NONE, 0, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkButton, underline), 0, 0, 0},
+ TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0},
{TK_OPTION_STRING, "-value", "value", "Value",
DEF_BUTTON_VALUE, offsetof(TkButton, onValuePtr), TCL_INDEX_NONE, 0, 0, 0},
{TK_OPTION_STRING, "-variable", "variable", "Variable",
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index e7e8904..07dbb70 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -1748,7 +1748,7 @@ GetLineIndex(
const char *string;
(void)canvas;
- if (TCL_OK == TkGetIntForIndex(obj, 2*linePtr->numPoints - 1, 0, &idx)) {
+ if (TCL_OK == TkGetIntForIndex(obj, 2*linePtr->numPoints - 1, 1, &idx)) {
if (idx == TCL_INDEX_NONE) {
idx = 0;
} else if (idx > (2*(TkSizeT)linePtr->numPoints)) {
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index 1620914..90b2896 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -1683,6 +1683,8 @@ GetPolygonIndex(
if (TCL_OK == TkGetIntForIndex(obj, (INT_MAX - 1) - ((INT_MAX) % count), 1, &idx)) {
if (idx == TCL_INDEX_NONE) {
idx = 0;
+ } else if (idx >= INT_MAX - ((INT_MAX) % count)) {
+ idx = count;
} else {
idx = (idx & (TkSizeT)-2) % count;
}
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index a8b9734..fd65796 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -3004,6 +3004,10 @@ DisplayCanvas(
Tk_Item *itemPtr;
Pixmap pixmap;
int screenX1, screenX2, screenY1, screenY2, width, height;
+#ifdef MAC_OSX_TK
+ TkWindow *winPtr;
+ MacDrawable *macWin;
+#endif
if (canvasPtr->tkwin == NULL) {
return;
@@ -3018,8 +3022,8 @@ DisplayCanvas(
* If drawing is disabled, all we need to do is
* clear the REDRAW_PENDING flag.
*/
- TkWindow *winPtr = (TkWindow *)(canvasPtr->tkwin);
- MacDrawable *macWin = winPtr->privatePtr;
+ winPtr = (TkWindow *)(canvasPtr->tkwin);
+ macWin = winPtr->privatePtr;
if (macWin && (macWin->flags & TK_DO_NOT_DRAW)){
canvasPtr->flags &= ~REDRAW_PENDING;
return;
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index a972230..1f4298d 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.c
@@ -709,7 +709,13 @@ ClipboardGetProc(
* used). */
const char *portion) /* New information to be appended. */
{
- Tcl_DStringAppend((Tcl_DString *)clientData, portion, -1);
+ Tcl_Encoding utf8 = Tcl_GetEncoding(NULL, "utf-8");
+ Tcl_DString ds;
+
+ Tcl_ExternalToUtfDString(utf8, portion, -1, &ds);
+ Tcl_DStringAppend((Tcl_DString *) clientData, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
+ Tcl_DStringFree(&ds);
+ Tcl_FreeEncoding(utf8);
return TCL_OK;
}
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index e57f21e..36981af 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -1113,14 +1113,16 @@ Tk_TkwaitObjCmd(
static char *
WaitVariableProc(
ClientData clientData, /* Pointer to integer to set to 1. */
- TCL_UNUSED(Tcl_Interp *), /* Interpreter containing variable. */
- TCL_UNUSED(const char *), /* Name of variable. */
+ Tcl_Interp *interp, /* Interpreter containing variable. */
+ const char *name1, /* Name of variable. */
TCL_UNUSED(const char *), /* Second part of variable name. */
TCL_UNUSED(int)) /* Information about what happened. */
{
int *donePtr = (int *)clientData;
*donePtr = 1;
+ Tcl_UntraceVar(interp, name1, TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
+ WaitVariableProc, clientData);
return NULL;
}
diff --git a/generic/tkImgSVGnano.c b/generic/tkImgSVGnano.c
index c9437ab..427b2c0 100644
--- a/generic/tkImgSVGnano.c
+++ b/generic/tkImgSVGnano.c
@@ -353,7 +353,7 @@ StringReadSVG(
NSVGimage *nsvgImage = GetCachedSVG(interp, dataObj, formatObj, &ropts);
if (nsvgImage == NULL) {
- data = Tcl_GetStringFromObj(dataObj, &length);
+ data = Tcl_GetStringFromObj(dataObj, &length);
nsvgImage = ParseSVGWithOptions(interp, data, length, formatObj,
&ropts);
}
@@ -579,6 +579,7 @@ RasterizeSVG(
unsigned char *imgData;
Tk_PhotoImageBlock svgblock;
double scale;
+ Tcl_WideUInt wh;
(void)srcX;
(void)srcY;
@@ -593,8 +594,8 @@ RasterizeSVG(
}
/* Tk Ticket [822330269b] Check potential int overflow in following ckalloc */
- unsigned long long wh = (unsigned long long)w * (unsigned long long)h;
- if ( wh > INT_MAX / 4) {
+ wh = (Tcl_WideUInt)w * (Tcl_WideUInt)h;
+ if ( w < 0 || h < 0 || wh > INT_MAX / 4) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("image size overflow", -1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "IMAGE_SIZE_OVERFLOW", NULL);
goto cleanRAST;
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 68838b7..cc29660 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -1378,6 +1378,7 @@ MODULE_SCOPE void TkRotatePoint(double originX, double originY,
MODULE_SCOPE int TkGetIntForIndex(Tcl_Obj *, TkSizeT, int lastOK, TkSizeT*);
#define TkNewIndexObj(value) Tcl_NewWideIntObj((Tcl_WideInt)(value + 1) - 1)
+#define TK_OPTION_UNDERLINE_DEF(type, field) "-1", TCL_INDEX_NONE, offsetof(type, field), 0, NULL
#ifdef _WIN32
#define TkParseColor XParseColor
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index a7e6363..da5815f 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -161,7 +161,7 @@ static const Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
TCL_INDEX_NONE, offsetof(TkMenuEntry, state), 0,
(ClientData) menuStateStrings, 0},
{TK_OPTION_INT, "-underline", NULL, NULL,
- DEF_MENU_ENTRY_UNDERLINE, TCL_INDEX_NONE, offsetof(TkMenuEntry, underline), 0, NULL, 0},
+ TK_OPTION_UNDERLINE_DEF(TkMenuEntry, underline), 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index dbf6208..ede28dd 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -145,8 +145,7 @@ static const Tk_OptionSpec optionSpecs[] = {
DEF_MENUBUTTON_TEXT_VARIABLE, TCL_INDEX_NONE,
offsetof(TkMenuButton, textVarName), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_MENUBUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkMenuButton, underline),
- 0, 0, 0},
+ TK_OPTION_UNDERLINE_DEF(TkMenuButton, underline), 0},
{TK_OPTION_STRING, "-width", "width", "Width",
DEF_MENUBUTTON_WIDTH, TCL_INDEX_NONE, offsetof(TkMenuButton, widthString),
0, 0, 0},
diff --git a/generic/tkPkgConfig.c b/generic/tkPkgConfig.c
index d9e5981..2c0615d 100644
--- a/generic/tkPkgConfig.c
+++ b/generic/tkPkgConfig.c
@@ -126,6 +126,9 @@ static const Tcl_Config cfg[] = {
#ifdef CFG_RUNTIME_DEMODIR
{"demodir,runtime", CFG_RUNTIME_DEMODIR},
#endif
+#if !defined(STATIC_BUILD)
+ {"dllfile,runtime", CFG_RUNTIME_DLLFILE},
+#endif
/* Installation paths to various stuff */
diff --git a/generic/tkPointer.c b/generic/tkPointer.c
index 607939d..2fea8d8 100644
--- a/generic/tkPointer.c
+++ b/generic/tkPointer.c
@@ -502,7 +502,7 @@ TkPointerDeadWindow(
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (winPtr == tsdPtr->lastWinPtr) {
- tsdPtr->lastWinPtr = NULL;
+ tsdPtr->lastWinPtr = TkGetContainer(winPtr);
}
if (winPtr == tsdPtr->grabWinPtr) {
tsdPtr->grabWinPtr = NULL;
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index d14a25d..e6b04cc 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -7656,15 +7656,15 @@ TkTextCharLayoutProc(
#ifdef TK_LAYOUT_WITH_BASE_CHUNKS
if (baseCharChunkPtr == NULL) {
baseCharChunkPtr = chunkPtr;
- bciPtr = ckalloc(sizeof(BaseCharInfo));
+ bciPtr = (BaseCharInfo *)ckalloc(sizeof(BaseCharInfo));
baseString = &bciPtr->baseChars;
Tcl_DStringInit(baseString);
bciPtr->width = 0;
ciPtr = &bciPtr->ci;
} else {
- bciPtr = baseCharChunkPtr->clientData;
- ciPtr = ckalloc(sizeof(CharInfo));
+ bciPtr = (BaseCharInfo *)baseCharChunkPtr->clientData;
+ ciPtr = (CharInfo *)ckalloc(sizeof(CharInfo));
baseString = &bciPtr->baseChars;
}
@@ -7988,7 +7988,7 @@ CharDisplayProc(
}
#ifdef TK_DRAW_IN_CONTEXT
- bciPtr = ciPtr->baseChunkPtr->clientData;
+ bciPtr = (BaseCharInfo *)ciPtr->baseChunkPtr->clientData;
numBytes = Tcl_DStringLength(&bciPtr->baseChars);
string = Tcl_DStringValue(&bciPtr->baseChars);
@@ -8899,7 +8899,7 @@ FinalizeBaseChunk(
if (chunkPtr->displayProc != CharDisplayProc) {
continue;
}
- ciPtr = chunkPtr->clientData;
+ ciPtr = (CharInfo *)chunkPtr->clientData;
if (ciPtr->baseChunkPtr != baseCharChunkPtr) {
break;
}
@@ -8916,7 +8916,7 @@ FinalizeBaseChunk(
}
if (addChunkPtr != NULL) {
- ciPtr = addChunkPtr->clientData;
+ ciPtr = (CharInfo *)addChunkPtr->clientData;
ciPtr->chars = baseChars + ciPtr->baseOffset;
#ifdef TK_DRAW_IN_CONTEXT
@@ -8967,7 +8967,7 @@ FreeBaseChunk(
if (chunkPtr->undisplayProc != CharUndisplayProc) {
continue;
}
- ciPtr = chunkPtr->clientData;
+ ciPtr = (CharInfo *)chunkPtr->clientData;
if (ciPtr->baseChunkPtr != baseChunkPtr) {
break;
}
@@ -9087,14 +9087,14 @@ RemoveFromBaseChunk(
* Reinstitute this base chunk for re-layout.
*/
- ciPtr = chunkPtr->clientData;
+ ciPtr = (CharInfo *)chunkPtr->clientData;
baseCharChunkPtr = ciPtr->baseChunkPtr;
/*
* Remove the chunk data from the base chunk data.
*/
- bciPtr = baseCharChunkPtr->clientData;
+ bciPtr = (BaseCharInfo *)baseCharChunkPtr->clientData;
#ifdef DEBUG_LAYOUT_WITH_BASE_CHUNKS
if ((ciPtr->baseOffset + ciPtr->numBytes)
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 1ee86de..3be72c6 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -1268,7 +1268,7 @@ Tk_DestroyWindow(
/*
* Some cleanup needs to be done immediately, rather than later, because
- * it needs information that will be destoyed before we get to the main
+ * it needs information that will be destroyed before we get to the main
* cleanup point. For example, TkFocusDeadWindow needs to access the
* parentPtr field from a window, but if a Destroy event handler deletes
* the window's parent this field will be NULL before the main cleanup
diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl
index 07dbe0c..7097c45 100644
--- a/library/ttk/notebook.tcl
+++ b/library/ttk/notebook.tcl
@@ -59,13 +59,13 @@ proc ttk::notebook::Press {w x y} {
# Select the next/previous tab in the list.
#
proc ttk::notebook::CycleTab {w dir {factor 1.0}} {
- if {[$w index end] != 0} {
- set current [$w index current]
+ set current [$w index current]
+ if {$current >= 0} {
+ set tabCount [$w index end]
set d [expr {$dir/$factor}]
set d [expr {int($d > 0 ? ceil($d) : floor($d))}]
- set tabCount [$w index end]
set select [expr {($current + $d) % $tabCount}]
- set step [expr {$dir > 0 ? 1 : -1}]
+ set step [expr {$d > 0 ? 1 : -1}]
while {[$w tab $select -state] ne "normal" && ($select != $current)} {
set select [expr {($select + $step) % $tabCount}]
}
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index cf76ac0..9828be5 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -100,7 +100,7 @@ space := ${empty} ${empty}
objdir = $(subst ${space},\ ,${OBJ_DIR})
develop_make_args := BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols
-deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install
+deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install-strip
embedded_make_args := EMBEDDED_BUILD=1
install_make_args := INSTALL_BUILD=1
@@ -193,7 +193,7 @@ ${objdir}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \
mkdir -p "${OBJ_DIR}" && cd "${OBJ_DIR}" && \
if [ ${UNIX_DIR}/configure -nt config.status ]; then ${UNIX_DIR}/configure -C \
--prefix="${PREFIX}" --bindir="${BINDIR}" --libdir="${LIBDIR}" \
- --mandir="${MANDIR}" --enable-framework \
+ --mandir="${MANDIR}" --enable-framework --disable-zipfs \
--with-tcl="${TCL_DIR}" \
${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}; else ./config.status; fi
ifneq (${VERSION},${TCL_VERSION})
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index 3c82663..b5652b7 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.c
@@ -257,7 +257,7 @@ TkpGetNativeAppBitmap(
if (iconBitmapTable.buckets &&
(hPtr = Tcl_FindHashEntry(&iconBitmapTable, name))) {
OSType type;
- IconBitmap *iconBitmap = Tcl_GetHashValue(hPtr);
+ IconBitmap *iconBitmap = (IconBitmap *)Tcl_GetHashValue(hPtr);
name = NULL;
size = NSMakeSize(iconBitmap->width, iconBitmap->height);
switch (iconBitmap->kind) {
@@ -403,7 +403,7 @@ TkMacOSXIconBitmapObjCmd(
}
hPtr = Tcl_CreateHashEntry(&iconBitmapTable, name, &isNew);
if (!isNew) {
- iconBitmap = Tcl_GetHashValue(hPtr);
+ iconBitmap = (IconBitmap *)Tcl_GetHashValue(hPtr);
ckfree(iconBitmap->value);
} else {
iconBitmap = (IconBitmap *)ckalloc(sizeof(IconBitmap));
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index f96acc7..40743f6 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -181,8 +181,8 @@ void
TkpDisplayButton(
ClientData clientData) /* Information about widget. */
{
- MacButton *macButtonPtr = clientData;
- TkButton *butPtr = clientData;
+ MacButton *macButtonPtr = (MacButton *)clientData;
+ TkButton *butPtr = (TkButton *)clientData;
Tk_Window tkwin = butPtr->tkwin;
Pixmap pixmap;
DrawParams* dpPtr = &macButtonPtr->drawParams;
@@ -901,8 +901,8 @@ ButtonEventProc(
ClientData clientData, /* Information about window. */
XEvent *eventPtr) /* Information about event. */
{
- TkButton *buttonPtr = clientData;
- MacButton *mbPtr = clientData;
+ TkButton *buttonPtr = (TkButton *)clientData;
+ MacButton *mbPtr = (MacButton *)clientData;
if (eventPtr->type == ActivateNotify
|| eventPtr->type == DeactivateNotify) {
@@ -957,7 +957,7 @@ TkMacOSXComputeButtonParams(
*btnkind = kThemePushButton;
}
- if ((butPtr->image == None) && (butPtr->bitmap == None)) {
+ if ((butPtr->image == NULL) && (butPtr->bitmap == None)) {
switch (butPtr->type) {
case TYPE_BUTTON:
*btnkind = kThemePushButton;
@@ -1174,7 +1174,7 @@ TkMacOSXComputeButtonDrawParams(
static void
PulseDefaultButtonProc(ClientData clientData)
{
- MacButton *mbPtr = clientData;
+ MacButton *mbPtr = (MacButton *)clientData;
TkpDisplayButton(clientData);
/*
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c
index 8e2b4a4..41887f4 100644
--- a/macosx/tkMacOSXClipboard.c
+++ b/macosx/tkMacOSXClipboard.c
@@ -137,13 +137,7 @@ TkSelGetSelection(
string = [pb stringForType:type];
}
if (string) {
- if (target == dispPtr->utf8Atom) {
- result = proc(clientData, interp, string.UTF8String);
- } else if (target == XA_STRING) {
- const char *latin1 = [string
- cStringUsingEncoding:NSISOLatin1StringEncoding];
- result = proc(clientData, interp, latin1);
- }
+ result = proc(clientData, interp, string.UTF8String);
}
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
diff --git a/macosx/tkMacOSXColor.h b/macosx/tkMacOSXColor.h
index 1b4bab6..8fa400b 100644
--- a/macosx/tkMacOSXColor.h
+++ b/macosx/tkMacOSXColor.h
@@ -185,7 +185,7 @@ static SystemColorDatum systemColorData[] = {
{"PlaceholderTextColor", semantic, 0, "grayColor", 0, NULL },
{"SeparatorColor", semantic, 0, "grayColor", 0, NULL },
{"UnemphasizedSelectedTextBackgroundColor", semantic, 0, "grayColor", 0, NULL },
-{NULL, 0, 0, NULL, 0, NULL }
+{NULL, rgbColor, 0, NULL, 0, NULL }
};
#endif
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index a04b6bb..dc6aade 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -536,7 +536,7 @@ TkpSetCursor(
{
int cursorChanged = 1;
- if (cursor == None) {
+ if (cursor == NULL) {
/*
* This is a little tricky. We can't really tell whether
* gCurrentCursor is NULL because it was NULL last time around or
diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h
index 1df20f7..fb1292d 100644
--- a/macosx/tkMacOSXDefault.h
+++ b/macosx/tkMacOSXDefault.h
@@ -105,7 +105,6 @@
#define DEF_BUTTON_TAKE_FOCUS NULL
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
-#define DEF_BUTTON_UNDERLINE "-1"
#define DEF_BUTTON_VALUE ""
#define DEF_BUTTON_WIDTH "0"
#define DEF_BUTTON_WRAP_LENGTH "0"
@@ -296,7 +295,6 @@
#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
#define DEF_MENU_ENTRY_SELECT NULL
-#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
* Defaults for menus overall:
@@ -361,7 +359,6 @@
#define DEF_MENUBUTTON_TAKE_FOCUS "0"
#define DEF_MENUBUTTON_TEXT ""
#define DEF_MENUBUTTON_TEXT_VARIABLE ""
-#define DEF_MENUBUTTON_UNDERLINE "-1"
#define DEF_MENUBUTTON_WIDTH "0"
#define DEF_MENUBUTTON_WRAP_LENGTH "0"
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 7901499..1123346 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -221,7 +221,7 @@ getFileURL(
returnCode: (NSModalResponse) returnCode
contextInfo: (void *) contextInfo
{
- FilePanelCallbackInfo *callbackInfo = contextInfo;
+ FilePanelCallbackInfo *callbackInfo = (FilePanelCallbackInfo *)contextInfo;
if (returnCode == modalOK) {
Tcl_Obj *resultObj;
@@ -266,7 +266,7 @@ getFileURL(
- (void) tkAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode
contextInfo: (void *) contextInfo
{
- AlertCallbackInfo *callbackInfo = contextInfo;
+ AlertCallbackInfo *callbackInfo = (AlertCallbackInfo *)contextInfo;
if (returnCode >= NSAlertFirstButtonReturn) {
Tcl_Obj *resultObj = Tcl_NewStringObj(alertButtonStrings[
@@ -422,7 +422,7 @@ Tk_ChooseColorObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result = TCL_ERROR;
- Tk_Window parent, tkwin = clientData;
+ Tk_Window parent, tkwin = (Tk_Window)clientData;
const char *title = NULL;
int i;
NSColor *color = nil, *initialColor = nil;
@@ -677,7 +677,7 @@ Tk_GetOpenFileObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tk_Window tkwin = clientData;
+ Tk_Window tkwin = (Tk_Window)clientData;
char *str;
int i, result = TCL_ERROR, haveParentOption = 0;
int index, len, multiple = 0;
@@ -1679,10 +1679,10 @@ FontchooserEvent(
if (!fontchooserInterp) {
return;
}
- fcdPtr = Tcl_GetAssocData(fontchooserInterp, "::tk::fontchooser", NULL);
+ fcdPtr = (FontchooserData *)Tcl_GetAssocData(fontchooserInterp, "::tk::fontchooser", NULL);
switch (kind) {
case FontchooserClosed:
- if (fcdPtr->parent != None) {
+ if (fcdPtr->parent != NULL) {
Tk_SendVirtualEvent(fcdPtr->parent, "TkFontchooserVisibility", NULL);
fontchooserInterp = NULL;
}
@@ -1738,7 +1738,7 @@ FontchooserCget(
switch(optionIndex) {
case FontchooserParent:
- if (fcdPtr->parent != None) {
+ if (fcdPtr->parent != NULL) {
resObj = Tcl_NewStringObj(
((TkWindow *)fcdPtr->parent)->pathName, -1);
} else {
@@ -1801,7 +1801,7 @@ FontchooserConfigureCmd(
Tcl_Obj *const objv[])
{
Tk_Window tkwin = (Tk_Window)clientData;
- FontchooserData *fcdPtr = Tcl_GetAssocData(interp, "::tk::fontchooser",
+ FontchooserData *fcdPtr = (FontchooserData *)Tcl_GetAssocData(interp, "::tk::fontchooser",
NULL);
int i, r = TCL_OK;
@@ -1858,7 +1858,7 @@ FontchooserConfigureCmd(
Tk_Window parent = Tk_NameToWindow(interp,
Tcl_GetString(objv[i+1]), tkwin);
- if (parent == None) {
+ if (parent == NULL) {
return TCL_ERROR;
}
if (fcdPtr->parent) {
@@ -1885,7 +1885,7 @@ FontchooserConfigureCmd(
fcdPtr->titleObj = NULL;
}
break;
- case FontchooserFont:
+ case FontchooserFont: {
Tcl_GetStringFromObj(objv[i+1], &len);
if (len) {
Tk_Font f = Tk_AllocFontFromObj(interp, tkwin, objv[i+1]);
@@ -1919,6 +1919,7 @@ FontchooserConfigureCmd(
"TkFontchooserFontChanged", NULL);
}
break;
+ }
case FontchooserCmd:
if (fcdPtr->cmdObj) {
Tcl_DecrRefCount(fcdPtr->cmdObj);
@@ -1964,10 +1965,10 @@ FontchooserShowCmd(
TCL_UNUSED(int),
TCL_UNUSED(Tcl_Obj *const *))
{
- FontchooserData *fcdPtr = Tcl_GetAssocData(interp, "::tk::fontchooser",
+ FontchooserData *fcdPtr = (FontchooserData *)Tcl_GetAssocData(interp, "::tk::fontchooser",
NULL);
- if (fcdPtr->parent == None) {
+ if (fcdPtr->parent == NULL) {
fcdPtr->parent = (Tk_Window)clientData;
Tk_CreateEventHandler(fcdPtr->parent, StructureNotifyMask,
FontchooserParentEventHandler, fcdPtr);
@@ -2042,7 +2043,7 @@ FontchooserParentEventHandler(
ClientData clientData,
XEvent *eventPtr)
{
- FontchooserData *fcdPtr = clientData;
+ FontchooserData *fcdPtr = (FontchooserData *)clientData;
if (eventPtr->type == DestroyNotify) {
Tk_DeleteEventHandler(fcdPtr->parent, StructureNotifyMask,
@@ -2074,7 +2075,7 @@ DeleteFontchooserData(
ClientData clientData,
Tcl_Interp *interp)
{
- FontchooserData *fcdPtr = clientData;
+ FontchooserData *fcdPtr = (FontchooserData *)clientData;
if (fcdPtr->titleObj) {
Tcl_DecrRefCount(fcdPtr->titleObj);
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 220b1eb..1fa3e1f 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1332,35 +1332,37 @@ TkMacOSXSetupDrawingContext(
* Finish configuring the drawing context.
*/
- CGAffineTransform t = {
- .a = 1, .b = 0,
- .c = 0, .d = -1,
- .tx = 0,
- .ty = dc.portBounds.size.height
- };
-
- dc.portBounds.origin.x += macDraw->xOff;
- dc.portBounds.origin.y += macDraw->yOff;
- CGContextSaveGState(dc.context);
- CGContextSetTextDrawingMode(dc.context, kCGTextFill);
- CGContextConcatCTM(dc.context, t);
- if (dc.clipRgn) {
+ {
+ CGAffineTransform t = {
+ .a = 1, .b = 0,
+ .c = 0, .d = -1,
+ .tx = 0,
+ .ty = dc.portBounds.size.height
+ };
-#ifdef TK_MAC_DEBUG_DRAWING
+ dc.portBounds.origin.x += macDraw->xOff;
+ dc.portBounds.origin.y += macDraw->yOff;
CGContextSaveGState(dc.context);
- ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context);
- CGContextSetRGBFillColor(dc.context, 1.0, 0.0, 0.0, 0.1);
- CGContextEOFillPath(dc.context);
- CGContextRestoreGState(dc.context);
-#endif /* TK_MAC_DEBUG_DRAWING */
+ CGContextSetTextDrawingMode(dc.context, kCGTextFill);
+ CGContextConcatCTM(dc.context, t);
+ if (dc.clipRgn) {
- CGRect r;
- CGRect b = CGRectApplyAffineTransform(
- CGContextGetClipBoundingBox(dc.context), t);
- if (!HIShapeIsRectangular(dc.clipRgn) ||
- !CGRectContainsRect(*HIShapeGetBounds(dc.clipRgn, &r), b)) {
+#ifdef TK_MAC_DEBUG_DRAWING
+ CGContextSaveGState(dc.context);
ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context);
- CGContextEOClip(dc.context);
+ CGContextSetRGBFillColor(dc.context, 1.0, 0.0, 0.0, 0.1);
+ CGContextEOFillPath(dc.context);
+ CGContextRestoreGState(dc.context);
+#endif /* TK_MAC_DEBUG_DRAWING */
+
+ CGRect r;
+ CGRect b = CGRectApplyAffineTransform(
+ CGContextGetClipBoundingBox(dc.context), t);
+ if (!HIShapeIsRectangular(dc.clipRgn) ||
+ !CGRectContainsRect(*HIShapeGetBounds(dc.clipRgn, &r), b)) {
+ ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context);
+ CGContextEOClip(dc.context);
+ }
}
}
if (gc) {
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 98a40e6..832f404 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -704,7 +704,7 @@ EmbeddedEventProc(
ClientData clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
- TkWindow *winPtr = clientData;
+ TkWindow *winPtr = (TkWindow *)clientData;
if (eventPtr->type == DestroyNotify) {
EmbedWindowDeleted(winPtr);
@@ -739,7 +739,7 @@ ContainerEventProc(
ClientData clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
- TkWindow *winPtr = clientData;
+ TkWindow *winPtr = (TkWindow *)clientData;
Container *containerPtr;
Tk_ErrorHandler errHandler;
@@ -847,7 +847,7 @@ EmbedStructureProc(
ClientData clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
- Container *containerPtr = clientData;
+ Container *containerPtr = (Container *)clientData;
Tk_ErrorHandler errHandler;
if (eventPtr->type == ConfigureNotify) {
@@ -856,7 +856,7 @@ EmbedStructureProc(
* Send a ConfigureNotify to the embedded application.
*/
- if (containerPtr->embeddedPtr != None) {
+ if (containerPtr->embeddedPtr != NULL) {
TkDoConfigureNotify(containerPtr->embeddedPtr);
}
if (containerPtr->embedded != None) {
@@ -901,7 +901,7 @@ EmbedActivateProc(
ClientData clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
- Container *containerPtr = clientData;
+ Container *containerPtr = (Container *)clientData;
if (containerPtr->embeddedPtr != NULL) {
if (eventPtr->type == ActivateNotify) {
@@ -936,7 +936,7 @@ EmbedFocusProc(
ClientData clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
- Container *containerPtr = clientData;
+ Container *containerPtr = (Container *)clientData;
Display *display;
XEvent event;
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index fc68aa9..00a0b9e 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -112,7 +112,7 @@ static int CreateNamedSystemFont(Tcl_Interp *interp,
self = [self init];
if (self) {
Tcl_DStringInit(&_ds);
- Tcl_UtfToChar16DString(bytes, len, &_ds);
+ Tcl_UtfToChar16DString((const char *)bytes, len, &_ds);
_string = [[NSString alloc]
initWithCharactersNoCopy:(unichar *)Tcl_DStringValue(&_ds)
length:Tcl_DStringLength(&_ds)>>1
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 5f74f4f..7646834 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -88,7 +88,7 @@ TkMacOSXCreateCGImageWithXImage(
*destPtr++ = xBitReverseTable[(unsigned char)(*(srcPtr++))];
}
} else {
- data = memcpy(ckalloc(len), image->data + image->xoffset, len);
+ data = (char *)memcpy(ckalloc(len), image->data + image->xoffset, len);
}
if (data) {
provider = CGDataProviderCreateWithData(data, data, len,
@@ -118,7 +118,7 @@ TkMacOSXCreateCGImageWithXImage(
bitmapInfo = (image->byte_order == MSBFirst ?
kCGBitmapByteOrder32Little : kCGBitmapByteOrder32Big);
bitmapInfo |= kCGImageAlphaLast;
- data = memcpy(ckalloc(len), image->data + image->xoffset, len);
+ data = (char *)memcpy(ckalloc(len), image->data + image->xoffset, len);
if (data) {
provider = CGDataProviderCreateWithData(data, data, len,
releaseData);
@@ -338,7 +338,7 @@ XCreateImage(
XImage *ximage;
display->request++;
- ximage = ckalloc(sizeof(XImage));
+ ximage = (XImage *)ckalloc(sizeof(XImage));
ximage->height = height;
ximage->width = width;
@@ -634,7 +634,7 @@ XGetImage(
NSBitmapImageRep* bitmapRep = nil;
NSUInteger bitmap_fmt = 0;
XImage* imagePtr = NULL;
- char* bitmap = NULL;
+ char *bitmap = NULL;
char R, G, B, A;
int depth = 32, offset = 0, bitmap_pad = 0;
unsigned int bytes_per_row, size, row, n, m;
@@ -657,7 +657,7 @@ XGetImage(
bitmap_fmt = [bitmapRep bitmapFormat];
size = [bitmapRep bytesPerPlane];
bytes_per_row = [bitmapRep bytesPerRow];
- bitmap = ckalloc(size);
+ bitmap = (char *)ckalloc(size);
if (!bitmap
|| (bitmap_fmt != 0 && bitmap_fmt != 1)
|| [bitmapRep samplesPerPixel] != 4
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index 54a7b5a..4d5a98a 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -53,7 +53,7 @@ static NSUInteger textInputModifiers;
TkWindow *winPtr = TkMacOSXGetTkWindow(w), *grabWinPtr, *focusWinPtr;
Tk_Window tkwin = (Tk_Window)winPtr;
NSEventType type = [theEvent type];
- NSUInteger virtual = [theEvent keyCode];
+ NSUInteger virt = [theEvent keyCode];
NSUInteger modifiers = ([theEvent modifierFlags] &
NSDeviceIndependentModifierFlagsMask);
XEvent xEvent;
@@ -126,7 +126,7 @@ static NSUInteger textInputModifiers;
TKLog(@"-[%@(%p) %s] repeat=%d mods=%x char=%x code=%lu c=%d type=%d",
[self class], self, _cmd,
(type == NSKeyDown) && [theEvent isARepeat], modifiers, keychar,
- virtual, w, type);
+ virt, w, type);
#endif
}
@@ -215,7 +215,7 @@ static NSUInteger textInputModifiers;
macKC.v.o_s = ((modifiers & NSShiftKeyMask ? INDEX_SHIFT : 0) |
(modifiers & NSAlternateKeyMask ? INDEX_OPTION : 0));
- macKC.v.virtual = virtual;
+ macKC.v.virt = virt;
switch (type) {
case NSFlagsChanged:
@@ -349,9 +349,9 @@ static NSUInteger textInputModifiers;
UniChar lowChar = [str characterAtIndex:++i];
macKC.v.keychar = CFStringGetLongCharacterForSurrogatePair(
(UniChar)keychar, lowChar);
- macKC.v.virtual = NON_BMP_VIRTUAL;
+ macKC.v.virt = NON_BMP_VIRTUAL;
} else if (repRange.location == 0 || sendingIMEText) {
- macKC.v.virtual = REPLACEMENT_VIRTUAL;
+ macKC.v.virt = REPLACEMENT_VIRTUAL;
} else {
macKC.uint = TkMacOSXAddVirtual(macKC.uint);
xEvent.xkey.state |= INDEX2STATE(macKC.x.xvirtual);
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index e6f51d8..adc9906 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -143,7 +143,7 @@ static BOOL keyboardChanged = YES;
static void InitHashTables(void);
static void UpdateKeymaps(void);
static int KeyDataToUnicode(UniChar *uniChars, int maxChars,
- UInt16 keyaction, UInt32 virtual, UInt32 modifiers,
+ UInt16 keyaction, UInt32 virt, UInt32 modifiers,
UInt32 * deadKeyStatePtr);
#pragma mark TKApplication(TKKeyboard)
@@ -188,15 +188,15 @@ InitHashTables(void)
Tcl_InitHashTable(&special2keysym, TCL_ONE_WORD_KEYS);
Tcl_InitHashTable(&keysym2keycode, TCL_ONE_WORD_KEYS);
- for (kPtr = keyArray; kPtr->virtual != 0; kPtr++) {
+ for (kPtr = keyArray; kPtr->virt != 0; kPtr++) {
MacKeycode macKC;
macKC.v.o_s = 0;
- hPtr = Tcl_CreateHashEntry(&special2keysym, INT2PTR(kPtr->virtual),
+ hPtr = Tcl_CreateHashEntry(&special2keysym, INT2PTR(kPtr->virt),
&dummy);
Tcl_SetHashValue(hPtr, INT2PTR(kPtr->keysym));
hPtr = Tcl_CreateHashEntry(&keysym2keycode, INT2PTR(kPtr->keysym),
&dummy);
- macKC.v.virtual = kPtr->virtual;
+ macKC.v.virt = kPtr->virt;
macKC.v.keychar = kPtr->keychar;
Tcl_SetHashValue(hPtr, INT2PTR(macKC.uint));
@@ -252,7 +252,7 @@ UpdateKeymaps()
{
static Bool keymapInitialized = false;
Tcl_HashEntry *hPtr;
- int virtual, index, dummy;
+ int virt, index, dummy;
if (!keymapInitialized) {
Tcl_InitHashTable(&unichar2xvirtual, TCL_ONE_WORD_KEYS);
@@ -268,12 +268,12 @@ UpdateKeymaps()
*/
for (index = 3; index >= 0; index--) {
- for (virtual = 0; virtual < 128; virtual++) {
+ for (virt = 0; virt < 128; virt++) {
MacKeycode macKC;
- macKC.v = (keycode_v) {.virtual = virtual, .o_s = index, .keychar = 0};
+ macKC.v = (keycode_v) {.virt = virt, .o_s = index, .keychar = 0};
int modifiers = INDEX2CARBON(index), result;
UniChar keychar = 0;
- result = KeyDataToUnicode(&keychar, 1, kUCKeyActionDown, virtual,
+ result = KeyDataToUnicode(&keychar, 1, kUCKeyActionDown, virt,
modifiers, NULL);
if (keychar == 0x10) {
@@ -284,7 +284,7 @@ UpdateKeymaps()
continue;
}
macKC.v.keychar = keychar;
- if (! ON_KEYPAD(virtual)) {
+ if (! ON_KEYPAD(virt)) {
hPtr = Tcl_CreateHashEntry(&unichar2xvirtual,
INT2PTR(macKC.x.keychar), &dummy);
Tcl_SetHashValue(hPtr, INT2PTR(macKC.x.xvirtual));
@@ -326,7 +326,7 @@ KeyDataToUnicode(
UniChar *uniChars,
int maxChars,
UInt16 keyaction,
- UInt32 virtual,
+ UInt32 virt,
UInt32 modifiers,
UInt32 *deadKeyStatePtr)
{
@@ -355,14 +355,14 @@ KeyDataToUnicode(
UInt32 dummyState;
OSStatus err;
- virtual &= 0xFF;
+ virt &= 0xFF;
modifiers = (modifiers >> 8) & 0xFF;
if (!deadKeyStatePtr) {
options = kUCKeyTranslateNoDeadKeysMask;
dummyState = 0;
deadKeyStatePtr = &dummyState;
}
- err = ChkErr(UCKeyTranslate, layoutData, virtual, keyaction, modifiers,
+ err = ChkErr(UCKeyTranslate, (const UCKeyboardLayout *)layoutData, virt, keyaction, modifiers,
keyboardType, options, deadKeyStatePtr, maxChars,
&actuallength, uniChars);
if (!actuallength && *deadKeyStatePtr) {
@@ -424,7 +424,7 @@ XkbKeycodeToKeysym(
* an Fn function key or Tab, Backspace, Home, End, etc.
*/
- hPtr = Tcl_FindHashEntry(&special2keysym, INT2PTR(macKC.v.virtual));
+ hPtr = Tcl_FindHashEntry(&special2keysym, INT2PTR(macKC.v.virt));
if (hPtr != NULL) {
return (KeySym) Tcl_GetHashValue(hPtr);
}
@@ -435,7 +435,7 @@ XkbKeycodeToKeysym(
* keysym.
*/
- if (macKC.v.virtual > 127) {
+ if (macKC.v.virt > 127) {
hPtr = Tcl_FindHashEntry(&unichar2keysym, INT2PTR(macKC.v.keychar));
if (hPtr != NULL) {
return (KeySym) Tcl_GetHashValue(hPtr);
@@ -450,7 +450,7 @@ XkbKeycodeToKeysym(
*/
modifiers = INDEX2CARBON(macKC.v.o_s);
- result = KeyDataToUnicode(&keychar, 1, kUCKeyActionDown, macKC.v.virtual,
+ result = KeyDataToUnicode(&keychar, 1, kUCKeyActionDown, macKC.v.virt,
modifiers, NULL);
if (result) {
hPtr = Tcl_FindHashEntry(&unichar2keysym, INT2PTR(keychar));
@@ -637,7 +637,7 @@ XKeysymToKeycode(
hPtr = Tcl_FindHashEntry(&keysym2keycode, INT2PTR(keysym));
if (hPtr != NULL) {
- return (KeyCode) Tcl_GetHashValue(hPtr);
+ return (KeyCode) PTR2INT(Tcl_GetHashValue(hPtr));
}
/*
@@ -645,7 +645,7 @@ XKeysymToKeycode(
* else.
*/
- macKC.v.virtual = NO_VIRTUAL;
+ macKC.v.virt = NO_VIRTUAL;
macKC.v.o_s = 0;
macKC.v.keychar = 0;
@@ -719,7 +719,7 @@ TkpSetKeycodeAndState(
if (macKC.v.keychar < 0xF700) {
UniChar keychar = macKC.v.keychar;
NSString *str, *lower, *upper;
- if (macKC.v.virtual != NO_VIRTUAL) {
+ if (macKC.v.virt != NO_VIRTUAL) {
macKC.x.keychar = xvirtual2unichar[macKC.x.xvirtual];
} else {
str = [[NSString alloc] initWithCharacters:&keychar length:1];
@@ -781,7 +781,7 @@ TkpGetKeySym(
*/
if (macKC.v.keychar == MOD_KEYCHAR) {
- switch (macKC.v.virtual) {
+ switch (macKC.v.virt) {
case 54:
return XK_Meta_R;
case 55:
@@ -953,7 +953,7 @@ TkMacOSXAddVirtual(
unsigned long data = (unsigned long) Tcl_GetHashValue(hPtr);
macKC.x.xvirtual = (unsigned int) data;
} else {
- macKC.v.virtual = NO_VIRTUAL;
+ macKC.v.virt = NO_VIRTUAL;
}
return macKC.uint;
}
diff --git a/macosx/tkMacOSXKeysyms.h b/macosx/tkMacOSXKeysyms.h
index 7bd250b..1f6f260 100644
--- a/macosx/tkMacOSXKeysyms.h
+++ b/macosx/tkMacOSXKeysyms.h
@@ -31,7 +31,7 @@
*/
typedef struct {
- int virtual; /* value of [NSEvent keyCode] */
+ int virt; /* value of [NSEvent keyCode] */
KeySym keysym; /* X11 keysym */
KeyCode keychar; /* XEvent keycode & 0xFFFF */
} KeyInfo;
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 12ad2f3..c618974 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -232,7 +232,7 @@ TKBackgroundLoop *backgroundLoop = nil;
- (TkMenu *) tkMenu
{
- return _tkMenu;
+ return (TkMenu *)_tkMenu;
}
- (int) tkIndexOfItem: (NSMenuItem *) menuItem
@@ -409,7 +409,7 @@ TKBackgroundLoop *backgroundLoop = nil;
(void)menu;
if (_tkMenu) {
- RecursivelyClearActiveMenu(_tkMenu);
+ RecursivelyClearActiveMenu((TkMenu *)_tkMenu);
}
}
@@ -433,7 +433,7 @@ TKBackgroundLoop *backgroundLoop = nil;
Tcl_Preserve(interp);
Tcl_Preserve(menuPtr);
- int result = TkPostCommand(_tkMenu);
+ int result = TkPostCommand(menuPtr);
if (result!=TCL_OK && result!=TCL_CONTINUE && result!=TCL_BREAK) {
Tcl_AddErrorInfo(interp, "\n (menu preprocess)");
@@ -696,7 +696,7 @@ TkpConfigureMenuEntry(
Tk_SizeOfImage(mePtr->image, &imageWidth, &imageHeight);
image = TkMacOSXGetNSImageFromTkImage(mePtr->menuPtr->display,
mePtr->image, imageWidth, imageHeight);
- } else if (mePtr->bitmapPtr != None) {
+ } else if (mePtr->bitmapPtr != NULL) {
Pixmap bitmap = Tk_GetBitmapFromObj(mePtr->menuPtr->tkwin,
mePtr->bitmapPtr);
diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c
index 7de2b46..0502029 100644
--- a/macosx/tkMacOSXMenubutton.c
+++ b/macosx/tkMacOSXMenubutton.c
@@ -165,8 +165,8 @@ void
TkpDisplayMenuButton(
ClientData clientData) /* Information about widget. */
{
- MacMenuButton *mbPtr = clientData;
- TkMenuButton *butPtr = clientData;
+ MacMenuButton *mbPtr = (MacMenuButton *)clientData;
+ TkMenuButton *butPtr = (TkMenuButton *)clientData;
Tk_Window tkwin = butPtr->tkwin;
Pixmap pixmap;
DrawParams *dpPtr = &mbPtr->drawParams;
@@ -240,8 +240,8 @@ TkpDestroyMenuButton(
*/
void
-TkpComputeMenuButtonGeometry(butPtr)
- TkMenuButton *butPtr; /* Widget record for menu button. */
+TkpComputeMenuButtonGeometry(
+ TkMenuButton *butPtr) /* Widget record for menu button. */
{
int width, height, avgWidth, haveImage = 0, haveText = 0;
int txtWidth, txtHeight;
@@ -689,8 +689,8 @@ MenuButtonEventProc(
ClientData clientData, /* Information about window. */
XEvent *eventPtr) /* Information about event. */
{
- TkMenuButton *buttonPtr = clientData;
- MacMenuButton *mbPtr = clientData;
+ TkMenuButton *buttonPtr = (TkMenuButton *)clientData;
+ MacMenuButton *mbPtr = (MacMenuButton *)clientData;
if (eventPtr->type == ActivateNotify
|| eventPtr->type == DeactivateNotify) {
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index c4ba1bd..46f20bc 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -686,6 +686,12 @@ TkpWarpPointer(
}
CGWarpMouseCursorPosition(pt);
+
+ if (dispPtr->warpWindow) {
+ TkGenerateButtonEventForXPointer(Tk_WindowId(dispPtr->warpWindow));
+ } else {
+ TkGenerateButtonEventForXPointer(None);
+ }
}
/*
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index 25dff29..1e78521 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -52,7 +52,7 @@ typedef struct ThreadSpecificData {
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
-#define TSD_INIT() ThreadSpecificData *tsdPtr = \
+#define TSD_INIT() ThreadSpecificData *tsdPtr = (ThreadSpecificData *) \
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData))
static void TkMacOSXNotifyExitHandler(ClientData clientData);
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index 269e4c4..e88f1a0 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -138,7 +138,7 @@
typedef struct keycode_v_t {
unsigned keychar: 22; /* UCS-32 character */
unsigned o_s: 2; /* State of Option and Shift keys. */
- unsigned virtual: 8; /* 8-bit virtual keycode - identifies a key. */
+ unsigned virt: 8; /* 8-bit virtual keycode - identifies a key. */
} keycode_v;
typedef struct keycode_x_t {
@@ -160,7 +160,7 @@ typedef union MacKeycode_t {
* Note that 0x7f is del and 0xF8FF is the Apple Logo character.
*/
-#define ON_KEYPAD(virtual) ((virtual >= 0x41) && (virtual <= 0x5C))
+#define ON_KEYPAD(virt) ((virt >= 0x41) && (virt <= 0x5C))
#define IS_PRINTABLE(keychar) ((keychar >= 0x20) && (keychar != 0x7f) && \
((keychar < 0xF700) || keychar >= 0xF8FF))
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 5cd1f56..6ed53ee 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -246,7 +246,7 @@ void
TkpDisplayScrollbar(
ClientData clientData) /* Information about window. */
{
- TkScrollbar *scrollPtr = clientData;
+ TkScrollbar *scrollPtr = (TkScrollbar *)clientData;
MacScrollbar *msPtr = (MacScrollbar *) scrollPtr;
Tk_Window tkwin = scrollPtr->tkwin;
TkWindow *winPtr = (TkWindow *) tkwin;
@@ -456,10 +456,10 @@ TkpDestroyScrollbar(
{
MacScrollbar *macScrollPtr = (MacScrollbar *) scrollPtr;
- if (macScrollPtr->troughGC != None) {
+ if (macScrollPtr->troughGC != NULL) {
Tk_FreeGC(scrollPtr->display, macScrollPtr->troughGC);
}
- if (macScrollPtr->copyGC != None) {
+ if (macScrollPtr->copyGC != NULL) {
Tk_FreeGC(scrollPtr->display, macScrollPtr->copyGC);
}
}
@@ -770,7 +770,7 @@ ScrollbarEventProc(
ClientData clientData, /* Information about window. */
XEvent *eventPtr) /* Information about event. */
{
- TkScrollbar *scrollPtr = clientData;
+ TkScrollbar *scrollPtr = (TkScrollbar *)clientData;
switch (eventPtr->type) {
case UnmapNotify:
@@ -784,10 +784,10 @@ ScrollbarEventProc(
case ButtonRelease:
case EnterNotify:
case LeaveNotify:
- ScrollbarEvent(clientData, eventPtr);
+ ScrollbarEvent(scrollPtr, eventPtr);
break;
default:
- TkScrollbarEventProc(clientData, eventPtr);
+ TkScrollbarEventProc(scrollPtr, eventPtr);
}
}
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 65efb86..32d5436 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -105,7 +105,7 @@ XDestroyWindow(
macWin->view = nil;
/*
- * Delay deletion of a toplevel data structure untill all children have
+ * Delay deletion of a toplevel data structure until all children have
* been deleted.
*/
@@ -973,7 +973,7 @@ InvalViewRect(
void *ref)
{
static CGAffineTransform t;
- TKContentView *view = ref;
+ TKContentView *view = (TKContentView *)ref;
NSRect dirtyRect;
if (!view) {
@@ -1435,7 +1435,7 @@ Tk_FreePixmap(
display->request++;
if (macPix->context) {
- char *data = CGBitmapContextGetData(macPix->context);
+ char *data = (char *)CGBitmapContextGetData(macPix->context);
if (data) {
ckfree(data);
diff --git a/macosx/tkMacOSXSysTray.c b/macosx/tkMacOSXSysTray.c
index 563b58f..a0f0829 100644
--- a/macosx/tkMacOSXSysTray.c
+++ b/macosx/tkMacOSXSysTray.c
@@ -437,7 +437,11 @@ typedef TkStatusItem** StatusItemInfo;
*/
DEBUG_LOG("willPresentNotification\n");
- completionHandler(ALERT_OPTION);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
+ if (@available(macOS 11.0, *)) {
+ completionHandler(ALERT_OPTION);
+ }
+#endif
}
- (void) userNotificationCenter:(UNUserNotificationCenter *)center
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index 730b8a4..60167ca 100644
--- a/macosx/tkMacOSXTest.c
+++ b/macosx/tkMacOSXTest.c
@@ -376,7 +376,7 @@ InjectKeyEventObjCmd(
characters:chars
charactersIgnoringModifiers:unmod
isARepeat:NO
- keyCode:macKC.v.virtual];
+ keyCode:macKC.v.virt];
[NSApp postEvent:keyEvent atStart:NO];
return TCL_OK;
}
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 90827dd..c78bc02 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -1482,7 +1482,7 @@ WmSetAttribute(
}
break;
case WMATT_TITLEPATH: {
- const char *path = Tcl_FSGetNativePath(value);
+ const char *path = (const char *)Tcl_FSGetNativePath(value);
NSString *filename = @"";
if (path && *path) {
@@ -1636,7 +1636,7 @@ WmAttributesCmd(
Tcl_ListObjAppendElement(NULL, result,
Tcl_NewStringObj(WmAttributeNames[attribute], -1));
Tcl_ListObjAppendElement(NULL, result,
- WmGetAttribute(winPtr, macWindow, attribute));
+ WmGetAttribute(winPtr, macWindow, (WmAttribute)attribute));
}
Tcl_SetObjResult(interp, result);
} else if (objc == 4) { /* wm attributes $win -attribute */
@@ -1644,7 +1644,7 @@ WmAttributesCmd(
sizeof(char *), "attribute", 0, &attribute) != TCL_OK) {
return TCL_ERROR;
}
- Tcl_SetObjResult(interp, WmGetAttribute(winPtr, macWindow, attribute));
+ Tcl_SetObjResult(interp, WmGetAttribute(winPtr, macWindow, (WmAttribute)attribute));
} else if ((objc - 3) % 2 == 0) { /* wm attributes $win -att value... */
int i;
@@ -1653,7 +1653,7 @@ WmAttributesCmd(
sizeof(char *), "attribute", 0, &attribute) != TCL_OK) {
return TCL_ERROR;
}
- if (WmSetAttribute(winPtr, macWindow, interp, attribute, objv[i+1])
+ if (WmSetAttribute(winPtr, macWindow, interp, (WmAttribute)attribute, objv[i+1])
!= TCL_OK) {
return TCL_ERROR;
}
@@ -4130,7 +4130,7 @@ TopLevelEventProc(
ClientData clientData, /* Window for which event occurred. */
XEvent *eventPtr) /* Event that just happened. */
{
- TkWindow *winPtr = clientData;
+ TkWindow *winPtr = (TkWindow *)clientData;
winPtr->wmInfoPtr->flags |= WM_VROOT_OFFSET_STALE;
if (eventPtr->type == DestroyNotify) {
@@ -4216,7 +4216,7 @@ static void
UpdateGeometryInfo(
ClientData clientData) /* Pointer to the window's record. */
{
- TkWindow *winPtr = clientData;
+ TkWindow *winPtr = (TkWindow *)clientData;
WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y, width, height, min, max;
@@ -5574,8 +5574,8 @@ TkMacOSXZoomToplevel(
void *whichWindow, /* The Macintosh window to zoom. */
short zoomPart) /* Either inZoomIn or inZoomOut */
{
- NSWindow *window = whichWindow;
- TkWindow *winPtr = TkMacOSXGetTkWindow(window);
+ NSWindow *window = (NSWindow *)whichWindow;
+ TkWindow *winPtr = (TkWindow *)TkMacOSXGetTkWindow(window);
WmInfo *wmPtr;
if (!winPtr || !winPtr->wmInfoPtr) {
@@ -5632,7 +5632,7 @@ TkUnsupported1ObjCmd(
enum SubCmds {
TKMWS_STYLE, TKMWS_TABID, TKMWS_APPEARANCE, TKMWS_ISDARK
};
- Tk_Window tkwin = clientData;
+ Tk_Window tkwin = (Tk_Window)clientData;
TkWindow *winPtr;
int index;
@@ -6705,7 +6705,7 @@ TkWmStackorderToplevel(
for (NSWindow *w in backToFront) {
hPtr = Tcl_FindHashEntry(&table, (char*) w);
if (hPtr != NULL) {
- childWinPtr = Tcl_GetHashValue(hPtr);
+ childWinPtr = (TkWindow *)Tcl_GetHashValue(hPtr);
*windowPtr++ = childWinPtr;
}
}
@@ -7030,7 +7030,7 @@ ApplyContainerOverrideChanges(
[macWindow setExcludedFromWindowsMenu:NO];
wmPtr->flags &= ~WM_TOPMOST;
}
- if (wmPtr->container != None) {
+ if (wmPtr->container != NULL) {
TkWindow *containerWinPtr = (TkWindow *)wmPtr->container;
if (containerWinPtr && (containerWinPtr->window != None)
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 08dfc66..5159c8c 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -1676,7 +1676,7 @@ static void ButtonElementSize(
int *minHeight,
Ttk_Padding *paddingPtr)
{
- ThemeButtonParams *params = clientData;
+ ThemeButtonParams *params = (ThemeButtonParams *)clientData;
HIThemeButtonDrawInfo info =
ComputeButtonDrawInfo(params, 0, tkwin);
static const CGRect scratchBounds = {{0, 0}, {100, 100}};
@@ -1741,7 +1741,7 @@ static void ButtonElementDraw(
Ttk_Box b,
Ttk_State state)
{
- ThemeButtonParams *params = clientData;
+ ThemeButtonParams *params = (ThemeButtonParams *)clientData;
CGRect bounds = BoxToRect(d, b);
HIThemeButtonDrawInfo info = ComputeButtonDrawInfo(params, state, tkwin);
int isDark = TkMacOSXInDarkMode(tkwin);
@@ -2108,7 +2108,7 @@ static void EntryElementDraw(
Ttk_Box b,
Ttk_State state)
{
- EntryElement *e = elementRecord;
+ EntryElement *e = (EntryElement *)elementRecord;
ThemeFrameParams *params = clientData;
HIThemeFrameKind kind = params ? params->kind :
kHIThemeFrameTextFieldSquare;
@@ -2460,8 +2460,8 @@ static void TrackElementDraw(
Ttk_Box b,
Ttk_State state)
{
- TrackElementData *data = clientData;
- TrackElement *elem = elementRecord;
+ TrackElementData *data = (TrackElementData *)clientData;
+ TrackElement *elem = (TrackElement *)elementRecord;
int orientation = TTK_ORIENT_HORIZONTAL;
double from = 0, to = 100, value = 0, fraction, max;
CGRect bounds = BoxToRect(d, b);
@@ -2600,7 +2600,7 @@ static void PbarElementDraw(
Ttk_Box b,
Ttk_State state)
{
- PbarElement *pbar = elementRecord;
+ PbarElement *pbar = (PbarElement *)elementRecord;
int orientation = TTK_ORIENT_HORIZONTAL, phase;
double value = 0, maximum = 100, factor;
CGRect bounds = BoxToRect(d, b);
@@ -2678,7 +2678,7 @@ static void TroughElementSize(
int *minHeight,
Ttk_Padding *paddingPtr)
{
- ScrollbarElement *scrollbar = elementRecord;
+ ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord;
int orientation = TTK_ORIENT_HORIZONTAL;
SInt32 thickness = 15;
@@ -2705,7 +2705,7 @@ static void TroughElementDraw(
Ttk_Box b,
TCL_UNUSED(Ttk_State)) /* state */
{
- ScrollbarElement *scrollbar = elementRecord;
+ ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord;
int orientation = TTK_ORIENT_HORIZONTAL;
CGRect bounds = BoxToRect(d, b);
GrayColor bgGray;
@@ -2743,7 +2743,7 @@ static void ThumbElementSize(
int *minHeight,
TCL_UNUSED(Ttk_Padding *)) /* paddingPtr */
{
- ScrollbarElement *scrollbar = elementRecord;
+ ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord;
int orientation = TTK_ORIENT_HORIZONTAL;
Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
@@ -2764,7 +2764,7 @@ static void ThumbElementDraw(
Ttk_Box b,
Ttk_State state)
{
- ScrollbarElement *scrollbar = elementRecord;
+ ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord;
int orientation = TTK_ORIENT_HORIZONTAL;
Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
@@ -3174,7 +3174,7 @@ static void FieldElementDraw(
Ttk_Box b,
TCL_UNUSED(Ttk_State))
{
- FieldElement *e = elementRecord;
+ FieldElement *e = (FieldElement *)elementRecord;
Tk_3DBorder backgroundPtr =
Tk_Get3DBorderFromObj(tkwin, e->backgroundObj);
@@ -3266,7 +3266,7 @@ static void TreeHeaderElementDraw(
Ttk_Box b,
Ttk_State state)
{
- ThemeButtonParams *params = clientData;
+ ThemeButtonParams *params = (ThemeButtonParams *)clientData;
CGRect bounds = BoxToRect(d, b);
const HIThemeButtonDrawInfo info = {
.version = 0,
diff --git a/tests/canvas.test b/tests/canvas.test
index 5e4f851..ea71193 100644
--- a/tests/canvas.test
+++ b/tests/canvas.test
@@ -758,6 +758,22 @@ test canvas-15.19 "basic coords check: centimeters are larger than pixels" -setu
set id [.c create rect 0 0 1cm 1cm]
expr {[lindex [.c coords $id] 2]>1}
} -result 1
+test canvas-15.20 {bug [237971ce]} -setup {
+ destroy .c
+ canvas .c
+} -body {
+ set id [.c create line {0 0 50 50 100 50}]
+ .c insert $id end {200 200}
+ .c coords $id
+} -result {0.0 0.0 50.0 50.0 100.0 50.0 200.0 200.0}
+test canvas-15.21 {bug [237971ce]} -setup {
+ destroy .c
+ canvas .c
+} -body {
+ set id [.c create poly {0 0 50 50 100 50}]
+ .c insert $id end {200 200}
+ .c coords $id
+} -result {0.0 0.0 50.0 50.0 100.0 50.0 200.0 200.0}
destroy .c
test canvas-16.1 {arc coords check} -setup {
diff --git a/tests/event.test b/tests/event.test
index 01e3b7b..16b4ed9 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -813,6 +813,36 @@ test event-8 {event generate with keysyms corresponding to
deleteWindows
} -result {OK}
+test event-9 {no <Enter> event is generated for the container window when its
+ managed window in which the mouse pointer was inside gets
+ destroyed - bug 9e1312f32c} -setup {
+ set res [list ]
+ set iconified false
+ if {[winfo ismapped .]} {
+ wm iconify .
+ update
+ set iconified true
+ }
+} -body {
+ toplevel .top
+ pack propagate .top 0
+ bind all <Enter> {lappend res %W}
+ pack [frame .top.f -bg green -width 50 -height 50] -anchor se -side bottom
+ update
+ event generate .top.f <Motion> -warp 1 -x 25 -y 25 ; # <Enter> sent to .top and .top.f
+ after 50 ; # Win specific - wait for SendInput to be executed
+ update ; # idletasks not enough
+ destroy .top.f ; # no <Enter> event sent
+ update
+ set res
+} -cleanup {
+ deleteWindows
+ if {$iconified} {
+ wm deiconify .
+ update
+ }
+} -result {.top .top.f}
+
# cleanup
update
unset -nocomplain keypress_lookup
diff --git a/tests/pkgconfig.test b/tests/pkgconfig.test
index a68b5ac..7d17916 100644
--- a/tests/pkgconfig.test
+++ b/tests/pkgconfig.test
@@ -20,11 +20,12 @@ tcltest::loadTestedCommands
testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}]
-test pkgconfig-1.1 {query keys} {nonwin nodeprecated} {
+test pkgconfig-1.1 {query keys} -constraints {nonwin nodeprecated} -body {
lsort [::tk::pkgconfig list]
-} [list \
- 64bit bindir,install bindir,runtime debug demodir,install demodir,runtime \
- docdir,install docdir,runtime fontsystem includedir,install includedir,runtime \
+} -match glob -result [list \
+ 64bit bindir,install bindir,runtime debug demodir,install \
+ demodir,runtime*docdir,install docdir,runtime fontsystem \
+ includedir,install includedir,runtime \
libdir,install libdir,runtime mem_debug optimized profiled \
scriptdir,install scriptdir,runtime threaded \
]
diff --git a/unix/Makefile.in b/unix/Makefile.in
index ae6e05b..a543466 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -112,7 +112,7 @@ TCL_PLATFORM_DIR = $(TCLDIR)/unix
# for this version of Tk:
TCL_BIN_DIR = @TCL_BIN_DIR@
-# The linker flags needed to link in the Tcl library (ex: -ltcl8.2)
+# The linker flags needed to link in the Tcl library (ex: -ltcl8.7)
TCL_LIB_FLAG = @TCL_LIB_FLAG@
# Flag, 1: we're building a shared lib, 0 we're not
@@ -544,6 +544,28 @@ AQUA_SRCS = \
SRCS = $(GENERIC_SRCS) $(@TK_WINDOWINGSYSTEM@_SRCS) @PLAT_SRCS@
+###
+# Tip 430 - ZipFS Modifications
+###
+
+TK_ZIP_FILE = @TK_ZIP_FILE@
+TK_VFS_ROOT = libtk.vfs
+TK_VFS_PATH = ${TK_VFS_ROOT}/tk_library
+
+HOST_CC = @CC_FOR_BUILD@
+HOST_EXEEXT = @EXEEXT_FOR_BUILD@
+HOST_OBJEXT = @OBJEXT_FOR_BUILD@
+ZIPFS_BUILD = @ZIPFS_BUILD@
+NATIVE_ZIP = @ZIP_PROG@
+ZIP_PROG_OPTIONS = @ZIP_PROG_OPTIONS@
+ZIP_PROG_VFSSEARCH = @ZIP_PROG_VFSSEARCH@
+SHARED_BUILD = @SHARED_BUILD@
+INSTALL_LIBRARIES = @INSTALL_LIBRARIES@
+INSTALL_MSGS = @INSTALL_MSGS@
+
+ZIP_INSTALL_OBJS = @ZIP_INSTALL_OBJS@
+
+
AQUA_RESOURCES = \
$(MAC_OSX_DIR)/tkAboutDlg.r $(MAC_OSX_DIR)/tkMacOSXCursors.r \
$(MAC_OSX_DIR)/tkMacOSXXCursors.r
@@ -583,11 +605,46 @@ binaries: ${LIB_FILE} ${WISH_EXE}
libraries:
+tkzipfile: ${TK_ZIP_FILE}
+
+${TK_ZIP_FILE}: ${ZIP_INSTALL_OBJS}
+ @rm -rf ${TK_VFS_ROOT}
+ @mkdir -p ${TK_VFS_PATH}
+ @echo "creating ${TK_VFS_PATH} (prepare compression)"
+ @if \
+ ln -s $(TOP_DIR)/library/* ${TK_VFS_PATH}/; \
+ then : ; else \
+ cp -a $(TOP_DIR)/library/* ${TK_VFS_PATH}; \
+ fi
+ rm -rf ${TK_VFS_PATH}/demos
+ @find ${TK_VFS_ROOT} -type d -empty -delete
+ @echo "creating ${TK_ZIP_FILE} from ${TK_VFS_PATH}"
+ -@if test "${ZIPFS_BUILD}" = "2" ; then \
+ cp ${TCL_BIN_DIR}/tclsh ${TK_VFS_ROOT}/../${TK_ZIP_FILE} || cp ${TCL_BIN_DIR}/../bin/tclsh${TCLVERSION} ${TK_VFS_ROOT}/../${TK_ZIP_FILE}; \
+ (zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \
+ (echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \
+ cd ${TK_VFS_ROOT} && $$zip -J ../${TK_ZIP_FILE}) \
+ fi
+ @(zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}' || \
+ echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?") 2>/dev/null`; \
+ echo 'cd ${TK_VFS_ROOT} &&' $$zip '${ZIP_PROG_OPTIONS} ../${TK_ZIP_FILE} ${ZIP_PROG_VFSSEARCH}'; \
+ cd ${TK_VFS_ROOT} && \
+ $$zip ${ZIP_PROG_OPTIONS} ../${TK_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} >/dev/null)
+
# The following target is configured by autoconf to generate either
# a shared library or non-shared library for Tk.
-${LIB_FILE}: ${STUB_LIB_FILE} @LIB_RSRC_FILE@ ${OBJS}
+${LIB_FILE}: ${STUB_LIB_FILE} @LIB_RSRC_FILE@ ${OBJS} ${TK_ZIP_FILE}
rm -f $@
@MAKE_LIB@
+ @if test "${ZIPFS_BUILD}" = "1" ; then \
+ if test "x$(MACHER)" = "x" ; then \
+ cat ${TK_ZIP_FILE} >> ${LIB_FILE}; \
+ else $(MACHER) append ${LIB_FILE} ${TK_ZIP_FILE} /tmp/macher_output; \
+ mv /tmp/macher_output ${LIB_FILE}; chmod u+x ${LIB_FILE}; \
+ fi; \
+ ${NATIVE_ZIP} -A ${LIB_FILE} \
+ || echo 'ignore zip-error by adjust sfx process (not executable?)'; \
+ fi
${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
@if test "x${LIB_FILE}" = "xlibtk${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \
@@ -621,6 +678,16 @@ objs: ${OBJS}
${WISH_EXE}: $(TK_STUB_LIB_FILE) $(WISH_OBJS) $(TK_LIB_FILE) @APP_RSRC_FILE@
${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ \
$(WISH_LIBS) $(CC_SEARCH_FLAGS) -o ${WISH_EXE}
+ @if test "${ZIPFS_BUILD}" = "2" ; then \
+ cat ${TK_ZIP_FILE} >> ${WISH_EXE}; \
+ if test "x$(MACHER)" = "x" ; then \
+ cat ${TK_ZIP_FILE} >> ${WISH_EXE}; \
+ else $(MACHER) append ${WISH_EXE} ${TK_ZIP_FILE} /tmp/macher_output; \
+ mv /tmp/macher_output ${LIB_FILE}; chmod u+x ${LIB_FILE}; \
+ fi; \
+ ${NATIVE_ZIP} -A ${WISH_EXE} \
+ || echo 'ignore zip-error by adjust sfx process (not executable?)'; \
+ fi
# Resetting the LIB_RUNTIME_DIR below is required so that
# the generated tktest executable gets the build directory
@@ -698,7 +765,7 @@ valgrind: $(TKTEST_EXE)
valgrindshell: $(TKTEST_EXE)
$(SHELL_ENV) valgrind $(VALGRINDARGS) ./$(TKTEST_EXE) $(SCRIPT)
-INSTALL_BASE_TARGETS = install-binaries install-libraries
+INSTALL_BASE_TARGETS = install-binaries ${INSTALL_LIBRARIES}
INSTALL_DOC_TARGETS = install-doc
INSTALL_DEV_TARGETS = install-headers
INSTALL_DEMO_TARGETS = install-demos
@@ -727,7 +794,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}
echo "Creating package index $(PKG_INDEX)"; \
rm -f "$(PKG_INDEX)"; \
(\
- echo "if {[catch {package present Tcl 8.6-}]} return";\
+ echo "if {![package vsatisfies [package provide Tcl] 8.6-]} return";\
relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\
if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \
echo "package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]]]";\
@@ -903,8 +970,10 @@ Makefile: $(UNIX_DIR)/Makefile.in
# $(SHELL) config.status
clean:
+ rm -rf *.vfs
rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out \
- errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc
+ errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc \
+ *.zip
distclean: clean
rm -rf Makefile config.status config.cache config.log tkConfig.sh \
@@ -1036,6 +1105,7 @@ tkPkgConfig.o: $(GENERIC_DIR)/tkPkgConfig.c
-DCFG_RUNTIME_SCRDIR="\"$(TK_LIBRARY)\"" \
-DCFG_RUNTIME_INCDIR="\"$(includedir)\"" \
-DCFG_RUNTIME_DOCDIR="\"$(mandir)\"" \
+ -DCFG_RUNTIME_DLLFILE="\"$(TK_LIB_FILE)\"" \
-DCFG_RUNTIME_DEMODIR="\"$(DEMO_INSTALL_DIR)\"" \
\
$(GENERIC_DIR)/tkPkgConfig.c
diff --git a/unix/configure b/unix/configure
index e560f49..051a691 100755
--- a/unix/configure
+++ b/unix/configure
@@ -689,6 +689,17 @@ TK_MAJOR_VERSION
TK_VERSION
TK_DEMO_DIR
DEMO_DIR
+INSTALL_MSGS
+INSTALL_LIBRARIES
+TK_ZIP_FILE
+ZIPFS_BUILD
+ZIP_INSTALL_OBJS
+ZIP_PROG_VFSSEARCH
+ZIP_PROG_OPTIONS
+ZIP_PROG
+MACHER_PROG
+EXEEXT_FOR_BUILD
+CC_FOR_BUILD
UNIX_FONT_OBJS
XFT_LIBS
XFT_CFLAGS
@@ -808,6 +819,7 @@ with_x
enable_xft
enable_xss
enable_framework
+enable_zipfs
'
ac_precious_vars='build_alias
host_alias
@@ -1461,6 +1473,7 @@ Optional Features:
--enable-xss use XScreenSaver for activity timer (default: on)
--enable-framework package shared libraries in MacOSX frameworks
(default: off)
+ --enable-zipfs build with Zipfs support (default: on)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -4389,7 +4402,7 @@ fi
then :
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
case "${CC}" in
*++|*++-*)
;;
@@ -6101,11 +6114,11 @@ then :
fi
- # See if the compiler supports casting to a union type.
- # This is used to stop gcc from printing a compiler
- # warning when initializing a union member.
+ # See if the compiler supports casting to a union type.
+ # This is used to stop gcc from printing a compiler
+ # warning when initializing a union member.
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
printf %s "checking for cast to union support... " >&6; }
if test ${tcl_cv_cast_to_union+y}
then :
@@ -6118,8 +6131,8 @@ int
main (void)
{
- union foo { int i; double d; };
- union foo f = (union foo) (int) 0;
+ union foo { int i; double d; };
+ union foo f = (union foo) (int) 0;
;
return 0;
@@ -6136,13 +6149,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
printf "%s\n" "$tcl_cv_cast_to_union" >&6; }
- if test "$tcl_cv_cast_to_union" = "yes"; then
+ if test "$tcl_cv_cast_to_union" = "yes"; then
printf "%s\n" "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
- fi
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -fno-lto" >&5
+ fi
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -fno-lto" >&5
printf %s "checking for working -fno-lto... " >&6; }
if test ${ac_cv_nolto+y}
then :
@@ -6170,12 +6183,45 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nolto" >&5
printf "%s\n" "$ac_cv_nolto" >&6; }
+ CFLAGS=$hold_cflags
+ if test "$ac_cv_nolto" = "yes" ; then
+ CFLAGS_NOLTO="-fno-lto"
+ else
+ CFLAGS_NOLTO=""
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -finput-charset" >&5
+printf %s "checking if the compiler understands -finput-charset... " >&6; }
+if test ${tcl_cv_cc_input_charset+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tcl_cv_cc_input_charset=yes
+else $as_nop
+ tcl_cv_cc_input_charset=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$hold_cflags
- if test "$ac_cv_nolto" = "yes" ; then
- CFLAGS_NOLTO="-fno-lto"
- else
- CFLAGS_NOLTO=""
- fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_input_charset" >&5
+printf "%s\n" "$tcl_cv_cc_input_charset" >&6; }
+ if test $tcl_cv_cc_input_charset = yes; then
+ CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ fi
ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
if test "x$ac_cv_header_stdbool_h" = xyes
@@ -8661,6 +8707,206 @@ else
fi
#--------------------------------------------------------------------
+# Zipfs support - Tip 430
+#--------------------------------------------------------------------
+# Check whether --enable-zipfs was given.
+if test ${enable_zipfs+y}
+then :
+ enableval=$enable_zipfs; tcl_ok=$enableval
+else $as_nop
+ tcl_ok=yes
+fi
+
+if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then
+ #
+ # Find a native compiler
+ #
+ # Put a plausible default for CC_FOR_BUILD in Makefile.
+ if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5
+printf %s "checking for gcc... " >&6; }
+ if test ${ac_cv_path_cc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/gcc 2> /dev/null` \
+ `ls -r $dir/gcc 2> /dev/null` ; do
+ if test x"$ac_cv_path_cc" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_cc=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ fi
+ fi
+
+ # Also set EXEEXT_FOR_BUILD.
+ if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+ OBJEXT_FOR_BUILD='$(OBJEXT)'
+ else
+ OBJEXT_FOR_BUILD='.no'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
+printf %s "checking for build system executable suffix... " >&6; }
+if test ${bfd_cv_build_exeext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_build_exeext" >&5
+printf "%s\n" "$bfd_cv_build_exeext" >&6; }
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+ fi
+
+ #
+ # Find a native zip implementation
+ #
+
+ MACHER_PROG=""
+ ZIP_PROG=""
+ ZIP_PROG_OPTIONS=""
+ ZIP_PROG_VFSSEARCH=""
+ ZIP_INSTALL_OBJS=""
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for macher" >&5
+printf %s "checking for macher... " >&6; }
+ if test ${ac_cv_path_macher+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/macher 2> /dev/null` \
+ `ls -r $dir/macher 2> /dev/null` ; do
+ if test x"$ac_cv_path_macher" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_macher=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ if test -f "$ac_cv_path_macher" ; then
+ MACHER_PROG="$ac_cv_path_macher"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHER_PROG" >&5
+printf "%s\n" "$MACHER_PROG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found macher in environment" >&5
+printf "%s\n" "Found macher in environment" >&6; }
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip" >&5
+printf %s "checking for zip... " >&6; }
+ if test ${ac_cv_path_zip+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/zip 2> /dev/null` \
+ `ls -r $dir/zip 2> /dev/null` ; do
+ if test x"$ac_cv_path_zip" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_zip=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ if test -f "$ac_cv_path_zip" ; then
+ ZIP_PROG="$ac_cv_path_zip"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5
+printf "%s\n" "$ZIP_PROG" >&6; }
+ ZIP_PROG_OPTIONS="-rq"
+ ZIP_PROG_VFSSEARCH="*"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5
+printf "%s\n" "Found INFO Zip in environment" >&6; }
+ # Use standard arguments for zip
+ else
+ # It is not an error if an installed version of Zip can't be located.
+ # We can use the locally distributed minizip instead
+ ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
+ ZIP_PROG_OPTIONS="-o -r"
+ ZIP_PROG_VFSSEARCH="*"
+ ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH. Building minizip" >&5
+printf "%s\n" "No zip found on PATH. Building minizip" >&6; }
+ fi
+
+
+
+
+
+
+ ZIPFS_BUILD=1
+ TK_ZIP_FILE=libtk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_PATCH_LEVEL}.zip
+else
+ ZIPFS_BUILD=0
+ TK_ZIP_FILE=
+fi
+# Do checking message here to not mess up interleaved configure output
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for building with zipfs" >&5
+printf %s "checking for building with zipfs... " >&6; }
+if test "${ZIPFS_BUILD}" = 1; then
+ if test "${SHARED_BUILD}" = 0; then
+ ZIPFS_BUILD=2;
+
+printf "%s\n" "#define ZIPFS_BUILD 2" >>confdefs.h
+
+ INSTALL_LIBRARIES=install-demos
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+
+printf "%s\n" "#define ZIPFS_BUILD 1" >>confdefs.h
+\
+ INSTALL_LIBRARIES=install-demos
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+INSTALL_LIBRARIES=install-libraries
+INSTALL_MSGS=install-msgs
+fi
+
+
+
+
+
+
+#--------------------------------------------------------------------
# The statements below define various symbols relating to Tk
# stub support.
#--------------------------------------------------------------------
diff --git a/unix/configure.ac b/unix/configure.ac
index b5f840a..025bcfd 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -663,6 +663,51 @@ else
fi
#--------------------------------------------------------------------
+# Zipfs support - Tip 430
+#--------------------------------------------------------------------
+AC_ARG_ENABLE(zipfs,
+ AS_HELP_STRING([--enable-zipfs],[build with Zipfs support (default: on)]),
+ [tcl_ok=$enableval], [tcl_ok=yes])
+if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then
+ #
+ # Find a native compiler
+ #
+ AX_CC_FOR_BUILD
+ #
+ # Find a native zip implementation
+ #
+ SC_ZIPFS_SUPPORT
+ ZIPFS_BUILD=1
+ TK_ZIP_FILE=libtk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_PATCH_LEVEL}.zip
+else
+ ZIPFS_BUILD=0
+ TK_ZIP_FILE=
+fi
+# Do checking message here to not mess up interleaved configure output
+AC_MSG_CHECKING([for building with zipfs])
+if test "${ZIPFS_BUILD}" = 1; then
+ if test "${SHARED_BUILD}" = 0; then
+ ZIPFS_BUILD=2;
+ AC_DEFINE(ZIPFS_BUILD, 2, [Are we building with zipfs enabled?])
+ INSTALL_LIBRARIES=install-demos
+ AC_MSG_RESULT([yes])
+ else
+ AC_DEFINE(ZIPFS_BUILD, 1, [Are we building with zipfs enabled?])\
+ INSTALL_LIBRARIES=install-demos
+ AC_MSG_RESULT([yes])
+ fi
+else
+AC_MSG_RESULT([no])
+INSTALL_LIBRARIES=install-libraries
+INSTALL_MSGS=install-msgs
+fi
+AC_SUBST(ZIPFS_BUILD)
+AC_SUBST(TK_ZIP_FILE)
+AC_SUBST(INSTALL_LIBRARIES)
+AC_SUBST(INSTALL_MSGS)
+
+
+#--------------------------------------------------------------------
# The statements below define various symbols relating to Tk
# stub support.
#--------------------------------------------------------------------
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 7854927..7fc696e 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -960,7 +960,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
AS_IF([test "$GCC" = yes], [
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
case "${CC}" in
*++|*++-*)
;;
@@ -1838,36 +1838,44 @@ dnl # preprocessing tests use only CPPFLAGS.
TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"])
AC_SUBST(TCL_LIBS)
- # See if the compiler supports casting to a union type.
- # This is used to stop gcc from printing a compiler
- # warning when initializing a union member.
-
- AC_CACHE_CHECK(for cast to union support,
- tcl_cv_cast_to_union,
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
- union foo { int i; double d; };
- union foo f = (union foo) (int) 0;
- ]])],
- [tcl_cv_cast_to_union=yes],
- [tcl_cv_cast_to_union=no])
- )
- if test "$tcl_cv_cast_to_union" = "yes"; then
- AC_DEFINE(HAVE_CAST_TO_UNION, 1,
- [Defined when compiler supports casting to union type.])
- fi
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto"
- AC_CACHE_CHECK(for working -fno-lto,
- ac_cv_nolto,
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [ac_cv_nolto=yes],
- [ac_cv_nolto=no])
- )
- CFLAGS=$hold_cflags
- if test "$ac_cv_nolto" = "yes" ; then
- CFLAGS_NOLTO="-fno-lto"
- else
- CFLAGS_NOLTO=""
- fi
+ # See if the compiler supports casting to a union type.
+ # This is used to stop gcc from printing a compiler
+ # warning when initializing a union member.
+
+ AC_CACHE_CHECK(for cast to union support,
+ tcl_cv_cast_to_union,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ union foo { int i; double d; };
+ union foo f = (union foo) (int) 0;
+ ]])],
+ [tcl_cv_cast_to_union=yes],
+ [tcl_cv_cast_to_union=no])
+ )
+ if test "$tcl_cv_cast_to_union" = "yes"; then
+ AC_DEFINE(HAVE_CAST_TO_UNION, 1,
+ [Defined when compiler supports casting to union type.])
+ fi
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto"
+ AC_CACHE_CHECK(for working -fno-lto,
+ ac_cv_nolto,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [ac_cv_nolto=yes],
+ [ac_cv_nolto=no])
+ )
+ CFLAGS=$hold_cflags
+ if test "$ac_cv_nolto" = "yes" ; then
+ CFLAGS_NOLTO="-fno-lto"
+ else
+ CFLAGS_NOLTO=""
+ fi
+ AC_CACHE_CHECK([if the compiler understands -finput-charset],
+ tcl_cv_cc_input_charset, [
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_input_charset=yes],[tcl_cv_cc_input_charset=no])
+ CFLAGS=$hold_cflags])
+ if test $tcl_cv_cc_input_charset = yes; then
+ CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ fi
AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],)
@@ -2328,8 +2336,8 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [
AC_DEFUN([SC_TCL_EARLY_FLAG],[
AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])],
- [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,[AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[[#define ]$1[ 1
-]$2]], [[$3]]),
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#define ]$1[ 1
+]$2]], [[$3]])],
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)]))
if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
@@ -3003,18 +3011,40 @@ AC_DEFUN([AX_CC_FOR_BUILD],[# Put a plausible default for CC_FOR_BUILD in Makefi
#
# Results:
# Substitutes the following vars:
-# ZIP_PROG
+# MACHER_PROG
+# ZIP_PROG
# ZIP_PROG_OPTIONS
# ZIP_PROG_VFSSEARCH
# ZIP_INSTALL_OBJS
#------------------------------------------------------------------------
AC_DEFUN([SC_ZIPFS_SUPPORT], [
+ MACHER_PROG=""
ZIP_PROG=""
ZIP_PROG_OPTIONS=""
ZIP_PROG_VFSSEARCH=""
ZIP_INSTALL_OBJS=""
+ AC_MSG_CHECKING([for macher])
+ AC_CACHE_VAL(ac_cv_path_macher, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/macher 2> /dev/null` \
+ `ls -r $dir/macher 2> /dev/null` ; do
+ if test x"$ac_cv_path_macher" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_macher=$j
+ break
+ fi
+ fi
+ done
+ done
+ ])
+ if test -f "$ac_cv_path_macher" ; then
+ MACHER_PROG="$ac_cv_path_macher"
+ AC_MSG_RESULT([$MACHER_PROG])
+ AC_MSG_RESULT([Found macher in environment])
+ fi
AC_MSG_CHECKING([for zip])
AC_CACHE_VAL(ac_cv_path_zip, [
search_path=`echo ${PATH} | sed -e 's/:/ /g'`
@@ -3046,6 +3076,7 @@ AC_DEFUN([SC_ZIPFS_SUPPORT], [
ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
AC_MSG_RESULT([No zip found on PATH. Building minizip])
fi
+ AC_SUBST(MACHER_PROG)
AC_SUBST(ZIP_PROG)
AC_SUBST(ZIP_PROG_OPTIONS)
AC_SUBST(ZIP_PROG_VFSSEARCH)
diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c
index 1406f3d..1a1f084 100644
--- a/unix/tkAppInit.c
+++ b/unix/tkAppInit.c
@@ -127,8 +127,7 @@ Tcl_AppInit(
#if defined(USE_CUSTOM_EXIT_PROC)
if (TkpWantsExitProc()) {
- /* The cast below avoids warnings from old gcc compilers. */
- Tcl_SetExitProc((void *)TkpExitProc);
+ Tcl_SetExitProc(TkpExitProc);
}
#endif
diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in
index 5d7a512..c0db42c 100644
--- a/unix/tkConfig.h.in
+++ b/unix/tkConfig.h.in
@@ -180,6 +180,9 @@
# endif
#endif
+/* Are we building with zipfs enabled? */
+#undef ZIPFS_BUILD
+
/* Are Darwin SUSv3 extensions available? */
#undef _DARWIN_C_SOURCE
diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h
index b59f7ae..3cae17b 100644
--- a/unix/tkUnixDefault.h
+++ b/unix/tkUnixDefault.h
@@ -88,7 +88,6 @@
#define DEF_BUTTON_TAKE_FOCUS NULL
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
-#define DEF_BUTTON_UNDERLINE "-1"
#define DEF_BUTTON_VALUE ""
#define DEF_BUTTON_WIDTH "0"
#define DEF_BUTTON_WRAP_LENGTH "0"
@@ -268,7 +267,6 @@
#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
#define DEF_MENU_ENTRY_SELECT NULL
-#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
* Defaults for menus overall:
@@ -333,7 +331,6 @@
#define DEF_MENUBUTTON_TAKE_FOCUS "0"
#define DEF_MENUBUTTON_TEXT ""
#define DEF_MENUBUTTON_TEXT_VARIABLE ""
-#define DEF_MENUBUTTON_UNDERLINE "-1"
#define DEF_MENUBUTTON_WIDTH "0"
#define DEF_MENUBUTTON_WRAP_LENGTH "0"
diff --git a/win/Makefile.in b/win/Makefile.in
index 07c2bea..76b2958 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -129,6 +129,10 @@ EXESUFFIX = @EXESUFFIX@
VER = @TK_MAJOR_VERSION@@TK_MINOR_VERSION@
DOTVER = @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@
+TK_ZIP_FILE = @TK_ZIP_FILE@
+TK_VFS_PATH = libtk.vfs/tk_library
+TK_VFS_ROOT = libtk.vfs
+
TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@
TK_LIB_FILE = @TK_LIB_FILE@
TK_DLL_FILE = @TK_DLL_FILE@
@@ -195,6 +199,7 @@ MKDIR = mkdir -p
SHELL = @SHELL@
RM = rm -f
COPY = cp
+LN = ln
BUILD_TCLSH = @BUILD_TCLSH@
@@ -212,6 +217,45 @@ NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED
TCL_EXE = @TCLSH_PROG@
WINE = @WINE@
+###
+# Tip 430 - ZipFS Modifications
+###
+
+TK_ZIP_FILE = @TK_ZIP_FILE@
+TK_VFS_PATH = libtk.vfs/tk_library
+TK_VFS_ROOT = libtk.vfs
+
+HOST_CC = @CC_FOR_BUILD@
+HOST_EXEEXT = @EXEEXT_FOR_BUILD@
+HOST_OBJEXT = @OBJEXT_FOR_BUILD@
+ZIPFS_BUILD = @ZIPFS_BUILD@
+NATIVE_ZIP = @ZIP_PROG@
+ZIP_PROG_OPTIONS = @ZIP_PROG_OPTIONS@
+ZIP_PROG_VFSSEARCH = @ZIP_PROG_VFSSEARCH@
+SHARED_BUILD = @SHARED_BUILD@
+INSTALL_MSGS = @INSTALL_MSGS@
+INSTALL_LIBRARIES = @INSTALL_LIBRARIES@
+
+# Minizip
+MINIZIP_OBJS = \
+ adler32.$(HOST_OBJEXT) \
+ compress.$(HOST_OBJEXT) \
+ crc32.$(HOST_OBJEXT) \
+ deflate.$(HOST_OBJEXT) \
+ infback.$(HOST_OBJEXT) \
+ inffast.$(HOST_OBJEXT) \
+ inflate.$(HOST_OBJEXT) \
+ inftrees.$(HOST_OBJEXT) \
+ ioapi.$(HOST_OBJEXT) \
+ iowin32.$(HOST_OBJEXT) \
+ trees.$(HOST_OBJEXT) \
+ uncompr.$(HOST_OBJEXT) \
+ zip.$(HOST_OBJEXT) \
+ zutil.$(HOST_OBJEXT) \
+ minizip.$(HOST_OBJEXT)
+
+ZIP_INSTALL_OBJS = @ZIP_INSTALL_OBJS@
+
CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \
-I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \
@@ -487,7 +531,7 @@ install-binaries: binaries
@echo "Creating package index $(PKG_INDEX)";
@$(RM) $(PKG_INDEX);
@(\
- echo "if {[catch {package present Tcl 8.6-}]} return";\
+ echo "if {![package vsatisfies [package provide Tcl] 8.6-]} return";\
echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\
echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\
echo " package ifneeded tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin libtk$(VERSION).dll]]]";\
@@ -612,11 +656,16 @@ install-private-headers: libraries
$(INSTALL_DATA) $$i $(PRIVATE_INCLUDE_INSTALL_DIR); \
done;
-$(WISH): $(WISH_OBJS) @LIBRARIES@ $(TK_STUB_LIB_FILE) wish.$(RES)
+$(WISH): $(WISH_OBJS) @LIBRARIES@ $(TK_STUB_LIB_FILE) wish.$(RES) ${TK_ZIP_FILE}
$(CC) $(CFLAGS) $(WISH_OBJS) $(TK_LIB_FILE) \
$(TK_STUB_LIB_FILE) $(TCL_LIB_FILE) $(LIBS) \
wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)
@VC_MANIFEST_EMBED_EXE@
+ @if test "${ZIPFS_BUILD}" = "2" ; then \
+ cat ${TK_ZIP_FILE} >> ${WISH}; \
+ ${NATIVE_ZIP} -A ${WISH} \
+ || echo 'ignore zip-error by adjust sfx process (not executable?)'; \
+ fi
tktest: $(TKTEST)
@@ -638,6 +687,30 @@ cat32.${OBJEXT}: $(TCL_SRC_DIR)/win/cat.c
$(CAT32): cat32.${OBJEXT}
$(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LIBS) $(LDFLAGS_CONSOLE)
+tkzipfile: ${TK_ZIP_FILE}
+
+${TK_ZIP_FILE}: ${ZIP_INSTALL_OBJS}
+ @$(RMDIR) ${TK_VFS_ROOT}
+ @mkdir -p ${TK_VFS_PATH}
+ @echo "creating ${TK_VFS_PATH} (prepare compression)"
+ @( \
+ $(COPY) -a $(TOP_DIR)/library/* ${TK_VFS_PATH}; \
+ )
+ @$(RMDIR) $(TK_VFS_PATH)/demos
+ -@if test "${ZIPFS_BUILD}" = "2" ; then \
+ cp ${BUILD_TCLSH}${EXESUFFIX} ${TK_VFS_ROOT}/../${TK_ZIP_FILE} ; \
+ (zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \
+ (echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \
+ cd ${TK_VFS_ROOT} && $$zip -J ../${TK_ZIP_FILE}) \
+ fi
+ (zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \
+ (echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \
+ cd ${TK_VFS_ROOT} && \
+ $$zip ${ZIP_PROG_OPTIONS} ../${TK_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} >/dev/null && \
+ echo "${TK_ZIP_FILE} successful created with $$zip" && \
+ cd ..)
+
+
# The following targets are configured by autoconf to generate either
# a shared library or static library
@@ -646,10 +719,15 @@ ${TK_STUB_LIB_FILE}: ${STUB_OBJS}
@MAKE_STUB_LIB@ ${STUB_OBJS}
@POST_MAKE_LIB@
-${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES)
+${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES) ${TK_ZIP_FILE}
@$(RM) ${TK_DLL_FILE}
@MAKE_DLL@ ${TK_OBJS} $(TK_RES) $(SHLIB_LD_LIBS)
@VC_MANIFEST_EMBED_DLL@
+ @if test "${ZIPFS_BUILD}" = "1" ; then \
+ cat ${TK_ZIP_FILE} >> ${TK_DLL_FILE}; \
+ ${NATIVE_ZIP} -A ${TK_DLL_FILE} \
+ || echo 'ignore zip-error by adjust sfx process (not executable?)'; \
+ fi
${TK_LIB_FILE}: ${TK_OBJS}
@$(RM) ${TK_LIB_FILE}
@@ -691,6 +769,12 @@ tkUnixMenubu.$(OBJEXT): ${UNIX_DIR}/tkUnixMenubu.c
tkUnixScale.$(OBJEXT): ${UNIX_DIR}/tkUnixScale.c
$(CC) -c $(CC_SWITCHES) -DBUILD_tk -DBUILD_ttk @DEPARG@ $(CC_OBJNAME)
+tkPkgConfig.$(OBJEXT): $(GENERIC_DIR)/tkPkgConfig.c
+ $(CC) -c $(CC_SWITCHES) -DBUILD_tk -DBUILD_ttk \
+ -DCFG_RUNTIME_DLLFILE="\"$(TK_DLL_FILE)\"" \
+ @DEPARG@ $(CC_OBJNAME)
+
+
# Extra dependency info
tkConsole.$(OBJEXT): configure Makefile
tkMain.$(OBJEXT): configure Makefile
@@ -720,7 +804,8 @@ cleanhelp:
clean: cleanhelp
$(RM) *.lib *.a *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out
$(RM) $(WISH) $(TKTEST) $(CAT32)
- $(RM) *.pch *.ilk *.pdb
+ $(RM) *.pch *.ilk *.pdb *.zip
+ $(RMDIR) *.vfs
distclean: clean
$(RM) Makefile config.status config.cache config.log tkConfig.sh \
diff --git a/win/configure b/win/configure
index 8eac969..dc846fa 100755
--- a/win/configure
+++ b/win/configure
@@ -706,6 +706,16 @@ TK_MAJOR_VERSION
TK_VERSION
MACHINE
TK_WIN_VERSION
+INSTALL_MSGS
+INSTALL_LIBRARIES
+TK_ZIP_FILE
+ZIPFS_BUILD
+ZIP_INSTALL_OBJS
+ZIP_PROG_VFSSEARCH
+ZIP_PROG_OPTIONS
+ZIP_PROG
+EXEEXT_FOR_BUILD
+CC_FOR_BUILD
TCLSH_PROG
BUILD_TCLSH
VC_MANIFEST_EMBED_EXE
@@ -730,7 +740,6 @@ TCL_STUB_LIB_FILE
TCL_LIB_SPEC
TCL_LIB_FLAG
TCL_LIB_FILE
-TCL_ZIP_FILE
TCL_SRC_DIR
TCL_BIN_DIR
TCL_VERSION
@@ -794,6 +803,7 @@ with_tcl
enable_64bit
enable_symbols
enable_embedded_manifest
+enable_zipfs
'
ac_precious_vars='build_alias
host_alias
@@ -1427,6 +1437,7 @@ Optional Features:
--enable-symbols build with debugging symbols (default: off)
--enable-embedded-manifest
embed manifest if possible (default: yes)
+ --enable-zipfs build with Zipfs support (default: on)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -4030,7 +4041,6 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
-
if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then
as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
@@ -4420,6 +4430,39 @@ printf "%s\n" "$ac_cv_nolto" >&6; }
else
CFLAGS_NOLTO=""
fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -finput-charset" >&5
+printf %s "checking if the compiler understands -finput-charset... " >&6; }
+if test ${tcl_cv_cc_input_charset+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tcl_cv_cc_input_charset=yes
+else $as_nop
+ tcl_cv_cc_input_charset=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_input_charset" >&5
+printf "%s\n" "$tcl_cv_cc_input_charset" >&6; }
+ if test $tcl_cv_cc_input_charset = yes; then
+ extra_cflags="$extra_cflags -finput-charset=UTF-8"
+ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5
@@ -4483,7 +4526,7 @@ printf "%s\n" "using shared flags" >&6; }
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -5577,6 +5620,175 @@ printf "%s\n" "No tclsh found on PATH" >&6; }
+#--------------------------------------------------------------------
+# Zipfs support - Tip 430
+#--------------------------------------------------------------------
+# Check whether --enable-zipfs was given.
+if test ${enable_zipfs+y}
+then :
+ enableval=$enable_zipfs; tcl_ok=$enableval
+else $as_nop
+ tcl_ok=yes
+fi
+
+if test "$tcl_ok" = "yes" ; then
+ #
+ # Find a native compiler
+ #
+ # Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5
+printf %s "checking for gcc... " >&6; }
+ if test ${ac_cv_path_cc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/gcc 2> /dev/null` \
+ `ls -r $dir/gcc 2> /dev/null` ; do
+ if test x"$ac_cv_path_cc" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_cc=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ fi
+fi
+
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+ OBJEXT_FOR_BUILD='$(OBJEXT)'
+else
+ OBJEXT_FOR_BUILD='.no'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
+printf %s "checking for build system executable suffix... " >&6; }
+if test ${bfd_cv_build_exeext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_build_exeext" >&5
+printf "%s\n" "$bfd_cv_build_exeext" >&6; }
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+
+ #
+ # Find a native zip implementation
+ #
+
+ ZIP_PROG=""
+ ZIP_PROG_OPTIONS=""
+ ZIP_PROG_VFSSEARCH=""
+ ZIP_INSTALL_OBJS=""
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip" >&5
+printf %s "checking for zip... " >&6; }
+ if test ${ac_cv_path_zip+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/zip 2> /dev/null` \
+ `ls -r $dir/zip 2> /dev/null` ; do
+ if test x"$ac_cv_path_zip" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_zip=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ if test -f "$ac_cv_path_zip" ; then
+ ZIP_PROG="$ac_cv_path_zip"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5
+printf "%s\n" "$ZIP_PROG" >&6; }
+ ZIP_PROG_OPTIONS="-rq"
+ ZIP_PROG_VFSSEARCH="*"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5
+printf "%s\n" "Found INFO Zip in environment" >&6; }
+ # Use standard arguments for zip
+ else
+ # It is not an error if an installed version of Zip can't be located.
+ # We can use the locally distributed minizip instead
+ ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
+ ZIP_PROG_OPTIONS="-o -r"
+ ZIP_PROG_VFSSEARCH="*"
+ ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH building minizip" >&5
+printf "%s\n" "No zip found on PATH building minizip" >&6; }
+ fi
+
+
+
+
+
+ ZIPFS_BUILD=1
+ TK_ZIP_FILE=libtk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_PATCH_LEVEL}.zip
+else
+ ZIPFS_BUILD=0
+ TCL_ZIP_FILE=
+fi
+# Do checking message here to not mess up interleaved configure output
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for building with zipfs" >&5
+printf %s "checking for building with zipfs... " >&6; }
+if test "${ZIPFS_BUILD}" = 1; then
+ if test "${SHARED_BUILD}" = 0; then
+ ZIPFS_BUILD=2;
+
+printf "%s\n" "#define ZIPFS_BUILD 2" >>confdefs.h
+
+ INSTALL_LIBRARIES=install-libraries-zipfs-static
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+
+printf "%s\n" "#define ZIPFS_BUILD 1" >>confdefs.h
+\
+ INSTALL_LIBRARIES=install-libraries-zipfs-shared
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+INSTALL_LIBRARIES=install-libraries
+INSTALL_MSGS=install-msgs
+fi
+
+
+
+
+
+
#------------------------------------------------------------------------
# tkConfig.sh refers to this by a different name
#------------------------------------------------------------------------
diff --git a/win/configure.ac b/win/configure.ac
index f052059..0b62869 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -5,7 +5,7 @@
AC_INIT([tk],[8.7])
AC_CONFIG_SRCDIR([../generic/tk.h])
-AC_PREREQ([2.70])
+AC_PREREQ([2.69])
# The following define is needed when building with Cygwin since newer
# versions of autoconf incorrectly set SHELL to /bin/bash instead of
@@ -178,6 +178,52 @@ SC_EMBED_MANIFEST(wish.exe.manifest)
SC_BUILD_TCLSH
SC_PROG_TCLSH
+#--------------------------------------------------------------------
+# Zipfs support - Tip 430
+#--------------------------------------------------------------------
+AC_ARG_ENABLE(zipfs,
+ AS_HELP_STRING([--enable-zipfs],
+ [build with Zipfs support (default: on)]),
+ [tcl_ok=$enableval], [tcl_ok=yes])
+if test "$tcl_ok" = "yes" ; then
+ #
+ # Find a native compiler
+ #
+ AX_CC_FOR_BUILD
+ #
+ # Find a native zip implementation
+ #
+ SC_ZIPFS_SUPPORT
+ ZIPFS_BUILD=1
+ TK_ZIP_FILE=libtk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_PATCH_LEVEL}.zip
+else
+ ZIPFS_BUILD=0
+ TCL_ZIP_FILE=
+fi
+# Do checking message here to not mess up interleaved configure output
+AC_MSG_CHECKING([for building with zipfs])
+if test "${ZIPFS_BUILD}" = 1; then
+ if test "${SHARED_BUILD}" = 0; then
+ ZIPFS_BUILD=2;
+ AC_DEFINE(ZIPFS_BUILD, 2, [Are we building with zipfs enabled?])
+ INSTALL_LIBRARIES=install-libraries-zipfs-static
+ AC_MSG_RESULT([yes])
+ else
+ AC_DEFINE(ZIPFS_BUILD, 1, [Are we building with zipfs enabled?])\
+ INSTALL_LIBRARIES=install-libraries-zipfs-shared
+ AC_MSG_RESULT([yes])
+ fi
+else
+AC_MSG_RESULT([no])
+INSTALL_LIBRARIES=install-libraries
+INSTALL_MSGS=install-msgs
+fi
+AC_SUBST(ZIPFS_BUILD)
+AC_SUBST(TK_ZIP_FILE)
+AC_SUBST(INSTALL_LIBRARIES)
+AC_SUBST(INSTALL_MSGS)
+
+
#------------------------------------------------------------------------
# tkConfig.sh refers to this by a different name
#------------------------------------------------------------------------
diff --git a/win/makefile.vc b/win/makefile.vc
index b78964b..912f781 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -630,6 +630,11 @@ $(TMP_DIR)\winMain.obj: $(WIN_DIR)\winMain.c
$(TMP_DIR)\tkMain2.obj: $(GENERICDIR)\tkMain.c
$(cc32) $(pkgcflags) /DUNICODE /D_UNICODE -Fo$@ $?
+$(TMP_DIR)\tkPkgConfig.obj: $(GENERICDIR)\tkPkgConfig.c
+ $(cc32) $(pkgcflags) \
+ -DCFG_RUNTIME_DLLFILE="\"$(TKLIBNAME)\"" \
+ -Fo$@ $?
+
# The following objects are part of the stub library and should not
# be built as DLL objects but none of the symbols should be exported
# and no reference made to a C runtime.
@@ -727,7 +732,7 @@ install-binaries:
!if !$(STATIC_BUILD)
@echo creating package index
@type << > $(OUT_DIR)\pkgIndex.tcl
-if {[catch {package present Tcl 8.6-}]} { return }
+if {![package vsatisfies [package provide Tcl] 8.6-]} return
if {($$::tcl_platform(platform) eq "unix") && ([info exists ::env(DISPLAY)]
|| ([info exists ::argv] && ("-display" in $$::argv)))} {
package ifneeded tk $(TK_PATCH_LEVEL) [list load [file normalize [file join $$dir .. .. bin libtk$(DOTVERSION).dll]]]
diff --git a/win/rules.vc b/win/rules.vc
index e678c34..2ec5292 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -1122,16 +1122,8 @@ STUBPREFIX = $(PROJECT)stub
#
# TIP 430. Unused for 8.6 but no harm defining it to allow a common rules.vc
-!if "$(TCL_PATCH_LETTER)" == "."
-TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_RELEASE_SERIAL).zip
-!else
-TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
-!endif
-!if "$(TK_PATCH_LETTER)" == "."
-TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_RELEASE_SERIAL).zip
-!else
-TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
-!endif
+TCLSCRIPTZIPNAME = libtcl$(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
+TKSCRIPTZIPNAME = libtk$(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
!if $(DOING_TCL)
TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe
diff --git a/win/tcl.m4 b/win/tcl.m4
index 852aa33..76711dd 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -251,7 +251,6 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
# TCL_BIN_DIR
# TCL_SRC_DIR
# TCL_LIB_FILE
-# TCL_ZIP_FILE
#
#------------------------------------------------------------------------
@@ -288,7 +287,6 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
AC_SUBST(TCL_BIN_DIR)
AC_SUBST(TCL_SRC_DIR)
- AC_SUBST(TCL_ZIP_FILE)
AC_SUBST(TCL_LIB_FILE)
AC_SUBST(TCL_LIB_FLAG)
AC_SUBST(TCL_LIB_SPEC)
@@ -617,6 +615,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
else
CFLAGS_NOLTO=""
fi
+ AC_CACHE_CHECK([if the compiler understands -finput-charset],
+ tcl_cv_cc_input_charset, [
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_input_charset=yes],[tcl_cv_cc_input_charset=no])
+ CFLAGS=$hold_cflags])
+ if test $tcl_cv_cc_input_charset = yes; then
+ extra_cflags="$extra_cflags -finput-charset=UTF-8"
+ fi
fi
AC_MSG_CHECKING([compiler flags])
@@ -677,7 +683,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h
index eaceb42..0a747d9 100644
--- a/win/tkWinDefault.h
+++ b/win/tkWinDefault.h
@@ -91,7 +91,6 @@
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
#define DEF_BUTTON_TRISTATE_VALUE ""
-#define DEF_BUTTON_UNDERLINE "-1"
#define DEF_BUTTON_VALUE ""
#define DEF_BUTTON_WIDTH "0"
#define DEF_BUTTON_WRAP_LENGTH "0"
@@ -270,7 +269,6 @@
#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
#define DEF_MENU_ENTRY_SELECT NULL
-#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
* Defaults for menus overall:
@@ -335,7 +333,6 @@
#define DEF_MENUBUTTON_TAKE_FOCUS "0"
#define DEF_MENUBUTTON_TEXT ""
#define DEF_MENUBUTTON_TEXT_VARIABLE ""
-#define DEF_MENUBUTTON_UNDERLINE "-1"
#define DEF_MENUBUTTON_WIDTH "0"
#define DEF_MENUBUTTON_WRAP_LENGTH "0"
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index 00c2bae..46dbaa2 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -242,11 +242,6 @@ MouseTimerProc(
mouseTimerSet = 0;
- /*
- * Get the current mouse position and window. Don't do anything if the
- * mouse hasn't moved since the last time we looked.
- */
-
GetCursorPos(&pos);
TkWinPointerEvent(NULL, pos.x, pos.y);
}