summaryrefslogtreecommitdiffstats
path: root/mac/tclMacInit.c
diff options
context:
space:
mode:
authordas <das>2002-01-27 11:09:19 (GMT)
committerdas <das>2002-01-27 11:09:19 (GMT)
commit22bb660bc6f7ab06cef0629d9f88a231ce5d2b7b (patch)
tree8f740075fb62f904aa60a596cb07aebb02849a6f /mac/tclMacInit.c
parent107d41756017e763fb66994fb0ba6072b20a7d2b (diff)
downloadtcl-22bb660bc6f7ab06cef0629d9f88a231ce5d2b7b.zip
tcl-22bb660bc6f7ab06cef0629d9f88a231ce5d2b7b.tar.gz
tcl-22bb660bc6f7ab06cef0629d9f88a231ce5d2b7b.tar.bz2
* generic/tclInt.decls:
* generic/tclIntPlatDecls.h: * mac/tclMacChan.c: * mac/tclMacFCmd.c: * mac/tclMacFile.c: * mac/tclMacInit.c: * mac/tclMacLoad.c: * mac/tclMacResource.c: * mac/tclMacSock.c: TIP 27 CONSTification induced changes * tests/event.test: * tests/main.test: added catches/constraints to test that use features that don't exist on the mac.
Diffstat (limited to 'mac/tclMacInit.c')
-rw-r--r--mac/tclMacInit.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/mac/tclMacInit.c b/mac/tclMacInit.c
index 451e377..8cfe2b5 100644
--- a/mac/tclMacInit.c
+++ b/mac/tclMacInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacInit.c,v 1.7 2002/01/25 20:40:56 dgp Exp $
+ * RCS: @(#) $Id: tclMacInit.c,v 1.8 2002/01/27 11:09:54 das Exp $
*/
#include <AppleEvents.h>
@@ -537,7 +537,7 @@ TclpSetVariables(interp)
int minor, major, objc;
Tcl_Obj **objv;
char versStr[2 * TCL_INTEGER_SPACE];
- char *str;
+ CONST char *str;
Tcl_Obj *pathPtr;
Tcl_DString ds;
@@ -781,9 +781,13 @@ Tcl_SourceRCFile(
fileName = Tcl_GetVar(interp, "tcl_rcRsrcName", TCL_GLOBAL_ONLY);
if (fileName != NULL) {
- c2pstr(fileName);
- h = GetNamedResource('TEXT', (StringPtr) fileName);
- p2cstr((StringPtr) fileName);
+ Str255 rezName;
+ Tcl_DString ds;
+ Tcl_UtfToExternalDString(NULL, fileName, -1, &ds);
+ strcpy((char *) rezName + 1, Tcl_DStringValue(&ds));
+ rezName[0] = (unsigned) Tcl_DStringLength(&ds);
+ h = GetNamedResource('TEXT', rezName);
+ Tcl_DStringFree(&ds);
if (h != NULL) {
if (Tcl_MacEvalResource(interp, fileName, 0, NULL) != TCL_OK) {
errChannel = Tcl_GetStdChannel(TCL_STDERR);