summaryrefslogtreecommitdiffstats
path: root/mac/tkMacHLEvents.c
diff options
context:
space:
mode:
Diffstat (limited to 'mac/tkMacHLEvents.c')
-rw-r--r--mac/tkMacHLEvents.c18
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));
}