Tcl Source Code

Check-in [6036f72024]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:proposal from jmphilippe
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-473946
Files: files | file ages | folders
SHA1: 6036f72024cec2567a937b547e76bbc10034f590
User & Date: jan.nijtmans 2012-05-07 07:50:59
Context
2012-05-09
08:47
[Bug 473946]: special characters not correctly sent check-in: 18027385fd user: jan.nijtmans tags: bug-473946
2012-05-07
07:50
proposal from jmphilippe check-in: 6036f72024 user: jan.nijtmans tags: bug-473946
06:33
move TCHAR definition for Cygwin from tclUnixPort.h to tclPlatDecls.h, so it can be used for the Pl... check-in: 1a117d1880 user: jan.nijtmans tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to win/tclWinDde.c.

546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564



565
566
567
568
569
570
571
572
573
574



575
576
577
578
579
580
581
582
583
		    && (convPtr->hConv != hConv); convPtr = convPtr->nextPtr) {
		/*
		 * Empty loop body.
		 */
	    }

	    if (convPtr != NULL) {
		BYTE *returnString;

		len = DdeQueryString(ddeInstance, ddeItem, NULL, 0,
			CP_WINANSI);
		Tcl_DStringInit(&dString);
		Tcl_DStringSetLength(&dString, len);
		utilString = Tcl_DStringValue(&dString);
		DdeQueryString(ddeInstance, ddeItem, utilString, 
                        (DWORD) len + 1, CP_WINANSI);
		if (stricmp(utilString, "$TCLEVAL$EXECUTE$RESULT") == 0) {
		    returnString =
		        (BYTE *)Tcl_GetStringFromObj(convPtr->returnPackagePtr, &len);



		    ddeReturn = DdeCreateDataHandle(ddeInstance,
			    returnString, (DWORD) len+1, 0, ddeItem, CF_TEXT,
			    0);
		} else {
		    Tcl_Obj *variableObjPtr = Tcl_GetVar2Ex(
			    convPtr->riPtr->interp, utilString, NULL, 
			    TCL_GLOBAL_ONLY);
		    if (variableObjPtr != NULL) {
			returnString = (BYTE *)Tcl_GetStringFromObj(variableObjPtr,
				&len);



			ddeReturn = DdeCreateDataHandle(ddeInstance,
				returnString, (DWORD) len+1, 0, ddeItem,
				CF_TEXT, 0);
		    } else {
			ddeReturn = NULL;
		    }
		}
		Tcl_DStringFree(&dString);
	    }






|










|
>
>
>

|






|

>
>
>

|







546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
		    && (convPtr->hConv != hConv); convPtr = convPtr->nextPtr) {
		/*
		 * Empty loop body.
		 */
	    }

	    if (convPtr != NULL) {
		char *returnString;

		len = DdeQueryString(ddeInstance, ddeItem, NULL, 0,
			CP_WINANSI);
		Tcl_DStringInit(&dString);
		Tcl_DStringSetLength(&dString, len);
		utilString = Tcl_DStringValue(&dString);
		DdeQueryString(ddeInstance, ddeItem, utilString, 
                        (DWORD) len + 1, CP_WINANSI);
		if (stricmp(utilString, "$TCLEVAL$EXECUTE$RESULT") == 0) {
		    returnString =
		        Tcl_GetStringFromObj(convPtr->returnPackagePtr, &len);
		    Tcl_DStringInit (&dString);
		    returnString =
			   Tcl_UtfToExternalDString (NULL, returnString, -1, &dString);
		    ddeReturn = DdeCreateDataHandle(ddeInstance,
		    		(BYTE *)returnString, (DWORD) len+1, 0, ddeItem, CF_TEXT,
			    0);
		} else {
		    Tcl_Obj *variableObjPtr = Tcl_GetVar2Ex(
			    convPtr->riPtr->interp, utilString, NULL, 
			    TCL_GLOBAL_ONLY);
		    if (variableObjPtr != NULL) {
			returnString = Tcl_GetStringFromObj(variableObjPtr,
				&len);
		    Tcl_DStringInit (&dString);
		    returnString =
			    Tcl_UtfToExternalDString (NULL, returnString, -1, &dString);
			ddeReturn = DdeCreateDataHandle(ddeInstance,
					(BYTE *)returnString, (DWORD) len+1, 0, ddeItem,
				CF_TEXT, 0);
		    } else {
			ddeReturn = NULL;
		    }
		}
		Tcl_DStringFree(&dString);
	    }