summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-11 12:50:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-11 12:50:31 (GMT)
commit2f53eeab0b9831c99ec00b1728bcd2821e3d46ea (patch)
tree4e88007e2a2f512bbc59ba2e3942efcf2daf35fd /win
parent8c7e557089e8b305b0ad128e095b446cddf9ecb3 (diff)
downloadtcl-tip_106_impl.zip
tcl-tip_106_impl.tar.gz
tcl-tip_106_impl.tar.bz2
fix handling of closing '\0' for -binary datatip_106_impl
update dde version to 1.4.0
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in12
-rwxr-xr-xwin/configure4
-rw-r--r--win/configure.in4
-rw-r--r--win/tclWinDde.c10
4 files changed, 16 insertions, 14 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 8492b8f..111f455 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -606,23 +606,23 @@ install-binaries: binaries
done
@if [ -f $(DDE_DLL_FILE) ]; then \
echo installing $(DDE_DLL_FILE); \
- $(COPY) $(DDE_DLL_FILE) $(LIB_INSTALL_DIR)/dde1.3; \
+ $(COPY) $(DDE_DLL_FILE) $(LIB_INSTALL_DIR)/dde${DDEDOTVER}; \
$(COPY) $(ROOT_DIR)/library/dde/pkgIndex.tcl \
- $(LIB_INSTALL_DIR)/dde1.3; \
+ $(LIB_INSTALL_DIR)/dde${DDEDOTVER}; \
fi
@if [ -f $(DDE_LIB_FILE) ]; then \
echo installing $(DDE_LIB_FILE); \
- $(COPY) $(DDE_LIB_FILE) $(LIB_INSTALL_DIR)/dde1.3; \
+ $(COPY) $(DDE_LIB_FILE) $(LIB_INSTALL_DIR)/dde${DDEDOTVER}; \
fi
@if [ -f $(REG_DLL_FILE) ]; then \
echo installing $(REG_DLL_FILE); \
- $(COPY) $(REG_DLL_FILE) $(LIB_INSTALL_DIR)/reg1.3; \
+ $(COPY) $(REG_DLL_FILE) $(LIB_INSTALL_DIR)/reg${REGDOTVER}; \
$(COPY) $(ROOT_DIR)/library/reg/pkgIndex.tcl \
- $(LIB_INSTALL_DIR)/reg1.3; \
+ $(LIB_INSTALL_DIR)/reg${REGDOTVER}; \
fi
@if [ -f $(REG_LIB_FILE) ]; then \
echo installing $(REG_LIB_FILE); \
- $(COPY) $(REG_LIB_FILE) $(LIB_INSTALL_DIR)/reg1.3; \
+ $(COPY) $(REG_LIB_FILE) $(LIB_INSTALL_DIR)/reg${REGDOTVER}; \
fi
install-libraries: libraries install-tzdata install-msgs
diff --git a/win/configure b/win/configure
index 6673ecb..af014b4 100755
--- a/win/configure
+++ b/win/configure
@@ -1316,8 +1316,8 @@ VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.3
TCL_DDE_MAJOR_VERSION=1
-TCL_DDE_MINOR_VERSION=3
-TCL_DDE_PATCH_LEVEL="2"
+TCL_DDE_MINOR_VERSION=4
+TCL_DDE_PATCH_LEVEL="0"
DDEVER=$TCL_DDE_MAJOR_VERSION$TCL_DDE_MINOR_VERSION
TCL_REG_VERSION=1.3
diff --git a/win/configure.in b/win/configure.in
index 1bab810..36a996c 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -19,8 +19,8 @@ VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.3
TCL_DDE_MAJOR_VERSION=1
-TCL_DDE_MINOR_VERSION=3
-TCL_DDE_PATCH_LEVEL="2"
+TCL_DDE_MINOR_VERSION=4
+TCL_DDE_PATCH_LEVEL="0"
DDEVER=$TCL_DDE_MAJOR_VERSION$TCL_DDE_MINOR_VERSION
TCL_REG_VERSION=1.3
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index 387c05a..9645c68 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -88,7 +88,7 @@ static DWORD ddeInstance; /* The application instance handle given to us
* by DdeInitialize. */
static int ddeIsServer = 0;
-#define TCL_DDE_VERSION "1.3.3"
+#define TCL_DDE_VERSION "1.4.0"
#define TCL_DDE_PACKAGE_NAME "dde"
#define TCL_DDE_SERVICE_NAME TEXT("TclEval")
#define TCL_DDE_EXECUTE_RESULT TEXT("$TCLEVAL$EXECUTE$RESULT")
@@ -1395,9 +1395,10 @@ DdeObjCmd(
} else {
dataString = (BYTE *)
Tcl_GetStringFromObj(objv[firstArg + 2], &dataLength);
+ dataLength += 1;
}
- if (dataLength == 0) {
+ if (dataLength <= (binary ? 0 : sizeof(TCHAR))) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("cannot execute null data", -1));
Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", NULL);
@@ -1415,7 +1416,7 @@ DdeObjCmd(
}
ddeData = DdeCreateDataHandle(ddeInstance, dataString,
- (DWORD) dataLength+1, 0, 0, CF_TEXT, 0);
+ (DWORD) dataLength, 0, 0, CF_TEXT, 0);
if (ddeData != NULL) {
if (async) {
DdeClientTransaction((LPBYTE) ddeData, 0xFFFFFFFF, hConv, 0,
@@ -1504,6 +1505,7 @@ DdeObjCmd(
} else {
dataString = (BYTE *)
Tcl_GetStringFromObj(objv[firstArg + 3], &length);
+ length += 1;
}
hConv = DdeConnect(ddeInstance, ddeService, ddeTopic, NULL);
@@ -1517,7 +1519,7 @@ DdeObjCmd(
ddeItem = DdeCreateStringHandle(ddeInstance, (void *) itemString,
CP_WINUNICODE);
if (ddeItem != NULL) {
- ddeData = DdeClientTransaction(dataString, (DWORD) length+1,
+ ddeData = DdeClientTransaction(dataString, (DWORD) length,
hConv, ddeItem, CF_TEXT, XTYP_POKE, 5000, NULL);
if (ddeData == NULL) {
SetDdeError(interp);