diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-22 08:54:22 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-22 08:54:22 (GMT) |
commit | 20a005ef0c7ab42b7f4f703572c56ac2af790137 (patch) | |
tree | 295f11b07b62234a45581c7e7e7d58a8a02c01d3 /win | |
parent | 371daa9f78b7f888ce06ec270477e2dc174a54a1 (diff) | |
parent | 8e65c4de1acc5309017fcc308dc64b435509e719 (diff) | |
download | tk-20a005ef0c7ab42b7f4f703572c56ac2af790137.zip tk-20a005ef0c7ab42b7f4f703572c56ac2af790137.tar.gz tk-20a005ef0c7ab42b7f4f703572c56ac2af790137.tar.bz2 |
Merge trunk
Diffstat (limited to 'win')
-rwxr-xr-x | win/configure | 9 | ||||
-rw-r--r-- | win/makefile.vc | 2 | ||||
-rw-r--r-- | win/rules.vc | 17 | ||||
-rw-r--r-- | win/tcl.m4 | 2 | ||||
-rw-r--r-- | win/tkWinFont.c | 2 | ||||
-rw-r--r-- | win/tkWinKey.c | 2 | ||||
-rw-r--r-- | win/tkWinPointer.c | 4 | ||||
-rw-r--r-- | win/tkWinWm.c | 28 |
8 files changed, 44 insertions, 22 deletions
diff --git a/win/configure b/win/configure index 7e63a81..3bb8570 100755 --- a/win/configure +++ b/win/configure @@ -4664,6 +4664,15 @@ $as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h fi + ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" +if test "x$ac_cv_header_stdbool_h" = xyes; then : + +$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h + +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. diff --git a/win/makefile.vc b/win/makefile.vc index 99aa6c1..311be18 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -316,7 +316,7 @@ PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)" CONFIG_DEFS =/DSTDC_HEADERS=1 /DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
/DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
- /DHAVE_STRINGS_H=1 /DHAVE_INTTYPES_H=1 /DHAVE_STDINT_H=1 \
+ /DHAVE_STRINGS_H=1 /DHAVE_INTTYPES_H=1 \
/DSUPPORT_CONFIG_EMBEDDED /DUNICODE /D_UNICODE \
!if $(HAVE_UXTHEME_H)
/DHAVE_UXTHEME_H=1 \
diff --git a/win/rules.vc b/win/rules.vc index 2b11b01..50911d4 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -24,7 +24,7 @@ _RULES_VC = 1 # For modifications that are not backward-compatible, you *must* change
# the major version.
RULES_VERSION_MAJOR = 1
-RULES_VERSION_MINOR = 4
+RULES_VERSION_MINOR = 5
# The PROJECT macro must be defined by parent makefile.
!if "$(PROJECT)" == ""
@@ -976,6 +976,19 @@ VERSION = $(DOTVERSION:.=) !endif # $(DOING_TCL) ... etc.
+# Windows RC files have 3 version components. Ensure this irrespective
+# of how many components the package has specified. Basically, ensure
+# minimum 4 components by appending 4 0's and then pick out the first 4.
+# Also take care of the fact that DOTVERSION may have "a" or "b" instead
+# of "." separating the version components.
+DOTSEPARATED=$(DOTVERSION:a=.)
+DOTSEPARATED=$(DOTSEPARATED:b=.)
+!if [echo RCCOMMAVERSION = \> versions.vc] \
+ || [for /f "tokens=1,2,3,4,5* delims=." %a in ("$(DOTSEPARATED).0.0.0.0") do echo %a,%b,%c,%d >> versions.vc]
+!error *** Could not generate RCCOMMAVERSION ***
+!endif
+!include versions.vc
+
################################################################
# 10. Construct output directory and file paths
# Figure-out how to name our intermediate and output directories.
@@ -1490,7 +1503,7 @@ GUIEXECMD = $(link32) $(guilflags) -out:$@ $(baselibs) $(tcllibs) $(tklibs) RESCMD = $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TMP_DIR)" \
$(TCL_INCLUDES) \
/DDEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
- /DCOMMAVERSION=$(DOTVERSION:.=,),0 \
+ /DCOMMAVERSION=$(RCCOMMAVERSION) \
/DDOTVERSION=\"$(DOTVERSION)\" \
/DVERSION=\"$(VERSION)\" \
/DSUFX=\"$(SUFX:t=)\" \
@@ -948,6 +948,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ [Defined when cygwin/mingw ignores VOID define in winnt.h]) fi + AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],) + # 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. diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 11385ed..e4f0624 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -2232,7 +2232,7 @@ FontMapLoadPage( end = (row + 1) << FONTMAP_SHIFT; for (i = row << FONTMAP_SHIFT; i < end; i++) { if (Tcl_UtfToExternal(NULL, encoding, src, - Tcl_UniCharToUtf(i, src), TCL_ENCODING_STOPONERROR, NULL, + TkUniCharToUtf(i, src), TCL_ENCODING_STOPONERROR, NULL, buf, sizeof(buf), NULL, NULL, NULL) != TCL_OK) { continue; } diff --git a/win/tkWinKey.c b/win/tkWinKey.c index c3816bf..8a83874 100644 --- a/win/tkWinKey.c +++ b/win/tkWinKey.c @@ -124,7 +124,7 @@ TkpGetString( if (((keysym != NoSymbol) && (keysym > 0) && (keysym < 256)) || (keysym == XK_Return) || (keysym == XK_Tab)) { - len = Tcl_UniCharToUtf(keysym & 255, buf); + len = TkUniCharToUtf(keysym & 255, buf); Tcl_DStringAppend(dsPtr, buf, len); } } diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c index 2b8656b..e7e041f 100644 --- a/win/tkWinPointer.c +++ b/win/tkWinPointer.c @@ -362,8 +362,8 @@ void TkSetCursorPos( int y) { INPUT input; - unsigned xscreen = (GetSystemMetrics(SM_CXSCREEN) - 1); - unsigned yscreen = (GetSystemMetrics(SM_CYSCREEN) - 1); + int xscreen = (int)(GetSystemMetrics(SM_CXSCREEN) - 1); + int yscreen = (int)(GetSystemMetrics(SM_CYSCREEN) - 1); input.type = INPUT_MOUSE; input.mi.dx = (x * 65535 + xscreen/2) / xscreen; diff --git a/win/tkWinWm.c b/win/tkWinWm.c index d273b4c..e6a0a4b 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -4379,9 +4379,9 @@ WmIconphotoCmd( if (!iconInfo.hbmColor) { ckfree(lpIR); Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "failed to create color bitmap for \"%s\"", + "failed to create an iconphoto with image \"%s\"", Tcl_GetString(objv[i]))); - Tcl_SetErrorCode(interp, "TK", "WM", "ICONPHOTO", "BITMAP", NULL); + Tcl_SetErrorCode(interp, "TK", "WM", "ICONPHOTO", "IMAGE", NULL); return TCL_ERROR; } @@ -5189,18 +5189,18 @@ WmStackorderCmd( if (objc == 3) { windows = TkWmStackorderToplevel(winPtr); - if (windows == NULL) { - Tcl_Panic("TkWmStackorderToplevel failed"); - } - - resultObj = Tcl_NewObj(); - for (windowPtr = windows; *windowPtr ; windowPtr++) { - Tcl_ListObjAppendElement(NULL, resultObj, - TkNewWindowObj((Tk_Window) *windowPtr)); + if (windows != NULL) { + resultObj = Tcl_NewObj(); + for (windowPtr = windows; *windowPtr ; windowPtr++) { + Tcl_ListObjAppendElement(NULL, resultObj, + TkNewWindowObj((Tk_Window) *windowPtr)); + } + Tcl_SetObjResult(interp, resultObj); + ckfree(windows); + return TCL_OK; + } else { + return TCL_ERROR; } - Tcl_SetObjResult(interp, resultObj); - ckfree(windows); - return TCL_OK; } else { TkWindow *winPtr2, **winPtr2Ptr = &winPtr2; int index1 = -1, index2 = -1, result; @@ -6807,8 +6807,6 @@ TkWmStackorderToplevel( (LPARAM) &pair) == 0) { ckfree(windows); windows = NULL; - } else if (pair.windowPtr != (windows-1)) { - Tcl_Panic("num matched toplevel windows does not equal num children"); } done: |