diff options
author | stanton <stanton> | 1999-04-16 01:51:06 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-04-16 01:51:06 (GMT) |
commit | 03656f44f81469f459031fa3a4a7b09c8bc77712 (patch) | |
tree | 31378e81bd58f8c726fc552d6b30cbf3ca07497b /mac/tkMacHLEvents.c | |
parent | 404fc236f34304df53b7e44bc7971d786b87d453 (diff) | |
download | tk-03656f44f81469f459031fa3a4a7b09c8bc77712.zip tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.gz tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.bz2 |
* Merged 8.1 branch into the main trunk
Diffstat (limited to 'mac/tkMacHLEvents.c')
-rw-r--r-- | mac/tkMacHLEvents.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mac/tkMacHLEvents.c b/mac/tkMacHLEvents.c index 71ce38c..f86d2fa 100644 --- a/mac/tkMacHLEvents.c +++ b/mac/tkMacHLEvents.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacHLEvents.c,v 1.2 1998/09/14 18:23:35 stanton Exp $ + * RCS: @(#) $Id: tkMacHLEvents.c,v 1.3 1999/04/16 01:51:31 stanton Exp $ */ #include "tcl.h" @@ -228,13 +228,11 @@ OdocHandler( } Tcl_DStringInit(&command); - Tcl_DStringInit(&pathName); Tcl_DStringAppend(&command, "tkOpenDocument", -1); for (index = 1; index <= count; index++) { int length; Handle fullPath; - Tcl_DStringSetLength(&pathName, 0); err = AEGetNthPtr(&fileSpecList, index, typeFSS, &keyword, &type, (Ptr) &file, sizeof(FSSpec), &actual); if ( err != noErr ) { @@ -243,17 +241,17 @@ OdocHandler( err = FSpPathFromLocation(&file, &length, &fullPath); HLock(fullPath); - Tcl_DStringAppend(&pathName, *fullPath, length); + Tcl_ExternalToUtfDString(NULL, *fullPath, length, &pathName); HUnlock(fullPath); DisposeHandle(fullPath); - Tcl_DStringAppendElement(&command, pathName.string); + Tcl_DStringAppendElement(&command, Tcl_DStringValue(&pathName)); + Tcl_DStringFree(&pathName); } - Tcl_GlobalEval(interp, command.string); + Tcl_GlobalEval(interp, Tcl_DStringValue(&command)); Tcl_DStringFree(&command); - Tcl_DStringFree(&pathName); return noErr; } @@ -361,10 +359,12 @@ ScriptHandler( if (tclErr >= 0) { if (tclErr == TCL_OK) { AEPutParamPtr(reply, keyDirectObject, typeChar, - interp->result, strlen(interp->result)); + Tcl_GetStringResult(interp), + strlen(Tcl_GetStringResult(interp))); } else { AEPutParamPtr(reply, keyErrorString, typeChar, - interp->result, strlen(interp->result)); + Tcl_GetStringResult(interp), + strlen(Tcl_GetStringResult(interp))); AEPutParamPtr(reply, keyErrorNumber, typeInteger, (Ptr) &tclErr, sizeof(int)); } |