summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-10-05 22:46:13 (GMT)
committerhobbs <hobbs>1999-10-05 22:46:13 (GMT)
commitf15864c82ed41e0776fb9e0d200f7423b91ecf70 (patch)
tree407387c39a13993782cd030aed2c747329080649
parent25e723296d7e7b8473d6f19523593ac24f07a3dd (diff)
downloadtcl-f15864c82ed41e0776fb9e0d200f7423b91ecf70.zip
tcl-f15864c82ed41e0776fb9e0d200f7423b91ecf70.tar.gz
tcl-f15864c82ed41e0776fb9e0d200f7423b91ecf70.tar.bz2
* mac/tclMacFCmd.c: fixed filename stuff to support UTF-8 [Bug: 2869]
-rw-r--r--mac/README24
-rw-r--r--mac/tclMacFCmd.c44
2 files changed, 42 insertions, 26 deletions
diff --git a/mac/README b/mac/README
index c7569cc..84aa4b1 100644
--- a/mac/README
+++ b/mac/README
@@ -1,4 +1,4 @@
-Tcl 8.2 for Macintosh
+Tcl 8.3 for Macintosh
by Ray Johnson
Scriptics Corporation
@@ -8,7 +8,7 @@ Jim Ingham
Cygnus Solutions
jingham@cygnus.com
-RCS: @(#) $Id: README,v 1.8 1999/06/25 23:29:53 welch Exp $
+RCS: @(#) $Id: README,v 1.9 1999/10/05 22:46:13 hobbs Exp $
1. Introduction
---------------
@@ -18,7 +18,7 @@ scripting language. The home page for the Macintosh releases is
http://www.scriptics.com/mac/
A summary of what's new in this release is at
- http://www.scriptics.com/software/whatsnew82.html
+ http://www.scriptics.com/software/whatsnew83.html
A summary of Macintosh-specific features is at
http://www.scriptics.com/mac/features.html
@@ -27,11 +27,11 @@ A summary of Macintosh-specific features is at
2. The Distribution
-------------------
-Macintosh Tcl is distributed in three different forms. This
-should make it easier to only download what you need. The
-packages are as follows:
+Macintosh Tcl is distributed in three different forms. This should
+make it easier to only download what you need. Substitute <version>
+with the version you wish to use. The packages are as follows:
-mactk8.2.sea.hqx
+mactk<version>.sea.hqx
This distribution is a "binary" only release. It contains an
installer program that will install a 68k, PowerPC, or Fat
@@ -39,15 +39,15 @@ mactk8.2.sea.hqx
it installs the Tcl & Tk libraries in the Extensions folder inside
your System Folder.
-mactcltk-full-8.2.sea.hqx
+mactcltk-full-<version>.sea.hqx
This release contains the full release of Tcl and Tk for the
Macintosh plus the More Files packages which Macintosh Tcl and Tk
rely on.
-mactcl-source-8.2.sea.hqx
+mactcl-source-<version>.sea.hqx
- This release contains the complete source for Tcl 8.2. In
+ This release contains the complete source for Tcl. In
addition, Metrowerks CodeWarrior libraries and project files
are included. However, you must already have the More Files
package to compile this code.
@@ -55,7 +55,7 @@ mactcl-source-8.2.sea.hqx
The "html" subdirectory contains reference documentation in
in the HTML format. You may also find these pages at:
- http://www.scriptics.com/man/tcl8.2/contents.html
+ http://www.scriptics.com/man/tcl<version>/contents.html
3. Compiling Tcl
----------------
@@ -64,7 +64,7 @@ In order to compile Macintosh Tcl you must have the
following items:
CodeWarrior Pro 2 or 3
- Mac Tcl 8.1 (source)
+ Mac Tcl (source)
More Files 1.4.3
The included project files should work fine. However, for
diff --git a/mac/tclMacFCmd.c b/mac/tclMacFCmd.c
index dbd0680..181130e 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.5 1999/05/11 07:12:00 jingham Exp $
+ * RCS: @(#) $Id: tclMacFCmd.c,v 1.6 1999/10/05 22:46:14 hobbs Exp $
*/
#include "tclInt.h"
@@ -1194,15 +1194,19 @@ static int
GetFileFinderAttributes(
Tcl_Interp *interp, /* The interp to report errors with. */
int objIndex, /* The index of the attribute option. */
- CONST char *fileName, /* The name of the file. */
+ CONST char *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
OSErr err;
FSSpec fileSpec;
FInfo finfo;
-
- err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
-
+ Tcl_DString pathString;
+
+ Tcl_UtfToExternalDString(NULL, path, -1, &pathString);
+ err = FSpLocationFromPath(Tcl_DStringLength(&pathString),
+ Tcl_DStringValue(&pathString), &fileSpec);
+ Tcl_DStringFree(&pathString);
+
if (err == noErr) {
err = FSpGetFInfo(&fileSpec, &finfo);
}
@@ -1269,14 +1273,18 @@ static int
GetFileReadOnly(
Tcl_Interp *interp, /* The interp to report errors with. */
int objIndex, /* The index of the attribute. */
- CONST char *fileName, /* The name of the file. */
+ CONST char *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **readOnlyPtrPtr) /* A pointer to return the object with. */
{
OSErr err;
FSSpec fileSpec;
CInfoPBRec paramBlock;
-
- err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+ Tcl_DString pathString;
+
+ Tcl_UtfToExternalDString(NULL, path, -1, &pathString);
+ err = FSpLocationFromPath(Tcl_DStringLength(&pathString),
+ Tcl_DStringValue(&pathString), &fileSpec);
+ Tcl_DStringFree(&pathString);
if (err == noErr) {
if (err == noErr) {
@@ -1330,14 +1338,18 @@ static int
SetFileFinderAttributes(
Tcl_Interp *interp, /* The interp to report errors with. */
int objIndex, /* The index of the attribute. */
- CONST char *fileName, /* The name of the file. */
+ CONST char *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* The command line object. */
{
OSErr err;
FSSpec fileSpec;
FInfo finfo;
-
- err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+ Tcl_DString pathString;
+
+ Tcl_UtfToExternalDString(NULL, path, -1, &pathString);
+ err = FSpLocationFromPath(Tcl_DStringLength(&pathString),
+ Tcl_DStringValue(&pathString), &fileSpec);
+ Tcl_DStringFree(&pathString);
if (err == noErr) {
err = FSpGetFInfo(&fileSpec, &finfo);
@@ -1418,15 +1430,19 @@ static int
SetFileReadOnly(
Tcl_Interp *interp, /* The interp to report errors with. */
int objIndex, /* The index of the attribute. */
- CONST char *fileName, /* The name of the file. */
+ CONST char *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *readOnlyPtr) /* The command line object. */
{
OSErr err;
FSSpec fileSpec;
HParamBlockRec paramBlock;
int hidden;
-
- err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+ Tcl_DString pathString;
+
+ Tcl_UtfToExternalDString(NULL, path, -1, &pathString);
+ err = FSpLocationFromPath(Tcl_DStringLength(&pathString),
+ Tcl_DStringValue(&pathString), &fileSpec);
+ Tcl_DStringFree(&pathString);
if (err == noErr) {
if (Tcl_GetBooleanFromObj(interp, readOnlyPtr, &hidden) != TCL_OK) {