summaryrefslogtreecommitdiffstats
path: root/mac
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
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')
-rw-r--r--mac/tclMacFCmd.c4
-rw-r--r--mac/tclMacFile.c6
-rw-r--r--mac/tclMacInit.c10
-rw-r--r--mac/tclMacOSA.c6
-rw-r--r--mac/tclMacResource.c20
5 files changed, 24 insertions, 22 deletions
diff --git a/mac/tclMacFCmd.c b/mac/tclMacFCmd.c
index 27196f5..bf13e5c 100644
--- a/mac/tclMacFCmd.c
+++ b/mac/tclMacFCmd.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: tclMacFCmd.c,v 1.13 2002/01/18 03:22:40 das Exp $
+ * RCS: @(#) $Id: tclMacFCmd.c,v 1.14 2002/01/25 20:40:56 dgp Exp $
*/
#include "tclInt.h"
@@ -1027,7 +1027,7 @@ GetFileSpecs(
char *dirName;
OSErr err;
int argc;
- char **argv;
+ CONST char **argv;
long d;
Tcl_DString buffer;
diff --git a/mac/tclMacFile.c b/mac/tclMacFile.c
index d38d784..921ada5 100644
--- a/mac/tclMacFile.c
+++ b/mac/tclMacFile.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacFile.c,v 1.14 2002/01/18 03:22:52 das Exp $
+ * RCS: @(#) $Id: tclMacFile.c,v 1.15 2002/01/25 20:40:56 dgp Exp $
*/
/*
@@ -128,7 +128,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
Tcl_Interp *interp; /* Interpreter to receive errors. */
Tcl_Obj *resultPtr; /* List object to lappend results. */
Tcl_Obj *pathPtr; /* Contains path to directory to search. */
- char *pattern; /* Pattern to match against. */
+ CONST char *pattern; /* Pattern to match against. */
Tcl_GlobTypeData *types; /* Object containing list of acceptable types.
* May be NULL. In particular the directory
* flag is very important. */
@@ -541,7 +541,7 @@ TclpObjGetCwd(interp)
}
}
-char *
+CONST char *
TclpGetCwd(
Tcl_Interp *interp, /* If non-NULL, used for error reporting. */
Tcl_DString *bufferPtr) /* Uninitialized or free DString filled
diff --git a/mac/tclMacInit.c b/mac/tclMacInit.c
index b10a0bd..451e377 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.6 2001/12/27 22:46:19 das Exp $
+ * RCS: @(#) $Id: tclMacInit.c,v 1.7 2002/01/25 20:40:56 dgp Exp $
*/
#include <AppleEvents.h>
@@ -354,7 +354,7 @@ TclpInitLibraryPath(argv0)
* by querying the module handle. */
{
Tcl_Obj *objPtr, *pathPtr;
- char *str;
+ CONST char *str;
Tcl_DString ds;
TclMacCreateEnv();
@@ -395,7 +395,7 @@ TclpInitLibraryPath(argv0)
str = TclGetEnv("EXT_FOLDER", &ds);
if ((str != NULL) && (str[0] != '\0')) {
Tcl_DString libPath, path;
- char *argv[3];
+ CONST char *argv[3];
argv[0] = str;
argv[1] = "Tool Command Language";
@@ -739,7 +739,7 @@ Tcl_SourceRCFile(
Tcl_Interp *interp) /* Interpreter to source rc file into. */
{
Tcl_DString temp;
- char *fileName;
+ CONST char *fileName;
Tcl_Channel errChannel;
Handle h;
@@ -747,7 +747,7 @@ Tcl_SourceRCFile(
if (fileName != NULL) {
Tcl_Channel c;
- char *fullName;
+ CONST char *fullName;
Tcl_DStringInit(&temp);
fullName = Tcl_TranslateFileName(interp, fileName, &temp);
diff --git a/mac/tclMacOSA.c b/mac/tclMacOSA.c
index dce052e..8402df5 100644
--- a/mac/tclMacOSA.c
+++ b/mac/tclMacOSA.c
@@ -12,7 +12,7 @@
* See the file "License Terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacOSA.c,v 1.7 2001/11/23 01:27:57 das Exp $
+ * RCS: @(#) $Id: tclMacOSA.c,v 1.8 2002/01/25 20:40:56 dgp Exp $
*/
#define MAC_TCL
@@ -2068,7 +2068,7 @@ tclOSAStore(
char idStr[16 + TCL_INTEGER_SPACE];
FSSpec fileSpec;
Tcl_DString buffer;
- char *nativeName;
+ CONST char *nativeName;
OSErr myErr = noErr;
OSAID scriptID;
Size scriptSize;
@@ -2287,7 +2287,7 @@ tclOSALoad(
char idStr[16 + TCL_INTEGER_SPACE];
FSSpec fileSpec;
Tcl_DString buffer;
- char *nativeName;
+ CONST char *nativeName;
saveRef = CurResFile();
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) {