summaryrefslogtreecommitdiffstats
path: root/mac/tclMacResource.c
diff options
context:
space:
mode:
authordas <das>2002-04-08 09:02:00 (GMT)
committerdas <das>2002-04-08 09:02:00 (GMT)
commit0a15882ec2062a8b32ec855925a73e5644108f40 (patch)
tree862099671ae61cb7366e579a4a370691d8ae40fc /mac/tclMacResource.c
parent99e8896f2e7f6cdf266ea20b486a1587ba574dba (diff)
downloadtcl-0a15882ec2062a8b32ec855925a73e5644108f40.zip
tcl-0a15882ec2062a8b32ec855925a73e5644108f40.tar.gz
tcl-0a15882ec2062a8b32ec855925a73e5644108f40.tar.bz2
2002-04-08 Daniel Steffen <das@users.sourceforge.net>
* generic/tcl.h: no <sys/types.h> on mac. * mac/tclMacFile.c: minor fixes to Vince's changes from 03-24. * mac/tclMacOSA.c: * mac/tclMacResource.c: added missing Tcl_UtfToExternalDString conversions of resource file names. * mac/tclMacSock.c (TcpGetOptionProc): fixed bug introduced by Andreas on 02-25; changed strcmp's to strncmp's so that option comparison behaves like on other platforms. * mac/tcltkMacBuildSupport.sea.hqx (CW Pro6 changes): added support to allow Tk to hookup C library stderr/stdout to TkConsole. * tests/basic.test: * tests/cmdAH.test: * tests/encoding.test: * tests/fileSystem.test: * tests/ioCmd.test: fixed tests failing on mac: check for existence of [exec], changed some result strings.
Diffstat (limited to 'mac/tclMacResource.c')
-rw-r--r--mac/tclMacResource.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mac/tclMacResource.c b/mac/tclMacResource.c
index 671aea1..7052f2b 100644
--- a/mac/tclMacResource.c
+++ b/mac/tclMacResource.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacResource.c,v 1.12 2002/01/27 11:10:03 das Exp $
+ * RCS: @(#) $Id: tclMacResource.c,v 1.13 2002/04/08 09:02:52 das Exp $
*/
#include <Errors.h>
@@ -1248,7 +1248,7 @@ Tcl_MacEvalResource(
short saveRef, fileRef = -1;
char idStr[64];
FSSpec fileSpec;
- Tcl_DString buffer;
+ Tcl_DString ds, buffer;
CONST char *nativeName;
saveRef = CurResFile();
@@ -1256,12 +1256,14 @@ Tcl_MacEvalResource(
if (fileName != NULL) {
OSErr err;
- nativeName = Tcl_TranslateFileName(interp, fileName, &buffer);
- if (nativeName == NULL) {
+ if (Tcl_TranslateFileName(interp, fileName, &buffer) == NULL) {
return TCL_ERROR;
}
+ nativeName = Tcl_UtfToExternalDString(NULL, Tcl_DStringValue(&buffer),
+ Tcl_DStringLength(&buffer), &ds);
err = FSpLocationFromPath(strlen(nativeName), nativeName,
&fileSpec);
+ Tcl_DStringFree(&ds);
Tcl_DStringFree(&buffer);
if (err != noErr) {
Tcl_AppendResult(interp, "Error finding the file: \"",