summaryrefslogtreecommitdiffstats
path: root/mac/tclMacResource.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-01-25 20:40:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-01-25 20:40:54 (GMT)
commit7bb89f954aeb2e32b07d01513217ab6930f80ccf (patch)
tree90cd60706107518bc582921a1eb262224b8dac22 /mac/tclMacResource.c
parente987f887ebf5997e0c4461c254ec85e39a7b0b46 (diff)
downloadtcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.zip
tcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.tar.gz
tcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.tar.bz2
* Updated interfaces of generic/tclEncoding, generic/tclFilename.c,
generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
Diffstat (limited to 'mac/tclMacResource.c')
-rw-r--r--mac/tclMacResource.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/mac/tclMacResource.c b/mac/tclMacResource.c
index 4f72b9e..858bc1e 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.9 2002/01/18 03:23:02 das Exp $
+ * RCS: @(#) $Id: tclMacResource.c,v 1.10 2002/01/25 20:40:56 dgp Exp $
*/
#include <Errors.h>
@@ -1235,10 +1235,10 @@ SetSoundVolume(
int
Tcl_MacEvalResource(
Tcl_Interp *interp, /* Interpreter in which to process file. */
- char *resourceName, /* Name of TEXT resource to source,
+ CONST char *resourceName, /* Name of TEXT resource to source,
NULL if number should be used. */
int resourceNumber, /* Resource id of source. */
- char *fileName) /* Name of file to process.
+ CONST char *fileName) /* Name of file to process.
NULL if application resource. */
{
Handle sourceText;
@@ -1249,7 +1249,7 @@ Tcl_MacEvalResource(
char idStr[64];
FSSpec fileSpec;
Tcl_DString buffer;
- char *nativeName;
+ CONST char *nativeName;
saveRef = CurResFile();
@@ -1420,10 +1420,10 @@ Handle
Tcl_MacFindResource(
Tcl_Interp *interp, /* Interpreter in which to process file. */
long resourceType, /* Type of resource to load. */
- char *resourceName, /* Name of resource to find,
+ CONST char *resourceName, /* Name of resource to find,
* NULL if number should be used. */
int resourceNumber, /* Resource id of source. */
- char *resFileRef, /* Registered resource file reference,
+ CONST char *resFileRef, /* Registered resource file reference,
* NULL if searching all open resource files. */
int *releaseIt) /* Should we release this resource when done. */
{
@@ -1462,15 +1462,17 @@ Tcl_MacFindResource(
resource = GetResource(resourceType, resourceNumber);
}
} else {
- c2pstr(resourceName);
+ Tcl_DString ds;
+ char *native = Tcl_UtfToExternalDString(NULL, resourceName, -1, &ds);
+ c2pstr(native);
if (limitSearch) {
resource = Get1NamedResource(resourceType,
- (StringPtr) resourceName);
+ (StringPtr) native);
} else {
resource = GetNamedResource(resourceType,
(StringPtr) resourceName);
}
- p2cstr((StringPtr) resourceName);
+ Tcl_DStringFree(&ds);
}
if (*resource == NULL) {